@hanzo/team 0.1.12 → 0.1.14

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 (172) hide show
  1. package/README.md +1 -0
  2. package/dist/404.html +3 -1
  3. package/dist/admin/index.html +3 -1
  4. package/dist/agents/algo/index.html +3 -1
  5. package/dist/agents/art/index.html +3 -1
  6. package/dist/agents/biz/index.html +3 -1
  7. package/dist/agents/cal/index.html +3 -1
  8. package/dist/agents/core/index.html +3 -1
  9. package/dist/agents/cyber/index.html +3 -1
  10. package/dist/agents/data/index.html +3 -1
  11. package/dist/agents/db/index.html +3 -1
  12. package/dist/agents/des/index.html +3 -1
  13. package/dist/agents/dev/index.html +3 -1
  14. package/dist/agents/doc/index.html +3 -1
  15. package/dist/agents/ed/index.html +3 -1
  16. package/dist/agents/fin/index.html +3 -1
  17. package/dist/agents/gov/index.html +3 -1
  18. package/dist/agents/huma/index.html +3 -1
  19. package/dist/agents/index.html +3 -1
  20. package/dist/agents/lang/index.html +3 -1
  21. package/dist/agents/law/index.html +3 -1
  22. package/dist/agents/mana/index.html +3 -1
  23. package/dist/agents/mark/index.html +3 -1
  24. package/dist/agents/mo/index.html +3 -1
  25. package/dist/agents/mu/index.html +3 -1
  26. package/dist/agents/opera/index.html +3 -1
  27. package/dist/agents/rev/index.html +3 -1
  28. package/dist/agents/sal/index.html +3 -1
  29. package/dist/agents/sci/index.html +3 -1
  30. package/dist/agents/sec/index.html +3 -1
  31. package/dist/agents/su/index.html +3 -1
  32. package/dist/agents/vi/index.html +3 -1
  33. package/dist/apps/ads/index.html +3 -1
  34. package/dist/apps/ai-chat/index.html +3 -1
  35. package/dist/apps/analytics/index.html +3 -1
  36. package/dist/apps/billing/index.html +3 -1
  37. package/dist/apps/bots/index.html +3 -1
  38. package/dist/apps/cal/index.html +3 -1
  39. package/dist/apps/chat/index.html +3 -1
  40. package/dist/apps/cms/index.html +3 -1
  41. package/dist/apps/commerce/index.html +3 -1
  42. package/dist/apps/console/index.html +3 -1
  43. package/dist/apps/crm/index.html +3 -1
  44. package/dist/apps/dataroom/index.html +3 -1
  45. package/dist/apps/dev/index.html +3 -1
  46. package/dist/apps/email/index.html +3 -1
  47. package/dist/apps/index.html +3 -1
  48. package/dist/apps/meet/index.html +3 -1
  49. package/dist/apps/platform/index.html +3 -1
  50. package/dist/apps/sign/index.html +3 -1
  51. package/dist/apps/social/index.html +3 -1
  52. package/dist/apps/tracker/index.html +3 -1
  53. package/dist/assets/Bots-DU1hNVB7.js +174 -0
  54. package/dist/assets/Bots-DU1hNVB7.js.map +1 -0
  55. package/dist/assets/ThemeToggleNext-D0-PyTrG.js +2 -0
  56. package/dist/assets/{ThemeToggleNext-ClJ0mOw1.js.map → ThemeToggleNext-D0-PyTrG.js.map} +1 -1
  57. package/dist/assets/index-C6xlLqXz.js +186 -0
  58. package/dist/assets/index-C6xlLqXz.js.map +1 -0
  59. package/dist/assets/instrument-D2ByLhpL.js +42 -0
  60. package/dist/assets/instrument-D2ByLhpL.js.map +1 -0
  61. package/dist/assets/rolldown-runtime-B0Z9INg1.js +1 -0
  62. package/dist/assets/sha3-DDKddPFc.js +2 -0
  63. package/dist/assets/sha3-DDKddPFc.js.map +1 -0
  64. package/dist/auth/callback/index.html +3 -1
  65. package/dist/auth/index.html +3 -1
  66. package/dist/bots/index.html +3 -1
  67. package/dist/cal/index.html +3 -1
  68. package/dist/calendar/index.html +3 -1
  69. package/dist/chat/c-design/index.html +3 -1
  70. package/dist/chat/c-general/index.html +3 -1
  71. package/dist/chat/c-lux-bank/index.html +3 -1
  72. package/dist/chat/c-lux-bridge/index.html +3 -1
  73. package/dist/chat/c-revenue/index.html +3 -1
  74. package/dist/chat/c-support/index.html +3 -1
  75. package/dist/chat/c-tracker/index.html +3 -1
  76. package/dist/chat/c-ui/index.html +3 -1
  77. package/dist/chat/c-video/index.html +3 -1
  78. package/dist/chat/dm-algo/index.html +3 -1
  79. package/dist/chat/dm-art/index.html +3 -1
  80. package/dist/chat/dm-biz/index.html +3 -1
  81. package/dist/chat/dm-cal/index.html +3 -1
  82. package/dist/chat/dm-core/index.html +3 -1
  83. package/dist/chat/dm-cyber/index.html +3 -1
  84. package/dist/chat/dm-data/index.html +3 -1
  85. package/dist/chat/dm-db/index.html +3 -1
  86. package/dist/chat/dm-des/index.html +3 -1
  87. package/dist/chat/dm-dev/index.html +3 -1
  88. package/dist/chat/dm-doc/index.html +3 -1
  89. package/dist/chat/dm-ed/index.html +3 -1
  90. package/dist/chat/dm-fin/index.html +3 -1
  91. package/dist/chat/dm-gov/index.html +3 -1
  92. package/dist/chat/dm-huma/index.html +3 -1
  93. package/dist/chat/dm-lang/index.html +3 -1
  94. package/dist/chat/dm-law/index.html +3 -1
  95. package/dist/chat/dm-mana/index.html +3 -1
  96. package/dist/chat/dm-mark/index.html +3 -1
  97. package/dist/chat/dm-mo/index.html +3 -1
  98. package/dist/chat/dm-mu/index.html +3 -1
  99. package/dist/chat/dm-opera/index.html +3 -1
  100. package/dist/chat/dm-rev/index.html +3 -1
  101. package/dist/chat/dm-sal/index.html +3 -1
  102. package/dist/chat/dm-sci/index.html +3 -1
  103. package/dist/chat/dm-sec/index.html +3 -1
  104. package/dist/chat/dm-su/index.html +3 -1
  105. package/dist/chat/dm-vi/index.html +3 -1
  106. package/dist/chat/index.html +3 -1
  107. package/dist/crm/analytics/index.html +3 -1
  108. package/dist/crm/automations/index.html +3 -1
  109. package/dist/crm/campaigns/index.html +3 -1
  110. package/dist/crm/companies/index.html +3 -1
  111. package/dist/crm/contacts/index.html +3 -1
  112. package/dist/crm/customers/index.html +3 -1
  113. package/dist/crm/deliverability/index.html +3 -1
  114. package/dist/crm/forms/index.html +3 -1
  115. package/dist/crm/funds/index.html +3 -1
  116. package/dist/crm/index.html +3 -1
  117. package/dist/crm/investors/index.html +3 -1
  118. package/dist/crm/journeys/index.html +3 -1
  119. package/dist/crm/leads/index.html +3 -1
  120. package/dist/crm/lists/index.html +3 -1
  121. package/dist/crm/opportunities/index.html +3 -1
  122. package/dist/crm/segments/index.html +3 -1
  123. package/dist/crm/settings/index.html +3 -1
  124. package/dist/crm/templates/index.html +3 -1
  125. package/dist/crm/webhooks/index.html +3 -1
  126. package/dist/docs/index.html +3 -1
  127. package/dist/files/index.html +3 -1
  128. package/dist/inbox/index.html +3 -1
  129. package/dist/index.html +3 -1
  130. package/dist/issues/index.html +3 -1
  131. package/dist/issues/kanban/index.html +3 -1
  132. package/dist/issues/list/index.html +3 -1
  133. package/dist/login/index.html +3 -1
  134. package/dist/mail/index.html +3 -1
  135. package/dist/meet/index.html +3 -1
  136. package/dist/mine/index.html +3 -1
  137. package/dist/people/index.html +3 -1
  138. package/dist/projects/index.html +3 -1
  139. package/dist/projects/proj-crm/components/index.html +3 -1
  140. package/dist/projects/proj-crm/index.html +3 -1
  141. package/dist/projects/proj-crm/issues/index.html +3 -1
  142. package/dist/projects/proj-crm/issues/kanban/index.html +3 -1
  143. package/dist/projects/proj-crm/issues/list/index.html +3 -1
  144. package/dist/projects/proj-crm/milestones/index.html +3 -1
  145. package/dist/projects/proj-crm/templates/index.html +3 -1
  146. package/dist/projects/proj-dev/components/index.html +3 -1
  147. package/dist/projects/proj-dev/index.html +3 -1
  148. package/dist/projects/proj-dev/issues/index.html +3 -1
  149. package/dist/projects/proj-dev/issues/kanban/index.html +3 -1
  150. package/dist/projects/proj-dev/issues/list/index.html +3 -1
  151. package/dist/projects/proj-dev/milestones/index.html +3 -1
  152. package/dist/projects/proj-dev/templates/index.html +3 -1
  153. package/dist/projects/proj-mkt/components/index.html +3 -1
  154. package/dist/projects/proj-mkt/index.html +3 -1
  155. package/dist/projects/proj-mkt/issues/index.html +3 -1
  156. package/dist/projects/proj-mkt/issues/kanban/index.html +3 -1
  157. package/dist/projects/proj-mkt/issues/list/index.html +3 -1
  158. package/dist/projects/proj-mkt/milestones/index.html +3 -1
  159. package/dist/projects/proj-mkt/templates/index.html +3 -1
  160. package/dist/projects/proj-next/components/index.html +3 -1
  161. package/dist/projects/proj-next/index.html +3 -1
  162. package/dist/projects/proj-next/issues/index.html +3 -1
  163. package/dist/projects/proj-next/issues/kanban/index.html +3 -1
  164. package/dist/projects/proj-next/issues/list/index.html +3 -1
  165. package/dist/projects/proj-next/milestones/index.html +3 -1
  166. package/dist/projects/proj-next/templates/index.html +3 -1
  167. package/dist/settings/index.html +3 -1
  168. package/dist/time/index.html +3 -1
  169. package/package.json +9 -2
  170. package/dist/assets/ThemeToggleNext-ClJ0mOw1.js +0 -2
  171. package/dist/assets/index-eBmhKyf8.js +0 -221
  172. package/dist/assets/index-eBmhKyf8.js.map +0 -1
@@ -0,0 +1,186 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ThemeToggleNext-D0-PyTrG.js","assets/rolldown-runtime-B0Z9INg1.js","assets/instrument-D2ByLhpL.js","assets/Bots-DU1hNVB7.js"])))=>i.map(i=>d[i]);
2
+ import{a as e,t}from"./rolldown-runtime-B0Z9INg1.js";import{$ as n,$t as r,A as i,At as a,B as o,Bt as s,C as c,Ct as l,D as u,Dt as d,E as f,Et as p,F as m,Ft as h,G as g,Gt as _,H as v,Ht as y,It as b,J as x,Jt as S,K as C,Kt as w,L as T,Lt as E,M as D,Mt as O,N as k,Nt as A,O as j,Ot as M,P as ee,Pt as N,Q as te,Qt as ne,R as re,Rt as ie,S as ae,St as oe,T as se,Tt as ce,U as le,Ut as ue,V as de,Vt as fe,W as pe,Wt as me,X as P,Y as he,Yt as ge,Z as F,Zt as _e,_ as ve,_t as ye,at as be,b as xe,bt as Se,c as Ce,ct as we,d as Te,dt as I,et as Ee,f as De,ft as Oe,g as L,gt as ke,h as Ae,ht as je,i as Me,it as Ne,j as Pe,jt as Fe,k as Ie,kt as Le,l as Re,lt as ze,m as Be,mt as Ve,n as He,nt as Ue,o as We,ot as Ge,p as R,pt as Ke,q as qe,qt as Je,r as Ye,rt as Xe,s as Ze,st as Qe,t as $e,tt as et,u as z,ut as tt,v as nt,vt as rt,w as it,wt as B,x as at,xt as ot,y as st,yt as ct,z as lt,zt as ut}from"./instrument-D2ByLhpL.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 dt=t((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}}}})),ft=t(((e,t)=>{t.exports=dt()})),pt=t((e=>{var t=ft(),n=r(),i=ne();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 ee=Array.isArray,N=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,re={pending:!1,data:null,method:null,action:null},ie=[],ae=-1;function oe(e){return{current:e}}function se(e){0>ae||(e.current=ie[ae],ie[ae]=null,ae--)}function ce(e,t){ae++,ie[ae]=e.current,e.current=t}var le=oe(null),ue=oe(null),de=oe(null),fe=oe(null);function pe(e,t){switch(ce(de,t),ce(ue,e),ce(le,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Qd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Qd(t),e=$d(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}se(le),ce(le,e)}function me(){se(le),se(ue),se(de)}function P(e){e.memoizedState!==null&&ce(fe,e);var t=le.current,n=$d(t,e.type);t!==n&&(ce(ue,e),ce(le,n))}function he(e){ue.current===e&&(se(le),se(ue)),fe.current===e&&(se(fe),lp._currentValue=re)}var ge,F;function _e(e){if(ge===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ge=t&&t[1]||``,F=-1<e.stack.indexOf(`
3
+ at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
4
+ `+ge+e+F}var ve=!1;function ye(e,t){if(!e||ve)return``;ve=!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{ve=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?_e(n):``}function be(e,t){switch(e.tag){case 26:case 27:case 5:return _e(e.type);case 16:return _e(`Lazy`);case 13:return e.child!==t&&t!==null?_e(`Suspense Fallback`):_e(`Suspense`);case 19:return _e(`SuspenseList`);case 0:case 15:return ye(e.type,!1);case 11:return ye(e.type.render,!1);case 1:return ye(e.type,!0);case 31:return _e(`Activity`);default:return``}}function xe(e){try{var t=``,n=null;do t+=be(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
8
+ Error generating stack: `+e.message+`
9
+ `+e.stack}}var Se=Object.prototype.hasOwnProperty,Ce=t.unstable_scheduleCallback,we=t.unstable_cancelCallback,Te=t.unstable_shouldYield,I=t.unstable_requestPaint,Ee=t.unstable_now,De=t.unstable_getCurrentPriorityLevel,Oe=t.unstable_ImmediatePriority,L=t.unstable_UserBlockingPriority,ke=t.unstable_NormalPriority,Ae=t.unstable_LowPriority,je=t.unstable_IdlePriority,Me=t.log,Ne=t.unstable_setDisableYieldValue,Pe=null,Fe=null;function Ie(e){if(typeof Me==`function`&&Ne(e),Fe&&typeof Fe.setStrictMode==`function`)try{Fe.setStrictMode(Pe,e)}catch{}}var Le=Math.clz32?Math.clz32:Be,Re=Math.log,ze=Math.LN2;function Be(e){return e>>>=0,e===0?32:31-(Re(e)/ze|0)|0}var Ve=256,He=262144,Ue=4194304;function We(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 Ge(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=We(n))):i=We(o):i=We(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=We(n))):i=We(o)):i=We(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 R(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ke(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 qe(){var e=Ue;return Ue<<=1,!(Ue&62914560)&&(Ue=4194304),e}function Je(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ye(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Xe(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-Le(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&&Ze(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Ze(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Le(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Qe(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Le(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function $e(e,t){var n=t&-t;return n=n&42?1:et(n),(n&(e.suspendedLanes|t))===0?n:0}function et(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 z(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function tt(){var e=te.p;return e===0?(e=window.event,e===void 0?32:Tp(e.type)):e}function nt(e,t){var n=te.p;try{return te.p=e,t()}finally{te.p=n}}var rt=Math.random().toString(36).slice(2),it=`__reactFiber$`+rt,B=`__reactProps$`+rt,at=`__reactContainer$`+rt,ot=`__reactEvents$`+rt,st=`__reactListeners$`+rt,ct=`__reactHandles$`+rt,lt=`__reactResources$`+rt,ut=`__reactMarker$`+rt;function dt(e){delete e[it],delete e[B],delete e[ot],delete e[st],delete e[ct]}function pt(e){var t=e[it];if(t)return t;for(var n=e.parentNode;n;){if(t=n[at]||n[it]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Sf(e);e!==null;){if(n=e[it])return n;e=Sf(e)}return t}e=n,n=e.parentNode}return null}function mt(e){if(e=e[it]||e[at]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function V(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(a(33))}function ht(e){var t=e[lt];return t||=e[lt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function gt(e){e[ut]=!0}var _t=new Set,vt={};function yt(e,t){bt(e,t),bt(e+`Capture`,t)}function bt(e,t){for(vt[e]=t,e=0;e<t.length;e++)_t.add(t[e])}var xt=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]*$`),St={},Ct={};function wt(e){return Se.call(Ct,e)?!0:Se.call(St,e)?!1:xt.test(e)?Ct[e]=!0:(St[e]=!0,!1)}function Tt(e,t,n){if(wt(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 Et(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 Dt(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 Ot(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function kt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function At(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 jt(e){if(!e._valueTracker){var t=kt(e)?`checked`:`value`;e._valueTracker=At(e,t,``+e[t])}}function Mt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=kt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}function Nt(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 Pt=/[\n"\\]/g;function Ft(e){return e.replace(Pt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function It(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=``+Ot(t)):e.value!==``+Ot(t)&&(e.value=``+Ot(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Rt(e,o,Ot(n)):Rt(e,o,Ot(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=``+Ot(s):e.removeAttribute(`name`)}function Lt(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)){jt(e);return}n=n==null?``:``+Ot(n),t=t==null?n:``+Ot(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),jt(e)}function Rt(e,t,n){t===`number`&&Nt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function zt(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=``+Ot(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 Bt(e,t,n){if(t!=null&&(t=``+Ot(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Ot(n)}function Vt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(a(92));if(ee(r)){if(1<r.length)throw Error(a(93));r=r[0]}n=r}n??=``,t=n}n=Ot(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),jt(e)}function Ht(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ut=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 Wt(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||Ut.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Gt(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&&Wt(e,i,r)}else for(var o in t)t.hasOwnProperty(o)&&Wt(e,o,t[o])}function Kt(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 qt=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`]]),Jt=/^[\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 Yt(e){return Jt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Xt(){}var Zt=null;function Qt(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var $t=null,en=null;function tn(e){var t=mt(e);if(t&&(e=t.stateNode)){var n=e[B]||null;a:switch(e=t.stateNode,t.type){case`input`:if(It(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="`+Ft(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[B]||null;if(!i)throw Error(a(90));It(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&&Mt(r)}break a;case`textarea`:Bt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&zt(e,!!n.multiple,t,!1)}}}var nn=!1;function rn(e,t,n){if(nn)return e(t,n);nn=!0;try{return e(t)}finally{if(nn=!1,($t!==null||en!==null)&&(Ou(),$t&&(t=$t,e=en,en=$t=null,tn(t),e)))for(t=0;t<e.length;t++)tn(e[t])}}function an(e,t){var n=e.stateNode;if(n===null)return null;var r=n[B]||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 on=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),sn=!1;if(on)try{var cn={};Object.defineProperty(cn,"passive",{get:function(){sn=!0}}),window.addEventListener(`test`,cn,cn),window.removeEventListener(`test`,cn,cn)}catch{sn=!1}var ln=null,un=null,dn=null;function fn(){if(dn)return dn;var e,t=un,n=t.length,r,i=`value`in ln?ln.value:ln.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 dn=i.slice(e,1<r?1-r:void 0)}function pn(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 mn(){return!0}function hn(){return!1}function gn(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)?mn:hn,this.isPropagationStopped=hn,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=mn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=mn)},persist:function(){},isPersistent:mn}),t}var _n={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},vn=gn(_n),yn=p({},_n,{view:0,detail:0}),bn=gn(yn),xn,Sn,Cn,wn=p({},yn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Fn,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!==Cn&&(Cn&&e.type===`mousemove`?(xn=e.screenX-Cn.screenX,Sn=e.screenY-Cn.screenY):Sn=xn=0,Cn=e),xn)},movementY:function(e){return`movementY`in e?e.movementY:Sn}}),Tn=gn(wn),En=gn(p({},wn,{dataTransfer:0})),Dn=gn(p({},yn,{relatedTarget:0})),On=gn(p({},_n,{animationName:0,elapsedTime:0,pseudoElement:0})),kn=gn(p({},_n,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),An=gn(p({},_n,{data:0})),jn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Mn={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`},Nn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Pn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Nn[e])?!!t[e]:!1}function Fn(){return Pn}var In=gn(p({},yn,{key:function(e){if(e.key){var t=jn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=pn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Mn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Fn,charCode:function(e){return e.type===`keypress`?pn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?pn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Ln=gn(p({},wn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Rn=gn(p({},yn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Fn})),zn=gn(p({},_n,{propertyName:0,elapsedTime:0,pseudoElement:0})),Bn=gn(p({},wn,{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})),Vn=gn(p({},_n,{newState:0,oldState:0})),Hn=[9,13,27,32],Un=on&&`CompositionEvent`in window,Wn=null;on&&`documentMode`in document&&(Wn=document.documentMode);var Gn=on&&`TextEvent`in window&&!Wn,Kn=on&&(!Un||Wn&&8<Wn&&11>=Wn),qn=` `,Jn=!1;function Yn(e,t){switch(e){case`keyup`:return Hn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Xn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Zn=!1;function Qn(e,t){switch(e){case`compositionend`:return Xn(t);case`keypress`:return t.which===32?(Jn=!0,qn):null;case`textInput`:return e=t.data,e===qn&&Jn?null:e;default:return null}}function $n(e,t){if(Zn)return e===`compositionend`||!Un&&Yn(e,t)?(e=fn(),dn=un=ln=null,Zn=!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 Kn&&t.locale!==`ko`?null:t.data;default:return null}}var er={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 tr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!er[e.type]:t===`textarea`}function nr(e,t,n,r){$t?en?en.push(r):en=[r]:$t=r,t=Id(t,`onChange`),0<t.length&&(n=new vn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var rr=null,ir=null;function ar(e){Od(e,0)}function or(e){if(Mt(V(e)))return e}function sr(e,t){if(e===`change`)return t}var cr=!1;if(on){var lr;if(on){var ur=`oninput`in document;if(!ur){var dr=document.createElement(`div`);dr.setAttribute(`oninput`,`return;`),ur=typeof dr.oninput==`function`}lr=ur}else lr=!1;cr=lr&&(!document.documentMode||9<document.documentMode)}function fr(){rr&&(rr.detachEvent(`onpropertychange`,pr),ir=rr=null)}function pr(e){if(e.propertyName===`value`&&or(ir)){var t=[];nr(t,ir,e,Qt(e)),rn(ar,t)}}function mr(e,t,n){e===`focusin`?(fr(),rr=t,ir=n,rr.attachEvent(`onpropertychange`,pr)):e===`focusout`&&fr()}function hr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return or(ir)}function gr(e,t){if(e===`click`)return or(t)}function _r(e,t){if(e===`input`||e===`change`)return or(t)}function vr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var yr=typeof Object.is==`function`?Object.is:vr;function br(e,t){if(yr(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(!Se.call(t,i)||!yr(e[i],t[i]))return!1}return!0}function xr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Sr(e,t){var n=xr(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=xr(n)}}function Cr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Cr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function wr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Nt(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=Nt(e.document)}return t}function Tr(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 Er=on&&`documentMode`in document&&11>=document.documentMode,Dr=null,Or=null,kr=null,Ar=!1;function jr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ar||Dr==null||Dr!==Nt(r)||(r=Dr,`selectionStart`in r&&Tr(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}),kr&&br(kr,r)||(kr=r,r=Id(Or,`onSelect`),0<r.length&&(t=new vn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Dr)))}function Mr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Nr={animationend:Mr(`Animation`,`AnimationEnd`),animationiteration:Mr(`Animation`,`AnimationIteration`),animationstart:Mr(`Animation`,`AnimationStart`),transitionrun:Mr(`Transition`,`TransitionRun`),transitionstart:Mr(`Transition`,`TransitionStart`),transitioncancel:Mr(`Transition`,`TransitionCancel`),transitionend:Mr(`Transition`,`TransitionEnd`)},Pr={},Fr={};on&&(Fr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Nr.animationend.animation,delete Nr.animationiteration.animation,delete Nr.animationstart.animation),`TransitionEvent`in window||delete Nr.transitionend.transition);function Ir(e){if(Pr[e])return Pr[e];if(!Nr[e])return e;var t=Nr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Fr)return Pr[e]=t[n];return e}var Lr=Ir(`animationend`),Rr=Ir(`animationiteration`),zr=Ir(`animationstart`),Br=Ir(`transitionrun`),Vr=Ir(`transitionstart`),Hr=Ir(`transitioncancel`),Ur=Ir(`transitionend`),Wr=new Map,Gr=`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(` `);Gr.push(`scrollEnd`);function Kr(e,t){Wr.set(e,t),yt(t,[e])}var qr=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)},Jr=[],Yr=0,Xr=0;function Zr(){for(var e=Yr,t=Xr=Yr=0;t<e;){var n=Jr[t];Jr[t++]=null;var r=Jr[t];Jr[t++]=null;var i=Jr[t];Jr[t++]=null;var a=Jr[t];if(Jr[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&&ti(n,i,a)}}function Qr(e,t,n,r){Jr[Yr++]=e,Jr[Yr++]=t,Jr[Yr++]=n,Jr[Yr++]=r,Xr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function $r(e,t,n,r){return Qr(e,t,n,r),ni(e)}function ei(e,t){return Qr(e,null,null,t),ni(e)}function ti(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-Le(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ni(e){if(50<yu)throw yu=0,bu=null,Error(a(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ri={};function ii(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 ai(e,t,n,r){return new ii(e,t,n,r)}function oi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function si(e,t){var n=e.alternate;return n===null?(n=ai(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 ci(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 li(e,t,n,r,i,o){var s=0;if(r=e,typeof e==`function`)oi(e)&&(s=1);else if(typeof e==`string`)s=ep(e,n,le.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case D:return e=ai(31,n,t,i),e.elementType=D,e.lanes=o,e;case _:return ui(n.children,i,o,t);case v:s=8,i|=24;break;case y:return e=ai(12,n,t,i|2),e.elementType=y,e.lanes=o,e;case C:return e=ai(13,n,t,i),e.elementType=C,e.lanes=o,e;case w:return e=ai(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=ai(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function ui(e,t,n,r){return e=ai(7,e,r,t),e.lanes=n,e}function di(e,t,n){return e=ai(6,e,null,t),e.lanes=n,e}function fi(e){var t=ai(18,null,null,0);return t.stateNode=e,t}function pi(e,t,n){return t=ai(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var mi=new WeakMap;function hi(e,t){if(typeof e==`object`&&e){var n=mi.get(e);return n===void 0?(t={value:e,source:t,stack:xe(t)},mi.set(e,t),t):n}return{value:e,source:t,stack:xe(t)}}var gi=[],_i=0,vi=null,yi=0,bi=[],xi=0,Si=null,H=1,Ci=``;function wi(e,t){gi[_i++]=yi,gi[_i++]=vi,vi=e,yi=t}function Ti(e,t,n){bi[xi++]=H,bi[xi++]=Ci,bi[xi++]=Si,Si=e;var r=H;e=Ci;var i=32-Le(r)-1;r&=~(1<<i),n+=1;var a=32-Le(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,H=1<<32-Le(t)+i|n<<i|r,Ci=a+e}else H=1<<a|n<<i|r,Ci=e}function Ei(e){e.return!==null&&(wi(e,1),Ti(e,1,0))}function Di(e){for(;e===vi;)vi=gi[--_i],gi[_i]=null,yi=gi[--_i],gi[_i]=null;for(;e===Si;)Si=bi[--xi],bi[xi]=null,Ci=bi[--xi],bi[xi]=null,H=bi[--xi],bi[xi]=null}function Oi(e,t){bi[xi++]=H,bi[xi++]=Ci,bi[xi++]=Si,H=t.id,Ci=t.overflow,Si=e}var ki=null,Ai=null,ji=!1,Mi=null,Ni=!1,Pi=Error(a(519));function Fi(e){throw Vi(hi(Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Pi}function Ii(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[it]=e,t[B]=r,n){case`dialog`:kd(`cancel`,t),kd(`close`,t);break;case`iframe`:case`object`:case`embed`:kd(`load`,t);break;case`video`:case`audio`:for(n=0;n<Ed.length;n++)kd(Ed[n],t);break;case`source`:kd(`error`,t);break;case`img`:case`image`:case`link`:kd(`error`,t),kd(`load`,t);break;case`details`:kd(`toggle`,t);break;case`input`:kd(`invalid`,t),Lt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:kd(`invalid`,t);break;case`textarea`:kd(`invalid`,t),Vt(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||Hd(t.textContent,n)?(r.popover!=null&&(kd(`beforetoggle`,t),kd(`toggle`,t)),r.onScroll!=null&&kd(`scroll`,t),r.onScrollEnd!=null&&kd(`scrollend`,t),r.onClick!=null&&(t.onclick=Xt),t=!0):t=!1,t||Fi(e,!0)}function Li(e){for(ki=e.return;ki;)switch(ki.tag){case 5:case 31:case 13:Ni=!1;return;case 27:case 3:Ni=!0;return;default:ki=ki.return}}function Ri(e){if(e!==ki)return!1;if(!ji)return Li(e),ji=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||ef(e.type,e.memoizedProps)),n=!n),n&&Ai&&Fi(e),Li(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(317));Ai=xf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(317));Ai=xf(e)}else t===27?(t=Ai,lf(e.type)?(e=bf,bf=null,Ai=e):Ai=t):Ai=ki?yf(e.stateNode.nextSibling):null;return!0}function zi(){Ai=ki=null,ji=!1}function Bi(){var e=Mi;return e!==null&&(au===null?au=e:au.push.apply(au,e),Mi=null),e}function Vi(e){Mi===null?Mi=[e]:Mi.push(e)}var Hi=oe(null),Ui=null,Wi=null;function Gi(e,t,n){ce(Hi,t._currentValue),t._currentValue=n}function Ki(e){e._currentValue=Hi.current,se(Hi)}function qi(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 Ji(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),qi(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),qi(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 Yi(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;yr(i.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(i===fe.current){if(s=i.alternate,s===null)throw Error(a(387));s.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e===null?e=[lp]:e.push(lp))}i=i.return}e!==null&&Ji(t,e,n,r),t.flags|=262144}function Xi(e){for(e=e.firstContext;e!==null;){if(!yr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Zi(e){Ui=e,Wi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Qi(e){return ea(Ui,e)}function $i(e,t){return Ui===null&&Zi(e),ea(e,t)}function ea(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Wi===null){if(e===null)throw Error(a(308));Wi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Wi=Wi.next=t;return n}var ta=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()})}},na=t.unstable_scheduleCallback,ra=t.unstable_NormalPriority,ia={$$typeof:x,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function aa(){return{controller:new ta,data:new Map,refCount:0}}function oa(e){e.refCount--,e.refCount===0&&na(ra,function(){e.controller.abort()})}var sa=null,ca=0,la=0,ua=null;function da(e,t){if(sa===null){var n=sa=[];ca=0,la=bd(),ua={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ca++,t.then(fa,fa),t}function fa(){if(--ca===0&&sa!==null){ua!==null&&(ua.status=`fulfilled`);var e=sa;sa=null,la=0,ua=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function pa(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 ma=N.S;N.S=function(e,t){cu=Ee(),typeof t==`object`&&t&&typeof t.then==`function`&&da(e,t),ma!==null&&ma(e,t)};var ha=oe(null);function ga(){var e=ha.current;return e===null?Ul.pooledCache:e}function _a(e,t){t===null?ce(ha,ha.current):ce(ha,t.pool)}function va(){var e=ga();return e===null?null:{parent:ia._currentValue,pool:e}}var ya=Error(a(460)),ba=Error(a(474)),xa=Error(a(542)),Sa={then:function(){}};function Ca(e){return e=e.status,e===`fulfilled`||e===`rejected`}function wa(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Xt,Xt),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Oa(e),e;default:if(typeof t.status==`string`)t.then(Xt,Xt);else{if(e=Ul,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,Oa(e),e}throw Ea=t,ya}}function Ta(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Ea=e,ya):e}}var Ea=null;function Da(){if(Ea===null)throw Error(a(459));var e=Ea;return Ea=null,e}function Oa(e){if(e===ya||e===xa)throw Error(a(483))}var ka=null,Aa=0;function ja(e){var t=Aa;return Aa+=1,ka===null&&(ka=[]),wa(ka,e,t)}function Ma(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Na(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 Pa(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=si(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=di(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&&Ta(a)===t.type)?(t=i(t,n.props),Ma(t,n),t.return=e,t):(t=li(n.type,n.key,n.props,null,e.mode,r),Ma(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=pi(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=ui(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=di(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case h:return n=li(t.type,t.key,t.props,null,e.mode,n),Ma(n,t),n.return=e,n;case g:return t=pi(t,e.mode,n),t.return=e,t;case E:return t=Ta(t),f(e,t,n)}if(ee(t)||A(t))return t=ui(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,ja(t),n);if(t.$$typeof===x)return f(e,$i(e,t),n);Na(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=Ta(n),p(e,t,n,r)}if(ee(n)||A(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,ja(n),r);if(n.$$typeof===x)return p(e,t,$i(e,n),r);Na(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=Ta(r),m(e,t,n,r,i)}if(ee(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,ja(r),i);if(r.$$typeof===x)return m(e,t,n,$i(t,r),i);Na(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),ji&&wi(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 ji&&wi(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)}),ji&&wi(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),ji&&wi(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 ji&&wi(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)}),ji&&wi(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&&Ta(l)===r.type){n(e,r.sibling),c=i(r,o.props),Ma(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===_?(c=ui(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=li(o.type,o.key,o.props,null,e.mode,c),Ma(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=pi(o,e.mode,c),c.return=e,e=c}return s(e);case E:return o=Ta(o),b(e,r,o,c)}if(ee(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,ja(o),c);if(o.$$typeof===x)return b(e,r,$i(e,o),c);Na(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=di(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Aa=0;var i=b(e,t,n,r);return ka=null,i}catch(t){if(t===ya||t===xa)throw t;var a=ai(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Fa=Pa(!0),Ia=Pa(!1),La=!1;function Ra(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function za(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 Ba(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Va(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Hl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ni(e),ti(e,null,n),t}return Qr(e,r,t,n),ni(e)}function Ha(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,Qe(e,n)}}function Ua(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 Wa=!1;function Ga(){if(Wa){var e=ua;if(e!==null)throw e}}function Ka(e,t,n,r){Wa=!1;var i=e.updateQueue;La=!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?(Gl&f)===f:(r&f)===f){f!==0&&f===la&&(Wa=!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:La=!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),$l|=o,e.lanes=o,e.memoizedState=d}}function qa(e,t){if(typeof e!=`function`)throw Error(a(191,e));e.call(t)}function Ja(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)qa(n[e],t)}var Ya=oe(null),Xa=oe(0);function Za(e,t){e=Zl,ce(Xa,e),ce(Ya,t),Zl=e|t.baseLanes}function Qa(){ce(Xa,Zl),ce(Ya,Ya.current)}function $a(){Zl=Xa.current,se(Ya),se(Xa)}var eo=oe(null),to=null;function no(e){var t=e.alternate;ce(so,so.current&1),ce(eo,e),to===null&&(t===null||Ya.current!==null||t.memoizedState!==null)&&(to=e)}function ro(e){ce(so,so.current),ce(eo,e),to===null&&(to=e)}function io(e){e.tag===22?(ce(so,so.current),ce(eo,e),to===null&&(to=e)):ao(e)}function ao(){ce(so,so.current),ce(eo,eo.current)}function oo(e){se(eo),to===e&&(to=null),se(so)}var so=oe(0);function co(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||gf(n)||_f(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 lo=0,uo=null,fo=null,po=null,mo=!1,ho=!1,go=!1,_o=0,vo=0,yo=null,bo=0;function xo(){throw Error(a(321))}function So(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!yr(e[n],t[n]))return!1;return!0}function Co(e,t,n,r,i,a){return lo=a,uo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,N.H=e===null||e.memoizedState===null?Bs:Vs,go=!1,a=n(r,i),go=!1,ho&&(a=To(t,n,r,i)),wo(e),a}function wo(e){N.H=zs;var t=fo!==null&&fo.next!==null;if(lo=0,po=fo=uo=null,mo=!1,vo=0,yo=null,t)throw Error(a(300));e===null||ic||(e=e.dependencies,e!==null&&Xi(e)&&(ic=!0))}function To(e,t,n,r){uo=e;var i=0;do{if(ho&&(yo=null),vo=0,ho=!1,25<=i)throw Error(a(301));if(i+=1,po=fo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}N.H=Hs,o=t(n,r)}while(ho);return o}function Eo(){var e=N.H,t=e.useState()[0];return t=typeof t.then==`function`?No(t):t,e=e.useState()[0],(fo===null?null:fo.memoizedState)!==e&&(uo.flags|=1024),t}function Do(){var e=_o!==0;return _o=0,e}function Oo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function ko(e){if(mo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}mo=!1}lo=0,po=fo=uo=null,ho=!1,vo=_o=0,yo=null}function Ao(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return po===null?uo.memoizedState=po=e:po=po.next=e,po}function jo(){if(fo===null){var e=uo.alternate;e=e===null?null:e.memoizedState}else e=fo.next;var t=po===null?uo.memoizedState:po.next;if(t!==null)po=t,fo=e;else{if(e===null)throw uo.alternate===null?Error(a(467)):Error(a(310));fo=e,e={memoizedState:fo.memoizedState,baseState:fo.baseState,baseQueue:fo.baseQueue,queue:fo.queue,next:null},po===null?uo.memoizedState=po=e:po=po.next=e}return po}function Mo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function No(e){var t=vo;return vo+=1,yo===null&&(yo=[]),e=wa(yo,e,t),t=uo,(po===null?t.memoizedState:po.next)===null&&(t=t.alternate,N.H=t===null||t.memoizedState===null?Bs:Vs),e}function Po(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return No(e);if(e.$$typeof===x)return Qi(e)}throw Error(a(438,String(e)))}function Fo(e){var t=null,n=uo.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=uo.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=Mo(),uo.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 Io(e,t){return typeof t==`function`?t(e):t}function Lo(e){return Ro(jo(),fo,e)}function Ro(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?(lo&f)===f:(Gl&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===la&&(d=!0);else if((lo&p)===p){u=u.next,p===la&&(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,uo.lanes|=p,$l|=p;f=u.action,go&&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,uo.lanes|=f,$l|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!yr(o,e.memoizedState)&&(ic=!0,d&&(n=ua,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 zo(e){var t=jo(),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);yr(o,t.memoizedState)||(ic=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Bo(e,t,n){var r=uo,i=jo(),o=ji;if(o){if(n===void 0)throw Error(a(407));n=n()}else n=t();var s=!yr((fo||i).memoizedState,n);if(s&&(i.memoizedState=n,ic=!0),i=i.queue,ds(Uo.bind(null,r,i,e),[e]),i.getSnapshot!==t||s||po!==null&&po.memoizedState.tag&1){if(r.flags|=2048,os(9,{destroy:void 0},Ho.bind(null,r,i,n,t),null),Ul===null)throw Error(a(349));o||lo&127||Vo(r,t,n)}return n}function Vo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=uo.updateQueue,t===null?(t=Mo(),uo.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Ho(e,t,n,r){t.value=n,t.getSnapshot=r,Wo(t)&&Go(e)}function Uo(e,t,n){return n(function(){Wo(t)&&Go(e)})}function Wo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!yr(e,n)}catch{return!0}}function Go(e){var t=ei(e,2);t!==null&&Cu(t,e,2)}function Ko(e){var t=Ao();if(typeof e==`function`){var n=e;if(e=n(),go){Ie(!0);try{n()}finally{Ie(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:e},t}function qo(e,t,n,r){return e.baseState=n,Ro(e,fo,typeof r==`function`?r:Io)}function Jo(e,t,n,r,i){if(Is(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)}};N.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Yo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Yo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=N.T,o={};N.T=o;try{var s=n(i,r),c=N.S;c!==null&&c(o,s),Xo(e,t,s)}catch(n){Qo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),N.T=a}}else try{a=n(i,r),Xo(e,t,a)}catch(n){Qo(e,t,n)}}function Xo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Zo(e,t,n)},function(n){return Qo(e,t,n)}):Zo(e,t,n)}function Zo(e,t,n){t.status=`fulfilled`,t.value=n,$o(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Yo(e,n)))}function Qo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,$o(t),t=t.next;while(t!==r)}e.action=null}function $o(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function es(e,t){return t}function ts(e,t){if(ji){var n=Ul.formState;if(n!==null){a:{var r=uo;if(ji){if(Ai){b:{for(var i=Ai,a=Ni;i.nodeType!==8;){if(!a){i=null;break b}if(i=yf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Ai=yf(i.nextSibling),r=i.data===`F!`;break a}}Fi(r)}r=!1}r&&(t=n[0])}}return n=Ao(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:es,lastRenderedState:t},n.queue=r,n=Ns.bind(null,uo,r),r.dispatch=n,r=Ko(!1),a=Fs.bind(null,uo,!1,r.queue),r=Ao(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Jo.bind(null,uo,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function ns(e){return rs(jo(),fo,e)}function rs(e,t,n){if(t=Ro(e,t,es)[0],e=Lo(Io)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=No(t)}catch(e){throw e===ya?xa:e}else r=t;t=jo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(uo.flags|=2048,os(9,{destroy:void 0},is.bind(null,i,n),null)),[r,a,e]}function is(e,t){e.action=t}function as(e){var t=jo(),n=fo;if(n!==null)return rs(t,n,e);jo(),t=t.memoizedState,n=jo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function os(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=uo.updateQueue,t===null&&(t=Mo(),uo.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 ss(){return jo().memoizedState}function cs(e,t,n,r){var i=Ao();uo.flags|=e,i.memoizedState=os(1|t,{destroy:void 0},n,r===void 0?null:r)}function ls(e,t,n,r){var i=jo();r=r===void 0?null:r;var a=i.memoizedState.inst;fo!==null&&r!==null&&So(r,fo.memoizedState.deps)?i.memoizedState=os(t,a,n,r):(uo.flags|=e,i.memoizedState=os(1|t,a,n,r))}function us(e,t){cs(8390656,8,e,t)}function ds(e,t){ls(2048,8,e,t)}function fs(e){uo.flags|=4;var t=uo.updateQueue;if(t===null)t=Mo(),uo.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ps(e){var t=jo().memoizedState;return fs({ref:t,nextImpl:e}),function(){if(Hl&2)throw Error(a(440));return t.impl.apply(void 0,arguments)}}function ms(e,t){return ls(4,2,e,t)}function hs(e,t){return ls(4,4,e,t)}function gs(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 _s(e,t,n){n=n==null?null:n.concat([e]),ls(4,4,gs.bind(null,t,e),n)}function vs(){}function ys(e,t){var n=jo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&So(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function bs(e,t){var n=jo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&So(t,r[1]))return r[0];if(r=e(),go){Ie(!0);try{e()}finally{Ie(!1)}}return n.memoizedState=[r,t],r}function xs(e,t,n){return n===void 0||lo&1073741824&&!(Gl&261930)?e.memoizedState=t:(e.memoizedState=n,e=Su(),uo.lanes|=e,$l|=e,n)}function Ss(e,t,n,r){return yr(n,t)?n:Ya.current===null?!(lo&42)||lo&1073741824&&!(Gl&261930)?(ic=!0,e.memoizedState=n):(e=Su(),uo.lanes|=e,$l|=e,t):(e=xs(e,n,r),yr(e,t)||(ic=!0),e)}function Cs(e,t,n,r,i){var a=te.p;te.p=a!==0&&8>a?a:8;var o=N.T,s={};N.T=s,Fs(e,!1,t,n);try{var c=i(),l=N.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ps(e,t,pa(c,r),xu(e)):Ps(e,t,r,xu(e))}catch(n){Ps(e,t,{then:function(){},status:`rejected`,reason:n},xu())}finally{te.p=a,o!==null&&s.types!==null&&(o.types=s.types),N.T=o}}function ws(){}function Ts(e,t,n,r){if(e.tag!==5)throw Error(a(476));var i=Es(e).queue;Cs(e,i,t,re,n===null?ws:function(){return Ds(e),n(r)})}function Es(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:re,baseState:re,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:re},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ds(e){var t=Es(e);t.next===null&&(t=e.alternate.memoizedState),Ps(e,t.next.queue,{},xu())}function Os(){return Qi(lp)}function ks(){return jo().memoizedState}function As(){return jo().memoizedState}function js(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=xu();e=Ba(n);var r=Va(t,e,n);r!==null&&(Cu(r,t,n),Ha(r,t,n)),t={cache:aa()},e.payload=t;return}t=t.return}}function Ms(e,t,n){var r=xu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Is(e)?Ls(t,n):(n=$r(e,t,n,r),n!==null&&(Cu(n,e,r),Rs(n,t,r)))}function Ns(e,t,n){Ps(e,t,n,xu())}function Ps(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Is(e))Ls(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,yr(s,o))return Qr(e,t,i,0),Ul===null&&Zr(),!1}catch{}if(n=$r(e,t,i,r),n!==null)return Cu(n,e,r),Rs(n,t,r),!0}return!1}function Fs(e,t,n,r){if(r={lane:2,revertLane:bd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Is(e)){if(t)throw Error(a(479))}else t=$r(e,n,r,2),t!==null&&Cu(t,e,2)}function Is(e){var t=e.alternate;return e===uo||t!==null&&t===uo}function Ls(e,t){ho=mo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Rs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Qe(e,n)}}var zs={readContext:Qi,use:Po,useCallback:xo,useContext:xo,useEffect:xo,useImperativeHandle:xo,useLayoutEffect:xo,useInsertionEffect:xo,useMemo:xo,useReducer:xo,useRef:xo,useState:xo,useDebugValue:xo,useDeferredValue:xo,useTransition:xo,useSyncExternalStore:xo,useId:xo,useHostTransitionStatus:xo,useFormState:xo,useActionState:xo,useOptimistic:xo,useMemoCache:xo,useCacheRefresh:xo};zs.useEffectEvent=xo;var Bs={readContext:Qi,use:Po,useCallback:function(e,t){return Ao().memoizedState=[e,t===void 0?null:t],e},useContext:Qi,useEffect:us,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),cs(4194308,4,gs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return cs(4194308,4,e,t)},useInsertionEffect:function(e,t){cs(4,2,e,t)},useMemo:function(e,t){var n=Ao();t=t===void 0?null:t;var r=e();if(go){Ie(!0);try{e()}finally{Ie(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Ao();if(n!==void 0){var i=n(t);if(go){Ie(!0);try{n(t)}finally{Ie(!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=Ms.bind(null,uo,e),[r.memoizedState,e]},useRef:function(e){var t=Ao();return e={current:e},t.memoizedState=e},useState:function(e){e=Ko(e);var t=e.queue,n=Ns.bind(null,uo,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:vs,useDeferredValue:function(e,t){return xs(Ao(),e,t)},useTransition:function(){var e=Ko(!1);return e=Cs.bind(null,uo,e.queue,!0,!1),Ao().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=uo,i=Ao();if(ji){if(n===void 0)throw Error(a(407));n=n()}else{if(n=t(),Ul===null)throw Error(a(349));Gl&127||Vo(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,us(Uo.bind(null,r,o,e),[e]),r.flags|=2048,os(9,{destroy:void 0},Ho.bind(null,r,o,n,t),null),n},useId:function(){var e=Ao(),t=Ul.identifierPrefix;if(ji){var n=Ci,r=H;n=(r&~(1<<32-Le(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=_o++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=bo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Os,useFormState:ts,useActionState:ts,useOptimistic:function(e){var t=Ao();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Fs.bind(null,uo,!0,n),n.dispatch=t,[e,t]},useMemoCache:Fo,useCacheRefresh:function(){return Ao().memoizedState=js.bind(null,uo)},useEffectEvent:function(e){var t=Ao(),n={impl:e};return t.memoizedState=n,function(){if(Hl&2)throw Error(a(440));return n.impl.apply(void 0,arguments)}}},Vs={readContext:Qi,use:Po,useCallback:ys,useContext:Qi,useEffect:ds,useImperativeHandle:_s,useInsertionEffect:ms,useLayoutEffect:hs,useMemo:bs,useReducer:Lo,useRef:ss,useState:function(){return Lo(Io)},useDebugValue:vs,useDeferredValue:function(e,t){return Ss(jo(),fo.memoizedState,e,t)},useTransition:function(){var e=Lo(Io)[0],t=jo().memoizedState;return[typeof e==`boolean`?e:No(e),t]},useSyncExternalStore:Bo,useId:ks,useHostTransitionStatus:Os,useFormState:ns,useActionState:ns,useOptimistic:function(e,t){return qo(jo(),fo,e,t)},useMemoCache:Fo,useCacheRefresh:As};Vs.useEffectEvent=ps;var Hs={readContext:Qi,use:Po,useCallback:ys,useContext:Qi,useEffect:ds,useImperativeHandle:_s,useInsertionEffect:ms,useLayoutEffect:hs,useMemo:bs,useReducer:zo,useRef:ss,useState:function(){return zo(Io)},useDebugValue:vs,useDeferredValue:function(e,t){var n=jo();return fo===null?xs(n,e,t):Ss(n,fo.memoizedState,e,t)},useTransition:function(){var e=zo(Io)[0],t=jo().memoizedState;return[typeof e==`boolean`?e:No(e),t]},useSyncExternalStore:Bo,useId:ks,useHostTransitionStatus:Os,useFormState:as,useActionState:as,useOptimistic:function(e,t){var n=jo();return fo===null?(n.baseState=e,[e,n.queue.dispatch]):qo(n,fo,e,t)},useMemoCache:Fo,useCacheRefresh:As};Hs.useEffectEvent=ps;function Us(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 Ws={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=xu(),i=Ba(r);i.payload=t,n!=null&&(i.callback=n),t=Va(e,i,r),t!==null&&(Cu(t,e,r),Ha(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=xu(),i=Ba(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Va(e,i,r),t!==null&&(Cu(t,e,r),Ha(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=xu(),r=Ba(n);r.tag=2,t!=null&&(r.callback=t),t=Va(e,r,n),t!==null&&(Cu(t,e,n),Ha(t,e,n))}};function Gs(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?!br(n,r)||!br(i,a):!0}function Ks(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&&Ws.enqueueReplaceState(t,t.state,null)}function qs(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 Js(e){qr(e)}function Ys(e){console.error(e)}function Xs(e){qr(e)}function Zs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Qs(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 $s(e,t,n){return n=Ba(n),n.tag=3,n.payload={element:null},n.callback=function(){Zs(e,t)},n}function ec(e){return e=Ba(e),e.tag=3,e}function tc(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(){Qs(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Qs(t,n,r),typeof i!=`function`&&(du===null?du=new Set([this]):du.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function nc(e,t,n,r,i){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Yi(t,n,i,!0),n=eo.current,n!==null){switch(n.tag){case 31:case 13:return to===null?Fu():n.alternate===null&&Ql===0&&(Ql=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===Sa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),ed(e,r,i)),!1;case 22:return n.flags|=65536,r===Sa?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)),ed(e,r,i)),!1}throw Error(a(435,n.tag))}return ed(e,r,i),Fu(),!1}if(ji)return t=eo.current,t===null?(r!==Pi&&(t=Error(a(423),{cause:r}),Vi(hi(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,r=hi(r,n),i=$s(e.stateNode,r,i),Ua(e,i),Ql!==4&&(Ql=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==Pi&&(e=Error(a(422),{cause:r}),Vi(hi(e,n)))),!1;var o=Error(a(520),{cause:r});if(o=hi(o,n),iu===null?iu=[o]:iu.push(o),Ql!==4&&(Ql=2),t===null)return!0;r=hi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=$s(n.stateNode,r,e),Ua(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`&&(du===null||!du.has(o))))return n.flags|=65536,i&=-i,n.lanes|=i,i=ec(i),tc(i,e,n,r),Ua(n,i),!1}n=n.return}while(n!==null);return!1}var rc=Error(a(461)),ic=!1;function ac(e,t,n,r){t.child=e===null?Ia(t,null,n,r):Fa(t,e.child,n,r)}function oc(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 Zi(t),r=Co(e,t,n,o,a,i),s=Do(),e!==null&&!ic?(Oo(e,t,i),Ac(e,t,i)):(ji&&s&&Ei(t),t.flags|=1,ac(e,t,r,i),t.child)}function sc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!oi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,cc(e,t,a,r,i)):(e=li(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!jc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?br:n,n(o,r)&&e.ref===t.ref)return Ac(e,t,i)}return t.flags|=1,e=si(a,r),e.ref=t.ref,e.return=t,t.child=e}function cc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(br(a,r)&&e.ref===t.ref){if(ic=!1,t.pendingProps=r=a,jc(e,i))e.flags&131072&&(ic=!0);else return t.lanes=e.lanes,Ac(e,t,i)}}return gc(e,t,n,r,i)}function lc(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 dc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&_a(t,a===null?null:a.cachePool),a===null?Qa():Za(t,a),io(t);else return r=t.lanes=536870912,dc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&_a(t,null),Qa(),ao(t)):(_a(t,a.cachePool),Za(t,a),ao(t),t.memoizedState=null);return ac(e,t,i,n),t.child}function uc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function dc(e,t,n,r,i){var a=ga();return a=a===null?null:{parent:ia._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&_a(t,null),Qa(),io(t),e!==null&&Yi(e,t,r,!0),t.childLanes=i,null}function fc(e,t){return t=Tc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function pc(e,t,n){return Fa(t,e.child,null,n),e=fc(t,t.pendingProps),e.flags|=2,oo(t),t.memoizedState=null,e}function mc(e,t,n){var r=t.pendingProps,i=!!(t.flags&128);if(t.flags&=-129,e===null){if(ji){if(r.mode===`hidden`)return e=fc(t,r),t.lanes=536870912,uc(null,e);if(ro(t),(e=Ai)?(e=hf(e,Ni),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Si===null?null:{id:H,overflow:Ci},retryLane:536870912,hydrationErrors:null},n=fi(e),n.return=t,t.child=n,ki=t,Ai=null)):e=null,e===null)throw Fi(t);return t.lanes=536870912,null}return fc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(ro(t),i){if(t.flags&256)t.flags&=-257,t=pc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(a(558))}else if(ic||Yi(e,t,n,!1),i=(n&e.childLanes)!==0,ic||i){if(r=Ul,r!==null&&(s=$e(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ei(e,s),Cu(r,e,s),rc;Fu(),t=pc(e,t,n)}else e=o.treeContext,Ai=yf(s.nextSibling),ki=t,ji=!0,Mi=null,Ni=!1,e!==null&&Oi(t,e),t=fc(t,r),t.flags|=4096;return t}return e=si(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function hc(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 gc(e,t,n,r,i){return Zi(t),n=Co(e,t,n,r,void 0,i),r=Do(),e!==null&&!ic?(Oo(e,t,i),Ac(e,t,i)):(ji&&r&&Ei(t),t.flags|=1,ac(e,t,n,i),t.child)}function _c(e,t,n,r,i,a){return Zi(t),t.updateQueue=null,n=To(t,r,n,i),wo(e),r=Do(),e!==null&&!ic?(Oo(e,t,a),Ac(e,t,a)):(ji&&r&&Ei(t),t.flags|=1,ac(e,t,n,a),t.child)}function vc(e,t,n,r,i){if(Zi(t),t.stateNode===null){var a=ri,o=n.contextType;typeof o==`object`&&o&&(a=Qi(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Ws,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ra(t),o=n.contextType,a.context=typeof o==`object`&&o?Qi(o):ri,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Us(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&&Ws.enqueueReplaceState(a,a.state,null),Ka(t,r,a,i),Ga(),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=qs(n,s);a.props=c;var l=a.context,u=n.contextType;o=ri,typeof u==`object`&&u&&(o=Qi(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)&&Ks(t,a,r,o),La=!1;var f=t.memoizedState;a.state=f,Ka(t,r,a,i),Ga(),l=t.memoizedState,s||f!==l||La?(typeof d==`function`&&(Us(t,n,d,r),l=t.memoizedState),(c=La||Gs(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,za(e,t),o=t.memoizedProps,u=qs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ri,typeof l==`object`&&l&&(c=Qi(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)&&Ks(t,a,r,c),La=!1,f=t.memoizedState,a.state=f,Ka(t,r,a,i),Ga();var p=t.memoizedState;o!==d||f!==p||La||e!==null&&e.dependencies!==null&&Xi(e.dependencies)?(typeof s==`function`&&(Us(t,n,s,r),p=t.memoizedState),(u=La||Gs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Xi(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,hc(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=Fa(t,e.child,null,i),t.child=Fa(t,null,n,i)):ac(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Ac(e,t,i),e}function yc(e,t,n,r){return zi(),t.flags|=256,ac(e,t,n,r),t.child}var bc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function xc(e){return{baseLanes:e,cachePool:va()}}function Sc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=nu),e}function Cc(e,t,n){var r=t.pendingProps,i=!1,o=!!(t.flags&128),s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:!!(so.current&2)),s&&(i=!0,t.flags&=-129),s=!!(t.flags&32),t.flags&=-33,e===null){if(ji){if(i?no(t):ao(t),(e=Ai)?(e=hf(e,Ni),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Si===null?null:{id:H,overflow:Ci},retryLane:536870912,hydrationErrors:null},n=fi(e),n.return=t,t.child=n,ki=t,Ai=null)):e=null,e===null)throw Fi(t);return _f(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,i?(ao(t),i=t.mode,c=Tc({mode:`hidden`,children:c},i),r=ui(r,i,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=xc(n),r.childLanes=Sc(e,s,n),t.memoizedState=bc,uc(null,r)):(no(t),wc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(no(t),t.flags&=-257,t=Ec(e,t,n)):t.memoizedState===null?(ao(t),c=r.fallback,i=t.mode,r=Tc({mode:`visible`,children:r.children},i),c=ui(c,i,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Fa(t,e.child,null,n),r=t.child,r.memoizedState=xc(n),r.childLanes=Sc(e,s,n),t.memoizedState=bc,t=uc(null,r)):(ao(t),t.child=e.child,t.flags|=128,t=null);else if(no(t),_f(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(a(419)),r.stack=``,r.digest=s,Vi({value:r,source:null,stack:null}),t=Ec(e,t,n)}else if(ic||Yi(e,t,n,!1),s=(n&e.childLanes)!==0,ic||s){if(s=Ul,s!==null&&(r=$e(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,ei(e,r),Cu(s,e,r),rc;gf(c)||Fu(),t=Ec(e,t,n)}else gf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Ai=yf(c.nextSibling),ki=t,ji=!0,Mi=null,Ni=!1,e!==null&&Oi(t,e),t=wc(t,r.children),t.flags|=4096);return t}return i?(ao(t),c=r.fallback,i=t.mode,l=e.child,u=l.sibling,r=si(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=ui(c,i,n,null),c.flags|=2):c=si(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,uc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=xc(n):(i=c.cachePool,i===null?i=va():(l=ia._currentValue,i=i.parent===l?i:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:i}),r.memoizedState=c,r.childLanes=Sc(e,s,n),t.memoizedState=bc,uc(e.child,r)):(no(t),n=e.child,e=n.sibling,n=si(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 wc(e,t){return t=Tc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Tc(e,t){return e=ai(22,e,null,t),e.lanes=0,e}function Ec(e,t,n){return Fa(t,e.child,null,n),e=wc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Dc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),qi(e.return,t,n)}function Oc(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 kc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=so.current,s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,ce(so,o),ac(e,t,r,n),r=ji?yi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Dc(e,n,t);else if(e.tag===19)Dc(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&&co(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Oc(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&&co(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Oc(t,!0,n,null,a,r);break;case`together`:Oc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Ac(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),$l|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(Yi(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=si(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=si(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function jc(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&Xi(e)))}function Mc(e,t,n){switch(t.tag){case 3:pe(t,t.stateNode.containerInfo),Gi(t,ia,e.memoizedState.cache),zi();break;case 27:case 5:P(t);break;case 4:pe(t,t.stateNode.containerInfo);break;case 10:Gi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ro(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(no(t),e=Ac(e,t,n),e===null?null:e.sibling):Cc(e,t,n):(no(t),t.flags|=128,null);no(t);break;case 19:var i=!!(e.flags&128);if(r=(n&t.childLanes)!==0,r||=(Yi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return kc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ce(so,so.current),r)break;return null;case 22:return t.lanes=0,lc(e,t,n,t.pendingProps);case 24:Gi(t,ia,e.memoizedState.cache)}return Ac(e,t,n)}function Nc(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)ic=!0;else{if(!jc(e,n)&&!(t.flags&128))return ic=!1,Mc(e,t,n);ic=!!(e.flags&131072)}}else ic=!1,ji&&t.flags&1048576&&Ti(t,yi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ta(t.elementType),t.type=e,typeof e==`function`)oi(e)?(r=qs(e,r),t.tag=1,t=vc(null,t,e,r,n)):(t.tag=0,t=gc(null,t,e,r,n));else{if(e!=null){var i=e.$$typeof;if(i===S){t.tag=11,t=oc(null,t,e,r,n);break a}if(i===T){t.tag=14,t=sc(null,t,e,r,n);break a}}throw t=M(e)||e,Error(a(306,t,``))}}return t;case 0:return gc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,i=qs(r,t.pendingProps),vc(e,t,r,i,n);case 3:a:{if(pe(t,t.stateNode.containerInfo),e===null)throw Error(a(387));r=t.pendingProps;var o=t.memoizedState;i=o.element,za(e,t),Ka(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Gi(t,ia,r),r!==o.cache&&Ji(t,[ia],n,!0),Ga(),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=yc(e,t,r,n);break a}if(r!==i){i=hi(Error(a(424)),t),Vi(i),t=yc(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(Ai=yf(e.firstChild),ki=t,ji=!0,Mi=null,Ni=!0,n=Ia(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(zi(),r===i){t=Ac(e,t,n);break a}ac(e,t,r,n)}t=t.child}return t;case 26:return hc(e,t),e===null?(n=Bf(t.type,null,t.pendingProps,null))?t.memoizedState=n:ji||(n=t.type,e=t.pendingProps,r=Zd(de.current).createElement(n),r[it]=t,r[B]=e,Gd(r,n,e),gt(r),t.stateNode=r):t.memoizedState=Bf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return P(t),e===null&&ji&&(r=t.stateNode=Cf(t.type,t.pendingProps,de.current),ki=t,Ni=!0,i=Ai,lf(t.type)?(bf=i,Ai=yf(r.firstChild)):Ai=i),ac(e,t,t.pendingProps.children,n),hc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ji&&((i=r=Ai)&&(r=pf(r,t.type,t.pendingProps,Ni),r===null?i=!1:(t.stateNode=r,ki=t,Ai=yf(r.firstChild),Ni=!1,i=!0)),i||Fi(t)),P(t),i=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,ef(i,o)?r=null:s!==null&&ef(i,s)&&(t.flags|=32),t.memoizedState!==null&&(i=Co(e,t,Eo,null,null,n),lp._currentValue=i),hc(e,t),ac(e,t,r,n),t.child;case 6:return e===null&&ji&&((e=n=Ai)&&(n=mf(n,t.pendingProps,Ni),n===null?e=!1:(t.stateNode=n,ki=t,Ai=null,e=!0)),e||Fi(t)),null;case 13:return Cc(e,t,n);case 4:return pe(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Fa(t,null,r,n):ac(e,t,r,n),t.child;case 11:return oc(e,t,t.type,t.pendingProps,n);case 7:return ac(e,t,t.pendingProps,n),t.child;case 8:return ac(e,t,t.pendingProps.children,n),t.child;case 12:return ac(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Gi(t,t.type,r.value),ac(e,t,r.children,n),t.child;case 9:return i=t.type._context,r=t.pendingProps.children,Zi(t),i=Qi(i),r=r(i),t.flags|=1,ac(e,t,r,n),t.child;case 14:return sc(e,t,t.type,t.pendingProps,n);case 15:return cc(e,t,t.type,t.pendingProps,n);case 19:return kc(e,t,n);case 31:return mc(e,t,n);case 22:return lc(e,t,n,t.pendingProps);case 24:return Zi(t),r=Qi(ia),e===null?(i=ga(),i===null&&(i=Ul,o=aa(),i.pooledCache=o,o.refCount++,o!==null&&(i.pooledCacheLanes|=n),i=o),t.memoizedState={parent:r,cache:i},Ra(t),Gi(t,ia,i)):((e.lanes&n)!==0&&(za(e,t),Ka(t,null,null,n),Ga()),i=e.memoizedState,o=t.memoizedState,i.parent===r?(r=o.cache,Gi(t,ia,r),r!==i.cache&&Ji(t,[ia],n,!0)):(i={parent:r,cache:r},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),Gi(t,ia,r))),ac(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(a(156,t.tag))}function Pc(e){e.flags|=4}function Fc(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(Mu())e.flags|=8192;else throw Ea=Sa,ba}}else e.flags&=-16777217}function Ic(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!tp(t)){if(Mu())e.flags|=8192;else throw Ea=Sa,ba}}function Lc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:qe(),e.lanes|=t,ru|=t)}function Rc(e,t){if(!ji)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 zc(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 Bc(e,t,n){var r=t.pendingProps;switch(Di(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return zc(t),null;case 1:return zc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Ki(ia),me(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ri(t)?Pc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Bi())),zc(t),null;case 26:var i=t.type,o=t.memoizedState;return e===null?(Pc(t),o===null?(zc(t),Fc(t,i,null,r,n)):(zc(t),Ic(t,o))):o?o===e.memoizedState?(zc(t),t.flags&=-16777217):(Pc(t),zc(t),Ic(t,o)):(e=e.memoizedProps,e!==r&&Pc(t),zc(t),Fc(t,i,e,r,n)),null;case 27:if(he(t),n=de.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Pc(t);else{if(!r){if(t.stateNode===null)throw Error(a(166));return zc(t),null}e=le.current,Ri(t)?Ii(t,e):(e=Cf(i,r,n),t.stateNode=e,Pc(t))}return zc(t),null;case 5:if(he(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Pc(t);else{if(!r){if(t.stateNode===null)throw Error(a(166));return zc(t),null}if(o=le.current,Ri(t))Ii(t,o);else{var s=Zd(de.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[it]=t,o[B]=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(Gd(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&&Pc(t)}}return zc(t),Fc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Pc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(a(166));if(e=de.current,Ri(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=ki,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[it]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Hd(e.nodeValue,n)),e||Fi(t,!0)}else e=Zd(e).createTextNode(r),e[it]=t,t.stateNode=e}return zc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ri(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[it]=t}else zi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;zc(t),e=!1}else n=Bi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(oo(t),t):(oo(t),null);if(t.flags&128)throw Error(a(558))}return zc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Ri(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[it]=t}else zi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;zc(t),i=!1}else i=Bi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(oo(t),t):(oo(t),null)}return oo(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),Lc(t,t.updateQueue),zc(t),null);case 4:return me(),e===null&&Md(t.stateNode.containerInfo),zc(t),null;case 10:return Ki(t.type),zc(t),null;case 19:if(se(so),r=t.memoizedState,r===null)return zc(t),null;if(i=!!(t.flags&128),o=r.rendering,o===null){if(i)Rc(r,!1);else{if(Ql!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=co(e),o!==null){for(t.flags|=128,Rc(r,!1),e=o.updateQueue,t.updateQueue=e,Lc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ci(n,e),n=n.sibling;return ce(so,so.current&1|2),ji&&wi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ee()>lu&&(t.flags|=128,i=!0,Rc(r,!1),t.lanes=4194304)}}else{if(!i){if(e=co(o),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Lc(t,e),Rc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!ji)return zc(t),null}else 2*Ee()-r.renderingStartTime>lu&&n!==536870912&&(t.flags|=128,i=!0,Rc(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?(zc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ee(),e.sibling=null,n=so.current,ce(so,i?n&1|2:n&1),ji&&wi(t,r.treeForkCount),e);case 22:case 23:return oo(t),$a(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(zc(t),t.subtreeFlags&6&&(t.flags|=8192)):zc(t),n=t.updateQueue,n!==null&&Lc(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&&se(ha),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ki(ia),zc(t),null;case 25:return null;case 30:return null}throw Error(a(156,t.tag))}function Vc(e,t){switch(Di(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ki(ia),me(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return he(t),null;case 31:if(t.memoizedState!==null){if(oo(t),t.alternate===null)throw Error(a(340));zi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(oo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(a(340));zi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return se(so),null;case 4:return me(),null;case 10:return Ki(t.type),null;case 22:case 23:return oo(t),$a(),e!==null&&se(ha),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ki(ia),null;case 25:return null;default:return null}}function Hc(e,t){switch(Di(t),t.tag){case 3:Ki(ia),me();break;case 26:case 27:case 5:he(t);break;case 4:me();break;case 31:t.memoizedState!==null&&oo(t);break;case 13:oo(t);break;case 19:se(so);break;case 10:Ki(t.type);break;case 22:case 23:oo(t),$a(),e!==null&&se(ha);break;case 24:Ki(ia)}}function Uc(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){$u(t,t.return,e)}}function Wc(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){$u(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){$u(t,t.return,e)}}function Gc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ja(t,n)}catch(t){$u(e,e.return,t)}}}function Kc(e,t,n){n.props=qs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){$u(e,t,n)}}function qc(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){$u(e,t,n)}}function Jc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){$u(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){$u(e,t,n)}else n.current=null}}function Yc(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){$u(e,e.return,t)}}function Xc(e,t,n){try{var r=e.stateNode;Kd(r,e.type,n,t),r[B]=t}catch(t){$u(e,e.return,t)}}function Zc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&lf(e.type)||e.tag===4}function Qc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Zc(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&&lf(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 $c(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=Xt));else if(r!==4&&(r===27&&lf(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for($c(e,t,n),e=e.sibling;e!==null;)$c(e,t,n),e=e.sibling}function el(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&&lf(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(el(e,t,n),e=e.sibling;e!==null;)el(e,t,n),e=e.sibling}function tl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Gd(t,r,n),t[it]=e,t[B]=n}catch(t){$u(e,e.return,t)}}var nl=!1,rl=!1,il=!1,al=typeof WeakSet==`function`?WeakSet:Set,ol=null;function sl(e,t){if(e=e.containerInfo,Yd=vp,e=wr(e),Tr(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(Xd={focusedElem:e,selectionRange:n},vp=!1,ol=t;ol!==null;)if(t=ol,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,ol=e;else for(;ol!==null;){switch(t=ol,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=qs(n.type,i);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){$u(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ff(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:ff(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,ol=e;break}ol=t.return}}function cl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Cl(e,n),r&4&&Uc(5,n);break;case 1:if(Cl(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){$u(n,n.return,e)}else{var i=qs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){$u(n,n.return,e)}}}r&64&&Gc(n),r&512&&qc(n,n.return);break;case 3:if(Cl(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{Ja(e,t)}catch(e){$u(n,n.return,e)}}break;case 27:t===null&&r&4&&tl(n);case 26:case 5:Cl(e,n),t===null&&r&4&&Yc(n),r&512&&qc(n,n.return);break;case 12:Cl(e,n);break;case 31:Cl(e,n),r&4&&ml(e,n);break;case 13:Cl(e,n),r&4&&hl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=rd.bind(null,n),vf(e,n))));break;case 22:if(r=n.memoizedState!==null||nl,!r){t=t!==null&&t.memoizedState!==null||rl,i=nl;var a=rl;nl=r,(rl=t)&&!a?Tl(e,n,!!(n.subtreeFlags&8772)):Cl(e,n),nl=i,rl=a}break;case 30:break;default:Cl(e,n)}}function ll(e){var t=e.alternate;t!==null&&(e.alternate=null,ll(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&dt(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 ul=null,dl=!1;function fl(e,t,n){for(n=n.child;n!==null;)pl(e,t,n),n=n.sibling}function pl(e,t,n){if(Fe&&typeof Fe.onCommitFiberUnmount==`function`)try{Fe.onCommitFiberUnmount(Pe,n)}catch{}switch(n.tag){case 26:rl||Jc(n,t),fl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:rl||Jc(n,t);var r=ul,i=dl;lf(n.type)&&(ul=n.stateNode,dl=!1),fl(e,t,n),wf(n.stateNode),ul=r,dl=i;break;case 5:rl||Jc(n,t);case 6:if(r=ul,i=dl,ul=null,fl(e,t,n),ul=r,dl=i,ul!==null){if(dl)try{(ul.nodeType===9?ul.body:ul.nodeName===`HTML`?ul.ownerDocument.body:ul).removeChild(n.stateNode)}catch(e){$u(n,t,e)}else try{ul.removeChild(n.stateNode)}catch(e){$u(n,t,e)}}break;case 18:ul!==null&&(dl?(e=ul,uf(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Wp(e)):uf(ul,n.stateNode));break;case 4:r=ul,i=dl,ul=n.stateNode.containerInfo,dl=!0,fl(e,t,n),ul=r,dl=i;break;case 0:case 11:case 14:case 15:Wc(2,n,t),rl||Wc(4,n,t),fl(e,t,n);break;case 1:rl||(Jc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Kc(n,t,r)),fl(e,t,n);break;case 21:fl(e,t,n);break;case 22:rl=(r=rl)||n.memoizedState!==null,fl(e,t,n),rl=r;break;default:fl(e,t,n)}}function ml(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Wp(e)}catch(e){$u(t,t.return,e)}}}function hl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Wp(e)}catch(e){$u(t,t.return,e)}}function gl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new al),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new al),t;default:throw Error(a(435,e.tag))}}function _l(e,t){var n=gl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=id.bind(null,e,t);t.then(r,r)}})}function vl(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(lf(c.type)){ul=c.stateNode,dl=!1;break a}break;case 5:ul=c.stateNode,dl=!1;break a;case 3:case 4:ul=c.stateNode.containerInfo,dl=!0;break a}c=c.return}if(ul===null)throw Error(a(160));pl(o,s,i),ul=null,dl=!1,o=i.alternate,o!==null&&(o.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)bl(t,e),t=t.sibling}var yl=null;function bl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:vl(t,e),xl(e),r&4&&(Wc(3,e,e.return),Uc(3,e),Wc(5,e,e.return));break;case 1:vl(t,e),xl(e),r&512&&(rl||n===null||Jc(n,n.return)),r&64&&nl&&(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=yl;if(vl(t,e),xl(e),r&512&&(rl||n===null||Jc(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[ut]||o[it]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=i.createElement(r),i.head.insertBefore(o,i.querySelector(`head > title`))),Gd(o,r,n),o[it]=e,gt(o),r=o;break a;case`link`:var s=Qf(`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),Gd(o,r,n),i.head.appendChild(o);break;case`meta`:if(s=Qf(`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),Gd(o,r,n),i.head.appendChild(o);break;default:throw Error(a(468,r))}o[it]=e,gt(o),r=o}e.stateNode=r}else $f(i,e.type,e.stateNode)}else e.stateNode=qf(i,r,e.memoizedProps)}else o===r?r===null&&e.stateNode!==null&&Xc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?$f(i,e.type,e.stateNode):qf(i,r,e.memoizedProps))}break;case 27:vl(t,e),xl(e),r&512&&(rl||n===null||Jc(n,n.return)),n!==null&&r&4&&Xc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(vl(t,e),xl(e),r&512&&(rl||n===null||Jc(n,n.return)),e.flags&32){i=e.stateNode;try{Ht(i,``)}catch(t){$u(e,e.return,t)}}r&4&&e.stateNode!=null&&(i=e.memoizedProps,Xc(e,i,n===null?i:n.memoizedProps)),r&1024&&(il=!0);break;case 6:if(vl(t,e),xl(e),r&4){if(e.stateNode===null)throw Error(a(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){$u(e,e.return,t)}}break;case 3:if(Zf=null,i=yl,yl=Df(t.containerInfo),vl(t,e),yl=i,xl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Wp(t.containerInfo)}catch(t){$u(e,e.return,t)}il&&(il=!1,Sl(e));break;case 4:r=yl,yl=Df(e.stateNode.containerInfo),vl(t,e),xl(e),yl=r;break;case 12:vl(t,e),xl(e);break;case 31:vl(t,e),xl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,_l(e,r)));break;case 13:vl(t,e),xl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(su=Ee()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,_l(e,r)));break;case 22:i=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=nl,d=rl;if(nl=u||i,rl=d||l,vl(t,e),rl=d,nl=u,xl(e),r&8192)a:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||l||nl||rl||wl(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){$u(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=i?``:l.memoizedProps}catch(e){$u(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;i?df(m,!0):df(l.stateNode,!1)}catch(e){$u(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,_l(e,n))));break;case 19:vl(t,e),xl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,_l(e,r)));break;case 30:break;case 21:break;default:vl(t,e),xl(e)}}function xl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Zc(r)){n=r;break}r=r.return}if(n==null)throw Error(a(160));switch(n.tag){case 27:var i=n.stateNode;el(e,Qc(e),i);break;case 5:var o=n.stateNode;n.flags&32&&(Ht(o,``),n.flags&=-33),el(e,Qc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;$c(e,Qc(e),s);break;default:throw Error(a(161))}}catch(t){$u(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Sl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Sl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Cl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)cl(e,t.alternate,t),t=t.sibling}function wl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Wc(4,t,t.return),wl(t);break;case 1:Jc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Kc(t,t.return,n),wl(t);break;case 27:wf(t.stateNode);case 26:case 5:Jc(t,t.return),wl(t);break;case 22:t.memoizedState===null&&wl(t);break;case 30:wl(t);break;default:wl(t)}e=e.sibling}}function Tl(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:Tl(i,a,n),Uc(4,a);break;case 1:if(Tl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){$u(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++)qa(c[i],s)}catch(e){$u(r,r.return,e)}}n&&o&64&&Gc(a),qc(a,a.return);break;case 27:tl(a);case 26:case 5:Tl(i,a,n),n&&r===null&&o&4&&Yc(a),qc(a,a.return);break;case 12:Tl(i,a,n);break;case 31:Tl(i,a,n),n&&o&4&&ml(i,a);break;case 13:Tl(i,a,n),n&&o&4&&hl(i,a);break;case 22:a.memoizedState===null&&Tl(i,a,n),qc(a,a.return);break;case 30:break;default:Tl(i,a,n)}t=t.sibling}}function El(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&&oa(n))}function Dl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&oa(e))}function Ol(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)kl(e,t,n,r),t=t.sibling}function kl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Ol(e,t,n,r),i&2048&&Uc(9,t);break;case 1:Ol(e,t,n,r);break;case 3:Ol(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&&oa(e)));break;case 12:if(i&2048){Ol(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){$u(t,t.return,e)}}else Ol(e,t,n,r);break;case 31:Ol(e,t,n,r);break;case 13:Ol(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Ol(e,t,n,r):(a._visibility|=2,Al(e,t,n,r,!!(t.subtreeFlags&10256)||!1)):a._visibility&2?Ol(e,t,n,r):jl(e,t),i&2048&&El(o,t);break;case 24:Ol(e,t,n,r),i&2048&&Dl(t.alternate,t);break;default:Ol(e,t,n,r)}}function Al(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:Al(a,o,s,c,i),Uc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Al(a,o,s,c,i)):u._visibility&2?Al(a,o,s,c,i):jl(a,o),i&&l&2048&&El(o.alternate,o);break;case 24:Al(a,o,s,c,i),i&&l&2048&&Dl(o.alternate,o);break;default:Al(a,o,s,c,i)}t=t.sibling}}function jl(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:jl(n,r),i&2048&&El(r.alternate,r);break;case 24:jl(n,r),i&2048&&Dl(r.alternate,r);break;default:jl(n,r)}t=t.sibling}}var Ml=8192;function Nl(e,t,n){if(e.subtreeFlags&Ml)for(e=e.child;e!==null;)Pl(e,t,n),e=e.sibling}function Pl(e,t,n){switch(e.tag){case 26:Nl(e,t,n),e.flags&Ml&&e.memoizedState!==null&&np(n,yl,e.memoizedState,e.memoizedProps);break;case 5:Nl(e,t,n);break;case 3:case 4:var r=yl;yl=Df(e.stateNode.containerInfo),Nl(e,t,n),yl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Ml,Ml=16777216,Nl(e,t,n),Ml=r):Nl(e,t,n));break;default:Nl(e,t,n)}}function Fl(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 Il(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ol=r,zl(r,e)}Fl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ll(e),e=e.sibling}function Ll(e){switch(e.tag){case 0:case 11:case 15:Il(e),e.flags&2048&&Wc(9,e,e.return);break;case 3:Il(e);break;case 12:Il(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Rl(e)):Il(e);break;default:Il(e)}}function Rl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ol=r,zl(r,e)}Fl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Wc(8,t,t.return),Rl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Rl(t));break;default:Rl(t)}e=e.sibling}}function zl(e,t){for(;ol!==null;){var n=ol;switch(n.tag){case 0:case 11:case 15:Wc(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:oa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,ol=r;else a:for(n=e;ol!==null;){r=ol;var i=r.sibling,a=r.return;if(ll(r),r===n){ol=null;break a}if(i!==null){i.return=a,ol=i;break a}ol=a}}}var Bl={getCacheForType:function(e){var t=Qi(ia),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Qi(ia).controller.signal}},Vl=typeof WeakMap==`function`?WeakMap:Map,Hl=0,Ul=null,Wl=null,Gl=0,Kl=0,ql=null,Jl=!1,Yl=!1,Xl=!1,Zl=0,Ql=0,$l=0,eu=0,tu=0,nu=0,ru=0,iu=null,au=null,ou=!1,su=0,cu=0,lu=1/0,uu=null,du=null,fu=0,pu=null,mu=null,hu=0,gu=0,_u=null,vu=null,yu=0,bu=null;function xu(){return Hl&2&&Gl!==0?Gl&-Gl:N.T===null?tt():bd()}function Su(){if(nu===0){if(!(Gl&536870912)||ji){var e=He;He<<=1,!(He&3932160)&&(He=262144),nu=e}else nu=536870912}return e=eo.current,e!==null&&(e.flags|=32),nu}function Cu(e,t,n){(e===Ul&&(Kl===2||Kl===9)||e.cancelPendingCommit!==null)&&(Au(e,0),Du(e,Gl,nu,!1)),Ye(e,n),(!(Hl&2)||e!==Ul)&&(e===Ul&&(!(Hl&2)&&(eu|=n),Ql===4&&Du(e,Gl,nu,!1)),fd(e))}function wu(e,t,n){if(Hl&6)throw Error(a(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||R(e,t),i=r?Ru(e,t):Iu(e,t,!0),o=r;do{if(i===0){Yl&&!r&&Du(e,t,0,!1);break}if(n=e.current.alternate,o&&!Eu(n)){i=Iu(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=iu;var l=c.current.memoizedState.isDehydrated;if(l&&(Au(c,s).flags|=256),s=Iu(c,s,!1),s!==2){if(Xl&&!l){c.errorRecoveryDisabledLanes|=o,eu|=o,i=4;break a}o=au,au=i,o!==null&&(au===null?au=o:au.push.apply(au,o))}i=s}if(o=!1,i!==2)continue}}if(i===1){Au(e,0),Du(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:Du(r,t,nu,!Jl);break a;case 2:au=null;break;case 3:case 5:break;default:throw Error(a(329))}if((t&62914560)===t&&(i=su+300-Ee(),10<i)){if(Du(r,t,nu,!Jl),Ge(r,0,!0)!==0)break a;hu=t,r.timeoutHandle=rf(Tu.bind(null,r,n,au,uu,ou,t,nu,eu,ru,Jl,o,`Throttled`,-0,0),i);break a}Tu(r,n,au,uu,ou,t,nu,eu,ru,Jl,o,null,-0,0)}break}while(1);fd(e)}function Tu(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:Xt},Pl(t,a,d);var m=(a&62914560)===a?su-Ee():(a&4194048)===a?cu-Ee():0;if(m=ip(d,m),m!==null){hu=a,e.cancelPendingCommit=m(Gu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),Du(e,a,o,!l);return}}Gu(e,t,a,n,r,i,o,s,c)}function Eu(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(!yr(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 Du(e,t,n,r){t&=~tu,t&=~eu,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Le(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Ze(e,n,t)}function Ou(){return Hl&6?!0:(pd(0,!1),!1)}function ku(){if(Wl!==null){if(Kl===0)var e=Wl.return;else e=Wl,Wi=Ui=null,ko(e),ka=null,Aa=0,e=Wl;for(;e!==null;)Hc(e.alternate,e),e=e.return;Wl=null}}function Au(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,af(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),hu=0,ku(),Ul=e,Wl=n=si(e.current,null),Gl=t,Kl=0,ql=null,Jl=!1,Yl=R(e,t),Xl=!1,ru=nu=tu=eu=$l=Ql=0,au=iu=null,ou=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Le(r),a=1<<i;t|=e[i],r&=~a}return Zl=t,Zr(),n}function ju(e,t){uo=null,N.H=zs,t===ya||t===xa?(t=Da(),Kl=3):t===ba?(t=Da(),Kl=4):Kl=t===rc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,ql=t,Wl===null&&(Ql=1,Zs(e,hi(t,e.current)))}function Mu(){var e=eo.current;return e===null?!0:(Gl&4194048)===Gl?to===null:(Gl&62914560)===Gl||Gl&536870912?e===to:!1}function Nu(){var e=N.H;return N.H=zs,e===null?zs:e}function Pu(){var e=N.A;return N.A=Bl,e}function Fu(){Ql=4,Jl||(Gl&4194048)!==Gl&&eo.current!==null||(Yl=!0),!($l&134217727)&&!(eu&134217727)||Ul===null||Du(Ul,Gl,nu,!1)}function Iu(e,t,n){var r=Hl;Hl|=2;var i=Nu(),a=Pu();(Ul!==e||Gl!==t)&&(uu=null,Au(e,t)),t=!1;var o=Ql;a:do try{if(Kl!==0&&Wl!==null){var s=Wl,c=ql;switch(Kl){case 8:ku(),o=6;break a;case 3:case 2:case 9:case 6:eo.current===null&&(t=!0);var l=Kl;if(Kl=0,ql=null,Hu(e,s,c,l),n&&Yl){o=0;break a}break;default:l=Kl,Kl=0,ql=null,Hu(e,s,c,l)}}Lu(),o=Ql;break}catch(t){ju(e,t)}while(1);return t&&e.shellSuspendCounter++,Wi=Ui=null,Hl=r,N.H=i,N.A=a,Wl===null&&(Ul=null,Gl=0,Zr()),o}function Lu(){for(;Wl!==null;)Bu(Wl)}function Ru(e,t){var n=Hl;Hl|=2;var r=Nu(),i=Pu();Ul!==e||Gl!==t?(uu=null,lu=Ee()+500,Au(e,t)):Yl=R(e,t);a:do try{if(Kl!==0&&Wl!==null){t=Wl;var o=ql;b:switch(Kl){case 1:Kl=0,ql=null,Hu(e,t,o,1);break;case 2:case 9:if(Ca(o)){Kl=0,ql=null,Vu(t);break}t=function(){Kl!==2&&Kl!==9||Ul!==e||(Kl=7),fd(e)},o.then(t,t);break a;case 3:Kl=7;break a;case 4:Kl=5;break a;case 7:Ca(o)?(Kl=0,ql=null,Vu(t)):(Kl=0,ql=null,Hu(e,t,o,7));break;case 5:var s=null;switch(Wl.tag){case 26:s=Wl.memoizedState;case 5:case 27:var c=Wl;if(s?tp(s):c.stateNode.complete){Kl=0,ql=null;var l=c.sibling;if(l!==null)Wl=l;else{var u=c.return;u===null?Wl=null:(Wl=u,Uu(u))}break b}}Kl=0,ql=null,Hu(e,t,o,5);break;case 6:Kl=0,ql=null,Hu(e,t,o,6);break;case 8:ku(),Ql=6;break a;default:throw Error(a(462))}}zu();break}catch(t){ju(e,t)}while(1);return Wi=Ui=null,N.H=r,N.A=i,Hl=n,Wl===null?(Ul=null,Gl=0,Zr(),Ql):0}function zu(){for(;Wl!==null&&!Te();)Bu(Wl)}function Bu(e){var t=Nc(e.alternate,e,Zl);e.memoizedProps=e.pendingProps,t===null?Uu(e):Wl=t}function Vu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=_c(n,t,t.pendingProps,t.type,void 0,Gl);break;case 11:t=_c(n,t,t.pendingProps,t.type.render,t.ref,Gl);break;case 5:ko(t);default:Hc(n,t),t=Wl=ci(t,Zl),t=Nc(n,t,Zl)}e.memoizedProps=e.pendingProps,t===null?Uu(e):Wl=t}function Hu(e,t,n,r){Wi=Ui=null,ko(t),ka=null,Aa=0;var i=t.return;try{if(nc(e,i,t,n,Gl)){Ql=1,Zs(e,hi(n,e.current)),Wl=null;return}}catch(t){if(i!==null)throw Wl=i,t;Ql=1,Zs(e,hi(n,e.current)),Wl=null;return}t.flags&32768?(ji||r===1?e=!0:Yl||Gl&536870912?e=!1:(Jl=e=!0,(r===2||r===9||r===3||r===6)&&(r=eo.current,r!==null&&r.tag===13&&(r.flags|=16384))),Wu(t,e)):Uu(t)}function Uu(e){var t=e;do{if(t.flags&32768){Wu(t,Jl);return}e=t.return;var n=Bc(t.alternate,t,Zl);if(n!==null){Wl=n;return}if(t=t.sibling,t!==null){Wl=t;return}Wl=t=e}while(t!==null);Ql===0&&(Ql=5)}function Wu(e,t){do{var n=Vc(e.alternate,e);if(n!==null){n.flags&=32767,Wl=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Wl=e;return}Wl=e=n}while(e!==null);Ql=6,Wl=null}function Gu(e,t,n,r,i,o,s,c,l){e.cancelPendingCommit=null;do Xu();while(fu!==0);if(Hl&6)throw Error(a(327));if(t!==null){if(t===e.current)throw Error(a(177));if(o=t.lanes|t.childLanes,o|=Xr,Xe(e,n,o,s,c,l),e===Ul&&(Wl=Ul=null,Gl=0),mu=t,pu=e,hu=n,gu=o,_u=i,vu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,ad(ke,function(){return Zu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=N.T,N.T=null,i=te.p,te.p=2,s=Hl,Hl|=4;try{sl(e,t,n)}finally{Hl=s,te.p=i,N.T=r}}fu=1,Ku(),qu(),Ju()}}function Ku(){if(fu===1){fu=0;var e=pu,t=mu,n=!!(t.flags&13878);if(t.subtreeFlags&13878||n){n=N.T,N.T=null;var r=te.p;te.p=2;var i=Hl;Hl|=4;try{bl(t,e);var a=Xd,o=wr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Cr(s.ownerDocument.documentElement,s)){if(c!==null&&Tr(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 _=Sr(s,h),v=Sr(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}}vp=!!Yd,Xd=Yd=null}finally{Hl=i,te.p=r,N.T=n}}e.current=t,fu=2}}function qu(){if(fu===2){fu=0;var e=pu,t=mu,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=N.T,N.T=null;var r=te.p;te.p=2;var i=Hl;Hl|=4;try{cl(e,t.alternate,t)}finally{Hl=i,te.p=r,N.T=n}}fu=3}}function Ju(){if(fu===4||fu===3){fu=0,I();var e=pu,t=mu,n=hu,r=vu;t.subtreeFlags&10256||t.flags&10256?fu=5:(fu=0,mu=pu=null,Yu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(du=null),z(n),t=t.stateNode,Fe&&typeof Fe.onCommitFiberRoot==`function`)try{Fe.onCommitFiberRoot(Pe,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=N.T,i=te.p,te.p=2,N.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{N.T=t,te.p=i}}hu&3&&Xu(),fd(e),i=e.pendingLanes,n&261930&&i&42?e===bu?yu++:(yu=0,bu=e):yu=0,pd(0,!1)}}function Yu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,oa(t)))}function Xu(){return Ku(),qu(),Ju(),Zu()}function Zu(){if(fu!==5)return!1;var e=pu,t=gu;gu=0;var n=z(hu),r=N.T,i=te.p;try{te.p=32>n?32:n,N.T=null,n=_u,_u=null;var o=pu,s=hu;if(fu=0,mu=pu=null,hu=0,Hl&6)throw Error(a(331));var c=Hl;if(Hl|=4,Ll(o.current),kl(o,o.current,s,n),Hl=c,pd(0,!1),Fe&&typeof Fe.onPostCommitFiberRoot==`function`)try{Fe.onPostCommitFiberRoot(Pe,o)}catch{}return!0}finally{te.p=i,N.T=r,Yu(e,t)}}function Qu(e,t,n){t=hi(n,t),t=$s(e.stateNode,t,2),e=Va(e,t,2),e!==null&&(Ye(e,2),fd(e))}function $u(e,t,n){if(e.tag===3)Qu(e,e,n);else for(;t!==null;){if(t.tag===3){Qu(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(du===null||!du.has(r))){e=hi(n,e),n=ec(2),r=Va(t,n,2),r!==null&&(tc(n,r,t,e),Ye(r,2),fd(r));break}}t=t.return}}function ed(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Vl;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)||(Xl=!0,i.add(n),e=td.bind(null,e,t,n),t.then(e,e))}function td(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ul===e&&(Gl&n)===n&&(Ql===4||Ql===3&&(Gl&62914560)===Gl&&300>Ee()-su?!(Hl&2)&&Au(e,0):tu|=n,ru===Gl&&(ru=0)),fd(e)}function nd(e,t){t===0&&(t=qe()),e=ei(e,t),e!==null&&(Ye(e,t),fd(e))}function rd(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),nd(e,n)}function id(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),nd(e,n)}function ad(e,t){return Ce(e,t)}var od=null,sd=null,cd=!1,ld=!1,ud=!1,dd=0;function fd(e){e!==sd&&e.next===null&&(sd===null?od=sd=e:sd=sd.next=e),ld=!0,cd||(cd=!0,yd())}function pd(e,t){if(!ud&&ld){ud=!0;do for(var n=!1,r=od;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-Le(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,vd(r,a))}else a=Gl,a=Ge(r,r===Ul?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||R(r,a)||(n=!0,vd(r,a))}r=r.next}while(n);ud=!1}}function md(){hd()}function hd(){ld=cd=!1;var e=0;dd!==0&&nf()&&(e=dd);for(var t=Ee(),n=null,r=od;r!==null;){var i=r.next,a=gd(r,t);a===0?(r.next=null,n===null?od=i:n.next=i,i===null&&(sd=n)):(n=r,(e!==0||a&3)&&(ld=!0)),r=i}fu!==0&&fu!==5||pd(e,!1),dd!==0&&(dd=0)}function gd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Le(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Ke(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Ul,n=Gl,n=Ge(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Kl===2||Kl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&we(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||R(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&we(r),z(n)){case 2:case 8:n=L;break;case 32:n=ke;break;case 268435456:n=je;break;default:n=ke}return r=_d.bind(null,e),n=Ce(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&we(r),e.callbackPriority=2,e.callbackNode=null,2}function _d(e,t){if(fu!==0&&fu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Xu()&&e.callbackNode!==n)return null;var r=Gl;return r=Ge(e,e===Ul?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(wu(e,r,t),gd(e,Ee()),e.callbackNode!=null&&e.callbackNode===n?_d.bind(null,e):null)}function vd(e,t){if(Xu())return null;wu(e,t,!0)}function yd(){sf(function(){Hl&6?Ce(Oe,md):hd()})}function bd(){if(dd===0){var e=la;e===0&&(e=Ve,Ve<<=1,!(Ve&261888)&&(Ve=256)),dd=e}return dd}function xd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Yt(``+e)}function Sd(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 Cd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=xd((i[B]||null).action),o=r.submitter;o&&(t=(t=o[B]||null)?xd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new vn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(dd!==0){var e=o?Sd(i,o):new FormData(i);Ts(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?Sd(i,o):new FormData(i),Ts(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var wd=0;wd<Gr.length;wd++){var Td=Gr[wd];Kr(Td.toLowerCase(),`on`+(Td[0].toUpperCase()+Td.slice(1)))}Kr(Lr,`onAnimationEnd`),Kr(Rr,`onAnimationIteration`),Kr(zr,`onAnimationStart`),Kr(`dblclick`,`onDoubleClick`),Kr(`focusin`,`onFocus`),Kr(`focusout`,`onBlur`),Kr(Br,`onTransitionRun`),Kr(Vr,`onTransitionStart`),Kr(Hr,`onTransitionCancel`),Kr(Ur,`onTransitionEnd`),bt(`onMouseEnter`,[`mouseout`,`mouseover`]),bt(`onMouseLeave`,[`mouseout`,`mouseover`]),bt(`onPointerEnter`,[`pointerout`,`pointerover`]),bt(`onPointerLeave`,[`pointerout`,`pointerover`]),yt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),yt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),yt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),yt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),yt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),yt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Ed=`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(` `),Dd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Ed));function Od(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){qr(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){qr(e)}i.currentTarget=null,a=c}}}}function kd(e,t){var n=t[ot];n===void 0&&(n=t[ot]=new Set);var r=e+`__bubble`;n.has(r)||(Nd(t,e,2,!1),n.add(r))}function Ad(e,t,n){var r=0;t&&(r|=4),Nd(n,e,r,t)}var jd=`_reactListening`+Math.random().toString(36).slice(2);function Md(e){if(!e[jd]){e[jd]=!0,_t.forEach(function(t){t!==`selectionchange`&&(Dd.has(t)||Ad(t,!1,e),Ad(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[jd]||(t[jd]=!0,Ad(`selectionchange`,!1,t))}}function Nd(e,t,n,r){switch(Tp(t)){case 2:var i=yp;break;case 8:i=bp;break;default:i=xp}n=i.bind(null,t,n,e),i=void 0,!sn||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 Pd(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=pt(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}rn(function(){var r=a,i=Qt(n),o=[];a:{var c=Wr.get(e);if(c!==void 0){var l=vn,u=e;switch(e){case`keypress`:if(pn(n)===0)break a;case`keydown`:case`keyup`:l=In;break;case`focusin`:u=`focus`,l=Dn;break;case`focusout`:u=`blur`,l=Dn;break;case`beforeblur`:case`afterblur`:l=Dn;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=Tn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=En;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Rn;break;case Lr:case Rr:case zr:l=On;break;case Ur:l=zn;break;case`scroll`:case`scrollend`:l=bn;break;case`wheel`:l=Bn;break;case`copy`:case`cut`:case`paste`:l=kn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Ln;break;case`toggle`:case`beforetoggle`:l=Vn}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=an(m,p),g!=null&&d.push(Fd(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!==Zt&&(u=n.relatedTarget||n.fromElement)&&(pt(u)||u[at]))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?pt(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=Tn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Ln,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:V(l),h=u==null?c:V(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,pt(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=Ld,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&&Rd(o,c,l,d,!1),u!==null&&f!==null&&Rd(o,f,u,d,!0)}}a:{if(c=r?V(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=sr;else if(tr(c)){if(cr)v=_r;else{v=hr;var y=mr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Kt(r.elementType)&&(v=sr):v=gr;if(v&&=v(e,r)){nr(o,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Rt(c,`number`,c.value)}switch(y=r?V(r):window,e){case`focusin`:(tr(y)||y.contentEditable===`true`)&&(Dr=y,Or=r,kr=null);break;case`focusout`:kr=Or=Dr=null;break;case`mousedown`:Ar=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Ar=!1,jr(o,n,i);break;case`selectionchange`:if(Er)break;case`keydown`:case`keyup`:jr(o,n,i)}var b;if(Un)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 Zn?Yn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Kn&&n.locale!==`ko`&&(Zn||x!==`onCompositionStart`?x===`onCompositionEnd`&&Zn&&(b=fn()):(ln=i,un=`value`in ln?ln.value:ln.textContent,Zn=!0)),y=Id(r,x),0<y.length&&(x=new An(x,e,null,n,i),o.push({event:x,listeners:y}),b?x.data=b:(b=Xn(n),b!==null&&(x.data=b)))),(b=Gn?Qn(e,n):$n(e,n))&&(x=Id(r,`onBeforeInput`),0<x.length&&(y=new An(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:y,listeners:x}),y.data=b)),Cd(o,e,r,n,i)}Od(o,t)})}function Fd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Id(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=an(e,n),i!=null&&r.unshift(Fd(e,i,a)),i=an(e,t),i!=null&&r.push(Fd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Ld(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Rd(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=an(n,a),l!=null&&o.unshift(Fd(n,l,c))):i||(l=an(n,a),l!=null&&o.push(Fd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var zd=/\r\n?/g,Bd=/\u0000|\uFFFD/g;function Vd(e){return(typeof e==`string`?e:``+e).replace(zd,`
10
+ `).replace(Bd,``)}function Hd(e,t){return t=Vd(t),Vd(e)===t}function Ud(e,t,n,r,i,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Ht(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Ht(e,``+r);break;case`className`:Et(e,`class`,r);break;case`tabIndex`:Et(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Et(e,n,r);break;case`style`:Gt(e,r,o);break;case`data`:if(t!==`object`){Et(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=Yt(``+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`&&Ud(e,t,`name`,i.name,i,null),Ud(e,t,`formEncType`,i.formEncType,i,null),Ud(e,t,`formMethod`,i.formMethod,i,null),Ud(e,t,`formTarget`,i.formTarget,i,null)):(Ud(e,t,`encType`,i.encType,i,null),Ud(e,t,`method`,i.method,i,null),Ud(e,t,`target`,i.target,i,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Yt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Xt);break;case`onScroll`:r!=null&&kd(`scroll`,e);break;case`onScrollEnd`:r!=null&&kd(`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=Yt(``+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`:kd(`beforetoggle`,e),kd(`toggle`,e),Tt(e,`popover`,r);break;case`xlinkActuate`:Dt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Dt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Dt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Dt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Dt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Dt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Dt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Dt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Dt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Tt(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=qt.get(n)||n,Tt(e,n,r))}}function Wd(e,t,n,r,i,o){switch(n){case`style`:Gt(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`?Ht(e,r):(typeof r==`number`||typeof r==`bigint`)&&Ht(e,``+r);break;case`onScroll`:r!=null&&kd(`scroll`,e);break;case`onScrollEnd`:r!=null&&kd(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Xt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!vt.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[B]||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,``):Tt(e,n,r)}}}function Gd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:kd(`error`,e),kd(`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:Ud(e,t,o,s,n,null)}}i&&Ud(e,t,`srcSet`,n.srcSet,n,null),r&&Ud(e,t,`src`,n.src,n,null);return;case`input`:kd(`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:Ud(e,t,r,d,n,null)}}Lt(e,o,c,l,u,s,i,!1);return;case`select`:for(i in kd(`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:Ud(e,t,i,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&zt(e,!!r,n,!0):zt(e,!!r,t,!1);return;case`textarea`:for(s in kd(`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:Ud(e,t,s,c,n,null)}Vt(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:Ud(e,t,l,r,n,null)}return;case`dialog`:kd(`beforetoggle`,e),kd(`toggle`,e),kd(`cancel`,e),kd(`close`,e);break;case`iframe`:case`object`:kd(`load`,e);break;case`video`:case`audio`:for(r=0;r<Ed.length;r++)kd(Ed[r],e);break;case`image`:kd(`error`,e),kd(`load`,e);break;case`details`:kd(`toggle`,e);break;case`embed`:case`source`:case`link`:kd(`error`,e),kd(`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:Ud(e,t,u,r,n,null)}return;default:if(Kt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Wd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Ud(e,t,c,r,n,null))}function Kd(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)||Ud(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&&Ud(e,t,p,m,r,f)}}It(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)||Ud(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&&Ud(e,t,i,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?zt(e,!!n,n?[]:``,!1):zt(e,!!n,t,!0)):zt(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:Ud(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&&Ud(e,t,s,i,r,o)}Bt(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:Ud(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:Ud(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)&&Ud(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:Ud(e,t,u,p,r,m)}return;default:if(Kt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Wd(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||Wd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Ud(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||Ud(e,t,f,p,r,m)}function qd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Jd(){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&&qd(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&&qd(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 Yd=null,Xd=null;function Zd(e){return e.nodeType===9?e:e.ownerDocument}function Qd(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 $d(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 ef(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 tf=null;function nf(){var e=window.event;return e&&e.type===`popstate`?e!==tf&&(tf=e,!0):(tf=null,!1)}var rf=typeof setTimeout==`function`?setTimeout:void 0,af=typeof clearTimeout==`function`?clearTimeout:void 0,of=typeof Promise==`function`?Promise:void 0,sf=typeof queueMicrotask==`function`?queueMicrotask:of===void 0?rf:function(e){return of.resolve(null).then(e).catch(cf)};function cf(e){setTimeout(function(){throw e})}function lf(e){return e===`head`}function uf(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),Wp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)wf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,wf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[ut]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&wf(e.ownerDocument.body)}n=i}while(n);Wp(t)}function df(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 ff(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`:ff(n),dt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function pf(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[ut])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=yf(e.nextSibling),e===null)break}return null}function mf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=yf(e.nextSibling),e===null))return null;return e}function hf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=yf(e.nextSibling),e===null))return null;return e}function gf(e){return e.data===`$?`||e.data===`$~`}function _f(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function vf(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 yf(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 bf=null;function xf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return yf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function Sf(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 Cf(e,t,n){switch(t=Zd(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 wf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);dt(e)}var Tf=new Map,Ef=new Set;function Df(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Of=te.d;te.d={f:kf,r:Af,D:Nf,C:Pf,L:Ff,m:If,X:Rf,S:Lf,M:zf};function kf(){var e=Of.f(),t=Ou();return e||t}function Af(e){var t=mt(e);t!==null&&t.tag===5&&t.type===`form`?Ds(t):Of.r(e)}var jf=typeof document>`u`?null:document;function Mf(e,t,n){var r=jf;if(r&&typeof t==`string`&&t){var i=Ft(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Ef.has(i)||(Ef.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Gd(t,`link`,e),gt(t),r.head.appendChild(t)))}}function Nf(e){Of.D(e),Mf(`dns-prefetch`,e,null)}function Pf(e,t){Of.C(e,t),Mf(`preconnect`,e,t)}function Ff(e,t,n){Of.L(e,t,n);var r=jf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Ft(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Ft(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Ft(n.imageSizes)+`"]`)):i+=`[href="`+Ft(e)+`"]`;var a=i;switch(t){case`style`:a=Vf(e);break;case`script`:a=Gf(e)}Tf.has(a)||(e=p({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Tf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Hf(a))||t===`script`&&r.querySelector(Kf(a))||(t=r.createElement(`link`),Gd(t,`link`,e),gt(t),r.head.appendChild(t)))}}function If(e,t){Of.m(e,t);var n=jf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Ft(r)+`"][href="`+Ft(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Gf(e)}if(!Tf.has(a)&&(e=p({rel:`modulepreload`,href:e},t),Tf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Kf(a)))return}r=n.createElement(`link`),Gd(r,`link`,e),gt(r),n.head.appendChild(r)}}}function Lf(e,t,n){Of.S(e,t,n);var r=jf;if(r&&e){var i=ht(r).hoistableStyles,a=Vf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Hf(a)))s.loading=5;else{e=p({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Tf.get(a))&&Yf(e,n);var c=o=r.createElement(`link`);gt(c),Gd(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,Jf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Rf(e,t){Of.X(e,t);var n=jf;if(n&&e){var r=ht(n).hoistableScripts,i=Gf(e),a=r.get(i);a||(a=n.querySelector(Kf(i)),a||(e=p({src:e,async:!0},t),(t=Tf.get(i))&&Xf(e,t),a=n.createElement(`script`),gt(a),Gd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function zf(e,t){Of.M(e,t);var n=jf;if(n&&e){var r=ht(n).hoistableScripts,i=Gf(e),a=r.get(i);a||(a=n.querySelector(Kf(i)),a||(e=p({src:e,async:!0,type:`module`},t),(t=Tf.get(i))&&Xf(e,t),a=n.createElement(`script`),gt(a),Gd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Bf(e,t,n,r){var i=(i=de.current)?Df(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=Vf(n.href),n=ht(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=Vf(n.href);var o=ht(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(Hf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),Tf.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},Tf.set(e,n),o||Wf(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=Gf(n),n=ht(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 Vf(e){return`href="`+Ft(e)+`"`}function Hf(e){return`link[rel="stylesheet"][`+e+`]`}function Uf(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function Wf(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}),Gd(t,`link`,n),gt(t),e.head.appendChild(t))}function Gf(e){return`[src="`+Ft(e)+`"]`}function Kf(e){return`script[async]`+e}function qf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Ft(n.href)+`"]`);if(r)return t.instance=r,gt(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`),gt(r),Gd(r,`style`,i),Jf(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Vf(n.href);var o=e.querySelector(Hf(i));if(o)return t.state.loading|=4,t.instance=o,gt(o),o;r=Uf(n),(i=Tf.get(i))&&Yf(r,i),o=(e.ownerDocument||e).createElement(`link`),gt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Gd(o,`link`,r),t.state.loading|=4,Jf(o,n.precedence,e),t.instance=o;case`script`:return o=Gf(n.src),(i=e.querySelector(Kf(o)))?(t.instance=i,gt(i),i):(r=n,(i=Tf.get(o))&&(r=p({},n),Xf(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),gt(i),Gd(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,Jf(r,n.precedence,e));return t.instance}function Jf(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 Yf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Xf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Zf=null;function Qf(e,t,n){if(Zf===null){var r=new Map,i=Zf=new Map;i.set(n,r)}else i=Zf,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[ut]||a[it]||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 $f(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function ep(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 tp(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function np(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=Vf(r.href),a=t.querySelector(Hf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=ap.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,gt(a);return}a=t.ownerDocument||t,r=Uf(r),(i=Tf.get(i))&&Yf(r,i),a=a.createElement(`link`),gt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Gd(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=ap.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var rp=0;function ip(e,t){return e.stylesheets&&e.count===0&&sp(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&sp(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&rp===0&&(rp=62500*Jd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&sp(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>rp?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function ap(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)sp(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var op=null;function sp(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,op=new Map,t.forEach(cp,e),op=null,ap.call(e))}function cp(e,t){if(!(t.state.loading&4)){var n=op.get(e);if(n)var r=n.get(null);else{n=new Map,op.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=ap.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 lp={$$typeof:x,Provider:null,Consumer:null,_currentValue:re,_currentValue2:re,_threadCount:0};function up(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=Je(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Je(0),this.hiddenUpdates=Je(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 dp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new up(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ai(3,null,null,t),e.current=a,a.stateNode=e,t=aa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ra(a),e}function fp(e){return e?(e=ri,e):ri}function pp(e,t,n,r,i,a){i=fp(i),r.context===null?r.context=i:r.pendingContext=i,r=Ba(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Va(e,r,t),n!==null&&(Cu(n,e,t),Ha(n,e,t))}function mp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function hp(e,t){mp(e,t),(e=e.alternate)&&mp(e,t)}function gp(e){if(e.tag===13||e.tag===31){var t=ei(e,67108864);t!==null&&Cu(t,e,67108864),hp(e,67108864)}}function _p(e){if(e.tag===13||e.tag===31){var t=xu();t=et(t);var n=ei(e,t);n!==null&&Cu(n,e,t),hp(e,t)}}var vp=!0;function yp(e,t,n,r){var i=N.T;N.T=null;var a=te.p;try{te.p=2,xp(e,t,n,r)}finally{te.p=a,N.T=i}}function bp(e,t,n,r){var i=N.T;N.T=null;var a=te.p;try{te.p=8,xp(e,t,n,r)}finally{te.p=a,N.T=i}}function xp(e,t,n,r){if(vp){var i=Sp(r);if(i===null)Pd(e,t,r,Cp,n),Pp(e,r);else if(Ip(i,e,t,n,r))r.stopPropagation();else if(Pp(e,r),t&4&&-1<Np.indexOf(e)){for(;i!==null;){var a=mt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=We(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Le(o);s.entanglements[1]|=c,o&=~c}fd(a),!(Hl&6)&&(lu=Ee()+500,pd(0,!1))}}break;case 31:case 13:s=ei(a,2),s!==null&&Cu(s,a,2),Ou(),hp(a,2)}if(a=Sp(r),a===null&&Pd(e,t,r,Cp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Pd(e,t,r,null,n)}}function Sp(e){return e=Qt(e),wp(e)}var Cp=null;function wp(e){if(Cp=null,e=pt(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 Cp=e,null}function Tp(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(De()){case Oe:return 2;case L:return 8;case ke:case Ae:return 32;case je:return 268435456;default:return 32}default:return 32}}var Ep=!1,Dp=null,Op=null,kp=null,Ap=new Map,jp=new Map,Mp=[],Np=`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 Pp(e,t){switch(e){case`focusin`:case`focusout`:Dp=null;break;case`dragenter`:case`dragleave`:Op=null;break;case`mouseover`:case`mouseout`:kp=null;break;case`pointerover`:case`pointerout`:Ap.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:jp.delete(t.pointerId)}}function Fp(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=mt(t),t!==null&&gp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Ip(e,t,n,r,i){switch(t){case`focusin`:return Dp=Fp(Dp,e,t,n,r,i),!0;case`dragenter`:return Op=Fp(Op,e,t,n,r,i),!0;case`mouseover`:return kp=Fp(kp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Ap.set(a,Fp(Ap.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,jp.set(a,Fp(jp.get(a)||null,e,t,n,r,i)),!0}return!1}function Lp(e){var t=pt(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,nt(e.priority,function(){_p(n)});return}}else if(t===31){if(t=l(n),t!==null){e.blockedOn=t,nt(e.priority,function(){_p(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 Rp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Sp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Zt=r,n.target.dispatchEvent(r),Zt=null}else return t=mt(n),t!==null&&gp(t),e.blockedOn=n,!1;t.shift()}return!0}function zp(e,t,n){Rp(e)&&n.delete(t)}function Bp(){Ep=!1,Dp!==null&&Rp(Dp)&&(Dp=null),Op!==null&&Rp(Op)&&(Op=null),kp!==null&&Rp(kp)&&(kp=null),Ap.forEach(zp),jp.forEach(zp)}function Vp(e,n){e.blockedOn===n&&(e.blockedOn=null,Ep||(Ep=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Bp)))}var Hp=null;function Up(e){Hp!==e&&(Hp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Hp===e&&(Hp=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(wp(r||n)===null)continue;break}var a=mt(n);a!==null&&(e.splice(t,3),t-=3,Ts(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Wp(e){function t(t){return Vp(t,e)}Dp!==null&&Vp(Dp,e),Op!==null&&Vp(Op,e),kp!==null&&Vp(kp,e),Ap.forEach(t),jp.forEach(t);for(var n=0;n<Mp.length;n++){var r=Mp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Mp.length&&(n=Mp[0],n.blockedOn===null);)Lp(n),n.blockedOn===null&&Mp.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[B]||null;if(typeof a==`function`)o||Up(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[B]||null)s=o.formAction;else if(wp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Up(n)}}}function Gp(){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 Kp(e){this._internalRoot=e}qp.prototype.render=Kp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(a(409));var n=t.current;pp(n,xu(),e,t,null,null)},qp.prototype.unmount=Kp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;pp(e.current,2,null,e,null,null),Ou(),t[at]=null}};function qp(e){this._internalRoot=e}qp.prototype.unstable_scheduleHydration=function(e){if(e){var t=tt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Mp.length&&t!==0&&t<Mp[n].priority;n++);Mp.splice(n,0,e),n===0&&Lp(e)}};var Jp=n.version;if(Jp!==`19.2.8`)throw Error(a(527,Jp,`19.2.8`));te.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 Yp={bundleType:0,version:`19.2.8`,rendererPackageName:`react-dom`,currentDispatcherRef:N,reconcilerVersion:`19.2.8`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Xp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Xp.isDisabled&&Xp.supportsFiber)try{Pe=Xp.inject(Yp),Fe=Xp}catch{}}e.createRoot=function(e,t){if(!o(e))throw Error(a(299));var n=!1,r=``,i=Js,s=Ys,c=Xs;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=dp(e,1,!1,null,null,n,r,null,i,s,c,Gp),e[at]=t.current,Md(e),new Kp(t)}})),mt=t(((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=pt()})),V=e(r(),1),ht=mt(),gt=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,_t=/^[\\/]{2}/;function vt(e,t){return t+e.replace(/\\/g,`/`)}var yt=`popstate`;function bt(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function xt(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return Et(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:Dt(t)}return kt(t,n,null,e)}function St(e,t){if(e===!1||e==null)throw Error(t)}function Ct(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function wt(){return Math.random().toString(36).substring(2,10)}function Tt(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 Et(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?Ot(t):t,state:n,key:t&&t.key||r||wt(),mask:i}}function Dt({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 Ot(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 kt(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=bt(e)?e:Et(h.location,e,t);n&&n(r,e),l=u()+1;let d=Tt(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=bt(e)?e:Et(h.location,e,t);n&&n(r,e),l=u();let i=Tt(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 At(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(yt,d),c=e,()=>{i.removeEventListener(yt,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 At(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),St(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:Dt(t);return i=i.replace(/ $/,`%20`),!n&&_t.test(i)&&(i=r+i),new URL(i,r)}function jt(e,t,n=`/`){return Mt(e,t,n,!1)}function Mt(e,t,n,r,i){let a=$t((typeof t==`string`?Ot(t):t).pathname||`/`,n);if(a==null)return null;let o=i??Nt(e),s=null,c=Qt(a);for(let e=0;s==null&&e<o.length;++e)s=Jt(o[e],c,r);return s}function Nt(e){let t=Pt(e);return It(t),t}function Pt(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;St(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=cn([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(St(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),Pt(e.children,t,u,l,o)),(e.path!=null||e.index)&&t.push({path:l,score:Kt(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=Zt(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 Ft(e.path))a(e,t,!0,n)}),t}function Ft(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=Ft(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 It(e){e.sort((e,t)=>e.score===t.score?qt(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var Lt=/^:[\w-]+$/,Rt=/^:[\w-]+/,zt=3.5,Bt=3,Vt=2,Ht=1,Ut=10,Wt=-2,Gt=e=>e===`*`;function Kt(e,t){let n=e.split(`/`),r=n.length;return n.some(Gt)&&(r+=Wt),t&&(r+=Vt),n.filter(e=>!Gt(e)).reduce((e,t)=>e+(Lt.test(t)?Bt:Rt.test(t)?zt:t===``?Ht:Ut),r)}function qt(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 Jt(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?Xt(u,l,s.matcher,s.compiledParams):Yt(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=Yt({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:cn([a,d.pathname]),pathnameBase:un(cn([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=cn([a,d.pathnameBase]))}return o}function Yt(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Zt(e.path,e.caseSensitive,e.end);return Xt(e,t,n,r)}function Xt(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=ln(a,1),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=ln(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 Zt(e,t=!1,n=!0){Ct(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)?`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function Qt(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return Ct(!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 $t(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 en(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?Ot(e):e,a;return n?(n=sn(n),a=n.startsWith(`/`)||n.startsWith(`\\`)?tn(n.substring(1),`/`):tn(n,t)):a=t,{pathname:a,search:dn(r),hash:fn(i)}}function tn(e,t){let n=ln(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function nn(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 rn(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function an(e){let t=rn(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function on(e,t,n,r=!1){let i;typeof e==`string`?i=Ot(e):(i={...e},St(!i.pathname||!i.pathname.includes(`?`),nn(`?`,`pathname`,`search`,i)),St(!i.pathname||!i.pathname.includes(`#`),nn(`#`,`pathname`,`hash`,i)),St(!i.search||!i.search.includes(`#`),nn(`#`,`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=en(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var sn=e=>e.replace(/[\\/]{2,}/g,`/`),cn=e=>sn(e.join(`/`));function ln(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 un=e=>ln(e).replace(/^\/*/,`/`),dn=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,fn=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,pn=class{status;statusText;data;error;internal;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 mn(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function hn(e){return cn(e.map(e=>e.route.path).filter(Boolean))||`/`}var gn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function _n(e,t){let n=e;if(typeof n!=`string`||!gt.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(gn)try{let e=new URL(window.location.href),r=_t.test(n)?new URL(vt(n,e.protocol)):new URL(n),a=$t(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{Ct(!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}}var vn=new URL(`http://localhost`);function yn(e){if(e.createURL)return e.createURL(`/`);try{return new URL(e.createHref(`/`),vn)}catch{return vn}}function bn(e,t){return e.origin===t.origin&&(e.origin!==`null`||e.protocol===t.protocol&&e.host===t.host)}function xn(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 Sn(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&&!bn(i,n),s=!bn(a,n);if(r===`reject`){if(o||s)throw Error(`External navigation is not allowed`)}else if(s&&(i==null||!xn(e,i)||!bn(i,a)))throw Error(`External navigation is not allowed`)}var Cn=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(Cn);var wn=[`GET`,...Cn];new Set(wn);var Tn=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function En(e){try{return Tn.includes(new URL(e).protocol)}catch{return!1}}var Dn=V.createContext(null);Dn.displayName=`DataRouter`;var On=V.createContext(null);On.displayName=`DataRouterState`;var kn=V.createContext(!1);function An(){return V.useContext(kn)}var jn=V.createContext({isTransitioning:!1});jn.displayName=`ViewTransition`;var Mn=V.createContext(new Map);Mn.displayName=`Fetchers`;var Nn=V.createContext(null);Nn.displayName=`Await`;var Pn=V.createContext(null);Pn.displayName=`Navigation`;var Fn=V.createContext(null);Fn.displayName=`Location`;var In=V.createContext({outlet:null,matches:[],isDataRoute:!1});In.displayName=`Route`;var Ln=V.createContext(null);Ln.displayName=`RouteError`;var Rn=`REACT_ROUTER_ERROR`,zn=`REDIRECT`,Bn=`ROUTE_ERROR_RESPONSE`;function Vn(e){if(e.startsWith(`${Rn}:${zn}:{`))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 Hn(e){if(e.startsWith(`${Rn}:${Bn}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new pn(t.status,t.statusText,t.data)}catch{}}function Un(e,{relative:t}={}){St(Wn(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=V.useContext(Pn),{hash:i,pathname:a,search:o}=Xn(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:cn([n,a])),r.createHref({pathname:s,search:o,hash:i})}function Wn(){return V.useContext(Fn)!=null}function Gn(){return St(Wn(),`useLocation() may be used only in the context of a <Router> component.`),V.useContext(Fn).location}var Kn=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function qn(){let{isDataRoute:e}=V.useContext(In);return e?pr():Jn()}function Jn(){St(Wn(),`useNavigate() may be used only in the context of a <Router> component.`);let e=V.useContext(Dn),{basename:t,navigator:n}=V.useContext(Pn),{matches:r}=V.useContext(In),{pathname:i}=Gn(),a=JSON.stringify(an(r)),o=V.useRef(!1);return V.useLayoutEffect(()=>{o.current=!0}),V.useCallback((r,s={})=>{if(Ct(o.current,Kn),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=on(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:cn([t,c.pathname])),Sn(typeof r==`string`?r:Dt(r),n.createHref(c),yn(n),`reject`),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}V.createContext(null);function Yn(){let{matches:e}=V.useContext(In);return e[e.length-1]?.params??{}}function Xn(e,{relative:t}={}){let{matches:n}=V.useContext(In),{pathname:r}=Gn(),i=JSON.stringify(an(n));return V.useMemo(()=>on(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function Zn(e,t){return Qn(e,t)}function Qn(e,t,n){St(Wn(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=V.useContext(Pn),{matches:i}=V.useContext(In),a=i[i.length-1],o=a?a.params:{};a&&a.pathname;let s=a?a.pathnameBase:`/`;a&&a.route;let c=Gn(),l;if(t){let e=typeof t==`string`?Ot(t):t;St(s===`/`||e.pathname?.startsWith(s),`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 "${s}" but pathname "${e.pathname}" was given in the \`location\` prop.`),l=e}else l=c;let u=l.pathname||`/`,d=u;if(s!==`/`){let e=s.replace(/^\//,``).split(`/`);d=`/`+u.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let f=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):jt(e,{pathname:d}),p=ar(f&&f.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:cn([s,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?s:cn([s,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&p?V.createElement(Fn.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...l},navigationType:`POP`}},p):p}function $n(){let e=fr(),t=mn(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null;return V.createElement(V.Fragment,null,V.createElement(`h2`,null,`Unexpected Application Error!`),V.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?V.createElement(`pre`,{style:{padding:`0.5rem`,backgroundColor:`rgba(200,200,200, 0.5)`}},n):null,null)}var er=V.createElement($n,null),tr=class extends V.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static contextType=kn;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=Hn(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:V.createElement(In.Provider,{value:this.props.routeContext},V.createElement(Ln.Provider,{value:e,children:this.props.component}));return this.context?V.createElement(rr,{error:e},t):t}},nr=new WeakMap;function rr({children:e,error:t}){let{basename:n,navigator:r}=V.useContext(Pn);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=Vn(t.digest);if(e){let i=nr.get(t);if(i)throw i;let a=_n(e.location,n),o=a.absoluteURL||a.to;if(Sn(e.location,o,yn(r),`allow-explicit`),En(o))throw Error(`Invalid redirect location`);if(gn&&!nr.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 nr.set(t,n),n}}return V.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${o}`})}}return e}function ir({routeContext:e,match:t,children:n}){let r=V.useContext(Dn);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),V.createElement(In.Provider,{value:e},n)}function ar(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);St(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:hn(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||er,o&&(s<0&&c===0?(hr(`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?V.createElement(n.route.Component,null):n.route.element?n.route.element:e,V.createElement(ir,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?V.createElement(tr,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function or(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function sr(e){let t=V.useContext(Dn);return St(t,or(e)),t}function cr(e){let t=V.useContext(On);return St(t,or(e)),t}function lr(e){let t=V.useContext(In);return St(t,or(e)),t}function ur(e){let t=lr(e),n=t.matches[t.matches.length-1];return St(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function dr(){return ur(`useRouteId`)}function fr(){let e=V.useContext(Ln),t=cr(`useRouteError`),n=ur(`useRouteError`);return e===void 0?t.errors?.[n]:e}function pr(){let{router:e}=sr(`useNavigate`),t=ur(`useNavigate`),n=V.useRef(!1);return V.useLayoutEffect(()=>{n.current=!0}),V.useCallback(async(r,i={})=>{Ct(n.current,Kn),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var mr={};function hr(e,t,n){!t&&!mr[e]&&(mr[e]=!0,Ct(!1,n))}V.memo(gr);function gr({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return Qn(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function _r({to:e,replace:t,state:n,relative:r}){St(Wn(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i,navigator:a}=V.useContext(Pn);Ct(!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}=V.useContext(In),{pathname:s}=Gn(),c=qn(),l=on(e,an(o),s,r===`path`);Sn(typeof e==`string`?e:Dt(e),a.createHref(l),yn(a),`reject`);let u=JSON.stringify(l);return V.useEffect(()=>{c(JSON.parse(u),{replace:t,state:n,relative:r})},[c,u,r,t,n]),null}function vr({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){St(!Wn(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=V.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=Ot(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,mask:m}=n,h=V.useMemo(()=>{let e=$t(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 Ct(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:V.createElement(Pn.Provider,{value:c},V.createElement(Fn.Provider,{children:t,value:h}))}V.Component;var yr=`application/x-www-form-urlencoded`;function br(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function xr(e){return br(e)&&e.tagName.toLowerCase()===`button`}function Sr(e){return br(e)&&e.tagName.toLowerCase()===`form`}function Cr(e){return br(e)&&e.tagName.toLowerCase()===`input`}function wr(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Tr(e,t){return e.button===0&&(!t||t===`_self`)&&!wr(e)}function Er(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 Dr(e,t){let n=Er(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var Or=null;function kr(){if(Or===null)try{new FormData(document.createElement(`form`),0),Or=!1}catch{Or=!0}return Or}var Ar=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function jr(e){return e!=null&&!Ar.has(e)?(Ct(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${yr}"`),null):e}function Mr(e,t){let n,r,i,a,o;if(Sr(e)){let o=e.getAttribute(`action`);r=o?$t(o,t):null,n=e.getAttribute(`method`)||`get`,i=jr(e.getAttribute(`enctype`))||yr,a=new FormData(e)}else if(xr(e)||Cr(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?$t(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||`get`,i=jr(e.getAttribute(`formenctype`))||jr(o.getAttribute(`enctype`))||yr,a=new FormData(o,e),!kr()){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(br(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=`get`,r=null,i=yr,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}function Nr(e,t){if(e===!1||e==null)throw Error(t)}function Pr(e,t){let n=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n.pathname=n.pathname.endsWith(`/`)?`${n.pathname}_.${t}`:`${n.pathname}.${t}`,n}async function Fr(e,t){if(e.id in t)return t[e.id];try{let n=await b(()=>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 Ir(e){return e!=null&&typeof e.page==`string`}function Lr(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 Rr(e,t,n){return Ur((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await Fr(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(Lr).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function zr(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 Br(e,t,{includeHydrateFallback:n}={}){return Vr(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 Vr(e){return[...new Set(e)]}function Hr(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function Ur(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!Ir(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(Hr(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function Wr(){let e=V.useContext(Dn);return Nr(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function Gr(){let e=V.useContext(On);return Nr(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var Kr=V.createContext(void 0);Kr.displayName=`FrameworkContext`;function qr(){let e=V.useContext(Kr);return Nr(e,`You must render this element inside a <HydratedRouter> element`),e}function Jr(e,t){let n=V.useContext(Kr),[r,i]=V.useState(!1),[a,o]=V.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=V.useRef(null);V.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]),V.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:Yr(s,p),onBlur:Yr(c,m),onMouseEnter:Yr(l,p),onMouseLeave:Yr(u,m),onTouchStart:Yr(d,p)}]:[a,f,{}]:[!1,f,{}]}function Yr(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Xr({page:e,...t}){let n=An(),{nonce:r}=qr(),{router:i}=Wr(),a=V.useMemo(()=>jt(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?V.createElement(Qr,{page:e,matches:a,...t}):V.createElement($r,{page:e,matches:a,...t})):null}function Zr(e){let{manifest:t,routeModules:n}=qr(),[r,i]=V.useState([]);return V.useEffect(()=>{let r=!1;return Rr(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function Qr({page:e,matches:t,...n}){let r=Gn(),i=V.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=Pr(e,`rsc`),i=!1,a=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?i=!0:a.push(e.route.id);return i&&a.length>0&&n.searchParams.set(`_routes`,a.join(`,`)),[n.pathname+n.search]},[e,r,t]);return V.createElement(V.Fragment,null,i.map(e=>V.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function $r({page:e,matches:t,...n}){let r=Gn(),{manifest:i,routeModules:a}=qr(),{loaderData:o,matches:s}=Gr(),c=V.useMemo(()=>zr(e,t,s,i,r,`data`),[e,t,s,i,r]),l=V.useMemo(()=>zr(e,t,s,i,r,`assets`),[e,t,s,i,r]),u=V.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,s=!1;if(t.forEach(e=>{let t=i.routes[e.route.id];t&&t.hasLoader&&(!c.some(t=>t.route.id===e.route.id)&&e.route.id in o&&a[e.route.id]?.shouldRevalidate||t.hasClientLoader?s=!0:n.add(e.route.id))}),n.size===0)return[];let l=Pr(e,`data`);return s&&n.size>0&&l.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[l.pathname+l.search]},[o,r,i,c,t,e,a]),d=V.useMemo(()=>Br(l,i),[l,i]),f=Zr(l);return V.createElement(V.Fragment,null,u.map(e=>V.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),d.map(e=>V.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),f.map(({key:e,link:t})=>V.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function ei(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}var ti=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{ti&&(window.__reactRouterVersion=`8`)}catch{}function ni({basename:e,children:t,useTransitions:n,window:r}){let i=V.useRef(null);i.current??=xt({window:r,v5Compat:!0});let a=i.current,[o,s]=V.useState({action:a.action,location:a.location}),c=V.useCallback(e=>{n===!1?s(e):V.startTransition(()=>s(e))},[n]);return V.useLayoutEffect(()=>a.listen(c),[a,c]),V.createElement(vr,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,useTransitions:n})}var ri=V.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:_}=V.useContext(Pn),v=typeof l==`string`&&gt.test(l),y=_n(l,h);l=y.to;let b=Un(l,{relative:r}),x=Gn(),S=null;if(o){let e=on(o,[],x.mask?x.mask.pathname:`/`,!0);h!==`/`&&(e.pathname=e.pathname===`/`?h:cn([h,e.pathname])),S=g.createHref(e)}let[C,w,T]=Jr(n,p),E=ci(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=V.createElement(`a`,{...p,...T,href:(O?S:void 0)||y.absoluteURL||b,onClick:O?D:e,ref:ei(m,w),target:c,"data-discover":!v&&t===`render`?`true`:void 0});return C&&!v?V.createElement(V.Fragment,null,k,V.createElement(Xr,{page:b})):k});ri.displayName=`Link`;var ii=V.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=Xn(a,{relative:c.relative}),d=Gn(),f=V.useContext(On),{navigator:p,basename:m}=V.useContext(Pn),h=f!=null&&mi(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=$t(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(y)===`/`),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 V.createElement(ri,{...c,"aria-current":C,className:w,ref:l,style:T,to:a,viewTransition:o},typeof s==`function`?s(S):s)});ii.displayName=`NavLink`;var ai=V.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=`get`,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m)=>{let{useTransitions:h}=V.useContext(Pn),g=fi(),_=pi(s,{relative:l}),v=o.toLowerCase()===`get`?`get`:`post`,y=typeof s==`string`&&gt.test(s);return V.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?V.startTransition(()=>p()):p()},...p,"data-discover":!y&&e===`render`?`true`:void 0})});ai.displayName=`Form`;function oi(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function si(e){let t=V.useContext(Dn);return St(t,oi(e)),t}function ci(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:l}={}){let u=qn(),d=Gn(),f=Xn(e,{relative:o});return V.useCallback(p=>{if(Tr(p,t)){p.preventDefault();let t=n===void 0?Dt(d)===Dt(f):n,m=()=>u(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});l?V.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}function li(e){Ct(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=V.useRef(Er(e)),n=V.useRef(!1),r=Gn(),i=V.useMemo(()=>Dr(r.search,n.current?null:t.current),[r.search]),a=qn();return[i,V.useCallback((e,t)=>{let r=Er(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var ui=0,di=()=>`__${String(++ui)}__`;function fi(){let{router:e}=si(`useSubmit`),{basename:t}=V.useContext(Pn),n=dr(),r=e.fetch,i=e.navigate;return V.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=Mr(e,t);a.navigate===!1?await r(a.fetcherKey||di(),n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,relative:a.relative,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,relative:a.relative,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 pi(e,{relative:t}={}){let{basename:n}=V.useContext(Pn),r=V.useContext(In);St(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...Xn(e||`.`,{relative:t})},o=Gn();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:cn([n,a.pathname])),Dt(a)}function mi(e,{relative:t}={}){let n=V.useContext(jn);St(n!=null,"`useViewTransitionState` must be used within `react-router/dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=si(`useViewTransitionState`),i=Xn(e,{relative:t});if(!n.isTransitioning)return!1;let a=$t(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=$t(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Yt(i.pathname,o)!=null||Yt(i.pathname,a)!=null}globalThis.__DEV__===void 0&&(globalThis.__DEV__=!1);var hi=[`web`,`android`,`ios`];function gi(e){if(!e)return null;let t=_i(e);for(let e of hi)if(e===`web`&&t.has(e))return e;return null}function _i(e){let t=new Set(e===!0?hi:e===!1?[]:Array.isArray(e)?e:[e]);return t.has(`mobile`)&&(t.add(`android`),t.add(`ios`),t.delete(`mobile`)),t}function vi(e,t){let n=`__hanzogui_${e}__`;function r(){let e=globalThis;return e[n]||(e[n]=t),e[n]}function i(e){globalThis[n]=e}return{get:r,set:i}}var yi=vi(`portal`,{enabled:!1,type:null});function bi(){return{get isEnabled(){return yi.get().enabled},get state(){return yi.get()},set(e){yi.set(e)}}}var xi;vi(`gesture`,{enabled:!1,Gesture:null,GestureDetector:null,ScrollView:null,RootView:null});var Si=`__hanzogui_press_state__`;(xi=globalThis)[Si]??(xi[Si]={owner:null,ownerId:null,ownerSource:null,ownerPointerId:null,timestamp:0}),vi(`zeego`,{enabled:!1,DropdownMenu:null,ContextMenu:null}),(0,V.createContext)(!1);var H=h();function Ci({children:e}){if(bi().state.type!==`teleport`)return(0,H.jsx)(H.Fragment,{children:e});let t=globalThis.__hanzogui_teleport;if(!t?.PortalProvider)return(0,H.jsx)(H.Fragment,{children:e});let{PortalProvider:n}=t;return(0,H.jsx)(n,{children:e})}function wi(e,t){let n=p().inverseShorthands;return t[e]??t[n[e]]}var Ti=[`100`,`200`,`300`,`400`,`500`,`600`,`700`,`800`,`900`],Ei=(e,t,n)=>{if(typeof e==`string`)return e;let r=Object.keys(e),i=e[r[0]];return Object.fromEntries([...new Set([...t,...r])].map(t=>{let r=e[t]??n??i;return i=r,n=r,[t,r]}))},Di=e=>{let t=Object.keys(e.size||{}),n=Object.fromEntries(Object.entries(e).map(([n,r])=>[n,Ei(r,n===`face`?Ti:t,n===`face`?{normal:e.family}:void 0)]));return Object.freeze(n)},Oi=()=>Ve()?a:!1,ki={forceClassName:!0,deopt:!0,needsUpdate:()=>!0},Ai={current:new Set([``])};function ji(){return Se(ki,!1,Ai)?.name||``}function Mi(e){if(typeof document>`u`)return V.useMemo(()=>e(),[]);let t=V.useRef(void 0);return t.current||={v:e()},t.current.v}var Ni=typeof window>`u`,Pi=()=>{};function Fi(){return Ni?Pi:V.useReducer(e=>Math.random(),0)[1]}var Ii=V.createContext({}),Li=V.createContext(null),Ri=e=>{let t=V.useContext(Li);return(0,H.jsx)(Li.Provider,{value:e.disable?t:null,children:e.children})};function zi(){let e=V.useContext(Li);if(!e)return[!0,null,e];let{id:t,isPresent:n,onExitComplete:r,register:i}=e;return V.useEffect(()=>i(t),[]),!n&&r?[!1,()=>r?.(t),e]:[!0,void 0,e]}var Bi=V.memo(({children:e,initial:t,isPresent:n,onExitComplete:r,exitVariant:i,enterVariant:a,enterExitVariant:o,presenceAffectsLayout:s,custom:c})=>{let l=Mi(Vi),u=(0,V.useId)()||``,d=V.useMemo(()=>({id:u,initial:t,isPresent:n,custom:c,exitVariant:i,enterVariant:a,enterExitVariant:o,onExitComplete:()=>{l.set(u,!0);for(let e of l.values())if(!e)return;r?.()},register:()=>(l.set(u,!1),()=>l.delete(u))}),s?void 0:[n,i,a]);return V.useMemo(()=>{l.forEach((e,t)=>l.set(t,!1))},[n]),V.useEffect(()=>{!n&&!l.size&&r?.()},[n]),(0,H.jsx)(Li.Provider,{value:d,children:e})});function Vi(){return new Map}var Hi=e=>e.key||(()=>{let t=e.type,n=t.displayName||t.name||``;return t&&typeof t==`object`&&`staticConfig`in t&&t.staticConfig.componentName||n})();function Ui(e){let t=[];return V.Children.forEach(e,e=>{(0,V.isValidElement)(e)&&t.push(e)}),t}var Wi=({children:e,enterVariant:t,exitVariant:n,enterExitVariant:r,initial:i=!0,onExitComplete:a,exitBeforeEnter:o,mode:s,presenceAffectsLayout:c=!0,custom:l,passThrough:u})=>{let d=s??(o?`wait`:`sync`),f=(0,V.useMemo)(()=>Ui(e),[e]),p=f.map(Hi),m=(0,V.useRef)(!0),h=(0,V.useRef)(new Map),g=(0,V.useRef)(f),_=Mi(()=>new Map),[v,y]=(0,V.useState)(f),[b,x]=(0,V.useState)(f),S=(0,V.useContext)(Ii).forceRender??Fi();if(u)return(0,H.jsx)(H.Fragment,{children:e});if((0,V.useInsertionEffect)(()=>{m.current=!1,g.current=f;for(let e=0;e<b.length;e++){let t=Hi(b[e]);p.includes(t)?(_.delete(t),h.current.delete(t)):_.get(t)!==!0&&_.set(t,!1)}},[b,p.length,p.join(`-`)]),f!==v){let e=[...f];for(let t=0;t<b.length;t++){let n=b[t],r=Hi(n);p.includes(r)||(e.splice(t,0,n),h.current.has(r)||h.current.set(r,l))}let t=b.filter(e=>!p.includes(Hi(e)));return d===`wait`&&t.length&&(e=t),x(Ui(e)),y(f),null}return(0,H.jsx)(H.Fragment,{children:b.map(e=>{let o=Hi(e),s=f===b||p.includes(o);return(0,H.jsx)(Bi,{isPresent:s,initial:!m.current||i?void 0:!1,custom:s?l:h.current.get(o)??l,presenceAffectsLayout:c,enterExitVariant:r,enterVariant:t,exitVariant:n,onExitComplete:s?void 0:()=>{if(_.has(o))_.set(o,!0);else return;let e=!0;_.forEach(t=>{t||(e=!1)}),e&&(S?.(),x(g.current),a?.())},children:e},o)})})};Wi.displayName=`AnimatePresence`;var Gi=e=>{(0,V.startTransition)(e)},Ki=e=>e();function qi({prop:e,defaultProp:t,onChange:n,strategy:r=`prop-wins`,preventUpdate:i,transition:a}){let[o,s]=V.useState(e??t),c=V.useRef(o),l=r===`prop-wins`&&e!==void 0,u=l?e:o,d=be(n||Ji),f=a?Gi:Ki;return V.useEffect(()=>{e!==void 0&&(c.current=e,f(()=>{s(e)}))},[e]),V.useEffect(()=>{l||o!==c.current&&(c.current=o,d(o))},[d,o,l]),[u,be(e=>{if(!i){if(l){let t=typeof e==`function`?e(c.current):e;d(t)}else f(()=>{s(e)})}})]}var Ji=()=>{};function Yi(e){let{Provider:t,useStyledContext:n}=N({collectionRef:{current:void 0},itemMap:new Map},`Toast`),r=e=>{let{scope:n,children:r}=e,i=V.useRef(void 0),a=V.useRef(new Map).current;return(0,H.jsx)(t,{scope:n,itemMap:a,collectionRef:i,children:r})};r.displayName=`CollectionProvider`;let i=e+`CollectionSlot`,a=V.forwardRef((e,t)=>{let{scope:r,children:i}=e,a=n(r),o=rt(t,a.collectionRef);return(0,H.jsx)(Oe,{ref:o,children:i})});a.displayName=i;let o=e+`CollectionItemSlot`,s=`data-collection-item`,c=V.forwardRef((e,t)=>{let{scope:r,children:i,...a}=e,o=V.useRef(void 0),c=rt(t,o),l=n(r);return V.useEffect(()=>(l.itemMap.set(o,{ref:o,...a}),()=>void l.itemMap.delete(o))),(0,H.jsx)(Oe,{[s]:``,ref:c,children:i})});c.displayName=o;function l(e){let t=n(e);return V.useCallback(()=>{let e=t.collectionRef.current;if(!e)return[];let n=Array.from(e.querySelectorAll(`[${s}]`));return Array.from(t.itemMap.values()).sort((e,t)=>n.indexOf(e.ref.current)-n.indexOf(t.ref.current))},[t.collectionRef,t.itemMap])}return[{Provider:r,Slot:a,ItemSlot:c},l]}var Xi=I(C,{name:`SizableStack`,variants:{unstyled:{true:{elevate:!1,bordered:!1}},circular:x,elevate:he,bordered:{true:qe},size:{"...size":(e,t)=>le(e,t)}}}),Zi=I(o,{name:`Paragraph`,render:`p`,userSelect:`auto`,color:`$color`,size:`$true`,whiteSpace:`normal`}),Qi=I(Zi,{render:`span`,name:`Heading`,role:`heading`,fontFamily:`$heading`,size:`$8`,margin:0});I(Qi,{name:`H1`,render:`h1`,variants:{unstyled:{false:{size:`$10`}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}});var $i=I(Qi,{name:`H2`,render:`h2`,variants:{unstyled:{false:{size:`$9`}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}});I(Qi,{name:`H3`,render:`h3`,variants:{unstyled:{false:{size:`$8`}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),I(Qi,{name:`H4`,render:`h4`,variants:{unstyled:{false:{size:`$7`}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),I(Qi,{name:`H5`,render:`h5`,variants:{unstyled:{false:{size:`$6`}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),I(Qi,{name:`H6`,render:`h6`,variants:{unstyled:{false:{size:`$5`}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}});var ea=V.createContext(void 0);function ta(e){let t=V.useContext(ea);return e||t||`ltr`}var na=(0,V.createContext)(1),ra=(0,V.createContext)(void 0),ia={},aa={},oa=e=>{if({}.GUI_STACK_Z_INDEX_GLOBAL){let{stackZIndex:t,zIndex:n}=e,r=(0,V.useId)(),i=(0,V.useMemo)(()=>{if(t&&t!==`global`&&n===void 0){let e=Object.values(aa).reduce((e,t)=>Math.max(e,t),0);return Math.max(t===!0?1:t,e+1)}return n??1e3},[t]);return(0,V.useEffect)(()=>{if(typeof t==`number`)return aa[r]=t,()=>{delete aa[r]}},[t]),i}{let{stackZIndex:t,zIndex:n}=e,r=(0,V.useId)(),i=(0,V.useContext)(na),a=t===`global`?0:i,o=(0,V.useContext)(ra);ia[a]||(ia[a]={});let s=ia[a],c=(0,V.useMemo)(()=>{if(typeof n==`number`)return n;if(t){if(o)return o+1;let e=Object.values(s),n=a*5e3,r=(a+1)*5e3,i=e.filter(e=>e<r),c=i.length>0?Math.max(...i):n,l=c===n?n+1:c+1;return typeof t==`number`?t+l:l}return 1},[a,n,t]);return(0,V.useEffect)(()=>{if(t)return s[r]=c,()=>{delete s[r]}},[c]),c}},sa=({children:e,zIndex:t})=>{let n=(0,V.useContext)(na),r=(0,H.jsx)(na.Provider,{value:n+1,children:e});return t!==void 0&&(r=(0,H.jsx)(ra.Provider,{value:t,children:r})),r},ca=e=>({stackZIndex:e.stackZIndex,zIndex:la(e.zIndex)}),la=e=>e===void 0?void 0:typeof e==`number`?e:d(e,`zIndex`),ua=e(ne(),1),da=V.memo(e=>{let{children:t,passThrough:n,style:r,open:i}=e,a=ji(),o=Ve(),s=oa(ca(e));return n?t:o?(0,ua.createPortal)((0,H.jsx)(we,{theme:a,style:{zIndex:s,position:`fixed`,inset:0,contain:`strict`,pointerEvents:i?`auto`:`none`,touchAction:`none`,display:`flex`,...r},children:(0,H.jsx)(ra.Provider,{value:s,children:t})}),globalThis.document?.body):null}),fa=()=>!1,pa=new Map,ma={},ha;(function(e){e[e.REGISTER_HOST=0]=`REGISTER_HOST`,e[e.DEREGISTER_HOST=1]=`DEREGISTER_HOST`,e[e.ADD_UPDATE_PORTAL=2]=`ADD_UPDATE_PORTAL`,e[e.REMOVE_PORTAL=3]=`REMOVE_PORTAL`})(ha||={});var ga={},_a=(e,t)=>(t in e||(e[t]=[]),e),va=(e,t)=>(delete e[t],e),ya=(e,t,n,r)=>{t in e||(e=_a(e,t));let i=e[t].findIndex(e=>e.name===n);return i===-1?e[t].push({name:n,node:r}):e[t][i].node=r,e},ba=(e,t,n)=>{if(!(t in e))return e;let r=e[t].findIndex(e=>e.name===n);return r!==-1&&e[t].splice(r,1),e},xa=(e,t)=>{let{type:n}=t;switch(n){case ha.REGISTER_HOST:return _a({...e},t.hostName);case ha.DEREGISTER_HOST:return va({...e},t.hostName);case ha.ADD_UPDATE_PORTAL:return ya({...e},t.hostName,t.portalName,t.node);case ha.REMOVE_PORTAL:return ba({...e},t.hostName,t.portalName);default:return e}},Sa=(0,V.createContext)(null),Ca=(0,V.createContext)(null),wa=(0,V.createContext)(!1),Ta=(0,V.memo)(({rootHostName:e=`root`,shouldAddRootHost:t=!0,children:n})=>{(0,V.useContext)(wa);let[r,i]=(0,V.useReducer)(xa,ga),a=(0,V.useMemo)(()=>e=>{Gi(()=>{i(e)})},[i]),o=bi().state,s=(0,H.jsx)(wa.Provider,{value:!0,children:(0,H.jsx)(Ca.Provider,{value:a,children:(0,H.jsxs)(Sa.Provider,{value:r,children:[n,t&&(0,H.jsx)(Ea,{name:e})]})})});return o.type===`teleport`?(0,H.jsx)(Ci,{children:s}):s});Ta.displayName=`PortalProvider`;var Ea=(0,V.memo)(function(e){return(0,H.jsx)(Da,{...e})});function Da(e){return Fe(()=>()=>{pa.delete(e.name)},[e.name]),(0,H.jsx)(`div`,{style:{display:`contents`},ref:t=>{t&&(pa.set(e.name,t),ma[e.name]?.forEach(e=>e(t)))}})}var Oa=e=>{let t=ji(),n=pa.get(e.hostName||``),[r,i]=(0,V.useState)(n);if(Fe(()=>{var t;if(!e.hostName)return;let n=e=>{i(e)};ma[t=e.hostName]||(ma[t]=new Set),ma[e.hostName].add(n);let a=pa.get(e.hostName);return a&&a!==r&&i(a),()=>{ma[e.hostName]?.delete(n)}},[e.hostName]),Fe(()=>{n&&n!==r&&i(n)},[n,r]),e.passThrough)return e.children;let a=r?.isConnected?r:null;return a?(0,ua.createPortal)((0,H.jsx)(we,{theme:t,children:e.children}),a):null};function ka(){let e=null,t=new Set;return{set(n){e=n;for(let e of t)e()},get:()=>e,subscribe(e){return t.add(e),()=>t.delete(e)}}}var Aa=(0,V.createContext)(null),ja=N({Contents:null,scopeName:``,portalName:``,platform:null,setPlatform:e=>{},when:null,setWhen:()=>{}}),Ma=(0,V.createContext)(``),Na=({children:e,...t})=>{let n=t.scopeName||``,r=(0,V.useContext)(Ma);return(0,H.jsx)(Ma.Provider,{value:r||t.lastScope||``,children:(0,H.jsx)(ja.Provider,{scope:n,lastScope:r||t.lastScope,...t,children:e})})},Pa=e=>{let t=(0,V.useContext)(Ma),n=e??t;return ja.useStyledContext(n)},Fa=new Map,Ia=({children:e,Contents:t,scope:n,portal:r})=>{let i=(0,V.useId)(),a=`AdaptPortal${n}${i}`,o=V.useRef(null);o.current||=ka();let s=(0,V.useMemo)(()=>{if(t)return t;if(Fa.has(a))return Fa.get(a);let e=()=>(0,H.jsx)(Ea,{name:a,forwardProps:typeof r==`boolean`?void 0:r?.forwardProps},i);return Fa.set(a,e),e},[a,t,!1]);Fe(()=>(Fa.set(a,s),()=>{Fa.delete(a)}),[a,!1]);let[c,l]=V.useState(null),[u,d]=V.useState(null);return(0,H.jsx)(Aa.Provider,{value:o.current,children:(0,H.jsx)(Ma.Provider,{value:n,children:(0,H.jsx)(Na,{Contents:s,when:c,platform:u,setPlatform:d,setWhen:l,portalName:a,scopeName:n,children:e})})})},La=({scope:e,...t})=>{let n=Pa(e);if(!n?.Contents)throw Error(`hanzogui.dev/docs/intro/errors#warning-002`);return V.createElement(n.Contents,{...t,key:`stable`})};La.shouldForwardSpace=!0;var Ra=l(function(e){let{platform:t,when:n,children:r,scope:i}=e,a=Pa(i),o=Ba(e);Fe(()=>{a?.setWhen?.(n||o),a?.setPlatform?.(t||null)},[n,t,o,a.setWhen,a.setPlatform]),Fe(()=>()=>{a?.setWhen?.(null),a?.setPlatform?.(null)},[]);let s;if(typeof r==`function`){let e=a?.Contents;s=r(e?(0,H.jsx)(e,{}):null)}else s=r;return(0,H.jsx)(sa,{children:o?s:null})},{Contents:La}),za=e=>{let t=Va(e.scope),{portalName:n}=Pa(e.scope);return(0,V.useContext)(Aa),(0,H.jsx)(Oa,{passThrough:!t,hostName:n,children:e.children})},Ba=({when:e,platform:t})=>{let n=ce();if(e==null&&t==null)return!1;if(e===!0)return!0;let r=!1;return t===`touch`?r=a:t===`native`?r=!1:t===`web`?r=!0:t===`ios`?r=Le:t===`android`&&(r=M),t&&r==0?!1:(e&&typeof e==`string`&&(r=n[e]),r)},Va=e=>Ba(Pa(e));function Ha({children:e,lazyMount:t,type:n,present:r,passThrough:i,...a}){let[o,s]=(0,V.useState)(!t&&r);(0,V.useEffect)(()=>{i||t&&r&&(0,V.startTransition)(()=>{s(r)})},[t,r]);let c=r?t?o:r:!1;return n===`presence`?a.keepChildrenMounted?(0,H.jsx)(Bi,{isPresent:!0,...!i&&{initial:a.initial?void 0:!1,onExitComplete:a.onExitComplete,enterVariant:a.enterVariant,exitVariant:a.exitVariant,enterExitVariant:a.enterExitVariant,presenceAffectsLayout:!1,isPresent:r,custom:a.custom},children:e}):(0,H.jsx)(Wi,{passThrough:i,...a,children:c||i?e:null}):(0,H.jsx)(H.Fragment,{children:e})}function Ua(e,t){let n=V.createContext(t);function r(e){let{children:t,...r}=e,i=V.useMemo(()=>r,Object.values(r));return(0,H.jsx)(n.Provider,{value:i,children:t})}function i(r){let i=V.useContext(n);if(i)return i;if(t!==void 0)return t;throw Error(`\`${r}\` must be used within \`${e}\``)}return[r,i]}function Wa(e,t=[]){let n=[];function r(t,r){let i=V.createContext(r),a=n.length;n=[...n,r];function o(t){let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=V.useMemo(()=>o,Object.values(o));return(0,H.jsx)(s.Provider,{value:c,children:r})}function s(n,o,s){let c=o?.[e]?.[a]||i,l=V.useContext(c);if(l)return l;if(r!==void 0)return r;let u=`\`${n}\` must be used within \`${t}\``;if(s?.fallback)return s?.warn!==!1&&console.warn(u),s.fallback;throw Error(u)}return[o,s]}let i=()=>{let t=n.map(e=>V.createContext(e));return function(n){let r=n?.[e]||t;return V.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,Ga(i,...t)]}function Ga(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return V.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}function Ka(e){let t=V.useRef(e);return V.useEffect(()=>{t.current=e}),V.useMemo(()=>((...e)=>t.current?.(...e)),[])}function qa(e,t=globalThis?.document){let n=Ka(e);V.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e),()=>{t.removeEventListener(`keydown`,e)}},[n,t])}function Ja(e,t){e&&ua.flushSync(()=>e.dispatchEvent(t))}var Ya=`Dismissable`,Xa=`dismissable.update`,Za=`dismissable.pointerDownOutside`,Qa=`dismissable.focusOutside`,$a,eo=new Set,to=new Set,no=0;function ro(){for(let e of to)e()}var io=V.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ao=V.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,forceUnmount:r,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,asChild:l,children:u,branches:d,...f}=e,p=l?Oe:et,m=V.useContext(io),[h,g]=V.useState(null),[,_]=V.useState({}),v=rt(t,e=>g(e)),y=Array.from(m.layers),[b]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),x=y.indexOf(b),S=h?y.indexOf(h):-1,C=m.layersWithOutsidePointerEventsDisabled.size>0,w=S>=x,T=co(e=>{let t=e.target,n=[...d||m.branches].some(e=>e.contains(t));w&&!n&&(a?.(e),s?.(e),e.defaultPrevented||c?.())}),E=lo(e=>{let t=e.target;[...d||m.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())}),D=V.useRef(r);return V.useEffect(()=>{D.current=r},[r]),qa(e=>{if(D.current)return;let t=Array.from(m.layers);(h?t.indexOf(h):-1)===t.length-1&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))}),V.useEffect(()=>{if(h&&!r)return n&&(m.layersWithOutsidePointerEventsDisabled.size===0&&($a=document.body.style.pointerEvents,document.body.style.pointerEvents=`none`),m.layersWithOutsidePointerEventsDisabled.add(h),no++),m.layers.add(h),eo.add(h),(n||no>0)&&uo(),ro(),()=>{n&&m.layersWithOutsidePointerEventsDisabled.size===1&&(document.body.style.pointerEvents=$a)}},[h,n,r,m]),V.useEffect(()=>{if(!r)return()=>{if(!h)return;let e=m.layersWithOutsidePointerEventsDisabled.has(h);m.layers.delete(h),m.layersWithOutsidePointerEventsDisabled.delete(h),eo.delete(h),no>0&&uo(),ro(),e&&no--}},[h,m,r]),V.useEffect(()=>{let e=()=>{no>0&&_({})};return document.addEventListener(Xa,e),()=>document.removeEventListener(Xa,e)},[]),(0,H.jsx)(p,{...f,ref:v,...!l&&{display:`contents`},pointerEvents:C?w?`auto`:`none`:void 0,onFocusCapture:B(e.onFocusCapture,E.onFocusCapture),onBlurCapture:B(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:B(e.onPointerDownCapture,T.onPointerDownCapture),children:u})});ao.displayName=Ya;var oo=`DismissableBranch`,so=V.forwardRef((e,t)=>{let{branches:n,...r}=e,i=V.useContext(io),a=V.useRef(null),o=rt(t,a);return V.useEffect(()=>{let e=a.current;if(!(e instanceof HTMLElement))return;let t=n||i.branches;if(e&&t)return t.add(e),()=>{t.delete(e)}},[n,i.branches]),(0,H.jsx)(et,{asChild:`except-style`,...r,ref:o})});so.displayName=oo;function co(e){let t=be(e),n=V.useRef(!1),r=V.useRef(()=>{});return V.useEffect(()=>{let e=e=>{if(e.target&&!n.current){let n={originalEvent:e};function i(){fo(Za,t,n,{discrete:!0})}e.pointerType===`touch`?(document.removeEventListener(`click`,r.current),r.current=i,document.addEventListener(`click`,r.current,{once:!0})):i()}n.current=!1},i=setTimeout(()=>{document.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(i),document.removeEventListener(`pointerdown`,e),document.removeEventListener(`click`,r.current)}},[t]),{onPointerDownCapture:()=>{n.current=!0}}}function lo(e){let t=be(e),n=V.useRef(!1);return V.useEffect(()=>{let e=e=>{e.target&&!n.current&&fo(Qa,t,{originalEvent:e},{discrete:!1})};return document.addEventListener(`focusin`,e),()=>document.removeEventListener(`focusin`,e)},[t]),{onFocusCapture:()=>{n.current=!0},onBlurCapture:()=>{n.current=!1}}}function uo(){let e=new CustomEvent(Xa);document.dispatchEvent(e)}function fo(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Ja(i,a):i.dispatchEvent(a)}var po=class extends Error{constructor(e=``){super(e),this.name=`AbortError`}};function mo(e,t=[]){ho(V.useEffect,e,t)}function ho(e,t,n=[]){e(()=>{let e=new AbortController,r=e.signal;try{let e=t(r,...n);Promise.resolve(e).then(async e=>{if(e&&typeof e==`function`){if(r.aborted)return e();r.addEventListener(`abort`,e)}}).catch(i)}catch(e){i(e)}function i(e){if(e instanceof po||typeof e==`object`&&e.name===`AbortError`)return null;throw e}return()=>{r.aborted||e.abort()}},n)}var go=async(e,t)=>{if(await new Promise(t=>setTimeout(t,e)),t?.aborted)throw new po},_o=typeof requestIdleCallback>`u`?e=>setTimeout(e,1):requestIdleCallback,vo=()=>new Promise(e=>{_o(e)}),yo=async(e,t)=>{let{max:n,min:r,fully:i}=t||{},a=i?bo:vo;if(n&&r&&r<n?await Promise.race([Promise.all([a(),go(r)]),go(n)]):n?await Promise.race([a(),go(n)]):r?await Promise.all([a(),go(r)]):await a(),e?.aborted)throw new po},bo=async e=>{for(;;){let t=Date.now();if(await yo(e),Date.now()-t<15)break;if(e?.aborted)throw new po}},xo=`FocusScopeController`,[So,Co]=Wa(xo),[wo,To]=So(xo);function Eo(e){let{__scopeFocusScope:t,children:n,enabled:r,loop:i,trapped:a,onMountAutoFocus:o,onUnmountAutoFocus:s,forceUnmount:c,focusOnIdle:l}=e,u=be(o),d=be(s),f=V.useMemo(()=>({enabled:r,loop:i,trapped:a,onMountAutoFocus:u,onUnmountAutoFocus:d,forceUnmount:c,focusOnIdle:l}),[r,i,a,u,d,c,l]);return(0,H.jsx)(wo,{scope:t,...f,children:n})}var Do=Eo,Oo=`focusScope.autoFocusOnMount`,ko=`focusScope.autoFocusOnUnmount`,Ao={bubbles:!1,cancelable:!0},jo=V.forwardRef(function({__scopeFocusScope:e,...t},n){let r=To(`FocusScope`,e,{warn:!1,fallback:{}}),i={...t,enabled:r.enabled??t.enabled,loop:r.loop??t.loop,trapped:r.trapped??t.trapped,onMountAutoFocus:r.onMountAutoFocus??t.onMountAutoFocus,onUnmountAutoFocus:r.onUnmountAutoFocus??t.onUnmountAutoFocus,forceUnmount:r.forceUnmount??t.forceUnmount,focusOnIdle:r.focusOnIdle??t.focusOnIdle},a=No(i,n);return typeof i.children==`function`?(0,H.jsx)(H.Fragment,{children:i.children(a)}):V.cloneElement(V.Children.only(i.children),a)});function Mo(e,t,n){let r=new AbortController,i=null;function a(){if(i)return;let r=t.current;i=requestAnimationFrame(()=>{i=null,!n.paused&&(n.stopped||e.isConnected&&(e.contains(document.activeElement)||Bo(r)))})}function o(i){if(n.paused)return;let o=i.target;e.contains(o)?(o?.addEventListener(`blur`,c,{signal:r.signal}),t.current=o):o?.contains(e)||a()}function s(t){if(r.abort(),n.paused)return;let i=t.relatedTarget;i!==null&&(i.contains(e)||e.contains(i)||a())}function c(){}return document.addEventListener(`focusin`,o),document.addEventListener(`focusout`,s),()=>{i&&=(cancelAnimationFrame(i),null),r.abort(),document.removeEventListener(`focusin`,o),document.removeEventListener(`focusout`,s)}}function No(e,t){let{loop:n=!1,enabled:r=!0,trapped:i=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,forceUnmount:s,focusOnIdle:c=!0,children:l,...u}=e,[d,f]=V.useState(null),p=V.useRef(null),m=be(a),h=be(o),g=V.useRef(null),_=V.useRef({paused:!1,stopped:!1,pause(){this.paused=!0},resume(){this.paused=!1},stop(){this.stopped=!0}}),v=_.current,y=V.useRef(null),b=V.useCallback(e=>{y.current&&=(y.current(),null),p.current=e,e&&r&&i&&(y.current=Mo(e,g,_.current)),f(e)},[r,i]),x=rt(t,b);Fe(()=>(i||(v.stopped=!0,y.current&&=(y.current(),null)),()=>{y.current&&=(y.current(),null)}),[i,v]),mo(async e=>{if(!r||!d||s)return;i&&(v.stopped=!1),Vo.add(v);let t=document.activeElement;if(!d.contains(t)||t===null||Ro(t,{upTo:d})){let n=new CustomEvent(Oo,Ao);if(d.addEventListener(Oo,m),d.dispatchEvent(n),!n.defaultPrevented){c&&await yo(e,typeof c==`object`?c:{max:200,min:typeof c==`number`?c:16});let n=Wo(Io(d)).filter(e=>!Ro(e,{upTo:d}));Po(n,{select:!0}),n.length>0?g.current=n[0]:g.current=d,document.activeElement===t&&n.length===0&&Bo(d)}}return()=>{v.stop(),d.removeEventListener(Oo,m);let e=new CustomEvent(ko,Ao);if(d.addEventListener(ko,h),d.dispatchEvent(e),!e.defaultPrevented){let e=document.activeElement;(!e||e===document.body||e===d||d.contains(e))&&Bo(t??document.body,{select:!0})}d.removeEventListener(ko,h),Vo.remove(v)}},[r,d,s,m,h,v,c]);let S=V.useCallback(e=>{if(!i||!n||v.paused||!r||!d)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,a=document.activeElement;if(t&&a){let[t,r]=Fo(d);t&&r?!e.shiftKey&&a===r?(e.preventDefault(),n&&Bo(t,{select:!0})):e.shiftKey&&a===t&&(e.preventDefault(),n&&Bo(r,{select:!0})):a===d&&e.preventDefault()}},[n,i,v.paused,r,d]);V.useEffect(()=>{if(!d||!i||!n||!r)return;let e=e=>{e.key===`Tab`&&S(e)};return d.addEventListener(`keydown`,e,!0),()=>{d.removeEventListener(`keydown`,e,!0)}},[d,i,n,r,S]);let C=u.onKeyDown,w=V.useCallback(e=>{C?.(e)},[C]);return{...u,ref:x,onKeyDown:w}}function Po(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(Bo(r,{select:t}),document.activeElement!==n)return}function Fo(e){let t=Io(e);return[Lo(t,e),Lo(t.reverse(),e)]}function Io(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Lo(e,t){for(let n of e)if(!Ro(n,{upTo:t}))return n}function Ro(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function zo(e){return e instanceof HTMLInputElement&&`select`in e}function Bo(e,{select:t=!1}={}){if(e?.focus){let n=document.activeElement;try{e.focus({preventScroll:!0}),e!==n&&zo(e)&&t&&e.select()}catch{}}}var Vo=Ho();function Ho(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=Uo(e,t),e.unshift(t)},remove(t){e=Uo(e,t),e[0]?.resume()}}}function Uo(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Wo(e){return e.filter(e=>e.tagName!==`A`)}var Go=()=>typeof window<`u`&&!!window.document&&!!window.document.createElement,Ko=0,qo=0,Jo=null;function Yo(){if(typeof navigator>`u`)return!1;let e=navigator.userAgent,t=/iPad|iPhone|iPod/.test(e)||navigator.platform===`MacIntel`&&navigator.maxTouchPoints>1,n=/^((?!chrome|android).)*safari/i.test(e);return t&&n}var Xo=e=>{let t=(0,V.useRef)(!1);(0,V.useEffect)(()=>{if(Go()){if(e&&!t.current){if(t.current=!0,++Ko===1){let e=document.documentElement,t=document.body;qo=window.scrollY,Jo={htmlOverflow:e.style.overflow,htmlScrollbarGutter:e.style.scrollbarGutter,bodyPosition:t.style.position,bodyTop:t.style.top,bodyWidth:t.style.width,bodyOverflow:t.style.overflow,bodyOverscrollBehavior:t.style.overscrollBehavior},e.style.scrollbarGutter=`stable`,e.style.overflow=`hidden`,t.style.overscrollBehavior=`none`,Yo()&&(t.style.position=`fixed`,t.style.top=`-${qo}px`,t.style.width=`100%`,t.style.overflow=`hidden`)}}else if(!e&&t.current&&(t.current=!1,--Ko===0&&Jo)){let e=document.documentElement,t=document.body;e.style.overflow=Jo.htmlOverflow,e.style.scrollbarGutter=Jo.htmlScrollbarGutter,t.style.position=Jo.bodyPosition,t.style.top=Jo.bodyTop,t.style.width=Jo.bodyWidth,t.style.overflow=Jo.bodyOverflow,t.style.overscrollBehavior=Jo.bodyOverscrollBehavior,qo>0&&window.scrollTo(0,qo),Jo=null,qo=0}}},[e]),(0,V.useEffect)(()=>()=>{if(t.current&&(t.current=!1,--Ko===0&&Jo)){let e=document.documentElement,t=document.body;e.style.overflow=Jo.htmlOverflow,e.style.scrollbarGutter=Jo.htmlScrollbarGutter,t.style.position=Jo.bodyPosition,t.style.top=Jo.bodyTop,t.style.width=Jo.bodyWidth,t.style.overflow=Jo.bodyOverflow,t.style.overscrollBehavior=Jo.bodyOverscrollBehavior,qo>0&&window.scrollTo(0,qo),Jo=null,qo=0}},[])},Zo=e=>(Xo(!!e.enabled),e.children),Qo=V.createContext(null),$o=({children:e,onOpenChange:t,onAnimationComplete:n,open:r,hidden:i,disableDrag:a})=>{let o=be(t),s=be(n),c=(0,V.useId)(),l=(0,V.useRef)(i),u=!1;l.current&&!i&&r&&(u=!0),l.current=i;let d=V.useMemo(()=>({id:c,open:r,hidden:i,disableDrag:a,onOpenChange:o,onAnimationComplete:s,skipNextAnimation:u}),[c,o,s,r,i,a,u]);return(0,H.jsx)(Qo.Provider,{value:d,children:e})},{useStyledContext:es,Provider:ts}=N({},`Dialog__`),ns=V.createContext(!0),rs=I(et,{name:`DialogTrigger`}),is=rs.styleable(function(e,t){let{scope:n,...r}=e,i=V.useContext(v),a=es(n),o=rt(t,a.triggerRef);return(0,H.jsx)(v.Provider,{value:!0,children:(0,H.jsx)(rs,{render:i?`span`:`button`,"aria-haspopup":`dialog`,"aria-expanded":a.open,"aria-controls":a.contentId,"data-state":ws(a.open),...r,ref:o,onPress:B(e.onPress,a.onOpenToggle)})})}),as=I(F,{pointerEvents:`none`,render:`dialog`,variants:{unstyled:{false:{alignItems:`center`,justifyContent:`center`,fullscreen:!0,"$platform-web":{borderWidth:0,backgroundColor:`transparent`,color:`inherit`,maxInlineSize:`none`,margin:0,width:`auto`,height:`auto`,maxHeight:`100vh`,position:`fixed`,zIndex:1}}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),os=fa(),ss=({context:e,children:t})=>{let n=ji(),r=Va(e.adaptScope),i=Pa(e.adaptScope),a=(0,H.jsx)(Ke,{name:n,children:t});return os&&(a=(0,H.jsx)(Na,{...i,children:(0,H.jsx)(ts,{...e,children:a})})),r?(0,H.jsx)(za,{scope:e.adaptScope,children:a}):e.modal?(0,H.jsx)(Oa,{hostName:e.modal?`root`:e.adaptScope,children:a}):a},cs=V.forwardRef((e,t)=>{let{scope:n,forceMount:r,children:i,...a}=e,o=V.useRef(null),s=ye(o,t),c=es(n),l=r||c.keepChildrenMounted,u=Va(c.adaptScope),[d,f]=V.useState(!c.open);c.open&&d&&f(!1);let p=c.open?!0:!d;Fe(()=>{let e=o.current;e instanceof HTMLDialogElement&&(p?e.show?.():e.close?.())},[p]);let m=V.useRef(c.onAnimationComplete);m.current=c.onAnimationComplete;let h=V.useCallback(()=>{f(!0),m.current?.({open:!1})},[]);V.useEffect(()=>{if(c.open&&!u&&m.current){let e=setTimeout(()=>{m.current?.({open:!0})},350);return()=>clearTimeout(e)}},[c.open,u]);let g=wi(`zIndex`,e),_=(0,H.jsx)(sa,{zIndex:la(g),children:(0,H.jsx)(Ha,{type:`presence`,present:!!c.open,keepChildrenMounted:!!l,onExitComplete:h,passThrough:u,children:i})}),v=d&&!l&&!u?null:(0,H.jsx)(Xe,{disable:!c.open,children:(0,H.jsx)(as,{ref:s,...c.open&&{"aria-modal":!0},pointerEvents:c.open?`auto`:`none`,...a,className:`_no_backdrop `+(a.className||``),children:_})});return(0,H.jsx)(da,{zIndex:g,stackZIndex:1e5,passThrough:u,children:(0,H.jsx)(ls,{passThrough:u,children:v})})}),ls=({children:e,passThrough:t})=>{let n=ji();return(0,H.jsx)(Ke,{passThrough:t,name:n,forceClassName:!0,children:e})},us=I(F,{name:`DialogOverlay`,zIndex:1,variants:{open:{true:{pointerEvents:`auto`},false:{pointerEvents:`none`}},unstyled:{false:{fullscreen:!0,position:`absolute`,backgroundColor:`$background`,pointerEvents:`auto`}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),ds=us.styleable(function({scope:e,...t},n){let r=es(e),{forceMount:i=r.forceMount,...a}=t,o=Va(r.adaptScope);return!i&&(!r.modal||o)?null:(0,H.jsx)(us,{"data-state":ws(r.open),pointerEvents:r.open?`auto`:`none`,...a,ref:n})}),fs=`DialogContent`,ps=I(C,{name:fs,zIndex:2,variants:{size:{"...size":(e,t)=>({})},unstyled:{false:{position:`relative`,backgroundColor:`$background`,borderWidth:1,borderColor:`$borderColor`,padding:`$true`,borderRadius:`$true`,elevate:!0,pointerEvents:`auto`}}},defaultVariants:{size:`$true`,unstyled:{}.GUI_HEADLESS===`1`}}),ms=ps.styleable(function({scope:e,...t},n){let r=es(e),i=(0,H.jsx)(H.Fragment,{children:r.modal?(0,H.jsx)(hs,{context:r,...t,ref:n}):(0,H.jsx)(gs,{context:r,...t,ref:n})});return r.disableRemoveScroll?i:(0,H.jsx)(Zo,{enabled:r.open,children:(0,H.jsx)(`div`,{"data-remove-scroll-container":!0,className:`_dsp_contents`,children:i})})}),hs=V.forwardRef(({children:e,context:t,...n},r)=>{let i=V.useRef(null),a=rt(r,t.contentRef,i);return(0,H.jsx)(_s,{...n,context:t,ref:a,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:B(n.onCloseAutoFocus,e=>{e.preventDefault(),t.triggerRef.current?.focus()}),onPointerDownOutside:B(n.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:B(n.onFocusOutside,e=>e.preventDefault()),...!n.unstyled&&{outlineStyle:`none`},children:e})}),gs=V.forwardRef((e,t)=>{let n=V.useRef(!1);return(0,H.jsx)(_s,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(n.current||e.context.triggerRef.current?.focus(),t.preventDefault()),n.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(n.current=!0);let r=t.target,i=e.context.triggerRef.current;i instanceof HTMLElement&&i.contains(r)&&t.preventDefault()}})}),_s=V.forwardRef((e,t)=>{let{trapFocus:n,onOpenAutoFocus:r,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:c,onInteractOutside:l,context:u,...d}=e,f=V.useRef(null),p=rt(t,f),m=Va(u.adaptScope),h=V.useContext(ns);if(m)return!u.open&&!u.keepChildrenMounted&&h?null:(0,H.jsx)(ss,{context:u,children:d.children});let g=(0,H.jsx)(ps,{ref:p,id:u.contentId,role:`dialog`,"aria-modal":u.modal,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":ws(u.open),pointerEvents:u.open?`auto`:`none`,...d});return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(ao,{disableOutsidePointerEvents:u.open&&a,forceUnmount:!u.open,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:c,onInteractOutside:l,onDismiss:()=>u?.onOpenChange?.(!1),children:(0,H.jsx)(jo,{loop:!0,enabled:u.open,trapped:n,onMountAutoFocus:r,forceUnmount:!u.open,onUnmountAutoFocus:i,children:g})}),!1]})}),vs=I($i,{name:`DialogTitle`}),ys=vs.styleable(function(e,t){let{scope:n,...r}=e,i=es(n);return(0,H.jsx)(vs,{id:i.titleId,...r,ref:t})}),bs=I(Zi,{name:`DialogDescription`}),xs=bs.styleable(function(e,t){let{scope:n,...r}=e,i=es(n);return(0,H.jsx)(bs,{id:i.descriptionId,...r,ref:t})}),Ss=I(et,{name:`DialogClose`,render:`button`}),Cs=Ss.styleable((e,t)=>{let{scope:n,displayWhenAdapted:r,...i}=e,a=es(n),o=Va(a.adaptScope),s=V.useContext(v);return o&&!r?null:(0,H.jsx)(Ss,{"aria-label":`Dialog Close`,render:s?`span`:`button`,...i,ref:t,onPress:B(e.onPress,()=>{a.onOpenChange(!1)})})});function ws(e){return e?`open`:`closed`}var[Ts,Es]=Ua(`DialogTitleWarning`,{contentName:fs,titleName:`DialogTitle`,docsSlug:`dialog`}),Ds=l(V.forwardRef(function(e,t){let{scope:n=``,children:r,open:i,defaultOpen:a=!1,onOpenChange:o,modal:s=!0,keepChildrenMounted:c,disableRemoveScroll:l=!1,onAnimationComplete:u}=e,d=`Dialog-${n}-${V.useId()}`,f=`${d}-content`,p=`${d}-title`,m=`${d}-description`,h=V.useRef(null),g=V.useRef(null),[_,v]=qi({prop:i,defaultProp:a,onChange:o}),y=V.useCallback(()=>{v(e=>!e)},[v]),b=`DialogAdapt${n}`,x={dialogScope:n,adaptScope:b,triggerRef:h,contentRef:g,contentId:f,titleId:p,descriptionId:m,open:_,onOpenChange:v,onOpenToggle:y,modal:s,keepChildrenMounted:c,disableRemoveScroll:l,onAnimationComplete:u};return V.useImperativeHandle(t,()=>({open:v}),[v]),(0,H.jsx)(Ia,{scope:b,portal:{forwardProps:e},children:(0,H.jsx)(ts,{scope:n,...x,children:(0,H.jsx)(Os,{onOpenChange:v,scope:n,children:r})})})}),{Trigger:is,Portal:cs,Overlay:ds,Content:ms,Title:ys,Description:xs,Close:Cs,FocusScope:Do,Adapt:Ra}),Os=e=>{let t=es(e.scope),n=Va(t.adaptScope),[r,i]=V.useState(!t.open);t.open&&r&&i(!1);let a=V.useCallback(({open:e})=>{e||i(!0)},[]);return(0,H.jsx)($o,{onOpenChange:t=>{n&&e.onOpenChange?.(t)},onAnimationComplete:a,open:t.open,hidden:!n,children:(0,H.jsx)(ns.Provider,{value:r,children:e.children})})},ks={OS:`web`,select:e=>`web`in e?e.web:e.default,get isTesting(){return!1},get Version(){return`0.0.0`}};function As(){return As=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},As.apply(null,arguments)}var js={_currentlyFocusedNode:null,currentlyFocusedField(){return document.activeElement!==this._currentlyFocusedNode&&(this._currentlyFocusedNode=null),this._currentlyFocusedNode},focusTextInput(e){e!==null&&(this._currentlyFocusedNode=e,document.activeElement!==e&&ee.focus(e))},blurTextInput(e){e!==null&&(this._currentlyFocusedNode=null,document.activeElement===e&&ee.blur(e))}},Ms=()=>{js.blurTextInput(js.currentlyFocusedField())},Ns=[`onScroll`,`onTouchMove`,`onWheel`,`scrollEnabled`,`scrollEventThrottle`,`showsHorizontalScrollIndicator`,`showsVerticalScrollIndicator`,`style`];function Ps(e){return{nativeEvent:{contentOffset:{get x(){return e.target.scrollLeft},get y(){return e.target.scrollTop}},contentSize:{get height(){return e.target.scrollHeight},get width(){return e.target.scrollWidth}},layoutMeasurement:{get height(){return e.target.offsetHeight},get width(){return e.target.offsetWidth}}},timeStamp:Date.now()}}function Fs(e,t){var n=Date.now()-e;return t>0&&n>=t}var Is=V.forwardRef((e,t)=>{var n=e.onScroll,r=e.onTouchMove,i=e.onWheel,a=e.scrollEnabled,o=a===void 0||a,s=e.scrollEventThrottle,c=s===void 0?0:s,l=e.showsHorizontalScrollIndicator,u=e.showsVerticalScrollIndicator,d=e.style,f=T(e,Ns),p=V.useRef({isScrolling:!1,scrollLastTick:0}),m=V.useRef(null),h=V.useRef(null);function g(e){return t=>{o&&e&&e(t)}}function _(e){e.stopPropagation(),e.target===h.current&&(e.persist(),m.current!=null&&clearTimeout(m.current),m.current=setTimeout(()=>{b(e)},100),p.current.isScrolling?Fs(p.current.scrollLastTick,c)&&y(e):v(e))}function v(e){p.current.isScrolling=!0,y(e)}function y(e){p.current.scrollLastTick=Date.now(),n&&n(Ps(e))}function b(e){p.current.isScrolling=!1,n&&n(Ps(e))}var x=l===!1||u===!1;return V.createElement(Pe,As({},f,{onScroll:_,onTouchMove:g(r),onWheel:g(i),ref:D(h,t),style:[d,!o&&Ls.scrollDisabled,x&&Ls.hideScrollbar]}))}),Ls=m.create({scrollDisabled:{overflowX:`hidden`,overflowY:`hidden`,touchAction:`none`},hideScrollbar:{scrollbarWidth:`none`}}),Rs=t(((e,t)=>{function n(e){return function(){return e}}var r=function(){};r.thatReturns=n,r.thatReturnsFalse=n(!1),r.thatReturnsTrue=n(!0),r.thatReturnsNull=n(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(e){return e},t.exports=r})),zs=t(((e,t)=>{t.exports=Rs()})),Bs=e(i()),Vs=e(zs()),Hs=[`contentContainerStyle`,`horizontal`,`onContentSizeChange`,`refreshControl`,`stickyHeaderIndices`,`pagingEnabled`,`forwardedRef`,`keyboardDismissMode`,`onScroll`,`centerContent`],Us={},Ws=16,Gs=class extends V.Component{constructor(){super(...arguments),this._scrollNodeRef=null,this._innerViewRef=null,this.isTouching=!1,this.lastMomentumScrollBeginTime=0,this.lastMomentumScrollEndTime=0,this.observedScrollSinceBecomingResponder=!1,this.becameResponderWhileAnimating=!1,this.scrollResponderHandleScrollShouldSetResponder=()=>this.isTouching,this.scrollResponderHandleStartShouldSetResponderCapture=e=>this.scrollResponderIsAnimating(),this.scrollResponderHandleTerminationRequest=()=>!this.observedScrollSinceBecomingResponder,this.scrollResponderHandleTouchEnd=e=>{var t=e.nativeEvent;this.isTouching=t.touches.length!==0,this.props.onTouchEnd&&this.props.onTouchEnd(e)},this.scrollResponderHandleResponderRelease=e=>{this.props.onResponderRelease&&this.props.onResponderRelease(e);var t=js.currentlyFocusedField();!this.props.keyboardShouldPersistTaps&&t!=null&&e.target!==t&&!this.observedScrollSinceBecomingResponder&&!this.becameResponderWhileAnimating&&(this.props.onScrollResponderKeyboardDismissed&&this.props.onScrollResponderKeyboardDismissed(e),js.blurTextInput(t))},this.scrollResponderHandleScroll=e=>{this.observedScrollSinceBecomingResponder=!0,this.props.onScroll&&this.props.onScroll(e)},this.scrollResponderHandleResponderGrant=e=>{this.observedScrollSinceBecomingResponder=!1,this.props.onResponderGrant&&this.props.onResponderGrant(e),this.becameResponderWhileAnimating=this.scrollResponderIsAnimating()},this.scrollResponderHandleScrollBeginDrag=e=>{this.props.onScrollBeginDrag&&this.props.onScrollBeginDrag(e)},this.scrollResponderHandleScrollEndDrag=e=>{this.props.onScrollEndDrag&&this.props.onScrollEndDrag(e)},this.scrollResponderHandleMomentumScrollBegin=e=>{this.lastMomentumScrollBeginTime=Date.now(),this.props.onMomentumScrollBegin&&this.props.onMomentumScrollBegin(e)},this.scrollResponderHandleMomentumScrollEnd=e=>{this.lastMomentumScrollEndTime=Date.now(),this.props.onMomentumScrollEnd&&this.props.onMomentumScrollEnd(e)},this.scrollResponderHandleTouchStart=e=>{this.isTouching=!0,this.props.onTouchStart&&this.props.onTouchStart(e)},this.scrollResponderHandleTouchMove=e=>{this.props.onTouchMove&&this.props.onTouchMove(e)},this.scrollResponderIsAnimating=()=>Date.now()-this.lastMomentumScrollEndTime<Ws||this.lastMomentumScrollEndTime<this.lastMomentumScrollBeginTime,this.scrollResponderScrollTo=(e,t,n)=>{if(typeof e==`number`)console.warn("`scrollResponderScrollTo(x, y, animated)` is deprecated. Use `scrollResponderScrollTo({x: 5, y: 5, animated: true})` instead.");else{var r=e||Us;e=r.x,t=r.y,n=r.animated}var i=this.getScrollableNode(),a=e||0,o=t||0;i!=null&&(typeof i.scroll==`function`?i.scroll({top:o,left:a,behavior:n?`smooth`:`auto`}):(i.scrollLeft=a,i.scrollTop=o))},this.scrollResponderZoomTo=(e,t)=>{ks.OS!==`ios`&&(0,Bs.default)(`zoomToRect is not implemented`)},this.scrollResponderScrollNativeHandleToKeyboard=(e,t,n)=>{this.additionalScrollOffset=t||0,this.preventNegativeScrollOffset=!!n,ee.measureLayout(e,this.getInnerViewNode(),this.scrollResponderTextInputFocusError,this.scrollResponderInputMeasureAndScrollToKeyboard)},this.scrollResponderInputMeasureAndScrollToKeyboard=(e,t,n,r)=>{var i=Ie.get(`window`).height;this.keyboardWillOpenTo&&(i=this.keyboardWillOpenTo.endCoordinates.screenY);var a=t-i+r+this.additionalScrollOffset;this.preventNegativeScrollOffset&&(a=Math.max(0,a)),this.scrollResponderScrollTo({x:0,y:a,animated:!0}),this.additionalOffset=0,this.preventNegativeScrollOffset=!1},this.scrollResponderKeyboardWillShow=e=>{this.keyboardWillOpenTo=e,this.props.onKeyboardWillShow&&this.props.onKeyboardWillShow(e)},this.scrollResponderKeyboardWillHide=e=>{this.keyboardWillOpenTo=null,this.props.onKeyboardWillHide&&this.props.onKeyboardWillHide(e)},this.scrollResponderKeyboardDidShow=e=>{e&&(this.keyboardWillOpenTo=e),this.props.onKeyboardDidShow&&this.props.onKeyboardDidShow(e)},this.scrollResponderKeyboardDidHide=e=>{this.keyboardWillOpenTo=null,this.props.onKeyboardDidHide&&this.props.onKeyboardDidHide(e)},this.flashScrollIndicators=()=>{this.scrollResponderFlashScrollIndicators()},this.getScrollResponder=()=>this,this.getScrollableNode=()=>this._scrollNodeRef,this.getInnerViewRef=()=>this._innerViewRef,this.getInnerViewNode=()=>this._innerViewRef,this.getNativeScrollRef=()=>this._scrollNodeRef,this.scrollTo=(e,t,n)=>{if(typeof e==`number`)console.warn("`scrollTo(y, x, animated)` is deprecated. Use `scrollTo({x: 5, y: 5, animated: true})` instead.");else{var r=e||Us;t=r.x,e=r.y,n=r.animated}this.scrollResponderScrollTo({x:t||0,y:e||0,animated:n!==!1})},this.scrollToEnd=e=>{var t=(e&&e.animated)!==!1,n=this.props.horizontal,r=this.getScrollableNode(),i=n?r.scrollWidth:0,a=n?0:r.scrollHeight;this.scrollResponderScrollTo({x:i,y:a,animated:t})},this._handleContentOnLayout=e=>{var t=e.nativeEvent.layout,n=t.width,r=t.height;this.props.onContentSizeChange(n,r)},this._handleScroll=e=>{this.props.keyboardDismissMode===`on-drag`&&Ms(),this.scrollResponderHandleScroll(e)},this._setInnerViewRef=e=>{this._innerViewRef=e},this._setScrollNodeRef=e=>{this._scrollNodeRef=e,e!=null&&(e.getScrollResponder=this.getScrollResponder,e.getInnerViewNode=this.getInnerViewNode,e.getInnerViewRef=this.getInnerViewRef,e.getNativeScrollRef=this.getNativeScrollRef,e.getScrollableNode=this.getScrollableNode,e.scrollTo=this.scrollTo,e.scrollToEnd=this.scrollToEnd,e.flashScrollIndicators=this.flashScrollIndicators,e.scrollResponderZoomTo=this.scrollResponderZoomTo,e.scrollResponderScrollNativeHandleToKeyboard=this.scrollResponderScrollNativeHandleToKeyboard),k(this.props.forwardedRef)(e)}}scrollResponderHandleStartShouldSetResponder(){return!1}scrollResponderHandleResponderReject(){(0,Vs.default)(!1,`ScrollView doesn't take rejection well - scrolls anyway`)}scrollResponderFlashScrollIndicators(){}scrollResponderTextInputFocusError(e){console.error(`Error measuring text field: `,e)}render(){var e=this.props,t=e.contentContainerStyle,n=e.horizontal,r=e.onContentSizeChange,i=e.refreshControl,a=e.stickyHeaderIndices,o=e.pagingEnabled;e.forwardedRef,e.keyboardDismissMode,e.onScroll;var s=e.centerContent,c=T(e,Hs),l={};r&&(l={onLayout:this._handleContentOnLayout});var u=!n&&Array.isArray(a),d=u||o?V.Children.map(this.props.children,(e,t)=>{var n=u&&a.indexOf(t)>-1;return e!=null&&(n||o)?V.createElement(Pe,{style:[n&&qs.stickyHeader,o&&qs.pagingEnabledChild]},e):e}):this.props.children,f=V.createElement(Pe,As({},l,{children:d,collapsable:!1,ref:this._setInnerViewRef,style:[n&&qs.contentContainerHorizontal,s&&qs.contentContainerCenterContent,t]})),p=n?qs.baseHorizontal:qs.baseVertical,m=n?qs.pagingEnabledHorizontal:qs.pagingEnabledVertical,h=re(re({},c),{},{style:[p,o&&m,this.props.style],onTouchStart:this.scrollResponderHandleTouchStart,onTouchMove:this.scrollResponderHandleTouchMove,onTouchEnd:this.scrollResponderHandleTouchEnd,onScrollBeginDrag:this.scrollResponderHandleScrollBeginDrag,onScrollEndDrag:this.scrollResponderHandleScrollEndDrag,onMomentumScrollBegin:this.scrollResponderHandleMomentumScrollBegin,onMomentumScrollEnd:this.scrollResponderHandleMomentumScrollEnd,onStartShouldSetResponder:this.scrollResponderHandleStartShouldSetResponder,onStartShouldSetResponderCapture:this.scrollResponderHandleStartShouldSetResponderCapture,onScrollShouldSetResponder:this.scrollResponderHandleScrollShouldSetResponder,onScroll:this._handleScroll,onResponderGrant:this.scrollResponderHandleResponderGrant,onResponderTerminationRequest:this.scrollResponderHandleTerminationRequest,onResponderTerminate:this.scrollResponderHandleTerminate,onResponderRelease:this.scrollResponderHandleResponderRelease,onResponderReject:this.scrollResponderHandleResponderReject}),g=Is;(0,Bs.default)(g!==void 0,`ScrollViewClass must not be undefined`);var _=V.createElement(g,As({},h,{ref:this._setScrollNodeRef}),f);return i?V.cloneElement(i,{style:h.style},_):_}},Ks={flexGrow:1,flexShrink:1,transform:`translateZ(0)`,WebkitOverflowScrolling:`touch`},qs=m.create({baseVertical:re(re({},Ks),{},{flexDirection:`column`,overflowX:`hidden`,overflowY:`auto`}),baseHorizontal:re(re({},Ks),{},{flexDirection:`row`,overflowX:`auto`,overflowY:`hidden`}),contentContainerHorizontal:{flexDirection:`row`},contentContainerCenterContent:{justifyContent:`center`,flexGrow:1},stickyHeader:{position:`sticky`,top:0,zIndex:10},pagingEnabledHorizontal:{scrollSnapType:`x mandatory`},pagingEnabledVertical:{scrollSnapType:`y mandatory`},pagingEnabledChild:{scrollSnapAlign:`start`}}),Js=V.forwardRef((e,t)=>V.createElement(Gs,As({},e,{forwardedRef:t})));Js.displayName=`ScrollView`;var Ys=[`animating`,`color`,`hidesWhenStopped`,`size`,`style`],Xs=e=>V.createElement(`circle`,{cx:`16`,cy:`16`,fill:`none`,r:`14`,strokeWidth:`4`,style:e}),Zs=V.forwardRef((e,t)=>{var n=e.animating,r=n===void 0||n,i=e.color,a=i===void 0?`#1976D2`:i,o=e.hidesWhenStopped,s=o===void 0||o,c=e.size,l=c===void 0?`small`:c,u=e.style,d=T(e,Ys),f=V.createElement(`svg`,{height:`100%`,viewBox:`0 0 32 32`,width:`100%`},Xs({stroke:a,opacity:.2}),Xs({stroke:a,strokeDasharray:80,strokeDashoffset:60}));return V.createElement(Pe,As({},d,{"aria-valuemax":1,"aria-valuemin":0,ref:t,role:`progressbar`,style:[Qs.container,u]}),V.createElement(Pe,{children:f,style:[typeof l==`number`?{height:l,width:l}:$s[l],Qs.animation,!r&&Qs.animationPause,!r&&s&&Qs.hidesWhenStopped]}))});Zs.displayName=`ActivityIndicator`;var Qs=m.create({container:{alignItems:`center`,justifyContent:`center`},hidesWhenStopped:{visibility:`hidden`},animation:{animationDuration:`0.75s`,animationKeyframes:[{"0%":{transform:`rotate(0deg)`},"100%":{transform:`rotate(360deg)`}}],animationTimingFunction:`linear`,animationIterationCount:`infinite`},animationPause:{animationPlayState:`paused`}}),$s=m.create({small:{width:20,height:20},large:{width:36,height:36}}),ec=I(tt,{name:`Image`,render:`img`}),tc=ec.styleable((e,t)=>{let{blurRadius:n,capInsets:r,defaultSource:i,fadeDuration:a,loadingIndicatorSource:o,onLoadEnd:s,onPartialLoad:c,progressiveRenderingEnabled:l,resizeMethod:u,tintColor:d,...f}=e;return(0,H.jsx)(ec,{ref:t,...f})},{staticConfig:{memo:!0}}),nc=(()=>{});tc.getSize=nc,tc.getSizeWithHeaders=nc,tc.prefetch=nc,tc.prefetchWithMetadata=nc,tc.abortPrefetch=nc,tc.queryCache=nc;var rc=(e,{tokens:t})=>{let n=t.size[e]??e,r=t.size[e]??e;return{width:n,height:r,minWidth:n,maxWidth:n,maxHeight:r,minHeight:r}},ic=I(C,{name:`Square`,alignItems:`center`,justifyContent:`center`,variants:{size:{"...size":rc,":number":rc}}},{memo:!0}),ac=`Avatar`,[oc,sc]=Wa(ac),[cc,lc]=oc(ac),uc=`AvatarImage`,dc=V.forwardRef((e,t)=>{let{__scopeAvatar:n,src:r,source:i,onLoadingStatusChange:a=()=>{},...o}=e,s=lc(uc,n),[c,l]=V.useState(`idle`),u=r||(i&&typeof i==`object`&&`uri`in i?i.uri:i);return V.useEffect(()=>{l(u?`idle`:`error`)},[u]),V.useEffect(()=>{a(c),s.onImageLoadingStatusChange(c)},[c]),u?(0,H.jsx)(F,{fullscreen:!0,zIndex:1,children:(0,H.jsx)(tc,{position:`absolute`,top:0,left:0,right:0,bottom:0,objectFit:`cover`,width:`100%`,height:`100%`,...o,ref:t,src:u,onError:()=>{l(`error`)},onLoad:()=>{l(`loaded`)}})}):null});dc.displayName=uc;var fc=`AvatarFallback`,pc=I(F,{name:fc,position:`absolute`,fullscreen:!0,zIndex:0}),mc=pc.styleable((e,t)=>{let{__scopeAvatar:n,delayMs:r,...i}=e,a=lc(fc,n),[o,s]=V.useState(r===void 0);return V.useEffect(()=>{if(r!==void 0){let e=setTimeout(()=>s(!0),r);return()=>clearTimeout(e)}},[r]),o&&a.imageLoadingStatus!==`loaded`?(0,H.jsx)(pc,{...i,ref:t}):null});mc.displayName=fc;var hc=I(ic,{name:ac,position:`relative`,overflow:`hidden`}),gc=l(V.forwardRef((e,t)=>{let{__scopeAvatar:n,size:r=`$true`,...i}=e,[a,o]=V.useState(`idle`);return(0,H.jsx)(cc,{size:r,scope:n,imageLoadingStatus:a,onImageLoadingStatusChange:o,children:(0,H.jsx)(hc,{size:r,...i,ref:t})})}),{Image:dc,Fallback:mc});gc.displayName=ac;var _c=e=>{let t=u(e.color);return n=>n&&(V.isValidElement(n)?V.cloneElement(n,{...e,color:t,...n.props}):V.createElement(n,e))},vc=N({size:`$true`,scaleIcon:1,unstyled:{}.GUI_HEADLESS===`1`,active:!1,disabled:!1}),yc=I(F,{name:`CheckboxIndicator`,context:vc,variants:{unstyled:{false:{}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}},{accept:{activeStyle:`style`}}),bc=I(F,{name:`Checkbox`,render:`button`,context:vc,variants:{unstyled:{false:{size:`$true`,backgroundColor:`$background`,alignItems:`center`,justifyContent:`center`,borderWidth:1,borderColor:`$borderColor`,hoverStyle:{borderColor:`$borderColorHover`},pressStyle:{backgroundColor:`$backgroundPress`,borderColor:`$borderColorPress`},focusStyle:{borderColor:`$borderColorFocus`},focusVisibleStyle:{outlineStyle:`solid`,outlineWidth:2,outlineColor:`$outlineColor`}}},disabled:{true:{pointerEvents:`none`,userSelect:`none`,cursor:`not-allowed`,hoverStyle:{borderColor:`$borderColor`,backgroundColor:`$background`},pressStyle:{borderColor:`$borderColor`,backgroundColor:`$background`},focusStyle:{outlineWidth:0}}},size:{"...size":e=>({borderRadius:ot(pe(e))/8})}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}},{accept:{activeStyle:`style`}}),xc=(e,t)=>()=>{},[Sc,Cc]=Ua(`Label`,{id:void 0,controlRef:{current:null}}),wc=I(o,{name:`Label`,render:`label`,variants:{unstyled:{false:{size:`$true`,color:`$color`,backgroundColor:`transparent`,display:`flex`,alignItems:`center`,userSelect:`none`,cursor:`default`,pressStyle:{color:`$colorPress`}}},size:{"...size":(e,t)=>{let n=le(e,t)?.height;return{...de(e,t),lineHeight:n?t.tokens.size[n]:void 0}}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}});wc.styleable(function(e,t){let{htmlFor:n,id:r,...i}=e,a=V.useRef(null),o=V.useRef(null),s=rt(t,o),c=V.useId(),l=r??c;return Fe(()=>{if(n){let e=document.getElementById(n);if(o.current&&e){let t=()=>e.getAttribute(`aria-labelledby`),n=[l,t()].filter(Boolean).join(` `);return e.setAttribute(`aria-labelledby`,n),a.current=e,()=>{if(!l)return;let n=t()?.replace(l,``);n===``?e.removeAttribute(`aria-labelledby`):n&&e.setAttribute(`aria-labelledby`,n)}}}},[l,n]),(0,H.jsx)(Sc,{id:l,controlRef:a,children:(0,H.jsx)(wc,{id:l,htmlFor:n,...i,ref:s,onMouseDown:t=>{e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault()},onPress:t=>{e.onPress?.(t);{if(n||!a.current||t.defaultPrevented)return;let e=a.current.contains(t.target),r=t.isTrusted===!0;!e&&r&&(a.current.click(),a.current.focus())}}})})});var Tc=e=>{let t=Cc(`LabelConsumer`),{controlRef:n}=t;return V.useEffect(()=>{e&&(n.current=e)},[e,n]),t.id};function Ec(e){let t=V.useRef({value:e,previous:e});return V.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Dc(e){return e===`indeterminate`}function Oc(e){return Dc(e)?`indeterminate`:e?`checked`:`unchecked`}var kc=e=>{let{checked:t,bubbles:n=!0,control:r,isHidden:i,...a}=e,o=V.useRef(null),s=Ec(t);return V.useEffect(()=>{let e=o.current,r=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(r,`checked`).set;if(s!==t&&i){let r=new Event(`click`,{bubbles:n});e.indeterminate=Dc(t),i.call(e,!Dc(t)&&t),e.dispatchEvent(r)}},[s,t,n]),(0,H.jsx)(`input`,{type:`checkbox`,defaultChecked:!Dc(t)&&t,...a,tabIndex:-1,ref:o,"aria-hidden":i,style:{...i?{position:`absolute`,pointerEvents:`none`,opacity:0,margin:0}:{appearance:`auto`,accentColor:`var(--color6)`},...e.style}})};function Ac(e,[t,n],r){let{labelledBy:i,name:a,required:o,disabled:s,value:c=`on`,onCheckedChange:l,...u}=e,[d,f]=V.useState(null),p=rt(r,f),m=V.useRef(!1),h=!d||!!d.closest(`form`),g=Tc(d),_=i||g,v=e.onKeyDown,y=(0,V.useMemo)(()=>B(v,e=>{e.key===`Enter`&&e.preventDefault()}),[v]),b=(0,V.useMemo)(()=>B(e.onPress,e=>{n(e=>Dc(e)?!0:!e),h&&`isPropagationStopped`in e&&(m.current=e.isPropagationStopped(),m.current||e.stopPropagation())}),[h]);return{bubbleInput:h?(0,H.jsx)(kc,{isHidden:!0,control:d,bubbles:!m.current,name:a,value:c,checked:t,required:o,disabled:s}):null,checkboxRef:p,checkboxProps:{role:`checkbox`,"aria-labelledby":_,"aria-checked":Dc(t)?`mixed`:t,...u,type:`button`,value:c,"data-state":Oc(t),"data-disabled":s?``:void 0,disabled:s,onKeyDown:s?void 0:y,onPress:s?void 0:b}}}var jc=V.createContext({checked:!1,disabled:!1}),Mc=e=>{e.context||=jc};function Nc(e){let{Frame:t=bc,Indicator:n=yc}=e;Mc(t),Mc(n);let r=t.styleable(function(e,n){let{scaleSize:r=.45,sizeAdjust:i=0,scaleIcon:a,checked:o,defaultChecked:s,onCheckedChange:c,native:l,unstyled:u=!1,activeStyle:d,activeTheme:f,...p}=e,m=ze(p),h=V.useContext(vc.context),g=0,_=0;u||(g=ot(pe(m.size??h?.size??`$true`,{shift:i})),_=r?Math.round(g*r):g);let[v=!1,y]=qi({prop:o,defaultProp:s,onChange:c}),{checkboxProps:b,checkboxRef:x,bubbleInput:S}=Ac(m,[v,y],n);if(gi(l)===`web`)return(0,H.jsx)(`input`,{type:`checkbox`,defaultChecked:!Dc(v)&&v,tabIndex:-1,ref:x,disabled:b.disabled,style:{appearance:`auto`,accentColor:`var(--color6)`,...b.style}});let C=(0,V.useMemo)(()=>({checked:v,disabled:b.disabled}),[v,b.disabled]),w=!!v,T=b.disabled;return(0,H.jsx)(jc.Provider,{value:C,children:(0,H.jsxs)(vc.Provider,{size:m.size??h?.size??`$true`,scaleIcon:a??h?.scaleIcon??1,unstyled:u,active:w,disabled:T,children:[(0,H.jsx)(t,{render:`button`,ref:x,unstyled:u,theme:f??null,type:`button`,...!u&&{width:_,height:_,size:_},checked:v,disabled:T,...b,...p,...w&&{...!u&&!d&&{backgroundColor:`$backgroundActive`},...d},children:m.children}),S]})})}),i=n.styleable((e,t)=>{let{children:r,forceMount:i,disablePassStyles:a,unstyled:o=!1,activeStyle:s,...c}=e,l=vc.useStyledContext(),{active:u}=l,d=r;if(!o){let e=_c({size:(typeof l.size==`number`?l.size*.65:j(l.size))*l.scaleIcon,color:ct().color});d=V.Children.toArray(r).map(t=>a||!V.isValidElement(t)?t:e(t))}let f=V.useContext(jc);return i||Dc(f.checked)||f.checked===!0?(0,H.jsx)(n,{pointerEvents:`none`,...c,...u&&s,ref:t,children:d}):null});return l(r,{Indicator:i})}var Pc=Nc({Frame:bc,Indicator:yc}),Fc=V.createContext([]),Ic=V.createContext(null);function Lc(){let e=V.useContext(Fc),t=V.useContext(Ic);return V.useMemo(()=>{if(t===null)return null;let n=zc(t),r=e[e.length-1],i=n[n.length-1];return{maxIndex:r,maxIndexPath:e,index:i,indexPath:n,indexPathString:t,isFirst:i===0,isLast:i===r,isEven:i%2==0,isOdd:Math.abs(i%2)===1}},[e,t])}function Rc(e){let t=V.useContext(Fc),n=V.useContext(Ic),r=V.Children.count(e),i=V.useMemo(()=>t.concat(r-1),[r]);return(0,H.jsx)(Fc.Provider,{value:i,children:V.Children.map(e,(e,t)=>V.isValidElement(e)?(0,H.jsx)(Ic.Provider,{value:n?`${n}.${t.toString()}`:t.toString(),children:e},e.key):e)})}function zc(e){return e.split(`.`).map(e=>Number.parseInt(e,10))}var Bc=`Group`,[Vc,Hc]=Wa(Bc),[Uc,Wc]=Vc(Bc),Gc=I(F,{name:`GroupFrame`,variants:{unstyled:{false:{size:`$true`}},size:(e,{tokens:t})=>({borderRadius:t.radius[e]??e??t.radius.$true})},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}});function Kc(e){return l(Gc.styleable((t,n)=>{let{__scopeGroup:r,children:i,orientation:a=e?`vertical`:`horizontal`,disabled:o,...s}=t,c=a===`vertical`,l=Rc(V.Children.toArray(i));return(0,H.jsx)(Uc,{vertical:c,disabled:o,scope:r,children:(0,H.jsx)(Gc,{ref:n,flexDirection:c?`column`:`row`,...s,children:l})})}),{Item:qc})}function qc(e){let{__scopeGroup:t,children:n,forcePlacement:r,...i}=e,a=Wc(`GroupItem`,t),o=Lc();if(!o)throw Error(`<Group.Item/> should only be used within a <Group/>`);if(!V.isValidElement(n))return n;let s=Zc(r===`first`||r!==`last`&&o.index===0,r===`last`||r!==`first`&&o.index===o.maxIndex,a.vertical),c={...i,...s};a.disabled!=null&&(c.disabled=n.props.disabled??a.disabled);let l=je(c,n.props);return V.cloneElement(n,l)}var Jc=(e,t,n)=>{let r=Lc(),i=Wc(`GroupItem`,n);if(!r)throw Error(`useGroupItem should only be used within a <Group/>`);let a=Zc(t===`first`||t!==`last`&&r.index===0,t===`last`||t!==`first`&&r.index===r.maxIndex,i.vertical);return{disabled:e.disabled??i.disabled,...a}},Yc=Kc(!0),Xc=Kc(!1);function Zc(e,t,n){return n?{...e?null:{borderTopLeftRadius:0,borderTopRightRadius:0},...t?null:{borderBottomLeftRadius:0,borderBottomRightRadius:0}}:{...e?null:{borderTopLeftRadius:0,borderBottomLeftRadius:0},...t?null:{borderTopRightRadius:0,borderBottomRightRadius:0}}}var Qc=`ListItem`,$c=N({size:void 0,variant:void 0,color:void 0}),el=I(tt,{context:$c,name:Qc,render:`li`,role:`listitem`,variants:{unstyled:{false:{size:`$true`,alignItems:`center`,justifyContent:`space-between`,flexWrap:`nowrap`,borderColor:`$borderColor`,width:`100%`,maxWidth:`100%`,overflow:`hidden`,flexDirection:`row`,backgroundColor:`$background`,cursor:`default`,hoverStyle:{backgroundColor:`$backgroundHover`,borderColor:`$borderColorHover`},pressStyle:{backgroundColor:`$backgroundPress`,borderColor:`$borderColorPress`}}},variant:{outlined:{}.GUI_HEADLESS===`1`?{}:{backgroundColor:`transparent`,borderWidth:1,borderColor:`$borderColor`,hoverStyle:{backgroundColor:`transparent`,borderColor:`$borderColorHover`},pressStyle:{backgroundColor:`transparent`,borderColor:`$borderColorPress`}}},size:{"...size":(e,{tokens:t})=>({minHeight:t.size[e],paddingHorizontal:t.space[e],paddingVertical:g(t.space[e],{shift:-4})})},active:{true:{hoverStyle:{backgroundColor:`$background`}}},disabled:{true:{opacity:.5,pointerEvents:`none`}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),tl=I(o,{context:$c,name:`ListItemText`,variants:{unstyled:{false:{color:`$color`,size:`$true`,flexGrow:1,flexShrink:1,ellipsis:!0,cursor:`inherit`}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),nl=I(tl,{name:`ListItemSubtitle`,context:$c,variants:{unstyled:{false:{opacity:.6,maxWidth:`100%`,color:`$color`}},size:{"...size":(e,t)=>{let n=pe(e,{shift:-1,excludeHalfSteps:!0});return de(n.key,t)}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),rl=I(tl,{name:`ListItemTitle`,context:$c,variants:{unstyled:{false:{}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),il=e=>{let{children:t,size:n,scaleIcon:r=1}=e,i=$c.useStyledContext();if(!i)throw Error(`ListItem.Icon must be used within a ListItem`);let a=n??i.size??`$true`,o=u(i.color),s=j(a)*r;return f(t,{size:s,color:o})},al=el.styleable(function(e,t){let{children:n,icon:r,iconAfter:i,scaleIcon:a=1,unstyled:o=!1,subTitle:s,title:c,iconSize:l,...d}=e,p=e.size||`$true`,m=$c.useStyledContext(),h=u(m?.color),g=j(l||p)*a,_=g*.4,v=r?(0,H.jsx)(tt,{marginRight:_,children:f(r,{size:g,color:h})}):null,y=i?(0,H.jsx)(tt,{marginLeft:_,children:f(i,{size:g,color:h})}):null,b=lt(tl,{children:n},e.unstyled===!0?void 0:{unstyled:{}.GUI_HEADLESS===`1`,fontSize:e.size});return(0,H.jsxs)(el,{ref:t,...d,children:[v,c||s?(0,H.jsxs)(F,{flex:1,children:[c?typeof c==`string`?(0,H.jsx)(rl,{unstyled:o,size:p,children:c}):c:null,s?(0,H.jsx)(H.Fragment,{children:typeof s==`string`?(0,H.jsx)(nl,{unstyled:o,size:p,children:s}):s}):null,b]}):b,y]})}),ol=l(al,{Apply:$c.Provider,Frame:el,Text:tl,Subtitle:nl,Icon:il,Title:rl}),sl=0;function cl(){V.useEffect(()=>{let e=document.querySelectorAll(`[data-hanzogui-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??ll()),document.body.insertAdjacentElement(`beforeend`,e[1]??ll()),sl++,()=>{sl===1&&document.querySelectorAll(`[data-hanzogui-focus-guard]`).forEach(e=>e.remove()),sl--}},[])}function ll(){let e=document.createElement(`span`);return e.setAttribute(`data-hanzogui-focus-guard`,``),e.tabIndex=0,e.style.cssText=`outline: none; opacity: 0; position: fixed; pointer-events: none`,e}var ul=Math.min,dl=Math.max,fl=Math.round,pl=Math.floor,ml=e=>({x:e,y:e}),hl={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function gl(e,t,n){return dl(e,ul(t,n))}function _l(e,t){return typeof e==`function`?e(t):e}function vl(e){return e.split(`-`)[0]}function yl(e){return e.split(`-`)[1]}function bl(e){return e===`x`?`y`:`x`}function xl(e){return e===`y`?`height`:`width`}function Sl(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Cl(e){return bl(Sl(e))}function wl(e,t,n){n===void 0&&(n=!1);let r=yl(e),i=Cl(e),a=xl(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Nl(o)),[o,Nl(o)]}function Tl(e){let t=Nl(e);return[El(e),t,El(t)]}function El(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Dl=[`left`,`right`],Ol=[`right`,`left`],kl=[`top`,`bottom`],Al=[`bottom`,`top`];function jl(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Ol:Dl:t?Dl:Ol;case`left`:case`right`:return t?kl:Al;default:return[]}}function Ml(e,t,n,r){let i=yl(e),a=jl(vl(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(El)))),a}function Nl(e){let t=vl(e);return hl[t]+e.slice(t.length)}function Pl(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function Fl(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Pl(e)}function Il(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,n){let{reference:r,floating:i}=e,a=Sl(t),o=Cl(t),s=xl(o),c=vl(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=yl(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function Rl(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}=_l(t,e),p=Fl(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Il(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=Il(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 zl=50,Bl=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Rl},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Ll(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<zl&&(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}=Ll(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Vl=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}=_l(e,t)||{};if(l==null)return{};let d=Fl(u),f={x:n,y:r},p=Cl(i),m=xl(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=ul(d[_],T),D=ul(d[v],T),O=C-h[m]-D,k=C/2-h[m]/2+w,A=gl(E,k,O),j=!c.arrow&&yl(i)!=null&&k!==A&&a.reference[m]/2-(k<E?E:D)-h[m]/2<0,M=j?k<E?k-E:k-O:0;return{[p]:f[p]+M,data:{[p]:A,centerOffset:k-A-M,...j&&{alignmentOffset:M}},reset:j}}}),Hl=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}=_l(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=vl(r),_=Sl(o),v=vl(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Nl(o)]:Tl(o)),x=p!==`none`;!d&&x&&b.push(...Ml(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=wl(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`||_===Sl(t)||T.every(e=>Sl(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=Sl(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{}}}},Ul=new Set([`left`,`top`]);async function Wl(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=vl(n),s=yl(n),c=Sl(n)===`y`,l=Ul.has(o)?-1:1,u=a&&c?-1:1,d=_l(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 Gl=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 Wl(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}}}}},Kl=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}=_l(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Sl(i),p=bl(f),m=u[p],h=u[f],g=(e,t)=>gl(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}}}}}},ql=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}=_l(e,t),c=await i.detectOverflow(t,s),l=vl(n),u=yl(n),d=Sl(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=ul(p-c[m],g),y=ul(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*dl(c.left,c.right):S=p-2*dl(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 Jl(){return typeof window<`u`}function Yl(e){return Ql(e)?(e.nodeName||``).toLowerCase():`#document`}function Xl(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Zl(e){return((Ql(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Ql(e){return Jl()?e instanceof Node||e instanceof Xl(e).Node:!1}function $l(e){return Jl()?e instanceof Element||e instanceof Xl(e).Element:!1}function eu(e){return Jl()?e instanceof HTMLElement||e instanceof Xl(e).HTMLElement:!1}function tu(e){return!Jl()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Xl(e).ShadowRoot}function nu(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=pu(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function ru(e){return/^(table|td|th)$/.test(Yl(e))}function iu(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var au=/transform|translate|scale|rotate|perspective|filter/,ou=/paint|layout|strict|content/,su=e=>!!e&&e!==`none`,cu;function lu(e){let t=$l(e)?pu(e):e;return su(t.transform)||su(t.translate)||su(t.scale)||su(t.rotate)||su(t.perspective)||!du()&&(su(t.backdropFilter)||su(t.filter))||au.test(t.willChange||``)||ou.test(t.contain||``)}function uu(e){let t=hu(e);for(;eu(t)&&!fu(t);){if(lu(t))return t;if(iu(t))return null;t=hu(t)}return null}function du(){return cu??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),cu}function fu(e){return/^(html|body|#document)$/.test(Yl(e))}function pu(e){return Xl(e).getComputedStyle(e)}function mu(e){return $l(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function hu(e){if(Yl(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||tu(e)&&e.host||Zl(e);return tu(t)?t.host:t}function gu(e){let t=hu(e);return fu(t)?(e.ownerDocument||e).body:eu(t)&&nu(t)?t:gu(t)}function _u(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=gu(e),i=r===e.ownerDocument?.body,a=Xl(r);if(i){let e=vu(a);return t.concat(a,a.visualViewport||[],nu(r)?r:[],e&&n?_u(e):[])}return t.concat(r,_u(r,[],n))}function vu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function yu(e){let t=pu(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=eu(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=fl(n)!==a||fl(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function bu(e){return $l(e)?e:e.contextElement}function xu(e){let t=bu(e);if(!eu(t))return ml(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=yu(t),o=(a?fl(n.width):n.width)/r,s=(a?fl(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Su=ml(0);function Cu(e){let t=Xl(e);return!du()||!t.visualViewport?Su:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function wu(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Xl(e)}function Tu(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=bu(e),o=ml(1);t&&(r?$l(r)&&(o=xu(r)):o=xu(e));let s=wu(a,n,r)?Cu(a):ml(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=Xl(a),t=$l(r)?Xl(r):r,n=e,i=vu(n);for(;i&&t!==n;){let e=xu(i),t=i.getBoundingClientRect(),r=pu(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=Xl(i),i=vu(n)}}return Il({width:u,height:d,x:c,y:l})}function Eu(e,t){let n=mu(e).scrollLeft;return t?t.left+n:Tu(Zl(e)).left+n}function Du(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Eu(e,n),y:n.top+t.scrollTop}}function Ou(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Zl(r),s=t?iu(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=ml(1),u=ml(0),d=eu(r);if((d||!a)&&((Yl(r)!==`body`||nu(o))&&(c=mu(r)),d)){let e=Tu(r);l=xu(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Du(o,c):ml(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 ku(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Au(e){let t=mu(e),n=e.ownerDocument.body,r=dl(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=dl(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Eu(e),o=-t.scrollTop;return pu(n).direction===`rtl`&&(a+=dl(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var ju=25;function Mu(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=Xl(e),a=Zl(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!du()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Eu(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<=ju&&(s-=o)}return{width:s,height:c,x:l,y:u}}function Nu(e,t){let n=Tu(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=xu(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Pu(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=Mu(e,n,t);else if(t===`document`)r=Au(Zl(e));else if($l(t))r=Nu(t,n);else{let n=Cu(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Il(r)}function Fu(e,t){let n=t.get(e);if(n)return n;let r=_u(e,[],!1).filter(e=>$l(e)&&Yl(e)!==`body`),i=null,a=pu(e).position===`fixed`,o=a?hu(e):e;for(;$l(o)&&!fu(o);){let e=pu(o),t=lu(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=hu(o)}return t.set(e,r),r}function Iu(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?iu(t)?[]:Fu(t,this._c):[].concat(n),r],o=Pu(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=Pu(t,a[e],i);s=dl(n.top,s),c=ul(n.right,c),l=ul(n.bottom,l),u=dl(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Lu(e){let{width:t,height:n}=yu(e);return{width:t,height:n}}function Ru(e,t,n){let r=eu(t),i=Zl(t),a=n===`fixed`,o=Tu(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=ml(0);if((r||!a)&&((Yl(t)!==`body`||nu(i))&&(s=mu(t)),r)){let e=Tu(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Eu(i));let l=i&&!r&&!a?Du(i,s):ml(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 zu(e){return pu(e).position===`static`}function Bu(e,t){if(!eu(e)||pu(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Zl(e)===n&&(n=n.ownerDocument.body),n}function Vu(e,t){let n=Xl(e);if(iu(e))return n;if(!eu(e)){let t=hu(e);for(;t&&!fu(t);){if($l(t)&&!zu(t))return t;t=hu(t)}return n}let r=Bu(e,t);for(;r&&ru(r)&&zu(r);)r=Bu(r,t);return r&&fu(r)&&zu(r)&&!lu(r)?n:r||uu(e)||n}var Hu=async function(e){let t=this.getOffsetParent||Vu,n=this.getDimensions,r=await n(e.floating);return{reference:Ru(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Uu(e){return pu(e).direction===`rtl`}var Wu={convertOffsetParentRelativeRectToViewportRelativeRect:Ou,getDocumentElement:Zl,getClippingRect:Iu,getOffsetParent:Vu,getElementRects:Hu,getClientRects:ku,getDimensions:Lu,getScale:xu,isElement:$l,isRTL:Uu};function Gu(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ku(e,t,n){let r=null,i,a=Zl(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=pl(d),h=pl(a.clientWidth-(u+f)),g=pl(a.clientHeight-(d+p)),_=pl(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:dl(0,ul(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!Gu(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=Xl(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function qu(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=bu(e),u=i||a?[...l?_u(l):[],...t?_u(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?Ku(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?Tu(e):null;c&&g();function g(){let t=Tu(e);h&&!Gu(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 Ju=Rl,Yu=Gl,Xu=Kl,Zu=Hl,Qu=ql,$u=Vl,ed=(e,t,n)=>{let r=new Map,i=n??{},a={...Wu,...i.platform,_c:r};return Bl(e,t,{...i,platform:a})},td=typeof document<`u`?V.useLayoutEffect:function(){};function nd(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(!nd(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)&&!nd(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function rd(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function id(e,t){let n=rd(e);return Math.round(t*n)/n}function ad(e){let t=V.useRef(e);return td(()=>{t.current=e}),t}function od(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]=V.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=V.useState(r);nd(f,r)||p(r);let[m,h]=V.useState(null),[g,_]=V.useState(null),v=V.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=V.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=V.useRef(null),C=V.useRef(null),w=V.useRef(u),T=c!=null,E=ad(c),D=ad(i),O=ad(l),k=V.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),ed(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!nd(w.current,t)&&(w.current=t,ua.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);td(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=V.useRef(!1);td(()=>(A.current=!0,()=>{A.current=!1}),[]),td(()=>{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=V.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),M=V.useMemo(()=>({reference:b,floating:x}),[b,x]),ee=V.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=id(M.floating,u.x),r=id(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...rd(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return V.useMemo(()=>({...u,update:k,refs:j,elements:M,floatingStyles:ee}),[u,k,j,M,ee])}var sd=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:$u({element:r.current,padding:i}).fn(n):r?$u({element:r,padding:i}).fn(n):{}}}},cd=(e,t)=>{let n=Yu(e);return{name:n.name,fn:n.fn,options:[e,t]}},ld=(e,t)=>{let n=Xu(e);return{name:n.name,fn:n.fn,options:[e,t]}},ud=(e,t)=>{let n=Zu(e);return{name:n.name,fn:n.fn,options:[e,t]}},dd=(e,t)=>{let n=Qu(e);return{name:n.name,fn:n.fn,options:[e,t]}},fd=(e,t)=>{let n=sd(e);return{name:n.name,fn:n.fn,options:[e,t]}},pd=V.createContext(null),md=e=>{"use no memo";return(V.useContext(pd)||od)?.({...e,middleware:[...e.middleware,{name:`rounded`,fn({x:e,y:t}){return{x:Math.round(e),y:Math.round(t)}}}]})};function hd(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){let r=e.get(t);r||(r=new Set,e.set(t,r)),r.add(n)},off(t,n){let r=e.get(t);r&&(r.delete(n),r.size===0&&e.delete(t))}}}var gd=class{constructor(){this.map=new Map,this.elements=new Set}add(e,t){let n=this.map.get(e);n&&this.elements.delete(n),this.map.set(e,t),this.elements.add(t)}delete(e){let t=this.map.get(e);t&&(this.elements.delete(t),this.map.delete(e))}hasElement(e){return this.elements.has(e)}};function _d(e){let t=e.filter(Boolean),n=new Map,r=new Map,i=new Map,a={},o={};for(let e of t)e.reference&&vd(e.reference,n,a),e.floating&&vd(e.floating,r,o),e.item&&typeof e.item==`object`&&vd(e.item,i,{});return{getReferenceProps(e){return yd(n,a,e)},getFloatingProps(e){return yd(r,o,e)},getItemProps(e){return yd(i,{},e)}}}function vd(e,t,n){for(let r of Object.keys(e))if(typeof e[r]==`function`){let n=t.get(r);n||(n=[],t.set(r,n)),n.push(e[r])}else n[r]=e[r]}function yd(e,t,n){let r={...t};for(let[t,n]of e)r[t]=(...e)=>{for(let t of n){let n=t(...e);if(n!==void 0)return n}};if(n)for(let e of Object.keys(n))if(e===`style`)r.style={...r.style,...n.style};else if(typeof n[e]==`function`&&r[e]){let t=r[e],i=n[e];r[e]=(...e)=>{i(...e),t(...e)}}else r[e]=n[e];return r}function bd(e){return e?.ownerDocument||document}function xd(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&Sd(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Sd(e){return e instanceof ShadowRoot}function Cd(e){return`composedPath`in e?e.composedPath()[0]:e.target}function wd(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Td(e){return e instanceof HTMLElement}function Ed(e){return e instanceof Element}var Dd=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`;function Od(e){return Td(e)&&e.matches(Dd)}function kd(e){return e?e.getAttribute(`role`)===`combobox`&&Od(e):!1}function Ad(){let e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform}function jd(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(` `):navigator.userAgent}function Md(){return/apple/i.test(navigator.vendor)}function Nd(){return Ad().toLowerCase().startsWith(`mac`)&&!navigator.maxTouchPoints}function Pd(){return jd().includes(`jsdom/`)}function Fd(e){if(!e||Pd())return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function Id(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function Ld(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}function Rd(e){e.preventDefault(),e.stopPropagation()}function zd(e){return e.mozInputSource===0&&e.isTrusted?!0:Vd()&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function Bd(e){return Pd()?!1:!Vd()&&e.width===0&&e.height===0||Vd()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function Vd(){let e=/android/i;return e.test(Ad())||e.test(jd())}var Hd=0;function Ud(e,t={}){let{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(Hd);let a=()=>e?.focus({preventScroll:n});i?a():Hd=requestAnimationFrame(a)}function Wd(e,t,n){if(typeof n==`function`)return n(t);if(n)return n.includes(t);let r=e.current[t];return r==null||r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`}function Gd(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let a=t;do a+=n?-i:i;while(a>=0&&a<=e.current.length-1&&Wd(e,a,r));return a}function Kd(e,t){return Gd(e,{disabledIndices:t})}function qd(e,t){return Gd(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Jd(e,t){return t<0||t>=e.current.length}var Yd=`data-floating-ui-safe-polygon`;function Xd(e,t,n){return n&&!Id(n)?0:typeof e==`number`?e:e?.[t]}function Zd(e,t={}){let{open:n,onOpenChange:r,dataRef:i,events:a,elements:o}=e,{enabled:s=!0,delay:c=0,handleClose:l=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,p=V.useRef(l);p.current=l;let m=V.useRef(c);m.current=c;let h=V.useRef(n);h.current=n;let g=V.useRef(d);g.current=d;let _=be(r),v=V.useRef(void 0),y=V.useRef(-1),b=V.useRef(void 0),x=V.useRef(-1),S=V.useRef(!0),C=V.useRef(!1),w=V.useRef(()=>{}),T=V.useRef(!1),E=be(()=>{let e=i.current.openEvent?.type;return e?.includes(`mouse`)&&e!==`mousedown`});V.useEffect(()=>{if(!s||!a)return;function e({open:e}){e||(Ld(y),Ld(x),S.current=!0,T.current=!1)}return a.on(`openchange`,e),()=>{a.off(`openchange`,e)}},[s,a]);let D=be((e,t=!0,n=`hover`)=>{let r=Xd(m.current,`close`,v.current);r&&!b.current?(Ld(y),y.current=window.setTimeout(()=>_(!1,e,n),r)):t&&(Ld(y),_(!1,e,n))}),O=be(()=>{w.current(),b.current=void 0,e.handleCloseActiveRef&&(e.handleCloseActiveRef.current=!1)}),k=be(()=>{if(C.current){let e=bd(o.floating).body;e.style.pointerEvents=``,e.removeAttribute(Yd),C.current=!1}}),A=be(()=>i.current.openEvent?[`click`,`mousedown`].includes(i.current.openEvent.type):!1);V.useEffect(()=>{if(!s)return;function t(e){if(Ld(y),S.current=!1,u&&!Id(v.current)||g.current>0&&!Xd(m.current,`open`))return;let t=Xd(m.current,`open`,v.current);t?y.current=window.setTimeout(()=>{h.current||_(!0,e,`hover`)},t):n||_(!0,e,`hover`)}function r(t){if(A()){k();return}if(e.triggerElements?.hasElement(t.relatedTarget))return;w.current();let r=bd(o.floating);if(Ld(x),T.current=!1,p.current){n||Ld(y);let a=i.current.placement||`bottom`,s=o.domReference,c=o.floating;if(!s||!c)return;b.current=p.current({x:t.clientX,y:t.clientY,placement:a,elements:{reference:s,floating:c,domReference:s},onClose(){e.handleCloseActiveRef&&(e.handleCloseActiveRef.current=!1),k(),O(),A()||D(t,!0,`safe-polygon`)}}),e.handleCloseActiveRef&&(e.handleCloseActiveRef.current=!0);let l=b.current;r.addEventListener(`mousemove`,l),w.current=()=>{r.removeEventListener(`mousemove`,l)};return}(v.current!==`touch`||!xd(o.floating,t.relatedTarget))&&D(t)}function a(t){if(A()||e.triggerElements?.hasElement(t.relatedTarget))return;let n=i.current.placement||`bottom`,r=o.domReference,a=o.floating;r&&a&&p.current?.({x:t.clientX,y:t.clientY,placement:n,elements:{reference:r,floating:a,domReference:r},onClose(){k(),O(),A()||D(t)}})(t)}function c(){Ld(y)}function l(t){A()||e.triggerElements?.hasElement(t.relatedTarget)||D(t,!1)}if(Ed(o.domReference)){let e=o.domReference,i=o.floating;return n&&e.addEventListener(`mouseleave`,a),f&&e.addEventListener(`mousemove`,t,{once:!0}),e.addEventListener(`mouseenter`,t),e.addEventListener(`mouseleave`,r),i&&(i.addEventListener(`mouseleave`,a),i.addEventListener(`mouseenter`,c),i.addEventListener(`mouseleave`,l)),()=>{n&&e.removeEventListener(`mouseleave`,a),f&&e.removeEventListener(`mousemove`,t),e.removeEventListener(`mouseenter`,t),e.removeEventListener(`mouseleave`,r),i&&(i.removeEventListener(`mouseleave`,a),i.removeEventListener(`mouseenter`,c),i.removeEventListener(`mouseleave`,l)),O()}}},[o,s,e,u,f,n,i]),V.useLayoutEffect(()=>{if(s&&n&&p.current?.__options?.blockPointerEvents&&E()){C.current=!0;let e=o.floating;if(Ed(o.domReference)&&e){let t=bd(o.floating).body;t.setAttribute(Yd,``);let n=o.domReference;return t.style.pointerEvents=`none`,n.style.pointerEvents=`auto`,e.style.pointerEvents=`auto`,()=>{t.style.pointerEvents=``,n.style.pointerEvents=``,e.style.pointerEvents=``}}}},[s,n,o,E]),V.useLayoutEffect(()=>{n||(v.current=void 0,T.current=!1,O(),k())},[n]),V.useEffect(()=>()=>{O(),Ld(y),Ld(x),k()},[s,o.domReference]);let j=V.useMemo(()=>{function e(e){v.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e;function r(){!S.current&&!h.current&&_(!0,t,`hover`)}(!u||Id(v.current))&&(n||g.current===0||T.current&&e.movementX**2+e.movementY**2<2||(Ld(x),v.current===`touch`?r():(T.current=!0,x.current=window.setTimeout(r,g.current))))}}},[u,n]);return V.useMemo(()=>s?{reference:j}:{},[s,j])}function Qd(e,t){let[n,r]=e,i=!1,a=t.length;for(let e=0,o=a-1;e<a;o=e++){let[a,s]=t[e]||[0,0],[c,l]=t[o]||[0,0];s>=r!=l>=r&&n<=(c-a)*(r-s)/(l-s)+a&&(i=!i)}return i}function $d(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}var ef=null;function tf(e,t,n,r){if(ef||(ef=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`),ef.id=`__safe-polygon-debug`,Object.assign(ef.style,{position:`fixed`,inset:`0`,width:`100vw`,height:`100vh`,pointerEvents:`none`,zIndex:`999999`}),document.body.appendChild(ef)),ef.innerHTML=``,t.length){let e=document.createElementNS(`http://www.w3.org/2000/svg`,`polygon`);e.setAttribute(`points`,t.map(e=>e.join(`,`)).join(` `)),e.setAttribute(`fill`,`rgba(0,100,255,0.15)`),e.setAttribute(`stroke`,`rgba(0,100,255,0.6)`),e.setAttribute(`stroke-width`,`1`),ef.appendChild(e)}if(e.length){let t=document.createElementNS(`http://www.w3.org/2000/svg`,`polygon`);t.setAttribute(`points`,e.map(e=>e.join(`,`)).join(` `)),t.setAttribute(`fill`,`rgba(255,50,50,0.2)`),t.setAttribute(`stroke`,`rgba(255,50,50,0.8)`),t.setAttribute(`stroke-width`,`1.5`),ef.appendChild(t)}let i=document.createElementNS(`http://www.w3.org/2000/svg`,`circle`);i.setAttribute(`cx`,String(r[0])),i.setAttribute(`cy`,String(r[1])),i.setAttribute(`r`,`5`),i.setAttribute(`fill`,`lime`),i.setAttribute(`stroke`,`darkgreen`),i.setAttribute(`stroke-width`,`1.5`),ef.appendChild(i);let a=document.createElementNS(`http://www.w3.org/2000/svg`,`circle`);a.setAttribute(`cx`,String(n[0])),a.setAttribute(`cy`,String(n[1])),a.setAttribute(`r`,`4`),a.setAttribute(`fill`,`yellow`),a.setAttribute(`stroke`,`orange`),a.setAttribute(`stroke-width`,`1.5`),ef.appendChild(a)}function nf(){ef&&=(ef.remove(),null)}function rf(e={}){let{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0,__debug:i=!1}=e,a={current:-1},o=!1,s=null,c=null,l=typeof performance<`u`?performance.now():0;function u(e,t){let n=performance.now(),r=n-l;if(s===null||c===null||r===0)return s=e,c=t,l=n,null;let i=e-s,a=t-c,o=Math.sqrt(i*i+a*a)/r;return s=e,c=t,l=n,o}let d=({x:e,y:n,placement:l,elements:d,onClose:f})=>(o=!1,s=null,c=null,function(s){function c(){Ld(a),f()}Ld(a);let p=d.domReference??d.reference;if(!p||!d.floating||l==null||e==null||n==null)return;let{clientX:m,clientY:h}=s,g=[m,h],_=Cd(s),v=s.type===`mouseleave`,y=xd(d.floating,_),b=xd(p,_),x=p.getBoundingClientRect(),S=d.floating.getBoundingClientRect(),C=l.split(`-`)[0],w=e>S.right-S.width/2,T=n>S.bottom-S.height/2,E=$d(g,x),D=S.width>x.width,O=S.height>x.height,k=(D?x:S).left,A=(D?x:S).right,j=(O?x:S).top,M=(O?x:S).bottom;if(y&&(o=!0,!v))return;if(b&&(o=!1),b&&!v){o=!0;return}if(!b&&E&&!v||v&&s.relatedTarget&&xd(d.floating,s.relatedTarget))return;if(C===`top`&&n>=x.bottom-1||C===`bottom`&&n<=x.top+1||C===`left`&&e>=x.right-1||C===`right`&&e<=x.left+1)return c();let ee=[];switch(C){case`top`:ee=[[k,x.top+1],[k,S.bottom-1],[A,S.bottom-1],[A,x.top+1]];break;case`bottom`:ee=[[k,S.top+1],[k,x.bottom-1],[A,x.bottom-1],[A,S.top+1]];break;case`left`:ee=[[S.right-1,M],[S.right-1,j],[x.left+1,j],[x.left+1,M]];break;case`right`:ee=[[x.right-1,M],[x.right-1,j],[S.left+1,j],[S.left+1,M]]}function N([e,n]){switch(C){case`top`:return[[D?e+t/2:w?e+t*4:e-t*4,n+t+1],[D?e-t/2:w?e+t*4:e-t*4,n+t+1],[S.left,w||D?S.bottom-t:S.top],[S.right,w?D?S.bottom-t:S.top:S.bottom-t]];case`bottom`:return[[D?e+t/2:w?e+t*4:e-t*4,n-t],[D?e-t/2:w?e+t*4:e-t*4,n-t],[S.left,w||D?S.top+t:S.bottom],[S.right,w?D?S.top+t:S.bottom:S.top+t]];case`left`:{let r=[e+t+1,O?n+t/2:T?n+t*4:n-t*4],i=[e+t+1,O?n-t/2:T?n+t*4:n-t*4];return[[T||O?S.right-t:S.left,S.top],[T?O?S.right-t:S.left:S.right-t,S.bottom],r,i]}case`right`:return[[e-t,O?n+t/2:T?n+t*4:n-t*4],[e-t,O?n-t/2:T?n+t*4:n-t*4],[T||O?S.left+t:S.right,S.top],[T?O?S.left+t:S.right:S.left+t,S.bottom]]}}let te=N([e,n]);if(i&&tf(te,ee,g,[e,n]),!Qd([m,h],ee)){if(o&&!E)return i&&nf(),c();if(!Qd([m,h],te)){if(!v&&r){let e=u(m,h);if(e!==null&&e<.1)return i&&nf(),c()}i&&nf(),c()}}});return d.__options={blockPointerEvents:n},d}function af(){return Nd()&&Md()}function of(e,t={}){let{open:n,onOpenChange:r,events:i,dataRef:a,elements:o}=e,{enabled:s=!0,visibleOnly:c=!0}=t,l=(0,V.useRef)(!1),u=(0,V.useRef)(-1),d=(0,V.useRef)(!0);(0,V.useEffect)(()=>{if(!s)return;let e=bd(o.domReference).defaultView||window;function t(){!n&&Td(o.domReference)&&o.domReference===wd(bd(o.domReference))&&(l.current=!0)}function r(){d.current=!0}function i(){d.current=!1}return e.addEventListener(`blur`,t),af()&&(e.addEventListener(`keydown`,r,!0),e.addEventListener(`pointerdown`,i,!0)),()=>{e.removeEventListener(`blur`,t),af()&&(e.removeEventListener(`keydown`,r,!0),e.removeEventListener(`pointerdown`,i,!0))}},[o.domReference,n,s]),(0,V.useEffect)(()=>{if(!s||!i)return;function e({reason:e}){(e===`reference-press`||e===`escape-key`)&&(l.current=!0)}return i.on(`openchange`,e),()=>{i.off(`openchange`,e)}},[i,s]),(0,V.useEffect)(()=>()=>{Ld(u)},[]);let f=(0,V.useMemo)(()=>({onMouseLeave(){l.current=!1},onFocus(e){if(l.current)return;let t=Cd(e.nativeEvent);if(c&&Ed(t)){if(af()&&!e.relatedTarget){if(!d.current&&!Od(t))return}else if(!Fd(t))return}r(!0,e.nativeEvent,`focus`)},onBlur(t){l.current=!1;let n=t.relatedTarget,i=t.nativeEvent;u.current=window.setTimeout(()=>{let t=wd(o.domReference?o.domReference.ownerDocument:document);(n||t!==o.domReference)&&(xd(e.refs.floating.current,t)||xd(o.domReference,t)||r(!1,i,`focus`))})}}),[e.refs.floating,o.domReference,r,c]);return(0,V.useMemo)(()=>s?{reference:f}:{},[s,f])}var sf=new Map([[`select`,`listbox`],[`combobox`,`listbox`],[`label`,!1]]),cf=0;function lf(e,t={}){let{open:n,elements:r}=e,{enabled:i=!0,role:a=`dialog`}=t,o=V.useId(),s=r.domReference?.id||o,c=V.useMemo(()=>`floating-${cf++}`,[]),l=V.useMemo(()=>r.floating?.id||c,[r.floating,c]),u=sf.get(a)??a,d=V.useMemo(()=>u===`tooltip`||a===`label`?{[`aria-${a===`label`?`labelledby`:`describedby`}`]:n?l:void 0}:{"aria-expanded":n?`true`:`false`,"aria-haspopup":u===`alertdialog`?`dialog`:u,"aria-controls":n?l:void 0,...u===`listbox`&&{role:`combobox`},...u===`menu`&&{id:s},...a===`select`&&{"aria-autocomplete":`none`},...a===`combobox`&&{"aria-autocomplete":`list`}},[u,l,n,s,a]),f=V.useMemo(()=>{let e={id:l,...u&&{role:u}};return u===`tooltip`||a===`label`?e:{...e,...u===`menu`&&{"aria-labelledby":s}}},[u,l,s,a]),p=V.useCallback(({active:e,selected:t})=>{let n={role:`option`,...e&&{id:`${l}-fui-option`}};switch(a){case`select`:case`combobox`:return{...n,"aria-selected":t}}return{}},[l,a]);return V.useMemo(()=>i?{reference:d,floating:f,item:p}:{},[i,d,f,p])}function uf(e){return Td(e.target)&&e.target.tagName===`BUTTON`}function df(e){return Td(e.target)&&e.target.tagName===`A`}function ff(e){return Od(e)}function pf(e,t={}){let{open:n,onOpenChange:r,dataRef:i,elements:{domReference:a}}=e,{enabled:o=!0,event:s=`click`,toggle:c=!0,ignoreMouse:l=!1,keyboardHandlers:u=!0,stickIfOpen:d=!0}=t,f=(0,V.useRef)(void 0),p=(0,V.useRef)(!1),m=(0,V.useMemo)(()=>({onPointerDown(e){f.current=e.pointerType},onMouseDown(e){let t=f.current;e.button===0&&s!==`click`&&(Id(t,!0)&&l||(n&&c&&(!(i.current.openEvent&&d)||i.current.openEvent.type===`mousedown`)?r(!1,e.nativeEvent||e,`click`):(e.preventDefault(),r(!0,e.nativeEvent||e,`click`))))},onClick(e){let t=f.current;if(s===`mousedown`&&f.current){f.current=void 0;return}Id(t,!0)&&l||(n&&c&&(!(i.current.openEvent&&d)||i.current.openEvent.type===`click`)?r(!1,e.nativeEvent||e,`click`):r(!0,e.nativeEvent||e,`click`))},onKeyDown(e){f.current=void 0,!(e.defaultPrevented||!u||uf(e))&&(e.key===` `&&!ff(a)&&(e.preventDefault(),p.current=!0),!df(e)&&e.key===`Enter`&&r(!(n&&c),e.nativeEvent||e,`click`))},onKeyUp(e){e.defaultPrevented||!u||uf(e)||ff(a)||e.key===` `&&p.current&&(p.current=!1,r(!(n&&c),e.nativeEvent||e,`click`))}}),[i,a,s,l,u,r,n,d,c]);return(0,V.useMemo)(()=>o?{reference:m}:{},[o,m])}var mf=`ArrowUp`,hf=`ArrowDown`,gf=`ArrowLeft`,_f=`ArrowRight`;function vf(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function yf(e,t){return vf(t,e===mf||e===hf,e===gf||e===_f)}function bf(e,t,n){return vf(t,e===hf,n?e===gf:e===_f)||e===`Enter`||e===` `||e===``}function xf(e,t,n){return vf(t,n?e===gf:e===_f,e===hf)}function Sf(e,t,n){return vf(t,n?e===_f:e===gf,e===mf)}function Cf(e,t){let{open:n,onOpenChange:r,elements:i}=e,{listRef:a,activeIndex:o,onNavigate:s=()=>{},enabled:c=!0,selectedIndex:l=null,allowEscape:u=!1,loop:d=!1,nested:f=!1,rtl:p=!1,virtual:m=!1,focusItemOnOpen:h=`auto`,focusItemOnHover:g=!0,openOnArrowKeyDown:_=!0,disabledIndices:v=void 0,orientation:y=`vertical`,scrollItemIntoView:b=!0}=t,x=kd(i.domReference),S=(0,V.useRef)(h),C=(0,V.useRef)(l??-1),w=(0,V.useRef)(null),T=(0,V.useRef)(!0),E=(0,V.useRef)(!!i.floating),D=(0,V.useRef)(n),O=(0,V.useRef)(!1),k=(0,V.useRef)(!1),A=(0,V.useRef)(v);A.current=v;let j=(0,V.useRef)(n);j.current=n;let M=(0,V.useRef)(b);M.current=b;let ee=(0,V.useRef)(l);ee.current=l;let N=be(s),[te,ne]=(0,V.useState)(),re=be(()=>{N(C.current===-1?null:C.current)}),ie=(0,V.useRef)(re),ae=be(()=>{function e(e){m?ne(e.id):Ud(e,{sync:O.current,preventScroll:!0})}let t=a.current[C.current],n=k.current;t&&e(t),(O.current?e=>e():requestAnimationFrame)(()=>{let r=a.current[C.current]||t;if(!r)return;t||e(r);let i=M.current;i&&r&&(n||!T.current)&&r.scrollIntoView?.(typeof i==`boolean`?{block:`nearest`,inline:`nearest`}:i)})});(0,V.useLayoutEffect)(()=>{c&&(n&&i.floating?S.current&&l!=null&&(k.current=!0,C.current=l,re()):E.current&&(C.current=-1,ie.current()))},[c,n,i.floating,l,re]),(0,V.useLayoutEffect)(()=>{if(c&&n&&i.floating){if(o==null){if(O.current=!1,ee.current!=null)return;if(E.current&&(C.current=-1,ae()),(!D.current||!E.current)&&S.current&&(w.current!=null||S.current===!0&&w.current==null)){let e=0,t=()=>{a.current[0]==null?(e<2&&(e?requestAnimationFrame:queueMicrotask)(t),e++):(C.current=w.current==null||bf(w.current,y,p)||f?Kd(a,A.current):qd(a,A.current),w.current=null,re())};t()}}else Jd(a,o)||(C.current=o,ae(),k.current=!1)}},[c,n,i.floating,o,ee,f,a,y,p,re,ae,A]),(0,V.useLayoutEffect)(()=>{ie.current=re,D.current=n,E.current=!!i.floating}),(0,V.useLayoutEffect)(()=>{n||(w.current=null,S.current=h)},[n,h]);let oe=o!=null,se=be(e=>{if(T.current=!1,O.current=!0,e.which===229||!j.current&&e.currentTarget===i.floating)return;if(f&&Sf(e.key,y,p)){Rd(e),r(!1,e.nativeEvent,`list-navigation`),Td(i.domReference)&&i.domReference.focus();return}let t=C.current,o=Kd(a,v),s=qd(a,v);if(x||(e.key===`Home`&&(Rd(e),C.current=o,re()),e.key===`End`&&(Rd(e),C.current=s,re())),yf(e.key,y)){if(Rd(e),n&&!m&&wd(e.currentTarget.ownerDocument)===e.currentTarget){C.current=bf(e.key,y,p)?o:s,re();return}bf(e.key,y,p)?d?C.current=t>=s?u&&t!==a.current.length?-1:o:Gd(a,{startingIndex:t,disabledIndices:v}):C.current=Math.min(s,Gd(a,{startingIndex:t,disabledIndices:v})):d?C.current=t<=o?u&&t!==-1?a.current.length:s:Gd(a,{startingIndex:t,decrement:!0,disabledIndices:v}):C.current=Math.max(o,Gd(a,{startingIndex:t,decrement:!0,disabledIndices:v})),Jd(a,C.current)&&(C.current=-1),re()}}),ce=(0,V.useMemo)(()=>m&&n&&oe&&{"aria-activedescendant":te},[m,n,oe,te]),le=(0,V.useMemo)(()=>({"aria-orientation":y===`both`?void 0:y,...x?{}:ce,onKeyDown:se,onPointerMove(){T.current=!0}}),[ce,se,y,x]),ue=(0,V.useMemo)(()=>{function e(e){h===`auto`&&zd(e.nativeEvent)&&(S.current=!0)}function t(e){S.current=h,h===`auto`&&Bd(e.nativeEvent)&&(S.current=!0)}return{...ce,onKeyDown(e){T.current=!1;let t=e.key.startsWith(`Arrow`),i=xf(e.key,y,p),o=yf(e.key,y),s=(f?i:o)||e.key===`Enter`||e.key.trim()===``;if(m&&n)return se(e);if(n||_||!t){if(s&&(w.current=e.key),f){i&&(Rd(e),n?(C.current=Kd(a,A.current),re()):r(!0,e.nativeEvent,`list-navigation`));return}o&&(l!=null&&(C.current=l),Rd(e),!n&&_?r(!0,e.nativeEvent,`list-navigation`):se(e),n&&re())}},onFocus(){n&&!m&&(C.current=-1,re())},onPointerDown:t,onPointerEnter:t,onMouseDown:e,onClick:e}},[ce,se,A,h,a,f,re,r,n,_,y,p,l,m]),de=(0,V.useMemo)(()=>{function e(e){if(!j.current)return;let t=a.current.indexOf(e);t!==-1&&C.current!==t&&(C.current=t,re())}return{onFocus({currentTarget:t}){O.current=!0,e(t)},onClick:({currentTarget:e})=>e.focus({preventScroll:!0}),onMouseMove({currentTarget:t}){O.current=!0,k.current=!1,g&&e(t)},onPointerLeave({pointerType:e}){T.current&&e!==`touch`&&(O.current=!0,g&&(C.current=-1,re(),m||i.floating?.focus({preventScroll:!0})))}}},[j,g,a,re,m,i.floating]);return(0,V.useMemo)(()=>c?{reference:ue,floating:le,item:de}:{},[c,ue,le,de])}function wf(e,t){let{open:n,dataRef:r}=e,{listRef:i,activeIndex:a,onMatch:o,onTypingChange:s,enabled:c=!0,findMatch:l=null,resetMs:u=750,ignoreKeys:d=[],selectedIndex:f=null}=t,p=(0,V.useRef)(-1),m=(0,V.useRef)(``),h=(0,V.useRef)(f??a??-1),g=(0,V.useRef)(null),_=be(o||(()=>{})),v=be(s||(()=>{})),y=(0,V.useRef)(l);y.current=l;let b=(0,V.useRef)(d);b.current=d,(0,V.useLayoutEffect)(()=>{n&&(Ld(p),g.current=null,m.current=``)},[n]),(0,V.useLayoutEffect)(()=>{n&&m.current===``&&(h.current=f??a??-1)},[n,f,a]);let x=e=>{e?r.current.typing||(r.current.typing=e,v(e)):r.current.typing&&(r.current.typing=e,v(e))},S=e=>{function t(e,t,n){let r=y.current?y.current(t,n):t.find(e=>e?.toLocaleLowerCase().indexOf(n.toLocaleLowerCase())===0);return r?e.indexOf(r):-1}let r=i.current;if(m.current.length>0&&m.current[0]!==` `&&(t(r,r,m.current)===-1?x(!1):e.key===` `&&Rd(e)),r==null||b.current.includes(e.key)||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;n&&e.key!==` `&&(Rd(e),x(!0)),r.every(e=>!e||e[0]?.toLocaleLowerCase()!==e[1]?.toLocaleLowerCase())&&m.current===e.key&&(m.current=``,h.current=g.current),m.current+=e.key,Ld(p),p.current=window.setTimeout(()=>{m.current=``,h.current=g.current,x(!1)},u);let a=h.current,o=t(r,[...r.slice((a||0)+1),...r.slice(0,(a||0)+1)],m.current);o===-1?e.key!==` `&&(m.current=``,x(!1)):(_(o),g.current=o)},C=(0,V.useMemo)(()=>({onKeyDown:S}),[n,c]),w=(0,V.useMemo)(()=>({onKeyDown:S,onKeyUp(e){e.key===` `&&x(!1)}}),[n,c]);return(0,V.useMemo)(()=>c?{reference:C,floating:w}:{},[c,C,w])}function Tf(e,t){let{open:n,elements:r}=e,{enabled:i=!0,overflowRef:a,scrollRef:o,onChange:s}=t,c=be(s),l=V.useRef(!1),u=V.useRef(null),d=V.useRef(null);V.useEffect(()=>{if(!i)return;function e(e){if(e.ctrlKey||!t||a.current==null)return;let n=e.deltaY,r=a.current.top>=-.5,i=a.current.bottom>=-.5,o=t.scrollHeight-t.clientHeight,s=n<0?-1:1,l=n<0?`max`:`min`;t.scrollHeight<=t.clientHeight||(!r&&n>0||!i&&n<0?(e.preventDefault(),ua.flushSync(()=>{c(e=>e+Math[l](n,o*s))})):/firefox/i.test(navigator.userAgent)&&(t.scrollTop+=n))}let t=o?.current||r.floating;if(n&&t)return t.addEventListener(`wheel`,e),requestAnimationFrame(()=>{u.current=t.scrollTop,a.current!=null&&(d.current={...a.current})}),()=>{u.current=null,d.current=null,t.removeEventListener(`wheel`,e)}},[i,n,r.floating,a,o,c]);let f=V.useMemo(()=>({onKeyDown(){l.current=!0},onWheel(){l.current=!1},onPointerMove(){l.current=!1},onScroll(){let e=o?.current||r.floating;if(a.current&&e&&l.current){if(u.current!==null){let t=e.scrollTop-u.current;(a.current.bottom<-.5&&t<-1||a.current.top<-.5&&t>1)&&ua.flushSync(()=>c(e=>e+t))}requestAnimationFrame(()=>{u.current=e.scrollTop})}}}),[r.floating,c,a,o]);return V.useMemo(()=>i?{floating:f}:{},[i,f])}var Ef=V.createContext({currentId:null,setCurrentId:()=>{},delay:0,timeoutMs:0,initialDelay:0});function Df(){return V.useContext(Ef)}function Of({children:e,delay:t,timeoutMs:n=0}){let[r,i]=V.useState(null),a=V.useRef(void 0),o=V.useCallback(e=>{clearTimeout(a.current),e==null&&n>0?a.current=setTimeout(()=>{i(null)},n):i(e)},[n]);V.useEffect(()=>()=>clearTimeout(a.current),[]);let s=V.useMemo(()=>({currentId:r,setCurrentId:o,delay:t,timeoutMs:n,initialDelay:t}),[r,o,t,n]);return V.createElement(Ef.Provider,{value:s},e)}function kf(e,t={}){let{id:n}=t,r=V.useContext(Ef);return V.useEffect(()=>{!e.open&&r.currentId===n&&r.setCurrentId(null)},[e.open,n]),V.useEffect(()=>{r.currentId!=null&&r.currentId!==n&&e.open&&e.onOpenChange(!1)},[r.currentId,n,e.open]),r.currentId==null?{delay:r.initialDelay,currentId:r.currentId}:{delay:{open:1,close:Af(r.initialDelay)},currentId:r.currentId}}function Af(e){return typeof e==`number`?e:e?.close??0}function jf(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}var Mf=e=>({name:`inner`,options:e,async fn(t){let{listRef:n,overflowRef:r,onFallbackChange:i,offset:a=0,index:o=0,minItemsVisible:s=4,referenceOverflowThreshold:c=0,scrollRef:l,padding:u=0}=e,{rects:d,elements:{floating:f}}=t,p=n.current?.[o??0],m=l?.current||f,h=f.clientTop||m.clientTop,g=f.clientTop!==0,_=m.clientTop!==0,v=f===m;if(!p||o==null)return i?.(!0),{};let y={...t,...await cd(-p.offsetTop-f.clientTop-d.reference.height/2-p.offsetHeight/2-a).fn(t)},b={padding:u},x=await Ju(jf(y,m.scrollHeight+h+f.clientTop),b),S=await Ju(y,{...b,elementContext:`reference`}),C=Math.max(0,x.top),w=y.y+C,T=(m.scrollHeight>m.clientHeight?e=>e:Math.round)(Math.max(0,m.scrollHeight+(g&&v||_?h*2:0)-C-Math.max(0,x.bottom)));if(m.style.maxHeight=`${T}px`,m.scrollTop=C,i){let e=m.offsetHeight<p.offsetHeight*Math.min(s,n.current?.length??0)-1||S.top>=-c||S.bottom>=-c;ua.flushSync(()=>i(e))}return r&&(r.current=await Ju(jf({...y,y:w},m.offsetHeight+h+f.clientTop),b)),{y:w}}}),{useStyledContext:Nf,Provider:Pf}=N({},`Popper__`),{useStyledContext:Ff,Provider:If}=N({},`PopperSlow__`),Lf=({scope:e,children:t,...n})=>{let r=V.useRef(n);r.current=n;let[i]=V.useState(()=>({refs:n.refs,triggerElements:n.triggerElements,update(...e){r.current.update(...e)},getReferenceProps(e){return r.current.getReferenceProps?.(e)},onHoverReference(e){r.current.onHoverReference?.(e)},onLeaveReference(){r.current.onLeaveReference?.()}}));return(0,H.jsx)(Pf,{scope:e,...n,children:(0,H.jsx)(If,{scope:e,...i,children:t})})},Rf=void 0,zf={};function Bf(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var Vf=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=Bf(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function Hf(e,t,n){n();let r=requestAnimationFrame(()=>{n(),r=0}),i=[()=>{r&&cancelAnimationFrame(r)}];e instanceof HTMLElement&&i.push(Ne(e,n));let a=[...e instanceof Element?_u(e):[],..._u(t)],o=[...new Set(a)];for(let e of o)e.addEventListener(`scroll`,n,{passive:!0});return window.addEventListener(`resize`,n),i.push(()=>{for(let e of o)e.removeEventListener(`scroll`,n);window.removeEventListener(`resize`,n)}),()=>i.forEach(e=>e())}function Uf(e){let{children:t,size:n,strategy:r=`absolute`,placement:i=`bottom`,stayInFrame:a,allowFlip:o,offset:s,disableRTL:c,resize:l,passThrough:u,open:d,scope:f}=e,[p,m]=V.useState(null),[h,g]=V.useState(0),_=s??h,v=V.useRef({}),y=u?!1:d??!0,b=V.useRef([]);y&&(b.current=[_===void 0?null:cd(_),o?ud(typeof o==`boolean`?{}:o):null,a?ld({padding:10,mainAxis:!0,crossAxis:!1,...typeof a==`object`?a:null}):null,p?fd({element:p}):null,Rf,l?dd({padding:typeof a==`object`?a.padding:10,apply({availableHeight:e,availableWidth:t}){if(u)return;Object.assign(v.current,{maxHeight:`${e}px`,maxWidth:`${t}px`});let n=x.refs.floating.current?.firstChild;n&&n instanceof HTMLElement&&Object.assign(n.style,v.current)},...typeof l==`object`&&l}):null,dd({apply({elements:e,rects:t,availableWidth:n,availableHeight:r}){let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--hanzogui-popper-available-width`,`${n}px`),o.setProperty(`--hanzogui-popper-available-height`,`${r}px`),o.setProperty(`--hanzogui-popper-anchor-width`,`${i}px`),o.setProperty(`--hanzogui-popper-anchor-height`,`${a}px`)}}),Vf({arrowHeight:h,arrowWidth:h})].filter(Boolean));let x=md({open:y,strategy:r,placement:i,sameScrollView:!1,whileElementsMounted:y?Hf:void 0,platform:c??zf.disableRTL?{...Wu,isRTL(e){return!1}}:Wu,middleware:b.current});x=V.useMemo(()=>{let e=x.getFloatingProps;return l&&e&&(x.getFloatingProps=t=>e({...t,style:{...t.style,...v.current}})),x},[x,l?JSON.stringify(l):null]);let{middlewareData:S}=x,C=V.useMemo(()=>({size:n,arrowRef:m,arrowStyle:S.arrow,onArrowSize:g,hasFloating:S.checkFloating?.hasFloating,transformOrigin:S.transformOrigin,open:!!d,...x}),[d,n,x,JSON.stringify(S.arrow||null),JSON.stringify(S.transformOrigin||null)]);return(0,H.jsx)(Lf,{scope:f,...C,children:(0,H.jsx)(pd.Provider,{value:null,children:t})})}var Wf=F.styleable(function(e,t){let{virtualRef:n,scope:r,...i}=e,a=Ff(r),{getReferenceProps:o,refs:s,update:c}=a,l=V.useRef(null),u=V.useId();V.useEffect(()=>{if(!r||!a.triggerElements||!l.current||!(l.current instanceof Element))return;let e=l.current;return a.triggerElements.add(u,e),()=>{a.triggerElements?.delete(u)}},[r,u,a.triggerElements]),V.useEffect(()=>{n&&(s.setReference(n.current),c())},[n]);let d=o?.({...i,ref:l})||null,f=V.useCallback(e=>{Gi(()=>{s.setReference(e)})},[s]),p=r,m=rt(t,l,p?void 0:f);return(0,H.jsx)(et,{...i,...d,ref:m,...p&&{onMouseEnter:e=>{let t=e.currentTarget??l.current;if(t instanceof HTMLElement){if((0,ua.flushSync)(()=>s.setReference(t)),c(),!d)return;d.onPointerEnter?.(e),a.onHoverReference?.(e.nativeEvent)}},onMouseLeave:e=>{a.onLeaveReference?.(),d?.onMouseLeave?.(e)}}})}),Gf=I(F,{name:`PopperContent`,variants:{unstyled:{true:{}},size:{"...size":(e,{tokens:t})=>({padding:t.space[e],borderRadius:t.radius[e]})}}}),Kf=V.forwardRef(function(e,t){let n=`animatePosition`in e||`enableAnimationForPositionChange`in e,{scope:r,animatePosition:i,enableAnimationForPositionChange:a,children:o,passThrough:s,unstyled:c,...l}=e,u=i??a,d=Nf(r),{strategy:f,placement:p,refs:m,x:h,y:g,getFloatingProps:_,size:v,isPositioned:y,transformOrigin:b,update:x}=d,S=V.useRef(x);S.current=x;let C=V.useRef(null),w=V.useCallback(e=>{let t=e!==C.current;e&&(C.current=e,m.setFloating(e),t||S.current?.())},[m.setFloating]);V.useEffect(()=>()=>{let e=C.current;e&&m.floating.current===e&&m.setFloating(null),C.current=null},[]);let T=rt(w,t),[E,D]=V.useState(u);Fe(()=>{E&&h&&g&&D(!1)},[E,u,h,g]);let O=V.useRef(!1),k=V.useRef({x:0,y:0});(h!==0||g!==0)&&(k.current={x:h,y:g},y&&(O.current=!0));let A=O.current&&h===0&&g===0,j=A?k.current.x:h,M=A?k.current.y:g,ee=!O.current&&j===0&&M===0,N=u===`even-when-repositioning`?E:!O.current&&!y||E,[te,ne]=V.useState(N);V.useEffect(()=>{ne(N)},[N]);let re={ref:T,...ee?{}:{x:j||0,y:M||0},top:0,left:0,position:f,opacity:+!ee,...n&&{transition:u?l.transition:void 0,animateOnly:u&&!te?l.animateOnly:[],animatePresence:!1}},{style:ie,...ae}=_?_(re):re,oe=b?{transformOrigin:`${b.x} ${b.y}`}:void 0;return(0,H.jsx)(Xe,{disable:!d.open,children:(0,H.jsx)(et,{passThrough:s,ref:T,direction:l.direction,...s?null:ae,...!s&&u&&{"data-popper-animate-position":`true`},children:(0,H.jsx)(Gf,{passThrough:s,unstyled:c,...!s&&{"data-placement":p,"data-strategy":f,size:v,...ie,...oe,...l},children:o},`popper-content-frame`)})})}),qf=I(F,{name:`PopperArrow`,variants:{unstyled:{false:{borderColor:`$borderColor`,backgroundColor:`$background`,position:`relative`}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),Jf=I(F,{name:`PopperArrowOuter`,variants:{unstyled:{false:{position:`absolute`,zIndex:1e6,pointerEvents:`none`,overflow:`hidden`,alignItems:`center`,justifyContent:`center`}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),Yf={top:`bottom`,right:`left`,bottom:`top`,left:`right`},Xf=V.forwardRef(function(e,t){let n=`animatePosition`in e,{scope:r,animatePosition:i,transition:a,...o}=e,{offset:s,size:c,borderWidth:l=0,...u}=o,d=Nf(r),f=typeof c==`number`?c:ot(g(c??d.size,{shift:-2,bounds:[2]})),p=Math.max(0,+f),{placement:m}=d,h=rt(d.arrowRef,t),_=d.arrowStyle?.x||0,v=d.arrowStyle?.y||0,y=d.arrowStyle!=null,b=m?m.split(`-`)[0]:`top`,x={x:_,y:v,width:p,height:p},S={},C=b===`bottom`||b===`top`;if(b){x[C?`width`:`height`]=p*2;let e=Yf[b];e&&(x[e]=-p,S[e]=p/2),(e===`top`||e===`bottom`)&&(x.left=0),(e===`left`||e===`right`)&&(x.top=0),Fe(()=>{d.onArrowSize?.(p)},[p,d.onArrowSize])}return(0,H.jsx)(Jf,{ref:h,...x,...!y&&{opacity:0},...n&&{transition:i?a:void 0,animateOnly:i?[`transform`]:[],animatePresence:!1},children:(0,H.jsx)(qf,{width:p,height:p,...u,...S,rotate:`45deg`,...b===`bottom`&&{borderLeftWidth:l,borderTopWidth:l},...b===`top`&&{borderBottomWidth:l,borderRightWidth:l},...b===`right`&&{borderLeftWidth:l,borderBottomWidth:l},...b===`left`&&{borderTopWidth:l,borderRightWidth:l}})})}),Zf=`rovingFocusGroup.onEntryFocus`,Qf={bubbles:!1,cancelable:!0},$f=V.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,asChild:u,...d}=e,f=V.useRef(null),p=rt(t,f),m=ta(a),[h=null,g]=qi({prop:o,defaultProp:s??null,onChange:c}),[_,v]=V.useState(!1),y=be(l),b=ip(n||sp),x=V.useRef(!1),[S,C]=V.useState(0),w=u?Oe:et;return(0,H.jsx)(ap,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:V.useCallback(e=>g(e),[g]),onItemShiftTab:V.useCallback(()=>v(!0),[]),onFocusableItemAdd:V.useCallback(()=>C(e=>e+1),[]),onFocusableItemRemove:V.useCallback(()=>C(e=>e-1),[]),children:(0,H.jsx)(w,{tabIndex:_||S===0?-1:0,"data-orientation":r,...d,ref:p,outlineStyle:`none`,onMouseDown:B(e.onMouseDown,()=>{x.current=!0}),onFocus:B(e.onFocus,e=>{let t=!x.current;if(e.target===e.currentTarget&&t&&!_){let e=new CustomEvent(Zf,Qf);if(y(e),!e.defaultPrevented){let e=b().filter(e=>e.focusable);fp([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),{focusVisible:!1})}}x.current=!1}),onBlur:B(e.onBlur,()=>v(!1))})})}),ep=`RovingFocusGroupItem`,tp=V.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,...o}=e,s=V.useId(),c=a||s,l=op(n);l.currentTabStopId;let u=ip(n||sp),{onFocusableItemAdd:d,onFocusableItemRemove:f}=l;return V.useEffect(()=>{if(r)return d(),()=>f()},[r,d,f]),(0,H.jsx)(rp.ItemSlot,{scope:n||sp,id:c,focusable:r,active:i,children:(0,H.jsx)(et,{tabIndex:r?0:-1,"data-orientation":l.orientation,...o,ref:t,onMouseDown:B(e.onMouseDown,e=>{r?l.onItemFocus(c):e.preventDefault()}),onFocus:B(e.onFocus,()=>l.onItemFocus(c)),onKeyDown:B(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){l.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=dp(e,l.orientation,l.dir);if(t!==void 0){e.preventDefault();let n=u().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=l.loop?pp(n,r+1):n.slice(r+1)}setTimeout(()=>fp(n,{focusVisible:!0}))}})})})});tp.displayName=ep;var np=`RovingFocusGroup`,[rp,ip]=Yi(np),{Provider:ap,useStyledContext:op}=N(),sp=`RovingFocusGroupContext`,cp=l(V.forwardRef((e,t)=>(0,H.jsx)(rp.Provider,{scope:e.__scopeRovingFocusGroup||sp,children:(0,H.jsx)(rp.Slot,{scope:e.__scopeRovingFocusGroup||sp,children:(0,H.jsx)($f,{...e,ref:t})})})),{Item:tp});cp.displayName=np;var lp={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function up(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function dp(e,t,n){let r=up(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return lp[r]}function fp(e,t){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({focusVisible:t?.focusVisible}),document.activeElement!==n))return}function pp(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var mp=I(tt,{name:`MenuGroup`,variants:{unstyled:{false:{role:`group`,width:`100%`,borderRadius:0,borderWidth:0,borderColor:`$borderColor`,overflow:`hidden`,backgroundColor:`$background`}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),hp=I(o,{name:`MenuLabel`,variants:{unstyled:{false:{cursor:`default`,color:`$color`}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),gp=I(tt,{name:`MenuSeparator`,role:`separator`,"aria-orientation":`horizontal`,variants:{unstyled:{false:{borderColor:`$borderColor`,flexShrink:0,borderWidth:0,height:1,marginVertical:3,marginHorizontal:10,backgroundColor:`$borderColor`}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),_p={MenuIcon:I(tt,{name:`MenuIcon`,variants:{unstyled:{false:{width:20,height:20,alignItems:`center`,justifyContent:`center`,marginLeft:`auto`}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),MenuImage:I(tc,{name:`MenuImage`}),MenuIndicator:I(tt,{name:`MenuIndicator`,variants:{unstyled:{false:{justifyContent:`center`,alignItems:`center`,marginLeft:`auto`}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),MenuItem:I(tt,{name:`MenuItem`,variants:{unstyled:{false:{flexDirection:`row`,width:`100%`,alignItems:`center`,cursor:`pointer`,borderRadius:6,paddingVertical:4,paddingHorizontal:8,focusStyle:{backgroundColor:`$backgroundHover`},pressStyle:{backgroundColor:`$backgroundPress`}}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),Title:I(o,{name:`MenuTitle`,variants:{unstyled:{false:{cursor:`default`,color:`$color`,flexGrow:1,flexShrink:1}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),SubTitle:I(o,{name:`MenuSubTitle`,variants:{unstyled:{false:{cursor:`default`,color:`$colorFaint`}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),MenuGroup:mp,MenuSeparator:gp,MenuLabel:hp};function vp(e){return t=>t.pointerType===`mouse`?e(t):void 0}var yp=[`Enter`,` `],bp=[`ArrowDown`,`PageUp`,`Home`],xp=[`ArrowUp`,`PageDown`,`End`],Sp=[...bp,...xp],Cp={ltr:[...yp,`ArrowRight`],rtl:[...yp,`ArrowLeft`]},wp={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},Tp=`Menu`,[Ep,Dp]=Yi(Tp),{Provider:Op,useStyledContext:kp}=N(),{Provider:Ap,useStyledContext:jp}=N(),Mp=`MenuContext`;function Np({Item:e=_p.MenuItem,Title:t=_p.Title,SubTitle:n=_p.SubTitle,Image:r=_p.MenuImage,Icon:i=_p.MenuIcon,Indicator:a=_p.MenuIndicator,Separator:o=_p.MenuSeparator,MenuGroup:s=_p.MenuGroup,Label:c=_p.MenuLabel}){let u=e=>{let t=ta(e.dir),n=t===`rtl`?`bottom-end`:`bottom-start`,{scope:r=Mp,open:i=!1,children:a,dir:o,onOpenChange:s,modal:c=!0,allowFlip:l={padding:10},stayInFrame:u={padding:10},placement:d=n,resize:f=!0,offset:p=10,...m}=e,[h,g]=V.useState(null),_=V.useRef(!1),v=Ka(s);return V.useEffect(()=>{let e=()=>{_.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>_.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),(0,H.jsx)(Uf,{scope:r,open:i,placement:d,allowFlip:l,stayInFrame:u,resize:f,offset:p,...m,children:(0,H.jsx)(Op,{scope:r,open:i,onOpenChange:v,content:h,onContentChange:g,children:(0,H.jsx)(Ap,{scope:r,open:i,onClose:V.useCallback(()=>v(!1),[v]),isUsingKeyboardRef:_,dir:t,modal:c,children:(0,H.jsx)(de,{scope:r,children:a})})})})},d=e=>{let{scope:t=Mp,menuContext:n,rootContext:r,popperContext:i,menuSubContext:a,children:o}=e;return(0,H.jsx)(Lf,{...i,scope:t,children:(0,H.jsx)(Op,{scope:t,...n,children:(0,H.jsx)(Ap,{scope:t,...r,children:a?(0,H.jsx)(de,{scope:t,...a,children:o}):o})})})};u.displayName=Tp;let f=e=>(0,H.jsx)(Wf,{scope:Mp,...e});f.displayName=`MenuAnchor`;let{Provider:p,useStyledContext:m}=N(void 0,`Portal`),h=e=>{let{scope:t=Mp,forceMount:n,zIndex:r,children:i}=e,a=kp(t),o=jp(t),s=Nf(t),c=fe(t),l=ji(),u=(0,H.jsx)(Ke,{forceClassName:!0,name:l,children:i}),f=fa()?(0,H.jsx)(d,{menuContext:a,rootContext:o,popperContext:s,menuSubContext:c,scope:t,children:u}):u,m=n||o.open&&a.open;return(0,H.jsx)(Ha,{type:`presence`,present:m,children:(0,H.jsx)(da,{stackZIndex:!0,children:(0,H.jsx)(H.Fragment,{children:(0,H.jsx)(p,{scope:t,forceMount:n,children:(0,H.jsxs)(tt,{zIndex:r||100,inset:0,position:`absolute`,children:[!!a.open&&!1,f]})})})})})};h.displayName=`MenuPortal`;let g=`MenuContent`,{Provider:_,useStyledContext:v}=N(),y=I(Gf,{name:g}).styleable((e,t)=>{let n=e.scope||Mp,r=m(n),{forceMount:i=r.forceMount,...a}=e,o=jp(n);return(0,H.jsx)(Ep.Provider,{scope:n,children:(0,H.jsx)(Ep.Slot,{scope:n,children:o.modal?(0,H.jsx)(b,{...a,ref:t}):(0,H.jsx)(x,{...a,ref:t})})})}),b=V.forwardRef((e,t)=>{let n=e.scope||Mp,r=kp(n),i=V.useRef(null),a=rt(t,i);return(0,H.jsx)(S,{...e,scope:n,ref:a,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!1,onFocusOutside:B(e.onFocusOutside,e=>e.preventDefault(),{checkDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),x=V.forwardRef((e,t)=>{let n=e.scope||Mp,r=kp(n);return(0,H.jsx)(S,{...e,scope:n,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),S=V.forwardRef((e,t)=>{let{scope:n=Mp,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,disableDismissOnScroll:h=!1,unstyled:g={}.GUI_HEADLESS===`1`,...v}=e,y=kp(n),b=jp(n),x=Nf(n),S=Dp(n),[C,w]=V.useState(null),T=V.useRef(null),E=V.useRef(null),D=rt(t,T,y.onContentChange),O=V.useRef(0),k=V.useRef(``),A=V.useRef(0),j=V.useRef(null),M=V.useRef(`right`),ee=V.useRef(0),N=e=>{let t=k.current+e,n=S().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=zp(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;(function e(t){k.current=t,clearTimeout(O.current),t!==``&&(O.current=setTimeout(()=>e(``),1e3))})(t),o&&setTimeout(()=>o.focus())};V.useEffect(()=>()=>clearTimeout(O.current),[]),V.useEffect(()=>{if(!y.open)return;let e=requestAnimationFrame(()=>{let e=T.current?.querySelector(`[data-hanzogui-menu-content]`);e&&(E.current=e)});return()=>cancelAnimationFrame(e)},[y.open]),V.useEffect(()=>{if(h||!y.open)return;let e=e=>{let t=e.target;if(!t||T.current?.contains(t))return;let n=x.refs?.reference?.current,r=n instanceof Element?n:n?.contextElement??null;(!r||t.contains(r))&&p?.()};return window.addEventListener(`scroll`,e,{capture:!0,passive:!0}),()=>{window.removeEventListener(`scroll`,e,{capture:!0})}},[h,y.open,p,x.refs]),cl();let te=V.useCallback(e=>{let t=M.current===j.current?.side,n=Vp(e,j.current?.area);return t&&n},[]),ne=(0,H.jsx)(Kf,{role:`menu`,tabIndex:-1,unstyled:g,...!g&&{backgroundColor:`$background`,borderWidth:1,borderColor:`$borderColor`,outlineWidth:0,minWidth:180},"aria-orientation":`vertical`,"data-state":Pp(y.open),"data-hanzogui-menu-content":``,dir:b.dir,scope:n||Mp,...v,ref:D,className:v.transition?void 0:v.className,onKeyDown:B(v.onKeyDown,e=>{let t=e.target.closest(`[data-hanzogui-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&N(e.key));let i=e.target.hasAttribute(`data-hanzogui-menu-content`);if(!t||!i||!Sp.includes(e.key))return;e.preventDefault();let a=S().filter(e=>!e.disabled).map(e=>e.ref.current);xp.includes(e.key)&&a.reverse(),Lp(a,{focusVisible:!0})}),onBlur:B(e.onBlur,e=>{e.currentTarget?.contains(e.target)||(clearTimeout(O.current),k.current=``)}),onPointerMove:B(e.onPointerMove,e=>{if(e.pointerType!==`mouse`)return;let t=e.target,n=ee.current!==e.clientX;if(e.currentTarget?.contains(t)&&n){let t=e.clientX>ee.current?`right`:`left`;M.current=t,ee.current=e.clientX}})});return(0,H.jsx)(_,{scope:n,searchRef:k,onItemEnter:V.useCallback(e=>{te(e)&&e.preventDefault()},[te]),onItemLeave:V.useCallback(e=>{te(e)||(E.current?.focus(),w(null))},[te]),onTriggerLeave:V.useCallback(e=>{te(e)&&e.preventDefault()},[te]),pointerGraceTimerRef:A,onPointerGraceIntentChange:V.useCallback(e=>{j.current=e},[]),children:(0,H.jsx)(Zo,{enabled:m,children:(0,H.jsx)(jo,{asChild:!1,trapped:i,onMountAutoFocus:B(a,e=>{e.preventDefault(),document.querySelector(`[data-hanzogui-menu-content]`)?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,H.jsx)(ao,{disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,asChild:!0,children:(0,H.jsx)(cp,{asChild:!0,__scopeRovingFocusGroup:n||Mp,dir:b.dir,orientation:`vertical`,loop:r,currentTabStopId:C,onCurrentTabStopIdChange:w,onEntryFocus:B(c,e=>{b.isUsingKeyboardRef.current||e.preventDefault()}),children:ne})})})})})});y.displayName=g;let C=`MenuItem`,w=`menu.itemSelect`,T=e.styleable((e,t)=>{let{disabled:n=!1,onSelect:r,preventCloseOnSelect:i,children:a,scope:o=Mp,destructive:s,hidden:c,androidIconName:l,iosIconName:u,...d}=e,f=V.useRef(null),p=jp(o),m=v(o),h=rt(t,f),g=V.useRef(!1),_=()=>{let e=f.current;if(!n&&e){let t=e,n=new CustomEvent(w,{bubbles:!0,cancelable:!0});t.addEventListener(w,e=>r?.(e),{once:!0}),Ja(t,n),n.defaultPrevented||i?g.current=!1:p.onClose()}},y=typeof a==`string`?(0,H.jsx)(Qe,{children:a}):a;return(0,H.jsx)(E,{outlineStyle:`none`,...d,scope:o,ref:h,disabled:n,onPress:B(e.onPress,_),onPointerDown:t=>{e.onPointerDown?.(t),g.current=!0},onPointerUp:B(e.onPointerUp,e=>{g.current||e.currentTarget?.click()}),onKeyDown:B(e.onKeyDown,e=>{let t=m.searchRef.current!==``;n||t&&e.key===` `||yp.includes(e.key)&&(e.currentTarget?.click(),e.preventDefault())}),children:y})}),E=V.forwardRef((t,n)=>{let{scope:r=Mp,disabled:i=!1,textValue:a,unstyled:o={}.GUI_HEADLESS===`1`,...s}=t,c=v(r),l=V.useRef(null),u=rt(n,l),[d,f]=V.useState(!1),[p,m]=V.useState(``);return V.useEffect(()=>{let e=l.current;e&&m((e.textContent??``).trim())},[s.children]),(0,H.jsx)(Ep.ItemSlot,{scope:r,disabled:i,textValue:a??p,children:(0,H.jsx)(cp.Item,{asChild:!0,__scopeRovingFocusGroup:r,focusable:!i,children:(0,H.jsx)(e,{unstyled:o,componentName:C,role:`menuitem`,"data-highlighted":d?``:void 0,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,...s,ref:u,onPointerMove:B(t.onPointerMove,e=>{e.pointerType===`mouse`&&(i?c.onItemLeave(e):(c.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0,focusVisible:!1})))}),onPointerLeave:B(t.onPointerLeave,e=>{c.onItemLeave(e)}),onFocus:B(t.onFocus,()=>f(!0)),onBlur:B(t.onBlur,()=>f(!1))})})})});T.displayName=C;let D=t.styleable((e,n)=>(0,H.jsx)(t,{...e,ref:n}));D.displayName=`MenuItemTitle`;let O=n.styleable((e,t)=>(0,H.jsx)(n,{...e,ref:t}));O.displayName=`MenuItemSubTitle`;let k=V.forwardRef((e,t)=>{let{ios:n,androidIconName:i,iosIconName:a,...o}=e;return(0,H.jsx)(r,{...o,ref:t})});k.displayName=`MenuItemImage`;let A=i.styleable((e,t)=>{let{ios:n,android:r,androidIconName:a,iosIconName:o,...s}=e;return(0,H.jsx)(i,{...s,ref:t})});A.displayName=`MenuItemIcon`;let j=`MenuCheckboxItem`,M=e.styleable((e,t)=>{let{checked:n=!1,onCheckedChange:r,scope:i=Mp,value:a,onValueChange:o,...s}=e;return(0,H.jsx)(se,{scope:i,checked:n,children:(0,H.jsx)(T,{componentName:j,role:`menuitemcheckbox`,"aria-checked":Fp(n)?`mixed`:n,...s,scope:i,ref:t,"data-state":Ip(n),onSelect:B(s.onSelect,()=>r?.(Fp(n)?!0:!n),{checkDefaultPrevented:!1})})})});M.displayName=j;let ee=`MenuRadioGroup`,{Provider:te,useStyledContext:ne}=N(),re=s.styleable((e,t)=>{let{value:n,onValueChange:r,scope:i=Mp,...a}=e,o=Ka(r);return(0,H.jsx)(te,{scope:i,value:n,onValueChange:o,children:(0,H.jsx)(s,{componentName:ee,...a,ref:t})})});re.displayName=ee;let ie=`MenuRadioItem`,ae=e.styleable((e,t)=>{let{value:n,scope:r=Mp,...i}=e,a=ne(r),o=n===a.value;return(0,H.jsx)(se,{scope:r,checked:o,children:(0,H.jsx)(T,{componentName:ie,...i,scope:r,"aria-checked":o,ref:t,role:`menuitemradio`,"data-state":Ip(o),onSelect:B(i.onSelect,()=>a.onValueChange?.(n),{checkDefaultPrevented:!1})})})});ae.displayName=ie;let oe=`MenuItemIndicator`,{Provider:se,useStyledContext:ce}=N(),le=a.styleable((e,t)=>{let{scope:n=Mp,forceMount:r,...i}=e,o=ce(n);return(0,H.jsx)(Wi,{children:r||Fp(o.checked)||o.checked===!0?(0,H.jsx)(a,{componentName:oe,render:`span`,...i,ref:t,"data-state":Ip(o.checked)}):null})});le.displayName=oe;let ue=V.forwardRef(function(e,t){let{scope:n=Mp,unstyled:r={}.GUI_HEADLESS===`1`,...i}=e;return(0,H.jsx)(Xf,{scope:n,componentName:`PopperArrow`,unstyled:r,...!r&&{backgroundColor:`$background`},...i,ref:t})}),{Provider:de,useStyledContext:fe}=N(),pe=e=>{let t=Oi(),{scope:n=Mp}=e,r=jp(n),i=Nf(n).placement?.split(`-`)[0],a=i===`left`||i===`right`,o=t?`bottom`:a?`${i}-start`:r.dir===`rtl`?`left-start`:`right-start`,{children:s,open:c=!1,onOpenChange:l,allowFlip:u={padding:10},stayInFrame:d={padding:10},placement:f=o,...p}=e,m=V.useMemo(()=>{if(!a||typeof u==`boolean`||u.fallbackPlacements)return u;let e=f.split(`-`)[0],t=f.split(`-`)[1]||`start`,n=t===`start`?`end`:`start`;if(e===`left`||e===`right`){let r=e===`right`?`left`:`right`;return{...typeof u==`object`?u:{},fallbackPlacements:[`${e}-${n}`,`${r}-${t}`,`${r}-${n}`]}}return u},[a,u,f]),h=kp(n),[g,_]=V.useState(null),[v,y]=V.useState(null),b=Ka(l);return V.useEffect(()=>(h.open===!1&&b(!1),()=>b(!1)),[h.open,b]),(0,H.jsx)(Uf,{open:c,placement:f,allowFlip:m,stayInFrame:d,...p,scope:n,children:(0,H.jsx)(Op,{scope:n,open:c,onOpenChange:b,content:v,onContentChange:y,children:(0,H.jsx)(de,{scope:n,contentId:(0,V.useId)(),triggerId:(0,V.useId)(),trigger:g,onTriggerChange:_,children:s})})})};pe.displayName=`MenuSub`;let me=`MenuSubTrigger`,P=V.forwardRef((e,t)=>{let n=e.scope||Mp,r=kp(n),i=jp(n),a=fe(n),o=v(n),s=Nf(n),c=V.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:u}=o,d=i.dir,p=V.useCallback(()=>{c.current&&window.clearTimeout(c.current),c.current=null},[]);return V.useEffect(()=>p,[p]),V.useEffect(()=>{let e=l.current;return()=>{window.clearTimeout(e),u(null)}},[l,u]),(0,H.jsx)(f,{componentName:me,asChild:`except-style`,scope:n,children:(0,H.jsx)(E,{id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":r.open,"aria-controls":a.contentId,"data-state":Pp(r.open),outlineStyle:`none`,...e,ref:ye(t,a.onTriggerChange),onPress:t=>{e.onPress?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:B(e.onPointerMove,vp(t=>{o.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!r.open&&!c.current&&(o.onPointerGraceIntentChange(null),c.current=window.setTimeout(()=>{r.onOpenChange(!0),p()},100))})),onPointerLeave:B(e.onPointerLeave,e=>{let t=e;p();let n=r.content?.getBoundingClientRect();if(n){let e=r.content,i=(e?.dataset?.side?e:e?.querySelector(`[data-side]`))?.dataset?.side||`right`,a=i===`right`,s=a?-5:5,c=n[a?`left`:`right`],u=n[a?`right`:`left`],d={area:[{x:t.clientX+s,y:t.clientY},{x:c,y:n.top},{x:u,y:n.top},{x:u,y:n.bottom},{x:c,y:n.bottom}],side:i};o.onPointerGraceIntentChange(d),window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else if(a.trigger){let e=a.trigger?.getBoundingClientRect();if(e){let n=s.placement?.split(`-`)[0],r=n===`left`||n===`right`?n:i.dir===`rtl`?`left`:`right`,a=r===`right`,c=a?-5:5,u=a?e.right+4:e.left-4,d=a?u+200:u-200,f={area:[{x:t.clientX+c,y:t.clientY},{x:u,y:e.top-50},{x:d,y:e.top-50},{x:d,y:e.bottom+50},{x:u,y:e.bottom+50}],side:r};o.onPointerGraceIntentChange(f),window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}}else{if(o.onTriggerLeave(t),t.defaultPrevented)return;o.onPointerGraceIntentChange(null)}}),onKeyDown:B(e.onKeyDown,t=>{let n=o.searchRef.current!==``;if(!(e.disabled||n&&t.key===` `)&&Cp[d].includes(t.key)){if(r.open&&r.content){let e=r.content.querySelector?.(`[role="menuitem"]:not([data-disabled])`);if(e){e.focus({focusVisible:!0}),t.preventDefault();return}}let e=t.currentTarget;s.refs?.setReference(e),r.onOpenChange(!0),requestAnimationFrame(()=>{s.update?.()}),r.content?.focus({focusVisible:!0}),t.preventDefault()}})})})});P.displayName=me;let he=`MenuSubContent`,ge=I(Gf,{name:he}).styleable((e,t)=>{let n=e.scope||Mp,r=m(n),{forceMount:i=r.forceMount,...a}=e,o=kp(n),s=jp(n),c=fe(n),l=Nf(n),u=V.useRef(null),d=rt(t,u),f=l.placement?.split(`-`)[0],p=f===`left`||f===`right`?f:s.dir===`rtl`?`left`:`right`,h=s.dir;return(0,H.jsx)(Ep.Provider,{scope:n,children:(0,H.jsx)(Ep.Slot,{scope:n,children:(0,H.jsx)(S,{id:c.contentId,"aria-labelledby":c.triggerId,...a,ref:d,"data-side":p,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{if(s.isUsingKeyboardRef.current){let e=u.current;(e?.querySelector?.(`[data-hanzogui-menu-content]`)||e)?.focus({preventScroll:!0})}e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:B(e.onFocusOutside,e=>{e.target!==c.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:B(e.onEscapeKeyDown,e=>{o.onOpenChange(!1),c.trigger?.focus({focusVisible:!0}),e.preventDefault()}),onKeyDown:B(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=wp[h].includes(e.key);t&&n&&(o.onOpenChange(!1),c.trigger?.focus({focusVisible:!0}),e.preventDefault())})})})})});ge.displayName=he;let F=f,_e=h,ve=y,be=s.styleable((e,t)=>(0,H.jsx)(s,{...e,ref:t}));be.displayName=`MenuGroup`;let xe=c.styleable((e,t)=>(0,H.jsx)(c,{...e,ref:t}));xe.displayName=`MenuLabel`;let Se=T,Ce=M,we=re,Te=ae,Ee=le,De=o.styleable((e,t)=>(0,H.jsx)(o,{...e,ref:t}));return De.displayName=`MenuSeparator`,{Menu:l(u,{Anchor:F,Portal:_e,Content:ve,Group:be,Label:xe,Item:Se,CheckboxItem:Ce,RadioGroup:we,RadioItem:Te,ItemIndicator:Ee,Separator:De,Arrow:ue,Sub:pe,SubTrigger:P,SubContent:ge,ItemTitle:D,ItemSubtitle:O,ItemImage:k,ItemIcon:A})}}function Pp(e){return e?`open`:`closed`}function Fp(e){return e===`indeterminate`}function Ip(e){return Fp(e)?`indeterminate`:e?`checked`:`unchecked`}function Lp(e,t){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:!0,focusVisible:t?.focusVisible}),document.activeElement!==n))return}function Rp(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function zp(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=Rp(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function Bp(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e].x,s=t[e].y,c=t[a].x,l=t[a].y;s>r!=l>r&&n<(c-o)*(r-s)/(l-s)+o&&(i=!i)}return i}function Vp(e,t){return t?Bp({x:e.clientX,y:e.clientY},t):!1}var Hp=(()=>null);function Up(){return{Menu:l(Hp,{Trigger:Hp,Content:Hp,Item:Hp,ItemTitle:Hp,ItemSubtitle:Hp,SubTrigger:Hp,Group:Hp,ItemIcon:Hp,Separator:Hp,CheckboxItem:Hp,ItemIndicator:Hp,ItemImage:Hp,Label:Hp,Arrow:Hp,Sub:Hp,SubContent:Hp,Preview:Hp,Portal:Hp,RadioGroup:Hp,RadioItem:Hp,Auxiliary:Hp})}}var Wp=e=>Up();function Gp({Component:e,NativeComponent:t}){return e}var Kp=I(Js,{name:`ScrollView`,scrollEnabled:!0,variants:{fullscreen:{true:te}}},{accept:{contentContainerStyle:`style`}}),qp=`MenuContext`;function Jp(e){let t=V.useRef(new Map),n=V.useRef(null),r=be(r=>{let i=n.current;i!==r&&(i&&t.current.get(i)?.(!1),n.current=r,r&&e&&t.current.get(r)?.(!0))}),i=be((r,i)=>{t.current.set(r,i),i(n.current===r&&e)}),a=be(e=>{t.current.delete(e),n.current===e&&(n.current=null)});return V.useEffect(()=>{if(!e){r(null);return}let i=n.current;i&&t.current.get(i)?.(!0)},[e,r]),{setActiveTrigger:r,registerTrigger:i,unregisterTrigger:a}}function Yp(e){let{Menu:t}=Np(e),{Provider:n,useStyledContext:r}=N(),i=e=>{let{scope:r,children:i,dir:a,open:o,defaultOpen:s,onOpenChange:c,modal:l=!0,...u}=e,d=V.useRef(null),[f=!1,p]=qi({prop:o,defaultProp:s,onChange:c}),m=V.useRef(f);m.current=f;let{setActiveTrigger:h,registerTrigger:g,unregisterTrigger:_}=Jp(f);return(0,H.jsx)(n,{scope:r,triggerId:(0,V.useId)(),triggerRef:d,contentId:(0,V.useId)(),openRef:m,onOpenChange:V.useCallback(e=>p(e),[p]),onOpenToggle:V.useCallback(()=>p(e=>!e),[p]),modal:l,setActiveTrigger:h,registerTrigger:g,unregisterTrigger:_,children:(0,H.jsx)(t,{scope:r||`MenuContext`,open:f,onOpenChange:p,dir:a,modal:l,...u,children:i})})};i.displayName=`Menu`;let a=`MenuTrigger`,o=t.Anchor,s=tt.styleable((e,t)=>{let{scope:n,asChild:i,children:s,disabled:c=!1,onKeydown:l,...u}=e,d=r(n),f=Ff(n||`MenuContext`),p=i?Oe:tt,m=Oi(),h=V.useRef(null),g=V.useId(),[_,v]=V.useState(!1),{registerTrigger:y,unregisterTrigger:b}=d;V.useEffect(()=>(y(g,v),()=>b(g)),[y,b,g]);let x=V.useCallback(()=>{d.setActiveTrigger(g);let e=h.current;e&&(d.triggerRef.current=e,e instanceof HTMLElement&&(f.refs?.setReference(e),requestAnimationFrame(()=>f.update?.())))},[d,g,f]),S=m?`onClick`:`onPointerDown`;return(0,H.jsx)(o,{asChild:!0,componentName:a,scope:n||`MenuContext`,children:(0,H.jsx)(p,{role:`button`,id:d.triggerId,"aria-haspopup":`menu`,"aria-expanded":_,"aria-controls":_?d.contentId:void 0,"data-state":_?`open`:`closed`,"data-disabled":c?``:void 0,"aria-disabled":c||void 0,ref:ye(t,d.triggerRef,h),[S]:B(e[S],e=>{if(!c){if(e instanceof PointerEvent&&e.button!==0&&e.ctrlKey===!0)return;d.openRef.current?d.setActiveTrigger(null):x(),d.onOpenToggle(),d.openRef.current||e.preventDefault()}}),onKeyDown:B(l,e=>{c||([`Enter`,` `].includes(e.key)&&(d.openRef.current?d.setActiveTrigger(null):x(),d.onOpenToggle()),e.key===`ArrowDown`&&(x(),d.onOpenChange(!0)),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())}),...u,children:s})})});s.displayName=a;let c=e=>{let{scope:i,children:a,...o}=e,s=M?r(i):null,c=M?(0,H.jsx)(n,{...s,children:a}):a;return(0,H.jsx)(t.Portal,{scope:i||`MenuContext`,...o,children:c})};c.displayName=`MenuPortal`;let u=V.forwardRef((e,n)=>{let{scope:i,...a}=e,o=r(i),s=V.useRef(!1);return(0,H.jsx)(t.Content,{id:o.contentId,"aria-labelledby":o.triggerId,scope:i||`MenuContext`,...a,ref:n,onCloseAutoFocus:B(e.onCloseAutoFocus,e=>{s.current||requestAnimationFrame(()=>{let e=document.activeElement;(!e||e===document.body)&&o.triggerRef.current?.focus()}),s.current=!1,e.preventDefault()}),onInteractOutside:B(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!o.modal||r)&&(s.current=!0)}),style:{...e.style,"--hanzogui-menu-content-transform-origin":`var(--hanzogui-popper-transform-origin)`,"--hanzogui-menu-content-available-width":`var(--hanzogui-popper-available-width)`,"--hanzogui-menu-content-available-height":`var(--hanzogui-popper-available-height)`,"--hanzogui-menu-trigger-width":`var(--hanzogui-popper-anchor-width)`,"--hanzogui-menu-trigger-height":`var(--hanzogui-popper-anchor-height)`}})});u.displayName=`MenuContent`;let d=e=>{let{scope:n,children:r,open:i,onOpenChange:a,defaultOpen:o,...s}=e,[c=!1,l]=qi({prop:i,defaultProp:o,onChange:a});return(0,H.jsx)(t.Sub,{scope:n||`MenuContext`,open:c,onOpenChange:l,...s,children:r})};d.displayName=`MenuSub`;let f=V.forwardRef((e,n)=>{let{scope:r,...i}=e;return(0,H.jsx)(t.SubContent,{scope:r||`MenuContext`,...i,ref:n,style:{...e.style,"--hanzogui-menu-content-transform-origin":`var(--hanzogui-popper-transform-origin)`,"--hanzogui-menu-content-available-width":`var(--hanzogui-popper-available-width)`,"--hanzogui-menu-content-available-height":`var(--hanzogui-popper-available-height)`,"--hanzogui-menu-trigger-width":`var(--hanzogui-popper-anchor-width)`,"--hanzogui-menu-trigger-height":`var(--hanzogui-popper-anchor-height)`}})});f.displayName=`MenuSubContent`;let p=I(Kp,{flexShrink:1,alignSelf:`stretch`,showsHorizontalScrollIndicator:!1,showsVerticalScrollIndicator:!1,"$platform-web":{maxHeight:`var(--hanzogui-menu-content-available-height)`}}),m=t.Group,h=t.Label,g=t.Item,_=t.CheckboxItem,v=t.RadioGroup,y=t.RadioItem,b=t.ItemIndicator,x=t.Separator,S=t.Arrow,C=t.SubTrigger,w=t.ItemTitle,T=t.ItemSubtitle,E=t.ItemImage,D=t.ItemIcon;return l(i,{Root:i,Trigger:s,Portal:c,Content:u,Group:m,Label:h,Item:g,CheckboxItem:_,RadioGroup:v,RadioItem:y,ItemIndicator:b,Separator:x,Arrow:S,Sub:d,SubTrigger:C,SubContent:f,ItemTitle:w,ItemSubtitle:T,ItemImage:E,ItemIcon:D,ScrollView:p})}function Xp(e){let{Menu:t}=Wp(`Menu`),n=Yp(e),r={isRoot:!1,scope:qp},i=Gp({...r,Component:n.Root,NativeComponent:t,isRoot:!0}),a=Gp({...r,Component:n.Trigger,NativeComponent:t.Trigger}),o=Gp({...r,Component:n.Portal,NativeComponent:V.Fragment}),s=Gp({...r,Component:n.Content,NativeComponent:t.Content}),c=Gp({...r,Component:n.Group,NativeComponent:t.Group}),u=Gp({...r,Component:n.Label,NativeComponent:t.Label}),d=Gp({...r,Component:n.Item,NativeComponent:t.Item}),f=Gp({...r,Component:n.ItemTitle,NativeComponent:t.ItemTitle}),p=Gp({...r,Component:n.ItemSubtitle,NativeComponent:t.ItemSubtitle}),m=Gp({...r,Component:n.ItemIcon,NativeComponent:t.ItemIcon}),h=Gp({...r,Component:n.ItemImage,NativeComponent:t.ItemImage}),g=Gp({...r,Component:n.CheckboxItem,NativeComponent:t.CheckboxItem}),_=Gp({...r,Component:n.RadioGroup,NativeComponent:({children:e})=>(0,H.jsx)(H.Fragment,{children:e})}),v=Gp({...r,Component:n.RadioItem,NativeComponent:({children:e})=>(0,H.jsx)(H.Fragment,{children:e})}),y=Gp({...r,Component:n.ItemIndicator,NativeComponent:t.ItemIndicator}),b=Gp({...r,Component:n.Separator,NativeComponent:t.Separator}),x=Gp({...r,Component:n.Arrow,NativeComponent:t.Arrow}),S=Gp({...r,Component:n.Sub,NativeComponent:t.Sub}),C=Gp({...r,Component:n.SubTrigger,NativeComponent:t.SubTrigger}),w=Gp({...r,Component:n.SubContent,NativeComponent:t.SubContent}),T=n.ScrollView;return l(i,{Trigger:a,Portal:o,Content:s,Group:c,Label:u,Item:d,CheckboxItem:g,RadioGroup:_,RadioItem:v,ItemIndicator:y,Separator:b,Arrow:x,Sub:S,SubTrigger:C,SubContent:w,ItemTitle:f,ItemSubtitle:p,ItemIcon:m,ItemImage:h,ScrollView:T})}var Zp=Xp({Icon:_p.MenuIcon,Image:_p.MenuImage,Indicator:_p.MenuIndicator,Item:_p.MenuItem,Label:_p.MenuLabel,MenuGroup:_p.MenuGroup,Separator:_p.MenuSeparator,SubTitle:_p.SubTitle,Title:_p.Title}),Qp=({open:e,setOpen:t,disable:n,disableFocus:r,hoverable:i,role:a=`dialog`,focus:o,groupId:s,delay:c,restMs:l})=>{"use no memo";let u=V.useRef(e);u.current=e;let d=V.useRef(i);d.current=i;let f=V.useRef(n);f.current=n;let p=V.useRef(r);p.current=r;let m=V.useRef(a);m.current=a;let h=V.useRef(o);h.current=o;let g=V.useRef(s);g.current=s;let _=V.useRef(c);_.current=c;let v=V.useRef(l);v.current=l;let y=V.useMemo(()=>hd(),[]),b=V.useMemo(()=>new gd,[]);return V.useEffect(()=>{y.emit(`openchange`,{open:e})},[e,y]),V.useCallback(e=>{let n=V.useRef(!1),r=V.useRef(void 0),i=V.useRef(void 0),a=V.useRef(!1),o=V.useRef(!1),s=V.useRef(!1);V.useEffect(()=>()=>{clearTimeout(r.current),clearTimeout(i.current)},[]);let c=(e,r)=>{if(!(e&&r?.type===`mouseenter`)){if(!e&&n.current&&(r?.type===`mousemove`||r?.type===`mouseleave`)){a.current=!0;return}t(e,r?.type===`mousemove`||r?.type===`mouseenter`||r?.type===`mouseleave`?`hover`:`press`)}},l=od({...e,open:u.current}),x=d.current,S=V.useRef({});S.current.placement=l.placement;let C=l.refs,w={current:null},T={open:u.current,onOpenChange:c,refs:{reference:C?.reference||w,floating:C?.floating||w,domReference:C?.reference||w},elements:{get reference(){return C?.reference?.current||null},get floating(){return C?.floating?.current||null},get domReference(){return C?.reference?.current||null}},dataRef:S,events:y,triggerElements:b,handleCloseActiveRef:s},{delay:E,currentId:D}=kf(T,{id:g.current}),O=g.current&&D!=null&&typeof E==`object`,k,A;O?(k=E,A=0):_.current===void 0?(k=x&&typeof x==`object`?x.delay??0:0,A=x&&typeof x==`object`?x.restMs??0:0):(k=_.current,A=v.current??0);let j=m.current,M=h.current,{getReferenceProps:ee,getFloatingProps:N}=_d([x?Zd(T,{enabled:!f.current&&!!x,delay:k,restMs:A,handleClose:rf({requireIntent:!0,buffer:1,__debug:typeof window<`u`&&new URLSearchParams(window.location.search).get(`debug`)===`safePolygon`}),...typeof x==`object`&&x}):Zd(T,{enabled:!1}),of(T,{enabled:!f.current&&!p.current,visibleOnly:!0,...M}),lf(T,{role:j})]),te=x?e=>{let t=N(e),n=t.onMouseEnter,r=t.onMouseLeave;return{...t,onMouseEnter:e=>{o.current=!0,n?.(e)},onMouseLeave:e=>{o.current=!1,r?.(e)}}}:N,ne=typeof k==`number`?k:k?.open??0,re=typeof k==`number`?k:k?.close??0,ie=()=>{clearTimeout(r.current),A&&!ne?r.current=setTimeout(()=>{t(!0,`hover`)},A):ne?r.current=setTimeout(()=>{t(!0,`hover`)},ne):t(!0,`hover`)};return{...l,open:u.current,triggerElements:b,getReferenceProps:ee,getFloatingProps:te,onHoverReference:x?e=>{clearTimeout(i.current),n.current=!0,a.current=!1,clearTimeout(r.current),!u.current&&ie()}:void 0,onLeaveReference:x?()=>{clearTimeout(r.current),clearTimeout(i.current),i.current=setTimeout(()=>{if(n.current=!1,a.current){a.current=!1,t(!1,`hover`);return}u.current&&(i.current=setTimeout(()=>{u.current&&!o.current&&!s.current&&t(!1,`hover`)},Math.max(250,re)))},40)}:void 0}},[t])},$p=fa(),em=new Set,tm=N({},`Popover__`),nm=V.createContext(void 0),rm=V.createContext(!0),im=N({},`PopoverTrigger__`),am=tm.useStyledContext,om=im.useStyledContext;function sm(e){return am(e).open}function cm(e){let t=V.useRef(new Map),n=V.useRef(null),r=be(r=>{let i=n.current;i!==r&&(i&&t.current.get(i)?.(!1),n.current=r,r&&e&&t.current.get(r)?.(!0))}),i=be((r,i)=>{t.current.set(r,i),i(n.current===r&&e)}),a=be(e=>{t.current.delete(e),n.current===e&&(n.current=null)});return V.useEffect(()=>{if(!e){r(null);return}let i=n.current;i&&t.current.get(i)?.(!0)},[e,r]),{setActiveTrigger:r,registerTrigger:i,unregisterTrigger:a}}var lm=V.memo(({scope:e,children:t,open:n,onOpenChange:r,onOpenToggle:i,triggerRef:a,id:o=``,contentId:s,hasCustomAnchor:c=!1,onCustomAnchorAdd:l=um,onCustomAnchorRemove:u=um,anchorTo:d,adaptScope:f,breakpointActive:p,keepChildrenMounted:m,disableDismissable:h,hoverable:g})=>{let[_]=V.useState(()=>new Set),{setActiveTrigger:v,registerTrigger:y,unregisterTrigger:b}=cm(n);return(0,H.jsx)(tm.Provider,{scope:e,popoverScope:e,adaptScope:f,id:o,contentId:s,triggerRef:a,open:n,onOpenChange:r,onOpenToggle:i,hasCustomAnchor:c,onCustomAnchorAdd:l,onCustomAnchorRemove:u,anchorTo:d,branches:_,breakpointActive:p,keepChildrenMounted:m,disableDismissable:h,hoverable:g,children:(0,H.jsx)(im.Provider,{scope:e,triggerRef:a,hasCustomAnchor:c,anchorTo:d,branches:_,onOpenToggle:i,setActiveTrigger:v,registerTrigger:y,unregisterTrigger:b,children:t})})}),um=()=>{},dm=V.memo(V.forwardRef(function(e,t){let{scope:n,...r}=e,{onCustomAnchorAdd:i,onCustomAnchorRemove:a}=am(n)||{};return V.useEffect(()=>(i(),()=>a()),[i,a]),(0,H.jsx)(Wf,{scope:n,...r,ref:t})})),fm=V.memo(V.forwardRef(function(e,t){let{scope:n,disablePressTrigger:r,...i}=e,a=om(n),o=V.useId(),[s,c]=V.useState(!1),l=a.anchorTo,u=V.useRef(null),d=rt(t,u),{registerTrigger:f,unregisterTrigger:p}=a;if(V.useEffect(()=>(f(o,c),()=>{p(o)}),[f,p,o]),!i.children)return null;let m=()=>{a.setActiveTrigger(o);let e=u.current;e&&(a.triggerRef.current=e)},h=(0,H.jsx)(et,{"aria-expanded":s,"data-state":Em(s),...i,ref:d,onPress:B(i.onPress,()=>{r||(a.setActiveTrigger(s?null:o),a.onOpenToggle())}),onMouseEnter:B(i.onMouseEnter,m),onPressIn:B(i.onPressIn,m),onFocus:B(i.onFocus,m)}),g=V.useMemo(()=>l?{current:{getBoundingClientRect:()=>DOMRect.fromRect(l)}}:null,[a.anchorTo,l?.x,l?.y,l?.height,l?.width]),_=(0,H.jsx)(so,{branches:a.branches,children:h});return a.hasCustomAnchor?_:(0,H.jsx)(Wf,{...g&&{virtualRef:g},scope:n,asChild:!0,children:_})})),pm=Gf.styleable(function(e,t){let{trapFocus:n,enableRemoveScroll:r=!1,zIndex:i,scope:a,...o}=e,s=am(a),c=V.useContext(nm),l=i??c,u=sm(a),d=V.useRef(null),f=rt(t,d),p=V.useRef(!1),[m,h]=V.useState(!u);Fe(()=>{u&&m&&h(!1)},[u,m]);let g=V.useContext(rm);if(!s.keepChildrenMounted){if(s.breakpointActive){if(!u&&g)return null}else if(m&&!u)return null}return(0,H.jsx)(_m,{passThrough:s.breakpointActive,context:s,open:u,zIndex:l,children:(0,H.jsx)(et,{passThrough:s.breakpointActive,pointerEvents:u?o.pointerEvents??`auto`:`none`,children:(0,H.jsx)(vm,{...o,context:s,open:u,enableRemoveScroll:r,ref:f,setIsFullyHidden:h,scope:a,trapFocus:n??u,disableOutsidePointerEvents:!0,onCloseAutoFocus:e.onCloseAutoFocus===!1?void 0:B(e.onCloseAutoFocus,e=>{e.defaultPrevented||(e.preventDefault(),p.current||s.triggerRef.current?.focus())}),onPointerDownOutside:B(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;p.current=r},{checkDefaultPrevented:!1}),onFocusOutside:B(e.onFocusOutside,e=>e.preventDefault(),{checkDefaultPrevented:!1})})})})}),mm=e=>{let t=am(e),n=om(e);return{popperContext:Nf(e),adaptContext:Pa(t.adaptScope),context:t,triggerContext:n}};function hm({adaptContext:e,children:t,context:n,triggerContext:r,popperContext:i}){return(0,H.jsx)(Lf,{scope:n.popoverScope,...i,children:(0,H.jsx)(tm.Provider,{scope:n.popoverScope,...n,children:(0,H.jsx)(im.Provider,{scope:n.popoverScope,...r,children:(0,H.jsx)(Na,{...e,children:t})})})})}var gm=({children:e,context:t})=>{"use no memo";if($p){let n=mm(t.popoverScope);return(0,H.jsx)(za,{scope:t.adaptScope,children:(0,H.jsx)(hm,{...n,children:e})})}return(0,H.jsx)(za,{scope:t.adaptScope,children:e})};function _m({context:e,open:t,zIndex:n,passThrough:r,children:i,onPress:a}){"use no memo";let o=i;if($p){let t=mm(e.popoverScope);o=(0,H.jsx)(hm,{...t,children:o})}return(0,H.jsxs)(da,{passThrough:r,stackZIndex:!0,zIndex:n,children:[!!t&&!e.breakpointActive&&!e.hoverable&&(0,H.jsx)(F,{fullscreen:!0,onPress:B(a,e.onOpenToggle)}),o]})}var vm=V.forwardRef(function(e,t){let{trapFocus:n,scope:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,disableFocusScope:s,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:d,children:f,enableRemoveScroll:p,freezeContentsWhenHidden:m,setIsFullyHidden:h,lazyMount:g,forceUnmount:_,context:v,open:y,alwaysDisable:b,...x}=e,{keepChildrenMounted:S,disableDismissable:C}=v,w=V.useCallback(()=>{h?.(!0)},[h]),T=(0,H.jsx)(Ri,{disable:v.breakpointActive,children:f}),E=V.useCallback(()=>{v.onOpenChange(!1,`press`)},[v]);return v.breakpointActive||((!b||!b.focus)&&(T=(0,H.jsx)(jo,{loop:n!==!1,enabled:!v.breakpointActive&&!s&&y,trapped:!v.breakpointActive&&n,onMountAutoFocus:i,onUnmountAutoFocus:a===!1?void 0:a,children:(0,H.jsx)(`div`,{style:ym,children:T})})),(!b||!b[`remove-scroll`])&&(T=(0,H.jsx)(Zo,{enabled:v.breakpointActive?!1:p?y:!1,children:T})),(!b||!b.dismiss)&&(T=(0,H.jsx)(ao,{branches:v.branches,forceUnmount:C||(_??!y),onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:d,onDismiss:E,children:T}))),(0,H.jsx)(Ha,{type:`presence`,present:!!y,keepChildrenMounted:!!S,onExitComplete:w,lazyMount:g,passThrough:v.breakpointActive,children:(0,H.jsx)(Kf,{scope:r,"data-state":Em(y),id:v.contentId,ref:t,passThrough:v.breakpointActive,...!x.unstyled&&{size:`$true`,backgroundColor:`$background`,alignItems:`center`},...x,children:(0,H.jsx)(gm,{context:v,children:T})},v.contentId)})}),ym={display:`contents`},bm=V.forwardRef(function(e,t){let{scope:n,...r}=e,i=am(n);return(0,H.jsx)(F,{...r,ref:t,componentName:`PopoverClose`,onPress:B(e.onPress,()=>i?.onOpenChange?.(!1,`press`))})}),xm=qf.styleable(function(e,t){let{scope:n,...r}=e;return Va(am(n).adaptScope)?null:(0,H.jsx)(Xf,{scope:n,componentName:`PopoverArrow`,...r,ref:t})}),Sm=V.forwardRef(({scope:e,...t},n)=>{let r=am(e);return(0,H.jsx)(Kp,{ref:n,pointerEvents:r.breakpointActive?`none`:void 0,scrollEnabled:!r.breakpointActive,passThrough:r.breakpointActive,...t})}),Cm=``,wm=l(V.forwardRef(function({scope:e=Cm,...t},n){let r=V.useId(),i=`PopoverAdapt${e}`;return(0,H.jsx)(Ia,{scope:i,portal:!0,children:(0,H.jsx)(Tm,{adaptScope:i,ref:n,id:r,scope:e,...t})})}),{Anchor:dm,Arrow:xm,Trigger:fm,Content:pm,Close:bm,Adapt:Ra,ScrollView:Sm,FocusScope:Do}),Tm=V.forwardRef(function(e,t){let{children:n,open:r,defaultOpen:i,onOpenChange:a,scope:o=Cm,keepChildrenMounted:s,hoverable:c,disableFocus:l,disableDismissable:u,zIndex:d,id:f,adaptScope:p,...m}=e,h=V.useRef(null),[g,_]=V.useState(!1),v=V.useRef(void 0),[y]=qi({prop:s,defaultProp:!1,transition:s===`lazy`}),[b,x]=qi({prop:r,defaultProp:i||!1,onChange:e=>{a?.(e,v.current)}});V.useEffect(()=>{if(b)return em.add(x),()=>{em.delete(x)}},[b,x]);let S=be((e,t)=>{v.current=t,x(e)}),C=Va(p),w=Qp({open:b,setOpen:S,disable:C,hoverable:c,disableFocus:l}),[T,E]=V.useState(),D=O(E);V.useImperativeHandle(t,()=>({anchorTo:D,toggle:()=>x(e=>!e),open:()=>x(!0),close:()=>x(!1),setOpen:x}));let k=V.useId(),A=be(()=>{b&&C||x(!b)}),j=V.useCallback(()=>_(!0),[]),M=V.useCallback(()=>_(!1),[]),ee=(0,H.jsx)(Uf,{open:b,passThrough:C,scope:o,stayInFrame:!0,...m,children:(0,H.jsx)(lm,{scope:o,open:b,onOpenChange:S,onOpenToggle:A,triggerRef:h,id:f,contentId:k,hasCustomAnchor:g,onCustomAnchorAdd:j,onCustomAnchorRemove:M,anchorTo:T,adaptScope:p,breakpointActive:C,keepChildrenMounted:y,disableDismissable:u,hoverable:c,children:(0,H.jsx)(Dm,{onOpenChange:x,open:b,scope:o,children:n})})}),N=(0,H.jsx)(H.Fragment,{children:(0,H.jsx)(pd.Provider,{value:w,children:ee})});return d===void 0?N:(0,H.jsx)(nm.Provider,{value:d,children:N})});function Em(e){return e?`open`:`closed`}var Dm=({open:e,scope:t,...n})=>{let r=am(t),i=eee(r,e),a=r?.breakpointActive,o=Ge(i),[s,c]=V.useState(!e);e&&s&&c(!1);let l=V.useCallback(({open:e})=>{e||c(!0)},[]);return(0,H.jsx)($o,{onOpenChange:e=>{o()&&n.onOpenChange?.(e)},onAnimationComplete:l,open:e,hidden:!a,children:(0,H.jsx)(rm.Provider,{value:s,children:n.children})})},eee=(e,t)=>{let n=Va(e.adaptScope);return t!==!1&&n},Om=I(et,{name:`Separator`,variants:{unstyled:{false:{borderColor:`$borderColor`,flexShrink:0,borderWidth:0,flex:1,height:0,maxHeight:0,borderBottomWidth:1,y:-.5}},vertical:{true:{y:0,x:-.5,height:`initial`,maxHeight:`initial`,width:0,maxWidth:0,borderBottomWidth:0,borderRightWidth:1}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),km=(0,V.createContext)(void 0),{Provider:Am,useStyledContext:jm}=N(null,`Select`),{Provider:Mm,useStyledContext:Nm}=N(null,`SelectItem`),Pm=({context:e,itemContext:t,children:n})=>bi().state.type===`teleport`?n:(0,H.jsx)(Am,{isInSheet:!0,scope:e.scopeName,...e,children:(0,H.jsx)(Mm,{scope:e.scopeName,...t,children:n})}),Fm=e=>{let t=Va(e.adaptScope);return e.open!==!1&&t},Im=({children:e,scope:t,...n})=>{let r=jm(t),i=Nm(t),a=(0,V.useContext)(km),o=Fm(r),s=e;return i.shouldRenderWebNative?(0,H.jsx)(H.Fragment,{children:e}):o?r.open?(0,H.jsx)(H.Fragment,{children:s}):null:(0,H.jsx)(da,{open:r.open,zIndex:a,stackZIndex:1e5,children:(0,H.jsx)(Zo,{enabled:r.open&&!r.disablePreventBodyScroll,children:(0,H.jsx)(ao,{asChild:!0,forceUnmount:!r.open,onDismiss:()=>i.setOpen(!1),onFocusOutside:e=>e.preventDefault(),onPointerDownOutside:e=>e.preventDefault(),children:(0,H.jsx)(jo,{...n,enabled:!!r.open,trapped:!0,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:e=>{e.preventDefault();let t=r.floatingContext?.refs?.reference?.current;t instanceof HTMLElement&&t.focus()},children:(0,H.jsx)(`div`,{style:{display:`contents`},children:s})})})})})},Lm=`SelectViewport`,Rm=e=>{let{scope:t,children:n,open:r=!1,listContentRef:i,setActiveIndexFast:a}=e,o=jm(t),s=Nm(t),{setActiveIndex:c,selectedIndex:l,activeIndexRef:u}=o,{setOpen:d,setSelectedIndex:f}=s,[p,m]=V.useState(0),h=Oi(),g=V.useRef([]),_=V.useRef(null),v=V.useRef(null),y=V.useRef(null),b=V.useRef(!1),x=V.useRef(!0),S=V.useRef(null),C=V.useRef({isMouseOutside:!1,isTyping:!1}),[w,T]=V.useState(!1),[E,D]=V.useState(!1),[O,k]=V.useState(0),[A,j]=V.useState(!1),M=V.useRef({});V.useEffect(()=>{r?a(l??0):(m(0),D(!1),a(null),T(!1))},[r,l,a]),Fe(()=>{if(!r)return;let e=e=>{C.current.isMouseOutside&&d(!1)};return document.addEventListener(`mouseup`,e),()=>{document.removeEventListener(`mouseup`,e)}},[r]);let{x:ee,y:N,strategy:te,refs:ne,update:re,placement:ie}=od({open:r,placement:`bottom-start`,whileElementsMounted:qu,middleware:[dd({apply({rects:{reference:{width:e}}}){Object.assign(M.current,{minWidth:e+8}),ne.floating.current&&Object.assign(ne.floating.current.style,M.current)}}),Mf({listRef:g,overflowRef:_,index:l,offset:O,onFallbackChange:D,padding:10,minItemsVisible:h?10:4,referenceOverflowThreshold:20}),cd({crossAxis:-5})]}),ae=ne.floating,oe=r&&p>8,se=r&&ae.current&&p<ae.current.scrollHeight-ae.current.clientHeight-8,ce=se||oe;Fe(()=>{if(!(typeof window>`u`))return window.addEventListener(`resize`,re),r&&re(),()=>window.removeEventListener(`resize`,re)},[re,r]);let le=be(e=>(r?c:f)(e)),ue=V.useRef({});ue.current.placement=ie;let de={open:r,onOpenChange:e=>d(e),refs:{reference:ne.reference,floating:ne.floating,domReference:ne.reference},elements:{reference:ne.reference?.current||null,floating:ne.floating?.current||null,domReference:ne.reference?.current||null},dataRef:ue},fe=[pf(de,{event:`mousedown`,keyboardHandlers:!1}),lf(de,{role:`listbox`}),Tf(de,{enabled:!E&&ce,onChange:k,overflowRef:_,scrollRef:ne.floating}),Cf(de,{listRef:g,activeIndex:o.activeIndex??0,selectedIndex:l,onNavigate:e=>{e!==null&&c(e)},scrollItemIntoView:!1}),wf(de,{listRef:i,onMatch:le,selectedIndex:l,activeIndex:o.activeIndex,onTypingChange:e=>{C.current.isTyping=e}})],pe=_d(V.useMemo(()=>fe,fe)),me=V.useMemo(()=>({...pe,getReferenceProps(){return pe.getReferenceProps({ref:ne.reference,className:`SelectTrigger`,onKeyDown(e){(e.key===`Enter`||e.code===`Space`||e.key===` `&&!C.current.isTyping)&&(e.preventDefault(),d(!0))}})},getFloatingProps(e){return pe.getFloatingProps({ref:ne.floating,className:`Select`,...e,style:{position:te,top:N??``,left:ee??``,outline:0,scrollbarWidth:`none`,...M.current,...e?.style},onPointerEnter(){T(!1),C.current.isMouseOutside=!1},onPointerLeave(){C.current.isMouseOutside=!0},onPointerMove(){C.current.isMouseOutside=!1,T(!1)},onKeyDown(){T(!0)},onContextMenu(e){e.preventDefault()},onScroll(e){(0,ua.flushSync)(()=>{m(e.currentTarget.scrollTop)})}})}}),[ne.reference.current,ee,N,ne.floating.current,pe]);Fe(()=>{if(r)return x.current=!1,S.current=setTimeout(()=>{b.current=!0,x.current=!0},300),()=>{clearTimeout(S.current)};b.current=!1,x.current=!0,k(0),D(!1),j(!1)},[r]),Fe(()=>{!r&&C.current.isMouseOutside&&(C.current.isMouseOutside=!1)},[r]),Fe(()=>{function e(e){let t=e.target;ne.floating.current?.contains(t)||v.current?.contains(t)||y.current?.contains(t)||(d(!1),T(!1))}if(r)return document.addEventListener(`pointerdown`,e),()=>{document.removeEventListener(`pointerdown`,e)}},[r,ne,d]),V.useEffect(()=>{if(!r)return;let e=e=>{w&&e!=null&&g.current[e]?.scrollIntoView({block:`nearest`}),m(ne.floating.current?.scrollTop??0)};return e(u.current),s.activeIndexSubscribe(e)},[r,ne,w,s.activeIndexSubscribe]),V.useEffect(()=>{r&&E&&l!=null&&g.current[l]?.scrollIntoView({block:`nearest`})},[r,E,l]),Fe(()=>{ne.floating.current&&E&&(ne.floating.current.style.maxHeight=``)},[ne,E]);let P=V.useMemo(()=>({refs:ne,dataRef:ue}),[ne]);return(0,H.jsx)(Am,{scope:t,...o,setScrollTop:m,setInnerOffset:k,fallback:E,floatingContext:P,canScrollDown:!!se,canScrollUp:!!oe,controlledScrolling:w,blockSelection:A,upArrowRef:v,downArrowRef:y,update:re,children:(0,H.jsx)(Mm,{scope:t,...s,allowMouseUpRef:x,allowSelectRef:b,dataRef:ue,interactions:me,listRef:g,selectTimeoutRef:S,children:n})})},zm=`SelectItem`,{Provider:Bm,useStyledContext:Vm}=N(null,zm),Hm=ol.Frame.styleable(function(e,t){let{scope:n,value:r,disabled:i=!1,textValue:a,index:o,...s}=e,{setSelectedIndex:c,listRef:l,setOpen:u,onChange:d,activeIndexSubscribe:f,activeIndexRef:p,valueSubscribe:m,allowMouseUpRef:h,allowSelectRef:g,setValueAtIndex:_,selectTimeoutRef:v,dataRef:y,interactions:b,shouldRenderWebNative:x,size:S,onActiveChange:C,initialValue:w,setActiveIndexFast:T}=Nm(n),[E,D]=V.useState(w===r);Fe(()=>{w===r&&c(o)},[]),V.useEffect(()=>{let e=e=>{o===e&&(C(r,o),requestAnimationFrame(()=>{l?.current[o]?.focus()}))},t=p?.current;return t!=null&&e(t),f(e)},[o]),V.useEffect(()=>m(e=>{D(e===r)}),[r]);let O=V.useId(),k=V.useCallback(e=>{e instanceof HTMLElement&&l&&(l.current[o]=e)},[o,l]),A=rt(t,k);Fe(()=>{_(o,r)},[o,_,r]);function j(){c(o),d(r),u(!1)}let M=V.useMemo(()=>b?b.getItemProps({onTouchMove(){g.current=!0,h.current=!1},onTouchEnd(){g.current=!1,h.current=!0},onKeyDown(e){if(e.key===`Enter`||e.key===` `&&!y?.current.typing)e.preventDefault(),j();else if(e.key===`ArrowDown`||e.key===`ArrowUp`){e.preventDefault(),e.stopPropagation();let t=l?.current.length??0;if(t===0)return;let n;n=e.key===`ArrowDown`?o+1>=t?0:o+1:o-1<0?t-1:o-1,T?.(n)}else g.current=!0},onClick(){g.current&&j()},onMouseUp(){if(!h.current){h.current=!0,g.current=!0;return}g.current&&j(),clearTimeout(v.current),v.current=setTimeout(()=>{g.current=!0})}}):{onPress:j},[j,o,l,T]);return(0,H.jsx)(Bm,{scope:n,value:r,textId:O||``,isSelected:E,children:x?(0,H.jsx)(`option`,{value:r,children:e.children}):(0,H.jsx)(ol.Frame,{render:`div`,componentName:zm,ref:A,role:`option`,"aria-labelledby":O,"aria-selected":E,"data-state":E?`active`:`inactive`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...!e.unstyled&&{cursor:`default`,size:S,outlineOffset:-.5,zIndex:100,hoverStyle:{backgroundColor:`$backgroundHover`},pressStyle:{backgroundColor:`$backgroundPress`},focusStyle:{backgroundColor:`$backgroundFocus`},focusVisibleStyle:{outlineColor:`$outlineColor`,outlineWidth:1,outlineStyle:`solid`}},...s,...M})})},{disableTheme:!0}),Um=I(o,{name:`SelectItemText`,variants:{unstyled:{false:{userSelect:`none`,color:`$color`,ellipsis:!0}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),Wm=Um.styleable(function(e,t){let{scope:n,className:r,...i}=e,a=Nm(n),o=V.useRef(null),s=rt(t,o),c=Vm(n),l=V.useRef(null);return l.current=(0,H.jsx)(Um,{className:r,size:a.size,id:c.textId,...i,ref:s}),Fe(()=>{a.initialValue===c.value&&a.setSelectedItem(l.current)},[]),Fe(()=>a.valueSubscribe(e=>{e===c.value&&a.setSelectedItem(l.current)}),[c.value]),a.shouldRenderWebNative?(0,H.jsx)(H.Fragment,{children:e.children}):(0,H.jsx)(H.Fragment,{children:l.current})}),Gm=`SelectScrollUpButton`,Km=V.forwardRef((e,t)=>(0,H.jsx)(Ym,{componentName:Gm,...e,dir:`up`,ref:t}));Km.displayName=Gm;var qm=`SelectScrollDownButton`,Jm=V.forwardRef((e,t)=>(0,H.jsx)(Ym,{componentName:qm,...e,dir:`down`,ref:t}));Jm.displayName=qm;var Ym=V.memo(V.forwardRef((e,t)=>{let{scope:n,dir:r,componentName:i,...a}=e,{forceUpdate:o,open:s,fallback:c,setScrollTop:l,setInnerOffset:u,...d}=jm(n),f=d.floatingContext?.refs.floating,p=V.useRef(`idle`),m=d[r===`down`?`canScrollDown`:`canScrollUp`],h=V.useRef(null),{x:g,y:_,refs:v,strategy:y}=od({open:s&&m,strategy:`fixed`,elements:{reference:f?.current},placement:r===`up`?`top`:`bottom`,middleware:[cd(({rects:e})=>-e.floating.height)],whileElementsMounted:(...e)=>qu(...e,{animationFrame:!0})}),b=rt(t,v.setFloating);if(!m)return null;let x=e=>{let t=f;t&&(c?t.current&&(t.current.scrollTop-=e,(0,ua.flushSync)(()=>l(t.current?.scrollTop??0))):(0,ua.flushSync)(()=>u(t=>t-e)))};return(0,H.jsx)(F,{ref:b,componentName:i,"aria-hidden":!0,...a,zIndex:1e3,position:y,left:g||0,top:_||0,width:`calc(${(f?.current?.offsetWidth??0)-2}px)`,onPointerEnter:()=>{p.current=`active`;let e=Date.now();function t(){let n=f?.current;if(n){let i=Date.now(),a=i-e;e=i;let o=a/2,s=r===`up`?n.scrollTop:n.scrollHeight-n.clientHeight-n.scrollTop,c=r===`up`?n.scrollTop-o>0:n.scrollTop+o<n.scrollHeight-n.clientHeight;x(r===`up`?Math.min(o,s):Math.max(-o,-s)),c&&(h.current=requestAnimationFrame(t))}}cancelAnimationFrame(h.current),h.current=requestAnimationFrame(t)},onPointerLeave:()=>{p.current=`idle`,cancelAnimationFrame(h.current)}})})),Xm=`SelectTrigger`,Zm=typeof window<`u`&&typeof window.matchMedia==`function`?window.matchMedia(`(pointer:coarse)`).matches:!0,Qm=V.forwardRef(function(e,t){let{scope:n,disabled:r=!1,unstyled:i=!1,...a}=e,o=jm(n),s=Nm(n),c=rt(t,o.floatingContext?.refs.setReference);return s.shouldRenderWebNative?null:(0,H.jsx)(ol,{componentName:Xm,unstyled:i,render:`button`,type:`button`,id:s.id,...!i&&{focusVisibleStyle:{outlineStyle:`solid`,outlineWidth:2,outlineColor:`$outlineColor`},borderWidth:1,size:s.size},role:`combobox`,"aria-haspopup":`listbox`,"aria-expanded":o.open,"aria-autocomplete":`none`,dir:o.dir,disabled:r,"data-disabled":r?``:void 0,...a,ref:c,...s.interactions?{...s.interactions.getReferenceProps(),...Zm?{onPress(){s.setOpen(!o.open)}}:{onMouseDown(){o.floatingContext?.update?.(),s.setOpen(!o.open)}}}:{onPress(){s.setOpen(!o.open)}}})}),$m=I(C,{name:Lm,variants:{unstyled:{false:{size:`$2`,backgroundColor:`$background`,elevate:!0,bordered:!0,userSelect:`none`,outlineWidth:0}},size:{"...size":(e,{tokens:t})=>({borderRadius:t.radius[e]??e})}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),eh=fa(),th=$m.styleable(function(e,t){let{scope:n,children:r,disableScroll:i,...a}=e,o=jm(n),s=Nm(n),c=Va(o.adaptScope),[l,u]=V.useState(!o.lazyMount);V.useEffect(()=>{o.lazyMount&&o.open&&(l||Gi(()=>{u(!0)}))},[o.lazyMount,o.open,l]);let d=rt(t,o.floatingContext?.refs.setFloating);if(Fe(()=>{o.update&&o.update()},[c]),Fe(()=>{o.lazyMount&&l&&o.open&&o.update&&o.update()},[l]),s.shouldRenderWebNative)return(0,H.jsx)(F,{position:`relative`,children:r});if(c){let e=r;return eh&&(e=(0,H.jsx)(Pm,{itemContext:s,context:o,children:e})),(0,H.jsx)(za,{scope:o.adaptScope,children:e})}if(!s.interactions)return null;let{style:f,className:p,...m}=s.interactions.getFloatingProps();return(0,H.jsxs)(H.Fragment,{children:[!i&&!e.unstyled&&(0,H.jsx)(`style`,{dangerouslySetInnerHTML:{__html:nh}}),(0,H.jsx)(Wi,{children:o.open?(0,H.jsx)($m,{size:s.size,role:`presentation`,...a,...f,...m,...!e.unstyled&&{overflowY:i?void 0:f.overflow??`auto`},ref:d,children:l?r:null},`select-viewport`):null}),!o.open&&!(o.lazyMount&&o.renderValue)&&l&&(0,H.jsx)(`div`,{style:{display:`none`},children:r})]})}),nh=`
11
+ .is_SelectViewport {
12
+ scrollbar-width: none;
13
+ -webkit-overflow-scrolling: touch;
14
+ overscroll-behavior: contain;
15
+ }
16
+
17
+ .is_SelectViewport::-webkit-scrollbar{
18
+ display:none
19
+ }
20
+ `,rh=I(o,{name:`SelectValue`,userSelect:`none`}),ih=rh.styleable(function({scope:e,children:t,placeholder:n,...r},i){let a=jm(e),o=Nm(e),s=rt(i,a.onValueNodeChange),c=a.value==null||a.value===``,l=a.renderValue?.(a.value),u=t??l??o.selectedItem??a.value,d=c?n??u:u;return(0,H.jsx)(rh,{...!r.unstyled&&{size:o.size,ellipsis:!0,pointerEvents:`none`},ref:s,...r,children:ah(d)})});function ah(e){return V.Children.map(e,e=>{if(e){if(e.type?.staticConfig?.componentName===`SelectItemText`)return e.props.children;if(e.props?.children)return ah(e.props.children)}return e})}var oh=I(P,{name:`SelectIcon`,"aria-hidden":!0,children:(0,H.jsx)(Zi,{children:`▼`})}),tee=I(P,{name:`SelectItemIndicator`}),nee=V.forwardRef(function(e,t){let{scope:n,...r}=e,i=Nm(n),a=Vm(n);return i.shouldRenderWebNative?null:a.isSelected?(0,H.jsx)(tee,{"aria-hidden":!0,...r,ref:t}):null}),sh=I(F,{name:`SelectIndicator`,variants:{unstyled:{false:{position:`absolute`,top:0,left:0,pointerEvents:`none`,zIndex:10,backgroundColor:`$background`,borderRadius:0}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),ch=sh.styleable(function({scope:e,...t},n){let r=Nm(e),i=jm(e),[a,o]=V.useState(null),s=V.useRef(0);return V.useLayoutEffect(()=>{let e=e=>{typeof e==`number`&&(cancelAnimationFrame(s.current),s.current=requestAnimationFrame(()=>{let t=r.listRef?.current?.[e];t&&o({width:Math.round(t.offsetWidth),height:Math.round(t.offsetHeight),x:Math.round(t.offsetLeft),y:Math.round(t.offsetTop)})}))};return i.open&&i.activeIndexRef.current!==null&&e(i.activeIndexRef.current),r.activeIndexSubscribe(e)},[i.open,r.listRef]),a?(0,H.jsx)(sh,{ref:n,...t,width:a.width,height:a.height,x:a.x,y:a.y}):null}),lh=`SelectGroup`,{Provider:uh,useStyledContext:dh}=N({id:``},`SelectGroup`),fh=I(F,{name:lh,width:`100%`}),ph=I(o,{render:`select`,backgroundColor:`$background`,borderColor:`$borderColor`,hoverStyle:{backgroundColor:`$backgroundHover`}}),mh=I(F,{name:`NativeSelect`,variants:{size:{"...size":(e,t)=>{let{tokens:n}=t,r=ot(n.space[e]);return{borderRadius:n.radius[e]??e,minHeight:n.size[e],paddingRight:r+20,paddingLeft:r,paddingVertical:g(e,{shift:-3})}}},unstyled:{false:{borderWidth:1,borderColor:`$borderColor`,userSelect:`none`,outlineWidth:0,paddingRight:10}}},defaultVariants:{size:`$2`,unstyled:{}.GUI_HEADLESS===`1`}}),hh=V.forwardRef((e,t)=>{let{scope:n,...r}=e,i=V.useId(),a=jm(n),o=Nm(n),s=o.size??`$true`,c=V.useRef(null),l=o.shouldRenderWebNative?(0,H.jsx)(mh,{asChild:!0,size:s,value:a.value,id:o.id,children:(0,H.jsx)(ph,{onChange:e=>{o.onChange(e.currentTarget.value)},size:s,ref:c,style:{color:`var(--color)`,appearance:`none`},children:e.children})}):(0,H.jsx)(fh,{role:`group`,"aria-labelledby":i,...r,ref:t});return(0,H.jsx)(uh,{scope:n,id:i||``,children:l})});hh.displayName=lh;var gh=I(o,{name:`SelectLabel`,variants:{unstyled:{false:{size:`$true`,ellipsis:!0,maxWidth:`100%`,cursor:`default`}},size:{"...size":(e,{tokens:t})=>({paddingHorizontal:t.space[e],paddingVertical:g(t.space[e],{shift:-4})})}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),_h=gh.styleable((e,t)=>{let{scope:n,...r}=e,i=Nm(n),a=dh(n);return i.shouldRenderWebNative?null:(0,H.jsx)(gh,{render:`div`,id:a.id,size:i.size,...r,ref:t})});I(Om,{name:`SelectSeparator`});var vh=e=>{let t=jm(e.scope),n=Fm(t),r=Va(t.adaptScope),i=Ge(n);return(0,H.jsx)($o,{onOpenChange:t=>{i()&&e.onOpenChange(t)},open:t.open,hidden:!r,children:e.children})},yh=e=>(0,H.jsx)(H.Fragment,{children:e.children}),bh=l(function(e){let t=`AdaptSelect${e.scope||``}`;return(0,H.jsx)(Ia,{scope:t,portal:!0,children:(0,H.jsx)(Sh,{scope:e.scope,adaptScope:t,...e})})},{Adapt:Ra,Content:Im,Group:hh,Icon:oh,Item:Hm,ItemIndicator:nee,ItemText:Wm,Label:_h,ScrollDownButton:Jm,ScrollUpButton:Km,Trigger:Qm,Value:ih,Viewport:th,Indicator:ch,FocusScope:Do});function xh(){let e=V.useRef(new Set);return[V.useCallback(t=>{e.current.forEach(e=>e(t))},[]),V.useCallback(t=>(e.current.add(t),()=>{e.current.delete(t)}),[])]}function Sh(e){let{scope:t=``,adaptScope:n,native:r,children:i,open:a,defaultOpen:o,onOpenChange:s,value:c,defaultValue:l,onValueChange:u,disablePreventBodyScroll:d,size:f=`$true`,onActiveChange:p,dir:m,id:h,renderValue:g,lazyMount:_,zIndex:v}=e,y=Va(n)?yh:Rm,b=V.useReducer(()=>({}),{})[1],[x,S]=V.useState(null),[C,w]=qi({prop:a,defaultProp:o||!1,onChange:s}),[T,E]=qi({prop:c,defaultProp:l||``,onChange:u,transition:!0});V.useEffect(()=>{C&&A(T)},[C]),V.useEffect(()=>{A(T)},[T]);let D=V.useRef(null),[O,k]=V.useState(null),[A,j]=xh(),[M,ee]=xh(),N=V.useRef(null),te=V.useRef([]),[ne,re]=V.useState(0),[ie,ae]=V.useState(null);Fe(()=>{N.current=ne});let oe=r===!0||r===`web`||Array.isArray(r)&&r.includes(`web`),se=V.useCallback(e=>{D.current!==e&&(D.current=e,typeof e==`number`&&M(e))},[M]),ce=V.useCallback(e=>{se(e),k(e)},[se]),le=(0,H.jsx)(Mm,{scopeName:t,scope:t,adaptScope:n,initialValue:V.useMemo(()=>T,[C]),size:f,activeIndexSubscribe:ee,activeIndexRef:D,valueSubscribe:j,setOpen:w,id:h,onChange:V.useCallback(e=>{E(e),A(e)},[]),onActiveChange:be((e,t)=>{p?.(e,t)}),setSelectedIndex:re,setValueAtIndex:V.useCallback((e,t)=>{te.current[e]=t},[]),shouldRenderWebNative:oe,setActiveIndexFast:se,selectedItem:x,setSelectedItem:S,children:(0,H.jsx)(Am,{scope:t,scopeName:t,adaptScope:n,disablePreventBodyScroll:d,dir:m,blockSelection:!1,fallback:!1,forceUpdate:b,valueNode:ie,onValueNodeChange:ae,activeIndex:O,activeIndexRef:D,selectedIndex:ne,setActiveIndex:ce,value:T,open:C,native:r,renderValue:g,lazyMount:_,children:(0,H.jsx)(vh,{onOpenChange:w,scope:t,children:oe?i:(0,H.jsx)(y,{activeIndexRef:D,listContentRef:te,selectedIndexRef:N,setActiveIndexFast:se,...e,open:C,value:T,children:i})})})});return v===void 0?le:(0,H.jsx)(km.Provider,{value:v,children:le})}function Ch(e){return e?`checked`:`unchecked`}var wh=e=>{let{control:t,checked:n,bubbles:r=!0,...i}=e,a=V.useRef(null),o=Ec(n);return V.useEffect(()=>{let e=a.current,t=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(t,`checked`).set;if(o!==n&&i){let t=new Event(`click`,{bubbles:r});i.call(e,n),e.dispatchEvent(t)}},[o,n,r]),(0,H.jsx)(`input`,{type:`checkbox`,"aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:a,style:{...e.style,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0}})};function Th(e,[t,n],r){{let{disabled:i,name:a,value:o,required:s}=e,c=V.useRef(!1),[l,u]=V.useState(null),d=rt(r,u),f=!l||!!l.closest(`form`),p=Tc(l),m=e[`aria-labelledby`]||e.labeledBy||p;return{switchProps:{role:`switch`,"aria-checked":t,tabIndex:i?void 0:0,"data-state":Ch(t),"data-disabled":i?``:void 0,disabled:i,"aria-labelledby":m,onPress:B(e.onPress,e=>{n(e=>!e),f&&(c.current=e.isPropagationStopped(),c.current||e.stopPropagation())})},switchRef:d,bubbleInput:f?(0,H.jsx)(wh,{control:l,bubbles:!c.current,name:a,value:o,checked:t,required:s,disabled:i,style:{transform:`translateX(-100%)`}}):null}}}var Eh=N({active:!1,disabled:!1,frameWidth:void 0,size:void 0,unstyled:{}.GUI_HEADLESS===`1`}),Dh=I(F,{name:`SwitchThumb`,variants:{unstyled:{false:{size:`$true`,backgroundColor:`$background`,borderRadius:1e3}},size:{"...size":e=>{let t=Oh(e);return{height:t,width:t}}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}},{accept:{activeStyle:`style`}}),Oh=e=>Math.round(ot(pe(e))*.65),kh=e=>Oh(e)*2,Ah=I(F,{name:`Switch`,render:`button`,tabIndex:0,variants:{unstyled:{false:{borderRadius:1e3,backgroundColor:`$background`,focusVisibleStyle:{outlineColor:`$outlineColor`,outlineStyle:`solid`,outlineWidth:2}}},size:{"...size":(e,{props:t})=>{if(t.unstyled)return;let n=Oh(e);return{height:n,minHeight:n,width:kh(e)}}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}},{accept:{activeStyle:`style`}});function jh(e){return null}function Mh(e){let{Frame:t=Ah,Thumb:n=Dh}=e;t.staticConfig.context=Eh,n.staticConfig.context=Eh;let r=n.styleable(function(e,t){let{size:r,unstyled:i,activeStyle:a,...o}=e,{unstyled:s,size:c,active:l,disabled:u,frameWidth:d=0}=Eh.useStyledContext(),f={}.GUI_HEADLESS===`1`?!0:i??s??!1,p=r??c??`$true`,m=V.useRef(l).current,h=ot(e.width||p,`size`),[g,_]=V.useState(typeof h==`number`?h:0),v=d-g,y=m?l?0:-v:l?v:0;return(0,H.jsx)(n,{ref:t,unstyled:f,...f===!1&&{size:p},alignSelf:m?`flex-end`:`flex-start`,x:y,onLayout:B(e.onLayout,e=>{let t=e.nativeEvent.layout.width;_(t)}),disabled:u,...o,...l&&a})}),i=t.styleable(function(e,n){let{native:r,nativeProps:i,checked:a,defaultChecked:o,onCheckedChange:s,activeStyle:c,unstyled:l,activeTheme:u,...d}=e,[f,p]=qi({prop:a,defaultProp:o||!1,onChange:s,transition:!0}),m=V.useContext(Eh.context),[h,g]=V.useState(0),{switchProps:_,bubbleInput:v,switchRef:y}=Th(d,[f,p],n),b=jh({id:d.id,disabled:d.disabled,native:r,nativeProps:i,checked:f,setChecked:p});if(b)return b;let x=d.disabled,S=e=>{let t=e.nativeEvent.layout.width;t!==h&&g(t)},C=m.unstyled??l??!1;return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Eh.Provider,{size:m.size??d.size??`$true`,unstyled:C,active:f,disabled:x,frameWidth:h,children:(0,H.jsx)(t,{ref:y,render:`button`,theme:u??null,type:`button`,...!C&&{size:m.size??d.size??`$true`},unstyled:C,...d,..._,disabled:x,...f&&{...!C&&!c&&{backgroundColor:`$backgroundActive`},...c},children:(0,H.jsx)(et,{alignSelf:`stretch`,flex:1,onLayout:S,children:d.children})})}),v]})},{disableTheme:!0});return l(i,{Thumb:r})}var Nh=Mh({Frame:Ah,Thumb:Dh}),{Provider:Ph,useStyledContext:Fh}=N(),Ih=I(Xi,{name:`Tabs`}),Lh=I(et,{name:`TabsTrigger`,role:`tab`,variants:{size:{"...size":le},disabled:{true:{pointerEvents:`none`}},unstyled:{false:{borderWidth:0,backgroundColor:`$background`,userSelect:`none`,justifyContent:`center`,alignItems:`center`,flexWrap:`nowrap`,flexDirection:`row`,cursor:`pointer`,pressStyle:{backgroundColor:`$backgroundPress`},focusVisibleStyle:{outlineColor:`$outlineColor`,outlineWidth:2,outlineStyle:`solid`,zIndex:10}}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}},{accept:{activeStyle:`style`}}),Rh=I(C,{name:`TabsContent`});function zh(e){let{ContentFrame:t=Rh,TabFrame:n=Lh,TabsFrame:r=Ih}=e,i=`TabsContext`,a=`TabsList`,o=V.forwardRef((e,t)=>{let{__scopeTabs:n,loop:r=!0,children:o,...s}=e,c=Fh(n);return(0,H.jsx)(cp,{__scopeRovingFocusGroup:n||i,orientation:c.orientation,dir:c.dir,loop:r,asChild:!0,children:(0,H.jsx)(Yc,{role:`tablist`,componentName:a,"aria-orientation":c.orientation,ref:t,orientation:c.orientation,...s,children:o})})});o.displayName=a;let s=n.styleable((e,t)=>{let{__scopeTabs:r,value:a,disabled:o=!1,onInteraction:s,activeStyle:c,activeTheme:l,unstyled:u=!1,...d}=e,f=Fh(r),p=Bh(f.baseId,a),m=Vh(f.baseId,a),h=a===f.value,[g,_]=V.useState(null),v=V.useRef(null),y=Jc({disabled:!!o});return V.useEffect(()=>(f.registerTrigger(),()=>f.unregisterTrigger()),[]),V.useEffect(()=>{if(!v.current)return;let e=v.current;function t(){e&&_({width:e.offsetWidth,height:e.offsetHeight,x:e.offsetLeft,y:e.offsetTop})}t();let n=new ResizeObserver(t);return n.observe(e),()=>{n.disconnect()}},[f.triggersCount]),V.useEffect(()=>{h&&g&&s?.(`select`,g)},[h,a,g]),(0,H.jsx)(cp.Item,{__scopeRovingFocusGroup:r||i,asChild:!0,focusable:!o,active:h,children:(0,H.jsx)(n,{onMouseEnter:B(e.onMouseEnter,()=>{g&&s?.(`hover`,g)}),onMouseLeave:B(e.onMouseLeave,()=>{s?.(`hover`,null)}),role:`tab`,"aria-selected":h,"aria-controls":m,"data-state":h?`active`:`inactive`,"data-disabled":o?``:void 0,id:p,theme:l??null,unstyled:u,...!u&&{size:f.size},...h&&{...!u&&!c&&{backgroundColor:`$backgroundActive`},...c},...y,disabled:o??y.disabled,...d,ref:ye(t,v),onPress:B(e.onPress??void 0,e=>{let t=e.button===0&&e.ctrlKey===!1;!o&&!h&&t&&f.onChange(a)}),onKeyDown:B(e.onKeyDown,e=>{[` `,`Enter`].includes(e.key)&&(f.onChange(a),e.preventDefault())}),onFocus:B(e.onFocus,e=>{g&&s?.(`focus`,g);let t=f.activationMode!==`manual`;!h&&!o&&t&&f.onChange(a)}),onBlur:B(e.onBlur,()=>{s?.(`focus`,null)})})})});s.displayName=`TabsTrigger`;let c=t.styleable(function(e,n){let{__scopeTabs:r,value:i,forceMount:a,children:o,...s}=e,c=Fh(r),l=i===c.value,u=a||l,d=Bh(c.baseId,i),f=Vh(c.baseId,i);return u?(0,H.jsx)(t,{"data-state":l?`active`:`inactive`,"data-orientation":c.orientation,role:`tabpanel`,"aria-labelledby":d,hidden:!u,id:f,tabIndex:0,...s,ref:n,children:o},i):null}),u=r.styleable(function(e,t){let{__scopeTabs:n,value:i,onValueChange:a,defaultValue:o,orientation:s=`horizontal`,dir:c,activationMode:l=`manual`,size:u=`$true`,...d}=e,f=ta(c),[p,m]=qi({prop:i,onChange:a,defaultProp:o??``}),[h,g]=V.useState(0),_=be(()=>g(e=>e+1)),v=be(()=>g(e=>e-1));return(0,H.jsx)(it.Provider,{size:u,children:(0,H.jsx)(Ph,{scope:n,baseId:V.useId(),value:p,onChange:m,orientation:s,dir:f,activationMode:l,size:u,registerTrigger:_,triggersCount:h,unregisterTrigger:v,children:(0,H.jsx)(r,{direction:f,"data-orientation":s,...d,ref:t})})})});return l(u,{List:o,Trigger:s,Tab:s,Content:c})}function Bh(e,t){return`${e}-trigger-${t}`}function Vh(e,t){return`${e}-content-${t}`}var Hh=zh({ContentFrame:Rh,TabFrame:Lh,TabsFrame:Ih}),Uh=I(Qe,{position:`absolute`,width:1,height:1,margin:-1,zIndex:-1e4,overflow:`hidden`,opacity:1e-8,pointerEvents:`none`,variants:{preserveDimensions:{true:{position:`relative`,width:`auto`,height:`auto`}},visible:{true:{position:`relative`,width:`auto`,height:`auto`,margin:0,zIndex:1,overflow:`visible`,opacity:1,pointerEvents:`auto`}}}});Uh.isVisuallyHidden=!0;var Wh=(e,{message:t,notificationOptions:n})=>!(`Notification`in window)||Notification.permission!==`granted`?!1:{nativeToastRef:new Notification(e,{body:t,...n})},Gh=``,Kh={focus:!0,"remove-scroll":!0},qh=Gf.styleable((e,t)=>{let n=V.useContext(Yh),r=V.useContext(Xh);return(0,H.jsx)(pm,{scope:e.scope||Gh,alwaysDisable:Kh,...!e.unstyled&&{backgroundColor:`$background`,alignItems:`center`,pointerEvents:`none`,size:`$true`},ref:t,...r!==void 0&&{zIndex:r},...e,...n&&{transition:null}})},{staticConfig:{componentName:`Tooltip`}}),Jh=V.forwardRef((e,t)=>(0,H.jsx)(xm,{scope:e.scope||Gh,componentName:`Tooltip`,ref:t,...e})),Yh=V.createContext(!1),Xh=V.createContext(void 0),Zh=({children:e,delay:t,preventAnimation:n=!1,timeoutMs:r})=>(0,H.jsx)(Yh.Provider,{value:n,children:(0,H.jsx)(Of,{timeoutMs:r,delay:V.useMemo(()=>t,[JSON.stringify(t)]),children:e})}),Qh=new Set,$h=V.forwardRef(function(e,t){"use no memo";let{children:n,delay:r,restMs:i,onOpenChange:a,focus:o,open:s,disableAutoCloseOnScroll:c,zIndex:l,scope:u=Gh,...d}=e,f=V.useRef(null),[p,m]=V.useState(!1),{delay:h,setCurrentId:g}=Df(),_=r===void 0?h??400:r,v=i??(typeof _==`number`?_:0),[y,b]=qi({prop:s,defaultProp:!1,onChange:a}),x=e.groupId,S=be(e=>{e&&g(x),b(e)});V.useEffect(()=>{if(!y||c||typeof document>`u`)return;let e=()=>{b(!1)};return Qh.add(b),document.documentElement.addEventListener(`scroll`,e),()=>{Qh.delete(b),document.documentElement.removeEventListener(`scroll`,e)}},[y,c]);let C=Qp({open:y,setOpen:S,disable:!1,disableFocus:!1,hoverable:!0,role:`tooltip`,focus:o,groupId:x,delay:_,restMs:v}),w=V.useCallback(()=>m(!0),[]),T=V.useCallback(()=>m(!1),[]),E=V.useId(),D=e.unstyled?null:pe(`$true`,{shift:-2,bounds:[0]}),O=(0,H.jsx)(pd.Provider,{value:C,children:(0,H.jsx)(Uf,{scope:u,size:D?.key,allowFlip:!0,stayInFrame:!0,open:y,...d,children:(0,H.jsx)(lm,{scope:u,contentId:E,triggerRef:f,open:y,onOpenChange:b,onOpenToggle:rg,hasCustomAnchor:p,onCustomAnchorAdd:w,onCustomAnchorRemove:T,children:n})})});return l===void 0?O:(0,H.jsx)(Xh.Provider,{value:l,children:O})}),eg=V.forwardRef(function(e,t){let{scope:n,...r}=e;return(0,H.jsx)(fm,{...r,scope:n||Gh,ref:t})}),tg=V.forwardRef(function(e,t){let{scope:n,...r}=e;return(0,H.jsx)(dm,{...r,scope:n||Gh,ref:t})}),ng=l($h,{Anchor:tg,Arrow:Jh,Content:qh,Trigger:eg}),rg=()=>{};function ig(e){let t=V.useRef(null);return{ref:t,composedRef:rt(t,e)}}var ag=Ue,og=[`facebook.`,`instagram.`,`twitter.`,`x.com`,`t.co`,`linkedin.`,`reddit.`,`youtube.`,`tiktok.`,`pinterest.`,`news.ycombinator.com`],sg=[`google.`,`bing.`,`duckduckgo.`,`yahoo.`,`baidu.`,`ecosia.`];function cg(e,t){let n=new URLSearchParams(e||``),r=e=>{let t=n.get(e);return t?t.trim():void 0},i={utm:{source:r(`utm_source`),medium:r(`utm_medium`),campaign:r(`utm_campaign`),term:r(`utm_term`),content:r(`utm_content`)},referrer:t?t.trim():void 0,refCode:r(`ref`)||r(`refCode`)||r(`ref_code`)||void 0};return i.channel=lg(i),i}function lg(e){let t=(e.utm.medium||``).toLowerCase();if(/(cpc|ppc|paid|paidsearch|display|cpm)/.test(t))return`paid`;if(e.utm.source||e.utm.campaign)return`campaign`;if(e.refCode)return`referral`;let n=ug(e.referrer);return n?og.some(e=>n.includes(e))?`social`:sg.some(e=>n.includes(e))?`organic`:`referral`:`direct`}function ug(e){if(!e)return``;let t=e.trim(),n=t.indexOf(`://`);n>=0&&(t=t.slice(n+3));let r=t.search(/[/?#]/);r>=0&&(t=t.slice(0,r));let i=t.indexOf(`@`);i>=0&&(t=t.slice(i+1));let a=t.indexOf(`:`);return a>=0&&(t=t.slice(0,a)),t.toLowerCase().trim()}function dg(e){return!!(e.utm.source||e.utm.medium||e.utm.campaign||e.utm.term||e.utm.content||e.refCode||e.referrer&&ug(e.referrer))}var fg=Object.freeze({hanzo:Object.freeze([`hanzo.ai`,`hanzo.agency`,`hanzo.app`,`hanzo.bot`,`hanzo.chat`,`hanzo.codes`,`hanzo.community`,`hanzo.computer`,`hanzo.help`,`hanzo.id`,`hanzo.industries`,`hanzo.market`,`hanzo.network`,`hanzo.sh`,`hanzo.team`,`hanzo.ventures`,`hanzo.works`,`hanzoskills.com`]),lux:Object.freeze([`lux.network`,`lux.exchange`,`lux.market`,`lux.finance`,`lux.financial`,`lux.credit`,`lux.fund`,`lux.id`]),zoo:Object.freeze([`zoo.ngo`,`zoo.network`,`zoolabs.id`,`zoolabs.io`])}),pg=Object.freeze({hanzo:`pk-CmfLA2K6kvsPflrS9DSkt06H_kSoQB_21sjedt6VJdc`,lux:`pk-gUZp6ZVfhJzSwK-rb4oLbVkpCnMBx5uSCpxf_5yEhQk`,zoo:`pk-3TKpKnERV9AQSsBUERWkZejC1O1mUxc1jRzsP3MPbs4`}),mg=Object.freeze({"hanzo.ai":`pk-CmfLA2K6kvsPflrS9DSkt06H_kSoQB_21sjedt6VJdc`,"www.hanzo.ai":`pk-CmfLA2K6kvsPflrS9DSkt06H_kSoQB_21sjedt6VJdc`,"hanzo.app":`pk-wlnXN2a9_vmCm60yTFtQ629Q8TyuaxBNZbY1RWT72gQ`,"hanzo.team":`pk-NCzD2FiHpZv8KUpkCX4olT1LJOJsMxBC_Z8NkiQsOFQ`,"pay.hanzo.ai":`pk-eX6kv7JZNoiYn1WkeJH3tT_8OvkVYScmCXnLMwxTKf8`,"platform.hanzo.ai":`pk-My1RpZLEUnTj8vAdPbWKYdDUuhxZJ4dVjHcwjZN4rZ8`,"docs.hanzo.ai":`pk-jukhtjMT2ymoeBDAeFjINQWlBv-v9sNn1TPztiCrrwk`,"hanzo.bot":`pk-W5d7Mn7ZukT7igyscIy6Pqe8JpA0Ge604Yn4xNR4JCU`,"hanzo.chat":`pk-ATxWeB2jNyRSxDgqnkGoDj3CCbzrmTxSktUh9zlrO-E`,"hanzo.id":`pk-_GVF3KlaqprlPHDumBMRFeFU1lIGOaarQfgimNVDIo8`,"hanzo.industries":`pk-Vh1wvL2HqIAv9qpVvmrznTI9uMHrTD-jyIC-vnlBsgY`,"hanzo.market":`pk-DN3xQFa0H61epUVg9OkiOYLzCdteNt9hE6f-S-ednjQ`,"hanzo.network":`pk-YJ2eiA_7ckLStMPte8Ar8FsmRp_ycmeIeRbpGprZYmM`,"hanzo.agency":`pk-26a2clOaJFe24aKJZ0PkI-GWR9F4EEa8rthHzgy_Efw`,"console.hanzo.ai":`pk-oFNXoiO1wOD8PqGdHYyiSq6jaNCdrd7TpztGpwM2ZiQ`,"admin.hanzo.ai":`pk-RYZwxkomW-tlAnEu2DKo_kAzcxFbSF2YiYcsUY48QL0`,"bot.hanzo.ai":`pk-W5d7Mn7ZukT7igyscIy6Pqe8JpA0Ge604Yn4xNR4JCU`,"cloud.hanzo.ai":`pk-RAfEGHPoNdCEU9fnA_cPd_Xo9Tci44rlYQV9xuJ1Ob0`});function hg(e){let t=_g(e).replace(/^www\./,``);return mg[t]??(t.endsWith(`.hanzo.app`)?mg[`hanzo.app`]:void 0)}var gg=`pk-`,_g=e=>e.trim().toLowerCase().replace(/\.$/,``).split(`:`)[0]??``;function vg(e){let t=_g(e);if(!t)return;let n,r=0;for(let[e,i]of Object.entries(fg))for(let a of i)(t===a||t.endsWith(`.${a}`))&&a.length>r&&(n=e,r=a.length);return n}function yg(e,t=pg){if(t===pg){let t=hg(e);if(t)return t}let n=vg(e);if(!n)return;let r=t[n];if(typeof r!=`string`)return;let i=r.trim();return i.startsWith(gg)?i:void 0}function bg(e=pg){if(!(typeof location>`u`))return yg(location.hostname,e)}var xg=`[redacted]`,Sg=`[email]`,Cg=`[ip]`,wg=[/-----BEGIN[ A-Z]*PRIVATE KEY-----[\s\S]*?-----END[ A-Z]*PRIVATE KEY-----/g,/eyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{6,}\.[A-Za-z0-9_-]{6,}/g,/\bbearer\s+[A-Za-z0-9._~+/-]{12,}=*/gi,/\b(?:sk|pk|rk)-[A-Za-z0-9]{2,}-?[A-Za-z0-9]{12,}/g,/\b(?:sk|pk)_(?:live|test)_[A-Za-z0-9]{16,}/g,/\bhk-[A-Za-z0-9]{16,}/g,/\bAKIA[0-9A-Z]{16}\b/g,/\bASIA[0-9A-Z]{16}\b/g,/\bAIza[0-9A-Za-z_-]{20,}/g,/\bgh[posru]_[A-Za-z0-9]{20,}/g,/\bxox[baprs]-[A-Za-z0-9-]{10,}/g,/[a-zA-Z][a-zA-Z0-9+.-]{0,32}:\/\/[^\s:@/]{1,256}:[^\s@/]{1,256}@/g],Tg=/\b(?:\d[ -]?){13,19}\b/g;function Eg(e){let t=0,n=!1;for(let r=e.length-1;r>=0;r--){let i=e.charCodeAt(r)-48;n&&(i*=2,i>9&&(i-=9)),t+=i,n=!n}return t%10==0}function Dg(e){return e.replace(Tg,e=>{let t=e.replace(/[ -]/g,``);return t.length<13||t.length>19?e:Eg(t)?xg:e})}var Og=/[A-Za-z0-9._%+-]{1,64}@[A-Za-z0-9.-]{1,255}\.[A-Za-z]{2,24}/g,kg=/\b(?:\d{1,3}\.){3}\d{1,3}\b/g,Ag=/\b(?:[0-9A-Fa-f]{1,4}:){2,7}[0-9A-Fa-f]{1,4}\b/g,jg=RegExp(`([?&#;](?:`+`code.state.token.access_token.id_token.refresh_token.auth.authorization.secret.client_secret.password.passwd.pwd.api_key.apikey.key.session.session_id.sid.sig.signature.nonce.otp.invite.invitation.reset_token.confirmation_token.magic.ticket.assertion`.split(`.`).join(`|`)+`)=)[^&#;\\s]{1,4096}`,`gi`);function Mg(e){return e.replace(jg,(e,t)=>t+xg)}var Ng=/(^|[^A-Za-z0-9_-]|%[0-9A-Fa-f]{2})((?=[A-Za-z0-9_-]{0,42}[a-z])(?=[A-Za-z0-9_-]{0,42}[A-Z])[A-Za-z0-9_-]{43})(?![A-Za-z0-9_-])/g;function Pg(e){e=Mg(e);for(let t of wg)e=e.replace(t,xg);return e=e.replace(Ng,(e,t)=>t+xg),Dg(e)}function Fg(e){let t=e.indexOf(`#`);return t<0?e:e.slice(0,t)}function Ig(e){return e=e.replace(Og,Sg),e=e.replace(Ag,Cg),e=e.replace(kg,Cg),e}var Lg=8192;function Rg(e,t=Lg){return e.length>t?e.slice(0,t)+`… [truncated]`:e}function zg(e,t=!1){return e?(e=Rg(e),e=Pg(e),t||(e=Ig(e)),e):e??``}var Bg=50,Vg=500,Hg=2048,Ug=/^\s*at\s+(?:(.+?)\s+\()?(?:(.+?):(\d+):(\d+)|([^)]+))\)?\s*$/,Wg=/^\s*(?:(.*?)@)?(.+?):(\d+):(\d+)\s*$/;function Gg(e){return e?!(e.includes(`node_modules`)||e.startsWith(`webpack-internal`)||e.startsWith(`webpack://`)||e.startsWith(`chrome-extension://`)||e.startsWith(`moz-extension://`)):!1}function Kg(e){if(!e)return[];let t=e.split(`
21
+ `,Vg),n=[];for(let e of t){if(e.length>Hg)continue;let t=e.trimEnd();if(!t)continue;let r,i=``,a=0,o=0,s=Ug.exec(t);if(s)r=s[1],s[2]?(i=s[2],a=Number(s[3])||0,o=Number(s[4])||0):i=(s[5]||``).trim();else{let e=Wg.exec(t);if(!e)continue;r=e[1],i=e[2],a=Number(e[3])||0,o=Number(e[4])||0}(i||r)&&n.push({function:r||`<anonymous>`,filename:i,abs_path:i,lineno:a,colno:o,in_app:Gg(i)})}return n.reverse(),n.length>Bg?n.slice(n.length-Bg):n}function qg(e){if(e instanceof Error){let t=Jg(e,`name`),n=Jg(e,`message`),r=Jg(e,`stack`);return{name:typeof t==`string`&&t?t:`Error`,message:typeof n==`string`&&n?n:Yg(e),stack:typeof r==`string`?r:void 0}}if(typeof e==`string`)return{name:`Error`,message:e};try{return{name:`Error`,message:JSON.stringify(e)??Yg(e)}}catch{return{name:`Error`,message:Yg(e)}}}function Jg(e,t){try{return e[t]}catch{return}}function Yg(e){try{return String(e)}catch{return`[unstringifiable]`}}var Xg=`iam-anon-id`,Zg=[`hz_anon_id`,`hz_id`],Qg=`hanzo.ai`,$g=63072e3,e_;function t_(e){var t=new Uint8Array(16),n,r=typeof crypto<`u`?crypto:void 0;if(r&&typeof r.getRandomValues==`function`)r.getRandomValues(t);else for(n=0;n<16;n++)t[n]=Math.random()*256|0;var i=Math.floor(e===void 0?Date.now():e);for(n=5;n>=0;n--)t[n]=i%256,i=Math.floor(i/256);t[6]=112|t[6]&15,t[8]=128|t[8]&63;var a=``;for(n=0;n<16;n++)a+=(t[n]+256).toString(16).slice(1),(n===3||n===5||n===7||n===9)&&(a+=`-`);return a}function n_(){try{return typeof document>`u`||typeof document.cookie!=`string`?null:document}catch{return null}}function r_(){try{return typeof window>`u`||!window.localStorage?null:window.localStorage}catch{return null}}function i_(e,t){try{return e&&e.getItem(t)||``}catch{return``}}function a_(e){var t=n_();if(!t)return``;for(var n=t.cookie.split(`;`),r=0;r<n.length;r++){var i=n[r].indexOf(`=`);if(!(i<0||n[r].slice(0,i).trim()!==e)){var a=n[r].slice(i+1).trim();if(a)try{return decodeURIComponent(a)}catch{return a}}}return``}function o_(e,t){var n=n_();if(n){var r=``,i=!1;try{typeof window<`u`&&window.location&&(r=window.location.hostname||``,i=window.location.protocol===`https:`)}catch{}var a=e+`=`+encodeURIComponent(t);a+=`; Path=/; Max-Age=`+$g+`; SameSite=Lax`,(`.`+r).slice(-(Qg.length+1))===`.`+Qg&&(a+=`; Domain=`+Qg),i&&(a+=`; Secure`);try{n.cookie=a}catch{}}}function s_(e){for(var t=0;t<Zg.length;t++){var n=a_(Zg[t])||i_(e,Zg[t]);if(n)return n}return``}function c_(){if(typeof window>`u`)return``;var e=r_(),t=a_(Xg)||i_(e,Xg)||s_(e)||e_||t_();e_=t,o_(Xg,t);try{e&&e.getItem(Xg)!==t&&e.setItem(Xg,t)}catch{}return t}function l_(e){e_=e,o_(Xg,e);try{var t=r_();t&&t.setItem(Xg,e)}catch{}}var u_={session:`hz_session`,firstTouch:`hz_first_touch`,lastTouch:`hz_last_touch`,cohort:`hz_cohort`},d_=7776e6,f_=18e5;function p_(){try{return typeof window>`u`||!window.localStorage?void 0:window.localStorage}catch{return}}function m_(){return c_()||void 0}function h_(e=Date.now()){let t=p_();if(!t)return;let n=null;try{n=JSON.parse(t.getItem(u_.session)||`null`)}catch{n=null}return!n||e-n.last>f_?n={id:t_(e),last:e}:n.last=e,t.setItem(u_.session,JSON.stringify(n)),n.id}function g_(e,t=Date.now()){let n=p_();n&&n.setItem(u_.session,JSON.stringify({id:e,last:t}))}function __(e){l_(e)}function v_(){let e=p_();if(e)try{let t=e.getItem(u_.firstTouch);return t?JSON.parse(t):void 0}catch{return}}function y_(e){let t=p_();return v_()||(t&&t.setItem(u_.firstTouch,JSON.stringify(e)),e)}function b_(e=Date.now()){let t=p_();if(t)try{let n=JSON.parse(t.getItem(u_.lastTouch)||`null`);return!n?.utm||typeof n.at!=`number`||e-n.at>d_?void 0:n.utm}catch{return}}function x_(e,t=Date.now()){let n=p_();n&&n.setItem(u_.lastTouch,JSON.stringify({utm:e,at:t}))}function S_(){let e=p_();if(e)try{let t=e.getItem(u_.cohort);return t?JSON.parse(t):void 0}catch{return}}function C_(e){let t=p_(),n=S_()||{},r={signupWeek:n.signupWeek||e.signupWeek,channel:e.channel||n.channel,refCode:n.refCode||e.refCode};return t&&t.setItem(u_.cohort,JSON.stringify(r)),r}var w_=86400,T_=new Set([`hanzo.app`]);function E_(e){for(let t of Object.values(fg))for(let n of t)if(!T_.has(n)&&(e===n||e.endsWith(`.${n}`)))return n;return``}function D_(){let e=E_(window.location.hostname.toLowerCase());return e?`; Domain=.${e}`:``}function O_(e){if(typeof document>`u`||typeof document.cookie!=`string`)return;let t=document.cookie.split(`; `).find(t=>t.startsWith(`${e}=`));return t?decodeURIComponent(t.slice(e.length+1)):void 0}function k_(e,t,n){if(typeof document>`u`)return;let r=window.location.protocol===`https:`?`; Secure`:``;document.cookie=`${e}=${encodeURIComponent(t)}; Max-Age=${n*w_}; Path=/; SameSite=Lax${D_()}${r}`}function A_(e){return typeof window<`u`&&window.location?.protocol===`https:`?`__Host-${e}`:e}function j_(e,t,n){if(typeof document>`u`)return;let r=window.location.protocol===`https:`?`; Secure`:``;document.cookie=`${A_(e)}=${encodeURIComponent(t)}; Max-Age=${n*w_}; Path=/; SameSite=Lax${r}`}function M_(e,t=[]){if(typeof document>`u`||typeof document.cookie!=`string`)return;let n=document.cookie.split(`; `).map(e=>e.slice(0,e.indexOf(`=`))),r=new Set([...e,...n.filter(e=>t.some(t=>t.test(e)))]),i=window.location.hostname.split(`.`),a=new Set([``,D_(),...i.slice(0,-1).map((e,t)=>`; Domain=.${i.slice(t).join(`.`)}`)]);for(let e of r)for(let t of a)document.cookie=`${e}=; Max-Age=0; Path=/${t}`}var N_=()=>typeof navigator<`u`&&navigator.webdriver===!0,P_=`hz_internal`;function F_(){if(N_())return!0;if(typeof window>`u`||typeof document>`u`||typeof document.cookie!=`string`)return!1;let e=new URLSearchParams(window.location?.search??``).get(P_);return e===`1`&&k_(P_,`1`,365),e===`0`?(k_(P_,``,0),!1):e===`1`||O_(P_)===`1`}var I_={anon:`hz_aid`,session:`hz_sid`,firstTouch:`hz_ft`},L_=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,R_=e=>!!e&&L_.test(e);function z_(e){return JSON.stringify([e.utm.source,e.utm.medium,e.utm.campaign,e.utm.term,e.utm.content,e.refCode,e.referrer,e.channel].map(e=>e??``))}function B_(e){if(!(!e||e.length>1024))try{let t=JSON.parse(e);if(!Array.isArray(t)||t.length!==8||t.some(e=>typeof e!=`string`))return;let[n,r,i,a,o,s,c,l]=t,u=e=>e||void 0;return{utm:{source:u(n),medium:u(r),campaign:u(i),term:u(a),content:u(o)},refCode:u(s),referrer:u(c),channel:u(l)}}catch{return}}function V_(e,t,n,r){let i;try{i=new URL(e,r)}catch{return e}if(i.protocol!==`https:`&&i.protocol!==`http:`||!vg(i.hostname)||i.hostname===n)return e;let a=(e,t)=>t&&i.searchParams.set(e,t);return R_(t.anonId)&&a(I_.anon,t.anonId),R_(t.sessionId)&&a(I_.session,t.sessionId),t.firstTouch&&a(I_.firstTouch,z_(t.firstTouch)),i.toString()}function H_(e){let t=new URLSearchParams(e||``),n=t.get(I_.anon),r=t.get(I_.session);return{anonId:R_(n)?n:void 0,sessionId:R_(r)?r:void 0,firstTouch:B_(t.get(I_.firstTouch))}}function U_(e){let t=new URL(e),n=!1;for(let e of Object.values(I_))t.searchParams.has(e)&&(t.searchParams.delete(e),n=!0);return n?t.pathname+t.search+t.hash:void 0}var W_=`hz_consent`,G_=`hz_consent_v`,K_=`hz_consent_rule`,q_=3,J_=2,Y_=`hzconsent`,X_={analytics:!1,marketing:!1,ads:!1},Z_={analytics:!0,marketing:!0,ads:!0},Q_=[`eu`,`us_privacy`,`global`],$_=`hz_consent_policy`,ev=Symbol.for(`hanzo.event.consent`);function tv(){let e=globalThis;return e[ev]??(e[ev]={})}function nv(e){if(typeof e!=`object`||!e)return;let t=e;if(typeof t.version==`number`||typeof t.mode==`string`)return{mode:Q_.includes(t.mode)?t.mode:`eu`,refused:t.refused===!0,version:Number(t.version)||0,region:String(t.region??``),floor:Number(t.floor)||J_}}function rv(){try{return typeof window>`u`?void 0:window.sessionStorage}catch{return}}function iv(){let e=tv().served;if(e)return e;try{let e=nv(JSON.parse(rv()?.getItem($_)??`null`));if(e)return e}catch{}return{mode:`eu`,refused:!1,version:q_,region:``,floor:J_}}function av(){let e=iv();return{mode:e.mode,refused:e.refused||sv(),version:cv(),region:e.region}}function ov(){return typeof navigator>`u`?!1:navigator.globalPrivacyControl===!0}function sv(){if(typeof window>`u`)return!1;let e=typeof navigator>`u`?{}:navigator,t=e.doNotTrack??window.doNotTrack??e.msDoNotTrack;return ov()||t===`1`||t===`yes`}var cv=()=>Math.max(tv().served?.version??0,q_),lv=()=>av().refused;function uv(){let e=O_(A_(W_));if(e===void 0)return;let t=Number(O_(A_(G_))),n=O_(A_(K_));if(av().mode===`eu`&&!(n===`eu`||n===void 0&&t===2))return;let r=e.split(`,`);return{held:{analytics:r.includes(`analytics`),marketing:r.includes(`marketing`),ads:r.includes(`ads`)},current:t>=iv().floor&&t<=cv()}}var dv=e=>e.analytics||e.marketing||e.ads;function fv(){let e=av();if(e.refused)return{...X_};let t=e.mode===`eu`?X_:Z_,n=uv();return n?n.current?{...n.held}:{analytics:t.analytics&&n.held.analytics,marketing:t.marketing&&n.held.marketing,ads:t.ads&&n.held.ads}:{...t}}function pv(){let e=uv();lv()&&e&&dv(e.held)&&hv({...X_})}function mv(e){return[`analytics`,`marketing`,`ads`].filter(t=>e[t]).join(`,`)}function hv(e){let t=av(),n=t.refused?{...X_}:{analytics:e.analytics,marketing:e.marketing,ads:e.ads};j_(W_,mv(n),395),j_(G_,String(cv()),395),j_(K_,t.mode,395),n.analytics||yv(gv),n.marketing||yv(_v),n.ads||yv(vv),typeof window<`u`&&window.dispatchEvent(new Event(Y_))}var gv={cookies:[`_ga`,`_gid`,`_gat`,`hz_cid`],patterns:[/^_ga_[A-Z0-9]+$/,/^_gat_[\w-]+$/],storage:[]},_v={cookies:[`hz_touch`,`_fbp`,`_fbc`,`_ttp`,`_tt_enable_cookie`,`ttcsid`,`_twclid`,`li_fat_id`,`li_giant`,`_uetsid`,`_uetvid`,`_pin_unauth`,`_epik`,`_derived_epik`,`_rdt_uuid`,`_rdt_cid`],patterns:[/^ttcsid_[A-Z0-9]+$/],storage:[]},vv={cookies:[],patterns:[/^_gcl_[a-z]+$/,/^_gac_[\w-]+$/],storage:[]};function yv(e){if(M_(e.cookies,e.patterns),!(typeof window>`u`))try{for(let t of e.storage)window.localStorage?.removeItem(t)}catch{}}var bv=`0.3.66`,xv=`/v1/event`,Sv=`https://api.hanzo.ai`,Cv=`text/plain`;function wv(e){try{if(typeof process<`u`)return{}[e]||void 0}catch{}}function Tv(e,t,n){return e+(e.includes(`?`)?`&`:`?`)+t+`=`+encodeURIComponent(n)}function Ev(e){let t=qg(e),n=Kg(t.stack).slice(-50).map(e=>({function:e.function,file:e.filename,line:e.lineno,column:e.colno}));return{type:t.name,message:t.message,stack:t.stack,frames:n}}var Dv=()=>Ov()?{screen:`${window.screen?.width??0}x${window.screen?.height??0}`,language:navigator.language||``}:{},Ov=()=>typeof window<`u`&&typeof document<`u`;function kv(e){if(!Ov())return e;let t=new Set(mv(fv()).split(`,`).filter(Boolean)),n=String(e.properties?.consent??``).split(`,`).filter(e=>t.has(e)).join(`,`);return{...e,properties:{...e.properties,consent:n}}}function Av(e){try{return JSON.stringify({batch:e})}catch{}let t=[];for(let n of e)try{t.push(JSON.stringify(n))}catch{try{t.push(JSON.stringify({...n,properties:{$unserializable:!0}}))}catch{}}return t.length>0?`{"batch":[`+t.join(`,`)+`]}`:null}var jv=class{send(e,t,n){if(n.beacon&&Ov()&&typeof navigator.sendBeacon==`function`){let r=n.ingestKey?Tv(e,`ingest_key`,n.ingestKey):e;try{if(navigator.sendBeacon(r,new Blob([t],{type:Cv})))return;n.debug&&console.warn(`[event] beacon refused, falling back to fetch`)}catch{}}if(typeof fetch!=`function`)return;let r=n.ingestKey!==void 0&&n.token===void 0&&n.contentType===void 0,i={"Content-Type":r?Cv:n.contentType??`application/json`},a=r?void 0:n.token??n.ingestKey;a&&(i.Authorization=`Bearer ${a}`),fetch(n.ingestKey?Tv(e,`ingest_key`,n.ingestKey):e,{method:`POST`,headers:i,body:t,keepalive:!0,credentials:r?`omit`:`include`}).then(t=>{!t.ok&&n.debug&&console.warn(`[event] ingest rejected`,t.status,e.split(`?`)[0])}).catch(t=>{n.debug&&console.warn(`[event] ingest failed`,e.split(`?`)[0],t)})}},Mv=class{constructor(e){this.queue=[],this.timer=null,this.attribution={utm:{}},this.cohort={},this.started=!1,this.reentrant=!1,this.cfg={host:Sv,batchSize:20,flushIntervalMs:5e3,enabled:!0,captureErrors:!0,...e,ingestKey:e.ingestKey??wv(`NEXT_PUBLIC_PUBLISHABLE_KEY`)??bg()},this.transport=e.transport??new jv}adopt(e){e.ingestKey&&!this.cfg.ingestKey&&(this.cfg.ingestKey=e.ingestKey),e.getToken&&!this.cfg.getToken&&(this.cfg.getToken=e.getToken)}init(){if(this.started||!this.cfg.enabled||(this.started=!0,!Ov()))return;let e=H_(window.location.search),t=U_(window.location.href);if(t!==void 0)try{window.history.replaceState(window.history.state,``,t)}catch{}this.settle(e,cg(window.location.search,document.referrer)),pv(),window.addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`&&this.flush(!0)}),window.addEventListener(`pagehide`,()=>this.flush(!0)),this.cfg.captureErrors&&(window.addEventListener(`error`,e=>{this.captureError(e.error??e.message,{handled:!1})}),window.addEventListener(`unhandledrejection`,e=>{this.captureError(e.reason,{handled:!1})}))}settle(e,t){e.anonId&&__(e.anonId),e.sessionId&&g_(e.sessionId);let n=e.firstTouch&&!v_()?y_(e.firstTouch):void 0;this.attribution=n??(dg(t)?y_(t):v_()??t),(t.utm.source||t.utm.campaign)&&x_(t.utm),this.lastUtm=b_(),this.cohort=C_({channel:this.attribution.channel??lg(this.attribution),refCode:this.attribution.refCode})}link(e){return Ov()?(this.started||this.init(),V_(e,{anonId:m_(),sessionId:h_(),firstTouch:this.attribution},window.location.hostname,window.location.href)):e}authorize(e){let t=this.link(e);return this.flush(!0),t}identify(e,t){this.personId=e,this.enqueue(`identify`,void 0,{properties:t})}group(e,t){this.enqueue(`group`,void 0,{groupId:e,properties:t})}pageview(e,t){let n=e??(Ov()?window.location.pathname:void 0),r=(n??``)+`\0`+(Ov()?window.location.href:``);r!==this.counted&&(this.counted=r,this.enqueue(`pageview`,_e,{path:n,properties:{...Dv(),...t}}))}capture(e,t,n){this.enqueue(`event`,e,{properties:t,...n})}captureError(e,t){if(!this.reentrant){this.reentrant=!0;try{let n=t?.handled??!0,r=Ev(e);r.handled=n,this.enqueue(`error`,void 0,{error:r,level:t?.level??(n?`error`:`fatal`),release:this.cfg.release??wv(`NEXT_PUBLIC_HANZO_RELEASE`),environment:this.cfg.environment??wv(`NODE_ENV`),site:Ov()?window.location.hostname:void 0,properties:t?.properties}),this.flush()}catch{}finally{this.reentrant=!1}}}setCohort(e){this.cohort=C_(e)}flush(e=!1){if(!this.cfg.enabled||this.queue.length===0)return;let t=this.queue.map(kv);if(this.queue=[],this.clearTimer(),t.length===0)return;let n=this.cfg.getToken?.()??void 0,r=this.cfg.ingestKey?.trim()||void 0,i=e&&!n,a=Av(t);if(a===null){this.cfg.debug&&console.debug(`[event] flush → dropped, batch unserializable`);return}this.cfg.debug&&console.debug(`[event] flush →`,xv,t.length),this.transport.send(this.cfg.host+xv,a,{beacon:i,token:n,ingestKey:r,debug:this.cfg.debug})}enqueue(e,t,n){this.cfg.enabled&&(this.started||this.init(),this.queue.push(this.build(e,t,n)),this.queue.length>=this.cfg.batchSize?this.flush():this.schedule())}build(e,t,n){let r=m_(),i={messageId:t_(),type:e,event:t,timestamp:new Date().toISOString(),distinctId:this.personId??r,anonymousId:r,personId:this.personId,sessionId:h_(),product:this.cfg.product,referrer:this.attribution.referrer,utm:this.attribution.utm,lastUtm:this.lastUtm,refCode:this.cohort.refCode??this.attribution.refCode,channel:this.cohort.channel??this.attribution.channel,signupWeek:this.cohort.signupWeek,url:Ov()?window.location.href:void 0,path:Ov()?window.location.pathname:void 0,library:`@hanzo/event`,libraryVersion:bv,...n},a=this.cfg.capturePII??!1;return i.url&&=zg(Fg(i.url),a),i.path&&=zg(Fg(i.path),a),i.referrer&&=zg(Fg(i.referrer),a),F_()&&(i.properties={...i.properties,internal:!0}),Ov()&&(i.properties={...i.properties,consent:mv(fv())}),i}schedule(){!this.timer&&this.cfg.enabled&&(this.timer=setTimeout(()=>{this.timer=null,this.flush()},this.cfg.flushIntervalMs))}clearTimer(){this.timer&&=(clearTimeout(this.timer),null)}},Nv=Symbol.for(`hanzo.event.clients.optin`);function ree(){let e=globalThis,t=e[Nv];if(t)return t;let n=new Map;return e[Nv]=n,n}function iee(e){if(!Ov()||e.enabled===!1)return new Mv(e);let t=(e.host??Sv)+`\0`+e.product,n=ree(),r=n.get(t);if(r)return r.adopt(e),r;let i=new Mv(e);return n.set(t,i),i}var Pv=(0,V.createContext)(null);function aee(e){let{client:t,config:n,autoPageview:r=!0,children:i}=e;if(!t&&!n)throw Error("AnalyticsProvider requires `client` or `config`");let a=t??iee(n);return(0,V.useEffect)(()=>{a.init(),r&&a.pageview()},[a,r]),(0,V.createElement)(Pv.Provider,{value:a},i)}new Mv({product:`unknown`,enabled:!1});var Fv=class extends V.Component{constructor(){super(...arguments),this.state={error:null},this.reset=()=>this.setState({error:null})}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){(this.props.client??this.context??void 0)?.captureError(e,{handled:!1,properties:{componentStack:t.componentStack,react:!0}})}render(){let{error:e}=this.state;if(e===null)return this.props.children;let{fallback:t}=this.props;return typeof t==`function`?t(e,this.reset):t??null}};Fv.contextType=Pv;var oee=Fv.contextType;function see(){return(0,V.useContext)(oee)}function Iv(e,t,n){(0,V.useEffect)(()=>{if(!t||typeof window>`u`||typeof document>`u`)return;let r=!1,i,a=()=>{r||b(async()=>{let{observe:e,wireProps:t}=await import(`./dist-Cy8E8G3S.js`);return{observe:e,wireProps:t}},[]).then(({observe:t,wireProps:a})=>{if(r)return;let o=t(t=>{t.kind!==`nav`&&e.track(t.name,a(t))},{nav:!1,redaction:n});i=()=>o.stop()}).catch(()=>{})},o=window,s=typeof o.requestIdleCallback==`function`,c=s?o.requestIdleCallback(a,{timeout:3e3}):window.setTimeout(a,1200);return()=>{r=!0;try{s?o.cancelIdleCallback?.(c):window.clearTimeout(c)}catch{}i?.()}},[e,t])}var Lv=e=>{try{let t=window.location,n=e==null||e===``?t:new URL(String(e),t.href);return{key:n.pathname+n.search+n.hash,path:n.pathname}}catch{return{key:``,path:void 0}}};function Rv(e,t,n){let r=(0,V.useRef)(null),i=n!==void 0;(0,V.useEffect)(()=>{if(!t||!i||!st())return;let a=n??Lv().path??``;r.current!==a&&(r.current=a,e.pageview(a))},[e,t,i,n]),(0,V.useEffect)(()=>{if(!t||i||!st())return;let n=t=>{let{key:n,path:i}=Lv(t);r.current!==n&&(r.current=n,e.pageview(i))};n();let a=window.history,o=a.pushState,s=a.replaceState;a.pushState=function(...e){let t=o.apply(this,e);return n(e[2]),t},a.replaceState=function(...e){let t=s.apply(this,e);return n(e[2]),t};let c=()=>n();return window.addEventListener(`popstate`,c),window.addEventListener(`hashchange`,c),()=>{a.pushState=o,a.replaceState=s,window.removeEventListener(`popstate`,c),window.removeEventListener(`hashchange`,c)}},[e,t,i])}var zv=(0,V.createContext)(null);function Bv(e){let{owner:t=`app`,path:n,fallback:r,client:i,children:a,host:o,product:s,ingestKey:l,getToken:u,enabled:d,consent:f,replay:p,errors:m,pageviews:h,redaction:g,debug:_}=e,v=t===`gui`,y=see(),b=y!==null&&v,[x,S]=(0,V.useState)(!1),C=!v||x&&!b;(0,V.useEffect)(()=>{if(!v||b)return;let e=()=>S(!xe());return e(),at(e)},[v,b]);let w=(0,V.useRef)(u);w.current=u;let T=(0,V.useRef)(g);T.current=g;let[E,D]=(0,V.useState)(0);(0,V.useEffect)(()=>{let e=()=>D(e=>e+1),t=c(e);if(!st())return t;let n=t=>{(t.key===null||t.key===`hz_consent`)&&e()};return window.addEventListener(`storage`,n),()=>{t(),window.removeEventListener(`storage`,n)}},[]);let O=(0,V.useMemo)(()=>i??ve({host:o,product:s,ingestKey:l,getToken:w.current?()=>w.current?.():void 0,enabled:C?d:!1,consent:f,replay:p,errors:m,pageviews:h,debug:_}),[i,o,s,l,C,d,f,p,m,h,_,E]);(0,V.useEffect)(()=>{if(C)return ae(O,{app:!v}),O.client.init(),()=>{nt()===O&&ae(void 0)}},[O,C,v]);let k=O.enabled;return Rv(O,k&&(h??!0),n),Iv(O,k&&(p??!0),T.current),(0,H.jsx)(zv.Provider,{value:O,children:(0,H.jsx)(aee,{client:b&&y?y:O.client,autoPageview:!1,children:(0,H.jsx)(Vv,{telemetry:O,enabled:k&&(m??!0),fallback:r,children:a})})})}var Vv=class extends V.Component{constructor(){super(...arguments),this.state={error:null},this.reset=()=>this.setState({error:null})}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){if(this.props.enabled&&this.props.telemetry.captureError(e,{handled:!1,properties:{componentStack:t.componentStack,react:!0}}),this.props.fallback===void 0)throw e}render(){let{error:e}=this.state;if(!e)return this.props.children;let{fallback:t}=this.props;return t===void 0?null:typeof t==`function`?t(e,this.reset):t}},Hv=({children:e,telemetry:t,...r})=>{let i=(0,H.jsx)(n,{...r,children:(0,H.jsx)(na.Provider,{value:1,children:(0,H.jsx)(Ta,{shouldAddRootHost:!0,children:e})})});return t===!1?i:(0,H.jsx)(Bv,{owner:`gui`,...typeof t==`object`?t:null,children:i})},Uv={size:`$true`,fontFamily:`$body`,borderWidth:1,outlineWidth:0,color:`$color`,tabIndex:0,borderColor:`$borderColor`,backgroundColor:`$background`,minWidth:0,hoverStyle:{borderColor:`$borderColorHover`},focusStyle:{borderColor:`$borderColorFocus`},focusVisibleStyle:{outlineColor:`$outlineColor`,outlineWidth:2,outlineStyle:`solid`}},Wv=(e=`$true`,t)=>{if(t.props.tag===`textarea`||t.props.rows>1||t.props.multiline||t.props.numberOfLines>1)return Gv(e,t);let n=le(e,t),r=g(e,{shift:-1,bounds:[2]});return{...de(e,t),...n,paddingHorizontal:r}},Gv=(e=`$true`,t)=>{let{props:n}=t,r=le(e,t),i=de(e,t),a=n.rows??n.numberOfLines,o=typeof a==`number`?a*ot(i.lineHeight):`auto`,s=g(e,{shift:-2,bounds:[2]}),c=g(e,{shift:-1,bounds:[2]});return{...r,...i,paddingVertical:s,paddingHorizontal:c,height:o}},Kv=[{name:`Input`,render:`input`,variants:{unstyled:{true:{outlineWidth:0,borderWidth:0,backgroundColor:`transparent`},false:Uv},size:{"...size":Wv},disabled:{true:{}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}},{isInput:!0,accept:{placeholderTextColor:`color`,selectionColor:`color`,cursorColor:`color`,selectionHandleColor:`color`,underlineColorAndroid:`color`},validStyles:Ee.staticConfig.validStyles}],qv=I(et,Kv[0],Kv[1]),Jv=qv.styleable((e,t)=>{let{disabled:n,id:r,onChangeText:i,onSubmitEditing:a,onSelectionChange:o,selection:s,placeholderTextColor:c,selectionColor:l,rows:u,keyboardAppearance:d,returnKeyType:f,submitBehavior:p,blurOnSubmit:m,caretHidden:h,contextMenuHidden:g,selectTextOnFocus:_,secureTextEntry:v,maxFontSizeMultiplier:y,allowFontScaling:b,multiline:x,keyboardType:S,autoCapitalize:C,autoCorrect:w,autoFocusNative:T,textContentType:E,onEndEditing:D,onContentSizeChange:O,onScroll:k,onKeyPress:A,clearButtonMode:j,clearTextOnFocus:M,enablesReturnKeyAutomatically:ee,dataDetectorTypes:N,scrollEnabled:te,passwordRules:ne,rejectResponderTermination:re,spellCheck:ie,lineBreakStrategyIOS:ae,lineBreakModeIOS:oe,smartInsertDelete:se,inputAccessoryViewID:ce,inputAccessoryViewButtonLabel:le,disableKeyboardShortcuts:ue,cursorColor:de,selectionHandleColor:fe,underlineColorAndroid:pe,importantForAutofill:me,disableFullscreenUI:P,inlineImageLeft:he,inlineImagePadding:ge,returnKeyLabel:F,textBreakStrategy:_e,textAlignVertical:ve,verticalAlign:ye,showSoftInputOnFocus:be,numberOfLines:xe,...Se}=e,{ref:Ce,composedRef:we}=ig(t),Te=ct(),I=w===!0?`on`:w===!1?`off`:w,Ee=C===`sentences`||C===`words`?`on`:C===`none`||C===`characters`?`off`:C;V.useEffect(()=>{if(!o)return;let e=Ce.current;if(!e)return;let t=()=>{o({nativeEvent:{selection:{start:e.selectionStart??0,end:e.selectionEnd??0}}})};return e.addEventListener(`select`,t),()=>e.removeEventListener(`select`,t)},[o]),V.useEffect(()=>{s&&Ce.current&&Ce.current.setSelectionRange(s.start,s.end??s.start)},[s?.start,s?.end]),V.useEffect(()=>{if(r&&!n)return xc(r,{focusAndSelect:()=>Ce.current?.focus(),focus:()=>Ce.current?.focus()})},[r,n]);let De=e=>{e.key===`Enter`&&a&&a({nativeEvent:{text:e.target.value}}),Se.onKeyDown?.(e)},Oe=e=>{i?.(e.target.value),Se.onChange?.(e)},L={...Se,disabled:n,id:r,rows:u,autoCorrect:I,autoCapitalize:Ee,onKeyDown:a?De:Se.onKeyDown,onChange:i?Oe:Se.onChange,style:{...Se.style,...c&&{"--t_placeholderColor":Te[c]?.variable||c},...l&&{"--t_selectionColor":Te[l]?.variable||l}}};return(0,H.jsx)(qv,{ref:we,...L})}),Yv=I(Jv,{name:`TextArea`,render:`textarea`,whiteSpace:`pre-wrap`,variants:{unstyled:{false:{height:`auto`,...Uv,rows:3}},size:{"...size":Gv}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),Xv=F.styleable((e,t)=>{let{size:n,color:r,...i}=e,a=ct(),o=r;return o&&o[0]===`$`&&(o=oe(a[o])),(0,H.jsx)(F,{ref:t,...i,children:(0,H.jsx)(Zs,{size:n,color:o})})}),U=I(Ee,{variants:{unstyled:{false:{color:`$color`}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),Zv=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(R,{d:`M20 19.5v.5a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8.5L18 5.5`,stroke:t}),(0,H.jsx)(R,{d:`M8 18h1`,stroke:t}),(0,H.jsx)(R,{d:`M18.42 9.61a2.1 2.1 0 1 1 2.97 2.97L16.95 17 13 18l.99-3.95 4.43-4.44Z`,stroke:t})]})})),Qv=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(R,{d:`M3 3v18h18`,stroke:t}),(0,H.jsx)(R,{d:`M18 17V9`,stroke:t}),(0,H.jsx)(R,{d:`M13 17V5`,stroke:t}),(0,H.jsx)(R,{d:`M8 17v-3`,stroke:t})]})})),$v=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(Te,{cx:`12`,cy:`12`,r:`1`,stroke:t}),(0,H.jsx)(Te,{cx:`19`,cy:`12`,r:`1`,stroke:t}),(0,H.jsx)(Te,{cx:`5`,cy:`12`,r:`1`,stroke:t})]})})),ey=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsx)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:(0,H.jsx)(R,{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`,stroke:t})})})),ty=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(R,{d:`M15 12H3`,stroke:t}),(0,H.jsx)(R,{d:`M17 18H3`,stroke:t}),(0,H.jsx)(R,{d:`M21 6H3`,stroke:t})]})})),ny=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(Ae,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,stroke:t}),(0,H.jsx)(R,{d:`M10 4v4`,stroke:t}),(0,H.jsx)(R,{d:`M2 8h20`,stroke:t}),(0,H.jsx)(R,{d:`M6 4v4`,stroke:t})]})})),ry=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(Ae,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,stroke:t}),(0,H.jsx)(R,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`,stroke:t}),(0,H.jsx)(R,{d:`M10 12h4`,stroke:t})]})})),iy=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(R,{d:`m3 16 4 4 4-4`,stroke:t}),(0,H.jsx)(R,{d:`M7 20V4`,stroke:t}),(0,H.jsx)(R,{d:`m21 8-4-4-4 4`,stroke:t}),(0,H.jsx)(R,{d:`M17 4v16`,stroke:t})]})})),ay=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(R,{d:`M12 5v14`,stroke:t}),(0,H.jsx)(R,{d:`m19 12-7 7-7-7`,stroke:t})]})})),oy=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(R,{d:`m12 19-7-7 7-7`,stroke:t}),(0,H.jsx)(R,{d:`M19 12H5`,stroke:t})]})})),sy=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(R,{d:`M5 12h14`,stroke:t}),(0,H.jsx)(R,{d:`m12 5 7 7-7 7`,stroke:t})]})})),cy=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(R,{d:`m5 12 7-7 7 7`,stroke:t}),(0,H.jsx)(R,{d:`M12 19V5`,stroke:t})]})})),ly=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(R,{d:`M10.268 21a2 2 0 0 0 3.464 0`,stroke:t}),(0,H.jsx)(R,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,stroke:t})]})})),uy=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(R,{d:`M12 8V4H8`,stroke:t}),(0,H.jsx)(Ae,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,stroke:t}),(0,H.jsx)(R,{d:`M2 14h2`,stroke:t}),(0,H.jsx)(R,{d:`M20 14h2`,stroke:t}),(0,H.jsx)(R,{d:`M15 13v2`,stroke:t}),(0,H.jsx)(R,{d:`M9 13v2`,stroke:t})]})})),dy=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(R,{d:`M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16`,stroke:t}),(0,H.jsx)(Ae,{width:`20`,height:`14`,x:`2`,y:`6`,rx:`2`,stroke:t})]})})),fy=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(R,{d:`M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z`,stroke:t}),(0,H.jsx)(R,{d:`M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2`,stroke:t}),(0,H.jsx)(R,{d:`M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2`,stroke:t}),(0,H.jsx)(R,{d:`M10 6h4`,stroke:t}),(0,H.jsx)(R,{d:`M10 10h4`,stroke:t}),(0,H.jsx)(R,{d:`M10 14h4`,stroke:t}),(0,H.jsx)(R,{d:`M10 18h4`,stroke:t})]})})),py=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(R,{d:`M8 2v4`,stroke:t}),(0,H.jsx)(R,{d:`M16 2v4`,stroke:t}),(0,H.jsx)(Ae,{width:`18`,height:`18`,x:`3`,y:`4`,rx:`2`,stroke:t}),(0,H.jsx)(R,{d:`M3 10h18`,stroke:t}),(0,H.jsx)(R,{d:`M8 14h.01`,stroke:t}),(0,H.jsx)(R,{d:`M12 14h.01`,stroke:t}),(0,H.jsx)(R,{d:`M16 14h.01`,stroke:t}),(0,H.jsx)(R,{d:`M8 18h.01`,stroke:t}),(0,H.jsx)(R,{d:`M12 18h.01`,stroke:t}),(0,H.jsx)(R,{d:`M16 18h.01`,stroke:t})]})})),my=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(R,{d:`M8 2v4`,stroke:t}),(0,H.jsx)(R,{d:`M16 2v4`,stroke:t}),(0,H.jsx)(Ae,{width:`18`,height:`18`,x:`3`,y:`4`,rx:`2`,stroke:t}),(0,H.jsx)(R,{d:`M3 10h18`,stroke:t})]})})),hy=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsx)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:(0,H.jsx)(R,{d:`M20 6 9 17l-5-5`,stroke:t})})})),gy=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsx)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:(0,H.jsx)(R,{d:`m6 9 6 6 6-6`,stroke:t})})})),_y=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsx)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:(0,H.jsx)(R,{d:`m15 18-6-6 6-6`,stroke:t})})})),vy=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsx)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:(0,H.jsx)(R,{d:`m9 18 6-6-6-6`,stroke:t})})})),yy=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsx)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:(0,H.jsx)(R,{d:`m18 15-6-6-6 6`,stroke:t})})})),by=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(R,{d:`m7 15 5 5 5-5`,stroke:t}),(0,H.jsx)(R,{d:`m7 9 5-5 5 5`,stroke:t})]})})),xy=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(Te,{cx:`12`,cy:`12`,r:`10`,stroke:t}),(0,H.jsx)(De,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,stroke:t}),(0,H.jsx)(De,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,stroke:t})]})})),Sy=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(Te,{cx:`12`,cy:`12`,r:`10`,stroke:t}),(0,H.jsx)(R,{d:`m9 12 2 2 4-4`,stroke:t})]})})),Cy=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(R,{d:`m2 2 20 20`,stroke:t}),(0,H.jsx)(R,{d:`M8.35 2.69A10 10 0 0 1 21.3 15.65`,stroke:t}),(0,H.jsx)(R,{d:`M19.08 19.08A10 10 0 1 1 4.92 4.92`,stroke:t})]})})),wy=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(Te,{cx:`12`,cy:`12`,r:`10`,stroke:t}),(0,H.jsx)(Be,{points:`12 6 12 12 16 14`,stroke:t})]})})),Ty=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(Be,{points:`16 18 22 12 16 6`,stroke:t}),(0,H.jsx)(Be,{points:`8 6 2 12 8 18`,stroke:t})]})})),Ey=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(Ae,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,stroke:t}),(0,H.jsx)(R,{d:`M9 3v18`,stroke:t}),(0,H.jsx)(R,{d:`M15 3v18`,stroke:t})]})})),Dy=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(R,{d:`m12 15 2 2 4-4`,stroke:t}),(0,H.jsx)(Ae,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,stroke:t}),(0,H.jsx)(R,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,stroke:t})]})})),Oy=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(Ae,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,stroke:t}),(0,H.jsx)(R,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,stroke:t})]})})),ky=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(Ae,{width:`20`,height:`14`,x:`2`,y:`5`,rx:`2`,stroke:t}),(0,H.jsx)(De,{x1:`2`,x2:`22`,y1:`10`,y2:`10`,stroke:t})]})})),Ay=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(De,{x1:`12`,x2:`12`,y1:`2`,y2:`22`,stroke:t}),(0,H.jsx)(R,{d:`M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6`,stroke:t})]})})),jy=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(R,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,stroke:t}),(0,H.jsx)(Be,{points:`7 10 12 15 17 10`,stroke:t}),(0,H.jsx)(De,{x1:`12`,x2:`12`,y1:`15`,y2:`3`,stroke:t})]})})),My=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(Te,{cx:`12`,cy:`12`,r:`1`,stroke:t}),(0,H.jsx)(Te,{cx:`12`,cy:`5`,r:`1`,stroke:t}),(0,H.jsx)(Te,{cx:`12`,cy:`19`,r:`1`,stroke:t})]})})),Ny=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(R,{d:`M15 3h6v6`,stroke:t}),(0,H.jsx)(R,{d:`M10 14 21 3`,stroke:t}),(0,H.jsx)(R,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,stroke:t})]})})),Py=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(R,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,stroke:t}),(0,H.jsx)(R,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,stroke:t}),(0,H.jsx)(R,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,stroke:t}),(0,H.jsx)(R,{d:`m2 2 20 20`,stroke:t})]})})),Fy=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(R,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,stroke:t}),(0,H.jsx)(Te,{cx:`12`,cy:`12`,r:`3`,stroke:t})]})})),Iy=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(R,{d:`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z`,stroke:t}),(0,H.jsx)(R,{d:`M14 2v4a2 2 0 0 0 2 2h4`,stroke:t}),(0,H.jsx)(R,{d:`M10 9H8`,stroke:t}),(0,H.jsx)(R,{d:`M16 13H8`,stroke:t}),(0,H.jsx)(R,{d:`M16 17H8`,stroke:t})]})})),Ly=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(R,{d:`M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z`,stroke:t}),(0,H.jsx)(R,{d:`M8 10v4`,stroke:t}),(0,H.jsx)(R,{d:`M12 10v2`,stroke:t}),(0,H.jsx)(R,{d:`M16 10v6`,stroke:t})]})})),Ry=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(Ae,{width:`8`,height:`5`,x:`14`,y:`17`,rx:`1`,stroke:t}),(0,H.jsx)(R,{d:`M10 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 2v2.5`,stroke:t}),(0,H.jsx)(R,{d:`M20 17v-2a2 2 0 1 0-4 0v2`,stroke:t})]})})),zy=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsx)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:(0,H.jsx)(R,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,stroke:t})})})),By=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(Te,{cx:`12`,cy:`12`,r:`10`,stroke:t}),(0,H.jsx)(R,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,stroke:t}),(0,H.jsx)(R,{d:`M2 12h20`,stroke:t})]})})),Vy=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(Te,{cx:`9`,cy:`12`,r:`1`,stroke:t}),(0,H.jsx)(Te,{cx:`9`,cy:`5`,r:`1`,stroke:t}),(0,H.jsx)(Te,{cx:`9`,cy:`19`,r:`1`,stroke:t}),(0,H.jsx)(Te,{cx:`15`,cy:`12`,r:`1`,stroke:t}),(0,H.jsx)(Te,{cx:`15`,cy:`5`,r:`1`,stroke:t}),(0,H.jsx)(Te,{cx:`15`,cy:`19`,r:`1`,stroke:t})]})})),Hy=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(De,{x1:`4`,x2:`20`,y1:`9`,y2:`9`,stroke:t}),(0,H.jsx)(De,{x1:`4`,x2:`20`,y1:`15`,y2:`15`,stroke:t}),(0,H.jsx)(De,{x1:`10`,x2:`8`,y1:`3`,y2:`21`,stroke:t}),(0,H.jsx)(De,{x1:`16`,x2:`14`,y1:`3`,y2:`21`,stroke:t})]})})),Uy=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(Te,{cx:`12`,cy:`12`,r:`10`,stroke:t}),(0,H.jsx)(R,{d:`M12 16v-4`,stroke:t}),(0,H.jsx)(R,{d:`M12 8h.01`,stroke:t})]})})),Wy=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(R,{d:`M6 5v11`,stroke:t}),(0,H.jsx)(R,{d:`M12 5v6`,stroke:t}),(0,H.jsx)(R,{d:`M18 5v14`,stroke:t})]})})),Gy=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(R,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,stroke:t}),(0,H.jsx)(R,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,stroke:t}),(0,H.jsx)(R,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,stroke:t})]})})),Ky=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(Ae,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`,stroke:t}),(0,H.jsx)(Ae,{width:`7`,height:`7`,x:`14`,y:`3`,rx:`1`,stroke:t}),(0,H.jsx)(Ae,{width:`7`,height:`7`,x:`14`,y:`14`,rx:`1`,stroke:t}),(0,H.jsx)(Ae,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`,stroke:t})]})})),qy=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(R,{d:`M9 17H7A5 5 0 0 1 7 7h2`,stroke:t}),(0,H.jsx)(R,{d:`M15 7h2a5 5 0 1 1 0 10h-2`,stroke:t}),(0,H.jsx)(De,{x1:`8`,x2:`16`,y1:`12`,y2:`12`,stroke:t})]})})),Jy=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(R,{d:`M3 6h18`,stroke:t}),(0,H.jsx)(R,{d:`M7 12h10`,stroke:t}),(0,H.jsx)(R,{d:`M10 18h4`,stroke:t})]})})),Yy=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(R,{d:`M3 12h.01`,stroke:t}),(0,H.jsx)(R,{d:`M3 18h.01`,stroke:t}),(0,H.jsx)(R,{d:`M3 6h.01`,stroke:t}),(0,H.jsx)(R,{d:`M8 12h13`,stroke:t}),(0,H.jsx)(R,{d:`M8 18h13`,stroke:t}),(0,H.jsx)(R,{d:`M8 6h13`,stroke:t})]})})),Xy=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(Ae,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,stroke:t}),(0,H.jsx)(R,{d:`M7 11V7a5 5 0 0 1 10 0v4`,stroke:t})]})})),Zy=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(R,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,stroke:t}),(0,H.jsx)(Be,{points:`16 17 21 12 16 7`,stroke:t}),(0,H.jsx)(De,{x1:`21`,x2:`9`,y1:`12`,y2:`12`,stroke:t})]})})),Qy=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(R,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,stroke:t}),(0,H.jsx)(Ae,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,stroke:t})]})})),$y=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(R,{d:`M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0`,stroke:t}),(0,H.jsx)(Te,{cx:`12`,cy:`10`,r:`3`,stroke:t})]})})),eb=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(Be,{points:`15 3 21 3 21 9`,stroke:t}),(0,H.jsx)(Be,{points:`9 21 3 21 3 15`,stroke:t}),(0,H.jsx)(De,{x1:`21`,x2:`14`,y1:`3`,y2:`10`,stroke:t}),(0,H.jsx)(De,{x1:`3`,x2:`10`,y1:`21`,y2:`14`,stroke:t})]})})),tb=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(R,{d:`m3 11 18-5v12L3 14v-3z`,stroke:t}),(0,H.jsx)(R,{d:`M11.6 16.8a3 3 0 1 1-5.8-1.6`,stroke:t})]})})),nb=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(R,{d:`M7.9 20A9 9 0 1 0 4 16.1L2 22Z`,stroke:t}),(0,H.jsx)(R,{d:`M8 12h.01`,stroke:t}),(0,H.jsx)(R,{d:`M12 12h.01`,stroke:t}),(0,H.jsx)(R,{d:`M16 12h.01`,stroke:t})]})})),rb=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsx)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:(0,H.jsx)(R,{d:`M7.9 20A9 9 0 1 0 4 16.1L2 22Z`,stroke:t})})})),ib=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsx)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:(0,H.jsx)(R,{d:`M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z`,stroke:t})})})),ab=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(R,{d:`M14 9a2 2 0 0 1-2 2H6l-4 4V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2z`,stroke:t}),(0,H.jsx)(R,{d:`M18 9h2a2 2 0 0 1 2 2v11l-4-4h-6a2 2 0 0 1-2-2v-1`,stroke:t})]})})),ob=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsx)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:(0,H.jsx)(R,{d:`M5 12h14`,stroke:t})})})),sb=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsx)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:(0,H.jsx)(R,{d:`M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z`,stroke:t})})})),cb=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(R,{d:`M13.234 20.252 21 12.3`,stroke:t}),(0,H.jsx)(R,{d:`m16 6-8.414 8.586a2 2 0 0 0 0 2.828 2 2 0 0 0 2.828 0l8.414-8.586a4 4 0 0 0 0-5.656 4 4 0 0 0-5.656 0l-8.415 8.585a6 6 0 1 0 8.486 8.486`,stroke:t})]})})),lb=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(R,{d:`M5 12h14`,stroke:t}),(0,H.jsx)(R,{d:`M12 5v14`,stroke:t})]})})),ub=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(R,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,stroke:t}),(0,H.jsx)(R,{d:`M21 3v5h-5`,stroke:t}),(0,H.jsx)(R,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,stroke:t}),(0,H.jsx)(R,{d:`M8 16H3v5`,stroke:t})]})})),db=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(R,{d:`m21 21-4.34-4.34`,stroke:t}),(0,H.jsx)(Te,{cx:`11`,cy:`11`,r:`8`,stroke:t})]})})),fb=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(R,{d:`M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z`,stroke:t}),(0,H.jsx)(Te,{cx:`12`,cy:`12`,r:`3`,stroke:t})]})})),pb=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(Te,{cx:`18`,cy:`5`,r:`3`,stroke:t}),(0,H.jsx)(Te,{cx:`6`,cy:`12`,r:`3`,stroke:t}),(0,H.jsx)(Te,{cx:`18`,cy:`19`,r:`3`,stroke:t}),(0,H.jsx)(De,{x1:`8.59`,x2:`15.42`,y1:`13.51`,y2:`17.49`,stroke:t}),(0,H.jsx)(De,{x1:`15.41`,x2:`8.59`,y1:`6.51`,y2:`10.49`,stroke:t})]})})),mb=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(R,{d:`M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z`,stroke:t}),(0,H.jsx)(R,{d:`M3 6h18`,stroke:t}),(0,H.jsx)(R,{d:`M16 10a4 4 0 0 1-8 0`,stroke:t})]})})),hb=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(De,{x1:`21`,x2:`14`,y1:`4`,y2:`4`,stroke:t}),(0,H.jsx)(De,{x1:`10`,x2:`3`,y1:`4`,y2:`4`,stroke:t}),(0,H.jsx)(De,{x1:`21`,x2:`12`,y1:`12`,y2:`12`,stroke:t}),(0,H.jsx)(De,{x1:`8`,x2:`3`,y1:`12`,y2:`12`,stroke:t}),(0,H.jsx)(De,{x1:`21`,x2:`16`,y1:`20`,y2:`20`,stroke:t}),(0,H.jsx)(De,{x1:`12`,x2:`3`,y1:`20`,y2:`20`,stroke:t}),(0,H.jsx)(De,{x1:`14`,x2:`14`,y1:`2`,y2:`6`,stroke:t}),(0,H.jsx)(De,{x1:`8`,x2:`8`,y1:`10`,y2:`14`,stroke:t}),(0,H.jsx)(De,{x1:`16`,x2:`16`,y1:`18`,y2:`22`,stroke:t})]})})),gb=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(R,{d:`M22 11v1a10 10 0 1 1-9-10`,stroke:t}),(0,H.jsx)(R,{d:`M8 14s1.5 2 4 2 4-2 4-2`,stroke:t}),(0,H.jsx)(De,{x1:`9`,x2:`9.01`,y1:`9`,y2:`9`,stroke:t}),(0,H.jsx)(De,{x1:`15`,x2:`15.01`,y1:`9`,y2:`9`,stroke:t}),(0,H.jsx)(R,{d:`M16 5h6`,stroke:t}),(0,H.jsx)(R,{d:`M19 2v6`,stroke:t})]})})),_b=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(R,{d:`M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z`,stroke:t}),(0,H.jsx)(R,{d:`M20 3v4`,stroke:t}),(0,H.jsx)(R,{d:`M22 5h-4`,stroke:t}),(0,H.jsx)(R,{d:`M4 17v2`,stroke:t}),(0,H.jsx)(R,{d:`M5 18H3`,stroke:t})]})})),vb=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(Ae,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,stroke:t}),(0,H.jsx)(R,{d:`m9 12 2 2 4-4`,stroke:t})]})})),yb=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsx)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:(0,H.jsx)(R,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,stroke:t})})})),bb=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(Te,{cx:`12`,cy:`12`,r:`4`,stroke:t}),(0,H.jsx)(R,{d:`M12 2v2`,stroke:t}),(0,H.jsx)(R,{d:`M12 20v2`,stroke:t}),(0,H.jsx)(R,{d:`m4.93 4.93 1.41 1.41`,stroke:t}),(0,H.jsx)(R,{d:`m17.66 17.66 1.41 1.41`,stroke:t}),(0,H.jsx)(R,{d:`M2 12h2`,stroke:t}),(0,H.jsx)(R,{d:`M20 12h2`,stroke:t}),(0,H.jsx)(R,{d:`m6.34 17.66-1.41 1.41`,stroke:t}),(0,H.jsx)(R,{d:`m19.07 4.93-1.41 1.41`,stroke:t})]})})),xb=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsx)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:(0,H.jsx)(R,{d:`M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18`,stroke:t})})})),Sb=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(R,{d:`M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z`,stroke:t}),(0,H.jsx)(Te,{cx:`7.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,stroke:t})]})})),Cb=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(Be,{points:`4 17 10 11 4 5`,stroke:t}),(0,H.jsx)(De,{x1:`12`,x2:`20`,y1:`19`,y2:`19`,stroke:t})]})})),wb=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(R,{d:`M3 6h18`,stroke:t}),(0,H.jsx)(R,{d:`M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6`,stroke:t}),(0,H.jsx)(R,{d:`M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2`,stroke:t}),(0,H.jsx)(De,{x1:`10`,x2:`10`,y1:`11`,y2:`17`,stroke:t}),(0,H.jsx)(De,{x1:`14`,x2:`14`,y1:`11`,y2:`17`,stroke:t})]})})),Tb=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(Be,{points:`22 7 13.5 15.5 8.5 10.5 2 17`,stroke:t}),(0,H.jsx)(Be,{points:`16 7 22 7 22 13`,stroke:t})]})})),Eb=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(R,{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`,stroke:t}),(0,H.jsx)(R,{d:`M12 9v4`,stroke:t}),(0,H.jsx)(R,{d:`M12 17h.01`,stroke:t})]})})),Db=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(Be,{points:`4 7 4 4 20 4 20 7`,stroke:t}),(0,H.jsx)(De,{x1:`9`,x2:`15`,y1:`20`,y2:`20`,stroke:t}),(0,H.jsx)(De,{x1:`12`,x2:`12`,y1:`4`,y2:`20`,stroke:t})]})})),Ob=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(R,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,stroke:t}),(0,H.jsx)(Be,{points:`17 8 12 3 7 8`,stroke:t}),(0,H.jsx)(De,{x1:`12`,x2:`12`,y1:`3`,y2:`15`,stroke:t})]})})),kb=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(R,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,stroke:t}),(0,H.jsx)(Te,{cx:`9`,cy:`7`,r:`4`,stroke:t}),(0,H.jsx)(De,{x1:`19`,x2:`19`,y1:`8`,y2:`14`,stroke:t}),(0,H.jsx)(De,{x1:`22`,x2:`16`,y1:`11`,y2:`11`,stroke:t})]})})),Ab=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(Te,{cx:`12`,cy:`8`,r:`5`,stroke:t}),(0,H.jsx)(R,{d:`M20 21a8 8 0 0 0-16 0`,stroke:t})]})})),jb=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(R,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,stroke:t}),(0,H.jsx)(Te,{cx:`12`,cy:`7`,r:`4`,stroke:t})]})})),Mb=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(R,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,stroke:t}),(0,H.jsx)(R,{d:`M16 3.128a4 4 0 0 1 0 7.744`,stroke:t}),(0,H.jsx)(R,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,stroke:t}),(0,H.jsx)(Te,{cx:`9`,cy:`7`,r:`4`,stroke:t})]})})),Nb=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(R,{d:`M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2`,stroke:t}),(0,H.jsx)(R,{d:`m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06`,stroke:t}),(0,H.jsx)(R,{d:`m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8`,stroke:t})]})})),Pb=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(Ae,{width:`8`,height:`8`,x:`3`,y:`3`,rx:`2`,stroke:t}),(0,H.jsx)(R,{d:`M7 11v4a2 2 0 0 0 2 2h4`,stroke:t}),(0,H.jsx)(Ae,{width:`8`,height:`8`,x:`13`,y:`13`,rx:`2`,stroke:t})]})})),Fb=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(R,{d:`M18 6 6 18`,stroke:t}),(0,H.jsx)(R,{d:`m6 6 12 12`,stroke:t})]})})),Ib=z((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsx)(L,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:(0,H.jsx)(R,{d:`M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z`,stroke:t})})})),Lb=(e,t=o,n={})=>V.Children.map(e,e=>typeof e==`string`||typeof e==`number`?(0,V.createElement)(t,n,e):e),W=e=>({"data-slot":e}),Rb=e=>({title:e});function zb({name:e,children:t}){return(0,H.jsx)(Ke,{name:e,children:t})}var Bb=(e,t)=>(t?e.clientX??e.nativeEvent?.pageX:e.clientY??e.nativeEvent?.pageY)??0,Vb=({begin:e,move:t,end:n,enabled:r=!0})=>({onPointerDown:t=>{if(!r)return;let n=t.currentTarget;n?.setPointerCapture&&t.pointerId!=null&&n.setPointerCapture(t.pointerId),e(t)},onPointerMove:t,onPointerUp:n,onPointerCancel:n}),Hb=24,Ub=(e,t=44,n=`both`)=>{let r=Math.min(Hb,Math.ceil((t-e)/2));return r<=0?{}:{position:`relative`,...n!==`y`&&{"data-touch-x":String(r)},...n!==`x`&&{"data-touch-y":String(r)}}},Wb=24,Gb={sm:300,compact:360,md:400,lg:`max(400px, 53vw)`,xl:1200,fullscreen:`100vw`},Kb=e=>({width:Gb[e],maxW:e===`fullscreen`?`100vw`:`calc(100vw - 32px)`,maxH:e===`fullscreen`?`100vh`:e===`xl`?`min(800px, calc(100vh - 32px))`:`calc(100vh - 32px)`,...e===`fullscreen`?{height:`100vh`}:null,rounded:e===`fullscreen`?0:`$3`,borderWidth:0,p:0,gap:0,style:e===`fullscreen`?void 0:{boxShadow:`none`}}),qb={bg:`rgba(0,0,0,0.72)`,opacity:1},Jb=(0,V.createContext)(null),Yb=e=>(0,H.jsx)(Ds,{modal:!0,...e});Ds.Trigger,Ds.Portal,Ds.Close;var Xb=e=>(0,H.jsx)(Ds.Overlay,{...W(`dialog-overlay`),bg:`rgba(0,0,0,0.5)`,opacity:.5,...e}),Zb=({showCloseButton:e=!0,overlay:t,size:n,children:r,...i})=>{let{t:a}=Ye(),o=ji();return(0,H.jsx)(Ds.Portal,{children:(0,H.jsxs)(zb,{name:o,children:[(0,H.jsx)(Xb,{...n?qb:null,...t}),(0,H.jsxs)(Ds.Content,{...W(`dialog-content`),...n?{"data-size":n}:null,bg:`$background`,borderWidth:1,borderColor:`$borderColor`,rounded:`$5`,p:Wb,gap:`$4`,width:`100%`,maxW:512,...n?Kb(n):null,...i,children:[(0,H.jsx)(Jb.Provider,{value:n??null,children:r}),e?(0,H.jsx)(Ds.Close,{asChild:!0,children:(0,H.jsx)(P,{...W(`dialog-close`),...Ub(16),position:`absolute`,t:16,insetInlineEnd:16,cursor:`pointer`,opacity:.7,hoverStyle:{opacity:1},"aria-label":a(`Close`),children:(0,H.jsx)(Fb,{size:16})})}):null]})]})})},Qb={header:{p:Wb,gap:`$2`,items:`center`},body:{px:Wb,pb:Wb},footer:{px:Wb,pb:Wb,mt:`auto`,flexWrap:`wrap`,gap:`$2`},title:{size:`$4`,fontWeight:`600`,textAlign:`center`},description:{size:`$2`,lineHeight:20,textAlign:`center`,color:`$aside`}},$b=e=>{let t=(0,V.useContext)(Jb);return(0,H.jsx)(Ds.Title,{...W(`dialog-title`),size:`$5`,fontWeight:`600`,...t?Qb.title:null,...e})};function ex(e,t=[]){if(!e)return t;if(typeof e==`string`){for(let n of e.split(/\s+/))n&&t.push(n);return t}if(typeof e==`boolean`)return t;if(typeof e==`number`||typeof e==`bigint`)return t.push(String(e)),t;if(Array.isArray(e)){for(let n of e)ex(n,t);return t}for(let n in e)e[n]&&t.push(n);return t}function tx(...e){return ex(e).join(` `)}var nx={0:0,px:1,"0.5":2,1:4,"1.5":6,2:8,"2.5":10,3:12,"3.5":14,4:16,5:20,6:24,7:28,8:32,9:36,10:40,11:44,12:48,14:56,16:64,20:80,24:96,28:112,32:128,36:144,40:160,44:176,48:192,52:208,56:224,60:240,64:256,72:288,80:320,96:384},rx=Object.fromEntries([`xs`,`sm`,`base`,`lg`,`xl`,`2xl`,`3xl`,`4xl`,`5xl`,`6xl`,`7xl`,`8xl`,`9xl`].map(e=>[e,`var(--text-${e})`])),ix={thin:100,extralight:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},ax={none:0,sm:`var(--radius-sm, 0.375rem)`,"":4,md:`var(--radius-md, 0.5rem)`,lg:`var(--radius-lg, 0.75rem)`,xl:`var(--radius-xl, 1rem)`,"2xl":`var(--radius-2xl, 1.5rem)`,"3xl":`var(--radius-3xl, 1.5rem)`,full:9999},ox={none:`1`,tight:`1.25`,snug:`1.375`,normal:`1.5`,relaxed:`1.625`,loose:`2`},sx={tighter:-.8,tight:-.4,normal:0,wide:.4,wider:.8,widest:1.6},cx={start:`flex-start`,end:`flex-end`,center:`center`,between:`space-between`,around:`space-around`,evenly:`space-evenly`,stretch:`stretch`,baseline:`baseline`},lx={t:`Top`,r:`Right`,b:`Bottom`,l:`Left`},ux=`min-w.min-h.max-w.max-h.grid-cols.grid-rows.col-span.auto-cols.auto-rows.grid-flow.col-start.col-end.row-start.row-end.place-items.place-content.place-self.justify-items.justify-self.row-span.translate-x.translate-y.scale.scale-x.scale-y.rotate.basis.will-change.mix-blend.gap-x.gap-y.space-x.space-y.overflow-x.overflow-y.transition.duration.delay.ease.blur.backdrop-blur.shadow.underline-offset.cursor.overflow.tracking.leading.rounded.border.divide.aspect.object.whitespace.align.inset.inset-x.inset-y.items.justify.content.self.opacity.text.font.bg.gap.space-x.space-y.top.right.bottom.left.w.h.size.z.p.px.py.pt.pr.pb.pl.m.mx.my.mt.mr.mb.ml`.split(`.`).sort((e,t)=>t.length-e.length),dx={t:`to top`,tr:`to top right`,r:`to right`,br:`to bottom right`,b:`to bottom`,bl:`to bottom left`,l:`to left`,tl:`to top left`},fx={sans:`var(--font-sans)`,serif:`var(--font-serif)`,mono:`var(--font-mono)`},px={0:0,75:75,100:100,150:150,200:200,300:300,500:500,700:700,1e3:1e3},mx={none:`none`,all:`all`,DEFAULT:`color, background-color, border-color, opacity, box-shadow, transform`,colors:`color, background-color, border-color, text-decoration-color, fill, stroke`,opacity:`opacity`,shadow:`box-shadow`,transform:`transform`},hx={none:`none`,sm:`0 1px 2px rgb(0 0 0 / .05)`,DEFAULT:`0 1px 3px rgb(0 0 0 / .1), 0 1px 2px rgb(0 0 0 / .06)`,md:`0 4px 6px rgb(0 0 0 / .1), 0 2px 4px rgb(0 0 0 / .06)`,lg:`0 10px 15px rgb(0 0 0 / .1), 0 4px 6px rgb(0 0 0 / .05)`,xl:`0 20px 25px rgb(0 0 0 / .1), 0 10px 10px rgb(0 0 0 / .04)`,"2xl":`0 25px 50px rgb(0 0 0 / .25)`,inner:`inset 0 2px 4px rgb(0 0 0 / .06)`},gx={none:0,xs:4,sm:8,DEFAULT:8,md:12,lg:16,xl:24,"2xl":40,"3xl":64},_x={auto:`auto`,min:`min-content`,max:`max-content`,fr:`minmax(0, 1fr)`},vx=e=>{let t=/^\[(.+)]$/.exec(e);return t?t[1]:_x[e]??null},yx={row:`row`,col:`column`,dense:`dense`,"row-dense":`row dense`,"col-dense":`column dense`},bx=e=>e.replace(/\\_/g,`\0`).replace(/_/g,` `).replace(/\u0000/g,`_`);function xx(e,t){if(e===`none`)return{[t]:`none`};if(/^\d+$/.test(e))return{[t]:`repeat(${e}, minmax(0, 1fr))`};let n=/^\[(.+)]$/.exec(e);return n?{[t]:bx(n[1])}:null}function Sx(e,t){return e===`auto`?{[t]:`auto`}:/^-?\d+$/.test(e)?{[t]:+e}:null}var Cx=e=>e.includes(`calc(`)?e.replace(/(?<=[\w%)])\s*\+\s*/g,` + `).replace(/(?<=[\w%)])\s*-\s*(?=[\d.(])/g,` - `):e;function wx(e){if(e===`full`)return`100%`;if(e===`screen`)return`100vh`;if(e===`auto`||e===`fit`||e===`min`||e===`max`)return e===`fit`?`fit-content`:e;if(e in nx)return nx[e];let t=/^(\d+)\/(\d+)$/.exec(e);if(t)return`${(+t[1]/t[2]*100).toFixed(4).replace(/\.?0+$/,``)}%`;let n=/^\[(.+)]$/.exec(e);if(n)return Cx(bx(n[1]))}function Tx(e){if(e===`transparent`)return`transparent`;if(e===`current`)return`currentColor`;if(e===`white`)return`#fff`;if(e===`black`)return`#000`;let t=/^(.+?)(?:\/(\[[\d.]+]|\d{1,3}))?$/.exec(e);if(!t)return;let[,n,r]=t,i=/^\[(.+)]$/.exec(n),a=i?i[1]:n===`white`?`#fff`:n===`black`?`#000`:`var(--${n})`;return r?`color-mix(in srgb, ${a} ${r[0]===`[`?+(r.slice(1,-1)*100).toFixed(4):+r}%, transparent)`:a}var Ex=/^(margin|top|right|bottom|left|zIndex|translate)/,Dx=/^([a-z]+)\((-?[\d.]+)([a-z%]*)\)$/i;function Ox(e){switch(e){case`flex`:return{display:`flex`,flexDirection:`row`};case`inline-flex`:return{display:`inline-flex`,flexDirection:`row`};case`grid`:return{display:`grid`};case`inline-grid`:return{display:`inline-grid`};case`block`:return{display:`block`};case`inline`:return{display:`inline`};case`inline-block`:return{display:`inline-block`};case`hidden`:return{display:`none`};case`invisible`:return{opacity:0};case`visible`:return{opacity:1};case`box-content`:return{boxSizing:`content-box`};case`box-border`:return{boxSizing:`border-box`};case`flex-col`:return{flexDirection:`column`};case`flex-row`:return{flexDirection:`row`};case`flex-col-reverse`:return{flexDirection:`column-reverse`};case`flex-row-reverse`:return{flexDirection:`row-reverse`};case`flex-wrap`:return{flexWrap:`wrap`};case`flex-nowrap`:return{flexWrap:`nowrap`};case`flex-1`:return{flexGrow:1,flexShrink:1,flexBasis:`0%`};case`flex-auto`:return{flex:`auto`};case`flex-none`:return{flex:`none`};case`flex-initial`:return{flex:`initial`};case`flex-shrink-0`:case`shrink-0`:return{flexShrink:0};case`flex-grow`:case`grow`:return{flexGrow:1};case`flex-grow-0`:case`grow-0`:return{flexGrow:0};case`absolute`:return{position:`absolute`};case`relative`:return{position:`relative`};case`fixed`:return{position:`fixed`};case`sticky`:return{position:`sticky`};case`static`:return{position:`static`};case`inset-0`:return{top:0,right:0,bottom:0,left:0};case`uppercase`:return{textTransform:`uppercase`};case`lowercase`:return{textTransform:`lowercase`};case`capitalize`:return{textTransform:`capitalize`};case`normal-case`:return{textTransform:`none`};case`italic`:return{fontStyle:`italic`};case`not-italic`:return{fontStyle:`normal`};case`underline`:return{textDecorationLine:`underline`};case`line-through`:return{textDecorationLine:`line-through`};case`no-underline`:return{textDecorationLine:`none`};case`truncate`:return{overflow:`hidden`,whiteSpace:`nowrap`,textOverflow:`ellipsis`};case`container`:return{width:`100%`,$sm:{maxWidth:640},$md:{maxWidth:768},$lg:{maxWidth:1024},$xl:{maxWidth:1280}};case`mx-auto`:return{marginLeft:`auto`,marginRight:`auto`};case`my-auto`:return{marginTop:`auto`,marginBottom:`auto`};case`border`:return{borderWidth:1};case`rounded`:return{borderRadius:ax[``]};case`snap-none`:return{scrollSnapType:`none`};case`snap-x`:return{scrollSnapType:`x mandatory`};case`snap-y`:return{scrollSnapType:`y mandatory`};case`snap-both`:return{scrollSnapType:`both mandatory`};case`snap-mandatory`:return{};case`snap-start`:return{scrollSnapAlign:`start`};case`snap-end`:return{scrollSnapAlign:`end`};case`snap-center`:return{scrollSnapAlign:`center`};case`snap-align-none`:return{scrollSnapAlign:`none`};case`snap-normal`:return{scrollSnapStop:`normal`};case`snap-always`:return{scrollSnapStop:`always`};case`select-none`:return{userSelect:`none`};case`break-words`:return{overflowWrap:`break-word`};case`break-all`:return{wordBreak:`break-all`};case`break-normal`:return{overflowWrap:`normal`,wordBreak:`normal`};case`break-keep`:return{wordBreak:`keep-all`};case`transform-gpu`:return{transform:`translateZ(0)`};case`outline-none`:return{outlineStyle:`none`};case`pointer-events-none`:return{pointerEvents:`none`};case`sr-only`:return{position:`absolute`,width:1,height:1,overflow:`hidden`};case`tabular-nums`:return{fontVariantNumeric:`tabular-nums`};case`transform`:return{transform:`translateZ(0)`};case`transition`:return{transitionProperty:mx.DEFAULT};case`blur`:return{filter:`blur(${gx.DEFAULT}px)`};case`shadow`:return{boxShadow:hx.DEFAULT}}if(e.startsWith(`-`)){let t=Ox(e.slice(1));if(!t)return null;let n={};for(let e in t){let r=t[e];n[e]=typeof r==`number`&&Ex.test(e)?-r:typeof r==`string`&&/^[\d.]+%$/.test(r)&&Ex.test(e)?`-${r}`:e===`transform`&&typeof r==`string`&&Dx.test(r)?r.replace(Dx,(e,t,n,r)=>`${t}(${-Number(n)}${r})`):r}return n}let t=``,n=``;for(let r of ux)if(e.length>r.length+1&&e.startsWith(r+`-`)){t=r,n=e.slice(r.length+1);break}if(!t)return null;let r=/^([pm])([xytrbl])?$/.exec(t);if(r){let[,e,t]=r,i=n===`auto`?`auto`:nx[n]??wx(n);if(i===void 0)return null;let a=e===`p`?`padding`:`margin`;return t?t===`x`?{[`${a}Left`]:i,[`${a}Right`]:i}:t===`y`?{[`${a}Top`]:i,[`${a}Bottom`]:i}:{[`${a}${lx[t]}`]:i}:{[a]:i}}switch(t){case`gap`:{let e=nx[n]??wx(n);return e===void 0?null:{gap:e}}case`space-y`:{let e=nx[n]??wx(n);return e===void 0?null:{rowGap:e}}case`space-x`:{let e=nx[n]??wx(n);return e===void 0?null:{columnGap:e}}case`gap-x`:{let e=nx[n]??wx(n);return e===void 0?null:{columnGap:e}}case`gap-y`:{let e=nx[n]??wx(n);return e===void 0?null:{rowGap:e}}case`items`:return cx[n]?{alignItems:cx[n]}:null;case`justify`:return cx[n]?{justifyContent:cx[n]}:null;case`self`:return cx[n]?{alignSelf:cx[n]}:null;case`content`:return cx[n]?{alignContent:cx[n]}:null;case`w`:{let e=wx(n);return e===void 0?null:{width:e}}case`h`:{let e=n===`screen`?`100vh`:wx(n);return e===void 0?null:{height:e}}case`size`:{let e=wx(n);return e===void 0?null:{width:e,height:e}}case`min-w`:{let e=wx(n);return e===void 0?null:{minWidth:e}}case`min-h`:{let e=n===`screen`?`100vh`:wx(n);return e===void 0?null:{minHeight:e}}case`max-w`:{let e=Ax[n]??wx(n);return e===void 0?null:{maxWidth:e}}case`max-h`:{let e=n===`screen`?`100vh`:wx(n);return e===void 0?null:{maxHeight:e}}case`text`:{if(n in rx)return{fontSize:rx[n],lineHeight:`var(--text-${n}--line-height, normal)`};if(n===`left`||n===`center`||n===`right`||n===`justify`)return{textAlign:n};let e=/^\[(.+)]$/.exec(n);if(e&&/^-?[\d.]+(px|rem|em|ch|ex|vw|vh|vmin|vmax|%|pt)?$/.test(e[1]))return{fontSize:e[1],lineHeight:`normal`};let t=Tx(n);return t?{color:t}:null}case`bg`:{let e=/^clip-(text|border|padding|content)$/.exec(n);if(e){let t=e[1]===`text`?`text`:`${e[1]}-box`;return{backgroundClip:t,WebkitBackgroundClip:t}}let t=/^origin-(border|padding|content)$/.exec(n);if(t)return{backgroundOrigin:`${t[1]}-box`};let r=Tx(n);return r?{backgroundColor:r}:null}case`font`:return ix[n]===void 0?fx[n]?{fontFamily:fx[n]}:null:{fontWeight:ix[n]};case`leading`:{let e=/^\[(.+)]$/.exec(n);return e?{lineHeight:e[1]}:n in ox?{lineHeight:ox[n]}:n in nx?{lineHeight:`${nx[n]}px`}:null}case`tracking`:{if(sx[n]!==void 0)return{letterSpacing:sx[n]};let e=/^\[(.+)]$/.exec(n);return e?{letterSpacing:e[1]}:null}case`underline-offset`:{let e=/^\[(.+)]$/.exec(n);return e?{textUnderlineOffset:e[1]}:/^\d+$/.test(n)?{textUnderlineOffset:`${n}px`}:n===`auto`?{textUnderlineOffset:`auto`}:null}case`rounded`:{if(n in ax)return{borderRadius:ax[n]};let e=/^([trbl]|tl|tr|br|bl)-(.+)$/.exec(n);return e&&e[2]in ax?{[`border${jx[e[1]]}Radius`]:ax[e[2]]}:null}case`border`:{if(/^\d+$/.test(n))return{borderWidth:+n};let e=/^([trbl])(?:-(\d+))?$/.exec(n);if(e)return{[`border${lx[e[1]]}Width`]:e[2]?+e[2]:1};let t=Tx(n);return t?{borderColor:t}:null}case`opacity`:return/^\d+$/.test(n)?{opacity:n/100}:null;case`z`:{if(/^-?\d+$/.test(n))return{zIndex:+n};let e=/^\[(-?\d+)]$/.exec(n);return e?{zIndex:+e[1]}:null}case`cursor`:return{cursor:n};case`overflow`:return{overflow:n};case`overflow-x`:return{overflowX:n};case`overflow-y`:return{overflowY:n};case`top`:case`right`:case`bottom`:case`left`:{let e=n===`auto`?`auto`:nx[n]??wx(n);return e===void 0?null:{[t]:e}}case`inset`:{let e=nx[n]??wx(n);return e===void 0?null:{top:e,right:e,bottom:e,left:e}}case`grid-cols`:return xx(n,`gridTemplateColumns`);case`grid-rows`:return xx(n,`gridTemplateRows`);case`auto-cols`:{let e=vx(n);return e?{gridAutoColumns:e}:null}case`auto-rows`:{let e=vx(n);return e?{gridAutoRows:e}:null}case`grid-flow`:return yx[n]?{gridAutoFlow:yx[n]}:null;case`col-span`:return n===`full`?{gridColumn:`1 / -1`}:/^\d+$/.test(n)?{gridColumn:`span ${n} / span ${n}`}:null;case`col-start`:return Sx(n,`gridColumnStart`);case`col-end`:return Sx(n,`gridColumnEnd`);case`row-start`:return Sx(n,`gridRowStart`);case`row-end`:return Sx(n,`gridRowEnd`);case`place-items`:return{alignItems:cx[n]??n,justifyItems:cx[n]??n};case`place-content`:return{alignContent:cx[n]??n,justifyContent:cx[n]??n};case`place-self`:return{alignSelf:cx[n]??n,justifySelf:cx[n]??n};case`justify-items`:return{justifyItems:cx[n]??n};case`justify-self`:return{justifySelf:cx[n]??n};case`aspect`:return n===`square`?{aspectRatio:1}:n===`video`?{aspectRatio:16/9}:null;case`object`:return{objectFit:n};case`whitespace`:return{whiteSpace:n};case`align`:return{verticalAlign:n};case`transition`:return mx[n]?{transitionProperty:mx[n]}:null;case`duration`:return px[n]===void 0?null:{transitionDuration:`${px[n]}ms`};case`delay`:return px[n]===void 0?null:{transitionDelay:`${px[n]}ms`};case`ease`:return kx[n]?{transitionTimingFunction:kx[n]}:null;case`blur`:return gx[n]===void 0?null:{filter:`blur(${gx[n]}px)`};case`backdrop-blur`:return gx[n]===void 0?null:{backdropFilter:`blur(${gx[n]}px)`};case`row-span`:return/^\d+$/.test(n)?{gridRow:`span ${n} / span ${n}`}:null;case`translate-x`:{let e=nx[n]??wx(n);return e===void 0?null:{transform:`translateX(${typeof e==`number`?e+`px`:e})`}}case`translate-y`:{let e=nx[n]??wx(n);return e===void 0?null:{transform:`translateY(${typeof e==`number`?e+`px`:e})`}}case`scale`:{let e=Number(n);return Number.isFinite(e)?{transform:`scale(${e/100})`}:null}case`scale-x`:{let e=Number(n);return Number.isFinite(e)?{transform:`scaleX(${e/100})`}:null}case`scale-y`:{let e=Number(n);return Number.isFinite(e)?{transform:`scaleY(${e/100})`}:null}case`rotate`:{let e=Number(n);return Number.isFinite(e)?{transform:`rotate(${e}deg)`}:null}case`basis`:{let e=wx(n);return e===void 0?null:{flexBasis:e}}case`will-change`:return{willChange:n};case`mix-blend`:return{mixBlendMode:n};case`shadow`:{if(hx[n])return{boxShadow:hx[n]};let e=/^\[(.+)]$/.exec(n);return e?{boxShadow:bx(e[1])}:null}case`inset-x`:{let e=nx[n]??wx(n);return e===void 0?null:{left:e,right:e}}case`inset-y`:{let e=nx[n]??wx(n);return e===void 0?null:{top:e,bottom:e}}}return null}var kx={linear:`linear`,in:`cubic-bezier(0.4, 0, 1, 1)`,out:`cubic-bezier(0, 0, 0.2, 1)`,"in-out":`cubic-bezier(0.4, 0, 0.2, 1)`},Ax={none:`none`,xs:320,sm:384,md:448,lg:512,xl:576,"2xl":672,"3xl":768,"4xl":896,"5xl":1024,"6xl":1152,"7xl":1280,full:`100%`,prose:`65ch`,screen:`100vw`,"screen-sm":640,"screen-md":768,"screen-lg":1024,"screen-xl":1280,"screen-2xl":1536},jx={t:`Top`,r:`Right`,b:`Bottom`,l:`Left`,tl:`TopLeft`,tr:`TopRight`,br:`BottomRight`,bl:`BottomLeft`},Mx={xs:``,sm:`$sm`,md:`$md`,lg:`$lg`,xl:`$xl`,"2xl":`$2xl`,hover:`hoverStyle`,focus:`focusStyle`,"focus-visible":`focusVisibleStyle`,active:`pressStyle`,disabled:`disabledStyle`,dark:`$theme-dark`,"group-hover":`groupHoverStyle`};function Nx(e){let t={},n=[],r={};for(let i of ex(e)){let e=i.split(`:`),a=e.pop();if(!e.length){let e=/^(?:bg-gradient-to-([a-z]{1,2})|(from|via|to)-(.+))$/.exec(a);if(e){e[1]?r.dir=dx[e[1]]:r[e[2]]=Tx(e[3]);continue}}let o=Ox(a);if(!o){n.push(i);continue}if(!e.length){Object.assign(t,o);continue}let s=Mx[e[e.length-1]];if(s===void 0){n.push(i);continue}if(!s){Object.assign(t,o);continue}let c=t[s]??={};Object.assign(c,o)}let i=[r.from,r.via,r.to].filter(Boolean);return i.length>1&&(t.backgroundImage=`linear-gradient(${r.dir??`to right`}, ${i.join(`, `)})`),{props:t,rest:n.join(` `)}}var Px=(...e)=>{let{props:t,rest:n}=Nx(tx(...e));return n?{...t,className:n}:t},Fx=(0,V.createContext)(`regular`);function Ix({value:e,children:t}){return(0,H.jsx)(Fx.Provider,{value:e,children:t})}var Lx=()=>(0,V.useContext)(Fx),Rx=(e,t)=>e??(t===`compact`?`sm`:`default`),zx=(0,V.createContext)(null),Bx={borderWidth:1,borderColor:`$rim`,rounded:`$xs`,p:`$0.5`,bg:`$panel`};function Vx({attached:e=!0,framed:t=!1,size:n,variant:r,tone:i,children:a,...o}){let s=V.Children.toArray(a).filter(V.isValidElement),c={size:n,variant:r,tone:i,framed:t},l=t?Bx:null;return e?(0,H.jsx)(zx.Provider,{value:c,children:(0,H.jsx)(Xc,{...W(`button-group`),"data-attached":``,role:`group`,unstyled:!0,display:`inline-flex`,self:`flex-start`,items:`center`,...l,...o,children:s.map((e,t)=>(0,H.jsx)(Xc.Item,{...t>0?{marginInlineStart:-1}:null,focusStyle:{zIndex:1},children:e},e.key??t))})}):(0,H.jsx)(zx.Provider,{value:c,children:(0,H.jsx)(P,{...W(`button-group`),role:`group`,display:`inline-flex`,self:`flex-start`,items:`center`,gap:`$0.5`,...l,...o,children:s})})}var Hx=10,Ux=600,Wx=300,Gx=(0,V.createContext)(null),Kx=(0,V.createContext)(!1),qx=({offset:e=Hx,delay:t,...n})=>{let[r,i]=(0,V.useState)({}),a=(0,V.useCallback)(e=>i(t=>({...t,...e})),[]),o=(0,V.useContext)(Kx);return(0,H.jsx)(Gx.Provider,{value:a,children:(0,H.jsx)(ng,{offset:r.offset??e,delay:t??(o?void 0:Ux),...n})})},Jx=ng.Trigger,Yx=({delay:e=Ux,...t})=>(0,H.jsx)(Kx.Provider,{value:!0,children:(0,H.jsx)(Zh,{delay:e,...t})}),Xx=({sideOffset:e,startIcon:t,description:n,children:r,...i})=>{let a=ji(),o=(0,V.useContext)(Gx);return(0,V.useEffect)(()=>{e!==void 0&&o?.({offset:e})},[o,e]),(0,H.jsx)(zb,{name:a,children:(0,H.jsx)(ng.Content,{...W(`tooltip-content`),componentName:`Hint`,bg:`$panel`,borderWidth:1,borderColor:`$borderColor`,rounded:`$3`,px:`$1.5`,py:`$1`,maxW:Wx,...i,children:t||n?(0,H.jsxs)(F,{gap:`$0.5`,children:[(0,H.jsxs)(P,{items:`center`,gap:`$1`,children:[t?(0,H.jsx)(P,{shrink:0,children:t}):null,Lb(r,void 0,{size:`$1`,fontWeight:`500`})]}),n?typeof n==`string`?(0,H.jsx)(U,{...W(`tooltip-description`),fontSize:`$1`,lineHeight:`$1`,color:`$aside`,style:{whiteSpace:`pre-line`},children:n}):n:null]}):Lb(r,void 0,{size:`$1`})})})},Zx={"data-i18n-mirror":``},Qx={"data-i18n-ltr":``},$x=e=>typeof e==`string`?`\u2066${e}\u2069`:e,eS=e=>({textAlign:e}),tS=e=>typeof Element<`u`&&e instanceof Element&&getComputedStyle(e).direction===`rtl`,nS=e=>{let t=e.key??``;return tS(e.currentTarget)?t===`ArrowLeft`?`ArrowRight`:t===`ArrowRight`?`ArrowLeft`:t:t},rS=20,iS=I(P,{name:`Kbd`,render:`kbd`,display:`inline-flex`,pointerEvents:`none`,style:{userSelect:`none`},items:`center`,justify:`center`,gap:`$1`,height:rS,minW:rS,px:`$1`,rounded:`$1`,bg:`$hover`}),aS=I(o,{name:`KbdText`,size:`$1`,fontWeight:`500`,color:`$quiet`}),oS={height:18,minW:16,px:`$0.5`,bg:`$panel`,borderWidth:1,borderColor:`$rim`,rounded:`$xs`,style:{userSelect:`none`,boxShadow:`var(--shadow-underline, 0 1px 0 0 var(--border-strong))`}};function sS({children:e,variant:t=`default`,...n}){return(0,H.jsx)(iS,{"data-slot":`kbd`,...Qx,...t===`cap`?{"data-variant":`cap`,...oS}:null,...n,children:Lb(e,aS,t===`cap`?{color:`$aside`}:{})})}var cS=e=>{let t=e===`mac`,n=t?{glyph:`⌘`,word:`Command`}:{glyph:`Ctrl`,word:`Control`};return{mod:n,commandorcontrol:n,cmdorctrl:n,command:{glyph:`⌘`,word:`Command`},cmd:{glyph:`⌘`,word:`Command`},meta:{glyph:`⌘`,word:`Command`},control:t?{glyph:`⌃`,word:`Control`}:{glyph:`Ctrl`,word:`Control`},ctrl:t?{glyph:`⌃`,word:`Control`}:{glyph:`Ctrl`,word:`Control`},alt:t?{glyph:`⌥`,word:`Option`}:{glyph:`Alt`,word:`Alt`},option:t?{glyph:`⌥`,word:`Option`}:{glyph:`Alt`,word:`Alt`},shift:{glyph:`⇧`,word:`Shift`},enter:{glyph:`⏎`,word:`Enter`},return:{glyph:`⏎`,word:`Enter`},backspace:{glyph:`⌫`,word:`Backspace`},delete:{glyph:`⌦`,word:`Delete`},escape:{glyph:`esc`,word:`Escape`},esc:{glyph:`esc`,word:`Escape`},tab:{glyph:`⇥`,word:`Tab`},space:{glyph:`Space`,word:`Space`},arrowup:{glyph:`↑`,word:`Up arrow`},arrowdown:{glyph:`↓`,word:`Down arrow`},arrowleft:{glyph:`←`,word:`Left arrow`},arrowright:{glyph:`→`,word:`Right arrow`},up:{glyph:`↑`,word:`Up arrow`},down:{glyph:`↓`,word:`Down arrow`},left:{glyph:`←`,word:`Left arrow`},right:{glyph:`→`,word:`Right arrow`}}},lS=(e,t)=>{let n=cS(t)[e.toLowerCase()];if(n)return n;let r=e.length===1?e.toUpperCase():e;return{glyph:r,word:r}},uS=e=>e.length>0&&Array.isArray(e[0])?e.map(e=>[...e]):[[...e]];function dS(e,t={}){let n=t.platform??pS(),r=t.combinationSeparator??(n===`mac`?``:` `);return uS(e).map(e=>e.map(e=>lS(e,n).glyph).join(r)).join(` ${t.sequenceJoinLabel??`then`} `)}function fS(e,t,n=`then`){return uS(e).map(e=>e.map(e=>lS(e,t).word).join(` + `)).join(` ${n} `)}function pS(){if(typeof navigator>`u`)return`other`;let e=navigator,t=e.userAgentData?.platform??e.platform??e.userAgent??``;return/mac|iphone|ipad|ipod/i.test(t)?`mac`:`other`}var mS=()=>()=>{};function hS({keys:e,platform:t,variant:n=`keys`,visibility:r=`always`,sequenceJoinLabel:i,combinationSeparator:a,...s}){let{t:c}=Ye(),l=i??c(`then`),u=(0,V.useSyncExternalStore)(mS,pS,()=>`other`),d=t??u,f=fS(e,d,l),p=r===`desktop`?{$touchable:{display:`none`}}:null,m={...W(`shortcut`),"data-variant":n,role:`img`,"aria-label":f,display:`inline-flex`,items:`center`,...p};if(n===`text`||n===`button`){let t=dS(e,{platform:d,sequenceJoinLabel:l,combinationSeparator:a});return(0,H.jsxs)(P,{...m,...n===`button`?{gap:6,marginInlineStart:`$1`,opacity:.5}:null,...s,children:[n===`button`?(0,H.jsx)(P,{"aria-hidden":!0,width:1,height:8,opacity:.4,style:{backgroundColor:`currentColor`}}):null,(0,H.jsx)(o,{"aria-hidden":!0,size:`$2`,...n===`button`?{fontWeight:`500`}:null,children:$x(t)})]})}let h=uS(e);return(0,H.jsx)(P,{...m,gap:`$1`,...s,children:(0,H.jsx)(P,{...Qx,display:`inline-flex`,items:`center`,gap:`$1`,children:h.map((e,t)=>(0,H.jsxs)(P,{"aria-hidden":!0,display:`inline-flex`,items:`center`,gap:`$1`,children:[t>0?(0,H.jsx)(o,{size:`$1`,color:`$hint`,children:l}):null,e.map((e,t)=>(0,H.jsx)(sS,{variant:`cap`,children:lS(e,d).glyph},t))]},t))})})}var gS=({variant:e,size:t,className:n}={})=>[...new Set([`btn`,`btn-${e??`default`}`,`btn-${t??`default`}`,n].filter(Boolean))].join(` `),_S=({variant:e}={})=>`badge badge-${e??`default`}`,vS=44,yS={default:36,sm:32,xs:24,lg:40,icon:36,"icon-sm":32,"icon-xs":24,"icon-2xs":20,"icon-lg":40},bS={default:`$3`,sm:`$2`,xs:`$2`,lg:`$3`,icon:`$3`,"icon-sm":`$2`,"icon-xs":`$2`,"icon-2xs":`$1`,"icon-lg":`$3`},xS={default:16,sm:14,xs:14,lg:16,icon:16,"icon-sm":16,"icon-xs":14,"icon-2xs":14,"icon-lg":20},SS={default:16,sm:14,xs:12,lg:16,icon:16,"icon-sm":14,"icon-xs":12,"icon-2xs":12,"icon-lg":16},CS=I(se.Frame,{name:`Button`,items:`center`,justify:`center`,gap:`$2`,shrink:0,rounded:`$3`,borderWidth:1,borderColor:`transparent`,cursor:`pointer`,variants:{variant:{default:{bg:`$panel`,color:`$ink`,borderColor:`$borderColor`,hoverStyle:{bg:`$hover`,borderColor:`$rim`}},primary:{bg:`$accentBackground`,color:`$accentColor`,borderColor:`$rim`,hoverStyle:{bg:`$accentHover`,borderColor:`$bound`}},destructive:{bg:`var(--destructive)`,color:`var(--destructive-foreground)`,hoverStyle:{bg:`var(--destructive-hover)`}},outline:{bg:`$background`,color:`$ink`,borderColor:`$borderColor`,hoverStyle:{bg:`$hover`}},secondary:{bg:`$edge`,color:`$ink`,hoverStyle:{opacity:.8}},ghost:{bg:`transparent`,color:`$ink`,hoverStyle:{bg:`$hover`}},link:{bg:`transparent`,color:`$ink`,hoverStyle:{textDecorationLine:`underline`}},linkFG:{bg:`transparent`,color:`$ink`,hoverStyle:{textDecorationLine:`underline`}},linkMuted:{bg:`transparent`,color:`$quiet`,hoverStyle:{color:`$ink`,textDecorationLine:`underline`}}},size:{default:{height:`auto`,minHeight:yS.default,px:`$4`,$touchable:{minHeight:vS}},sm:{height:`auto`,minHeight:yS.sm,px:`$3`,gap:`$1.5`,$touchable:{minHeight:vS}},xs:{height:`auto`,minHeight:yS.xs,px:`$2`,gap:`$1`,$touchable:{minHeight:vS}},lg:{height:`auto`,minHeight:yS.lg,px:`$6`,$touchable:{minHeight:vS}},icon:{height:`auto`,minHeight:yS.icon,width:`auto`,minWidth:yS.icon,px:0,$touchable:{minHeight:vS,minWidth:vS}},"icon-sm":{height:`auto`,minHeight:yS[`icon-sm`],width:`auto`,minWidth:yS[`icon-sm`],px:0,$touchable:{minHeight:vS,minWidth:vS}},"icon-xs":{height:`auto`,minHeight:yS[`icon-xs`],width:`auto`,minWidth:yS[`icon-xs`],px:0,$touchable:{minHeight:vS,minWidth:vS}},"icon-2xs":{height:`auto`,minHeight:yS[`icon-2xs`],width:`auto`,minWidth:yS[`icon-2xs`],px:0,rounded:`$xs`,$touchable:{minHeight:vS,minWidth:vS}},"icon-lg":{height:`auto`,minHeight:yS[`icon-lg`],width:`auto`,minWidth:yS[`icon-lg`],px:0,$touchable:{minHeight:vS,minWidth:vS}}},compact:{true:{px:`$2`,gap:`$1`}},tone:(e,{props:t})=>{let n=wS[e];if(!n)return{};switch(t.variant){case`primary`:return{bg:n.fill,color:n.fillInk,borderColor:`transparent`,hoverStyle:{bg:n.fillHover,borderColor:`transparent`}};case`secondary`:return{bg:n.soft,color:n.ink,hoverStyle:{bg:n.softHover,opacity:1}};case`ghost`:return{color:n.ink,hoverStyle:{bg:n.tint}};case`default`:case`outline`:case void 0:return{color:n.ink,borderColor:n.edge,hoverStyle:{bg:n.tint,borderColor:n.edge}};default:return{color:n.ink}}},elevated:(e,{props:t})=>e?{...t.variant==="default"||t.variant===`outline`||t.variant===void 0?{bg:`var(--surface-page)`,borderColor:`$rim`}:null}:{},fullWidth:{true:{width:`100%`,self:`stretch`}},round:{true:{rounded:`$10`}},disabled:{true:{opacity:.5,pointerEvents:`none`,cursor:`default`}}},defaultVariants:{variant:`default`,size:`default`}}),wS={accent:{ink:`var(--primary)`,edge:`var(--primary)`,tint:`$hover`,soft:`$hover`,softHover:`$raised`,fill:`var(--primary)`,fillInk:`var(--primary-foreground)`,fillHover:`var(--primary-hover)`},danger:{ink:`$bad`,edge:`$red7`,tint:`var(--state-error-bg)`,soft:`var(--state-error-bg)`,softHover:`$red4`,fill:`var(--destructive)`,fillInk:`var(--destructive-foreground)`,fillHover:`var(--destructive-hover)`},success:{ink:`$good`,edge:`$green7`,tint:`var(--state-success-bg)`,soft:`var(--state-success-bg)`,softHover:`$green4`,fill:`$green9`,fillInk:`#ffffff`,fillHover:`$green10`}},TS=(e,t)=>{if(e!==`neutral`)return t===`primary`?wS[e].fillInk:wS[e].ink},ES=(e,t,n)=>{if(!(0,V.isValidElement)(e))return e;let r=e.props,i={...r.size==null?{size:t}:null,...n&&r.color==null?{color:n}:null};return Object.keys(i).length?(0,V.cloneElement)(e,i):e},DS=new Set([`icon-xs`,`icon-2xs`]),OS=1e3;function kS({tooltip:e,...t}){if(e==null||e===!1)return(0,H.jsx)(AS,{...t});let n=typeof e==`string`&&t[`aria-label`]==null?{"aria-label":e}:null;return(0,H.jsxs)(qx,{delay:OS,placement:`bottom`,children:[(0,H.jsx)(Jx,{asChild:!0,children:(0,H.jsx)(AS,{...t,...t.disabled?{focusableWhenDisabled:!0}:null,...n})}),(0,H.jsx)(Xx,{children:e})]})}function AS({className:e,variant:t,size:n,asChild:r=!1,isLoading:i=!1,disabled:a,startIcon:o,endIcon:s,shortcut:c,shortcutJoinLabel:l,emphasis:u=`standard`,tone:d,loadingPosition:f=`start`,fullWidth:p,elevated:m,shape:h,focusableWhenDisabled:g,children:_,...v}){let y=Lx(),b=(0,V.useContext)(zx),x=t??b?.variant??`default`,S=d??b?.tone??`neutral`,C=n??b?.size??(y===`compact`?`sm`:`default`),w=y===`compact`&&n==null&&b?.size==null,T=u===`subtle`?{color:`$hint`}:null,E=u===`subtle`?`$hint`:TS(S,x),D=y===`compact`?{fontWeight:`500`}:null,O=!!a&&!!g,k=i&&f===`center`,A=(0,H.jsx)(Xv,{"aria-hidden":!0,size:`small`,maxW:SS[C],maxH:SS[C]}),j=r&&(0,V.isValidElement)(_)?_:null,M=j?j.props.children:_,ee=j!=null&&j.props.href!=null;return(0,H.jsxs)(CS,{"data-slot":`button`,"data-variant":x,"data-size":C,...S===`neutral`?null:{"data-tone":S},variant:x,size:C,...w?{compact:!0}:null,...S===`neutral`?null:{tone:S},...m?{elevated:!0}:null,...p?{fullWidth:!0}:null,...h===`round`?{round:!0}:null,...b?.framed?{rounded:1}:null,...k?{position:`relative`}:null,...j?{render:(0,V.createElement)(j.type,{...j.props,children:void 0})}:null,...ee?{role:void 0}:null,disabled:O?!1:a||i,...O?{"aria-disabled":!0,opacity:.5,cursor:`not-allowed`}:null,...Ub(yS[C],44,`y`),...Px(gS({variant:x,size:n,className:m?[e,`elevation-1`].filter(Boolean).join(` `):e})),...v,...O?{onPress:void 0,onClick:e=>e?.preventDefault?.()}:null,children:[i&&f===`start`?A:null,k?(0,H.jsx)(P,{position:`absolute`,t:0,b:0,l:0,r:0,items:`center`,justify:`center`,pointerEvents:`none`,children:A}):null,o?ES(o,xS[C],E):null,Lb(DS.has(C)?ES(M,xS[C],E):M,se.Text,{fontSize:bS[C],...D,...T,...k?{opacity:0}:null}),c&&c.length?(0,H.jsx)(hS,{keys:c,variant:`button`,sequenceJoinLabel:l,...k?{opacity:0}:null}):null,s?ES(s,xS[C],E):null,i&&f===`end`?A:null]})}var jS=[`red`,`ruby`,`crimson`,`tomato`,`orange`,`amber`,`yellow`,`lime`,`grass`,`green`,`jade`,`mint`,`teal`,`cyan`,`sky`,`blue`,`iris`,`violet`,`purple`,`plum`,`pink`,`bronze`,`gold`,`brown`,`gray`],MS={red:{light:[`#fffcfc`,`#fff7f7`,`#feebec`,`#ffdbdc`,`#ffcdce`,`#fdbdbe`,`#f4a9aa`,`#eb8e90`,`#e5484d`,`#dd3e42`,`#ce2c31`,`#641723`],dark:[`#191111`,`#201314`,`#3b1219`,`#500e1c`,`#611623`,`#73232d`,`#8c333a`,`#b54548`,`#e5484d`,`#ec5e5e`,`#ff8a88`,`#ffd1d9`]},ruby:{light:[`#fffcfd`,`#fff7f8`,`#feeaed`,`#ffdce1`,`#fecfd6`,`#f8bfc8`,`#efacb8`,`#e592a3`,`#e54666`,`#dc3b5d`,`#ca244d`,`#64172b`],dark:[`#191113`,`#1e1517`,`#3a141e`,`#4e1325`,`#5e1a2e`,`#6f2539`,`#883447`,`#b3445a`,`#e54666`,`#ec5a72`,`#ff8a94`,`#fed2e1`]},crimson:{light:[`#fffcfd`,`#fef7f9`,`#ffe9f0`,`#fedce7`,`#facedd`,`#f3bed1`,`#eaacc3`,`#e094b2`,`#e93d82`,`#df3478`,`#cb1d63`,`#621639`],dark:[`#191114`,`#201318`,`#381525`,`#4d122f`,`#5c1839`,`#6d2445`,`#873357`,`#b0436e`,`#e93d82`,`#ee528a`,`#ff87a8`,`#fdd3e8`]},tomato:{light:[`#fffcfc`,`#fff8f7`,`#ffebe7`,`#ffdcd3`,`#ffcdc2`,`#fdbdaf`,`#f5a898`,`#ec8e7b`,`#e54d2e`,`#dd4425`,`#d13415`,`#5c271f`],dark:[`#181111`,`#1f1513`,`#391714`,`#4e1511`,`#5e1c16`,`#6e2920`,`#863a2d`,`#ac4d39`,`#e54d2e`,`#ec6142`,`#ff8e6c`,`#fbd3cb`]},orange:{light:[`#fefcfb`,`#fff7ed`,`#ffefd6`,`#ffdda9`,`#ffcf8b`,`#ffc182`,`#f5ae73`,`#ec9455`,`#f76a15`,`#ef5f00`,`#d14e00`,`#582d1d`],dark:[`#17120e`,`#1e160f`,`#331e0b`,`#481f00`,`#562800`,`#66350c`,`#7e451d`,`#a35829`,`#f76a15`,`#ff791b`,`#ff9b52`,`#ffe0c2`]},amber:{light:[`#fefdfb`,`#fefbe9`,`#fff7c2`,`#ffee9c`,`#fbe577`,`#f4d673`,`#e9c163`,`#e2a336`,`#ffc100`,`#ffba18`,`#ad6200`,`#4f3422`],dark:[`#16120c`,`#1d180f`,`#302008`,`#412700`,`#4e3000`,`#5c3d05`,`#714f1a`,`#8f6424`,`#ffc100`,`#ffdc00`,`#ffc916`,`#ffe7b3`]},yellow:{light:[`#fdfdf9`,`#fefce9`,`#fffab8`,`#fff394`,`#ffe770`,`#f3d768`,`#e4c767`,`#d5ae39`,`#ffea00`,`#ffdc00`,`#a06e00`,`#473b1f`],dark:[`#14110b`,`#1b180f`,`#2c2305`,`#372b00`,`#433500`,`#524202`,`#665417`,`#836a20`,`#ffea00`,`#ffff57`,`#f5e147`,`#f6eeb4`]},lime:{light:[`#fcfdfa`,`#f8faf3`,`#eef6d6`,`#e2f0bd`,`#d3e7a6`,`#c2da91`,`#abc978`,`#8db554`,`#bdee63`,`#b0e64c`,`#5c7c2f`,`#37401c`],dark:[`#11130c`,`#151a10`,`#1f2917`,`#29371d`,`#334423`,`#3d522a`,`#496231`,`#577538`,`#bdee63`,`#d4ff70`,`#bde56b`,`#e3f7ba`]},grass:{light:[`#fbfefb`,`#f5fbf5`,`#e9f7e9`,`#daf0db`,`#c9e9ca`,`#b2deb5`,`#94ce9a`,`#65ba74`,`#46a758`,`#3e9a4f`,`#2a7e3b`,`#203c25`],dark:[`#0e1511`,`#141a15`,`#1b2a1e`,`#1d3a24`,`#25482d`,`#2d5736`,`#366740`,`#3e7949`,`#46a758`,`#53b365`,`#71d083`,`#c2f0c2`]},green:{light:[`#fbfefc`,`#f4fbf6`,`#e6f6eb`,`#d6f1df`,`#c4e8d1`,`#adddc0`,`#8eceaa`,`#5bb88b`,`#30a46c`,`#2b9a66`,`#00824d`,`#193b2d`],dark:[`#0e1512`,`#121b17`,`#132d21`,`#113b29`,`#174933`,`#1f573e`,`#28684a`,`#2f7c57`,`#30a46c`,`#33b074`,`#3dd68c`,`#b1f1cb`]},jade:{light:[`#fbfefd`,`#f4fbf7`,`#e5f7ed`,`#d6f1e3`,`#c3e9d7`,`#acdec9`,`#8bceb6`,`#55ba9f`,`#29a383`,`#26997b`,`#00825c`,`#1d3b31`],dark:[`#0d1512`,`#121c18`,`#0f2e23`,`#0a3b2c`,`#104837`,`#1b5645`,`#246854`,`#2a7e68`,`#29a383`,`#27b08b`,`#1ed8a4`,`#adf0d4`]},mint:{light:[`#f9fefd`,`#f2fbf9`,`#ddf9f2`,`#c8f4e9`,`#b3ecde`,`#9ce0d0`,`#7ecfbd`,`#4cbba5`,`#86ead4`,`#7de1cb`,`#037864`,`#16433c`],dark:[`#0d1515`,`#0f1b1b`,`#092c2b`,`#003a39`,`#004744`,`#0f5650`,`#1e685f`,`#277f70`,`#86ead4`,`#a8f5e5`,`#58d5ba`,`#c4f5e1`]},teal:{light:[`#fafefd`,`#f3fbf9`,`#e0f8f3`,`#ccf3ea`,`#b8ebe0`,`#a1ded2`,`#83cdc1`,`#53b9ab`,`#12a594`,`#0d9b8a`,`#00826d`,`#0d3d38`],dark:[`#0d1514`,`#111c1b`,`#0d2d2a`,`#023b37`,`#084843`,`#145750`,`#1c6961`,`#1f7f74`,`#12a594`,`#0db39e`,`#0ad8b6`,`#adf0dd`]},cyan:{light:[`#fafdfe`,`#f2fafb`,`#def7f9`,`#caf1f6`,`#b5e9f0`,`#9ddee7`,`#7dcedc`,`#3db9ce`,`#01a2c7`,`#0797b9`,`#007da5`,`#0d3c48`],dark:[`#0b1619`,`#101b20`,`#082c36`,`#003848`,`#004558`,`#045468`,`#12677e`,`#11809c`,`#01a2c7`,`#23afd0`,`#4ccce5`,`#b6ecf7`]},sky:{light:[`#f9feff`,`#f1fafd`,`#e1f6fd`,`#d1f0fb`,`#bee7f5`,`#a9daed`,`#8dcae3`,`#60b3d7`,`#7ce2fe`,`#74daf8`,`#00749e`,`#1d3e56`],dark:[`#0d141e`,`#111a27`,`#112840`,`#113655`,`#154467`,`#1b537b`,`#1f6692`,`#197cae`,`#7ce2fe`,`#a8eeff`,`#75c7f0`,`#c2f3ff`]},blue:{light:[`#fdfdfe`,`#f7f9ff`,`#edf2fe`,`#e0e9ff`,`#d2deff`,`#c1d0ff`,`#abbdf9`,`#8da4ef`,`#3e63dd`,`#3358d4`,`#3a5bc7`,`#1f2d5c`],dark:[`#11131f`,`#141726`,`#182449`,`#1d2e61`,`#253974`,`#304384`,`#3a4f97`,`#435db2`,`#3e63dd`,`#5472e4`,`#9db1ff`,`#d6e1ff`]},iris:{light:[`#fdfdff`,`#f8f8ff`,`#f0f1fe`,`#e6e7ff`,`#dadcff`,`#cbcdff`,`#b8b9f8`,`#9b9ef0`,`#5b5bd6`,`#5151cd`,`#5753c6`,`#272962`],dark:[`#13131e`,`#171625`,`#202248`,`#262a65`,`#303374`,`#3d3d82`,`#4a4a95`,`#5a58b1`,`#5b5bd6`,`#6e6ade`,`#b0a9ff`,`#e0dffe`]},violet:{light:[`#fdfcfe`,`#faf8ff`,`#f4f0fe`,`#ebe5ff`,`#e1d9ff`,`#d4cafe`,`#c2b5f5`,`#aa99ec`,`#6e56cf`,`#654dc4`,`#6550b9`,`#2f265f`],dark:[`#14121f`,`#1b1525`,`#291f44`,`#33255b`,`#3c2e69`,`#473876`,`#56468b`,`#6858ad`,`#6e56cf`,`#7d66d9`,`#bba5ff`,`#e2ddfe`]},purple:{light:[`#fefcfe`,`#fbf7fe`,`#f7edfd`,`#f2e2fc`,`#ead5f9`,`#e0c4f4`,`#d1afec`,`#be93e4`,`#8e4ec6`,`#8347b9`,`#8145b5`,`#402060`],dark:[`#18111b`,`#1e1523`,`#2f1c3b`,`#3d224e`,`#48295c`,`#54346b`,`#664282`,`#8357aa`,`#8e4ec6`,`#9a5cd0`,`#d59cff`,`#ecd9fa`]},plum:{light:[`#fefcff`,`#fdf7fd`,`#fbebfb`,`#f7def8`,`#f1d1f3`,`#e9c2ec`,`#deade3`,`#cf91d8`,`#ab4aba`,`#a144af`,`#953ea3`,`#53195d`],dark:[`#181118`,`#201320`,`#351935`,`#451d47`,`#502454`,`#5e3062`,`#734079`,`#92549c`,`#ab4aba`,`#b658c4`,`#e796f3`,`#f4d4f4`]},pink:{light:[`#fffcfe`,`#fef7fb`,`#fee9f6`,`#fbdcef`,`#f6cee7`,`#efbfdd`,`#e7acd1`,`#dd93c2`,`#d6409f`,`#cf3897`,`#c2298a`,`#651249`],dark:[`#191117`,`#21121d`,`#37172f`,`#4b143d`,`#591c47`,`#692955`,`#833869`,`#a84885`,`#d6409f`,`#de51a8`,`#ff80ca`,`#fdd1ea`]},bronze:{light:[`#fdfcfc`,`#fdf7f5`,`#f6edea`,`#efe4df`,`#e7d9d3`,`#dfcdc5`,`#d3bcb3`,`#c2a499`,`#a18072`,`#957468`,`#7d5e54`,`#43302b`],dark:[`#141110`,`#1c1918`,`#262120`,`#302a27`,`#3b3330`,`#493e3a`,`#5a4d47`,`#6f5f57`,`#a18072`,`#ae8d7e`,`#d4b3a5`,`#ede0d9`]},gold:{light:[`#fdfdfc`,`#faf9f2`,`#f2f0e7`,`#eae6dc`,`#e1dccf`,`#d7d0bf`,`#cbc0aa`,`#b9a88d`,`#978365`,`#8c795e`,`#71624b`,`#3b352b`],dark:[`#121211`,`#1b1a17`,`#24231f`,`#2e2b26`,`#38352f`,`#444039`,`#544f46`,`#696256`,`#978365`,`#a39073`,`#cbb99f`,`#e8e2d9`]},brown:{light:[`#fefdfc`,`#fcf9f5`,`#f6eee7`,`#f0e4d9`,`#ebdaca`,`#e4cdb8`,`#dcbc9f`,`#cea37e`,`#ad7f58`,`#a07553`,`#815e46`,`#3e332e`],dark:[`#12110f`,`#1c1816`,`#28211d`,`#322922`,`#3e3128`,`#4d3c2f`,`#614a39`,`#7c5f46`,`#ad7f58`,`#b98c67`,`#dbb594`,`#f2e1ca`]},gray:{light:[`#ffffff`,`#fcfcfc`,`#f9f9f9`,`#f1f1f1`,`#ebebeb`,`#d6d6d6`,`#cccccc`,`#b3b3b3`,`#999999`,`#838383`,`#666666`,`#333333`],dark:[`#171717`,`#1b1b1b`,`#191919`,`#1d1d1d`,`#222222`,`#484848`,`#4c4c4c`,`#666666`,`#818181`,`#7b7b7b`,`#b3b3b3`,`#ebebeb`]},mauve:{light:[`#fdfcfd`,`#faf9fb`,`#f2eff3`,`#eae7ec`,`#e2dfe6`,`#dbd8e0`,`#d0cdd7`,`#bcbac7`,`#8e8c99`,`#83818e`,`#65636d`,`#211f26`],dark:[`#121113`,`#1a191b`,`#232225`,`#2b292d`,`#323035`,`#3c393f`,`#49474e`,`#625f69`,`#6f6d78`,`#7d7a85`,`#b5b2bc`,`#eeeef0`]},olive:{light:[`#fcfdfc`,`#f8faf8`,`#eff1ef`,`#e7e9e7`,`#dfe2df`,`#d7dad7`,`#cccfcc`,`#b9bcb8`,`#898e87`,`#7f837d`,`#60655f`,`#1d211c`],dark:[`#111210`,`#181917`,`#212220`,`#282a27`,`#2f312e`,`#383a37`,`#454943`,`#5c625b`,`#687066`,`#767d74`,`#afb5ad`,`#eceeec`]},sage:{light:[`#fbfdfc`,`#f7f9f8`,`#eef1f0`,`#e6e9e8`,`#dfe2e0`,`#d7dad8`,`#cbcfcd`,`#b8bcbb`,`#868e8b`,`#7c8481`,`#5f6563`,`#1a211e`],dark:[`#101211`,`#171918`,`#202221`,`#272a28`,`#2e3130`,`#373b39`,`#444947`,`#5b625f`,`#63706b`,`#717d79`,`#adb5b2`,`#eceeed`]},sand:{light:[`#fdfdfc`,`#f9f9f8`,`#f1f0ef`,`#e9e9e6`,`#e2e1de`,`#dad9d6`,`#cfcfca`,`#bcbbb5`,`#8d8d86`,`#82827c`,`#63635e`,`#21201c`],dark:[`#111110`,`#191918`,`#222221`,`#2a2a28`,`#31312e`,`#3b3a37`,`#494844`,`#62605a`,`#6f6d66`,`#7d7b74`,`#b5b3ad`,`#eeeeec`]},slate:{light:[`#fcfcfd`,`#f9f9fb`,`#f0f0f3`,`#e7e8ec`,`#e0e1e6`,`#d9d9e0`,`#cdced6`,`#b9bbc6`,`#8b8d98`,`#80838d`,`#60646c`,`#1c2024`],dark:[`#111113`,`#18191b`,`#212225`,`#272a2d`,`#2e3135`,`#363a3f`,`#43484e`,`#5a6169`,`#696e77`,`#777b84`,`#b0b4ba`,`#edeef0`]}},NS=e=>{let t=0;for(let n=0;n<e.length;n++)t=e.charCodeAt(n)+((t<<5)-t);return jS[Math.abs(t)%jS.length]},PS=e=>typeof e==`string`&&Object.hasOwn(MS,e),FS=(e,t=`gray`)=>PS(e)?e:t;function IS(e,t){ji();let n={};for(let r of t)n[`--tone-${r}`]=`var(--data-${e}-${r})`;return{style:n,tone:e=>`var(--tone-${e})`}}var LS=e=>({role:`button`,tabIndex:0,onPress:e,onKeyDown:t=>{(t?.key===`Enter`||t?.key===` `)&&(t.preventDefault?.(),e?.())}}),RS={outlineColor:`$outlineColor`,outlineWidth:2,outlineStyle:`solid`},zS=32,BS={xs:{box:12,font:`$1`},sm:{box:14,font:`$1`},md:{box:16,font:`$1`},lg:{box:24,font:`$2`},xl:{box:40,font:`$4`}},cee={square:`$2xs`,rounded:`$xs`,circle:`$10`},lee=e=>{let t=[...(e??``).trim()][0];return t?t.toLocaleUpperCase():`-`},VS=({size:e,shape:t,src:n,name:r,colorSeed:i,icon:a,variant:s=`soft`,ring:c=!1,pulsing:l=!1,onPress:u,alt:d,children:f,style:p,...m})=>{let h=typeof e==`string`&&e in BS?BS[e]:null,g=h?.box??(e!=null&&!h?e:zS),_=cee[t??(h?`square`:`circle`)],{style:v,tone:y}=IS(NS(i??r??``),[4,5,6,12]),b=f==null&&(n!=null||r!=null||a!=null),x=(r??``).trim(),S=b?(0,H.jsx)(US,{bg:a?`transparent`:x?y(s===`outline`?5:4):`$hover`,...s===`outline`&&x&&!a?{borderWidth:1,borderColor:y(6)}:null,rounded:_,children:a?(0,V.isValidElement)(a)&&a.props.size==null?(0,V.cloneElement)(a,{size:g}):a:(0,H.jsx)(o,{fontSize:h?.font??`$2`,lineHeight:g,fontWeight:`500`,color:x?y(12):`$hint`,select:`none`,children:lee(r)})}):null;return(0,H.jsxs)(gc,{"data-slot":`avatar`,...h?{"data-size":e}:null,...u?LS(u):null,circular:_===`$10`,size:g,...h||t?{rounded:_}:null,shrink:0,overflow:`hidden`,...u?{cursor:`pointer`,hoverStyle:{outlineColor:`$hover`,outlineWidth:4,outlineStyle:`solid`},focusVisibleStyle:RS}:null,...l?{"data-motion":`pulse`}:null,style:{...b&&x?v:null,...c?{boxShadow:`0 0 0 1px var(--border), 0 0 0 3px var(--background)`}:null,...p},...m,children:[b&&n?(0,H.jsx)(HS,{src:n,...d?{alt:d}:null}):null,S,f]})},HS=e=>(0,H.jsx)(gc.Image,{"data-slot":`avatar-image`,width:`100%`,height:`100%`,...e}),US=({children:e,...t})=>(0,H.jsx)(gc.Fallback,{"data-slot":`avatar-fallback`,bg:`$edge`,items:`center`,justify:`center`,...t,children:typeof e==`string`||typeof e==`number`?(0,H.jsx)(o,{size:`$2`,color:`$quiet`,children:e}):e}),uee=44,WS=24,GS=N({variant:`default`}),dee=I(P,{name:`Badge`,context:GS,display:`inline-flex`,self:`flex-start`,items:`center`,justify:`center`,shrink:0,minH:WS,px:`$2.5`,py:`$1`,gap:`$1.5`,rounded:`$2`,borderWidth:1,borderColor:`transparent`,overflow:`hidden`,variants:{variant:{default:{bg:`$ink`},secondary:{bg:`$edge`},destructive:{bg:`$red9`},outline:{bg:`$background`,borderColor:`$borderColor`},ghost:{bg:`transparent`,hoverStyle:{bg:`$hover`}},link:{bg:`transparent`},inputAdornment:{bg:`$hover`,px:`$2`},tags:{bg:`$hover`,borderColor:`$borderColor`,rounded:`$3`},muted:{bg:`$hover`},accent:{bg:`var(--primary)`},inherit:{bg:`transparent`}},size:{xs:{minH:14,height:14,px:`$1`,py:0,gap:`$1`,rounded:`$10`},sm:{minH:16,height:16,px:`$2`,py:0,gap:`$1`,rounded:`$10`},md:{minH:18,height:18,px:`$1.5`,py:0,gap:`$0.5`,rounded:`$10`},lg:{}},circle:{true:{px:0,justify:`center`}}},defaultVariants:{variant:`default`}}),fee={xs:{size:`$1`,lineHeight:14,fontWeight:`600`},sm:{size:`$1`,lineHeight:16,fontWeight:`500`},md:{size:`$1`,lineHeight:18,fontWeight:`500`}},pee=I(o,{name:`BadgeText`,context:GS,size:`$1`,fontWeight:`600`,variants:{variant:{default:{color:`$sunken`},secondary:{color:`$ink`},destructive:{color:`$white1`},outline:{color:`$ink`},ghost:{color:`$ink`},link:{color:`$ink`,textDecorationLine:`underline`},inputAdornment:{color:`$ink`,fontWeight:`500`},tags:{color:`$quiet`,fontWeight:`400`,textTransform:`capitalize`},muted:{color:`$hint`,fontWeight:`500`},accent:{color:`var(--primary-foreground)`,fontWeight:`500`},inherit:{}}}});function KS({className:e,variant:t=`default`,size:n,shape:r=`pill`,asChild:i=!1,children:a,...o}){let s=n&&n!==`lg`?n:null,c=s?{xs:14,sm:16,md:18}[s]:WS,l=t===`inherit`;return(0,H.jsx)(dee,{"data-slot":`badge`,"data-variant":t,...n?{"data-size":n}:null,variant:t??`default`,...n?{size:n}:null,...r===`circle`?{circle:!0,width:c,minW:c}:null,asChild:i,render:i?void 0:`span`,...Ub(c,uee,`y`),...Px([_S({variant:t}),e].filter(Boolean).join(` `)),...l?{style:{backgroundColor:`color-mix(in srgb, currentColor 16%, transparent)`}}:null,...o,children:i?a:Lb(a,pee,{...s?fee[s]:null,...l?{style:{color:`inherit`,fontWeight:`inherit`,fontVariantNumeric:`tabular-nums`}}:null})})}var qS=16,JS=()=>{let e=(0,V.useContext)(jc).checked===`indeterminate`?ob:hy;return(0,H.jsx)(e,{size:13,color:`$ink`,strokeWidth:3})},YS={sm:{box:12,edge:1,glyph:14,pad:5},md:{box:18,edge:1.5,glyph:20,pad:6}},XS={solid:`$ink`,outline:`$hint`,soft:`$borderColor`},ZS={accent:{fill:`var(--primary)`,glyph:`var(--primary-foreground)`,tint:`$raised`},success:{fill:`$good`,glyph:`$background`,tint:`var(--state-success-bg)`},warning:{fill:`var(--state-warning)`,glyph:`$background`,tint:`var(--state-warning-bg)`}},QS=({look:e})=>{let t=(0,V.useContext)(jc).checked,n=t===!0||t===`indeterminate`,r=t===`indeterminate`?ob:hy,{dim:i,tone:a}=e;return(0,H.jsx)(P,{...W(`checkbox-box`),position:`relative`,width:i.box+2*i.edge,height:i.box+2*i.edge,rounded:e.round?`$10`:`$xs`,borderWidth:i.edge,borderColor:n?a.fill:e.disabled?`$rim`:XS[e.variant],bg:n?a.fill:`transparent`,opacity:e.disabled&&n?.5:1,items:`center`,justify:`center`,pointerEvents:`none`,children:n?(0,H.jsx)(r,{size:i.glyph,color:a.glyph,strokeWidth:2.5}):null})},$S=({variant:e,size:t,shape:n,color:r,hoverable:i,...a})=>{let o=Lx()===`compact`,s=e??(o||t!==void 0||n!==void 0||r!==void 0||i!==void 0?`solid`:`plain`);if(s!==`plain`){let e=YS[t??`sm`],o=i??!0,c=e.box+2*e.edge,l=o?c+2*e.pad:c,u=a.checked===!0||a.checked===`indeterminate`,d={dim:e,variant:s,tone:ZS[r??`accent`],round:n===`round`,hoverable:o,disabled:!!a.disabled};return(0,H.jsx)(Pc,{...W(`checkbox`),"data-variant":s,"data-size":t??`sm`,width:l,height:l,flexShrink:0,padding:0,position:`relative`,items:`center`,justify:`center`,borderWidth:0,rounded:n===`round`?`$10`:o?`$3`:`$xs`,backgroundColor:`transparent`,...o&&!a.disabled?{hoverStyle:{bg:u?d.tone.tint:`$hover`}}:null,activeStyle:{bg:`transparent`},cursor:a.disabled?`not-allowed`:`pointer`,...Ub(l),...a,children:(0,H.jsx)(QS,{look:d})})}return(0,H.jsx)(Pc,{...W(`checkbox`),width:qS,height:qS,flexShrink:0,padding:0,borderRadius:`$2`,borderWidth:1,borderColor:`$bound`,backgroundColor:`transparent`,activeStyle:{bg:`transparent`},...Ub(qS),...a,children:(0,H.jsx)(Pc.Indicator,{...W(`checkbox-indicator`),alignItems:`center`,justifyContent:`center`,children:(0,H.jsx)(JS,{})})})},eC=(e,t,n)=>{let r=t.trim().toLowerCase();if(!r)return 1;let i=(n?.length?`${e} ${n.join(` `)}`:e).toLowerCase();if(i===r)return 1;if(i.startsWith(r))return .9;let a=i.indexOf(r);if(a>-1)return .8-a/(i.length*100);let o=0;for(let e=0;e<i.length&&o<r.length;e++)i[e]===r[o]&&o++;return o===r.length?.4:0},tC=(e,t,n,r=!1)=>{if(e<=0)return-1;let i=t+n;return i<0?r?e-1:0:i>=e?r?0:e-1:i},nC=44,rC=e=>typeof e==`string`||typeof e==`number`?String(e):Array.isArray(e)?e.map(rC).filter(Boolean).join(` `):(0,V.isValidElement)(e)?rC(e.props.children):``,iC=(0,V.createContext)(null),aC=(0,V.createContext)(void 0),oC=()=>{let e=(0,V.useContext)(iC);if(!e)throw Error(`Command parts must be rendered inside <Command>`);return e},sC=(0,V.forwardRef)(function({value:e,defaultValue:t,onValueChange:n,filter:r=eC,shouldFilter:i=!0,loop:a=!1,label:o,vimBindings:s=!0,disablePointerSelection:c=!1,children:l,...u},d){let f=(0,V.useRef)(new Map).current,p=(0,V.useRef)([]).current,[m,h]=(0,V.useReducer)(e=>e+1,0),[g,_]=(0,V.useState)(``),[v,y]=(0,V.useState)(t??``),b=e??v,x=(0,V.useCallback)((e,t)=>(f.set(e,t),p.includes(e)||p.push(e),h(),()=>{f.delete(e);let t=p.indexOf(e);t>-1&&p.splice(t,1),h()}),[f,p]),S=(0,V.useMemo)(()=>p.filter(e=>{let t=f.get(e)?.current;return!!t&&(!i||r(t.value,g,t.keywords)>0)}),[m,p,f,i,r,g]),C=(0,V.useMemo)(()=>new Set(S),[S]),w=(0,V.useMemo)(()=>new Set(S.map(e=>f.get(e)?.current.group).filter(Boolean)),[S,f]),T=(0,V.useCallback)(t=>{e===void 0&&y(t),n?.(t)},[e,n]);(0,V.useEffect)(()=>{if(!S.length||b&&S.some(e=>f.get(e)?.current.value===b))return;let e=f.get(S[0])?.current.value;e&&T(e)},[S,b,f,T]);let E=(0,V.useCallback)(e=>{let t=S.filter(e=>!f.get(e)?.current.disabled),n=t.findIndex(e=>f.get(e)?.current.value===b),r=tC(t.length,n,e,a),i=r<0?void 0:f.get(t[r])?.current.value;i&&T(i)},[S,f,b,a,T]),D=(0,V.useCallback)(e=>{let t=f.get(e)?.current;t&&!t.disabled&&(T(t.value),t.onSelect?.(t.value))},[f,T]),O=(0,V.useCallback)(e=>{let t=s&&(e.ctrlKey||e.metaKey),n=e.key===`ArrowDown`||t&&(e.key===`n`||e.key===`j`),r=e.key===`ArrowUp`||t&&(e.key===`p`||e.key===`k`);if(n||r)e.preventDefault(),E(n?1:-1);else if(e.key===`Enter`){e.preventDefault();let t=S.find(e=>f.get(e)?.current.value===b);t&&D(t)}},[s,E,S,f,b,D]),k=(0,V.useMemo)(()=>({search:g,setSearch:_,selected:b,select:T,register:x,touch:h,run:D,onKey:O,shows:e=>C.has(e),showsGroup:e=>w.has(e),empty:S.length===0,disablePointerSelection:c}),[g,b,T,x,D,O,C,w,S.length,c]);return(0,H.jsx)(iC.Provider,{value:k,children:(0,H.jsx)(F,{ref:d,"data-slot":`command`,"aria-label":o,width:`100%`,overflow:`hidden`,rounded:`$4`,bg:`$background`,onKeyDown:O,...u,children:l})})}),cC=(0,V.forwardRef)(function({value:e,onValueChange:t,placeholder:n,...r},i){let{search:a,setSearch:o,onKey:s}=oC();return(0,V.useEffect)(()=>{e!==void 0&&e!==a&&o(e)},[e,a,o]),(0,H.jsxs)(P,{"data-slot":`command-input-wrapper`,items:`center`,gap:`$2`,px:`$3`,minH:nC,borderBottomWidth:1,borderColor:`$borderColor`,children:[(0,H.jsx)(db,{size:16,opacity:.5}),(0,H.jsx)(Jv,{ref:i,"data-slot":`command-input`,unstyled:!0,flex:1,height:nC,borderWidth:0,bg:`transparent`,color:`$color`,placeholder:n,value:e??a,onChangeText:e=>{o(e),t?.(e)},onKeyDown:s,...r})]})}),lC=(0,V.forwardRef)(function(e,t){return(0,H.jsx)(Kp,{ref:t,"data-slot":`command-list`,maxH:300,...e})}),uC=(0,V.forwardRef)(function({children:e,...t},n){let{empty:r}=oC();return r?(0,H.jsx)(F,{ref:n,"data-slot":`command-empty`,py:`$4`,items:`center`,...t,children:typeof e==`string`?(0,H.jsx)(o,{size:`$3`,color:`$quiet`,children:e}):e}):null}),dC=(0,V.forwardRef)(function({value:e,keywords:t,disabled:n,onSelect:r,children:i,...a},o){let s=(0,V.useId)(),{register:c,touch:l,run:u,select:d,selected:f,shows:p,disablePointerSelection:m}=oC(),h=(0,V.useContext)(aC),g=e??rC(i),_=(0,V.useRef)({value:g,keywords:t,disabled:n,group:h,onSelect:r});_.current={value:g,keywords:t,disabled:n,group:h,onSelect:r},(0,V.useEffect)(()=>c(s,_),[s,c]),(0,V.useEffect)(l,[l,g,n,t?.join(`\0`)]);let v=!!g&&f===g;return(0,H.jsx)(ol,{ref:o,"data-slot":`command-item`,"data-selected":v,"data-disabled":!!n,display:p(s)?`flex`:`none`,disabled:n,minH:nC,gap:`$2`,rounded:`$2`,bg:v?`$backgroundFocus`:`transparent`,opacity:n?.5:1,onPress:()=>u(s),onPointerEnter:n||m?void 0:()=>d(g),...a,children:i})}),fC={h:32,px:4,gap:8,icon:16,chevron:14,well:4},pC=(e,t)=>e===`danger`?t?`$bad`:`$red10`:e===`placeholder`?`$hint`:t?`$aside`:`$ink`,mC=e=>e==null||e===!1?null:typeof e==`string`?(0,H.jsx)(hS,{keys:[e]}):Array.isArray(e)?(0,H.jsx)(hS,{keys:e}):e;function hC({label:e,sub:t,contextual:n,contextualPosition:r=`left`,dot:i,icon:a,iconContainer:o=!1,grip:s=`never`,shortcut:c,check:l=!1,submenu:u=!1,tone:d=`default`,quiet:f=!1,hovered:p=!1,subColor:m=`$hint`}){let h=i?(0,H.jsx)(F,{width:8,height:8,rounded:`$10`,bg:i}):a,g=s===`always`||s===`onHover`&&p?(0,H.jsx)(Vy,{size:fC.icon,color:`$hush`}):h&&o?(0,H.jsx)(P,{p:fC.well,rounded:`$xs`,bg:`$hover`,items:`center`,justify:`center`,shrink:0,children:h}):h,_=n!=null&&n!==``?(0,H.jsx)(U,{fontSize:`$2`,color:`$hint`,numberOfLines:1,paddingInlineStart:4,shrink:1,children:n}):null;return(0,H.jsxs)(H.Fragment,{children:[s===`never`?g??null:(0,H.jsx)(P,{shrink:0,items:`center`,justify:`center`,minW:fC.icon,children:g}),(0,H.jsxs)(F,{flex:1,minW:0,children:[(0,H.jsxs)(P,{items:`center`,minW:0,children:[typeof e==`string`||typeof e==`number`?(0,H.jsx)(U,{fontSize:`$2`,color:pC(d,f),numberOfLines:1,shrink:1,children:e}):e,r===`left`?_:null]}),t?typeof t==`string`?(0,H.jsx)(U,{fontSize:`$1`,color:m,numberOfLines:1,children:t}):t:null]}),r===`right`?_:null,c==null?null:(0,H.jsx)(P,{shrink:0,children:mC(c)}),l?(0,H.jsx)(hy,{size:fC.icon,strokeWidth:2}):null,u?(0,H.jsx)(P,{shrink:0,animation:`quick`,rotate:u===`open`?`90deg`:`0deg`,"data-open":u===`open`?``:void 0,children:(0,H.jsx)(vy,{...Zx,size:fC.chevron,color:`$hush`})}):null]})}var gC=32,_C=44,vC=8,yC=200,bC=32,xC=14,SC=16,CC=4,wC=176,TC=36,EC=33,DC=20,OC={bg:`$panel`,borderColor:`$borderColor`,borderWidth:1,rounded:`$4`,p:CC,minW:yC,overflow:`hidden`,shadowColor:`rgba(0,0,0,0.45)`,shadowRadius:20,shadowOffset:{width:0,height:10}},kC={items:`center`,gap:vC,px:vC,minH:gC,rounded:`$xs`,select:`none`,cursor:`pointer`,...Ub(gC,_C,`y`),hoverStyle:{bg:`$hover`},focusStyle:{bg:`$hover`},pressStyle:{bg:`$raised`}},AC=({children:e})=>(0,H.jsx)(P,{position:`absolute`,insetInlineStart:vC,width:xC,height:xC,items:`center`,justify:`center`,pointerEvents:`none`,children:(0,H.jsx)(Zp.ItemIndicator,{children:e})}),jC=V.createContext(null),MC=V.createContext(null),NC=V.createContext(null),PC=e=>e===`compact`?8:4;function FC({offset:e,trigger:t,items:n,minWidth:r=yC,maxHeight:i,defaultPage:a,onOpenChange:o,children:s,...c}){let l=Lx(),u=e??PC(l),[d,f]=V.useState(u),[p,m]=V.useState(void 0);V.useEffect(()=>f(u),[u]);let[h,g]=V.useState(a?[a]:[]),_=V.useMemo(()=>({page:h[h.length-1]??null,depth:h.length,go:e=>g(t=>[...t,e]),back:()=>g(e=>e.length>1?e.slice(0,-1):e)}),[h]),v=V.useCallback(e=>{e||g(a?[a]:[]),o?.(e)},[a,o]);return(0,H.jsx)(jC.Provider,{value:f,children:(0,H.jsx)(MC.Provider,{value:m,children:(0,H.jsx)(NC.Provider,{value:a?_:null,children:(0,H.jsxs)(Zp,{offset:d,...p?{placement:p}:null,onOpenChange:v,...c,children:[t?(0,H.jsx)(LC,{asChild:!0,children:t}):null,n?(0,H.jsx)(VC,{minW:r,maxH:i,children:n.map(IC)}):null,s]})})})})}var IC=(e,t)=>e.type===`separator`?(0,H.jsx)(lw,{},e.key??`sep-${t}`):e.type===`label`?(0,H.jsx)(cw,{children:e.label},e.key??`label-${t}`):(0,H.jsx)(GC,{disabled:e.disabled,variant:e.destructive?`destructive`:`default`,onSelect:e.onSelect,...e.closeOnSelect===!1?{preventCloseOnSelect:!0}:null,children:(0,H.jsx)(hC,{label:e.label,sub:e.description,icon:e.icon?(0,H.jsx)(P,{width:SC,height:SC,items:`center`,justify:`center`,shrink:0,children:e.icon}):void 0,shortcut:e.shortcut?(0,H.jsx)(uw,{children:e.shortcut}):void 0,check:!!e.selected,submenu:!!e.hasSubmenu})},e.key),LC=Zp.Trigger;Zp.Group,Zp.Portal,Zp.Sub,Zp.RadioGroup;var RC=(e,t)=>{if(!t)return e;let n=e?.split(`-`)[0]??`bottom`;return t===`center`?n:`${n}-${t}`},zC=e=>[...e.querySelectorAll(`[role="menuitem"], [role="menuitemradio"], [role="menuitemcheckbox"]`)].filter(t=>t.closest(`[data-hanzogui-menu-content]`)===e&&t.getAttribute(`aria-disabled`)!==`true`&&!t.hasAttribute(`data-disabled`)),BC=e=>e.querySelector(`[data-slot="dropdown-menu-search"] input`),VC=V.forwardRef(function({sideOffset:e,align:t,children:n,onKeyDown:r,...i},a){let o=ji(),s=Lx(),c=V.useContext(NC),l=V.useContext(jC),u=V.useContext(MC),d=e??PC(s);V.useEffect(()=>l?.(d),[l,d]),V.useEffect(()=>u?.(RC(void 0,t)),[u,t]);let f=e=>{if(r?.(e),e.key!==`ArrowUp`)return;let t=e.target?.closest?.(`[data-hanzogui-menu-content]`);if(!t)return;let n=zC(t),i=BC(t);i&&n[0]&&n[0]===document.activeElement&&(e.preventDefault(),i.focus())},p=UC(n);return(0,H.jsx)(Zp.Portal,{children:(0,H.jsx)(zb,{name:o,children:(0,H.jsx)(Ix,{value:s,children:(0,H.jsx)(NC.Provider,{value:c,children:(0,H.jsx)(Zp.Content,{ref:a,"data-slot":`dropdown-menu-content`,...OC,...p.framed?{role:`dialog`,"aria-orientation":void 0,"data-framed":``}:null,onKeyDown:f,...i,children:(0,H.jsx)(WC,{page:c?.page??null,children:p.children})})})})})})}),HC=e=>V.isValidElement(e)&&(e.type===QC||e.type===ow||e.type===sw);function UC(e){let t=V.Children.toArray(e);if(!t.some(HC))return{framed:!1,children:e};let n=[],r=[],i=()=>{r.length&&(n.push((0,H.jsx)(F,{role:`menu`,"aria-orientation":`vertical`,"data-slot":`dropdown-menu-list`,children:r},`menu-${n.length}`)),r=[])};for(let e of t)HC(e)?(i(),n.push(e)):r.push(e);return i(),{framed:!0,children:n}}function WC({page:e,children:t}){let n=V.useRef(null),r=V.useRef(!0);return V.useEffect(()=>{if(r.current){r.current=!1;return}let e=n.current?.closest?.(`[data-hanzogui-menu-content]`);if(!e)return;let t=requestAnimationFrame(()=>(BC(e)??zC(e)[0])?.focus());return()=>cancelAnimationFrame(t)},[e]),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`span`,{ref:n,hidden:!0,"data-slot":`dropdown-menu-anchor`}),t]})}var GC=V.forwardRef(function({inset:e,variant:t=`default`,disabled:n,page:r,actions:i,actionsVisibility:a=`hover`,onSelect:o,children:s,...c},l){let u=V.useContext(NC),[d,f]=V.useState(!1),p=r!==void 0&&u!==null,m=(0,H.jsx)(Zp.Item,{ref:l,"data-slot":`dropdown-menu-item`,"data-inset":e,"data-variant":t,disabled:n,...kC,paddingInlineStart:e?bC:vC,theme:t===`destructive`?`red`:void 0,opacity:n?.5:1,cursor:n?`default`:`pointer`,...i?{flex:1,onFocus:()=>f(!0),onBlur:()=>f(!1)}:null,onSelect:e=>{r!==void 0&&u&&(e.preventDefault?.(),u.go(r)),o?.(e)},...c,children:p?(0,H.jsxs)(H.Fragment,{children:[Lb(s,U,{fontSize:`$2`}),(0,H.jsx)(vy,{...Zx,size:14,marginInlineStart:`auto`,color:`$hush`})]}):Lb(s,U,{fontSize:`$2`})});return i?(0,H.jsxs)(P,{"data-slot":`dropdown-menu-item-row`,items:`center`,gap:vC,onHoverIn:()=>f(!0),onHoverOut:()=>f(!1),children:[m,(0,H.jsx)(P,{"data-slot":`dropdown-menu-item-actions`,role:`group`,shrink:0,items:`center`,gap:2,opacity:a===`always`||d?1:0,$touchable:{opacity:1},animation:`75ms`,children:V.Children.map(i,e=>V.isValidElement(e)&&e.props.role==null?V.cloneElement(e,{role:`menuitem`}):e)})]}):m}),KC=V.forwardRef(function({children:e,checked:t,...n},r){return(0,H.jsxs)(Zp.CheckboxItem,{ref:r,"data-slot":`dropdown-menu-checkbox-item`,checked:t,...kC,paddingInlineStart:bC,...n,children:[(0,H.jsx)(AC,{children:(0,H.jsx)(hy,{size:SC})}),e]})}),qC=V.createContext(null),JC=e=>e==null?[]:Array.isArray(e)?e:[e];function YC({value:e,defaultValue:t=null,onValueChange:n,multiple:r=!1,closeOnSelect:i,children:a}){let[o,s]=V.useState(()=>JC(t)),c=e===void 0?o:JC(e),l=t=>{e===void 0&&s(t),n?.(r?t:t[0]??null)},u={multiple:r,closeOnSelect:i??!r,has:e=>c.includes(e),toggle:e=>l(r?c.includes(e)?c.filter(t=>t!==e):[...c,e]:[e])};return(0,H.jsx)(qC.Provider,{value:u,children:r?(0,H.jsx)(Zp.Group,{"data-slot":`dropdown-menu-selection-group`,children:a}):(0,H.jsx)(Zp.RadioGroup,{"data-slot":`dropdown-menu-selection-group`,value:c[0]??``,onValueChange:e=>l(e?[e]:[]),children:a})})}var XC=({on:e})=>(0,H.jsx)(P,{width:xC,height:xC,shrink:0,rounded:`$xs`,borderWidth:1,borderColor:e?`var(--primary)`:`$bound`,bg:e?`var(--primary)`:`transparent`,items:`center`,justify:`center`,children:e?(0,H.jsx)(hy,{size:12,strokeWidth:3,color:`var(--primary-foreground)`}):null}),ZC=V.forwardRef(function({value:e,indicator:t,closeOnSelect:n,onSelect:r,children:i,disabled:a,...o},s){let c=V.useContext(qC),l=c?.multiple??!1,u=c?.has(e)??!1,d=t??(l?`checkbox`:`check`),f=n??c?.closeOnSelect??!l,p=(0,H.jsxs)(H.Fragment,{children:[d===`checkbox`?(0,H.jsx)(XC,{on:u}):null,typeof i==`string`?(0,H.jsx)(U,{fontSize:`$2`,color:`$aside`,numberOfLines:1,flex:1,minW:0,children:i}):i,d===`check`&&u?(0,H.jsx)(hy,{size:SC,strokeWidth:2,marginInlineStart:`auto`}):null]}),m={ref:s,"data-slot":`dropdown-menu-option-item`,"data-indicator":d,disabled:a,...kC,...d===`none`&&u?{bg:`$hover`}:null,opacity:a?.5:1,preventCloseOnSelect:!f,onSelect:r,...o};return l?(0,H.jsx)(Zp.CheckboxItem,{...m,checked:u,onCheckedChange:()=>c?.toggle(e),children:p}):(0,H.jsx)(Zp.RadioItem,{...m,value:e,children:p})});function QC({value:e,defaultValue:t,onValueChange:n,placeholder:r,autoFocus:i=!0,"aria-label":a}){let{t:o}=Ye(),s=r??o(`Search`),c=V.useRef(null);V.useEffect(()=>{if(!i)return;let e=requestAnimationFrame(()=>{let e=setTimeout(()=>c.current?.focus(),0);t=()=>clearTimeout(e)}),t=()=>{};return()=>{cancelAnimationFrame(e),t()}},[i]);let l=e=>{if(e.key===`Escape`||e.key===`Tab`)return;let t=e.currentTarget.closest(`[data-hanzogui-menu-content]`);if(e.key===`ArrowDown`){e.preventDefault(),e.stopPropagation(),t&&zC(t)[0]?.focus();return}if(e.key===`Enter`){if(e.stopPropagation(),e.nativeEvent.isComposing)return;e.preventDefault(),t&&zC(t)[0]?.click();return}e.stopPropagation()};return(0,H.jsx)(P,{"data-slot":`dropdown-menu-search`,minH:TC,items:`center`,px:vC,mx:-4,mt:-4,mb:CC,borderBottomWidth:1,borderColor:`$borderColor`,children:(0,H.jsx)(Jv,{ref:c,unstyled:!0,flex:1,minW:0,height:20,p:0,borderWidth:0,bg:`transparent`,color:`$ink`,placeholderTextColor:`$placeholderColor`,fontSize:`$1`,"aria-label":a??s,placeholder:s,...e===void 0?{defaultValue:t}:{value:e},onChangeText:e=>n?.(e),onKeyDown:l,style:{outlineStyle:`none`}})})}function $C({label:e,scrollable:t=!1,children:n,...r}){return(0,H.jsxs)(Zp.Group,{"data-slot":`dropdown-menu-section`,...typeof e==`string`?{"aria-label":e}:null,children:[e?(0,H.jsx)(cw,{variant:`band`,children:e}):null,(0,H.jsx)(F,{gap:2,...t?{maxH:wC,style:{overflowY:`auto`,overscrollBehavior:`contain`}}:null,...r,children:n})]})}function ew({id:e,children:t}){let n=V.useContext(NC);return!n||n.page!==e?null:(0,H.jsx)(F,{"data-slot":`dropdown-menu-page`,"data-page":e,children:t})}var tw={minH:EC,items:`center`,gap:vC,px:vC,mx:-4,mt:-4,mb:CC,borderBottomWidth:1,borderColor:`$borderColor`};function nw({children:e,...t}){return(0,H.jsx)(P,{"data-slot":`dropdown-menu-header`,...tw,...t,children:e})}function rw({children:e,...t}){return(0,H.jsx)(U,{"data-slot":`dropdown-menu-title`,fontSize:`$2`,fontWeight:`500`,color:`$ink`,numberOfLines:1,flex:1,...t,children:e})}var iw=V.forwardRef(function({children:e,onSelect:t,...n},r){let i=V.useContext(NC);return(0,H.jsxs)(Zp.Item,{ref:r,"data-slot":`dropdown-menu-back`,...tw,rounded:0,cursor:`pointer`,hoverStyle:{bg:`$hover`},focusStyle:{bg:`$hover`},preventCloseOnSelect:!0,onSelect:e=>{i?.back(),t?.(e)},...n,children:[(0,H.jsx)(_y,{...Zx,size:SC,color:`$aside`}),typeof e==`string`?(0,H.jsx)(U,{fontSize:`$2`,fontWeight:`500`,color:`$ink`,numberOfLines:1,flex:1,children:e}):e]})});function aw({slot:e,children:t}){return(0,H.jsx)(P,{"data-slot":e,role:`status`,"aria-live":`polite`,items:`center`,gap:vC,p:vC,children:t})}function ow({children:e}){let{t}=Ye();return(0,H.jsx)(aw,{slot:`dropdown-menu-empty`,children:(0,H.jsx)(U,{fontSize:`$1`,color:`$aside`,children:e??t(`No results`)})})}function sw({children:e}){let{t}=Ye();return(0,H.jsxs)(aw,{slot:`dropdown-menu-loading`,children:[(0,H.jsx)(P,{"aria-hidden":!0,children:(0,H.jsx)(Xv,{size:`small`,maxW:14,maxH:14})}),(0,H.jsx)(U,{fontSize:`$1`,color:`$quiet`,children:e??t(`Loading`)})]})}var cw=V.forwardRef(function({inset:e,variant:t=`default`,...n},r){return t===`band`?(0,H.jsx)(Zp.Label,{ref:r,"data-slot":`dropdown-menu-label`,"data-variant":`band`,height:DC,lineHeight:DC,mx:-4,px:vC,py:0,bg:`$hover`,fontSize:`$1`,fontWeight:`400`,color:`$hint`,select:`none`,...n}):(0,H.jsx)(Zp.Label,{ref:r,"data-slot":`dropdown-menu-label`,"data-inset":e,px:vC,py:4,paddingInlineStart:e?bC:vC,fontSize:`$2`,fontWeight:`500`,color:`$ink`,select:`none`,...n})}),lw=V.forwardRef(function(e,t){return(0,H.jsx)(Zp.Separator,{ref:t,"data-slot":`dropdown-menu-separator`,height:1,bg:`$borderColor`,mx:-4,my:CC,...e})});function uw(e){return(0,H.jsx)(U,{"data-slot":`dropdown-menu-shortcut`,marginInlineStart:`auto`,fontSize:`$1`,letterSpacing:1,color:`$quiet`,...e,children:$x(e.children)})}var dw=(e=2)=>({className:`glass elevation-${e}`,backgroundColor:`$background`,borderColor:`$borderColor`});({...W(`rows`)});var fw=(e,t)=>{let[n,r]=e.split(`-`),i=t??r;return!i||i===`center`?n:`${n}-${i}`},pw=e=>e?{secureTextEntry:!0,type:`password`}:{secureTextEntry:!1,type:`text`},mw={default:{h:36,gutter:12,riser:7,font:`$3`},lg:{h:46,gutter:14,riser:12,font:`$3`},sm:{h:32,gutter:8,riser:7,font:`$2`},xs:{h:24,gutter:8,riser:3,font:`$2`}},hw={bg:`$raised`},gw={px:`$3`,rounded:`$3`,borderWidth:1,borderColor:`$borderColor`,bg:`transparent`},_w=(0,V.createContext)({}),vw=()=>(0,V.useContext)(_w),yw=(e,t)=>e==null?!!t.invalid:e!==!1&&e!==`false`;I(F,{name:`FieldGroup`,width:`100%`,gap:`$7`}),I(P,{name:`Field`,context:N({orientation:`vertical`}),width:`100%`,gap:`$3`,variants:{orientation:{vertical:{flexDirection:`column`},horizontal:{flexDirection:`row`,items:`center`},responsive:{flexDirection:`column`,$md:{flexDirection:`row`,items:`center`}}},invalid:{true:{color:`$red9`}}},defaultVariants:{orientation:`vertical`}}),I(F,{name:`FieldContent`,flex:1,gap:`$1.5`});var bw=(0,V.createContext)(null),xw=`color-mix(in srgb, var(--foreground) 32%, transparent)`,Sw=(e,t)=>t?.4:e?.9:.6;function Cw({start:e,end:t,size:n,fill:r=!1,children:i,...a}){let o=Lx(),s=Rx(n,o),c=mw[s],[l,u]=(0,V.useState)(!1),[d,f]=(0,V.useState)({invalid:!1,disabled:!1}),p=(0,V.useCallback)(e=>f(t=>t.invalid===e.invalid&&t.disabled===e.disabled?t:e),[]),m=(0,V.useMemo)(()=>({size:s,focus:u,report:p}),[s,p]),h=d.invalid?l?`$red8`:`$red7`:l?xw:`$borderColor`;return(0,H.jsx)(bw.Provider,{value:m,children:(0,H.jsxs)(P,{...W(`input-group`),"data-focused":l?``:void 0,"data-invalid":d.invalid?``:void 0,"data-disabled":d.disabled?``:void 0,componentName:`Input`,...gw,...o===`compact`?{bg:`$panel`}:null,...r?hw:null,borderColor:h,hoverStyle:d.disabled||l?void 0:{borderColor:`$borderColorHover`},items:`center`,gap:`$1`,height:c.h,width:`100%`,minW:0,px:c.gutter,cursor:d.disabled?`not-allowed`:void 0,...a,children:[e?(0,H.jsx)(P,{...W(`input-group-start`),shrink:0,items:`center`,opacity:Sw(l,d.disabled),children:e}):null,i,t?(0,H.jsx)(P,{...W(`input-group-end`),shrink:0,items:`center`,gap:`$1`,opacity:Sw(l,d.disabled),children:t}):null]})})}var ww=24,Tw=44,Ew=(e,t)=>({position:`absolute`,[e===`start`?`insetInlineStart`:`insetInlineEnd`]:t,t:0,b:0,items:`center`,justify:`center`}),Dw=(0,V.forwardRef)(function({startAdornment:e,endAdornment:t,reveal:n=!0,type:r,secureTextEntry:i,size:a,fill:o=!1,...s},c){let{t:l}=Ye(),[u,d]=(0,V.useState)(!1),f=Lx(),p=(0,V.useContext)(bw),m=r===`password`||i===!0,h=r===`email`||r===`url`,g=m&&n,_=mw[p?.size??Rx(a,f)],v=_.gutter+ww,y=vw(),b=yw(s[`aria-invalid`],y),x=!!s.disabled,S=p?.report;if((0,V.useEffect)(()=>S?.({invalid:b,disabled:x}),[S,b,x]),p){let{onFocus:e,onBlur:t}=s;return(0,H.jsx)(Jv,{ref:c,...W(`input`),...m?pw(!u):{type:r,secureTextEntry:i},flex:1,minW:0,height:_.h-2,px:0,borderWidth:0,rounded:0,bg:`transparent`,color:`$ink`,placeholderTextColor:`$placeholderColor`,fontSize:_.font,...b?{"aria-invalid":!0}:null,...s,style:{...s.style??null,outlineStyle:`none`},onFocus:t=>{p.focus(!0),e?.(t)},onBlur:e=>{p.focus(!1),t?.(e)}})}let C=(0,H.jsx)(Jv,{ref:c,...W(`input`),...m?pw(!u):{type:r,secureTextEntry:i},...gw,...f===`compact`?{bg:`$panel`}:null,...o?hw:null,...b?{borderColor:`$red7`,focusStyle:{borderColor:`$red8`}}:null,height:_.h,...`height`in s?null:{$touchable:{height:Math.max(_.h,Tw)}},width:`100%`,minW:0,color:`$ink`,placeholderTextColor:`$placeholderColor`,fontSize:_.font,...b?{"aria-invalid":!0}:null,paddingInlineStart:e?v:_.gutter,paddingInlineEnd:t||g?v:_.gutter,...s});return!e&&!t&&!g?C:(0,H.jsxs)(P,{position:`relative`,width:`100%`,items:`center`,...h?Qx:null,children:[e?(0,H.jsx)(P,{...Ew(`start`,_.gutter),pointerEvents:`none`,opacity:.6,children:e}):null,C,g?(0,H.jsx)(P,{...Ub(20),...Ew(`end`,_.gutter),cursor:`pointer`,onPress:()=>d(e=>!e),"aria-label":l(u?`Hide password`:`Show password`),children:u?(0,H.jsx)(Py,{size:16}):(0,H.jsx)(Fy,{size:16})}):t?(0,H.jsx)(P,{...Ew(`end`,_.gutter),opacity:.6,children:t}):null]})}),Ow=4,kw=`bottom`,Aw=(0,V.createContext)(null),jw=(0,V.createContext)(!1);function Mw({offset:e,placement:t,...n}){let r=Lx();e??=r===`compact`?8:Ow;let[i,a]=(0,V.useState)({}),o=(0,V.useCallback)(e=>a(t=>({...t,...e})),[]);return(0,H.jsx)(Aw.Provider,{value:o,children:(0,H.jsx)(wm,{offset:i.offset??e,placement:fw(t??kw,i.align),...n})})}var Nw=wm.Trigger;wm.Anchor,wm.Close;var Pw=({sideOffset:e,align:t,solid:n,size:r,arrow:i=!1,children:a,...o})=>{let s=ji(),c=Lx(),l=(0,V.useContext)(Aw),u=(0,V.useContext)(jw),d=n??u,f=(r??(c===`compact`?`sm`:`default`))===`sm`,p=e??(c===`compact`?8:Ow);(0,V.useEffect)(()=>l?.({offset:p,align:t}),[l,p,t]);let m=d?`var(--popover)`:`$panel`;return(0,H.jsx)(jw.Provider,{value:d,children:(0,H.jsx)(zb,{name:s,children:(0,H.jsx)(Ix,{value:c,children:(0,H.jsxs)(wm.Content,{...W(`popover-content`),...d?{"data-material":`solid`}:null,...f?{"data-size":`sm`}:null,bg:m,borderWidth:1,borderColor:`$borderColor`,rounded:`$4`,...f?{p:`$2`,gap:`$1`,maxW:`var(--hanzogui-popper-available-width, 100vw)`}:{p:`$4`,width:288},...o,children:[i?(0,H.jsx)(wm.Arrow,{...W(`popover-arrow`),size:8.5,bg:m,borderWidth:1,borderColor:`$borderColor`}):null,a]})})})})},Fw=10,Iw=44,Lw={offset:0,viewport:0,content:0},Rw=(0,V.createContext)(null),zw=(e,t)=>e<0?0:e>t?t:e,Bw=(0,V.forwardRef)(function({orientation:e=`vertical`,...t},n){let r=(0,V.useContext)(Rw),[i,a]=(0,V.useState)(0),o=(0,V.useRef)(null);if(!r||r.axis!==e)return null;let s=e===`vertical`,{content:c,viewport:l,offset:u}=r.track,d=c-l,f=d>1,p=r.type===`always`?!0:f?r.type===`auto`||r.active:!1,m=Math.max(Iw,l/Math.max(c,1)*i),h=Math.max(i-m,0),g=f?h*zw(u/d,1):0,_=Vb({begin:e=>{o.current=Bb(e,!s)},move:e=>{let t=o.current;if(t===null||h===0)return;let n=Bb(e,!s);o.current=n,r.scrollBy((n-t)*d/h)},end:()=>{o.current=null}});return(0,H.jsx)(P,{ref:n,...W(`scroll-area-scrollbar`),position:`absolute`,...s?{t:0,b:0,...r.dir===`rtl`?{l:0}:r.dir===`ltr`?{r:0}:{insetInlineEnd:0},width:Fw,flexDirection:`column`}:{l:0,r:0,b:0,height:Fw,flexDirection:`row`},p:1,opacity:+!!p,pointerEvents:p?`auto`:`none`,onLayout:e=>a(s?e.nativeEvent.layout.height:e.nativeEvent.layout.width),...t,children:(0,H.jsx)(F,{...W(`scroll-area-thumb`),bg:`$borderColor`,rounded:Fw,...Ub(Fw,Iw,s?`x`:`y`),...s?{width:`100%`,height:m,y:g}:{height:`100%`,width:m,x:g},..._})})}),Vw=(0,V.forwardRef)(function({type:e=`hover`,scrollHideDelay:t=600,dir:n,horizontal:r=!1,children:i,...a},o){let s=(0,V.useRef)(null),c=(0,V.useRef)(Lw),[l,u]=(0,V.useState)(Lw),[d,f]=(0,V.useState)(!1),p=(0,V.useRef)(null),m=r?`horizontal`:`vertical`,h=(0,V.useCallback)(e=>{let t={...c.current,...e};c.current=t,u(t)},[]),g=()=>{p.current&&clearTimeout(p.current),p.current=null},_=()=>{g(),f(!0)},v=(0,V.useCallback)(()=>{f(!0),g(),p.current=setTimeout(()=>f(!1),t)},[t]);(0,V.useEffect)(()=>g,[]);let y=(0,V.useCallback)(e=>{let t=c.current,n=zw(t.offset+e,Math.max(t.content-t.viewport,0));h({offset:n}),s.current?.scrollTo(r?{x:n,y:0,animated:!1}:{x:0,y:n,animated:!1})},[r,h]);return(0,H.jsxs)(F,{ref:o,...W(`scroll-area`),position:`relative`,overflow:`hidden`,onMouseEnter:e===`hover`?_:void 0,onMouseLeave:e===`hover`?v:void 0,...a,children:[(0,H.jsx)(Kp,{ref:s,...W(`scroll-area-viewport`),flex:1,width:`100%`,height:`100%`,horizontal:r,showsVerticalScrollIndicator:!1,showsHorizontalScrollIndicator:!1,scrollEventThrottle:16,onLayout:e=>h({viewport:r?e.nativeEvent.layout.width:e.nativeEvent.layout.height}),onContentSizeChange:(e,t)=>h({content:r?e:t}),onScroll:e=>{let{contentOffset:t}=e.nativeEvent;h({offset:r?t.x:t.y}),v()},children:Lb(i)}),(0,H.jsx)(Rw.Provider,{value:{axis:m,track:l,type:e,active:d,dir:n,scrollBy:y},children:(0,H.jsx)(Bw,{orientation:m})})]})}),Hw=32,Uw=(0,V.createContext)(!1),Ww=Object.assign(({disabled:e=!1,...t})=>(0,H.jsx)(Uw.Provider,{value:e,children:(0,H.jsx)(bh,{...t})}),bh);bh.Group;var Gw=(0,V.createContext)(`$3`),Kw=({children:e,disabled:t,size:n,...r})=>{let i=(0,V.useContext)(Uw),a=Lx(),o=mw[Rx(n,a)],s=yw(r[`aria-invalid`],vw());return(0,H.jsxs)(bh.Trigger,{...W(`select-trigger`),unstyled:!0,disabled:t??i,...gw,...a===`compact`?{bg:`$panel`}:null,...s?{borderColor:`$red7`,"aria-invalid":!0}:null,px:o.gutter,items:`center`,justify:`space-between`,gap:`$2`,height:`auto`,minHeight:o.h,py:0,cursor:`pointer`,...Ub(o.h,44,`y`),...r,children:[(0,H.jsx)(Gw.Provider,{value:o.font,children:Lb(e,void 0,{size:o.font})}),(0,H.jsx)(bh.Icon,{children:(0,H.jsx)(gy,{size:16,opacity:.5})})]})},qw=({children:e,value:t,...n})=>{let r=Lx()===`compact`;return(0,H.jsxs)(bh.Item,{value:t,...W(`select-item`),unstyled:!0,index:n.index??0,items:`center`,justify:`flex-start`,gap:`$2`,minH:Hw,paddingInlineStart:r?`$1`:`$2`,paddingInlineEnd:`$7`,rounded:`$xs`,cursor:`pointer`,...Ub(Hw,44,`y`),hoverStyle:{bg:r?`$hover`:`$raised`},focusStyle:{bg:r?`$hover`:`$raised`},...n,children:[(0,H.jsx)(bh.ItemText,{...r?{fontSize:`$2`,color:`$aside`}:null,children:e}),(0,H.jsx)(P,{position:`absolute`,insetInlineEnd:`$2`,items:`center`,justify:`center`,pointerEvents:`none`,children:(0,H.jsx)(bh.ItemIndicator,{children:(0,H.jsx)(hy,{size:16,strokeWidth:2})})})]})},Jw=(e,t)=>V.Children.map(e,e=>{if(!(0,V.isValidElement)(e))return e;if(e.type===qw)return(0,V.cloneElement)(e,{index:t()});let n=e.props.children;return n===void 0?e:(0,V.cloneElement)(e,void 0,Jw(n,t))}),Yw=e=>(0,H.jsx)(bh.ScrollUpButton,{...W(`select-scroll-up-button`),items:`center`,justify:`center`,py:`$1`,...e,children:(0,H.jsx)(yy,{size:16})}),Xw=e=>(0,H.jsx)(bh.ScrollDownButton,{...W(`select-scroll-down-button`),items:`center`,justify:`center`,py:`$1`,...e,children:(0,H.jsx)(gy,{size:16})}),Zw=({children:e,...t})=>{let n=0,r=Lx();return(0,H.jsx)(bh.Content,{...W(`select-content`),...t,children:(0,H.jsxs)(Ix,{value:r,children:[(0,H.jsx)(Yw,{}),(0,H.jsx)(bh.Viewport,{minW:128,p:`$1`,bg:`$panel`,borderWidth:1,borderColor:`$borderColor`,rounded:`$3`,children:Jw(e,()=>n++)}),(0,H.jsx)(Xw,{})]})})},Qw=({children:e,...t})=>(0,H.jsx)(F,{...W(`screen`),flex:1,flexBasis:`auto`,minH:0,width:`100%`,overflow:`hidden`,...t,children:e}),$w=({size:e=16,color:t=`currentColor`,variant:n=`arc`,...r})=>n===`dot`?(0,H.jsx)(P,{...W(`spinner`),"data-variant":`dot`,"aria-hidden":!0,width:24,height:12,shrink:0,rounded:`$10`,borderWidth:1,borderColor:t,overflow:`hidden`,items:`center`,justify:`center`,...r,children:(0,H.jsx)(et,{"data-motion":`hop`,width:8,height:8,rounded:`$10`,bg:t})}):(0,H.jsx)(Xv,{...W(`spinner`),"aria-hidden":!0,size:e,color:t,...r}),eT={default:{w:36,h:20,thumb:16,edge:1},md:{w:32,h:20,thumb:16,edge:0},sm:{w:24,h:16,thumb:12,edge:0}},tT=({disabled:e,size:t,...n})=>{let r=Lx()===`compact`,i=eT[t??(r?`md`:`default`)];return(0,H.jsx)(Nh,{...W(`switch`),"data-size":t??(r?`md`:`default`),width:i.w,height:i.h,minHeight:i.h,padding:2,flexShrink:0,backgroundColor:`$color3`,borderWidth:i.edge,borderColor:`$borderColor`,activeStyle:{backgroundColor:`$color12`,borderColor:`$color12`},disabled:e,opacity:e?.5:1,cursor:e?`not-allowed`:`pointer`,...Ub(i.h,44,`y`),...n,children:(0,H.jsx)(Nh.Thumb,{...W(`switch-thumb`),width:i.thumb,height:i.thumb,backgroundColor:`$color3`,activeStyle:{bg:`$color12`}})})},nT=36,rT=40,iT=(0,V.createContext)({variant:`default`,value:void 0,vertical:!1}),aT=({variant:e=`default`,value:t,defaultValue:n,onValueChange:r,orientation:i,...a})=>{let[o,s]=(0,V.useState)(n),c=t??o;return(0,H.jsx)(iT.Provider,{value:{variant:e,value:c,vertical:i===`vertical`},children:(0,H.jsx)(Hh,{...W(`tabs`),flexDirection:i===`vertical`?`row`:`column`,gap:`$2`,...t===void 0?{defaultValue:n}:{value:t},onValueChange:e=>{s(e),r?.(e)},...i?{orientation:i}:null,...e===`line`?{"data-variant":`line`}:null,...a})})},oT=e=>{let{variant:t,vertical:n}=(0,V.useContext)(iT);return t===`line`?(0,H.jsx)(Hh.List,{...W(`tabs-list`),...n?{flexDirection:`column`,borderInlineEndWidth:1,items:`stretch`}:{flexDirection:`row`,borderBottomWidth:1,items:`flex-end`},borderColor:`$borderColor`,bg:`transparent`,gap:`$1`,p:0,rounded:0,justify:`flex-start`,...e}):(0,H.jsx)(Hh.List,{...W(`tabs-list`),items:`center`,justify:`center`,self:`flex-start`,height:nT,p:3,gap:2,bg:`$hover`,rounded:`$4`,...e})},sT=({children:e,startIcon:t,endIcon:n,badge:r,size:i=`md`,highlighted:a=!1,disabled:o,value:s,...c})=>{let{value:l,vertical:u}=(0,V.useContext)(iT),[d,f]=(0,V.useState)(!1),p=l===s,m=o?`$hush`:p?`$ink`:`$aside`;return(0,H.jsxs)(Hh.Tab,{...W(`tabs-trigger`),"data-variant":`line`,...p?{"data-chosen":``}:null,unstyled:!0,value:s,disabled:o,position:`relative`,items:`center`,justify:`center`,minH:rT,p:0,bg:`transparent`,borderWidth:0,cursor:o?`default`:`pointer`,...Ub(rT,44,`y`),onHoverIn:()=>f(!0),onHoverOut:()=>f(!1),...c,children:[(0,H.jsxs)(P,{...W(`tabs-trigger-box`),items:`center`,gap:`$1`,px:`$2`,py:i===`sm`?`$1`:`$2`,rounded:a?`$xs`:`$3`,bg:d&&!o?`$hover`:`transparent`,...a?{outlineWidth:1,outlineStyle:`solid`,outlineColor:`var(--primary)`,outlineOffset:-1}:null,children:[t,Lb(e,void 0,{size:`$2`,fontWeight:`500`,color:m,numberOfLines:1}),r,n]}),p?(0,H.jsx)(F,{...W(`tabs-indicator`),position:`absolute`,bg:`$ink`,...u?{insetInlineEnd:-1,t:0,b:0,width:1}:{b:-1,l:0,r:0,height:1}}):null]})},cT=e=>{let{variant:t}=(0,V.useContext)(iT);if(t===`line`)return(0,H.jsx)(sT,{...e});let{children:n,startIcon:r,endIcon:i,badge:a,size:o,highlighted:s,...c}=e;return(0,H.jsxs)(Hh.Tab,{...W(`tabs-trigger`),unstyled:!0,items:`center`,justify:`center`,height:`100%`,px:`$3`,gap:`$1.5`,rounded:`$3`,cursor:`pointer`,...Ub(nT,44,`y`),hoverStyle:{bg:`$edge`},focusStyle:{bg:`$edge`},activeStyle:{bg:`$background`,shadowColor:`$shadowColor`,shadowOpacity:.12,shadowRadius:3,shadowOffset:{width:0,height:1}},...c,children:[r,Lb(n,void 0,{size:`$2`,fontWeight:`500`}),a,i]})},lT=({children:e,...t})=>(0,H.jsx)(Hh.Content,{...W(`tabs-content`),flexGrow:1,...t,children:Lb(e)}),uT=3,dT={default:20,lg:20,sm:16,xs:16},fT=e=>typeof e==`string`?e.split(`
22
+ `).length:0,pT=V.forwardRef(function({rows:e,value:t,defaultValue:n,style:r,size:i,fill:a=!1,maxRows:o,...s},c){let l=Lx(),u=vw(),d=Rx(i,l),f=mw[d],p=dT[d],m=d===`sm`||d===`xs`,[h,g]=V.useState(()=>fT(n)),_=t===void 0,v=yw(s[`aria-invalid`],u),y=V.useRef(null),[b,x]=V.useState(void 0),[S,C]=V.useState(!1),w=V.useCallback(e=>{y.current=e,typeof c==`function`?c(e):c&&(c.current=e)},[c]),T=_?h:t;return V.useLayoutEffect(()=>{let e=y.current;if(!e||typeof e.scrollHeight!=`number`)return;let t=e.style.height;e.style.height=`auto`;let n=e.scrollHeight;e.style.height=t,e.offsetHeight;let r=parseFloat(getComputedStyle(e).maxHeight);C(Number.isFinite(r)&&n>r),x(e=>e===n?e:n)},[T]),(0,H.jsx)(Yv,{ref:w,...W(`textarea`),rows:Math.max(e??uT,_?h:fT(t)),value:t,defaultValue:n,onChangeText:_?e=>g(fT(e)):void 0,...gw,...l===`compact`?{bg:`$panel`}:null,...a?hw:null,width:`100%`,minH:m?uT*p+2*f.riser+2:64,...o?{maxH:o*p+2*f.riser+2}:null,px:f.gutter,pt:f.riser,pb:f.riser,borderColor:v?`$red7`:`$borderColor`,...v?{focusStyle:{borderColor:`$red8`}}:null,color:`$ink`,placeholderTextColor:`$placeholderColor`,fontSize:f.font,...m?{lineHeight:p}:null,opacity:s.disabled?.5:1,...v?{"aria-invalid":!0}:null,...S?{"data-capped":``}:null,...s,style:{...r,...b?{height:b}:null}})}),mT=1,hT=class{constructor(){this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);t>-1&&this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{let{title:t,...n}=e,r=typeof e?.id==`number`||typeof e?.id==`string`&&e.id.length>0?e.id:mT++,i=this.toasts.find(e=>e.id===r),a=e.dismissible??!0;return this.dismissedToasts.has(r)&&this.dismissedToasts.delete(r),i?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t,dismissible:a}),{...n,...e,id:r,title:t,dismissible:a}):n):this.addToast({title:t,...n,dismissible:a,id:r}),r},this.dismiss=e=>(e===void 0?this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}):(this.dismissedToasts.add(e),requestAnimationFrame(()=>{this.subscribers.forEach(t=>t({id:e,dismiss:!0}))})),e),this.message=(e,t)=>this.create({...t,title:e,type:`default`}),this.success=(e,t)=>this.create({...t,title:e,type:`success`}),this.error=(e,t)=>this.create({...t,title:e,type:`error`}),this.warning=(e,t)=>this.create({...t,title:e,type:`warning`}),this.info=(e,t)=>this.create({...t,title:e,type:`info`}),this.loading=(e,t)=>this.create({...t,title:e,type:`loading`}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({promise:e,type:`loading`,title:t.loading,description:typeof t.description==`function`?void 0:t.description,duration:1/0}));let r=Promise.resolve(e instanceof Function?e():e),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],gT(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description;this.create({id:n,type:`error`,title:r,description:a})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description;this.create({id:n,type:`success`,title:r,description:a})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description;this.create({id:n,type:`error`,title:r,description:a})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally?.()}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=t?.id??mT++;return this.create({jsx:e(n),...t,id:n}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.getHistory=()=>this.toasts}};function gT(e){return e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`}var _T=new hT,vT=Object.assign((e,t)=>_T.create({...t,title:e}),{success:_T.success,error:_T.error,warning:_T.warning,info:_T.info,loading:_T.loading,promise:_T.promise,custom:_T.custom,dismiss:_T.dismiss,message:_T.message,getHistory:()=>_T.getHistory(),getToasts:()=>_T.getActiveToasts()});function yT(e,t){let n=typeof e.title==`function`?e.title():e.title;if(typeof n!=`string`)return!1;let r=typeof e.description==`function`?e.description():e.description,i=e.type??`default`,a=i===`error`?`error`:i===`success`?`done`:`none`,o=i===`error`?`error`:i===`success`?`success`:i===`warning`?`warning`:`none`;return Wh(n,{message:typeof r==`string`?r:void 0,duration:e.duration??t.duration,burntOptions:{preset:a,haptic:o,...t.burntOptions},notificationOptions:t.notificationOptions})!==!1}var bT=.11;function xT(e,t=25){if(e>=0)return e;let n=Math.sqrt(Math.abs(e))*2;return-Math.min(n,t)}var ST=80;function CT(e){if(Math.abs(e)<=ST)return e;let t=e>0?1:-1,n=Math.abs(e)-ST;return t*(ST+Math.sqrt(n)*2)}function wT(e){let{direction:t,threshold:n,disabled:r,expanded:i,onDragMove:a,onDragStart:o,onDismiss:s,onCancel:c}=e,[l,u]=V.useState(!1),d=V.useRef(null),f=V.useRef(null),p=V.useRef(null),m=t===`left`||t===`right`||t===`horizontal`,h=t===`up`||t===`down`||t===`vertical`,g=V.useRef(null);function _(){if(typeof document>`u`)return;window.getSelection()?.removeAllRanges();let e=e=>e.preventDefault();g.current=e,document.addEventListener(`selectstart`,e,!0)}function v(){g.current&&=(document.removeEventListener(`selectstart`,g.current,!0),null)}let y=V.useCallback(()=>{d.current=null,f.current=null,u(!1),v()},[]);return V.useEffect(()=>()=>{if(d.current){if(p.current&&d.current.pointerId)try{p.current.releasePointerCapture(d.current.pointerId)}catch{}y()}},[y]),{isDragging:l,gestureHandlers:{onPointerDown:V.useCallback(e=>{if(r||e.button!==0||e.target.closest(`button, a, input, textarea, select, [role="button"]`)||(window.getSelection()?.toString().length??0)>0)return;let t=e.currentTarget;p.current=t,t.setPointerCapture(e.pointerId),d.current={startX:e.clientX,startY:e.clientY,startTime:Date.now(),pointerId:e.pointerId},_(),u(!0),o?.()},[r,o]),onPointerMove:V.useCallback(e=>{if(!d.current||r)return;let n=e.clientX-d.current.startX,i=e.clientY-d.current.startY;!f.current&&(Math.abs(n)>1||Math.abs(i)>1)&&(f.current=Math.abs(n)>Math.abs(i)?`x`:`y`);let o=0,s=0;t===`right`?o=n>0?CT(n):xT(n):t===`left`?o=n<0?CT(n):-xT(-n):t===`down`?s=i>0?CT(i):xT(i):t===`up`?s=i<0?CT(i):-xT(-i):t===`horizontal`?o=CT(n):t===`vertical`&&(s=CT(i)),a(o,s)},[r,t,i,m,h,a]),onPointerUp:V.useCallback(e=>{if(!d.current||r)return;let i=e.clientX-d.current.startX,a=e.clientY-d.current.startY,o=Date.now()-d.current.startTime,l=Math.abs(i)/o,u=Math.abs(a)/o,g=f.current,_=g===`y`&&m||g===`x`&&h,v=m?i:a,b=m?l:u,x=Math.abs(v)>=n,S=b>bT,C=null;_||(t===`right`&&i>0?C=`right`:t===`left`&&i<0?C=`left`:t===`horizontal`?Math.abs(i)>Math.abs(a)&&(C=i>0?`right`:`left`):t===`down`&&a>0?C=`down`:t===`up`&&a<0?C=`up`:t===`vertical`&&Math.abs(a)>Math.abs(i)&&(C=a>0?`down`:`up`));let w=C&&(x||S);if(p.current)try{p.current.releasePointerCapture(e.pointerId)}catch{}y(),w&&C?s(C,b):c()},[r,t,n,m,h,s,c,y]),onPointerCancel:V.useCallback(e=>{if(p.current)try{p.current.releasePointerCapture(e.pointerId)}catch{}y(),c()},[c,y]),onLostPointerCapture:V.useCallback(()=>{d.current&&(y(),c())},[c,y])},gesture:null}}var TT={type:`spring`,damping:30,stiffness:400,mass:.5},ET=200;function DT(e,t,n,r,i,a,o){let{damping:s=30,stiffness:c=400,mass:l=.5,initialVelocityX:u=0,initialVelocityY:d=0,fadeOut:f=!1}=a,p=t,m=n,h=u,g=d,_=null,v=r,y=i,b=Math.sqrt((r-t)**2+(i-n)**2)||1;function x(){let r=-c*(p-v),i=-c*(m-y),a=-s*h,u=-s*g,d=(r+a)/l,S=(i+u)/l;if(h+=d*.016,g+=S*.016,p+=h*.016,m+=g*.016,e.style.transform=`translate3d(${p}px, ${m}px, 0)`,f){let r=Math.sqrt((p-t)**2+(m-n)**2),i=Math.min(r/b,1);e.style.opacity=String(1-i)}let C=Math.abs(p-v),w=Math.abs(m-y),T=Math.sqrt(h*h+g*g);if(C<.5&&w<.5&&T<.5){e.style.transform=`translate3d(${v}px, ${y}px, 0)`,f&&(e.style.opacity=`0`),o?.();return}_=requestAnimationFrame(x)}return _=requestAnimationFrame(x),()=>{_&&cancelAnimationFrame(_)}}function OT(e={}){let{onExitComplete:t,reducedMotion:n,swipeAxis:r=`horizontal`}=e,{animationDriver:i}=A();if(!i)throw Error(`Toast requires an animation driver to be set in GuiProvider`);let{useAnimatedNumber:a,useAnimatedNumberStyle:o,useAnimatedNumbersStyle:s}=i,c=i.View??et,l=V.useRef(null),u=V.useRef(null),d=V.useRef({x:0,y:0}),f=a(0),p=a(0),m=s?s([f,p],(e,t)=>{"worklet";return{transform:[{translateX:e},{translateY:t}]}}):o(r===`vertical`?p:f,e=>{"worklet";let t=r===`vertical`?f.getValue():p.getValue();return r===`vertical`?{transform:[{translateX:t},{translateY:e}]}:{transform:[{translateX:e},{translateY:t}]}}),h=be((e,t)=>{u.current?.(),u.current=null,d.current={x:e,y:t},l.current?(l.current.style.transform=`translate3d(${e}px, ${t}px, 0)`,l.current.style.opacity=`1`):(f.setValue(e,{type:`direct`}),p.setValue(t,{type:`direct`}))}),g=be(e=>{if(u.current?.(),n){l.current?l.current.style.transform=`translate3d(0px, 0px, 0)`:(f.setValue(0,{type:`direct`}),p.setValue(0,{type:`direct`})),d.current={x:0,y:0},e?.();return}if(l.current){let{x:t,y:n}=d.current;u.current=DT(l.current,t,n,0,0,TT,()=>{d.current={x:0,y:0},e?.()})}else f.setValue(0,TT),p.setValue(0,TT,e)}),_=be((e,r,i)=>{u.current?.();let{x:a,y:o}=d.current,s=e===`left`?-200:e===`right`?ET:0,c=e===`up`?-200:e===`down`?ET:0;if(e===`left`&&a<s?s=a-50:e===`right`&&a>s&&(s=a+50),e===`up`&&o<c?c=o-50:e===`down`&&o>c&&(c=o+50),n){l.current?l.current.style.transform=`translate3d(${s}px, ${c}px, 0)`:(f.setValue(s,{type:`direct`}),p.setValue(c,{type:`direct`})),i?.(),t?.();return}let m=(r??0)*500,h={damping:25,stiffness:350,mass:.4,initialVelocityX:e===`left`?-m:e===`right`?m:0,initialVelocityY:e===`up`?-m:e===`down`?m:0,fadeOut:!0};if(l.current){let{x:e,y:n}=d.current;u.current=DT(l.current,e,n,s,c,h,()=>{i?.(),t?.()})}else{let e={type:`spring`,damping:25,stiffness:350,mass:.4};f.setValue(s,e),p.setValue(c,e,()=>{i?.(),t?.()})}}),v=be(()=>{u.current?.(),f.stop(),p.stop()});return V.useEffect(()=>()=>{u.current?.()},[]),{setDragOffset:h,springBack:g,animateOut:_,stop:v,animatedStyle:m,AnimatedView:c,dragRef:l}}var kT=null;function AT(){return kT===null?typeof window>`u`?!1:(kT=window.matchMedia?.(`(prefers-reduced-motion: reduce)`)?.matches??!1,kT):kT}function jT(e){let[t,n]=V.useState(()=>e??AT());return V.useEffect(()=>{if(e!==void 0){n(e);return}if(typeof window>`u`)return;let t=window.matchMedia?.(`(prefers-reduced-motion: reduce)`);if(!t)return;let r=e=>{kT=e.matches,n(e.matches)};return t.addEventListener?.(`change`,r),()=>{t.removeEventListener?.(`change`,r)}},[e]),t}var MT=I(F,{name:`ToastPositionWrapper`,pointerEvents:`auto`,position:`absolute`,left:0,right:0,opacity:1,scale:1,y:0,x:0}),NT=I(F,{name:`ToastItem`,userSelect:`none`,cursor:`default`,focusable:!0,variants:{unstyled:{false:{backgroundColor:`$background`,borderRadius:`$6`,paddingHorizontal:`$4`,paddingVertical:`$3`,borderWidth:1,borderColor:`$borderColor`,shadowColor:`rgba(0, 0, 0, 0.15)`,shadowOffset:{width:0,height:4},shadowRadius:12,focusVisibleStyle:{outlineWidth:2,outlineColor:`$color8`,outlineStyle:`solid`}}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),PT=I(P,{name:`ToastClose`,render:`button`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,variants:{unstyled:{false:{width:18,height:18,borderRadius:`$10`,backgroundColor:`$background`,borderWidth:1,borderColor:`$borderColor`,shadowColor:`rgba(0, 0, 0, 0.08)`,shadowOffset:{width:0,height:1},shadowRadius:3,hoverStyle:{backgroundColor:`$color3`},pressStyle:{backgroundColor:`$color4`}}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),FT=I(P,{name:`ToastAction`,render:`button`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,variants:{unstyled:{false:{borderRadius:`$2`,paddingHorizontal:`$2`,height:24,backgroundColor:`$color5`,hoverStyle:{backgroundColor:`$color6`},pressStyle:{backgroundColor:`$color7`}}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),IT=()=>(0,H.jsx)(o,{size:`$1`,color:`$color11`,children:`✕`}),LT=4,RT=16,zT=14,BT=4e3,VT=72,HT=200,UT=[`altKey`,`KeyT`],WT=N({},`Toast__`),GT=WT.useStyledContext;function KT(e){return!!e&&Array.isArray(e.toasts)&&typeof e.setToastHeight==`function`&&typeof e.removeToast==`function`}function qT(e){let t=GT();if(!KT(t))throw Error(`\`${e}\` must be used within \`Toast\``);return t}var JT=V.createContext(null);function YT(){let e=V.useContext(JT);if(!e)throw Error(`useToastItemContext must be used within Toast.Item or Toast.List`);return e}function XT(e,t){if(e!==`auto`)return e;let[n,r]=t.split(`-`);return r===`left`?`left`:r===`right`?`right`:`horizontal`}var ZT=V.forwardRef(function(e,t){let{children:n,position:r=`bottom-right`,duration:i=BT,gap:a=zT,visibleToasts:o=LT,swipeDirection:s=`auto`,swipeThreshold:c=50,toastHeight:l=VT,closeButton:u=!1,expand:d=!1,theme:f,reducedMotion:p,native:m=!1,burntOptions:h,notificationOptions:g,icons:_}=e,v=jT(p),[y,b]=V.useState([]),[x,S]=V.useState({}),[C,w]=V.useState(!1),T=d||C,[E,D]=V.useState(!1),O=V.useRef(!1),k=V.useRef(T);V.useLayoutEffect(()=>{k.current!==T&&(O.current=!0,k.current=T);let e=setTimeout(()=>{O.current=!1},350);return()=>clearTimeout(e)},[T]);let A=V.useCallback((e,t)=>{if(O.current)return;let n=Math.round(t);S(t=>{let r=t[e];return r!=null&&Math.abs(r-n)<=2?t:{...t,[e]:n}})},[]),j=V.useCallback(e=>{S(t=>{if(!(e in t))return t;let n={...t};return delete n[e],n})},[]),M=V.useRef(!1),ee=V.useRef(null),N=V.useCallback(()=>{M.current=!0,ee.current&&clearTimeout(ee.current),ee.current=setTimeout(()=>{M.current=!1},800)},[]),te=V.useCallback(()=>M.current,[]),ne=V.useRef(h),re=V.useRef(g);V.useEffect(()=>{ne.current=h},[h]),V.useEffect(()=>{re.current=g},[g]),V.useEffect(()=>_T.subscribe(e=>{if(e.dismiss){b(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t));return}m&&yT(e,{duration:i,burntOptions:ne.current,notificationOptions:re.current})||b(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})}),[m,i]);let ie=V.useRef(y.length);V.useEffect(()=>{let e=ie.current;ie.current=y.length,(y.length<=1&&!M.current||y.length>e&&T)&&w(!1)},[y.length,T]);let ae=V.useCallback(e=>{b(t=>(t.find(t=>t.id===e.id)?.delete||_T.dismiss(e.id),t.filter(({id:t})=>t!==e.id)))},[]),oe=XT(s,r),se=ji(),ce=f===`system`||!f?se?.includes(`dark`)?`dark`:`light`:f,le={toasts:y,heights:x,setToastHeight:A,removeToastHeight:j,expanded:T,setExpanded:w,interacting:E,setInteracting:D,triggerDismissCooldown:N,isInDismissCooldown:te,removeToast:ae,position:r,duration:i,gap:a,visibleToasts:o,swipeDirection:oe,swipeThreshold:c,toastHeight:l,closeButton:u,reducedMotion:v,native:m,burntOptions:h,notificationOptions:g,icons:_};return(0,H.jsx)(WT.Provider,{...le,children:(0,H.jsx)(Ke,{name:ce,children:n})})}),QT=I(et,{name:`ToastViewport`,variants:{unstyled:{false:{position:`fixed`,zIndex:1e5,pointerEvents:`box-none`,maxWidth:`100%`,width:356,minHeight:1}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),$T=QT.styleable(function(e,t){let{offset:n=RT,hotkey:r=UT,label:i=`Notifications`,portalToRoot:a=!0,portalZIndex:o=2**53-1,children:s,...c}=e,l=qT(`Toast.Viewport`),u=V.useRef(null),d=V.useRef(null),f=V.useRef(!1),p=V.useRef(null),m=V.useRef(!1),[h,g]=l.position.split(`-`),{insets:_}=A(),v=V.useMemo(()=>{let e={},t=typeof n==`number`?n:RT,r=typeof n==`object`?n:{top:t,right:t,bottom:t,left:t},i=_?.top??0,a=_?.bottom??0,o=i>0?i:r.top??t,s=a>0?a:r.bottom??t;return h===`top`?e.top=o:e.bottom=s,g===`left`?e.left=r.left??t:g===`right`?e.right=r.right??t:(e.left=`50%`,e.transform=`translateX(-50%)`),e},[n,h,g]);if(V.useEffect(()=>{let e=e=>{r.length>0&&r.every(t=>e[t]||e.code===t)&&(l.setExpanded(!0),u.current?.focus())};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[r]),l.toasts.length===0)return null;let y=r.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),b=(0,H.jsx)(QT,{ref:u,"aria-label":`${i} ${y}`,tabIndex:-1,"aria-live":`polite`,style:v,"data-y-position":h,"data-x-position":g,onMouseEnter:()=>{m.current=!0,p.current&&=(clearTimeout(p.current),null),l.toasts.length>1&&!l.interacting&&!f.current&&(d.current=setTimeout(()=>l.setExpanded(!0),50))},onMouseLeave:()=>{m.current=!1,d.current&&=(clearTimeout(d.current),null),!l.interacting&&!l.isInDismissCooldown()?l.setExpanded(!1):l.isInDismissCooldown()&&(p.current&&clearTimeout(p.current),p.current=setTimeout(()=>{p.current=null,m.current||l.setExpanded(!1)},1200))},onPointerDown:()=>{d.current&&=(clearTimeout(d.current),null),l.setInteracting(!0)},onPointerUp:()=>l.setInteracting(!1),onPointerCancel:()=>l.setInteracting(!1),onFocus:e=>{e.currentTarget.contains(e.relatedTarget)||(l.toasts.length>1&&l.setExpanded(!0),l.setInteracting(!0))},onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||(l.setInteracting(!1),l.isInDismissCooldown()||l.setExpanded(!1))},...c,children:s});return a?(0,H.jsx)(da,{zIndex:o,children:(0,H.jsx)(WT.Provider,{...l,children:b})}):b});function eE({renderItem:e}){let t=qT(`Toast.List`),n=t.toasts.length;return(0,H.jsx)(Wi,{children:t.toasts.slice(0,n).map((n,r)=>{let i=()=>{n.dismissible!==!1&&(n.onDismiss?.(n),t.removeToast(n))},a={toast:n,handleClose:i};return e?(0,H.jsx)(JT.Provider,{value:a,children:e({toast:n,index:r,handleClose:i})},n.id):(0,H.jsx)(JT.Provider,{value:a,children:(0,H.jsx)(rE,{toast:n,index:r,children:(0,H.jsx)(tE,{toast:n})})},n.id)})})}function tE({toast:e}){let t=qT(`Toast.Item`),{handleClose:n}=YT();e.type;let r=e.dismissible!==!1,i=typeof e.title==`function`?e.title():e.title,a=typeof e.description==`function`?e.description():e.description;return(0,H.jsxs)(P,{alignItems:`flex-start`,gap:`$3`,children:[(0,H.jsx)(cE,{}),(0,H.jsxs)(F,{flex:1,gap:`$1`,children:[i&&(0,H.jsx)(iE,{children:i}),a&&(0,H.jsx)(aE,{children:a}),(e.action||e.cancel)&&(0,H.jsxs)(P,{gap:`$2`,marginTop:`$2`,children:[e.cancel&&(0,H.jsx)(FT,{backgroundColor:`transparent`,onPress:t=>{e.cancel?.onClick?.(t),n()},children:(0,H.jsx)(o,{size:`$2`,color:`$color11`,children:e.cancel.label})}),e.action&&(0,H.jsx)(FT,{backgroundColor:`$color12`,hoverStyle:{backgroundColor:`$color11`},pressStyle:{backgroundColor:`$color10`},onPress:t=>{e.action?.onClick?.(t),t.defaultPrevented||n()},children:(0,H.jsx)(o,{size:`$2`,fontWeight:`600`,color:`$background`,children:e.action.label})})]})]}),t.closeButton&&r&&(0,H.jsx)(oE,{})]})}function nE({animatedStyle:e,gestureHandlers:t,gesture:n,AnimatedView:r,dragRef:i,children:a}){return(0,H.jsx)(`div`,{ref:i,style:{flex:1,display:`flex`,flexDirection:`column`,userSelect:`none`,WebkitUserSelect:`none`,touchAction:`none`,cursor:`default`},...t,children:a})}var rE=NT.styleable(function(e,t){let{toast:n,index:r,children:i,...a}=e,o=qT(`Toast.Item`),[s,c]=V.useState(!1),[l,u]=V.useState(!1),[d,f]=V.useState(!1),[p,m]=V.useState(0),h=V.useRef(null),g=V.useRef(null),_=V.useRef(0),v=V.useRef(0),y=V.useRef(n.duration??o.duration),b=r===0,x=r<o.visibleToasts,S=n.type??`default`,C=n.dismissible!==!1,w=n.duration??o.duration,[T]=o.position.split(`-`),E=T===`top`,D=(()=>{let e=0,t=0;for(let n=0;n<r;n++){let r=o.toasts[n]?.id;if(r==null)continue;let i=o.heights[r];i!==0&&(e+=i??o.toastHeight,t++)}return e+t*o.gap})(),O=V.useRef(D);O.current=D;let k=V.useRef(o.expanded);k.current=o.expanded;let A=V.useCallback(()=>{w!==1/0&&S!==`loading`&&(_.current=Date.now(),g.current=setTimeout(()=>{n.onAutoClose?.(n),u(!0),setTimeout(()=>o.removeToast(n),HT)},y.current))},[w,S,n,o.removeToast]),j=be(()=>{if(g.current&&clearTimeout(g.current),v.current<_.current){let e=Date.now()-_.current;y.current=Math.max(0,y.current-e)}v.current=Date.now()}),M=be(()=>{o.expanded||o.interacting||(y.current=w,A())});V.useEffect(()=>{c(!0)},[]),V.useEffect(()=>{n.delete&&(u(!0),k.current&&m(O.current),setTimeout(()=>o.removeToast(n),HT))},[n.delete,n,o.removeToast]),V.useEffect(()=>(o.expanded||o.interacting?j():A(),()=>{g.current&&clearTimeout(g.current)}),[o.expanded,o.interacting,A]),V.useEffect(()=>{y.current=w},[w]);let{setDragOffset:ee,springBack:N,animateOut:te,animatedStyle:ne,AnimatedView:re,dragRef:ie}=OT({reducedMotion:o.reducedMotion,swipeAxis:o.swipeDirection===`up`||o.swipeDirection===`down`||o.swipeDirection===`vertical`?`vertical`:`horizontal`}),{isDragging:ae,gestureHandlers:oe,gesture:se}=wT({direction:o.swipeDirection,threshold:o.swipeThreshold,disabled:!C||S===`loading`,expanded:o.expanded,onDragStart:j,onDragMove:ee,onDismiss:(e,t)=>{o.triggerDismissCooldown(),f(!0),n.onDismiss?.(n),h.current=k.current?E?O.current:-O.current:b?0:E?o.gap*r:-o.gap*r,u(!0),o.removeToast(n),te(e,t)},onCancel:()=>{N(()=>{M()})}}),ce=V.useCallback(e=>{if(l||!o.expanded&&r!==0)return;let{height:t}=e.nativeEvent.layout;o.setToastHeight(n.id,t)},[n.id,o.setToastHeight,r,o.expanded,l]);V.useEffect(()=>()=>{o.removeToastHeight(n.id)},[n.id,o.removeToastHeight]);let le=V.useCallback(()=>{C&&(o.triggerDismissCooldown(),n.onDismiss?.(n),u(!0),k.current&&m(O.current),setTimeout(()=>o.removeToast(n),HT))},[C,n,o.removeToast,o.triggerDismissCooldown]),ue=V.useMemo(()=>({toast:n,handleClose:le}),[n,le]),de=-1;for(let e of o.toasts){let t=o.heights[e.id];if(t!=null&&t>0){de=t;break}}let fe=!o.expanded&&!b?1-r*.05:1,pe=l?p:D,me=o.expanded?E?pe:-pe:b?0:E?o.gap*r:-o.gap*r,P=l&&!d||r>=o.visibleToasts?0:1,he=l?0:o.visibleToasts-r+1,ge=o.expanded?o.heights[n.id]||void 0:!b&&de>0?de:void 0,F=r>=o.visibleToasts?`none`:`auto`,_e=o.expanded?o.gap+1:0,ve={"data-mounted":s?`true`:`false`,"data-removed":l?`true`:`false`,"data-swipe-out":d?`true`:`false`,"data-visible":x?`true`:`false`,"data-front":b?`true`:`false`,"data-index":String(r),"data-type":S,"data-expanded":o.expanded?`true`:`false`};return(0,H.jsx)(MT,{ref:t,testID:a.testID,accessibilityLabel:a.accessibilityLabel,...ve,transition:ae||o.reducedMotion?void 0:l?`200ms`:`400ms`,animateOnly:[`transform`,`opacity`,`height`],y:me,scale:fe,opacity:P,zIndex:he,height:ge,overflow:`visible`,pointerEvents:F,top:E?0:void 0,bottom:E?void 0:0,...!b&&{style:{transformOrigin:E?`top center`:`bottom center`}},enterStyle:o.reducedMotion?{opacity:0}:{opacity:0,y:E?-80:80},exitStyle:o.reducedMotion?{opacity:0}:d?{opacity:0,y:h.current??me,scale:fe}:{opacity:0,y:me,scale:fe},children:(0,H.jsx)(nE,{animatedStyle:ne,gestureHandlers:oe,gesture:se,AnimatedView:re,dragRef:ie,children:(0,H.jsxs)(NT,{"data-slot":`toast`,role:`status`,"aria-live":`polite`,"aria-atomic":!0,tabIndex:0,onLayout:ce,onKeyDown:e=>{if(e.key===`Escape`&&C){let t=e.currentTarget,n=t.closest(`[aria-label]`);if(n){let e=n.querySelectorAll(`[tabindex="0"]`),r=Array.from(e),i=r.indexOf(t);(r[i+1]||r[i-1])?.focus()}le()}},...a,children:[o.expanded&&_e>0&&(0,H.jsx)(et,{position:`absolute`,left:0,right:0,height:_e,pointerEvents:`auto`,...E?{top:`100%`}:{bottom:`100%`}}),(0,H.jsx)(JT.Provider,{value:ue,children:i})]})})})}),iE=I(o,{name:`ToastTitle`,variants:{unstyled:{false:{color:`$color`,fontWeight:`600`,size:`$4`}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),aE=I(o,{name:`ToastDescription`,variants:{unstyled:{false:{color:`$color11`,size:`$2`}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),oE=PT.styleable(function(e,t){let n;try{n=YT().handleClose}catch{}let r=qT(`Toast.Close`);return(0,H.jsx)(PT,{ref:t,"aria-label":`Close toast`,onPress:n,...e,children:e.children??r.icons?.close??(0,H.jsx)(IT,{})})}),sE=FT.styleable(function(e,t){return(0,H.jsx)(FT,{ref:t,...e})});function cE(e){let t=qT(`Toast.Icon`),n;try{n=YT().toast}catch{return null}if(!n)return null;if(n.icon!==void 0)return(0,H.jsx)(et,{flexShrink:0,marginTop:`$0.5`,children:n.icon});let r=n.type??`default`,i=t.icons?.[r]??null;return i?(0,H.jsx)(et,{flexShrink:0,marginTop:`$0.5`,children:i}):null}function lE(){let e=qT(`useToasts`);return{toasts:e.toasts,expanded:e.expanded,position:e.position}}ZT.displayName=`Toast`;var uE=l(ZT,{Viewport:$T,List:eE,Item:rE,Title:iE,Description:aE,Close:oE,Action:sE,Icon:cE}),dE={neutral:`gray`,info:`blue`,success:`green`,warning:`orange`,error:`red`},fE={gray:{ink:`$ink`,fill:`$raised`,on:`$ink`,tint:`$hover`,ground:`var(--data-gray-1)`,edge:`var(--data-gray-6)`},blue:{ink:`var(--primary)`,fill:`var(--primary)`,on:`var(--primary-foreground)`,tint:`var(--glass-strong)`,ground:`var(--data-blue-1)`,edge:`var(--data-blue-6)`},green:{ink:`var(--state-success)`,fill:`var(--state-success)`,on:`var(--neutral-950)`,tint:`var(--state-success-bg)`,ground:`var(--data-green-1)`,edge:`var(--data-green-6)`},orange:{ink:`var(--state-warning)`,fill:`var(--state-warning)`,on:`var(--neutral-950)`,tint:`var(--state-warning-bg)`,ground:`var(--data-orange-1)`,edge:`var(--data-orange-6)`},red:{ink:`var(--state-error)`,fill:`var(--destructive)`,on:`var(--destructive-foreground)`,tint:`var(--state-error-bg)`,ground:`var(--data-red-1)`,edge:`var(--data-red-6)`}},pE=(e,t)=>t??dE[e??`neutral`],mE=(e,t)=>fE[pE(e,t)],hE=296,gE=8,_E=12,vE={default:`neutral`,loading:`neutral`,info:`info`,success:`success`,warning:`warning`,error:`error`},yE={neutral:We(`neutral`),info:We(`info`),success:We(`success`),warning:We(`warning`),error:We(`error`)},bE={neutral:Eb,info:Uy,success:vb,warning:Eb,error:Eb},xE=e=>typeof e==`function`?e():e,SE=e=>{let t=e.data?.progress;return typeof t==`number`&&Number.isFinite(t)?Math.max(0,Math.min(100,t)):null},CE=e=>({...dw(2),width:e?`100%`:hE,rounded:e?0:`$3`,borderWidth:0,p:0,overflow:`hidden`}),wE={position:`relative`,pt:`$2`,px:`$2`,pb:`$1`};function TE({t:e,duration:t,paused:n=!1,onClose:r,onHold:i}){let a=Ye(),s=vE[e.type??`default`]??`neutral`,c=mE(s),l=bE[s],u=SE(e),d=xE(e.title),f=e.description?xE(e.description):null;return(0,H.jsxs)(F,{...W(`toast-body`),...wE,...i?{onHoverIn:()=>i(!0),onHoverOut:()=>i(!1),onFocus:()=>i(!0),onBlur:()=>i(!1)}:null,children:[u===null?t===void 0?null:(0,H.jsx)(et,{...W(`toast-countdown`),"data-motion":`drain`,"data-paused":n?``:void 0,position:`absolute`,t:0,l:0,r:0,b:0,bg:c.tint,pointerEvents:`none`,style:{"--drain":`${t}ms`}}):(0,H.jsx)(et,{...W(`toast-progress`),position:`absolute`,t:0,insetInlineStart:0,b:0,bg:c.tint,style:{width:`${u}%`,transition:`width 300ms linear`},pointerEvents:`none`}),(0,H.jsxs)(P,{...W(`toast-header`),items:`center`,gap:`$2`,mb:`$1`,minH:24,children:[(0,H.jsx)(et,{shrink:0,width:16,height:16,items:`center`,justify:`center`,children:e.icon??(0,H.jsx)(l,{size:16,color:c.ink,"aria-label":a.t(yE[s])})}),(0,H.jsx)(o,{...W(`toast-message`),flex:1,size:`$1`,fontWeight:`500`,color:`$aside`,numberOfLines:2,children:d}),e.cancel?(0,H.jsx)(kS,{...W(`toast-cancel`),size:`xs`,variant:`ghost`,fontWeight:`400`,onPress:t=>{e.cancel?.onClick?.(t),r?.()},children:e.cancel.label||a.t(`Cancel`)}):null,e.dismissible===!1?null:(0,H.jsx)(kS,{...W(`toast-close`),size:`icon-xs`,variant:`ghost`,emphasis:`subtle`,"aria-label":a.t(`Close`),onPress:r,children:(0,H.jsx)(Fb,{})})]}),f?(0,H.jsx)(o,{...W(`toast-description`),size:`$1`,color:`$hint`,paddingInlineStart:24,maxW:224,numberOfLines:1,mb:`$1`,children:f}):null,e.action?(0,H.jsx)(F,{...W(`toast-footer`),mt:`$2`,borderTopWidth:1,borderColor:`$borderColor`,pt:`$1`,items:`flex-end`,children:(0,H.jsx)(kS,{size:`xs`,variant:`ghost`,onPress:t=>{e.action?.onClick?.(t),t?.defaultPrevented||r?.()},children:e.action.label})}):null]})}function EE({t:e,index:t,fallback:n,phone:r}){let i=SE(e),a=e.duration??n,o=i===null&&e.type!==`loading`&&Number.isFinite(a)&&a>0,[s,c]=(0,V.useState)(!1),l=(0,V.useRef)(a),u=(0,V.useRef)(!1);(0,V.useEffect)(()=>{if(!o||s||u.current)return;let t=Date.now(),n=setTimeout(()=>{u.current=!0,e.onAutoClose?.(e),vT.dismiss(e.id)},l.current);return()=>{clearTimeout(n),l.current=Math.max(0,l.current-(Date.now()-t))}},[o,s,e]);let d=(0,V.useMemo)(()=>({...e,duration:1/0}),[e]),f=()=>{e.onDismiss?.(e),vT.dismiss(e.id)};return(0,H.jsx)(uE.Item,{toast:d,index:t,...CE(r),"data-status":vE[e.type??`default`]??`neutral`,children:(0,H.jsx)(TE,{t:e,duration:o?a:void 0,paused:s,onClose:f,onHold:c})})}function DE({limit:e}){let{toasts:t}=lE(),n=t.filter(e=>!e.delete);return(0,V.useEffect)(()=>{for(let t of n.slice(e))vT.dismiss(t.id)},[n,e]),null}var OE=(0,V.forwardRef)(function(e,t){let{theme:n=`system`,toastOptions:r,richColors:i,className:a,style:o,position:s,offset:c,gap:l,limit:u=3,duration:d,containerAriaLabel:f,hotkey:p,...m}=e,h=Ye(),g=!!ce()[`max-md`],_=r?.duration??d??6e3;return(0,H.jsx)(uE,{...m,theme:n,position:s??(g?`top-center`:`bottom-right`),gap:l??gE,visibleToasts:u,duration:1/0,children:(0,H.jsxs)(uE.Viewport,{ref:t,...W(`toaster`),offset:c??(g?0:_E),hotkey:p,label:f??h.t(`Notifications`),...g?{width:`100%`}:null,children:[(0,H.jsx)(DE,{limit:u}),(0,H.jsx)(uE.List,{renderItem:({toast:e,index:t})=>(0,H.jsx)(EE,{t:e,index:t,fallback:_,phone:g},e.id)})]})})});function G(e){let t={};for(let[n,r]of e)t[AE[n]]=kE[r];return t}var kE=[`hsla(0, 0%, 10%, 1)`,`hsla(0, 0%, 67%, 1)`,`hsla(0, 0%, 100%, 0)`,`hsla(0, 0%, 97%, 0.2)`,`hsla(0, 0%, 97%, 0.4)`,`hsla(0, 0%, 97%, 0.6)`,`hsla(0, 0%, 97%, 0.8)`,`hsla(0, 0%, 100%, 1)`,`hsla(0, 0%, 97%, 1)`,`hsla(0, 0%, 93%, 1)`,`hsla(0, 0%, 85%, 1)`,`hsla(0, 0%, 80%, 1)`,`hsla(0, 0%, 70%, 1)`,`hsla(0, 0%, 59%, 1)`,`hsla(0, 0%, 45%, 1)`,`hsla(0, 0%, 30%, 1)`,`hsla(0, 0%, 20%, 1)`,`hsla(0, 0%, 14%, 1)`,`hsla(0, 0%, 2%, 1)`,`hsla(0, 0%, 2%, 0)`,`hsla(0, 0%, 2%, 0.2)`,`hsla(0, 0%, 2%, 0.4)`,`hsla(0, 0%, 2%, 0.6)`,`hsla(0, 0%, 2%, 0.8)`,`#090909`,`#151515`,`#191919`,`#232323`,`#333`,`#444`,`#666`,`#777`,`#858585`,`#aaa`,`#ccc`,`#ffffff`,`#fff`,`#f8f8f8`,`hsl(0, 0%, 93%)`,`hsl(0, 0%, 85%)`,`hsl(0, 0%, 80%)`,`hsl(0, 0%, 70%)`,`hsl(0, 0%, 59%)`,`hsl(0, 0%, 45%)`,`hsl(0, 0%, 30%)`,`hsl(0, 0%, 20%)`,`hsl(0, 0%, 14%)`,`hsl(0, 0%, 2%)`,`rgba(255,255,255,1)`,`rgba(255,255,255,0)`,`rgba(255,255,255,0.2)`,`rgba(255,255,255,0.4)`,`rgba(255,255,255,0.6)`,`rgba(255,255,255,0.8)`,`rgba(0,0,0,1)`,`rgba(0,0,0,0)`,`rgba(0,0,0,0.2)`,`rgba(0,0,0,0.4)`,`rgba(0,0,0,0.6)`,`rgba(0,0,0,0.8)`,`rgba(0,0,0,0.04)`,`rgba(0,0,0,0.08)`,`rgba(0,0,0,0.12)`,`rgba(0,0,0,0.22)`,`rgba(0,0,0,0.33)`,`rgba(0,0,0,0.44)`,`rgba(0,0,0,0.75)`,`rgba(255,255,255,0.05)`,`rgba(255,255,255,0.1)`,`rgba(255,255,255,0.15)`,`rgba(255,255,255,0.3)`,`rgba(255,255,255,0.55)`,`rgba(255,255,255,0.7)`,`rgba(255,255,255,0.85)`,`#fcfcfc`,`#f9f9f9`,`#f0f0f0`,`#e8e8e8`,`#e0e0e0`,`#d9d9d9`,`#cecece`,`#bbbbbb`,`#8d8d8d`,`#838383`,`#646464`,`#202020`,`#fbfdff`,`#f4faff`,`#e6f4fe`,`#d5efff`,`#c2e5ff`,`#acd8fc`,`#8ec8f6`,`#5eb1ef`,`#0090ff`,`#0588f0`,`#0d74ce`,`#113264`,`#fffcfc`,`#fff7f7`,`#feebec`,`#ffdbdc`,`#ffcdce`,`#fdbdbe`,`#f4a9aa`,`#eb8e90`,`#e5484d`,`#dc3e42`,`#ce2c31`,`#641723`,`#fdfdf9`,`#fefce9`,`#fffab8`,`#fff394`,`#ffe770`,`#f3d768`,`#e4c767`,`#d5ae39`,`#ffe629`,`#ffdc00`,`#9e6c00`,`#473b1f`,`#fbfefc`,`#f4fbf6`,`#e6f6eb`,`#d6f1df`,`#c4e8d1`,`#adddc0`,`#8eceaa`,`#5bb98b`,`#30a46c`,`#2b9a66`,`#218358`,`#193b2d`,`#fefcfb`,`#fff7ed`,`#ffefd6`,`#ffdfb5`,`#ffd19a`,`#ffc182`,`#f5ae73`,`#ec9455`,`#f76b15`,`#ef5f00`,`#cc4e00`,`#582d1d`,`#fffcfe`,`#fef7fb`,`#fee9f5`,`#fbdcef`,`#f6cee7`,`#efbfdd`,`#e7acd0`,`#dd93c2`,`#d6409f`,`#cf3897`,`#c2298a`,`#651249`,`#fefcfe`,`#fbf7fe`,`#f7edfe`,`#f2e2fc`,`#ead5f9`,`#e0c4f4`,`#d1afec`,`#be93e4`,`#8e4ec6`,`#8347b9`,`#8145b5`,`#402060`,`#fafefd`,`#f3fbf9`,`#e0f8f3`,`#ccf3ea`,`#b8eae0`,`#a1ded2`,`#83cdc1`,`#53b9ab`,`#12a594`,`#0d9b8a`,`#008573`,`#0d3d38`,`hsl(0, 0%, 68%)`,`hsl(0, 0%, 65%)`,`hsl(0, 0%, 62%)`,`hsl(0, 0%, 56%)`,`hsl(0, 0%, 53%)`,`hsl(0, 0%, 50%)`,`hsl(0, 0%, 47%)`,`hsl(0, 0%, 44%)`,`hsl(0, 0%, 41%)`,`hsl(0, 0%, 38%)`,`hsl(0, 0%, 32%)`,`hsla(0, 0%, 4%, 1)`,`hsla(0, 0%, 8%, 1)`,`hsla(0, 0%, 27%, 1)`,`hsla(0, 0%, 40%, 1)`,`hsla(0, 0%, 47%, 1)`,`hsla(0, 0%, 52%, 1)`,`hsla(0, 0%, 2%, 0.1)`,`hsla(0, 0%, 2%, 0.075)`,`hsla(0, 0%, 2%, 0.05)`,`hsla(0, 0%, 2%, 0.025)`,`hsla(0, 0%, 2%, 0.02)`,`hsla(0, 0%, 2%, 0.01)`,`hsla(0, 0%, 97%, 0.1)`,`hsla(0, 0%, 97%, 0.075)`,`hsla(0, 0%, 97%, 0.05)`,`hsla(0, 0%, 97%, 0.025)`,`hsla(0, 0%, 97%, 0.02)`,`hsla(0, 0%, 97%, 0.01)`,`hsla(0, 0%, 70%, 0.6)`,`hsla(0, 0%, 4%, 0)`,`hsla(0, 0%, 8%, 0.2)`,`hsla(0, 0%, 8%, 0.4)`,`hsla(0, 0%, 8%, 0.6)`,`hsla(0, 0%, 8%, 0.8)`,`hsla(0, 0%, 100%, 0.2)`,`hsla(0, 0%, 100%, 0.4)`,`hsla(0, 0%, 100%, 0.6)`,`hsla(0, 0%, 100%, 0.8)`,`rgba(0,0,0,0.15)`,`rgba(0,0,0,0.23)`,`rgba(0,0,0,0.45)`,`rgba(0,0,0,0.65)`,`rgba(0,0,0,0.9)`,`rgba(255,255,255,0.45)`,`rgba(255,255,255,0.65)`,`rgba(255,255,255,0.95)`,`#111111`,`#222222`,`#2a2a2a`,`#313131`,`#3a3a3a`,`#484848`,`#606060`,`#6e6e6e`,`#7b7b7b`,`#b4b4b4`,`#eeeeee`,`#0d1520`,`#111927`,`#0d2847`,`#003362`,`#004074`,`#104d87`,`#205d9e`,`#2870bd`,`#3b9eff`,`#70b8ff`,`#c2e6ff`,`#191111`,`#201314`,`#3b1219`,`#500f1c`,`#611623`,`#72232d`,`#8c333a`,`#b54548`,`#ec5d5e`,`#ff9592`,`#ffd1d9`,`#14120b`,`#1b180f`,`#2d2305`,`#362b00`,`#433500`,`#524202`,`#665417`,`#836a21`,`#ffff57`,`#f5e147`,`#f6eeb4`,`#0e1512`,`#121b17`,`#132d21`,`#113b29`,`#174933`,`#20573e`,`#28684a`,`#2f7c57`,`#33b074`,`#3dd68c`,`#b1f1cb`,`#17120e`,`#1e160f`,`#331e0b`,`#462100`,`#562800`,`#66350c`,`#7e451d`,`#a35829`,`#ff801f`,`#ffa057`,`#ffe0c2`,`#191117`,`#21121d`,`#37172f`,`#4b143d`,`#591c47`,`#692955`,`#833869`,`#a84885`,`#de51a8`,`#ff8dcc`,`#fdd1ea`,`#18111b`,`#1e1523`,`#301c3b`,`#3d224e`,`#48295c`,`#54346b`,`#664282`,`#8457aa`,`#9a5cd0`,`#d19dff`,`#ecd9fa`,`#0d1514`,`#111c1b`,`#0d2d2a`,`#023b37`,`#084843`,`#145750`,`#1c6961`,`#207e73`,`#0eb39e`,`#0bd8b6`,`#adf0dd`,`hsla(0, 0%, 100%, 0.1)`,`hsla(0, 0%, 100%, 0.075)`,`hsla(0, 0%, 100%, 0.05)`,`hsla(0, 0%, 100%, 0.025)`,`hsla(0, 0%, 100%, 0.02)`,`hsla(0, 0%, 100%, 0.01)`,`hsla(0, 0%, 8%, 0.1)`,`hsla(0, 0%, 8%, 0.075)`,`hsla(0, 0%, 8%, 0.05)`,`hsla(0, 0%, 8%, 0.025)`,`hsla(0, 0%, 8%, 0.02)`,`hsla(0, 0%, 8%, 0.01)`,`hsla(0, 0%, 27%, 0.6)`,`hsla(0, 0%, 99%, 0)`,`hsla(0, 0%, 98%, 0.2)`,`hsla(0, 0%, 98%, 0.4)`,`hsla(0, 0%, 98%, 0.6)`,`hsla(0, 0%, 98%, 0.8)`,`hsla(0, 0%, 99%, 1)`,`hsla(0, 0%, 98%, 1)`,`hsla(0, 0%, 94%, 1)`,`hsla(0, 0%, 91%, 1)`,`hsla(0, 0%, 88%, 1)`,`hsla(0, 0%, 81%, 1)`,`hsla(0, 0%, 73%, 1)`,`hsla(0, 0%, 55%, 1)`,`hsla(0, 0%, 51%, 1)`,`hsla(0, 0%, 39%, 1)`,`hsla(0, 0%, 13%, 1)`,`hsla(0, 0%, 13%, 0)`,`hsla(0, 0%, 13%, 0.2)`,`hsla(0, 0%, 13%, 0.4)`,`hsla(0, 0%, 13%, 0.6)`,`hsla(0, 0%, 13%, 0.8)`,`hsla(0, 0%, 13%, 0.1)`,`hsla(0, 0%, 13%, 0.075)`,`hsla(0, 0%, 13%, 0.05)`,`hsla(0, 0%, 13%, 0.025)`,`hsla(0, 0%, 13%, 0.02)`,`hsla(0, 0%, 13%, 0.01)`,`hsla(0, 0%, 98%, 0.1)`,`hsla(0, 0%, 98%, 0.075)`,`hsla(0, 0%, 98%, 0.05)`,`hsla(0, 0%, 98%, 0.025)`,`hsla(0, 0%, 98%, 0.02)`,`hsla(0, 0%, 98%, 0.01)`,`hsla(0, 0%, 85%, 0.6)`,`hsla(216, 100%, 99%, 0)`,`hsla(207, 100%, 98%, 0.2)`,`hsla(207, 100%, 98%, 0.4)`,`hsla(207, 100%, 98%, 0.6)`,`hsla(207, 100%, 98%, 0.8)`,`hsla(210, 100%, 99%, 1)`,`hsla(207, 100%, 98%, 1)`,`hsla(205, 92%, 95%, 1)`,`hsla(203, 100%, 92%, 1)`,`hsla(206, 100%, 88%, 1)`,`hsla(207, 93%, 83%, 1)`,`hsla(207, 85%, 76%, 1)`,`hsla(206, 82%, 65%, 1)`,`hsla(206, 100%, 50%, 1)`,`hsla(207, 96%, 48%, 1)`,`hsla(208, 88%, 43%, 1)`,`hsla(216, 71%, 23%, 1)`,`hsla(216, 71%, 23%, 0)`,`hsla(216, 71%, 23%, 0.2)`,`hsla(216, 71%, 23%, 0.4)`,`hsla(216, 71%, 23%, 0.6)`,`hsla(216, 71%, 23%, 0.8)`,`hsla(216, 71%, 23%, 0.1)`,`hsla(216, 71%, 23%, 0.075)`,`hsla(216, 71%, 23%, 0.05)`,`hsla(216, 71%, 23%, 0.025)`,`hsla(216, 71%, 23%, 0.02)`,`hsla(216, 71%, 23%, 0.01)`,`hsla(207, 100%, 98%, 0.1)`,`hsla(207, 100%, 98%, 0.075)`,`hsla(207, 100%, 98%, 0.05)`,`hsla(207, 100%, 98%, 0.025)`,`hsla(207, 100%, 98%, 0.02)`,`hsla(207, 100%, 98%, 0.01)`,`hsla(207, 93%, 83%, 0.6)`,`hsla(0, 100%, 99%, 0)`,`hsla(0, 100%, 98%, 0.2)`,`hsla(0, 100%, 98%, 0.4)`,`hsla(0, 100%, 98%, 0.6)`,`hsla(0, 100%, 98%, 0.8)`,`hsla(0, 100%, 99%, 1)`,`hsla(0, 100%, 98%, 1)`,`hsla(357, 90%, 96%, 1)`,`hsla(358, 100%, 93%, 1)`,`hsla(359, 100%, 90%, 1)`,`hsla(359, 94%, 87%, 1)`,`hsla(359, 77%, 81%, 1)`,`hsla(359, 70%, 74%, 1)`,`hsla(358, 75%, 59%, 1)`,`hsla(358, 69%, 55%, 1)`,`hsla(358, 65%, 49%, 1)`,`hsla(351, 63%, 24%, 1)`,`hsla(351, 63%, 24%, 0)`,`hsla(351, 63%, 24%, 0.2)`,`hsla(351, 63%, 24%, 0.4)`,`hsla(351, 63%, 24%, 0.6)`,`hsla(351, 63%, 24%, 0.8)`,`hsla(351, 63%, 24%, 0.1)`,`hsla(351, 63%, 24%, 0.075)`,`hsla(351, 63%, 24%, 0.05)`,`hsla(351, 63%, 24%, 0.025)`,`hsla(351, 63%, 24%, 0.02)`,`hsla(351, 63%, 24%, 0.01)`,`hsla(0, 100%, 98%, 0.1)`,`hsla(0, 100%, 98%, 0.075)`,`hsla(0, 100%, 98%, 0.05)`,`hsla(0, 100%, 98%, 0.025)`,`hsla(0, 100%, 98%, 0.02)`,`hsla(0, 100%, 98%, 0.01)`,`hsla(359, 94%, 87%, 0.6)`,`hsla(60, 45%, 98%, 0)`,`hsla(54, 91%, 95%, 0.2)`,`hsla(54, 91%, 95%, 0.4)`,`hsla(54, 91%, 95%, 0.6)`,`hsla(54, 91%, 95%, 0.8)`,`hsla(60, 50%, 98%, 1)`,`hsla(54, 91%, 95%, 1)`,`hsla(56, 100%, 86%, 1)`,`hsla(53, 100%, 79%, 1)`,`hsla(50, 100%, 72%, 1)`,`hsla(48, 85%, 68%, 1)`,`hsla(46, 70%, 65%, 1)`,`hsla(45, 65%, 53%, 1)`,`hsla(53, 100%, 58%, 1)`,`hsla(52, 100%, 50%, 1)`,`hsla(41, 100%, 31%, 1)`,`hsla(42, 39%, 20%, 1)`,`hsla(42, 39%, 20%, 0)`,`hsla(42, 39%, 20%, 0.2)`,`hsla(42, 39%, 20%, 0.4)`,`hsla(42, 39%, 20%, 0.6)`,`hsla(42, 39%, 20%, 0.8)`,`hsla(42, 39%, 20%, 0.1)`,`hsla(42, 39%, 20%, 0.075)`,`hsla(42, 39%, 20%, 0.05)`,`hsla(42, 39%, 20%, 0.025)`,`hsla(42, 39%, 20%, 0.02)`,`hsla(42, 39%, 20%, 0.01)`,`hsla(54, 91%, 95%, 0.1)`,`hsla(54, 91%, 95%, 0.075)`,`hsla(54, 91%, 95%, 0.05)`,`hsla(54, 91%, 95%, 0.025)`,`hsla(54, 91%, 95%, 0.02)`,`hsla(54, 91%, 95%, 0.01)`,`hsla(48, 85%, 68%, 0.6)`,`hsla(140, 60%, 99%, 0)`,`hsla(137, 47%, 97%, 0.2)`,`hsla(137, 47%, 97%, 0.4)`,`hsla(137, 47%, 97%, 0.6)`,`hsla(137, 47%, 97%, 0.8)`,`hsla(140, 60%, 99%, 1)`,`hsla(137, 47%, 97%, 1)`,`hsla(139, 47%, 93%, 1)`,`hsla(140, 49%, 89%, 1)`,`hsla(142, 44%, 84%, 1)`,`hsla(144, 41%, 77%, 1)`,`hsla(146, 40%, 68%, 1)`,`hsla(151, 40%, 54%, 1)`,`hsla(151, 55%, 42%, 1)`,`hsla(152, 56%, 39%, 1)`,`hsla(154, 60%, 32%, 1)`,`hsla(155, 40%, 16%, 1)`,`hsla(156, 41%, 16%, 0)`,`hsla(156, 41%, 16%, 0.2)`,`hsla(156, 41%, 16%, 0.4)`,`hsla(156, 41%, 16%, 0.6)`,`hsla(156, 41%, 16%, 0.8)`,`hsla(156, 41%, 16%, 0.1)`,`hsla(156, 41%, 16%, 0.075)`,`hsla(156, 41%, 16%, 0.05)`,`hsla(156, 41%, 16%, 0.025)`,`hsla(156, 41%, 16%, 0.02)`,`hsla(156, 41%, 16%, 0.01)`,`hsla(137, 47%, 97%, 0.1)`,`hsla(137, 47%, 97%, 0.075)`,`hsla(137, 47%, 97%, 0.05)`,`hsla(137, 47%, 97%, 0.025)`,`hsla(137, 47%, 97%, 0.02)`,`hsla(137, 47%, 97%, 0.01)`,`hsla(144, 41%, 77%, 0.6)`,`hsla(20, 60%, 99%, 0)`,`hsla(33, 100%, 96%, 0.2)`,`hsla(33, 100%, 96%, 0.4)`,`hsla(33, 100%, 96%, 0.6)`,`hsla(33, 100%, 96%, 0.8)`,`hsla(20, 60%, 99%, 1)`,`hsla(33, 100%, 96%, 1)`,`hsla(37, 100%, 92%, 1)`,`hsla(34, 100%, 85%, 1)`,`hsla(33, 100%, 80%, 1)`,`hsla(30, 100%, 75%, 1)`,`hsla(27, 87%, 71%, 1)`,`hsla(25, 80%, 63%, 1)`,`hsla(23, 93%, 53%, 1)`,`hsla(24, 100%, 47%, 1)`,`hsla(23, 100%, 40%, 1)`,`hsla(16, 50%, 23%, 1)`,`hsla(16, 50%, 23%, 0)`,`hsla(16, 50%, 23%, 0.2)`,`hsla(16, 50%, 23%, 0.4)`,`hsla(16, 50%, 23%, 0.6)`,`hsla(16, 50%, 23%, 0.8)`,`hsla(16, 50%, 23%, 0.1)`,`hsla(16, 50%, 23%, 0.075)`,`hsla(16, 50%, 23%, 0.05)`,`hsla(16, 50%, 23%, 0.025)`,`hsla(16, 50%, 23%, 0.02)`,`hsla(16, 50%, 23%, 0.01)`,`hsla(33, 100%, 96%, 0.1)`,`hsla(33, 100%, 96%, 0.075)`,`hsla(33, 100%, 96%, 0.05)`,`hsla(33, 100%, 96%, 0.025)`,`hsla(33, 100%, 96%, 0.02)`,`hsla(33, 100%, 96%, 0.01)`,`hsla(30, 100%, 75%, 0.6)`,`hsla(324, 100%, 99%, 0)`,`hsla(326, 78%, 98%, 0.2)`,`hsla(326, 78%, 98%, 0.4)`,`hsla(326, 78%, 98%, 0.6)`,`hsla(326, 78%, 98%, 0.8)`,`hsla(320, 100%, 99%, 1)`,`hsla(326, 78%, 98%, 1)`,`hsla(326, 91%, 95%, 1)`,`hsla(323, 79%, 92%, 1)`,`hsla(323, 69%, 89%, 1)`,`hsla(323, 60%, 84%, 1)`,`hsla(323, 55%, 79%, 1)`,`hsla(322, 52%, 72%, 1)`,`hsla(322, 65%, 55%, 1)`,`hsla(322, 61%, 52%, 1)`,`hsla(322, 65%, 46%, 1)`,`hsla(320, 70%, 23%, 1)`,`hsla(320, 69%, 23%, 0)`,`hsla(320, 69%, 23%, 0.2)`,`hsla(320, 69%, 23%, 0.4)`,`hsla(320, 69%, 23%, 0.6)`,`hsla(320, 69%, 23%, 0.8)`,`hsla(320, 69%, 23%, 0.1)`,`hsla(320, 69%, 23%, 0.075)`,`hsla(320, 69%, 23%, 0.05)`,`hsla(320, 69%, 23%, 0.025)`,`hsla(320, 69%, 23%, 0.02)`,`hsla(320, 69%, 23%, 0.01)`,`hsla(326, 78%, 98%, 0.1)`,`hsla(326, 78%, 98%, 0.075)`,`hsla(326, 78%, 98%, 0.05)`,`hsla(326, 78%, 98%, 0.025)`,`hsla(326, 78%, 98%, 0.02)`,`hsla(326, 78%, 98%, 0.01)`,`hsla(323, 60%, 84%, 0.6)`,`hsla(300, 60%, 99%, 0)`,`hsla(274, 78%, 98%, 0.2)`,`hsla(274, 78%, 98%, 0.4)`,`hsla(274, 78%, 98%, 0.6)`,`hsla(274, 78%, 98%, 0.8)`,`hsla(300, 50%, 99%, 1)`,`hsla(274, 78%, 98%, 1)`,`hsla(275, 89%, 96%, 1)`,`hsla(277, 81%, 94%, 1)`,`hsla(275, 75%, 91%, 1)`,`hsla(275, 69%, 86%, 1)`,`hsla(273, 62%, 81%, 1)`,`hsla(272, 60%, 74%, 1)`,`hsla(272, 51%, 54%, 1)`,`hsla(272, 45%, 50%, 1)`,`hsla(272, 45%, 49%, 1)`,`hsla(270, 50%, 25%, 1)`,`hsla(270, 50%, 25%, 0)`,`hsla(270, 50%, 25%, 0.2)`,`hsla(270, 50%, 25%, 0.4)`,`hsla(270, 50%, 25%, 0.6)`,`hsla(270, 50%, 25%, 0.8)`,`hsla(270, 50%, 25%, 0.1)`,`hsla(270, 50%, 25%, 0.075)`,`hsla(270, 50%, 25%, 0.05)`,`hsla(270, 50%, 25%, 0.025)`,`hsla(270, 50%, 25%, 0.02)`,`hsla(270, 50%, 25%, 0.01)`,`hsla(274, 78%, 98%, 0.1)`,`hsla(274, 78%, 98%, 0.075)`,`hsla(274, 78%, 98%, 0.05)`,`hsla(274, 78%, 98%, 0.025)`,`hsla(274, 78%, 98%, 0.02)`,`hsla(274, 78%, 98%, 0.01)`,`hsla(275, 69%, 86%, 0.6)`,`hsla(160, 60%, 99%, 0)`,`hsla(165, 50%, 97%, 0.2)`,`hsla(165, 50%, 97%, 0.4)`,`hsla(165, 50%, 97%, 0.6)`,`hsla(165, 50%, 97%, 0.8)`,`hsla(165, 67%, 99%, 1)`,`hsla(165, 50%, 97%, 1)`,`hsla(167, 63%, 93%, 1)`,`hsla(166, 62%, 88%, 1)`,`hsla(168, 54%, 82%, 1)`,`hsla(168, 48%, 75%, 1)`,`hsla(170, 43%, 66%, 1)`,`hsla(172, 42%, 53%, 1)`,`hsla(173, 80%, 36%, 1)`,`hsla(173, 85%, 33%, 1)`,`hsla(172, 100%, 26%, 1)`,`hsla(174, 65%, 15%, 1)`,`hsla(174, 66%, 15%, 0)`,`hsla(174, 66%, 15%, 0.2)`,`hsla(174, 66%, 15%, 0.4)`,`hsla(174, 66%, 15%, 0.6)`,`hsla(174, 66%, 15%, 0.8)`,`hsla(174, 66%, 15%, 0.1)`,`hsla(174, 66%, 15%, 0.075)`,`hsla(174, 66%, 15%, 0.05)`,`hsla(174, 66%, 15%, 0.025)`,`hsla(174, 66%, 15%, 0.02)`,`hsla(174, 66%, 15%, 0.01)`,`hsla(165, 50%, 97%, 0.1)`,`hsla(165, 50%, 97%, 0.075)`,`hsla(165, 50%, 97%, 0.05)`,`hsla(165, 50%, 97%, 0.025)`,`hsla(165, 50%, 97%, 0.02)`,`hsla(165, 50%, 97%, 0.01)`,`hsla(168, 48%, 75%, 0.6)`,`hsla(0, 0%, 68%, 0)`,`hsla(0, 0%, 65%, 0.2)`,`hsla(0, 0%, 65%, 0.4)`,`hsla(0, 0%, 65%, 0.6)`,`hsla(0, 0%, 65%, 0.8)`,`hsla(0, 0%, 68%, 1)`,`hsla(0, 0%, 65%, 1)`,`hsla(0, 0%, 62%, 1)`,`hsla(0, 0%, 56%, 1)`,`hsla(0, 0%, 53%, 1)`,`hsla(0, 0%, 50%, 1)`,`hsla(0, 0%, 44%, 1)`,`hsla(0, 0%, 41%, 1)`,`hsla(0, 0%, 38%, 1)`,`hsla(0, 0%, 32%, 1)`,`hsla(0, 0%, 32%, 0)`,`hsla(0, 0%, 32%, 0.2)`,`hsla(0, 0%, 32%, 0.4)`,`hsla(0, 0%, 32%, 0.6)`,`hsla(0, 0%, 32%, 0.8)`,`hsla(0, 0%, 32%, 0.1)`,`hsla(0, 0%, 32%, 0.075)`,`hsla(0, 0%, 32%, 0.05)`,`hsla(0, 0%, 32%, 0.025)`,`hsla(0, 0%, 32%, 0.02)`,`hsla(0, 0%, 32%, 0.01)`,`hsla(0, 0%, 65%, 0.1)`,`hsla(0, 0%, 65%, 0.075)`,`hsla(0, 0%, 65%, 0.05)`,`hsla(0, 0%, 65%, 0.025)`,`hsla(0, 0%, 65%, 0.02)`,`hsla(0, 0%, 65%, 0.01)`,`hsla(0, 0%, 53%, 0.6)`,`hsla(0, 0%, 7%, 0)`,`hsla(0, 0%, 10%, 0.2)`,`hsla(0, 0%, 10%, 0.4)`,`hsla(0, 0%, 10%, 0.6)`,`hsla(0, 0%, 10%, 0.8)`,`hsla(0, 0%, 7%, 1)`,`hsla(0, 0%, 16%, 1)`,`hsla(0, 0%, 19%, 1)`,`hsla(0, 0%, 23%, 1)`,`hsla(0, 0%, 28%, 1)`,`hsla(0, 0%, 43%, 1)`,`hsla(0, 0%, 48%, 1)`,`hsla(0, 0%, 71%, 1)`,`hsla(0, 0%, 93%, 0)`,`hsla(0, 0%, 93%, 0.2)`,`hsla(0, 0%, 93%, 0.4)`,`hsla(0, 0%, 93%, 0.6)`,`hsla(0, 0%, 93%, 0.8)`,`hsla(0, 0%, 93%, 0.1)`,`hsla(0, 0%, 93%, 0.075)`,`hsla(0, 0%, 93%, 0.05)`,`hsla(0, 0%, 93%, 0.025)`,`hsla(0, 0%, 93%, 0.02)`,`hsla(0, 0%, 93%, 0.01)`,`hsla(0, 0%, 10%, 0.1)`,`hsla(0, 0%, 10%, 0.075)`,`hsla(0, 0%, 10%, 0.05)`,`hsla(0, 0%, 10%, 0.025)`,`hsla(0, 0%, 10%, 0.02)`,`hsla(0, 0%, 10%, 0.01)`,`hsla(0, 0%, 23%, 0.6)`,`hsla(216, 43%, 9%, 0)`,`hsla(218, 39%, 11%, 0.2)`,`hsla(218, 39%, 11%, 0.4)`,`hsla(218, 39%, 11%, 0.6)`,`hsla(218, 39%, 11%, 0.8)`,`hsla(215, 42%, 9%, 1)`,`hsla(218, 39%, 11%, 1)`,`hsla(212, 69%, 16%, 1)`,`hsla(209, 100%, 19%, 1)`,`hsla(207, 100%, 23%, 1)`,`hsla(209, 79%, 30%, 1)`,`hsla(211, 66%, 37%, 1)`,`hsla(211, 65%, 45%, 1)`,`hsla(210, 100%, 62%, 1)`,`hsla(210, 100%, 72%, 1)`,`hsla(205, 100%, 88%, 1)`,`hsla(205, 100%, 88%, 0)`,`hsla(205, 100%, 88%, 0.2)`,`hsla(205, 100%, 88%, 0.4)`,`hsla(205, 100%, 88%, 0.6)`,`hsla(205, 100%, 88%, 0.8)`,`hsla(205, 100%, 88%, 0.1)`,`hsla(205, 100%, 88%, 0.075)`,`hsla(205, 100%, 88%, 0.05)`,`hsla(205, 100%, 88%, 0.025)`,`hsla(205, 100%, 88%, 0.02)`,`hsla(205, 100%, 88%, 0.01)`,`hsla(218, 39%, 11%, 0.1)`,`hsla(218, 39%, 11%, 0.075)`,`hsla(218, 39%, 11%, 0.05)`,`hsla(218, 39%, 11%, 0.025)`,`hsla(218, 39%, 11%, 0.02)`,`hsla(218, 39%, 11%, 0.01)`,`hsla(209, 79%, 30%, 0.6)`,`hsla(0, 17%, 8%, 0)`,`hsla(355, 25%, 10%, 0.2)`,`hsla(355, 25%, 10%, 0.4)`,`hsla(355, 25%, 10%, 0.6)`,`hsla(355, 25%, 10%, 0.8)`,`hsla(0, 19%, 8%, 1)`,`hsla(355, 25%, 10%, 1)`,`hsla(350, 53%, 15%, 1)`,`hsla(348, 68%, 19%, 1)`,`hsla(350, 63%, 23%, 1)`,`hsla(352, 53%, 29%, 1)`,`hsla(355, 47%, 37%, 1)`,`hsla(358, 45%, 49%, 1)`,`hsla(360, 79%, 65%, 1)`,`hsla(2, 100%, 79%, 1)`,`hsla(350, 100%, 91%, 1)`,`hsla(350, 100%, 91%, 0)`,`hsla(350, 100%, 91%, 0.2)`,`hsla(350, 100%, 91%, 0.4)`,`hsla(350, 100%, 91%, 0.6)`,`hsla(350, 100%, 91%, 0.8)`,`hsla(350, 100%, 91%, 0.1)`,`hsla(350, 100%, 91%, 0.075)`,`hsla(350, 100%, 91%, 0.05)`,`hsla(350, 100%, 91%, 0.025)`,`hsla(350, 100%, 91%, 0.02)`,`hsla(350, 100%, 91%, 0.01)`,`hsla(355, 25%, 10%, 0.1)`,`hsla(355, 25%, 10%, 0.075)`,`hsla(355, 25%, 10%, 0.05)`,`hsla(355, 25%, 10%, 0.025)`,`hsla(355, 25%, 10%, 0.02)`,`hsla(355, 25%, 10%, 0.01)`,`hsla(352, 53%, 29%, 0.6)`,`hsla(47, 29%, 6%, 0)`,`hsla(45, 29%, 8%, 0.2)`,`hsla(45, 29%, 8%, 0.4)`,`hsla(45, 29%, 8%, 0.6)`,`hsla(45, 29%, 8%, 0.8)`,`hsla(47, 29%, 6%, 1)`,`hsla(45, 29%, 8%, 1)`,`hsla(45, 80%, 10%, 1)`,`hsla(48, 100%, 11%, 1)`,`hsla(47, 100%, 13%, 1)`,`hsla(48, 95%, 16%, 1)`,`hsla(46, 63%, 25%, 1)`,`hsla(45, 60%, 32%, 1)`,`hsla(60, 100%, 67%, 1)`,`hsla(53, 90%, 62%, 1)`,`hsla(53, 79%, 84%, 1)`,`hsla(53, 78%, 84%, 0)`,`hsla(53, 78%, 84%, 0.2)`,`hsla(53, 78%, 84%, 0.4)`,`hsla(53, 78%, 84%, 0.6)`,`hsla(53, 78%, 84%, 0.8)`,`hsla(53, 78%, 84%, 0.1)`,`hsla(53, 78%, 84%, 0.075)`,`hsla(53, 78%, 84%, 0.05)`,`hsla(53, 78%, 84%, 0.025)`,`hsla(53, 78%, 84%, 0.02)`,`hsla(53, 78%, 84%, 0.01)`,`hsla(45, 29%, 8%, 0.1)`,`hsla(45, 29%, 8%, 0.075)`,`hsla(45, 29%, 8%, 0.05)`,`hsla(45, 29%, 8%, 0.025)`,`hsla(45, 29%, 8%, 0.02)`,`hsla(45, 29%, 8%, 0.01)`,`hsla(48, 95%, 16%, 0.6)`,`hsla(154, 20%, 7%, 0)`,`hsla(153, 20%, 9%, 0.2)`,`hsla(153, 20%, 9%, 0.4)`,`hsla(153, 20%, 9%, 0.6)`,`hsla(153, 20%, 9%, 0.8)`,`hsla(154, 20%, 7%, 1)`,`hsla(153, 20%, 9%, 1)`,`hsla(152, 41%, 13%, 1)`,`hsla(154, 55%, 15%, 1)`,`hsla(154, 52%, 19%, 1)`,`hsla(153, 46%, 23%, 1)`,`hsla(152, 44%, 28%, 1)`,`hsla(151, 45%, 34%, 1)`,`hsla(151, 55%, 45%, 1)`,`hsla(151, 65%, 54%, 1)`,`hsla(144, 70%, 82%, 1)`,`hsla(144, 70%, 82%, 0)`,`hsla(144, 70%, 82%, 0.2)`,`hsla(144, 70%, 82%, 0.4)`,`hsla(144, 70%, 82%, 0.6)`,`hsla(144, 70%, 82%, 0.8)`,`hsla(144, 70%, 82%, 0.1)`,`hsla(144, 70%, 82%, 0.075)`,`hsla(144, 70%, 82%, 0.05)`,`hsla(144, 70%, 82%, 0.025)`,`hsla(144, 70%, 82%, 0.02)`,`hsla(144, 70%, 82%, 0.01)`,`hsla(153, 20%, 9%, 0.1)`,`hsla(153, 20%, 9%, 0.075)`,`hsla(153, 20%, 9%, 0.05)`,`hsla(153, 20%, 9%, 0.025)`,`hsla(153, 20%, 9%, 0.02)`,`hsla(153, 20%, 9%, 0.01)`,`hsla(153, 46%, 23%, 0.6)`,`hsla(23, 22%, 7%, 0)`,`hsla(28, 33%, 9%, 0.2)`,`hsla(28, 33%, 9%, 0.4)`,`hsla(28, 33%, 9%, 0.6)`,`hsla(28, 33%, 9%, 0.8)`,`hsla(27, 24%, 7%, 1)`,`hsla(28, 33%, 9%, 1)`,`hsla(29, 65%, 12%, 1)`,`hsla(28, 100%, 14%, 1)`,`hsla(28, 100%, 17%, 1)`,`hsla(27, 79%, 22%, 1)`,`hsla(25, 63%, 30%, 1)`,`hsla(23, 60%, 40%, 1)`,`hsla(26, 100%, 56%, 1)`,`hsla(26, 100%, 67%, 1)`,`hsla(30, 100%, 88%, 1)`,`hsla(30, 100%, 88%, 0)`,`hsla(30, 100%, 88%, 0.2)`,`hsla(30, 100%, 88%, 0.4)`,`hsla(30, 100%, 88%, 0.6)`,`hsla(30, 100%, 88%, 0.8)`,`hsla(30, 100%, 88%, 0.1)`,`hsla(30, 100%, 88%, 0.075)`,`hsla(30, 100%, 88%, 0.05)`,`hsla(30, 100%, 88%, 0.025)`,`hsla(30, 100%, 88%, 0.02)`,`hsla(30, 100%, 88%, 0.01)`,`hsla(28, 33%, 9%, 0.1)`,`hsla(28, 33%, 9%, 0.075)`,`hsla(28, 33%, 9%, 0.05)`,`hsla(28, 33%, 9%, 0.025)`,`hsla(28, 33%, 9%, 0.02)`,`hsla(28, 33%, 9%, 0.01)`,`hsla(27, 79%, 22%, 0.6)`,`hsla(317, 17%, 8%, 0)`,`hsla(316, 29%, 10%, 0.2)`,`hsla(316, 29%, 10%, 0.4)`,`hsla(316, 29%, 10%, 0.6)`,`hsla(316, 29%, 10%, 0.8)`,`hsla(315, 19%, 8%, 1)`,`hsla(316, 29%, 10%, 1)`,`hsla(315, 41%, 15%, 1)`,`hsla(315, 58%, 19%, 1)`,`hsla(318, 52%, 23%, 1)`,`hsla(319, 44%, 29%, 1)`,`hsla(321, 40%, 37%, 1)`,`hsla(322, 40%, 47%, 1)`,`hsla(323, 68%, 59%, 1)`,`hsla(327, 100%, 78%, 1)`,`hsla(326, 92%, 91%, 1)`,`hsla(326, 91%, 91%, 0)`,`hsla(326, 91%, 91%, 0.2)`,`hsla(326, 91%, 91%, 0.4)`,`hsla(326, 91%, 91%, 0.6)`,`hsla(326, 91%, 91%, 0.8)`,`hsla(326, 91%, 91%, 0.1)`,`hsla(326, 91%, 91%, 0.075)`,`hsla(326, 91%, 91%, 0.05)`,`hsla(326, 91%, 91%, 0.025)`,`hsla(326, 91%, 91%, 0.02)`,`hsla(326, 91%, 91%, 0.01)`,`hsla(316, 29%, 10%, 0.1)`,`hsla(316, 29%, 10%, 0.075)`,`hsla(316, 29%, 10%, 0.05)`,`hsla(316, 29%, 10%, 0.025)`,`hsla(316, 29%, 10%, 0.02)`,`hsla(316, 29%, 10%, 0.01)`,`hsla(319, 44%, 29%, 0.6)`,`hsla(282, 22%, 9%, 0)`,`hsla(279, 25%, 11%, 0.2)`,`hsla(279, 25%, 11%, 0.4)`,`hsla(279, 25%, 11%, 0.6)`,`hsla(279, 25%, 11%, 0.8)`,`hsla(282, 23%, 9%, 1)`,`hsla(279, 25%, 11%, 1)`,`hsla(279, 36%, 17%, 1)`,`hsla(277, 39%, 22%, 1)`,`hsla(276, 38%, 26%, 1)`,`hsla(275, 35%, 31%, 1)`,`hsla(274, 33%, 38%, 1)`,`hsla(273, 33%, 50%, 1)`,`hsla(272, 55%, 59%, 1)`,`hsla(272, 100%, 81%, 1)`,`hsla(275, 77%, 92%, 1)`,`hsla(275, 76%, 92%, 0)`,`hsla(275, 76%, 92%, 0.2)`,`hsla(275, 76%, 92%, 0.4)`,`hsla(275, 76%, 92%, 0.6)`,`hsla(275, 76%, 92%, 0.8)`,`hsla(275, 76%, 92%, 0.1)`,`hsla(275, 76%, 92%, 0.075)`,`hsla(275, 76%, 92%, 0.05)`,`hsla(275, 76%, 92%, 0.025)`,`hsla(275, 76%, 92%, 0.02)`,`hsla(275, 76%, 92%, 0.01)`,`hsla(279, 25%, 11%, 0.1)`,`hsla(279, 25%, 11%, 0.075)`,`hsla(279, 25%, 11%, 0.05)`,`hsla(279, 25%, 11%, 0.025)`,`hsla(279, 25%, 11%, 0.02)`,`hsla(279, 25%, 11%, 0.01)`,`hsla(275, 35%, 31%, 0.6)`,`hsla(173, 22%, 7%, 0)`,`hsla(175, 24%, 9%, 0.2)`,`hsla(175, 24%, 9%, 0.4)`,`hsla(175, 24%, 9%, 0.6)`,`hsla(175, 24%, 9%, 0.8)`,`hsla(173, 24%, 7%, 1)`,`hsla(175, 24%, 9%, 1)`,`hsla(174, 55%, 11%, 1)`,`hsla(176, 93%, 12%, 1)`,`hsla(175, 80%, 16%, 1)`,`hsla(174, 63%, 21%, 1)`,`hsla(174, 58%, 26%, 1)`,`hsla(173, 59%, 31%, 1)`,`hsla(172, 85%, 38%, 1)`,`hsla(170, 90%, 45%, 1)`,`hsla(163, 69%, 81%, 1)`,`hsla(163, 69%, 81%, 0)`,`hsla(163, 69%, 81%, 0.2)`,`hsla(163, 69%, 81%, 0.4)`,`hsla(163, 69%, 81%, 0.6)`,`hsla(163, 69%, 81%, 0.8)`,`hsla(163, 69%, 81%, 0.1)`,`hsla(163, 69%, 81%, 0.075)`,`hsla(163, 69%, 81%, 0.05)`,`hsla(163, 69%, 81%, 0.025)`,`hsla(163, 69%, 81%, 0.02)`,`hsla(163, 69%, 81%, 0.01)`,`hsla(175, 24%, 9%, 0.1)`,`hsla(175, 24%, 9%, 0.075)`,`hsla(175, 24%, 9%, 0.05)`,`hsla(175, 24%, 9%, 0.025)`,`hsla(175, 24%, 9%, 0.02)`,`hsla(175, 24%, 9%, 0.01)`,`hsla(174, 63%, 21%, 0.6)`,`hsla(0, 0%, 4%, 0.2)`,`hsla(0, 0%, 4%, 0.4)`,`hsla(0, 0%, 4%, 0.6)`,`hsla(0, 0%, 4%, 0.8)`,`hsla(0, 0%, 99%, 0.2)`,`hsla(0, 0%, 99%, 0.4)`,`hsla(0, 0%, 99%, 0.6)`,`hsla(0, 0%, 99%, 0.8)`,`hsla(216, 100%, 99%, 0.2)`,`hsla(216, 100%, 99%, 0.4)`,`hsla(216, 100%, 99%, 0.6)`,`hsla(216, 100%, 99%, 0.8)`,`hsla(0, 100%, 99%, 0.2)`,`hsla(0, 100%, 99%, 0.4)`,`hsla(0, 100%, 99%, 0.6)`,`hsla(0, 100%, 99%, 0.8)`,`hsla(60, 45%, 98%, 0.2)`,`hsla(60, 45%, 98%, 0.4)`,`hsla(60, 45%, 98%, 0.6)`,`hsla(60, 45%, 98%, 0.8)`,`hsla(140, 60%, 99%, 0.2)`,`hsla(140, 60%, 99%, 0.4)`,`hsla(140, 60%, 99%, 0.6)`,`hsla(140, 60%, 99%, 0.8)`,`hsla(20, 60%, 99%, 0.2)`,`hsla(20, 60%, 99%, 0.4)`,`hsla(20, 60%, 99%, 0.6)`,`hsla(20, 60%, 99%, 0.8)`,`hsla(324, 100%, 99%, 0.2)`,`hsla(324, 100%, 99%, 0.4)`,`hsla(324, 100%, 99%, 0.6)`,`hsla(324, 100%, 99%, 0.8)`,`hsla(300, 60%, 99%, 0.2)`,`hsla(300, 60%, 99%, 0.4)`,`hsla(300, 60%, 99%, 0.6)`,`hsla(300, 60%, 99%, 0.8)`,`hsla(160, 60%, 99%, 0.2)`,`hsla(160, 60%, 99%, 0.4)`,`hsla(160, 60%, 99%, 0.6)`,`hsla(160, 60%, 99%, 0.8)`,`hsla(0, 0%, 68%, 0.2)`,`hsla(0, 0%, 68%, 0.4)`,`hsla(0, 0%, 68%, 0.6)`,`hsla(0, 0%, 68%, 0.8)`,`hsla(0, 0%, 7%, 0.2)`,`hsla(0, 0%, 7%, 0.4)`,`hsla(0, 0%, 7%, 0.6)`,`hsla(0, 0%, 7%, 0.8)`,`hsla(216, 43%, 9%, 0.2)`,`hsla(216, 43%, 9%, 0.4)`,`hsla(216, 43%, 9%, 0.6)`,`hsla(216, 43%, 9%, 0.8)`,`hsla(0, 17%, 8%, 0.2)`,`hsla(0, 17%, 8%, 0.4)`,`hsla(0, 17%, 8%, 0.6)`,`hsla(0, 17%, 8%, 0.8)`,`hsla(47, 29%, 6%, 0.2)`,`hsla(47, 29%, 6%, 0.4)`,`hsla(47, 29%, 6%, 0.6)`,`hsla(47, 29%, 6%, 0.8)`,`hsla(154, 20%, 7%, 0.2)`,`hsla(154, 20%, 7%, 0.4)`,`hsla(154, 20%, 7%, 0.6)`,`hsla(154, 20%, 7%, 0.8)`,`hsla(23, 22%, 7%, 0.2)`,`hsla(23, 22%, 7%, 0.4)`,`hsla(23, 22%, 7%, 0.6)`,`hsla(23, 22%, 7%, 0.8)`,`hsla(317, 17%, 8%, 0.2)`,`hsla(317, 17%, 8%, 0.4)`,`hsla(317, 17%, 8%, 0.6)`,`hsla(317, 17%, 8%, 0.8)`,`hsla(282, 22%, 9%, 0.2)`,`hsla(282, 22%, 9%, 0.4)`,`hsla(282, 22%, 9%, 0.6)`,`hsla(282, 22%, 9%, 0.8)`,`hsla(173, 22%, 7%, 0.2)`,`hsla(173, 22%, 7%, 0.4)`,`hsla(173, 22%, 7%, 0.6)`,`hsla(173, 22%, 7%, 0.8)`],AE=`accentBackground.accentColor.background0.background02.background04.background06.background08.color1.color2.color3.color4.color5.color6.color7.color8.color9.color10.color11.color12.color0.color02.color04.color06.color08.color.colorHover.colorPress.colorFocus.background.backgroundHover.backgroundPress.backgroundFocus.backgroundActive.borderColor.borderColorHover.borderColorFocus.borderColorPress.placeholderColor.colorTransparent.black1.black2.black3.black4.black5.black6.black7.black8.black9.black10.black11.black12.white1.white2.white3.white4.white5.white6.white7.white8.white9.white10.white11.white12.white.white0.white02.white04.white06.white08.black.black0.black02.black04.black06.black08.shadow1.shadow2.shadow3.shadow4.shadow5.shadow6.shadow7.shadow8.highlight1.highlight2.highlight3.highlight4.highlight5.highlight6.highlight7.highlight8.shadowColor.gray1.gray2.gray3.gray4.gray5.gray6.gray7.gray8.gray9.gray10.gray11.gray12.blue1.blue2.blue3.blue4.blue5.blue6.blue7.blue8.blue9.blue10.blue11.blue12.red1.red2.red3.red4.red5.red6.red7.red8.red9.red10.red11.red12.yellow1.yellow2.yellow3.yellow4.yellow5.yellow6.yellow7.yellow8.yellow9.yellow10.yellow11.yellow12.green1.green2.green3.green4.green5.green6.green7.green8.green9.green10.green11.green12.orange1.orange2.orange3.orange4.orange5.orange6.orange7.orange8.orange9.orange10.orange11.orange12.pink1.pink2.pink3.pink4.pink5.pink6.pink7.pink8.pink9.pink10.pink11.pink12.purple1.purple2.purple3.purple4.purple5.purple6.purple7.purple8.purple9.purple10.purple11.purple12.teal1.teal2.teal3.teal4.teal5.teal6.teal7.teal8.teal9.teal10.teal11.teal12.neutral1.neutral2.neutral3.neutral4.neutral5.neutral6.neutral7.neutral8.neutral9.neutral10.neutral11.neutral12.accent1.accent2.accent3.accent4.accent5.accent6.accent7.accent8.accent9.accent10.accent11.accent12.color01.color0075.color005.color0025.color002.color001.background01.background0075.background005.background0025.background002.background001.outlineColor`.split(`.`),jE=G([[0,0],[1,1],[2,2],[3,3],[4,4],[5,5],[6,6],[7,7],[8,8],[9,9],[10,10],[11,11],[12,12],[13,13],[14,14],[15,15],[16,16],[17,17],[18,18],[19,19],[20,20],[21,21],[22,22],[23,23],[24,18],[25,18],[26,18],[27,23],[28,8],[29,7],[30,9],[31,9],[32,8],[33,10],[34,9],[35,10],[36,11],[37,15],[38,19],[39,24],[40,25],[41,26],[42,27],[43,28],[44,29],[45,30],[46,31],[47,32],[48,33],[49,34],[50,35],[51,36],[52,37],[53,38],[54,39],[55,40],[56,41],[57,42],[58,43],[59,44],[60,45],[61,46],[62,47],[63,48],[64,49],[65,50],[66,51],[67,52],[68,53],[69,54],[70,55],[71,56],[72,57],[73,58],[74,59],[75,60],[76,61],[77,62],[78,63],[79,64],[80,65],[81,58],[82,66],[83,67],[84,68],[85,69],[86,70],[87,51],[88,71],[89,72],[90,73],[91,62],[92,74],[93,75],[94,76],[95,77],[96,78],[97,79],[98,80],[99,81],[100,82],[101,83],[102,84],[103,85],[104,86],[105,87],[106,88],[107,89],[108,90],[109,91],[110,92],[111,93],[112,94],[113,95],[114,96],[115,97],[116,98],[117,99],[118,100],[119,101],[120,102],[121,103],[122,104],[123,105],[124,106],[125,107],[126,108],[127,109],[128,110],[129,111],[130,112],[131,113],[132,114],[133,115],[134,116],[135,117],[136,118],[137,119],[138,120],[139,121],[140,122],[141,123],[142,124],[143,125],[144,126],[145,127],[146,128],[147,129],[148,130],[149,131],[150,132],[151,133],[152,134],[153,135],[154,136],[155,137],[156,138],[157,139],[158,140],[159,141],[160,142],[161,143],[162,144],[163,145],[164,146],[165,147],[166,148],[167,149],[168,150],[169,151],[170,152],[171,153],[172,154],[173,155],[174,156],[175,157],[176,158],[177,159],[178,160],[179,161],[180,162],[181,163],[182,164],[183,165],[184,166],[185,167],[186,168],[187,169],[188,170],[189,171],[190,172],[191,173],[192,174],[193,175],[194,176],[195,177],[196,178],[197,179],[198,180],[199,181],[200,182],[201,183],[202,184],[203,42],[204,185],[205,186],[206,187],[207,188],[208,189],[209,190],[210,191],[211,192],[212,193],[213,194],[214,0],[215,17],[216,16],[217,195],[218,196],[219,197],[220,198],[221,1],[222,11],[223,7],[224,199],[225,200],[226,201],[227,202],[228,203],[229,204],[230,205],[231,206],[232,207],[233,208],[234,209],[235,210],[236,211]]),ME=G([[0,16],[1,9],[2,212],[3,213],[4,214],[5,215],[6,216],[7,193],[8,194],[9,0],[10,17],[11,16],[12,195],[13,196],[14,197],[15,198],[16,1],[17,11],[18,7],[19,2],[20,217],[21,218],[22,219],[23,220],[24,7],[25,220],[26,7],[27,11],[28,194],[29,0],[30,193],[31,0],[32,194],[33,17],[34,16],[35,17],[36,0],[37,198],[38,2],[39,24],[40,25],[41,26],[42,27],[43,28],[44,29],[45,30],[46,31],[47,32],[48,33],[49,34],[50,35],[51,36],[52,37],[53,38],[54,39],[55,40],[56,41],[57,42],[58,43],[59,44],[60,45],[61,46],[62,47],[63,48],[64,49],[65,50],[66,51],[67,52],[68,53],[69,54],[70,55],[71,56],[72,57],[73,58],[74,59],[75,221],[76,222],[77,64],[78,223],[79,224],[80,59],[81,225],[82,54],[83,68],[84,50],[85,70],[86,226],[87,227],[88,73],[89,228],[90,48],[91,64],[92,229],[93,26],[94,230],[95,231],[96,232],[97,233],[98,234],[99,235],[100,236],[101,237],[102,238],[103,239],[104,240],[105,241],[106,242],[107,243],[108,244],[109,245],[110,246],[111,247],[112,94],[113,248],[114,249],[115,250],[116,251],[117,252],[118,253],[119,254],[120,255],[121,256],[122,257],[123,258],[124,106],[125,259],[126,260],[127,261],[128,262],[129,263],[130,264],[131,265],[132,266],[133,267],[134,268],[135,269],[136,118],[137,270],[138,271],[139,272],[140,273],[141,274],[142,275],[143,276],[144,277],[145,278],[146,279],[147,280],[148,130],[149,281],[150,282],[151,283],[152,284],[153,285],[154,286],[155,287],[156,288],[157,289],[158,290],[159,291],[160,142],[161,292],[162,293],[163,294],[164,295],[165,296],[166,297],[167,298],[168,299],[169,300],[170,301],[171,302],[172,154],[173,303],[174,304],[175,305],[176,306],[177,307],[178,308],[179,309],[180,310],[181,311],[182,312],[183,313],[184,166],[185,314],[186,315],[187,316],[188,317],[189,318],[190,319],[191,320],[192,321],[193,322],[194,323],[195,324],[196,178],[197,325],[198,326],[199,327],[200,182],[201,183],[202,184],[203,42],[204,185],[205,186],[206,187],[207,188],[208,189],[209,190],[210,191],[211,192],[212,7],[213,8],[214,9],[215,10],[216,11],[217,12],[218,13],[219,14],[220,15],[221,16],[222,17],[223,18],[224,328],[225,329],[226,330],[227,331],[228,332],[229,333],[230,334],[231,335],[232,336],[233,337],[234,338],[235,339],[236,340]]),NE=G([[0,9],[1,16],[2,212],[3,213],[4,214],[5,215],[6,216],[7,193],[8,194],[9,0],[10,17],[11,16],[12,195],[13,196],[14,197],[15,198],[16,1],[17,11],[18,7],[19,2],[20,217],[21,218],[22,219],[23,220],[24,7],[25,7],[26,7],[27,220],[28,194],[29,193],[30,0],[31,0],[32,194],[33,17],[34,0],[35,17],[36,16],[37,198],[38,2],[224,328],[225,329],[226,330],[227,331],[228,332],[229,333],[230,334],[231,335],[232,336],[233,337],[234,338],[235,339],[236,340]]),PE=G([[0,1],[1,0],[2,2],[3,3],[4,4],[5,5],[6,6],[7,7],[8,8],[9,9],[10,10],[11,11],[12,12],[13,13],[14,14],[15,15],[16,16],[17,17],[18,18],[19,19],[20,20],[21,21],[22,22],[23,23],[24,18],[25,23],[26,18],[27,17],[28,8],[29,9],[30,7],[31,9],[32,8],[33,10],[34,11],[35,10],[36,9],[37,15],[38,19],[224,199],[225,200],[226,201],[227,202],[228,203],[229,204],[230,205],[231,206],[232,207],[233,208],[234,209],[235,210],[236,211]]),FE=G([[0,0],[1,1],[2,212],[3,213],[4,214],[5,215],[6,216],[7,193],[8,194],[9,0],[10,17],[11,16],[12,195],[13,196],[14,197],[15,198],[16,1],[17,11],[18,7],[19,2],[20,217],[21,218],[22,219],[23,220],[24,7],[25,7],[26,7],[27,220],[28,194],[29,193],[30,0],[31,0],[32,194],[33,17],[34,0],[35,17],[36,16],[37,198],[38,2],[224,328],[225,329],[226,330],[227,331],[228,332],[229,333],[230,334],[231,335],[232,336],[233,337],[234,338],[235,339],[236,340]]),IE=G([[0,0],[1,1],[2,2],[3,3],[4,4],[5,5],[6,6],[7,7],[8,8],[9,9],[10,10],[11,11],[12,12],[13,13],[14,14],[15,15],[16,16],[17,17],[18,18],[19,19],[20,20],[21,21],[22,22],[23,23],[24,18],[25,18],[26,18],[27,23],[28,8],[29,7],[30,9],[31,9],[32,8],[33,10],[34,9],[35,10],[36,11],[37,15],[38,19],[224,199],[225,200],[226,201],[227,202],[228,203],[229,204],[230,205],[231,206],[232,207],[233,208],[234,209],[235,210],[236,211]]),LE=G([[0,0],[1,1],[2,341],[3,342],[4,343],[5,344],[6,345],[7,346],[8,347],[9,348],[10,349],[11,350],[12,10],[13,351],[14,352],[15,353],[16,354],[17,355],[18,356],[19,357],[20,358],[21,359],[22,360],[23,361],[24,356],[25,356],[26,356],[27,361],[28,347],[29,346],[30,348],[31,348],[32,347],[33,349],[34,348],[35,349],[36,350],[37,353],[38,357],[224,362],[225,363],[226,364],[227,365],[228,366],[229,367],[230,368],[231,369],[232,370],[233,371],[234,372],[235,373],[236,374]]),RE=G([[0,0],[1,1],[2,375],[3,376],[4,377],[5,378],[6,379],[7,380],[8,381],[9,382],[10,383],[11,384],[12,385],[13,386],[14,387],[15,388],[16,389],[17,390],[18,391],[19,392],[20,393],[21,394],[22,395],[23,396],[24,391],[25,391],[26,391],[27,396],[28,381],[29,380],[30,382],[31,382],[32,381],[33,383],[34,382],[35,383],[36,384],[37,388],[38,392],[224,397],[225,398],[226,399],[227,400],[228,401],[229,402],[230,403],[231,404],[232,405],[233,406],[234,407],[235,408],[236,409]]),zE=G([[0,0],[1,1],[2,410],[3,411],[4,412],[5,413],[6,414],[7,415],[8,416],[9,417],[10,418],[11,419],[12,420],[13,421],[14,422],[15,423],[16,424],[17,425],[18,426],[19,427],[20,428],[21,429],[22,430],[23,431],[24,426],[25,426],[26,426],[27,431],[28,416],[29,415],[30,417],[31,417],[32,416],[33,418],[34,417],[35,418],[36,419],[37,423],[38,427],[224,432],[225,433],[226,434],[227,435],[228,436],[229,437],[230,438],[231,439],[232,440],[233,441],[234,442],[235,443],[236,444]]),BE=G([[0,0],[1,1],[2,445],[3,446],[4,447],[5,448],[6,449],[7,450],[8,451],[9,452],[10,453],[11,454],[12,455],[13,456],[14,457],[15,458],[16,459],[17,460],[18,461],[19,462],[20,463],[21,464],[22,465],[23,466],[24,461],[25,461],[26,461],[27,466],[28,451],[29,450],[30,452],[31,452],[32,451],[33,453],[34,452],[35,453],[36,454],[37,458],[38,462],[224,467],[225,468],[226,469],[227,470],[228,471],[229,472],[230,473],[231,474],[232,475],[233,476],[234,477],[235,478],[236,479]]),VE=G([[0,0],[1,1],[2,480],[3,481],[4,482],[5,483],[6,484],[7,485],[8,486],[9,487],[10,488],[11,489],[12,490],[13,491],[14,492],[15,493],[16,494],[17,495],[18,496],[19,497],[20,498],[21,499],[22,500],[23,501],[24,496],[25,496],[26,496],[27,501],[28,486],[29,485],[30,487],[31,487],[32,486],[33,488],[34,487],[35,488],[36,489],[37,493],[38,497],[224,502],[225,503],[226,504],[227,505],[228,506],[229,507],[230,508],[231,509],[232,510],[233,511],[234,512],[235,513],[236,514]]),HE=G([[0,0],[1,1],[2,515],[3,516],[4,517],[5,518],[6,519],[7,520],[8,521],[9,522],[10,523],[11,524],[12,525],[13,526],[14,527],[15,528],[16,529],[17,530],[18,531],[19,532],[20,533],[21,534],[22,535],[23,536],[24,531],[25,531],[26,531],[27,536],[28,521],[29,520],[30,522],[31,522],[32,521],[33,523],[34,522],[35,523],[36,524],[37,528],[38,532],[224,537],[225,538],[226,539],[227,540],[228,541],[229,542],[230,543],[231,544],[232,545],[233,546],[234,547],[235,548],[236,549]]),UE=G([[0,0],[1,1],[2,550],[3,551],[4,552],[5,553],[6,554],[7,555],[8,556],[9,557],[10,558],[11,559],[12,560],[13,561],[14,562],[15,563],[16,564],[17,565],[18,566],[19,567],[20,568],[21,569],[22,570],[23,571],[24,566],[25,566],[26,566],[27,571],[28,556],[29,555],[30,557],[31,557],[32,556],[33,558],[34,557],[35,558],[36,559],[37,563],[38,567],[224,572],[225,573],[226,574],[227,575],[228,576],[229,577],[230,578],[231,579],[232,580],[233,581],[234,582],[235,583],[236,584]]),WE=G([[0,0],[1,1],[2,585],[3,586],[4,587],[5,588],[6,589],[7,590],[8,591],[9,592],[10,593],[11,594],[12,595],[13,596],[14,597],[15,598],[16,599],[17,600],[18,601],[19,602],[20,603],[21,604],[22,605],[23,606],[24,601],[25,601],[26,601],[27,606],[28,591],[29,590],[30,592],[31,592],[32,591],[33,593],[34,592],[35,593],[36,594],[37,598],[38,602],[224,607],[225,608],[226,609],[227,610],[228,611],[229,612],[230,613],[231,614],[232,615],[233,616],[234,617],[235,618],[236,619]]),GE=G([[0,0],[1,1],[2,620],[3,621],[4,622],[5,623],[6,624],[7,625],[8,626],[9,627],[10,628],[11,629],[12,630],[13,631],[14,632],[15,633],[16,634],[17,635],[18,636],[19,637],[20,638],[21,639],[22,640],[23,641],[24,636],[25,636],[26,636],[27,641],[28,626],[29,625],[30,627],[31,627],[32,626],[33,628],[34,627],[35,628],[36,629],[37,633],[38,637],[224,642],[225,643],[226,644],[227,645],[228,646],[229,647],[230,648],[231,649],[232,650],[233,651],[234,652],[235,653],[236,654]]),KE=G([[0,0],[1,1],[2,655],[3,656],[4,657],[5,658],[6,659],[7,660],[8,661],[9,662],[10,13],[11,663],[12,664],[13,665],[14,197],[15,666],[16,667],[17,668],[18,669],[19,670],[20,671],[21,672],[22,673],[23,674],[24,669],[25,669],[26,669],[27,674],[28,661],[29,660],[30,662],[31,662],[32,661],[33,13],[34,662],[35,13],[36,663],[37,666],[38,670],[224,675],[225,676],[226,677],[227,678],[228,679],[229,680],[230,681],[231,682],[232,683],[233,684],[234,685],[235,686],[236,687]]),qE=G([[0,16],[1,9],[2,212],[3,213],[4,214],[5,215],[6,216],[7,193],[8,194],[9,0],[10,17],[11,16],[12,195],[13,196],[14,197],[15,198],[16,1],[17,11],[18,7],[19,2],[20,217],[21,218],[22,219],[23,220],[24,7],[25,220],[26,7],[27,11],[28,194],[29,0],[30,193],[31,0],[32,194],[33,17],[34,16],[35,17],[36,0],[37,198],[38,2],[224,328],[225,329],[226,330],[227,331],[228,332],[229,333],[230,334],[231,335],[232,336],[233,337],[234,338],[235,339],[236,340]]),JE=G([[0,16],[1,9],[2,2],[3,3],[4,4],[5,5],[6,6],[7,7],[8,8],[9,9],[10,10],[11,11],[12,12],[13,13],[14,14],[15,15],[16,16],[17,17],[18,18],[19,19],[20,20],[21,21],[22,22],[23,23],[24,18],[25,23],[26,18],[27,17],[28,8],[29,9],[30,7],[31,9],[32,8],[33,10],[34,11],[35,10],[36,9],[37,15],[38,19],[224,199],[225,200],[226,201],[227,202],[228,203],[229,204],[230,205],[231,206],[232,207],[233,208],[234,209],[235,210],[236,211]]),YE=G([[0,16],[1,9],[2,688],[3,689],[4,690],[5,691],[6,692],[7,693],[8,0],[9,356],[10,694],[11,695],[12,696],[13,697],[14,668],[15,698],[16,699],[17,700],[18,9],[19,701],[20,702],[21,703],[22,704],[23,705],[24,9],[25,705],[26,9],[27,700],[28,0],[29,356],[30,693],[31,356],[32,0],[33,694],[34,695],[35,694],[36,356],[37,698],[38,701],[224,706],[225,707],[226,708],[227,709],[228,710],[229,711],[230,712],[231,713],[232,714],[233,715],[234,716],[235,717],[236,718]]),XE=G([[0,16],[1,9],[2,719],[3,720],[4,721],[5,722],[6,723],[7,724],[8,725],[9,726],[10,727],[11,728],[12,729],[13,730],[14,731],[15,388],[16,732],[17,733],[18,734],[19,735],[20,736],[21,737],[22,738],[23,739],[24,734],[25,739],[26,734],[27,733],[28,725],[29,726],[30,724],[31,726],[32,725],[33,727],[34,728],[35,727],[36,726],[37,388],[38,735],[224,740],[225,741],[226,742],[227,743],[228,744],[229,745],[230,746],[231,747],[232,748],[233,749],[234,750],[235,751],[236,752]]),ZE=G([[0,16],[1,9],[2,753],[3,754],[4,755],[5,756],[6,757],[7,758],[8,759],[9,760],[10,761],[11,762],[12,763],[13,764],[14,765],[15,423],[16,766],[17,767],[18,768],[19,769],[20,770],[21,771],[22,772],[23,773],[24,768],[25,773],[26,768],[27,767],[28,759],[29,760],[30,758],[31,760],[32,759],[33,761],[34,762],[35,761],[36,760],[37,423],[38,769],[224,774],[225,775],[226,776],[227,777],[228,778],[229,779],[230,780],[231,781],[232,782],[233,783],[234,784],[235,785],[236,786]]),QE=G([[0,16],[1,9],[2,787],[3,788],[4,789],[5,790],[6,791],[7,792],[8,793],[9,794],[10,795],[11,796],[12,797],[13,798],[14,799],[15,458],[16,800],[17,801],[18,802],[19,803],[20,804],[21,805],[22,806],[23,807],[24,802],[25,807],[26,802],[27,801],[28,793],[29,794],[30,792],[31,794],[32,793],[33,795],[34,796],[35,795],[36,794],[37,458],[38,803],[224,808],[225,809],[226,810],[227,811],[228,812],[229,813],[230,814],[231,815],[232,816],[233,817],[234,818],[235,819],[236,820]]),$E=G([[0,16],[1,9],[2,821],[3,822],[4,823],[5,824],[6,825],[7,826],[8,827],[9,828],[10,829],[11,830],[12,831],[13,832],[14,833],[15,493],[16,834],[17,835],[18,836],[19,837],[20,838],[21,839],[22,840],[23,841],[24,836],[25,841],[26,836],[27,835],[28,827],[29,828],[30,826],[31,828],[32,827],[33,829],[34,830],[35,829],[36,828],[37,493],[38,837],[224,842],[225,843],[226,844],[227,845],[228,846],[229,847],[230,848],[231,849],[232,850],[233,851],[234,852],[235,853],[236,854]]),eD=G([[0,16],[1,9],[2,855],[3,856],[4,857],[5,858],[6,859],[7,860],[8,861],[9,862],[10,863],[11,864],[12,865],[13,866],[14,867],[15,528],[16,868],[17,869],[18,870],[19,871],[20,872],[21,873],[22,874],[23,875],[24,870],[25,875],[26,870],[27,869],[28,861],[29,862],[30,860],[31,862],[32,861],[33,863],[34,864],[35,863],[36,862],[37,528],[38,871],[224,876],[225,877],[226,878],[227,879],[228,880],[229,881],[230,882],[231,883],[232,884],[233,885],[234,886],[235,887],[236,888]]),tD=G([[0,16],[1,9],[2,889],[3,890],[4,891],[5,892],[6,893],[7,894],[8,895],[9,896],[10,897],[11,898],[12,899],[13,900],[14,901],[15,563],[16,902],[17,903],[18,904],[19,905],[20,906],[21,907],[22,908],[23,909],[24,904],[25,909],[26,904],[27,903],[28,895],[29,896],[30,894],[31,896],[32,895],[33,897],[34,898],[35,897],[36,896],[37,563],[38,905],[224,910],[225,911],[226,912],[227,913],[228,914],[229,915],[230,916],[231,917],[232,918],[233,919],[234,920],[235,921],[236,922]]),nD=G([[0,16],[1,9],[2,923],[3,924],[4,925],[5,926],[6,927],[7,928],[8,929],[9,930],[10,931],[11,932],[12,933],[13,934],[14,935],[15,598],[16,936],[17,937],[18,938],[19,939],[20,940],[21,941],[22,942],[23,943],[24,938],[25,943],[26,938],[27,937],[28,929],[29,930],[30,928],[31,930],[32,929],[33,931],[34,932],[35,931],[36,930],[37,598],[38,939],[224,944],[225,945],[226,946],[227,947],[228,948],[229,949],[230,950],[231,951],[232,952],[233,953],[234,954],[235,955],[236,956]]),rD=G([[0,16],[1,9],[2,957],[3,958],[4,959],[5,960],[6,961],[7,962],[8,963],[9,964],[10,965],[11,966],[12,967],[13,968],[14,969],[15,633],[16,970],[17,971],[18,972],[19,973],[20,974],[21,975],[22,976],[23,977],[24,972],[25,977],[26,972],[27,971],[28,963],[29,964],[30,962],[31,964],[32,963],[33,965],[34,966],[35,965],[36,964],[37,633],[38,973],[224,978],[225,979],[226,980],[227,981],[228,982],[229,983],[230,984],[231,985],[232,986],[233,987],[234,988],[235,989],[236,990]]),iD=G([[0,16],[1,9],[2,655],[3,656],[4,657],[5,658],[6,659],[7,660],[8,661],[9,662],[10,13],[11,663],[12,664],[13,665],[14,197],[15,666],[16,667],[17,668],[18,669],[19,670],[20,671],[21,672],[22,673],[23,674],[24,669],[25,674],[26,669],[27,668],[28,661],[29,662],[30,660],[31,662],[32,661],[33,13],[34,663],[35,13],[36,662],[37,666],[38,670],[224,675],[225,676],[226,677],[227,678],[228,679],[229,680],[230,681],[231,682],[232,683],[233,684],[234,685],[235,686],[236,687]]),aD=G([[24,17],[25,17],[26,17],[27,18],[28,9],[29,8],[30,10],[31,11],[32,9],[33,11],[34,10],[35,11],[36,12],[224,199],[225,200],[226,201],[227,202],[228,203],[229,204],[230,205],[231,206],[232,207],[233,208],[234,209],[235,210],[3,3],[4,4],[5,5],[6,6],[236,211]]),oD=G([[24,17],[25,17],[26,17],[27,18],[28,10],[29,9],[30,11],[31,13],[32,10],[33,12],[34,11],[35,12],[36,13],[224,199],[225,200],[226,201],[227,202],[228,203],[229,204],[230,205],[231,206],[232,207],[233,208],[234,209],[235,210],[3,3],[4,4],[5,5],[6,6],[236,211]]),sD=G([[24,11],[25,7],[26,11],[27,1],[28,0],[29,17],[30,194],[31,16],[32,0],[33,16],[34,195],[35,16],[36,17],[224,328],[225,329],[226,330],[227,331],[228,332],[229,333],[230,334],[231,335],[232,336],[233,337],[234,338],[235,339],[3,213],[4,214],[5,215],[6,216],[236,340]]),cD=G([[24,11],[25,7],[26,11],[27,1],[28,17],[29,16],[30,0],[31,196],[32,17],[33,195],[34,196],[35,195],[36,16],[224,328],[225,329],[226,330],[227,331],[228,332],[229,333],[230,334],[231,335],[232,336],[233,337],[234,338],[235,339],[3,213],[4,214],[5,215],[6,216],[236,340]]),lD=G([[0,1],[1,0],[2,2],[3,213],[4,214],[5,215],[6,216],[7,7],[8,11],[9,1],[10,198],[11,197],[12,196],[13,195],[14,16],[15,17],[16,0],[17,194],[18,193],[19,212],[20,991],[21,992],[22,993],[23,994],[24,193],[25,193],[26,193],[27,994],[28,11],[29,7],[30,1],[31,1],[32,11],[33,198],[34,1],[35,198],[36,197],[37,17],[38,212],[224,328],[225,329],[226,330],[227,331],[228,332],[229,333],[230,334],[231,335],[232,336],[233,337],[234,338],[235,339],[236,340]]),uD=G([[24,11],[25,11],[26,11],[27,7],[28,0],[29,194],[30,17],[31,16],[32,0],[33,16],[34,17],[35,16],[36,195],[224,328],[225,329],[226,330],[227,331],[228,332],[229,333],[230,334],[231,335],[232,336],[233,337],[234,338],[235,339],[3,213],[4,214],[5,215],[6,216],[236,340]]),dD=G([[24,11],[25,11],[26,11],[27,7],[28,17],[29,0],[30,16],[31,196],[32,17],[33,195],[34,16],[35,195],[36,196],[224,328],[225,329],[226,330],[227,331],[228,332],[229,333],[230,334],[231,335],[232,336],[233,337],[234,338],[235,339],[3,213],[4,214],[5,215],[6,216],[236,340]]),fD=G([[0,1],[1,0],[2,19],[3,3],[4,4],[5,5],[6,6],[7,18],[8,17],[9,16],[10,15],[11,14],[12,13],[13,12],[14,11],[15,10],[16,9],[17,8],[18,7],[19,2],[20,217],[21,218],[22,219],[23,220],[24,7],[25,7],[26,7],[27,220],[28,17],[29,18],[30,16],[31,16],[32,17],[33,15],[34,16],[35,15],[36,14],[37,10],[38,2],[224,199],[225,200],[226,201],[227,202],[228,203],[229,204],[230,205],[231,206],[232,207],[233,208],[234,209],[235,210],[236,211]]),pD=G([[0,1],[1,0],[2,357],[3,342],[4,343],[5,344],[6,345],[7,356],[8,355],[9,354],[10,353],[11,352],[12,351],[13,10],[14,350],[15,349],[16,348],[17,347],[18,346],[19,341],[20,995],[21,996],[22,997],[23,998],[24,346],[25,346],[26,346],[27,998],[28,355],[29,356],[30,354],[31,354],[32,355],[33,353],[34,354],[35,353],[36,352],[37,349],[38,341],[224,362],[225,363],[226,364],[227,365],[228,366],[229,367],[230,368],[231,369],[232,370],[233,371],[234,372],[235,373],[236,374]]),mD=G([[24,355],[25,355],[26,355],[27,356],[28,348],[29,347],[30,349],[31,350],[32,348],[33,350],[34,349],[35,350],[36,10],[224,362],[225,363],[226,364],[227,365],[228,366],[229,367],[230,368],[231,369],[232,370],[233,371],[234,372],[235,373],[3,342],[4,343],[5,344],[6,345],[236,374]]),hD=G([[24,355],[25,355],[26,355],[27,356],[28,349],[29,348],[30,350],[31,351],[32,349],[33,10],[34,350],[35,10],[36,351],[224,362],[225,363],[226,364],[227,365],[228,366],[229,367],[230,368],[231,369],[232,370],[233,371],[234,372],[235,373],[3,342],[4,343],[5,344],[6,345],[236,374]]),gD=G([[0,1],[1,0],[2,392],[3,376],[4,377],[5,378],[6,379],[7,391],[8,390],[9,389],[10,388],[11,387],[12,386],[13,385],[14,384],[15,383],[16,382],[17,381],[18,380],[19,375],[20,999],[21,1e3],[22,1001],[23,1002],[24,380],[25,380],[26,380],[27,1002],[28,390],[29,391],[30,389],[31,389],[32,390],[33,388],[34,389],[35,388],[36,387],[37,383],[38,375],[224,397],[225,398],[226,399],[227,400],[228,401],[229,402],[230,403],[231,404],[232,405],[233,406],[234,407],[235,408],[236,409]]),_D=G([[24,390],[25,390],[26,390],[27,391],[28,382],[29,381],[30,383],[31,384],[32,382],[33,384],[34,383],[35,384],[36,385],[224,397],[225,398],[226,399],[227,400],[228,401],[229,402],[230,403],[231,404],[232,405],[233,406],[234,407],[235,408],[3,376],[4,377],[5,378],[6,379],[236,409]]),vD=G([[24,390],[25,390],[26,390],[27,391],[28,383],[29,382],[30,384],[31,386],[32,383],[33,385],[34,384],[35,385],[36,386],[224,397],[225,398],[226,399],[227,400],[228,401],[229,402],[230,403],[231,404],[232,405],[233,406],[234,407],[235,408],[3,376],[4,377],[5,378],[6,379],[236,409]]),yD=G([[0,1],[1,0],[2,427],[3,411],[4,412],[5,413],[6,414],[7,426],[8,425],[9,424],[10,423],[11,422],[12,421],[13,420],[14,419],[15,418],[16,417],[17,416],[18,415],[19,410],[20,1003],[21,1004],[22,1005],[23,1006],[24,415],[25,415],[26,415],[27,1006],[28,425],[29,426],[30,424],[31,424],[32,425],[33,423],[34,424],[35,423],[36,422],[37,418],[38,410],[224,432],[225,433],[226,434],[227,435],[228,436],[229,437],[230,438],[231,439],[232,440],[233,441],[234,442],[235,443],[236,444]]),bD=G([[24,425],[25,425],[26,425],[27,426],[28,417],[29,416],[30,418],[31,419],[32,417],[33,419],[34,418],[35,419],[36,420],[224,432],[225,433],[226,434],[227,435],[228,436],[229,437],[230,438],[231,439],[232,440],[233,441],[234,442],[235,443],[3,411],[4,412],[5,413],[6,414],[236,444]]),xD=G([[24,425],[25,425],[26,425],[27,426],[28,418],[29,417],[30,419],[31,421],[32,418],[33,420],[34,419],[35,420],[36,421],[224,432],[225,433],[226,434],[227,435],[228,436],[229,437],[230,438],[231,439],[232,440],[233,441],[234,442],[235,443],[3,411],[4,412],[5,413],[6,414],[236,444]]),SD=G([[0,1],[1,0],[2,462],[3,446],[4,447],[5,448],[6,449],[7,461],[8,460],[9,459],[10,458],[11,457],[12,456],[13,455],[14,454],[15,453],[16,452],[17,451],[18,450],[19,445],[20,1007],[21,1008],[22,1009],[23,1010],[24,450],[25,450],[26,450],[27,1010],[28,460],[29,461],[30,459],[31,459],[32,460],[33,458],[34,459],[35,458],[36,457],[37,453],[38,445],[224,467],[225,468],[226,469],[227,470],[228,471],[229,472],[230,473],[231,474],[232,475],[233,476],[234,477],[235,478],[236,479]]),CD=G([[24,460],[25,460],[26,460],[27,461],[28,452],[29,451],[30,453],[31,454],[32,452],[33,454],[34,453],[35,454],[36,455],[224,467],[225,468],[226,469],[227,470],[228,471],[229,472],[230,473],[231,474],[232,475],[233,476],[234,477],[235,478],[3,446],[4,447],[5,448],[6,449],[236,479]]),wD=G([[24,460],[25,460],[26,460],[27,461],[28,453],[29,452],[30,454],[31,456],[32,453],[33,455],[34,454],[35,455],[36,456],[224,467],[225,468],[226,469],[227,470],[228,471],[229,472],[230,473],[231,474],[232,475],[233,476],[234,477],[235,478],[3,446],[4,447],[5,448],[6,449],[236,479]]),TD=G([[0,1],[1,0],[2,497],[3,481],[4,482],[5,483],[6,484],[7,496],[8,495],[9,494],[10,493],[11,492],[12,491],[13,490],[14,489],[15,488],[16,487],[17,486],[18,485],[19,480],[20,1011],[21,1012],[22,1013],[23,1014],[24,485],[25,485],[26,485],[27,1014],[28,495],[29,496],[30,494],[31,494],[32,495],[33,493],[34,494],[35,493],[36,492],[37,488],[38,480],[224,502],[225,503],[226,504],[227,505],[228,506],[229,507],[230,508],[231,509],[232,510],[233,511],[234,512],[235,513],[236,514]]),ED=G([[24,495],[25,495],[26,495],[27,496],[28,487],[29,486],[30,488],[31,489],[32,487],[33,489],[34,488],[35,489],[36,490],[224,502],[225,503],[226,504],[227,505],[228,506],[229,507],[230,508],[231,509],[232,510],[233,511],[234,512],[235,513],[3,481],[4,482],[5,483],[6,484],[236,514]]),DD=G([[24,495],[25,495],[26,495],[27,496],[28,488],[29,487],[30,489],[31,491],[32,488],[33,490],[34,489],[35,490],[36,491],[224,502],[225,503],[226,504],[227,505],[228,506],[229,507],[230,508],[231,509],[232,510],[233,511],[234,512],[235,513],[3,481],[4,482],[5,483],[6,484],[236,514]]),OD=G([[0,1],[1,0],[2,532],[3,516],[4,517],[5,518],[6,519],[7,531],[8,530],[9,529],[10,528],[11,527],[12,526],[13,525],[14,524],[15,523],[16,522],[17,521],[18,520],[19,515],[20,1015],[21,1016],[22,1017],[23,1018],[24,520],[25,520],[26,520],[27,1018],[28,530],[29,531],[30,529],[31,529],[32,530],[33,528],[34,529],[35,528],[36,527],[37,523],[38,515],[224,537],[225,538],[226,539],[227,540],[228,541],[229,542],[230,543],[231,544],[232,545],[233,546],[234,547],[235,548],[236,549]]),kD=G([[24,530],[25,530],[26,530],[27,531],[28,522],[29,521],[30,523],[31,524],[32,522],[33,524],[34,523],[35,524],[36,525],[224,537],[225,538],[226,539],[227,540],[228,541],[229,542],[230,543],[231,544],[232,545],[233,546],[234,547],[235,548],[3,516],[4,517],[5,518],[6,519],[236,549]]),AD=G([[24,530],[25,530],[26,530],[27,531],[28,523],[29,522],[30,524],[31,526],[32,523],[33,525],[34,524],[35,525],[36,526],[224,537],[225,538],[226,539],[227,540],[228,541],[229,542],[230,543],[231,544],[232,545],[233,546],[234,547],[235,548],[3,516],[4,517],[5,518],[6,519],[236,549]]),jD=G([[0,1],[1,0],[2,567],[3,551],[4,552],[5,553],[6,554],[7,566],[8,565],[9,564],[10,563],[11,562],[12,561],[13,560],[14,559],[15,558],[16,557],[17,556],[18,555],[19,550],[20,1019],[21,1020],[22,1021],[23,1022],[24,555],[25,555],[26,555],[27,1022],[28,565],[29,566],[30,564],[31,564],[32,565],[33,563],[34,564],[35,563],[36,562],[37,558],[38,550],[224,572],[225,573],[226,574],[227,575],[228,576],[229,577],[230,578],[231,579],[232,580],[233,581],[234,582],[235,583],[236,584]]),MD=G([[24,565],[25,565],[26,565],[27,566],[28,557],[29,556],[30,558],[31,559],[32,557],[33,559],[34,558],[35,559],[36,560],[224,572],[225,573],[226,574],[227,575],[228,576],[229,577],[230,578],[231,579],[232,580],[233,581],[234,582],[235,583],[3,551],[4,552],[5,553],[6,554],[236,584]]),ND=G([[24,565],[25,565],[26,565],[27,566],[28,558],[29,557],[30,559],[31,561],[32,558],[33,560],[34,559],[35,560],[36,561],[224,572],[225,573],[226,574],[227,575],[228,576],[229,577],[230,578],[231,579],[232,580],[233,581],[234,582],[235,583],[3,551],[4,552],[5,553],[6,554],[236,584]]),PD=G([[0,1],[1,0],[2,602],[3,586],[4,587],[5,588],[6,589],[7,601],[8,600],[9,599],[10,598],[11,597],[12,596],[13,595],[14,594],[15,593],[16,592],[17,591],[18,590],[19,585],[20,1023],[21,1024],[22,1025],[23,1026],[24,590],[25,590],[26,590],[27,1026],[28,600],[29,601],[30,599],[31,599],[32,600],[33,598],[34,599],[35,598],[36,597],[37,593],[38,585],[224,607],[225,608],[226,609],[227,610],[228,611],[229,612],[230,613],[231,614],[232,615],[233,616],[234,617],[235,618],[236,619]]),FD=G([[24,600],[25,600],[26,600],[27,601],[28,592],[29,591],[30,593],[31,594],[32,592],[33,594],[34,593],[35,594],[36,595],[224,607],[225,608],[226,609],[227,610],[228,611],[229,612],[230,613],[231,614],[232,615],[233,616],[234,617],[235,618],[3,586],[4,587],[5,588],[6,589],[236,619]]),ID=G([[24,600],[25,600],[26,600],[27,601],[28,593],[29,592],[30,594],[31,596],[32,593],[33,595],[34,594],[35,595],[36,596],[224,607],[225,608],[226,609],[227,610],[228,611],[229,612],[230,613],[231,614],[232,615],[233,616],[234,617],[235,618],[3,586],[4,587],[5,588],[6,589],[236,619]]),LD=G([[0,1],[1,0],[2,637],[3,621],[4,622],[5,623],[6,624],[7,636],[8,635],[9,634],[10,633],[11,632],[12,631],[13,630],[14,629],[15,628],[16,627],[17,626],[18,625],[19,620],[20,1027],[21,1028],[22,1029],[23,1030],[24,625],[25,625],[26,625],[27,1030],[28,635],[29,636],[30,634],[31,634],[32,635],[33,633],[34,634],[35,633],[36,632],[37,628],[38,620],[224,642],[225,643],[226,644],[227,645],[228,646],[229,647],[230,648],[231,649],[232,650],[233,651],[234,652],[235,653],[236,654]]),RD=G([[24,635],[25,635],[26,635],[27,636],[28,627],[29,626],[30,628],[31,629],[32,627],[33,629],[34,628],[35,629],[36,630],[224,642],[225,643],[226,644],[227,645],[228,646],[229,647],[230,648],[231,649],[232,650],[233,651],[234,652],[235,653],[3,621],[4,622],[5,623],[6,624],[236,654]]),zD=G([[24,635],[25,635],[26,635],[27,636],[28,628],[29,627],[30,629],[31,631],[32,628],[33,630],[34,629],[35,630],[36,631],[224,642],[225,643],[226,644],[227,645],[228,646],[229,647],[230,648],[231,649],[232,650],[233,651],[234,652],[235,653],[3,621],[4,622],[5,623],[6,624],[236,654]]),BD=G([[0,1],[1,0],[2,670],[3,656],[4,657],[5,658],[6,659],[7,669],[8,668],[9,667],[10,666],[11,197],[12,665],[13,664],[14,663],[15,13],[16,662],[17,661],[18,660],[19,655],[20,1031],[21,1032],[22,1033],[23,1034],[24,660],[25,660],[26,660],[27,1034],[28,668],[29,669],[30,667],[31,667],[32,668],[33,666],[34,667],[35,666],[36,197],[37,13],[38,655],[224,675],[225,676],[226,677],[227,678],[228,679],[229,680],[230,681],[231,682],[232,683],[233,684],[234,685],[235,686],[236,687]]),VD=G([[24,668],[25,668],[26,668],[27,669],[28,662],[29,661],[30,13],[31,663],[32,662],[33,663],[34,13],[35,663],[36,664],[224,675],[225,676],[226,677],[227,678],[228,679],[229,680],[230,681],[231,682],[232,683],[233,684],[234,685],[235,686],[3,656],[4,657],[5,658],[6,659],[236,687]]),HD=G([[24,668],[25,668],[26,668],[27,669],[28,13],[29,662],[30,663],[31,665],[32,13],[33,664],[34,663],[35,664],[36,665],[224,675],[225,676],[226,677],[227,678],[228,679],[229,680],[230,681],[231,682],[232,683],[233,684],[234,685],[235,686],[3,656],[4,657],[5,658],[6,659],[236,687]]),UD=G([[0,9],[1,16],[2,2],[3,213],[4,214],[5,215],[6,216],[7,7],[8,11],[9,1],[10,198],[11,197],[12,196],[13,195],[14,16],[15,17],[16,0],[17,194],[18,193],[19,212],[20,991],[21,992],[22,993],[23,994],[24,193],[25,994],[26,193],[27,194],[28,11],[29,1],[30,7],[31,1],[32,11],[33,198],[34,197],[35,198],[36,1],[37,17],[38,212],[224,328],[225,329],[226,330],[227,331],[228,332],[229,333],[230,334],[231,335],[232,336],[233,337],[234,338],[235,339],[236,340]]),WD=G([[0,9],[1,16],[2,19],[3,3],[4,4],[5,5],[6,6],[7,18],[8,17],[9,16],[10,15],[11,14],[12,13],[13,12],[14,11],[15,10],[16,9],[17,8],[18,7],[19,2],[20,217],[21,218],[22,219],[23,220],[24,7],[25,220],[26,7],[27,8],[28,17],[29,16],[30,18],[31,16],[32,17],[33,15],[34,14],[35,15],[36,16],[37,10],[38,2],[224,199],[225,200],[226,201],[227,202],[228,203],[229,204],[230,205],[231,206],[232,207],[233,208],[234,209],[235,210],[236,211]]),GD=G([[24,17],[25,18],[26,17],[27,16],[28,9],[29,10],[30,8],[31,11],[32,9],[33,11],[34,12],[35,11],[36,10],[224,199],[225,200],[226,201],[227,202],[228,203],[229,204],[230,205],[231,206],[232,207],[233,208],[234,209],[235,210],[3,3],[4,4],[5,5],[6,6],[236,211]]),KD=G([[24,17],[25,18],[26,17],[27,16],[28,10],[29,11],[30,9],[31,13],[32,10],[33,12],[34,13],[35,12],[36,11],[224,199],[225,200],[226,201],[227,202],[228,203],[229,204],[230,205],[231,206],[232,207],[233,208],[234,209],[235,210],[3,3],[4,4],[5,5],[6,6],[236,211]]),qD=G([[0,9],[1,16],[2,701],[3,689],[4,690],[5,691],[6,692],[7,9],[8,700],[9,699],[10,698],[11,668],[12,697],[13,696],[14,695],[15,694],[16,356],[17,0],[18,693],[19,688],[20,1035],[21,1036],[22,1037],[23,1038],[24,693],[25,1038],[26,693],[27,0],[28,700],[29,699],[30,9],[31,699],[32,700],[33,698],[34,668],[35,698],[36,699],[37,694],[38,688],[224,706],[225,707],[226,708],[227,709],[228,710],[229,711],[230,712],[231,713],[232,714],[233,715],[234,716],[235,717],[236,718]]),JD=G([[24,700],[25,9],[26,700],[27,699],[28,356],[29,694],[30,0],[31,695],[32,356],[33,695],[34,696],[35,695],[36,694],[224,706],[225,707],[226,708],[227,709],[228,710],[229,711],[230,712],[231,713],[232,714],[233,715],[234,716],[235,717],[3,689],[4,690],[5,691],[6,692],[236,718]]),YD=G([[24,700],[25,9],[26,700],[27,699],[28,694],[29,695],[30,356],[31,697],[32,694],[33,696],[34,697],[35,696],[36,695],[224,706],[225,707],[226,708],[227,709],[228,710],[229,711],[230,712],[231,713],[232,714],[233,715],[234,716],[235,717],[3,689],[4,690],[5,691],[6,692],[236,718]]),XD=G([[0,9],[1,16],[2,735],[3,720],[4,721],[5,722],[6,723],[7,734],[8,733],[9,732],[10,388],[11,731],[12,730],[13,729],[14,728],[15,727],[16,726],[17,725],[18,724],[19,719],[20,1039],[21,1040],[22,1041],[23,1042],[24,724],[25,1042],[26,724],[27,725],[28,733],[29,732],[30,734],[31,732],[32,733],[33,388],[34,731],[35,388],[36,732],[37,727],[38,719],[224,740],[225,741],[226,742],[227,743],[228,744],[229,745],[230,746],[231,747],[232,748],[233,749],[234,750],[235,751],[236,752]]),ZD=G([[24,733],[25,734],[26,733],[27,732],[28,726],[29,727],[30,725],[31,728],[32,726],[33,728],[34,729],[35,728],[36,727],[224,740],[225,741],[226,742],[227,743],[228,744],[229,745],[230,746],[231,747],[232,748],[233,749],[234,750],[235,751],[3,720],[4,721],[5,722],[6,723],[236,752]]),QD=G([[24,733],[25,734],[26,733],[27,732],[28,727],[29,728],[30,726],[31,730],[32,727],[33,729],[34,730],[35,729],[36,728],[224,740],[225,741],[226,742],[227,743],[228,744],[229,745],[230,746],[231,747],[232,748],[233,749],[234,750],[235,751],[3,720],[4,721],[5,722],[6,723],[236,752]]),$D=G([[0,9],[1,16],[2,769],[3,754],[4,755],[5,756],[6,757],[7,768],[8,767],[9,766],[10,423],[11,765],[12,764],[13,763],[14,762],[15,761],[16,760],[17,759],[18,758],[19,753],[20,1043],[21,1044],[22,1045],[23,1046],[24,758],[25,1046],[26,758],[27,759],[28,767],[29,766],[30,768],[31,766],[32,767],[33,423],[34,765],[35,423],[36,766],[37,761],[38,753],[224,774],[225,775],[226,776],[227,777],[228,778],[229,779],[230,780],[231,781],[232,782],[233,783],[234,784],[235,785],[236,786]]),eO=G([[24,767],[25,768],[26,767],[27,766],[28,760],[29,761],[30,759],[31,762],[32,760],[33,762],[34,763],[35,762],[36,761],[224,774],[225,775],[226,776],[227,777],[228,778],[229,779],[230,780],[231,781],[232,782],[233,783],[234,784],[235,785],[3,754],[4,755],[5,756],[6,757],[236,786]]),tO=G([[24,767],[25,768],[26,767],[27,766],[28,761],[29,762],[30,760],[31,764],[32,761],[33,763],[34,764],[35,763],[36,762],[224,774],[225,775],[226,776],[227,777],[228,778],[229,779],[230,780],[231,781],[232,782],[233,783],[234,784],[235,785],[3,754],[4,755],[5,756],[6,757],[236,786]]),nO=G([[0,9],[1,16],[2,803],[3,788],[4,789],[5,790],[6,791],[7,802],[8,801],[9,800],[10,458],[11,799],[12,798],[13,797],[14,796],[15,795],[16,794],[17,793],[18,792],[19,787],[20,1047],[21,1048],[22,1049],[23,1050],[24,792],[25,1050],[26,792],[27,793],[28,801],[29,800],[30,802],[31,800],[32,801],[33,458],[34,799],[35,458],[36,800],[37,795],[38,787],[224,808],[225,809],[226,810],[227,811],[228,812],[229,813],[230,814],[231,815],[232,816],[233,817],[234,818],[235,819],[236,820]]),rO=G([[24,801],[25,802],[26,801],[27,800],[28,794],[29,795],[30,793],[31,796],[32,794],[33,796],[34,797],[35,796],[36,795],[224,808],[225,809],[226,810],[227,811],[228,812],[229,813],[230,814],[231,815],[232,816],[233,817],[234,818],[235,819],[3,788],[4,789],[5,790],[6,791],[236,820]]),iO=G([[24,801],[25,802],[26,801],[27,800],[28,795],[29,796],[30,794],[31,798],[32,795],[33,797],[34,798],[35,797],[36,796],[224,808],[225,809],[226,810],[227,811],[228,812],[229,813],[230,814],[231,815],[232,816],[233,817],[234,818],[235,819],[3,788],[4,789],[5,790],[6,791],[236,820]]),aO=G([[0,9],[1,16],[2,837],[3,822],[4,823],[5,824],[6,825],[7,836],[8,835],[9,834],[10,493],[11,833],[12,832],[13,831],[14,830],[15,829],[16,828],[17,827],[18,826],[19,821],[20,1051],[21,1052],[22,1053],[23,1054],[24,826],[25,1054],[26,826],[27,827],[28,835],[29,834],[30,836],[31,834],[32,835],[33,493],[34,833],[35,493],[36,834],[37,829],[38,821],[224,842],[225,843],[226,844],[227,845],[228,846],[229,847],[230,848],[231,849],[232,850],[233,851],[234,852],[235,853],[236,854]]),oO=G([[24,835],[25,836],[26,835],[27,834],[28,828],[29,829],[30,827],[31,830],[32,828],[33,830],[34,831],[35,830],[36,829],[224,842],[225,843],[226,844],[227,845],[228,846],[229,847],[230,848],[231,849],[232,850],[233,851],[234,852],[235,853],[3,822],[4,823],[5,824],[6,825],[236,854]]),sO=G([[24,835],[25,836],[26,835],[27,834],[28,829],[29,830],[30,828],[31,832],[32,829],[33,831],[34,832],[35,831],[36,830],[224,842],[225,843],[226,844],[227,845],[228,846],[229,847],[230,848],[231,849],[232,850],[233,851],[234,852],[235,853],[3,822],[4,823],[5,824],[6,825],[236,854]]),cO=G([[0,9],[1,16],[2,871],[3,856],[4,857],[5,858],[6,859],[7,870],[8,869],[9,868],[10,528],[11,867],[12,866],[13,865],[14,864],[15,863],[16,862],[17,861],[18,860],[19,855],[20,1055],[21,1056],[22,1057],[23,1058],[24,860],[25,1058],[26,860],[27,861],[28,869],[29,868],[30,870],[31,868],[32,869],[33,528],[34,867],[35,528],[36,868],[37,863],[38,855],[224,876],[225,877],[226,878],[227,879],[228,880],[229,881],[230,882],[231,883],[232,884],[233,885],[234,886],[235,887],[236,888]]),lO=G([[24,869],[25,870],[26,869],[27,868],[28,862],[29,863],[30,861],[31,864],[32,862],[33,864],[34,865],[35,864],[36,863],[224,876],[225,877],[226,878],[227,879],[228,880],[229,881],[230,882],[231,883],[232,884],[233,885],[234,886],[235,887],[3,856],[4,857],[5,858],[6,859],[236,888]]),uO=G([[24,869],[25,870],[26,869],[27,868],[28,863],[29,864],[30,862],[31,866],[32,863],[33,865],[34,866],[35,865],[36,864],[224,876],[225,877],[226,878],[227,879],[228,880],[229,881],[230,882],[231,883],[232,884],[233,885],[234,886],[235,887],[3,856],[4,857],[5,858],[6,859],[236,888]]),dO=G([[0,9],[1,16],[2,905],[3,890],[4,891],[5,892],[6,893],[7,904],[8,903],[9,902],[10,563],[11,901],[12,900],[13,899],[14,898],[15,897],[16,896],[17,895],[18,894],[19,889],[20,1059],[21,1060],[22,1061],[23,1062],[24,894],[25,1062],[26,894],[27,895],[28,903],[29,902],[30,904],[31,902],[32,903],[33,563],[34,901],[35,563],[36,902],[37,897],[38,889],[224,910],[225,911],[226,912],[227,913],[228,914],[229,915],[230,916],[231,917],[232,918],[233,919],[234,920],[235,921],[236,922]]),fO=G([[24,903],[25,904],[26,903],[27,902],[28,896],[29,897],[30,895],[31,898],[32,896],[33,898],[34,899],[35,898],[36,897],[224,910],[225,911],[226,912],[227,913],[228,914],[229,915],[230,916],[231,917],[232,918],[233,919],[234,920],[235,921],[3,890],[4,891],[5,892],[6,893],[236,922]]),pO=G([[24,903],[25,904],[26,903],[27,902],[28,897],[29,898],[30,896],[31,900],[32,897],[33,899],[34,900],[35,899],[36,898],[224,910],[225,911],[226,912],[227,913],[228,914],[229,915],[230,916],[231,917],[232,918],[233,919],[234,920],[235,921],[3,890],[4,891],[5,892],[6,893],[236,922]]),mO=G([[0,9],[1,16],[2,939],[3,924],[4,925],[5,926],[6,927],[7,938],[8,937],[9,936],[10,598],[11,935],[12,934],[13,933],[14,932],[15,931],[16,930],[17,929],[18,928],[19,923],[20,1063],[21,1064],[22,1065],[23,1066],[24,928],[25,1066],[26,928],[27,929],[28,937],[29,936],[30,938],[31,936],[32,937],[33,598],[34,935],[35,598],[36,936],[37,931],[38,923],[224,944],[225,945],[226,946],[227,947],[228,948],[229,949],[230,950],[231,951],[232,952],[233,953],[234,954],[235,955],[236,956]]),hO=G([[24,937],[25,938],[26,937],[27,936],[28,930],[29,931],[30,929],[31,932],[32,930],[33,932],[34,933],[35,932],[36,931],[224,944],[225,945],[226,946],[227,947],[228,948],[229,949],[230,950],[231,951],[232,952],[233,953],[234,954],[235,955],[3,924],[4,925],[5,926],[6,927],[236,956]]),gO=G([[24,937],[25,938],[26,937],[27,936],[28,931],[29,932],[30,930],[31,934],[32,931],[33,933],[34,934],[35,933],[36,932],[224,944],[225,945],[226,946],[227,947],[228,948],[229,949],[230,950],[231,951],[232,952],[233,953],[234,954],[235,955],[3,924],[4,925],[5,926],[6,927],[236,956]]),_O=G([[0,9],[1,16],[2,973],[3,958],[4,959],[5,960],[6,961],[7,972],[8,971],[9,970],[10,633],[11,969],[12,968],[13,967],[14,966],[15,965],[16,964],[17,963],[18,962],[19,957],[20,1067],[21,1068],[22,1069],[23,1070],[24,962],[25,1070],[26,962],[27,963],[28,971],[29,970],[30,972],[31,970],[32,971],[33,633],[34,969],[35,633],[36,970],[37,965],[38,957],[224,978],[225,979],[226,980],[227,981],[228,982],[229,983],[230,984],[231,985],[232,986],[233,987],[234,988],[235,989],[236,990]]),vO=G([[24,971],[25,972],[26,971],[27,970],[28,964],[29,965],[30,963],[31,966],[32,964],[33,966],[34,967],[35,966],[36,965],[224,978],[225,979],[226,980],[227,981],[228,982],[229,983],[230,984],[231,985],[232,986],[233,987],[234,988],[235,989],[3,958],[4,959],[5,960],[6,961],[236,990]]),yO=G([[24,971],[25,972],[26,971],[27,970],[28,965],[29,966],[30,964],[31,968],[32,965],[33,967],[34,968],[35,967],[36,966],[224,978],[225,979],[226,980],[227,981],[228,982],[229,983],[230,984],[231,985],[232,986],[233,987],[234,988],[235,989],[3,958],[4,959],[5,960],[6,961],[236,990]]),bO=G([[0,9],[1,16],[2,670],[3,656],[4,657],[5,658],[6,659],[7,669],[8,668],[9,667],[10,666],[11,197],[12,665],[13,664],[14,663],[15,13],[16,662],[17,661],[18,660],[19,655],[20,1031],[21,1032],[22,1033],[23,1034],[24,660],[25,1034],[26,660],[27,661],[28,668],[29,667],[30,669],[31,667],[32,668],[33,666],[34,197],[35,666],[36,667],[37,13],[38,655],[224,675],[225,676],[226,677],[227,678],[228,679],[229,680],[230,681],[231,682],[232,683],[233,684],[234,685],[235,686],[236,687]]),xO=G([[24,668],[25,669],[26,668],[27,667],[28,662],[29,13],[30,661],[31,663],[32,662],[33,663],[34,664],[35,663],[36,13],[224,675],[225,676],[226,677],[227,678],[228,679],[229,680],[230,681],[231,682],[232,683],[233,684],[234,685],[235,686],[3,656],[4,657],[5,658],[6,659],[236,687]]),SO=G([[24,668],[25,669],[26,668],[27,667],[28,13],[29,663],[30,662],[31,665],[32,13],[33,664],[34,665],[35,664],[36,663],[224,675],[225,676],[226,677],[227,678],[228,679],[229,680],[230,681],[231,682],[232,683],[233,684],[234,685],[235,686],[3,656],[4,657],[5,658],[6,659],[236,687]]),CO=G([[24,17],[25,17],[26,17],[27,18],[28,12],[29,11],[30,13],[31,17],[32,12],[33,14],[34,13],[35,14],[36,15],[224,199],[225,200],[226,201],[227,202],[228,203],[229,204],[230,205],[231,206],[232,207],[233,208],[234,209],[235,210],[3,3],[4,4],[5,5],[6,6],[236,211]]),wO=G([[24,11],[25,7],[26,11],[27,1],[28,195],[29,196],[30,16],[31,11],[32,195],[33,197],[34,198],[35,197],[36,196],[224,328],[225,329],[226,330],[227,331],[228,332],[229,333],[230,334],[231,335],[232,336],[233,337],[234,338],[235,339],[3,213],[4,214],[5,215],[6,216],[236,340]]),TO=G([[24,11],[25,11],[26,11],[27,7],[28,195],[29,16],[30,196],[31,11],[32,195],[33,197],[34,196],[35,197],[36,198],[224,328],[225,329],[226,330],[227,331],[228,332],[229,333],[230,334],[231,335],[232,336],[233,337],[234,338],[235,339],[3,213],[4,214],[5,215],[6,216],[236,340]]),EO=G([[24,355],[25,355],[26,355],[27,356],[28,10],[29,350],[30,351],[31,355],[32,10],[33,352],[34,351],[35,352],[36,353],[224,362],[225,363],[226,364],[227,365],[228,366],[229,367],[230,368],[231,369],[232,370],[233,371],[234,372],[235,373],[3,342],[4,343],[5,344],[6,345],[236,374]]),DO=G([[24,390],[25,390],[26,390],[27,391],[28,385],[29,384],[30,386],[31,390],[32,385],[33,387],[34,386],[35,387],[36,388],[224,397],[225,398],[226,399],[227,400],[228,401],[229,402],[230,403],[231,404],[232,405],[233,406],[234,407],[235,408],[3,376],[4,377],[5,378],[6,379],[236,409]]),OO=G([[24,425],[25,425],[26,425],[27,426],[28,420],[29,419],[30,421],[31,425],[32,420],[33,422],[34,421],[35,422],[36,423],[224,432],[225,433],[226,434],[227,435],[228,436],[229,437],[230,438],[231,439],[232,440],[233,441],[234,442],[235,443],[3,411],[4,412],[5,413],[6,414],[236,444]]),kO=G([[24,460],[25,460],[26,460],[27,461],[28,455],[29,454],[30,456],[31,460],[32,455],[33,457],[34,456],[35,457],[36,458],[224,467],[225,468],[226,469],[227,470],[228,471],[229,472],[230,473],[231,474],[232,475],[233,476],[234,477],[235,478],[3,446],[4,447],[5,448],[6,449],[236,479]]),AO=G([[24,495],[25,495],[26,495],[27,496],[28,490],[29,489],[30,491],[31,495],[32,490],[33,492],[34,491],[35,492],[36,493],[224,502],[225,503],[226,504],[227,505],[228,506],[229,507],[230,508],[231,509],[232,510],[233,511],[234,512],[235,513],[3,481],[4,482],[5,483],[6,484],[236,514]]),jO=G([[24,530],[25,530],[26,530],[27,531],[28,525],[29,524],[30,526],[31,530],[32,525],[33,527],[34,526],[35,527],[36,528],[224,537],[225,538],[226,539],[227,540],[228,541],[229,542],[230,543],[231,544],[232,545],[233,546],[234,547],[235,548],[3,516],[4,517],[5,518],[6,519],[236,549]]),MO=G([[24,565],[25,565],[26,565],[27,566],[28,560],[29,559],[30,561],[31,565],[32,560],[33,562],[34,561],[35,562],[36,563],[224,572],[225,573],[226,574],[227,575],[228,576],[229,577],[230,578],[231,579],[232,580],[233,581],[234,582],[235,583],[3,551],[4,552],[5,553],[6,554],[236,584]]),NO=G([[24,600],[25,600],[26,600],[27,601],[28,595],[29,594],[30,596],[31,600],[32,595],[33,597],[34,596],[35,597],[36,598],[224,607],[225,608],[226,609],[227,610],[228,611],[229,612],[230,613],[231,614],[232,615],[233,616],[234,617],[235,618],[3,586],[4,587],[5,588],[6,589],[236,619]]),PO=G([[24,635],[25,635],[26,635],[27,636],[28,630],[29,629],[30,631],[31,635],[32,630],[33,632],[34,631],[35,632],[36,633],[224,642],[225,643],[226,644],[227,645],[228,646],[229,647],[230,648],[231,649],[232,650],[233,651],[234,652],[235,653],[3,621],[4,622],[5,623],[6,624],[236,654]]),FO=G([[24,668],[25,668],[26,668],[27,669],[28,664],[29,663],[30,665],[31,668],[32,664],[33,197],[34,665],[35,197],[36,666],[224,675],[225,676],[226,677],[227,678],[228,679],[229,680],[230,681],[231,682],[232,683],[233,684],[234,685],[235,686],[3,656],[4,657],[5,658],[6,659],[236,687]]),IO=G([[24,17],[25,18],[26,17],[27,16],[28,12],[29,13],[30,11],[31,17],[32,12],[33,14],[34,15],[35,14],[36,13],[224,199],[225,200],[226,201],[227,202],[228,203],[229,204],[230,205],[231,206],[232,207],[233,208],[234,209],[235,210],[3,3],[4,4],[5,5],[6,6],[236,211]]),LO=G([[24,700],[25,9],[26,700],[27,699],[28,696],[29,697],[30,695],[31,700],[32,696],[33,668],[34,698],[35,668],[36,697],[224,706],[225,707],[226,708],[227,709],[228,710],[229,711],[230,712],[231,713],[232,714],[233,715],[234,716],[235,717],[3,689],[4,690],[5,691],[6,692],[236,718]]),RO=G([[24,733],[25,734],[26,733],[27,732],[28,729],[29,730],[30,728],[31,733],[32,729],[33,731],[34,388],[35,731],[36,730],[224,740],[225,741],[226,742],[227,743],[228,744],[229,745],[230,746],[231,747],[232,748],[233,749],[234,750],[235,751],[3,720],[4,721],[5,722],[6,723],[236,752]]),zO=G([[24,767],[25,768],[26,767],[27,766],[28,763],[29,764],[30,762],[31,767],[32,763],[33,765],[34,423],[35,765],[36,764],[224,774],[225,775],[226,776],[227,777],[228,778],[229,779],[230,780],[231,781],[232,782],[233,783],[234,784],[235,785],[3,754],[4,755],[5,756],[6,757],[236,786]]),BO=G([[24,801],[25,802],[26,801],[27,800],[28,797],[29,798],[30,796],[31,801],[32,797],[33,799],[34,458],[35,799],[36,798],[224,808],[225,809],[226,810],[227,811],[228,812],[229,813],[230,814],[231,815],[232,816],[233,817],[234,818],[235,819],[3,788],[4,789],[5,790],[6,791],[236,820]]),VO=G([[24,835],[25,836],[26,835],[27,834],[28,831],[29,832],[30,830],[31,835],[32,831],[33,833],[34,493],[35,833],[36,832],[224,842],[225,843],[226,844],[227,845],[228,846],[229,847],[230,848],[231,849],[232,850],[233,851],[234,852],[235,853],[3,822],[4,823],[5,824],[6,825],[236,854]]),HO=G([[24,869],[25,870],[26,869],[27,868],[28,865],[29,866],[30,864],[31,869],[32,865],[33,867],[34,528],[35,867],[36,866],[224,876],[225,877],[226,878],[227,879],[228,880],[229,881],[230,882],[231,883],[232,884],[233,885],[234,886],[235,887],[3,856],[4,857],[5,858],[6,859],[236,888]]),UO=G([[24,903],[25,904],[26,903],[27,902],[28,899],[29,900],[30,898],[31,903],[32,899],[33,901],[34,563],[35,901],[36,900],[224,910],[225,911],[226,912],[227,913],[228,914],[229,915],[230,916],[231,917],[232,918],[233,919],[234,920],[235,921],[3,890],[4,891],[5,892],[6,893],[236,922]]),WO=G([[24,937],[25,938],[26,937],[27,936],[28,933],[29,934],[30,932],[31,937],[32,933],[33,935],[34,598],[35,935],[36,934],[224,944],[225,945],[226,946],[227,947],[228,948],[229,949],[230,950],[231,951],[232,952],[233,953],[234,954],[235,955],[3,924],[4,925],[5,926],[6,927],[236,956]]),GO=G([[24,971],[25,972],[26,971],[27,970],[28,967],[29,968],[30,966],[31,971],[32,967],[33,969],[34,633],[35,969],[36,968],[224,978],[225,979],[226,980],[227,981],[228,982],[229,983],[230,984],[231,985],[232,986],[233,987],[234,988],[235,989],[3,958],[4,959],[5,960],[6,961],[236,990]]),KO=G([[24,668],[25,669],[26,668],[27,667],[28,664],[29,665],[30,663],[31,668],[32,664],[33,197],[34,666],[35,197],[36,665],[224,675],[225,676],[226,677],[227,678],[228,679],[229,680],[230,681],[231,682],[232,683],[233,684],[234,685],[235,686],[3,656],[4,657],[5,658],[6,659],[236,687]]),qO={light:jE,dark:ME,light_accent:NE,dark_accent:PE,light_black:FE,light_white:IE,light_gray:LE,light_blue:RE,light_red:zE,light_yellow:BE,light_green:VE,light_orange:HE,light_pink:UE,light_purple:WE,light_teal:GE,light_neutral:KE,dark_black:qE,dark_white:JE,dark_gray:YE,dark_blue:XE,dark_red:ZE,dark_yellow:QE,dark_green:$E,dark_orange:eD,dark_pink:tD,dark_purple:nD,dark_teal:rD,dark_neutral:iD,light_surface1:aD,light_white_surface1:aD,light_Input:aD,light_Progress:aD,light_Slider:aD,light_TextArea:aD,light_white_Input:aD,light_white_Progress:aD,light_white_Slider:aD,light_white_TextArea:aD,light_surface2:oD,light_white_surface2:oD,light_Button:oD,light_SliderThumb:oD,light_Switch:oD,light_white_Button:oD,light_white_SliderThumb:oD,light_white_Switch:oD,dark_surface1:sD,dark_black_surface1:sD,dark_Input:sD,dark_Progress:sD,dark_Slider:sD,dark_TextArea:sD,dark_black_Input:sD,dark_black_Progress:sD,dark_black_Slider:sD,dark_black_TextArea:sD,dark_surface2:cD,dark_black_surface2:cD,dark_Button:cD,dark_SliderThumb:cD,dark_Switch:cD,dark_black_Button:cD,dark_black_SliderThumb:cD,dark_black_Switch:cD,light_black_accent:lD,light_black_Tooltip:lD,light_black_SwitchThumb:lD,light_black_surface1:uD,light_black_Input:uD,light_black_Progress:uD,light_black_Slider:uD,light_black_TextArea:uD,light_black_surface2:dD,light_black_Button:dD,light_black_SliderThumb:dD,light_black_Switch:dD,light_white_accent:fD,light_Tooltip:fD,light_SwitchThumb:fD,light_white_Tooltip:fD,light_white_SwitchThumb:fD,light_gray_accent:pD,light_gray_Tooltip:pD,light_gray_SwitchThumb:pD,light_gray_surface1:mD,light_gray_Input:mD,light_gray_Progress:mD,light_gray_Slider:mD,light_gray_TextArea:mD,light_gray_surface2:hD,light_gray_Button:hD,light_gray_SliderThumb:hD,light_gray_Switch:hD,light_blue_accent:gD,light_blue_Tooltip:gD,light_blue_SwitchThumb:gD,light_blue_surface1:_D,light_blue_Input:_D,light_blue_Progress:_D,light_blue_Slider:_D,light_blue_TextArea:_D,light_blue_surface2:vD,light_blue_Button:vD,light_blue_SliderThumb:vD,light_blue_Switch:vD,light_red_accent:yD,light_red_Tooltip:yD,light_red_SwitchThumb:yD,light_red_surface1:bD,light_red_Input:bD,light_red_Progress:bD,light_red_Slider:bD,light_red_TextArea:bD,light_red_surface2:xD,light_red_Button:xD,light_red_SliderThumb:xD,light_red_Switch:xD,light_yellow_accent:SD,light_yellow_Tooltip:SD,light_yellow_SwitchThumb:SD,light_yellow_surface1:CD,light_yellow_Input:CD,light_yellow_Progress:CD,light_yellow_Slider:CD,light_yellow_TextArea:CD,light_yellow_surface2:wD,light_yellow_Button:wD,light_yellow_SliderThumb:wD,light_yellow_Switch:wD,light_green_accent:TD,light_green_Tooltip:TD,light_green_SwitchThumb:TD,light_green_surface1:ED,light_green_Input:ED,light_green_Progress:ED,light_green_Slider:ED,light_green_TextArea:ED,light_green_surface2:DD,light_green_Button:DD,light_green_SliderThumb:DD,light_green_Switch:DD,light_orange_accent:OD,light_orange_Tooltip:OD,light_orange_SwitchThumb:OD,light_orange_surface1:kD,light_orange_Input:kD,light_orange_Progress:kD,light_orange_Slider:kD,light_orange_TextArea:kD,light_orange_surface2:AD,light_orange_Button:AD,light_orange_SliderThumb:AD,light_orange_Switch:AD,light_pink_accent:jD,light_pink_Tooltip:jD,light_pink_SwitchThumb:jD,light_pink_surface1:MD,light_pink_Input:MD,light_pink_Progress:MD,light_pink_Slider:MD,light_pink_TextArea:MD,light_pink_surface2:ND,light_pink_Button:ND,light_pink_SliderThumb:ND,light_pink_Switch:ND,light_purple_accent:PD,light_purple_Tooltip:PD,light_purple_SwitchThumb:PD,light_purple_surface1:FD,light_purple_Input:FD,light_purple_Progress:FD,light_purple_Slider:FD,light_purple_TextArea:FD,light_purple_surface2:ID,light_purple_Button:ID,light_purple_SliderThumb:ID,light_purple_Switch:ID,light_teal_accent:LD,light_teal_Tooltip:LD,light_teal_SwitchThumb:LD,light_teal_surface1:RD,light_teal_Input:RD,light_teal_Progress:RD,light_teal_Slider:RD,light_teal_TextArea:RD,light_teal_surface2:zD,light_teal_Button:zD,light_teal_SliderThumb:zD,light_teal_Switch:zD,light_neutral_accent:BD,light_neutral_Tooltip:BD,light_neutral_SwitchThumb:BD,light_neutral_surface1:VD,light_neutral_Input:VD,light_neutral_Progress:VD,light_neutral_Slider:VD,light_neutral_TextArea:VD,light_neutral_surface2:HD,light_neutral_Button:HD,light_neutral_SliderThumb:HD,light_neutral_Switch:HD,dark_black_accent:UD,dark_Tooltip:UD,dark_SwitchThumb:UD,dark_black_Tooltip:UD,dark_black_SwitchThumb:UD,dark_white_accent:WD,dark_white_Tooltip:WD,dark_white_SwitchThumb:WD,dark_white_surface1:GD,dark_white_Input:GD,dark_white_Progress:GD,dark_white_Slider:GD,dark_white_TextArea:GD,dark_white_surface2:KD,dark_white_Button:KD,dark_white_SliderThumb:KD,dark_white_Switch:KD,dark_gray_accent:qD,dark_gray_Tooltip:qD,dark_gray_SwitchThumb:qD,dark_gray_surface1:JD,dark_gray_Input:JD,dark_gray_Progress:JD,dark_gray_Slider:JD,dark_gray_TextArea:JD,dark_gray_surface2:YD,dark_gray_Button:YD,dark_gray_SliderThumb:YD,dark_gray_Switch:YD,dark_blue_accent:XD,dark_blue_Tooltip:XD,dark_blue_SwitchThumb:XD,dark_blue_surface1:ZD,dark_blue_Input:ZD,dark_blue_Progress:ZD,dark_blue_Slider:ZD,dark_blue_TextArea:ZD,dark_blue_surface2:QD,dark_blue_Button:QD,dark_blue_SliderThumb:QD,dark_blue_Switch:QD,dark_red_accent:$D,dark_red_Tooltip:$D,dark_red_SwitchThumb:$D,dark_red_surface1:eO,dark_red_Input:eO,dark_red_Progress:eO,dark_red_Slider:eO,dark_red_TextArea:eO,dark_red_surface2:tO,dark_red_Button:tO,dark_red_SliderThumb:tO,dark_red_Switch:tO,dark_yellow_accent:nO,dark_yellow_Tooltip:nO,dark_yellow_SwitchThumb:nO,dark_yellow_surface1:rO,dark_yellow_Input:rO,dark_yellow_Progress:rO,dark_yellow_Slider:rO,dark_yellow_TextArea:rO,dark_yellow_surface2:iO,dark_yellow_Button:iO,dark_yellow_SliderThumb:iO,dark_yellow_Switch:iO,dark_green_accent:aO,dark_green_Tooltip:aO,dark_green_SwitchThumb:aO,dark_green_surface1:oO,dark_green_Input:oO,dark_green_Progress:oO,dark_green_Slider:oO,dark_green_TextArea:oO,dark_green_surface2:sO,dark_green_Button:sO,dark_green_SliderThumb:sO,dark_green_Switch:sO,dark_orange_accent:cO,dark_orange_Tooltip:cO,dark_orange_SwitchThumb:cO,dark_orange_surface1:lO,dark_orange_Input:lO,dark_orange_Progress:lO,dark_orange_Slider:lO,dark_orange_TextArea:lO,dark_orange_surface2:uO,dark_orange_Button:uO,dark_orange_SliderThumb:uO,dark_orange_Switch:uO,dark_pink_accent:dO,dark_pink_Tooltip:dO,dark_pink_SwitchThumb:dO,dark_pink_surface1:fO,dark_pink_Input:fO,dark_pink_Progress:fO,dark_pink_Slider:fO,dark_pink_TextArea:fO,dark_pink_surface2:pO,dark_pink_Button:pO,dark_pink_SliderThumb:pO,dark_pink_Switch:pO,dark_purple_accent:mO,dark_purple_Tooltip:mO,dark_purple_SwitchThumb:mO,dark_purple_surface1:hO,dark_purple_Input:hO,dark_purple_Progress:hO,dark_purple_Slider:hO,dark_purple_TextArea:hO,dark_purple_surface2:gO,dark_purple_Button:gO,dark_purple_SliderThumb:gO,dark_purple_Switch:gO,dark_teal_accent:_O,dark_teal_Tooltip:_O,dark_teal_SwitchThumb:_O,dark_teal_surface1:vO,dark_teal_Input:vO,dark_teal_Progress:vO,dark_teal_Slider:vO,dark_teal_TextArea:vO,dark_teal_surface2:yO,dark_teal_Button:yO,dark_teal_SliderThumb:yO,dark_teal_Switch:yO,dark_neutral_accent:bO,dark_neutral_Tooltip:bO,dark_neutral_SwitchThumb:bO,dark_neutral_surface1:xO,dark_neutral_Input:xO,dark_neutral_Progress:xO,dark_neutral_Slider:xO,dark_neutral_TextArea:xO,dark_neutral_surface2:SO,dark_neutral_Button:SO,dark_neutral_SliderThumb:SO,dark_neutral_Switch:SO,light_ProgressIndicator:CO,light_SliderActive:CO,light_white_ProgressIndicator:CO,light_white_SliderActive:CO,dark_ProgressIndicator:wO,dark_SliderActive:wO,dark_black_ProgressIndicator:wO,dark_black_SliderActive:wO,light_black_ProgressIndicator:TO,light_black_SliderActive:TO,light_gray_ProgressIndicator:EO,light_gray_SliderActive:EO,light_blue_ProgressIndicator:DO,light_blue_SliderActive:DO,light_red_ProgressIndicator:OO,light_red_SliderActive:OO,light_yellow_ProgressIndicator:kO,light_yellow_SliderActive:kO,light_green_ProgressIndicator:AO,light_green_SliderActive:AO,light_orange_ProgressIndicator:jO,light_orange_SliderActive:jO,light_pink_ProgressIndicator:MO,light_pink_SliderActive:MO,light_purple_ProgressIndicator:NO,light_purple_SliderActive:NO,light_teal_ProgressIndicator:PO,light_teal_SliderActive:PO,light_neutral_ProgressIndicator:FO,light_neutral_SliderActive:FO,dark_white_ProgressIndicator:IO,dark_white_SliderActive:IO,dark_gray_ProgressIndicator:LO,dark_gray_SliderActive:LO,dark_blue_ProgressIndicator:RO,dark_blue_SliderActive:RO,dark_red_ProgressIndicator:zO,dark_red_SliderActive:zO,dark_yellow_ProgressIndicator:BO,dark_yellow_SliderActive:BO,dark_green_ProgressIndicator:VO,dark_green_SliderActive:VO,dark_orange_ProgressIndicator:HO,dark_orange_SliderActive:HO,dark_pink_ProgressIndicator:UO,dark_pink_SliderActive:UO,dark_purple_ProgressIndicator:WO,dark_purple_SliderActive:WO,dark_teal_ProgressIndicator:GO,dark_teal_SliderActive:GO,dark_neutral_ProgressIndicator:KO,dark_neutral_SliderActive:KO};function JO(e){return e===0?0:e===2?.5:e===4?1:e===8?1.5:e<=16?Math.round(e*.333):Math.floor(e*.7-12)}var YO={$0:0,"$0.25":2,"$0.5":4,"$0.75":8,$1:20,"$1.5":24,$2:28,"$2.5":32,$3:36,"$3.5":40,$4:44,$true:44,"$4.5":48,$5:52,$6:64,$7:74,$8:84,$9:94,$10:104,$11:124,$12:144,$13:164,$14:184,$15:204,$16:224,$17:224,$18:244,$19:264,$20:284},XO=Object.entries(YO).map(([e,t])=>[e,JO(t)]),ZO=XO.slice(1).map(([e,t])=>[`-${e.slice(1)}`,-t]),QO={radius:{0:0,1:3,2:5,3:7,4:9,true:9,5:10,6:16,7:19,8:22,9:26,10:34,11:42,12:50},zIndex:{0:0,1:100,2:200,3:300,4:400,5:500},space:{...Object.fromEntries(XO),...Object.fromEntries(ZO)},size:YO},$O=ek({text:`textAlign`,b:`bottom`,bg:`backgroundColor`,content:`alignContent`,grow:`flexGrow`,items:`alignItems`,justify:`justifyContent`,l:`left`,m:`margin`,maxH:`maxHeight`,maxW:`maxWidth`,mb:`marginBottom`,minH:`minHeight`,minW:`minWidth`,ml:`marginLeft`,mr:`marginRight`,mt:`marginTop`,mx:`marginHorizontal`,my:`marginVertical`,p:`padding`,pb:`paddingBottom`,pl:`paddingLeft`,pr:`paddingRight`,pt:`paddingTop`,px:`paddingHorizontal`,py:`paddingVertical`,r:`right`,rounded:`borderRadius`,select:`userSelect`,self:`alignSelf`,shrink:`flexShrink`,t:`top`,z:`zIndex`});function ek(e){return e}var tk=`Zen Mono`,nk=`Zen Pixel Square`,rk=`"Zen", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif`,ik=`"${tk}", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace`;`${nk}${tk}`;var ak=rk,ok=ik,sk={1:12,2:13,3:14,4:15,true:15,5:16,6:18,7:22,8:26,9:30,10:40,11:46,12:52,13:60,14:70,15:85,16:100},ck=e=>{let t=1.5-Math.max(0,(e-20)*.004);return Math.round(e*t)},lk=({font:e={},sizeLineHeight:t=ck,sizeSize:n=e=>Math.round(e)}={})=>{let r=Object.fromEntries(Object.entries({...sk,...e.size}).map(([e,t])=>[e,n(+t)]));return Di({family:`-apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif`,lineHeight:Object.fromEntries(Object.entries(r).map(([e,n])=>[e,t(ot(n))])),weight:{1:`400`},letterSpacing:{4:0},...e,size:r})},uk=e=>Math.round(e*1.12+5),dk=ak,fk=ok,pk={body:lk({font:{family:dk}}),heading:lk({font:{family:dk,weight:{0:`600`,6:`700`,9:`800`}},sizeLineHeight:uk}),mono:lk({font:{family:fk}})},mk={100:100,200:200,xxxs:260,xxs:340,xs:460,sm:640,md:768,lg:1024,xl:1280,xxl:1536},hk=.02,gk={media:{touchable:{pointer:`coarse`},hoverable:{hover:`hover`},"max-xxl":{maxWidth:mk.xxl-hk},"max-xl":{maxWidth:mk.xl-hk},"max-lg":{maxWidth:mk.lg-hk},"max-md":{maxWidth:mk.md-hk},"max-sm":{maxWidth:mk.sm-hk},"max-xs":{maxWidth:mk.xs-hk},"max-xxs":{maxWidth:mk.xxs-hk},"max-xxxs":{maxWidth:mk.xxxs-hk},"max-200":{maxWidth:mk[200]-hk},"max-100":{maxWidth:mk[100]-hk},xxxs:{minWidth:mk.xxxs},xxs:{minWidth:mk.xxs},xs:{minWidth:mk.xs},sm:{minWidth:mk.sm},md:{minWidth:mk.md},lg:{minWidth:mk.lg},xl:{minWidth:mk.xl},xxl:{minWidth:mk.xxl},"max-height-lg":{maxHeight:mk.lg-hk},"max-height-md":{maxHeight:mk.md-hk},"max-height-sm":{maxHeight:mk.sm-hk},"max-height-xs":{maxHeight:mk.xs-hk},"max-height-xxs":{maxHeight:mk.xxs-hk},"max-height-xxxs":{maxHeight:mk.xxxs-hk},"max-height-200":{maxHeight:mk[200]-hk},"max-height-100":{maxHeight:mk[100]-hk},"height-sm":{minHeight:mk.sm},"height-md":{minHeight:mk.md},"height-lg":{minHeight:mk.lg}},shorthands:$O,themes:qO,tokens:QO,fonts:pk,selectionStyles:e=>e.color5?{backgroundColor:e.color5,color:e.color11}:null,settings:{mediaQueryDefaultActive:{touchable:!1,hoverable:!0,"max-xxl":!0,"max-xl":!0,"max-lg":!0,"max-md":!0,"max-sm":!0,"max-xs":!0,"max-xxs":!1,"max-xxxs":!1,xxxs:!0,xxs:!0,xs:!0,sm:!1,md:!1,lg:!1,xl:!1,xxl:!1,"max-height-sm":!1,"max-height-md":!1,"max-height-lg":!0,"height-sm":!0,"height-md":!0,"height-lg":!1},defaultFont:`body`,fastSchemeChange:!0,shouldAddPrefersColorThemes:!0,allowedStyleValues:`somewhat-strict-web`,addThemeClassName:`html`,onlyAllowShorthands:!0,styleCompat:`web`}},_k=new Set([`stiffness`,`damping`,`mass`,`tension`,`friction`,`velocity`,`overshootClamping`,`duration`,`bounciness`,`speed`]);function vk(e){return _k.has(e)}function yk(e){if(!e)return{default:null,enter:null,exit:null,delay:void 0,properties:{}};if(typeof e==`string`)return{default:e,enter:null,exit:null,delay:void 0,properties:{}};if(Array.isArray(e)){let[t,n]=e,r={},i={},a,o=null,s=null;if(n&&typeof n==`object`)for(let[e,t]of Object.entries(n))e===`delay`&&typeof t==`number`?a=t:e===`enter`&&typeof t==`string`?o=t:e===`exit`&&typeof t==`string`?s=t:vk(e)&&t!==void 0?Object.assign(i,{[e]:t}):t!==void 0&&(r[e]=t);return{default:t,enter:o,exit:s,delay:a,properties:r,config:Object.keys(i).length>0?i:void 0}}if(typeof e==`object`){let t={},n={},r=null,i=null,a=null,o;for(let[s,c]of Object.entries(e))s==="default"&&typeof c==`string`?r=c:s===`enter`&&typeof c==`string`?i=c:s===`exit`&&typeof c==`string`?a=c:s===`delay`&&typeof c==`number`?o=c:vk(s)&&c!==void 0?Object.assign(n,{[s]:c}):c!==void 0&&(t[s]=c);return{default:r,enter:i,exit:a,delay:o,properties:t,config:Object.keys(n).length>0?n:void 0}}return{default:null,enter:null,exit:null,delay:void 0,properties:{}}}function bk(e){return e.default!==null||e.enter!==null||e.exit!==null||Object.keys(e.properties).length>0}function xk(e){return Object.keys(e.properties)}function Sk(e,t){return t===`enter`&&e.enter?e.enter:t===`exit`&&e.exit?e.exit:e.default}function Ck(e,t,n,r){let i=new Map;for(let a of n){let n=e.properties[a],o=null;typeof n==`string`?o=t[n]??null:n&&typeof n==`object`&&n.type&&(o=t[n.type]??null),o===null&&(o=r),i.set(a,o)}return i}var wk=/(\d+(?:\.\d+)?)\s*ms/,Tk=/(\d+(?:\.\d+)?)\s*s/;function Ek(e){let t=e.match(wk);if(t)return Number.parseInt(t[1],10);let n=e.match(Tk);return n?Math.round(Number.parseFloat(n[1])*1e3):300}var Dk=/(\d+(?:\.\d+)?)\s*ms/,Ok=/(\d+(?:\.\d+)?)\s*s(?!tiffness)/;function kk(e,t){let n=e.replace(Dk,`${t}ms`);if(n!==e)return n;let r=e.replace(Ok,`${t}ms`);return r===e?`${t}ms ${e}`:r}var Ak=[`x`,`y`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skewX`,`skewY`];function jk(e){if(!e)return``;let t=[];if(e.x!==void 0||e.y!==void 0){let n=e.x??0,r=e.y??0;t.push(`translate(${n}px, ${r}px)`)}if(e.scale!==void 0&&t.push(`scale(${e.scale})`),e.scaleX!==void 0&&t.push(`scaleX(${e.scaleX})`),e.scaleY!==void 0&&t.push(`scaleY(${e.scaleY})`),e.rotate!==void 0){let n=e.rotate,r=typeof n==`string`&&n.includes(`deg`)?``:`deg`;t.push(`rotate(${n}${r})`)}return e.rotateX!==void 0&&t.push(`rotateX(${e.rotateX}deg)`),e.rotateY!==void 0&&t.push(`rotateY(${e.rotateY}deg)`),e.rotateZ!==void 0&&t.push(`rotateZ(${e.rotateZ}deg)`),e.skewX!==void 0&&t.push(`skewX(${e.skewX}deg)`),e.skewY!==void 0&&t.push(`skewY(${e.skewY}deg)`),t.join(` `)}function Mk(e,t){if(!t)return;let n=jk(t);n&&(e.style.transform=n);for(let[n,r]of Object.entries(t))Ak.includes(n)||r!==void 0&&(n===`opacity`?e.style.opacity=String(r):n===`backgroundColor`?e.style.backgroundColor=String(r):n===`color`?e.style.color=String(r):e.style[n]=typeof r==`number`?`${r}px`:String(r))}function Nk(e){let t=new WeakMap;return{animations:e,usePresence:zi,ResetPresence:Ri,inputStyle:`css`,outputStyle:`css`,useAnimatedNumber(e){let[n,r]=V.useState(e),i=V.useRef(null);return{getInstance(){return r},getValue(){return n},setValue(e,n,a){if(r(e),i.current&&=(clearTimeout(i.current),null),a){if(!n||n.type===`direct`||n.type===`timing`&&n.duration===0)a();else{let e=n.type===`timing`?n.duration:300;i.current=setTimeout(a,e)}}let o=t.get(r);o&&o.forEach(t=>t(e))},stop(){i.current&&=(clearTimeout(i.current),null)}}},useAnimatedNumberReaction({value:e},n){V.useEffect(()=>{let r=e.getInstance(),i=t.get(r);if(!i){let e=new Set;t.set(r,e),i=e}return i.add(n),()=>{i?.delete(n)}},[])},useAnimatedNumberStyle(e,t){return t(e.getValue())},useAnimatedNumbersStyle(e,t){return t(...e.map(e=>e.getValue()))},useAnimations:({props:t,presence:n,style:r,componentState:i,stateRef:a,styleState:o})=>{let s=i.unmounted===!0,c=!!i.unmounted,l=n?.[0]===!1,u=n?.[1],d=V.useRef(c),f=d.current&&!c;V.useEffect(()=>{d.current=c});let p=V.useRef(0),m=V.useRef(!1),h=V.useRef(!1),g=V.useRef(!1),_=V.useRef(u),v=V.useRef({});_.current=u;let y=l&&!h.current,b=!l&&h.current;y&&(p.current++,m.current=!1),b&&(p.current++,g.current=!0),V.useEffect(()=>{h.current=l}),Fe(()=>{let e=a.current.host;if(l||!e)return;let t=getComputedStyle(e);v.current={opacity:t.opacity}});let x=yk(o?.effectiveTransition??t.transition),S=Sk(x,l?`exit`:c||f?`enter`:`default`),C=S?e[S]:null,w=xk(x),T=x.default!==null||x.enter!==null||x.exit!==null,E=w.length>0,D;if(D=t.animateOnly?t.animateOnly:E&&!T?w:E&&T?[`all`,...w]:[`all`],Fe(()=>{let n=a.current.host;if(!u||!l||!n)return;let i=n,o=p.current,s=()=>{o===p.current&&(m.current||(m.current=!0,_.current?.()))};if(D.length===0){s();return}let c,d=g.current,f=d,h=t.enterStyle,y=t.exitStyle,b=x.delay?` ${x.delay}ms`:``,S=x.config?.duration,w=D.map(t=>{let n=x.properties[t],r=null;return typeof n==`string`?r=e[n]:n&&typeof n==`object`&&n.type?r=e[n.type]:C&&(r=C),r&&S&&(r=kk(r,S)),r?`${t} ${r}${b}`:null}).filter(Boolean).join(`, `),T=e=>e===`opacity`?r?.opacity??t.opacity??v.current.opacity??1:Ak.includes(e)?+(e===`scale`||e===`scaleX`||e===`scaleY`):h?.[e];if(d){if(g.current=!1,i.style.transition=`none`,y){let e={};for(let t of Object.keys(y)){let n=T(t);n!==void 0&&(e[t]=n)}Mk(i,e)}else i.style.opacity=`1`,i.style.transform=`none`;i.offsetHeight}else if(y){f=!0,i.style.transition=`none`;let e={};for(let t of Object.keys(y)){let n=T(t);n!==void 0&&(e[t]=n)}Mk(i,e),i.offsetHeight,c=requestAnimationFrame(()=>{o===p.current&&(i.style.transition=w,i.offsetHeight,Mk(i,y),f=!1)})}let E=C?Ek(C):200,O=Ck(x,e,D,C);for(let e of O.values())if(e){let t=Ek(e);t>E&&(E=t)}let k=x.delay??0,A=E+k,j=setTimeout(()=>{s()},A),M=new Set(D),ee=0,N=e=>{if(e.target!==i)return;let t=e.propertyName;(M.has(t)||t===`all`)&&(ee++,ee>=M.size&&(clearTimeout(j),s()))},te=()=>{f||(clearTimeout(j),s())};return i.addEventListener(`transitionend`,N),i.addEventListener(`transitioncancel`,te),d&&(c=requestAnimationFrame(()=>{o===p.current&&(i.style.transition=w,i.offsetHeight,Mk(i,y),f=!1)})),()=>{clearTimeout(j),c!==void 0&&cancelAnimationFrame(c),i.removeEventListener(`transitionend`,N),i.removeEventListener(`transitioncancel`,te),i.style.transition=``}},[l]),s||!bk(x))return null;Array.isArray(r.transform)&&(r.transform=ke(r.transform));let O=x.delay?` ${x.delay}ms`:``,k=x.config?.duration;return r.transition=D.map(t=>{let n=x.properties[t],r=null;return typeof n==`string`?r=e[n]:n&&typeof n==`object`&&n.type?r=e[n.type]:C&&(r=C),r&&k&&(r=kk(r,k)),r?`${t} ${r}${O}`:null}).filter(Boolean).join(`, `),{style:r,className:c?`t_unmounted`:``}}}}var Pk={dark:{ground:`var(--neutral-900)`,line:`var(--neutral-800)`,dim:`var(--neutral-400)`,ink:`var(--neutral-300)`,bright:`var(--neutral-50)`},light:{ground:`var(--neutral-100)`,line:`var(--neutral-200)`,dim:`var(--neutral-600)`,ink:`var(--neutral-700)`,bright:`var(--neutral-950)`}},Fk={key:`ink`,string:`bright`,number:`bright`,boolean:`bright`,null:`bright`,punctuation:`dim`,comment:`dim`,keyword:`bright`},Ik=e=>Object.fromEntries(Object.entries(Fk).map(([t,n])=>[t,Pk[e][n]])),Lk={dark:Ik(`dark`),light:Ik(`light`)},Rk={comment:{fontStyle:`italic`},keyword:{fontWeight:`700`},boolean:{fontWeight:`700`},null:{fontWeight:`700`}},zk=e=>`code${e[0].toUpperCase()}${e.slice(1)}`;function Bk(e){let t=t=>`var(--${zk(t)}, ${Pk[e][t]})`,n=t=>{let n=Rk[t],r=n?.fontStyle??(n?.fontWeight?`bold`:void 0);return{foreground:`var(--${zk(t)}, ${Lk[e][t]})`,...r?{fontStyle:r}:null}};return{name:`mono-${e}`,type:e,fg:t(`ink`),bg:t(`ground`),colors:{"editor.selectionBackground":t(`line`),"editor.lineHighlightBackground":t(`line`)},tokenColors:[{settings:{foreground:t(`ink`)}},{scope:[`comment`,`punctuation.definition.comment`,`string.quoted.docstring`],settings:n(`comment`)},{scope:[`punctuation`,`meta.brace`,`constant.character.escape.line-continuation`],settings:n(`punctuation`)},{scope:[`string`,`markup.inline.raw`],settings:n(`string`)},{scope:`constant.numeric`,settings:n(`number`)},{scope:[`constant.language`,`constant.language.boolean`],settings:n(`boolean`)},{scope:[`constant.language.null`,`constant.language.undefined`],settings:n(`null`)},{scope:[`constant`,`support.constant`,`entity.name.function`,`entity.name.command`,`support.function`,`entity.name.tag`],settings:{foreground:t(`bright`)}},{scope:[`string.unquoted`,`support.type.property-name`,`meta.object-literal.key`],settings:n(`key`)},{scope:[`keyword`,`storage`],settings:n(`keyword`)},{scope:[`keyword.operator`,`punctuation.accessor`],settings:{foreground:t(`ink`),fontStyle:``}},{scope:[`markup.heading`,`markup.bold`],settings:{foreground:t(`bright`),fontStyle:`bold`}},{scope:`markup.italic`,settings:{fontStyle:`italic`}},{scope:`markup.underline.link`,settings:{fontStyle:`underline`}},{scope:`markup.inserted`,settings:{foreground:t(`bright`)}},{scope:`markup.deleted`,settings:{foreground:t(`dim`)}}]}}Bk(`dark`),Bk(`light`);var Vk=[`dim`,`ink`,`bright`,...Object.keys(Fk)];Object.fromEntries(Vk.map(e=>{let t=e in Fk?Fk[e]:e;return[e,{key:zk(e),light:Pk.light[t],dark:Pk.dark[t]}]}));var Hk=`var(--font-sans, 'Zen', system-ui, -apple-system, sans-serif)`,Uk=`var(--font-mono, 'Zen Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace)`,Wk=`var(--font-serif, Georgia, serif)`,Gk={1:`var(--text-xs, 12px)`,2:`var(--text-sm, 13px)`,3:`var(--text-base, 14px)`,4:`var(--text-lg, 15px)`,5:`var(--text-lg, 15px)`,6:`var(--text-xl, 17px)`,7:`var(--text-2xl, 21px)`,8:`var(--text-3xl, 26px)`,9:`var(--text-3xl, 26px)`,10:`var(--text-4xl, 32px)`,11:`var(--text-5xl, 40px)`,12:`calc(var(--text-5xl, 40px) + (var(--text-7xl, 64px) - var(--text-5xl, 40px)) / 3)`,13:`calc(var(--text-5xl, 40px) + 2 * (var(--text-7xl, 64px) - var(--text-5xl, 40px)) / 3)`,14:`var(--text-7xl, 64px)`,15:`calc(var(--text-7xl, 64px) + 4 * (var(--text-8xl, 84px) - var(--text-7xl, 64px)) / 5)`,16:`calc(var(--text-8xl, 84px) + 3 * (var(--text-9xl, 112px) - var(--text-8xl, 84px)) / 7)`,true:`var(--text-base, 14px)`},Kk={1:`calc(16px * var(--type-scale, 1) * var(--leading-lang, 1))`,2:`calc(18px * var(--type-scale, 1) * var(--leading-lang, 1))`,3:`calc(20px * var(--type-scale, 1) * var(--leading-lang, 1))`,4:`calc(22px * var(--type-scale, 1) * var(--leading-lang, 1))`,5:`calc(22px * var(--type-scale, 1) * var(--leading-lang, 1))`,6:`calc(24px * var(--type-scale, 1) * var(--leading-lang, 1))`,7:`calc(22px * var(--type-scale, 1) * var(--leading-lang, 1))`,8:`calc(28px * var(--type-scale, 1) * var(--leading-lang, 1))`,9:`calc(28px * var(--type-scale, 1) * var(--leading-lang, 1))`,10:`calc(34px * var(--type-scale, 1) * var(--leading-lang, 1))`,11:`calc(42px * var(--type-scale, 1) * var(--leading-lang, 1))`,12:`calc(50px * var(--type-scale, 1) * var(--leading-lang, 1))`,13:`calc(58px * var(--type-scale, 1) * var(--leading-lang, 1))`,14:`calc(66px * var(--type-scale, 1) * var(--leading-lang, 1))`,15:`calc(82px * var(--type-scale, 1) * var(--leading-lang, 1))`,16:`calc(98px * var(--type-scale, 1) * var(--leading-lang, 1))`,true:`calc(20px * var(--type-scale, 1) * var(--leading-lang, 1))`},qk={1:0,2:0,3:0,4:0,5:0,6:0,7:`-0.025em`,8:`-0.025em`,9:`-0.025em`,10:`-0.025em`,11:`-0.025em`,12:`-0.025em`,13:`-0.025em`,14:`-0.025em`,15:`-0.025em`,16:`-0.025em`,true:0},mee={"2xs":2,xs:4,0:0,1:6,2:6,3:8,4:8,5:12,6:12,7:12,8:12,9:12,10:9999,11:9999,12:9999,true:8},Jk={0:0,"0.25":1,"0.5":2,"0.75":3,1:4,"1.5":6,2:8,"2.5":10,3:12,"3.5":14,4:16,"4.5":20,5:24,6:32,7:40,8:48,9:56,10:64,11:80,12:96,13:112,14:128,15:144,16:160,17:160,18:176,19:192,20:208},Yk=e=>e===0?0:`calc(${e}px * var(--density, 1))`,hee=e=>e===0||e>=9999?e:`calc(${e}px * var(--radius-scale, 1))`,gee=Object.fromEntries(Object.entries(mee).map(([e,t])=>[e,hee(t)])),Xk={};for(let[e,t]of Object.entries(Jk))Xk[`$${e}`]=Yk(t),Xk[`-${e}`]=Yk(-t);Xk.$true=Yk(Jk[4]),Xk[`-true`]=Yk(-Jk[4]);var Zk={dark:`rgb(255 255 255 / .10)`,light:`rgb(0 0 0 / .10)`},Qk={dark:`#e5e5e5`,light:`#0a0a0a`},_ee={dark:`rgb(255 255 255 / .40)`,light:`rgb(0 0 0 / .5)`},$k={bad:`var(--state-error, #ef4444)`,good:`var(--state-success, #22c55e)`},eA={dark:{aside:`rgb(255 255 255 / .78)`,hint:`rgb(255 255 255 / .55)`,hush:`rgb(255 255 255 / .3)`},light:{aside:`rgb(10 10 10 / .78)`,hint:`rgb(10 10 10 / .55)`,hush:`rgb(10 10 10 / .3)`}},vee=e=>Object.fromEntries(Object.entries({...Pk[e],...Lk[e]}).map(([e,t])=>[`code${e[0].toUpperCase()}${e.slice(1)}`,t])),tA={dark:{base:`rgb(255 255 255 / .03)`,hover:`rgb(255 255 255 / .06)`,raised:`rgb(255 255 255 / .12)`},light:{base:`rgb(0 0 0 / .03)`,hover:`rgb(0 0 0 / .06)`,raised:`rgb(0 0 0 / .12)`}},yee={dark:`#0a0a0a`,light:`#f7f7f7`},bee={dark:`#333333`,light:`#e0e0e0`},xee={dark:`rgb(229 229 229 / .6)`,light:`rgb(10 10 10 / .65)`},nA=e=>e.startsWith(`light`)?`light`:`dark`,rA=e=>`color4`in e,See=e=>e.split(`_`).slice(0,-1).join(`_`),iA=e=>{let t=gk.themes[e];return!t||e===nA(e)?`var(--border, ${Zk[nA(e)]})`:rA(t)?String(t.borderColor):iA(See(e))},aA=Object.fromEntries(Object.entries(gk.themes).map(([e,t])=>{let n=nA(e),r={...t,outlineColor:`var(--ring, ${_ee[n]})`,...rA(t)?{}:{borderColor:iA(e)}};return[e,e===n?{...r,color2:`var(--surface-1, ${tA[n].base})`,color3:`var(--surface-2, ${tA[n].hover})`,color4:`var(--border, ${Zk[n]})`,color5:`var(--surface-3, ${tA[n].raised})`,borderColor:`var(--border, ${Zk[n]})`,color12:`var(--foreground, ${Qk[n]})`,sunken:String(t.color1),panel:`var(--surface-1, ${tA[n].base})`,hover:`var(--surface-2, ${tA[n].hover})`,edge:`var(--border, ${Zk[n]})`,raised:`var(--surface-3, ${tA[n].raised})`,rim:String(t.color6),bound:String(t.color7),dim:String(t.color8),faint:String(t.color9),soft:String(t.color10),quiet:String(t.color11),ink:`var(--foreground, ${Qk[n]})`,aside:`var(--text-secondary, ${eA[n].aside})`,hint:`var(--text-tertiary, ${eA[n].hint})`,hush:`var(--text-disabled, ${eA[n].hush})`,bad:$k.bad,good:$k.good,background:yee[n],color:`var(--foreground, ${Qk[n]})`,placeholderColor:`var(--text-placeholder, ${xee[n]})`,accentBackground:`var(--accent, ${tA[n].raised})`,accentColor:`var(--accent-foreground, ${Qk[n]})`,accentHover:`var(--accent-hover, ${bee[n]})`,...vee(n)}:r]})),oA=e=>e,sA=`var(--ease-out, cubic-bezier(0.215, 0.61, 0.355, 1))`,cA={animations:Nk({default:`${sA} var(--duration-base, 300ms)`,"75ms":`${sA} 75ms`,"100ms":`${sA} 100ms`,"200ms":`${sA} 200ms`,quickest:`${sA} var(--duration-fast, 150ms)`,quicker:`${sA} var(--duration-base, 300ms)`,quick:`${sA} var(--duration-slow, 400ms)`,medium:`${sA} 300ms`,slow:`${sA} 500ms`,bouncy:`${sA} 200ms`,lazy:`${sA} 1000ms`,tooltip:`${sA} 400ms`}),...gk,settings:{...gk.settings,shouldAddPrefersColorThemes:!1},tokens:{...gk.tokens,radius:gee,space:Xk},fonts:{...gk.fonts,body:{...gk.fonts.body,family:Hk,size:oA(Gk),lineHeight:oA(Kk),letterSpacing:oA(qk)},heading:{...gk.fonts.heading,family:Hk,size:oA(Gk),lineHeight:oA(Kk),letterSpacing:oA(qk)},mono:{...gk.fonts.body,family:Uk,size:oA(Gk),lineHeight:oA(Kk)},serif:{...gk.fonts.body,family:Wk,size:oA(Gk),lineHeight:oA(Kk),letterSpacing:oA(qk)}}},lA=ag({...cA,themes:aA}),uA=new Set([`blue`,`green`,`orange`,`pink`,`purple`,`red`,`teal`,`yellow`]),dA=e=>e.split(`_`).slice(1).some(e=>uA.has(e));ag({...cA,themes:Object.fromEntries(Object.entries(aA).filter(([e])=>!dA(e)))});var fA=Yb,pA={end:{t:0,b:0,insetInlineEnd:0,height:`100%`,width:`100%`,maxW:384,borderStartStartRadius:`$5`,borderEndStartRadius:`$5`,borderStartEndRadius:0,borderEndEndRadius:0},start:{t:0,b:0,insetInlineStart:0,height:`100%`,width:`100%`,maxW:384,borderStartEndRadius:`$5`,borderEndEndRadius:`$5`,borderStartStartRadius:0,borderEndStartRadius:0},right:{t:0,b:0,r:0,height:`100%`,width:`100%`,maxW:384,btlr:`$5`,bblr:`$5`,btrr:0,bbrr:0},left:{t:0,b:0,l:0,height:`100%`,width:`100%`,maxW:384,btrr:`$5`,bbrr:`$5`,btlr:0,bblr:0},top:{t:0,l:0,r:0,width:`100%`,maxW:`100%`,maxH:`80%`,bblr:`$5`,bbrr:`$5`,btlr:0,btrr:0},bottom:{b:0,l:0,r:0,width:`100%`,maxW:`100%`,maxH:`80%`,btlr:`$5`,btrr:`$5`,bblr:0,bbrr:0}},mA=({side:e=`end`,className:t,...n})=>(0,H.jsx)(Zb,{...hA(e),position:`fixed`,...pA[e],...Px(t),...n}),hA=e=>({"data-slot":`sheet-content`,"data-side":e}),gA={xs:13,s:16,m:24,l:32,xl:40},_A=`linear-gradient(90deg, transparent 0%, var(--glass, rgba(128, 128, 128, 0.08)) 50%, transparent 100%)`;function vA({size:e,layout:t=`inline`,animated:n=!0,className:r,...i}){let{props:a,rest:s}=Nx(r),c=e?gA[e]:t===`block`?`1em`:void 0;return(0,H.jsx)(F,{...W(`skeleton`),"aria-hidden":!0,"data-layout":t,"data-motion":n?`shimmer`:void 0,display:t===`inline`?`inline-flex`:`flex`,width:`100%`,...c===void 0?null:{height:c},rounded:`$xs`,bg:`$hover`,backgroundImage:n?_A:void 0,backgroundSize:`160px 100%`,backgroundRepeat:`no-repeat`,overflow:`hidden`,...a,...s?{className:s}:null,...i,children:t===`inline`&&c===void 0&&!(`height`in i)&&!(`height`in a)?(0,H.jsx)(o,{size:`$2`,"aria-hidden":!0,children:`‌`}):null})}var yA=(e,t)=>e==null?`${t}px`:typeof e==`number`?`${e}px`:e.startsWith(`$`)?`var(--space-${e.slice(1)}, ${t}px)`:e,bA=e=>typeof e==`object`&&!!e&&!Array.isArray(e),xA=e=>typeof e==`number`?`${e}px`:e,SA=e=>typeof e==`number`?`repeat(${e}, minmax(0, 1fr))`:Array.isArray(e)?e.map(xA).join(` `):e,CA=({min:e,max:t},n)=>`repeat(auto-fill, minmax(${t?`max(min(${e}px, 100%), calc((100% - ${t-1} * ${n}) / ${t}))`:`min(${e}px, 100%)`}, 1fr))`,wA=(e,t=`0px`)=>bA(e)?CA(e,t):SA(e),TA={fontFamily:`inherit`,fontWeight:`inherit`,letterSpacing:`inherit`,lineHeight:`inherit`},EA=e=>(typeof e==`function`||typeof e==`object`)&&e!==null&&`staticConfig`in e,DA=e=>{if(!(0,V.isValidElement)(e)||e.type===V.Fragment||EA(e.type))return e;let t=e,n=t.props.style;return Array.isArray(n)?(0,V.cloneElement)(t,{style:[{minWidth:0},...n]}):n&&typeof n==`object`&&`minWidth`in n?t:(0,V.cloneElement)(t,{style:{minWidth:0,...n}})},OA=({columns:e={min:240},rows:t,gap:n=`$3`,style:r,children:i,...a})=>{let o=yA(n,12);return(0,H.jsx)(et,{"data-slot":`grid`,display:`grid`,gridTemplateColumns:wA(e,o),...t===void 0?null:{gridTemplateRows:SA(t)},gap:o,shrink:1,minW:`auto`,minH:`auto`,style:{...TA,...r},...a,children:V.Children.map(i,DA)})},kA=e=>e===void 0?void 0:typeof e==`number`?`span ${e}`:e,AA=({col:e,row:t,style:n,...r})=>(0,H.jsx)(et,{"data-slot":`grid-cell`,...e===void 0?null:{gridColumn:kA(e)},...t===void 0?null:{gridRow:kA(t)},minW:0,shrink:1,style:{...TA,...n},...r}),jA=[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],MA=[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],NA=(e,t,n)=>new Date(e,t,n),PA=e=>`${e.getFullYear()}-${e.getMonth()+1}-${e.getDate()}`,FA=(e,t)=>!!e&&!!t&&PA(e)===PA(t),IA=e=>NA(e.getFullYear(),e.getMonth(),e.getDate()).getTime(),LA=(e,t)=>NA(e.getFullYear(),e.getMonth(),e.getDate()+t),RA=(e,t=0)=>NA(e.getFullYear(),e.getMonth()+t,1),zA=(e,t)=>{let n=NA(e.getFullYear(),e.getMonth()+t+1,0);return NA(n.getFullYear(),n.getMonth(),Math.min(e.getDate(),n.getDate()))},BA=(e,t,n)=>{let r=(e.getDay()-t+7)%7,i=NA(e.getFullYear(),e.getMonth()+1,0).getDate();return Array.from({length:Math.ceil((r+i)/7)*7},(t,a)=>{let o=a-r+1;return n||o>=1&&o<=i?NA(e.getFullYear(),e.getMonth(),o):null})},VA=(e,t)=>{if(e.mode===`multiple`)return(e.selected??[]).some(e=>FA(e,t));if(e.mode===`range`){let{from:n,to:r}=e.selected??{};return!!n&&(r?IA(n)<=IA(t)&&IA(t)<=IA(r):FA(n,t))}return FA(e.selected,t)},HA=(e,t)=>{let{from:n,to:r}=e??{};if(!n)return{from:t,to:t};if(!r)return IA(t)<IA(n)?{from:t,to:n}:{from:n,to:t};if(!(FA(n,t)&&FA(r,t)))return FA(n,t)?{from:n,to:t}:FA(r,t)?{from:t,to:t}:IA(t)<IA(n)?{from:t,to:r}:{from:n,to:t}},UA=(e,t)=>{if(e.mode===`multiple`){let n=e.selected??[];e.onSelect?.(n.some(e=>FA(e,t))?n.filter(e=>!FA(e,t)):[...n,t])}else e.mode===`range`?e.onSelect?.(HA(e.selected,t)):e.onSelect?.(FA(e.selected,t)?void 0:t)},WA=(e,t,n)=>{let r=(t.getDay()-n+7)%7;return e===`ArrowLeft`?LA(t,-1):e===`ArrowRight`?LA(t,1):e===`ArrowUp`?LA(t,-7):e===`ArrowDown`?LA(t,7):e===`Home`?LA(t,-r):e===`End`?LA(t,6-r):e===`PageUp`?zA(t,-1):e===`PageDown`?zA(t,1):void 0};function GA(e){let{t}=Ye(),{month:n,defaultMonth:r,onMonthChange:i,numberOfMonths:a=1,weekStartsOn:s=0,showOutsideDays:c=!0,disabled:l,initialFocus:u,className:d}=e,[f,p]=(0,V.useState)(()=>RA(r??new Date)),m=n?RA(n):f,h=Array.from({length:a},(e,t)=>RA(m,t)),g=h.map(e=>BA(e,s,c)),_=e=>!!e&&IA(e)>=IA(m)&&IA(e)<IA(RA(m,a)),v=e=>g.some(t=>t.some(t=>FA(t,e))),y=[...MA.slice(s),...MA.slice(0,s)].map(e=>t(e)),b=new Date,x=e.mode===`range`?e.selected??{}:{},[S,C]=(0,V.useState)(),w=e.mode===`multiple`?e.selected??[]:e.mode===`range`?[e.selected?.from]:[e.selected],T=S&&v(S)?S:w.find(_)??(_(b)?b:m),E=(0,V.useRef)(null),D=(0,V.useRef)(!!u);(0,V.useEffect)(()=>{let e=E.current;if(!D.current||typeof HTMLElement>`u`||!(e instanceof HTMLElement))return;D.current=!1;let t=`[data-date="${PA(T)}"]`;(e.querySelector(`${t}:not([data-outside])`)??e.querySelector(t))?.focus()});let O=e=>{let t=RA(m,e);p(t),i?.(t)},k=(e,t)=>{let n=WA(nS(e),t,s);n&&(e.preventDefault(),D.current=!0,C(n),v(n)||O(IA(n)<IA(m)?-1:1))};return(0,H.jsx)(P,{ref:E,...W(`calendar`),flexWrap:`wrap`,gap:`$4`,p:`$3`,...Px(d),children:h.map((n,r)=>(0,H.jsxs)(F,{...W(`calendar-month`),gap:`$4`,children:[(0,H.jsxs)(P,{...W(`calendar-caption`),items:`center`,justify:`space-between`,children:[(0,H.jsx)(F,{width:32,children:r===0&&(0,H.jsx)(kS,{...W(`calendar-nav-previous`),"aria-label":t(`Previous month`),variant:`outline`,size:`icon-sm`,onClick:()=>O(-1),children:(0,H.jsx)(_y,{...Zx,size:16})})}),(0,H.jsxs)(o,{...W(`calendar-caption-label`),size:`$3`,fontWeight:`500`,children:[t(jA[n.getMonth()]),` `,n.getFullYear()]}),(0,H.jsx)(F,{width:32,items:`flex-end`,children:r===h.length-1&&(0,H.jsx)(kS,{...W(`calendar-nav-next`),"aria-label":t(`Next month`),variant:`outline`,size:`icon-sm`,onClick:()=>O(1),children:(0,H.jsx)(vy,{...Zx,size:16})})})]}),(0,H.jsxs)(OA,{columns:7,gap:`$1`,children:[y.map(e=>(0,H.jsx)(AA,{style:{textAlign:`center`},children:(0,H.jsx)(o,{size:`$1`,color:`$quiet`,children:e})},e)),g[r].map((t,r)=>{if(!t)return(0,H.jsx)(AA,{},r);let i=t.getMonth()!==n.getMonth(),a=VA(e,t),o=FA(x.from,t),s=FA(x.to,t),c=a&&e.mode===`range`&&!o&&!s,u=FA(t,b);return(0,H.jsx)(AA,{children:(0,H.jsx)(kS,{...W(`calendar-day`),"data-date":PA(t),"data-today":u||void 0,"data-outside":i||void 0,"data-selected":a||void 0,"data-range-start":o||void 0,"data-range-end":s||void 0,"data-range-middle":c||void 0,"aria-selected":a,"aria-label":t.toDateString(),variant:a&&!c?`primary`:c||u?`secondary`:`ghost`,size:`icon`,width:`100%`,opacity:i?.5:1,disabled:!!l?.(t),tabIndex:FA(t,T)&&(!i||!_(T))?0:-1,onFocus:()=>C(t),onKeyDown:e=>k(e,t),onClick:()=>UA(e,t),children:t.getDate()})},r)})]})]},r))})}var KA=[],qA=[];(()=>{let e=`lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,1n,9,16,o,,x,1i,3,,i,,7,a,2,t,3,1k,,,7,2,2,2,3,9,,a,2,q,,2,3,1k,,,5,4,2,2,3,3,,u,2,3,,b,3,1k,,,8,,3,,3,k,2,m,6,,3,1k,,,7,2,2,2,3,7,3,a,2,u,,1n,5,3,3,,4,9,,14,5,1j,,,7,,3,,4,7,2,b,2,t,3,1k,,,7,,3,,4,7,2,b,2,f,,c,4,1j,2,,7,,3,,4,9,,a,2,t,3,1y,,4,6,,,,8,i,2,1p,,,8,c,8,2q,,,a,b,7,21,2,r,,,,,,4,2,1d,k,,2,5,b,,10,9,,2u,b,,6,n,4,4,3,g,4,d,,,3,6,,f,,jj,3,qa,4,s,3,t,2,u,2,1s,w,9,,19,3,,,39,2,y,,3a,c,4,c,63,5,1l,a,,,,,2,o,2,,1c,1a,2,c,k,5,1b,h,12,9,c,3,u,d,1k,e,1c,k,48,3,,l,4,,6,,2,3,5i,1s,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,n,5,4,,2b,2,1e,i,q,i,d,,12,8,p,d,18,4,1b,e,10,,1v,e,c,,8,2,1a,,1f,,,3,2,2,5,2,,,15,5,5,2,6k,8,,2,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,1t,5,8t,2,25,6,1y,b,1d,4,3e,3,1h,f,15,,2,2,a,4,19,b,7,,1p,3,10,e,g,2,18,,c,3,1c,e,8,4,,2,2k,c,6,,2,,4d,c,l,4,1j,2,,7,2,2,2,3,9,,a,2,2,7,3,5,1v,9,,,2,,,4,,5,,,e,2,2a,i,n,,29,k,6j,7,2,9,r,2,2a,h,2y,d,2t,3,2,a,74,f,6t,6,,2,2,4,,,,2,3x,7,2,7,3,,s,a,14,7,,4,8,,9,b,1a,g,5i,8,5j,8,,8,2a,m,,e,3e,6,3,,,2,,7,,,1u,5,,2,,5,9n,4,9,2,,,1c,7,3,5,n,,44l,,6,f,8ug,i,1xc,5,1n,7,t4,,,1j,7,4,29,,b,2,f57,2,3mp,1a,2,n,f2,5,3,6,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,2s,,4g,7,af,,1p,4,e4,4,72,2,6r,,2,,7,2,5,,d6,7,31,7,240,5`.split(`,`).map(e=>e?parseInt(e,36):1);for(let t=0,n=0;t<e.length;t++)(t%2?qA:KA).push(n+=e[t])})();function JA(e){if(e<768)return!1;for(let t=0,n=KA.length;;){let r=t+n>>1;if(e<KA[r])n=r;else if(e>=qA[r])t=r+1;else return!0;if(t==n)return!1}}function YA(e){return e>=127462&&e<=127487}var XA=8205;function ZA(e,t,n=!0,r=!0){return(n?QA:$A)(e,t,r)}function QA(e,t,n){if(t==e.length)return t;t&&tj(e.charCodeAt(t))&&nj(e.charCodeAt(t-1))&&t--;let r=ej(e,t);for(t+=rj(r);t<e.length;){let i=ej(e,t);if(r==XA||i==XA||n&&JA(i))t+=rj(i),r=i;else if(YA(i)){let n=0,r=t-2;for(;r>=0&&YA(ej(e,r));)n++,r-=2;if(n%2==0)break;t+=2}else break}return t}function $A(e,t,n){for(;t>1;){let r=QA(e,t-2,n);if(r<t)return r;t--}return 0}function ej(e,t){let n=e.charCodeAt(t);if(!nj(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return tj(r)?(n-55296<<10)+(r-56320)+65536:n}function tj(e){return e>=56320&&e<57344}function nj(e){return e>=55296&&e<56320}function rj(e){return e<65536?1:2}var ij=class e{lineAt(e){if(e<0||e>this.length)throw RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,n){[e,t]=mj(this,e,t);let r=[];return this.decompose(0,e,r,2),n.length&&n.decompose(0,n.length,r,3),this.decompose(t,this.length,r,1),oj.from(r,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=mj(this,e,t);let n=[];return this.decompose(e,t,n,0),oj.from(n,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),r=new uj(this),i=new uj(e);for(let e=t,a=t;;){if(r.next(e),i.next(e),e=0,r.lineBreak!=i.lineBreak||r.done!=i.done||r.value!=i.value)return!1;if(a+=r.value.length,r.done||a>=n)return!0}}iter(e=1){return new uj(this,e)}iterRange(e,t=this.length){return new dj(this,e,t)}iterLines(e,t){let n;if(e==null)n=this.iter();else{t??=this.lines+1;let r=this.line(e).from;n=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new fj(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(t){if(t.length==0)throw RangeError(`A document must have at least one line`);return t.length==1&&!t[0]?e.empty:t.length<=32?new aj(t):oj.from(aj.split(t,[]))}},aj=class e extends ij{constructor(e,t=sj(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,r){for(let i=0;;i++){let a=this.text[i],o=r+a.length;if((t?n:o)>=e)return new pj(r,o,n,a);r=o+1,n++}}decompose(t,n,r,i){let a=t<=0&&n>=this.length?this:new e(lj(this.text,t,n),Math.min(n,this.length)-Math.max(0,t));if(i&1){let t=r.pop(),n=cj(a.text,t.text.slice(),0,a.length);if(n.length<=32)r.push(new e(n,t.length+a.length));else{let t=n.length>>1;r.push(new e(n.slice(0,t)),new e(n.slice(t)))}}else r.push(a)}replace(t,n,r){if(!(r instanceof e))return super.replace(t,n,r);[t,n]=mj(this,t,n);let i=cj(this.text,cj(r.text,lj(this.text,0,t)),n),a=this.length+r.length-(n-t);return i.length<=32?new e(i,a):oj.from(e.split(i,[]),a)}sliceString(e,t=this.length,n=`
23
+ `){[e,t]=mj(this,e,t);let r=``;for(let i=0,a=0;i<=t&&a<this.text.length;a++){let o=this.text[a],s=i+o.length;i>e&&a&&(r+=n),e<s&&t>i&&(r+=o.slice(Math.max(0,e-i),t-i)),i=s+1}return r}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(t,n){let r=[],i=-1;for(let a of t)r.push(a),i+=a.length+1,r.length==32&&(n.push(new e(r,i)),r=[],i=-1);return i>-1&&n.push(new e(r,i)),n}},oj=class e extends ij{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let t of e)this.lines+=t.lines}lineInner(e,t,n,r){for(let i=0;;i++){let a=this.children[i],o=r+a.length,s=n+a.lines-1;if((t?s:o)>=e)return a.lineInner(e,t,n,r);r=o+1,n=s+1}}decompose(e,t,n,r){for(let i=0,a=0;a<=t&&i<this.children.length;i++){let o=this.children[i],s=a+o.length;if(e<=s&&t>=a){let i=r&(a<=e|(s>=t?2:0));a>=e&&s<=t&&!i?n.push(o):o.decompose(e-a,t-a,n,i)}a=s+1}}replace(t,n,r){if([t,n]=mj(this,t,n),r.lines<this.lines)for(let i=0,a=0;i<this.children.length;i++){let o=this.children[i],s=a+o.length;if(t>=a&&n<=s){let c=o.replace(t-a,n-a,r),l=this.lines-o.lines+c.lines;if(c.lines<l>>4&&c.lines>l>>6){let a=this.children.slice();return a[i]=c,new e(a,this.length-(n-t)+r.length)}return super.replace(a,s,c)}a=s+1}return super.replace(t,n,r)}sliceString(e,t=this.length,n=`
24
+ `){[e,t]=mj(this,e,t);let r=``;for(let i=0,a=0;i<this.children.length&&a<=t;i++){let o=this.children[i],s=a+o.length;a>e&&i&&(r+=n),e<s&&t>a&&(r+=o.sliceString(e-a,t-a,n)),a=s+1}return r}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(t,n){if(!(t instanceof e))return 0;let r=0,[i,a,o,s]=n>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;i+=n,a+=n){if(i==o||a==s)return r;let e=this.children[i],c=t.children[a];if(e!=c)return r+e.scanIdentical(c,n);r+=e.length+1}}static from(t,n=t.reduce((e,t)=>e+t.length+1,-1)){let r=0;for(let e of t)r+=e.lines;if(r<32){let e=[];for(let n of t)n.flatten(e);return new aj(e,n)}let i=Math.max(32,r>>5),a=i<<1,o=i>>1,s=[],c=0,l=-1,u=[];function d(t){let n;if(t.lines>a&&t instanceof e)for(let e of t.children)d(e);else t.lines>o&&(c>o||!c)?(f(),s.push(t)):t instanceof aj&&c&&(n=u[u.length-1])instanceof aj&&t.lines+n.lines<=32?(c+=t.lines,l+=t.length+1,u[u.length-1]=new aj(n.text.concat(t.text),n.length+1+t.length)):(c+t.lines>i&&f(),c+=t.lines,l+=t.length+1,u.push(t))}function f(){c!=0&&(s.push(u.length==1?u[0]:e.from(u,l)),l=-1,c=u.length=0)}for(let e of t)d(e);return f(),s.length==1?s[0]:new e(s,n)}};ij.empty=new aj([``],0);function sj(e){let t=-1;for(let n of e)t+=n.length+1;return t}function cj(e,t,n=0,r=1e9){for(let i=0,a=0,o=!0;a<e.length&&i<=r;a++){let s=e[a],c=i+s.length;c>=n&&(c>r&&(s=s.slice(0,r-i)),i<n&&(s=s.slice(n-i)),o?(t[t.length-1]+=s,o=!1):t.push(s)),i=c+1}return t}function lj(e,t,n){return cj(e,[``],t,n)}var uj=class{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value=``,this.nodes=[e],this.offsets=[t>0?1:(e instanceof aj?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,r=this.nodes[n],i=this.offsets[n],a=i>>1,o=r instanceof aj?r.text.length:r.children.length;if(a==(t>0?o:0)){if(n==0)return this.done=!0,this.value=``,this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((i&1)==(t>0?0:1)){if(this.offsets[n]+=t,e==0)return this.lineBreak=!0,this.value=`
25
+ `,this;e--}else if(r instanceof aj){let i=r.text[a+(t<0?-1:0)];if(this.offsets[n]+=t,i.length>Math.max(0,e))return this.value=e==0?i:t>0?i.slice(e):i.slice(0,i.length-e),this;e-=i.length}else{let i=r.children[a+(t<0?-1:0)];e>i.length?(e-=i.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(i),this.offsets.push(t>0?1:(i instanceof aj?i.text.length:i.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}},dj=class{constructor(e,t,n){this.value=``,this.done=!1,this.cursor=new uj(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value=``,this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*t,this.value=r.length<=n?r:t<0?r.slice(r.length-n):r.slice(0,n),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=``}},fj=class{constructor(e){this.inner=e,this.afterBreak=!0,this.value=``,this.done=!1}next(e=0){let{done:t,lineBreak:n,value:r}=this.inner.next(e);return t&&this.afterBreak?(this.value=``,this.afterBreak=!1):t?(this.done=!0,this.value=``):n?this.afterBreak?this.value=``:(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}};typeof Symbol<`u`&&(ij.prototype[Symbol.iterator]=function(){return this.iter()},uj.prototype[Symbol.iterator]=dj.prototype[Symbol.iterator]=fj.prototype[Symbol.iterator]=function(){return this});var pj=class{constructor(e,t,n,r){this.from=e,this.to=t,this.number=n,this.text=r}get length(){return this.to-this.from}};function mj(e,t,n){return t=Math.max(0,Math.min(e.length,t)),[t,Math.max(t,Math.min(e.length,n))]}function hj(e,t,n=!0,r=!0){return ZA(e,t,n,r)}function gj(e){return e>=56320&&e<57344}function _j(e){return e>=55296&&e<56320}function vj(e,t){let n=e.charCodeAt(t);if(!_j(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return gj(r)?(n-55296<<10)+(r-56320)+65536:n}function yj(e){return e<65536?1:2}var bj=/\r\n?|\n/,xj=(function(e){return e[e.Simple=0]=`Simple`,e[e.TrackDel=1]=`TrackDel`,e[e.TrackBefore=2]=`TrackBefore`,e[e.TrackAfter=3]=`TrackAfter`,e})(xj||={}),Sj=class e{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t+1];e+=n<0?this.sections[t]:n}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,n=0,r=0;t<this.sections.length;){let i=this.sections[t++],a=this.sections[t++];a<0?(e(n,r,i),r+=i):r+=a,n+=i}}iterChangedRanges(e,t=!1){Ej(this,e,t)}get invertedDesc(){let t=[];for(let e=0;e<this.sections.length;){let n=this.sections[e++],r=this.sections[e++];r<0?t.push(n,r):t.push(r,n)}return new e(t)}composeDesc(e){return this.empty?e:e.empty?this:Oj(this,e)}mapDesc(e,t=!1){return e.empty?this:Dj(this,e,t)}mapPos(e,t=-1,n=xj.Simple){let r=0,i=0;for(let a=0;a<this.sections.length;){let o=this.sections[a++],s=this.sections[a++],c=r+o;if(s<0){if(c>e)return i+(e-r);i+=o}else{if(n!=xj.Simple&&c>=e&&(n==xj.TrackDel&&r<e&&c>e||n==xj.TrackBefore&&r<e||n==xj.TrackAfter&&c>e))return null;if(c>e||c==e&&t<0&&!o)return e==r||t<0?i:i+s;i+=s}r=c}if(e>r)throw RangeError(`Position ${e} is out of range for changeset of length ${r}`);return i}touchesRange(e,t=e){for(let n=0,r=0;n<this.sections.length&&r<=t;){let i=this.sections[n++],a=this.sections[n++],o=r+i;if(a>=0&&r<=t&&o>=e)return r<e&&o>t?`cover`:!0;r=o}return!1}toString(){let e=``;for(let t=0;t<this.sections.length;){let n=this.sections[t++],r=this.sections[t++];e+=(e?` `:``)+n+(r>=0?`:`+r:``)}return e}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some(e=>typeof e!=`number`))throw RangeError(`Invalid JSON representation of ChangeDesc`);return new e(t)}static create(t){return new e(t)}},Cj=class e extends Sj{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw RangeError(`Applying change set to a document with the wrong length`);return Ej(this,(t,n,r,i,a)=>e=e.replace(r,r+(n-t),a),!1),e}mapDesc(e,t=!1){return Dj(this,e,t,!0)}invert(t){let n=this.sections.slice(),r=[];for(let e=0,i=0;e<n.length;e+=2){let a=n[e],o=n[e+1];if(o>=0){n[e]=o,n[e+1]=a;let s=e>>1;for(;r.length<s;)r.push(ij.empty);r.push(a?t.slice(i,i+a):ij.empty)}i+=a}return new e(n,r)}compose(e){return this.empty?e:e.empty?this:Oj(this,e,!0)}map(e,t=!1){return e.empty?this:Dj(this,e,t,!0)}iterChanges(e,t=!1){Ej(this,e,t)}get desc(){return Sj.create(this.sections)}filter(t){let n=[],r=[],i=[],a=new kj(this);done:for(let e=0,o=0;;){let s=e==t.length?1e9:t[e++];for(;o<s||o==s&&a.len==0;){if(a.done)break done;let e=Math.min(a.len,s-o);wj(i,e,-1);let t=a.ins==-1?-1:a.off==0?a.ins:0;wj(n,e,t),t>0&&Tj(r,n,a.text),a.forward(e),o+=e}let c=t[e++];for(;o<c;){if(a.done)break done;let e=Math.min(a.len,c-o);wj(n,e,-1),wj(i,e,a.ins==-1?-1:a.off==0?a.ins:0),a.forward(e),o+=e}}return{changes:new e(n,r),filtered:Sj.create(i)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t],r=this.sections[t+1];r<0?e.push(n):r==0?e.push([n]):e.push([n].concat(this.inserted[t>>1].toJSON()))}return e}static of(t,n,r){let i=[],a=[],o=0,s=null;function c(t=!1){if(!t&&!i.length)return;o<n&&wj(i,n-o,-1);let r=new e(i,a);s=s?s.compose(r.map(s)):r,i=[],a=[],o=0}function l(t){if(Array.isArray(t))for(let e of t)l(e);else if(t instanceof e){if(t.length!=n)throw RangeError(`Mismatched change set length (got ${t.length}, expected ${n})`);c(),s=s?s.compose(t.map(s)):t}else{let{from:e,to:s=e,insert:l}=t;if(e>s||e<0||s>n)throw RangeError(`Invalid change range ${e} to ${s} (in doc of length ${n})`);let u=l?typeof l==`string`?ij.of(l.split(r||bj)):l:ij.empty,d=u.length;if(e==s&&d==0)return;e<o&&c(),e>o&&wj(i,e-o,-1),wj(i,s-e,d),Tj(a,i,u),o=s}}return l(t),c(!s),s}static empty(t){return new e(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw RangeError(`Invalid JSON representation of ChangeSet`);let n=[],r=[];for(let e=0;e<t.length;e++){let i=t[e];if(typeof i==`number`)n.push(i,-1);else if(!Array.isArray(i)||typeof i[0]!=`number`||i.some((e,t)=>t&&typeof e!=`string`))throw RangeError(`Invalid JSON representation of ChangeSet`);else if(i.length==1)n.push(i[0],0);else{for(;r.length<e;)r.push(ij.empty);r[e]=ij.of(i.slice(1)),n.push(i[0],r[e].length)}}return new e(n,r)}static createSet(t,n){return new e(t,n)}};function wj(e,t,n,r=!1){if(t==0&&n<=0)return;let i=e.length-2;i>=0&&n<=0&&n==e[i+1]?e[i]+=t:i>=0&&t==0&&e[i]==0?e[i+1]+=n:r?(e[i]+=t,e[i+1]+=n):e.push(t,n)}function Tj(e,t,n){if(n.length==0)return;let r=t.length-2>>1;if(r<e.length)e[e.length-1]=e[e.length-1].append(n);else{for(;e.length<r;)e.push(ij.empty);e.push(n)}}function Ej(e,t,n){let r=e.inserted;for(let i=0,a=0,o=0;o<e.sections.length;){let s=e.sections[o++],c=e.sections[o++];if(c<0)i+=s,a+=s;else{let l=i,u=a,d=ij.empty;for(;l+=s,u+=c,c&&r&&(d=d.append(r[o-2>>1])),!(n||o==e.sections.length||e.sections[o+1]<0);)s=e.sections[o++],c=e.sections[o++];t(i,l,a,u,d),i=l,a=u}}}function Dj(e,t,n,r=!1){let i=[],a=r?[]:null,o=new kj(e),s=new kj(t);for(let e=-1;;)if(o.done&&s.len||s.done&&o.len)throw Error(`Mismatched change set lengths`);else if(o.ins==-1&&s.ins==-1){let e=Math.min(o.len,s.len);wj(i,e,-1),o.forward(e),s.forward(e)}else if(s.ins>=0&&(o.ins<0||e==o.i||o.off==0&&(s.len<o.len||s.len==o.len&&!n))){let t=s.len;for(wj(i,s.ins,-1);t;){let n=Math.min(o.len,t);o.ins>=0&&e<o.i&&o.len<=n&&(wj(i,0,o.ins),a&&Tj(a,i,o.text),e=o.i),o.forward(n),t-=n}s.next()}else if(o.ins>=0){let t=0,n=o.len;for(;n;)if(s.ins==-1){let e=Math.min(n,s.len);t+=e,n-=e,s.forward(e)}else if(s.ins==0&&s.len<n)n-=s.len,s.next();else break;wj(i,t,e<o.i?o.ins:0),a&&e<o.i&&Tj(a,i,o.text),e=o.i,o.forward(o.len-n)}else if(o.done&&s.done)return a?Cj.createSet(i,a):Sj.create(i);else throw Error(`Mismatched change set lengths`)}function Oj(e,t,n=!1){let r=[],i=n?[]:null,a=new kj(e),o=new kj(t);for(let e=!1;;)if(a.done&&o.done)return i?Cj.createSet(r,i):Sj.create(r);else if(a.ins==0)wj(r,a.len,0,e),a.next();else if(o.len==0&&!o.done)wj(r,0,o.ins,e),i&&Tj(i,r,o.text),o.next();else if(a.done||o.done)throw Error(`Mismatched change set lengths`);else{let t=Math.min(a.len2,o.len),n=r.length;if(a.ins==-1){let n=o.ins==-1?-1:o.off?0:o.ins;wj(r,t,n,e),i&&n&&Tj(i,r,o.text)}else o.ins==-1?(wj(r,a.off?0:a.len,t,e),i&&Tj(i,r,a.textBit(t))):(wj(r,a.off?0:a.len,o.off?0:o.ins,e),i&&!o.off&&Tj(i,r,o.text));e=(a.ins>t||o.ins>=0&&o.len>t)&&(e||r.length>n),a.forward2(t),o.forward(t)}}var kj=class{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?ij.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?ij.empty:t[n].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}},Aj=class e{constructor(e,t,n,r){this.from=e,this.to=t,this.flags=n,this.goalColumn=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get undirectional(){return(this.flags&64)>0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}map(t,n=-1){let r,i;return this.empty?r=i=t.mapPos(this.from,n):(r=t.mapPos(this.from,1),i=t.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new e(r,i,this.flags,this.goalColumn)}extend(e,t=e,n=0){if(e<=this.anchor&&t>=this.anchor)return K.range(e,t,void 0,void 0,n);let r=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return K.range(this.anchor,r,void 0,void 0,n)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&this.goalColumn==e.goalColumn&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!=`number`||typeof e.head!=`number`)throw RangeError(`Invalid JSON representation for SelectionRange`);return K.range(e.anchor,e.head)}static create(t,n,r,i){return new e(t,n,r,i)}},K=class e{constructor(e,t){this.ranges=e,this.mainIndex=t}map(t,n=-1){return t.empty?this:e.create(this.ranges.map(e=>e.map(t,n)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;n<this.ranges.length;n++)if(!this.ranges[n].eq(e.ranges[n],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new e([this.main],0)}addRange(t,n=!0){return e.create([t].concat(this.ranges),n?0:this.mainIndex+1)}replaceRange(t,n=this.mainIndex){let r=this.ranges.slice();return r[n]=t,e.create(r,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||typeof t.main!=`number`||t.main>=t.ranges.length)throw RangeError(`Invalid JSON representation for EditorSelection`);return new e(t.ranges.map(e=>Aj.fromJSON(e)),t.main)}static single(t,n=t){return new e([e.range(t,n)],0)}static create(t,n=0){if(t.length==0)throw RangeError(`A selection needs at least one range`);for(let r=0,i=0;i<t.length;i++){let a=t[i];if(a.empty?a.from<=r:a.from<r)return e.normalized(t.slice(),n);r=a.to}return new e(t,n)}static cursor(e,t=0,n,r){return Aj.create(e,e,(t==0?0:t<0?8:16)|(n==null?7:Math.min(6,n)),r)}static range(e,t,n,r,i){let a=r==null?7:Math.min(6,r);return!i&&e!=t&&(i=t<e?1:-1),i&&(a|=i<0?8:16),t<e?Aj.create(t,e,a|32,n):Aj.create(e,t,a,n)}static undirectionalRange(e,t){return Aj.create(e,t,64,void 0)}static normalized(t,n=0){let r=t[n];t.sort((e,t)=>e.from-t.from),n=t.indexOf(r);for(let r=1;r<t.length;r++){let i=t[r],a=t[r-1];if(i.empty?i.from<=a.to:i.from<a.to){let o=a.from,s=Math.max(i.to,a.to);r<=n&&n--,t.splice(--r,2,i.anchor>i.head?e.range(s,o):e.range(o,s))}}return new e(t,n)}};function jj(e,t){for(let n of e.ranges)if(n.to>t)throw RangeError(`Selection points outside of document`)}var Mj=0,Nj=class e{constructor(e,t,n,r,i){this.combine=e,this.compareInput=t,this.compare=n,this.isStatic=r,this.id=Mj++,this.default=e([]),this.extensions=typeof i==`function`?i(this):i}get reader(){return this}static define(t={}){return new e(t.combine||(e=>e),t.compareInput||((e,t)=>e===t),t.compare||(t.combine?(e,t)=>e===t:Pj),!!t.static,t.enables)}of(e){return new Fj([],this,0,e)}compute(e,t){if(this.isStatic)throw Error(`Can't compute a static facet`);return new Fj(e,this,1,t)}computeN(e,t){if(this.isStatic)throw Error(`Can't compute a static facet`);return new Fj(e,this,2,t)}from(e,t){return t||=e=>e,this.compute([e],n=>t(n.field(e)))}};function Pj(e,t){return e==t||e.length==t.length&&e.every((e,n)=>e===t[n])}var Fj=class{constructor(e,t,n,r){this.dependencies=e,this.facet=t,this.type=n,this.value=r,this.id=Mj++}dynamicSlot(e){let t=this.value,n=this.facet.compareInput,r=this.id,i=e[r]>>1,a=this.type==2,o=!1,s=!1,c=[];for(let t of this.dependencies)t==`doc`?o=!0:t==`selection`?s=!0:(e[t.id]??1)&1||c.push(e[t.id]);return{create(e){return e.values[i]=t(e),1},update(e,r){if(o&&r.docChanged||s&&(r.docChanged||r.selection)||Lj(e,c)){let r=t(e);if(a?!Ij(r,e.values[i],n):!n(r,e.values[i]))return e.values[i]=r,1}return 0},reconfigure:(e,o)=>{let s,c=o.config.address[r];if(c!=null){let r=Xj(o,c);if(this.dependencies.every(t=>t instanceof Nj?o.facet(t)===e.facet(t):t instanceof Bj?o.field(t,!1)==e.field(t,!1):!0)||(a?Ij(s=t(e),r,n):n(s=t(e),r)))return e.values[i]=r,0}else s=t(e);return e.values[i]=s,1}}}get extension(){return this}};function Ij(e,t,n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function Lj(e,t){let n=!1;for(let r of t)Yj(e,r)&1&&(n=!0);return n}function Rj(e,t,n){let r=n.map(t=>e[t.id]),i=n.map(e=>e.type),a=r.filter(e=>!(e&1)),o=e[t.id]>>1;function s(e){let n=[];for(let t=0;t<r.length;t++){let a=Xj(e,r[t]);if(i[t]==2)for(let e of a)n.push(e);else n.push(a)}return t.combine(n)}return{create(e){for(let t of r)Yj(e,t);return e.values[o]=s(e),1},update(e,n){if(!Lj(e,a))return 0;let r=s(e);return t.compare(r,e.values[o])?0:(e.values[o]=r,1)},reconfigure(e,i){let a=Lj(e,r),c=i.config.facets[t.id],l=i.facet(t);if(c&&!a&&Pj(n,c))return e.values[o]=l,0;let u=s(e);return t.compare(u,l)?(e.values[o]=l,0):(e.values[o]=u,1)}}}var zj=Nj.define({static:!0}),Bj=class e{constructor(e,t,n,r,i){this.id=e,this.createF=t,this.updateF=n,this.compareF=r,this.spec=i,this.provides=void 0}static define(t){let n=new e(Mj++,t.create,t.update,t.compare||((e,t)=>e===t),t);return t.provide&&(n.provides=t.provide(n)),n}create(e){return(e.facet(zj).find(e=>e.field==this)?.create||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:e=>(e.values[t]=this.create(e),1),update:(e,n)=>{let r=e.values[t],i=this.updateF(r,n);return this.compareF(r,i)?0:(e.values[t]=i,1)},reconfigure:(e,n)=>{let r=e.facet(zj),i=n.facet(zj),a;return(a=r.find(e=>e.field==this))&&a!=i.find(e=>e.field==this)?(e.values[t]=a.create(e),1):n.config.address[this.id]==null?(e.values[t]=this.create(e),1):(e.values[t]=n.field(this),0)}}}init(e){return[this,zj.of({field:this,create:e})]}get extension(){return this}},Vj={lowest:4,low:3,default:2,high:1,highest:0};function Hj(e){return t=>new Wj(t,e)}var Uj={highest:Hj(Vj.highest),high:Hj(Vj.high),default:Hj(Vj.default),low:Hj(Vj.low),lowest:Hj(Vj.lowest)},Wj=class{constructor(e,t){this.inner=e,this.prec=t}get extension(){return this}},Gj=class e{of(e){return new Kj(this,e)}reconfigure(t){return e.reconfigure.of({compartment:this,extension:t})}get(e){return e.config.compartments.get(this)}},Kj=class{constructor(e,t){this.compartment=e,this.inner=t}get extension(){return this}},qj=class e{constructor(e,t,n,r,i,a){for(this.base=e,this.compartments=t,this.dynamicSlots=n,this.address=r,this.staticValues=i,this.facets=a,this.statusTemplate=[];this.statusTemplate.length<n.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return t==null?e.default:this.staticValues[t>>1]}static resolve(t,n,r){let i=[],a=Object.create(null),o=new Map;for(let e of Jj(t,n,o))e instanceof Bj?i.push(e):(a[e.facet.id]||(a[e.facet.id]=[])).push(e);let s=Object.create(null),c=[],l=[];for(let e of i)s[e.id]=l.length<<1,l.push(t=>e.slot(t));let u=r?.config.facets;for(let e in a){let t=a[e],n=t[0].facet,i=u&&u[e]||[];if(t.every(e=>e.type==0)){if(s[n.id]=c.length<<1|1,Pj(i,t))c.push(r.facet(n));else{let e=n.combine(t.map(e=>e.value));c.push(r&&n.compare(e,r.facet(n))?r.facet(n):e)}}else{for(let e of t)e.type==0?(s[e.id]=c.length<<1|1,c.push(e.value)):(s[e.id]=l.length<<1,l.push(t=>e.dynamicSlot(t)));s[n.id]=l.length<<1,l.push(e=>Rj(e,n,t))}}let d=l.map(e=>e(s));return new e(t,o,d,s,c,a)}};function Jj(e,t,n){let r=[[],[],[],[],[]],i=new Map;function a(e,o){let s=i.get(e);if(s!=null){if(s<=o)return;let t=r[s].indexOf(e);t>-1&&r[s].splice(t,1),e instanceof Kj&&n.delete(e.compartment)}if(i.set(e,o),Array.isArray(e))for(let t of e)a(t,o);else if(e instanceof Kj){if(n.has(e.compartment))throw RangeError(`Duplicate use of compartment in extensions`);let r=t.get(e.compartment)||e.inner;n.set(e.compartment,r),a(r,o)}else if(e instanceof Wj)a(e.inner,e.prec);else if(e instanceof Bj)r[o].push(e),e.provides&&a(e.provides,o);else if(e instanceof Fj)r[o].push(e),e.facet.extensions&&a(e.facet.extensions,Vj.default);else{let t=e.extension;if(!t)throw Error(`Unrecognized extension value in extension set (${e}).`);if(t==e)throw Error(`Unrecognized extension value in extension set (${e}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);a(t,o)}}return a(e,Vj.default),r.reduce((e,t)=>e.concat(t))}function Yj(e,t){if(t&1)return 2;let n=t>>1,r=e.status[n];if(r==4)throw Error(`Cyclic dependency between fields and/or facets`);if(r&2)return r;e.status[n]=4;let i=e.computeSlot(e,e.config.dynamicSlots[n]);return e.status[n]=2|i}function Xj(e,t){return t&1?e.config.staticValues[t>>1]:e.values[t>>1]}var Zj=Nj.define(),Qj=Nj.define({combine:e=>e.some(e=>e),static:!0}),$j=Nj.define({combine:e=>e.length?e[0]:void 0,static:!0}),eM=Nj.define(),tM=Nj.define(),nM=Nj.define(),rM=Nj.define({combine:e=>e.length?e[0]:!1}),iM=class{constructor(e,t){this.type=e,this.value=t}static define(){return new aM}},aM=class{of(e){return new iM(this,e)}},oM=class{constructor(e){this.map=e}of(e){return new sM(this,e)}},sM=class e{constructor(e,t){this.type=e,this.value=t}map(t){let n=this.type.map(this.value,t);return n===void 0?void 0:n==this.value?this:new e(this.type,n)}is(e){return this.type==e}static define(e={}){return new oM(e.map||(e=>e))}static mapEffects(e,t){if(!e.length)return e;let n=[];for(let r of e){let e=r.map(t);e&&n.push(e)}return n}};sM.reconfigure=sM.define(),sM.appendConfig=sM.define();var cM=class e{constructor(t,n,r,i,a,o){this.startState=t,this.changes=n,this.selection=r,this.effects=i,this.annotations=a,this.scrollIntoView=o,this._doc=null,this._state=null,r&&jj(r,n.newLength),a.some(t=>t.type==e.time)||(this.annotations=a.concat(e.time.of(Date.now())))}static create(t,n,r,i,a,o){return new e(t,n,r,i,a,o)}get newDoc(){return this._doc||=this.changes.apply(this.startState.doc)}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let n=this.annotation(e.userEvent);return!!(n&&(n==t||n.length>t.length&&n.slice(0,t.length)==t&&n[t.length]==`.`))}};cM.time=iM.define(),cM.userEvent=iM.define(),cM.addToHistory=iM.define(),cM.remote=iM.define();function lM(e,t){let n=[];for(let r=0,i=0;;){let a,o;if(r<e.length&&(i==t.length||t[i]>=e[r]))a=e[r++],o=e[r++];else if(i<t.length)a=t[i++],o=t[i++];else return n;!n.length||n[n.length-1]<a?n.push(a,o):n[n.length-1]<o&&(n[n.length-1]=o)}}function uM(e,t,n){let r,i,a;return n?(r=t.changes,i=Cj.empty(t.changes.length),a=e.changes.compose(t.changes)):(r=t.changes.map(e.changes),i=e.changes.mapDesc(t.changes,!0),a=e.changes.compose(r)),{changes:a,selection:t.selection?t.selection.map(i):e.selection?.map(r),effects:sM.mapEffects(e.effects,r).concat(sM.mapEffects(t.effects,i)),annotations:e.annotations.length?e.annotations.concat(t.annotations):t.annotations,scrollIntoView:e.scrollIntoView||t.scrollIntoView}}function dM(e,t,n){let r=t.selection,i=gM(t.annotations);return t.userEvent&&(i=i.concat(cM.userEvent.of(t.userEvent))),{changes:t.changes instanceof Cj?t.changes:Cj.of(t.changes||[],n,e.facet($j)),selection:r&&(r instanceof K?r:K.single(r.anchor,r.head)),effects:gM(t.effects),annotations:i,scrollIntoView:!!t.scrollIntoView}}function fM(e,t,n){let r=dM(e,t.length?t[0]:{},e.doc.length);t.length&&t[0].filter===!1&&(n=!1);for(let i=1;i<t.length;i++){t[i].filter===!1&&(n=!1);let a=!!t[i].sequential;r=uM(r,dM(e,t[i],a?r.changes.newLength:e.doc.length),a)}let i=cM.create(e,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return mM(n?pM(i):i)}function pM(e){let t=e.startState,n=!0;for(let r of t.facet(eM)){let t=r(e);if(t===!1){n=!1;break}Array.isArray(t)&&(n=n===!0?t:lM(n,t))}if(n!==!0){let r,i;if(n===!1)i=e.changes.invertedDesc,r=Cj.empty(t.doc.length);else{let t=e.changes.filter(n);r=t.changes,i=t.filtered.mapDesc(t.changes).invertedDesc}e=cM.create(t,r,e.selection&&e.selection.map(i),sM.mapEffects(e.effects,i),e.annotations,e.scrollIntoView)}let r=t.facet(tM);for(let n=r.length-1;n>=0;n--){let i=r[n](e);e=i instanceof cM?i:Array.isArray(i)&&i.length==1&&i[0]instanceof cM?i[0]:fM(t,gM(i),!1)}return e}function mM(e){let t=e.startState,n=t.facet(nM),r=e;for(let i=n.length-1;i>=0;i--){let a=n[i](e);a&&Object.keys(a).length&&(r=uM(r,dM(t,a,e.changes.newLength),!0))}return r==e?e:cM.create(t,e.changes,e.selection,r.effects,r.annotations,r.scrollIntoView)}var hM=[];function gM(e){return e==null?hM:Array.isArray(e)?e:[e]}var _M=(function(e){return e[e.Word=0]=`Word`,e[e.Space=1]=`Space`,e[e.Other=2]=`Other`,e})(_M||={}),vM=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,yM;try{yM=RegExp(`[\\p{Alphabetic}\\p{Number}_]`,`u`)}catch{}function bM(e){if(yM)return yM.test(e);for(let t=0;t<e.length;t++){let n=e[t];if(/\w/.test(n)||n>`€`&&(n.toUpperCase()!=n.toLowerCase()||vM.test(n)))return!0}return!1}function xM(e){return t=>{if(!/\S/.test(t))return _M.Space;if(bM(t))return _M.Word;for(let n=0;n<e.length;n++)if(t.indexOf(e[n])>-1)return _M.Word;return _M.Other}}var SM=class e{constructor(e,t,n,r,i,a){this.config=e,this.doc=t,this.selection=n,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=i,a&&(a._state=this);for(let e=0;e<this.config.dynamicSlots.length;e++)Yj(this,e<<1);this.computeSlot=null}field(e,t=!0){let n=this.config.address[e.id];if(n==null){if(t)throw RangeError(`Field is not present in this state`);return}return Yj(this,n),Xj(this,n)}update(...e){return fM(this,e,!0)}applyTransaction(t){let n=this.config,{base:r,compartments:i}=n;for(let e of t.effects)e.is(Gj.reconfigure)?(n&&=(i=new Map,n.compartments.forEach((e,t)=>i.set(t,e)),null),i.set(e.value.compartment,e.value.extension)):e.is(sM.reconfigure)?(n=null,r=e.value):e.is(sM.appendConfig)&&(n=null,r=gM(r).concat(e.value));let a;n?a=t.startState.values.slice():(n=qj.resolve(r,i,this),a=new e(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(e,t)=>t.reconfigure(e,this),null).values);let o=t.startState.facet(Qj)?t.newSelection:t.newSelection.asSingle();new e(n,t.newDoc,o,a,(e,n)=>n.update(e,t),t)}replaceSelection(e){return typeof e==`string`&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:K.cursor(t.from+e.length,-1)}))}changeByRange(e){let t=this.selection,n=e(t.ranges[0]),r=this.changes(n.changes),i=[n.range],a=gM(n.effects);for(let n=1;n<t.ranges.length;n++){let o=e(t.ranges[n]),s=this.changes(o.changes),c=s.map(r);for(let e=0;e<n;e++)i[e]=i[e].map(c);let l=r.mapDesc(s,!0);i.push(o.range.map(l)),r=r.compose(c),a=sM.mapEffects(a,c).concat(sM.mapEffects(gM(o.effects),l))}return{changes:r,selection:K.create(i,t.mainIndex),effects:a}}changes(t=[]){return t instanceof Cj?t:Cj.of(t,this.doc.length,this.facet(e.lineSeparator))}toText(t){return ij.of(t.split(this.facet(e.lineSeparator)||bj))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return t==null?e.default:(Yj(this,t),Xj(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let n in e){let r=e[n];r instanceof Bj&&this.config.address[r.id]!=null&&(t[n]=r.spec.toJSON(this.field(e[n]),this))}return t}static fromJSON(t,n={},r){if(!t||typeof t.doc!=`string`)throw RangeError(`Invalid JSON representation for EditorState`);let i=[];if(r){for(let e in r)if(Object.prototype.hasOwnProperty.call(t,e)){let n=r[e],a=t[e];i.push(n.init(e=>n.spec.fromJSON(a,e)))}}return e.create({doc:t.doc,selection:K.fromJSON(t.selection),extensions:n.extensions?i.concat([n.extensions]):i})}static create(t={}){let n=qj.resolve(t.extensions||[],new Map),r=t.doc instanceof ij?t.doc:ij.of((t.doc||``).split(n.staticFacet(e.lineSeparator)||bj)),i=t.selection?t.selection instanceof K?t.selection:K.single(t.selection.anchor,t.selection.head):K.single(0);return jj(i,r.length),n.staticFacet(Qj)||(i=i.asSingle()),new e(n,r,i,n.dynamicSlots.map(()=>null),(e,t)=>t.create(e),null)}get tabSize(){return this.facet(e.tabSize)}get lineBreak(){return this.facet(e.lineSeparator)||`
26
+ `}get readOnly(){return this.facet(rM)}phrase(t,...n){for(let n of this.facet(e.phrases))if(Object.prototype.hasOwnProperty.call(n,t)){t=n[t];break}return n.length&&(t=t.replace(/\$(\$|\d*)/g,(e,t)=>{if(t==`$`)return`$`;let r=+(t||1);return!r||r>n.length?e:n[r-1]})),t}languageDataAt(e,t,n=-1){let r=[];for(let i of this.facet(Zj))for(let a of i(this,t,n))Object.prototype.hasOwnProperty.call(a,e)&&r.push(a[e]);return r}charCategorizer(e){let t=this.languageDataAt(`wordChars`,e);return xM(t.length?t[0]:``)}wordAt(e){let{text:t,from:n,length:r}=this.doc.lineAt(e),i=this.charCategorizer(e),a=e-n,o=e-n;for(;a>0;){let e=hj(t,a,!1);if(i(t.slice(e,a))!=_M.Word)break;a=e}for(;o<r;){let e=hj(t,o);if(i(t.slice(o,e))!=_M.Word)break;o=e}return a==o?null:K.range(a+n,o+n)}};SM.allowMultipleSelections=Qj,SM.tabSize=Nj.define({combine:e=>e.length?e[0]:4}),SM.lineSeparator=$j,SM.readOnly=rM,SM.phrases=Nj.define({compare(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length==r.length&&n.every(n=>e[n]==t[n])}}),SM.languageData=Zj,SM.changeFilter=eM,SM.transactionFilter=tM,SM.transactionExtender=nM,Gj.reconfigure=sM.define();function CM(e,t,n={}){let r={};for(let t of e)for(let e of Object.keys(t)){let i=t[e],a=r[e];if(a===void 0)r[e]=i;else if(a!==i&&i!==void 0){if(Object.hasOwnProperty.call(n,e))r[e]=n[e](a,i);else throw Error(`Config merge conflict for field `+e)}}for(let e in t)r[e]===void 0&&(r[e]=t[e]);return r}var wM=class{eq(e){return this==e}range(e,t=e){return EM.create(e,t,this)}};wM.prototype.startSide=wM.prototype.endSide=0,wM.prototype.point=!1,wM.prototype.mapMode=xj.TrackDel;function TM(e,t){return e==t||e.constructor==t.constructor&&e.eq(t)}var EM=class e{constructor(e,t,n){this.from=e,this.to=t,this.value=n}static create(t,n,r){return new e(t,n,r)}};function DM(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}var OM=class e{constructor(e,t,n,r){this.from=e,this.to=t,this.value=n,this.maxPoint=r}get length(){return AM(this.to)}findIndex(e,t,n,r=0){let i=n?this.to:this.from;for(let a=r,o=i.length;;){if(a==o)return a;let r=a+o>>1,s=i[r]-e||(n?this.value[r].endSide:this.value[r].startSide)-t;if(r==a)return s>=0?a:o;s>=0?o=r:a=r+1}}between(e,t,n,r){for(let i=this.findIndex(t,-1e9,!0),a=this.findIndex(n,1e9,!1,i);i<a;i++)if(r(this.from[i]+e,this.to[i]+e,this.value[i])===!1)return!1}map(t,n,r,i,a){let o=[],s=[],c=[],l=-1,u=-1;iter:for(let e=0;e<this.value.length;e++){let d=this.value[e],f=this.from[e]+t,p=this.to[e]+t,m,h;if(f==p){let e=n.mapPos(f,d.startSide,d.mapMode);if(e==null||(m=h=e,d.startSide!=d.endSide&&(h=n.mapPos(f,d.endSide),h<m)))continue}else if(m=n.mapPos(f,d.startSide),h=n.mapPos(p,d.endSide),m>h||m==h&&d.startSide>0&&d.endSide<=0)continue;if(!((h-m||d.endSide-d.startSide)<0)){if(l<0&&(l=m),d.point&&(u=Math.max(u,h-m)),(m-r||d.startSide-i)>=0)o.push(d),s.push(m-l),c.push(h-l),r=h,i=d.endSide;else{if(m==h)for(let e=o.length;e>0;e--){if((m-(c[e-1]+l)||d.startSide-o[e-1].endSide)>=0){o.splice(e,0,d),s.splice(e,0,m-l),c.splice(e,0,h-l);continue iter}if((m-(s[e-1]+l)||d.endSide-o[e-1].startSide)>0)break}a(m,h,d)}}}return{mapped:o.length?new e(s,c,o,u):null,pos:l}}},kM=class e{constructor(e,t,n,r){this.chunkPos=e,this.chunk=t,this.nextLayer=n,this.maxPoint=r}static create(t,n,r,i){return new e(t,n,r,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(t){let{add:n=[],sort:r=!1,filterFrom:i=0,filterTo:a=this.length}=t,o=t.filter;if(n.length==0&&!o)return this;if(r&&(n=n.slice().sort(DM)),this.isEmpty)return n.length?e.of(n):this;let s=new PM(this,null,-1).goto(0),c=0,l=[],u=new MM;for(;s.value||c<n.length;)if(c<n.length&&(s.from-n[c].from||s.startSide-n[c].value.startSide)>=0){let e=n[c++];u.addInner(e.from,e.to,e.value,!1)||l.push(e)}else s.rangeIndex==1&&s.chunkIndex<this.chunk.length&&(c==n.length||this.chunkEnd(s.chunkIndex)<n[c].from)&&(!o||i>this.chunkEnd(s.chunkIndex)||a<this.chunkPos[s.chunkIndex])&&u.addChunk(this.chunkPos[s.chunkIndex],this.chunk[s.chunkIndex])?s.nextChunk():((!o||i>s.to||a<s.from||o(s.from,s.to,s.value))&&(u.addInner(s.from,s.to,s.value,!1)||l.push(EM.create(s.from,s.to,s.value))),s.next());return u.finishInner(this.nextLayer.isEmpty&&!l.length?e.empty:this.nextLayer.update({add:l,filter:o,filterFrom:i,filterTo:a}))}map(t){if(t.empty||this.isEmpty)return this;let n=[],r=[],i=-1,a,o=(e,t,n)=>{a||=new MM,a.addRange(e,t,n,!1)};for(let e=0;e<this.chunk.length;e++){let a=this.chunkPos[e],s=this.chunk[e],c=t.touchesRange(a,a+s.length);if(c===!1)i=Math.max(i,s.maxPoint),n.push(s),r.push(t.mapPos(a));else if(c===!0){let[e,c]=n.length?[AM(r)+AM(n).length,AM(AM(n).value).endSide]:[-1,-1],{mapped:l,pos:u}=s.map(a,t,e,c,o);l&&(i=Math.max(i,l.maxPoint),n.push(l),r.push(u))}}let s=this.nextLayer.map(t);return a&&(s=a.finishInner(s)),n.length==0?s:new e(r,n,s||e.empty,i)}between(e,t,n){if(!this.isEmpty){for(let r=0;r<this.chunk.length;r++){let i=this.chunkPos[r],a=this.chunk[r];if(t>=i&&e<=i+a.length&&a.between(i,e-i,t-i,n)===!1)return}this.nextLayer.between(e,t,n)}}iter(e=0){return FM.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return FM.from(e).goto(t)}static compare(e,t,n,r,i=-1){let a=e.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=i),o=t.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=i),s=NM(a,o,n),c=new LM(a,s,i),l=new LM(o,s,i);n.iterGaps((e,t,n)=>RM(c,e,l,t,n,r)),n.empty&&n.length==0&&RM(c,0,l,0,0,r)}static eq(e,t,n=0,r){r??=1e9-1;let i=e.filter(e=>!e.isEmpty&&t.indexOf(e)<0),a=t.filter(t=>!t.isEmpty&&e.indexOf(t)<0);if(i.length!=a.length)return!1;if(!i.length)return!0;let o=NM(i,a),s=new LM(i,o,0).goto(n),c=new LM(a,o,0).goto(n);for(;;){if(s.to!=c.to||!zM(s.active,c.active)||s.point&&(!c.point||!TM(s.point,c.point)))return!1;if(s.to>r)return!0;s.next(),c.next()}}static spans(e,t,n,r,i=-1){let a=new LM(e,null,i).goto(t),o=t,s=a.openStart;for(;;){let e=Math.min(a.to,n);if(a.point){let n=a.activeForPoint(a.to),i=a.pointFrom<t?n.length+1:a.point.startSide<0?n.length:Math.min(n.length,s);r.point(o,e,a.point,n,i,a.pointRank),s=Math.min(a.openEnd(e),n.length)}else e>o&&(r.span(o,e,a.active,s),s=a.openEnd(e));if(a.to>n)return s+(a.point&&a.to>n?1:0);o=a.to,a.next()}}static of(e,t=!1){let n=new MM;for(let r of e instanceof EM?[e]:t?jM(e):e)n.add(r.from,r.to,r.value);return n.finish()}static join(t){if(!t.length)return e.empty;let n=AM(t);for(let r=t.length-2;r>=0;r--)for(let i=t[r];i!=e.empty;i=i.nextLayer)n=new e(i.chunkPos,i.chunk,n,Math.max(i.maxPoint,n.maxPoint));return n}};kM.empty=new kM([],[],null,-1);function AM(e){return e[e.length-1]}function jM(e){if(e.length>1)for(let t=e[0],n=1;n<e.length;n++){let r=e[n];if(DM(t,r)>0)return e.slice().sort(DM);t=r}return e}kM.empty.nextLayer=kM.empty;var MM=class e{finishChunk(e){this.chunks.push(new OM(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,n){this.addRange(e,t,n,!0)}addRange(t,n,r,i){this.addInner(t,n,r,i)||(this.nextLayer||=new e).addRange(t,n,r,i)}addInner(e,t,n,r){let i=e-this.lastTo||n.startSide-this.last.endSide;if(r&&i<=0&&(e-this.lastFrom||n.startSide-this.last.startSide)<0)throw Error("Ranges must be added sorted by `from` position and `startSide`");return i<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=n,this.lastFrom=e,this.lastTo=t,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let n=t.value.length-1;return this.last=t.value[n],this.lastFrom=t.from[n]+e,this.lastTo=t.to[n]+e,!0}finish(){return this.finishInner(kM.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=kM.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}};function NM(e,t,n){let r=new Map;for(let t of e)for(let e=0;e<t.chunk.length;e++)t.chunk[e].maxPoint<=0&&r.set(t.chunk[e],t.chunkPos[e]);let i=new Set;for(let e of t)for(let t=0;t<e.chunk.length;t++){let a=r.get(e.chunk[t]);a!=null&&(n?n.mapPos(a):a)==e.chunkPos[t]&&!n?.touchesRange(a,a+e.chunk[t].length)&&i.add(e.chunk[t])}return i}var PM=class{constructor(e,t,n,r=0){this.layer=e,this.skip=t,this.minPoint=n,this.rank=r}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,n){for(;this.chunkIndex<this.layer.chunk.length;){let t=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(t)||this.layer.chunkEnd(this.chunkIndex)<e||t.maxPoint<this.minPoint))break;this.chunkIndex++,n=!1}if(this.chunkIndex<this.layer.chunk.length){let r=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!n||this.rangeIndex<r)&&this.setRangeIndex(r)}this.next()}forward(e,t){(this.to-e||this.endSide-t)<0&&this.gotoInner(e,t,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex],n=e+t.from[this.rangeIndex];if(this.from=n,this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}},FM=class e{constructor(e){this.heap=e}static from(t,n=null,r=-1){let i=[];for(let e=0;e<t.length;e++)for(let a=t[e];!a.isEmpty;a=a.nextLayer)a.maxPoint>=r&&i.push(new PM(a,n,r,e));return i.length==1?i[0]:new e(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let n of this.heap)n.goto(e,t);for(let e=this.heap.length>>1;e>=0;e--)IM(this.heap,e);return this.next(),this}forward(e,t){for(let n of this.heap)n.forward(e,t);for(let e=this.heap.length>>1;e>=0;e--)IM(this.heap,e);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),IM(this.heap,0)}}};function IM(e,t){for(let n=e[t];;){let r=(t<<1)+1;if(r>=e.length)break;let i=e[r];if(r+1<e.length&&i.compare(e[r+1])>=0&&(i=e[r+1],r++),n.compare(i)<0)break;e[r]=n,e[t]=i,t=r}}var LM=class{constructor(e,t,n){this.minPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=FM.from(e,t,n)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){BM(this.active,e),BM(this.activeTo,e),BM(this.activeRank,e),this.minActive=HM(this.active,this.activeTo)}addActive(e){let t=0,{value:n,to:r,rank:i}=this.cursor;for(;t<this.activeRank.length&&(i-this.activeRank[t]||r-this.activeTo[t])>0;)t++;VM(this.active,t,n),VM(this.activeTo,t,r),VM(this.activeRank,t,i),e&&VM(e,t,this.cursor.from),this.minActive=HM(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let n=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),n&&BM(n,r)}else if(!this.cursor.value){this.to=this.endSide=1e9;break}else if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let e=this.cursor.value;if(!e.point)this.addActive(n),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=e,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=e.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}}if(n){this.openStart=0;for(let t=n.length-1;t>=0&&n[t]<e;t--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let n=this.active.length-1;n>=0&&!(this.activeRank[n]<this.pointRank);n--)(this.activeTo[n]>e||this.activeTo[n]==e&&this.active[n].endSide>=this.point.endSide)&&t.push(this.active[n]);return t.reverse()}openEnd(e){let t=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)t++;return t}};function RM(e,t,n,r,i,a){e.goto(t),n.goto(r);let o=r+i,s=r,c=r-t,l=!!a.boundChange;for(let t=!1;;){let r=e.to+c-n.to,i=r||e.endSide-n.endSide,u=i<0?e.to+c:n.to,d=Math.min(u,o);if(e.point||n.point?(e.point&&n.point&&TM(e.point,n.point)&&zM(e.activeForPoint(e.to),n.activeForPoint(n.to))||a.comparePoint(s,d,e.point,n.point),t=!1):(t&&=(a.boundChange(s),!1),d>s&&!zM(e.active,n.active)&&a.compareRange(s,d,e.active,n.active),l&&d<o&&(r||e.openEnd(u)!=n.openEnd(u))&&(t=!0)),u>o)break;s=u,i<=0&&e.next(),i>=0&&n.next()}}function zM(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n]&&!TM(e[n],t[n]))return!1;return!0}function BM(e,t){for(let n=t,r=e.length-1;n<r;n++)e[n]=e[n+1];e.pop()}function VM(e,t,n){for(let n=e.length-1;n>=t;n--)e[n+1]=e[n];e[t]=n}function HM(e,t){let n=-1,r=1e9;for(let i=0;i<t.length;i++)(t[i]-r||e[i].endSide-e[n].endSide)<0&&(n=i,r=t[i]);return n}function UM(e,t,n=e.length){let r=0;for(let i=0;i<n&&i<e.length;)e.charCodeAt(i)==9?(r+=t-r%t,i++):(r++,i=hj(e,i));return r}function WM(e,t,n,r){for(let r=0,i=0;;){if(i>=t)return r;if(r==e.length)break;i+=e.charCodeAt(r)==9?n-i%n:1,r=hj(e,r)}return r===!0?-1:e.length}for(var GM=`ͼ`,KM=typeof Symbol>`u`?`__ͼ`:Symbol.for(GM),qM=typeof Symbol>`u`?`__styleSet`+Math.floor(Math.random()*1e8):Symbol(`styleSet`),JM=typeof globalThis<`u`?globalThis:typeof window<`u`?window:{},YM=class{constructor(e,t){this.rules=[];let{finish:n}=t||{};function r(e){return/^@/.test(e)?[e]:e.split(/,\s*/)}function i(e,t,a,o){let s=[],c=/^@(\w+)\b/.exec(e[0]),l=c&&c[1]==`keyframes`;if(c&&t==null)return a.push(e[0]+`;`);for(let n in t){let o=t[n];if(/&/.test(n))i(n.split(/,\s*/).map(t=>e.map(e=>t.replace(/&/,e))).reduce((e,t)=>e.concat(t)),o,a);else if(o&&typeof o==`object`){if(!c)throw RangeError(`The value of a property (`+n+`) should be a primitive value.`);i(r(n),o,s,l)}else o!=null&&s.push(n.replace(/_.*/,``).replace(/[A-Z]/g,e=>`-`+e.toLowerCase())+`: `+o+`;`)}(s.length||l)&&a.push((n&&!c&&!o?e.map(n):e).join(`, `)+` {`+s.join(` `)+`}`)}for(let t in e)i(r(t),e[t],this.rules)}getRules(){return this.rules.join(`
27
+ `)}static newName(){let e=JM[KM]||1;return JM[KM]=e+1,GM+e.toString(36)}static mount(e,t,n){let r=e[qM],i=n&&n.nonce;r?i&&r.setNonce(i):r=new ZM(e,i),r.mount(Array.isArray(t)?t:[t],e)}},XM=new Map,ZM=class{constructor(e,t){let n=e.ownerDocument||e,r=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let t=XM.get(n);if(t)return e[qM]=t;this.sheet=new r.CSSStyleSheet,XM.set(n,this)}else this.styleTag=n.createElement(`style`),t&&this.styleTag.setAttribute(`nonce`,t);this.modules=[],e[qM]=this}mount(e,t){let n=this.sheet,r=0,i=0,a=!1;for(let t=0;t<e.length;t++){let o=e[t],s=this.modules.indexOf(o);if(s<i&&s>-1&&(this.modules.splice(s,1),a=!0,i--,s=-1),s==-1){if(this.modules.splice(i++,0,o),a=!0,n)for(let e=0;e<o.rules.length;e++)n.insertRule(o.rules[e],r++)}else{for(;i<s;)r+=this.modules[i++].rules.length;r+=o.rules.length,i++}}if(n)t.adoptedStyleSheets.indexOf(this.sheet)<0&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{if(a){let e=``;for(let t=0;t<this.modules.length;t++)e+=this.modules[t].getRules()+`
28
+ `;this.styleTag.textContent=e}let e=t.head||t;this.styleTag.parentNode!=e&&e.insertBefore(this.styleTag,e.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute(`nonce`)!=e&&this.styleTag.setAttribute(`nonce`,e)}},QM={8:`Backspace`,9:`Tab`,10:`Enter`,12:`NumLock`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,44:`PrintScreen`,45:`Insert`,46:`Delete`,59:`;`,61:`=`,91:`Meta`,92:`Meta`,106:`*`,107:`+`,108:`,`,109:`-`,110:`.`,111:`/`,144:`NumLock`,145:`ScrollLock`,160:`Shift`,161:`Shift`,162:`Control`,163:`Control`,164:`Alt`,165:`Alt`,173:`-`,186:`;`,187:`=`,188:`,`,189:`-`,190:`.`,191:`/`,192:"`",219:`[`,220:`\\`,221:`]`,222:`'`},$M={48:`)`,49:`!`,50:`@`,51:`#`,52:`$`,53:`%`,54:`^`,55:`&`,56:`*`,57:`(`,59:`:`,61:`+`,173:`_`,186:`:`,187:`+`,188:`<`,189:`_`,190:`>`,191:`?`,192:`~`,219:`{`,220:`|`,221:`}`,222:`"`},eN=typeof navigator<`u`&&/Mac/.test(navigator.platform),tN=typeof navigator<`u`&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),nN=0;nN<10;nN++)QM[48+nN]=QM[96+nN]=String(nN);for(var nN=1;nN<=24;nN++)QM[nN+111]=`F`+nN;for(var nN=65;nN<=90;nN++)QM[nN]=String.fromCharCode(nN+32),$M[nN]=String.fromCharCode(nN);for(var rN in QM)$M.hasOwnProperty(rN)||($M[rN]=QM[rN]);function iN(e){var t=!(eN&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||tN&&e.shiftKey&&e.key&&e.key.length==1||e.key==`Unidentified`)&&e.key||(e.shiftKey?$M:QM)[e.keyCode]||e.key||`Unidentified`;return t==`Esc`&&(t=`Escape`),t==`Del`&&(t=`Delete`),t==`Left`&&(t=`ArrowLeft`),t==`Up`&&(t=`ArrowUp`),t==`Right`&&(t=`ArrowRight`),t==`Down`&&(t=`ArrowDown`),t}var aN=typeof navigator<`u`?navigator:{userAgent:``,vendor:``,platform:``},oN=typeof document<`u`?document:{documentElement:{style:{}}},sN=/Edge\/(\d+)/.exec(aN.userAgent),cN=/MSIE \d/.test(aN.userAgent),lN=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(aN.userAgent),uN=!!(cN||lN||sN),dN=!uN&&/gecko\/(\d+)/i.test(aN.userAgent),fN=!uN&&/Chrome\/(\d+)/.exec(aN.userAgent),pN=`webkitFontSmoothing`in oN.documentElement.style,mN=!uN&&/Apple Computer/.test(aN.vendor),hN=mN&&(/Mobile\/\w+/.test(aN.userAgent)||aN.maxTouchPoints>2),q={mac:hN||/Mac/.test(aN.platform),windows:/Win/.test(aN.platform),linux:/Linux|X11/.test(aN.platform),ie:uN,ie_version:cN?oN.documentMode||6:lN?+lN[1]:sN?+sN[1]:0,gecko:dN,gecko_version:dN?+(/Firefox\/(\d+)/.exec(aN.userAgent)||[0,0])[1]:0,chrome:!!fN,chrome_version:fN?+fN[1]:0,ios:hN,android:/Android\b/.test(aN.userAgent),webkit:pN,webkit_version:pN?+(/\bAppleWebKit\/(\d+)/.exec(aN.userAgent)||[0,0])[1]:0,safari:mN,safari_version:mN?+(/\bVersion\/(\d+(\.\d+)?)/.exec(aN.userAgent)||[0,0])[1]:0,tabSize:oN.documentElement.style.tabSize==null?`-moz-tab-size`:`tab-size`};function gN(e,t){for(let n in e)n==`class`&&t.class?t.class+=` `+e.class:n==`style`&&t.style?t.style+=`;`+e.style:t[n]=e[n];return t}var _N=Object.create(null);function vN(e,t,n){if(e==t)return!0;e||=_N,t||=_N;let r=Object.keys(e),i=Object.keys(t);if(r.length-0!=i.length-0)return!1;for(let a of r)if(a!=n&&(i.indexOf(a)==-1||e[a]!==t[a]))return!1;return!0}function yN(e,t){for(let n=e.attributes.length-1;n>=0;n--){let r=e.attributes[n].name;t[r]??e.removeAttribute(r)}for(let n in t){let r=t[n];n==`style`?e.style.cssText=r:e.getAttribute(n)!=r&&e.setAttribute(n,r)}}function bN(e,t,n){let r=!1;if(t)for(let i in t)n&&i in n||(r=!0,i==`style`?e.style.cssText=``:e.removeAttribute(i));if(n)for(let i in n)t&&t[i]==n[i]||(r=!0,i==`style`?e.style.cssText=n[i]:e.setAttribute(i,n[i]));return r}function xN(e){let t=Object.create(null);for(let n=0;n<e.attributes.length;n++){let r=e.attributes[n];t[r.name]=r.value}return t}var SN=class{eq(e){return!1}updateDOM(e,t,n){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,n){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}},CN=(function(e){return e[e.Text=0]=`Text`,e[e.WidgetBefore=1]=`WidgetBefore`,e[e.WidgetAfter=2]=`WidgetAfter`,e[e.WidgetRange=3]=`WidgetRange`,e})(CN||={}),wN=class extends wM{constructor(e,t,n,r){super(),this.startSide=e,this.endSide=t,this.widget=n,this.spec=r}get heightRelevant(){return!1}static mark(e){return new TN(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),n=!!e.block;return t+=n&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new DN(e,t,t,n,e.widget||null,!1)}static replace(e){let t=!!e.block,n,r;if(e.isBlockGap)n=-5e8,r=4e8;else{let{start:i,end:a}=ON(e,t);n=(i?t?-3e8:-1:5e8)-1,r=(a?t?2e8:1:-6e8)+1}return new DN(e,n,r,t,e.widget||null,!0)}static line(e){return new EN(e)}static set(e,t=!1){return kM.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}};wN.none=kM.empty;var TN=class e extends wN{constructor(e){let{start:t,end:n}=ON(e);super(t?-1:5e8,n?1:-6e8,null,e),this.tagName=e.tagName||`span`,this.attrs=e.class&&e.attributes?gN(e.attributes,{class:e.class}):e.class?{class:e.class}:e.attributes||_N}eq(t){return this==t||t instanceof e&&this.tagName==t.tagName&&vN(this.attrs,t.attrs)}range(e,t=e){if(e>=t)throw RangeError(`Mark decorations may not be empty`);return super.range(e,t)}};TN.prototype.point=!1;var EN=class e extends wN{constructor(e){super(-2e8,-2e8,null,e)}eq(t){return t instanceof e&&this.spec.class==t.spec.class&&vN(this.spec.attributes,t.spec.attributes)}range(e,t=e){if(t!=e)throw RangeError(`Line decoration ranges must be zero-length`);return super.range(e,t)}};EN.prototype.mapMode=xj.TrackBefore,EN.prototype.point=!0;var DN=class e extends wN{constructor(e,t,n,r,i,a){super(t,n,i,e),this.block=r,this.isReplace=a,this.mapMode=r?t<=0?xj.TrackBefore:xj.TrackAfter:xj.TrackDel}get type(){return this.startSide==this.endSide?this.startSide<=0?CN.WidgetBefore:CN.WidgetAfter:CN.WidgetRange}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(t){return t instanceof e&&kN(this.widget,t.widget)&&this.block==t.block&&this.startSide==t.startSide&&this.endSide==t.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw RangeError(`Invalid range for replacement decoration`);if(!this.isReplace&&t!=e)throw RangeError(`Widget decorations can only have zero-length ranges`);return super.range(e,t)}};DN.prototype.point=!0;function ON(e,t=!1){let{inclusiveStart:n,inclusiveEnd:r}=e;return n??=e.inclusive,r??=e.inclusive,{start:n??t,end:r??t}}function kN(e,t){return e==t||!!(e&&t&&e.compare(t))}function AN(e,t,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=e?n[i]=Math.max(n[i],t):n.push(e,t)}var jN=class e extends wM{constructor(e,t,n){super(),this.tagName=e,this.attributes=t,this.rank=n}eq(t){return t==this||t instanceof e&&this.tagName==t.tagName&&vN(this.attributes,t.attributes)}static create(t){return new e(t.tagName,t.attributes||_N,t.rank==null?50:Math.max(0,Math.min(t.rank,100)))}static set(e,t=!1){return kM.of(e,t)}};jN.prototype.startSide=jN.prototype.endSide=-1;var MN=e=>e.nodeType==1,NN=e=>e.nodeType==3;function PN(e){let t;return t=e.nodeType==11?e.getSelection?e:e.ownerDocument:e,t.getSelection()}function FN(e,t){return t?e==t||e.contains(t.nodeType==1?t:t.parentNode):!1}function IN(e,t){if(!t.anchorNode)return!1;try{return FN(e,t.anchorNode)}catch{return!1}}function LN(e){return NN(e)?eP(e,0,e.nodeValue.length).getClientRects():MN(e)?e.getClientRects():[]}function RN(e,t,n,r){return n?VN(e,t,n,r,-1)||VN(e,t,n,r,1):!1}function zN(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t}function BN(e){return MN(e)&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e.nodeName)}function VN(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:HN(e))){if(e.nodeName==`DIV`)return!1;let n=e.parentNode;if(!n||!MN(n))return!1;t=zN(e)+(i<0?0:1),e=n}else if(MN(e)){if(e=e.childNodes[t+(i<0?-1:0)],MN(e)&&(e.nodeName==`IMG`||e.nodeName==`BR`||e.contentEditable==`false`))return!1;t=i<0?HN(e):0}else return!1}}function HN(e){return NN(e)?e.nodeValue.length:e.childNodes.length}function UN(e,t){let{left:n,right:r}=e;if(n==r)return e;let i=t?n:r;return{left:i,right:i,top:e.top,bottom:e.bottom}}function WN(e){let t=e.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}function GN(e,t){let n=t.width/e.offsetWidth,r=t.height/e.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(t.width-e.offsetWidth)<1)&&(n=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(t.height-e.offsetHeight)<1)&&(r=1),{scaleX:n,scaleY:r}}function KN(e,t,n,r,i,a,o,s){let c=e.ownerDocument,l=c.defaultView||window;for(let u=e,d=!1;u&&!d;)if(MN(u)){let e,f=u==c.body,p=1,m=1,h=!0,g=!0;if(f)e=WN(l);else{let t=getComputedStyle(u);if(/^(fixed|sticky)$/.test(t.position)&&(d=!0),(u.scrollHeight<=u.clientHeight||!/auto|scroll/.test(t.overflowY))&&(g=!1),(u.scrollWidth<=u.clientWidth||!/auto|scroll/.test(t.overflowX))&&(h=!1),!h&&!g){u=u.assignedSlot||u.parentNode;continue}let n=u.getBoundingClientRect();({scaleX:p,scaleY:m}=GN(u,n)),e={left:n.left,right:n.left+u.clientWidth*p,top:n.top,bottom:n.top+u.clientHeight*m}}let _=0,v=0;if(g){if(i==`nearest`)t.top<e.top+o?(v=t.top-(e.top+o),n>0&&t.bottom>e.bottom+v&&(v=t.bottom-e.bottom+o)):t.bottom>e.bottom-o&&(v=t.bottom-e.bottom+o,n<0&&t.top-v<e.top&&(v=t.top-(e.top+o)));else{let r=t.bottom-t.top,a=e.bottom-e.top;v=(i==`center`&&r<=a?t.top+r/2-a/2:i==`start`||i==`center`&&n<0?t.top-o:t.bottom-a+o)-e.top}}if(h&&(r==`nearest`?t.left<e.left+a?(_=t.left-(e.left+a),n>0&&t.right>e.right+_&&(_=t.right-e.right+a)):t.right>e.right-a&&(_=t.right-e.right+a,n<0&&t.left<e.left+_&&(_=t.left-(e.left+a))):_=(r==`center`?t.left+(t.right-t.left)/2-(e.right-e.left)/2:r==`start`==s?t.left-a:t.right-(e.right-e.left)+a)-e.left),_||v){if(f)l.scrollBy(_,v);else{let e=0,n=0;if(v){let e=u.scrollTop;u.scrollTop+=v/m,n=(u.scrollTop-e)*m}if(_){let t=u.scrollLeft;u.scrollLeft+=_/p,e=(u.scrollLeft-t)*p}t={left:t.left-e,top:t.top-n,right:t.right-e,bottom:t.bottom-n},e&&Math.abs(e-_)<1&&(r=`nearest`),n&&Math.abs(n-v)<1&&(i=`nearest`)}}if(f)break;(t.top<e.top||t.bottom>e.bottom||t.left<e.left||t.right>e.right)&&(t={left:Math.max(t.left,e.left),right:Math.min(t.right,e.right),top:Math.max(t.top,e.top),bottom:Math.min(t.bottom,e.bottom)}),u=u.assignedSlot||u.parentNode}else if(u.nodeType==11)u=u.host;else break}function qN(e,t=!0){let n=e.ownerDocument,r=null,i=null;for(let a=e.parentNode;a&&!(a==n.body||(!t||r)&&i);)if(MN(a))!i&&a.scrollHeight>a.clientHeight&&/scroll|auto/.test(getComputedStyle(a).overflowY)&&(i=a),t&&!r&&a.scrollWidth>a.clientWidth&&/scroll|auto/.test(getComputedStyle(a).overflowX)&&(r=a),a=a.assignedSlot||a.parentNode;else if(a.nodeType==11)a=a.host;else break;return{x:r,y:i}}var JN=class{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:n}=e;this.set(t,Math.min(e.anchorOffset,t?HN(t):0),n,Math.min(e.focusOffset,n?HN(n):0))}set(e,t,n,r){this.anchorNode=e,this.anchorOffset=t,this.focusNode=n,this.focusOffset=r}};function YN(e){let t=[];for(let n=e;n;n=n.nodeType==11?n.host:n.parentNode)MN(n)&&t.push({node:n,left:n.scrollLeft,top:n.scrollTop});return t}function XN(e,t=!0){for(let{node:n,left:r,top:i}of e)t&&n.scrollTop!=i&&(n.scrollTop=i),n.scrollLeft!=r&&(n.scrollLeft=r)}var ZN=null;q.safari&&q.safari_version>=26&&(ZN=!1);function QN(e){if(e.setActive)return e.setActive();if(ZN)return e.focus(ZN);let t=YN(e);e.focus(ZN==null?{get preventScroll(){return ZN={preventScroll:!0},!0}}:void 0),ZN||(ZN=!1,XN(t))}var $N;function eP(e,t,n=t){let r=$N||=document.createRange();return r.setEnd(e,n),r.setStart(e,t),r}function tP(e,t,n,r){let i={key:t,code:t,keyCode:n,which:n,cancelable:!0};r&&({altKey:i.altKey,ctrlKey:i.ctrlKey,shiftKey:i.shiftKey,metaKey:i.metaKey}=r);let a=new KeyboardEvent(`keydown`,i);a.synthetic=!0,e.dispatchEvent(a);let o=new KeyboardEvent(`keyup`,i);return o.synthetic=!0,e.dispatchEvent(o),a.defaultPrevented||o.defaultPrevented}function nP(e){for(;e;){if(e&&(e.nodeType==9||e.nodeType==11&&e.host))return e;e=e.assignedSlot||e.parentNode}return null}function rP(e,t){let n=t.focusNode,r=t.focusOffset;if(!n||t.anchorNode!=n||t.anchorOffset!=r)return!1;for(r=Math.min(r,HN(n));;)if(r){if(!MN(n))return!1;let e=n.childNodes[r-1];e.contentEditable==`false`?r--:(n=e,r=HN(n))}else if(n==e)return!0;else r=zN(n),n=n.parentNode}function iP(e){return e instanceof Window?e.pageYOffset>Math.max(0,e.document.documentElement.scrollHeight-e.innerHeight-4):e.scrollTop>Math.max(1,e.scrollHeight-e.clientHeight-4)}function aP(e,t){for(let n=e,r=t;;)if(NN(n)&&r>0)return{node:n,offset:r};else if(MN(n)&&r>0){if(n.contentEditable==`false`)return null;n=n.childNodes[r-1],r=HN(n)}else if(n.parentNode&&!BN(n))r=zN(n),n=n.parentNode;else return null}function oP(e,t){for(let n=e,r=t;;)if(NN(n)&&r<n.nodeValue.length)return{node:n,offset:r};else if(MN(n)&&r<n.childNodes.length){if(n.contentEditable==`false`)return null;n=n.childNodes[r],r=0}else if(n.parentNode&&!BN(n))r=zN(n)+1,n=n.parentNode;else return null}var sP=class e{constructor(e,t,n=!0){this.node=e,this.offset=t,this.precise=n}static before(t,n){return new e(t.parentNode,zN(t),n)}static after(t,n){return new e(t.parentNode,zN(t)+1,n)}},cP=(function(e){return e[e.LTR=0]=`LTR`,e[e.RTL=1]=`RTL`,e})(cP||={}),lP=cP.LTR,uP=cP.RTL;function dP(e){let t=[];for(let n=0;n<e.length;n++)t.push(1<<e[n]);return t}var fP=dP(`88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008`),pP=dP(`4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333`),mP=Object.create(null),hP=[];for(let e of[`()`,`[]`,`{}`]){let t=e.charCodeAt(0),n=e.charCodeAt(1);mP[t]=n,mP[n]=-t}function gP(e){return e<=247?fP[e]:1424<=e&&e<=1524?2:1536<=e&&e<=1785?pP[e-1536]:1774<=e&&e<=2220?4:8192<=e&&e<=8204?256:64336<=e&&e<=65023?4:1}var _P=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/,vP=class{get dir(){return this.level%2?uP:lP}constructor(e,t,n){this.from=e,this.to=t,this.level=n}side(e,t){return this.dir==t==e?this.to:this.from}forward(e,t){return e==(this.dir==t)}static find(e,t,n,r){let i=-1;for(let a=0;a<e.length;a++){let o=e[a];if(o.from<=t&&o.to>=t){if(o.level==n)return a;(i<0||(r==0?e[i].level>o.level:r<0?o.from<t:o.to>t))&&(i=a)}}if(i<0)throw RangeError(`Index out of range`);return i}};function yP(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.from!=i.from||r.to!=i.to||r.direction!=i.direction||!yP(r.inner,i.inner))return!1}return!0}var bP=[];function xP(e,t,n,r,i){for(let a=0;a<=r.length;a++){let o=a?r[a-1].to:t,s=a<r.length?r[a].from:n,c=a?256:i;for(let t=o,n=c,r=c;t<s;t++){let i=gP(e.charCodeAt(t));i==512?i=n:i==8&&r==4&&(i=16),bP[t]=i==4?2:i,i&7&&(r=i),n=i}for(let e=o,t=c,r=c;e<s;e++){let i=bP[e];if(i==128)e<s-1&&t==bP[e+1]&&t&24?i=bP[e]=t:bP[e]=256;else if(i==64){let i=e+1;for(;i<s&&bP[i]==64;)i++;let a=e&&t==8||i<n&&bP[i]==8?r==1?1:8:256;for(let t=e;t<i;t++)bP[t]=a;e=i-1}else i==8&&r==1&&(bP[e]=1);t=i,i&7&&(r=i)}}}function SP(e,t,n,r,i){let a=i==1?2:1;for(let o=0,s=0,c=0;o<=r.length;o++){let l=o?r[o-1].to:t,u=o<r.length?r[o].from:n;for(let t=l,n,r,o;t<u;t++)if(r=mP[n=e.charCodeAt(t)]){if(r<0){for(let e=s-3;e>=0;e-=3)if(hP[e+1]==-r){let n=hP[e+2],r=n&2?i:n&4?n&1?a:i:0;r&&(bP[t]=bP[hP[e]]=r),s=e;break}}else if(hP.length==189)break;else hP[s++]=t,hP[s++]=n,hP[s++]=c}else if((o=bP[t])==2||o==1){let e=o==i;c=+!e;for(let t=s-3;t>=0;t-=3){let n=hP[t+2];if(n&2)break;if(e)hP[t+2]|=2;else{if(n&4)break;hP[t+2]|=4}}}}}function CP(e,t,n,r){for(let i=0,a=r;i<=n.length;i++){let o=i?n[i-1].to:e,s=i<n.length?n[i].from:t;for(let c=o;c<s;){let o=bP[c];if(o==256){let o=c+1;for(;;)if(o==s){if(i==n.length)break;o=n[i++].to,s=i<n.length?n[i].from:t}else if(bP[o]==256)o++;else break;let l=a==1,u=l==((o<t?bP[o]:r)==1)?l?1:2:r;for(let t=o,r=i,a=r?n[r-1].to:e;t>c;)t==a&&(t=n[--r].from,a=r?n[r-1].to:e),bP[--t]=u;c=o}else a=o,c++}}}function wP(e,t,n,r,i,a,o){let s=r%2?2:1;if(r%2==i%2)for(let c=t,l=0;c<n;){let t=!0,u=!1;if(l==a.length||c<a[l].from){let e=bP[c];e!=s&&(t=!1,u=e==16)}let d=!t&&s==1?[]:null,f=t?r:r+1,p=c;run:for(;;)if(l<a.length&&p==a[l].from){if(u)break run;let m=a[l];if(!t)for(let e=m.to,t=l+1;;){if(e==n)break run;if(t<a.length&&a[t].from==e)e=a[t++].to;else if(bP[e]==s)break run;else break}l++,d?d.push(m):(m.from>c&&o.push(new vP(c,m.from,f)),TP(e,m.direction==lP==!(f%2)?r:r+1,i,m.inner,m.from,m.to,o),c=m.to),p=m.to}else if(p==n||(t?bP[p]!=s:bP[p]==s))break;else p++;d?wP(e,c,p,r+1,i,d,o):c<p&&o.push(new vP(c,p,f)),c=p}else for(let c=n,l=a.length;c>t;){let n=!0,u=!1;if(!l||c>a[l-1].to){let e=bP[c-1];e!=s&&(n=!1,u=e==16)}let d=!n&&s==1?[]:null,f=n?r:r+1,p=c;run:for(;;)if(l&&p==a[l-1].to){if(u)break run;let m=a[--l];if(!n)for(let e=m.from,n=l;;){if(e==t)break run;if(n&&a[n-1].to==e)e=a[--n].from;else if(bP[e-1]==s)break run;else break}d?d.push(m):(m.to<c&&o.push(new vP(m.to,c,f)),TP(e,m.direction==lP==!(f%2)?r:r+1,i,m.inner,m.from,m.to,o),c=m.from),p=m.from}else if(p==t||(n?bP[p-1]!=s:bP[p-1]==s))break;else p--;d?wP(e,p,c,r+1,i,d,o):p<c&&o.push(new vP(p,c,f)),c=p}}function TP(e,t,n,r,i,a,o){let s=t%2?2:1;xP(e,i,a,r,s),SP(e,i,a,r,s),CP(i,a,r,s),wP(e,i,a,t,n,r,o)}function EP(e,t,n){if(!e)return[new vP(0,0,+(t==uP))];if(t==lP&&!n.length&&!_P.test(e))return DP(e.length);if(n.length)for(;e.length>bP.length;)bP[bP.length]=256;let r=[],i=t==lP?0:1;return TP(e,i,i,n,0,e.length,r),r}function DP(e){return[new vP(0,e,0)]}var OP=``;function kP(e,t,n,r,i){if(!e.length)return null;let a=r.head-e.from,o;if(r.head==e.from&&r.assoc<0){if(!i)return null;a=t[o=0].side(!1,n)}else if(r.head==e.to&&r.assoc>0){if(i)return null;a=t[o=t.length-1].side(!0,n)}else o=vP.find(t,a,r.bidiLevel??-1,r.assoc);let s=t[o],c=s.side(i,n);if(a==c){let e=o+=i?1:-1;if(e<0||e>=t.length)return null;s=t[o=e],a=s.side(!i,n),c=s.side(i,n)}let l=hj(e.text,a,s.forward(i,n));(l<s.from||l>s.to)&&(l=c),OP=e.text.slice(Math.min(a,l),Math.max(a,l));let u=o==(i?t.length-1:0)?null:t[o+(i?1:-1)];if(l==c){if(!u)return i?K.cursor(e.to,1):K.cursor(e.from,-1);if(u.level+ +!i<s.level)return K.cursor(u.side(!i,n)+e.from,u.forward(i,n)?1:-1,u.level)}return K.cursor(l+e.from,s.forward(i,n)?-1:1,s.level)}function AP(e,t,n){for(let r=t;r<n;r++){let t=gP(e.charCodeAt(r));if(t==1)return lP;if(t==2||t==4)return uP}}var jP=Nj.define(),MP=Nj.define(),NP=Nj.define(),PP=Nj.define(),FP=Nj.define(),IP=Nj.define(),LP=Nj.define(),RP=Nj.define(),zP=Nj.define(),BP=Nj.define({combine:e=>e.some(e=>e)}),VP=Nj.define({combine:e=>e.some(e=>e)}),HP=Nj.define(),UP=class e{constructor(e,t,n,r,i,a=!1){this.range=e,this.y=t,this.x=n,this.yMargin=r,this.xMargin=i,this.isSnapshot=a}map(t){return t.empty?this:new e(this.range.map(t),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(t){return this.range.to<=t.doc.length?this:new e(K.cursor(t.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}},WP=sM.define({map:(e,t)=>e.map(t)}),GP=sM.define();function KP(e,t,n){let r=e.facet(PP);r.length?r[0](t):window.onerror&&window.onerror(String(t),n,void 0,void 0,t)||(n?console.error(n+`:`,t):console.error(t))}var qP=Nj.define({combine:e=>!e.length||e[0]}),JP=0,YP=Nj.define({combine(e){return e.filter((t,n)=>{for(let r=0;r<n;r++)if(e[r].plugin==t.plugin)return!1;return!0})}}),XP=class e{constructor(e,t,n,r,i){this.id=e,this.create=t,this.domEventHandlers=n,this.domEventObservers=r,this.baseExtensions=i(this),this.extension=this.baseExtensions.concat(YP.of({plugin:this,arg:void 0}))}of(e){return this.baseExtensions.concat(YP.of({plugin:this,arg:e}))}static define(t,n){let{eventHandlers:r,eventObservers:i,provide:a,decorations:o}=n||{};return new e(JP++,t,r,i,e=>{let t=[];return o&&t.push(eF.of(t=>{let n=t.plugin(e);return n?o(n):wN.none})),a&&t.push(a(e)),t})}static fromClass(t,n){return e.define((e,n)=>new t(e,n),n)}},ZP=class{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(!this.value){if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(t){KP(e.state,t,`CodeMirror plugin crashed`),this.deactivate()}}else if(this.mustUpdate){let e=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(e)}catch(t){if(KP(e.state,t,`CodeMirror plugin crashed`),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}return this}destroy(e){if(this.value?.destroy)try{this.value.destroy()}catch(t){KP(e.state,t,`CodeMirror plugin crashed`)}}deactivate(){this.spec=this.value=null}},QP=Nj.define(),$P=Nj.define(),eF=Nj.define(),tF=Nj.define(),nF=Nj.define(),rF=Nj.define(),iF=Nj.define();function aF(e,t){let n=e.state.facet(iF);if(!n.length)return n;let r=n.map(t=>t instanceof Function?t(e):t),i=[];return kM.spans(r,t.from,t.to,{point(){},span(e,n,r,a){let o=e-t.from,s=n-t.from,c=i;for(let e=r.length-1;e>=0;e--,a--){let t=r[e].spec.bidiIsolate,n;if(a>0&&c.length&&(n=c[c.length-1]).to==o&&n.direction==t)n.to=s,c=n.inner;else{let e={from:o,to:s,direction:t,inner:[]};c.push(e),c=e.inner}}}}),oF(t.text,i)}function oF(e,t){for(let n of t){if(n.direction==null){for(let t=n.from,r=0;t<n.to;r++){let i=r<n.inner.length?n.inner[r]:null,a=AP(e,t,i?i.from:n.to);if(a){n.direction=a;break}if(!i)break;t=i.to}n.direction??=cP.LTR}oF(e,n.inner)}return t}var sF=Nj.define();function cF(e){let t=0,n=0,r=0,i=0;for(let a of e.state.facet(sF)){let o=a(e);o&&(o.left!=null&&(t=Math.max(t,o.left)),o.right!=null&&(n=Math.max(n,o.right)),o.top!=null&&(r=Math.max(r,o.top)),o.bottom!=null&&(i=Math.max(i,o.bottom)))}return{left:t,right:n,top:r,bottom:i}}var lF=Nj.define(),uF=class e{constructor(e,t,n,r){this.fromA=e,this.toA=t,this.fromB=n,this.toB=r}join(t){return new e(Math.min(this.fromA,t.fromA),Math.max(this.toA,t.toA),Math.min(this.fromB,t.fromB),Math.max(this.toB,t.toB))}addToSet(e){let t=e.length,n=this;for(;t>0;t--){let r=e[t-1];if(!(r.fromA>n.toA)){if(r.toA<n.fromA)break;n=n.join(r),e.splice(t-1,1)}}return e.splice(t,0,n),e}static extendWithRanges(t,n){if(n.length==0)return t;let r=[];for(let i=0,a=0,o=0;;){let s=i<t.length?t[i].fromB:1e9,c=a<n.length?n[a]:1e9,l=Math.min(s,c);if(l==1e9)break;let u=l+o,d=l,f=u;for(;;)if(a<n.length&&n[a]<=d){let e=n[a+1];a+=2,d=Math.max(d,e);for(let e=i;e<t.length&&t[e].fromB<=d;e++)o=t[e].toA-t[e].toB;f=Math.max(f,e+o)}else if(i<t.length&&t[i].fromB<=d){let e=t[i++];d=Math.max(d,e.toB),f=Math.max(f,e.toA),o=e.toA-e.toB}else break;r.push(new e(u,f,l,d))}return r}},dF=class e{constructor(e,t,n){this.view=e,this.state=t,this.transactions=n,this.flags=0,this.startState=e.state,this.changes=Cj.empty(this.startState.doc.length);for(let e of n)this.changes=this.changes.compose(e.changes);let r=[];this.changes.iterChangedRanges((e,t,n,i)=>r.push(new uF(e,t,n,i))),this.changedRanges=r}static create(t,n,r){return new e(t,n,r)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}},fF=[],pF=class{constructor(e,t,n=0){this.dom=e,this.length=t,this.flags=n,this.parent=null,e.cmTile=this}get breakAfter(){return this.flags&1}get children(){return fF}isWidget(){return!1}get isHidden(){return!1}isComposite(){return!1}isLine(){return!1}isText(){return!1}isBlock(){return!1}get domAttrs(){return null}sync(e){if(this.flags|=2,this.flags&4){this.flags&=-5;let e=this.domAttrs;e&&yN(this.dom,e)}}toString(){return this.constructor.name+(this.children.length?`(${this.children})`:``)+(this.breakAfter?`#`:``)}destroy(){this.parent=null}setDOM(e){this.dom=e,e.cmTile=this}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e,t=this.posAtStart){let n=t;for(let t of this.children){if(t==e)return n;n+=t.length+t.breakAfter}throw RangeError(`Invalid child in posBefore`)}posAfter(e){return this.posBefore(e)+e.length}covers(e){return!0}coordsIn(e,t,n){return null}domPosFor(e,t){let n=zN(this.dom),r=this.length?e>0:t>0;return new sP(this.parent.dom,n+ +!!r,e==0||e==this.length)}markDirty(e){this.flags&=-3,e&&(this.flags|=4),this.parent&&this.parent.flags&2&&this.parent.markDirty(!1)}get overrideDOMText(){return null}get root(){for(let e=this;e;e=e.parent)if(e instanceof gF)return e;return null}static get(e){return e.cmTile}},mF=class extends pF{constructor(e){super(e,0),this._children=[]}isComposite(){return!0}get children(){return this._children}get lastChild(){return this.children.length?this.children[this.children.length-1]:null}append(e){this.children.push(e),e.parent=this}sync(e){if(this.flags&2)return;super.sync(e);let t=this.dom,n=null,r,i=e?.node==t?e:null,a=0;for(let o of this.children){if(o.sync(e),a+=o.length+o.breakAfter,r=n?n.nextSibling:t.firstChild,i&&r!=o.dom&&(i.written=!0),o.dom.parentNode==t)for(;r&&r!=o.dom;)r=hF(r);else t.insertBefore(o.dom,r);n=o.dom}for(r=n?n.nextSibling:t.firstChild,i&&r&&(i.written=!0);r;)r=hF(r);this.length=a}};function hF(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}var gF=class extends mF{constructor(e,t){super(t),this.view=e}owns(e){for(;e;e=e.parent)if(e==this)return!0;return!1}isBlock(){return!0}nearest(e){for(;;){if(!e)return null;let t=pF.get(e);if(t&&this.owns(t))return t;e=e.parentNode}}blockTiles(e){for(let t=[],n=this,r=0,i=0;;)if(r==n.children.length){if(!t.length)return;n=n.parent,n.breakAfter&&i++,r=t.pop()}else{let a=n.children[r++];if(a instanceof _F)t.push(r),n=a,r=0;else{let t=i+a.length,n=e(a,i);if(n!==void 0)return n;i=t+a.breakAfter}}}resolveBlock(e,t){let n,r=-1,i,a=-1;if(this.blockTiles((o,s)=>{let c=s+o.length;if(e>=s&&e<=c){if(o.isWidget()&&t>=-1&&t<=1){if(o.flags&32)return!0;o.flags&16&&(n=void 0)}(s<e||e==c&&(t<-1?o.length:o.covers(1)))&&(!n||!o.isWidget()&&n.isWidget())&&(n=o,r=e-s),(c>e||e==s&&(t>1?o.length:o.covers(-1)))&&(!i||!o.isWidget()&&i.isWidget())&&(i=o,a=e-s)}}),!n&&!i)throw Error(`No tile at position `+e);return n&&t<0||!i?{tile:n,offset:r}:{tile:i,offset:a}}},_F=class e extends mF{constructor(e,t){super(e),this.wrapper=t}isBlock(){return!0}covers(e){return this.children.length?e<0?this.children[0].covers(-1):this.lastChild.covers(1):!1}get domAttrs(){return this.wrapper.attributes}static of(t,n){let r=new e(n||document.createElement(t.tagName),t);return n||(r.flags|=4),r}},vF=class e extends mF{constructor(e,t){super(e),this.attrs=t}isLine(){return!0}static start(t,n,r){let i=new e(n||document.createElement(`div`),t);return(!n||!r)&&(i.flags|=4),i}get domAttrs(){return this.attrs}resolveInline(e,t,n=!1){let r=null,i=-1,a=null,o=-1;function s(e,c){for(let l=0,u=0;l<e.children.length&&u<=c;l++){let d=e.children[l],f=u+d.length;f>=c&&(d.isComposite()?s(d,c-u):(!a||n&&a.isHidden&&(t>0&&!(a.flags&32)||n&&bF(a,d)))&&(f>c||d.flags&32&&t<=1)?(a=d,o=c-u):(u<c||d.flags&16&&!(n&&d.isHidden)&&t>=-1)&&(r=d,i=c-u)),u=f}}s(this,e);let c=(t<0?r:a)||r||a;return c?{tile:c,offset:c==r?i:o}:null}coordsIn(e,t,n){let r=this.resolveInline(e,t,!0);return r?r.tile.coordsIn(Math.max(0,r.offset),t,n):yF(this)}domIn(e,t){let n=this.resolveInline(e,t);if(n){let{tile:e,offset:r}=n;if(this.dom.contains(e.dom))return e.isText()?new sP(e.dom,Math.min(e.dom.nodeValue.length,r)):e.domPosFor(r,e.flags&16?1:e.flags&32?-1:t);let i=n.tile.parent,a=!1;for(let e of i.children){if(a)return new sP(e.dom,0);e==n.tile&&(a=!0)}}return new sP(this.dom,0)}};function yF(e){let t=e.dom.lastChild;if(!t)return e.dom.getBoundingClientRect();let n=LN(t);return n[n.length-1]||null}function bF(e,t){let n=e.coordsIn(0,1),r=t.coordsIn(0,1);return n&&r&&r.top<n.bottom}var xF=class e extends mF{constructor(e,t){super(e),this.mark=t}get domAttrs(){return this.mark.attrs}static of(t,n){let r=new e(n||document.createElement(t.tagName),t);return n||(r.flags|=4),r}},SF=class e extends pF{constructor(e,t){super(e,t.length),this.text=t}sync(e){this.flags&2||(super.sync(e),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text))}isText(){return!0}toString(){return JSON.stringify(this.text)}coordsIn(e,t,n){let r=this.dom.nodeValue.length;e>r&&(e=r);let i=e,a=e,o=0;e==0&&t<0||e==r&&t>=0?q.chrome||q.gecko||(e?(i--,o=1):a<r&&(a++,o=-1)):t<0?i--:a<r&&a++;let s=eP(this.dom,i,a).getClientRects();if(!s.length)return null;let c=s[(o?o<0:t>=0)?0:s.length-1];return q.safari&&!o&&c.width==0&&(c=Array.prototype.find.call(s,e=>e.width)||c),n==null?c:UN(c,(o?o>0:t<0)==n)}static of(t,n){let r=new e(n||document.createTextNode(t),t);return n||(r.flags|=2),r}},CF=class e extends pF{constructor(e,t,n,r){super(e,t,r),this.widget=n}isWidget(){return!0}get isHidden(){return this.widget.isHidden}covers(e){return this.flags&48?!1:(this.flags&(e<0?64:128))>0}coordsIn(e,t){return this.coordsInWidget(e,t,!1)}coordsInWidget(e,t,n){let r=this.widget.coordsAt(this.dom,e,t);if(r)return r;if(n)return UN(this.dom.getBoundingClientRect(),this.length?e==0:t<=0);{let t=this.dom.getClientRects(),n=null;if(!t.length)return null;let r=this.flags&16?!0:this.flags&32?!1:e>0;for(let i=r?t.length-1:0;n=t[i],!(e>0?i==0:i==t.length-1||n.top<n.bottom);i+=r?-1:1);return UN(n,!r)}}get overrideDOMText(){if(!this.length)return ij.empty;let{root:e}=this;if(!e)return ij.empty;let t=this.posAtStart;return e.view.state.doc.slice(t,t+this.length)}destroy(){super.destroy(),this.widget.destroy(this.dom)}static of(t,n,r,i,a){return a||(a=t.toDOM(n),t.editable||(a.contentEditable=`false`)),new e(a,r,t,i)}},wF=class extends pF{constructor(e){let t=document.createElement(`img`);t.className=`cm-widgetBuffer`,t.setAttribute(`aria-hidden`,`true`),super(t,0,e)}get isHidden(){return!0}get overrideDOMText(){return ij.empty}coordsIn(e,t,n){let r=this.dom.getBoundingClientRect();return n==null?r:UN(r,t>0==n)}},TF=class{constructor(e){this.index=0,this.beforeBreak=!1,this.parents=[],this.tile=e}advance(e,t,n){let{tile:r,index:i,beforeBreak:a,parents:o}=this;for(;e||t>0;)if(!r.isComposite()){let t=r.length;if(i<t&&e){let a=Math.min(e,t-i);n&&n.skip(r,i,i+a),e-=a,i+=a}if(i==t)a=!!r.breakAfter,{tile:r,index:i}=o.pop(),i++;else if(!e)break}else if(a){if(!e)break;n&&n.break(),e--,a=!1}else if(i==r.children.length){if(!e&&!o.length)break;n&&n.leave(r),a=!!r.breakAfter,{tile:r,index:i}=o.pop(),i++}else{let s=r.children[i],c=s.breakAfter;(t>0?s.length<=e:s.length<e)&&(!n||n.skip(s,0,s.length)!==!1||!s.isComposite)?(a=!!c,i++,e-=s.length):(o.push({tile:r,index:i}),r=s,i=0,n&&s.isComposite()&&n.enter(s))}return this.tile=r,this.index=i,this.beforeBreak=a,this}get root(){return this.parents.length?this.parents[0].tile:this.tile}},EF=class{constructor(e,t,n,r){this.from=e,this.to=t,this.wrapper=n,this.rank=r}},DF=class{constructor(e,t,n){this.cache=e,this.root=t,this.blockWrappers=n,this.curLine=null,this.lastBlock=null,this.afterWidget=null,this.pos=0,this.wrappers=[],this.wrapperPos=0}addText(e,t,n,r){this.flushBuffer();let i=this.ensureMarks(t,n),a=i.lastChild;if(a&&a.isText()&&!(a.flags&8)&&a.length+e.length<512){this.cache.reused.set(a,2);let t=i.children[i.children.length-1]=new SF(a.dom,a.text+e);t.parent=i}else i.append(r||SF.of(e,this.cache.find(SF)?.dom));this.pos+=e.length,this.afterWidget=null}addComposition(e,t){let n=this.curLine;n.dom!=t.line.dom&&(n.setDOM(this.cache.reused.has(t.line)?LF(t.line.dom):t.line.dom),this.cache.reused.set(t.line,2));let r=n;for(let e=t.marks.length-1;e>=0;e--){let n=t.marks[e],i=r.lastChild;if(i instanceof xF&&i.mark.eq(n.mark))i.dom!=n.dom&&i.setDOM(LF(n.dom)),r=i;else{let{dom:e}=n;this.cache.reused.get(n)&&pF.get(n.dom)&&(e=LF(n.dom));let t=xF.of(n.mark,e);r.append(t),r=t}this.cache.reused.set(n,2)}let i=pF.get(e.text);i&&this.cache.reused.set(i,2);let a=new SF(e.text,e.text.nodeValue);a.flags|=8,this.pos=e.range.toB,r.append(a)}addInlineWidget(e,t,n){let r=this.afterWidget&&e.flags&48&&(this.afterWidget.flags&48)==(e.flags&48);r||this.flushBuffer();let i=this.ensureMarks(t,n);!r&&!(e.flags&16)&&i.append(this.getBuffer(1)),i.append(e),this.pos+=e.length,this.afterWidget=e}addMark(e,t,n){this.flushBuffer(),this.ensureMarks(t,n).append(e),this.pos+=e.length,this.afterWidget=null}addBlockWidget(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}continueWidget(e){let t=this.afterWidget||this.lastBlock;t.length+=e,this.pos+=e}addLineStart(e,t){e||=PF;let n=vF.start(e,t||this.cache.find(vF)?.dom,!!t);this.getBlockPos().append(this.lastBlock=this.curLine=n)}addLine(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}addBreak(){this.lastBlock.flags|=1,this.endLine(),this.pos++}addLineStartIfNotCovered(e){this.blockPosCovered()||this.addLineStart(e)}ensureLine(e){this.curLine||this.addLineStart(e)}ensureMarks(e,t){let n=this.curLine;for(let r=e.length-1;r>=0;r--){let i=e[r],a;if(t>0&&(a=n.lastChild)&&a instanceof xF&&a.mark.eq(i))n=a,t--;else{let e=xF.of(i,this.cache.find(xF,e=>e.mark.eq(i))?.dom);n.append(e),n=e,t=0}}return n}endLine(){if(this.curLine){this.flushBuffer();let e=this.curLine.lastChild;(!e||!MF(this.curLine,!1)||e.dom.nodeName!=`BR`&&e.isWidget()&&!(q.ios&&MF(this.curLine,!0)))&&this.curLine.append(this.cache.findWidget(zF,0,32)||new CF(zF.toDOM(),0,zF,32)),this.curLine=this.afterWidget=null}}updateBlockWrappers(){this.wrapperPos>this.pos+1e4&&(this.blockWrappers.goto(this.pos),this.wrappers.length=0);for(let e=this.wrappers.length-1;e>=0;e--)this.wrappers[e].to<this.pos&&this.wrappers.splice(e,1);for(let e=this.blockWrappers;e.value&&e.from<=this.pos;e.next())if(e.to>=this.pos){let t=e.rank*102+e.value.rank,n=new EF(e.from,e.to,e.value,t),r=this.wrappers.length;for(;r>0&&(this.wrappers[r-1].rank-n.rank||this.wrappers[r-1].to-n.to)<0;)r--;this.wrappers.splice(r,0,n)}this.wrapperPos=this.pos}getBlockPos(){this.updateBlockWrappers();let e=this.root;for(let t of this.wrappers){let n=e.lastChild;if(t.from<this.pos&&n instanceof _F&&n.wrapper.eq(t.wrapper))e=n;else{let n=_F.of(t.wrapper,this.cache.find(_F,e=>e.wrapper.eq(t.wrapper))?.dom);e.append(n),e=n}}return e}blockPosCovered(){let e=this.lastBlock;return e!=null&&!e.breakAfter&&(!e.isWidget()||(e.flags&160)>0)}getBuffer(e){let t=2|(e<0?16:32),n=this.cache.find(wF,void 0,1);return n&&(n.flags=t),n||new wF(t)}flushBuffer(){this.afterWidget&&!(this.afterWidget.flags&32)&&(this.afterWidget.parent.append(this.getBuffer(-1)),this.afterWidget=null)}},OF=class{constructor(e){this.skipCount=0,this.text=``,this.textOff=0,this.cursor=e.iter()}skip(e){this.textOff+e<=this.text.length?this.textOff+=e:(this.skipCount+=e-(this.text.length-this.textOff),this.text=``,this.textOff=0)}next(e){if(this.textOff==this.text.length){let{value:t,lineBreak:n,done:r}=this.cursor.next(this.skipCount);if(this.skipCount=0,r)throw Error(`Ran out of text content when drawing inline views`);this.text=t;let i=this.textOff=Math.min(e,t.length);return n?null:t.slice(0,i)}let t=Math.min(this.text.length,this.textOff+e),n=this.text.slice(this.textOff,t);return this.textOff=t,n}},kF=[CF,vF,SF,xF,wF,_F,gF];for(let e=0;e<kF.length;e++)kF[e].bucket=e;var AF=class{constructor(e){this.view=e,this.buckets=kF.map(()=>[]),this.index=kF.map(()=>0),this.reused=new Map}add(e){let t=e.constructor.bucket,n=this.buckets[t];n.length<6?n.push(e):n[this.index[t]=(this.index[t]+1)%6]=e}find(e,t,n=2){let r=e.bucket,i=this.buckets[r],a=this.index[r];for(let e=0;e<i.length;e++){let o=(e+a)%i.length,s=i[o];if((!t||t(s))&&!this.reused.has(s))return i.splice(o,1),o<a&&this.index[r]--,this.reused.set(s,n),s}return null}findWidget(e,t,n){let r=this.buckets[0];if(r.length)for(let i=0,a=0;;i++){if(i==r.length){if(a)return null;a=1,i=0}let o=r[i];if(!this.reused.has(o)&&(a==0?o.widget.compare(e):o.widget.constructor==e.constructor&&e.updateDOM(o.dom,this.view,o.widget)))return r.splice(i,1),i<this.index[0]&&this.index[0]--,o.widget==e&&o.length==t&&(o.flags&497)==n?(this.reused.set(o,1),o):(this.reused.set(o,2),new CF(o.dom,t,e,o.flags&-498|n))}}reuse(e){return this.reused.set(e,1),e}maybeReuse(e,t=2){if(!this.reused.has(e))return this.reused.set(e,t),e.dom}clear(){for(let e=0;e<this.buckets.length;e++)this.buckets[e].length=this.index[e]=0}},jF=class{constructor(e,t,n,r,i){this.view=e,this.decorations=r,this.disallowBlockEffectsFor=i,this.openWidget=!1,this.openMarks=0,this.cache=new AF(e),this.text=new OF(e.state.doc),this.builder=new DF(this.cache,new gF(e,e.contentDOM),kM.iter(n)),this.cache.reused.set(t,2),this.old=new TF(t),this.reuseWalker={skip:(e,t,n)=>{if(this.cache.add(e),e.isComposite())return!1},enter:e=>this.cache.add(e),leave:()=>{},break:()=>{}}}run(e,t){let n=t&&this.getCompositionContext(t.text);for(let r=0,i=0,a=0;;){let o=a<e.length?e[a++]:null,s=o?o.fromA:this.old.root.length;if(s>r){let e=s-r;this.preserve(e,!a,!o),r=s,i+=e}if(!o)break;t&&o.fromA<=t.range.fromA&&o.toA>=t.range.toA?(this.forward(o.fromA,t.range.fromA,t.range.fromA<t.range.toA?1:-1),this.emit(i,t.range.fromB),this.builder.flushBuffer(),this.cache.clear(),this.builder.addComposition(t,n),this.text.skip(t.range.toB-t.range.fromB),this.forward(t.range.fromA,o.toA),this.emit(t.range.toB,o.toB)):(this.forward(o.fromA,o.toA),this.emit(i,o.toB)),i=o.toB,r=o.toA}return this.builder.curLine&&this.builder.endLine(),this.builder.root}preserve(e,t,n){let r=IF(this.old),i=this.openMarks;this.old.advance(e,n?1:-1,{skip:(e,t,n)=>{if(e.isWidget()){if(this.openWidget)this.builder.continueWidget(n-t);else{let a=n>0||t<e.length?CF.of(e.widget,this.view,n-t,e.flags&496,this.cache.maybeReuse(e)):this.cache.reuse(e);a.flags&256?(a.flags&=-2,this.builder.addBlockWidget(a)):(this.builder.ensureLine(null),this.builder.addInlineWidget(a,r,i),i=r.length)}}else if(e.isText())this.builder.ensureLine(null),!t&&n==e.length&&!this.cache.reused.has(e)?this.builder.addText(e.text,r,i,this.cache.reuse(e)):(this.cache.add(e),this.builder.addText(e.text.slice(t,n),r,i)),i=r.length;else if(e.isLine())e.flags&=-2,this.cache.reused.set(e,1),this.builder.addLine(e);else if(e instanceof wF)this.cache.add(e);else if(e instanceof xF)this.builder.ensureLine(null),this.builder.addMark(e,r,i),this.cache.reused.set(e,1),i=r.length;else return!1;this.openWidget=!1},enter:e=>{e.isLine()?this.builder.addLineStart(e.attrs,this.cache.maybeReuse(e)):(this.cache.add(e),e instanceof xF&&r.unshift(e.mark)),this.openWidget=!1},leave:e=>{e.isLine()?r.length&&=i=0:e instanceof xF&&(r.shift(),i=Math.min(i,r.length))},break:()=>{this.builder.addBreak(),this.openWidget=!1}}),this.text.skip(e)}emit(e,t){let n=null,r=this.builder,i=-1,a=kM.spans(this.decorations,e,t,{point:(e,t,a,o,s,c)=>{if(a instanceof DN){if(this.disallowBlockEffectsFor[c]){if(a.block)throw RangeError(`Block decorations may not be specified via plugins`);if(t>this.view.state.doc.lineAt(e).to)throw RangeError(`Decorations that replace line breaks may not be specified via plugins`)}if(i=o.length,s>o.length)r.continueWidget(t-e);else{let i=a.widget||(a.block?RF.block:RF.inline),c=NF(a),l=this.cache.findWidget(i,t-e,c)||CF.of(i,this.view,t-e,c);a.block?(a.startSide>0&&r.addLineStartIfNotCovered(n),r.addBlockWidget(l)):(r.ensureLine(n),r.addInlineWidget(l,o,s))}n=null}else n=FF(n,a);t>e&&this.text.skip(t-e)},span:(e,t,a,o)=>{for(let i=e;i<t;){let s=this.text.next(Math.min(512,t-i));s==null?(r.addLineStartIfNotCovered(n),r.addBreak(),i++):(r.ensureLine(n),r.addText(s,a,i==e?o:a.length),i+=s.length),n=null}i=a.length}});i>-1&&(this.openWidget=a>i),this.openWidget||r.addLineStartIfNotCovered(n),this.openMarks=a}forward(e,t,n=1){t-e<=10?this.old.advance(t-e,n,this.reuseWalker):(this.old.advance(5,-1,this.reuseWalker),this.old.advance(t-e-10,-1),this.old.advance(5,n,this.reuseWalker))}getCompositionContext(e){let t=[],n=null;for(let r=e.parentNode;;r=r.parentNode){let e=pF.get(r);if(r==this.view.contentDOM)break;e instanceof xF?t.push(e):e?.isLine()?n=e:e instanceof _F||(r.nodeName==`DIV`&&!n?n=new vF(r,PF):n||t.push(xF.of(new TN({tagName:r.nodeName.toLowerCase(),attributes:xN(r)}),r)))}return n?{line:n,marks:t}:null}};function MF(e,t){let n=e=>{for(let r of e.children)if((t?r.isText():r.length)||n(r))return!0;return!1};return n(e)}function NF(e){let t=e.isReplace?(e.startSide<0?64:0)|(e.endSide>0?128:0):e.startSide>0?32:16;return e.block&&(t|=256),t}var PF={class:`cm-line`};function FF(e,t){let n=t.spec.attributes,r=t.spec.class;return!n&&!r?e:(e||={class:`cm-line`},n&&gN(n,e),r&&(e.class+=` `+r),e)}function IF(e){let t=[];for(let n=e.parents.length;n>1;n--){let r=n==e.parents.length?e.tile:e.parents[n].tile;r instanceof xF&&t.push(r.mark)}return t}function LF(e){let t=pF.get(e);return t&&t.setDOM(e.cloneNode()),e}var RF=class extends SN{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}};RF.inline=new RF(`span`),RF.block=new RF(`div`);var zF=new class extends SN{toDOM(){return document.createElement(`br`)}get isHidden(){return!0}get editable(){return!0}},BF=class{constructor(e){this.view=e,this.decorations=[],this.blockWrappers=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.editContextFormatting=wN.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.updateDeco(),this.tile=new gF(e,e.contentDOM),this.updateInner([new uF(0,0,0,e.state.doc.length)],null)}update(e){let t=e.changedRanges;this.minWidth>0&&t.length&&(t.every(({fromA:e,toA:t})=>t<this.minWidthFrom||e>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let n=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(this.domChanged?.newSel?n=this.domChanged.newSel.head:!ZF(e.changes,this.hasComposition)&&!e.selectionSet&&(n=e.state.selection.main.head));let r=n>-1?WF(this.view,e.changes,n):null;if(this.domChanged=null,this.hasComposition){let{from:n,to:r}=this.hasComposition;t=new uF(n,r,e.changes.mapPos(n,-1),e.changes.mapPos(r,1)).addToSet(t.slice())}this.hasComposition=r?{from:r.range.fromB,to:r.range.toB}:null,(q.ie||q.chrome)&&!r&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let i=this.decorations,a=this.blockWrappers;this.updateDeco();let o=qF(i,this.decorations,e.changes);o.length&&(t=uF.extendWithRanges(t,o));let s=YF(a,this.blockWrappers,e.changes);return s.length&&(t=uF.extendWithRanges(t,s)),r&&!t.some(e=>e.fromA<=r.range.fromA&&e.toA>=r.range.toA)&&(t=r.range.addToSet(t.slice())),this.tile.flags&2&&t.length==0?!1:(this.updateInner(t,r),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t){this.view.viewState.mustMeasureContent=!0;let{observer:n}=this.view;n.ignore(()=>{if(t||e.length){let n=this.tile,r=new jF(this.view,n,this.blockWrappers,this.decorations,this.dynamicDecorationMap);t&&pF.get(t.text)&&r.cache.reused.set(pF.get(t.text),2),this.tile=r.run(e,t),VF(n,r.cache.reused)}this.tile.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+`px`,this.tile.dom.style.flexBasis=this.minWidth?this.minWidth+`px`:``;let r=q.chrome||q.ios?{node:n.selectionRange.focusNode,written:!1}:void 0;this.tile.sync(r),r&&(r.written||n.selectionRange.focusNode!=r.node||!this.tile.dom.contains(r.node))&&(this.forceSelection=!0),this.tile.dom.style.height=``});let r=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let e of this.tile.children)e.isWidget()&&e.widget instanceof QF&&r.push(e.dom);n.updateGaps(r)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let e of t.effects)e.is(GP)&&(this.editContextFormatting=e.value)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let{dom:n}=this.tile,r=this.view.root.activeElement,i=r==n,a=!i&&!(this.view.state.facet(qP)||n.tabIndex>-1)&&IN(n,this.view.observer.selectionRange)&&!(r&&n.contains(r));if(!(i||t||a))return;let o=this.forceSelection;this.forceSelection=!1;let s=this.view.state.selection.main,c,l;if(s.empty?l=c=this.inlineDOMNearPos(s.anchor,s.assoc||1):(l=this.inlineDOMNearPos(s.head,s.head==s.from?1:-1),c=this.inlineDOMNearPos(s.anchor,s.anchor==s.from?1:-1)),q.gecko&&s.empty&&!this.hasComposition&&HF(c)){let e=document.createTextNode(``);this.view.observer.ignore(()=>c.node.insertBefore(e,c.node.childNodes[c.offset]||null)),c=l=new sP(e,0),o=!0}let u=this.view.observer.selectionRange;(o||!u.focusNode||(!RN(c.node,c.offset,u.anchorNode,u.anchorOffset)||!RN(l.node,l.offset,u.focusNode,u.focusOffset))&&!this.suppressWidgetCursorChange(u,s))&&(this.view.observer.ignore(()=>{q.android&&q.chrome&&n.contains(u.focusNode)&&XF(u.focusNode,n)&&(n.blur(),n.focus({preventScroll:!0}));let e=PN(this.view.root);if(e){if(s.empty){if(q.gecko){let e=GF(c.node,c.offset);if(e&&e!=3){let t=(e==1?aP:oP)(c.node,c.offset);t&&(c=new sP(t.node,t.offset))}}e.collapse(c.node,c.offset),s.bidiLevel!=null&&e.caretBidiLevel!==void 0&&(e.caretBidiLevel=s.bidiLevel)}else if(e.extend){e.collapse(c.node,c.offset);try{e.extend(l.node,l.offset)}catch{}}else{let t=document.createRange();s.anchor>s.head&&([c,l]=[l,c]),t.setEnd(l.node,l.offset),t.setStart(c.node,c.offset),e.removeAllRanges(),e.addRange(t)}}a&&this.view.root.activeElement==n&&(n.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(c,l)),this.impreciseAnchor=c.precise?null:new sP(u.anchorNode,u.anchorOffset),this.impreciseHead=l.precise?null:new sP(u.focusNode,u.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&RN(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,n=PN(e.root),{anchorNode:r,anchorOffset:i}=e.observer.selectionRange;if(!n||!t.empty||!t.assoc||!n.modify)return;let a=this.lineAt(t.head,t.assoc);if(!a)return;let o=a.posAtStart;if(t.head==o||t.head==o+a.length)return;let s=this.coordsAt(t.head,-1),c=this.coordsAt(t.head,1);if(!s||!c||s.bottom>c.top)return;let l=this.domAtPos(t.head+t.assoc,t.assoc);n.collapse(l.node,l.offset),n.modify(`move`,t.assoc<0?`forward`:`backward`,`lineboundary`),e.observer.readSelectionRange();let u=e.observer.selectionRange;e.docView.posFromDOM(u.anchorNode,u.anchorOffset)!=t.from&&n.collapse(r,i)}posFromDOM(e,t){let n=this.tile.nearest(e);if(!n)return this.tile.dom.compareDocumentPosition(e)&2?0:this.view.state.doc.length;let r=n.posAtStart;if(n.isComposite()){let i;if(e==n.dom)i=n.dom.childNodes[t];else{let r=HN(e)==0?0:t==0?-1:1;for(;;){let t=e.parentNode;if(t==n.dom)break;r==0&&t.firstChild!=t.lastChild&&(r=e==t.firstChild?-1:1),e=t}i=r<0?e:e.nextSibling}if(i==n.dom.firstChild)return r;for(;i&&!pF.get(i);)i=i.nextSibling;if(!i)return r+n.length;for(let e=0,t=r;;e++){let r=n.children[e];if(r.dom==i)return t;t+=r.length+r.breakAfter}}else if(n.isText())return e==n.dom?r+t:r+(t?n.length:0);else return r}domAtPos(e,t){let{tile:n,offset:r}=this.tile.resolveBlock(e,t);return n.isWidget()?n.domPosFor(r,t):n.domIn(r,t)}inlineDOMNearPos(e,t){let n,r=-1,i=!1,a,o=-1,s=!1;return this.tile.blockTiles((t,c)=>{if(t.isWidget()){if(t.flags&32&&c>=e)return!0;t.flags&16&&(i=!0)}else{let l=c+t.length;if(c<=e&&(n=t,r=e-c,i=l<e),l>=e&&!a&&(a=t,o=e-c,s=c>e),c>e&&a)return!0}}),!n&&!a?this.domAtPos(e,t):(i&&a?n=null:s&&n&&(a=null),n&&t<0||!a?n.domIn(r,t):a.domIn(o,t))}coordsAt(e,t,n){let{tile:r,offset:i}=this.tile.resolveBlock(e,t);return r.isWidget()?r.widget instanceof QF?null:r.coordsInWidget(i,t,!0):r.coordsIn(i,t,n)}lineAt(e,t){let{tile:n}=this.tile.resolveBlock(e,t);return n.isLine()?n:null}coordsForChar(e){let{tile:t,offset:n}=this.tile.resolveBlock(e,1);if(!t.isLine())return null;function r(e,t){if(e.isComposite())for(let n of e.children){if(n.length>=t){let e=r(n,t);if(e)return e}if(t-=n.length,t<0)break}else if(e.isText()&&t<e.length){let n=hj(e.text,t);if(n==t)return null;let r=eP(e.dom,t,n).getClientRects();for(let e=0;e<r.length;e++){let t=r[e];if(e==r.length-1||t.top<t.bottom&&t.left<t.right)return t}}return null}return r(t,n)}measureVisibleLineHeights(e){let t=[],{from:n,to:r}=e,i=this.view.contentDOM.clientWidth,a=i>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,o=-1,s=this.view.textDirection==cP.LTR,c=0,l=(e,u,d)=>{for(let f=0;f<e.children.length&&!(u>r);f++){let r=e.children[f],p=u+r.length,m=r.dom.getBoundingClientRect(),{height:h}=m;if(d&&!f&&(c+=m.top-d.top),r instanceof _F)p>n&&l(r,u,m);else if(u>=n&&(c>0&&t.push(-c),t.push(h+c),c=0,a)){let e=r.dom.lastChild,t=e?LN(e):[];if(t.length){let e=t[t.length-1],n=s?e.right-m.left:m.right-e.left;n>o&&(o=n,this.minWidth=i,this.minWidthFrom=u,this.minWidthTo=p)}}d&&f==e.children.length-1&&(c+=d.bottom-m.bottom),u=p+r.breakAfter}};return l(this.tile,0,null),t}textDirectionAt(e){let{tile:t}=this.tile.resolveBlock(e,1);return getComputedStyle(t.dom).direction==`rtl`?cP.RTL:cP.LTR}measureTextSize(){let e=this.tile.blockTiles(e=>{if(e.isLine()&&e.children.length&&e.length<=20){let t=0,n;for(let r of e.children){if(!r.isText()||/[^ -~]/.test(r.text))return;let e=LN(r.dom);if(e.length!=1)return;t+=e[0].width,n=e[0].height}if(t)return{lineHeight:e.dom.getBoundingClientRect().height,charWidth:t/e.length,textHeight:n}}});if(e)return e;let t=document.createElement(`div`),n,r,i;return t.className=`cm-line`,t.style.width=`99999px`,t.style.position=`absolute`,t.textContent=`abc def ghi jkl mno pqr stu`,this.view.observer.ignore(()=>{this.tile.dom.appendChild(t);let e=LN(t.firstChild)[0];n=t.getBoundingClientRect().height,r=e&&e.width?e.width/27:7,i=e&&e.height?e.height:n,t.remove()}),{lineHeight:n,charWidth:r,textHeight:i}}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let n=0,r=0;;r++){let i=r==t.viewports.length?null:t.viewports[r],a=i?i.from-1:this.view.state.doc.length;if(a>n){let r=(t.lineBlockAt(a).bottom-t.lineBlockAt(n).top)/this.view.scaleY;e.push(wN.replace({widget:new QF(r),block:!0,inclusive:!0,isBlockGap:!0}).range(n,a))}if(!i)break;n=i.to+1}return wN.set(e)}updateDeco(){let e=1,t=this.view.state.facet(eF).map(t=>(this.dynamicDecorationMap[e++]=typeof t==`function`)?t(this.view):t),n=!1,r=this.view.state.facet(nF).map((e,t)=>{let r=typeof e==`function`;return r&&(n=!0),r?e(this.view):e});for(r.length&&(this.dynamicDecorationMap[e++]=n,t.push(kM.join(r))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;this.blockWrappers=this.view.state.facet(tF).map(e=>typeof e==`function`?e(this.view):e)}scrollIntoView(e){if(e.isSnapshot){let t=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=t.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let t of this.view.state.facet(HP))try{if(t(this.view,e.range,e))return!0}catch(e){KP(this.view.state,e,`scroll handler`)}let{range:t}=e,n=this.coordsAt(t.head,t.assoc||(t.head>t.anchor?-1:1)),r;if(!n)return;!t.empty&&(r=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(n={left:Math.min(n.left,r.left),top:Math.min(n.top,r.top),right:Math.max(n.right,r.right),bottom:Math.max(n.bottom,r.bottom)});let i=cF(this.view),a={left:n.left-i.left,top:n.top-i.top,right:n.right+i.right,bottom:n.bottom+i.bottom},{offsetWidth:o,offsetHeight:s}=this.view.scrollDOM;if(KN(this.view.scrollDOM,a,t.head<t.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,o),-o),Math.max(Math.min(e.yMargin,s),-s),this.view.textDirection==cP.LTR),window.visualViewport&&window.innerHeight-window.visualViewport.height>1&&(n.top>window.visualViewport.offsetTop+window.visualViewport.height||n.bottom<window.visualViewport.offsetTop)){let e=this.view.docView.lineAt(t.head,1);if(e){let t=YN(e.dom);e.dom.scrollIntoView({block:`nearest`}),XN(t,!1)}}}lineHasWidget(e){let t=e=>e.isWidget()||e.children.some(t);return t(this.tile.resolveBlock(e,1).tile)}destroy(){VF(this.tile)}};function VF(e,t){let n=t?.get(e);if(n!=1){n??e.destroy();for(let n of e.children)VF(n,t)}}function HF(e){return MN(e.node)&&e.node.firstChild&&(e.offset==0||e.node.childNodes[e.offset-1].contentEditable==`false`)&&(e.offset==e.node.childNodes.length||e.node.childNodes[e.offset].contentEditable==`false`)}function UF(e,t){let n=e.observer.selectionRange;if(!n.focusNode)return null;let r=aP(n.focusNode,n.focusOffset),i=oP(n.focusNode,n.focusOffset),a=r||i;if(i&&r&&i.node!=r.node){let t=pF.get(i.node);if(!t||t.isText()&&t.text!=i.node.nodeValue)a=i;else if(e.docView.lastCompositionAfterCursor){let e=pF.get(r.node);!e||e.isText()&&e.text!=r.node.nodeValue||(a=i)}}if(e.docView.lastCompositionAfterCursor=a!=r,!a)return null;let o=t-a.offset;return{from:o,to:o+a.node.nodeValue.length,node:a.node}}function WF(e,t,n){let r=UF(e,n);if(!r)return null;let{node:i,from:a,to:o}=r,s=i.nodeValue;if(/[\n\r]/.test(s)||e.state.doc.sliceString(r.from,r.to)!=s)return null;let c=t.invertedDesc;return{range:new uF(c.mapPos(a),c.mapPos(o),a,o),text:i}}function GF(e,t){return MN(e)?(t&&e.childNodes[t-1].contentEditable==`false`?1:0)|(t<e.childNodes.length&&e.childNodes[t].contentEditable==`false`?2:0):0}var KF=class{constructor(){this.changes=[]}compareRange(e,t){AN(e,t,this.changes)}comparePoint(e,t){AN(e,t,this.changes)}boundChange(e){AN(e,e,this.changes)}};function qF(e,t,n){let r=new KF;return kM.compare(e,t,n,r),r.changes}var JF=class{constructor(){this.changes=[]}compareRange(e,t){AN(e,t,this.changes)}comparePoint(){}boundChange(e){AN(e,e,this.changes)}};function YF(e,t,n){let r=new JF;return kM.compare(e,t,n,r),r.changes}function XF(e,t){for(let n=e;n&&n!=t;n=n.assignedSlot||n.parentNode)if(MN(n)&&n.contentEditable==`false`)return!0;return!1}function ZF(e,t){let n=!1;return t&&e.iterChangedRanges((e,r)=>{e<t.to&&r>t.from&&(n=!0)}),n}var QF=class extends SN{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement(`div`);return e.className=`cm-gap`,this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+`px`,!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}};function $F(e,t,n=1){let r=e.charCategorizer(t),i=e.doc.lineAt(t),a=t-i.from;if(i.length==0)return K.cursor(t);a==0?n=1:a==i.length&&(n=-1);let o=a,s=a;n<0?o=hj(i.text,a,!1):s=hj(i.text,a);let c=r(i.text.slice(o,s));for(;o>0;){let e=hj(i.text,o,!1);if(r(i.text.slice(e,o))!=c)break;o=e}for(;s<i.length;){let e=hj(i.text,s);if(r(i.text.slice(s,e))!=c)break;s=e}return K.undirectionalRange(o+i.from,s+i.from)}function eI(e,t,n,r,i){let a=Math.round((r-t.left)*e.defaultCharacterWidth);if(e.lineWrapping&&n.height>e.defaultLineHeight*1.5){let t=e.viewState.heightOracle.textHeight,r=Math.floor((i-n.top-(e.defaultLineHeight-t)*.5)/t);a+=r*e.viewState.heightOracle.lineLength}let o=e.state.sliceDoc(n.from,n.to);return n.from+WM(o,a,e.state.tabSize)}function tI(e,t,n){let r=e.lineBlockAt(t);if(Array.isArray(r.type)){let e;for(let i of r.type){if(i.from>t)break;if(!(i.to<t)){if(i.from<t&&i.to>t)return i;(!e||i.type==CN.Text&&(e.type!=i.type||(n<0?i.from<t:i.to>t)))&&(e=i)}}return e||r}return r}function nI(e,t,n,r){let i=tI(e,t.head,t.assoc||-1),a=!r||i.type!=CN.Text||!(e.lineWrapping||i.widgetLineBreaks)?null:e.coordsAtPos(t.assoc<0&&t.head>i.from?t.head-1:t.head);if(a){let t=e.dom.getBoundingClientRect(),r=e.textDirectionAt(i.from),o=e.posAndSideAtCoords({x:n==(r==cP.LTR)?t.right-1:t.left+1,y:(a.top+a.bottom)/2});if(o)return K.cursor(o.pos,o.assoc)}return K.cursor(n?i.to:i.from,n?1:-1)}function rI(e,t,n,r){let i=e.state.doc.lineAt(t.head),a=e.bidiSpans(i),o=e.textDirectionAt(i.from);for(let s=t,c=null;;){let t=kP(i,a,o,s,n),l=OP;if(!t){if(i.number==(n?e.state.doc.lines:1))return s;l=`
29
+ `,i=e.state.doc.line(i.number+(n?1:-1)),a=e.bidiSpans(i),t=n?K.cursor(i.from,-1):K.cursor(i.to,1)}if(!c){if(!r)return t;c=r(l)}else if(!c(l))return s;s=t}}function iI(e,t,n){let r=e.state.charCategorizer(t),i=r(n);return e=>{let t=r(e);return i==_M.Space&&(i=t),i==t}}function aI(e,t,n,r){let i=t.head,a=n?1:-1;if(i==(n?e.state.doc.length:0))return K.cursor(i,t.assoc);let o=t.goalColumn,s,c=e.contentDOM.getBoundingClientRect(),l=e.coordsAtPos(i,t.assoc||((t.empty?n:t.head==t.from)?1:-1)),u=e.documentTop;if(l)o??=l.left-c.left,s=a<0?l.top:l.bottom;else{let t=e.viewState.lineBlockAt(i);o??=Math.min(c.right-c.left,e.defaultCharacterWidth*(i-t.from)),s=(a<0?t.top:t.bottom)+u}let d=c.left+o,f=e.viewState.heightOracle.textHeight>>1,p=r??f;for(let t=0;;t+=f){let r=s+(p+t)*a,i=uI(e,{x:d,y:r},!1,a);if(n?r>c.bottom:r<c.top)return K.cursor(i.pos,i.assoc);let l=e.coordsAtPos(i.pos,i.assoc),u=l?(l.top+l.bottom)/2:0;if(!l||(n?u>s:u<s))return K.cursor(i.pos,i.assoc,void 0,o)}}function oI(e,t,n){for(;;){let r=0;for(let i of e)i.between(t-1,t+1,(e,i,a)=>{if(t>e&&t<i){let a=r||n||(t-e<i-t?-1:1);t=a<0?e:i,r=a}});if(!r)return t}}function sI(e,t){let n=null;for(let r=0;r<t.ranges.length;r++){let i=t.ranges[r],a=null;if(i.empty){let t=oI(e,i.from,0);t!=i.from&&(a=K.cursor(t,-1))}else{let t=oI(e,i.from,-1),n=oI(e,i.to,1);(t!=i.from||n!=i.to)&&(a=i.undirectional?K.undirectionalRange(i.from,i.to):K.range(i.from==i.anchor?t:n,i.from==i.head?t:n))}a&&(n||=t.ranges.slice(),n[r]=a)}return n?K.create(n,t.mainIndex):t}function cI(e,t,n){let r=oI(e.state.facet(rF).map(t=>t(e)),n.from,t.head>n.from?-1:1);return r==n.from?n:K.cursor(r,r<n.from?1:-1)}var lI=class{constructor(e,t){this.pos=e,this.assoc=t}};function uI(e,t,n,r){let i=e.contentDOM.getBoundingClientRect(),a=i.top+e.viewState.paddingTop,{x:o,y:s}=t,c=s-a,l;for(;;){if(c<0)return new lI(0,1);if(c>e.viewState.docHeight)return new lI(e.state.doc.length,-1);if(l=e.elementAtHeight(c),r==null)break;if(l.type==CN.Text){if(r<0?l.to<e.viewport.from:l.from>e.viewport.to)break;let t=e.docView.coordsAt(r<0?l.from:l.to,r>0?-1:1);if(t&&(r<0?t.top<=c+a:t.bottom>=c+a))break}let t=e.viewState.heightOracle.textHeight/2;c=r>0?l.bottom+t:l.top-t}if(e.viewport.from>=l.to||e.viewport.to<=l.from){if(n)return null;if(l.type==CN.Text){let t=eI(e,i,l,o,s);return new lI(t,t==l.from?1:-1)}}if(l.type!=CN.Text)return c<(l.top+l.bottom)/2?new lI(l.from,1):new lI(l.to,-1);let u=e.docView.lineAt(l.from,2);return(!u||u.length!=l.length)&&(u=e.docView.lineAt(l.from,-2)),new dI(e,o,s,e.textDirectionAt(l.from)).scanTile(u,l.from)}var dI=class{constructor(e,t,n,r){this.view=e,this.x=t,this.y=n,this.baseDir=r,this.line=null,this.spans=null}bidiSpansAt(e){return(!this.line||this.line.from>e||this.line.to<e)&&(this.line=this.view.state.doc.lineAt(e),this.spans=this.view.bidiSpans(this.line)),this}baseDirAt(e,t){let{line:n,spans:r}=this.bidiSpansAt(e);return r[vP.find(r,e-n.from,-1,t)].level==this.baseDir}dirAt(e,t){let{line:n,spans:r}=this.bidiSpansAt(e);return r[vP.find(r,e-n.from,-1,t)].dir}bidiIn(e,t){let{spans:n,line:r}=this.bidiSpansAt(e);return n.length>1||n.length&&(n[0].level!=this.baseDir||n[0].to+r.from<t)}scan(e,t,n=!1){let r=0,i=e.length-1,a=new Set,o=this.bidiIn(e[0],e[i]),s,c,l=-1,u=1e9,d;search:for(;r<i;){let n=i-r,f=r+i>>1;adjust:if(a.has(f)){for(let e=1;e<n;e++){let t=f+e;if(t>=i&&(t-=n),!a.has(t)){f=t;break adjust}}break search}a.add(f);let p=t(f),m=0;if(p)for(let e=0;e<p.length;e++){let t=p[e];if(!(t.width==0&&p.length>1)){if(t.bottom<this.y)(!s||s.bottom<t.bottom)&&(s=t),m=1;else if(t.top>this.y)(!c||c.top>t.top)&&(c=t),m=-1;else{let e=t.left>this.x?this.x-t.left:t.right<this.x?this.x-t.right:0,n=Math.abs(e);n<u&&(l=f,u=n,d=t),e&&(m=e<0==(this.baseDir==cP.LTR)?-1:1)}}}m==-1&&(!o||this.baseDirAt(e[f],1))?i=f:m==1&&(!o||this.baseDirAt(e[f+1],-1))&&(r=f+1)}if(!d){if(!c&&!s)return{i:0,after:!1};let n=s&&(!c||this.y-s.bottom<c.top-this.y)?s:c;return this.y=(n.top+n.bottom)/2,this.scan(e,t,!0)}if(u&&!n){let{top:n,bottom:r}=d;if(s&&s.bottom>(n+n+r)/3)return this.y=s.bottom-1,this.scan(e,t,!0);if(c&&c.top<(n+r+r)/3)return this.y=c.top+1,this.scan(e,t,!0)}let f=(o?this.dirAt(e[l],1):this.baseDir)==cP.LTR;return{i:l,after:this.x>(d.left+d.right)/2==f}}scanText(e,t){let n=[];for(let r=0;r<e.length;r=hj(e.text,r))n.push(t+r);n.push(t+e.length);let r=this.scan(n,r=>{let i=n[r]-t,a=n[r+1]-t;return eP(e.dom,i,a).getClientRects()});return r.after?new lI(n[r.i+1],-1):new lI(n[r.i],1)}scanTile(e,t){if(!e.length)return new lI(t,1);if(e.children.length==1){let n=e.children[0];if(n.isText())return this.scanText(n,t);if(n.isComposite())return this.scanTile(n,t)}let n=[t];for(let r=0,i=t;r<e.children.length;r++)n.push(i+=e.children[r].length);let r=this.scan(n,t=>{let n=e.children[t];return n.flags&48?null:(MN(n.dom)?n.dom:eP(n.dom,0,n.length)).getClientRects()}),i=e.children[r.i],a=n[r.i];return i.isText()?this.scanText(i,a):i.isComposite()?this.scanTile(i,a):r.after?new lI(n[r.i+1],-1):new lI(a,1)}},fI=`￿`,pI=class{constructor(e,t){this.points=e,this.view=t,this.text=``,this.lineSeparator=t.state.facet(SM.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=fI}readRange(e,t){if(!e)return this;let n=e.parentNode;for(let r=e;;){this.findPointBefore(n,r);let e=this.text.length;this.readNode(r);let i=pF.get(r),a=r.nextSibling;if(a==t){i?.breakAfter&&!a&&n!=this.view.contentDOM&&this.lineBreak();break}let o=pF.get(a);(i&&o?i.breakAfter:(i?i.breakAfter:BN(r))||BN(a)&&(r.nodeName!=`BR`||i?.isWidget())&&this.text.length>e)&&!hI(a,t)&&this.lineBreak(),r=a}return this.findPointBefore(n,t),this}readTextNode(e){let t=e.nodeValue;for(let n of this.points)n.node==e&&(n.pos=this.text.length+Math.min(n.offset,t.length));for(let n=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let i=-1,a=1,o;if(this.lineSeparator?(i=t.indexOf(this.lineSeparator,n),a=this.lineSeparator.length):(o=r.exec(t))&&(i=o.index,a=o[0].length),this.append(t.slice(n,i<0?t.length:i)),i<0)break;if(this.lineBreak(),a>1)for(let t of this.points)t.node==e&&t.pos>this.text.length&&(t.pos-=a-1);n=i+a}}readNode(e){let t=pF.get(e),n=t&&t.overrideDOMText;if(n!=null){this.findPointInside(e,n.length);for(let e=n.iter();!e.next().done;)e.lineBreak?this.lineBreak():this.append(e.value)}else NN(e)?this.readTextNode(e):e.nodeName==`BR`?e.nextSibling&&this.lineBreak():MN(e)&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let n of this.points)n.node==e&&e.childNodes[n.offset]==t&&(n.pos=this.text.length)}findPointInside(e,t){for(let n of this.points)(NN(e)?n.node==e:e.contains(n.node))&&(n.pos=this.text.length+(mI(e,n.node,n.offset)?t:0))}};function mI(e,t,n){for(;;){if(!t||n<HN(t))return!1;if(t==e)return!0;n=zN(t)+1,t=t.parentNode}}function hI(e,t){let n;for(;e!=t&&e;e=e.nextSibling){let t=pF.get(e);if(!t?.isWidget())return!1;t&&(n||=[]).push(t)}if(n){for(let e of n)if(e.overrideDOMText?.length)return!1}return!0}var gI=class{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}},_I=class{constructor(e,t,n,r){this.typeOver=r,this.bounds=null,this.text=``,this.domChanged=t>-1;let{impreciseHead:i,impreciseAnchor:a}=e.docView,o=e.state.selection;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=vI(e.docView.tile,t,n,0))){let t=i||a?[]:CI(e),n=new pI(t,e);n.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=n.text,this.newSel=wI(t,this.bounds.from)}else{let t=e.observer.selectionRange,n=i&&i.node==t.focusNode&&i.offset==t.focusOffset||!FN(e.contentDOM,t.focusNode)?o.main.head:e.docView.posFromDOM(t.focusNode,t.focusOffset),r=a&&a.node==t.anchorNode&&a.offset==t.anchorOffset||!FN(e.contentDOM,t.anchorNode)?o.main.anchor:e.docView.posFromDOM(t.anchorNode,t.anchorOffset),s=e.viewport;if((q.ios||q.chrome)&&n!=r&&Math.min(n,r)<=o.main.from&&Math.max(n,r)>=o.main.to&&(s.from>0||s.to<e.state.doc.length)){let t=Math.min(n,r),i=Math.max(n,r),a=s.from-t,o=s.to-i;(a==0||a==1||t==0)&&(o==0||o==-1||i==e.state.doc.length)&&(n=0,r=e.state.doc.length)}if(e.inputState.composing>-1&&o.ranges.length>1)this.newSel=o.replaceRange(K.range(r,n));else if(e.lineWrapping&&r==n&&!(o.main.empty&&o.main.head==n)&&e.inputState.lastTouchTime>Date.now()-100){let t=e.coordsAtPos(n,-1),r=0;t&&(r=e.inputState.lastTouchY<=t.bottom?-1:1),this.newSel=K.create([K.cursor(n,r)])}else this.newSel=K.single(r,n)}}};function vI(e,t,n,r){if(e.isComposite()){let i=-1,a=-1,o=-1,s=-1;for(let c=0,l=r,u=r;c<e.children.length;c++){let r=e.children[c],d=l+r.length;if(l<t&&d>n)return vI(r,t,n,l);if(d>=t&&i==-1&&(i=c,a=l),l>n&&r.dom.parentNode==e.dom){o=c,s=u;break}u=d,l=d+r.breakAfter}return{from:a,to:s<0?r+e.length:s,startDOM:(i?e.children[i-1].dom.nextSibling:null)||e.dom.firstChild,endDOM:o<e.children.length&&o>=0?e.children[o].dom:null}}return e.isText()?{from:r,to:r+e.length,startDOM:e.dom,endDOM:e.dom.nextSibling}:null}function yI(e,t){let n,{newSel:r}=t,{state:i}=e,a=i.selection.main,o=e.inputState.lastKeyTime>Date.now()-100?e.inputState.lastKeyCode:-1;if(t.bounds){let{from:e,to:r}=t.bounds,s=a.from,c=null;(o===8||q.android&&t.text.length<r-e)&&(s=a.to,c=`end`);let l=i.doc.sliceString(e,r,fI),u,d;!a.empty&&a.from>=e&&a.to<=r&&(t.typeOver||l!=t.text)&&l.slice(0,a.from-e)==t.text.slice(0,a.from-e)&&l.slice(a.to-e)==t.text.slice(u=t.text.length-(l.length-(a.to-e)))?n={from:a.from,to:a.to,insert:ij.of(t.text.slice(a.from-e,u).split(fI))}:(d=SI(l,t.text,s-e,c))&&(q.chrome&&o==13&&d.toB==d.from+2&&t.text.slice(d.from,d.toB)==`￿￿`&&d.toB--,n={from:e+d.from,to:e+d.toA,insert:ij.of(t.text.slice(d.from,d.toB).split(fI))})}else r&&(!e.hasFocus&&i.facet(qP)||TI(r,a))&&(r=null);if(!n&&!r)return!1;if((q.mac||q.android)&&n&&n.from==n.to&&n.from==a.head-1&&/^\. ?$/.test(n.insert.toString())&&e.contentDOM.getAttribute(`autocorrect`)==`off`?(r&&n.insert.length==2&&(r=K.single(r.main.anchor-1,r.main.head-1)),n={from:n.from,to:n.to,insert:ij.of([n.insert.toString().replace(`.`,` `)])}):i.doc.lineAt(a.from).to<a.to&&e.docView.lineHasWidget(a.to)&&e.inputState.insertingTextAt>Date.now()-50?n={from:a.from,to:a.to,insert:i.toText(e.inputState.insertingText)}:q.chrome&&n&&n.from==n.to&&n.from==a.head&&n.insert.toString()==`
30
+ `&&e.lineWrapping&&(r&&=K.single(r.main.anchor-1,r.main.head-1),n={from:a.from,to:a.to,insert:ij.of([` `])}),n)return bI(e,n,r,o);if(r&&!TI(r,a)){let t=!1,n=`select`;return e.inputState.lastSelectionTime>Date.now()-50&&(e.inputState.lastSelectionOrigin==`select`&&(t=!0),n=e.inputState.lastSelectionOrigin,n==`select.pointer`&&(r=sI(i.facet(rF).map(t=>t(e)),r))),e.dispatch({selection:r,scrollIntoView:t,userEvent:n}),!0}return!1}function bI(e,t,n,r=-1){if(q.ios&&e.inputState.flushIOSKey(t))return!0;let i=e.state.selection.main;if(q.android&&(t.to==i.to&&(t.from==i.from||t.from==i.from-1&&e.state.sliceDoc(t.from,i.from)==` `)&&t.insert.length==1&&t.insert.lines==2&&tP(e.contentDOM,`Enter`,13)||(t.from==i.from-1&&t.to==i.to&&t.insert.length==0||r==8&&t.insert.length<t.to-t.from&&t.to>i.head)&&tP(e.contentDOM,`Backspace`,8)||t.from==i.from&&t.to==i.to+1&&t.insert.length==0&&tP(e.contentDOM,`Delete`,46)))return!0;let a=t.insert.toString();e.inputState.composing>=0&&e.inputState.composing++;let o,s=()=>o||=xI(e,t,n);return e.state.facet(IP).some(n=>n(e,t.from,t.to,a,s))||e.dispatch(s()),!0}function xI(e,t,n){let r,i=e.state,a=i.selection.main,o=-1;if(t.from==t.to&&t.from<a.from||t.from>a.to){let n=t.from<a.from?-1:1,r=n<0?a.from:a.to,s=oI(i.facet(rF).map(t=>t(e)),r,n);t.from==s&&(o=s)}if(o>-1)r={changes:t,selection:K.cursor(t.from+t.insert.length,-1)};else if(t.from>=a.from&&t.to<=a.to&&t.to-t.from>=(a.to-a.from)/3&&(!n||n.main.empty&&n.main.from==t.from+t.insert.length)&&e.inputState.composing<0){let n=a.from<t.from?i.sliceDoc(a.from,t.from):``,o=a.to>t.to?i.sliceDoc(t.to,a.to):``;r=i.replaceSelection(e.state.toText(n+t.insert.sliceString(0,void 0,e.state.lineBreak)+o))}else{let o=i.changes(t),s=n&&n.main.to<=o.newLength?n.main:void 0;if(i.selection.ranges.length>1&&(e.inputState.composing>=0||e.inputState.compositionPendingChange)&&t.to<=a.to+10&&t.to>=a.to-10){let c=e.state.sliceDoc(t.from,t.to),l,u=n&&UF(e,n.main.head);if(u){let e=t.insert.length-(t.to-t.from);l={from:u.from,to:u.to-e}}else l=e.state.doc.lineAt(a.head);let d=a.to-t.to;r=i.changeByRange(n=>{if(n.from==a.from&&n.to==a.to)return{changes:o,range:s||n.map(o)};let r=n.to-d,u=r-c.length;if(e.state.sliceDoc(u,r)!=c||r>=l.from&&u<=l.to)return{range:n};let f=i.changes({from:u,to:r,insert:t.insert}),p=n.to-a.to;return{changes:f,range:s?K.range(Math.max(0,s.anchor+p),Math.max(0,s.head+p)):n.map(f)}})}else r={changes:o,selection:s&&i.selection.replaceRange(s)}}let s=`input.type`;return(e.composing||e.inputState.compositionPendingChange&&e.inputState.compositionEndedAt>Date.now()-50)&&(e.inputState.compositionPendingChange=!1,s+=`.compose`,e.inputState.compositionFirstChange&&(s+=`.start`,e.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:s,scrollIntoView:!0})}function SI(e,t,n,r){let i=Math.min(e.length,t.length),a=0;for(;a<i&&e.charCodeAt(a)==t.charCodeAt(a);)a++;if(a==i&&e.length==t.length)return null;let o=e.length,s=t.length;for(;o>0&&s>0&&e.charCodeAt(o-1)==t.charCodeAt(s-1);)o--,s--;if(r==`end`){let e=Math.max(0,a-Math.min(o,s));n-=o+e-a}if(o<a&&e.length<t.length){let e=n<=a&&n>=o?a-n:0;a-=e,s=a+(s-o),o=a}else if(s<a){let e=n<=a&&n>=s?a-n:0;a-=e,o=a+(o-s),s=a}return{from:a,toA:o,toB:s}}function CI(e){let t=[];if(e.root.activeElement!=e.contentDOM)return t;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:a}=e.observer.selectionRange;return n&&(t.push(new gI(n,r)),(i!=n||a!=r)&&t.push(new gI(i,a))),t}function wI(e,t){if(e.length==0)return null;let n=e[0].pos,r=e.length==2?e[1].pos:n;return n<0||r<0?null:n==r?K.create([K.cursor(r+t,-1)]):K.single(n+t,r+t)}function TI(e,t){return t.head==e.main.head&&t.anchor==e.main.anchor}var EI=class{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.touchActive=!1,this.lastTouchTime=0,this.lastTouchX=0,this.lastTouchY=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.lastWheelEvent=0,this.pendingIOSKey=void 0,this.lastIOSMomentumScroll=0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText=``,this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,q.safari&&e.contentDOM.addEventListener(`input`,()=>null),q.gecko&&lL(e.contentDOM.ownerDocument)}handleEvent(e){BI(this.view,e)&&!this.ignoreDuringComposition(e)&&(e.type==`keydown`&&this.keydown(e)||(this.view.updateState==0?this.runHandlers(e.type,e):Promise.resolve().then(()=>this.runHandlers(e.type,e))))}runHandlers(e,t){let n=this.handlers[e];if(n){for(let e of n.observers)e(this.view,t);for(let e of n.handlers){if(t.defaultPrevented)break;if(e(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=kI(e),n=this.handlers,r=this.view.contentDOM;for(let e in t)if(e!=`scroll`){let i=!t[e].handlers.length,a=n[e];a&&i!=!a.handlers.length&&(r.removeEventListener(e,this.handleEvent),a=null),a||r.addEventListener(e,this.handleEvent,{passive:i})}for(let e in n)e!=`scroll`&&!t[e]&&r.removeEventListener(e,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&MI.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),q.android&&q.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;if(q.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&(AI.some(t=>t.keyCode==e.keyCode)&&!e.ctrlKey||jI.indexOf(e.key)>-1&&e.ctrlKey)){let t={ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey,shiftKey:e.shiftKey};t.shiftKey&&q.ios&&!/^(off|none)$/.test(this.view.contentDOM.autocapitalize)&&DI(this.view.win)&&(t.shiftKey=!1);let n=this.pendingIOSKey={key:e.key,keyCode:e.keyCode,mods:t};return setTimeout(()=>{this.pendingIOSKey==n&&this.flushIOSKey()},50),!0}return e.keyCode!=229&&this.view.observer.forceFlush(),!1}flushIOSKey(e){let t=this.pendingIOSKey;return!t||this.view.observer.pendingRecords().length||t.key==`Enter`&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,tP(this.view.contentDOM,t.key,t.keyCode,t.mods))}ignoreDuringComposition(e){return!/^key/.test(e.type)||e.synthetic?!1:this.composing>0?!0:q.safari&&!q.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}};function DI(e){return e.visualViewport?e.visualViewport.height*e.visualViewport.scale/e.document.documentElement.clientHeight<.85:!1}function OI(e,t){return(n,r)=>{try{return t.call(e,r,n)}catch(e){KP(n.state,e)}}}function kI(e){let t=Object.create(null);function n(e){return t[e]||(t[e]={observers:[],handlers:[]})}for(let t of e){let e=t.spec,r=e&&e.plugin.domEventHandlers,i=e&&e.plugin.domEventObservers;if(r)for(let e in r){let i=r[e];i&&n(e).handlers.push(OI(t.value,i))}if(i)for(let e in i){let r=i[e];r&&n(e).observers.push(OI(t.value,r))}}for(let e in VI)n(e).handlers.push(VI[e]);for(let e in HI)n(e).observers.push(HI[e]);return t}var AI=[{key:`Backspace`,keyCode:8,inputType:`deleteContentBackward`},{key:`Enter`,keyCode:13,inputType:`insertParagraph`},{key:`Enter`,keyCode:13,inputType:`insertLineBreak`},{key:`Delete`,keyCode:46,inputType:`deleteContentForward`}],jI=`dthko`,MI=[16,17,18,20,91,92,224,225],NI=6;function PI(e){return Math.max(0,e)*.7+8}function FI(e,t){return Math.max(Math.abs(e.clientX-t.clientX),Math.abs(e.clientY-t.clientY))}var II=class{constructor(e,t,n,r){this.view=e,this.startEvent=t,this.style=n,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=qN(e.contentDOM),this.atoms=e.state.facet(rF).map(t=>t(e));let i=e.contentDOM.ownerDocument;i.addEventListener(`mousemove`,this.move=this.move.bind(this)),i.addEventListener(`mouseup`,this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(SM.allowMultipleSelections)&&LI(e,t),this.dragging=zI(e,t)&&QI(t)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&FI(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,n=0,r=0,i=0,a=this.view.win.innerWidth,o=this.view.win.innerHeight;this.scrollParents.x&&({left:r,right:a}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:i,bottom:o}=this.scrollParents.y.getBoundingClientRect());let s=cF(this.view);e.clientX-s.left<=r+NI?t=-PI(r-e.clientX):e.clientX+s.right>=a-NI&&(t=PI(e.clientX-a)),e.clientY-s.top<=i+NI?n=-PI(i-e.clientY):e.clientY+s.bottom>=o-NI&&(n=PI(e.clientY-o)),this.setScrollSpeed(t,n)}up(e){this.dragging??this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener(`mousemove`,this.move),e.removeEventListener(`mouseup`,this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),this.dragging===!1&&this.select(this.lastEvent)}select(e){let{view:t}=this,n=sI(this.atoms,this.style.get(e,this.extend,this.multiple));(this.mustSelect||!n.eq(t.state.selection,this.dragging===!1))&&this.view.dispatch({selection:n,userEvent:`select.pointer`}),this.mustSelect=!1}update(e){e.transactions.some(e=>e.isUserEvent(`input.type`))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}};function LI(e,t){let n=e.state.facet(jP);return n.length?n[0](t):q.mac?t.metaKey:t.ctrlKey}function RI(e,t){let n=e.state.facet(MP);return n.length?n[0](t):q.mac?!t.altKey:!t.ctrlKey}function zI(e,t){let{main:n}=e.state.selection;if(n.empty)return!1;let r=PN(e.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let e=0;e<i.length;e++){let n=i[e];if(n.left<=t.clientX&&n.right>=t.clientX&&n.top<=t.clientY&&n.bottom>=t.clientY)return!0}return!1}function BI(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target,r;n!=e.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(r=pF.get(n))&&r.isWidget()&&!r.isHidden&&r.widget.ignoreEvent(t))return!1;return!0}var VI=Object.create(null),HI=Object.create(null),UI=q.ie&&q.ie_version<15||q.ios&&q.webkit_version<604;function WI(e){let t=e.dom.parentNode;if(!t)return;let n=t.appendChild(document.createElement(`textarea`));n.style.cssText=`position: fixed; left: -10000px; top: 10px`,n.focus(),setTimeout(()=>{e.focus(),n.remove(),KI(e,n.value)},50)}function GI(e,t,n){for(let r of e.facet(t))n=r(n,e);return n}function KI(e,t){t=GI(e.state,RP,t);let{state:n}=e,r,i=1,a=n.toText(t),o=a.lines==n.selection.ranges.length;if(iL!=null&&n.selection.ranges.every(e=>e.empty)&&iL==a.toString()){let e=-1;r=n.changeByRange(r=>{let s=n.doc.lineAt(r.from);if(s.from==e)return{range:r};e=s.from;let c=n.toText((o?a.line(i++).text:t)+n.lineBreak);return{changes:{from:s.from,insert:c},range:K.cursor(r.from+c.length,-1)}})}else r=o?n.changeByRange(e=>{let t=a.line(i++);return{changes:{from:e.from,to:e.to,insert:t.text},range:K.cursor(e.from+t.length,-1)}}):n.replaceSelection(a);e.dispatch(r,{userEvent:`input.paste`,scrollIntoView:!0})}HI.scroll=e=>{let t=e.inputState;t.lastScrollTop=e.scrollDOM.scrollTop,t.lastScrollLeft=e.scrollDOM.scrollLeft,q.ios&&!t.touchActive&&(t.lastIOSMomentumScroll=Date.now())},HI.wheel=HI.mousewheel=e=>{e.inputState.lastWheelEvent=Date.now()},VI.keydown=(e,t)=>(e.inputState.setSelectionOrigin(`select`),t.keyCode==27&&e.inputState.tabFocusMode!=0&&(e.inputState.tabFocusMode=Date.now()+2e3),!1),HI.touchstart=(e,t)=>{let n=e.inputState,r=t.targetTouches[0];n.touchActive=!0,n.lastTouchTime=Date.now(),r&&(n.lastTouchX=r.clientX,n.lastTouchY=r.clientY),n.setSelectionOrigin(`select.pointer`)},HI.touchmove=e=>{e.inputState.setSelectionOrigin(`select.pointer`)},HI.touchend=(e,t)=>{e.inputState.touchActive=!1},VI.mousedown=(e,t)=>{if(e.observer.flush(),e.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let r of e.state.facet(NP))if(n=r(e,t),n)break;if(!n&&t.button==0&&(n=$I(e,t)),n){let r=!e.hasFocus;e.inputState.startMouseSelection(new II(e,t,n,r)),r&&e.observer.ignore(()=>{QN(e.contentDOM);let t=e.root.activeElement;t&&!t.contains(e.contentDOM)&&t.blur()});let i=e.inputState.mouseSelection;if(i)return i.start(t),i.dragging===!1}else e.inputState.setSelectionOrigin(`select.pointer`);return!1};function qI(e,t,n,r){if(r==1)return K.cursor(t,n);if(r==2)return $F(e.state,t,n);{let r=e.docView.lineAt(t,n),i=e.state.doc.lineAt(r?r.posAtEnd:t),a=r?r.posAtStart:i.from,o=r?r.posAtEnd:i.to;return o<e.state.doc.length&&o==i.to&&o++,K.undirectionalRange(a,o)}}var JI=q.ie&&q.ie_version<=11,YI=null,XI=0,ZI=0;function QI(e){if(!JI)return e.detail;let t=YI,n=ZI;return YI=e,ZI=Date.now(),XI=!t||n>Date.now()-400&&Math.abs(t.clientX-e.clientX)<2&&Math.abs(t.clientY-e.clientY)<2?(XI+1)%3:1}function $I(e,t){let n=e.posAndSideAtCoords({x:t.clientX,y:t.clientY},!1),r=QI(t),i=e.state.selection;return{update(e){e.docChanged&&(n.pos=e.changes.mapPos(n.pos),i=i.map(e.changes))},get(t,a,o){let s=e.posAndSideAtCoords({x:t.clientX,y:t.clientY},!1),c,l=qI(e,s.pos,s.assoc,r);if(n.pos!=s.pos&&!a){let t=qI(e,n.pos,n.assoc,r),i=Math.min(t.from,l.from),a=Math.max(t.to,l.to);l=i<l.from?K.range(i,a,l.assoc):K.range(a,i,l.assoc)}return a?i.replaceRange(i.main.extend(l.from,l.to,l.assoc)):o&&r==1&&i.ranges.length>1&&(c=eL(i,s.pos))?c:o?i.addRange(l):K.create([l])}}}function eL(e,t){for(let n=0;n<e.ranges.length;n++){let{from:r,to:i}=e.ranges[n];if(r<=t&&i>=t)return K.create(e.ranges.slice(0,n).concat(e.ranges.slice(n+1)),e.mainIndex==n?0:e.mainIndex-+(e.mainIndex>n))}return null}VI.dragstart=(e,t)=>{let{selection:{main:n}}=e.state;if(t.target.draggable){let r=e.docView.tile.nearest(t.target);if(r&&r.isWidget()){let e=r.posAtStart,t=e+r.length;(e>=n.to||t<=n.from)&&(n=K.undirectionalRange(e,t))}}let{inputState:r}=e;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,t.dataTransfer&&(t.dataTransfer.setData(`Text`,GI(e.state,zP,e.state.sliceDoc(n.from,n.to))),t.dataTransfer.effectAllowed=`copyMove`),!1},VI.dragend=e=>(e.inputState.draggedContent=null,!1);function tL(e,t,n,r){if(n=GI(e.state,RP,n),!n)return;let i=e.posAtCoords({x:t.clientX,y:t.clientY},!1),{draggedContent:a}=e.inputState,o=r&&a&&RI(e,t)?{from:a.from,to:a.to}:null,s={from:i,insert:n},c=e.state.changes(o?[o,s]:s);e.focus(),e.dispatch({changes:c,selection:{anchor:c.mapPos(i,-1),head:c.mapPos(i,1)},userEvent:o?`move.drop`:`input.drop`}),e.inputState.draggedContent=null}VI.drop=(e,t)=>{if(!t.dataTransfer)return!1;if(e.state.readOnly)return!0;let n=t.dataTransfer.files;if(n&&n.length){let r=Array(n.length),i=0,a=()=>{++i==n.length&&tL(e,t,r.filter(e=>e!=null).join(e.state.lineBreak),!1)};for(let e=0;e<n.length;e++){let t=new FileReader;t.onerror=a,t.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(t.result)||(r[e]=t.result),a()},t.readAsText(n[e])}return!0}{let n=t.dataTransfer.getData(`Text`);if(n)return tL(e,t,n,!0),!0}return!1},VI.paste=(e,t)=>{if(e.state.readOnly)return!0;e.observer.flush();let n=UI?null:t.clipboardData;return n?(KI(e,n.getData(`text/plain`)||n.getData(`text/uri-list`)),!0):(WI(e),!1)};function nL(e,t){let n=e.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement(`textarea`));r.style.cssText=`position: fixed; left: -10000px; top: 10px`,r.value=t,r.focus(),r.selectionEnd=t.length,r.selectionStart=0,setTimeout(()=>{r.remove(),e.focus()},50)}function rL(e){let t=[],n=[],r=!1;for(let r of e.selection.ranges)r.empty||(t.push(e.sliceDoc(r.from,r.to)),n.push(r));if(!t.length){let i=-1;for(let{from:r}of e.selection.ranges){let a=e.doc.lineAt(r);a.number>i&&(t.push(a.text),n.push({from:a.from,to:Math.min(e.doc.length,a.to+1)})),i=a.number}r=!0}return{text:GI(e,zP,t.join(e.lineBreak)),ranges:n,linewise:r}}var iL=null;VI.copy=VI.cut=(e,t)=>{if(!IN(e.contentDOM,e.observer.selectionRange))return!1;let{text:n,ranges:r,linewise:i}=rL(e.state);if(!n&&!i)return!1;iL=i?n:null,t.type==`cut`&&!e.state.readOnly&&e.dispatch({changes:r,scrollIntoView:!0,userEvent:`delete.cut`});let a=UI?null:t.clipboardData;return a?(a.clearData(),a.setData(`text/plain`,n),!0):(nL(e,n),!1)};var aL=iM.define();function oL(e,t){let n=[];for(let r of e.facet(LP)){let i=r(e,t);i&&n.push(i)}return n.length?e.update({effects:n,annotations:aL.of(!0)}):null}function sL(e){setTimeout(()=>{let t=e.hasFocus;if(t!=e.inputState.notifiedFocused){let n=oL(e.state,t);n?e.dispatch(n):e.update([])}},10)}HI.focus=e=>{e.inputState.lastFocusTime=Date.now(),!e.scrollDOM.scrollTop&&(e.inputState.lastScrollTop||e.inputState.lastScrollLeft)&&(e.scrollDOM.scrollTop=e.inputState.lastScrollTop,e.scrollDOM.scrollLeft=e.inputState.lastScrollLeft),sL(e)},HI.blur=e=>{e.observer.clearSelectionRange(),sL(e)},HI.compositionstart=HI.compositionupdate=(e,t)=>{if(!e.observer.editContext&&(e.inputState.compositionFirstChange??(e.inputState.compositionFirstChange=!0),e.inputState.composing<0)){let{main:t}=e.state.selection;!t.empty&&e.lineBlockAt(t.from).from!=e.lineBlockAt(t.to).from&&!e.state.readOnly&&e.dispatch({changes:e.state.selection.ranges.filter(e=>!e.empty).map(e=>({from:e.from,to:e.to})),userEvent:`input`}),e.inputState.composing=0}},HI.compositionend=e=>{e.observer.editContext||(e.inputState.composing=-1,e.inputState.compositionEndedAt=Date.now(),e.inputState.compositionPendingKey=!0,e.inputState.compositionPendingChange=e.observer.pendingRecords().length>0,e.inputState.compositionFirstChange=null,q.chrome&&q.android?e.observer.flushSoon():e.inputState.compositionPendingChange?Promise.resolve().then(()=>e.observer.flush()):setTimeout(()=>{e.inputState.composing<0&&e.docView.hasComposition&&e.update([])},50))},HI.contextmenu=e=>{e.inputState.lastContextMenu=Date.now()},VI.beforeinput=(e,t)=>{if((t.inputType==`insertText`||t.inputType==`insertCompositionText`)&&(e.inputState.insertingText=t.data,e.inputState.insertingTextAt=Date.now()),t.inputType==`insertReplacementText`&&e.observer.editContext){let n=t.dataTransfer?.getData(`text/plain`),r=t.getTargetRanges();if(n&&r.length){let t=r[0];return bI(e,{from:e.posAtDOM(t.startContainer,t.startOffset),to:e.posAtDOM(t.endContainer,t.endOffset),insert:e.state.toText(n)},null),!0}}let n;if(q.chrome&&q.android&&(n=AI.find(e=>e.inputType==t.inputType))&&(e.observer.delayAndroidKey(n.key,n.keyCode),n.key==`Backspace`||n.key==`Delete`)){let t=window.visualViewport?.height||0;setTimeout(()=>{(window.visualViewport?.height||0)>t+10&&e.hasFocus&&(e.contentDOM.blur(),e.focus())},100)}return q.ios&&t.inputType==`deleteContentForward`&&e.observer.flushSoon(),q.safari&&t.inputType==`insertText`&&e.inputState.composing>=0&&setTimeout(()=>HI.compositionend(e,t),20),!1};var cL=new Set;function lL(e){cL.has(e)||(cL.add(e),e.addEventListener(`copy`,()=>{}),e.addEventListener(`cut`,()=>{}))}var uL=[`pre-wrap`,`normal`,`pre-line`,`break-spaces`],dL=!1;function fL(){dL=!1}var pL=class{constructor(e){this.lineWrapping=e,this.doc=ij.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let n=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((t-e-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return uL.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];r<0?n++:this.heightSamples[Math.floor(r*10)]||(t=!0,this.heightSamples[Math.floor(r*10)]=!0)}return t}refresh(e,t,n,r,i,a){let o=uL.indexOf(e)>-1,s=Math.abs(t-this.lineHeight)>.3||this.lineWrapping!=o;if(this.lineWrapping=o,this.lineHeight=t,this.charWidth=n,this.textHeight=r,this.lineLength=i,s){this.heightSamples={};for(let e=0;e<a.length;e++){let t=a[e];t<0?e++:this.heightSamples[Math.floor(t*10)]=!0}}return s}},mL=class{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}},hL=class e{constructor(e,t,n,r,i){this.from=e,this.length=t,this.top=n,this.height=r,this._content=i}get type(){return typeof this._content==`number`?CN.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof DN?this._content.widget:null}get widgetLineBreaks(){return typeof this._content==`number`?this._content:0}join(t){let n=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(t._content)?t._content:[t]);return new e(this.from,this.length+t.length,this.top,this.height+t.height,n)}},gL=(function(e){return e[e.ByPos=0]=`ByPos`,e[e.ByHeight=1]=`ByHeight`,e[e.ByPosNoHeight=2]=`ByPosNoHeight`,e})(gL||={}),_L=.001,vL=class e{constructor(e,t,n=2){this.length=e,this.height=t,this.flags=n}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>_L&&(dL=!0),this.height=e)}replace(t,n,r){return e.of(r)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,n,r){let i=this,a=n.doc;for(let o=r.length-1;o>=0;o--){let{fromA:s,toA:c,fromB:l,toB:u}=r[o],d=i.lineAt(s,gL.ByPosNoHeight,n.setDoc(t),0,0),f=d.to>=c?d:i.lineAt(c,gL.ByPosNoHeight,n,0,0);for(u+=f.to-c,c=f.to;o>0&&d.from<=r[o-1].toA;)s=r[o-1].fromA,l=r[o-1].fromB,o--,s<d.from&&(d=i.lineAt(s,gL.ByPosNoHeight,n,0,0));l+=d.from-s,s=d.from;let p=DL.build(n.setDoc(a),e,l,u);i=yL(i,i.replace(s,c,p))}return i.updateHeight(n,0)}static empty(){return new SL(0,0,0)}static of(t){if(t.length==1)return t[0];let n=0,r=t.length,i=0,a=0;for(;;)if(n==r){if(i>a*2){let e=t[n-1];e.break?t.splice(--n,1,e.left,null,e.right):t.splice(--n,1,e.left,e.right),r+=1+e.break,i-=e.size}else if(a>i*2){let e=t[r];e.break?t.splice(r,1,e.left,null,e.right):t.splice(r,1,e.left,e.right),r+=2+e.break,a-=e.size}else break}else if(i<a){let e=t[n++];e&&(i+=e.size)}else{let e=t[--r];e&&(a+=e.size)}let o=!1;return t[n-1]==null?(o=!0,n--):t[n]??(o=!0,r++),new wL(e.of(t.slice(0,n)),o,e.of(t.slice(r)))}};function yL(e,t){return e==t?e:(e.constructor!=t.constructor&&(dL=!0),t)}vL.prototype.size=1;var bL=wN.replace({}),xL=class extends vL{constructor(e,t,n){super(e,t),this.deco=n,this.spaceAbove=0}mainBlock(e,t){return new hL(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.deco||0)}blockAt(e,t,n,r){return this.spaceAbove&&e<n+this.spaceAbove?new hL(r,0,n,this.spaceAbove,bL):this.mainBlock(n,r)}lineAt(e,t,n,r,i){let a=this.mainBlock(r,i);return this.spaceAbove?this.blockAt(0,n,r,i).join(a):a}forEachLine(e,t,n,r,i,a){e<=i+this.length&&t>=i&&a(this.lineAt(0,gL.ByPos,n,r,i))}setMeasuredHeight(e){let t=e.heights[e.index++];t<0?(this.spaceAbove=-t,t=e.heights[e.index++]):this.spaceAbove=0,this.setHeight(t)}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more&&this.setMeasuredHeight(r),this.outdated=!1,this}toString(){return`block(${this.length})`}},SL=class e extends xL{constructor(e,t,n){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0,this.spaceAbove=n}mainBlock(e,t){return new hL(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.breaks)}replace(t,n,r){let i=r[0];return r.length==1&&(i instanceof e||i instanceof CL&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof CL?i=new e(i.length,this.height,this.spaceAbove):i.height=this.height,this.outdated||(i.outdated=!1),i):vL.of(r)}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more?this.setMeasuredHeight(r):(n||this.outdated)&&(this.spaceAbove=0,this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight)),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:``}${this.widgetHeight?`:`+this.widgetHeight:``})`}},CL=class e extends vL{constructor(e){super(e,0)}heightMetrics(e,t){let n=e.doc.lineAt(t).number,r=e.doc.lineAt(t+this.length).number,i=r-n+1,a,o=0;if(e.lineWrapping){let t=Math.min(this.height,e.lineHeight*i);a=t/i,this.length>i+1&&(o=(this.height-t)/(this.length-i-1))}else a=this.height/i;return{firstLine:n,lastLine:r,perLine:a,perChar:o}}blockAt(e,t,n,r){let{firstLine:i,lastLine:a,perLine:o,perChar:s}=this.heightMetrics(t,r);if(t.lineWrapping){let i=r+(e<t.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-n)/this.height))*this.length)),a=t.doc.lineAt(i),c=o+a.length*s,l=Math.max(n,e-c/2);return new hL(a.from,a.length,l,c,0)}{let r=Math.max(0,Math.min(a-i,Math.floor((e-n)/o))),{from:s,length:c}=t.doc.line(i+r);return new hL(s,c,n+o*r,o,0)}}lineAt(e,t,n,r,i){if(t==gL.ByHeight)return this.blockAt(e,n,r,i);if(t==gL.ByPosNoHeight){let{from:t,to:r}=n.doc.lineAt(e);return new hL(t,r-t,0,0,0)}let{firstLine:a,perLine:o,perChar:s}=this.heightMetrics(n,i),c=n.doc.lineAt(e),l=o+c.length*s,u=c.number-a,d=r+o*u+s*(c.from-i-u);return new hL(c.from,c.length,Math.max(r,Math.min(d,r+this.height-l)),l,0)}forEachLine(e,t,n,r,i,a){e=Math.max(e,i),t=Math.min(t,i+this.length);let{firstLine:o,perLine:s,perChar:c}=this.heightMetrics(n,i);for(let l=e,u=r;l<=t;){let t=n.doc.lineAt(l);if(l==e){let n=t.number-o;u+=s*n+c*(e-i-n)}let r=s+c*t.length;a(new hL(t.from,t.length,u,r,0)),u+=r,l=t.to+1}}replace(t,n,r){let i=this.length-n;if(i>0){let t=r[r.length-1];t instanceof e?r[r.length-1]=new e(t.length+i):r.push(null,new e(i-1))}if(t>0){let n=r[0];n instanceof e?r[0]=new e(t+n.length):r.unshift(new e(t-1),null)}return vL.of(r)}decomposeLeft(t,n){n.push(new e(t-1),null)}decomposeRight(t,n){n.push(null,new e(this.length-t-1))}updateHeight(t,n=0,r=!1,i){let a=n+this.length;if(i&&i.from<=n+this.length&&i.more){let r=[],o=Math.max(n,i.from),s=-1;for(i.from>n&&r.push(new e(i.from-n-1).updateHeight(t,n));o<=a&&i.more;){let e=t.doc.lineAt(o).length;r.length&&r.push(null);let n=i.heights[i.index++],a=0;n<0&&(a=-n,n=i.heights[i.index++]),s==-1?s=n:Math.abs(n-s)>=_L&&(s=-2);let c=new SL(e,n,a);c.outdated=!1,r.push(c),o+=e+1}o<=a&&r.push(null,new e(a-o).updateHeight(t,o));let c=vL.of(r);return(s<0||Math.abs(c.height-this.height)>=_L||Math.abs(s-this.heightMetrics(t,n).perLine)>=_L)&&(dL=!0),yL(this,c)}return(r||this.outdated)&&(this.setHeight(t.heightForGap(n,n+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}},wL=class extends vL{constructor(e,t,n){super(e.length+ +!!t+n.length,e.height+n.height,+!!t|(e.outdated||n.outdated?2:0)),this.left=e,this.right=n,this.size=e.size+n.size}get break(){return this.flags&1}blockAt(e,t,n,r){let i=n+this.left.height;return e<i?this.left.blockAt(e,t,n,r):this.right.blockAt(e,t,i,r+this.left.length+this.break)}lineAt(e,t,n,r,i){let a=r+this.left.height,o=i+this.left.length+this.break,s=t==gL.ByHeight?e<a:e<o,c=s?this.left.lineAt(e,t,n,r,i):this.right.lineAt(e,t,n,a,o);if(this.break||(s?c.to<o:c.from>o))return c;let l=t==gL.ByPosNoHeight?gL.ByPosNoHeight:gL.ByPos;return s?c.join(this.right.lineAt(o,l,n,a,o)):this.left.lineAt(o,l,n,r,i).join(c)}forEachLine(e,t,n,r,i,a){let o=r+this.left.height,s=i+this.left.length+this.break;if(this.break)e<s&&this.left.forEachLine(e,t,n,r,i,a),t>=s&&this.right.forEachLine(e,t,n,o,s,a);else{let c=this.lineAt(s,gL.ByPos,n,r,i);e<c.from&&this.left.forEachLine(e,Math.min(t,c.from-1),n,r,i,a),c.to>=e&&c.from<=t&&a(c),t>c.to&&this.right.forEachLine(Math.max(e,c.to+1),t,n,o,s,a)}}replace(e,t,n){let r=this.left.length+this.break;if(t<r)return this.balanced(this.left.replace(e,t,n),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-r,t-r,n));let i=[];e>0&&this.decomposeLeft(e,i);let a=i.length;for(let e of n)i.push(e);if(e>0&&TL(i,a-1),t<this.length){let e=i.length;this.decomposeRight(t,i),TL(i,e)}return vL.of(i)}decomposeLeft(e,t){let n=this.left.length;if(e<=n)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&(n++,e>=n&&t.push(null)),e>n&&this.right.decomposeLeft(e-n,t)}decomposeRight(e,t){let n=this.left.length,r=n+this.break;if(e>=r)return this.right.decomposeRight(e-r,t);e<n&&this.left.decomposeRight(e,t),this.break&&e<r&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*t.size||t.size>2*e.size?vL.of(this.break?[e,null,t]:[e,t]):(this.left=yL(this.left,e),this.right=yL(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,n=!1,r){let{left:i,right:a}=this,o=t+i.length+this.break,s=null;return r&&r.from<=t+i.length&&r.more?s=i=i.updateHeight(e,t,n,r):i.updateHeight(e,t,n),r&&r.from<=o+a.length&&r.more?s=a=a.updateHeight(e,o,n,r):a.updateHeight(e,o,n),s?this.balanced(i,a):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?` `:`-`)+this.right}};function TL(e,t){let n,r;e[t]==null&&(n=e[t-1])instanceof CL&&(r=e[t+1])instanceof CL&&e.splice(t-1,3,new CL(n.length+1+r.length))}var EL=5,DL=class e{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let e=Math.min(t,this.lineEnd),n=this.nodes[this.nodes.length-1];n instanceof SL?n.length+=e-this.pos:(e>this.pos||!this.isCovered)&&this.nodes.push(new SL(e-this.pos,-1,0)),this.writtenTo=e,t>e&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,n){if(e<t||n.heightRelevant){let r=n.widget?n.widget.estimatedHeight:0,i=n.widget?n.widget.lineBreaks:0;r<0&&(r=this.oracle.lineHeight);let a=t-e;n.block?this.addBlock(new xL(a,r,n)):(a||i||r>=EL)&&this.addLineDeco(r,i,a)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new SL(this.pos-e,-1,0)),this.writtenTo=this.pos}blankContent(e,t){let n=new CL(t-e);return this.oracle.doc.lineAt(e).to==t&&(n.flags|=4),n}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof SL)return e;let t=new SL(0,-1,0);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos+=e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,n){let r=this.ensureLine();r.length+=n,r.collapsed+=n,r.widgetHeight=Math.max(r.widgetHeight,e),r.breaks+=t,this.writtenTo=this.pos+=n}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof SL)&&!this.isCovered?this.nodes.push(new SL(0,-1,0)):(this.writtenTo<this.pos||t==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let n=e;for(let e of this.nodes)e instanceof SL&&e.updateHeight(this.oracle,n),n+=e?e.length:1;return this.nodes}static build(t,n,r,i){let a=new e(r,t);return kM.spans(n,r,i,a,0),a.finish(r)}};function OL(e,t,n){let r=new kL;return kM.compare(e,t,n,r,0),r.changes}var kL=class{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,n,r){(e<t||n&&n.heightRelevant||r&&r.heightRelevant)&&AN(e,t,this.changes,5)}};function AL(e,t){let n=e.getBoundingClientRect(),r=e.ownerDocument,i=r.defaultView||window,a=Math.max(0,n.left),o=Math.min(i.innerWidth,n.right),s=Math.max(0,n.top),c=Math.min(i.innerHeight,n.bottom);for(let t=e.parentNode;t&&t!=r.body;)if(MN(t)){let n=window.getComputedStyle(t);if((t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth)&&n.overflow!=`visible`){let n=t.getBoundingClientRect();a=Math.max(a,n.left),o=Math.min(o,n.right),s=Math.max(s,n.top),c=Math.min(t==e.parentNode?i.innerHeight:c,n.bottom)}t=n.position==`absolute`||n.position==`fixed`?t.offsetParent:t.parentNode}else if(t.nodeType==11)t=t.host;else break;return{left:a-n.left,right:Math.max(a,o)-n.left,top:s-(n.top+t),bottom:Math.max(s,c)-(n.top+t)}}function jL(e){let t=e.getBoundingClientRect(),n=e.ownerDocument.defaultView||window;return t.left<n.innerWidth&&t.right>0&&t.top<n.innerHeight&&t.bottom>0}function ML(e,t){let n=e.getBoundingClientRect();return{left:0,right:n.right-n.left,top:t,bottom:n.bottom-(n.top+t)}}var NL=class{constructor(e,t,n,r){this.from=e,this.to=t,this.size=n,this.displaySize=r}static same(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.from!=i.from||r.to!=i.to||r.size!=i.size)return!1}return!0}draw(e,t){return wN.replace({widget:new PL(this.displaySize*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}},PL=class extends SN{constructor(e,t){super(),this.size=e,this.vertical=t}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement(`div`);return this.vertical?e.style.height=this.size+`px`:(e.style.width=this.size+`px`,e.style.height=`2px`,e.style.display=`inline-block`),e}get estimatedHeight(){return this.vertical?this.size:-1}},FL=class{constructor(e,t){this.view=e,this.state=t,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scaleX=1,this.scaleY=1,this.scrollOffset=0,this.scrolledToBottom=!1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=VL,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=cP.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let n=t.facet($P).some(e=>typeof e!=`function`&&e.class==`cm-lineWrapping`);this.heightOracle=new pL(n),this.stateDeco=HL(t),this.heightMap=vL.empty().applyChanges(this.stateDeco,ij.empty,this.heightOracle.setDoc(t.doc),[new uF(0,0,0,t.doc.length)]);for(let e=0;e<2&&(this.viewport=this.getViewport(0,null),this.updateForViewport());e++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=wN.set(this.lineGaps.map(e=>e.draw(this,!1))),this.scrollParent=e.scrollDOM,this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let n=0;n<=1;n++){let r=n?t.head:t.anchor;if(!e.some(({from:e,to:t})=>r>=e&&r<=t)){let{from:t,to:n}=this.lineBlockAt(r);e.push(new IL(t,n))}}return this.viewports=e.sort((e,t)=>e.from-t.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?VL:UL.get(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(WL(e,this.scaler))})}update(e,t=null){this.state=e.state;let n=this.stateDeco;this.stateDeco=HL(this.state);let r=e.changedRanges,i=uF.extendWithRanges(r,OL(n,this.stateDeco,e?e.changes:Cj.empty(this.state.doc.length))),a=this.heightMap.height,o=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollOffset);fL(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),i),(this.heightMap.height!=a||dL)&&(e.flags|=2),o?(this.scrollAnchorPos=e.changes.mapPos(o.from,-1),this.scrollAnchorHeight=o.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=a);let s=i.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<s.from||t.range.head>s.to)||!this.viewportIsAppropriate(s))&&(s=this.getViewport(0,t));let c=s.from!=this.viewport.from||s.to!=this.viewport.to;this.viewport=s,e.flags|=this.updateForViewport(),(c||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&(e.selectionSet||e.focusChanged)&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(VP)&&(this.mustEnforceCursorAssoc=!0)}measure(){let{view:e}=this,t=e.contentDOM,n=window.getComputedStyle(t),r=this.heightOracle,i=n.whiteSpace;this.defaultTextDirection=n.direction==`rtl`?cP.RTL:cP.LTR;let a=this.heightOracle.mustRefreshForWrapping(i)||this.mustMeasureContent===`refresh`,o=t.getBoundingClientRect(),s=a||this.mustMeasureContent||this.contentDOMHeight!=o.height;this.contentDOMHeight=o.height,this.mustMeasureContent=!1;let c=0,l=0;if(o.width&&o.height){let{scaleX:e,scaleY:n}=GN(t,o);(e>.005&&Math.abs(this.scaleX-e)>.005||n>.005&&Math.abs(this.scaleY-n)>.005)&&(this.scaleX=e,this.scaleY=n,c|=16,a=s=!0)}let u=(parseInt(n.paddingTop)||0)*this.scaleY,d=(parseInt(n.paddingBottom)||0)*this.scaleY;(this.paddingTop!=u||this.paddingBottom!=d)&&(this.paddingTop=u,this.paddingBottom=d,c|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(s=!0),this.editorWidth=e.scrollDOM.clientWidth,c|=16);let f=qN(this.view.contentDOM,!1).y;f!=this.scrollParent&&(this.scrollParent=f,this.scrollAnchorHeight=-1,this.scrollOffset=0);let p=this.getScrollOffset();this.scrollOffset!=p&&(this.scrollAnchorHeight=-1,this.scrollOffset=p),this.scrolledToBottom=iP(this.scrollParent||e.win);let m=(this.printing?ML:AL)(t,this.paddingTop),h=m.top-this.pixelViewport.top,g=m.bottom-this.pixelViewport.bottom;this.pixelViewport=m;let _=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(_!=this.inView&&(this.inView=_,_&&(s=!0)),!this.inView&&!this.scrollTarget&&!jL(e.dom))return 0;let v=o.width;if((this.contentDOMWidth!=v||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=o.width,this.editorHeight=e.scrollDOM.clientHeight,c|=16),s){let t=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(t)&&(a=!0),a||r.lineWrapping&&Math.abs(v-this.contentDOMWidth)>r.charWidth){let{lineHeight:n,charWidth:o,textHeight:s}=e.docView.measureTextSize();a=n>0&&r.refresh(i,n,o,s,Math.max(5,v/o),t),a&&(e.docView.minWidth=0,c|=16)}h>0&&g>0?l=Math.max(h,g):h<0&&g<0&&(l=Math.min(h,g)),fL();for(let n of this.viewports){let i=n.from==this.viewport.from?t:e.docView.measureVisibleLineHeights(n);this.heightMap=(a?vL.empty().applyChanges(this.stateDeco,ij.empty,this.heightOracle,[new uF(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,a,new mL(n.from,i))}dL&&(c|=2)}let y=!this.viewportIsAppropriate(this.viewport,l)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return y&&(c&2&&(c|=this.updateScaler()),this.viewport=this.getViewport(l,this.scrollTarget),c|=this.updateForViewport()),(c&2||y)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(a?[]:this.lineGaps,e)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),c}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let n=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,i=this.heightOracle,{visibleTop:a,visibleBottom:o}=this,s=new IL(r.lineAt(a-n*1e3,gL.ByHeight,i,0,0).from,r.lineAt(o+(1-n)*1e3,gL.ByHeight,i,0,0).to);if(t){let{head:e}=t.range;if(e<s.from||e>s.to){let n=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),a=r.lineAt(e,gL.ByPos,i,0,0),o;o=t.y==`center`?(a.top+a.bottom)/2-n/2:t.y==`start`||t.y==`nearest`&&e<s.from?a.top:a.bottom-n,s=new IL(r.lineAt(o-500,gL.ByHeight,i,0,0).from,r.lineAt(o+n+500,gL.ByHeight,i,0,0).to)}}return s}mapViewport(e,t){let n=t.mapPos(e.from,-1),r=t.mapPos(e.to,1);return new IL(this.heightMap.lineAt(n,gL.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(r,gL.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},n=0){if(!this.inView)return!0;let{top:r}=this.heightMap.lineAt(e,gL.ByPos,this.heightOracle,0,0),{bottom:i}=this.heightMap.lineAt(t,gL.ByPos,this.heightOracle,0,0),{visibleTop:a,visibleBottom:o}=this;return(e==0||r<=a-Math.max(10,Math.min(-n,250)))&&(t==this.state.doc.length||i>=o+Math.max(10,Math.min(n,250)))&&r>a-2e3&&i<o+2e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let n=[];for(let r of e)t.touchesRange(r.from,r.to)||n.push(new NL(t.mapPos(r.from),t.mapPos(r.to),r.size,r.displaySize));return n}ensureLineGaps(e,t){let n=this.heightOracle.lineWrapping,r=n?1e4:2e3,i=r>>1,a=r<<1;if(this.defaultTextDirection!=cP.LTR&&!n)return[];let o=[],s=(r,a,c,l)=>{if(a-r<i)return;let u=this.state.selection.main,d=[u.from];u.empty||d.push(u.to);for(let e of d)if(e>r&&e<a){s(r,e-10,c,l),s(e+10,a,c,l);return}let f=BL(e,e=>e.from>=c.from&&e.to<=c.to&&Math.abs(e.from-r)<i&&Math.abs(e.to-a)<i&&!d.some(t=>e.from<t&&e.to>t));if(!f){if(a<c.to&&t&&n&&t.visibleRanges.some(e=>e.from<=a&&e.to>=a)){let e=t.moveToLineBoundary(K.cursor(a),!1,!0).head;e>r&&(a=e)}let e=this.gapSize(c,r,a,l);f=new NL(r,a,e,n||e<2e6?e:2e6)}o.push(f)},c=t=>{if(t.length<a||t.type!=CN.Text)return;let i=LL(t.from,t.to,this.stateDeco);if(i.total<a)return;let o=this.scrollTarget?this.scrollTarget.range.head:null,c,l;if(n){let e=r/this.heightOracle.lineLength*this.heightOracle.lineHeight,n,a;if(o!=null){let r=zL(i,o),s=((this.visibleBottom-this.visibleTop)/2+e)/t.height;n=r-s,a=r+s}else n=(this.visibleTop-t.top-e)/t.height,a=(this.visibleBottom-t.top+e)/t.height;c=RL(i,n),l=RL(i,a)}else{let n=i.total*this.heightOracle.charWidth,a=r*this.heightOracle.charWidth,s=0;if(n>2e6)for(let n of e)n.from>=t.from&&n.from<t.to&&n.size!=n.displaySize&&n.from*this.heightOracle.charWidth+s<this.pixelViewport.left&&(s=n.size-n.displaySize);let u=this.pixelViewport.left+s,d=this.pixelViewport.right+s,f,p;if(o!=null){let e=zL(i,o),t=((d-u)/2+a)/n;f=e-t,p=e+t}else f=(u-a)/n,p=(d+a)/n;c=RL(i,f),l=RL(i,p)}c>t.from&&s(t.from,c,t,i),l<t.to&&s(l,t.to,t,i)};for(let e of this.viewportLines)Array.isArray(e.type)?e.type.forEach(c):c(e);return o}gapSize(e,t,n,r){let i=zL(r,n)-zL(r,t);return this.heightOracle.lineWrapping?e.height*i:r.total*this.heightOracle.charWidth*i}updateLineGaps(e){NL.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=wN.set(e.map(e=>e.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let n=[];kM.spans(t,this.viewport.from,this.viewport.to,{span(e,t){n.push({from:e,to:t})},point(){}},20);let r=0;if(n.length!=this.visibleRanges.length)r=12;else for(let t=0;t<n.length&&!(r&8);t++){let i=this.visibleRanges[t],a=n[t];(i.from!=a.from||i.to!=a.to)&&(r|=4,e&&e.mapPos(i.from,-1)==a.from&&e.mapPos(i.to,1)==a.to||(r|=8))}return this.visibleRanges=n,r}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||WL(this.heightMap.lineAt(e,gL.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||WL(this.heightMap.lineAt(this.scaler.fromDOM(e),gL.ByHeight,this.heightOracle,0,0),this.scaler)}getScrollOffset(){return this.scrollParent==this.view.scrollDOM?this.scrollParent.scrollTop*this.scaleY:(this.scrollParent?this.scrollParent.getBoundingClientRect().top:0)-this.view.contentDOM.getBoundingClientRect().top}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+12-this.paddingTop);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return WL(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}},IL=class{constructor(e,t){this.from=e,this.to=t}};function LL(e,t,n){let r=[],i=e,a=0;return kM.spans(n,e,t,{span(){},point(e,t){e>i&&(r.push({from:i,to:e}),a+=e-i),i=t}},20),i<t&&(r.push({from:i,to:t}),a+=t-i),{total:a,ranges:r}}function RL({total:e,ranges:t},n){if(n<=0)return t[0].from;if(n>=1)return t[t.length-1].to;let r=Math.floor(e*n);for(let e=0;;e++){let{from:n,to:i}=t[e],a=i-n;if(r<=a)return n+r;r-=a}}function zL(e,t){let n=0;for(let{from:r,to:i}of e.ranges){if(t<=i){n+=t-r;break}n+=i-r}return n/e.total}function BL(e,t){for(let n of e)if(t(n))return n}var VL={toDOM(e){return e},fromDOM(e){return e},scale:1,eq(e){return e==this}};function HL(e){let t=e.facet(eF).filter(e=>typeof e!=`function`),n=e.facet(nF).filter(e=>typeof e!=`function`);return n.length&&t.push(kM.join(n)),t}var UL=class e{constructor(e,t){this.scale=e,this.viewports=t}static get(t,n,r){let i=0,a=0,o=0,s=r.map(({from:e,to:r})=>{let a=n.lineAt(e,gL.ByPos,t,0,0).top,o=n.lineAt(r,gL.ByPos,t,0,0).bottom;return i+=o-a,{from:e,to:r,top:a,bottom:o,domTop:0,domBottom:0}});if(n.height-i<10)return VL;let c=(7e6-i)/(n.height-i);for(let e of s)e.domTop=o+(e.top-a)*c,o=e.domBottom=e.domTop+(e.bottom-e.top),a=e.bottom;return new e(c,s)}toDOM(e){for(let t=0,n=0,r=0;;t++){let i=t<this.viewports.length?this.viewports[t]:null;if(!i||e<i.top)return r+(e-n)*this.scale;if(e<=i.bottom)return i.domTop+(e-i.top);n=i.bottom,r=i.domBottom}}fromDOM(e){for(let t=0,n=0,r=0;;t++){let i=t<this.viewports.length?this.viewports[t]:null;if(!i||e<i.domTop)return n+(e-r)/this.scale;if(e<=i.domBottom)return i.top+(e-i.domTop);n=i.bottom,r=i.domBottom}}eq(t){return t instanceof e&&this.scale==t.scale&&this.viewports.length==t.viewports.length&&this.viewports.every((e,n)=>e.from==t.viewports[n].from&&e.to==t.viewports[n].to)}};function WL(e,t){if(t.scale==1)return e;let n=t.toDOM(e.top),r=t.toDOM(e.bottom);return new hL(e.from,e.length,n,r-n,Array.isArray(e._content)?e._content.map(e=>WL(e,t)):e._content)}var GL=Nj.define({combine:e=>e.join(` `)}),KL=Nj.define({combine:e=>e.indexOf(!0)>-1}),qL=YM.newName(),JL=YM.newName(),YL=YM.newName(),XL={"&light":`.`+JL,"&dark":`.`+YL};function ZL(e,t,n){return new YM(t,{finish(t){return/&/.test(t)?t.replace(/&\w*/,t=>{if(t==`&`)return e;if(!n||!n[t])throw RangeError(`Unsupported selector: ${t}`);return n[t]}):e+` `+t}})}var QL=ZL(`.`+qL,{"&":{position:`relative !important`,boxSizing:`border-box`,"&.cm-focused":{outline:`1px dotted #212121`},display:`flex !important`,flexDirection:`column`},".cm-scroller":{display:`flex !important`,alignItems:`flex-start !important`,fontFamily:`monospace`,lineHeight:1.4,height:`100%`,overflowX:`auto`,position:`relative`,zIndex:0,overflowAnchor:`none`},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:`block`,whiteSpace:`pre`,wordWrap:`normal`,boxSizing:`border-box`,minHeight:`100%`,padding:`4px 0`,outline:`none`,"&[contenteditable=true]":{WebkitUserModify:`read-write-plaintext-only`}},".cm-lineWrapping":{whiteSpace_fallback:`pre-wrap`,whiteSpace:`break-spaces`,wordBreak:`break-word`,overflowWrap:`anywhere`,flexShrink:1},"&light .cm-content":{caretColor:`black`},"&dark .cm-content":{caretColor:`white`},".cm-line":{display:`block`,padding:`0 2px 0 6px`},".cm-layer":{userSelect:`none`,position:`absolute`,left:0,top:0,contain:`size style`,"& > *":{position:`absolute`}},"&light .cm-selectionBackground":{background:`#d9d9d9`},"&dark .cm-selectionBackground":{background:`#222`},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:`#d7d4f0`},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:`#233`},".cm-cursorLayer":{pointerEvents:`none`},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:`steps(1) cm-blink 1.2s infinite`},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:`1.2px solid black`,marginLeft:`-0.6px`,pointerEvents:`none`},".cm-cursor":{display:`none`},"&dark .cm-cursor":{borderLeftColor:`#ddd`},".cm-selectionHandle":{backgroundColor:`currentColor`,width:`1.5px`},".cm-selectionHandle-start::before, .cm-selectionHandle-end::before":{content:`""`,backgroundColor:`inherit`,borderRadius:`50%`,width:`8px`,height:`8px`,position:`absolute`,left:`-3.25px`},".cm-selectionHandle-start::before":{top:`-8px`},".cm-selectionHandle-end::before":{bottom:`-8px`},".cm-dropCursor":{position:`absolute`},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:`block`},".cm-iso":{unicodeBidi:`isolate`},".cm-announced":{position:`fixed`,top:`-10000px`},"@media print":{".cm-announced":{display:`none`}},"&light .cm-activeLine":{backgroundColor:`#cceeff44`},"&dark .cm-activeLine":{backgroundColor:`#99eeff33`},"&light .cm-specialChar":{color:`red`},"&dark .cm-specialChar":{color:`#f78`},".cm-gutters":{flexShrink:0,display:`flex`,height:`100%`,boxSizing:`border-box`,zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:`#f5f5f5`,color:`#6c6c6c`,border:`0px solid #ddd`,"&.cm-gutters-before":{borderRightWidth:`1px`},"&.cm-gutters-after":{borderLeftWidth:`1px`}},"&dark .cm-gutters":{backgroundColor:`#333338`,color:`#ccc`},".cm-gutter":{display:`flex !important`,flexDirection:`column`,flexShrink:0,boxSizing:`border-box`,minHeight:`100%`,overflow:`hidden`},".cm-gutterElement":{boxSizing:`border-box`},".cm-lineNumbers .cm-gutterElement":{padding:`0 3px 0 5px`,minWidth:`20px`,textAlign:`right`,whiteSpace:`nowrap`},"&light .cm-activeLineGutter":{backgroundColor:`#e2f2ff`},"&dark .cm-activeLineGutter":{backgroundColor:`#222227`},".cm-panels":{boxSizing:`border-box`,position:`sticky`,left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:`#f5f5f5`,color:`black`},".cm-panels-top":{top:`0`},".cm-panels-bottom":{bottom:`0`},"&light .cm-panels-top":{borderBottom:`1px solid #ddd`},"&light .cm-panels-bottom":{borderTop:`1px solid #ddd`},"&dark .cm-panels":{backgroundColor:`#333338`,color:`white`},".cm-dialog":{padding:`2px 19px 4px 6px`,position:`relative`,"& label":{fontSize:`80%`}},".cm-dialog-close":{position:`absolute`,top:`3px`,right:`4px`,backgroundColor:`inherit`,border:`none`,font:`inherit`,fontSize:`14px`,padding:`0`},".cm-tab":{display:`inline-block`,overflow:`hidden`,verticalAlign:`bottom`},".cm-widgetBuffer":{verticalAlign:`baseline`,height:`1em`,width:0,display:`inline`},".cm-placeholder":{color:`#888`,display:`inline-block`,verticalAlign:`top`,userSelect:`none`},".cm-highlightSpace":{background:`radial-gradient(circle at 50% 55%, #aaa 20%, transparent 0) no-repeat`,backgroundSize:`.4em`,backgroundPosition:`calc(min(50%, 0px)) center`},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:`auto 100%`,backgroundPosition:`right 90%`,backgroundRepeat:`no-repeat`},".cm-trailingSpace":{backgroundColor:`#ff332255`},".cm-button":{verticalAlign:`middle`,color:`inherit`,fontSize:`70%`,padding:`.2em 1em`,borderRadius:`1px`},"&light .cm-button":{backgroundImage:`linear-gradient(#eff1f5, #d9d9df)`,border:`1px solid #888`,"&:active":{backgroundImage:`linear-gradient(#b4b4b4, #d0d3d6)`}},"&dark .cm-button":{backgroundImage:`linear-gradient(#393939, #111)`,border:`1px solid #888`,"&:active":{backgroundImage:`linear-gradient(#111, #333)`}},".cm-textfield":{verticalAlign:`middle`,color:`inherit`,fontSize:`70%`,border:`1px solid silver`,padding:`.2em .5em`},"&light .cm-textfield":{backgroundColor:`white`},"&dark .cm-textfield":{border:`1px solid #555`,backgroundColor:`inherit`}},XL),$L={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},eR=q.ie&&q.ie_version<=11,tR=class{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new JN,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let e of t)this.queue.push(e);(q.ie&&q.ie_version<=11||q.ios&&e.composing)&&t.some(e=>e.type==`childList`&&e.removedNodes.length||e.type==`characterData`&&e.oldValue.length>e.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&q.android&&e.constructor.EDIT_CONTEXT!==!1&&!(q.chrome&&q.chrome_version<126)&&(this.editContext=new aR(e),e.state.facet(qP)&&(e.contentDOM.editContext=this.editContext.editContext)),eR&&(this.onCharData=e=>{this.queue.push({target:e.target,type:`characterData`,oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia(`print`)),typeof ResizeObserver==`function`&&(this.resizeScroll=new ResizeObserver(()=>{this.view.docView?.lastUpdate<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver==`function`&&(this.intersection=new IntersectionObserver(e=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),e.length>0&&e[e.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent(`Event`)))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(e=>{e.length>0&&e[e.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent(`Event`))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers(`scroll`,e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(this.pendingRecords().length>0),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type!=`change`&&e.type||e.matches)&&(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,n)=>t!=e[n]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:n}=this,r=this.selectionRange;if(n.state.facet(qP)?n.root.activeElement!=this.dom:!IN(this.dom,r))return;let i=r.anchorNode&&n.docView.tile.nearest(r.anchorNode);if(i&&i.isWidget()&&i.widget.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(q.ie&&q.ie_version<=11||q.android&&q.chrome)&&!n.state.selection.main.empty&&r.focusNode&&RN(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=PN(e.root);if(!t)return!1;let n=q.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&iR(this.view,t)||t;if(!n||this.selectionRange.eq(n))return!1;let r=IN(this.dom,n);return r&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&rP(this.dom,n)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(n),r&&(this.selectionChanged=!0),!0)}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let n=this.dom;n;)if(MN(n))!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==n?e++:t||=this.scrollTargets.slice(0,e),t&&t.push(n),n=n.assignedSlot||n.parentNode;else if(n.nodeType==11)n=n.host;else break;if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let e of this.scrollTargets)e.removeEventListener(`scroll`,this.onScroll);for(let e of this.scrollTargets=t)e.addEventListener(`scroll`,this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||=(this.observer.observe(this.dom,$L),eR&&this.dom.addEventListener(`DOMCharacterDataModified`,this.onCharData),!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),eR&&this.dom.removeEventListener(`DOMCharacterDataModified`,this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){if(!this.delayedAndroidKey){let e=()=>{let e=this.delayedAndroidKey;e&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=e.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&e.force&&tP(this.dom,e.key,e.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(e)}(!this.delayedAndroidKey||e==`Enter`)&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!this.delayedAndroidKey?.force})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,n=-1,r=!1;for(let i of e){let e=this.readMutation(i);e&&(e.typeOver&&(r=!0),t==-1?{from:t,to:n}=e:(t=Math.min(e.from,t),n=Math.max(e.to,n)))}return{from:t,to:n,typeOver:r}}readChange(){let{from:e,to:t,typeOver:n}=this.processRecords(),r=this.selectionChanged&&IN(this.dom,this.selectionRange);if(e<0&&!r)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let i=new _I(this.view,e,t,n);return this.view.docView.domChanged={newSel:i.newSel?i.newSel.main:null},i}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.selectionChanged,n=this.readChange();if(!n)return this.view.requestMeasure(),!1;let r=this.view.state,i=yI(this.view,n);return this.view.state==r&&(n.domChanged||t)&&this.view.update([]),i}readMutation(e){let t=this.view.docView.tile.nearest(e.target);if(!t||t.isWidget())return null;if(t.markDirty(e.type==`attributes`),e.type==`childList`){let n=nR(t,e.previousSibling||e.target.previousSibling,-1),r=nR(t,e.nextSibling||e.target.nextSibling,1);return{from:n?t.posAfter(n):t.posAtStart,to:r?t.posBefore(r):t.posAtEnd,typeOver:!1}}return e.type==`characterData`?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener(`resize`,this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener(`change`,this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener(`beforeprint`,this.onPrint),e.addEventListener(`scroll`,this.onScroll),e.document.addEventListener(`selectionchange`,this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener(`scroll`,this.onScroll),e.removeEventListener(`resize`,this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener(`change`,this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener(`beforeprint`,this.onPrint),e.document.removeEventListener(`selectionchange`,this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(qP)!=e.state.facet(qP)&&(e.view.contentDOM.editContext=e.state.facet(qP)?this.editContext.editContext:null))}destroy(){var e,t,n;this.stop(),(e=this.intersection)==null||e.disconnect(),(t=this.gapIntersection)==null||t.disconnect(),(n=this.resizeScroll)==null||n.disconnect();for(let e of this.scrollTargets)e.removeEventListener(`scroll`,this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}};function nR(e,t,n){for(;t;){let r=pF.get(t);if(r&&r.parent==e)return r;let i=t.parentNode;t=i==e.dom?n>0?t.nextSibling:t.previousSibling:i}return null}function rR(e,t){let n=t.startContainer,r=t.startOffset,i=t.endContainer,a=t.endOffset,o=e.docView.domAtPos(e.state.selection.main.anchor,1);return RN(o.node,o.offset,i,a)&&([n,r,i,a]=[i,a,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:a}}function iR(e,t){if(t.getComposedRanges){let n=t.getComposedRanges(e.root)[0];if(n)return rR(e,n)}let n=null;function r(e){e.preventDefault(),e.stopImmediatePropagation(),n=e.getTargetRanges()[0]}return e.contentDOM.addEventListener(`beforeinput`,r,!0),e.dom.ownerDocument.execCommand(`indent`),e.contentDOM.removeEventListener(`beforeinput`,r,!0),n?rR(e,n):null}var aR=class{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=n=>{let r=e.state.selection.main,{anchor:i,head:a}=r,o=this.toEditorPos(n.updateRangeStart),s=this.toEditorPos(n.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:n.updateRangeStart,editorBase:o,drifted:!1});let c=s-o>n.text.length;o==this.from&&i<this.from?o=i:s==this.to&&i>this.to&&(s=i);let l=SI(e.state.sliceDoc(o,s),n.text,(c?r.from:r.to)-o,c?`end`:null);if(!l){let t=K.single(this.toEditorPos(n.selectionStart),this.toEditorPos(n.selectionEnd));TI(t,r)||e.dispatch({selection:t,userEvent:`select`});return}let u={from:l.from+o,to:l.toA+o,insert:ij.of(n.text.slice(l.from,l.toB).split(`
31
+ `))};if((q.mac||q.android)&&u.from==a-1&&/^\. ?$/.test(n.text)&&e.contentDOM.getAttribute(`autocorrect`)==`off`&&(u={from:o,to:s,insert:ij.of([n.text.replace(`.`,` `)])}),this.pendingContextChange=u,!e.state.readOnly){let t=this.to-this.from+(u.to-u.from+u.insert.length);bI(e,u,K.single(this.toEditorPos(n.selectionStart,t),this.toEditorPos(n.selectionEnd,t)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),u.from<u.to&&!u.insert.length&&e.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(t.text.slice(Math.max(0,n.updateRangeStart-1),Math.min(t.text.length,n.updateRangeStart+1)))&&this.handlers.compositionend(n)},this.handlers.characterboundsupdate=n=>{let r=[],i=null;for(let t=this.toEditorPos(n.rangeStart),a=this.toEditorPos(n.rangeEnd);t<a;t++){let n=e.coordsForChar(t);i=n&&new DOMRect(n.left,n.top,n.right-n.left,n.bottom-n.top)||i||new DOMRect,r.push(i)}t.updateCharacterBounds(n.rangeStart,r)},this.handlers.textformatupdate=t=>{let n=[];for(let e of t.getTextFormats()){let t=e.underlineStyle,r=e.underlineThickness;if(!/none/i.test(t)&&!/none/i.test(r)){let i=this.toEditorPos(e.rangeStart),a=this.toEditorPos(e.rangeEnd);if(i<a){let e=`text-decoration: underline ${/^[a-z]/.test(t)?t+` `:t==`Dashed`?`dashed `:t==`Squiggle`?`wavy `:``}${/thin/i.test(r)?1:2}px`;n.push(wN.mark({attributes:{style:e}}).range(i,a))}}}e.dispatch({effects:GP.of(wN.set(n))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:t}=this.composing;this.composing=null,t&&this.reset(e.state)}};for(let e in this.handlers)t.addEventListener(e,this.handlers[e]);this.measureReq={read:e=>{let t=PN(e.root);t&&t.rangeCount&&this.editContext.updateSelectionBounds(t.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,n=!1,r=this.pendingContextChange;return e.changes.iterChanges((i,a,o,s,c)=>{if(n)return;let l=c.length-(a-i);if(r&&a>=r.to){if(r.from==i&&r.to==a&&r.insert.eq(c)){r=this.pendingContextChange=null,t+=l,this.to+=l;return}r=null,this.revertPending(e.state)}if(i+=t,a+=t,a<=this.from)this.from+=l,this.to+=l;else if(i<this.to){if(i<this.from||a>this.to||this.to-this.from+c.length>3e4){n=!0;return}this.editContext.updateText(this.toContextPos(i),this.toContextPos(a),c.toString()),this.to+=l}t+=l}),r&&!n&&this.revertPending(e.state),!n}update(e){let t=this.pendingContextChange,n=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(n.from,n.to)&&e.transactions.some(e=>!e.isUserEvent(`input.type`)&&e.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,n=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),r=this.toContextPos(t.head);(this.editContext.selectionStart!=n||this.editContext.selectionEnd!=r)&&this.editContext.updateSelection(n,r)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to<e.doc.length&&this.to-t<500||this.to-this.from>3e4)}toEditorPos(e,t=this.to-this.from){e=Math.min(e,t);let n=this.composing;return n&&n.drifted?n.editorBase+(e-n.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}},oR=class e{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.clearAnnouncement=-1,this.contentDOM=document.createElement(`div`),this.scrollDOM=document.createElement(`div`),this.scrollDOM.tabIndex=-1,this.scrollDOM.className=`cm-scroller`,this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement(`div`),this.announceDOM.className=`cm-announced`,this.announceDOM.setAttribute(`aria-live`,`polite`),this.dom=document.createElement(`div`),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:t}=e;this.dispatchTransactions=e.dispatchTransactions||t&&(e=>e.forEach(e=>t(e,this)))||(e=>this.update(e)),this.dispatch=this.dispatch.bind(this),this._root=e.root||nP(e.parent)||document,this.viewState=new FL(this,e.state||SM.create(e)),e.scrollTo&&e.scrollTo.is(WP)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(YP).map(e=>new ZP(e));for(let e of this.plugins)e.update(this);this.observer=new tR(this),this.inputState=new EI(this),this.inputState.ensureHandlers(this.plugins),this.docView=new BF(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),document.fonts?.ready&&document.fonts.ready.then(()=>{this.viewState.mustMeasureContent=`refresh`,this.requestMeasure()})}dispatch(...e){let t=e.length==1&&e[0]instanceof cM?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(t){if(this.updateState!=0)throw Error(`Calls to EditorView.update are not allowed while an update is in progress`);let n=!1,r=!1,i,a=this.state;for(let e of t){if(e.startState!=a)throw RangeError(`Trying to update state with a transaction that doesn't start from the previous state.`);a=e.state}if(this.destroyed){this.viewState.state=a;return}let o=this.hasFocus,s=0,c=null;t.some(e=>e.annotation(aL))?(this.inputState.notifiedFocused=o,s=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,c=oL(a,o),c||(s=1));let l=this.observer.delayedAndroidKey,u=null;if(l?(this.observer.clearDelayedAndroidKey(),u=this.observer.readChange(),(u&&!this.state.doc.eq(a.doc)||!this.state.selection.eq(a.selection))&&(u=null)):this.observer.clear(),a.facet(SM.phrases)!=this.state.facet(SM.phrases))return this.setState(a);i=dF.create(this,a,t),i.flags|=s;let d=this.viewState.scrollTarget;try{this.updateState=2;for(let n of t){if(d&&=d.map(n.changes),n.scrollIntoView){let{main:t}=n.state.selection,{x:r,y:i}=this.state.facet(e.cursorScrollMargin);d=new UP(t.empty?t:K.cursor(t.head,t.head>t.anchor?-1:1),`nearest`,`nearest`,i,r)}for(let e of n.effects)e.is(WP)&&(d=e.value.clip(this.state))}this.viewState.update(i,d),this.bidiCache=lR.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),n=this.docView.update(i),this.state.facet(lF)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(t),this.docView.updateSelection(n,t.some(e=>e.isUserEvent(`select.pointer`)))}finally{this.updateState=0}if(i.startState.facet(GL)!=i.state.facet(GL)&&(this.viewState.mustMeasureContent=!0),(n||r||d||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!i.empty)for(let e of this.state.facet(FP))try{e(i)}catch(e){KP(this.state,e,`update listener`)}(c||u)&&Promise.resolve().then(()=>{c&&this.state==c.startState&&this.dispatch(c),u&&!yI(this,u)&&l.force&&tP(this.contentDOM,l.key,l.keyCode)})}setState(e){if(this.updateState!=0)throw Error(`Calls to EditorView.setState are not allowed while an update is in progress`);if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let e of this.plugins)e.destroy(this);this.viewState=new FL(this,e),this.plugins=e.facet(YP).map(e=>new ZP(e)),this.pluginMap.clear();for(let e of this.plugins)e.update(this);this.docView.destroy(),this.docView=new BF(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(YP),n=e.state.facet(YP);if(t!=n){let r=[];for(let i of n){let n=t.indexOf(i);if(n<0)r.push(new ZP(i));else{let t=this.plugins[n];t.mustUpdate=e,r.push(t)}}for(let t of this.plugins)t.mustUpdate!=e&&t.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let t of this.plugins)t.mustUpdate=e;for(let e=0;e<this.plugins.length;e++)this.plugins[e].update(this);t!=n&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let t=e.value;if(t&&t.docViewUpdate)try{t.docViewUpdate(this)}catch(e){KP(this.state,e,`doc view update listener`)}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,n=this.viewState.scrollParent,r=this.viewState.getScrollOffset(),{scrollAnchorPos:i,scrollAnchorHeight:a,scaleY:o}=this.viewState;Math.abs(r-this.viewState.scrollOffset)>1&&(a=-1),this.viewState.scrollAnchorHeight=-1;try{for(let e=0;;e++){if(a<0){if(iP(n||this.win))i=-1,a=this.viewState.heightMap.height/this.viewState.scaleY;else{let e=this.viewState.scrollAnchorAt(r);i=e.from,a=e.top}o=this.viewState.scaleY}this.updateState=1;let s=this.viewState.measure();if(!s&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(e>5){console.warn(this.measureRequests.length?`Measure loop restarted more than 5 times`:`Viewport failed to stabilize`);break}let c=[];s&4||([this.measureRequests,c]=[c,this.measureRequests]);let l=c.map(e=>{try{return e.read(this)}catch(e){return KP(this.state,e),cR}}),u=dF.create(this,this.state,[]),d=!1;u.flags|=s,t?t.flags|=s:t=u,this.updateState=2,u.empty||(this.updatePlugins(u),this.inputState.update(u),this.updateAttrs(),d=this.docView.update(u),d&&this.docViewUpdate());for(let e=0;e<c.length;e++)if(l[e]!=cR)try{let t=c[e];t.write&&t.write(l[e],this)}catch(e){KP(this.state,e)}if(d&&this.docView.updateSelection(!0),!u.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight){if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,a=-1;continue}{let e=(i<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(i).top)/this.viewState.scaleY-a/o;if((e>1||e<-1)&&!(q.ios&&this.inputState.lastIOSMomentumScroll>Date.now()-100)&&(n==this.scrollDOM||this.hasFocus||Math.max(this.inputState.lastWheelEvent,this.inputState.lastTouchTime)>Date.now()-100)){r+=e,n?i<0?n.scrollTop=n.scrollHeight:n.scrollTop+=e:this.win.scrollBy(0,e),a=-1;continue}}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let e of this.state.facet(FP))e(t)}get themeClasses(){return qL+` `+(this.state.facet(KL)?YL:JL)+` `+this.state.facet(GL)}updateAttrs(){let e=uR(this,QP,{class:`cm-editor`+(this.hasFocus?` cm-focused `:` `)+this.themeClasses}),t={spellcheck:`false`,autocorrect:`off`,autocapitalize:`off`,writingsuggestions:`false`,translate:`no`,contenteditable:this.state.facet(qP)?`true`:`false`,class:`cm-content`,style:`${q.tabSize}: ${this.state.tabSize}`,role:`textbox`,"aria-multiline":`true`};this.state.readOnly&&(t[`aria-readonly`]=`true`),uR(this,$P,t);let n=this.observer.ignore(()=>{let n=bN(this.contentDOM,this.contentAttrs,t),r=bN(this.dom,this.editorAttrs,e);return n||r});return this.editorAttrs=e,this.contentAttrs=t,n}showAnnouncements(t){let n=!0;for(let r of t)for(let t of r.effects)if(t.is(e.announce)){n&&=(this.announceDOM.textContent=``,this.win.clearTimeout(this.clearAnnouncement),this.clearAnnouncement=this.win.setTimeout(()=>{this.announceDOM.textContent=`\xA0`},200),!1);let e=this.announceDOM.appendChild(document.createElement(`div`));e.textContent=t.value}}mountStyles(){this.styleModules=this.state.facet(lF);let t=this.state.facet(e.cspNonce);YM.mount(this.root,this.styleModules.concat(QL).reverse(),t?{nonce:t}:void 0)}readMeasured(){if(this.updateState==2)throw Error(`Reading the editor layout isn't allowed during an update`);this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;t<this.measureRequests.length;t++)if(this.measureRequests[t].key===e.key){this.measureRequests[t]=e;return}}this.measureRequests.push(e)}}plugin(e){let t=this.pluginMap.get(e);return(t===void 0||t&&t.plugin!=e)&&this.pluginMap.set(e,t=this.plugins.find(t=>t.plugin==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,n){return cI(this,e,rI(this,e,t,n))}moveByGroup(e,t){return cI(this,e,rI(this,e,t,t=>iI(this,e.head,t)))}visualLineSide(e,t){return t?K.cursor(e.to,1):K.cursor(e.from,-1)}moveToLineBoundary(e,t,n=!0){return nI(this,e,t,n)}moveVertically(e,t,n){return cI(this,e,aI(this,e,t,n))}domAtPos(e,t=1){return this.docView.domAtPos(e,t)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){this.readMeasured();let n=uI(this,e,t);return n&&n.pos}posAndSideAtCoords(e,t=!0){return this.readMeasured(),uI(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let n=this.state.doc.lineAt(e),r=this.bidiSpans(n),i=r[vP.find(r,e-n.from,-1,t)];return n.length&&(e==n.from&&t<0||e==n.to&&t>0)&&i.dir!=this.textDirectionAt(n.from)&&(e==n.to?(e=n.from+i.from,t=1):(e=n.from+i.to,t=-1)),this.docView.coordsAt(e,t,i.dir==cP.RTL)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(BP)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>sR)return DP(e.length);let t=this.textDirectionAt(e.from),n;for(let r of this.bidiCache)if(r.from==e.from&&r.dir==t&&(r.fresh||yP(r.isolates,n=aF(this,e))))return r.order;n||=aF(this,e);let r=EP(e.text,t,n);return this.bidiCache.push(new lR(e.from,e.to,t,n,!0,r)),r}get hasFocus(){return(this.dom.ownerDocument.hasFocus()||q.safari&&this.inputState?.lastContextMenu>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{QN(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.win.clearTimeout(this.clearAnnouncement),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return WP.of(new UP(typeof e==`number`?K.cursor(e):e,t.y??`nearest`,t.x??`nearest`,t.yMargin??5,t.xMargin??5))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,n=this.viewState.scrollAnchorAt(e);return WP.of(new UP(K.cursor(n.from),`start`,`start`,n.top-e,t,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e==`boolean`?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return XP.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return XP.define(()=>({}),{eventObservers:e})}static theme(e,t){let n=YM.newName(),r=[GL.of(n),lF.of(ZL(`.${n}`,e))];return t&&t.dark&&r.push(KL.of(!0)),r}static baseTheme(e){return Uj.lowest(lF.of(ZL(`.`+qL,e,XL)))}static findFromDOM(e){let t=e.querySelector(`.cm-content`);return(t&&pF.get(t)||pF.get(e))?.root?.view||null}};oR.styleModule=lF,oR.inputHandler=IP,oR.clipboardInputFilter=RP,oR.clipboardOutputFilter=zP,oR.scrollHandler=HP,oR.focusChangeEffect=LP,oR.perLineTextDirection=BP,oR.exceptionSink=PP,oR.updateListener=FP,oR.editable=qP,oR.mouseSelectionStyle=NP,oR.dragMovesSelection=MP,oR.clickAddsSelectionRange=jP,oR.decorations=eF,oR.blockWrappers=tF,oR.outerDecorations=nF,oR.atomicRanges=rF,oR.bidiIsolatedRanges=iF,oR.cursorScrollMargin=Nj.define({combine:e=>{let t=5,n=5;for(let r of e)typeof r==`number`?t=n=r:{x:t,y:n}=r;return{x:t,y:n}}}),oR.scrollMargins=sF,oR.darkTheme=KL,oR.cspNonce=Nj.define({combine:e=>e.length?e[0]:``}),oR.contentAttributes=$P,oR.editorAttributes=QP,oR.lineWrapping=oR.contentAttributes.of({class:`cm-lineWrapping`}),oR.announce=sM.define();var sR=4096,cR={},lR=class e{constructor(e,t,n,r,i,a){this.from=e,this.to=t,this.dir=n,this.isolates=r,this.fresh=i,this.order=a}static update(t,n){if(n.empty&&!t.some(e=>e.fresh))return t;let r=[],i=t.length?t[t.length-1].dir:cP.LTR;for(let a=Math.max(0,t.length-10);a<t.length;a++){let o=t[a];o.dir==i&&!n.touchesRange(o.from,o.to)&&r.push(new e(n.mapPos(o.from,1),n.mapPos(o.to,-1),o.dir,o.isolates,!1,o.order))}return r}};function uR(e,t,n){for(let r=e.state.facet(t),i=r.length-1;i>=0;i--){let t=r[i],a=typeof t==`function`?t(e):t;a&&gN(a,n)}return n}var dR=q.mac?`mac`:q.windows?`win`:q.linux?`linux`:`key`;function fR(e,t){let n=e.split(/-(?!$)/),r=n[n.length-1];r==`Space`&&(r=` `);let i,a,o,s;for(let e=0;e<n.length-1;++e){let r=n[e];if(/^(cmd|meta|m)$/i.test(r))s=!0;else if(/^a(lt)?$/i.test(r))i=!0;else if(/^(c|ctrl|control)$/i.test(r))a=!0;else if(/^s(hift)?$/i.test(r))o=!0;else if(/^mod$/i.test(r))t==`mac`?s=!0:a=!0;else throw Error(`Unrecognized modifier name: `+r)}return i&&(r=`Alt-`+r),a&&(r=`Ctrl-`+r),s&&(r=`Meta-`+r),o&&(r=`Shift-`+r),r}function pR(e,t,n){return t.altKey&&(e=`Alt-`+e),t.ctrlKey&&(e=`Ctrl-`+e),t.metaKey&&(e=`Meta-`+e),n!==!1&&t.shiftKey&&(e=`Shift-`+e),e}var mR=Uj.default(oR.domEventHandlers({keydown(e,t){return SR(_R(t.state),e,t,`editor`)}})),hR=Nj.define({enables:mR}),gR=new WeakMap;function _R(e){let t=e.facet(hR),n=gR.get(t);return n||gR.set(t,n=bR(t.reduce((e,t)=>e.concat(t),[]))),n}var vR=null,yR=4e3;function bR(e,t=dR){let n=Object.create(null),r=Object.create(null),i=(e,t)=>{let n=r[e];if(n==null)r[e]=t;else if(n!=t)throw Error(`Key binding `+e+` is used both as a regular binding and as a multi-stroke prefix`)},a=(e,r,a,o,s)=>{let c=n[e]||(n[e]=Object.create(null)),l=r.split(/ (?!$)/).map(e=>fR(e,t));for(let t=1;t<l.length;t++){let n=l.slice(0,t).join(` `);i(n,!0),c[n]||(c[n]={preventDefault:!0,stopPropagation:!1,run:[t=>{let r=vR={view:t,prefix:n,scope:e};return setTimeout(()=>{vR==r&&(vR=null)},yR),!0}]})}let u=l.join(` `);i(u,!1);let d=c[u]||(c[u]={preventDefault:!1,stopPropagation:!1,run:(c._any?.run)?.slice()||[]});a&&d.run.push(a),o&&(d.preventDefault=!0),s&&(d.stopPropagation=!0)};for(let r of e){let e=r.scope?r.scope.split(` `):[`editor`];if(r.any)for(let t of e){let e=n[t]||(n[t]=Object.create(null));e._any||={preventDefault:!1,stopPropagation:!1,run:[]};let{any:i}=r;for(let t in e)e[t].run.push(e=>i(e,xR))}let i=r[t]||r.key;if(i)for(let t of e)a(t,i,r.run,r.preventDefault,r.stopPropagation),r.shift&&a(t,`Shift-`+i,r.shift,r.preventDefault,r.stopPropagation)}return n}var xR=null;function SR(e,t,n,r){xR=t;let i=iN(t),a=yj(vj(i,0))==i.length&&i!=` `,o=``,s=!1,c=!1,l=!1;vR&&vR.view==n&&vR.scope==r&&(o=vR.prefix+` `,MI.indexOf(t.keyCode)<0&&(c=!0,vR=null));let u=new Set,d=e=>{if(e){for(let t of e.run)if(!u.has(t)&&(u.add(t),t(n)))return e.stopPropagation&&(l=!0),!0;e.preventDefault&&(e.stopPropagation&&(l=!0),c=!0)}return!1},f=e[r],p,m;return f&&(d(f[o+pR(i,t,!a)])?s=!0:a&&(t.altKey||t.metaKey||t.ctrlKey)&&!(q.windows&&t.ctrlKey&&t.altKey)&&!(q.mac&&t.altKey&&!(t.ctrlKey||t.metaKey))&&(p=QM[t.keyCode])&&p!=i?(d(f[o+pR(p,t,!0)])||t.shiftKey&&(m=$M[t.keyCode])!=i&&m!=p&&d(f[o+pR(m,t,!1)]))&&(s=!0):a&&t.shiftKey&&d(f[o+pR(i,t,!0)])&&(s=!0),!s&&d(f._any)&&(s=!0)),c&&(s=!0),s&&l&&t.stopPropagation(),xR=null,s}var CR=class e{constructor(e,t,n,r,i){this.className=e,this.left=t,this.top=n,this.width=r,this.height=i}draw(){let e=document.createElement(`div`);return e.className=this.className,this.adjust(e),e}update(e,t){return t.className==this.className&&(this.adjust(e),!0)}adjust(e){e.style.left=this.left+`px`,e.style.top=this.top+`px`,this.width!=null&&(e.style.width=this.width+`px`),e.style.height=this.height+`px`}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(t,n,r){if(r.empty){let i=t.coordsAtPos(r.head,r.assoc||1);if(!i)return[];let a=wR(t);return[new e(n,i.left-a.left,i.top-a.top,null,i.bottom-i.top)]}return ER(t,n,r)}};function wR(e){let t=e.scrollDOM.getBoundingClientRect();return{left:(e.textDirection==cP.LTR?t.left:t.right-e.scrollDOM.clientWidth*e.scaleX)-e.scrollDOM.scrollLeft*e.scaleX,top:t.top-e.scrollDOM.scrollTop*e.scaleY}}function TR(e,t,n,r){let i=e.coordsAtPos(t,n*2);if(!i)return r;let a=e.dom.getBoundingClientRect(),o=(i.top+i.bottom)/2,s=e.posAtCoords({x:a.left+1,y:o}),c=e.posAtCoords({x:a.right-1,y:o});return s==null||c==null?r:{from:Math.max(r.from,Math.min(s,c)),to:Math.min(r.to,Math.max(s,c))}}function ER(e,t,n){if(n.to<=e.viewport.from||n.from>=e.viewport.to)return[];let r=Math.max(n.from,e.viewport.from),i=Math.min(n.to,e.viewport.to),a=e.textDirection==cP.LTR,o=e.contentDOM,s=o.getBoundingClientRect(),c=wR(e),l=o.querySelector(`.cm-line`),u=l&&window.getComputedStyle(l),d=s.left+(u?parseInt(u.paddingLeft)+Math.min(0,parseInt(u.textIndent)):0),f=s.right-(u?parseInt(u.paddingRight):0),p=tI(e,r,1),m=tI(e,i,-1),h=p.type==CN.Text?p:null,g=m.type==CN.Text?m:null;if(h&&(e.lineWrapping||p.widgetLineBreaks)&&(h=TR(e,r,1,h)),g&&(e.lineWrapping||m.widgetLineBreaks)&&(g=TR(e,i,-1,g)),h&&g&&h.from==g.from&&h.to==g.to)return v(y(n.from,n.to,h));{let t=h?y(n.from,null,h):b(p,!1),r=g?y(null,n.to,g):b(m,!0),i=[];return(h||p).to<(g||m).from-(h&&g?1:0)||p.widgetLineBreaks>1&&t.bottom+e.defaultLineHeight/2<r.top?i.push(_(d,t.bottom,f,r.top)):t.bottom<r.top&&e.elementAtHeight((t.bottom+r.top)/2).type==CN.Text&&(t.bottom=r.top=(t.bottom+r.top)/2),v(t).concat(i).concat(v(r))}function _(e,n,r,i){return new CR(t,e-c.left,n-c.top,Math.max(0,r-e),i-n)}function v({top:e,bottom:t,horizontal:n}){let r=[];for(let i=0;i<n.length;i+=2)r.push(_(n[i],e,n[i+1],t));return r}function y(t,n,r){let i=1e9,o=-1e9,s=[];function c(t,n,c,l,u){let p=e.coordsAtPos(t,t==r.to?-2:2),m=e.coordsAtPos(c,c==r.from?2:-2);p&&m&&(i=Math.min(p.top,m.top,i),o=Math.max(p.bottom,m.bottom,o),u==cP.LTR?s.push(a&&n?d:p.left,a&&l?f:m.right):s.push(!a&&l?d:m.left,!a&&n?f:p.right))}let l=t??r.from,u=n??r.to;for(let r of e.visibleRanges)if(r.to>l&&r.from<u)for(let i=Math.max(r.from,l),a=Math.min(r.to,u);;){let r=e.state.doc.lineAt(i);for(let o of e.bidiSpans(r)){let e=o.from+r.from,s=o.to+r.from;if(e>=a)break;s>i&&c(Math.max(e,i),t==null&&e<=l,Math.min(s,a),n==null&&s>=u,o.dir)}if(i=r.to+1,i>=a)break}return s.length==0&&c(l,t==null,u,n==null,e.textDirection),{top:i,bottom:o,horizontal:s}}function b(e,t){let n=s.top+(t?e.top:e.bottom);return{top:n,bottom:n,horizontal:[]}}}function DR(e,t){return e.constructor==t.constructor&&e.eq(t)}var OR=class{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement(`div`)),this.dom.classList.add(`cm-layer`),t.above&&this.dom.classList.add(`cm-layer-above`),t.class&&this.dom.classList.add(t.class),this.scale(),this.dom.setAttribute(`aria-hidden`,`true`),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(kR)!=e.state.facet(kR)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let t=0,n=e.facet(kR);for(;t<n.length&&n[t]!=this.layer;)t++;this.dom.style.zIndex=String((this.layer.above?150:-1)-t)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:e,scaleY:t}=this.view;(e!=this.scaleX||t!=this.scaleY)&&(this.scaleX=e,this.scaleY=t,this.dom.style.transform=`scale(${1/e}, ${1/t})`)}draw(e){if(e.length!=this.drawn.length||e.some((e,t)=>!DR(e,this.drawn[t]))){let t=this.dom.firstChild,n=0;for(let r of e)r.update&&t&&r.constructor&&this.drawn[n].constructor&&r.update(t,this.drawn[n])?(t=t.nextSibling,n++):this.dom.insertBefore(r.draw(),t);for(;t;){let e=t.nextSibling;t.remove(),t=e}this.drawn=e,q.webkit&&(this.dom.style.display=this.dom.firstChild?``:`none`)}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}},kR=Nj.define();function AR(e){return[XP.define(t=>new OR(t,e)),kR.of(e)]}var jR=!q.ios,MR=Nj.define({combine(e){return CM(e,{cursorBlinkRate:1200,drawRangeCursor:!0,iosSelectionHandles:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})}});function NR(e={}){return[MR.of(e),FR,LR,zR,VP.of(!0)]}function PR(e){return e.startState.facet(MR)!=e.state.facet(MR)}var FR=AR({above:!0,markers(e){let{state:t}=e,n=t.facet(MR),r=[];for(let i of t.selection.ranges){let a=i==t.selection.main;if(i.empty||n.drawRangeCursor&&!(a&&q.ios&&n.iosSelectionHandles)){let t=a?`cm-cursor cm-cursor-primary`:`cm-cursor cm-cursor-secondary`,n=i.empty?i:K.cursor(i.head,i.assoc);for(let i of CR.forRange(e,t,n))r.push(i)}}return r},update(e,t){e.transactions.some(e=>e.selection)&&(t.style.animationName=t.style.animationName==`cm-blink`?`cm-blink2`:`cm-blink`);let n=PR(e);return n&&IR(e.state,t),e.docChanged||e.selectionSet||n},mount(e,t){IR(t.state,e)},class:`cm-cursorLayer`});function IR(e,t){t.style.animationDuration=e.facet(MR).cursorBlinkRate+`ms`}var LR=AR({above:!1,markers(e){let t=[],{main:n,ranges:r}=e.state.selection;for(let i of r)if(!i.empty&&(jR||i!=n))for(let n of CR.forRange(e,`cm-selectionBackground`,i))t.push(n);if(q.ios&&!n.empty&&e.state.facet(MR).iosSelectionHandles){for(let r of CR.forRange(e,`cm-selectionHandle cm-selectionHandle-start`,K.cursor(n.from,1)))t.push(r);for(let r of CR.forRange(e,`cm-selectionHandle cm-selectionHandle-end`,K.cursor(n.to,1)))t.push(r)}return t},update(e,t){return e.docChanged||e.selectionSet||e.viewportChanged||PR(e)},class:`cm-selectionLayer`}),RR=q.gecko&&q.gecko_version==153?`#ffffff01`:`transparent`,zR=Uj.highest(oR.theme({".cm-line":{...jR?{"& ::selection, &::selection":{backgroundColor:`${RR} !important`}}:{},caretColor:`transparent !important`},".cm-content":{caretColor:`transparent !important`,"& :focus":{caretColor:`initial !important`,...jR?{"&::selection, & ::selection":{backgroundColor:`Highlight !important`}}:{}}}}));/x/.unicode;function BR(){return HR}var VR=wN.line({class:`cm-activeLine`}),HR=XP.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.docChanged||e.selectionSet)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=-1,n=[];for(let r of e.state.selection.ranges){let i=e.lineBlockAt(r.head);i.from>t&&(n.push(VR.range(i.from)),t=i.from)}return wN.set(n)}},{decorations:e=>e.decorations}),UR=class extends SN{constructor(e){super(),this.content=e}toDOM(e){let t=document.createElement(`span`);return t.className=`cm-placeholder`,t.style.pointerEvents=`none`,t.appendChild(typeof this.content==`string`?document.createTextNode(this.content):typeof this.content==`function`?this.content(e):this.content.cloneNode(!0)),t.setAttribute(`aria-hidden`,`true`),t}coordsAt(e){let t=e.firstChild?LN(e.firstChild):[];if(!t.length)return null;let n=window.getComputedStyle(e.parentNode),r=UN(t[0],n.direction!=`rtl`),i=parseInt(n.lineHeight);return r.bottom-r.top>i*1.5?{left:r.left,right:r.right,top:r.top,bottom:r.top+i}:r}ignoreEvent(){return!1}};function WR(e){let t=XP.fromClass(class{constructor(t){this.view=t,this.placeholder=e?wN.set([wN.widget({widget:new UR(e),side:1}).range(0)]):wN.none}get decorations(){return this.view.state.doc.length?wN.none:this.placeholder}},{decorations:e=>e.decorations});return typeof e==`string`?[t,oR.contentAttributes.of({"aria-placeholder":e})]:t}var GR=class extends wM{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}};GR.prototype.elementClass=``,GR.prototype.toDOM=void 0,GR.prototype.mapMode=xj.TrackBefore,GR.prototype.startSide=GR.prototype.endSide=-1,GR.prototype.point=!0;var KR=Nj.define(),qR=Nj.define(),JR={class:``,renderEmptyElements:!1,elementStyle:``,markers:()=>kM.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:`before`},YR=Nj.define();function XR(e){return[QR(),YR.of({...JR,...e})]}var ZR=Nj.define({combine:e=>e.some(e=>e)});function QR(e){let t=[$R];return e&&e.fixed===!1&&t.push(ZR.of(!0)),t}var $R=XP.fromClass(class{constructor(e){this.view=e,this.domAfter=null,this.prevViewport=e.viewport,this.dom=document.createElement(`div`),this.dom.className=`cm-gutters cm-gutters-before`,this.dom.setAttribute(`aria-hidden`,`true`),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+`px`,this.gutters=e.state.facet(YR).map(t=>new rz(e,t)),this.fixed=!e.state.facet(ZR);for(let e of this.gutters)e.config.side==`after`?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.fixed&&(this.dom.style.position=`sticky`),this.syncGutters(!1),e.scrollDOM.insertBefore(this.dom,e.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement(`div`),this.domAfter.className=`cm-gutters cm-gutters-after`,this.domAfter.setAttribute(`aria-hidden`,`true`),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+`px`,this.domAfter.style.position=this.fixed?`sticky`:``,this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(e){if(this.updateGutters(e)){let t=this.prevViewport,n=e.view.viewport,r=Math.min(t.to,n.to)-Math.max(t.from,n.from);this.syncGutters(r<(n.to-n.from)*.8)}if(e.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+`px`;this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet(ZR)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?`sticky`:``,this.domAfter&&(this.domAfter.style.position=this.fixed?`sticky`:``)),this.prevViewport=e.view.viewport}syncGutters(e){let t=this.dom.nextSibling;e&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let n=kM.iter(this.view.state.facet(KR),this.view.viewport.from),r=[],i=this.gutters.map(e=>new nz(e,this.view.viewport,-this.view.documentPadding.top));for(let e of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(e.type)){let t=!0;for(let a of e.type)if(a.type==CN.Text&&t){tz(n,r,a.from);for(let e of i)e.line(this.view,a,r);t=!1}else if(a.widget)for(let e of i)e.widget(this.view,a)}else if(e.type==CN.Text){tz(n,r,e.from);for(let t of i)t.line(this.view,e,r)}else if(e.widget)for(let t of i)t.widget(this.view,e);for(let e of i)e.finish();e&&(this.view.scrollDOM.insertBefore(this.dom,t),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(e){let t=e.startState.facet(YR),n=e.state.facet(YR),r=e.docChanged||e.heightChanged||e.viewportChanged||!kM.eq(e.startState.facet(KR),e.state.facet(KR),e.view.viewport.from,e.view.viewport.to);if(t==n)for(let t of this.gutters)t.update(e)&&(r=!0);else{r=!0;let i=[];for(let r of n){let n=t.indexOf(r);n<0?i.push(new rz(this.view,r)):(this.gutters[n].update(e),i.push(this.gutters[n]))}for(let e of this.gutters)e.dom.remove(),i.indexOf(e)<0&&e.destroy();for(let e of i)e.config.side==`after`?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.gutters=i}return r}destroy(){for(let e of this.gutters)e.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:e=>oR.scrollMargins.of(t=>{let n=t.plugin(e);if(!n||n.gutters.length==0||!n.fixed)return null;let r=n.dom.offsetWidth*t.scaleX,i=n.domAfter?n.domAfter.offsetWidth*t.scaleX:0;return t.textDirection==cP.LTR?{left:r,right:i}:{right:r,left:i}})});function ez(e){return Array.isArray(e)?e:[e]}function tz(e,t,n){for(;e.value&&e.from<=n;)e.from==n&&t.push(e.value),e.next()}var nz=class{constructor(e,t,n){this.gutter=e,this.height=n,this.i=0,this.cursor=kM.iter(e.markers,t.from)}addElement(e,t,n){let{gutter:r}=this,i=(t.top-this.height)/e.scaleY,a=t.height/e.scaleY;if(this.i==r.elements.length){let t=new iz(e,a,i,n);r.elements.push(t),r.dom.appendChild(t.dom)}else r.elements[this.i].update(e,a,i,n);this.height=t.bottom,this.i++}line(e,t,n){let r=[];tz(this.cursor,r,t.from),n.length&&(r=r.concat(n));let i=this.gutter.config.lineMarker(e,t,r);i&&r.unshift(i);let a=this.gutter;(r.length!=0||a.config.renderEmptyElements)&&this.addElement(e,t,r)}widget(e,t){let n=this.gutter.config.widgetMarker(e,t.widget,t),r=n?[n]:null;for(let n of e.state.facet(qR)){let i=n(e,t.widget,t);i&&(r||=[]).push(i)}r&&this.addElement(e,t,r)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}},rz=class{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement(`div`),this.dom.className=`cm-gutter`+(this.config.class?` `+this.config.class:``);for(let n in t.domEventHandlers)this.dom.addEventListener(n,r=>{let i=r.target,a;if(i!=this.dom&&this.dom.contains(i)){for(;i.parentNode!=this.dom;)i=i.parentNode;let e=i.getBoundingClientRect();a=(e.top+e.bottom)/2}else a=r.clientY;let o=e.lineBlockAtHeight(a-e.documentTop);t.domEventHandlers[n](e,o,r)&&r.preventDefault()});this.markers=ez(t.markers(e)),t.initialSpacer&&(this.spacer=new iz(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+=`visibility: hidden; pointer-events: none`)}update(e){let t=this.markers;if(this.markers=ez(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let t=this.config.updateSpacer(this.spacer.markers[0],e);t!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[t])}let n=e.view.viewport;return!kM.eq(this.markers,t,n.from,n.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}},iz=class{constructor(e,t,n,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement(`div`),this.dom.className=`cm-gutterElement`,this.update(e,t,n,r)}update(e,t,n,r){this.height!=t&&(this.height=t,this.dom.style.height=t+`px`),this.above!=n&&(this.dom.style.marginTop=(this.above=n)?n+`px`:``),az(this.markers,r)||this.setMarkers(e,r)}setMarkers(e,t){let n=`cm-gutterElement`,r=this.dom.firstChild;for(let i=0,a=0;;){let o=a,s=i<t.length?t[i++]:null,c=!1;if(s){let e=s.elementClass;e&&(n+=` `+e);for(let e=a;e<this.markers.length;e++)if(this.markers[e].compare(s)){o=e,c=!0;break}}else o=this.markers.length;for(;a<o;){let e=this.markers[a++];if(e.toDOM){e.destroy(r);let t=r.nextSibling;r.remove(),r=t}}if(!s)break;s.toDOM&&(c?r=r.nextSibling:this.dom.insertBefore(s.toDOM(e),r)),c&&a++}this.dom.className=n,this.markers=t}destroy(){this.setMarkers(null,[])}};function az(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].compare(t[n]))return!1;return!0}var oz=Nj.define(),sz=Nj.define(),cz=Nj.define({combine(e){return CM(e,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,t){let n=Object.assign({},e);for(let e in t){let r=n[e],i=t[e];n[e]=r?(e,t,n)=>r(e,t,n)||i(e,t,n):i}return n}})}}),lz=class extends GR{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}};function uz(e,t){return e.state.facet(cz).formatNumber(t,e.state)}var dz=YR.compute([cz],e=>({class:`cm-lineNumbers`,renderEmptyElements:!1,markers(e){return e.state.facet(oz)},lineMarker(e,t,n){return n.some(e=>e.toDOM)?null:new lz(uz(e,e.state.doc.lineAt(t.from).number))},widgetMarker:(e,t,n)=>{for(let r of e.state.facet(sz)){let i=r(e,t,n);if(i)return i}return null},lineMarkerChange:e=>e.startState.facet(cz)!=e.state.facet(cz),initialSpacer(e){return new lz(uz(e,pz(e.state.doc.lines)))},updateSpacer(e,t){let n=uz(t.view,pz(t.view.state.doc.lines));return n==e.number?e:new lz(n)},domEventHandlers:e.facet(cz).domEventHandlers,side:`before`}));function fz(e={}){return[cz.of(e),QR(),dz]}function pz(e){let t=9;for(;t<e;)t=t*10+9;return t}var mz=new class extends GR{constructor(){super(...arguments),this.elementClass=`cm-activeLineGutter`}},hz=KR.compute([`selection`],e=>{let t=[],n=-1;for(let r of e.selection.ranges){let i=e.doc.lineAt(r.head).from;i>n&&(n=i,t.push(mz.range(i)))}return kM.of(t)});function gz(){return hz}var _z=1024,vz=0,yz=class{constructor(e,t){this.from=e,this.to=t}},bz=class{constructor(e={}){this.id=vz++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw Error(`This node type doesn't define a deserialize function`)}),this.combine=e.combine||null}add(e){if(this.perNode)throw RangeError(`Can't add per-node props to node types`);return typeof e!=`function`&&(e=Cz.match(e)),t=>{let n=e(t);return n===void 0?null:[this,n]}}};bz.closedBy=new bz({deserialize:e=>e.split(` `)}),bz.openedBy=new bz({deserialize:e=>e.split(` `)}),bz.group=new bz({deserialize:e=>e.split(` `)}),bz.isolate=new bz({deserialize:e=>{if(e&&e!=`rtl`&&e!=`ltr`&&e!=`auto`)throw RangeError(`Invalid value for isolate: `+e);return e||`auto`}}),bz.contextHash=new bz({perNode:!0}),bz.lookAhead=new bz({perNode:!0}),bz.mounted=new bz({perNode:!0});var xz=class{constructor(e,t,n,r=!1){this.tree=e,this.overlay=t,this.parser=n,this.bracketed=r}static get(e){return e&&e.props&&e.props[bz.mounted.id]}},Sz=Object.create(null),Cz=class e{constructor(e,t,n,r=0){this.name=e,this.props=t,this.id=n,this.flags=r}static define(t){let n=t.props&&t.props.length?Object.create(null):Sz,r=+!!t.top|(t.skipped?2:0)|(t.error?4:0)|(t.name==null?8:0),i=new e(t.name||``,n,t.id,r);if(t.props){for(let e of t.props)if(Array.isArray(e)||(e=e(i)),e){if(e[0].perNode)throw RangeError(`Can't store a per-node prop on a node type`);n[e[0].id]=e[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e==`string`){if(this.name==e)return!0;let t=this.prop(bz.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let n in e)for(let r of n.split(` `))t[r]=e[n];return e=>{for(let n=e.prop(bz.group),r=-1;r<(n?n.length:0);r++){let i=t[r<0?e.name:n[r]];if(i)return i}}}};Cz.none=new Cz(``,Object.create(null),0,8);var wz=class e{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw RangeError(`Node type ids should correspond to array positions when creating a node set`)}extend(...t){let n=[];for(let e of this.types){let r=null;for(let n of t){let t=n(e);if(t){r||=Object.assign({},e.props);let n=t[1],i=t[0];i.combine&&i.id in r&&(n=i.combine(r[i.id],n)),r[i.id]=n}}n.push(r?new Cz(e.name,r,e.id,e.flags):e)}return new e(n)}},Tz=new WeakMap,Ez=new WeakMap,Dz;(function(e){e[e.ExcludeBuffers=1]=`ExcludeBuffers`,e[e.IncludeAnonymous=2]=`IncludeAnonymous`,e[e.IgnoreMounts=4]=`IgnoreMounts`,e[e.IgnoreOverlays=8]=`IgnoreOverlays`,e[e.EnterBracketed=16]=`EnterBracketed`})(Dz||={});var Oz=class e{constructor(e,t,n,r,i){if(this.type=e,this.children=t,this.positions=n,this.length=r,this.props=null,i&&i.length){this.props=Object.create(null);for(let[e,t]of i)this.props[typeof e==`number`?e:e.id]=t}}toString(){let e=xz.get(this);if(e&&!e.overlay)return e.tree.toString();let t=``;for(let e of this.children){let n=e.toString();n&&(t&&(t+=`,`),t+=n)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?`(`+t+`)`:``):t}cursor(e=0){return new Hz(this.topNode,e)}cursorAt(e,t=0,n=0){let r=new Hz(Tz.get(this)||this.topNode);return r.moveTo(e,t),Tz.set(this,r._tree),r}get topNode(){return new Pz(this,0,0,null)}resolve(e,t=0){let n=Mz(Tz.get(this)||this.topNode,e,t,!1);return Tz.set(this,n),n}resolveInner(e,t=0){let n=Mz(Ez.get(this)||this.topNode,e,t,!0);return Ez.set(this,n),n}resolveStack(e,t=0){return Vz(this,e,t)}iterate(e){let{enter:t,leave:n,from:r=0,to:i=this.length}=e,a=e.mode||0,o=(a&Dz.IncludeAnonymous)>0;for(let e=this.cursor(a|Dz.IncludeAnonymous);;){let a=!1;if(e.from<=i&&e.to>=r&&(!o&&e.type.isAnonymous||t(e)!==!1)){if(e.firstChild())continue;a=!0}for(;a&&n&&(o||!e.type.isAnonymous)&&n(e),!e.nextSibling();){if(!e.parent())return;a=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(t={}){return this.children.length<=8?this:qz(Cz.none,this.children,this.positions,0,this.children.length,0,this.length,(t,n,r)=>new e(this.type,t,n,r,this.propValues),t.makeTree||((t,n,r)=>new e(Cz.none,t,n,r)))}static build(e){return Wz(e)}};Oz.empty=new Oz(Cz.none,[],[],0);var kz=class e{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new e(this.buffer,this.index)}},Az=class e{constructor(e,t,n){this.buffer=e,this.length=t,this.set=n}get type(){return Cz.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(`,`)}childString(e){let t=this.buffer[e],n=this.buffer[e+3],r=this.set.types[t],i=r.name;if(/\W/.test(i)&&!r.isError&&(i=JSON.stringify(i)),e+=4,n==e)return i;let a=[];for(;e<n;)a.push(this.childString(e)),e=this.buffer[e+3];return i+`(`+a.join(`,`)+`)`}findChild(e,t,n,r,i){let{buffer:a}=this,o=-1;for(let s=e;s!=t&&!(jz(i,r,a[s+1],a[s+2])&&(o=s,n>0));s=a[s+3]);return o}slice(t,n,r){let i=this.buffer,a=new Uint16Array(n-t),o=0;for(let e=t,s=0;e<n;){a[s++]=i[e++],a[s++]=i[e++]-r;let n=a[s++]=i[e++]-r;a[s++]=i[e++]-t,o=Math.max(o,n)}return new e(a,o,this.set)}};function jz(e,t,n,r){switch(e){case-2:return n<t;case-1:return r>=t&&n<t;case 0:return n<t&&r>t;case 1:return n<=t&&r>t;case 2:return r>t;case 4:return!0}}function Mz(e,t,n,r){for(;e.from==e.to||(n<1?e.from>=t:e.from>t)||(n>-1?e.to<=t:e.to<t);){let t=!r&&e instanceof Pz&&e.index<0?null:e.parent;if(!t)return e;e=t}let i=r?0:Dz.IgnoreOverlays;if(r)for(let r=e,a=r.parent;a;r=a,a=r.parent)r instanceof Pz&&r.index<0&&a.enter(t,n,i)?.from!=r.from&&(e=a);for(;;){let r=e.enter(t,n,i);if(!r)return e;e=r}}var Nz=class{cursor(e=0){return new Hz(this,e)}getChild(e,t=null,n=null){let r=Fz(this,e,t,n);return r.length?r[0]:null}getChildren(e,t=null,n=null){return Fz(this,e,t,n)}resolve(e,t=0){return Mz(this,e,t,!1)}resolveInner(e,t=0){return Mz(this,e,t,!0)}matchContext(e){return Iz(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),n=this;for(;t;){let e=t.lastChild;if(!e||e.to!=t.to)break;e.type.isError&&e.from==e.to?(n=t,t=e.prevSibling):t=e}return n}get node(){return this}get next(){return this.parent}},Pz=class e extends Nz{constructor(e,t,n,r){super(),this._tree=e,this.from=t,this.index=n,this._parent=r}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(t,n,r,i,a=0){for(let o=this;;){for(let{children:s,positions:c}=o._tree,l=n>0?s.length:-1;t!=l;t+=n){let l=s[t],u=c[t]+o.from,d;if(a&Dz.EnterBracketed&&l instanceof Oz&&(d=xz.get(l))&&!d.overlay&&d.bracketed&&r>=u&&r<=u+l.length||jz(i,r,u,u+l.length)){if(l instanceof Az){if(a&Dz.ExcludeBuffers)continue;let e=l.findChild(0,l.buffer.length,n,r-u,i);if(e>-1)return new Rz(new Lz(o,l,t,u),null,e)}else if(a&Dz.IncludeAnonymous||!l.type.isAnonymous||Uz(l)){let s;if(!(a&Dz.IgnoreMounts)&&(s=xz.get(l))&&!s.overlay)return new e(s.tree,u,t,o);let c=new e(l,u,t,o);return a&Dz.IncludeAnonymous||!c.type.isAnonymous?c:c.nextChild(n<0?l.children.length-1:0,n,r,i,a)}}}if(a&Dz.IncludeAnonymous||!o.type.isAnonymous||(t=o.index>=0?o.index+n:n<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}prop(e){return this._tree.prop(e)}enter(t,n,r=0){let i;if(!(r&Dz.IgnoreOverlays)&&(i=xz.get(this._tree))&&i.overlay){let a=t-this.from,o=r&Dz.EnterBracketed&&i.bracketed;for(let{from:t,to:r}of i.overlay)if((n>0||o?t<=a:t<a)&&(n<0||o?r>=a:r>a))return new e(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,t,n,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}};function Fz(e,t,n,r){let i=e.cursor(),a=[];if(!i.firstChild())return a;if(n!=null){for(let e=!1;!e;)if(e=i.type.is(n),!i.nextSibling())return a}for(;;){if(r!=null&&i.type.is(r))return a;if(i.type.is(t)&&a.push(i.node),!i.nextSibling())return r==null?a:[]}}function Iz(e,t,n=t.length-1){for(let r=e;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(t[n]&&t[n]!=r.name)return!1;n--}}return!0}var Lz=class{constructor(e,t,n,r){this.parent=e,this.buffer=t,this.index=n,this.start=r}},Rz=class e extends Nz{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,n){super(),this.context=e,this._parent=t,this.index=n,this.type=e.buffer.set.types[e.buffer.buffer[n]]}child(t,n,r){let{buffer:i}=this.context,a=i.findChild(this.index+4,i.buffer[this.index+3],t,n-this.context.start,r);return a<0?null:new e(this.context,this,a)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}prop(e){return this.type.prop(e)}enter(t,n,r=0){if(r&Dz.ExcludeBuffers)return null;let{buffer:i}=this.context,a=i.findChild(this.index+4,i.buffer[this.index+3],n>0?1:-1,t-this.context.start,n);return a<0?null:new e(this.context,this,a)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:t}=this.context,n=t.buffer[this.index+3];return n<(this._parent?t.buffer[this._parent.index+3]:t.buffer.length)?new e(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:t}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new e(this.context,this._parent,t.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:n}=this.context,r=this.index+4,i=n.buffer[this.index+3];if(i>r){let a=n.buffer[this.index+1];e.push(n.slice(r,i,a)),t.push(0)}return new Oz(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}};function zz(e){if(!e.length)return null;let t=0,n=e[0];for(let r=1;r<e.length;r++){let i=e[r];(i.from>n.from||i.to<n.to)&&(n=i,t=r)}let r=n instanceof Pz&&n.index<0?null:n.parent,i=e.slice();return r?i[t]=r:i.splice(t,1),new Bz(i,n)}var Bz=class{constructor(e,t){this.heads=e,this.node=t}get next(){return zz(this.heads)}};function Vz(e,t,n){let r=e.resolveInner(t,n),i=null;for(let e=r instanceof Pz?r:r.context.parent;e;e=e.parent)if(e.index<0){let a=e.parent;(i||=[r]).push(a.resolve(t,n)),e=a}else{let a=xz.get(e.tree);if(a&&a.overlay&&a.overlay[0].from<=t&&a.overlay[a.overlay.length-1].to>=t){let o=new Pz(a.tree,a.overlay[0].from+e.from,-1,e);(i||=[r]).push(Mz(o,t,n,!1))}}return i?zz(i):r}var Hz=class{get name(){return this.type.name}constructor(e,t=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=t&~Dz.EnterBracketed,e instanceof Pz)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let t=e._parent;t;t=t._parent)this.stack.unshift(t.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:n,buffer:r}=this.buffer;return this.type=t||r.set.types[r.buffer[e]],this.from=n+r.buffer[e+1],this.to=n+r.buffer[e+2],!0}yield(e){return e?e instanceof Pz?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,n,this.mode));let{buffer:r}=this.buffer,i=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.buffer.start,n);return i<0?!1:(this.stack.push(this.index),this.yieldBuf(i))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,n=this.mode){return this.buffer?n&Dz.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Dz.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&Dz.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,n=this.stack.length-1;if(e<0){let e=n<0?0:this.stack[n]+4;if(this.index!=e)return this.yieldBuf(t.findChild(e,this.index,-1,0,4))}else{let e=t.buffer[this.index+3];if(e<(n<0?t.buffer.length:t.buffer[this.stack[n]+3]))return this.yieldBuf(e)}return n<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode))}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,n,{buffer:r}=this;if(r){if(e>0){if(this.index<r.buffer.buffer.length)return!1}else for(let e=0;e<this.index;e++)if(r.buffer.buffer[e+3]<this.index)return!1;({index:t,parent:n}=r)}else({index:t,_parent:n}=this._tree);for(;n;{index:t,_parent:n}=n)if(t>-1)for(let r=t+e,i=e<0?-1:n._tree.children.length;r!=i;r+=e){let e=n._tree.children[r];if(this.mode&Dz.IncludeAnonymous||e instanceof Az||!e.type.isAnonymous||Uz(e))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,n=0;if(e&&e.context==this.buffer)scan:for(let r=this.index,i=this.stack.length;i>=0;){for(let a=e;a;a=a._parent)if(a.index==r){if(r==this.index)return a;t=a,n=i+1;break scan}r=this.stack[--i]}for(let e=n;e<this.stack.length;e++)t=new Rz(this.buffer,t,this.stack[e]);return this.bufferNode=new Rz(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let n=0;;){let r=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){n++;continue}this.type.isAnonymous||(r=!0)}for(;;){if(r&&t&&t(this),r=this.type.isAnonymous,!n)return;if(this.nextSibling())break;this.parent(),n--,r=!0}}}matchContext(e){if(!this.buffer)return Iz(this.node.parent,e);let{buffer:t}=this.buffer,{types:n}=t.set;for(let r=e.length-1,i=this.stack.length-1;r>=0;i--){if(i<0)return Iz(this._tree,e,r);let a=n[t.buffer[this.stack[i]]];if(!a.isAnonymous){if(e[r]&&e[r]!=a.name)return!1;r--}}return!0}};function Uz(e){return e.children.some(e=>e instanceof Az||!e.type.isAnonymous||Uz(e))}function Wz(e){let{buffer:t,nodeSet:n,maxBufferLength:r=_z,reused:i=[],minRepeatType:a=n.types.length}=e,o=Array.isArray(t)?new kz(t,t.length):t,s=n.types,c=0,l=0;function u(e,t,_,v,y,b){let{id:x,start:S,end:C,size:w}=o,T=l,E=c;if(w<0){if(o.next(),w==-1){let t=i[x];_.push(t),v.push(S-e);return}if(w==-3){c=x;return}if(w==-4){l=x;return}throw RangeError(`Unrecognized record size: ${w}`)}let D=s[x],O,k,A=S-e;if(C-S<=r&&(k=h(o.pos-t,y))){let t=new Uint16Array(k.size-k.skip),r=o.pos-k.size,i=t.length;for(;o.pos>r;)i=g(k.start,t,i);O=new Az(t,C-k.start,n),A=k.start-e}else{let e=o.pos-w;o.next();let t=[],s=[],c=x>=a?x:-1,h=0,g=C,_=T;for(;o.pos>e;)c>=0&&o.id==c&&o.size>=0?(o.end<=g-r&&(p(t,s,S,h,o.end,g,c,_,E),h=t.length,g=o.end,_=l),o.next()):b>2500?d(S,e,t,s):(c>=0&&o.size==-1&&i[o.id].type==n.types[c]&&(h<t.length&&p(t,s,S,h,o.end,g,c,_,E),h=t.length+1,g=o.start,_=l),u(S,e,t,s,c,b+1));if(c>=0&&h>0&&h<t.length&&p(t,s,S,h,S,g,c,_,E),t.reverse(),s.reverse(),c>-1&&h>0){let e=f(D,E);O=qz(D,t,s,0,t.length,0,C-S,e,e)}else O=m(D,t,s,C-S,T-C,E)}_.push(O),v.push(A)}function d(e,t,i,a){let s=[],c=0,l=-1;for(;o.pos>t;){let{id:e,start:t,end:n,size:i}=o;if(i>4)o.next();else if(l>-1&&t<l)break;else l<0&&(l=n-r),s.push(e,t,n),c++,o.next()}if(c){let t=new Uint16Array(c*4),r=s[s.length-2];for(let e=s.length-3,n=0;e>=0;e-=3)t[n++]=s[e],t[n++]=s[e+1]-r,t[n++]=s[e+2]-r,t[n++]=n;i.push(new Az(t,s[2]-r,n)),a.push(r-e)}}function f(e,t){return(n,r,i)=>{let a=0,o=n.length-1,s,c;if(o>=0&&(s=n[o])instanceof Oz){if(!o&&s.type==e&&s.length==i)return s;(c=s.prop(bz.lookAhead))&&(a=r[o]+s.length+c-i)}return m(e,n,r,i,a,t)}}function p(e,t,r,i,a,o,s,c,l){let u=[],d=[];for(;e.length>i;)u.push(e.pop()),d.push(t.pop()+r-a);e.push(m(n.types[s],u,d,o-a,c-o,l)),t.push(a-r)}function m(e,t,n,r,i,a,o){if(a){let e=[bz.contextHash,a];o=o?[e].concat(o):[e]}if(i>25){let e=[bz.lookAhead,i];o=o?[e].concat(o):[e]}return new Oz(e,t,n,r,o)}function h(e,t){let n=o.fork(),i=0,s=0,c=0,l=n.end-r,u={size:0,start:0,skip:0};scan:for(let r=n.pos-e;n.pos>r;){let e=n.size;if(n.id==t&&e>=0){u.size=i,u.start=s,u.skip=c,c+=4,i+=4,n.next();continue}let o=n.pos-e;if(e<0||o<r||n.start<l)break;let d=n.id>=a?4:0,f=n.start;for(n.next();n.pos>o;){if(n.size<0){if(n.size==-3||n.size==-4)d+=4;else break scan}else n.id>=a&&(d+=4);n.next()}s=f,i+=e,c+=d}return(t<0||i==e)&&(u.size=i,u.start=s,u.skip=c),u.size>4?u:void 0}function g(e,t,n){let{id:r,start:i,end:s,size:u}=o;if(o.next(),u>=0&&r<a){let a=n;if(u>4){let r=o.pos-(u-4);for(;o.pos>r;)n=g(e,t,n)}t[--n]=a,t[--n]=s-e,t[--n]=i-e,t[--n]=r}else u==-3?c=r:u==-4&&(l=r);return n}let _=[],v=[];for(;o.pos>0;)u(e.start||0,e.bufferStart||0,_,v,-1,0);let y=e.length??(_.length?v[0]+_[0].length:0);return new Oz(s[e.topID],_.reverse(),v.reverse(),y)}var Gz=new WeakMap;function Kz(e,t){if(!e.isAnonymous||t instanceof Az||t.type!=e)return 1;let n=Gz.get(t);if(n==null){n=1;for(let r of t.children){if(r.type!=e||!(r instanceof Oz)){n=1;break}n+=Kz(e,r)}Gz.set(t,n)}return n}function qz(e,t,n,r,i,a,o,s,c){let l=0;for(let n=r;n<i;n++)l+=Kz(e,t[n]);let u=Math.ceil(l*1.5/8),d=[],f=[];function p(t,n,r,i,o){for(let s=r;s<i;){let r=s,l=n[s],m=Kz(e,t[s]);for(s++;s<i;s++){let n=Kz(e,t[s]);if(m+n>=u)break;m+=n}if(s==r+1){if(m>u){let e=t[r];p(e.children,e.positions,0,e.children.length,n[r]+o);continue}d.push(t[r])}else{let i=n[s-1]+t[s-1].length-l;d.push(qz(e,t,n,r,s,l,i,null,c))}f.push(l+o-a)}}return p(t,n,r,i,0),(s||c)(d,f,o)}var Jz=class e{constructor(e,t,n,r,i=!1,a=!1){this.from=e,this.to=t,this.tree=n,this.offset=r,this.open=!!i|(a?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(t,n=[],r=!1){let i=[new e(0,t.length,t,0,!1,r)];for(let e of n)e.to>t.length&&i.push(e);return i}static applyChanges(t,n,r=128){if(!n.length)return t;let i=[],a=1,o=t.length?t[0]:null;for(let s=0,c=0,l=0;;s++){let u=s<n.length?n[s]:null,d=u?u.fromA:1e9;if(d-c>=r)for(;o&&o.from<d;){let n=o;if(c>=n.from||d<=n.to||l){let t=Math.max(n.from,c)-l,r=Math.min(n.to,d)-l;n=t>=r?null:new e(t,r,n.tree,n.offset+l,s>0,!!u)}if(n&&i.push(n),o.to>d)break;o=a<t.length?t[a++]:null}if(!u)break;c=u.toA,l=u.toA-u.toB}return i}},Yz=class{startParse(e,t,n){return typeof e==`string`&&(e=new Xz(e)),n=n?n.length?n.map(e=>new yz(e.from,e.to)):[new yz(0,0)]:[new yz(0,e.length)],this.createParse(e,t||[],n)}parse(e,t,n){let r=this.startParse(e,t,n);for(;;){let e=r.advance();if(e)return e}}},Xz=class{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}};new bz({perNode:!0});var Zz=0,Qz=class e{constructor(e,t,n,r){this.name=e,this.set=t,this.base=n,this.modified=r,this.id=Zz++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(t,n){let r=typeof t==`string`?t:`?`;if(t instanceof e&&(n=t),n?.base)throw Error(`Can not derive from a modified tag`);let i=new e(r,[],null,[]);if(i.set.push(i),n)for(let e of n.set)i.set.push(e);return i}static defineModifier(e){let t=new eB(e);return e=>e.modified.indexOf(t)>-1?e:eB.get(e.base||e,e.modified.concat(t).sort((e,t)=>e.id-t.id))}},$z=0,eB=class e{constructor(e){this.name=e,this.instances=[],this.id=$z++}static get(t,n){if(!n.length)return t;let r=n[0].instances.find(e=>e.base==t&&tB(n,e.modified));if(r)return r;let i=[],a=new Qz(t.name,i,t,n);for(let e of n)e.instances.push(a);let o=nB(n);for(let n of t.set)if(!n.modified.length)for(let t of o)i.push(e.get(n,t));return a}};function tB(e,t){return e.length==t.length&&e.every((e,n)=>e==t[n])}function nB(e){let t=[[]];for(let n=0;n<e.length;n++)for(let r=0,i=t.length;r<i;r++)t.push(t[r].concat(e[n]));return t.sort((e,t)=>t.length-e.length)}function rB(e){let t=Object.create(null);for(let n in e){let r=e[n];Array.isArray(r)||(r=[r]);for(let e of n.split(` `))if(e){let n=[],i=2,a=e;for(let t=0;;){if(a==`...`&&t>0&&t+3==e.length){i=1;break}let r=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(a);if(!r)throw RangeError(`Invalid path: `+e);if(n.push(r[0]==`*`?``:r[0][0]==`"`?JSON.parse(r[0]):r[0]),t+=r[0].length,t==e.length)break;let o=e[t++];if(t==e.length&&o==`!`){i=0;break}if(o!=`/`)throw RangeError(`Invalid path: `+e);a=e.slice(t)}let o=n.length-1,s=n[o];if(!s)throw RangeError(`Invalid path: `+e);t[s]=new aB(r,i,o>0?n.slice(0,o):null).sort(t[s])}}return iB.add(t)}var iB=new bz({combine(e,t){let n,r,i;for(;e||t;){if(!e||t&&e.depth<=t.depth?(i=t,t=t.next):(i=e,e=e.next),n&&n.mode==i.mode&&!i.context&&!n.context)continue;let a=new aB(i.tags,i.mode,i.context);n?n.next=a:r=a,n=a}return r}}),aB=class{constructor(e,t,n,r){this.tags=e,this.mode=t,this.context=n,this.next=r}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}};aB.empty=new aB([],2,null);function oB(e,t){let n=Object.create(null);for(let t of e)if(!Array.isArray(t.tag))n[t.tag.id]=t.class;else for(let e of t.tag)n[e.id]=t.class;let{scope:r,all:i=null}=t||{};return{style:e=>{let t=i;for(let r of e)for(let e of r.set){let r=n[e.id];if(r){t=t?t+` `+r:r;break}}return t},scope:r}}function sB(e,t){let n=null;for(let r of e){let e=r.style(t);e&&(n=n?n+` `+e:e)}return n}function cB(e,t,n,r=0,i=e.length){let a=new lB(r,Array.isArray(t)?t:[t],n);a.highlightRange(e.cursor(),r,i,``,a.highlighters),a.flush(i)}var lB=class{constructor(e,t,n){this.at=e,this.highlighters=t,this.span=n,this.class=``}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,n,r,i){let{type:a,from:o,to:s}=e;if(o>=n||s<=t)return;a.isTop&&(i=this.highlighters.filter(e=>!e.scope||e.scope(a)));let c=r,l=uB(e)||aB.empty,u=sB(i,l.tags);if(u&&(c&&(c+=` `),c+=u,l.mode==1&&(r+=(r?` `:``)+u)),this.startSpan(Math.max(t,o),c),l.opaque)return;let d=e.tree&&e.tree.prop(bz.mounted);if(d&&d.overlay){let a=e.node.enter(d.overlay[0].from+o,1),l=this.highlighters.filter(e=>!e.scope||e.scope(d.tree.type)),u=e.firstChild();for(let f=0,p=o;;f++){let m=f<d.overlay.length?d.overlay[f]:null,h=m?m.from+o:s,g=Math.max(t,p),_=Math.min(n,h);if(g<_&&u)for(;e.from<_&&(this.highlightRange(e,g,_,r,i),this.startSpan(Math.min(_,e.to),c),!(e.to>=h||!e.nextSibling())););if(!m||h>n)break;p=m.to+o,p>t&&(this.highlightRange(a.cursor(),Math.max(t,m.from+o),Math.min(n,p),``,l),this.startSpan(Math.min(n,p),c))}u&&e.parent()}else if(e.firstChild()){d&&(r=``);do if(!(e.to<=t)){if(e.from>=n)break;this.highlightRange(e,t,n,r,i),this.startSpan(Math.min(n,e.to),c)}while(e.nextSibling());e.parent()}}};function uB(e){let t=e.type.prop(iB);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}var J=Qz.define,dB=J(),fB=J(),pB=J(fB),mB=J(fB),hB=J(),gB=J(hB),_B=J(hB),vB=J(),yB=J(vB),bB=J(),xB=J(),SB=J(),CB=J(SB),wB=J(),Y={comment:dB,lineComment:J(dB),blockComment:J(dB),docComment:J(dB),name:fB,variableName:J(fB),typeName:pB,tagName:J(pB),propertyName:mB,attributeName:J(mB),className:J(fB),labelName:J(fB),namespace:J(fB),macroName:J(fB),literal:hB,string:gB,docString:J(gB),character:J(gB),attributeValue:J(gB),number:_B,integer:J(_B),float:J(_B),bool:J(hB),regexp:J(hB),escape:J(hB),color:J(hB),url:J(hB),keyword:bB,self:J(bB),null:J(bB),atom:J(bB),unit:J(bB),modifier:J(bB),operatorKeyword:J(bB),controlKeyword:J(bB),definitionKeyword:J(bB),moduleKeyword:J(bB),operator:xB,derefOperator:J(xB),arithmeticOperator:J(xB),logicOperator:J(xB),bitwiseOperator:J(xB),compareOperator:J(xB),updateOperator:J(xB),definitionOperator:J(xB),typeOperator:J(xB),controlOperator:J(xB),punctuation:SB,separator:J(SB),bracket:CB,angleBracket:J(CB),squareBracket:J(CB),paren:J(CB),brace:J(CB),content:vB,heading:yB,heading1:J(yB),heading2:J(yB),heading3:J(yB),heading4:J(yB),heading5:J(yB),heading6:J(yB),contentSeparator:J(vB),list:J(vB),quote:J(vB),emphasis:J(vB),strong:J(vB),link:J(vB),monospace:J(vB),strikethrough:J(vB),inserted:J(),deleted:J(),changed:J(),invalid:J(),meta:wB,documentMeta:J(wB),annotation:J(wB),processingInstruction:J(wB),definition:Qz.defineModifier(`definition`),constant:Qz.defineModifier(`constant`),function:Qz.defineModifier(`function`),standard:Qz.defineModifier(`standard`),local:Qz.defineModifier(`local`),special:Qz.defineModifier(`special`)};for(let e in Y){let t=Y[e];t instanceof Qz&&(t.name=e)}oB([{tag:Y.link,class:`tok-link`},{tag:Y.heading,class:`tok-heading`},{tag:Y.emphasis,class:`tok-emphasis`},{tag:Y.strong,class:`tok-strong`},{tag:Y.keyword,class:`tok-keyword`},{tag:Y.atom,class:`tok-atom`},{tag:Y.bool,class:`tok-bool`},{tag:Y.url,class:`tok-url`},{tag:Y.labelName,class:`tok-labelName`},{tag:Y.inserted,class:`tok-inserted`},{tag:Y.deleted,class:`tok-deleted`},{tag:Y.literal,class:`tok-literal`},{tag:Y.string,class:`tok-string`},{tag:Y.number,class:`tok-number`},{tag:[Y.regexp,Y.escape,Y.special(Y.string)],class:`tok-string2`},{tag:Y.variableName,class:`tok-variableName`},{tag:Y.local(Y.variableName),class:`tok-variableName tok-local`},{tag:Y.definition(Y.variableName),class:`tok-variableName tok-definition`},{tag:Y.special(Y.variableName),class:`tok-variableName2`},{tag:Y.definition(Y.propertyName),class:`tok-propertyName tok-definition`},{tag:Y.typeName,class:`tok-typeName`},{tag:Y.namespace,class:`tok-namespace`},{tag:Y.className,class:`tok-className`},{tag:Y.macroName,class:`tok-macroName`},{tag:Y.propertyName,class:`tok-propertyName`},{tag:Y.operator,class:`tok-operator`},{tag:Y.comment,class:`tok-comment`},{tag:Y.meta,class:`tok-meta`},{tag:Y.invalid,class:`tok-invalid`},{tag:Y.punctuation,class:`tok-punctuation`}]);var TB=new bz;function EB(e){return Nj.define({combine:e?t=>t.concat(e):void 0})}var DB=new bz,OB=class{constructor(e,t,n=[],r=``){this.data=e,this.name=r,SM.prototype.hasOwnProperty(`tree`)||Object.defineProperty(SM.prototype,"tree",{get(){return AB(this)}}),this.parser=t,this.extension=[IB.of(this),SM.languageData.of((e,t,n)=>{let r=kB(e,t,n),i=r.type.prop(TB);if(!i)return[];let a=e.facet(i),o=r.type.prop(DB);if(o){let i=r.resolve(t-r.from,n);for(let t of o)if(t.test(i,e)){let n=e.facet(t.facet);return t.type==`replace`?n:n.concat(a)}}return a})].concat(n)}isActiveAt(e,t,n=-1){return kB(e,t,n).type.prop(TB)==this.data}findRegions(e){let t=e.facet(IB);if(t?.data==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let n=[],r=(e,t)=>{if(e.prop(TB)==this.data){n.push({from:t,to:t+e.length});return}let i=e.prop(bz.mounted);if(i){if(i.tree.prop(TB)==this.data){if(i.overlay)for(let e of i.overlay)n.push({from:e.from+t,to:e.to+t});else n.push({from:t,to:t+e.length});return}if(i.overlay){let e=n.length;if(r(i.tree,i.overlay[0].from+t),n.length>e)return}}for(let n=0;n<e.children.length;n++){let i=e.children[n];i instanceof Oz&&r(i,e.positions[n]+t)}};return r(AB(e),0),n}get allowsNesting(){return!0}};OB.setState=sM.define();function kB(e,t,n){let r=e.facet(IB),i=AB(e).topNode;if(!r||r.allowsNesting)for(let e=i;e;e=e.enter(t,n,Dz.ExcludeBuffers|Dz.EnterBracketed))e.type.isTop&&(i=e);return i}var Cee=class e extends OB{constructor(e,t,n){super(e,t,[],n),this.parser=t}static define(t){let n=EB(t.languageData);return new e(n,t.parser.configure({props:[TB.add(e=>e.isTop?n:void 0)]}),t.name)}configure(t,n){return new e(this.data,this.parser.configure(t),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}};function AB(e){let t=e.field(OB.state,!1);return t?t.tree:Oz.empty}var wee=class{constructor(e){this.doc=e,this.cursorPos=0,this.string=``,this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let n=this.cursorPos-this.string.length;return e<n||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}},jB=null,Tee=class e{constructor(e,t,n=[],r,i,a,o,s){this.parser=e,this.state=t,this.fragments=n,this.tree=r,this.treeLen=i,this.viewport=a,this.skipped=o,this.scheduleOn=s,this.parse=null,this.tempSkipped=[]}static create(t,n,r){return new e(t,n,[],Oz.empty,0,r,[],null)}startParse(){return this.parser.startParse(new wee(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=Oz.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{if(typeof e==`number`){let t=Date.now()+e;e=()=>Date.now()>t}for(this.parse||=this.startParse(),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t<this.state.doc.length&&this.parse.stopAt(t);;){let n=this.parse.advance();if(n){if(this.fragments=this.withoutTempSkipped(Jz.addTree(n,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=this.parse.stoppedAt??this.state.doc.length,this.tree=n,this.parse=null,this.treeLen<(t??this.state.doc.length))this.parse=this.startParse();else return!0}if(e())return!1}})}takeTree(){let e,t;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(Jz.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=jB;jB=this;try{return e()}finally{jB=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=MB(e,t.from,t.to);return e}changes(t,n){let{fragments:r,tree:i,treeLen:a,viewport:o,skipped:s}=this;if(this.takeTree(),!t.empty){let e=[];if(t.iterChangedRanges((t,n,r,i)=>e.push({fromA:t,toA:n,fromB:r,toB:i})),r=Jz.applyChanges(r,e),i=Oz.empty,a=0,o={from:t.mapPos(o.from,-1),to:t.mapPos(o.to,1)},this.skipped.length){s=[];for(let e of this.skipped){let n=t.mapPos(e.from,1),r=t.mapPos(e.to,-1);n<r&&s.push({from:n,to:r})}}}return new e(this.parser,n,r,i,a,o,s,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let t=this.skipped.length;for(let t=0;t<this.skipped.length;t++){let{from:n,to:r}=this.skipped[t];n<e.to&&r>e.from&&(this.fragments=MB(this.fragments,n,r),this.skipped.splice(t--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&=(this.takeTree(),null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends Yz{createParse(t,n,r){let i=r[0].from,a=r[r.length-1].to;return{parsedPos:i,advance(){let t=jB;if(t){for(let e of r)t.tempSkipped.push(e);e&&(t.scheduleOn=t.scheduleOn?Promise.all([t.scheduleOn,e]):e)}return this.parsedPos=a,new Oz(Cz.none,[],[],a-i)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return jB}};function MB(e,t,n){return Jz.applyChanges(e,[{fromA:t,toA:n,fromB:t,toB:n}])}var NB=class e{constructor(e){this.context=e,this.tree=e.tree}apply(t){if(!t.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(t.changes,t.state),r=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,r)||n.takeTree(),new e(n)}static init(t){let n=Math.min(3e3,t.doc.length),r=Tee.create(t.facet(IB).parser,t,{from:0,to:n});return r.work(20,n)||r.takeTree(),new e(r)}};OB.state=Bj.define({create:NB.init,update(e,t){for(let e of t.effects)if(e.is(OB.setState))return e.value;return t.startState.facet(IB)==t.state.facet(IB)?e.apply(t):NB.init(t.state)}});var PB=e=>{let t=setTimeout(()=>e(),500);return()=>clearTimeout(t)};typeof requestIdleCallback<`u`&&(PB=e=>{let t=-1,n=setTimeout(()=>{t=requestIdleCallback(e,{timeout:400})},100);return()=>t<0?clearTimeout(n):cancelIdleCallback(t)});var FB=typeof navigator<`u`&&navigator.scheduling?.isInputPending?()=>navigator.scheduling.isInputPending():null,Eee=XP.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(OB.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(OB.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=PB(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnd<t&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=t+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:n,viewport:{to:r}}=this.view,i=n.field(OB.state);if(i.tree==i.context.tree&&i.context.isDone(r+1e5))return;let a=Date.now()+Math.min(this.chunkBudget,100,e&&!FB?Math.max(25,e.timeRemaining()-5):1e9),o=i.context.treeLen<r&&n.doc.length>r+1e3,s=i.context.work(()=>FB&&FB()||Date.now()>a,r+(o?0:1e5));this.chunkBudget-=Date.now()-t,(s||this.chunkBudget<=0)&&(i.context.takeTree(),this.view.dispatch({effects:OB.setState.of(new NB(i.context))})),this.chunkBudget>0&&(!s||o)&&this.scheduleWork(),this.checkAsyncSchedule(i.context)}checkAsyncSchedule(e){e.scheduleOn&&=(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(e=>KP(this.view.state,e)).then(()=>this.workScheduled--),null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),IB=Nj.define({combine(e){return e.length?e[0]:null},enables:e=>[OB.state,Eee,oR.contentAttributes.compute([e],t=>{let n=t.facet(e);return n&&n.name?{"data-language":n.name}:{}})]}),Dee=class{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}},Oee=Nj.define(),LB=Nj.define({combine:e=>{if(!e.length)return` `;let t=e[0];if(!t||/\S/.test(t)||Array.from(t).some(e=>e!=t[0]))throw Error(`Invalid indent unit: `+JSON.stringify(e[0]));return t}});function RB(e){let t=e.facet(LB);return t.charCodeAt(0)==9?e.tabSize*t.length:t.length}function zB(e,t){let n=``,r=e.tabSize,i=e.facet(LB)[0];if(i==` `){for(;t>=r;)n+=` `,t-=r;i=` `}for(let e=0;e<t;e++)n+=i;return n}function BB(e,t){e instanceof SM&&(e=new VB(e));for(let n of e.state.facet(Oee)){let r=n(e,t);if(r!==void 0)return r}let n=AB(e.state);return n.length>=t?kee(e,n,t):null}var VB=class{constructor(e,t={}){this.state=e,this.options=t,this.unit=RB(e)}lineAt(e,t=1){let n=this.state.doc.lineAt(e),{simulateBreak:r,simulateDoubleBreak:i}=this.options;return r!=null&&r>=n.from&&r<=n.to?i&&r==e?{text:``,from:e}:(t<0?r<e:r<=e)?{text:n.text.slice(r-n.from),from:r}:{text:n.text.slice(0,r-n.from),from:n.from}:n}textAfterPos(e,t=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return``;let{text:n,from:r}=this.lineAt(e,t);return n.slice(e-r,Math.min(n.length,e+100-r))}column(e,t=1){let{text:n,from:r}=this.lineAt(e,t),i=this.countColumn(n,e-r),a=this.options.overrideIndentation?this.options.overrideIndentation(r):-1;return a>-1&&(i+=a-this.countColumn(n,n.search(/\S|$/))),i}countColumn(e,t=e.length){return UM(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:n,from:r}=this.lineAt(e,t),i=this.options.overrideIndentation;if(i){let e=i(r);if(e>-1)return e}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}},HB=new bz;function kee(e,t,n){let r=t.resolveStack(n),i=t.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(i!=r.node){let e=[];for(let t=i;t&&!(t.from<r.node.from||t.to>r.node.to||t.from==r.node.from&&t.type==r.node.type);t=t.parent)e.push(t);for(let t=e.length-1;t>=0;t--)r={node:e[t],next:r}}return UB(r,e,n)}function UB(e,t,n){for(let r=e;r;r=r.next){let e=jee(r.node);if(e)return e(Nee.create(t,n,r))}return 0}function Aee(e){return e.pos==e.options.simulateBreak&&e.options.simulateDoubleBreak}function jee(e){let t=e.type.prop(HB);if(t)return t;let n=e.firstChild,r;if(n&&(r=n.type.prop(bz.closedBy))){let t=e.lastChild,n=t&&r.indexOf(t.name)>-1;return e=>Iee(e,!0,1,void 0,n&&!Aee(e)?t.from:void 0)}return e.parent==null?Mee:null}function Mee(){return 0}var Nee=class e extends VB{constructor(e,t,n){super(e.state,e.options),this.base=e,this.pos=t,this.context=n}get node(){return this.context.node}static create(t,n,r){return new e(t,n,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let n=e.resolve(t.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if(Pee(n,e))break;t=this.state.doc.lineAt(n.from)}return this.lineIndent(t.from)}continue(){return UB(this.context.next,this.base,this.pos)}};function Pee(e,t){for(let n=t;n;n=n.parent)if(e==n)return!0;return!1}function Fee(e){let t=e.node,n=t.childAfter(t.from),r=t.lastChild;if(!n)return null;let i=e.options.simulateBreak,a=e.state.doc.lineAt(n.from),o=i==null||i<=a.from?a.to:Math.min(a.to,i);for(let e=n.to;;){let i=t.childAfter(e);if(!i||i==r)return null;if(!i.type.isSkipped){if(i.from>=o)return null;let e=/^ */.exec(a.text.slice(n.to-a.from))[0].length;return{from:n.from,to:n.to+e}}e=i.to}}function Iee(e,t,n,r,i){let a=e.textAfter,o=a.match(/^\s*/)[0].length,s=r&&a.slice(o,o+r.length)==r||i==e.pos+o,c=t?Fee(e):null;return c?s?e.column(c.from):e.column(c.to):e.baseIndent+(s?0:e.unit*n)}function WB({except:e,units:t=1}={}){return n=>{let r=e&&e.test(n.textAfter);return n.baseIndent+(r?0:t*n.unit)}}var Lee=200;function Ree(){return SM.transactionFilter.of(e=>{if(!e.docChanged||!e.isUserEvent(`input.type`)&&!e.isUserEvent(`input.complete`))return e;let t=e.startState.languageDataAt(`indentOnInput`,e.startState.selection.main.head);if(!t.length)return e;let n=e.newDoc,{head:r}=e.newSelection.main,i=n.lineAt(r);if(r>i.from+Lee)return e;let a=n.sliceString(i.from,r);if(!t.some(e=>e.test(a)))return e;let{state:o}=e,s=-1,c=[];for(let{head:e}of o.selection.ranges){let t=o.doc.lineAt(e);if(t.from==s)continue;s=t.from;let n=BB(o,t.from);if(n==null)continue;let r=/^\s*/.exec(t.text)[0],i=zB(o,n);r!=i&&c.push({from:t.from,to:t.from+r.length,insert:i})}return c.length?[e,{changes:c,sequential:!0}]:e})}var zee=Nj.define(),GB=new bz;function Bee(e){let t=e.firstChild,n=e.lastChild;return t&&t.to<n.from?{from:t.to,to:n.type.isError?e.to:n.from}:null}function Vee(e,t,n){let r=AB(e);if(r.length<n)return null;let i=r.resolveStack(n,1),a=null;for(let o=i;o;o=o.next){let i=o.node;if(i.to<=n||i.from>n)continue;if(a&&i.from<t)break;let s=i.type.prop(GB);if(s&&(i.to<r.length-50||r.length==e.doc.length||!Hee(i))){let r=s(i,e);r&&r.from<=n&&r.from>=t&&r.to>n&&(a=r)}}return a}function Hee(e){let t=e.lastChild;return t&&t.to==e.to&&t.type.isError}function KB(e,t,n){for(let r of e.facet(zee)){let i=r(e,t,n);if(i)return i}return Vee(e,t,n)}function qB(e,t){let n=t.mapPos(e.from,1),r=t.mapPos(e.to,-1);return n>=r?void 0:{from:n,to:r}}var JB=sM.define({map:qB}),YB=sM.define({map:qB});function XB(e){let t=[];for(let{head:n}of e.state.selection.ranges)t.some(e=>e.from<=n&&e.to>=n)||t.push(e.lineBlockAt(n));return t}var ZB=Bj.define({create(){return wN.none},update(e,t){t.isUserEvent(`delete`)&&t.changes.iterChangedRanges((t,n)=>e=QB(e,t,n)),e=e.map(t.changes);let n=[];for(let r of t.effects)r.is(JB)&&!eV(e,r.value.from,r.value.to)?n.push(r.value):r.is(YB)&&(e=e.update({filter:(e,t)=>r.value.from!=e||r.value.to!=t,filterFrom:r.value.from,filterTo:r.value.to}));if(n.length){let{preparePlaceholder:r}=t.state.facet(sV),i=n.map(e=>(r?wN.replace({widget:new dV(r(t.state,e))}):uV).range(e.from,e.to));e=e.update({add:i})}return t.selection&&(e=QB(e,t.selection.main.head)),e},provide:e=>oR.decorations.from(e),toJSON(e,t){let n=[];return e.between(0,t.doc.length,(e,t)=>{n.push(e,t)}),n},fromJSON(e){if(!Array.isArray(e)||e.length%2)throw RangeError(`Invalid JSON for fold state`);let t=[];for(let n=0;n<e.length;){let r=e[n++],i=e[n++];if(typeof r!=`number`||typeof i!=`number`)throw RangeError(`Invalid JSON for fold state`);t.push(uV.range(r,i))}return wN.set(t,!0)}});function QB(e,t,n=t){let r=!1;return e.between(t,n,(e,i)=>{e<n&&i>t&&(r=!0)}),r?e.update({filterFrom:t,filterTo:n,filter:(e,r)=>e>=n||r<=t}):e}function $B(e,t,n){var r;let i=null;return(r=e.field(ZB,!1))==null||r.between(t,n,(e,t)=>{(!i||i.from>e)&&(i={from:e,to:t})}),i}function eV(e,t,n){let r=!1;return e.between(t,t,(e,i)=>{e==t&&i==n&&(r=!0)}),r}function tV(e,t){return e.field(ZB,!1)?t:t.concat(sM.appendConfig.of(cV()))}var nV=e=>{for(let t of XB(e)){let n=KB(e.state,t.from,t.to);if(n)return e.dispatch({effects:tV(e.state,[JB.of(n),iV(e,n)])}),!0}return!1},rV=e=>{if(!e.state.field(ZB,!1))return!1;let t=[];for(let n of XB(e)){let r=$B(e.state,n.from,n.to);r&&t.push(YB.of(r),iV(e,r,!1))}return t.length&&e.dispatch({effects:t}),t.length>0};function iV(e,t,n=!0){let r=e.state.doc.lineAt(t.from).number,i=e.state.doc.lineAt(t.to).number;return oR.announce.of(`${e.state.phrase(n?`Folded lines`:`Unfolded lines`)} ${r} ${e.state.phrase(`to`)} ${i}.`)}var aV=[{key:`Ctrl-Shift-[`,mac:`Cmd-Alt-[`,run:nV},{key:`Ctrl-Shift-]`,mac:`Cmd-Alt-]`,run:rV},{key:`Ctrl-Alt-[`,run:e=>{let{state:t}=e,n=[];for(let r=0;r<t.doc.length;){let i=e.lineBlockAt(r),a=KB(t,i.from,i.to);a&&n.push(JB.of(a)),r=(a?e.lineBlockAt(a.to):i).to+1}return n.length&&e.dispatch({effects:tV(e.state,n)}),!!n.length}},{key:`Ctrl-Alt-]`,run:e=>{let t=e.state.field(ZB,!1);if(!t||!t.size)return!1;let n=[];return t.between(0,e.state.doc.length,(e,t)=>{n.push(YB.of({from:e,to:t}))}),e.dispatch({effects:n}),!0}}],oV={placeholderDOM:null,preparePlaceholder:null,placeholderText:`…`},sV=Nj.define({combine(e){return CM(e,oV)}});function cV(e){let t=[ZB,hV];return e&&t.push(sV.of(e)),t}function lV(e,t){let{state:n}=e,r=n.facet(sV),i=t=>{let n=e.lineBlockAt(e.posAtDOM(t.target)),r=$B(e.state,n.from,n.to);r&&e.dispatch({effects:YB.of(r)}),t.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(e,i,t);let a=document.createElement(`span`);return a.textContent=r.placeholderText,a.setAttribute(`aria-label`,n.phrase(`folded code`)),a.title=n.phrase(`unfold`),a.className=`cm-foldPlaceholder`,a.onclick=i,a}var uV=wN.replace({widget:new class extends SN{toDOM(e){return lV(e,null)}}}),dV=class extends SN{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return lV(e,this.value)}},fV={openText:`⌄`,closedText:`›`,markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1},pV=class extends GR{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement(`span`);return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?`Fold line`:`Unfold line`),t}};function mV(e={}){let t={...fV,...e},n=new pV(t,!0),r=new pV(t,!1),i=XP.fromClass(class{constructor(e){this.from=e.viewport.from,this.markers=this.buildMarkers(e)}update(e){(e.docChanged||e.viewportChanged||e.startState.facet(IB)!=e.state.facet(IB)||e.startState.field(ZB,!1)!=e.state.field(ZB,!1)||AB(e.startState)!=AB(e.state)||t.foldingChanged(e))&&(this.markers=this.buildMarkers(e.view))}buildMarkers(e){let t=new MM;for(let i of e.viewportLineBlocks){let a=$B(e.state,i.from,i.to)?r:KB(e.state,i.from,i.to)?n:null;a&&t.add(i.from,i.from,a)}return t.finish()}}),{domEventHandlers:a}=t;return[i,XR({class:`cm-foldGutter`,markers(e){return e.plugin(i)?.markers||kM.empty},initialSpacer(){return new pV(t,!1)},domEventHandlers:{...a,click:(e,t,n)=>{if(a.click&&a.click(e,t,n))return!0;let r=$B(e.state,t.from,t.to);if(r)return e.dispatch({effects:YB.of(r)}),!0;let i=KB(e.state,t.from,t.to);return i?(e.dispatch({effects:JB.of(i)}),!0):!1}}}),cV()]}var hV=oR.baseTheme({".cm-foldPlaceholder":{backgroundColor:`#eee`,border:`1px solid #ddd`,color:`#888`,borderRadius:`.2em`,margin:`0 1px`,padding:`0 1px`,cursor:`pointer`},".cm-foldGutter span":{padding:`0 1px`,cursor:`pointer`}}),gV=class e{constructor(e,t){this.specs=e;let n;function r(e){let t=YM.newName();return(n||=Object.create(null))[`.`+t]=e,t}let i=typeof t.all==`string`?t.all:t.all?r(t.all):void 0,a=t.scope;this.scope=a instanceof OB?e=>e.prop(TB)==a.data:a?e=>e==a:void 0,this.style=oB(e.map(e=>({tag:e.tag,class:e.class||r(Object.assign({},e,{tag:null}))})),{all:i}).style,this.module=n?new YM(n):null,this.themeType=t.themeType}static define(t,n){return new e(t,n||{})}},_V=Nj.define(),vV=Nj.define({combine(e){return e.length?[e[0]]:null}});function yV(e){let t=e.facet(_V);return t.length?t:e.facet(vV)}function bV(e,t){let n=[SV],r;return e instanceof gV&&(e.module&&n.push(oR.styleModule.of(e.module)),r=e.themeType),t?.fallback?n.push(vV.of(e)):r?n.push(_V.computeN([oR.darkTheme],t=>t.facet(oR.darkTheme)==(r==`dark`)?[e]:[])):n.push(_V.of(e)),n}var xV=class{constructor(e){this.markCache=Object.create(null),this.tree=AB(e.state),this.decorations=this.buildDeco(e,yV(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=AB(e.state),n=yV(e.state),r=n!=yV(e.startState),{viewport:i}=e.view,a=e.changes.mapPos(this.decoratedTo,1);t.length<i.to&&!r&&t.type==this.tree.type&&a>=i.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=a):(t!=this.tree||e.viewportChanged||r)&&(this.tree=t,this.decorations=this.buildDeco(e.view,n),this.decoratedTo=i.to)}buildDeco(e,t){if(!t||!this.tree.length)return wN.none;let n=new MM;for(let{from:r,to:i}of e.visibleRanges)cB(this.tree,t,(e,t,r)=>{n.add(e,t,this.markCache[r]||(this.markCache[r]=wN.mark({class:r})))},r,i);return n.finish()}},SV=Uj.high(XP.fromClass(xV,{decorations:e=>e.decorations}));Y.meta,Y.link,Y.heading,Y.emphasis,Y.strong,Y.strikethrough,Y.keyword,Y.atom,Y.bool,Y.url,Y.contentSeparator,Y.labelName,Y.literal,Y.inserted,Y.string,Y.deleted,Y.regexp,Y.escape,Y.string,Y.variableName,Y.variableName,Y.typeName,Y.namespace,Y.className,Y.variableName,Y.macroName,Y.propertyName,Y.comment,Y.invalid;var CV=oR.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:`#328c8252`},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:`#bb555544`}}),wV=1e4,TV=`()[]{}`,EV=Nj.define({combine(e){return CM(e,{afterCursor:!0,brackets:TV,maxScanDistance:wV,renderMatch:kV})}}),DV=wN.mark({class:`cm-matchingBracket`}),OV=wN.mark({class:`cm-nonmatchingBracket`});function kV(e){let t=[],n=e.matched?DV:OV;return t.push(n.range(e.start.from,e.start.to)),e.end&&t.push(n.range(e.end.from,e.end.to)),t}function AV(e){let t=[],n=e.facet(EV);for(let r of e.selection.ranges){if(!r.empty)continue;let i=IV(e,r.head,-1,n)||r.head>0&&IV(e,r.head-1,1,n)||n.afterCursor&&(IV(e,r.head,1,n)||r.head<e.doc.length&&IV(e,r.head+1,-1,n));i&&(t=t.concat(n.renderMatch(i,e)))}return wN.set(t,!0)}var jV=[XP.fromClass(class{constructor(e){this.paused=!1,this.decorations=AV(e.state)}update(e){(e.docChanged||e.selectionSet||this.paused)&&(e.view.composing?(this.decorations=this.decorations.map(e.changes),this.paused=!0):(this.decorations=AV(e.state),this.paused=!1))}},{decorations:e=>e.decorations}),CV];function MV(e={}){return[EV.of(e),jV]}var NV=new bz;function PV(e,t,n){let r=e.prop(t<0?bz.openedBy:bz.closedBy);if(r)return r;if(e.name.length==1){let r=n.indexOf(e.name);if(r>-1&&r%2==+(t<0))return[n[r+t]]}return null}function FV(e){let t=e.type.prop(NV);return t?t(e.node):e}function IV(e,t,n,r={}){let i=r.maxScanDistance||wV,a=r.brackets||TV,o=AB(e),s=o.resolveInner(t,n);for(let r=s;r;r=r.parent){let i=PV(r.type,n,a);if(i&&r.from<r.to){let o=FV(r);if(o&&(n>0?t>=o.from&&t<o.to:t>o.from&&t<=o.to))return LV(e,t,n,r,o,i,a)}}return RV(e,t,n,o,s.type,i,a)}function LV(e,t,n,r,i,a,o){let s=r.parent,c={from:i.from,to:i.to},l=0,u=s?.cursor();if(u&&(n<0?u.childBefore(r.from):u.childAfter(r.to)))do if(n<0?u.to<=r.from:u.from>=r.to){if(l==0&&a.indexOf(u.type.name)>-1&&u.from<u.to){let e=FV(u);return{start:c,end:e?{from:e.from,to:e.to}:void 0,matched:!0}}if(PV(u.type,n,o))l++;else if(PV(u.type,-n,o)){if(l==0){let e=FV(u);return{start:c,end:e&&e.from<e.to?{from:e.from,to:e.to}:void 0,matched:!1}}l--}}while(n<0?u.prevSibling():u.nextSibling());return{start:c,matched:!1}}function RV(e,t,n,r,i,a,o){if(n<0?!t:t==e.doc.length)return null;let s=n<0?e.sliceDoc(t-1,t):e.sliceDoc(t,t+1),c=o.indexOf(s);if(c<0||c%2==0!=n>0)return null;let l={from:n<0?t-1:t,to:n>0?t+1:t},u=e.doc.iterRange(t,n>0?e.doc.length:0),d=0;for(let e=0;!u.next().done&&e<=a;){let a=u.value;n<0&&(e+=a.length);let s=t+e*n;for(let e=n>0?0:a.length-1,t=n>0?a.length:-1;e!=t;e+=n){let t=o.indexOf(a[e]);if(!(t<0||r.resolveInner(s+e,1).type!=i)){if(t%2==0==n>0)d++;else if(d==1)return{start:l,end:{from:s+e,to:s+e+1},matched:t>>1==c>>1};else d--}}n>0&&(e+=a.length)}return u.done?{start:l,matched:!1}:null}var zV=Object.create(null),BV=[Cz.none],VV=[],HV=Object.create(null),UV=Object.create(null);for(let[e,t]of[[`variable`,`variableName`],[`variable-2`,`variableName.special`],[`string-2`,`string.special`],[`def`,`variableName.definition`],[`tag`,`tagName`],[`attribute`,`attributeName`],[`type`,`typeName`],[`builtin`,`variableName.standard`],[`qualifier`,`modifier`],[`error`,`invalid`],[`header`,`heading`],[`property`,`propertyName`]])UV[e]=GV(zV,t);function WV(e,t){VV.indexOf(e)>-1||(VV.push(e),console.warn(t))}function GV(e,t){let n=[];for(let r of t.split(` `)){let t=[];for(let n of r.split(`.`)){let r=e[n]||Y[n];r?typeof r==`function`?t.length?t=t.map(r):WV(n,`Modifier ${n} used at start of tag`):t.length?WV(n,`Tag ${n} used as modifier`):t=Array.isArray(r)?r:[r]:WV(n,`Unknown highlighting tag ${n}`)}for(let e of t)n.push(e)}if(!n.length)return 0;let r=t.replace(/ /g,`_`),i=r+` `+n.map(e=>e.id),a=HV[i];if(a)return a.id;let o=HV[i]=Cz.define({id:BV.length,name:r,props:[rB({[r]:n})]});return BV.push(o),o.id}cP.RTL,cP.LTR;var KV=e=>{let{state:t}=e,n=t.doc.lineAt(t.selection.main.from),r=ZV(e.state,n.from);return r.line?JV(e):r.block?XV(e):!1};function qV(e,t){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=e(t,n);return i?(r(n.update(i)),!0):!1}}var JV=qV(nH,0),YV=qV(tH,0),XV=qV((e,t)=>tH(e,t,eH(t)),0);function ZV(e,t){let n=e.languageDataAt(`commentTokens`,t,1);return n.length?n[0]:{}}var QV=50;function $V(e,{open:t,close:n},r,i){let a=e.sliceDoc(r-QV,r),o=e.sliceDoc(i,i+QV),s=/\s*$/.exec(a)[0].length,c=/^\s*/.exec(o)[0].length,l=a.length-s;if(a.slice(l-t.length,l)==t&&o.slice(c,c+n.length)==n)return{open:{pos:r-s,margin:s&&1},close:{pos:i+c,margin:c&&1}};let u,d;i-r<=100?u=d=e.sliceDoc(r,i):(u=e.sliceDoc(r,r+QV),d=e.sliceDoc(i-QV,i));let f=/^\s*/.exec(u)[0].length,p=/\s*$/.exec(d)[0].length,m=d.length-p-n.length;return u.slice(f,f+t.length)==t&&d.slice(m,m+n.length)==n?{open:{pos:r+f+t.length,margin:+!!/\s/.test(u.charAt(f+t.length))},close:{pos:i-p-n.length,margin:+!!/\s/.test(d.charAt(m-1))}}:null}function eH(e){let t=[];for(let n of e.selection.ranges){let r=e.doc.lineAt(n.from),i=n.to<=r.to?r:e.doc.lineAt(n.to);i.from>r.from&&i.from==n.to&&(i=n.to==r.to+1?r:e.doc.lineAt(n.to-1));let a=t.length-1;a>=0&&t[a].to>r.from?t[a].to=i.to:t.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return t}function tH(e,t,n=t.selection.ranges){let r=n.map(e=>ZV(t,e.from).block);if(!r.every(e=>e))return null;let i=n.map((e,n)=>$V(t,r[n],e.from,e.to));if(e!=2&&!i.every(e=>e))return{changes:t.changes(n.map((e,t)=>i[t]?[]:[{from:e.from,insert:r[t].open+` `},{from:e.to,insert:` `+r[t].close}]))};if(e!=1&&i.some(e=>e)){let e=[];for(let t=0,n;t<i.length;t++)if(n=i[t]){let i=r[t],{open:a,close:o}=n;e.push({from:a.pos-i.open.length,to:a.pos+a.margin},{from:o.pos-o.margin,to:o.pos+i.close.length})}return{changes:e}}return null}function nH(e,t,n=t.selection.ranges){let r=[],i=-1;ranges:for(let{from:e,to:a}of n){let n=r.length,o=1e9,s;for(let n=e;n<=a;){let c=t.doc.lineAt(n);if(s==null&&(s=ZV(t,c.from).line,!s))continue ranges;if(c.from>i&&(e==a||a>c.from)){i=c.from;let e=/^\s*/.exec(c.text)[0].length,t=e==c.length,n=c.text.slice(e,e+s.length)==s?e:-1;e<c.text.length&&e<o&&(o=e),r.push({line:c,comment:n,token:s,indent:e,empty:t,single:!1})}n=c.to+1}if(o<1e9)for(let e=n;e<r.length;e++)r[e].indent<r[e].line.text.length&&(r[e].indent=o);r.length==n+1&&(r[n].single=!0)}if(e!=2&&r.some(e=>e.comment<0&&(!e.empty||e.single))){let e=[];for(let{line:t,token:n,indent:i,empty:a,single:o}of r)(o||!a)&&e.push({from:t.from+i,insert:n+` `});let n=t.changes(e);return{changes:n,selection:t.selection.map(n,1)}}if(e!=1&&r.some(e=>e.comment>=0)){let e=[];for(let{line:t,comment:n,token:i}of r)if(n>=0){let r=t.from+n,a=r+i.length;t.text[a-t.from]==` `&&a++,e.push({from:r,to:a})}return{changes:e}}return null}var rH=iM.define(),iH=iM.define(),aH=Nj.define(),oH=Nj.define({combine(e){return CM(e,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(n,r)=>e(n,r)||t(n,r)})}}),sH=Bj.define({create(){return EH.empty},update(e,t){let n=t.state.facet(oH),r=t.annotation(rH);if(r){let i=mH.fromTransaction(t,r.selection),a=r.side,o=a==0?e.undone:e.done;return o=i?hH(o,o.length,n.minDepth,i):xH(o,t.startState.selection),new EH(a==0?r.rest:o,a==0?o:r.rest)}let i=t.annotation(iH);if((i==`full`||i==`before`)&&(e=e.isolate()),t.annotation(cM.addToHistory)===!1)return t.changes.empty?e:e.addMapping(t.changes.desc);let a=mH.fromTransaction(t),o=t.annotation(cM.time),s=t.annotation(cM.userEvent);return a?e=e.addChanges(a,o,s,n,t):t.selection&&(e=e.addSelection(t.startState.selection,o,s,n.newGroupDelay)),(i==`full`||i==`after`)&&(e=e.isolate()),e},toJSON(e){return{done:e.done.map(e=>e.toJSON()),undone:e.undone.map(e=>e.toJSON())}},fromJSON(e){return new EH(e.done.map(mH.fromJSON),e.undone.map(mH.fromJSON))}});function cH(e={}){return[sH,oH.of(e),oR.domEventHandlers({beforeinput(e,t){let n=e.inputType==`historyUndo`?uH:e.inputType==`historyRedo`?dH:null;return n?(e.preventDefault(),n(t)):!1}})]}function lH(e,t){return function({state:n,dispatch:r}){if(!t&&n.readOnly)return!1;let i=n.field(sH,!1);if(!i)return!1;let a=i.pop(e,n,t);return a?(r(a),!0):!1}}var uH=lH(0,!1),dH=lH(1,!1),fH=lH(0,!0),pH=lH(1,!0),mH=class e{constructor(e,t,n,r,i){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=r,this.selectionsAfter=i}setSelAfter(t){return new e(this.changes,this.effects,this.mapped,this.startSelection,t)}toJSON(){return{changes:this.changes?.toJSON(),mapped:this.mapped?.toJSON(),startSelection:this.startSelection?.toJSON(),selectionsAfter:this.selectionsAfter.map(e=>e.toJSON())}}static fromJSON(t){return new e(t.changes&&Cj.fromJSON(t.changes),[],t.mapped&&Sj.fromJSON(t.mapped),t.startSelection&&K.fromJSON(t.startSelection),t.selectionsAfter.map(K.fromJSON))}static fromTransaction(t,n){let r=yH;for(let e of t.startState.facet(aH)){let n=e(t);n.length&&(r=r.concat(n))}return!r.length&&t.changes.empty?null:new e(t.changes.invert(t.startState.doc),r,void 0,n||t.startState.selection,yH)}static selection(t){return new e(void 0,yH,void 0,void 0,t)}};function hH(e,t,n,r){let i=t+1>n+20?t-n-1:0,a=e.slice(i,t);return a.push(r),a}function gH(e,t){let n=[],r=!1;return e.iterChangedRanges((e,t)=>n.push(e,t)),t.iterChangedRanges((e,t,i,a)=>{for(let e=0;e<n.length;){let t=n[e++],o=n[e++];a>=t&&i<=o&&(r=!0)}}),r}function _H(e,t){return e.ranges.length==t.ranges.length&&e.ranges.filter((e,n)=>e.empty!=t.ranges[n].empty).length===0}function vH(e,t){return e.length?t.length?e.concat(t):e:t}var yH=[],bH=200;function xH(e,t){if(e.length){let n=e[e.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-bH));return r.length&&r[r.length-1].eq(t)?e:(r.push(t),hH(e,e.length-1,1e9,n.setSelAfter(r)))}return[mH.selection([t])]}function SH(e){let t=e[e.length-1],n=e.slice();return n[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),n}function CH(e,t){if(!e.length)return e;let n=e.length,r=yH;for(;n;){let i=wH(e[n-1],t,r);if(i.changes&&!i.changes.empty||i.effects.length){let t=e.slice(0,n);return t[n-1]=i,t}t=i.mapped,n--,r=i.selectionsAfter}return r.length?[mH.selection(r)]:yH}function wH(e,t,n){let r=vH(e.selectionsAfter.length?e.selectionsAfter.map(e=>e.map(t)):yH,n);if(!e.changes)return mH.selection(r);let i=e.changes.map(t),a=t.mapDesc(e.changes,!0),o=e.mapped?e.mapped.composeDesc(a):a;return new mH(i,sM.mapEffects(e.effects,t),o,e.startSelection.map(a),r)}var TH=/^(input\.type|delete)($|\.)/,EH=class e{constructor(e,t,n=0,r=void 0){this.done=e,this.undone=t,this.prevTime=n,this.prevUserEvent=r}isolate(){return this.prevTime?new e(this.done,this.undone):this}addChanges(t,n,r,i,a){let o=this.done,s=o[o.length-1];return o=s&&s.changes&&!s.changes.empty&&t.changes&&(!r||TH.test(r))&&(!s.selectionsAfter.length&&n-this.prevTime<i.newGroupDelay&&i.joinToEvent(a,gH(s.changes,t.changes))||r==`input.type.compose`)?hH(o,o.length-1,i.minDepth,new mH(t.changes.compose(s.changes),vH(sM.mapEffects(t.effects,s.changes),s.effects),s.mapped,s.startSelection,yH)):hH(o,o.length,i.minDepth,t),new e(o,yH,n,r)}addSelection(t,n,r,i){let a=this.done.length?this.done[this.done.length-1].selectionsAfter:yH;return a.length>0&&n-this.prevTime<i&&r==this.prevUserEvent&&r&&/^select($|\.)/.test(r)&&_H(a[a.length-1],t)?this:new e(xH(this.done,t),this.undone,n,r)}addMapping(t){return new e(CH(this.done,t),CH(this.undone,t),this.prevTime,this.prevUserEvent)}pop(e,t,n){let r=e==0?this.done:this.undone;if(r.length==0)return null;let i=r[r.length-1],a=i.selectionsAfter[0]||(i.startSelection?i.startSelection.map(i.changes.invertedDesc,1):t.selection);if(n&&i.selectionsAfter.length)return t.update({selection:i.selectionsAfter[i.selectionsAfter.length-1],annotations:rH.of({side:e,rest:SH(r),selection:a}),userEvent:e==0?`select.undo`:`select.redo`,scrollIntoView:!0});if(i.changes){let n=r.length==1?yH:r.slice(0,r.length-1);return i.mapped&&(n=CH(n,i.mapped)),t.update({changes:i.changes,selection:i.startSelection,effects:i.effects,annotations:rH.of({side:e,rest:n,selection:a}),filter:!1,userEvent:e==0?`undo`:`redo`,scrollIntoView:!0})}return null}};EH.empty=new EH(yH,yH);var DH=[{key:`Mod-z`,run:uH,preventDefault:!0},{key:`Mod-y`,mac:`Mod-Shift-z`,run:dH,preventDefault:!0},{linux:`Ctrl-Shift-z`,run:dH,preventDefault:!0},{key:`Mod-u`,run:fH,preventDefault:!0},{key:`Alt-u`,mac:`Mod-Shift-u`,run:pH,preventDefault:!0}];function OH(e,t){return K.create(e.ranges.map(t),e.mainIndex)}function kH(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:`select`})}function AH({state:e,dispatch:t},n){let r=OH(e.selection,n);return!r.eq(e.selection,!0)&&(t(kH(e,r)),!0)}function jH(e,t){return K.cursor(t?e.to:e.from)}function MH(e,t){return AH(e,n=>n.empty?e.moveByChar(n,t):jH(n,t))}function NH(e){return e.textDirectionAt(e.state.selection.main.head)==cP.LTR}var PH=e=>MH(e,!NH(e)),FH=e=>MH(e,NH(e));function IH(e,t){return AH(e,n=>n.empty?e.moveByGroup(n,t):jH(n,t))}var LH=e=>IH(e,!NH(e)),RH=e=>IH(e,NH(e));typeof Intl<`u`&&Intl.Segmenter;function zH(e,t,n){if(t.type.prop(n))return!0;let r=t.to-t.from;return r&&(r>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function BH(e,t,n){let r=AB(e).resolveInner(t.head),i=n?bz.closedBy:bz.openedBy;for(let a=t.head;;){let t=n?r.childAfter(a):r.childBefore(a);if(!t)break;zH(e,t,i)?r=t:a=n?t.to:t.from}let a=r.type.prop(i),o,s;return s=a&&(o=n?IV(e,r.from,1):IV(e,r.to,-1))&&o.matched?n?o.end.to:o.end.from:n?r.to:r.from,K.cursor(s,n?-1:1)}var VH=e=>AH(e,t=>BH(e.state,t,!NH(e))),HH=e=>AH(e,t=>BH(e.state,t,NH(e)));function UH(e,t){return AH(e,n=>{if(!n.empty)return jH(n,t);let r=e.moveVertically(n,t);return r.head==n.head?e.moveToLineBoundary(n,t):r})}var WH=e=>UH(e,!1),GH=e=>UH(e,!0);function KH(e){let t=e.scrollDOM.clientHeight<e.scrollDOM.scrollHeight-2,n=0,r=0,i;if(t){for(let t of e.state.facet(oR.scrollMargins)){let i=t(e);i?.top&&(n=Math.max(i?.top,n)),i?.bottom&&(r=Math.max(i?.bottom,r))}i=e.scrollDOM.clientHeight-n-r}else i=(e.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:r,selfScroll:t,height:Math.max(e.defaultLineHeight,i-5)}}function qH(e,t){let n=KH(e),{state:r}=e,i=OH(r.selection,r=>r.empty?e.moveVertically(r,t,n.height):jH(r,t));if(i.eq(r.selection))return!1;let a;if(n.selfScroll){let t=e.coordsAtPos(r.selection.main.head),o=e.scrollDOM.getBoundingClientRect(),s=o.top+n.marginTop,c=o.bottom-n.marginBottom;t&&t.top>s&&t.bottom<c&&(a=oR.scrollIntoView(i.main.head,{y:`start`,yMargin:t.top-s}))}return e.dispatch(kH(r,i),{effects:a}),!0}var JH=e=>qH(e,!1),YH=e=>qH(e,!0);function XH(e,t,n){let r=e.lineBlockAt(t.head),i=e.moveToLineBoundary(t,n);if(i.head==t.head&&i.head!=(n?r.to:r.from)&&(i=e.moveToLineBoundary(t,n,!1)),!n&&i.head==r.from&&r.length){let n=/^\s*/.exec(e.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;n&&t.head!=r.from+n&&(i=K.cursor(r.from+n))}return i}var ZH=e=>AH(e,t=>XH(e,t,!0)),QH=e=>AH(e,t=>XH(e,t,!1)),$H=e=>AH(e,t=>XH(e,t,!NH(e))),eU=e=>AH(e,t=>XH(e,t,NH(e))),tU=e=>AH(e,t=>e.moveToLineBoundary(t,!1,!1)),nU=e=>AH(e,t=>e.moveToLineBoundary(t,!0,!1));function rU(e,t,n){let r=!1,i=OH(e.selection,t=>{let i=IV(e,t.head,-1)||IV(e,t.head,1)||t.head>0&&IV(e,t.head-1,1)||t.head<e.doc.length&&IV(e,t.head+1,-1);if(!i||!i.end)return t;r=!0;let a=i.start.from==t.head?i.end.to:i.end.from;return n?K.range(t.anchor,a):K.cursor(a)});return r?(t(kH(e,i)),!0):!1}var iU=({state:e,dispatch:t})=>rU(e,t,!1);function aU(e,t,n){let r=OH(e.state.selection,e=>{e.undirectional&&e.head>=e.anchor!=t&&(e=K.range(e.head,e.anchor));let r=n(e);return K.range(e.anchor,r.head,r.goalColumn,r.bidiLevel||void 0,r.assoc)});return!r.eq(e.state.selection)&&(e.dispatch(kH(e.state,r)),!0)}function oU(e,t){return aU(e,t,n=>e.moveByChar(n,t))}var sU=e=>oU(e,!NH(e)),cU=e=>oU(e,NH(e));function lU(e,t){return aU(e,t,n=>e.moveByGroup(n,t))}var uU=e=>lU(e,!NH(e)),dU=e=>lU(e,NH(e)),fU=e=>{let t=!NH(e);return aU(e,t,n=>BH(e.state,n,t))},pU=e=>{let t=NH(e);return aU(e,t,n=>BH(e.state,n,t))};function mU(e,t){return aU(e,t,n=>e.moveVertically(n,t))}var hU=e=>mU(e,!1),gU=e=>mU(e,!0);function _U(e,t){return aU(e,t,n=>e.moveVertically(n,t,KH(e).height))}var vU=e=>_U(e,!1),yU=e=>_U(e,!0),bU=e=>aU(e,!0,t=>XH(e,t,!0)),xU=e=>aU(e,!1,t=>XH(e,t,!1)),SU=e=>{let t=!NH(e);return aU(e,t,n=>XH(e,n,t))},CU=e=>{let t=NH(e);return aU(e,t,n=>XH(e,n,t))},wU=e=>aU(e,!1,t=>K.cursor(e.lineBlockAt(t.head).from)),TU=e=>aU(e,!0,t=>K.cursor(e.lineBlockAt(t.head).to)),EU=({state:e,dispatch:t})=>(t(kH(e,{anchor:0})),!0),DU=({state:e,dispatch:t})=>(t(kH(e,{anchor:e.doc.length})),!0),OU=({state:e,dispatch:t})=>(t(kH(e,{anchor:e.selection.main.anchor,head:0})),!0),kU=({state:e,dispatch:t})=>(t(kH(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0),AU=({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:`select`})),!0),jU=({state:e,dispatch:t})=>{let n=XU(e).map(({from:t,to:n})=>K.undirectionalRange(t,Math.min(n+1,e.doc.length)));return t(e.update({selection:K.create(n),userEvent:`select`})),!0},MU=({state:e,dispatch:t})=>{let n=OH(e.selection,t=>{let n=AB(e),r=n.resolveStack(t.from,1);if(t.empty){let e=n.resolveStack(t.from,-1);e.node.from>=r.node.from&&e.node.to<=r.node.to&&(r=e)}for(let e=r;e;e=e.next){let{node:n}=e;if((n.from<t.from&&n.to>=t.to||n.to>t.to&&n.from<=t.from)&&e.next)return K.undirectionalRange(n.from,n.to)}return t});return!n.eq(e.selection)&&(t(kH(e,n)),!0)};function NU(e,t){let{state:n}=e,r=n.selection,i=n.selection.ranges.slice();for(let r of n.selection.ranges){let a=n.doc.lineAt(r.head);if(t?a.to<e.state.doc.length:a.from>0)for(let n=r;;){let r=e.moveVertically(n,t);if(r.head<a.from||r.head>a.to){i.some(e=>e.head==r.head)||i.push(r);break}if(r.head==n.head)break;n=r}}return i.length!=r.ranges.length&&(e.dispatch(kH(n,K.create(i,i.length-1))),!0)}var PU=e=>NU(e,!1),FU=e=>NU(e,!0),IU=({state:e,dispatch:t})=>{let n=e.selection,r=null;return n.ranges.length>1?r=K.create([n.main]):n.main.empty||(r=K.create([K.cursor(n.main.head)])),r?(t(kH(e,r)),!0):!1};function LU(e,t){if(e.state.readOnly)return!1;let n=`delete.selection`,{state:r}=e,i=r.changeByRange(r=>{let{from:i,to:a}=r;if(i==a){let o=t(r);o<i?(n=`delete.backward`,o=RU(e,o,!1)):o>i&&(n=`delete.forward`,o=RU(e,o,!0)),i=Math.min(i,o),a=Math.max(a,o)}else i=RU(e,i,!1),a=RU(e,a,!0);return i==a?{range:r}:{changes:{from:i,to:a},range:K.cursor(i,i<r.head?-1:1)}});return!i.changes.empty&&(e.dispatch(r.update(i,{scrollIntoView:!0,userEvent:n,effects:n==`delete.selection`?oR.announce.of(r.phrase(`Selection deleted`)):void 0})),!0)}function RU(e,t,n){if(e instanceof oR)for(let r of e.state.facet(oR.atomicRanges).map(t=>t(e)))r.between(t,t,(e,r)=>{e<t&&r>t&&(t=n?r:e)});return t}var zU=(e,t,n)=>LU(e,r=>{let i=r.from,{state:a}=e,o=a.doc.lineAt(i),s,c;if(n&&!t&&i>o.from&&i<o.from+200&&!/[^ \t]/.test(s=o.text.slice(0,i-o.from))){if(s[s.length-1]==` `)return i-1;let e=UM(s,a.tabSize)%RB(a)||RB(a);for(let t=0;t<e&&s[s.length-1-t]==` `;t++)i--;c=i}else c=hj(o.text,i-o.from,t,t)+o.from,c==i&&o.number!=(t?a.doc.lines:1)?c+=t?1:-1:!t&&/[\ufe00-\ufe0f]/.test(o.text.slice(c-o.from,i-o.from))&&(c=hj(o.text,c-o.from,!1,!1)+o.from);return c}),BU=e=>zU(e,!1,!0),VU=e=>zU(e,!0,!1),HU=(e,t)=>LU(e,n=>{let r=n.head,{state:i}=e,a=i.doc.lineAt(r),o=i.charCategorizer(r);for(let e=null;;){if(r==(t?a.to:a.from)){r==n.head&&a.number!=(t?i.doc.lines:1)&&(r+=t?1:-1);break}let s=hj(a.text,r-a.from,t)+a.from,c=a.text.slice(Math.min(r,s)-a.from,Math.max(r,s)-a.from),l=o(c);if(e!=null&&l!=e)break;(c!=` `||r!=n.head)&&(e=l),r=s}return r}),UU=e=>HU(e,!1),WU=e=>HU(e,!0),GU=e=>LU(e,t=>{let n=e.lineBlockAt(t.head).to;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)}),KU=e=>LU(e,t=>{let n=e.moveToLineBoundary(t,!1).head;return t.head>n?n:Math.max(0,t.head-1)}),qU=e=>LU(e,t=>{let n=e.moveToLineBoundary(t,!0).head;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)}),JU=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(e=>({changes:{from:e.from,to:e.to,insert:ij.of([``,``])},range:K.cursor(e.from)}));return t(e.update(n,{scrollIntoView:!0,userEvent:`input`})),!0},YU=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(t=>{if(!t.empty||t.from==0||t.from==e.doc.length)return{range:t};let n=t.from,r=e.doc.lineAt(n),i=n==r.from?n-1:hj(r.text,n-r.from,!1)+r.from,a=n==r.to?n+1:hj(r.text,n-r.from,!0)+r.from;return{changes:{from:i,to:a,insert:e.doc.slice(n,a).append(e.doc.slice(i,n))},range:K.cursor(a)}});return!n.changes.empty&&(t(e.update(n,{scrollIntoView:!0,userEvent:`move.character`})),!0)};function XU(e){let t=[],n=-1;for(let r of e.selection.ranges){let i=e.doc.lineAt(r.from),a=e.doc.lineAt(r.to);if(!r.empty&&r.to==a.from&&(a=e.doc.lineAt(r.to-1)),n>=i.number){let e=t[t.length-1];e.to=a.to,e.ranges.push(r)}else t.push({from:i.from,to:a.to,ranges:[r]});n=a.number+1}return t}function ZU(e,t,n){if(e.readOnly)return!1;let r=[],i=[];for(let t of XU(e)){if(n?t.to==e.doc.length:t.from==0)continue;let a=e.doc.lineAt(n?t.to+1:t.from-1),o=a.length+1;if(n){r.push({from:t.to,to:a.to},{from:t.from,insert:a.text+e.lineBreak});for(let n of t.ranges)i.push(K.range(Math.min(e.doc.length,n.anchor+o),Math.min(e.doc.length,n.head+o)))}else{r.push({from:a.from,to:t.from},{from:t.to,insert:e.lineBreak+a.text});for(let e of t.ranges)i.push(K.range(e.anchor-o,e.head-o))}}return r.length?(t(e.update({changes:r,scrollIntoView:!0,selection:K.create(i,e.selection.mainIndex),userEvent:`move.line`})),!0):!1}var QU=({state:e,dispatch:t})=>ZU(e,t,!1),$U=({state:e,dispatch:t})=>ZU(e,t,!0);function eW(e,t,n){if(e.readOnly)return!1;let r=[];for(let t of XU(e))n?r.push({from:t.from,insert:e.doc.slice(t.from,t.to)+e.lineBreak}):r.push({from:t.to,insert:e.lineBreak+e.doc.slice(t.from,t.to)});let i=e.changes(r);return t(e.update({changes:i,selection:e.selection.map(i,n?1:-1),scrollIntoView:!0,userEvent:`input.copyline`})),!0}var tW=({state:e,dispatch:t})=>eW(e,t,!1),nW=({state:e,dispatch:t})=>eW(e,t,!0),rW=e=>{if(e.state.readOnly)return!1;let{state:t}=e,n=t.changes(XU(t).map(({from:e,to:n})=>(e>0?e--:n<t.doc.length&&n++,{from:e,to:n}))),r=OH(t.selection,t=>{let n;if(e.lineWrapping){let r=e.lineBlockAt(t.head),i=e.coordsAtPos(t.head,t.assoc||1);i&&(n=r.bottom+e.documentTop-i.bottom+e.defaultLineHeight/2)}return e.moveVertically(t,!0,n)}).map(n);return e.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:`delete.line`}),!0};function iW(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let n=AB(e).resolveInner(t),r=n.childBefore(t),i=n.childAfter(t),a;return r&&i&&r.to<=t&&i.from>=t&&(a=r.type.prop(bz.closedBy))&&a.indexOf(i.name)>-1&&e.doc.lineAt(r.to).from==e.doc.lineAt(i.from).from&&!/\S/.test(e.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}var aW=sW(!1),oW=sW(!0);function sW(e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let r=t.changeByRange(n=>{let{from:r,to:i}=n,a=t.doc.lineAt(r),o=!e&&r==i&&iW(t,r);e&&(r=i=(i<=a.to?a:t.doc.lineAt(i)).to);let s=new VB(t,{simulateBreak:r,simulateDoubleBreak:!!o}),c=BB(s,r);for(c??=UM(/^\s*/.exec(t.doc.lineAt(r).text)[0],t.tabSize);i<a.to&&/\s/.test(a.text[i-a.from]);)i++;o?{from:r,to:i}=o:r>a.from&&r<a.from+100&&!/\S/.test(a.text.slice(0,r))&&(r=a.from);let l=[``,zB(t,c)];return o&&l.push(zB(t,s.lineIndent(a.from,-1))),{changes:{from:r,to:i,insert:ij.of(l)},range:K.cursor(r+1+l[1].length)}});return n(t.update(r,{scrollIntoView:!0,userEvent:`input`})),!0}}function cW(e,t){let n=-1;return e.changeByRange(r=>{let i=[];for(let a=r.from;a<=r.to;){let o=e.doc.lineAt(a);o.number>n&&(r.empty||r.to>o.from)&&(t(o,i,r),n=o.number),a=o.to+1}let a=e.changes(i);return{changes:i,range:K.range(a.mapPos(r.anchor,1),a.mapPos(r.head,1))}})}var lW=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Object.create(null),r=new VB(e,{overrideIndentation:e=>n[e]??-1}),i=cW(e,(t,i,a)=>{let o=BB(r,t.from);if(o==null)return;/\S/.test(t.text)||(o=0);let s=/^\s*/.exec(t.text)[0],c=zB(e,o);(s!=c||a.from<t.from+s.length)&&(n[t.from]=o,i.push({from:t.from,to:t.from+s.length,insert:c}))});return i.changes.empty||t(e.update(i,{userEvent:`indent`})),!0},uW=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(cW(e,(t,n)=>{n.push({from:t.from,insert:e.facet(LB)})}),{userEvent:`input.indent`})),!0),dW=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(cW(e,(t,n)=>{let r=/^\s*/.exec(t.text)[0];if(!r)return;let i=UM(r,e.tabSize),a=0,o=zB(e,Math.max(0,i-RB(e)));for(;a<r.length&&a<o.length&&r.charCodeAt(a)==o.charCodeAt(a);)a++;n.push({from:t.from+a,to:t.from+r.length,insert:o.slice(a)})}),{userEvent:`delete.dedent`})),!0),fW=e=>(e.setTabFocusMode(),!0),pW=[{key:`Ctrl-b`,run:PH,shift:sU,preventDefault:!0},{key:`Ctrl-f`,run:FH,shift:cU},{key:`Ctrl-p`,run:WH,shift:hU},{key:`Ctrl-n`,run:GH,shift:gU},{key:`Ctrl-a`,run:tU,shift:wU},{key:`Ctrl-e`,run:nU,shift:TU},{key:`Ctrl-d`,run:VU},{key:`Ctrl-h`,run:BU},{key:`Ctrl-k`,run:GU},{key:`Ctrl-Alt-h`,run:UU},{key:`Ctrl-o`,run:JU},{key:`Ctrl-t`,run:YU},{key:`Ctrl-v`,run:YH}],mW=[{key:`ArrowLeft`,run:PH,shift:sU,preventDefault:!0},{key:`Mod-ArrowLeft`,mac:`Alt-ArrowLeft`,run:LH,shift:uU,preventDefault:!0},{mac:`Cmd-ArrowLeft`,run:$H,shift:SU,preventDefault:!0},{key:`ArrowRight`,run:FH,shift:cU,preventDefault:!0},{key:`Mod-ArrowRight`,mac:`Alt-ArrowRight`,run:RH,shift:dU,preventDefault:!0},{mac:`Cmd-ArrowRight`,run:eU,shift:CU,preventDefault:!0},{key:`ArrowUp`,run:WH,shift:hU,preventDefault:!0},{mac:`Cmd-ArrowUp`,run:EU,shift:OU},{mac:`Ctrl-ArrowUp`,run:JH,shift:vU},{key:`ArrowDown`,run:GH,shift:gU,preventDefault:!0},{mac:`Cmd-ArrowDown`,run:DU,shift:kU},{mac:`Ctrl-ArrowDown`,run:YH,shift:yU},{key:`PageUp`,run:JH,shift:vU},{key:`PageDown`,run:YH,shift:yU},{key:`Home`,run:QH,shift:xU,preventDefault:!0},{key:`Mod-Home`,run:EU,shift:OU},{key:`End`,run:ZH,shift:bU,preventDefault:!0},{key:`Mod-End`,run:DU,shift:kU},{key:`Enter`,run:aW,shift:aW},{key:`Mod-a`,run:AU},{key:`Backspace`,run:BU,shift:BU,preventDefault:!0},{key:`Delete`,run:VU,preventDefault:!0},{key:`Mod-Backspace`,mac:`Alt-Backspace`,run:UU,preventDefault:!0},{key:`Mod-Delete`,mac:`Alt-Delete`,run:WU,preventDefault:!0},{mac:`Mod-Backspace`,run:KU,preventDefault:!0},{mac:`Mod-Delete`,run:qU,preventDefault:!0}].concat(pW.map(e=>({mac:e.key,run:e.run,shift:e.shift}))),hW=[{key:`Alt-ArrowLeft`,mac:`Ctrl-ArrowLeft`,run:VH,shift:fU},{key:`Alt-ArrowRight`,mac:`Ctrl-ArrowRight`,run:HH,shift:pU},{key:`Alt-ArrowUp`,run:QU},{key:`Shift-Alt-ArrowUp`,run:tW},{key:`Alt-ArrowDown`,run:$U},{key:`Shift-Alt-ArrowDown`,run:nW},{key:`Mod-Alt-ArrowUp`,run:PU},{key:`Mod-Alt-ArrowDown`,run:FU},{key:`Escape`,run:IU},{key:`Mod-Enter`,run:oW},{key:`Alt-l`,mac:`Ctrl-l`,run:jU},{key:`Mod-i`,run:MU,preventDefault:!0},{key:`Mod-[`,run:dW},{key:`Mod-]`,run:uW},{key:`Mod-Alt-\\`,run:lW},{key:`Shift-Mod-k`,run:rW},{key:`Shift-Mod-\\`,run:iU},{key:`Mod-/`,run:KV},{key:`Alt-A`,mac:`Ctrl-A`,run:YV},{key:`Ctrl-m`,mac:`Shift-Alt-m`,run:fW}].concat(mW),gW={key:`Tab`,run:uW,shift:dW},_W=class e{constructor(e,t,n,r,i,a,o,s,c,l=0,u){this.p=e,this.stack=t,this.state=n,this.reducePos=r,this.pos=i,this.score=a,this.buffer=o,this.bufferBase=s,this.curContext=c,this.lookAhead=l,this.parent=u}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?`!`+this.score:``}`}static start(t,n,r=0){let i=t.parser.context;return new e(t,[],n,r,r,0,[],0,i?new vW(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){let t=e>>19,n=e&65535,{parser:r}=this.p,i=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),a=r.dynamicPrecedence(n);if(a&&(this.score+=a),t==0){n<r.minRepeatTerm&&this.reducePos<this.pos&&(this.reducePos=this.pos),this.pushState(r.getGoto(this.state,n,!0),this.reducePos),n<r.minRepeatTerm&&this.storeNode(n,this.reducePos,this.reducePos,i?8:4,!0),this.reduceContext(n,this.reducePos);return}let o=this.stack.length-(t-1)*3-(e&262144?6:0),s=o?this.stack[o-2]:this.p.ranges[0].from;n<r.minRepeatTerm&&s==this.reducePos&&this.reducePos<this.pos&&(this.reducePos=this.pos);let c=this.reducePos-s;c>=2e3&&!this.p.parser.nodeSet.types[n]?.isAnonymous&&(s==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=c):this.p.lastBigReductionSize<c&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=s,this.p.lastBigReductionSize=c));let l=o?this.stack[o-1]:0,u=this.bufferBase+this.buffer.length-l;if(n<r.minRepeatTerm||e&131072){let e=r.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(n,s,e,u+4,!0)}if(e&262144)this.state=this.stack[o];else{let e=this.stack[o-3];this.state=r.getGoto(e,n,!0)}for(;this.stack.length>o;)this.stack.pop();this.reduceContext(n,s)}storeNode(e,t,n,r=4,i=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let e=this.buffer.length;if(e>0&&this.buffer[e-4]==0&&this.buffer[e-1]>-1){if(t==n)return;if(this.buffer[e-2]>=t){this.buffer[e-2]=n;return}}}if(!i||this.pos==n)this.buffer.push(e,t,n,r);else{let i=this.buffer.length;if(i>0&&(this.buffer[i-4]!=0||this.buffer[i-1]<0)){let e=!1;for(let t=i;t>0&&this.buffer[t-2]>n;t-=4)if(this.buffer[t-1]>=0){e=!0;break}if(e)for(;i>0&&this.buffer[i-2]>n;)this.buffer[i]=this.buffer[i-4],this.buffer[i+1]=this.buffer[i-3],this.buffer[i+2]=this.buffer[i-2],this.buffer[i+3]=this.buffer[i-1],i-=4,r>4&&(r-=4)}this.buffer[i]=e,this.buffer[i+1]=t,this.buffer[i+2]=n,this.buffer[i+3]=r}}shift(e,t,n,r){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=r,this.shiftContext(t,n),t<=this.p.parser.maxNode&&this.buffer.push(t,n,r,4);else{let i=e,{parser:a}=this.p;this.pos=r;let o=a.stateFlag(i,1);!o&&(r>n||t<=a.maxNode)&&(this.reducePos=r),this.pushState(i,o?n:Math.min(n,this.reducePos)),this.shiftContext(t,n),t<=a.maxNode&&this.buffer.push(t,n,r,4)}}apply(e,t,n,r){e&65536?this.reduce(e):this.shift(e,t,n,r)}useNode(e,t,n){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=e)&&(this.p.reused.push(e),r++);let i=this.reducePos=this.pos=n+e.length;this.pushState(t,n),this.buffer.push(r,n,i,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let t=this,n=t.buffer.length;for(n&&t.buffer[n-4]==0&&(n-=4);n>0&&t.buffer[n-2]>t.reducePos;)n-=4;let r=t.buffer.slice(n),i=t.bufferBase+n;for(;t&&i==t.bufferBase;)t=t.parent;return new e(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,t)}recoverByDelete(e,t){let n=e<=this.p.parser.maxNode;n&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,n?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new yW(this);;){let n=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(n==0)return!1;if(!(n&65536))return!0;t.reduce(n)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let n=[];for(let r=0,i;r<t.length;r+=2)(i=t[r+1])!=this.state&&this.p.parser.hasAction(i,e)&&n.push(t[r],i);if(this.stack.length<120)for(let e=0;n.length<8&&e<t.length;e+=2){let r=t[e+1];n.some((e,t)=>t&1&&e==r)||n.push(t[e],r)}t=n}let n=[];for(let e=0;e<t.length&&n.length<4;e+=2){let r=t[e+1];if(r==this.state)continue;let i=this.split();i.pushState(r,this.pos),i.storeNode(0,i.pos,i.pos,4,!0),i.shiftContext(t[e],this.pos),i.reducePos=this.pos,i.score-=200,n.push(i)}return n}forceReduce(){let{parser:e}=this.p,t=e.stateSlot(this.state,5);if(!(t&65536))return!1;if(!e.validAction(this.state,t)){let n=t>>19,r=t&65535,i=this.stack.length-n*3;if(i<0||e.getGoto(this.stack[i],r,!1)<0){let e=this.findForcedReduction();if(e==null)return!1;t=e}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],n=(r,i)=>{if(!t.includes(r))return t.push(r),e.allActions(r,t=>{if(!(t&393216)){if(t&65536){let n=(t>>19)-i;if(n>1){let r=t&65535,i=this.stack.length-n*3;if(i>=0&&e.getGoto(this.stack[i],r,!1)>=0)return n<<19|65536|r}}else{let e=n(t,i+1);if(e!=null)return e}}})};return n(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;t<this.stack.length;t+=3)if(this.stack[t]!=e.stack[t])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(t)))}reduceContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(t)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.storeNode(this.curContext.hash,this.reducePos,this.reducePos,-3,!0)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let t=new vW(this.curContext.tracker,e);t.hash!=this.curContext.hash&&this.emitContext(),this.curContext=t}}setLookAhead(e){return e<=this.lookAhead?!1:(this.emitLookAhead(),this.lookAhead=e,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}},vW=class{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}},yW=class{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,n=e>>19;n==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(n-1)*3;let r=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=r}},bW=class e{constructor(e,t,n){this.stack=e,this.pos=t,this.index=n,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(t,n=t.bufferBase+t.buffer.length){return new e(t,n,n-t.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new e(this.stack,this.pos,this.index)}};function xW(e,t=Uint16Array){if(typeof e!=`string`)return e;let n=null;for(let r=0,i=0;r<e.length;){let a=0;for(;;){let t=e.charCodeAt(r++),n=!1;if(t==126){a=65535;break}t>=92&&t--,t>=34&&t--;let i=t-32;if(i>=46&&(i-=46,n=!0),a+=i,n)break;a*=46}n?n[i++]=a:n=new t(a)}return n}var SW=class{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}},CW=new SW,wW=class{constructor(e,t){this.input=e,this.ranges=t,this.chunk=``,this.chunkOff=0,this.chunk2=``,this.chunk2Pos=0,this.next=-1,this.token=CW,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let n=this.range,r=this.rangeIndex,i=this.pos+e;for(;i<n.from;){if(!r)return null;let e=this.ranges[--r];i-=n.from-e.to,n=e}for(;t<0?i>n.to:i>=n.to;){if(r==this.ranges.length-1)return null;let e=this.ranges[++r];i+=e.from-n.to,n=e}return i}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,n,r;if(t>=0&&t<this.chunk.length)n=this.pos+e,r=this.chunk.charCodeAt(t);else{let t=this.resolveOffset(e,1);if(t==null)return-1;if(n=t,n>=this.chunk2Pos&&n<this.chunk2Pos+this.chunk2.length)r=this.chunk2.charCodeAt(n-this.chunk2Pos);else{let e=this.rangeIndex,t=this.range;for(;t.to<=n;)t=this.ranges[++e];this.chunk2=this.input.chunk(this.chunk2Pos=n),n+this.chunk2.length>t.to&&(this.chunk2=this.chunk2.slice(0,t.to-n)),r=this.chunk2.charCodeAt(0)}}return n>=this.token.lookAhead&&(this.token.lookAhead=n+1),r}acceptToken(e,t=0){let n=t?this.resolveOffset(t,-1):this.pos;if(n==null||n<this.token.start)throw RangeError(`Token end out of bounds`);this.token.value=e,this.token.end=n}acceptTokenTo(e,t){this.token.value=e,this.token.end=t}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),t=this.pos+e.length;this.chunk=t>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.next=this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?-1:this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk=``,this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=CW,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk=``,this.chunkOff=0),this.readNext()}return this}read(e,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let n=``;for(let r of this.ranges){if(r.from>=t)break;r.to>e&&(n+=this.input.read(Math.max(r.from,e),Math.min(r.to,t)))}return n}},TW=class{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:n}=t.p;DW(this.data,e,t,this.id,n.data,n.tokenPrecTable)}};TW.prototype.contextual=TW.prototype.fallback=TW.prototype.extend=!1;var EW=class{constructor(e,t,n){this.precTable=t,this.elseToken=n,this.data=typeof e==`string`?xW(e):e}token(e,t){let n=e.pos,r=0;for(;;){let n=e.next<0,i=e.resolveOffset(1,1);if(DW(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(n||r++,i==null)break;e.reset(i,e.token)}r&&(e.reset(n,e.token),e.acceptToken(this.elseToken,r))}};EW.prototype.contextual=TW.prototype.fallback=TW.prototype.extend=!1;function DW(e,t,n,r,i,a){let o=0,s=1<<r,{dialect:c}=n.p.parser;scan:for(;(s&e[o])!=0;){let n=e[o+1];for(let r=o+3;r<n;r+=2)if((e[r+1]&s)>0){let n=e[r];if(c.allows(n)&&(t.token.value==-1||t.token.value==n||kW(n,t.token.value,i,a))){t.acceptToken(n);break}}let r=t.next,l=0,u=e[o+2];if(t.next<0&&u>l&&e[n+u*3-3]==65535){o=e[n+u*3-1];continue scan}for(;l<u;){let i=l+u>>1,a=n+i+(i<<1),s=e[a],c=e[a+1]||65536;if(r<s)u=i;else if(r>=c)l=i+1;else{o=e[a+2],t.advance();continue scan}}break}}function OW(e,t,n){for(let r=t,i;(i=e[r])!=65535;r++)if(i==n)return r-t;return-1}function kW(e,t,n,r){let i=OW(n,r,t);return i<0||OW(n,r,e)<i}var AW=typeof process<`u`&&/\bparse\b/.test({}.LOG),jW=null;function MW(e,t,n){let r=e.cursor(Dz.IncludeAnonymous);for(r.moveTo(t);;)if(!(n<0?r.childBefore(t):r.childAfter(t)))for(;;){if((n<0?r.to<t:r.from>t)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,t-25)):Math.min(e.length,Math.max(r.from+1,t+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:e.length}}var NW=class{constructor(e,t){this.fragments=e,this.minRepeat=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.lastRepeat=null,this.lastRepeatPos=-1,this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?MW(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?MW(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let t=this.trees.length-1;if(t<0)return this.nextFragment(),null;if(e<this.safeFrom)return null;let n=this.trees[t],r=this.index[t];if(r==n.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let i=n.children[r],a=this.start[t]+n.positions[r];if(a>e)return this.nextStart=a,null;if(i instanceof Oz){let n=a>this.lastRepeatPos&&i.type.id>=this.minRepeat;if(a==e||n){let t=a+i.length,r;if(a>=this.safeFrom&&t<=this.safeTo&&(!(r=i.prop(bz.lookAhead))||t+r<this.fragment.to)&&(n&&(this.lastRepeat=i,this.lastRepeatPos=a),a==e))return i}this.index[t]++,a+i.length>=Math.max(this.safeFrom,e)&&(this.trees.push(i),this.start.push(a),this.index.push(0))}else this.index[t]++,this.nextStart=a+i.length}}},PW=class{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(e=>new SW)}getActions(e){let t=0,n=null,{parser:r}=e.p,{tokenizers:i}=r,a=r.stateSlot(e.state,3),o=e.curContext?e.curContext.hash:0,s=0;for(let r=0;r<i.length;r++){if(!(1<<r&a))continue;let c=i[r],l=this.tokens[r];if((!n||c.fallback)&&((c.contextual||l.start!=e.pos||l.mask!=a||l.context!=o)&&(this.updateCachedToken(l,c,e),l.mask=a,l.context=o),l.lookAhead>l.end+25&&(s=Math.max(l.lookAhead,s)),l.value!=0)){let r=t;if(l.extended>-1&&(t=this.addActions(e,l.extended,l.end,t)),t=this.addActions(e,l.value,l.end,t),!c.extend&&(n=l,t>r))break}}for(;this.actions.length>t;)this.actions.pop();return s&&e.setLookAhead(s),!n&&e.pos==this.stream.end&&(n=new SW,n.value=e.p.parser.eofTerm,n.start=n.end=e.pos,t=this.addActions(e,n.value,n.end,t)),this.mainToken=n,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new SW,{pos:n,p:r}=e;return t.start=n,t.end=Math.min(n+1,r.stream.end),t.value=n==r.stream.end?r.parser.eofTerm:0,t}updateCachedToken(e,t,n){let r=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(r,e),n),e.value>-1){let{parser:t}=n.p;for(let r=0;r<t.specialized.length;r++)if(t.specialized[r]==e.value){let i=t.specializers[r](this.stream.read(e.start,e.end),n);if(i>=0&&n.p.parser.dialect.allows(i>>1)){i&1?e.extended=i>>1:e.value=i>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,t,n,r){for(let t=0;t<r;t+=3)if(this.actions[t]==e)return r;return this.actions[r++]=e,this.actions[r++]=t,this.actions[r++]=n,r}addActions(e,t,n,r){let{state:i}=e,{parser:a}=e.p,{data:o}=a;for(let e=0;e<2;e++)for(let s=a.stateSlot(i,e?2:1);;s+=3){if(o[s]==65535){if(o[s+1]==1)s=zW(o,s+2);else{r==0&&o[s+1]==2&&(r=this.putAction(zW(o,s+2),t,n,r));break}}o[s]==t&&(r=this.putAction(zW(o,s+1),t,n,r))}return r}},FW=class{constructor(e,t,n,r){this.parser=e,this.input=t,this.ranges=r,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new wW(t,r),this.tokens=new PW(e,this.stream),this.topTerm=e.top[1];let{from:i}=r[0];this.stacks=[_W.start(this,e.top[0],i)],this.fragments=n.length&&this.stream.end-i>e.bufferLength*4?new NW(n,e.minRepeatTerm):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,n=this.stacks=[],r,i;if(this.bigReductionCount>300&&e.length==1){let[t]=e;for(;t.forceReduce()&&t.stack.length&&t.stack[t.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let a=0;a<e.length;a++){let o=e[a];for(;;){if(this.tokens.mainToken=null,o.pos>t)n.push(o);else if(this.advanceStack(o,n,e))continue;else{r||(r=[],i=[]),r.push(o);let e=this.tokens.getMainToken(o);i.push(e.value,e.end)}break}}if(!n.length){let e=r&&BW(r);if(e)return AW&&console.log(`Finish with `+this.stackID(e)),this.stackToTree(e);if(this.parser.strict)throw AW&&r&&console.log(`Stuck with token `+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):`none`)),SyntaxError(`No parse at `+t);this.recovering||=5}if(this.recovering&&r){let e=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,i,n);if(e)return AW&&console.log(`Force-finish `+this.stackID(e)),this.stackToTree(e.forceAll())}if(this.recovering){let e=this.recovering==1?1:this.recovering*3;if(n.length>e)for(n.sort((e,t)=>t.score-e.score);n.length>e;)n.pop();n.some(e=>e.reducePos>t)&&this.recovering--}else if(n.length>1){outer:for(let e=0;e<n.length-1;e++){let t=n[e];for(let r=e+1;r<n.length;r++){let i=n[r];if(t.sameState(i)||t.buffer.length>500&&i.buffer.length>500){if((t.score-i.score||t.buffer.length-i.buffer.length)>0)n.splice(r--,1);else{n.splice(e--,1);continue outer}}}}n.length>12&&(n.sort((e,t)=>t.score-e.score),n.splice(12,n.length-12))}this.minStackPos=n[0].pos;for(let e=1;e<n.length;e++)n[e].pos<this.minStackPos&&(this.minStackPos=n[e].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw RangeError(`Can't move stoppedAt forward`);this.stoppedAt=e}tryReuse(e,t,n,r){if(!n)return null;let i=e.curContext&&e.curContext.tracker.strict,a=i?e.curContext.hash:0;for(;n;){let o=this.parser.nodeSet.types[n.type.id]==n.type?this.parser.getGoto(e.state,n.type.id):-1;if(o>-1&&n.length&&(!i||(n.prop(bz.contextHash)||0)==a))return e.useNode(n,o,t),n;if(n.children.length==0||n.positions[0]>0)break;let s=n.children[0];if(s instanceof Oz&&(!r||s.type.id>=this.parser.minRepeatTerm))n=s;else break}return null}advanceStack(e,t,n){let r=e.pos,{parser:i}=this,a=AW?this.stackID(e)+` -> `:``;if(this.stoppedAt!=null&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let t=e.reducePos<r&&e.buffer.length&&e.buffer[e.buffer.length-2]<=e.reducePos&&this.fragments.lastRepeatPos==e.reducePos&&this.tryReuse(e,e.reducePos,this.fragments.lastRepeat,!0)||this.tryReuse(e,r,this.fragments.nodeAt(r),!1);if(t)return AW&&console.log(a+this.stackID(e)+` (via reuse of ${i.getName(t.type.id)})`),!0}let o=i.stateSlot(e.state,4);if(o>0)return e.reduce(o),AW&&console.log(a+this.stackID(e)+` (via always-reduce ${i.getName(o&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let s=this.tokens.getActions(e);for(let o=0;o<s.length;){let c=s[o++],l=s[o++],u=s[o++],d=o==s.length||!n,f=d?e:e.split(),p=this.tokens.mainToken;if(f.apply(c,l,p?p.start:f.pos,u),AW&&console.log(a+this.stackID(f)+` (via ${c&65536?`reduce of ${i.getName(c&65535)}`:`shift`} for ${i.getName(l)} @ ${r}${f==e?``:`, split`})`),d)return!0;f.pos>r?t.push(f):n.push(f)}return!1}advanceFully(e,t){let n=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return IW(e,t),!0}}runRecovery(e,t,n){let r=null,i=!1;for(let a=0;a<e.length;a++){let o=e[a],s=t[a<<1],c=t[(a<<1)+1],l=AW?this.stackID(o)+` -> `:``;if(o.deadEnd&&(i||(i=!0,o.restart(),AW&&console.log(l+this.stackID(o)+` (restarted)`),this.advanceFully(o,n))))continue;let u=o.split(),d=l;for(let e=0;e<10&&u.forceReduce()&&(AW&&console.log(d+this.stackID(u)+` (via force-reduce)`),!this.advanceFully(u,n));e++)AW&&(d=this.stackID(u)+` -> `);for(let e of o.recoverByInsert(s))AW&&console.log(l+this.stackID(e)+` (via recover-insert)`),this.advanceFully(e,n);this.stream.end>o.pos?(c==o.pos&&(c++,s=0),o.recoverByDelete(s,c),AW&&console.log(l+this.stackID(o)+` (via recover-delete ${this.parser.getName(s)})`),IW(o,n)):(!r||r.score<u.score)&&(r=u)}return r}stackToTree(e){return e.close(),Oz.build({buffer:bW.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let t=(jW||=new WeakMap).get(e);return t||jW.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}};function IW(e,t){for(let n=0;n<t.length;n++){let r=t[n];if(r.pos==e.pos&&r.sameState(e)){t[n].score<e.score&&(t[n]=e);return}}t.push(e)}var LW=class{constructor(e,t,n){this.source=e,this.flags=t,this.disabled=n}allows(e){return!this.disabled||this.disabled[e]==0}},RW=class e extends Yz{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(` `);this.minRepeatTerm=t.length;for(let n=0;n<e.repeatNodeCount;n++)t.push(``);let n=Object.keys(e.topRules).map(t=>e.topRules[t][1]),r=[];for(let e=0;e<t.length;e++)r.push([]);function i(e,t,n){r[e].push([t,t.deserialize(String(n))])}if(e.nodeProps)for(let t of e.nodeProps){let e=t[0];typeof e==`string`&&(e=bz[e]);for(let n=1;n<t.length;){let r=t[n++];if(r>=0)i(r,e,t[n++]);else{let a=t[n+-r];for(let o=-r;o>0;o--)i(t[n++],e,a);n++}}}this.nodeSet=new wz(t.map((t,i)=>Cz.define({name:i>=this.minRepeatTerm?void 0:t,id:i,props:r[i],top:n.indexOf(i)>-1,error:i==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(i)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=_z;let a=xW(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let e=0;e<this.specializerSpecs.length;e++)this.specialized[e]=this.specializerSpecs[e].term;this.specializers=this.specializerSpecs.map(VW),this.states=xW(e.states,Uint32Array),this.data=xW(e.stateData),this.goto=xW(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(e=>typeof e==`number`?new TW(a,e):e),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,n){let r=new FW(this,e,t,n);for(let i of this.wrappers)r=i(r,e,t,n);return r}getGoto(e,t,n=!1){let r=this.goto;if(t>=r[0])return-1;for(let i=r[t+1];;){let t=r[i++],a=t&1,o=r[i++];if(a&&n)return o;for(let n=i+(t>>1);i<n;i++)if(r[i]==e)return o;if(a)return-1}}hasAction(e,t){let n=this.data;for(let r=0;r<2;r++)for(let i=this.stateSlot(e,r?2:1),a;;i+=3){if((a=n[i])==65535){if(n[i+1]==1)a=n[i=zW(n,i+2)];else if(n[i+1]==2)return zW(n,i+2);else break}if(a==t||a==0)return zW(n,i+1)}return 0}stateSlot(e,t){return this.states[e*6+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,e=>e==t||null)}allActions(e,t){let n=this.stateSlot(e,4),r=n?t(n):void 0;for(let n=this.stateSlot(e,1);r==null;n+=3){if(this.data[n]==65535){if(this.data[n+1]==1)n=zW(this.data,n+2);else break}r=t(zW(this.data,n+1))}return r}nextStates(e){let t=[];for(let n=this.stateSlot(e,1);;n+=3){if(this.data[n]==65535){if(this.data[n+1]==1)n=zW(this.data,n+2);else break}if(!(this.data[n+2]&1)){let e=this.data[n+1];t.some((t,n)=>n&1&&t==e)||t.push(this.data[n],e)}}return t}configure(t){let n=Object.assign(Object.create(e.prototype),this);if(t.props&&(n.nodeSet=this.nodeSet.extend(...t.props)),t.top){let e=this.topRules[t.top];if(!e)throw RangeError(`Invalid top rule name ${t.top}`);n.top=e}return t.tokenizers&&(n.tokenizers=this.tokenizers.map(e=>{let n=t.tokenizers.find(t=>t.from==e);return n?n.to:e})),t.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((e,r)=>{let i=t.specializers.find(t=>t.from==e.external);if(!i)return e;let a=Object.assign(Object.assign({},e),{external:i.to});return n.specializers[r]=VW(a),a})),t.contextTracker&&(n.context=t.contextTracker),t.dialect&&(n.dialect=this.parseDialect(t.dialect)),t.strict!=null&&(n.strict=t.strict),t.wrap&&(n.wrappers=n.wrappers.concat(t.wrap)),t.bufferLength!=null&&(n.bufferLength=t.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),n=t.map(()=>!1);if(e)for(let r of e.split(` `)){let e=t.indexOf(r);e>=0&&(n[e]=!0)}let r=null;for(let e=0;e<t.length;e++)if(!n[e])for(let n=this.dialects[t[e]],i;(i=this.data[n++])!=65535;)(r||=new Uint8Array(this.maxTerm+1))[i]=1;return new LW(e,n,r)}static deserialize(t){return new e(t)}};function zW(e,t){return e[t]|e[t+1]<<16}function BW(e){let t=null;for(let n of e){let e=n.p.stoppedAt;(n.pos==n.p.stream.end||e!=null&&n.pos>e)&&n.p.parser.stateFlag(n.state,2)&&(!t||t.score<n.score)&&(t=n)}return t}function VW(e){if(e.external){let t=+!!e.extend;return(n,r)=>e.external(n,r)<<1|t}return e.get}var HW=rB({String:Y.string,Number:Y.number,"True False":Y.bool,PropertyName:Y.propertyName,Null:Y.null,", :":Y.separator,"[ ]":Y.squareBracket,"{ }":Y.brace}),UW=RW.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:`#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O`,goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:`⚠ JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array`,maxTerm:25,nodeProps:[[`isolate`,-2,6,11,``],[`openedBy`,7,`{`,14,`[`],[`closedBy`,8,`}`,15,`]`]],propSources:[HW],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),WW=Cee.define({name:`json`,parser:UW.configure({props:[HB.add({Object:WB({except:/^\s*\}/}),Array:WB({except:/^\s*\]/})}),GB.add({"Object Array":Bee})]}),languageData:{closeBrackets:{brackets:[`[`,`{`,`"`]},indentOnInput:/^\s*[\}\]]$/}}),GW=8,KW=32,qW=48,JW=8;function YW({side:e,span:t,floor:n,ceil:r,reset:i,onReset:a,onSpan:o,onKeep:s,onShut:c,label:l,bar:u,step:d=GW,...f}){let p=e===`top`,m=t=>e===`start`?tS(t)?`right`:`left`:e===`end`?tS(t)?`left`:`right`:e,h=V.useRef(1),g=V.useRef(0),_=V.useRef(`none`),v=V.useRef(t),y=V.useRef(t),b=V.useRef(0),[x,S]=V.useState(!1),[C,w]=V.useState(!1),[T,E]=V.useState(!1);V.useEffect(()=>()=>cancelAnimationFrame(b.current),[]);let D=e=>Math.round(Math.min(r,Math.max(n,e))),O=e=>p?e.clientY:e.clientX,k=e=>{let n=e?.parentElement?.getBoundingClientRect();return n?p?n.height:n.width:t},A=e=>{o(e),s?.(e)},j=()=>{_.current=`none`,cancelAnimationFrame(b.current),b.current=0,E(!1)},M=()=>{if(_.current===`none`)return;let e=_.current===`moved`;j(),e&&A(v.current)};V.useEffect(()=>{if(!T||typeof window>`u`)return;let e=e=>{e.key===`Escape`&&_.current!==`none`&&(e.preventDefault(),j(),o(y.current))};return window.addEventListener(`keydown`,e,!0),()=>window.removeEventListener(`keydown`,e,!0)});let ee=p?{l:0,r:0,b:0,height:JW,justify:`center`}:{t:0,b:0,width:JW,items:`center`,...e===`start`?{insetInlineEnd:0}:e===`end`?{insetInlineStart:0}:e===`left`?{r:0}:{l:0}};return(0,H.jsx)(F,{role:`separator`,"aria-orientation":p?`horizontal`:`vertical`,"aria-label":l,"aria-valuenow":Math.round(t),"aria-valuemin":n,"aria-valuemax":r,tabIndex:0,"data-slot":`grip`,"data-side":e,"data-moving":T?``:void 0,position:`absolute`,...ee,z:10,cursor:p?`row-resize`:`col-resize`,outlineWidth:0,focusVisibleStyle:{outlineWidth:0},style:{touchAction:`none`},onPointerEnter:()=>S(!0),onPointerLeave:()=>S(!1),onFocus:e=>w(e.currentTarget.matches(`:focus-visible`)),onBlur:()=>w(!1),onPointerDown:e=>{if(e.button!==0)return;e.preventDefault(),e.currentTarget.setPointerCapture?.(e.pointerId);let t=k(e.currentTarget);h.current=m(e.currentTarget)===`right`?-1:1,g.current=O(e)-h.current*t,v.current=D(t),y.current=D(t),_.current=`held`,E(!0)},onPointerMove:e=>{if(_.current===`none`)return;_.current=`moved`;let t=h.current*(O(e)-g.current);if(c&&t<n-qW){j(),e.currentTarget.releasePointerCapture?.(e.pointerId),c();return}v.current=D(t),!b.current&&(b.current=requestAnimationFrame(()=>{b.current=0,o(v.current)}))},onPointerUp:M,onPointerCancel:M,onDoubleClick:()=>a?a():A(D(i??t)),onKeyDown:e=>{let t=e.shiftKey?KW:d,i=k(e.currentTarget),a=m(e.currentTarget),o=a===`left`?`ArrowRight`:a===`right`?`ArrowLeft`:`ArrowDown`,s=a===`left`?`ArrowLeft`:a===`right`?`ArrowRight`:`ArrowUp`,l=e.key===o?i+t:e.key===s?i-t:e.key===`Home`?n:e.key===`End`?r:null;if(l!==null){if(e.preventDefault?.(),c&&l<n)return c();A(D(l))}},...f,children:u?(0,H.jsx)(F,{"data-slot":`grip-bar`,...(()=>{let[e,t]=u===`edge`?[4,48]:[3,32];return p?{height:e,width:t}:{width:e,height:t}})(),self:`center`,rounded:`$10`,bg:T?`$rim`:C?`$outlineColor`:x?`$hint`:`transparent`,[p?`scaleX`:`scaleY`]:T||x||C?1.2:1,animation:`quickest`,pointerEvents:`none`}):(0,H.jsx)(F,{...p?{height:2,width:`100%`}:{width:2,height:`100%`},rounded:1,bg:C||T?`$outlineColor`:x?`$rim`:`transparent`,pointerEvents:`none`})})}var XW=`
32
+ \r`,ZW=`"\\/bfnrt`,QW=/-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/y,$W=/[0-9a-fA-F]{4}/y,eG=/^(\{|\[\s*([[{"\]\-\d]|true\b|false\b|null\b|$))/,tG=e=>e===void 0?`end of input`:e===`
33
+ `?`line break`:`character '${e}'`;function nG(e){let t=0,n=(e,n=t)=>{throw{at:n,message:e}},r=()=>{for(;t<e.length&&XW.includes(e[t]);)t++},i=()=>{for(t++;t<e.length;){let r=e[t];if(r===`"`){t++;return}if(r===`\\`){let r=e[t+1];if(r===`u`){$W.lastIndex=t+2,$W.test(e)||n(`Expected four hex digits after \\u`,t+2),t+=6;continue}(r===void 0||!ZW.includes(r))&&n(`Invalid escape '\\${r??``}' in string`,t+1),t+=2;continue}r<` `&&n(r===`
34
+ `?`Unterminated string`:`Control character in string`),t++}n(`Unterminated string`)},a=()=>{QW.lastIndex=t;let r=QW.exec(e);(!r||r[0]===`-`)&&n(`Invalid number`),t+=r[0].length},o=a=>{r(),e[t]!==`"`&&n(a&&e[t]===`}`?`Trailing comma before '}'`:`Expected a double-quoted property name, found ${tG(e[t])}`),i(),r(),e[t]!==`:`&&n(`Expected ':' after property name, found ${tG(e[t])}`),t++},s=[],c=!0;try{for(;;){if(r(),c){let l=e[t];if(l===`{`||l===`[`){if(t++,r(),e[t]===(l===`{`?`}`:`]`)){t++,c=!1;continue}s.push(l),l===`{`&&o(!1);continue}if(l===`"`)i();else if(l===`-`||l!==void 0&&l>=`0`&&l<=`9`)a();else{let r=[`true`,`false`,`null`].find(n=>e.startsWith(n,t));r||n(`Unexpected ${tG(l)}`),t+=r.length}c=!1;continue}let l=s.at(-1);if(!l)return t<e.length&&n(`Unexpected ${tG(e[t])} after the JSON value`),null;if(e[t]===`,`){t++,l===`{`?o(!0):(r(),e[t]===`]`&&n(`Trailing comma before ']'`)),c=!0;continue}if(e[t]===(l===`{`?`}`:`]`)){t++,s.pop();continue}n(l===`{`?`Expected ',' or '}' after property value, found ${tG(e[t])}`:`Expected ',' or ']' after array element, found ${tG(e[t])}`)}}catch(e){return e}}function rG(e,t){let n=1,r=0;for(let i=0;i<t&&i<e.length;i++)e[i]===`
35
+ `&&(n++,r=i+1);return{line:n,column:t-r+1}}function iG(e,t={}){let n=e.trim();if(!n)return{kind:`empty`};try{return{kind:`json`,value:JSON.parse(e)}}catch(r){if(t.text&&!eG.test(n))return{kind:`text`,value:e};let i=nG(e)??{at:0,message:r instanceof Error?r.message:String(r)};return{kind:`error`,message:i.message,at:i.at,...rG(e,i.at)}}}function aG(e){let t=iG(e);return t.kind===`json`?JSON.stringify(t.value,null,2):null}var oG=[`javascript`,`typescript`,`python`,`java`,`csharp`,`cpp`,`c`,`go`,`rust`,`ruby`,`php`,`swift`,`kotlin`,`dart`,`html`,`css`,`scss`,`json`,`xml`,`yaml`,`sql`,`markdown`,`shell`,`plaintext`],sG={javascript:`JavaScript`,typescript:`TypeScript`,python:`Python`,java:`Java`,csharp:`C#`,cpp:`C++`,c:`C`,go:`Go`,rust:`Rust`,ruby:`Ruby`,php:`PHP`,swift:`Swift`,kotlin:`Kotlin`,dart:`Dart`,html:`HTML`,css:`CSS`,scss:`SCSS`,json:`JSON`,xml:`XML`,yaml:`YAML`,sql:`SQL`,markdown:`Markdown`,shell:`Shell`,plaintext:We(`Plain Text`)},cG=4096,lG=oR.theme({"&":{color:`var(--ink)`,backgroundColor:`transparent`},"&.cm-focused":{outline:`none`},".cm-scroller":{fontFamily:`var(--font-mono, 'Zen Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace)`,lineHeight:`1.6`,overflow:`auto`,flex:`1 1 auto`,height:`auto`,minHeight:`0`},".cm-content":{padding:`8px 0`,caretColor:`var(--ink)`},".cm-line":{padding:`0 12px`},".cm-gutters":{backgroundColor:`transparent`,color:`var(--codeDim)`,border:`none`,borderInlineEnd:`1px solid var(--edge)`},".cm-lineNumbers .cm-gutterElement":{padding:`0 10px 0 12px`,minWidth:`28px`},".cm-activeLine":{backgroundColor:`var(--panel)`},".cm-activeLineGutter":{backgroundColor:`transparent`,color:`var(--quiet)`},".cm-cursor, .cm-dropCursor":{borderInlineStartColor:`var(--ink)`},".cm-selectionBackground, &.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, ::selection":{backgroundColor:`var(--raised)`},".cm-matchingBracket, &.cm-focused .cm-matchingBracket":{backgroundColor:`var(--raised)`,color:`inherit`,outline:`none`},".cm-nonmatchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:`transparent`},".cm-placeholder":{color:`var(--codeDim)`},".cm-foldGutter .cm-gutterElement":{padding:`0 4px`,color:`var(--codeDim)`,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:`var(--ink)`},".cm-foldPlaceholder":{backgroundColor:`var(--raised)`,border:`1px solid var(--edge)`,borderRadius:`4px`,color:`var(--codePunctuation)`,padding:`0 4px`,margin:`0 2px`,cursor:`pointer`},".cm-foldCount":{color:`var(--codeComment)`},".cm-fault":{backgroundColor:`var(--state-error-bg, rgb(239 68 68 / .1))`},".cm-gutterElement.cm-fault":{color:`var(--bad)`},".cm-fault-at":{textDecoration:`underline wavy var(--bad)`,textDecorationSkipInk:`none`,textUnderlineOffset:`3px`}}),uG=e=>({color:`var(--code${e[0].toUpperCase()}${e.slice(1)})`,...Rk[e]}),dG=gV.define([{tag:Y.propertyName,...uG(`key`)},{tag:Y.string,...uG(`string`)},{tag:Y.number,...uG(`number`)},{tag:Y.bool,...uG(`boolean`)},{tag:Y.null,...uG(`null`)},{tag:[Y.punctuation,Y.separator,Y.brace,Y.squareBracket],...uG(`punctuation`)},{tag:Y.comment,...uG(`comment`)},{tag:Y.keyword,...uG(`keyword`)}]),fG=new Dee(WW.configure({props:[GB.add({"Object Array":e=>({from:e.from,to:e.to})})]})),pG=(e,t)=>t===1?e(`1 key`):e(`{n} keys`,{n:t}),mG=(e,t)=>t===1?e(`1 item`):e(`{n} items`,{n:t});function hG(e,t,n){let r=AB(e).resolveInner(t.from,1);for(;r.parent&&r.name!==`Object`&&r.name!==`Array`;)r=r.parent;if(r.name===`Object`)return{open:`{`,close:`}`,count:pG(n,r.getChildren(`Property`).length)};let i=0;for(let e=r.firstChild;e;e=e.nextSibling)!/^[[\],]$/.test(e.name)&&!e.type.isError&&(i+=1);return{open:`[`,close:`]`,count:mG(n,i)}}var gG=e=>cV({preparePlaceholder:(t,n)=>hG(t,n,e),placeholderDOM:(t,n,r)=>{let i=document.createElement(`span`);i.className=`cm-foldPlaceholder`,i.title=e(`Unfold`),i.setAttribute(`aria-label`,e(`Folded, {count}`,{count:r.count})),i.textContent=`${r.open}…${r.close}`;let a=document.createElement(`span`);return a.className=`cm-foldCount`,a.textContent=` ${r.count}`,i.append(a),i.onclick=n,i}}),_G=2,vG=(e,t)=>{let n=0;for(let r of e)if(r===` `)n+=1;else if(r===` `)n+=t-n%t;else break;return n},yG=new Map,bG=e=>{let t=yG.get(e);return t||(t=wN.line({attributes:{style:`padding-inline-start: calc(${e}ch + 12px); text-indent: -${e}ch`}}),yG.set(e,t)),t},xG=XP.fromClass(class{decorations;constructor(e){this.decorations=this.build(e)}update(e){(e.docChanged||e.viewportChanged)&&(this.decorations=this.build(e.view))}build(e){let t=new MM;for(let{from:n,to:r}of e.visibleRanges)for(let i=n;i<=r;){let n=e.state.doc.lineAt(i);t.add(n.from,n.from,bG(vG(n.text,e.state.tabSize)+_G)),i=n.to+1}return t.finish()}},{decorations:e=>e.decorations}),SG=iM.define(),CG=new class extends GR{elementClass=`cm-fault`},wG=wN.line({class:`cm-fault`}),TG=wN.mark({class:`cm-fault-at`});function EG(e,t){let n=iG(e.doc.toString(),{text:t});if(n.kind!==`error`)return{check:n,marks:wN.none,gutter:kM.empty};let r=Number.isFinite(n.at)?Math.min(n.at,e.doc.length):0,i=e.doc.lineAt(r),a=Math.min(r+1,i.to),o=[wG.range(i.from),...a>r?[TG.range(r,a)]:[]];return{check:n,marks:wN.set(o,!0),gutter:kM.of([CG.range(i.from)])}}var DG=e=>Bj.define({create:t=>EG(t,e),update:(t,n)=>n.docChanged?EG(n.state,e):t,provide:e=>[oR.decorations.from(e,e=>e.marks),KR.from(e,e=>e.gutter)]}),OG=e=>typeof e==`number`?`${e}px`:e;function kG({value:e,defaultValue:t=``,language:n=`javascript`,height:r,minHeight:i=96,maxHeight:a=480,resizable:s=r===void 0,allowText:c=!1,onChange:l,onCheck:u,onMount:d,readOnly:f=!1,lineNumbers:p=!0,wordWrap:m=`on`,fontSize:h=14,placeholder:g,showCopyButton:_=!0,showFormatButton:v,showLanguageSelector:y=!0,availableLanguages:b=oG,label:x,variant:S,title:C,actions:w,autoHeight:T=!1,...E}){let{t:D}=Ye(),O=x??D(`Code`),k=V.useMemo(()=>gG(D),[D]),A=S??(C!==void 0||w!==void 0?`with-header`:`default`),j=A===`with-header`,[M,ee]=V.useState(n),[N,te]=V.useState(e??t),[ne,re]=V.useState(null),[ie,ae]=V.useState(!1),oe=V.useRef(null),se=V.useRef([]),ce=V.useRef(null),[le,ue]=V.useState(null),de=V.useRef(void 0),fe=V.useRef({onChange:l,onCheck:u});fe.current={onChange:l,onCheck:u};let pe=V.useMemo(()=>({language:new Gj,gutter:new Gj,wrap:new Gj,edit:new Gj}),[]),me=M===`json`,he=V.useMemo(()=>DG(c),[c]),ge=V.useRef({field:he});ge.current.field=he;let _e=()=>me?[fG,he,k,mV()]:[],ve=()=>p?[fz(),gz()]:[],ye=()=>m===`off`?[]:[oR.lineWrapping,xG],be=()=>[SM.readOnly.of(f),oR.editable.of(!f)],xe=e=>{let t=e.field(ge.current.field,!1);t!==ge.current.seen&&(ge.current.seen=t,re(t?t.check:null),t&&fe.current.onCheck?.(t.check))},Se=V.useCallback(()=>{let e=ce.current;if(!e||e.state.readOnly)return!1;let t=e.state.doc.toString(),n=aG(t);return n===null||n===t?!1:(e.dispatch({changes:{from:0,to:t.length,insert:n}}),!0)},[]);V.useEffect(()=>{let n=oe.current;if(!n)return;let r=oR.updateListener.of(e=>{if(e.docChanged&&!e.transactions.some(e=>e.annotation(SG))){let t=e.state.doc.toString();te(t),fe.current.onChange&&(se.current=[...se.current.slice(-31),t]),fe.current.onChange?.(t)}xe(e.state)}),i=new oR({parent:n,state:SM.create({doc:e??t,extensions:[pe.gutter.of(ve()),cH(),NR(),Ree(),MV(),BR(),bV(dG),hR.of([{key:`Shift-Alt-f`,run:Se},gW,...aV,...hW,...DH,{key:`Escape`,run:e=>(e.contentDOM.blur(),!0)}]),pe.language.of(_e()),pe.wrap.of(ye()),pe.edit.of(be()),g?WR(g):[],oR.contentAttributes.of({"aria-label":O,"data-slot":`code-editor-content`}),lG,r]})});return ce.current=i,xe(i.state),d?.(i),()=>{i.destroy(),ce.current=null,clearTimeout(de.current)}},[]),V.useEffect(()=>{ce.current?.dispatch({effects:[pe.language.reconfigure(_e()),pe.gutter.reconfigure(ve()),pe.wrap.reconfigure(ye()),pe.edit.reconfigure(be())]})},[me,he,k,p,m,f]),V.useEffect(()=>{let t=ce.current;if(!t||e===void 0)return;let n=se.current.indexOf(e);if(n!==-1){se.current=se.current.slice(n+1);return}se.current=[];let r=t.state.doc.toString();e!==r&&(t.dispatch({changes:{from:0,to:r.length,insert:e},annotations:SG.of(!0)}),te(e))},[e]),V.useEffect(()=>{let e=ce.current?.dom;if(!e)return;e.style.fontSize=`${h}px`;let t=le===null?r===void 0?``:OG(r):`${le}px`;e.style.height=t,e.style.minHeight=t?``:`${i}px`,e.style.maxHeight=t||T?``:`${a}px`,ce.current?.requestMeasure()},[le,r,i,a,T,h]);let Ce=V.useCallback(async()=>{try{await navigator.clipboard.writeText(N),ae(!0),clearTimeout(de.current),de.current=setTimeout(()=>ae(!1),2e3),vT.success(D(`Code copied to clipboard`))}catch{vT.error(D(`Failed to copy code`))}},[N,D]),we=typeof r==`string`&&r.endsWith(`%`),Te=v??(me&&!f),I=j||y||_||Te,Ee=me&&ne!==null;return(0,H.jsxs)(F,{...W(`code-editor`),"data-variant":A,borderWidth:A===`borderless`?0:1,borderColor:`$borderColor`,rounded:A===`borderless`?0:`$3`,overflow:`hidden`,bg:`$background`,focusWithinStyle:A===`borderless`?void 0:{borderColor:`$outlineColor`},...E,children:[I&&(0,H.jsxs)(P,{...W(j?`code-editor-header`:`code-editor-toolbar`),items:`center`,justify:`space-between`,flexWrap:`wrap`,gap:`$2`,borderBottomWidth:1,borderColor:`$borderColor`,bg:`$panel`,px:`$2`,py:j?0:`$1`,...j?{minH:40}:null,children:[j?(0,H.jsx)(o,{...W(`code-editor-title`),size:`$2`,fontWeight:`500`,color:`$hint`,px:`$1`,numberOfLines:1,flex:1,minW:0,children:C??O}):null,y?(0,H.jsxs)(Ww,{value:M,onValueChange:ee,children:[(0,H.jsx)(Kw,{...W(`code-editor-language-trigger`),width:`auto`,minHeight:32,borderWidth:0,bg:`transparent`,gap:`$1.5`,px:`$2`,children:(0,H.jsx)(o,{size:`$1`,fontFamily:`$mono`,children:sG[M]?D(sG[M]):M})}),(0,H.jsx)(Zw,{...W(`code-editor-language-content`),children:b.map(e=>(0,H.jsx)(qw,{value:e,children:sG[e]?D(sG[e]):e},e))})]}):(0,H.jsx)(o,{...W(`code-editor-language`),size:`$1`,fontFamily:`$mono`,color:`$soft`,px:`$2`,children:sG[M]?D(sG[M]):M}),(0,H.jsxs)(P,{items:`center`,justify:`flex-end`,flexWrap:`wrap`,gap:j?`$2`:`$1`,shrink:1,minW:0,children:[Te&&(0,H.jsxs)(kS,{...W(`code-editor-format-button`),variant:`ghost`,size:`sm`,disabled:ne?.kind!==`json`,onClick:Se,children:[(0,H.jsx)(ty,{size:14}),D(`Format`)]}),_&&(0,H.jsxs)(kS,{...W(`code-editor-copy-button`),variant:`ghost`,size:`sm`,disabled:!N,onClick:Ce,children:[ie?(0,H.jsx)(hy,{size:14}):(0,H.jsx)(Oy,{size:14}),D(ie?`Copied!`:`Copy`)]}),w]})]}),(0,H.jsxs)(F,{position:`relative`,...we&&{flex:1,minH:0},children:[(0,H.jsx)(F,{ref:oe,...W(`code-editor-body`),...Qx,...we&&{flex:1,minH:0}}),s&&(0,H.jsx)(YW,{side:`top`,span:le??i,floor:i,ceil:cG,onSpan:ue,onReset:()=>ue(null),label:D(`Resize {label}`,{label:O}),b:-4})]}),Ee&&(0,H.jsx)(P,{...W(`code-editor-footer`),items:`center`,justify:`space-between`,gap:`$2`,minH:28,px:`$3`,py:`$1`,borderTopWidth:1,borderColor:`$borderColor`,bg:`$panel`,children:(0,H.jsx)(AG,{check:ne})})]})}function AG({check:e}){let{t}=Ye(),n=e?.kind===`error`,r=e===null?``:e.kind===`error`?t(`Line {line}, column {column}: {message}`,{line:e.line,column:e.column,message:e.message}):e.kind===`text`?t(`Plain text`):e.kind===`empty`?t(`Empty`):t(`Valid JSON`);return(0,H.jsxs)(P,{...W(`code-editor-status`),"aria-live":`polite`,items:`center`,gap:`$1.5`,flex:1,minW:0,children:[n?(0,H.jsx)(xy,{size:14,color:`$bad`}):e?.kind===`text`?(0,H.jsx)(Db,{size:14,color:`$soft`}):e?.kind===`json`?(0,H.jsx)(Sy,{size:14,color:`$soft`}):null,(0,H.jsx)(o,{...W(`code-editor-status-text`),"data-kind":e?.kind,size:`$1`,fontFamily:`$mono`,color:n?`$bad`:`$soft`,numberOfLines:2,children:r})]})}var jG=e=>Re(e||`en`),MG=e=>Ce(e||`en`),NG=e=>e&&e!==`en`?e:`en`,PG={active:!1,locale:`en-US`,dir:`ltr`,messages:{},t:(e,t)=>Ze({},e,t),format:Me(`en-US`)},FG=(0,V.createContext)(PG),IG=(e,t)=>({active:!0,locale:e,dir:MG(e),messages:t,t:(e,n)=>Ze(t,e,n),format:Me(e)});function LG(){let e=(0,V.useContext)(FG);return e.active?{active:!0,locale:e.locale,dir:e.dir}:{active:!1,locale:`en-US`,dir:`ltr`}}var RG=[[`year`,31536e3],[`month`,2592e3],[`week`,604800],[`day`,86400],[`hour`,3600],[`minute`,60],[`second`,1]],zG={year:`y`,month:`mo`,week:`w`,day:`d`,hour:`h`,minute:`m`,second:`s`},BG=e=>{let t=Math.abs(e);for(let[n,r]of RG)if(t>=r||n===`second`){let i=`${Math.floor(t/r)}${zG[n]}`;return e<0?`in ${i}`:i}return`0s`},VG=(e,t)=>{if(e<0){let n=-e;return n<60?t(`in a moment`):n<120?t(`in 1 minute`):n<3600?t(`in {n} minutes`,{n:Math.floor(n/60)}):n<7200?t(`in 1 hour`):n<86400?t(`in {n} hours`,{n:Math.floor(n/3600)}):n<172800?t(`tomorrow`):n<604800?t(`in {n} days`,{n:Math.floor(n/86400)}):n<1209600?t(`in 1 week`):n<2592e3?t(`in {n} weeks`,{n:Math.floor(n/604800)}):n<5184e3?t(`in 1 month`):n<31536e3?t(`in {n} months`,{n:Math.floor(n/2592e3)}):n<63072e3?t(`in 1 year`):t(`in {n} years`,{n:Math.floor(n/31536e3)})}return e<60?t(`just now`):e<120?t(`1 minute ago`):e<3600?t(`{n} minutes ago`,{n:Math.floor(e/60)}):e<7200?t(`1 hour ago`):e<86400?t(`{n} hours ago`,{n:Math.floor(e/3600)}):e<172800?t(`1 day ago`):e<604800?t(`{n} days ago`,{n:Math.floor(e/86400)}):e<1209600?t(`1 week ago`):e<2592e3?t(`{n} weeks ago`,{n:Math.floor(e/604800)}):e<5184e3?t(`1 month ago`):e<31536e3?t(`{n} months ago`,{n:Math.floor(e/2592e3)}):e<63072e3?t(`1 year ago`):t(`{n} years ago`,{n:Math.floor(e/31536e3)})},HG=(e,t)=>{let n=new Intl.RelativeTimeFormat(t,{numeric:`auto`,style:`long`});for(let[t,r]of RG)if(Math.abs(e)>=r||t===`second`){let i=Math.round(e/r)*-1;return n.format(i,t)}return n.format(0,`second`)},UG=(e,t,n,r)=>{let i=Math.floor((Date.now()-new Date(e).getTime())/1e3);return t===`short`?BG(i):t===`long`?HG(i,r):VG(i,n)},WG=I(o,{name:`RelativeTime`,render:`time`});function GG({date:e,format:t=`auto`,updateInterval:n=6e4,...r}){let{t:i}=Ye(),{active:a,locale:o}=LG(),s=a?o:void 0,[c,l]=V.useState(()=>UG(e,t,i,s));return V.useEffect(()=>{l(UG(e,t,i,s));let r=setInterval(()=>l(UG(e,t,i,s)),n);return()=>clearInterval(r)},[e,t,n,i,s]),(0,H.jsx)(WG,{"data-slot":`relative-time`,"data-format":t,dateTime:new Date(e).toISOString(),...r,children:c})}var KG=(0,V.createContext)(`measure-on-hover`),qG=e=>{let t=e;return!t||typeof t.scrollWidth!=`number`?!1:t.scrollWidth>(t.clientWidth??0)||(t.scrollHeight??0)>(t.clientHeight??0)},JG=500,YG=300;function XG({text:e,lineClamp:t,tooltipContent:n,tooltipDelay:r=JG,tooltipPlace:i=`bottom`,isTooltipMultiline:a=!1,alwaysShowTooltip:s=!1,isFocusable:c=!1,...l}){let u=(0,V.useContext)(KG),[d,f]=(0,V.useState)(!1),[p,m]=(0,V.useState)(!1),h=(0,V.useRef)(null),g=(0,V.useRef)(null),_=(0,V.useRef)(!1);(0,V.useEffect)(()=>()=>{g.current&&clearTimeout(g.current)},[]);let v=t&&Number.isInteger(t)&&t>0?t:1,y=t=>(0,H.jsx)(o,{...W(`truncated-text`),numberOfLines:v,maxW:`100%`,minW:0,...v>1?{style:{whiteSpace:`pre-wrap`,overflowWrap:`anywhere`}}:null,...l,...t,children:e});if(u===`disabled`&&!s)return y({});let b=e=>{h.current=e;let t=qG(e);return m(t),t},x=(e,t)=>{g.current&&clearTimeout(g.current);let n=u===`measure-on-hover`?b(e):(h.current=e,!1);g.current=setTimeout(()=>{let e=u===`measure-on-open`?b(h.current):n;(s||e)&&f(!0)},t)},S=()=>{g.current&&clearTimeout(g.current),g.current=null,_.current||f(!1)};return(0,H.jsxs)(qx,{open:d,onOpenChange:e=>!e&&f(!1),placement:i,children:[(0,H.jsx)(ng.Anchor,{asChild:!0,children:y({onPointerEnter:e=>x(e?.currentTarget,r),onPointerLeave:S,onFocus:e=>{_.current=!0,x(e?.currentTarget,0)},onBlur:()=>{_.current=!1,S()},...c?{tabIndex:0,focusVisibleStyle:{outlineColor:`$outlineColor`,outlineWidth:2,outlineStyle:`solid`}}:null,...p?{cursor:`pointer`}:null})}),(0,H.jsx)(Xx,{maxW:YG,children:a&&typeof(n??e)==`string`?(0,H.jsx)(o,{size:`$1`,style:{whiteSpace:`pre-wrap`},children:n??e}):n??e})]})}var ZG=20,QG=14,$G=(e,t)=>{if(!(0,V.isValidElement)(e))return e;let n=e.props;return(0,V.cloneElement)(e,{...n.size==null?{size:QG}:null,...n.color==null?{color:t}:null})};function eK({color:e=`gray`,variant:t=`soft`,weight:n=`regular`,startIcon:r,endElement:i,truncate:a=!0,borderStyle:s=`solid`,onPress:c,href:l,disabled:u=!1,children:d,style:f,...p}){let m=e===`transparent`,h=FS(m?`gray`:e),{style:g,tone:_}=IS(h,[3,11]),v=m?`$aside`:t===`solid`?`$background`:_(11),y=m||t===`outline`||t===`ghost`?`transparent`:_(t===`solid`?11:3),b={size:`$2`,fontWeight:n===`medium`?`500`:void 0,color:v},x=!u&&(c!=null||l!=null);return(0,H.jsxs)(P,{...W(`tag`),"data-color":m?`transparent`:h,"data-variant":t,...l==null?c==null?{render:`span`}:{...LS(u?void 0:c)}:{render:`a`,href:l},...u?{"aria-disabled":!0}:null,display:`inline-flex`,self:`flex-start`,items:`center`,gap:`$1`,height:ZG,px:`$2`,maxW:`100%`,minW:0,rounded:`$xs`,bg:y,...t===`outline`?{borderWidth:1,borderColor:`$rim`,borderStyle:s}:null,overflow:`hidden`,opacity:u?.5:1,cursor:u?`not-allowed`:x?`pointer`:void 0,...x?{focusVisibleStyle:RS}:null,style:{...g,...f},...p,children:[r?$G(r,v):null,typeof d==`string`||typeof d==`number`?a?(0,H.jsx)(XG,{text:String(d),...b}):(0,H.jsx)(o,{...b,children:d}):d,i?(0,H.jsx)(P,{...W(`tag-end`),shrink:0,items:`center`,children:i}):null]})}var tK={sm:20,md:24},nK={ghost:{rest:`transparent`,hover:`$hover`,down:`$raised`},soft:{rest:`$hover`,hover:`$raised`,down:`$rim`},solid:{rest:`$raised`,hover:`$rim`,down:`$bound`}};function rK({label:e,size:t=`sm`,variant:n=`ghost`,color:r=`primary`,shape:i=`square`,weight:a=`regular`,startElement:o,endElement:s,endElementDivider:c=!1,truncate:l=!0,tooltipContent:u,onPress:d,href:f,clickable:p,disabled:m=!1,children:h,...g}){let _=nK[n],v=!m&&(p??(d!=null||f!=null)),y={size:`$2`,fontWeight:a===`medium`?`500`:void 0,color:m?`$hush`:r===`secondary`?`$aside`:`$ink`},b=e??h;return(0,H.jsxs)(P,{...W(`chip`),"data-size":t,"data-variant":n,...f!=null&&!m?{render:`a`,href:f}:d==null?null:LS(m?void 0:d),...m?{"aria-disabled":!0}:null,display:`inline-flex`,self:`flex-start`,items:`center`,gap:`$1`,height:tK[t],px:`$1`,maxW:`100%`,minW:0,rounded:i===`round`?`$10`:`$xs`,bg:_.rest,select:`none`,cursor:m?`not-allowed`:v?`pointer`:void 0,...v?{hoverStyle:{bg:_.hover},pressStyle:{bg:_.down},focusVisibleStyle:RS,...Ub(tK[t],44,`y`)}:null,...g,children:[o?(0,H.jsx)(P,{...W(`chip-start`),shrink:0,items:`center`,children:o}):null,typeof b==`string`||typeof b==`number`?l?(0,H.jsx)(XG,{text:String(b),tooltipContent:u,...y}):Lb(b,void 0,y):b,s?(0,H.jsx)(P,{...W(`chip-end`),shrink:0,items:`center`,self:`stretch`,...c?{borderInlineStartWidth:1,borderColor:`$borderColor`,paddingInlineStart:`$1`}:null,children:s}):null]})}var iK=4,aK=24,oK=220;function sK(e,t,n=1/0,r=iK,i=aK){let a=Math.min(e.length,n);if(a===0)return 0;let o=0;for(let n=0;n<a;n++){let a=o+(n>0?r:0)+e[n];if(a+(n+1<e.length?r+i:0)>t)return Math.max(1,n);o=a}return a}function cK({children:e,maxInlineCount:t,showOverflowCount:n=`hover`,overflowLabel:r,open:i,defaultOpen:a=!1,onOpenChange:s,popupProps:c,...l}){let{t:u}=Ye(),d=(0,V.useMemo)(()=>V.Children.toArray(e).filter(V.isValidElement),[e]),[f,p]=(0,V.useState)([]),[m,h]=(0,V.useState)(null),[g,_]=(0,V.useState)(!1),[v,y]=(0,V.useState)(a),b=i??v,x=(0,V.useCallback)(e=>{i===void 0&&y(e),s?.(e)},[i,s]),S=m!=null&&f.filter(e=>e!=null).length===d.length?sK(f,m,t):Math.min(d.length,t??d.length),C=d.length-S,w=C>0&&(n===`always`||n===`hover`&&(g||b)),T=e=>t=>{let n=t?.nativeEvent?.layout?.width;typeof n==`number`&&p(t=>{if(t[e]===n)return t;let r=t.slice();return r[e]=n,r})};return(0,H.jsxs)(P,{...W(`overflowing-list`),position:`relative`,width:`100%`,minW:0,items:`center`,gap:iK,overflow:`hidden`,onLayout:e=>h(e.nativeEvent.layout.width),onPointerEnter:()=>_(!0),onPointerLeave:()=>_(!1),onFocus:()=>_(!0),onBlur:()=>_(!1),...l,children:[(0,H.jsx)(P,{"aria-hidden":!0,position:`absolute`,t:0,l:0,opacity:0,pointerEvents:`none`,gap:iK,inert:!0,children:d.map((e,t)=>(0,H.jsx)(P,{shrink:0,onLayout:T(t),children:e},e.key??t))}),d.slice(0,S).map((e,t)=>(0,H.jsx)(P,{...t===S-1?{shrink:1,minW:0}:{shrink:0},children:e},e.key??t)),C>0&&n!==`never`?(0,H.jsxs)(Mw,{open:b,onOpenChange:x,placement:`bottom-start`,children:[(0,H.jsx)(Nw,{asChild:!0,children:(0,H.jsx)(P,{...W(`overflowing-list-count`),...LS(()=>x(!b)),"aria-label":u(`{label} ({n})`,{label:r??u(`Show all items`),n:d.length}),"aria-expanded":b,shrink:0,minW:aK,height:20,px:`$1`,items:`center`,justify:`center`,rounded:`$xs`,cursor:`pointer`,hoverStyle:{bg:`$hover`},focusVisibleStyle:RS,opacity:+!!w,children:(0,H.jsx)(o,{size:`$1`,color:`$ink`,children:`+${C}`})})}),(0,H.jsx)(Pw,{p:`$2`,minW:oK,style:{width:Math.max(oK,Math.round(m??0))},...c,children:(0,H.jsx)(F,{...W(`overflowing-list-popup`),maxH:320,overflow:`scroll`,children:(0,H.jsx)(P,{flexWrap:`wrap`,gap:iK,children:d})})})]}):null]})}var lK=e=>{let t=new Intl.NumberFormat(e).formatToParts(-12345.6);return{group:t.find(e=>e.type===`group`)?.value??`,`,decimal:t.find(e=>e.type===`decimal`)?.value??`.`}},uK=/[\s\u00a0\u202f\u2009]/g,dK=/^[\s\u00a0\u202f\u2009]$/;function fK(e,t,n){let{group:r,decimal:i}=lK(t),a=e.replace(uK,``).replace(/[\u2212\u2012\u2013]/g,`-`);if(!a)return NaN;r&&!dK.test(r)&&(a=a.split(r).join(``));let o=n?.style===`percent`||a.includes(`%`);if(a=a.replace(/[^0-9.,\-+]/g,``),a=i===`.`?a.replace(/,/g,``):a.replace(/\./g,``).replace(i,`.`),!/^[-+]?(\d+\.?\d*|\.\d+)$/.test(a))return NaN;let s=Number(a);return o?s/100:s}var pK=e=>{let t=String(e),n=t.match(/e-(\d+)$/);return n?Number(n[1]):t.includes(`.`)?t.split(`.`)[1].length:0},mK=(e,t,n)=>Math.min(n??1/0,Math.max(t??-1/0,e)),hK={lg:`icon-lg`,default:`icon`,sm:`icon-sm`,xs:`icon-xs`};function gK({value:e,defaultValue:t=null,onValueChange:n,min:r,max:i,step:a=1,smallStep:o=.1,largeStep:s=10,format:c,locale:l,allowOutOfRange:u=!1,readOnly:d=!1,required:f,disabled:p,buttons:m=!1,decrementLabel:h,incrementLabel:g,size:_,onFocus:v,onBlur:y,...b}){let{t:x}=Ye(),S=Rx(_,Lx()),C=e!==void 0,[w,T]=(0,V.useState)(t),E=C?e:w,[D,O]=(0,V.useState)(null),k=(0,V.useRef)(E);k.current=E;let A=(0,V.useMemo)(()=>new Intl.NumberFormat(l,{maximumFractionDigits:20,...c}),[l,c]),j=D??(E==null||Number.isNaN(E)?``:A.format(E)),M=(0,V.useCallback)(e=>{C||T(e),e!==k.current&&n?.(e),k.current=e},[C,n]),ee=e=>{if(d||p)return;let t=E??(e>0?(r??0)-e:(i??0)-e),n=Math.max(pK(e),pK(t)),a=Number((t+e).toFixed(n));O(null),M(u?a:mK(a,r,i))},N=e=>{let t=e.shiftKey?s:e.altKey?o:a;if(e.key===`ArrowUp`)ee(t);else if(e.key===`ArrowDown`)ee(-t);else if(e.key===`Home`&&r!=null&&!d)O(null),M(r);else if(e.key===`End`&&i!=null&&!d)O(null),M(i);else return;e.preventDefault?.()},te=E!=null&&r!=null&&E<=r,ne=E!=null&&i!=null&&E>=i,re=(0,H.jsx)(Dw,{...W(`number-field-input`),...b,size:S,role:`spinbutton`,"aria-valuenow":E??void 0,"aria-valuemin":r,"aria-valuemax":i,"aria-readonly":d||void 0,"aria-required":f||void 0,inputMode:c?.maximumFractionDigits===0?`numeric`:`decimal`,autoComplete:`off`,disabled:p,readOnly:d,value:j,onChangeText:e=>{if(O(e),!e.trim())return M(null);let t=fK(e,l,c);Number.isNaN(t)||M(t)},onFocus:e=>{O(j),v?.(e)},onBlur:e=>{let t=D;if(O(null),t!=null&&t.trim()){let e=fK(t,l,c);Number.isNaN(e)||M(u?e:mK(e,r,i))}y?.(e)},onKeyDown:N});if(!m)return re;let ie=hK[S],ae=e=>()=>ee(e);return(0,H.jsxs)(P,{...W(`number-field`),items:`center`,gap:`$1`,width:`100%`,minW:0,children:[(0,H.jsx)(P,{flex:1,minW:0,children:re}),(0,H.jsx)(kS,{...W(`number-field-decrement`),variant:`outline`,size:ie,"aria-label":h??x(`Decrease`),tabIndex:-1,disabled:p||!u&&te,...d?{opacity:.5,cursor:`default`,hoverStyle:{bg:`$background`}}:null,onPress:ae(-a),children:(0,H.jsx)(ob,{size:16})}),(0,H.jsx)(kS,{...W(`number-field-increment`),variant:`outline`,size:ie,"aria-label":g??x(`Increase`),tabIndex:-1,disabled:p||!u&&ne,...d?{opacity:.5,cursor:`default`,hoverStyle:{bg:`$background`}}:null,onPress:ae(a),children:(0,H.jsx)(lb,{size:16})})]})}var _K=(e,t=!1,n)=>{let[r,i]=(0,V.useState)(t);return[e??r,t=>{e===void 0&&i(t),n?.(t)}]},vK=(0,V.forwardRef)(function({disabled:e,open:t,label:n,children:r,...i},a){let o=(0,V.useContext)(bw),s=Lx(),c=mw[o?.size??Rx(void 0,s)];return(0,H.jsx)(P,{ref:a,...W(`field-segment`),render:`button`,type:`button`,disabled:e,"aria-expanded":!!t,...n?{"aria-label":n}:null,height:c.h-2,marginInlineStart:o?-c.gutter:0,shrink:0,items:`center`,gap:`$1`,px:`$2`,bg:`transparent`,borderWidth:0,borderInlineEndWidth:1,borderColor:`$borderColor`,borderStartStartRadius:`$3`,borderEndStartRadius:`$3`,cursor:e?`not-allowed`:`pointer`,opacity:e?.5:1,hoverStyle:e?void 0:{bg:`$hover`},focusVisibleStyle:{...RS,outlineOffset:-2},...i,children:r})}),yK=32;function bK({trigger:e,open:t,onOpenChange:n,options:r,value:i,onPick:a,searchLabel:s,emptyLabel:c,width:l=240}){let{t:u}=Ye(),d=Lx(),f=s??u(`Search`);return(0,H.jsxs)(Mw,{open:t,onOpenChange:n,placement:`bottom-start`,children:[(0,H.jsx)(Nw,{asChild:!0,children:e}),(0,H.jsx)(Pw,{"data-slot":`search-list`,p:0,width:l,sideOffset:8,overflow:`hidden`,children:(0,H.jsx)(Ix,{value:d,children:(0,H.jsxs)(sC,{value:i??void 0,children:[(0,H.jsx)(cC,{placeholder:f,"aria-label":f,autoFocus:!0}),(0,H.jsxs)(lC,{p:`$1`,children:[(0,H.jsx)(uC,{children:c??u(`No results`)}),r.map(e=>(0,H.jsxs)(dC,{value:e.value,keywords:[e.label,...e.keywords??[]],disabled:e.disabled,minH:yK,px:`$1`,rounded:`$xs`,...Ub(yK,44,`y`),onSelect:e=>a(e),"aria-selected":e.value===i,children:[e.start?(0,H.jsx)(P,{shrink:0,items:`center`,children:e.start}):null,(0,H.jsx)(o,{size:`$2`,color:`$ink`,flex:1,minW:0,numberOfLines:1,children:e.label}),e.end==null?null:(0,H.jsx)(o,{size:`$2`,color:`$hint`,shrink:0,children:e.end}),(0,H.jsx)(hy,{size:16,opacity:+(e.value===i),shrink:0})]},e.value))]})]})})})]})}var xK=e=>`${e.name} (${e.code})`,SK=e=>[e.name,e.code,e.symbol].filter(Boolean).join(` `);function CK({currencies:e,value:t,defaultValue:n=null,onValueChange:r,placeholder:i=`—`,renderValue:a,getOptionLabel:s=xK,getSearchText:c=SK,selectedFirst:l=!1,closeOnSelect:u=!0,open:d,defaultOpen:f,onOpenChange:p,disabled:m=!1,label:h,searchLabel:g,emptyLabel:_}){let{t:v}=Ye(),y=h??v(`Currency`),[b,x]=(0,V.useState)(n),S=t===void 0?b:t,[C,w]=_K(d,f,p),T=e.find(e=>e.code===S),E=(l&&T?[T,...e.filter(e=>e!==T)]:e).map(e=>({value:e.code,label:s(e),keywords:[c(e)],disabled:e.disabled,end:e.symbol}));return(0,H.jsx)(bK,{open:C&&!m,onOpenChange:e=>w(!m&&e),options:E,value:S,searchLabel:g??v(`Search currencies`),emptyLabel:_??v(`No currency found`),onPick:e=>{t===void 0&&x(e),e!==S&&r?.(e),u&&w(!1)},trigger:(0,H.jsxs)(vK,{"data-slot":`currency-picker`,disabled:m,open:C,label:T?v(`{label}: {value}`,{label:y,value:T.name}):y,children:[a?a(T):(0,H.jsx)(o,{size:`$2`,fontWeight:`500`,color:`$hint`,children:T?.code??i}),(0,H.jsx)(gy,{size:14,color:`$hint`})]})})}var wK=e=>{let t=e?.trim().toUpperCase();return!t||!/^[A-Z]{2}$/.test(t)?null:String.fromCodePoint(...[...t].map(e=>127462+e.charCodeAt(0)-65))};function TK({iso:e,override:t}){let n=t??wK(e);return(0,H.jsx)(P,{width:16,height:12,rounded:`$2xs`,overflow:`hidden`,items:`center`,justify:`center`,shrink:0,"aria-hidden":!0,children:n==null?(0,H.jsx)(By,{size:14,color:`$hint`}):typeof n==`string`?(0,H.jsx)(o,{size:`$2`,lineHeight:12,children:n}):n})}function EK({countries:e,value:t,defaultValue:n=null,onValueChange:r,closeOnSelect:i=!0,open:a,defaultOpen:o,onOpenChange:s,disabled:c=!1,label:l,searchLabel:u,emptyLabel:d}){let{t:f}=Ye(),p=l??f(`Country calling code`),[m,h]=(0,V.useState)(n),g=t===void 0?m:t,[_,v]=_K(a,o,s),y=e.find(e=>e.value===g),b=e.map(e=>({value:e.value,label:e.label,keywords:[e.value,e.callingCode,`+${e.callingCode}`],disabled:e.disabled,start:(0,H.jsx)(P,{paddingInlineEnd:`$1`,children:(0,H.jsx)(TK,{iso:e.value,override:e.flag})}),end:`+${e.callingCode}`}));return(0,H.jsx)(bK,{open:_&&!c,onOpenChange:e=>v(!c&&e),options:b,value:g,searchLabel:u??f(`Search countries`),emptyLabel:d??f(`No country found`),width:280,onPick:e=>{t===void 0&&h(e),e!==g&&r?.(e),i&&v(!1)},trigger:(0,H.jsxs)(vK,{"data-slot":`phone-country-picker`,disabled:c,open:_,gap:`$0.5`,paddingInlineStart:`$2`,paddingInlineEnd:`$1`,children:[(0,H.jsx)(TK,{iso:y?.value,override:y?.flag}),(0,H.jsx)(gy,{size:14,color:`$hint`}),(0,H.jsx)(Uh,{children:y?f(`{label}: {country} +{code}`,{label:p,country:y.label,code:y.callingCode}):p})]})})}var DK=`none`,OK=({iso:e,override:t})=>{let n=t??wK(e);return(0,H.jsx)(P,{width:16,height:16,items:`center`,justify:`center`,shrink:0,"aria-hidden":!0,children:n==null?(0,H.jsx)(Cy,{size:16,color:`$hint`}):typeof n==`string`?(0,H.jsx)(o,{size:`$3`,lineHeight:16,children:n}):n})};function kK({countries:e,value:t,defaultValue:n=null,onValueChange:r,label:i,"aria-label":a,noCountryLabel:s,searchLabel:c,noResultsLabel:l,size:u,open:d,defaultOpen:f,onOpenChange:p,disabled:m=!1}){let{t:h}=Ye(),g=s??h(`No country`),_=Lx(),v=mw[Rx(u,_)],y=(0,V.useId)(),[b,x]=(0,V.useState)(n),S=t===void 0?b:t,[C,w]=_K(d,f,p),T=m||e.length===0,E=e.find(e=>e.value===S),D=[{value:DK,label:g,start:(0,H.jsx)(OK,{})},...e.map(e=>({value:e.value,label:e.label,keywords:[e.value],disabled:e.disabled,start:(0,H.jsx)(OK,{iso:e.value,override:e.flag})}))],O=(0,H.jsxs)(P,{...W(`country-select`),render:`button`,type:`button`,disabled:T,"aria-expanded":C,...i?{"aria-labelledby":y}:a?{"aria-label":a}:null,componentName:`Input`,...gw,..._===`compact`?{bg:`$panel`}:null,minH:v.h,px:v.gutter,width:`100%`,minW:0,items:`center`,gap:`$2`,cursor:T?`not-allowed`:`pointer`,opacity:T?.5:1,borderColor:C?`$borderColorFocus`:`$borderColor`,hoverStyle:T?void 0:{borderColor:`$borderColorHover`},...Ub(v.h,44,`y`),children:[(0,H.jsx)(OK,{iso:E?.value,override:E?.flag}),(0,H.jsx)(o,{size:v.font,color:E?`$ink`:`$placeholderColor`,flex:1,minW:0,numberOfLines:1,...eS(`start`),children:E?.label??g}),(0,H.jsx)(gy,{size:16,opacity:.5,shrink:0})]});return(0,H.jsxs)(F,{...W(`country-select-field`),width:`100%`,minW:0,gap:`$1`,children:[i?(0,H.jsx)(o,{id:y,size:`$1`,fontWeight:`600`,color:`$hint`,children:i}):null,(0,H.jsx)(bK,{open:C&&!T,onOpenChange:e=>w(!T&&e),options:D,value:S??DK,searchLabel:c,emptyLabel:l,width:280,onPick:e=>{let n=e===DK?null:e;t===void 0&&x(n),n!==S&&r?.(n),w(!1)},trigger:O})]})}var AK=`appearance`;async function jK(e){return await MK(AK,e)}async function MK(e,{base:t,token:n,signal:r}){if(!(typeof window<`u`&&new URL(t,window.location.origin).origin!==window.location.origin&&!n))try{return(await FK(t,n,{},r))?.[e]}catch{return}}async function NK(e,t){return PK(AK,e,t)}async function PK(e,t,{base:n,token:r,signal:i}){if(typeof window<`u`&&new URL(n,window.location.origin).origin!==window.location.origin&&!r)return!1;try{return!!await FK(n,r,{[e]:t},i)}catch{return!1}}async function FK(e,t,n,r){let i=typeof window<`u`&&new URL(e,window.location.origin).origin!==window.location.origin,a=await fetch(`${e.replace(/\/+$/,``)}/v1/iam/preferences`,{method:`POST`,credentials:t||i?`omit`:`include`,headers:{"Content-Type":`application/json`,...t?{Authorization:`Bearer ${t}`}:{}},body:JSON.stringify(n),signal:r});if(!a.ok)return;let o=await a.json();if(o?.status===`ok`)return o.data??{}}var IK=`hanzo.composer`,LK=`hanzo:composer`;function RK(e){let t=e&&typeof e==`object`?e:{},n={};return(t.send===`enter`||t.send===`mod`)&&(n.send=t.send),typeof t.chips==`boolean`&&(n.chips=t.chips),typeof t.model==`boolean`&&(n.model=t.model),typeof t.mode==`boolean`&&(n.mode=t.mode),n}var zK=()=>{try{return typeof window>`u`?void 0:window.localStorage}catch{return}};function BK(e,t=zK()){let n=RK(e);try{if(!t)throw Error(`no storage`);Object.keys(n).length?t.setItem(IK,JSON.stringify(n)):t.removeItem(IK)}catch{}typeof window<`u`&&window.dispatchEvent(new Event(LK))}async function VK(e){let t=await MK(`composer`,e);return t===void 0?void 0:RK(t)}var HK={"--neutral-50":`#FAFAFA`,"--neutral-100":`#F5F5F5`,"--neutral-200":`#E5E5E5`,"--neutral-300":`#D4D4D4`,"--neutral-400":`#A3A3A3`,"--neutral-500":`#737373`,"--neutral-600":`#525252`,"--neutral-700":`#404040`,"--neutral-800":`#262626`,"--neutral-900":`#171717`,"--neutral-950":`#0A0A0A`,"--pure-black":`#000000`,"--pure-white":`#FFFFFF`,"--hanzo-black":`#0A0A0B`,"--hanzo-white":`#FFFFFF`,"--art-tide":`#2F6BFF`,"--art-iris":`#8B5CF6`,"--art-ember":`#FF7A3D`,"--art-glow":`#F4F1FF`,"--white-03":`rgb(255 255 255 / .03)`,"--white-05":`rgb(255 255 255 / .05)`,"--white-06":`rgb(255 255 255 / .06)`,"--white-08":`rgb(255 255 255 / .08)`,"--white-10":`rgb(255 255 255 / .10)`,"--white-14":`rgb(255 255 255 / .14)`,"--white-15":`rgb(255 255 255 / .15)`,"--white-16":`rgb(255 255 255 / .16)`,"--white-18":`rgb(255 255 255 / .18)`,"--white-20":`rgb(255 255 255 / .20)`,"--white-22":`rgb(255 255 255 / .22)`,"--white-30":`rgb(255 255 255 / .30)`,"--white-40":`rgb(255 255 255 / .40)`,"--white-45":`rgb(255 255 255 / .45)`,"--white-55":`rgb(255 255 255 / .55)`,"--white-60":`rgb(255 255 255 / .60)`,"--white-78":`rgb(255 255 255 / .78)`,"--white-80":`rgb(255 255 255 / .80)`,"--white-92":`rgb(255 255 255 / .92)`,"--background":`#0a0a0a`,"--foreground":`#e5e5e5`,"--card":`#0f0f0f`,"--card-foreground":`#e5e5e5`,"--popover":`#0f0f0f`,"--popover-foreground":`#e5e5e5`,"--primary":`#fafafa`,"--primary-hover":`#e5e5e5`,"--primary-foreground":`#0a0a0a`,"--secondary":`#262626`,"--secondary-hover":`#333333`,"--secondary-foreground":`#fafafa`,"--muted":`#171717`,"--muted-foreground":`#a3a3a3`,"--accent":`#262626`,"--accent-hover":`var(--secondary-hover)`,"--accent-foreground":`#fafafa`,"--destructive":`#dc2626`,"--destructive-hover":`#b91c1c`,"--destructive-foreground":`#fafafa`,"--border":`var(--white-10)`,"--border-strong":`var(--white-16)`,"--border-control":`var(--white-15)`,"--border-focus":`var(--white-22)`,"--border-selected":`var(--white-30)`,"--edge":`var(--white-06)`,"--input":`var(--border-control)`,"--ring":`var(--white-40)`,"--ring-halo":`var(--white-10)`,"--brand":`#e4e4e7`,"--brand-foreground":`#09090b`,"--brand-muted":`#a3a3a3`,"--black":`#000000`,"--white":`#fafafa`,"--selection":`var(--white-20)`,"--glass":`var(--white-05)`,"--glass-strong":`var(--white-08)`,"--surface-page":`var(--background)`,"--surface-card":`rgb(38 38 38 / .5)`,"--surface-card-emphasis":`rgb(38 38 38 / .75)`,"--surface-card-quiet":`rgb(38 38 38 / .35)`,"--surface-overlay":`rgb(23 23 23 / .92)`,"--surface-header":`rgb(0 0 0 / .7)`,"--surface-scrim":`rgb(0 0 0 / .8)`,"--surface-0":`var(--background)`,"--surface-1":`var(--card)`,"--surface-2":`var(--muted)`,"--surface-3":`var(--secondary)`,"--text-primary":`#fafafa`,"--text-secondary":`var(--white-78)`,"--text-tertiary":`var(--white-55)`,"--text-helper":`var(--muted-foreground)`,"--text-disabled":`var(--white-30)`,"--state-error":`#ef4444`,"--state-error-text":`#fca5a5`,"--state-error-bg":`rgb(239 68 68 / .1)`,"--state-online":`#4ade80`,"--state-success":`#22c55e`,"--chrome-dot-red":`rgb(239 68 68 / .6)`,"--chrome-dot-yellow":`rgb(234 179 8 / .6)`,"--chrome-dot-green":`rgb(34 197 94 / .6)`,"--type-scale":`1`,"--type-ratio":`1`,"--text-floor":`0.75rem`,"--text-ceiling":`30vw`,"--text-xs":`0.75rem`,"--leading-xs":`1rem`,"--text-sm":`0.8125rem`,"--leading-sm":`1.15rem`,"--text-base":`0.875rem`,"--leading-base":`1.35rem`,"--text-lg":`0.9375rem`,"--leading-lg":`1.4rem`,"--text-xl":`1.0625rem`,"--leading-xl":`1.55rem`,"--text-2xl":`1.3125rem`,"--leading-2xl":`1.7rem`,"--text-3xl":`1.625rem`,"--leading-3xl":`1.95rem`,"--text-4xl":`2rem`,"--leading-4xl":`2.25rem`,"--text-5xl":`2.5rem`,"--leading-5xl":`1.05`,"--text-6xl":`3.25rem`,"--leading-6xl":`1`,"--text-7xl":`4rem`,"--leading-7xl":`1`,"--text-8xl":`5.25rem`,"--leading-8xl":`1`,"--text-9xl":`7rem`,"--leading-9xl":`1`,"--font-size-xs":`var(--text-xs)`,"--font-size-sm":`var(--text-sm)`,"--font-size-base":`var(--text-base)`,"--font-size-lg":`var(--text-lg)`,"--font-size-xl":`var(--text-xl)`,"--font-size-2xl":`var(--text-2xl)`,"--font-size-3xl":`var(--text-3xl)`,"--font-size-4xl":`var(--text-4xl)`,"--font-size-5xl":`var(--text-5xl)`,"--font-size-6xl":`var(--text-6xl)`,"--font-size-7xl":`var(--text-7xl)`,"--font-size-8xl":`var(--text-8xl)`,"--font-size-9xl":`var(--text-9xl)`,"--text-control":`var(--text-sm)`,"--weight-normal":`400`,"--weight-medium":`500`,"--weight-semibold":`600`,"--weight-bold":`700`,"--tracking-tight":`-0.025em`,"--tracking-normal":`0em`,"--tracking-wide":`0.025em`,"--tracking-widest":`0.1em`,"--leading-none":`1`,"--leading-tight":`1.25`,"--leading-snug":`1.375`,"--leading-normal":`1.5`,"--leading-relaxed":`1.625`,"--leading-golden":`1.618`,"--type-hero":`600 var(--text-5xl)/1.05 var(--font-display)`,"--type-h2":`700 var(--text-4xl)/var(--leading-4xl) var(--font-display)`,"--type-h3":`600 var(--text-xl)/var(--leading-xl) var(--font-display)`,"--type-lead":`400 var(--text-lg)/var(--leading-relaxed) var(--font-sans)`,"--type-body":`400 var(--text-sm)/var(--leading-sm) var(--font-sans)`,"--type-caption":`400 var(--text-xs)/var(--leading-xs) var(--font-sans)`,"--type-code":`400 var(--text-sm)/var(--leading-relaxed) var(--font-mono)`,"--type-eyebrow":`600 0.75rem/1 var(--font-sans)`,"--density":`1`,"--space-0":`0`,"--space-1":`0.25rem`,"--space-2":`0.5rem`,"--space-3":`0.75rem`,"--space-4":`1rem`,"--space-5":`1.25rem`,"--space-6":`1.5rem`,"--space-8":`2rem`,"--space-10":`2.5rem`,"--space-12":`3rem`,"--space-14":`3.5rem`,"--space-16":`4rem`,"--space-20":`5rem`,"--space-24":`6rem`,"--space-32":`8rem`,"--golden-1":`0.25rem`,"--golden-2":`0.405rem`,"--golden-3":`0.654rem`,"--golden-4":`1.059rem`,"--golden-5":`1.713rem`,"--golden-6":`2.772rem`,"--golden-7":`4.487rem`,"--golden-8":`7.26rem`,"--golden-9":`11.749rem`,"--golden-split":`38.2% 61.8%`,"--container-max":`80rem`,"--container-prose":`48rem`,"--container-wide":`72rem`,"--gutter":`max(1rem,var(--safe-left),var(--safe-right))`,"--page-gutter":`clamp(20px,4vw,72px)`,"--gutter-sm":`1.5rem`,"--gutter-lg":`2rem`,"--section-y":`2.5rem`,"--section-y-lg":`3.5rem`,"--hero-y":`3rem`,"--hero-y-lg":`4.5rem`,"--header-height":`3.5rem`,"--header":`0px`,"--dock":`0px`,"--tap-target":`44px`,"--control-height-sm":`32px`,"--control-height":`36px`,"--control-height-lg":`40px`,"--control-height-xl":`52px`,"--safe-top":`env(safe-area-inset-top,0px)`,"--safe-right":`env(safe-area-inset-right,0px)`,"--safe-bottom":`env(safe-area-inset-bottom,0px)`,"--safe-left":`env(safe-area-inset-left,0px)`,"--grid-columns":`12`,"--grid-gap":`var(--space-6)`,"--grid-gap-tight":`var(--space-4)`,"--grid-gap-loose":`var(--space-8)`,"--breakpoint-sm":`40rem`,"--breakpoint-md":`48rem`,"--breakpoint-lg":`64rem`,"--breakpoint-xl":`80rem`,"--breakpoint-2xl":`96rem`,"--grid-card-min":`18rem`,"--grid-card-min-wide":`24rem`,"--radius-scale":`1`,"--radius":`calc(0.5rem * var(--radius-scale, 1))`,"--radius-sm":`calc(0.375rem * var(--radius-scale, 1))`,"--radius-md":`calc(0.5rem * var(--radius-scale, 1))`,"--radius-lg":`calc(0.75rem * var(--radius-scale, 1))`,"--radius-xl":`calc(1rem * var(--radius-scale, 1))`,"--radius-2xl":`calc(1.5rem * var(--radius-scale, 1))`,"--radius-composer":`calc(28px * var(--radius-scale, 1))`,"--radius-full":`9999px`,"--shadow-none":`none`,"--shadow-floating":`0 24px 60px -16px rgb(0 0 0 / .75)`,"--shadow-inset-hairline":`inset 0 0 0 1px var(--white-10)`,"--edge-highlight":`inset 0 1px 0 0 rgb(255 255 255 / .10)`,"--bloom":`0 0 24px -2px rgb(255 255 255 / .28)`,"--ring-focus":`0 0 0 3px var(--ring-halo)`,"--shadow-sm":`0 1px 2px 0 rgb(0 0 0 / .40)`,"--shadow":`0 1px 3px 0 rgb(0 0 0 / .45), 0 1px 2px -1px rgb(0 0 0 / .45)`,"--shadow-md":`0 4px 6px -1px rgb(0 0 0 / .50), 0 2px 4px -2px rgb(0 0 0 / .50)`,"--shadow-lg":`0 10px 15px -3px rgb(0 0 0 / .55), 0 4px 6px -4px rgb(0 0 0 / .55)`,"--shadow-xl":`0 20px 25px -5px rgb(0 0 0 / .60), 0 8px 10px -6px rgb(0 0 0 / .60)`,"--shadow-2xl":`var(--shadow-floating)`,"--sheet-0":`var(--surface-page)`,"--sheet-1":`var(--surface-card)`,"--sheet-2":`var(--surface-card-emphasis)`,"--shadow-sheet-1":`var(--edge-highlight),0 1px 2px 0 rgb(0 0 0 / .40)`,"--shadow-sheet-2":`var(--edge-highlight),0 10px 15px -3px rgb(0 0 0 / .55),0 4px 6px -4px rgb(0 0 0 / .55)`,"--fold":`12px`,"--fold-face":`linear-gradient(315deg,var(--glass-strong) 0,var(--glass-strong) calc(var(--fold) - 1px),var(--border-strong) calc(var(--fold) - 1px),var(--border-strong) var(--fold),transparent var(--fold))`,"--glow-hero":`radial-gradient(circle,rgb(255 255 255 / .12) 0%,transparent 68%)`,"--glow-hero-blur":`120px`,"--sheen-card":`radial-gradient(120% 120% at 80% 0%,rgb(255 255 255 / .08) 0%,transparent 55%)`,"--sheen-edge":`linear-gradient(90deg,transparent,rgb(255 255 255 / .14) 50%,transparent)`,"--gradient-chrome":`linear-gradient(to right,#ffffff,var(--white-80),var(--white-60))`,"--gradient-chrome-2":`linear-gradient(to right,#ffffff,var(--neutral-500))`,"--gradient-protect":`linear-gradient(to bottom,var(--white-10),transparent)`,"--chrome":`rgb(9 9 11 / .72)`,"--chrome-blur":`blur(20px) saturate(1.8)`,"--chrome-panel":`var(--popover)`,"--pane-blur":`var(--chrome-blur)`,"--pane-edge":`var(--white-08)`,"--pane-round":`var(--radius-xl)`,"--pane-fill":`var(--sheet-1)`,"--pane-solid":`color-mix(in srgb,var(--neutral-800) 50%,var(--background))`,"--pane-floor":`var(--background)`,"--pane-gap":`var(--space-2)`,"--pane-ground":`radial-gradient(80rem 40rem at 12% -10%,rgb(255 255 255 / .035),transparent 60%),radial-gradient(60rem 34rem at 92% 108%,var(--white-03),transparent 60%)`,"--duration-fast":`150ms`,"--duration-base":`300ms`,"--duration-slow":`400ms`,"--duration-slower":`500ms`,"--duration-glow":`9s`,"--duration-press":`90ms`,"--ease-out":`cubic-bezier(0,0,0.2,1)`,"--ease-in-out":`cubic-bezier(0.4,0,0.2,1)`,"--ease-emphasis":`cubic-bezier(0.16,1,0.3,1)`,"--stagger":`60ms`,"--entry-rise":`16px`,"--entry-rise-lg":`24px`,"--z-base":`0`,"--z-raised":`10`,"--z-sticky":`200`,"--z-header":`300`,"--z-dropdown":`400`,"--z-overlay":`500`,"--z-modal":`600`,"--z-popover":`700`,"--z-toast":`800`,"--z-under":`-10`,"--z-panel":`18`,"--z-scrim":`19`,"--z-drawer":`20`,"--z-sheet":`30`,"--z-dock":`40`,"--z-banner":`50`,"--z-tooltip":`var(--z-popover)`,"--z-notification":`var(--z-toast)`,"--font-arabic-kufi":`"Noto Kufi Arabic"`,"--font-arabic-sans":`"Noto Sans Arabic"`,"--font-arabic-plex":`"IBM Plex Sans Arabic"`,"--font-arabic":`var(--font-arabic-kufi)`,"--font-sans":`var(--font-arabic), Zen, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif`,"--font-display":`var(--font-sans)`,"--font-mono":`var(--font-arabic), Zen Mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace`,"--font-serif":`var(--font-arabic), Georgia, serif`,"--font-feature-settings":`normal`,"--ring-offset":`-2px`},UK=.85,WK=1.4,GK=.75,KK=1.5,qK=1.05,JK=[`2xl`,`3xl`,`4xl`,`5xl`,`6xl`,`7xl`,`8xl`,`9xl`],YK=1.0625,XK={compact:.85,default:1,comfortable:1.15},ZK={system:`ui-sans-serif, system-ui, -apple-system, sans-serif`,serif:`var(--font-serif)`,mono:`var(--font-mono)`},QK={kufi:`var(--font-arabic-kufi)`,sans:`var(--font-arabic-sans)`,plex:`var(--font-arabic-plex)`},$K={narrow:{max:`64rem`,prose:`40rem`,wide:`58rem`},wide:{max:`96rem`,prose:`56rem`,wide:`86rem`}},eq={sharp:.5,round:1.5},tq=(e,t,n)=>Math.min(n,Math.max(t,e)),nq=e=>String(Math.round(e*1e4)/1e4);function rq(e){let t=e.trim();return!t||t.length>64||/[;{}()]/.test(t)&&!/^(rgb|rgba|hsl|hsla|oklch|oklab|lab|lch|color)\([^;{}]*\)$/i.test(t)?!1:/^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i.test(t)||/^(rgb|rgba|hsl|hsla|oklch|oklab|lab|lch|color)\([^;{}]*\)$/i.test(t)||/^[a-z]{3,20}$/i.test(t)}var iq=HK[`--primary-foreground`],aq=HK[`--primary`],oq=e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4,sq=(e,t,n)=>.2126*oq(e)+.7152*oq(t)+.0722*oq(n),cq=(e,t)=>{let n=parseFloat(e);return e.trim().endsWith(`%`)?n/100*t:n};function lq(e){let t=e.trim().toLowerCase(),n=/^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.exec(t);if(n){let e=n[1],t=e.length<=4?[...e.slice(0,3)].map(e=>e+e).join(``):e.slice(0,6),[r,i,a]=[0,2,4].map(e=>parseInt(t.slice(e,e+2),16)/255);return sq(r,i,a)}let r=/^(rgba?|hsla?|oklch|oklab)\(([^)]*)\)$/.exec(t);if(!r)return;let i=r[2].split(/[\s,/]+/).filter(Boolean);if(!(i.length<3||i.slice(0,3).some(e=>!Number.isFinite(parseFloat(e))))){if(r[1].startsWith(`rgb`)){let[e,t,n]=i.slice(0,3).map(e=>tq(cq(e,255),0,255)/255);return sq(e,t,n)}if(r[1].startsWith(`hsl`)){let e=(parseFloat(i[0])%360+360)%360,t=tq(cq(i[1],1),0,1),n=tq(cq(i[2],1),0,1),r=t=>(t+e/30)%12,a=t*Math.min(n,1-n),o=e=>n-a*Math.max(-1,Math.min(r(e)-3,9-r(e),1));return sq(o(0),o(8),o(4))}return tq(cq(i[0],1),0,1)**3}}var uq=(e,t)=>(Math.max(e,t)+.05)/(Math.min(e,t)+.05);function dq(e){let t=lq(e);if(t===void 0)return;let n=lq(iq)??0,r=lq(aq)??1;return uq(t,n)>=uq(t,r)?iq:aq}function fq(e){let t={};if(typeof e.type==`number`&&Number.isFinite(e.type)&&(t[`--type-scale`]=nq(tq(e.type,UK,WK))),typeof e.ratio==`number`&&Number.isFinite(e.ratio)&&(t[`--type-ratio`]=nq(tq(e.ratio,GK,KK))),typeof e.modular==`number`&&Number.isFinite(e.modular)){let n=tq(e.modular,qK,2);JK.forEach((e,r)=>{let i=YK*n**+(r+1);t[`--text-${e}`]=`clamp(var(--text-floor), calc(${nq(i)}rem * var(--type-scale, 1)), var(--text-ceiling))`})}e.density&&e.density in XK&&(t[`--density`]=nq(XK[e.density]));let n=e.font?ZK[e.font]:void 0;n&&(t[`--font-sans`]=n);let r=e.arabic?QK[e.arabic]:void 0;r&&(t[`--font-arabic`]=r);let i=e.width?$K[e.width]:void 0;i&&(t[`--container-max`]=i.max,t[`--container-prose`]=i.prose,t[`--container-wide`]=i.wide);let a=e.radius?eq[e.radius]:void 0;a&&(t[`--radius-scale`]=nq(a));let o=e.accent&&rq(e.accent)?e.accent.trim():void 0,s=o?dq(o):void 0;if(o&&s){let e=`color-mix(in oklab, ${o} 85%, ${s})`;t[`--primary`]=o,t[`--primary-foreground`]=s,t[`--primary-hover`]=e,t[`--accent`]=o,t[`--accent-foreground`]=s,t[`--accent-hover`]=e}return t}var pq=[`install`,`org`,`user`,`userOrg`],mq=[`type`,`ratio`,`modular`,`density`,`font`,`arabic`,`width`,`accent`,`highlight`,`background`,`contrast`,`theme`,`radius`];function hq(e){let t={},n={};for(let r of mq)for(let i of pq){let a=e[i]?.[r];a!=null&&a!==``&&(t[r]=a,n[r]=i)}return{pref:t,from:n}}var gq=e=>e===`org`?`userOrg`:`user`,_q=/^(#[0-9a-fA-F]{3,8}|(?:rgb|hsl|oklch|oklab|lab|lch)a?\(\s*[-+0-9.%deg\s,/]+\)|[a-zA-Z]{3,20})$/;function vq(e){let t=/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.exec(e);if(!t)return`#fafafa`;let n=t[1].length===3?t[1].replace(/./g,`$&$&`):t[1].slice(0,6),[r,i,a]=[0,2,4].map(e=>{let t=parseInt(n.slice(e,e+2),16)/255;return t<=.04045?t/12.92:((t+.055)/1.055)**2.4});return .2126*r+.7152*i+.0722*a>.179?`#09090b`:`#fafafa`}var yq={oled:{"--background":`#000000`,"--foreground":`#fafafa`,"--text-primary":`#fafafa`,"--pane-floor":`#000000`,"--pane-fill":`#050505`,"--card":`#080808`,"--surface-card":`#080808`,"--card-foreground":`#fafafa`,"--popover":`#080808`,"--popover-foreground":`#fafafa`,"--muted":`#0d0d0d`,"--secondary":`#161616`,"--secondary-hover":`#1f1f1f`,"--secondary-foreground":`#fafafa`,"--composer-fill":`#111111`,"--composer-ground":`#111111`},soft:{"--background":`#181818`,"--foreground":`#fafafa`,"--text-primary":`#fafafa`,"--pane-floor":`#131312`,"--pane-fill":`#1c1c1b`,"--card":`#20201f`,"--surface-card":`#20201f`,"--card-foreground":`#fafafa`,"--popover":`#20201f`,"--popover-foreground":`#fafafa`,"--muted":`#252523`,"--secondary":`#2e2e2c`,"--secondary-hover":`#383835`,"--secondary-foreground":`#fafafa`,"--composer-fill":`#272725`,"--composer-ground":`#272725`},high:{"--background":`#000000`,"--foreground":`#ffffff`,"--text-primary":`#ffffff`,"--pane-floor":`#000000`,"--pane-fill":`#060606`,"--card":`#0a0a0a`,"--surface-card":`#0a0a0a`,"--card-foreground":`#ffffff`,"--popover":`#0a0a0a`,"--popover-foreground":`#ffffff`,"--muted":`#121212`,"--secondary":`#1f1f1f`,"--secondary-hover":`#292929`,"--secondary-foreground":`#ffffff`,"--composer-fill":`#141414`,"--composer-ground":`#141414`,"--border":`rgb(255 255 255 / .18)`}};function bq(e){if(e.background!==void 0){let t=e.background.trim();if(_q.test(t))return vq(t)===`#09090b`?`light`:`dark`}return e.contrast&&e.contrast in yq?`dark`:e.theme}function xq(e){let t={...fq(e)};if(e.contrast&&e.contrast in yq&&Object.assign(t,yq[e.contrast]),e.background!==void 0){let n=e.background.trim();if(_q.test(n)){let e=vq(n),r=e===`#09090b`?`black`:`white`;t[`--background`]=n,t[`--foreground`]=e,t[`--text-primary`]=e,t[`--pane-floor`]=`color-mix(in oklch, ${n} 95%, black)`,t[`--pane-fill`]=`color-mix(in oklch, ${n} 97%, ${r})`,t[`--card`]=`color-mix(in oklch, ${n} 95%, ${r})`,t[`--surface-card`]=`color-mix(in oklch, ${n} 95%, ${r})`,t[`--card-foreground`]=e,t[`--popover`]=`color-mix(in oklch, ${n} 92%, ${r})`,t[`--popover-foreground`]=e,t[`--muted`]=`color-mix(in oklch, ${n} 92%, ${r})`,t[`--secondary`]=`color-mix(in oklch, ${n} 90%, ${r})`,t[`--secondary-hover`]=`color-mix(in oklch, ${n} 84%, ${r})`,t[`--secondary-foreground`]=e,t[`--composer-fill`]=`color-mix(in oklch, ${n} 90%, ${r})`,t[`--composer-ground`]=`color-mix(in oklch, ${n} 90%, ${r})`}}if(e.highlight!==void 0){let n=e.highlight.trim();_q.test(n)&&(t[`--highlight`]=n,t[`--selection`]=`color-mix(in oklab, ${n} 28%, transparent)`,t[`--ring`]=`color-mix(in oklab, ${n} 55%, transparent)`,t[`--ring-halo`]=`color-mix(in oklab, ${n} 18%, transparent)`,t[`--border-focus`]=`color-mix(in oklab, ${n} 50%, transparent)`,t[`--border-selected`]=`color-mix(in oklab, ${n} 65%, transparent)`)}return t}var Sq=`hanzo.appearance`,Cq=(e,t)=>e===`org`&&t?`${Sq}@${t}`:Sq,wq={type:1,density:`default`},Tq=()=>typeof document<`u`,Eq=[`kufi`,`sans`,`plex`];function Dq({scope:e=`everywhere`,org:t,store:n=zq()}={}){try{let r=n?.getItem(Cq(e,t));if(!r)return{};let i=JSON.parse(r);return!i||typeof i!=`object`?{}:{...typeof i.type==`number`&&Number.isFinite(i.type)?{type:i.type}:{},...typeof i.ratio==`number`&&Number.isFinite(i.ratio)?{ratio:i.ratio}:{},...typeof i.modular==`number`&&Number.isFinite(i.modular)?{modular:i.modular}:{},...i.density===`compact`||i.density===`comfortable`||i.density==="default"?{density:i.density}:{},...i.font==="default"||i.font===`system`||i.font===`serif`||i.font===`mono`?{font:i.font}:{},...i.arabic==="default"||Eq.includes(i.arabic)?{arabic:i.arabic}:{},...i.width===`narrow`||i.width==="default"||i.width===`wide`?{width:i.width}:{},...typeof i.accent==`string`?{accent:i.accent}:{},...typeof i.highlight==`string`?{highlight:i.highlight}:{},...typeof i.background==`string`?{background:i.background}:{},...i.contrast===`oled`||i.contrast===`soft`||i.contrast===`high`?{contrast:i.contrast}:{},...i.theme===`system`||i.theme===`light`||i.theme===`dark`?{theme:i.theme}:{},...i.radius===`sharp`||i.radius==="default"||i.radius===`round`?{radius:i.radius}:{}}}catch{return{}}}function Oq({org:e,store:t=zq()}={}){return{user:Dq({scope:`everywhere`,store:t}),...e?{userOrg:Dq({scope:`org`,org:e,store:t})}:{}}}var kq=`hanzo:appearance`;function Aq(e,{scope:t=`everywhere`,org:n,store:r=zq()}={}){try{return r?.setItem(Cq(t,n),JSON.stringify(e)),typeof window<`u`&&typeof Event==`function`&&window.dispatchEvent(new Event(kq)),!!r}catch{return!1}}function jq(e,t=Tq()?document.documentElement:void 0,{store:n=zq()}={}){if(!t)return;let r=xq(e);for(let e of Lq){let n=r[e];n?t.style.setProperty(e,n):t.style.removeProperty(e)}let i=bq(e);if(Pq(i,t),Tq()&&t===document.documentElement){Iq(i);try{n?.setItem(Mq,JSON.stringify({vars:r,...i?{theme:i}:{}}))}catch{}}}var Mq=`${Sq}.painted`,Nq=e=>e===`dark`||e===`system`&&typeof matchMedia==`function`&&matchMedia(`(prefers-color-scheme: dark)`).matches;function Pq(e,t){if(!e&&!t.hasAttribute(`data-scheme`))return;let n=!e||Nq(e);t.classList.toggle(`light`,!n),t.classList.toggle(`dark`,n),t.classList.toggle(`t_light`,!n),t.classList.toggle(`t_dark`,n),t.style.colorScheme=n?`dark`:`light`,e?t.setAttribute(`data-scheme`,e):t.removeAttribute(`data-scheme`)}var Fq;function Iq(e){if(e===`system`){if(Fq||typeof matchMedia!=`function`)return;let e=matchMedia(`(prefers-color-scheme: dark)`),t=()=>Pq(`system`,document.documentElement);e.addEventListener?.(`change`,t),Fq={query:e,on:t}}else Fq&&=(Fq.query.removeEventListener?.(`change`,Fq.on),void 0)}var Lq=Object.keys(xq({type:1,ratio:1,modular:1.25,density:`compact`,font:`serif`,arabic:`sans`,width:`wide`,accent:`#000`,highlight:`#000`,background:`#000`,contrast:`high`,radius:`round`}));function Rq({install:e,org:t,orgId:n,store:r}={}){return hq({install:e,org:t,...Oq({org:n,store:r})})}function zq(){try{return typeof localStorage<`u`?localStorage:void 0}catch{return}}var Bq=()=>document.documentElement.classList.contains(`light`)?`light`:`dark`;function Vq(e){let t=new MutationObserver(e);return t.observe(document.documentElement,{attributes:!0,attributeFilter:[`class`]}),()=>t.disconnect()}function Hq(){return(0,V.useSyncExternalStore)(Vq,Bq,()=>`dark`)}function Uq({org:e,install:t,orgPref:n,account:r}={}){let[i,a]=(0,V.useState)(wq),[o,s]=(0,V.useState)({}),[c,l]=(0,V.useState)(`everywhere`),u=(0,V.useCallback)((r=c)=>{let i=Rq({install:t,org:n,orgId:e});return a(i.pref),s(i.from),jq(i.pref),l(r),i},[t,n,e,c]);return(0,V.useEffect)(()=>{u()},[e,t,n]),(0,V.useEffect)(()=>{if(typeof window>`u`)return;let e=()=>u();return window.addEventListener(kq,e),window.addEventListener(`storage`,e),()=>{window.removeEventListener(kq,e),window.removeEventListener(`storage`,e)}},[u]),(0,V.useEffect)(()=>{if(!r)return;let e=!0;return jK(r).then(t=>{e&&t&&(Aq(t,{scope:`everywhere`}),u())}),VK(r).then(t=>{e&&t&&BK(t)}),()=>{e=!1}},[r?.base,r?.token]),{pref:i,set:(0,V.useCallback)(t=>{let n={...Dq({scope:c,org:e}),...t};`accent`in t&&t.accent===void 0&&delete n.accent,`highlight`in t&&t.highlight===void 0&&delete n.highlight,`background`in t&&t.background===void 0&&delete n.background,`contrast`in t&&t.contrast===void 0&&delete n.contrast,Aq(n,{scope:c,org:e}),u(),r&&c===`everywhere`&&NK(n,r)},[c,e,u,r]),reset:(0,V.useCallback)(()=>{Aq({},{scope:c,org:e}),u(),r&&c===`everywhere`&&NK({},r)},[c,e,u,r]),scope:c,setScope:e=>u(e),from:o,layer:gq(c)}}var Wq={Close:`إغلاق`,"Close window":`إغلاق النافذة`,"Minimize window":`تصغير النافذة`,"Restore window":`استعادة النافذة`,"Maximize window":`تكبير النافذة`,Resize:`تغيير الحجم`,"Select all":`تحديد الكل`,"Select row":`تحديد الصف`,"Previous month":`الشهر السابق`,"Next month":`الشهر التالي`,Dismiss:`تجاهل`,Breadcrumb:`مسار التنقل`,Cards:`بطاقات`,"Copy code":`نسخ الرمز`,Copied:`تم النسخ`,"Copied!":`تم النسخ!`,Copy:`نسخ`,"Previous slide":`الشريحة السابقة`,"Next slide":`الشريحة التالية`,"Previous card":`البطاقة السابقة`,"Next card":`البطاقة التالية`,"Zoom out":`تصغير`,"Zoom in":`تكبير`,Rotate:`تدوير`,Filter:`تصفية`,"Expand all":`توسيع الكل`,"Collapse all":`طي الكل`,"Search...":`بحث...`,"Pick a date":`اختر تاريخًا`,Select:`تحديد`,"Start typing...":`ابدأ الكتابة...`,Search:`بحث`,Decrease:`إنقاص`,Increase:`زيادة`,pagination:`ترقيم الصفحات`,"Go to previous page":`الانتقال إلى الصفحة السابقة`,"Go to next page":`الانتقال إلى الصفحة التالية`,Previous:`السابق`,Next:`التالي`,"More pages":`مزيد من الصفحات`,Remove:`إزالة`,"Go back":`رجوع`,"Go forward":`تقدم`,"Reload page":`إعادة تحميل الصفحة`,Share:`مشاركة`,"New tab":`علامة تبويب جديدة`,Menu:`القائمة`,"Copy command":`نسخ الأمر`,"Terminal input":`إدخال الطرفية`,Seek:`التمرير`,"Rewind 10 seconds":`إرجاع 10 ثوانٍ`,"Forward 10 seconds":`تقديم 10 ثوانٍ`,Volume:`مستوى الصوت`,"Toggle captions":`تبديل التعليقات`,"Playback speed":`سرعة التشغيل`,Quality:`الجودة`,"Picture in picture":`صورة داخل صورة`,Play:`تشغيل`,Pause:`إيقاف مؤقت`,Mute:`كتم الصوت`,Unmute:`إلغاء كتم الصوت`,"Exit fullscreen":`الخروج من ملء الشاشة`,"Enter fullscreen":`ملء الشاشة`,Expand:`توسيع`,Collapse:`طي`,"Copy reply":`نسخ الرد`,"Good result":`نتيجة جيدة`,"Bad result":`نتيجة سيئة`,"Dialog Close":`إغلاق مربع الحوار`,Notifications:`الإشعارات`,Account:`الحساب`,Cart:`السلة`,Call:`مكالمة`,"Video call":`مكالمة فيديو`,Message:`رسالة`,Main:`الرئيسي`,Columns:`الأعمدة`,"No results.":`لا توجد نتائج.`,"No results":`لا توجد نتائج`,"No results found":`لم يُعثر على نتائج`,"Drop files here":`أفلت الملفات هنا`,"Drag & drop files here":`اسحب الملفات وأفلتها هنا`,"or click to browse (max {maxFiles} files, {maxSize}MB each)":`أو انقر للاستعراض (بحد أقصى {maxFiles} ملفات، {maxSize} ميغابايت لكل ملف)`,"Remove {name}":`إزالة {name}`,"{selected} of {total} row(s) selected.":`تم تحديد {selected} من {total}.`,"Try again":`حاول مرة أخرى`,"What’s up next?":`ما التالي؟`,"Show password":`إظهار كلمة المرور`,"Hide password":`إخفاء كلمة المرور`,"Search icons":`البحث عن أيقونات`,"No icon matches":`لا توجد أيقونة مطابقة`,"Show all items ({n})":`عرض الكل ({n})`,"Fewer {what}":`{what} أقل`,"More {what}":`المزيد من {what}`,"No tasks available. Add tasks to display Gantt chart.":`لا توجد مهام. أضف مهامًا لعرض مخطط جانت.`,January:`يناير`,February:`فبراير`,March:`مارس`,April:`أبريل`,May:`مايو`,June:`يونيو`,July:`يوليو`,August:`أغسطس`,September:`سبتمبر`,October:`أكتوبر`,November:`نوفمبر`,December:`ديسمبر`,Su:`ح`,Mo:`ن`,Tu:`ث`,We:`ر`,Th:`خ`,Fr:`ج`,Sa:`س`,"just now":`الآن`,"in a moment":`بعد لحظات`,"in 1 minute":`خلال دقيقة واحدة`,"in {n} minutes":`خلال {n} دقائق`,"in 1 hour":`خلال ساعة واحدة`,"in {n} hours":`خلال {n} ساعات`,tomorrow:`غدًا`,"in {n} days":`خلال {n} أيام`,"in 1 week":`خلال أسبوع واحد`,"in {n} weeks":`خلال {n} أسابيع`,"in 1 month":`خلال شهر واحد`,"in {n} months":`خلال {n} أشهر`,"in 1 year":`خلال سنة واحدة`,"in {n} years":`خلال {n} سنوات`,"1 minute ago":`قبل دقيقة واحدة`,"{n} minutes ago":`قبل {n} دقائق`,"1 hour ago":`قبل ساعة واحدة`,"{n} hours ago":`قبل {n} ساعات`,"1 day ago":`قبل يوم واحد`,"{n} days ago":`قبل {n} أيام`,"1 week ago":`قبل أسبوع واحد`,"{n} weeks ago":`قبل {n} أسابيع`,"1 month ago":`قبل شهر واحد`,"{n} months ago":`قبل {n} أشهر`,"1 year ago":`قبل سنة واحدة`,"{n} years ago":`قبل {n} سنوات`,"Cookie notice":`إشعار ملفات تعريف الارتباط`,"Cookie preferences":`تفضيلات ملفات تعريف الارتباط`,"Close and use essential cookies only":`إغلاق واستخدام ملفات تعريف الارتباط الأساسية فقط`,Back:`رجوع`,"Log in":`تسجيل الدخول`,"Search Hanzo or ask AI":`ابحث في Hanzo أو اسأل الذكاء الاصطناعي`,"Search models":`البحث عن النماذج`,"Search branches…":`البحث عن الفروع…`,"Search repositories…":`البحث عن المستودعات…`,"Show options":`إظهار الخيارات`,Retry:`إعادة المحاولة`,"Donut chart":`مخطط حلقي`,"Find an organization":`العثور على مؤسسة`,Organizations:`المؤسسات`,"Organization name":`اسم المؤسسة`,"Previous page":`الصفحة السابقة`,"Next page":`الصفحة التالية`,"Continue with credits":`المتابعة باستخدام الرصيد`,"Try Hanzo":`جرّب Hanzo`,"Terms & Policies":`الشروط والسياسات`,"Who this is for":`لمن هذا`,"Bill yearly":`فوترة سنوية`,Apps:`التطبيقات`,"Card actions":`إجراءات البطاقة`,"Assign to...":`تعيين إلى...`,"Search cards...":`البحث في البطاقات...`,"Clear search":`مسح البحث`,"Open files":`الملفات المفتوحة`,"Close panel":`إغلاق اللوحة`,"Add an organization":`إضافة مؤسسة`,"Keyboard Shortcuts":`اختصارات لوحة المفاتيح`,"Run a command":`تشغيل أمر`,"Type shell command...":`اكتب أمر الصدفة...`,"Attached to the next message":`مرفق بالرسالة التالية`,"Channel Member Roster":`أعضاء القناة`,"Channel Collaborative Notes":`ملاحظات القناة المشتركة`,"Code Diff Viewer":`عارض الفروق`,"Live Voice Call":`مكالمة صوتية مباشرة`,"MCP Server Hub":`مركز خوادم MCP`,"Multi-Agent Swarm Bar":`شريط سرب الوكلاء`,"Write shared channel notes, meeting agenda, or AI summaries...":`اكتب ملاحظات القناة أو جدول الاجتماع أو ملخصات الذكاء الاصطناعي...`,"Help improve our AI models":`ساعد في تحسين نماذج الذكاء الاصطناعي`,"Your name":`اسمك`,"Your role":`دورك`,"Country or region":`البلد أو المنطقة`,"Card details":`بيانات البطاقة`,"Agree to recurring charges":`الموافقة على الرسوم المتكررة`,"How you will use Hanzo":`كيف ستستخدم Hanzo`,"Team size":`حجم الفريق`,"I agree to the Terms of Service and Acceptable Use Policy and confirm that I am at least 18 years of age":`أوافق على شروط الخدمة وسياسة الاستخدام المقبول وأؤكد أن عمري 18 عامًا على الأقل.`,"Empty string":`سلسلة فارغة`,"Empty array":`مصفوفة فارغة`,"Empty object":`كائن فارغ`,"Copy {what}":`نسخ {what}`,"Ask anything":`اسأل عن أي شيء`,Auto:`تلقائي`,Instant:`فوري`,Low:`منخفض`,Medium:`متوسط`,High:`عالٍ`,Max:`الحد الأقصى`,Dictate:`إملاء`,"Dictating — click to stop":`جارٍ الإملاء — انقر للإيقاف`,"Dictation settings":`إعدادات الإملاء`,Language:`اللغة`,"No devices found":`لم يُعثر على أجهزة`,"Microphone {n}":`ميكروفون {n}`,"Nothing matches":`لا يوجد تطابق`,Commands:`الأوامر`,"Search commands…":`البحث عن الأوامر…`,Agents:`الوكلاء`,Skills:`المهارات`,Connectors:`الموصّلات`,"Design system":`نظام التصميم`,Plugins:`الإضافات`,Devices:`الأجهزة`,Memory:`الذاكرة`,Research:`بحث متعمق`,On:`تشغيل`,"Upload or add files":`تحميل ملفات أو إضافتها`,"Add files, agents, skills and more":`أضف ملفاتًا ووكلاء ومهارات والمزيد`,"No agents yet":`لا يوجد وكلاء بعد`,"No skills yet":`لا توجد مهارات بعد`,"No connectors yet":`لا توجد موصّلات بعد`,"No design system yet":`لا يوجد نظام تصميم بعد`,"No plugins yet":`لا توجد إضافات بعد`,"No devices yet":`لا توجد أجهزة بعد`,"Search agents":`البحث عن الوكلاء`,"Search skills":`البحث عن المهارات`,"Search connectors":`البحث عن الموصّلات`,"Search design system":`البحث في نظام التصميم`,"Search plugins":`البحث عن الإضافات`,"Search devices":`البحث عن الأجهزة`,"Reading agents":`جارٍ قراءة الوكلاء`,"Reading skills":`جارٍ قراءة المهارات`,"Reading connectors":`جارٍ قراءة الموصّلات`,"Reading design system":`جارٍ قراءة نظام التصميم`,"Reading plugins":`جارٍ قراءة الإضافات`,"Adaptive reasoning based on task complexity":`استدلال متكيف حسب تعقيد المهمة`,"Answers right away, without thinking":`يجيب فورًا دون تفكير`,"A quick pass with minimal thinking":`مرور سريع بأقل قدر من التفكير`,"Thinks before answering":`يفكر قبل الإجابة`,"Deep reasoning for complex problems":`استدلال عميق للمشكلات المعقدة`,"Maximum compute and exhaustive verification":`أقصى حساب وتحقق شامل`,Effort:`الجهد`,"Effort: {level}":`الجهد: {level}`,Mode:`الوضع`,"Mode: {mode}":`الوضع: {mode}`,Model:`النموذج`,"Model: {name}":`النموذج: {name}`,"Voice mode":`وضع الصوت`,"Hanzo is speaking — talk to interrupt":`Hanzo يتحدث — تحدّث للمقاطعة`,"In conversation — click to hang up":`في محادثة — انقر لإنهاء المكالمة`,"Go to testimonial {n}":`الانتقال إلى الشهادة {n}`,"Go to card {n}":`الانتقال إلى البطاقة {n}`,"{n} of {total}":`{n} من {total}`,"Reading…":`جارٍ القراءة…`,Skill:`مهارة`,Plugin:`إضافة`},Gq={Close:`Schließen`,"Close window":`Fenster schließen`,"Minimize window":`Fenster minimieren`,"Restore window":`Fenster wiederherstellen`,"Maximize window":`Fenster maximieren`,Resize:`Größe ändern`,"Select all":`Alle auswählen`,"Select row":`Zeile auswählen`,"Previous month":`Vorheriger Monat`,"Next month":`Nächster Monat`,Dismiss:`Schließen`,Breadcrumb:`Brotkrumen`,Cards:`Karten`,"Copy code":`Code kopieren`,Copied:`Kopiert`,"Copied!":`Kopiert!`,Copy:`Kopieren`,"Previous slide":`Vorherige Folie`,"Next slide":`Nächste Folie`,"Previous card":`Vorherige Karte`,"Next card":`Nächste Karte`,"Zoom out":`Verkleinern`,"Zoom in":`Vergrößern`,Rotate:`Drehen`,Filter:`Filtern`,"Expand all":`Alle aufklappen`,"Collapse all":`Alle zuklappen`,"Search...":`Suchen...`,"Pick a date":`Datum wählen`,Select:`Auswählen`,"Start typing...":`Schreibe etwas...`,Search:`Suchen`,Decrease:`Verringern`,Increase:`Erhöhen`,pagination:`Seitennummerierung`,"Go to previous page":`Zur vorherigen Seite`,"Go to next page":`Zur nächsten Seite`,Previous:`Zurück`,Next:`Weiter`,"More pages":`Weitere Seiten`,Remove:`Entfernen`,"Go back":`Zurück`,"Go forward":`Vorwärts`,"Reload page":`Seite neu laden`,Share:`Teilen`,"New tab":`Neuer Tab`,Menu:`Menü`,"Copy command":`Befehl kopieren`,"Terminal input":`Terminaleingabe`,Seek:`Position`,"Rewind 10 seconds":`10 Sekunden zurück`,"Forward 10 seconds":`10 Sekunden vor`,Volume:`Lautstärke`,"Toggle captions":`Untertitel umschalten`,"Playback speed":`Wiedergabegeschwindigkeit`,Quality:`Qualität`,"Picture in picture":`Bild im Bild`,Play:`Wiedergabe`,Pause:`Pause`,Mute:`Stumm`,Unmute:`Ton an`,"Exit fullscreen":`Vollbild beenden`,"Enter fullscreen":`Vollbild`,Expand:`Aufklappen`,Collapse:`Zuklappen`,"Copy reply":`Antwort kopieren`,"Good result":`Gutes Ergebnis`,"Bad result":`Schlechtes Ergebnis`,"Dialog Close":`Dialog schließen`,Notifications:`Benachrichtigungen`,Account:`Konto`,Cart:`Warenkorb`,Call:`Anruf`,"Video call":`Videoanruf`,Message:`Nachricht`,Main:`Hauptnavigation`,Columns:`Spalten`,"No results.":`Keine Ergebnisse.`,"No results":`Keine Ergebnisse`,"No results found":`Keine Ergebnisse gefunden`,"Drop files here":`Dateien hier ablegen`,"Drag & drop files here":`Dateien hierher ziehen`,"or click to browse (max {maxFiles} files, {maxSize}MB each)":`oder klicken zum Durchsuchen (max. {maxFiles} Dateien, je {maxSize} MB)`,"Remove {name}":`{name} entfernen`,"{selected} of {total} row(s) selected.":`{selected} von {total} Zeile(n) ausgewählt.`,"Try again":`Erneut versuchen`,"What’s up next?":`Was steht als Nächstes an?`,"Show password":`Passwort anzeigen`,"Hide password":`Passwort verbergen`,"Search icons":`Symbole suchen`,"No icon matches":`Kein Symbol passt`,"Show all items ({n})":`Alle anzeigen ({n})`,"Fewer {what}":`Weniger {what}`,"More {what}":`Mehr {what}`,"No tasks available. Add tasks to display Gantt chart.":`Keine Aufgaben. Fügen Sie welche hinzu, um das Gantt-Diagramm zu sehen.`,January:`Januar`,February:`Februar`,March:`März`,April:`April`,May:`Mai`,June:`Juni`,July:`Juli`,August:`August`,September:`September`,October:`Oktober`,November:`November`,December:`Dezember`,Su:`So`,Mo:`Mo`,Tu:`Di`,We:`Mi`,Th:`Do`,Fr:`Fr`,Sa:`Sa`,"just now":`gerade eben`,"in a moment":`gleich`,"in 1 minute":`in 1 Minute`,"in {n} minutes":`in {n} Minuten`,"in 1 hour":`in 1 Stunde`,"in {n} hours":`in {n} Stunden`,tomorrow:`morgen`,"in {n} days":`in {n} Tagen`,"in 1 week":`in 1 Woche`,"in {n} weeks":`in {n} Wochen`,"in 1 month":`in 1 Monat`,"in {n} months":`in {n} Monaten`,"in 1 year":`in 1 Jahr`,"in {n} years":`in {n} Jahren`,"1 minute ago":`vor 1 Minute`,"{n} minutes ago":`vor {n} Minuten`,"1 hour ago":`vor 1 Stunde`,"{n} hours ago":`vor {n} Stunden`,"1 day ago":`vor 1 Tag`,"{n} days ago":`vor {n} Tagen`,"1 week ago":`vor 1 Woche`,"{n} weeks ago":`vor {n} Wochen`,"1 month ago":`vor 1 Monat`,"{n} months ago":`vor {n} Monaten`,"1 year ago":`vor 1 Jahr`,"{n} years ago":`vor {n} Jahren`,"Cookie notice":`Hinweis zu Cookies`,"Cookie preferences":`Cookie-Einstellungen`,"Close and use essential cookies only":`Schließen und nur essenzielle Cookies verwenden`,Back:`Zurück`,"Log in":`Anmelden`,"Search Hanzo or ask AI":`Hanzo durchsuchen oder die KI fragen`,"Search models":`Modelle suchen`,"Search branches…":`Branches suchen…`,"Search repositories…":`Repositories suchen…`,"Show options":`Optionen anzeigen`,Retry:`Wiederholen`,"Donut chart":`Ringdiagramm`,"Find an organization":`Organisation finden`,Organizations:`Organisationen`,"Organization name":`Name der Organisation`,"Previous page":`Vorherige Seite`,"Next page":`Nächste Seite`,"Continue with credits":`Mit Guthaben fortfahren`,"Try Hanzo":`Hanzo ausprobieren`,"Terms & Policies":`Bedingungen und Richtlinien`,"Who this is for":`Für wen es ist`,"Bill yearly":`Jährlich abrechnen`,Apps:`Apps`,"Card actions":`Kartenaktionen`,"Assign to...":`Zuweisen an...`,"Search cards...":`Karten suchen...`,"Clear search":`Suche löschen`,"Open files":`Geöffnete Dateien`,"Close panel":`Bereich schließen`,"Add an organization":`Organisation hinzufügen`,"Keyboard Shortcuts":`Tastenkürzel`,"Run a command":`Befehl ausführen`,"Type shell command...":`Shell-Befehl eingeben...`,"Attached to the next message":`An die nächste Nachricht angehängt`,"Channel Member Roster":`Kanalmitglieder`,"Channel Collaborative Notes":`Gemeinsame Kanalnotizen`,"Code Diff Viewer":`Diff-Ansicht`,"Live Voice Call":`Live-Sprachanruf`,"MCP Server Hub":`MCP-Server-Hub`,"Multi-Agent Swarm Bar":`Leiste für den Agentenschwarm`,"Write shared channel notes, meeting agenda, or AI summaries...":`Gemeinsame Notizen, Tagesordnung oder KI-Zusammenfassungen schreiben...`,"Help improve our AI models":`Hilf mit, unsere KI-Modelle zu verbessern`,"Your name":`Dein Name`,"Your role":`Deine Rolle`,"Country or region":`Land oder Region`,"Card details":`Kartendaten`,"Agree to recurring charges":`Wiederkehrenden Abbuchungen zustimmen`,"How you will use Hanzo":`Wie du Hanzo nutzen wirst`,"Team size":`Teamgröße`,"I agree to the Terms of Service and Acceptable Use Policy and confirm that I am at least 18 years of age":`Ich stimme den Nutzungsbedingungen und der Richtlinie zur akzeptablen Nutzung zu und bestätige, dass ich mindestens 18 Jahre alt bin.`,"Empty string":`Leere Zeichenkette`,"Empty array":`Leeres Array`,"Empty object":`Leeres Objekt`,"Copy {what}":`{what} kopieren`,"Ask anything":`Frag nach allem`,Auto:`Auto`,Instant:`Sofort`,Low:`Niedrig`,Medium:`Mittel`,High:`Hoch`,Max:`Maximal`,Dictate:`Diktieren`,"Dictating — click to stop":`Diktat läuft — zum Stoppen klicken`,"Dictation settings":`Diktateinstellungen`,Language:`Sprache`,"No devices found":`Keine Geräte gefunden`,"Microphone {n}":`Mikrofon {n}`,"Nothing matches":`Nichts passt`,Commands:`Befehle`,"Search commands…":`Befehle suchen…`,Agents:`Agenten`,Skills:`Fähigkeiten`,Connectors:`Konnektoren`,"Design system":`Designsystem`,Plugins:`Plugins`,Devices:`Geräte`,Memory:`Gedächtnis`,Research:`Recherche`,On:`An`,"Upload or add files":`Dateien hochladen oder hinzufügen`,"Add files, agents, skills and more":`Dateien, Agenten, Fähigkeiten und mehr hinzufügen`,"No agents yet":`Noch keine Agenten`,"No skills yet":`Noch keine Fähigkeiten`,"No connectors yet":`Noch keine Konnektoren`,"No design system yet":`Noch kein Designsystem`,"No plugins yet":`Noch keine Plugins`,"No devices yet":`Noch keine Geräte`,"Search agents":`Agenten suchen`,"Search skills":`Fähigkeiten suchen`,"Search connectors":`Konnektoren suchen`,"Search design system":`Designsystem durchsuchen`,"Search plugins":`Plugins suchen`,"Search devices":`Geräte suchen`,"Reading agents":`Agenten werden gelesen`,"Reading skills":`Fähigkeiten werden gelesen`,"Reading connectors":`Konnektoren werden gelesen`,"Reading design system":`Designsystem wird gelesen`,"Reading plugins":`Plugins werden gelesen`,"Adaptive reasoning based on task complexity":`Adaptives Denken je nach Komplexität der Aufgabe`,"Answers right away, without thinking":`Antwortet sofort, ohne nachzudenken`,"A quick pass with minimal thinking":`Ein schneller Durchgang mit wenig Nachdenken`,"Thinks before answering":`Denkt nach, bevor es antwortet`,"Deep reasoning for complex problems":`Tiefes Nachdenken bei komplexen Problemen`,"Maximum compute and exhaustive verification":`Maximales Rechnen und gründliche Prüfung`,Effort:`Aufwand`,"Effort: {level}":`Aufwand: {level}`,Mode:`Modus`,"Mode: {mode}":`Modus: {mode}`,Model:`Modell`,"Model: {name}":`Modell: {name}`,"Voice mode":`Sprachmodus`,"Hanzo is speaking — talk to interrupt":`Hanzo spricht — sprich, um zu unterbrechen`,"In conversation — click to hang up":`Im Gespräch — zum Auflegen klicken`,"Go to testimonial {n}":`Zu Testimonial {n}`,"Go to card {n}":`Zu Karte {n}`,"{n} of {total}":`{n} von {total}`,"Reading…":`Wird gelesen…`,Skill:`Fähigkeit`,Plugin:`Plugin`},Kq={Close:`Cerrar`,"Close window":`Cerrar ventana`,"Minimize window":`Minimizar ventana`,"Restore window":`Restaurar ventana`,"Maximize window":`Maximizar ventana`,Resize:`Cambiar tamaño`,"Select all":`Seleccionar todo`,"Select row":`Seleccionar fila`,"Previous month":`Mes anterior`,"Next month":`Mes siguiente`,Dismiss:`Descartar`,Breadcrumb:`Ruta de navegación`,Cards:`Tarjetas`,"Copy code":`Copiar código`,Copied:`Copiado`,"Copied!":`¡Copiado!`,Copy:`Copiar`,"Previous slide":`Diapositiva anterior`,"Next slide":`Diapositiva siguiente`,"Previous card":`Tarjeta anterior`,"Next card":`Tarjeta siguiente`,"Zoom out":`Alejar`,"Zoom in":`Acercar`,Rotate:`Girar`,Filter:`Filtrar`,"Expand all":`Expandir todo`,"Collapse all":`Contraer todo`,"Search...":`Buscar...`,"Pick a date":`Elige una fecha`,Select:`Seleccionar`,"Start typing...":`Empieza a escribir...`,Search:`Buscar`,Decrease:`Disminuir`,Increase:`Aumentar`,pagination:`paginación`,"Go to previous page":`Ir a la página anterior`,"Go to next page":`Ir a la página siguiente`,Previous:`Anterior`,Next:`Siguiente`,"More pages":`Más páginas`,Remove:`Quitar`,"Go back":`Volver`,"Go forward":`Avanzar`,"Reload page":`Recargar página`,Share:`Compartir`,"New tab":`Nueva pestaña`,Menu:`Menú`,"Copy command":`Copiar comando`,"Terminal input":`Entrada del terminal`,Seek:`Buscar posición`,"Rewind 10 seconds":`Retroceder 10 segundos`,"Forward 10 seconds":`Adelantar 10 segundos`,Volume:`Volumen`,"Toggle captions":`Mostrar u ocultar subtítulos`,"Playback speed":`Velocidad de reproducción`,Quality:`Calidad`,"Picture in picture":`Imagen en imagen`,Play:`Reproducir`,Pause:`Pausa`,Mute:`Silenciar`,Unmute:`Activar sonido`,"Exit fullscreen":`Salir de pantalla completa`,"Enter fullscreen":`Pantalla completa`,Expand:`Expandir`,Collapse:`Contraer`,"Copy reply":`Copiar respuesta`,"Good result":`Buen resultado`,"Bad result":`Mal resultado`,"Dialog Close":`Cerrar diálogo`,Notifications:`Notificaciones`,Account:`Cuenta`,Cart:`Carrito`,Call:`Llamada`,"Video call":`Videollamada`,Message:`Mensaje`,Main:`Principal`,Columns:`Columnas`,"No results.":`No hay resultados.`,"No results":`No hay resultados`,"No results found":`No se encontraron resultados`,"Drop files here":`Suelta los archivos aquí`,"Drag & drop files here":`Arrastra y suelta archivos aquí`,"or click to browse (max {maxFiles} files, {maxSize}MB each)":`o haz clic para explorar (máx. {maxFiles} archivos, {maxSize} MB cada uno)`,"Remove {name}":`Quitar {name}`,"{selected} of {total} row(s) selected.":`{selected} de {total} fila(s) seleccionada(s).`,"Try again":`Intentar de nuevo`,"What’s up next?":`¿Qué sigue?`,"Show password":`Mostrar contraseña`,"Hide password":`Ocultar contraseña`,"Search icons":`Buscar iconos`,"No icon matches":`Ningún icono coincide`,"Show all items ({n})":`Mostrar todos ({n})`,"Fewer {what}":`Menos {what}`,"More {what}":`Más {what}`,"No tasks available. Add tasks to display Gantt chart.":`No hay tareas. Añade tareas para ver el diagrama de Gantt.`,January:`Enero`,February:`Febrero`,March:`Marzo`,April:`Abril`,May:`Mayo`,June:`Junio`,July:`Julio`,August:`Agosto`,September:`Septiembre`,October:`Octubre`,November:`Noviembre`,December:`Diciembre`,Su:`do`,Mo:`lu`,Tu:`ma`,We:`mi`,Th:`ju`,Fr:`vi`,Sa:`sá`,"just now":`ahora mismo`,"in a moment":`en un momento`,"in 1 minute":`en 1 minuto`,"in {n} minutes":`en {n} minutos`,"in 1 hour":`en 1 hora`,"in {n} hours":`en {n} horas`,tomorrow:`mañana`,"in {n} days":`en {n} días`,"in 1 week":`en 1 semana`,"in {n} weeks":`en {n} semanas`,"in 1 month":`en 1 mes`,"in {n} months":`en {n} meses`,"in 1 year":`en 1 año`,"in {n} years":`en {n} años`,"1 minute ago":`hace 1 minuto`,"{n} minutes ago":`hace {n} minutos`,"1 hour ago":`hace 1 hora`,"{n} hours ago":`hace {n} horas`,"1 day ago":`hace 1 día`,"{n} days ago":`hace {n} días`,"1 week ago":`hace 1 semana`,"{n} weeks ago":`hace {n} semanas`,"1 month ago":`hace 1 mes`,"{n} months ago":`hace {n} meses`,"1 year ago":`hace 1 año`,"{n} years ago":`hace {n} años`,"Cookie notice":`Aviso de cookies`,"Cookie preferences":`Preferencias de cookies`,"Close and use essential cookies only":`Cerrar y usar solo cookies esenciales`,Back:`Atrás`,"Log in":`Iniciar sesión`,"Search Hanzo or ask AI":`Busca en Hanzo o pregunta a la IA`,"Search models":`Buscar modelos`,"Search branches…":`Buscar ramas…`,"Search repositories…":`Buscar repositorios…`,"Show options":`Mostrar opciones`,Retry:`Reintentar`,"Donut chart":`Gráfico de anillo`,"Find an organization":`Buscar una organización`,Organizations:`Organizaciones`,"Organization name":`Nombre de la organización`,"Previous page":`Página anterior`,"Next page":`Página siguiente`,"Continue with credits":`Continuar con créditos`,"Try Hanzo":`Probar Hanzo`,"Terms & Policies":`Términos y políticas`,"Who this is for":`Para quién es`,"Bill yearly":`Facturación anual`,Apps:`Aplicaciones`,"Card actions":`Acciones de la tarjeta`,"Assign to...":`Asignar a...`,"Search cards...":`Buscar tarjetas...`,"Clear search":`Borrar búsqueda`,"Open files":`Archivos abiertos`,"Close panel":`Cerrar panel`,"Add an organization":`Añadir una organización`,"Keyboard Shortcuts":`Atajos de teclado`,"Run a command":`Ejecutar un comando`,"Type shell command...":`Escribe un comando de shell...`,"Attached to the next message":`Adjunto al próximo mensaje`,"Channel Member Roster":`Miembros del canal`,"Channel Collaborative Notes":`Notas compartidas del canal`,"Code Diff Viewer":`Visor de diferencias`,"Live Voice Call":`Llamada de voz en vivo`,"MCP Server Hub":`Centro de servidores MCP`,"Multi-Agent Swarm Bar":`Barra del enjambre de agentes`,"Write shared channel notes, meeting agenda, or AI summaries...":`Escribe notas del canal, el orden del día o resúmenes de la IA...`,"Help improve our AI models":`Ayuda a mejorar nuestros modelos de IA`,"Your name":`Tu nombre`,"Your role":`Tu rol`,"Country or region":`País o región`,"Card details":`Datos de la tarjeta`,"Agree to recurring charges":`Acepto los cargos recurrentes`,"How you will use Hanzo":`Cómo usarás Hanzo`,"Team size":`Tamaño del equipo`,"I agree to the Terms of Service and Acceptable Use Policy and confirm that I am at least 18 years of age":`Acepto las Condiciones del servicio y la Política de uso aceptable y confirmo que tengo al menos 18 años.`,"Empty string":`Cadena vacía`,"Empty array":`Arreglo vacío`,"Empty object":`Objeto vacío`,"Copy {what}":`Copiar {what}`,"Ask anything":`Pregunta lo que quieras`,Auto:`Auto`,Instant:`Instantáneo`,Low:`Bajo`,Medium:`Medio`,High:`Alto`,Max:`Máximo`,Dictate:`Dictar`,"Dictating — click to stop":`Dictando — haz clic para detener`,"Dictation settings":`Ajustes de dictado`,Language:`Idioma`,"No devices found":`No se encontraron dispositivos`,"Microphone {n}":`Micrófono {n}`,"Nothing matches":`Nada coincide`,Commands:`Comandos`,"Search commands…":`Buscar comandos…`,Agents:`Agentes`,Skills:`Habilidades`,Connectors:`Conectores`,"Design system":`Sistema de diseño`,Plugins:`Complementos`,Devices:`Dispositivos`,Memory:`Memoria`,Research:`Investigación`,On:`Activado`,"Upload or add files":`Subir o añadir archivos`,"Add files, agents, skills and more":`Añade archivos, agentes, habilidades y más`,"No agents yet":`Aún no hay agentes`,"No skills yet":`Aún no hay habilidades`,"No connectors yet":`Aún no hay conectores`,"No design system yet":`Aún no hay sistema de diseño`,"No plugins yet":`Aún no hay complementos`,"No devices yet":`Aún no hay dispositivos`,"Search agents":`Buscar agentes`,"Search skills":`Buscar habilidades`,"Search connectors":`Buscar conectores`,"Search design system":`Buscar en el sistema de diseño`,"Search plugins":`Buscar complementos`,"Search devices":`Buscar dispositivos`,"Reading agents":`Leyendo agentes`,"Reading skills":`Leyendo habilidades`,"Reading connectors":`Leyendo conectores`,"Reading design system":`Leyendo el sistema de diseño`,"Reading plugins":`Leyendo complementos`,"Adaptive reasoning based on task complexity":`Razonamiento adaptativo según la complejidad de la tarea`,"Answers right away, without thinking":`Responde al instante, sin pensar`,"A quick pass with minimal thinking":`Una pasada rápida, con poco razonamiento`,"Thinks before answering":`Piensa antes de responder`,"Deep reasoning for complex problems":`Razonamiento profundo para problemas complejos`,"Maximum compute and exhaustive verification":`Cómputo máximo y verificación exhaustiva`,Effort:`Esfuerzo`,"Effort: {level}":`Esfuerzo: {level}`,Mode:`Modo`,"Mode: {mode}":`Modo: {mode}`,Model:`Modelo`,"Model: {name}":`Modelo: {name}`,"Voice mode":`Modo de voz`,"Hanzo is speaking — talk to interrupt":`Hanzo está hablando — habla para interrumpir`,"In conversation — click to hang up":`En conversación — haz clic para colgar`,"Go to testimonial {n}":`Ir al testimonio {n}`,"Go to card {n}":`Ir a la tarjeta {n}`,"{n} of {total}":`{n} de {total}`,"Reading…":`Leyendo…`,Skill:`Habilidad`,Plugin:`Complemento`},qq={Close:`Fermer`,"Close window":`Fermer la fenêtre`,"Minimize window":`Réduire la fenêtre`,"Restore window":`Restaurer la fenêtre`,"Maximize window":`Agrandir la fenêtre`,Resize:`Redimensionner`,"Select all":`Tout sélectionner`,"Select row":`Sélectionner la ligne`,"Previous month":`Mois précédent`,"Next month":`Mois suivant`,Dismiss:`Ignorer`,Breadcrumb:`Fil d’Ariane`,Cards:`Cartes`,"Copy code":`Copier le code`,Copied:`Copié`,"Copied!":`Copié !`,Copy:`Copier`,"Previous slide":`Diapositive précédente`,"Next slide":`Diapositive suivante`,"Previous card":`Carte précédente`,"Next card":`Carte suivante`,"Zoom out":`Zoom arrière`,"Zoom in":`Zoom avant`,Rotate:`Pivoter`,Filter:`Filtrer`,"Expand all":`Tout développer`,"Collapse all":`Tout réduire`,"Search...":`Rechercher...`,"Pick a date":`Choisir une date`,Select:`Sélectionner`,"Start typing...":`Commencez à écrire...`,Search:`Rechercher`,Decrease:`Diminuer`,Increase:`Augmenter`,pagination:`pagination`,"Go to previous page":`Aller à la page précédente`,"Go to next page":`Aller à la page suivante`,Previous:`Précédent`,Next:`Suivant`,"More pages":`Plus de pages`,Remove:`Retirer`,"Go back":`Retour`,"Go forward":`Avancer`,"Reload page":`Recharger la page`,Share:`Partager`,"New tab":`Nouvel onglet`,Menu:`Menu`,"Copy command":`Copier la commande`,"Terminal input":`Saisie du terminal`,Seek:`Position de lecture`,"Rewind 10 seconds":`Reculer de 10 secondes`,"Forward 10 seconds":`Avancer de 10 secondes`,Volume:`Volume`,"Toggle captions":`Afficher ou masquer les sous-titres`,"Playback speed":`Vitesse de lecture`,Quality:`Qualité`,"Picture in picture":`Image dans l’image`,Play:`Lecture`,Pause:`Pause`,Mute:`Couper le son`,Unmute:`Réactiver le son`,"Exit fullscreen":`Quitter le plein écran`,"Enter fullscreen":`Plein écran`,Expand:`Développer`,Collapse:`Réduire`,"Copy reply":`Copier la réponse`,"Good result":`Bon résultat`,"Bad result":`Mauvais résultat`,"Dialog Close":`Fermer la boîte de dialogue`,Notifications:`Notifications`,Account:`Compte`,Cart:`Panier`,Call:`Appel`,"Video call":`Appel vidéo`,Message:`Message`,Main:`Principal`,Columns:`Colonnes`,"No results.":`Aucun résultat.`,"No results":`Aucun résultat`,"No results found":`Aucun résultat trouvé`,"Drop files here":`Déposez les fichiers ici`,"Drag & drop files here":`Glissez-déposez des fichiers ici`,"or click to browse (max {maxFiles} files, {maxSize}MB each)":`ou cliquez pour parcourir ({maxFiles} fichiers max., {maxSize} Mo chacun)`,"Remove {name}":`Retirer {name}`,"{selected} of {total} row(s) selected.":`{selected} sur {total} ligne(s) sélectionnée(s).`,"Try again":`Réessayer`,"What’s up next?":`Et ensuite ?`,"Show password":`Afficher le mot de passe`,"Hide password":`Masquer le mot de passe`,"Search icons":`Rechercher des icônes`,"No icon matches":`Aucune icône ne correspond`,"Show all items ({n})":`Tout afficher ({n})`,"Fewer {what}":`Moins de {what}`,"More {what}":`Plus de {what}`,"No tasks available. Add tasks to display Gantt chart.":`Aucune tâche. Ajoutez-en pour afficher le diagramme de Gantt.`,January:`janvier`,February:`février`,March:`mars`,April:`avril`,May:`mai`,June:`juin`,July:`juillet`,August:`août`,September:`septembre`,October:`octobre`,November:`novembre`,December:`décembre`,Su:`di`,Mo:`lu`,Tu:`ma`,We:`me`,Th:`je`,Fr:`ve`,Sa:`sa`,"just now":`à l’instant`,"in a moment":`dans un instant`,"in 1 minute":`dans 1 minute`,"in {n} minutes":`dans {n} minutes`,"in 1 hour":`dans 1 heure`,"in {n} hours":`dans {n} heures`,tomorrow:`demain`,"in {n} days":`dans {n} jours`,"in 1 week":`dans 1 semaine`,"in {n} weeks":`dans {n} semaines`,"in 1 month":`dans 1 mois`,"in {n} months":`dans {n} mois`,"in 1 year":`dans 1 an`,"in {n} years":`dans {n} ans`,"1 minute ago":`il y a 1 minute`,"{n} minutes ago":`il y a {n} minutes`,"1 hour ago":`il y a 1 heure`,"{n} hours ago":`il y a {n} heures`,"1 day ago":`il y a 1 jour`,"{n} days ago":`il y a {n} jours`,"1 week ago":`il y a 1 semaine`,"{n} weeks ago":`il y a {n} semaines`,"1 month ago":`il y a 1 mois`,"{n} months ago":`il y a {n} mois`,"1 year ago":`il y a 1 an`,"{n} years ago":`il y a {n} ans`,"Cookie notice":`Avis sur les cookies`,"Cookie preferences":`Préférences de cookies`,"Close and use essential cookies only":`Fermer et n’utiliser que les cookies essentiels`,Back:`Retour`,"Log in":`Se connecter`,"Search Hanzo or ask AI":`Rechercher dans Hanzo ou demander à l’IA`,"Search models":`Rechercher des modèles`,"Search branches…":`Rechercher des branches…`,"Search repositories…":`Rechercher des dépôts…`,"Show options":`Afficher les options`,Retry:`Réessayer`,"Donut chart":`Graphique en anneau`,"Find an organization":`Trouver une organisation`,Organizations:`Organisations`,"Organization name":`Nom de l’organisation`,"Previous page":`Page précédente`,"Next page":`Page suivante`,"Continue with credits":`Continuer avec des crédits`,"Try Hanzo":`Essayer Hanzo`,"Terms & Policies":`Conditions et politiques`,"Who this is for":`À qui cela s’adresse`,"Bill yearly":`Facturation annuelle`,Apps:`Applications`,"Card actions":`Actions de la carte`,"Assign to...":`Attribuer à...`,"Search cards...":`Rechercher des cartes...`,"Clear search":`Effacer la recherche`,"Open files":`Fichiers ouverts`,"Close panel":`Fermer le panneau`,"Add an organization":`Ajouter une organisation`,"Keyboard Shortcuts":`Raccourcis clavier`,"Run a command":`Exécuter une commande`,"Type shell command...":`Saisissez une commande shell...`,"Attached to the next message":`Joint au prochain message`,"Channel Member Roster":`Membres du canal`,"Channel Collaborative Notes":`Notes collaboratives du canal`,"Code Diff Viewer":`Visionneuse de diff`,"Live Voice Call":`Appel vocal en direct`,"MCP Server Hub":`Hub des serveurs MCP`,"Multi-Agent Swarm Bar":`Barre d’essaim multi-agents`,"Write shared channel notes, meeting agenda, or AI summaries...":`Écrivez des notes partagées, l’ordre du jour ou des résumés de l’IA...`,"Help improve our AI models":`Aidez à améliorer nos modèles d’IA`,"Your name":`Votre nom`,"Your role":`Votre rôle`,"Country or region":`Pays ou région`,"Card details":`Coordonnées de la carte`,"Agree to recurring charges":`J’accepte les prélèvements récurrents`,"How you will use Hanzo":`Comment vous utiliserez Hanzo`,"Team size":`Taille de l’équipe`,"I agree to the Terms of Service and Acceptable Use Policy and confirm that I am at least 18 years of age":`J’accepte les Conditions d’utilisation et la Politique d’usage acceptable et je confirme avoir au moins 18 ans.`,"Empty string":`Chaîne vide`,"Empty array":`Tableau vide`,"Empty object":`Objet vide`,"Copy {what}":`Copier {what}`,"Ask anything":`Demandez n’importe quoi`,Auto:`Auto`,Instant:`Instantané`,Low:`Faible`,Medium:`Moyen`,High:`Élevé`,Max:`Max`,Dictate:`Dicter`,"Dictating — click to stop":`Dictée en cours — cliquez pour arrêter`,"Dictation settings":`Réglages de la dictée`,Language:`Langue`,"No devices found":`Aucun appareil trouvé`,"Microphone {n}":`Microphone {n}`,"Nothing matches":`Aucun résultat`,Commands:`Commandes`,"Search commands…":`Rechercher des commandes…`,Agents:`Agents`,Skills:`Compétences`,Connectors:`Connecteurs`,"Design system":`Système de design`,Plugins:`Plugins`,Devices:`Appareils`,Memory:`Mémoire`,Research:`Recherche`,On:`Activé`,"Upload or add files":`Téléverser ou ajouter des fichiers`,"Add files, agents, skills and more":`Ajoutez des fichiers, des agents, des compétences et plus`,"No agents yet":`Pas encore d’agents`,"No skills yet":`Pas encore de compétences`,"No connectors yet":`Pas encore de connecteurs`,"No design system yet":`Pas encore de système de design`,"No plugins yet":`Pas encore de plugins`,"No devices yet":`Pas encore d’appareils`,"Search agents":`Rechercher des agents`,"Search skills":`Rechercher des compétences`,"Search connectors":`Rechercher des connecteurs`,"Search design system":`Rechercher dans le système de design`,"Search plugins":`Rechercher des plugins`,"Search devices":`Rechercher des appareils`,"Reading agents":`Lecture des agents`,"Reading skills":`Lecture des compétences`,"Reading connectors":`Lecture des connecteurs`,"Reading design system":`Lecture du système de design`,"Reading plugins":`Lecture des plugins`,"Adaptive reasoning based on task complexity":`Raisonnement adaptatif selon la complexité de la tâche`,"Answers right away, without thinking":`Répond immédiatement, sans réfléchir`,"A quick pass with minimal thinking":`Un passage rapide, avec peu de réflexion`,"Thinks before answering":`Réfléchit avant de répondre`,"Deep reasoning for complex problems":`Raisonnement approfondi pour les problèmes complexes`,"Maximum compute and exhaustive verification":`Calcul maximal et vérification exhaustive`,Effort:`Effort`,"Effort: {level}":`Effort : {level}`,Mode:`Mode`,"Mode: {mode}":`Mode : {mode}`,Model:`Modèle`,"Model: {name}":`Modèle : {name}`,"Voice mode":`Mode vocal`,"Hanzo is speaking — talk to interrupt":`Hanzo parle — parlez pour interrompre`,"In conversation — click to hang up":`En conversation — cliquez pour raccrocher`,"Go to testimonial {n}":`Aller au témoignage {n}`,"Go to card {n}":`Aller à la carte {n}`,"{n} of {total}":`{n} sur {total}`,"Reading…":`Lecture…`,Skill:`Compétence`,Plugin:`Plugin`},Jq={Close:`बंद करें`,"Close window":`विंडो बंद करें`,"Minimize window":`विंडो छोटा करें`,"Restore window":`विंडो पुनर्स्थापित करें`,"Maximize window":`विंडो बड़ा करें`,Resize:`आकार बदलें`,"Select all":`सभी चुनें`,"Select row":`पंक्ति चुनें`,"Previous month":`पिछला महीना`,"Next month":`अगला महीना`,Dismiss:`खारिज करें`,Breadcrumb:`ब्रेडक्रम्ब`,Cards:`कार्ड`,"Copy code":`कोड कॉपी करें`,Copied:`कॉपी हो गया`,"Copied!":`कॉपी हो गया!`,Copy:`कॉपी करें`,"Previous slide":`पिछली स्लाइड`,"Next slide":`अगली स्लाइड`,"Previous card":`पिछला कार्ड`,"Next card":`अगला कार्ड`,"Zoom out":`ज़ूम आउट`,"Zoom in":`ज़ूम इन`,Rotate:`घुमाएँ`,Filter:`फ़िल्टर`,"Expand all":`सभी विस्तृत करें`,"Collapse all":`सभी समेटें`,"Search...":`खोजें...`,"Pick a date":`तारीख चुनें`,Select:`चुनें`,"Start typing...":`लिखना शुरू करें...`,Search:`खोजें`,Decrease:`घटाएँ`,Increase:`बढ़ाएँ`,pagination:`पृष्ठांकन`,"Go to previous page":`पिछले पृष्ठ पर जाएँ`,"Go to next page":`अगले पृष्ठ पर जाएँ`,Previous:`पिछला`,Next:`अगला`,"More pages":`और पृष्ठ`,Remove:`हटाएँ`,"Go back":`वापस जाएँ`,"Go forward":`आगे जाएँ`,"Reload page":`पृष्ठ पुनः लोड करें`,Share:`साझा करें`,"New tab":`नया टैब`,Menu:`मेनू`,"Copy command":`कमांड कॉपी करें`,"Terminal input":`टर्मिनल इनपुट`,Seek:`स्थिति`,"Rewind 10 seconds":`10 सेकंड पीछे`,"Forward 10 seconds":`10 सेकंड आगे`,Volume:`आवाज़`,"Toggle captions":`कैप्शन टॉगल करें`,"Playback speed":`प्लेबैक गति`,Quality:`गुणवत्ता`,"Picture in picture":`पिक्चर इन पिक्चर`,Play:`चलाएँ`,Pause:`रोकें`,Mute:`म्यूट`,Unmute:`अनम्यूट`,"Exit fullscreen":`पूर्ण स्क्रीन से बाहर`,"Enter fullscreen":`पूर्ण स्क्रीन`,Expand:`विस्तृत करें`,Collapse:`समेटें`,"Copy reply":`जवाब कॉपी करें`,"Good result":`अच्छा परिणाम`,"Bad result":`खराब परिणाम`,"Dialog Close":`संवाद बंद करें`,Notifications:`सूचनाएँ`,Account:`खाता`,Cart:`कार्ट`,Call:`कॉल`,"Video call":`वीडियो कॉल`,Message:`संदेश`,Main:`मुख्य`,Columns:`कॉलम`,"No results.":`कोई परिणाम नहीं।`,"No results":`कोई परिणाम नहीं`,"No results found":`कोई परिणाम नहीं मिला`,"Drop files here":`फ़ाइलें यहाँ छोड़ें`,"Drag & drop files here":`फ़ाइलें खींचकर यहाँ छोड़ें`,"or click to browse (max {maxFiles} files, {maxSize}MB each)":`या ब्राउज़ करने के लिए क्लिक करें (अधिकतम {maxFiles} फ़ाइलें, प्रत्येक {maxSize} MB)`,"Remove {name}":`{name} हटाएँ`,"{selected} of {total} row(s) selected.":`{total} में से {selected} पंक्तियाँ चुनी गईं।`,"Try again":`फिर कोशिश करें`,"What’s up next?":`आगे क्या है?`,"Show password":`पासवर्ड दिखाएँ`,"Hide password":`पासवर्ड छिपाएँ`,"Search icons":`आइकन खोजें`,"No icon matches":`कोई आइकन मेल नहीं खाता`,"Show all items ({n})":`सभी दिखाएँ ({n})`,"Fewer {what}":`कम {what}`,"More {what}":`अधिक {what}`,"No tasks available. Add tasks to display Gantt chart.":`कोई कार्य नहीं। गैंट चार्ट के लिए कार्य जोड़ें।`,January:`जनवरी`,February:`फ़रवरी`,March:`मार्च`,April:`अप्रैल`,May:`मई`,June:`जून`,July:`जुलाई`,August:`अगस्त`,September:`सितंबर`,October:`अक्टूबर`,November:`नवंबर`,December:`दिसंबर`,Su:`र`,Mo:`सो`,Tu:`मं`,We:`बु`,Th:`गु`,Fr:`शु`,Sa:`श`,"just now":`अभी`,"in a moment":`थोड़ी देर में`,"in 1 minute":`1 मिनट में`,"in {n} minutes":`{n} मिनट में`,"in 1 hour":`1 घंटे में`,"in {n} hours":`{n} घंटे में`,tomorrow:`कल`,"in {n} days":`{n} दिन में`,"in 1 week":`1 हफ़्ते में`,"in {n} weeks":`{n} हफ़्ते में`,"in 1 month":`1 महीने में`,"in {n} months":`{n} महीने में`,"in 1 year":`1 साल में`,"in {n} years":`{n} साल में`,"1 minute ago":`1 मिनट पहले`,"{n} minutes ago":`{n} मिनट पहले`,"1 hour ago":`1 घंटे पहले`,"{n} hours ago":`{n} घंटे पहले`,"1 day ago":`1 दिन पहले`,"{n} days ago":`{n} दिन पहले`,"1 week ago":`1 हफ़्ते पहले`,"{n} weeks ago":`{n} हफ़्ते पहले`,"1 month ago":`1 महीने पहले`,"{n} months ago":`{n} महीने पहले`,"1 year ago":`1 साल पहले`,"{n} years ago":`{n} साल पहले`,"Cookie notice":`कुकी सूचना`,"Cookie preferences":`कुकी प्राथमिकताएँ`,"Close and use essential cookies only":`बंद करें और केवल आवश्यक कुकीज़ का उपयोग करें`,Back:`वापस`,"Log in":`लॉग इन`,"Search Hanzo or ask AI":`Hanzo में खोजें या AI से पूछें`,"Search models":`मॉडल खोजें`,"Search branches…":`ब्रांच खोजें…`,"Search repositories…":`रिपॉज़िटरी खोजें…`,"Show options":`विकल्प दिखाएँ`,Retry:`फिर से कोशिश करें`,"Donut chart":`डोनट चार्ट`,"Find an organization":`संगठन खोजें`,Organizations:`संगठन`,"Organization name":`संगठन का नाम`,"Previous page":`पिछला पृष्ठ`,"Next page":`अगला पृष्ठ`,"Continue with credits":`क्रेडिट से जारी रखें`,"Try Hanzo":`Hanzo आज़माएँ`,"Terms & Policies":`नियम और नीतियाँ`,"Who this is for":`यह किसके लिए है`,"Bill yearly":`वार्षिक बिल`,Apps:`ऐप्स`,"Card actions":`कार्ड क्रियाएँ`,"Assign to...":`इसे असाइन करें...`,"Search cards...":`कार्ड खोजें...`,"Clear search":`खोज साफ़ करें`,"Open files":`खुली फ़ाइलें`,"Close panel":`पैनल बंद करें`,"Add an organization":`संगठन जोड़ें`,"Keyboard Shortcuts":`कीबोर्ड शॉर्टकट`,"Run a command":`कमांड चलाएँ`,"Type shell command...":`शेल कमांड लिखें...`,"Attached to the next message":`अगले संदेश से जुड़ा`,"Channel Member Roster":`चैनल सदस्य`,"Channel Collaborative Notes":`चैनल के साझा नोट`,"Code Diff Viewer":`कोड डिफ़ व्यूअर`,"Live Voice Call":`लाइव वॉइस कॉल`,"MCP Server Hub":`MCP सर्वर हब`,"Multi-Agent Swarm Bar":`मल्टी-एजेंट स्वार्म बार`,"Write shared channel notes, meeting agenda, or AI summaries...":`चैनल नोट, एजेंडा या AI सार लिखें...`,"Help improve our AI models":`हमारे AI मॉडल बेहतर बनाने में मदद करें`,"Your name":`आपका नाम`,"Your role":`आपकी भूमिका`,"Country or region":`देश या क्षेत्र`,"Card details":`कार्ड विवरण`,"Agree to recurring charges":`आवर्ती शुल्क से सहमत हूँ`,"How you will use Hanzo":`आप Hanzo का उपयोग कैसे करेंगे`,"Team size":`टीम का आकार`,"I agree to the Terms of Service and Acceptable Use Policy and confirm that I am at least 18 years of age":`मैं सेवा की शर्तों और स्वीकार्य उपयोग नीति से सहमत हूँ और पुष्टि करता हूँ कि मेरी आयु कम से कम 18 वर्ष है।`,"Empty string":`खाली स्ट्रिंग`,"Empty array":`खाली ऐरे`,"Empty object":`खाली ऑब्जेक्ट`,"Copy {what}":`{what} कॉपी करें`,"Ask anything":`कुछ भी पूछें`,Auto:`ऑटो`,Instant:`तुरंत`,Low:`कम`,Medium:`मध्यम`,High:`उच्च`,Max:`अधिकतम`,Dictate:`डिक्टेट`,"Dictating — click to stop":`डिक्टेशन चालू है — रोकने के लिए क्लिक करें`,"Dictation settings":`डिक्टेशन सेटिंग`,Language:`भाषा`,"No devices found":`कोई डिवाइस नहीं मिला`,"Microphone {n}":`माइक्रोफ़ोन {n}`,"Nothing matches":`कुछ मेल नहीं खाता`,Commands:`कमांड`,"Search commands…":`कमांड खोजें…`,Agents:`एजेंट`,Skills:`कौशल`,Connectors:`कनेक्टर`,"Design system":`डिज़ाइन सिस्टम`,Plugins:`प्लगइन`,Devices:`डिवाइस`,Memory:`मेमोरी`,Research:`रिसर्च`,On:`चालू`,"Upload or add files":`फ़ाइलें अपलोड या जोड़ें`,"Add files, agents, skills and more":`फ़ाइलें, एजेंट, कौशल और अधिक जोड़ें`,"No agents yet":`अभी कोई एजेंट नहीं`,"No skills yet":`अभी कोई कौशल नहीं`,"No connectors yet":`अभी कोई कनेक्टर नहीं`,"No design system yet":`अभी कोई डिज़ाइन सिस्टम नहीं`,"No plugins yet":`अभी कोई प्लगइन नहीं`,"No devices yet":`अभी कोई डिवाइस नहीं`,"Search agents":`एजेंट खोजें`,"Search skills":`कौशल खोजें`,"Search connectors":`कनेक्टर खोजें`,"Search design system":`डिज़ाइन सिस्टम खोजें`,"Search plugins":`प्लगइन खोजें`,"Search devices":`डिवाइस खोजें`,"Reading agents":`एजेंट पढ़े जा रहे हैं`,"Reading skills":`कौशल पढ़े जा रहे हैं`,"Reading connectors":`कनेक्टर पढ़े जा रहे हैं`,"Reading design system":`डिज़ाइन सिस्टम पढ़ा जा रहा है`,"Reading plugins":`प्लगइन पढ़े जा रहे हैं`,"Adaptive reasoning based on task complexity":`कार्य की जटिलता के अनुसार अनुकूल तर्क`,"Answers right away, without thinking":`बिना सोचे तुरंत जवाब देता है`,"A quick pass with minimal thinking":`कम सोच के साथ एक त्वरित पास`,"Thinks before answering":`जवाब से पहले सोचता है`,"Deep reasoning for complex problems":`जटिल समस्याओं के लिए गहरा तर्क`,"Maximum compute and exhaustive verification":`अधिकतम कंप्यूट और पूरी जाँच`,Effort:`प्रयास`,"Effort: {level}":`प्रयास: {level}`,Mode:`मोड`,"Mode: {mode}":`मोड: {mode}`,Model:`मॉडल`,"Model: {name}":`मॉडल: {name}`,"Voice mode":`वॉइस मोड`,"Hanzo is speaking — talk to interrupt":`Hanzo बोल रहा है — बीच में बोलें`,"In conversation — click to hang up":`बातचीत में — काटने के लिए क्लिक करें`,"Go to testimonial {n}":`प्रशंसापत्र {n} पर जाएँ`,"Go to card {n}":`कार्ड {n} पर जाएँ`,"{n} of {total}":`{n} / {total}`,"Reading…":`पढ़ा जा रहा है…`,Skill:`कौशल`,Plugin:`प्लगइन`},Yq={Close:`Tutup`,"Close window":`Tutup jendela`,"Minimize window":`Minimalkan jendela`,"Restore window":`Pulihkan jendela`,"Maximize window":`Maksimalkan jendela`,Resize:`Ubah ukuran`,"Select all":`Pilih semua`,"Select row":`Pilih baris`,"Previous month":`Bulan sebelumnya`,"Next month":`Bulan berikutnya`,Dismiss:`Tutup`,Breadcrumb:`Jejak navigasi`,Cards:`Kartu`,"Copy code":`Salin kode`,Copied:`Disalin`,"Copied!":`Disalin!`,Copy:`Salin`,"Previous slide":`Slide sebelumnya`,"Next slide":`Slide berikutnya`,"Previous card":`Kartu sebelumnya`,"Next card":`Kartu berikutnya`,"Zoom out":`Perkecil`,"Zoom in":`Perbesar`,Rotate:`Putar`,Filter:`Filter`,"Expand all":`Bentangkan semua`,"Collapse all":`Ciutkan semua`,"Search...":`Cari...`,"Pick a date":`Pilih tanggal`,Select:`Pilih`,"Start typing...":`Mulai mengetik...`,Search:`Cari`,Decrease:`Kurangi`,Increase:`Tambah`,pagination:`paginasi`,"Go to previous page":`Ke halaman sebelumnya`,"Go to next page":`Ke halaman berikutnya`,Previous:`Sebelumnya`,Next:`Berikutnya`,"More pages":`Halaman lainnya`,Remove:`Hapus`,"Go back":`Kembali`,"Go forward":`Maju`,"Reload page":`Muat ulang halaman`,Share:`Bagikan`,"New tab":`Tab baru`,Menu:`Menu`,"Copy command":`Salin perintah`,"Terminal input":`Masukan terminal`,Seek:`Geser`,"Rewind 10 seconds":`Mundur 10 detik`,"Forward 10 seconds":`Maju 10 detik`,Volume:`Volume`,"Toggle captions":`Alihkan takarir`,"Playback speed":`Kecepatan pemutaran`,Quality:`Kualitas`,"Picture in picture":`Gambar dalam gambar`,Play:`Putar`,Pause:`Jeda`,Mute:`Bisukan`,Unmute:`Nyalakan suara`,"Exit fullscreen":`Keluar dari layar penuh`,"Enter fullscreen":`Layar penuh`,Expand:`Bentangkan`,Collapse:`Ciutkan`,"Copy reply":`Salin balasan`,"Good result":`Hasil baik`,"Bad result":`Hasil buruk`,"Dialog Close":`Tutup dialog`,Notifications:`Notifikasi`,Account:`Akun`,Cart:`Keranjang`,Call:`Panggilan`,"Video call":`Panggilan video`,Message:`Pesan`,Main:`Utama`,Columns:`Kolom`,"No results.":`Tidak ada hasil.`,"No results":`Tidak ada hasil`,"No results found":`Tidak ada hasil yang ditemukan`,"Drop files here":`Letakkan file di sini`,"Drag & drop files here":`Seret dan lepas file di sini`,"or click to browse (max {maxFiles} files, {maxSize}MB each)":`atau klik untuk menelusuri (maks. {maxFiles} file, masing-masing {maxSize} MB)`,"Remove {name}":`Hapus {name}`,"{selected} of {total} row(s) selected.":`{selected} dari {total} baris dipilih.`,"Try again":`Coba lagi`,"What’s up next?":`Selanjutnya apa?`,"Show password":`Tampilkan kata sandi`,"Hide password":`Sembunyikan kata sandi`,"Search icons":`Cari ikon`,"No icon matches":`Tidak ada ikon yang cocok`,"Show all items ({n})":`Tampilkan semua ({n})`,"Fewer {what}":`Lebih sedikit {what}`,"More {what}":`Lebih banyak {what}`,"No tasks available. Add tasks to display Gantt chart.":`Tidak ada tugas. Tambahkan tugas untuk menampilkan bagan Gantt.`,January:`Januari`,February:`Februari`,March:`Maret`,April:`April`,May:`Mei`,June:`Juni`,July:`Juli`,August:`Agustus`,September:`September`,October:`Oktober`,November:`November`,December:`Desember`,Su:`Mg`,Mo:`Sn`,Tu:`Sl`,We:`Rb`,Th:`Km`,Fr:`Jm`,Sa:`Sb`,"just now":`baru saja`,"in a moment":`sebentar lagi`,"in 1 minute":`dalam 1 menit`,"in {n} minutes":`dalam {n} menit`,"in 1 hour":`dalam 1 jam`,"in {n} hours":`dalam {n} jam`,tomorrow:`besok`,"in {n} days":`dalam {n} hari`,"in 1 week":`dalam 1 minggu`,"in {n} weeks":`dalam {n} minggu`,"in 1 month":`dalam 1 bulan`,"in {n} months":`dalam {n} bulan`,"in 1 year":`dalam 1 tahun`,"in {n} years":`dalam {n} tahun`,"1 minute ago":`1 menit yang lalu`,"{n} minutes ago":`{n} menit yang lalu`,"1 hour ago":`1 jam yang lalu`,"{n} hours ago":`{n} jam yang lalu`,"1 day ago":`1 hari yang lalu`,"{n} days ago":`{n} hari yang lalu`,"1 week ago":`1 minggu yang lalu`,"{n} weeks ago":`{n} minggu yang lalu`,"1 month ago":`1 bulan yang lalu`,"{n} months ago":`{n} bulan yang lalu`,"1 year ago":`1 tahun yang lalu`,"{n} years ago":`{n} tahun yang lalu`,"Cookie notice":`Pemberitahuan cookie`,"Cookie preferences":`Preferensi cookie`,"Close and use essential cookies only":`Tutup dan gunakan cookie penting saja`,Back:`Kembali`,"Log in":`Masuk`,"Search Hanzo or ask AI":`Cari di Hanzo atau tanya AI`,"Search models":`Cari model`,"Search branches…":`Cari cabang…`,"Search repositories…":`Cari repositori…`,"Show options":`Tampilkan opsi`,Retry:`Coba lagi`,"Donut chart":`Diagram donat`,"Find an organization":`Cari organisasi`,Organizations:`Organisasi`,"Organization name":`Nama organisasi`,"Previous page":`Halaman sebelumnya`,"Next page":`Halaman berikutnya`,"Continue with credits":`Lanjutkan dengan kredit`,"Try Hanzo":`Coba Hanzo`,"Terms & Policies":`Syarat dan kebijakan`,"Who this is for":`Untuk siapa`,"Bill yearly":`Tagihan tahunan`,Apps:`Aplikasi`,"Card actions":`Tindakan kartu`,"Assign to...":`Tetapkan ke...`,"Search cards...":`Cari kartu...`,"Clear search":`Hapus pencarian`,"Open files":`File terbuka`,"Close panel":`Tutup panel`,"Add an organization":`Tambah organisasi`,"Keyboard Shortcuts":`Pintasan keyboard`,"Run a command":`Jalankan perintah`,"Type shell command...":`Ketik perintah shell...`,"Attached to the next message":`Dilampirkan ke pesan berikutnya`,"Channel Member Roster":`Anggota kanal`,"Channel Collaborative Notes":`Catatan kolaboratif kanal`,"Code Diff Viewer":`Penampil diff kode`,"Live Voice Call":`Panggilan suara langsung`,"MCP Server Hub":`Hub server MCP`,"Multi-Agent Swarm Bar":`Bilah kawanan agen`,"Write shared channel notes, meeting agenda, or AI summaries...":`Tulis catatan kanal, agenda, atau ringkasan AI...`,"Help improve our AI models":`Bantu tingkatkan model AI kami`,"Your name":`Nama Anda`,"Your role":`Peran Anda`,"Country or region":`Negara atau wilayah`,"Card details":`Detail kartu`,"Agree to recurring charges":`Setuju dengan tagihan berulang`,"How you will use Hanzo":`Cara Anda memakai Hanzo`,"Team size":`Ukuran tim`,"I agree to the Terms of Service and Acceptable Use Policy and confirm that I am at least 18 years of age":`Saya menyetujui Ketentuan Layanan dan Kebijakan Penggunaan yang Dapat Diterima serta menyatakan berusia minimal 18 tahun.`,"Empty string":`String kosong`,"Empty array":`Array kosong`,"Empty object":`Objek kosong`,"Copy {what}":`Salin {what}`,"Ask anything":`Tanyakan apa saja`,Auto:`Otomatis`,Instant:`Instan`,Low:`Rendah`,Medium:`Sedang`,High:`Tinggi`,Max:`Maks`,Dictate:`Dikte`,"Dictating — click to stop":`Sedang mendikte — klik untuk berhenti`,"Dictation settings":`Pengaturan dikte`,Language:`Bahasa`,"No devices found":`Tidak ada perangkat`,"Microphone {n}":`Mikrofon {n}`,"Nothing matches":`Tidak ada yang cocok`,Commands:`Perintah`,"Search commands…":`Cari perintah…`,Agents:`Agen`,Skills:`Keterampilan`,Connectors:`Konektor`,"Design system":`Sistem desain`,Plugins:`Plugin`,Devices:`Perangkat`,Memory:`Memori`,Research:`Riset`,On:`Nyala`,"Upload or add files":`Unggah atau tambah file`,"Add files, agents, skills and more":`Tambah file, agen, keterampilan, dan lainnya`,"No agents yet":`Belum ada agen`,"No skills yet":`Belum ada keterampilan`,"No connectors yet":`Belum ada konektor`,"No design system yet":`Belum ada sistem desain`,"No plugins yet":`Belum ada plugin`,"No devices yet":`Belum ada perangkat`,"Search agents":`Cari agen`,"Search skills":`Cari keterampilan`,"Search connectors":`Cari konektor`,"Search design system":`Cari sistem desain`,"Search plugins":`Cari plugin`,"Search devices":`Cari perangkat`,"Reading agents":`Membaca agen`,"Reading skills":`Membaca keterampilan`,"Reading connectors":`Membaca konektor`,"Reading design system":`Membaca sistem desain`,"Reading plugins":`Membaca plugin`,"Adaptive reasoning based on task complexity":`Penalaran adaptif sesuai kompleksitas tugas`,"Answers right away, without thinking":`Langsung menjawab, tanpa berpikir`,"A quick pass with minimal thinking":`Lewatan cepat dengan sedikit penalaran`,"Thinks before answering":`Berpikir sebelum menjawab`,"Deep reasoning for complex problems":`Penalaran mendalam untuk masalah kompleks`,"Maximum compute and exhaustive verification":`Komputasi maksimum dan verifikasi menyeluruh`,Effort:`Upaya`,"Effort: {level}":`Upaya: {level}`,Mode:`Mode`,"Mode: {mode}":`Mode: {mode}`,Model:`Model`,"Model: {name}":`Model: {name}`,"Voice mode":`Mode suara`,"Hanzo is speaking — talk to interrupt":`Hanzo sedang berbicara — bicara untuk menyela`,"In conversation — click to hang up":`Sedang berbicara — klik untuk menutup`,"Go to testimonial {n}":`Ke testimoni {n}`,"Go to card {n}":`Ke kartu {n}`,"{n} of {total}":`{n} dari {total}`,"Reading…":`Membaca…`,Skill:`Keterampilan`,Plugin:`Plugin`},Xq={Close:`Chiudi`,"Close window":`Chiudi finestra`,"Minimize window":`Riduci a icona`,"Restore window":`Ripristina finestra`,"Maximize window":`Ingrandisci finestra`,Resize:`Ridimensiona`,"Select all":`Seleziona tutto`,"Select row":`Seleziona riga`,"Previous month":`Mese precedente`,"Next month":`Mese successivo`,Dismiss:`Chiudi`,Breadcrumb:`Percorso di navigazione`,Cards:`Schede`,"Copy code":`Copia codice`,Copied:`Copiato`,"Copied!":`Copiato!`,Copy:`Copia`,"Previous slide":`Diapositiva precedente`,"Next slide":`Diapositiva successiva`,"Previous card":`Scheda precedente`,"Next card":`Scheda successiva`,"Zoom out":`Riduci zoom`,"Zoom in":`Aumenta zoom`,Rotate:`Ruota`,Filter:`Filtra`,"Expand all":`Espandi tutto`,"Collapse all":`Comprimi tutto`,"Search...":`Cerca...`,"Pick a date":`Scegli una data`,Select:`Seleziona`,"Start typing...":`Inizia a scrivere...`,Search:`Cerca`,Decrease:`Diminuisci`,Increase:`Aumenta`,pagination:`paginazione`,"Go to previous page":`Vai alla pagina precedente`,"Go to next page":`Vai alla pagina successiva`,Previous:`Precedente`,Next:`Successivo`,"More pages":`Altre pagine`,Remove:`Rimuovi`,"Go back":`Indietro`,"Go forward":`Avanti`,"Reload page":`Ricarica pagina`,Share:`Condividi`,"New tab":`Nuova scheda`,Menu:`Menu`,"Copy command":`Copia comando`,"Terminal input":`Input del terminale`,Seek:`Posizione`,"Rewind 10 seconds":`Indietro di 10 secondi`,"Forward 10 seconds":`Avanti di 10 secondi`,Volume:`Volume`,"Toggle captions":`Attiva o disattiva i sottotitoli`,"Playback speed":`Velocità di riproduzione`,Quality:`Qualità`,"Picture in picture":`Picture in picture`,Play:`Riproduci`,Pause:`Pausa`,Mute:`Disattiva audio`,Unmute:`Attiva audio`,"Exit fullscreen":`Esci da schermo intero`,"Enter fullscreen":`Schermo intero`,Expand:`Espandi`,Collapse:`Comprimi`,"Copy reply":`Copia risposta`,"Good result":`Buon risultato`,"Bad result":`Risultato scarso`,"Dialog Close":`Chiudi finestra di dialogo`,Notifications:`Notifiche`,Account:`Account`,Cart:`Carrello`,Call:`Chiamata`,"Video call":`Videochiamata`,Message:`Messaggio`,Main:`Principale`,Columns:`Colonne`,"No results.":`Nessun risultato.`,"No results":`Nessun risultato`,"No results found":`Nessun risultato trovato`,"Drop files here":`Rilascia i file qui`,"Drag & drop files here":`Trascina i file qui`,"or click to browse (max {maxFiles} files, {maxSize}MB each)":`oppure fai clic per sfogliare (max {maxFiles} file, {maxSize} MB ciascuno)`,"Remove {name}":`Rimuovi {name}`,"{selected} of {total} row(s) selected.":`{selected} di {total} riga/righe selezionata/e.`,"Try again":`Riprova`,"What’s up next?":`Che cosa c’è dopo?`,"Show password":`Mostra password`,"Hide password":`Nascondi password`,"Search icons":`Cerca icone`,"No icon matches":`Nessuna icona corrisponde`,"Show all items ({n})":`Mostra tutti ({n})`,"Fewer {what}":`Meno {what}`,"More {what}":`Più {what}`,"No tasks available. Add tasks to display Gantt chart.":`Nessuna attività. Aggiungine per mostrare il diagramma di Gantt.`,January:`gennaio`,February:`febbraio`,March:`marzo`,April:`aprile`,May:`maggio`,June:`giugno`,July:`luglio`,August:`agosto`,September:`settembre`,October:`ottobre`,November:`novembre`,December:`dicembre`,Su:`do`,Mo:`lu`,Tu:`ma`,We:`me`,Th:`gi`,Fr:`ve`,Sa:`sa`,"just now":`proprio ora`,"in a moment":`tra un attimo`,"in 1 minute":`tra 1 minuto`,"in {n} minutes":`tra {n} minuti`,"in 1 hour":`tra 1 ora`,"in {n} hours":`tra {n} ore`,tomorrow:`domani`,"in {n} days":`tra {n} giorni`,"in 1 week":`tra 1 settimana`,"in {n} weeks":`tra {n} settimane`,"in 1 month":`tra 1 mese`,"in {n} months":`tra {n} mesi`,"in 1 year":`tra 1 anno`,"in {n} years":`tra {n} anni`,"1 minute ago":`1 minuto fa`,"{n} minutes ago":`{n} minuti fa`,"1 hour ago":`1 ora fa`,"{n} hours ago":`{n} ore fa`,"1 day ago":`1 giorno fa`,"{n} days ago":`{n} giorni fa`,"1 week ago":`1 settimana fa`,"{n} weeks ago":`{n} settimane fa`,"1 month ago":`1 mese fa`,"{n} months ago":`{n} mesi fa`,"1 year ago":`1 anno fa`,"{n} years ago":`{n} anni fa`,"Cookie notice":`Avviso sui cookie`,"Cookie preferences":`Preferenze cookie`,"Close and use essential cookies only":`Chiudi e usa solo i cookie essenziali`,Back:`Indietro`,"Log in":`Accedi`,"Search Hanzo or ask AI":`Cerca in Hanzo o chiedi all’IA`,"Search models":`Cerca modelli`,"Search branches…":`Cerca branch…`,"Search repositories…":`Cerca repository…`,"Show options":`Mostra opzioni`,Retry:`Riprova`,"Donut chart":`Grafico ad anello`,"Find an organization":`Trova un’organizzazione`,Organizations:`Organizzazioni`,"Organization name":`Nome dell’organizzazione`,"Previous page":`Pagina precedente`,"Next page":`Pagina successiva`,"Continue with credits":`Continua con i crediti`,"Try Hanzo":`Prova Hanzo`,"Terms & Policies":`Termini e politiche`,"Who this is for":`A chi è rivolto`,"Bill yearly":`Fatturazione annuale`,Apps:`App`,"Card actions":`Azioni della scheda`,"Assign to...":`Assegna a...`,"Search cards...":`Cerca schede...`,"Clear search":`Cancella ricerca`,"Open files":`File aperti`,"Close panel":`Chiudi pannello`,"Add an organization":`Aggiungi un’organizzazione`,"Keyboard Shortcuts":`Scorciatoie da tastiera`,"Run a command":`Esegui un comando`,"Type shell command...":`Digita un comando shell...`,"Attached to the next message":`Allegato al prossimo messaggio`,"Channel Member Roster":`Membri del canale`,"Channel Collaborative Notes":`Note collaborative del canale`,"Code Diff Viewer":`Visualizzatore diff`,"Live Voice Call":`Chiamata vocale dal vivo`,"MCP Server Hub":`Hub dei server MCP`,"Multi-Agent Swarm Bar":`Barra dello sciame di agenti`,"Write shared channel notes, meeting agenda, or AI summaries...":`Scrivi note condivise, l’ordine del giorno o riassunti dell’IA...`,"Help improve our AI models":`Aiuta a migliorare i nostri modelli di IA`,"Your name":`Il tuo nome`,"Your role":`Il tuo ruolo`,"Country or region":`Paese o area`,"Card details":`Dati della carta`,"Agree to recurring charges":`Accetto gli addebiti ricorrenti`,"How you will use Hanzo":`Come userai Hanzo`,"Team size":`Dimensione del team`,"I agree to the Terms of Service and Acceptable Use Policy and confirm that I am at least 18 years of age":`Accetto i Termini di servizio e la Politica di utilizzo accettabile e confermo di avere almeno 18 anni.`,"Empty string":`Stringa vuota`,"Empty array":`Array vuoto`,"Empty object":`Oggetto vuoto`,"Copy {what}":`Copia {what}`,"Ask anything":`Chiedi qualsiasi cosa`,Auto:`Auto`,Instant:`Istantaneo`,Low:`Basso`,Medium:`Medio`,High:`Alto`,Max:`Massimo`,Dictate:`Detta`,"Dictating — click to stop":`Dettatura in corso — fai clic per fermare`,"Dictation settings":`Impostazioni di dettatura`,Language:`Lingua`,"No devices found":`Nessun dispositivo trovato`,"Microphone {n}":`Microfono {n}`,"Nothing matches":`Nessuna corrispondenza`,Commands:`Comandi`,"Search commands…":`Cerca comandi…`,Agents:`Agenti`,Skills:`Competenze`,Connectors:`Connettori`,"Design system":`Sistema di design`,Plugins:`Plugin`,Devices:`Dispositivi`,Memory:`Memoria`,Research:`Ricerca`,On:`Attivo`,"Upload or add files":`Carica o aggiungi file`,"Add files, agents, skills and more":`Aggiungi file, agenti, competenze e altro`,"No agents yet":`Ancora nessun agente`,"No skills yet":`Ancora nessuna competenza`,"No connectors yet":`Ancora nessun connettore`,"No design system yet":`Ancora nessun sistema di design`,"No plugins yet":`Ancora nessun plugin`,"No devices yet":`Ancora nessun dispositivo`,"Search agents":`Cerca agenti`,"Search skills":`Cerca competenze`,"Search connectors":`Cerca connettori`,"Search design system":`Cerca nel sistema di design`,"Search plugins":`Cerca plugin`,"Search devices":`Cerca dispositivi`,"Reading agents":`Lettura degli agenti`,"Reading skills":`Lettura delle competenze`,"Reading connectors":`Lettura dei connettori`,"Reading design system":`Lettura del sistema di design`,"Reading plugins":`Lettura dei plugin`,"Adaptive reasoning based on task complexity":`Ragionamento adattivo in base alla complessità`,"Answers right away, without thinking":`Risponde subito, senza ragionare`,"A quick pass with minimal thinking":`Un passaggio rapido, con poco ragionamento`,"Thinks before answering":`Riflette prima di rispondere`,"Deep reasoning for complex problems":`Ragionamento profondo per problemi complessi`,"Maximum compute and exhaustive verification":`Calcolo massimo e verifica esaustiva`,Effort:`Sforzo`,"Effort: {level}":`Sforzo: {level}`,Mode:`Modalità`,"Mode: {mode}":`Modalità: {mode}`,Model:`Modello`,"Model: {name}":`Modello: {name}`,"Voice mode":`Modalità vocale`,"Hanzo is speaking — talk to interrupt":`Hanzo sta parlando — parla per interrompere`,"In conversation — click to hang up":`In conversazione — fai clic per riagganciare`,"Go to testimonial {n}":`Vai alla testimonianza {n}`,"Go to card {n}":`Vai alla scheda {n}`,"{n} of {total}":`{n} di {total}`,"Reading…":`Lettura…`,Skill:`Competenza`,Plugin:`Plugin`},Zq={Close:`閉じる`,"Close window":`ウィンドウを閉じる`,"Minimize window":`ウィンドウを最小化`,"Restore window":`ウィンドウを元に戻す`,"Maximize window":`ウィンドウを最大化`,Resize:`サイズ変更`,"Select all":`すべて選択`,"Select row":`行を選択`,"Previous month":`前の月`,"Next month":`次の月`,Dismiss:`閉じる`,Breadcrumb:`パンくずリスト`,Cards:`カード`,"Copy code":`コードをコピー`,Copied:`コピーしました`,"Copied!":`コピーしました`,Copy:`コピー`,"Previous slide":`前のスライド`,"Next slide":`次のスライド`,"Previous card":`前のカード`,"Next card":`次のカード`,"Zoom out":`縮小`,"Zoom in":`拡大`,Rotate:`回転`,Filter:`絞り込み`,"Expand all":`すべて展開`,"Collapse all":`すべて折りたたむ`,"Search...":`検索...`,"Pick a date":`日付を選択`,Select:`選択`,"Start typing...":`入力を開始...`,Search:`検索`,Decrease:`減らす`,Increase:`増やす`,pagination:`ページネーション`,"Go to previous page":`前のページへ`,"Go to next page":`次のページへ`,Previous:`前へ`,Next:`次へ`,"More pages":`その他のページ`,Remove:`削除`,"Go back":`戻る`,"Go forward":`進む`,"Reload page":`ページを再読み込み`,Share:`共有`,"New tab":`新しいタブ`,Menu:`メニュー`,"Copy command":`コマンドをコピー`,"Terminal input":`ターミナル入力`,Seek:`シーク`,"Rewind 10 seconds":`10秒戻る`,"Forward 10 seconds":`10秒進む`,Volume:`音量`,"Toggle captions":`字幕の切り替え`,"Playback speed":`再生速度`,Quality:`画質`,"Picture in picture":`ピクチャーインピクチャー`,Play:`再生`,Pause:`一時停止`,Mute:`ミュート`,Unmute:`ミュート解除`,"Exit fullscreen":`全画面を終了`,"Enter fullscreen":`全画面`,Expand:`展開`,Collapse:`折りたたむ`,"Copy reply":`返信をコピー`,"Good result":`良い結果`,"Bad result":`悪い結果`,"Dialog Close":`ダイアログを閉じる`,Notifications:`通知`,Account:`アカウント`,Cart:`カート`,Call:`通話`,"Video call":`ビデオ通話`,Message:`メッセージ`,Main:`メイン`,Columns:`列`,"No results.":`結果がありません。`,"No results":`結果なし`,"No results found":`結果が見つかりません`,"Drop files here":`ファイルをここにドロップ`,"Drag & drop files here":`ファイルをドラッグ&ドロップ`,"or click to browse (max {maxFiles} files, {maxSize}MB each)":`またはクリックして参照(最大 {maxFiles} ファイル、各 {maxSize} MB)`,"Remove {name}":`{name} を削除`,"{selected} of {total} row(s) selected.":`{total} 行中 {selected} 行を選択`,"Try again":`もう一度試す`,"What’s up next?":`次は何?`,"Show password":`パスワードを表示`,"Hide password":`パスワードを隠す`,"Search icons":`アイコンを検索`,"No icon matches":`一致するアイコンがありません`,"Show all items ({n})":`すべて表示 ({n})`,"Fewer {what}":`{what}を減らす`,"More {what}":`{what}を増やす`,"No tasks available. Add tasks to display Gantt chart.":`タスクがありません。ガントチャートを表示するにはタスクを追加してください。`,January:`1月`,February:`2月`,March:`3月`,April:`4月`,May:`5月`,June:`6月`,July:`7月`,August:`8月`,September:`9月`,October:`10月`,November:`11月`,December:`12月`,Su:`日`,Mo:`月`,Tu:`火`,We:`水`,Th:`木`,Fr:`金`,Sa:`土`,"just now":`たった今`,"in a moment":`まもなく`,"in 1 minute":`1分後`,"in {n} minutes":`{n}分後`,"in 1 hour":`1時間後`,"in {n} hours":`{n}時間後`,tomorrow:`明日`,"in {n} days":`{n}日後`,"in 1 week":`1週間後`,"in {n} weeks":`{n}週間後`,"in 1 month":`1か月後`,"in {n} months":`{n}か月後`,"in 1 year":`1年後`,"in {n} years":`{n}年後`,"1 minute ago":`1分前`,"{n} minutes ago":`{n}分前`,"1 hour ago":`1時間前`,"{n} hours ago":`{n}時間前`,"1 day ago":`1日前`,"{n} days ago":`{n}日前`,"1 week ago":`1週間前`,"{n} weeks ago":`{n}週間前`,"1 month ago":`1か月前`,"{n} months ago":`{n}か月前`,"1 year ago":`1年前`,"{n} years ago":`{n}年前`,"Cookie notice":`Cookie の通知`,"Cookie preferences":`Cookie の設定`,"Close and use essential cookies only":`閉じて必須 Cookie のみ使う`,Back:`戻る`,"Log in":`ログイン`,"Search Hanzo or ask AI":`Hanzo を検索するか AI に聞く`,"Search models":`モデルを検索`,"Search branches…":`ブランチを検索…`,"Search repositories…":`リポジトリを検索…`,"Show options":`オプションを表示`,Retry:`再試行`,"Donut chart":`ドーナツグラフ`,"Find an organization":`組織を探す`,Organizations:`組織`,"Organization name":`組織名`,"Previous page":`前のページ`,"Next page":`次のページ`,"Continue with credits":`クレジットで続ける`,"Try Hanzo":`Hanzo を試す`,"Terms & Policies":`規約とポリシー`,"Who this is for":`対象`,"Bill yearly":`年払い`,Apps:`アプリ`,"Card actions":`カードの操作`,"Assign to...":`割り当て先...`,"Search cards...":`カードを検索...`,"Clear search":`検索をクリア`,"Open files":`開いているファイル`,"Close panel":`パネルを閉じる`,"Add an organization":`組織を追加`,"Keyboard Shortcuts":`キーボードショートカット`,"Run a command":`コマンドを実行`,"Type shell command...":`シェルコマンドを入力...`,"Attached to the next message":`次のメッセージに添付`,"Channel Member Roster":`チャンネルのメンバー`,"Channel Collaborative Notes":`チャンネルの共同メモ`,"Code Diff Viewer":`差分ビューア`,"Live Voice Call":`ライブ音声通話`,"MCP Server Hub":`MCP サーバーハブ`,"Multi-Agent Swarm Bar":`マルチエージェントの群れバー`,"Write shared channel notes, meeting agenda, or AI summaries...":`共有メモ、議題、AI の要約を書く...`,"Help improve our AI models":`AI モデルの改善に協力する`,"Your name":`お名前`,"Your role":`あなたの役割`,"Country or region":`国または地域`,"Card details":`カード情報`,"Agree to recurring charges":`継続課金に同意する`,"How you will use Hanzo":`Hanzo の使い方`,"Team size":`チームの規模`,"I agree to the Terms of Service and Acceptable Use Policy and confirm that I am at least 18 years of age":`利用規約と許容される使用に関するポリシーに同意し、18歳以上であることを確認します。`,"Empty string":`空の文字列`,"Empty array":`空の配列`,"Empty object":`空のオブジェクト`,"Copy {what}":`{what}をコピー`,"Ask anything":`何でも聞いてください`,Auto:`自動`,Instant:`即答`,Low:`低`,Medium:`中`,High:`高`,Max:`最大`,Dictate:`音声入力`,"Dictating — click to stop":`音声入力中 — クリックで停止`,"Dictation settings":`音声入力の設定`,Language:`言語`,"No devices found":`デバイスが見つかりません`,"Microphone {n}":`マイク {n}`,"Nothing matches":`一致するものがありません`,Commands:`コマンド`,"Search commands…":`コマンドを検索…`,Agents:`エージェント`,Skills:`スキル`,Connectors:`コネクタ`,"Design system":`デザインシステム`,Plugins:`プラグイン`,Devices:`デバイス`,Memory:`メモリ`,Research:`リサーチ`,On:`オン`,"Upload or add files":`ファイルをアップロードまたは追加`,"Add files, agents, skills and more":`ファイル、エージェント、スキルなどを追加`,"No agents yet":`エージェントはまだありません`,"No skills yet":`スキルはまだありません`,"No connectors yet":`コネクタはまだありません`,"No design system yet":`デザインシステムはまだありません`,"No plugins yet":`プラグインはまだありません`,"No devices yet":`デバイスはまだありません`,"Search agents":`エージェントを検索`,"Search skills":`スキルを検索`,"Search connectors":`コネクタを検索`,"Search design system":`デザインシステムを検索`,"Search plugins":`プラグインを検索`,"Search devices":`デバイスを検索`,"Reading agents":`エージェントを読み込み中`,"Reading skills":`スキルを読み込み中`,"Reading connectors":`コネクタを読み込み中`,"Reading design system":`デザインシステムを読み込み中`,"Reading plugins":`プラグインを読み込み中`,"Adaptive reasoning based on task complexity":`タスクの複雑さに合わせた推論`,"Answers right away, without thinking":`考えずにすぐに答えます`,"A quick pass with minimal thinking":`最小限の思考による素早い処理`,"Thinks before answering":`答える前に考える`,"Deep reasoning for complex problems":`複雑な問題のための深い推論`,"Maximum compute and exhaustive verification":`最大の計算と徹底した検証`,Effort:`思考量`,"Effort: {level}":`思考量: {level}`,Mode:`モード`,"Mode: {mode}":`モード: {mode}`,Model:`モデル`,"Model: {name}":`モデル: {name}`,"Voice mode":`音声モード`,"Hanzo is speaking — talk to interrupt":`Hanzo が話しています — 話すと中断します`,"In conversation — click to hang up":`会話中 — クリックで終了`,"Go to testimonial {n}":`お客様の声 {n} へ`,"Go to card {n}":`カード {n} へ`,"{n} of {total}":`{n} / {total}`,"Reading…":`読み込み中…`,Skill:`スキル`,Plugin:`プラグイン`},Qq={Close:`닫기`,"Close window":`창 닫기`,"Minimize window":`창 최소화`,"Restore window":`창 복원`,"Maximize window":`창 최대화`,Resize:`크기 조절`,"Select all":`모두 선택`,"Select row":`행 선택`,"Previous month":`이전 달`,"Next month":`다음 달`,Dismiss:`닫기`,Breadcrumb:`이동 경로`,Cards:`카드`,"Copy code":`코드 복사`,Copied:`복사됨`,"Copied!":`복사됨!`,Copy:`복사`,"Previous slide":`이전 슬라이드`,"Next slide":`다음 슬라이드`,"Previous card":`이전 카드`,"Next card":`다음 카드`,"Zoom out":`축소`,"Zoom in":`확대`,Rotate:`회전`,Filter:`필터`,"Expand all":`모두 펼치기`,"Collapse all":`모두 접기`,"Search...":`검색...`,"Pick a date":`날짜 선택`,Select:`선택`,"Start typing...":`입력 시작...`,Search:`검색`,Decrease:`줄이기`,Increase:`늘리기`,pagination:`페이지 매김`,"Go to previous page":`이전 페이지로`,"Go to next page":`다음 페이지로`,Previous:`이전`,Next:`다음`,"More pages":`페이지 더보기`,Remove:`제거`,"Go back":`뒤로`,"Go forward":`앞으로`,"Reload page":`페이지 새로고침`,Share:`공유`,"New tab":`새 탭`,Menu:`메뉴`,"Copy command":`명령 복사`,"Terminal input":`터미널 입력`,Seek:`탐색`,"Rewind 10 seconds":`10초 되감기`,"Forward 10 seconds":`10초 빨리감기`,Volume:`음량`,"Toggle captions":`자막 전환`,"Playback speed":`재생 속도`,Quality:`화질`,"Picture in picture":`화면 속 화면`,Play:`재생`,Pause:`일시정지`,Mute:`음소거`,Unmute:`음소거 해제`,"Exit fullscreen":`전체 화면 종료`,"Enter fullscreen":`전체 화면`,Expand:`펼치기`,Collapse:`접기`,"Copy reply":`답변 복사`,"Good result":`좋은 결과`,"Bad result":`나쁜 결과`,"Dialog Close":`대화상자 닫기`,Notifications:`알림`,Account:`계정`,Cart:`장바구니`,Call:`통화`,"Video call":`영상 통화`,Message:`메시지`,Main:`기본`,Columns:`열`,"No results.":`결과가 없습니다.`,"No results":`결과 없음`,"No results found":`결과를 찾을 수 없습니다`,"Drop files here":`파일을 여기에 놓으세요`,"Drag & drop files here":`파일을 끌어다 놓으세요`,"or click to browse (max {maxFiles} files, {maxSize}MB each)":`또는 클릭하여 찾아보기 (최대 {maxFiles}개 파일, 각 {maxSize}MB)`,"Remove {name}":`{name} 제거`,"{selected} of {total} row(s) selected.":`{total}개 중 {selected}개 행 선택됨`,"Try again":`다시 시도`,"What’s up next?":`다음은 무엇인가요?`,"Show password":`비밀번호 표시`,"Hide password":`비밀번호 숨기기`,"Search icons":`아이콘 검색`,"No icon matches":`일치하는 아이콘 없음`,"Show all items ({n})":`모두 보기 ({n})`,"Fewer {what}":`{what} 줄이기`,"More {what}":`{what} 늘리기`,"No tasks available. Add tasks to display Gantt chart.":`작업이 없습니다. 간트 차트를 보려면 작업을 추가하세요.`,January:`1월`,February:`2월`,March:`3월`,April:`4월`,May:`5월`,June:`6월`,July:`7월`,August:`8월`,September:`9월`,October:`10월`,November:`11월`,December:`12월`,Su:`일`,Mo:`월`,Tu:`화`,We:`수`,Th:`목`,Fr:`금`,Sa:`토`,"just now":`방금`,"in a moment":`곧`,"in 1 minute":`1분 후`,"in {n} minutes":`{n}분 후`,"in 1 hour":`1시간 후`,"in {n} hours":`{n}시간 후`,tomorrow:`내일`,"in {n} days":`{n}일 후`,"in 1 week":`1주 후`,"in {n} weeks":`{n}주 후`,"in 1 month":`1개월 후`,"in {n} months":`{n}개월 후`,"in 1 year":`1년 후`,"in {n} years":`{n}년 후`,"1 minute ago":`1분 전`,"{n} minutes ago":`{n}분 전`,"1 hour ago":`1시간 전`,"{n} hours ago":`{n}시간 전`,"1 day ago":`1일 전`,"{n} days ago":`{n}일 전`,"1 week ago":`1주 전`,"{n} weeks ago":`{n}주 전`,"1 month ago":`1개월 전`,"{n} months ago":`{n}개월 전`,"1 year ago":`1년 전`,"{n} years ago":`{n}년 전`,"Cookie notice":`쿠키 안내`,"Cookie preferences":`쿠키 설정`,"Close and use essential cookies only":`닫고 필수 쿠키만 사용`,Back:`뒤로`,"Log in":`로그인`,"Search Hanzo or ask AI":`Hanzo 검색 또는 AI에게 질문`,"Search models":`모델 검색`,"Search branches…":`브랜치 검색…`,"Search repositories…":`저장소 검색…`,"Show options":`옵션 표시`,Retry:`다시 시도`,"Donut chart":`도넛 차트`,"Find an organization":`조직 찾기`,Organizations:`조직`,"Organization name":`조직 이름`,"Previous page":`이전 페이지`,"Next page":`다음 페이지`,"Continue with credits":`크레딧으로 계속`,"Try Hanzo":`Hanzo 체험`,"Terms & Policies":`약관 및 정책`,"Who this is for":`대상`,"Bill yearly":`연간 결제`,Apps:`앱`,"Card actions":`카드 작업`,"Assign to...":`할당 대상...`,"Search cards...":`카드 검색...`,"Clear search":`검색어 지우기`,"Open files":`열린 파일`,"Close panel":`패널 닫기`,"Add an organization":`조직 추가`,"Keyboard Shortcuts":`키보드 단축키`,"Run a command":`명령 실행`,"Type shell command...":`셸 명령 입력...`,"Attached to the next message":`다음 메시지에 첨부됨`,"Channel Member Roster":`채널 구성원`,"Channel Collaborative Notes":`채널 공동 메모`,"Code Diff Viewer":`코드 차이 보기`,"Live Voice Call":`실시간 음성 통화`,"MCP Server Hub":`MCP 서버 허브`,"Multi-Agent Swarm Bar":`다중 에이전트 군집 막대`,"Write shared channel notes, meeting agenda, or AI summaries...":`공유 메모, 안건 또는 AI 요약을 작성...`,"Help improve our AI models":`AI 모델 개선에 참여`,"Your name":`이름`,"Your role":`역할`,"Country or region":`국가 또는 지역`,"Card details":`카드 정보`,"Agree to recurring charges":`정기 결제에 동의`,"How you will use Hanzo":`Hanzo 사용 방식`,"Team size":`팀 규모`,"I agree to the Terms of Service and Acceptable Use Policy and confirm that I am at least 18 years of age":`서비스 약관과 허용 사용 정책에 동의하며 만 18세 이상임을 확인합니다.`,"Empty string":`빈 문자열`,"Empty array":`빈 배열`,"Empty object":`빈 객체`,"Copy {what}":`{what} 복사`,"Ask anything":`무엇이든 물어보세요`,Auto:`자동`,Instant:`즉시`,Low:`낮음`,Medium:`중간`,High:`높음`,Max:`최대`,Dictate:`받아쓰기`,"Dictating — click to stop":`받아쓰는 중 — 클릭하여 중지`,"Dictation settings":`받아쓰기 설정`,Language:`언어`,"No devices found":`기기를 찾을 수 없습니다`,"Microphone {n}":`마이크 {n}`,"Nothing matches":`일치하는 항목 없음`,Commands:`명령`,"Search commands…":`명령 검색…`,Agents:`에이전트`,Skills:`스킬`,Connectors:`커넥터`,"Design system":`디자인 시스템`,Plugins:`플러그인`,Devices:`기기`,Memory:`메모리`,Research:`리서치`,On:`켜짐`,"Upload or add files":`파일 업로드 또는 추가`,"Add files, agents, skills and more":`파일, 에이전트, 스킬 등 추가`,"No agents yet":`아직 에이전트가 없습니다`,"No skills yet":`아직 스킬이 없습니다`,"No connectors yet":`아직 커넥터가 없습니다`,"No design system yet":`아직 디자인 시스템이 없습니다`,"No plugins yet":`아직 플러그인이 없습니다`,"No devices yet":`아직 기기가 없습니다`,"Search agents":`에이전트 검색`,"Search skills":`스킬 검색`,"Search connectors":`커넥터 검색`,"Search design system":`디자인 시스템 검색`,"Search plugins":`플러그인 검색`,"Search devices":`기기 검색`,"Reading agents":`에이전트 읽는 중`,"Reading skills":`스킬 읽는 중`,"Reading connectors":`커넥터 읽는 중`,"Reading design system":`디자인 시스템 읽는 중`,"Reading plugins":`플러그인 읽는 중`,"Adaptive reasoning based on task complexity":`작업 복잡도에 맞춘 추론`,"Answers right away, without thinking":`생각하지 않고 바로 답합니다`,"A quick pass with minimal thinking":`최소한의 사고로 빠르게`,"Thinks before answering":`답하기 전에 생각`,"Deep reasoning for complex problems":`복잡한 문제를 위한 깊은 추론`,"Maximum compute and exhaustive verification":`최대 연산과 철저한 검증`,Effort:`노력`,"Effort: {level}":`노력: {level}`,Mode:`모드`,"Mode: {mode}":`모드: {mode}`,Model:`모델`,"Model: {name}":`모델: {name}`,"Voice mode":`음성 모드`,"Hanzo is speaking — talk to interrupt":`Hanzo가 말하는 중 — 말하면 중단`,"In conversation — click to hang up":`대화 중 — 클릭하여 종료`,"Go to testimonial {n}":`후기 {n}(으)로`,"Go to card {n}":`카드 {n}(으)로`,"{n} of {total}":`{n} / {total}`,"Reading…":`읽는 중…`,Skill:`스킬`,Plugin:`플러그인`},$q={Close:`Fechar`,"Close window":`Fechar janela`,"Minimize window":`Minimizar janela`,"Restore window":`Restaurar janela`,"Maximize window":`Maximizar janela`,Resize:`Redimensionar`,"Select all":`Selecionar tudo`,"Select row":`Selecionar linha`,"Previous month":`Mês anterior`,"Next month":`Próximo mês`,Dismiss:`Dispensar`,Breadcrumb:`Trilha de navegação`,Cards:`Cartões`,"Copy code":`Copiar código`,Copied:`Copiado`,"Copied!":`Copiado!`,Copy:`Copiar`,"Previous slide":`Slide anterior`,"Next slide":`Próximo slide`,"Previous card":`Cartão anterior`,"Next card":`Próximo cartão`,"Zoom out":`Diminuir zoom`,"Zoom in":`Aumentar zoom`,Rotate:`Girar`,Filter:`Filtrar`,"Expand all":`Expandir tudo`,"Collapse all":`Recolher tudo`,"Search...":`Pesquisar...`,"Pick a date":`Escolha uma data`,Select:`Selecionar`,"Start typing...":`Comece a digitar...`,Search:`Pesquisar`,Decrease:`Diminuir`,Increase:`Aumentar`,pagination:`paginação`,"Go to previous page":`Ir para a página anterior`,"Go to next page":`Ir para a próxima página`,Previous:`Anterior`,Next:`Próximo`,"More pages":`Mais páginas`,Remove:`Remover`,"Go back":`Voltar`,"Go forward":`Avançar`,"Reload page":`Recarregar página`,Share:`Compartilhar`,"New tab":`Nova aba`,Menu:`Menu`,"Copy command":`Copiar comando`,"Terminal input":`Entrada do terminal`,Seek:`Posição`,"Rewind 10 seconds":`Retroceder 10 segundos`,"Forward 10 seconds":`Avançar 10 segundos`,Volume:`Volume`,"Toggle captions":`Alternar legendas`,"Playback speed":`Velocidade de reprodução`,Quality:`Qualidade`,"Picture in picture":`Picture in picture`,Play:`Reproduzir`,Pause:`Pausar`,Mute:`Silenciar`,Unmute:`Ativar som`,"Exit fullscreen":`Sair da tela cheia`,"Enter fullscreen":`Tela cheia`,Expand:`Expandir`,Collapse:`Recolher`,"Copy reply":`Copiar resposta`,"Good result":`Bom resultado`,"Bad result":`Resultado ruim`,"Dialog Close":`Fechar diálogo`,Notifications:`Notificações`,Account:`Conta`,Cart:`Carrinho`,Call:`Chamada`,"Video call":`Chamada de vídeo`,Message:`Mensagem`,Main:`Principal`,Columns:`Colunas`,"No results.":`Nenhum resultado.`,"No results":`Nenhum resultado`,"No results found":`Nenhum resultado encontrado`,"Drop files here":`Solte os arquivos aqui`,"Drag & drop files here":`Arraste e solte arquivos aqui`,"or click to browse (max {maxFiles} files, {maxSize}MB each)":`ou clique para procurar (máx. {maxFiles} arquivos, {maxSize} MB cada)`,"Remove {name}":`Remover {name}`,"{selected} of {total} row(s) selected.":`{selected} de {total} linha(s) selecionada(s).`,"Try again":`Tentar novamente`,"What’s up next?":`O que vem agora?`,"Show password":`Mostrar senha`,"Hide password":`Ocultar senha`,"Search icons":`Pesquisar ícones`,"No icon matches":`Nenhum ícone corresponde`,"Show all items ({n})":`Mostrar todos ({n})`,"Fewer {what}":`Menos {what}`,"More {what}":`Mais {what}`,"No tasks available. Add tasks to display Gantt chart.":`Nenhuma tarefa. Adicione tarefas para exibir o gráfico de Gantt.`,January:`janeiro`,February:`fevereiro`,March:`março`,April:`abril`,May:`maio`,June:`junho`,July:`julho`,August:`agosto`,September:`setembro`,October:`outubro`,November:`novembro`,December:`dezembro`,Su:`do`,Mo:`se`,Tu:`te`,We:`qa`,Th:`qi`,Fr:`sx`,Sa:`sá`,"just now":`agora mesmo`,"in a moment":`em instantes`,"in 1 minute":`em 1 minuto`,"in {n} minutes":`em {n} minutos`,"in 1 hour":`em 1 hora`,"in {n} hours":`em {n} horas`,tomorrow:`amanhã`,"in {n} days":`em {n} dias`,"in 1 week":`em 1 semana`,"in {n} weeks":`em {n} semanas`,"in 1 month":`em 1 mês`,"in {n} months":`em {n} meses`,"in 1 year":`em 1 ano`,"in {n} years":`em {n} anos`,"1 minute ago":`há 1 minuto`,"{n} minutes ago":`há {n} minutos`,"1 hour ago":`há 1 hora`,"{n} hours ago":`há {n} horas`,"1 day ago":`há 1 dia`,"{n} days ago":`há {n} dias`,"1 week ago":`há 1 semana`,"{n} weeks ago":`há {n} semanas`,"1 month ago":`há 1 mês`,"{n} months ago":`há {n} meses`,"1 year ago":`há 1 ano`,"{n} years ago":`há {n} anos`,"Cookie notice":`Aviso de cookies`,"Cookie preferences":`Preferências de cookies`,"Close and use essential cookies only":`Fechar e usar apenas cookies essenciais`,Back:`Voltar`,"Log in":`Entrar`,"Search Hanzo or ask AI":`Pesquise na Hanzo ou pergunte à IA`,"Search models":`Pesquisar modelos`,"Search branches…":`Pesquisar branches…`,"Search repositories…":`Pesquisar repositórios…`,"Show options":`Mostrar opções`,Retry:`Tentar novamente`,"Donut chart":`Gráfico de rosca`,"Find an organization":`Encontrar uma organização`,Organizations:`Organizações`,"Organization name":`Nome da organização`,"Previous page":`Página anterior`,"Next page":`Próxima página`,"Continue with credits":`Continuar com créditos`,"Try Hanzo":`Experimentar a Hanzo`,"Terms & Policies":`Termos e políticas`,"Who this is for":`Para quem é`,"Bill yearly":`Cobrança anual`,Apps:`Aplicativos`,"Card actions":`Ações do cartão`,"Assign to...":`Atribuir a...`,"Search cards...":`Pesquisar cartões...`,"Clear search":`Limpar pesquisa`,"Open files":`Arquivos abertos`,"Close panel":`Fechar painel`,"Add an organization":`Adicionar uma organização`,"Keyboard Shortcuts":`Atalhos de teclado`,"Run a command":`Executar um comando`,"Type shell command...":`Digite um comando de shell...`,"Attached to the next message":`Anexado à próxima mensagem`,"Channel Member Roster":`Membros do canal`,"Channel Collaborative Notes":`Notas colaborativas do canal`,"Code Diff Viewer":`Visualizador de diff`,"Live Voice Call":`Chamada de voz ao vivo`,"MCP Server Hub":`Hub de servidores MCP`,"Multi-Agent Swarm Bar":`Barra do enxame de agentes`,"Write shared channel notes, meeting agenda, or AI summaries...":`Escreva notas do canal, a pauta ou resumos da IA...`,"Help improve our AI models":`Ajude a melhorar nossos modelos de IA`,"Your name":`Seu nome`,"Your role":`Seu papel`,"Country or region":`País ou região`,"Card details":`Dados do cartão`,"Agree to recurring charges":`Concordo com cobranças recorrentes`,"How you will use Hanzo":`Como você usará a Hanzo`,"Team size":`Tamanho da equipe`,"I agree to the Terms of Service and Acceptable Use Policy and confirm that I am at least 18 years of age":`Concordo com os Termos de Serviço e a Política de Uso Aceitável e confirmo que tenho pelo menos 18 anos.`,"Empty string":`Texto vazio`,"Empty array":`Array vazio`,"Empty object":`Objeto vazio`,"Copy {what}":`Copiar {what}`,"Ask anything":`Pergunte qualquer coisa`,Auto:`Auto`,Instant:`Instantâneo`,Low:`Baixo`,Medium:`Médio`,High:`Alto`,Max:`Máximo`,Dictate:`Ditar`,"Dictating — click to stop":`Ditando — clique para parar`,"Dictation settings":`Configurações de ditado`,Language:`Idioma`,"No devices found":`Nenhum dispositivo encontrado`,"Microphone {n}":`Microfone {n}`,"Nothing matches":`Nada corresponde`,Commands:`Comandos`,"Search commands…":`Pesquisar comandos…`,Agents:`Agentes`,Skills:`Habilidades`,Connectors:`Conectores`,"Design system":`Sistema de design`,Plugins:`Plugins`,Devices:`Dispositivos`,Memory:`Memória`,Research:`Pesquisa`,On:`Ativado`,"Upload or add files":`Enviar ou adicionar arquivos`,"Add files, agents, skills and more":`Adicione arquivos, agentes, habilidades e mais`,"No agents yet":`Ainda não há agentes`,"No skills yet":`Ainda não há habilidades`,"No connectors yet":`Ainda não há conectores`,"No design system yet":`Ainda não há sistema de design`,"No plugins yet":`Ainda não há plugins`,"No devices yet":`Ainda não há dispositivos`,"Search agents":`Pesquisar agentes`,"Search skills":`Pesquisar habilidades`,"Search connectors":`Pesquisar conectores`,"Search design system":`Pesquisar no sistema de design`,"Search plugins":`Pesquisar plugins`,"Search devices":`Pesquisar dispositivos`,"Reading agents":`Lendo agentes`,"Reading skills":`Lendo habilidades`,"Reading connectors":`Lendo conectores`,"Reading design system":`Lendo o sistema de design`,"Reading plugins":`Lendo plugins`,"Adaptive reasoning based on task complexity":`Raciocínio adaptativo conforme a complexidade da tarefa`,"Answers right away, without thinking":`Responde na hora, sem pensar`,"A quick pass with minimal thinking":`Uma passada rápida, com pouco raciocínio`,"Thinks before answering":`Pensa antes de responder`,"Deep reasoning for complex problems":`Raciocínio profundo para problemas complexos`,"Maximum compute and exhaustive verification":`Computação máxima e verificação exaustiva`,Effort:`Esforço`,"Effort: {level}":`Esforço: {level}`,Mode:`Modo`,"Mode: {mode}":`Modo: {mode}`,Model:`Modelo`,"Model: {name}":`Modelo: {name}`,"Voice mode":`Modo de voz`,"Hanzo is speaking — talk to interrupt":`A Hanzo está falando — fale para interromper`,"In conversation — click to hang up":`Em conversa — clique para desligar`,"Go to testimonial {n}":`Ir para o depoimento {n}`,"Go to card {n}":`Ir para o cartão {n}`,"{n} of {total}":`{n} de {total}`,"Reading…":`Lendo…`,Skill:`Habilidade`,Plugin:`Plugin`},eJ={Close:`Закрыть`,"Close window":`Закрыть окно`,"Minimize window":`Свернуть окно`,"Restore window":`Восстановить окно`,"Maximize window":`Развернуть окно`,Resize:`Изменить размер`,"Select all":`Выбрать все`,"Select row":`Выбрать строку`,"Previous month":`Предыдущий месяц`,"Next month":`Следующий месяц`,Dismiss:`Закрыть`,Breadcrumb:`Навигационная цепочка`,Cards:`Карточки`,"Copy code":`Копировать код`,Copied:`Скопировано`,"Copied!":`Скопировано!`,Copy:`Копировать`,"Previous slide":`Предыдущий слайд`,"Next slide":`Следующий слайд`,"Previous card":`Предыдущая карточка`,"Next card":`Следующая карточка`,"Zoom out":`Уменьшить`,"Zoom in":`Увеличить`,Rotate:`Повернуть`,Filter:`Фильтр`,"Expand all":`Развернуть все`,"Collapse all":`Свернуть все`,"Search...":`Поиск...`,"Pick a date":`Выберите дату`,Select:`Выбрать`,"Start typing...":`Начните вводить...`,Search:`Поиск`,Decrease:`Уменьшить`,Increase:`Увеличить`,pagination:`постраничная навигация`,"Go to previous page":`К предыдущей странице`,"Go to next page":`К следующей странице`,Previous:`Назад`,Next:`Далее`,"More pages":`Ещё страницы`,Remove:`Удалить`,"Go back":`Назад`,"Go forward":`Вперёд`,"Reload page":`Обновить страницу`,Share:`Поделиться`,"New tab":`Новая вкладка`,Menu:`Меню`,"Copy command":`Копировать команду`,"Terminal input":`Ввод в терминале`,Seek:`Позиция`,"Rewind 10 seconds":`Назад на 10 секунд`,"Forward 10 seconds":`Вперёд на 10 секунд`,Volume:`Громкость`,"Toggle captions":`Субтитры`,"Playback speed":`Скорость воспроизведения`,Quality:`Качество`,"Picture in picture":`Картинка в картинке`,Play:`Воспроизвести`,Pause:`Пауза`,Mute:`Выключить звук`,Unmute:`Включить звук`,"Exit fullscreen":`Выйти из полноэкранного режима`,"Enter fullscreen":`Полный экран`,Expand:`Развернуть`,Collapse:`Свернуть`,"Copy reply":`Копировать ответ`,"Good result":`Хороший результат`,"Bad result":`Плохой результат`,"Dialog Close":`Закрыть диалог`,Notifications:`Уведомления`,Account:`Аккаунт`,Cart:`Корзина`,Call:`Звонок`,"Video call":`Видеозвонок`,Message:`Сообщение`,Main:`Основное`,Columns:`Столбцы`,"No results.":`Ничего не найдено.`,"No results":`Ничего не найдено`,"No results found":`Ничего не найдено`,"Drop files here":`Перетащите файлы сюда`,"Drag & drop files here":`Перетащите файлы сюда`,"or click to browse (max {maxFiles} files, {maxSize}MB each)":`или нажмите, чтобы выбрать (не более {maxFiles} файлов, по {maxSize} МБ)`,"Remove {name}":`Удалить {name}`,"{selected} of {total} row(s) selected.":`Выбрано {selected} из {total}.`,"Try again":`Повторить`,"What’s up next?":`Что дальше?`,"Show password":`Показать пароль`,"Hide password":`Скрыть пароль`,"Search icons":`Поиск значков`,"No icon matches":`Нет подходящих значков`,"Show all items ({n})":`Показать все ({n})`,"Fewer {what}":`Меньше: {what}`,"More {what}":`Больше: {what}`,"No tasks available. Add tasks to display Gantt chart.":`Нет задач. Добавьте их, чтобы показать диаграмму Ганта.`,January:`январь`,February:`февраль`,March:`март`,April:`апрель`,May:`май`,June:`июнь`,July:`июль`,August:`август`,September:`сентябрь`,October:`октябрь`,November:`ноябрь`,December:`декабрь`,Su:`вс`,Mo:`пн`,Tu:`вт`,We:`ср`,Th:`чт`,Fr:`пт`,Sa:`сб`,"just now":`только что`,"in a moment":`через мгновение`,"in 1 minute":`через 1 минуту`,"in {n} minutes":`через {n} мин.`,"in 1 hour":`через 1 час`,"in {n} hours":`через {n} ч.`,tomorrow:`завтра`,"in {n} days":`через {n} дн.`,"in 1 week":`через 1 неделю`,"in {n} weeks":`через {n} нед.`,"in 1 month":`через 1 месяц`,"in {n} months":`через {n} мес.`,"in 1 year":`через 1 год`,"in {n} years":`через {n} г.`,"1 minute ago":`1 минуту назад`,"{n} minutes ago":`{n} мин. назад`,"1 hour ago":`1 час назад`,"{n} hours ago":`{n} ч. назад`,"1 day ago":`1 день назад`,"{n} days ago":`{n} дн. назад`,"1 week ago":`1 неделю назад`,"{n} weeks ago":`{n} нед. назад`,"1 month ago":`1 месяц назад`,"{n} months ago":`{n} мес. назад`,"1 year ago":`1 год назад`,"{n} years ago":`{n} г. назад`,"Cookie notice":`Уведомление о cookie`,"Cookie preferences":`Настройки cookie`,"Close and use essential cookies only":`Закрыть и оставить только необходимые cookie`,Back:`Назад`,"Log in":`Войти`,"Search Hanzo or ask AI":`Искать в Hanzo или спросить ИИ`,"Search models":`Поиск моделей`,"Search branches…":`Поиск веток…`,"Search repositories…":`Поиск репозиториев…`,"Show options":`Показать параметры`,Retry:`Повторить`,"Donut chart":`Кольцевая диаграмма`,"Find an organization":`Найти организацию`,Organizations:`Организации`,"Organization name":`Название организации`,"Previous page":`Предыдущая страница`,"Next page":`Следующая страница`,"Continue with credits":`Продолжить за счёт кредитов`,"Try Hanzo":`Попробовать Hanzo`,"Terms & Policies":`Условия и политики`,"Who this is for":`Для кого это`,"Bill yearly":`Оплата за год`,Apps:`Приложения`,"Card actions":`Действия с карточкой`,"Assign to...":`Назначить...`,"Search cards...":`Поиск карточек...`,"Clear search":`Очистить поиск`,"Open files":`Открытые файлы`,"Close panel":`Закрыть панель`,"Add an organization":`Добавить организацию`,"Keyboard Shortcuts":`Сочетания клавиш`,"Run a command":`Выполнить команду`,"Type shell command...":`Введите команду оболочки...`,"Attached to the next message":`Прикреплено к следующему сообщению`,"Channel Member Roster":`Участники канала`,"Channel Collaborative Notes":`Общие заметки канала`,"Code Diff Viewer":`Просмотр различий`,"Live Voice Call":`Голосовой звонок`,"MCP Server Hub":`Хаб серверов MCP`,"Multi-Agent Swarm Bar":`Панель роя агентов`,"Write shared channel notes, meeting agenda, or AI summaries...":`Пишите общие заметки, повестку или сводки ИИ...`,"Help improve our AI models":`Помогите улучшить наши модели ИИ`,"Your name":`Ваше имя`,"Your role":`Ваша роль`,"Country or region":`Страна или регион`,"Card details":`Данные карты`,"Agree to recurring charges":`Согласие на регулярные списания`,"How you will use Hanzo":`Как вы будете использовать Hanzo`,"Team size":`Размер команды`,"I agree to the Terms of Service and Acceptable Use Policy and confirm that I am at least 18 years of age":`Я принимаю Условия обслуживания и Политику допустимого использования и подтверждаю, что мне исполнилось 18 лет.`,"Empty string":`Пустая строка`,"Empty array":`Пустой массив`,"Empty object":`Пустой объект`,"Copy {what}":`Копировать {what}`,"Ask anything":`Спросите что угодно`,Auto:`Авто`,Instant:`Мгновенно`,Low:`Низкий`,Medium:`Средний`,High:`Высокий`,Max:`Максимум`,Dictate:`Диктовка`,"Dictating — click to stop":`Идёт диктовка — нажмите, чтобы остановить`,"Dictation settings":`Настройки диктовки`,Language:`Язык`,"No devices found":`Устройства не найдены`,"Microphone {n}":`Микрофон {n}`,"Nothing matches":`Ничего не найдено`,Commands:`Команды`,"Search commands…":`Поиск команд…`,Agents:`Агенты`,Skills:`Навыки`,Connectors:`Коннекторы`,"Design system":`Дизайн-система`,Plugins:`Плагины`,Devices:`Устройства`,Memory:`Память`,Research:`Исследование`,On:`Вкл.`,"Upload or add files":`Загрузить или добавить файлы`,"Add files, agents, skills and more":`Добавьте файлы, агентов, навыки и другое`,"No agents yet":`Агентов пока нет`,"No skills yet":`Навыков пока нет`,"No connectors yet":`Коннекторов пока нет`,"No design system yet":`Дизайн-системы пока нет`,"No plugins yet":`Плагинов пока нет`,"No devices yet":`Устройств пока нет`,"Search agents":`Поиск агентов`,"Search skills":`Поиск навыков`,"Search connectors":`Поиск коннекторов`,"Search design system":`Поиск в дизайн-системе`,"Search plugins":`Поиск плагинов`,"Search devices":`Поиск устройств`,"Reading agents":`Чтение агентов`,"Reading skills":`Чтение навыков`,"Reading connectors":`Чтение коннекторов`,"Reading design system":`Чтение дизайн-системы`,"Reading plugins":`Чтение плагинов`,"Adaptive reasoning based on task complexity":`Адаптивное рассуждение по сложности задачи`,"Answers right away, without thinking":`Отвечает сразу, без размышлений`,"A quick pass with minimal thinking":`Быстрый проход с минимумом размышлений`,"Thinks before answering":`Думает перед ответом`,"Deep reasoning for complex problems":`Глубокое рассуждение для сложных задач`,"Maximum compute and exhaustive verification":`Максимум вычислений и полная проверка`,Effort:`Усилие`,"Effort: {level}":`Усилие: {level}`,Mode:`Режим`,"Mode: {mode}":`Режим: {mode}`,Model:`Модель`,"Model: {name}":`Модель: {name}`,"Voice mode":`Голосовой режим`,"Hanzo is speaking — talk to interrupt":`Hanzo говорит — говорите, чтобы прервать`,"In conversation — click to hang up":`Разговор — нажмите, чтобы завершить`,"Go to testimonial {n}":`К отзыву {n}`,"Go to card {n}":`К карточке {n}`,"{n} of {total}":`{n} из {total}`,"Reading…":`Чтение…`,Skill:`Навык`,Plugin:`Плагин`},tJ={Close:`ปิด`,"Close window":`ปิดหน้าต่าง`,"Minimize window":`ย่อหน้าต่าง`,"Restore window":`คืนค่าหน้าต่าง`,"Maximize window":`ขยายหน้าต่าง`,Resize:`ปรับขนาด`,"Select all":`เลือกทั้งหมด`,"Select row":`เลือกแถว`,"Previous month":`เดือนก่อน`,"Next month":`เดือนถัดไป`,Dismiss:`ปิด`,Breadcrumb:`เส้นทางนำทาง`,Cards:`การ์ด`,"Copy code":`คัดลอกโค้ด`,Copied:`คัดลอกแล้ว`,"Copied!":`คัดลอกแล้ว!`,Copy:`คัดลอก`,"Previous slide":`สไลด์ก่อนหน้า`,"Next slide":`สไลด์ถัดไป`,"Previous card":`การ์ดก่อนหน้า`,"Next card":`การ์ดถัดไป`,"Zoom out":`ซูมออก`,"Zoom in":`ซูมเข้า`,Rotate:`หมุน`,Filter:`กรอง`,"Expand all":`ขยายทั้งหมด`,"Collapse all":`ยุบทั้งหมด`,"Search...":`ค้นหา...`,"Pick a date":`เลือกวันที่`,Select:`เลือก`,"Start typing...":`เริ่มพิมพ์...`,Search:`ค้นหา`,Decrease:`ลด`,Increase:`เพิ่ม`,pagination:`การแบ่งหน้า`,"Go to previous page":`ไปหน้าก่อนหน้า`,"Go to next page":`ไปหน้าถัดไป`,Previous:`ก่อนหน้า`,Next:`ถัดไป`,"More pages":`หน้าเพิ่มเติม`,Remove:`นำออก`,"Go back":`ย้อนกลับ`,"Go forward":`ไปข้างหน้า`,"Reload page":`โหลดหน้าใหม่`,Share:`แชร์`,"New tab":`แท็บใหม่`,Menu:`เมนู`,"Copy command":`คัดลอกคำสั่ง`,"Terminal input":`ช่องพิมพ์เทอร์มินัล`,Seek:`เลื่อนตำแหน่ง`,"Rewind 10 seconds":`ย้อน 10 วินาที`,"Forward 10 seconds":`ไปข้างหน้า 10 วินาที`,Volume:`ระดับเสียง`,"Toggle captions":`เปิดหรือปิดคำบรรยาย`,"Playback speed":`ความเร็วเล่น`,Quality:`คุณภาพ`,"Picture in picture":`ภาพซ้อนภาพ`,Play:`เล่น`,Pause:`หยุดชั่วคราว`,Mute:`ปิดเสียง`,Unmute:`เปิดเสียง`,"Exit fullscreen":`ออกจากเต็มหน้าจอ`,"Enter fullscreen":`เต็มหน้าจอ`,Expand:`ขยาย`,Collapse:`ยุบ`,"Copy reply":`คัดลอกคำตอบ`,"Good result":`ผลลัพธ์ดี`,"Bad result":`ผลลัพธ์ไม่ดี`,"Dialog Close":`ปิดกล่องโต้ตอบ`,Notifications:`การแจ้งเตือน`,Account:`บัญชี`,Cart:`ตะกร้า`,Call:`โทร`,"Video call":`วิดีโอคอล`,Message:`ข้อความ`,Main:`หลัก`,Columns:`คอลัมน์`,"No results.":`ไม่มีผลลัพธ์`,"No results":`ไม่มีผลลัพธ์`,"No results found":`ไม่พบผลลัพธ์`,"Drop files here":`วางไฟล์ที่นี่`,"Drag & drop files here":`ลากแล้ววางไฟล์ที่นี่`,"or click to browse (max {maxFiles} files, {maxSize}MB each)":`หรือคลิกเพื่อเลือก (สูงสุด {maxFiles} ไฟล์ ไฟล์ละ {maxSize} MB)`,"Remove {name}":`นำ {name} ออก`,"{selected} of {total} row(s) selected.":`เลือกแล้ว {selected} จาก {total} แถว`,"Try again":`ลองอีกครั้ง`,"What’s up next?":`ต่อไปคืออะไร`,"Show password":`แสดงรหัสผ่าน`,"Hide password":`ซ่อนรหัสผ่าน`,"Search icons":`ค้นหาไอคอน`,"No icon matches":`ไม่มีไอคอนที่ตรงกัน`,"Show all items ({n})":`แสดงทั้งหมด ({n})`,"Fewer {what}":`ลด {what}`,"More {what}":`เพิ่ม {what}`,"No tasks available. Add tasks to display Gantt chart.":`ยังไม่มีงาน เพิ่มงานเพื่อแสดงแผนภูมิ Gantt`,January:`มกราคม`,February:`กุมภาพันธ์`,March:`มีนาคม`,April:`เมษายน`,May:`พฤษภาคม`,June:`มิถุนายน`,July:`กรกฎาคม`,August:`สิงหาคม`,September:`กันยายน`,October:`ตุลาคม`,November:`พฤศจิกายน`,December:`ธันวาคม`,Su:`อา`,Mo:`จ`,Tu:`อ`,We:`พ`,Th:`พฤ`,Fr:`ศ`,Sa:`ส`,"just now":`เมื่อสักครู่`,"in a moment":`อีกครู่`,"in 1 minute":`ใน 1 นาที`,"in {n} minutes":`ใน {n} นาที`,"in 1 hour":`ใน 1 ชั่วโมง`,"in {n} hours":`ใน {n} ชั่วโมง`,tomorrow:`พรุ่งนี้`,"in {n} days":`ใน {n} วัน`,"in 1 week":`ใน 1 สัปดาห์`,"in {n} weeks":`ใน {n} สัปดาห์`,"in 1 month":`ใน 1 เดือน`,"in {n} months":`ใน {n} เดือน`,"in 1 year":`ใน 1 ปี`,"in {n} years":`ใน {n} ปี`,"1 minute ago":`1 นาทีที่แล้ว`,"{n} minutes ago":`{n} นาทีที่แล้ว`,"1 hour ago":`1 ชั่วโมงที่แล้ว`,"{n} hours ago":`{n} ชั่วโมงที่แล้ว`,"1 day ago":`1 วันที่แล้ว`,"{n} days ago":`{n} วันที่แล้ว`,"1 week ago":`1 สัปดาห์ที่แล้ว`,"{n} weeks ago":`{n} สัปดาห์ที่แล้ว`,"1 month ago":`1 เดือนที่แล้ว`,"{n} months ago":`{n} เดือนที่แล้ว`,"1 year ago":`1 ปีที่แล้ว`,"{n} years ago":`{n} ปีที่แล้ว`,"Cookie notice":`ประกาศคุกกี้`,"Cookie preferences":`การตั้งค่าคุกกี้`,"Close and use essential cookies only":`ปิดและใช้เฉพาะคุกกี้ที่จำเป็น`,Back:`กลับ`,"Log in":`เข้าสู่ระบบ`,"Search Hanzo or ask AI":`ค้นหาใน Hanzo หรือถาม AI`,"Search models":`ค้นหาโมเดล`,"Search branches…":`ค้นหาแบรนช์…`,"Search repositories…":`ค้นหาที่เก็บ…`,"Show options":`แสดงตัวเลือก`,Retry:`ลองใหม่`,"Donut chart":`แผนภูมิโดนัท`,"Find an organization":`ค้นหาองค์กร`,Organizations:`องค์กร`,"Organization name":`ชื่อองค์กร`,"Previous page":`หน้าก่อนหน้า`,"Next page":`หน้าถัดไป`,"Continue with credits":`ใช้เครดิตต่อไป`,"Try Hanzo":`ลองใช้ Hanzo`,"Terms & Policies":`ข้อกำหนดและนโยบาย`,"Who this is for":`เหมาะกับใคร`,"Bill yearly":`คิดเงินรายปี`,Apps:`แอป`,"Card actions":`การทำงานของการ์ด`,"Assign to...":`มอบหมายให้...`,"Search cards...":`ค้นหาการ์ด...`,"Clear search":`ล้างการค้นหา`,"Open files":`ไฟล์ที่เปิดอยู่`,"Close panel":`ปิดแผง`,"Add an organization":`เพิ่มองค์กร`,"Keyboard Shortcuts":`แป้นพิมพ์ลัด`,"Run a command":`เรียกใช้คำสั่ง`,"Type shell command...":`พิมพ์คำสั่งเชลล์...`,"Attached to the next message":`แนบกับข้อความถัดไป`,"Channel Member Roster":`สมาชิกช่อง`,"Channel Collaborative Notes":`บันทึกร่วมของช่อง`,"Code Diff Viewer":`ตัวดูส่วนต่างโค้ด`,"Live Voice Call":`สายเสียงสด`,"MCP Server Hub":`ฮับเซิร์ฟเวอร์ MCP`,"Multi-Agent Swarm Bar":`แถบฝูงเอเจนต์`,"Write shared channel notes, meeting agenda, or AI summaries...":`เขียนบันทึกช่อง วาระประชุม หรือสรุปจาก AI...`,"Help improve our AI models":`ช่วยปรับปรุงโมเดล AI ของเรา`,"Your name":`ชื่อของคุณ`,"Your role":`บทบาทของคุณ`,"Country or region":`ประเทศหรือภูมิภาค`,"Card details":`รายละเอียดบัตร`,"Agree to recurring charges":`ยอมรับการเรียกเก็บซ้ำ`,"How you will use Hanzo":`คุณจะใช้ Hanzo อย่างไร`,"Team size":`ขนาดทีม`,"I agree to the Terms of Service and Acceptable Use Policy and confirm that I am at least 18 years of age":`ฉันยอมรับข้อกำหนดการให้บริการและนโยบายการใช้งานที่ยอมรับได้ และยืนยันว่าฉันมีอายุอย่างน้อย 18 ปี`,"Empty string":`สตริงว่าง`,"Empty array":`อาร์เรย์ว่าง`,"Empty object":`อ็อบเจกต์ว่าง`,"Copy {what}":`คัดลอก {what}`,"Ask anything":`ถามอะไรก็ได้`,Auto:`อัตโนมัติ`,Instant:`ทันที`,Low:`ต่ำ`,Medium:`ปานกลาง`,High:`สูง`,Max:`สูงสุด`,Dictate:`สั่งด้วยเสียง`,"Dictating — click to stop":`กำลังสั่งด้วยเสียง — คลิกเพื่อหยุด`,"Dictation settings":`การตั้งค่าการสั่งด้วยเสียง`,Language:`ภาษา`,"No devices found":`ไม่พบอุปกรณ์`,"Microphone {n}":`ไมโครโฟน {n}`,"Nothing matches":`ไม่มีรายการที่ตรงกัน`,Commands:`คำสั่ง`,"Search commands…":`ค้นหาคำสั่ง…`,Agents:`เอเจนต์`,Skills:`ทักษะ`,Connectors:`ตัวเชื่อม`,"Design system":`ระบบดีไซน์`,Plugins:`ปลั๊กอิน`,Devices:`อุปกรณ์`,Memory:`ความจำ`,Research:`ค้นคว้า`,On:`เปิด`,"Upload or add files":`อัปโหลดหรือเพิ่มไฟล์`,"Add files, agents, skills and more":`เพิ่มไฟล์ เอเจนต์ ทักษะ และอื่นๆ`,"No agents yet":`ยังไม่มีเอเจนต์`,"No skills yet":`ยังไม่มีทักษะ`,"No connectors yet":`ยังไม่มีตัวเชื่อม`,"No design system yet":`ยังไม่มีระบบดีไซน์`,"No plugins yet":`ยังไม่มีปลั๊กอิน`,"No devices yet":`ยังไม่มีอุปกรณ์`,"Search agents":`ค้นหาเอเจนต์`,"Search skills":`ค้นหาทักษะ`,"Search connectors":`ค้นหาตัวเชื่อม`,"Search design system":`ค้นหาระบบดีไซน์`,"Search plugins":`ค้นหาปลั๊กอิน`,"Search devices":`ค้นหาอุปกรณ์`,"Reading agents":`กำลังอ่านเอเจนต์`,"Reading skills":`กำลังอ่านทักษะ`,"Reading connectors":`กำลังอ่านตัวเชื่อม`,"Reading design system":`กำลังอ่านระบบดีไซน์`,"Reading plugins":`กำลังอ่านปลั๊กอิน`,"Adaptive reasoning based on task complexity":`การใช้เหตุผลตามความซับซ้อนของงาน`,"Answers right away, without thinking":`ตอบทันทีโดยไม่ต้องคิด`,"A quick pass with minimal thinking":`ผ่านอย่างรวดเร็วโดยคิดน้อย`,"Thinks before answering":`คิดก่อนตอบ`,"Deep reasoning for complex problems":`การใช้เหตุผลเชิงลึกสำหรับปัญหาซับซ้อน`,"Maximum compute and exhaustive verification":`การคำนวณสูงสุดและการตรวจอย่างละเอียด`,Effort:`ระดับความพยายาม`,"Effort: {level}":`ระดับความพยายาม: {level}`,Mode:`โหมด`,"Mode: {mode}":`โหมด: {mode}`,Model:`โมเดล`,"Model: {name}":`โมเดล: {name}`,"Voice mode":`โหมดเสียง`,"Hanzo is speaking — talk to interrupt":`Hanzo กำลังพูด — พูดเพื่อขัดจังหวะ`,"In conversation — click to hang up":`กำลังสนทนา — คลิกเพื่อวางสาย`,"Go to testimonial {n}":`ไปยังคำรับรอง {n}`,"Go to card {n}":`ไปยังการ์ด {n}`,"{n} of {total}":`{n} จาก {total}`,"Reading…":`กำลังอ่าน…`,Skill:`ทักษะ`,Plugin:`ปลั๊กอิน`},nJ={Close:`Kapat`,"Close window":`Pencereyi kapat`,"Minimize window":`Pencereyi küçült`,"Restore window":`Pencereyi geri yükle`,"Maximize window":`Pencereyi büyüt`,Resize:`Yeniden boyutlandır`,"Select all":`Tümünü seç`,"Select row":`Satırı seç`,"Previous month":`Önceki ay`,"Next month":`Sonraki ay`,Dismiss:`Kapat`,Breadcrumb:`Gezinti yolu`,Cards:`Kartlar`,"Copy code":`Kodu kopyala`,Copied:`Kopyalandı`,"Copied!":`Kopyalandı!`,Copy:`Kopyala`,"Previous slide":`Önceki slayt`,"Next slide":`Sonraki slayt`,"Previous card":`Önceki kart`,"Next card":`Sonraki kart`,"Zoom out":`Uzaklaştır`,"Zoom in":`Yakınlaştır`,Rotate:`Döndür`,Filter:`Filtrele`,"Expand all":`Tümünü genişlet`,"Collapse all":`Tümünü daralt`,"Search...":`Ara...`,"Pick a date":`Tarih seçin`,Select:`Seç`,"Start typing...":`Yazmaya başlayın...`,Search:`Ara`,Decrease:`Azalt`,Increase:`Artır`,pagination:`sayfalama`,"Go to previous page":`Önceki sayfaya git`,"Go to next page":`Sonraki sayfaya git`,Previous:`Önceki`,Next:`Sonraki`,"More pages":`Diğer sayfalar`,Remove:`Kaldır`,"Go back":`Geri`,"Go forward":`İleri`,"Reload page":`Sayfayı yenile`,Share:`Paylaş`,"New tab":`Yeni sekme`,Menu:`Menü`,"Copy command":`Komutu kopyala`,"Terminal input":`Terminal girişi`,Seek:`Konum`,"Rewind 10 seconds":`10 saniye geri`,"Forward 10 seconds":`10 saniye ileri`,Volume:`Ses`,"Toggle captions":`Altyazıları aç veya kapat`,"Playback speed":`Oynatma hızı`,Quality:`Kalite`,"Picture in picture":`Resim içinde resim`,Play:`Oynat`,Pause:`Duraklat`,Mute:`Sessize al`,Unmute:`Sesi aç`,"Exit fullscreen":`Tam ekrandan çık`,"Enter fullscreen":`Tam ekran`,Expand:`Genişlet`,Collapse:`Daralt`,"Copy reply":`Yanıtı kopyala`,"Good result":`İyi sonuç`,"Bad result":`Kötü sonuç`,"Dialog Close":`İletişim kutusunu kapat`,Notifications:`Bildirimler`,Account:`Hesap`,Cart:`Sepet`,Call:`Arama`,"Video call":`Görüntülü arama`,Message:`Mesaj`,Main:`Ana`,Columns:`Sütunlar`,"No results.":`Sonuç yok.`,"No results":`Sonuç yok`,"No results found":`Sonuç bulunamadı`,"Drop files here":`Dosyaları buraya bırakın`,"Drag & drop files here":`Dosyaları sürükleyip bırakın`,"or click to browse (max {maxFiles} files, {maxSize}MB each)":`veya göz atmak için tıklayın (en fazla {maxFiles} dosya, her biri {maxSize} MB)`,"Remove {name}":`{name} öğesini kaldır`,"{selected} of {total} row(s) selected.":`{total} satırdan {selected} tanesi seçili.`,"Try again":`Yeniden dene`,"What’s up next?":`Sırada ne var?`,"Show password":`Şifreyi göster`,"Hide password":`Şifreyi gizle`,"Search icons":`Simge ara`,"No icon matches":`Eşleşen simge yok`,"Show all items ({n})":`Tümünü göster ({n})`,"Fewer {what}":`Daha az {what}`,"More {what}":`Daha fazla {what}`,"No tasks available. Add tasks to display Gantt chart.":`Görev yok. Gantt grafiğini görmek için görev ekleyin.`,January:`Ocak`,February:`Şubat`,March:`Mart`,April:`Nisan`,May:`Mayıs`,June:`Haziran`,July:`Temmuz`,August:`Ağustos`,September:`Eylül`,October:`Ekim`,November:`Kasım`,December:`Aralık`,Su:`Pz`,Mo:`Pt`,Tu:`Sa`,We:`Ça`,Th:`Pe`,Fr:`Cu`,Sa:`Ct`,"just now":`şimdi`,"in a moment":`birazdan`,"in 1 minute":`1 dakika içinde`,"in {n} minutes":`{n} dakika içinde`,"in 1 hour":`1 saat içinde`,"in {n} hours":`{n} saat içinde`,tomorrow:`yarın`,"in {n} days":`{n} gün içinde`,"in 1 week":`1 hafta içinde`,"in {n} weeks":`{n} hafta içinde`,"in 1 month":`1 ay içinde`,"in {n} months":`{n} ay içinde`,"in 1 year":`1 yıl içinde`,"in {n} years":`{n} yıl içinde`,"1 minute ago":`1 dakika önce`,"{n} minutes ago":`{n} dakika önce`,"1 hour ago":`1 saat önce`,"{n} hours ago":`{n} saat önce`,"1 day ago":`1 gün önce`,"{n} days ago":`{n} gün önce`,"1 week ago":`1 hafta önce`,"{n} weeks ago":`{n} hafta önce`,"1 month ago":`1 ay önce`,"{n} months ago":`{n} ay önce`,"1 year ago":`1 yıl önce`,"{n} years ago":`{n} yıl önce`,"Cookie notice":`Çerez bildirimi`,"Cookie preferences":`Çerez tercihleri`,"Close and use essential cookies only":`Kapat ve yalnızca zorunlu çerezleri kullan`,Back:`Geri`,"Log in":`Giriş yap`,"Search Hanzo or ask AI":`Hanzo’da ara veya yapay zekâya sor`,"Search models":`Model ara`,"Search branches…":`Dalları ara…`,"Search repositories…":`Depoları ara…`,"Show options":`Seçenekleri göster`,Retry:`Yeniden dene`,"Donut chart":`Halka grafik`,"Find an organization":`Kuruluş bul`,Organizations:`Kuruluşlar`,"Organization name":`Kuruluş adı`,"Previous page":`Önceki sayfa`,"Next page":`Sonraki sayfa`,"Continue with credits":`Kredilerle devam et`,"Try Hanzo":`Hanzo’yu dene`,"Terms & Policies":`Koşullar ve politikalar`,"Who this is for":`Kimler için`,"Bill yearly":`Yıllık faturalandır`,Apps:`Uygulamalar`,"Card actions":`Kart işlemleri`,"Assign to...":`Ata...`,"Search cards...":`Kart ara...`,"Clear search":`Aramayı temizle`,"Open files":`Açık dosyalar`,"Close panel":`Paneli kapat`,"Add an organization":`Kuruluş ekle`,"Keyboard Shortcuts":`Klavye kısayolları`,"Run a command":`Komut çalıştır`,"Type shell command...":`Kabuk komutu yazın...`,"Attached to the next message":`Sonraki iletiye eklendi`,"Channel Member Roster":`Kanal üyeleri`,"Channel Collaborative Notes":`Kanalın ortak notları`,"Code Diff Viewer":`Fark görüntüleyici`,"Live Voice Call":`Canlı sesli arama`,"MCP Server Hub":`MCP sunucu merkezi`,"Multi-Agent Swarm Bar":`Çoklu aracı çubuğu`,"Write shared channel notes, meeting agenda, or AI summaries...":`Paylaşılan kanal notları, gündem veya yapay zekâ özetleri yazın...`,"Help improve our AI models":`Yapay zekâ modellerimizi geliştirmeye yardım edin`,"Your name":`Adınız`,"Your role":`Rolünüz`,"Country or region":`Ülke veya bölge`,"Card details":`Kart bilgileri`,"Agree to recurring charges":`Yinelenen ücretleri kabul et`,"How you will use Hanzo":`Hanzo’yu nasıl kullanacağınız`,"Team size":`Ekip büyüklüğü`,"I agree to the Terms of Service and Acceptable Use Policy and confirm that I am at least 18 years of age":`Hizmet Şartlarını ve Kabul Edilebilir Kullanım Politikasını kabul ediyor ve en az 18 yaşında olduğumu onaylıyorum.`,"Empty string":`Boş dize`,"Empty array":`Boş dizi`,"Empty object":`Boş nesne`,"Copy {what}":`{what} kopyala`,"Ask anything":`Her şeyi sorun`,Auto:`Otomatik`,Instant:`Anında`,Low:`Düşük`,Medium:`Orta`,High:`Yüksek`,Max:`Maksimum`,Dictate:`Dikte`,"Dictating — click to stop":`Dikte ediliyor — durdurmak için tıklayın`,"Dictation settings":`Dikte ayarları`,Language:`Dil`,"No devices found":`Aygıt bulunamadı`,"Microphone {n}":`Mikrofon {n}`,"Nothing matches":`Eşleşme yok`,Commands:`Komutlar`,"Search commands…":`Komut ara…`,Agents:`Aracılar`,Skills:`Beceriler`,Connectors:`Bağlayıcılar`,"Design system":`Tasarım sistemi`,Plugins:`Eklentiler`,Devices:`Aygıtlar`,Memory:`Bellek`,Research:`Araştırma`,On:`Açık`,"Upload or add files":`Dosya yükle veya ekle`,"Add files, agents, skills and more":`Dosya, aracı, beceri ve daha fazlasını ekle`,"No agents yet":`Henüz aracı yok`,"No skills yet":`Henüz beceri yok`,"No connectors yet":`Henüz bağlayıcı yok`,"No design system yet":`Henüz tasarım sistemi yok`,"No plugins yet":`Henüz eklenti yok`,"No devices yet":`Henüz aygıt yok`,"Search agents":`Aracı ara`,"Search skills":`Beceri ara`,"Search connectors":`Bağlayıcı ara`,"Search design system":`Tasarım sisteminde ara`,"Search plugins":`Eklenti ara`,"Search devices":`Aygıt ara`,"Reading agents":`Aracılar okunuyor`,"Reading skills":`Beceriler okunuyor`,"Reading connectors":`Bağlayıcılar okunuyor`,"Reading design system":`Tasarım sistemi okunuyor`,"Reading plugins":`Eklentiler okunuyor`,"Adaptive reasoning based on task complexity":`Görevin karmaşıklığına göre uyarlanabilir akıl yürütme`,"Answers right away, without thinking":`Düşünmeden hemen yanıt verir`,"A quick pass with minimal thinking":`Az düşünerek hızlı bir geçiş`,"Thinks before answering":`Yanıtlamadan önce düşünür`,"Deep reasoning for complex problems":`Karmaşık sorunlar için derin akıl yürütme`,"Maximum compute and exhaustive verification":`En yüksek hesap ve kapsamlı doğrulama`,Effort:`Çaba`,"Effort: {level}":`Çaba: {level}`,Mode:`Mod`,"Mode: {mode}":`Mod: {mode}`,Model:`Model`,"Model: {name}":`Model: {name}`,"Voice mode":`Ses modu`,"Hanzo is speaking — talk to interrupt":`Hanzo konuşuyor — kesmek için konuşun`,"In conversation — click to hang up":`Görüşmede — kapatmak için tıklayın`,"Go to testimonial {n}":`{n}. görüşe git`,"Go to card {n}":`{n}. karta git`,"{n} of {total}":`{n} / {total}`,"Reading…":`Okunuyor…`,Skill:`Beceri`,Plugin:`Eklenti`},rJ={Close:`Đóng`,"Close window":`Đóng cửa sổ`,"Minimize window":`Thu nhỏ cửa sổ`,"Restore window":`Khôi phục cửa sổ`,"Maximize window":`Phóng to cửa sổ`,Resize:`Đổi kích thước`,"Select all":`Chọn tất cả`,"Select row":`Chọn hàng`,"Previous month":`Tháng trước`,"Next month":`Tháng sau`,Dismiss:`Bỏ qua`,Breadcrumb:`Đường dẫn`,Cards:`Thẻ`,"Copy code":`Sao chép mã`,Copied:`Đã sao chép`,"Copied!":`Đã sao chép!`,Copy:`Sao chép`,"Previous slide":`Trang trước`,"Next slide":`Trang sau`,"Previous card":`Thẻ trước`,"Next card":`Thẻ sau`,"Zoom out":`Thu nhỏ`,"Zoom in":`Phóng to`,Rotate:`Xoay`,Filter:`Lọc`,"Expand all":`Mở rộng tất cả`,"Collapse all":`Thu gọn tất cả`,"Search...":`Tìm kiếm...`,"Pick a date":`Chọn ngày`,Select:`Chọn`,"Start typing...":`Bắt đầu nhập...`,Search:`Tìm kiếm`,Decrease:`Giảm`,Increase:`Tăng`,pagination:`phân trang`,"Go to previous page":`Đến trang trước`,"Go to next page":`Đến trang sau`,Previous:`Trước`,Next:`Tiếp`,"More pages":`Thêm trang`,Remove:`Xóa`,"Go back":`Quay lại`,"Go forward":`Tiến`,"Reload page":`Tải lại trang`,Share:`Chia sẻ`,"New tab":`Tab mới`,Menu:`Menu`,"Copy command":`Sao chép lệnh`,"Terminal input":`Nhập lệnh`,Seek:`Tua`,"Rewind 10 seconds":`Tua lại 10 giây`,"Forward 10 seconds":`Tua đi 10 giây`,Volume:`Âm lượng`,"Toggle captions":`Bật hoặc tắt phụ đề`,"Playback speed":`Tốc độ phát`,Quality:`Chất lượng`,"Picture in picture":`Hình trong hình`,Play:`Phát`,Pause:`Tạm dừng`,Mute:`Tắt tiếng`,Unmute:`Bật tiếng`,"Exit fullscreen":`Thoát toàn màn hình`,"Enter fullscreen":`Toàn màn hình`,Expand:`Mở rộng`,Collapse:`Thu gọn`,"Copy reply":`Sao chép câu trả lời`,"Good result":`Kết quả tốt`,"Bad result":`Kết quả kém`,"Dialog Close":`Đóng hộp thoại`,Notifications:`Thông báo`,Account:`Tài khoản`,Cart:`Giỏ hàng`,Call:`Cuộc gọi`,"Video call":`Cuộc gọi video`,Message:`Tin nhắn`,Main:`Chính`,Columns:`Cột`,"No results.":`Không có kết quả.`,"No results":`Không có kết quả`,"No results found":`Không tìm thấy kết quả`,"Drop files here":`Thả tệp vào đây`,"Drag & drop files here":`Kéo và thả tệp vào đây`,"or click to browse (max {maxFiles} files, {maxSize}MB each)":`hoặc bấm để duyệt (tối đa {maxFiles} tệp, mỗi tệp {maxSize} MB)`,"Remove {name}":`Xóa {name}`,"{selected} of {total} row(s) selected.":`Đã chọn {selected} / {total} hàng.`,"Try again":`Thử lại`,"What’s up next?":`Tiếp theo là gì?`,"Show password":`Hiện mật khẩu`,"Hide password":`Ẩn mật khẩu`,"Search icons":`Tìm biểu tượng`,"No icon matches":`Không có biểu tượng khớp`,"Show all items ({n})":`Hiện tất cả ({n})`,"Fewer {what}":`Ít {what} hơn`,"More {what}":`Thêm {what}`,"No tasks available. Add tasks to display Gantt chart.":`Chưa có công việc. Thêm công việc để hiện biểu đồ Gantt.`,January:`tháng 1`,February:`tháng 2`,March:`tháng 3`,April:`tháng 4`,May:`tháng 5`,June:`tháng 6`,July:`tháng 7`,August:`tháng 8`,September:`tháng 9`,October:`tháng 10`,November:`tháng 11`,December:`tháng 12`,Su:`CN`,Mo:`T2`,Tu:`T3`,We:`T4`,Th:`T5`,Fr:`T6`,Sa:`T7`,"just now":`vừa xong`,"in a moment":`chốc nữa`,"in 1 minute":`sau 1 phút`,"in {n} minutes":`sau {n} phút`,"in 1 hour":`sau 1 giờ`,"in {n} hours":`sau {n} giờ`,tomorrow:`ngày mai`,"in {n} days":`sau {n} ngày`,"in 1 week":`sau 1 tuần`,"in {n} weeks":`sau {n} tuần`,"in 1 month":`sau 1 tháng`,"in {n} months":`sau {n} tháng`,"in 1 year":`sau 1 năm`,"in {n} years":`sau {n} năm`,"1 minute ago":`1 phút trước`,"{n} minutes ago":`{n} phút trước`,"1 hour ago":`1 giờ trước`,"{n} hours ago":`{n} giờ trước`,"1 day ago":`1 ngày trước`,"{n} days ago":`{n} ngày trước`,"1 week ago":`1 tuần trước`,"{n} weeks ago":`{n} tuần trước`,"1 month ago":`1 tháng trước`,"{n} months ago":`{n} tháng trước`,"1 year ago":`1 năm trước`,"{n} years ago":`{n} năm trước`,"Cookie notice":`Thông báo cookie`,"Cookie preferences":`Tùy chọn cookie`,"Close and use essential cookies only":`Đóng và chỉ dùng cookie thiết yếu`,Back:`Quay lại`,"Log in":`Đăng nhập`,"Search Hanzo or ask AI":`Tìm trong Hanzo hoặc hỏi AI`,"Search models":`Tìm mô hình`,"Search branches…":`Tìm nhánh…`,"Search repositories…":`Tìm kho…`,"Show options":`Hiện tùy chọn`,Retry:`Thử lại`,"Donut chart":`Biểu đồ vành khuyên`,"Find an organization":`Tìm tổ chức`,Organizations:`Tổ chức`,"Organization name":`Tên tổ chức`,"Previous page":`Trang trước`,"Next page":`Trang sau`,"Continue with credits":`Tiếp tục bằng tín dụng`,"Try Hanzo":`Dùng thử Hanzo`,"Terms & Policies":`Điều khoản và chính sách`,"Who this is for":`Dành cho ai`,"Bill yearly":`Thanh toán theo năm`,Apps:`Ứng dụng`,"Card actions":`Thao tác thẻ`,"Assign to...":`Gán cho...`,"Search cards...":`Tìm thẻ...`,"Clear search":`Xóa tìm kiếm`,"Open files":`Tệp đang mở`,"Close panel":`Đóng bảng`,"Add an organization":`Thêm tổ chức`,"Keyboard Shortcuts":`Phím tắt`,"Run a command":`Chạy lệnh`,"Type shell command...":`Nhập lệnh shell...`,"Attached to the next message":`Đính kèm tin nhắn tiếp theo`,"Channel Member Roster":`Thành viên kênh`,"Channel Collaborative Notes":`Ghi chú cộng tác của kênh`,"Code Diff Viewer":`Trình xem khác biệt mã`,"Live Voice Call":`Cuộc gọi thoại trực tiếp`,"MCP Server Hub":`Trung tâm máy chủ MCP`,"Multi-Agent Swarm Bar":`Thanh bầy tác nhân`,"Write shared channel notes, meeting agenda, or AI summaries...":`Viết ghi chú kênh, chương trình họp hoặc tóm tắt AI...`,"Help improve our AI models":`Giúp cải thiện mô hình AI của chúng tôi`,"Your name":`Tên của bạn`,"Your role":`Vai trò của bạn`,"Country or region":`Quốc gia hoặc khu vực`,"Card details":`Thông tin thẻ`,"Agree to recurring charges":`Đồng ý các khoản phí định kỳ`,"How you will use Hanzo":`Bạn sẽ dùng Hanzo thế nào`,"Team size":`Quy mô nhóm`,"I agree to the Terms of Service and Acceptable Use Policy and confirm that I am at least 18 years of age":`Tôi đồng ý với Điều khoản dịch vụ và Chính sách sử dụng được chấp nhận và xác nhận tôi đủ 18 tuổi.`,"Empty string":`Chuỗi rỗng`,"Empty array":`Mảng rỗng`,"Empty object":`Đối tượng rỗng`,"Copy {what}":`Sao chép {what}`,"Ask anything":`Hỏi bất cứ điều gì`,Auto:`Tự động`,Instant:`Tức thì`,Low:`Thấp`,Medium:`Trung bình`,High:`Cao`,Max:`Tối đa`,Dictate:`Đọc chính tả`,"Dictating — click to stop":`Đang đọc — bấm để dừng`,"Dictation settings":`Cài đặt đọc chính tả`,Language:`Ngôn ngữ`,"No devices found":`Không tìm thấy thiết bị`,"Microphone {n}":`Micro {n}`,"Nothing matches":`Không có gì khớp`,Commands:`Lệnh`,"Search commands…":`Tìm lệnh…`,Agents:`Tác nhân`,Skills:`Kỹ năng`,Connectors:`Trình kết nối`,"Design system":`Hệ thống thiết kế`,Plugins:`Plugin`,Devices:`Thiết bị`,Memory:`Bộ nhớ`,Research:`Nghiên cứu`,On:`Bật`,"Upload or add files":`Tải lên hoặc thêm tệp`,"Add files, agents, skills and more":`Thêm tệp, tác nhân, kỹ năng và hơn thế`,"No agents yet":`Chưa có tác nhân`,"No skills yet":`Chưa có kỹ năng`,"No connectors yet":`Chưa có trình kết nối`,"No design system yet":`Chưa có hệ thống thiết kế`,"No plugins yet":`Chưa có plugin`,"No devices yet":`Chưa có thiết bị`,"Search agents":`Tìm tác nhân`,"Search skills":`Tìm kỹ năng`,"Search connectors":`Tìm trình kết nối`,"Search design system":`Tìm trong hệ thống thiết kế`,"Search plugins":`Tìm plugin`,"Search devices":`Tìm thiết bị`,"Reading agents":`Đang đọc tác nhân`,"Reading skills":`Đang đọc kỹ năng`,"Reading connectors":`Đang đọc trình kết nối`,"Reading design system":`Đang đọc hệ thống thiết kế`,"Reading plugins":`Đang đọc plugin`,"Adaptive reasoning based on task complexity":`Suy luận thích ứng theo độ phức tạp`,"Answers right away, without thinking":`Trả lời ngay, không suy nghĩ`,"A quick pass with minimal thinking":`Một lượt nhanh, ít suy nghĩ`,"Thinks before answering":`Suy nghĩ trước khi trả lời`,"Deep reasoning for complex problems":`Suy luận sâu cho vấn đề phức tạp`,"Maximum compute and exhaustive verification":`Tính toán tối đa và kiểm tra toàn diện`,Effort:`Mức nỗ lực`,"Effort: {level}":`Mức nỗ lực: {level}`,Mode:`Chế độ`,"Mode: {mode}":`Chế độ: {mode}`,Model:`Mô hình`,"Model: {name}":`Mô hình: {name}`,"Voice mode":`Chế độ giọng nói`,"Hanzo is speaking — talk to interrupt":`Hanzo đang nói — hãy nói để ngắt`,"In conversation — click to hang up":`Đang trò chuyện — bấm để gác máy`,"Go to testimonial {n}":`Đến lời nhận xét {n}`,"Go to card {n}":`Đến thẻ {n}`,"{n} of {total}":`{n} / {total}`,"Reading…":`Đang đọc…`,Skill:`Kỹ năng`,Plugin:`Plugin`},iJ={Close:`关闭`,"Close window":`关闭窗口`,"Minimize window":`最小化窗口`,"Restore window":`还原窗口`,"Maximize window":`最大化窗口`,Resize:`调整大小`,"Select all":`全选`,"Select row":`选择行`,"Previous month":`上个月`,"Next month":`下个月`,Dismiss:`关闭`,Breadcrumb:`面包屑`,Cards:`卡片`,"Copy code":`复制代码`,Copied:`已复制`,"Copied!":`已复制!`,Copy:`复制`,"Previous slide":`上一张`,"Next slide":`下一张`,"Previous card":`上一张卡片`,"Next card":`下一张卡片`,"Zoom out":`缩小`,"Zoom in":`放大`,Rotate:`旋转`,Filter:`筛选`,"Expand all":`全部展开`,"Collapse all":`全部折叠`,"Search...":`搜索...`,"Pick a date":`选择日期`,Select:`选择`,"Start typing...":`开始输入...`,Search:`搜索`,Decrease:`减少`,Increase:`增加`,pagination:`分页`,"Go to previous page":`转到上一页`,"Go to next page":`转到下一页`,Previous:`上一页`,Next:`下一页`,"More pages":`更多页面`,Remove:`移除`,"Go back":`返回`,"Go forward":`前进`,"Reload page":`重新加载页面`,Share:`分享`,"New tab":`新标签页`,Menu:`菜单`,"Copy command":`复制命令`,"Terminal input":`终端输入`,Seek:`拖动进度`,"Rewind 10 seconds":`后退 10 秒`,"Forward 10 seconds":`快进 10 秒`,Volume:`音量`,"Toggle captions":`开关字幕`,"Playback speed":`播放速度`,Quality:`画质`,"Picture in picture":`画中画`,Play:`播放`,Pause:`暂停`,Mute:`静音`,Unmute:`取消静音`,"Exit fullscreen":`退出全屏`,"Enter fullscreen":`全屏`,Expand:`展开`,Collapse:`折叠`,"Copy reply":`复制回复`,"Good result":`结果好`,"Bad result":`结果不好`,"Dialog Close":`关闭对话框`,Notifications:`通知`,Account:`账户`,Cart:`购物车`,Call:`通话`,"Video call":`视频通话`,Message:`消息`,Main:`主导航`,Columns:`列`,"No results.":`没有结果。`,"No results":`无结果`,"No results found":`未找到结果`,"Drop files here":`将文件拖放到此处`,"Drag & drop files here":`拖放文件到此处`,"or click to browse (max {maxFiles} files, {maxSize}MB each)":`或点击浏览(最多 {maxFiles} 个文件,每个 {maxSize} MB)`,"Remove {name}":`移除 {name}`,"{selected} of {total} row(s) selected.":`已选择 {selected}/{total} 行。`,"Try again":`重试`,"What’s up next?":`接下来做什么?`,"Show password":`显示密码`,"Hide password":`隐藏密码`,"Search icons":`搜索图标`,"No icon matches":`没有匹配的图标`,"Show all items ({n})":`显示全部 ({n})`,"Fewer {what}":`减少{what}`,"More {what}":`增加{what}`,"No tasks available. Add tasks to display Gantt chart.":`没有任务。添加任务以显示甘特图。`,January:`一月`,February:`二月`,March:`三月`,April:`四月`,May:`五月`,June:`六月`,July:`七月`,August:`八月`,September:`九月`,October:`十月`,November:`十一月`,December:`十二月`,Su:`日`,Mo:`一`,Tu:`二`,We:`三`,Th:`四`,Fr:`五`,Sa:`六`,"just now":`刚刚`,"in a moment":`片刻后`,"in 1 minute":`1 分钟后`,"in {n} minutes":`{n} 分钟后`,"in 1 hour":`1 小时后`,"in {n} hours":`{n} 小时后`,tomorrow:`明天`,"in {n} days":`{n} 天后`,"in 1 week":`1 周后`,"in {n} weeks":`{n} 周后`,"in 1 month":`1 个月后`,"in {n} months":`{n} 个月后`,"in 1 year":`1 年后`,"in {n} years":`{n} 年后`,"1 minute ago":`1 分钟前`,"{n} minutes ago":`{n} 分钟前`,"1 hour ago":`1 小时前`,"{n} hours ago":`{n} 小时前`,"1 day ago":`1 天前`,"{n} days ago":`{n} 天前`,"1 week ago":`1 周前`,"{n} weeks ago":`{n} 周前`,"1 month ago":`1 个月前`,"{n} months ago":`{n} 个月前`,"1 year ago":`1 年前`,"{n} years ago":`{n} 年前`,"Cookie notice":`Cookie 提示`,"Cookie preferences":`Cookie 偏好`,"Close and use essential cookies only":`关闭并仅使用必要 Cookie`,Back:`返回`,"Log in":`登录`,"Search Hanzo or ask AI":`搜索 Hanzo 或询问 AI`,"Search models":`搜索模型`,"Search branches…":`搜索分支…`,"Search repositories…":`搜索仓库…`,"Show options":`显示选项`,Retry:`重试`,"Donut chart":`环形图`,"Find an organization":`查找组织`,Organizations:`组织`,"Organization name":`组织名称`,"Previous page":`上一页`,"Next page":`下一页`,"Continue with credits":`使用额度继续`,"Try Hanzo":`试用 Hanzo`,"Terms & Policies":`条款与政策`,"Who this is for":`适合谁`,"Bill yearly":`按年计费`,Apps:`应用`,"Card actions":`卡片操作`,"Assign to...":`分配给...`,"Search cards...":`搜索卡片...`,"Clear search":`清除搜索`,"Open files":`打开的文件`,"Close panel":`关闭面板`,"Add an organization":`添加组织`,"Keyboard Shortcuts":`键盘快捷键`,"Run a command":`运行命令`,"Type shell command...":`输入 shell 命令...`,"Attached to the next message":`附加到下一条消息`,"Channel Member Roster":`频道成员`,"Channel Collaborative Notes":`频道协作笔记`,"Code Diff Viewer":`代码差异查看器`,"Live Voice Call":`实时语音通话`,"MCP Server Hub":`MCP 服务器中心`,"Multi-Agent Swarm Bar":`多智能体群集栏`,"Write shared channel notes, meeting agenda, or AI summaries...":`撰写频道笔记、会议议程或 AI 摘要...`,"Help improve our AI models":`帮助改进我们的 AI 模型`,"Your name":`你的名字`,"Your role":`你的角色`,"Country or region":`国家或地区`,"Card details":`银行卡信息`,"Agree to recurring charges":`同意周期性扣款`,"How you will use Hanzo":`你将如何使用 Hanzo`,"Team size":`团队规模`,"I agree to the Terms of Service and Acceptable Use Policy and confirm that I am at least 18 years of age":`我同意服务条款和可接受使用政策,并确认我已年满 18 岁。`,"Empty string":`空字符串`,"Empty array":`空数组`,"Empty object":`空对象`,"Copy {what}":`复制{what}`,"Ask anything":`尽管问`,Auto:`自动`,Instant:`即时`,Low:`低`,Medium:`中`,High:`高`,Max:`最大`,Dictate:`听写`,"Dictating — click to stop":`正在听写 — 点击停止`,"Dictation settings":`听写设置`,Language:`语言`,"No devices found":`未找到设备`,"Microphone {n}":`麦克风 {n}`,"Nothing matches":`没有匹配项`,Commands:`命令`,"Search commands…":`搜索命令…`,Agents:`智能体`,Skills:`技能`,Connectors:`连接器`,"Design system":`设计系统`,Plugins:`插件`,Devices:`设备`,Memory:`记忆`,Research:`研究`,On:`开`,"Upload or add files":`上传或添加文件`,"Add files, agents, skills and more":`添加文件、智能体、技能等`,"No agents yet":`还没有智能体`,"No skills yet":`还没有技能`,"No connectors yet":`还没有连接器`,"No design system yet":`还没有设计系统`,"No plugins yet":`还没有插件`,"No devices yet":`还没有设备`,"Search agents":`搜索智能体`,"Search skills":`搜索技能`,"Search connectors":`搜索连接器`,"Search design system":`搜索设计系统`,"Search plugins":`搜索插件`,"Search devices":`搜索设备`,"Reading agents":`正在读取智能体`,"Reading skills":`正在读取技能`,"Reading connectors":`正在读取连接器`,"Reading design system":`正在读取设计系统`,"Reading plugins":`正在读取插件`,"Adaptive reasoning based on task complexity":`根据任务复杂度自适应推理`,"Answers right away, without thinking":`立即回答,不进行思考`,"A quick pass with minimal thinking":`快速过一遍,少思考`,"Thinks before answering":`先想再答`,"Deep reasoning for complex problems":`针对复杂问题的深度推理`,"Maximum compute and exhaustive verification":`最大算力与穷尽验证`,Effort:`力度`,"Effort: {level}":`力度:{level}`,Mode:`模式`,"Mode: {mode}":`模式:{mode}`,Model:`模型`,"Model: {name}":`模型:{name}`,"Voice mode":`语音模式`,"Hanzo is speaking — talk to interrupt":`Hanzo 正在说话 — 开口即可打断`,"In conversation — click to hang up":`通话中 — 点击挂断`,"Go to testimonial {n}":`转到评价 {n}`,"Go to card {n}":`转到卡片 {n}`,"{n} of {total}":`{n} / {total}`,"Reading…":`正在读取…`,Skill:`技能`,Plugin:`插件`},aJ={Close:`關閉`,"Close window":`關閉視窗`,"Minimize window":`最小化視窗`,"Restore window":`還原視窗`,"Maximize window":`最大化視窗`,Resize:`調整大小`,"Select all":`全選`,"Select row":`選擇列`,"Previous month":`上個月`,"Next month":`下個月`,Dismiss:`關閉`,Breadcrumb:`導覽路徑`,Cards:`卡片`,"Copy code":`複製程式碼`,Copied:`已複製`,"Copied!":`已複製!`,Copy:`複製`,"Previous slide":`上一張`,"Next slide":`下一張`,"Previous card":`上一張卡片`,"Next card":`下一張卡片`,"Zoom out":`縮小`,"Zoom in":`放大`,Rotate:`旋轉`,Filter:`篩選`,"Expand all":`全部展開`,"Collapse all":`全部摺疊`,"Search...":`搜尋...`,"Pick a date":`選擇日期`,Select:`選擇`,"Start typing...":`開始輸入...`,Search:`搜尋`,Decrease:`減少`,Increase:`增加`,pagination:`分頁`,"Go to previous page":`前往上一頁`,"Go to next page":`前往下一頁`,Previous:`上一頁`,Next:`下一頁`,"More pages":`更多頁面`,Remove:`移除`,"Go back":`返回`,"Go forward":`前進`,"Reload page":`重新載入頁面`,Share:`分享`,"New tab":`新分頁`,Menu:`選單`,"Copy command":`複製指令`,"Terminal input":`終端機輸入`,Seek:`拖曳進度`,"Rewind 10 seconds":`後退 10 秒`,"Forward 10 seconds":`快轉 10 秒`,Volume:`音量`,"Toggle captions":`開關字幕`,"Playback speed":`播放速度`,Quality:`畫質`,"Picture in picture":`子母畫面`,Play:`播放`,Pause:`暫停`,Mute:`靜音`,Unmute:`取消靜音`,"Exit fullscreen":`結束全螢幕`,"Enter fullscreen":`全螢幕`,Expand:`展開`,Collapse:`摺疊`,"Copy reply":`複製回覆`,"Good result":`結果好`,"Bad result":`結果不好`,"Dialog Close":`關閉對話方塊`,Notifications:`通知`,Account:`帳戶`,Cart:`購物車`,Call:`通話`,"Video call":`視訊通話`,Message:`訊息`,Main:`主導覽`,Columns:`欄`,"No results.":`沒有結果。`,"No results":`無結果`,"No results found":`找不到結果`,"Drop files here":`將檔案拖放到這裡`,"Drag & drop files here":`拖放檔案到這裡`,"or click to browse (max {maxFiles} files, {maxSize}MB each)":`或點擊瀏覽(最多 {maxFiles} 個檔案,每個 {maxSize} MB)`,"Remove {name}":`移除 {name}`,"{selected} of {total} row(s) selected.":`已選取 {selected}/{total} 列。`,"Try again":`再試一次`,"What’s up next?":`接下來做什麼?`,"Show password":`顯示密碼`,"Hide password":`隱藏密碼`,"Search icons":`搜尋圖示`,"No icon matches":`沒有相符的圖示`,"Show all items ({n})":`顯示全部 ({n})`,"Fewer {what}":`減少{what}`,"More {what}":`增加{what}`,"No tasks available. Add tasks to display Gantt chart.":`沒有任務。新增任務以顯示甘特圖。`,January:`一月`,February:`二月`,March:`三月`,April:`四月`,May:`五月`,June:`六月`,July:`七月`,August:`八月`,September:`九月`,October:`十月`,November:`十一月`,December:`十二月`,Su:`日`,Mo:`一`,Tu:`二`,We:`三`,Th:`四`,Fr:`五`,Sa:`六`,"just now":`剛剛`,"in a moment":`稍後`,"in 1 minute":`1 分鐘後`,"in {n} minutes":`{n} 分鐘後`,"in 1 hour":`1 小時後`,"in {n} hours":`{n} 小時後`,tomorrow:`明天`,"in {n} days":`{n} 天後`,"in 1 week":`1 週後`,"in {n} weeks":`{n} 週後`,"in 1 month":`1 個月後`,"in {n} months":`{n} 個月後`,"in 1 year":`1 年後`,"in {n} years":`{n} 年後`,"1 minute ago":`1 分鐘前`,"{n} minutes ago":`{n} 分鐘前`,"1 hour ago":`1 小時前`,"{n} hours ago":`{n} 小時前`,"1 day ago":`1 天前`,"{n} days ago":`{n} 天前`,"1 week ago":`1 週前`,"{n} weeks ago":`{n} 週前`,"1 month ago":`1 個月前`,"{n} months ago":`{n} 個月前`,"1 year ago":`1 年前`,"{n} years ago":`{n} 年前`,"Cookie notice":`Cookie 通知`,"Cookie preferences":`Cookie 偏好`,"Close and use essential cookies only":`關閉並僅使用必要 Cookie`,Back:`返回`,"Log in":`登入`,"Search Hanzo or ask AI":`搜尋 Hanzo 或詢問 AI`,"Search models":`搜尋模型`,"Search branches…":`搜尋分支…`,"Search repositories…":`搜尋存放庫…`,"Show options":`顯示選項`,Retry:`重試`,"Donut chart":`環形圖`,"Find an organization":`尋找組織`,Organizations:`組織`,"Organization name":`組織名稱`,"Previous page":`上一頁`,"Next page":`下一頁`,"Continue with credits":`使用額度繼續`,"Try Hanzo":`試用 Hanzo`,"Terms & Policies":`條款與政策`,"Who this is for":`適合誰`,"Bill yearly":`按年計費`,Apps:`應用程式`,"Card actions":`卡片操作`,"Assign to...":`指派給...`,"Search cards...":`搜尋卡片...`,"Clear search":`清除搜尋`,"Open files":`開啟的檔案`,"Close panel":`關閉面板`,"Add an organization":`新增組織`,"Keyboard Shortcuts":`鍵盤快速鍵`,"Run a command":`執行指令`,"Type shell command...":`輸入 shell 指令...`,"Attached to the next message":`附加到下一則訊息`,"Channel Member Roster":`頻道成員`,"Channel Collaborative Notes":`頻道協作筆記`,"Code Diff Viewer":`程式碼差異檢視`,"Live Voice Call":`即時語音通話`,"MCP Server Hub":`MCP 伺服器中心`,"Multi-Agent Swarm Bar":`多代理群集列`,"Write shared channel notes, meeting agenda, or AI summaries...":`撰寫頻道筆記、會議議程或 AI 摘要...`,"Help improve our AI models":`協助改進我們的 AI 模型`,"Your name":`你的名字`,"Your role":`你的角色`,"Country or region":`國家或地區`,"Card details":`卡片資訊`,"Agree to recurring charges":`同意週期性扣款`,"How you will use Hanzo":`你會如何使用 Hanzo`,"Team size":`團隊規模`,"I agree to the Terms of Service and Acceptable Use Policy and confirm that I am at least 18 years of age":`我同意服務條款與可接受使用政策,並確認我已年滿 18 歲。`,"Empty string":`空字串`,"Empty array":`空陣列`,"Empty object":`空物件`,"Copy {what}":`複製{what}`,"Ask anything":`儘管問`,Auto:`自動`,Instant:`即時`,Low:`低`,Medium:`中`,High:`高`,Max:`最大`,Dictate:`聽寫`,"Dictating — click to stop":`正在聽寫 — 點擊停止`,"Dictation settings":`聽寫設定`,Language:`語言`,"No devices found":`找不到裝置`,"Microphone {n}":`麥克風 {n}`,"Nothing matches":`沒有相符項目`,Commands:`指令`,"Search commands…":`搜尋指令…`,Agents:`代理`,Skills:`技能`,Connectors:`連接器`,"Design system":`設計系統`,Plugins:`外掛`,Devices:`裝置`,Memory:`記憶`,Research:`研究`,On:`開`,"Upload or add files":`上傳或新增檔案`,"Add files, agents, skills and more":`新增檔案、代理、技能等`,"No agents yet":`還沒有代理`,"No skills yet":`還沒有技能`,"No connectors yet":`還沒有連接器`,"No design system yet":`還沒有設計系統`,"No plugins yet":`還沒有外掛`,"No devices yet":`還沒有裝置`,"Search agents":`搜尋代理`,"Search skills":`搜尋技能`,"Search connectors":`搜尋連接器`,"Search design system":`搜尋設計系統`,"Search plugins":`搜尋外掛`,"Search devices":`搜尋裝置`,"Reading agents":`正在讀取代理`,"Reading skills":`正在讀取技能`,"Reading connectors":`正在讀取連接器`,"Reading design system":`正在讀取設計系統`,"Reading plugins":`正在讀取外掛`,"Adaptive reasoning based on task complexity":`依任務複雜度調整的推理`,"Answers right away, without thinking":`立即回答,不進行思考`,"A quick pass with minimal thinking":`快速過一遍,少思考`,"Thinks before answering":`先想再答`,"Deep reasoning for complex problems":`針對複雜問題的深度推理`,"Maximum compute and exhaustive verification":`最大算力與徹底驗證`,Effort:`力度`,"Effort: {level}":`力度:{level}`,Mode:`模式`,"Mode: {mode}":`模式:{mode}`,Model:`模型`,"Model: {name}":`模型:{name}`,"Voice mode":`語音模式`,"Hanzo is speaking — talk to interrupt":`Hanzo 正在說話 — 開口即可打斷`,"In conversation — click to hang up":`通話中 — 點擊掛斷`,"Go to testimonial {n}":`前往評價 {n}`,"Go to card {n}":`前往卡片 {n}`,"{n} of {total}":`{n} / {total}`,"Reading…":`正在讀取…`,Skill:`技能`,Plugin:`外掛`},oJ=e=>e,sJ={ar:oJ(Wq),"de-DE":oJ(Gq),"es-ES":oJ(Kq),"fr-FR":oJ(qq),"hi-IN":oJ(Jq),"id-ID":oJ(Yq),"it-IT":oJ(Xq),"ja-JP":oJ(Zq),"ko-KR":oJ(Qq),"pt-BR":oJ($q),ru:oJ(eJ),th:oJ(tJ),tr:oJ(nJ),vi:oJ(rJ),"zh-Hans":oJ(iJ),"zh-Hant":oJ(aJ)},cJ=e=>sJ[e]??{},lJ={display:`contents`};function uJ({children:e,locale:t,messages:n,syncDocument:r=!1}){let i=jG(t),a=IG(i,n?{...cJ(i),...n}:cJ(i)),o=MG(i),s=NG(t);return(0,V.useLayoutEffect)(()=>{if(!r||typeof document>`u`)return;let e=document.documentElement,t=e.lang,n=e.dir;return e.lang=s,e.dir=o,()=>{e.lang=t,e.dir=n}},[r,s,o]),(0,H.jsx)(FG.Provider,{value:a,children:(0,H.jsx)(`div`,{dir:o,lang:s,style:lJ,children:e})})}var dJ=(0,V.createContext)(null),fJ=({children:e,theme:t,analytics:n,config:r=lA,appearance:i,locale:a,messages:o})=>{let{pref:s,set:c}=Uq(i),l=(0,V.useMemo)(()=>({pref:s,set:c}),[s,c]),u=Hq(),d=a||o?(0,H.jsx)(uJ,{locale:a,messages:o,children:e}):e,f=(0,H.jsx)(dJ.Provider,{value:l,children:(0,H.jsx)(Hv,{config:r,defaultTheme:t??u,disableInjectCSS:!0,children:d})});return n?(0,H.jsx)(Bv,{...n===!0?{}:n,children:f}):f},pJ=({size:e=11,label:t})=>(0,H.jsxs)(`svg`,{width:e*30/14,height:e,viewBox:`0 0 30 14`,focusable:`false`,...t?{role:`img`,"aria-label":t}:{"aria-hidden":!0},style:{flexShrink:0,display:`block`},children:[(0,H.jsx)(`path`,{d:`M7.4 12.8h6.8l3.1-11.6H7.4C4.2 1.2 1.6 3.8 1.6 7s2.6 5.8 5.8 5.8z`,fill:`#fff`,fillRule:`evenodd`,clipRule:`evenodd`}),(0,H.jsx)(`path`,{d:`M22.6 0H7.4c-3.9 0-7 3.1-7 7s3.1 7 7 7h15.2c3.9 0 7-3.1 7-7s-3.2-7-7-7zm-21 7c0-3.2 2.6-5.8 5.8-5.8h9.9l-3.1 11.6H7.4c-3.2 0-5.8-2.6-5.8-5.8z`,fill:`#06f`,fillRule:`evenodd`,clipRule:`evenodd`}),(0,H.jsx)(`path`,{d:`M24.6 4c.2.2.2.6 0 .8L22.5 7l2.2 2.2c.2.2.2.6 0 .8-.2.2-.6.2-.8 0l-2.2-2.2-2.2 2.2c-.2.2-.6.2-.8 0-.2-.2-.2-.6 0-.8L20.8 7l-2.2-2.2c-.2-.2-.2-.6 0-.8.2-.2.6-.2.8 0l2.2 2.2L23.8 4c.2-.2.6-.2.8 0z`,fill:`#fff`}),(0,H.jsx)(`path`,{d:`M12.7 4.1c.2.2.3.6.1.8L8.6 9.8c-.1.1-.2.2-.3.2-.2.1-.5.1-.7-.1L5.4 7.7c-.2-.2-.2-.6 0-.8.2-.2.6-.2.8 0L8 8.6l3.8-4.5c.2-.2.6-.2.9 0z`,fill:`#06f`})]}),mJ=`hzconsent-open`,hJ=`#choices`,gJ=1500,_J=()=>{let e=ue();return e.region?e.mode:void 0},vJ=Symbol.for(`hanzo.ui.consent.links`),yJ=`hzconsent-links`;function bJ(){if((globalThis[vJ]??0)>0)return!0;for(let e of document.querySelectorAll(`a[href*="${hJ}"]`))try{let t=new URL(e.getAttribute(`href`)??``,document.baseURI);if(t.hash===hJ&&t.origin===window.location.origin)return!0}catch{}return!1}var xJ=(e,t,n,r)=>[{id:`necessary`,title:e(`Strictly Necessary Cookies`),body:e(`These are needed for the site to work, so they are always on. They keep you signed in and your session secure, protect forms against cross-site request forgery, spread traffic across servers, remember the choice you make here, and keep what you have typed into a form. They include {brand}'s own first-party analytics, which counts visits and finds what is broken for {brand} alone and is never sold or shared.`,{brand:t})},{id:`analytics`,key:`analytics`,title:e(`Performance Cookies`),body:e(`Google Analytics: lets Google measure visits to {brand} with its own cookies.`,{brand:t})},{id:`marketing`,key:`marketing`,title:e(`Marketing Cookies`),body:e(`The Meta pixel: lets Meta measure the sign-ups and orders {brand}'s ads led to.`,{brand:t})},{id:`ads`,key:`ads`,title:e(`Sell, Share, or Use Your Data for Targeted Advertising`),body:e(`Lets Google and Meta use your visits to choose the ads they show you on other sites and apps. Some US state privacy laws call this a “sale” or “sharing” of your personal information, or “targeted advertising”, and give you the right to opt out: {rule}`,{rule:e(r?`your browser’s signal keeps it off.`:n?`it stays off unless you turn it on.`:`turn this off to opt out.`)})}],SJ=(e,t,n)=>e(n?`We use cookies and similar technologies to provide our services. Essential cookies are required for the site to work and cannot be turned off. Learn more in our `:t?`We use cookies and similar technologies to provide our services, measure performance, and support advertising. Essential cookies are required for the site to work and cannot be turned off. You can allow or reject optional cookies below. Learn more in our `:`We use cookies and similar technologies to provide our services, measure performance, and support advertising. Google Analytics and the Meta pixel run on this site by default. Turn either off below, or turn off the last switch to opt out of the sale or sharing of your personal information for targeted advertising; each switch is saved as soon as you change it. Essential cookies are required for the site to work and cannot be turned off. Learn more in our `),CJ=We(`Your browser asks sites not to track you, so all of these stay off.`),wJ={top:`max(16px, calc(var(--safe-top, env(safe-area-inset-top, 0px)) + 8px))`,bottom:`max(16px, calc(var(--safe-bottom, env(safe-area-inset-bottom, 0px)) + 8px))`,left:`max(16px, calc(var(--safe-left, env(safe-area-inset-left, 0px)) + 8px))`,right:`max(16px, calc(var(--safe-right, env(safe-area-inset-right, 0px)) + 8px))`},TJ={button:`var(--radius-lg, 12px)`,card:`var(--radius-xl, 16px)`},EJ={bg:`$background`,borderWidth:1,borderColor:`$borderColor`,rounded:TJ.card,shadowColor:`rgba(0,0,0,0.25)`,shadowRadius:24,shadowOffset:{width:0,height:8}},DJ={...W(`consent`),...EJ,position:`fixed`,b:wJ.bottom,l:wJ.left,r:wJ.right,mx:`auto`,z:`var(--z-banner, 50)`,py:`$3`,paddingInlineStart:`$4`,paddingInlineEnd:56},OJ={width:`fit-content`},kJ={outlineColor:`var(--ring)`,outlineStyle:`solid`,outlineWidth:2,outlineOffset:2},AJ=(e,t,n)=>({size:`sm`,minH:36,rounded:TJ.button,bg:e,color:n,borderColor:`transparent`,hoverStyle:{bg:t,borderColor:`transparent`,opacity:1},pressStyle:{bg:t,borderColor:`transparent`,opacity:1},focusStyle:{borderColor:`transparent`},focusVisibleStyle:kJ}),jJ=AJ(`var(--primary)`,`var(--primary-hover)`,`var(--primary-foreground)`),MJ=AJ(`var(--secondary)`,`var(--secondary-hover)`,`var(--secondary-foreground)`),NJ={rounded:TJ.button,bg:`transparent`,borderColor:`transparent`,hoverStyle:{bg:`var(--secondary)`,borderColor:`transparent`,opacity:1},pressStyle:{bg:`var(--secondary-hover)`,borderColor:`transparent`,opacity:1},focusStyle:{borderColor:`transparent`},focusVisibleStyle:kJ},PJ={type:`button`,variant:`link`,size:`sm`,px:0,minH:0,color:`$aside`,hoverStyle:{color:`$ink`},focusVisibleStyle:kJ,startIcon:(0,H.jsx)(pJ,{})},FJ={color:`inherit`,textDecoration:`underline`,whiteSpace:`nowrap`},IJ={position:`fixed`,t:0,r:0,b:0,l:0},LJ=`a[href], button:not([disabled]), [tabindex]:not([tabindex="-1"])`,RJ={type:`button`},zJ=({cookies:e=`https://hanzo.ai/cookies`,privacy:t=`https://hanzo.ai/privacy`,terms:n=`https://hanzo.ai/terms`,brand:r=`Hanzo`,floating:i=!0})=>{let{t:a}=Ye(),[o,c]=(0,V.useState)(),[l,u]=(0,V.useState)(!1),[d,f]=(0,V.useState)(!1),[p,m]=(0,V.useState)({analytics:!1,marketing:!1,ads:!1}),h=(0,V.useRef)(p);h.current=p;let[g,v]=(0,V.useState)({}),[b,x]=(0,V.useState)(!0),S=(0,V.useRef)(void 0),C=(0,V.useRef)(!1),T=(0,V.useRef)(null),D=(0,V.useRef)(null),O=(0,V.useRef)(null),k=(0,V.useRef)(!1),A=(0,V.useRef)(!1),j=(0,V.useRef)(new Set),M=(0,V.useId)(),[ee,N]=(0,V.useState)(!1),te=(e=S.current)=>e===`eu`?ut():e===`global`&&!y()&&!s(),ne=e=>{let t=me();for(let n of j.current)(e!==`eu`||!h.current[n])&&(t[n]=h.current[n]);return t},re=e=>{let t=ne(e);m(t),e!==`eu`&&j.current.size&&w(t)},ae=()=>{if(C.current)return;let e=document.activeElement;T.current=e instanceof HTMLElement&&e!==document.body?e:null,C.current=!0,j.current=new Set,N(s()),A.current=ge(),m(me()),f(!0)},oe=()=>{C.current=!1,f(!1),u(te())};(0,V.useEffect)(()=>{let e=()=>{u(te()),N(s()),C.current&&A.current&&!ge()&&(A.current=!1,re(S.current??`eu`))},t=t=>{let n=S.current!==t;S.current=t,c(t),e(),n&&C.current&&re(t)},n=()=>t(ue().mode),r=_J();r&&t(r);let i=r?void 0:window.setTimeout(()=>S.current??t(`eu`),gJ),a=0,o=()=>{a||=window.requestAnimationFrame(()=>{a=0,x(bJ())})};o();let l=new MutationObserver(o);l.observe(document.body,{childList:!0,subtree:!0});let d=()=>{window.location.hash===hJ&&(queueMicrotask(()=>history.replaceState(history.state,``,window.location.pathname+window.location.search)),ae())},f=e=>{if(e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;let t=e.target?.closest?.(`a[href]`),n=t?.getAttribute(`href`),r=t?.getAttribute(`target`);if(!n||t?.hasAttribute(`download`)||r&&r!==`_self`)return;let i;try{i=new URL(n,document.baseURI)}catch{return}i.hash===hJ&&i.origin===window.location.origin&&(e.preventDefault(),ae())};return d(),window.addEventListener(mJ,ae),window.addEventListener(E,n),window.addEventListener(yJ,o),window.addEventListener(`hashchange`,d),document.addEventListener(`click`,f,{capture:!0}),()=>{window.clearTimeout(i),window.cancelAnimationFrame(a),l.disconnect(),window.removeEventListener(mJ,ae),window.removeEventListener(E,n),window.removeEventListener(yJ,o),window.removeEventListener(`hashchange`,d),document.removeEventListener(`click`,f,{capture:!0})}},[]),(0,V.useEffect)(()=>{if(d)return Je(!0),()=>Je(!1)},[d]),(0,V.useEffect)(()=>{if(!d){if(!k.current)return;k.current=!1;let e=T.current;T.current=null,e?.isConnected?e.focus():(O.current??document.querySelector(`[data-slot="consent-choices"] button`))?.focus();return}k.current=!0;let e=()=>[...D.current?.querySelectorAll(LJ)??[]];e()[0]?.focus();let t=t=>{if(t.key===`Escape`){t.preventDefault(),oe();return}if(t.key!==`Tab`)return;let n=e(),r=n[0],i=n[n.length-1];if(!r||!i)return;let a=document.activeElement,o=!!a&&!!D.current?.contains(a);t.shiftKey&&(a===r||!o)?(t.preventDefault(),i.focus()):!t.shiftKey&&(a===i||!o)&&(t.preventDefault(),r.focus())};return document.addEventListener(`keydown`,t),()=>document.removeEventListener(`keydown`,t)},[d]);let se=e=>()=>{e(),C.current=!1,u(te()),f(!1)},ce=null;if(d){let i=(o??`eu`)===`eu`,s=(e,t)=>{j.current.add(e);let n={...p,[e]:t};m(n),i||w(n)};ce=(0,H.jsxs)(F,{...W(`consent-sheet`),...IJ,z:`var(--z-modal, 600)`,items:`center`,justify:`center`,style:{padding:`${wJ.top} ${wJ.right} ${wJ.bottom} ${wJ.left}`},children:[(0,H.jsx)(F,{...IJ,position:`absolute`,z:0,bg:`rgba(0,0,0,0.6)`,"aria-hidden":!0,onPress:oe}),(0,H.jsxs)(F,{...W(`consent`),...EJ,ref:D,role:`dialog`,"aria-modal":!0,"aria-labelledby":`${M}-title`,position:`relative`,width:`100%`,maxW:560,maxH:`100%`,overflow:`hidden`,children:[(0,H.jsxs)(P,{items:`center`,justify:`space-between`,gap:`$3`,pt:`$5`,pb:`$3`,paddingInlineStart:`$5`,paddingInlineEnd:`$4`,children:[(0,H.jsx)(U,{render:`h2`,id:`${M}-title`,m:0,fontSize:`$6`,lineHeight:`$6`,fontWeight:`600`,color:`$ink`,children:a(`Cookie Preferences`)}),(0,H.jsx)(kS,{type:`button`,size:`icon`,...NJ,"aria-label":a(`Close`),onClick:oe,children:(0,H.jsx)(Fb,{size:16})})]}),(0,H.jsxs)(F,{shrink:1,minH:0,overflowY:`auto`,px:`$5`,pb:`$2`,style:{overscrollBehavior:`contain`},children:[(0,H.jsxs)(Zi,{size:`$2`,color:`$aside`,m:0,pb:`$3`,children:[SJ(a,i,ee),a(`{cookies}, {privacy}, and {terms}.`,{cookies:(0,H.jsx)(`a`,{href:e,style:FJ,children:a(`Cookie Policy`)}),privacy:(0,H.jsx)(`a`,{href:t,style:FJ,children:a(`Privacy Policy`)}),terms:(0,H.jsx)(`a`,{href:n,style:FJ,children:a(`Terms of Service`)})})]}),ee?(0,H.jsx)(Zi,{size:`$2`,color:`$ink`,m:0,pb:`$3`,children:a(CJ)}):null,xJ(a,r,i,ee).map(e=>{let t=g[e.id]===!0,n=`${M}-${e.id}`;return(0,H.jsxs)(F,{...W(`consent-section`),borderTopWidth:1,borderColor:`$borderColor`,children:[(0,H.jsxs)(P,{items:`center`,gap:`$3`,minH:52,py:`$2`,children:[(0,H.jsx)(P,{render:`h3`,flex:1,minW:0,m:0,children:(0,H.jsxs)(P,{render:`button`,...RJ,"aria-expanded":t,"aria-controls":n,onPress:()=>v({...g,[e.id]:!t}),flex:1,minW:0,items:`center`,gap:`$2`,p:0,bg:`transparent`,borderWidth:0,cursor:`pointer`,children:[(0,H.jsx)(P,{shrink:0,rotate:t?`180deg`:`0deg`,opacity:.7,children:(0,H.jsx)(gy,{size:16})}),(0,H.jsx)(U,{fontSize:`$3`,lineHeight:`$3`,fontWeight:`600`,color:`$ink`,...eS(`start`),children:e.title})]})}),e.key?(0,H.jsx)(tT,{"aria-label":e.title,"aria-describedby":n,disabled:ee,checked:!ee&&p[e.key],onCheckedChange:t=>s(e.key,t===!0)}):(0,H.jsx)(U,{fontSize:`$2`,fontWeight:`600`,color:`$ink`,whiteSpace:`nowrap`,children:a(`Always Active`)})]}),(0,H.jsx)(F,{id:n,display:t?`flex`:`none`,pb:`$3`,paddingInlineStart:24,children:(0,H.jsx)(Zi,{size:`$2`,color:`$aside`,m:0,children:e.body})})]},e.id)})]}),(0,H.jsx)(P,{flexWrap:`wrap`,gap:`$2`,px:`$5`,py:`$4`,borderTopWidth:1,borderColor:`$borderColor`,children:i?(0,H.jsxs)(H.Fragment,{children:[ee?null:(0,H.jsx)(kS,{type:`button`,...MJ,grow:1,onClick:se(ie),children:a(`Accept all`)}),(0,H.jsx)(kS,{type:`button`,...jJ,grow:1,onClick:se(()=>w(p)),children:a(`Save preferences`)})]}):(0,H.jsx)(kS,{type:`button`,...jJ,grow:1,onClick:oe,children:a(`Done`)})})]})]})}if(!o)return ce;let le=i&&!b&&!l?(0,H.jsx)(P,{...W(`consent-choices`),position:`fixed`,b:wJ.bottom,l:wJ.left,z:`var(--z-banner, 50)`,px:`$2.5`,py:`$1`,bg:`$background`,borderWidth:1,borderColor:`$borderColor`,rounded:TJ.button,children:(0,H.jsx)(kS,{...PJ,onClick:ae,children:a(`Your Privacy Choices`)})}):null;return l&&o===`global`?le=(0,H.jsxs)(P,{...DJ,role:`region`,"aria-label":a(`Cookie notice`),style:OJ,maxW:1200,flexWrap:`wrap`,items:`center`,columnGap:`$4`,rowGap:`$2`,children:[(0,H.jsx)(F,{shrink:1,minW:0,children:(0,H.jsx)(Zi,{size:`$2`,color:`$ink`,m:0,children:a(`We use cookies to improve your experience. By continuing to browse, you agree.`)})}),(0,H.jsx)(kS,{...PJ,onClick:ae,children:a(`Your Privacy Choices`)}),(0,H.jsx)(kS,{type:`button`,size:`icon`,...NJ,"aria-label":a(`Close`),position:`absolute`,t:`$3`,insetInlineEnd:`$3`,onClick:se(fe),children:(0,H.jsx)(Fb,{size:16})})]}):l&&o===`eu`&&(le=(0,H.jsxs)(P,{...DJ,role:`dialog`,"aria-label":a(`Cookie preferences`),style:OJ,maxW:1200,flexWrap:`wrap`,items:`center`,columnGap:`$4`,rowGap:`$3`,children:[(0,H.jsx)(F,{shrink:1,minW:0,children:(0,H.jsx)(Zi,{size:`$2`,color:`$ink`,m:0,children:a(`Essential cookies keep {brand} running. With your OK, optional cookies help us measure performance and ads.`,{brand:r})})}),(0,H.jsxs)(P,{gap:`$2`,marginInlineStart:`auto`,items:`center`,flexWrap:`wrap`,children:[(0,H.jsx)(kS,{ref:O,type:`button`,...MJ,onClick:ae,children:a(`Manage preferences`)}),(0,H.jsx)(kS,{type:`button`,...jJ,onClick:se(ie),children:a(`Accept all`)})]}),(0,H.jsx)(kS,{type:`button`,size:`icon`,...NJ,"aria-label":a(`Close and use essential cookies only`),position:`absolute`,t:`$3`,insetInlineEnd:`$3`,onClick:se(_),children:(0,H.jsx)(Fb,{size:16})})]})),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`div`,{inert:d||void 0,style:{display:`contents`},children:le}),ce]})},BJ=`https://hanzo.ai`,VJ=e=>e?{additionalParams:{login_hint:e}}:void 0,HJ=(e,t=`login`,n)=>{let r=new URL(e);return t===`another`&&r.searchParams.set(`prompt`,`select_account`),n&&r.searchParams.set(`provider`,n),`${BJ}${t===`signup`?`/signup`:`/login`}${r.search}`},UJ=e=>{let t=new URL(e);return t.searchParams.set(`prompt`,`none`),`${BJ}/v1/iam/oauth/authorize${t.search}`},WJ=e=>e===`localhost`||e===`127.0.0.1`||e===`[::1]`,GJ=(e,t,n)=>{if(WJ(new URL(n).hostname))return`/login?from=logout`;let r=new URLSearchParams({client_id:t,everywhere:`true`,post_logout_redirect_uri:new URL(`/`,n).href});return`${e.replace(/\/+$/,``)}/v1/iam/oauth/logout?${r}`},KJ=[{org:`hanzo`,app:`team-native`,issuer:`https://hanzo.id`,title:`Team`,hosts:[`hanzo.team`,`www.hanzo.team`,`hanzo.app`,`localhost`,`127.0.0.1`]},{org:`hanzo`,app:`team2`,issuer:`https://hanzo.id`,title:`Team`,hosts:[`team2.hanzo.ai`,`team2.hanzo.app`,`hanzo-team.hanzo.app`]}],qJ=()=>typeof window>`u`?``:window.location.hostname,JJ=KJ.find(e=>e.hosts.includes(qJ()))??KJ[0],YJ=`${JJ.org}-${JJ.app}`,XJ=32;function ZJ(e){let t=new Uint8Array(e);return crypto.getRandomValues(t),$J(t.buffer)}async function QJ(e){let t=new TextEncoder;return crypto.subtle.digest(`SHA-256`,t.encode(e))}function $J(e){let t=new Uint8Array(e),n=``;for(let e of t)n+=String.fromCharCode(e);return btoa(n).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/,``)}async function eY(){let e=ZJ(XJ);return{codeVerifier:e,codeChallenge:$J(await QJ(e))}}function tY(){return ZJ(XJ)}var nY={discovery:`/.well-known/openid-configuration`,authorize:`/v1/iam/oauth/authorize`,token:`/v1/iam/oauth/token`,userinfo:`/v1/iam/oauth/userinfo`,jwks:`/v1/iam/.well-known/jwks`,logout:`/v1/iam/oauth/logout`,revoke:`/v1/iam/oauth/revoke`},rY={authMethods:`/v1/iam/auth/methods`,authIdentifier:`/v1/iam/auth/identifier`,authApplication:`/v1/iam/auth/application`,login:`/v1/iam/login`,sendCode:`/v1/iam/verification-codes`,federationMfa:`/v1/iam/oauth/federation/mfa`,signup:`/v1/iam/signup`,terms:`/v1/iam/terms`,password:`/v1/iam/password`,address:`/v1/iam/address`,accept:`/v1/iam/invitations/accept`,web3Nonce:`/v1/iam/web3/nonce`,web3Verify:`/v1/iam/web3/verify`};function iY(e){return e.replace(/\/+$/,``)}function aY(e,t){return`${iY(e)}${nY[t]}`}function oY(e){let t=new URL(e.endpoint??aY(e.serverUrl,`authorize`));t.searchParams.set(`client_id`,e.clientId),t.searchParams.set(`response_type`,`code`),t.searchParams.set(`redirect_uri`,e.redirectUri),t.searchParams.set(`scope`,e.scope??`openid profile email`),t.searchParams.set(`state`,e.state),e.codeChallenge&&(t.searchParams.set(`code_challenge`,e.codeChallenge),t.searchParams.set(`code_challenge_method`,`S256`)),e.prompt&&t.searchParams.set(`prompt`,e.prompt);for(let[n,r]of Object.entries(e.params??{}))t.searchParams.set(n,r);return t}function sY(e){if(!e)return{};try{let t=e.split(`.`)[1];return t?JSON.parse(atob(t.replace(/-/g,`+`).replace(/_/g,`/`))):{}}catch{return{}}}var cY={chain:`evm`,scheme:`secp256k1-eip191`};async function lY(e){let t=e.trim().toLowerCase().replace(/^0x/,``);if(!/^[0-9a-f]{40}$/.test(t))throw Error(`not an Ethereum address: ${e}`);let{keccak_256:n}=await b(async()=>{let{keccak_256:e}=await import(`./sha3-DDKddPFc.js`);return{keccak_256:e}},[]),r=n(new TextEncoder().encode(t)),i=`0x`;for(let e=0;e<t.length;e++){let n=e%2==0?r[e>>1]>>4:r[e>>1]&15;i+=n>=8?t[e].toUpperCase():t[e]}return i}function uY(e,t,n){let{domain:r,uri:i,statement:a,nonce:o,issuedAt:s,expirationTime:c,version:l}=e;if(a?.includes(`
36
+ `))throw Error(`the sign-in statement must be one line`);let u=[`${r} wants you to sign in with your Ethereum account:`,t,``];return a&&u.push(a,``),u.push(`URI: ${i}`,`Version: ${l||`1`}`,`Chain ID: ${n}`,`Nonce: ${o}`,`Issued At: ${s}`),c&&u.push(`Expiration Time: ${c}`),u.join(`
37
+ `)}function dY(e){let t=`0x`;for(let n of new TextEncoder().encode(e))t+=n.toString(16).padStart(2,`0`);return t}function fY(e){let t=typeof e==`string`?Number.parseInt(e,16):typeof e==`number`?e:NaN;return Number.isSafeInteger(t)&&t>0?t:1}var pY=1500,mY=`hanzo_iam_`,hY=`${mY}state`,gY=`${mY}code_verifier`,_Y=`${mY}access_token`,vY=`${mY}refresh_token`,yY=`${mY}id_token`,bY=`${mY}expires_at`,xY=`${mY}hold`,SY=`${mY}spent`,CY=`${mY}refresh`,wY=`${mY}refresh_lease`,TY=3e4,EY=50,DY=50,OY=`${gY}:`;function kY(e){return`${OY}${e}`}var AY=12;function jY(e,t){return`${t}.${e}`}function MY(e){let t=e.indexOf(`.`);if(t>0){let n=e.slice(0,t);if(/^\d+$/.test(n))return{issuedAt:Number(n),codeVerifier:e.slice(t+1)}}return{issuedAt:0,codeVerifier:e}}var NY=`hanzo_iam_login`,PY=`hanzo-iam`;function FY(e,t){let n=new URLSearchParams({code:t});e.state&&n.set(`state`,e.state);let r=e.redirectUri.includes(`?`)?`&`:`?`;return`${e.redirectUri}${r}${n.toString()}`}var IY=9e5,LY=class extends Error{constructor(e,t){super(e),this.code=t,this.name=`Refused`}code},RY=class extends Error{constructor(e,t=[],n){super(`this account signs in with a second factor`),this.directive=e,this.factors=t,this.request=n,this.name=`SecondFactor`}directive;factors;request},zY=class extends Error{constructor(e,t){super(`confirm the account's email address to finish signing in`),this.email=e,this.request=t,this.name=`EmailRequired`}email;request};function BY(e){return`recovery`in e?{recoveryCode:e.recovery}:{mfaType:e.type,passcode:e.passcode}}function VY(e){if(!Array.isArray(e))return[];let t=e.flatMap(e=>{let t=e??{};return typeof t.mfaType!=`string`||!t.mfaType?[]:[{type:t.mfaType,preferred:t.isPreferred===!0,remember:typeof t.mfaRememberInHours==`number`?t.mfaRememberInHours:0}]}),n=``;for(let e of t)(e.type===`email`||e.type===`sms`)&&(n===``||e.preferred)&&(n=e.type);return t.map(({type:e,remember:t})=>({type:e,sent:e===n,remember:t}))}var HY=class extends Error{constructor(){super(`no account holds this address; accept the terms to create one`),this.name=`SignupRequired`}},UY=class extends Error{constructor(e){super(`the session has ended: ${e}`),this.reason=e,this.name=`SessionEnded`}reason},WY=class extends Error{constructor(e,t){super(e),this.reason=t,this.name=`Unmatched`}reason};function GY(e){try{let t=e(),n=`${mY}probe`;return t.setItem(n,`1`),t.removeItem(n),t}catch{return null}}function KY(){return GY(()=>localStorage)??GY(()=>sessionStorage)}function qY(){let e=new Map;return{get length(){return e.size},clear:()=>e.clear(),getItem:t=>e.has(t)?e.get(t):null,key:t=>Array.from(e.keys())[t]??null,removeItem:t=>{e.delete(t)},setItem:(t,n)=>{e.set(t,String(n))}}}var JY=e=>new Promise(t=>setTimeout(t,e));function YY(){try{return typeof navigator<`u`&&navigator.locks?navigator.locks:null}catch{return null}}async function XY(e,t){let n=YY();if(n)return n.request(CY,t);let r=tY(),i=()=>e.getItem(wY)?.startsWith(`${r}.`)===!0;for(;;){let t=e.getItem(wY);if((t?Number(t.slice(t.indexOf(`.`)+1)):0)>Date.now()){await JY(DY);continue}if(e.setItem(wY,`${r}.${Date.now()+TY}`),await JY(EY),i())break}try{return await t()}finally{i()&&e.removeItem(wY)}}function ZY(e){try{let t=JSON.parse(e);return{error:typeof t.error==`string`?t.error:``,description:typeof t.error_description==`string`?t.error_description:``}}catch{return{error:``,description:``}}}async function QY(e,t){let n=await e.json().catch(()=>({}));if(!e.ok||n.status===`error`)throw new LY(typeof n.msg==`string`&&n.msg?n.msg:`${t} (${e.status})`,typeof n.code==`string`?n.code:``);return n}async function $Y(e,t){return(await QY(e,t)).data}var eX=class{config;storage;txStorage;redeemable;discoveryCache=null;callbackInFlight=null;held;refreshing=null;constructor(e){this.config=e;let t=KY();this.storage=e.storage??t??qY(),this.txStorage=t??this.storage,this.redeemable=t!==null||e.storage!==void 0,this.held=this.stored()}async getDiscovery(){if(this.discoveryCache)return this.discoveryCache;let e=iY(this.config.serverUrl);try{let t=await fetch(`${e}${nY.discovery}`,{headers:{Accept:`application/json`}});if(t.ok)return this.discoveryCache=await t.json(),this.discoveryCache}catch{}return this.discoveryCache={issuer:e,authorization_endpoint:aY(e,`authorize`),token_endpoint:aY(e,`token`),userinfo_endpoint:aY(e,`userinfo`),jwks_uri:aY(e,`jwks`),revocation_endpoint:aY(e,`revoke`),end_session_endpoint:aY(e,`logout`),response_types_supported:[`code`],grant_types_supported:[`authorization_code`,`refresh_token`],scopes_supported:[`openid`,`email`,`profile`]},this.discoveryCache}async tokenEndpoint(){return this.config.proxyBaseUrl?aY(this.config.proxyBaseUrl,`token`):(await this.getDiscovery()).token_endpoint}async userinfoEndpoint(){return this.config.proxyBaseUrl?aY(this.config.proxyBaseUrl,`userinfo`):(await this.getDiscovery()).userinfo_endpoint}async revocationEndpoint(){return this.config.proxyBaseUrl?aY(this.config.proxyBaseUrl,`revoke`):(await this.getDiscovery()).revocation_endpoint??aY(this.config.serverUrl,`revoke`)}async endSessionEndpoint(){return this.config.proxyBaseUrl?aY(this.config.proxyBaseUrl,`logout`):(await this.getDiscovery()).end_session_endpoint??aY(this.config.serverUrl,`logout`)}stashPkce(e,t){this.sweepStaleVerifiers(),this.txStorage.setItem(kY(e),jY(t,Date.now())),this.txStorage.setItem(hY,e),this.txStorage.setItem(gY,t)}sweepStaleVerifiers(){let e=[];for(let t=this.txStorage.length-1;t>=0;t--){let n=this.txStorage.key(t);if(!n||!n.startsWith(OY))continue;let r=this.txStorage.getItem(n);e.push({key:n,issuedAt:r?MY(r).issuedAt:0})}e.sort((e,t)=>t.issuedAt-e.issuedAt);for(let t of e.slice(AY-1))this.txStorage.removeItem(t.key)}async buildAuthorizeUrl(e){if(!this.redeemable)throw Error(`@hanzo/iam: this browser keeps neither localStorage nor sessionStorage, so the PKCE verifier cannot outlive the redirect to IAM and the callback would fail. Call usableStorage() before starting a login to catch this on the page.`);let t=await this.getDiscovery(),{codeVerifier:n,codeChallenge:r}=await eY(),i=tY();return this.stashPkce(i,n),{url:oY({endpoint:t.authorization_endpoint,serverUrl:this.config.serverUrl,clientId:this.config.clientId,redirectUri:this.config.redirectUri,state:i,scope:this.config.scope,codeChallenge:r,prompt:e?.prompt,params:e?.additionalParams}),codeVerifier:n,state:i}}async signinRedirect(e){let{url:t}=await this.buildAuthorizeUrl(e);window.location.replace(t.toString())}async getSigninUrl(e){let{url:t}=await this.buildAuthorizeUrl(e);return t.toString()}asking=null;parties=new Map;ask(e){this.asking=e&&e.state?{...e,state:e.state}:null}get client(){return this.asking?.clientId??this.config.clientId}async party(e){if(e===this.config.clientId)return{application:this.config.application??this.config.clientId,organization:this.config.organization};let t=this.parties.get(e);if(t)return t;let n=new URL(`${iY(this.config.serverUrl)}${rY.authApplication}`);n.searchParams.set(`clientId`,e);let r=await $Y(await fetch(n.toString(),{headers:{Accept:`application/json`}}),`could not read the application`)??{};if(typeof r.organization!=`string`||!r.organization)throw Error(`IAM did not name the application's organization`);let i={application:typeof r.name==`string`&&r.name?r.name:e,organization:r.organization};return this.parties.set(e,i),i}async own(){return this.asking??await this.mine()}async mine(){let{codeVerifier:e,codeChallenge:t}=await eY(),n=tY();return this.stashPkce(n,e),{clientId:this.config.clientId,redirectUri:this.config.redirectUri,scope:this.config.scope,state:n,codeChallenge:t,codeChallengeMethod:`S256`}}async credentialLogin(e){return this.post(e,await this.own())}async post(e,t,n){let r=this.config.proxyBaseUrl??this.config.serverUrl,i=new URL(n??`${iY(r)}${rY.login}`);i.searchParams.set(`clientId`,t.clientId),i.searchParams.set(`responseType`,`code`),i.searchParams.set(`redirectUri`,t.redirectUri),i.searchParams.set(`scope`,t.scope??`openid profile email`),t.state&&i.searchParams.set(`state`,t.state),t.nonce&&i.searchParams.set(`nonce`,t.nonce),t.prompt&&i.searchParams.set(`prompt`,t.prompt),t.loginHint&&i.searchParams.set(`login_hint`,t.loginHint),i.searchParams.set(`type`,`code`),t.codeChallenge&&(i.searchParams.set(`code_challenge`,t.codeChallenge),i.searchParams.set(`code_challenge_method`,t.codeChallengeMethod??`S256`));let a=await fetch(i.toString(),{method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`},credentials:`include`,body:JSON.stringify({type:`code`,...await this.party(t.clientId),autoSignin:!0,...e})}),o;try{o=await QY(a,`sign-in failed`)}catch(e){throw e instanceof LY&&e.code===`login_required`&&this.release(),e}let s=o.data;if(s===`NextMfa`||s===`RequiredMfa`)throw s===`NextMfa`&&this.hold(),new RY(s,VY(o.data2),t);if(s===`RequiredEmail`){this.hold();let e=o.data2??{};throw new zY(typeof e.email==`string`?e.email:``,t)}if(s===`SignupRequired`)throw new HY;if(typeof s!=`string`||s.length===0)throw Error(`IAM did not return an authorization code`);return this.release(),FY(t,s)}hold(){this.txStorage.setItem(xY,String(Date.now()+IY))}release(){this.txStorage.removeItem(xY)}holding(){return Number(this.txStorage.getItem(xY)??0)>Date.now()}async resume(e){if(this.holding())return null;try{return await this.credentialLogin(e?{loginHint:e}:{})}catch{return null}}loginWithPassword(e,t){return this.credentialLogin({username:e,password:t,signinMethod:`Password`})}loginWithCode(e,t){let n=e.includes(`@`);return this.credentialLogin({username:e,code:t,signinMethod:`Verification code`,...n?{email:e}:{phone:e}})}createAccountWithCode(e,t,n){return this.credentialLogin({username:e,code:t,signinMethod:`Verification code`,email:e,create:!0,terms:n.terms,aup:n.aup})}async verifyFactor(e,t,n=!1){if(!e.request)throw Error(`this second factor names no sign-in to finish`);try{return await this.post({...BY(t),enableMfaRemember:n},e.request)}catch(e){throw e instanceof LY&&this.release(),e}}async finishFederation(e){let t=this.config.proxyBaseUrl??this.config.serverUrl,n=(await QY(await fetch(`${iY(t)}${rY.federationMfa}`,{method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`},credentials:`include`,body:JSON.stringify(BY(e))}),`the sign-in could not be finished`)).data;if(typeof n!=`string`||!n)throw Error(`IAM did not say where the sign-in goes`);return n}confirmEmail(e,t){return this.post({passcode:t},e.request)}async changeEmail(e,t){try{await this.post({email:t},e.request)}catch(e){if(e instanceof zY)return e;throw e}throw Error(`IAM granted the sign-in without confirming the address`)}async resetPassword(e,t,n){await $Y(await fetch(`${iY(this.config.serverUrl)}${rY.password}`,{method:`PUT`,headers:{"Content-Type":`application/json`,Accept:`application/json`},body:JSON.stringify({organization:this.config.organization,username:e,code:t,password:n})}),`could not set the password`)}async acceptInvite(e,t,n){let r=await this.getValidAccessToken();if(!r)throw new LY(`please sign in first`,`login_required`);let i=await $Y(await fetch(`${iY(this.config.serverUrl)}${rY.accept}`,{method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`,Authorization:`Bearer ${r}`},body:JSON.stringify({owner:e,code:t,...n?{emailCode:n}:{}})}),`could not join the organization`)??{};if(i.joined!==!0)throw Error(`IAM did not join the organization`);return typeof i.org==`string`&&i.org?i.org:e}async acceptTerms(e){let t=await this.getValidAccessToken();if(!t)throw Error(`No valid access token — user must log in`);let n=this.config.proxyBaseUrl??this.config.serverUrl;await $Y(await fetch(`${iY(n)}${rY.terms}`,{method:`PUT`,headers:{"Content-Type":`application/json`,Accept:`application/json`,Authorization:`Bearer ${t}`},body:JSON.stringify({terms:e.terms,aup:e.aup})}),`could not record the acceptance`)}async addAddress(e,t){let n=await this.getValidAccessToken();if(!n)throw new LY(`please sign in first`,`login_required`);let r=this.config.proxyBaseUrl??this.config.serverUrl,i=await $Y(await fetch(`${iY(r)}${rY.address}`,{method:`PUT`,headers:{"Content-Type":`application/json`,Accept:`application/json`,Authorization:`Bearer ${n}`},body:JSON.stringify({clientId:this.client,address:e,code:t})}),`could not add the address`)??{};return{email:typeof i.email==`string`?i.email:``,phone:typeof i.phone==`string`?i.phone:``}}async sendLoginCode(e){let t=e.includes(`@`),n=this.config.proxyBaseUrl??this.config.serverUrl;await $Y(await fetch(`${iY(n)}${rY.sendCode}`,{method:`POST`,headers:{"Content-Type":`application/x-www-form-urlencoded`,Accept:`application/json`},body:new URLSearchParams({applicationId:`admin/${(await this.party(this.client)).application}`,dest:e,type:t?`email`:`phone`}).toString()}),`could not send code`)}async signup(e){let t=this.config.proxyBaseUrl??this.config.serverUrl,n=new URL(`${iY(t)}${rY.signup}`);return n.searchParams.set(`clientId`,this.config.clientId),await $Y(await fetch(n.toString(),{method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`},body:JSON.stringify({application:this.config.application??this.config.clientId,clientId:this.config.clientId,organization:this.config.organization,email:e.email,password:e.password,code:e.code,...e.name?{name:e.name}:{},...e.terms?{terms:e.terms.terms,aup:e.terms.aup}:{}})}),`sign-up failed`),this.loginWithPassword(e.email,e.password)}async methods(){let e=new URL(`${iY(this.config.serverUrl)}${rY.authMethods}`);e.searchParams.set(`clientId`,this.client);let t=await $Y(await fetch(e.toString(),{headers:{Accept:`application/json`}}),`could not read the sign-in methods`)??{},n=Array.isArray(t.oauth)?t.oauth:[];return{password:t.password===!0,code:t.code===!0,signup:t.signup===!0,wallet:t.web3===!0&&(!Array.isArray(t.web3Chains)||t.web3Chains.includes(cY.chain)),address:t.address===!0,providers:n.filter(e=>typeof e.name==`string`&&typeof e.type==`string`).map(e=>({name:e.name,type:e.type}))}}async identify(e){let t=this.config.proxyBaseUrl??this.config.serverUrl,n=await $Y(await fetch(`${iY(t)}${rY.authIdentifier}`,{method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`},body:JSON.stringify({clientId:this.client,identifier:e})}),`could not look up the address`)??{};return{account:n.account===!0,password:n.password===!0}}async handleCallback(e){let t=new URL(e??window.location.href),n=t.searchParams.get(`error`);if(n)throw this.isOwnAttempt(t.searchParams.get(`state`))?new LY(`OAuth error: ${t.searchParams.get(`error_description`)??n}`,n):new WY(`OAuth error on a sign-in this browser did not start. Restart sign-in.`,`foreign`);let r=t.searchParams.get(`code`);if(!r)throw new WY(`Missing authorization code in callback URL`,`empty`);let i=this.callbackInFlight;if(i&&i.code===r)return i.promise;let a=this.exchangeCode(t,r);return this.callbackInFlight={code:r,promise:a},a.catch(()=>{this.callbackInFlight?.promise===a&&(this.callbackInFlight=null)}),a}isOwnAttempt(e){if(!e)return!1;let t=kY(e);return this.txStorage.getItem(t)??this.storage.getItem(t)?!0:(this.txStorage.getItem(hY)??this.storage.getItem(hY))===e}async exchangeCode(e,t){let n=e.searchParams.get(`state`),r=n?kY(n):null,i=r?this.txStorage.getItem(r)??this.storage.getItem(r):null,a=i?MY(i).codeVerifier:null;if(a&&r)this.txStorage.removeItem(r),this.storage.removeItem(r),(this.txStorage.getItem(hY)===n||this.storage.getItem(hY)===n)&&(this.txStorage.removeItem(hY),this.txStorage.removeItem(gY),this.storage.removeItem(hY),this.storage.removeItem(gY));else{if(n&&this.spent().includes(n))throw new WY(`This sign-in already finished in this browser.`,`spent`);let e=this.txStorage.getItem(hY)??this.storage.getItem(hY);if(!e||n!==e)throw new WY(`OAuth state mismatch — stale, concurrent, or forged login. Restart sign-in.`,`foreign`);if(a=this.txStorage.getItem(gY)??this.storage.getItem(gY),!a)throw Error(`Missing PKCE code verifier — start sign-in via signinRedirect() or the embedded credential login.`);this.txStorage.removeItem(hY),this.txStorage.removeItem(gY),this.storage.removeItem(hY),this.storage.removeItem(gY)}let o=new URLSearchParams({grant_type:`authorization_code`,client_id:this.config.clientId,code:t,redirect_uri:this.config.redirectUri,code_verifier:a}),s=await this.tokenEndpoint(),c=await fetch(s,{method:`POST`,headers:{"Content-Type":`application/x-www-form-urlencoded`},body:o.toString()});if(!c.ok){let e=await c.text().catch(()=>``);throw Error(`Token exchange failed (${c.status}): ${e}`)}let l=await c.json();return this.storeTokens(l),n&&this.spend(n),tX(l)}spent(){try{let e=JSON.parse(this.txStorage.getItem(SY)??`[]`);return Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}catch{return[]}}spend(e){let t=this.spent().filter(t=>t!==e);t.push(e),this.txStorage.setItem(SY,JSON.stringify(t.slice(-12)))}refreshAccessToken(){return this.refreshing??=XY(this.storage,()=>this.refreshHeld()).finally(()=>{this.refreshing=null}),this.refreshing}async refreshHeld(){let e=this.stored(),t=e.access!==this.held.access||e.refresh!==this.held.refresh;if(e.access&&t&&!this.isTokenExpired()){this.held=e;let t=this.getExpiresAt();return{accessToken:e.access,refreshToken:e.refresh??void 0,idToken:this.getIdToken()??void 0,expiresIn:t===null?void 0:Math.max(0,Math.floor((t-Date.now())/1e3)),tokenType:`Bearer`}}if(!e.refresh)throw this.clearTokens(),new UY(`no refresh token is stored`);let n=await fetch(await this.tokenEndpoint(),{method:`POST`,headers:{"Content-Type":`application/x-www-form-urlencoded`},body:new URLSearchParams({grant_type:`refresh_token`,client_id:this.config.clientId,refresh_token:e.refresh}).toString()});if(!n.ok){let t=await n.text().catch(()=>``),{error:r,description:i}=ZY(t);throw r===`invalid_grant`?(this.storage.getItem(vY)===e.refresh&&this.clearTokens(),new UY(i||r)):Error(`Token refresh failed (${n.status}): ${t}`)}let r=await n.json();return this.storeTokens(r),tX(r)}stored(){return{access:this.storage.getItem(_Y),refresh:this.storage.getItem(vY)}}async signinPopup(e){let{url:t,state:n}=await this.buildAuthorizeUrl({additionalParams:e?.additionalParams}),r=e?.width??600,i=e?.height??700,a=window.screenX+(window.outerWidth-r)/2,o=window.screenY+(window.outerHeight-i)/2,s=new URL(this.config.redirectUri,window.location.href).origin;return new Promise((c,l)=>{let u=window.open(t.toString(),NY,`width=${r},height=${i},left=${a},top=${o},menubar=no,toolbar=no`);if(!u){l(Error(`Failed to open login popup — blocked by browser?`));return}let d=!1,f=null,p=()=>{if(!d){d=!0,window.removeEventListener(`message`,m),clearInterval(h),clearTimeout(g),f&&clearTimeout(f);try{u.closed||u.close()}catch{}}},m=e=>{if(d||e.origin!==s)return;let t=e.data;if(!t||typeof t!=`object`||t.source!==PY)return;if(typeof t.state!=`string`||t.state!==n){p(),l(Error(`OAuth state mismatch — possible CSRF (popup)`));return}if(t.error){p(),l(Error(`OAuth error: ${t.error}`));return}if(typeof t.code!=`string`||t.code.length===0){p(),l(Error(`Login popup returned no authorization code`));return}let r=t.code,i=t.state;p();let a=this.config.redirectUri.includes(`?`)?`&`:`?`,o=`${this.config.redirectUri}${a}code=${encodeURIComponent(r)}&state=${encodeURIComponent(i)}`;this.handleCallback(o).then(c,l)};window.addEventListener(`message`,m);let h=setInterval(()=>{d||!u.closed||f||(f=setTimeout(()=>{d||(p(),l(Error(`Login popup was closed before completing`)))},1e3))},300),g=setTimeout(()=>{d||(p(),l(Error(`Login popup timed out`)))},e?.timeoutMs??3e5)})}async loginWithWallet(e){let t=e?.provider??globalThis.ethereum;if(!t||typeof t.request!=`function`)throw Error(`No EIP-1193 wallet provider found (window.ethereum).`);let n=await t.request({method:`eth_requestAccounts`}),r=Array.isArray(n)?n[0]:void 0;if(typeof r!=`string`||!r)throw Error(`Wallet did not return an address`);let i=await lY(r),a=fY(await t.request({method:`eth_chainId`}).catch(()=>void 0)),o=await this.own(),s=iY(this.config.serverUrl),c=new URL(`${s}${rY.web3Nonce}`);c.searchParams.set(`chain`,cY.chain),c.searchParams.set(`address`,i),c.searchParams.set(`clientId`,o.clientId);let l=await $Y(await fetch(c.toString(),{headers:{Accept:`application/json`},credentials:`include`}),`could not start the wallet sign-in`);if(!l||typeof l.nonce!=`string`||typeof l.domain!=`string`)throw Error(`IAM did not return a sign-in challenge`);let u=uY(l,i,a),d=await t.request({method:`personal_sign`,params:[dY(u),i]});if(typeof d!=`string`||!d)throw Error(`Wallet did not return a signature`);return this.post({...cY,address:i,message:u,signature:d,clientId:o.clientId,redirectUri:o.redirectUri,scope:o.scope??`openid profile email`,state:o.state,nonce:o.nonce,codeChallenge:o.codeChallenge,codeChallengeMethod:o.codeChallengeMethod},o,`${s}${rY.web3Verify}`)}storeTokens(e){if(this.storage.setItem(_Y,e.access_token),e.refresh_token&&this.storage.setItem(vY,e.refresh_token),e.id_token&&this.storage.setItem(yY,e.id_token),e.expires_in){let t=Date.now()+e.expires_in*1e3;this.storage.setItem(bY,String(t))}else{let t=sY(e.access_token).exp;typeof t==`number`&&Number.isFinite(t)&&this.storage.setItem(bY,String(t*1e3))}this.held=this.stored()}getAccessToken(){return this.storage.getItem(_Y)}getRefreshToken(){return this.storage.getItem(vY)}getIdToken(){return this.storage.getItem(yY)}getExpiresAt(){let e=this.storage.getItem(bY);if(!e)return null;let t=Number(e);return Number.isFinite(t)?t:null}isTokenExpired(){let e=this.storage.getItem(bY);return e?Date.now()>=Number(e):!1}async getValidAccessToken(){let e=this.getAccessToken();if(e&&!this.isTokenExpired())return e;if(this.getRefreshToken())try{return(await this.refreshAccessToken()).accessToken}catch{return null}return null}clearTokens(){this.storage.removeItem(_Y),this.storage.removeItem(vY),this.storage.removeItem(yY),this.storage.removeItem(bY),this.held={access:null,refresh:null}}async logout(){let e=this.storage.getItem(_Y),t=this.storage.getItem(vY),n=this.storage.getItem(yY);this.clearTokens();let r=await Promise.race([(async()=>(await this.revoke(t,`refresh_token`,e),await this.revoke(e,`access_token`,e),this.endSessionEndpoint()))(),new Promise(e=>setTimeout(()=>e(aY(this.config.serverUrl,`logout`)),pY))]),i=new URL(r);n&&i.searchParams.set(`id_token_hint`,n),i.searchParams.set(`client_id`,this.config.clientId),this.config.postLogoutRedirectUri&&i.searchParams.set(`post_logout_redirect_uri`,this.config.postLogoutRedirectUri),window.location.href=i.toString()}async end(){let e=this.storage.getItem(_Y),t=this.storage.getItem(vY),n=this.storage.getItem(yY);this.clearTokens();let r=this.config.proxyBaseUrl??this.config.serverUrl,i=new URLSearchParams({client_id:this.config.clientId});n&&i.set(`id_token_hint`,n),await Promise.race([(async()=>{await this.revoke(t,`refresh_token`,e,aY(r,`revoke`)),await this.revoke(e,`access_token`,e,aY(r,`revoke`)),await fetch(aY(r,`logout`),{method:`POST`,credentials:`include`,redirect:`manual`,headers:{"Content-Type":`application/x-www-form-urlencoded`},body:i.toString()}).catch(()=>void 0)})(),new Promise(e=>setTimeout(e,pY))])}async revoke(e,t,n,r){if(e)try{await fetch(r??await this.revocationEndpoint(),{method:`POST`,credentials:`include`,headers:{"Content-Type":`application/x-www-form-urlencoded`,...n?{Authorization:`Bearer ${n}`}:{}},body:new URLSearchParams({token:e,token_type_hint:t,client_id:this.config.clientId}).toString()})}catch{}}async getUserInfo(){let e=await this.getValidAccessToken();if(!e)throw Error(`No valid access token — user must log in`);let t=await this.userinfoEndpoint(),n=await fetch(t,{headers:{Authorization:`Bearer ${e}`}});if(!n.ok)throw Error(`Userinfo fetch failed (${n.status})`);return await n.json()}async getUser(){if(!await this.getValidAccessToken())return null;let e=await this.getUserInfo();return{sub:e.sub??``,email:e.email,name:e.name,givenName:e.given_name,familyName:e.family_name,phoneNumber:e.phone_number,emailVerified:e.email_verified,picture:e.picture,owner:e.owner}}};function tX(e){return{accessToken:e.access_token,refreshToken:e.refresh_token,idToken:e.id_token,expiresIn:e.expires_in,tokenType:e.token_type,scope:e.scope}}var nX=`https://api.hanzo.ai`,rX={account:`${nX}/v1/team/account`,channels:`${nX}/v1/team/channels`,dms:`${nX}/v1/team/dms`,files:`${nX}/v1/team/files`,plan:`${nX}/v1/team/billing/plan`};`${JJ.issuer}${JJ.org}${JJ.app}`;var iX=`/login`,aX=`/auth/callback`,oX=`openid profile email offline_access`,sX=null,cX=()=>{let e=window.location.origin;return{serverUrl:JJ.issuer,clientId:YJ,redirectUri:`${e}${aX}`,postLogoutRedirectUri:`${e}${iX}`,scope:oX,proxyBaseUrl:void 0}},lX=()=>sX||(sX=new eX(cX()),sX),uX=new Map,dX=new Set,fX=0,pX=()=>{fX++;for(let e of dX)e()},mX=e=>(dX.add(e),()=>void dX.delete(e)),hX=e=>{let t=uX.get(e);return t||(t={phase:`loading`,started:!1},uX.set(e,t)),t},gX=(e,t)=>{let n=hX(e);n.started=!0,t().then(t=>{uX.set(e,{phase:`ready`,data:t,started:!0}),pX()},t=>{uX.set(e,{phase:`failure`,error:_X(t),started:!0}),pX()})},_X=e=>e instanceof Error?e:Error(String(e)),vX=(e,t,n={})=>{let r=n.enabled??!0;(0,V.useSyncExternalStore)(mX,()=>fX,()=>fX);let i=hX(e);r&&!i.started&&gX(e,t);let a=(0,V.useCallback)(()=>{uX.delete(e),gX(e,t),pX()},[e]);return{phase:i.phase,data:i.data,error:i.error,reload:a}},yX=e=>{if(!e)uX.clear();else for(let t of[...uX.keys()])t.startsWith(e)&&uX.delete(t);pX()},bX=(e,t)=>{uX.set(e,{phase:`ready`,data:t,started:!0}),pX()},xX=e=>uX.get(e)?.data,SX=(0,V.createContext)(null),CX=()=>{let e=(0,V.useContext)(SX);if(!e)throw Error(`useSession outside <Session>`);return e},wX=`team.back`,TX=()=>{let e=window.location.pathname+window.location.search;!e.startsWith(`/login`)&&!e.startsWith(`/auth/`)&&sessionStorage.setItem(wX,e)},EX=()=>{let e=sessionStorage.getItem(wX);return sessionStorage.removeItem(wX),e??`/`},DX=`team.silent`,OX=/bot|crawl|spider|slurp|preview|lighthouse|headless/i,kX=()=>{if(navigator.webdriver||OX.test(navigator.userAgent)||WJ(window.location.hostname))return!1;try{return!sessionStorage.getItem(DX)}catch{return!1}},AX=()=>{try{sessionStorage.setItem(DX,`1`)}catch{}},jX=new Set([`login_required`,`interaction_required`,`consent_required`,`account_selection_required`]),MX=6e4,NX=e=>{let t=e instanceof Error?e.message:String(e);return t.includes(`(401)`)||t.includes(`(403)`)},PX=({children:e})=>{let[t,n]=(0,V.useState)(`unknown`),[r,i]=(0,V.useState)(null),a=(0,V.useCallback)(async()=>{try{let e=await lX().getUser();i(e?FX(e):null),n(`in`),yX()}catch(e){if(NX(e)){lX().clearTokens(),i(null),n(`out`),yX();return}i(null),n(`in`),yX()}},[]),o=(0,V.useCallback)(()=>{i(null),n(`out`),yX()},[]),s=(0,V.useRef)(!1);(0,V.useEffect)(()=>{s.current||(s.current=!0,(async()=>{if(!window.location.pathname.startsWith(`/auth/`)){if(new URLSearchParams(window.location.search).get(`from`)===`logout`){AX(),lX().clearTokens(),o();return}if(await lX().getValidAccessToken().catch(()=>null))return a();if(kX()){AX(),TX();try{window.location.replace(UJ(await lX().getSigninUrl({additionalParams:{prompt:`none`}})));return}catch{}}o()}})())},[a,o]),(0,V.useEffect)(()=>{if(t!==`in`)return;let e=Date.now(),n=()=>{document.visibilityState!==`visible`||Date.now()-e<MX||(e=Date.now(),lX().getUserInfo().catch(e=>{NX(e)&&(lX().clearTokens(),o())}))};return document.addEventListener(`visibilitychange`,n),()=>document.removeEventListener(`visibilitychange`,n)},[t,o]);let c=(0,V.useCallback)(async(e=`login`,t={})=>{TX();let n=await lX().getSigninUrl(VJ(t.hint)),r=t.provider??new URLSearchParams(window.location.search).get(`provider`);window.location.replace(HJ(n,e,r))},[]),l=(0,V.useCallback)(e=>(TX(),lX().getSigninUrl(e)),[]),u=(0,V.useCallback)(()=>{let e=lX(),t=e.getAccessToken(),n=e.getRefreshToken();e.clearTokens(),o(),(async()=>{try{let e=async(e,n)=>{e&&await fetch(`/v1/iam/oauth/revoke`,{method:`POST`,headers:{"Content-Type":`application/x-www-form-urlencoded`,...t?{Authorization:`Bearer ${t}`}:{}},body:new URLSearchParams({token:e,token_type_hint:n,client_id:YJ}).toString()}).catch(()=>void 0)};await e(n,`refresh_token`),await e(t,`access_token`)}finally{window.location.assign(GJ(JJ.issuer,YJ,window.location.origin))}})()},[o]),d=(0,V.useCallback)(async()=>{let e=EX();if(jX.has(new URLSearchParams(window.location.search).get(`error`)??``))return e;if(!(await lX().handleCallback()).accessToken)throw Error(`the issuer returned no access token`);return await a(),e},[a]),f=(0,V.useMemo)(()=>({standing:t,who:r,depart:c,request:l,leave:u,land:d}),[t,r,c,l,u,d]);return(0,H.jsx)(SX.Provider,{value:f,children:e})},FX=e=>{let t=String(e.preferred_username??e.name??e.sub??``);return{id:String(e.sub??t),name:t,label:String(e.name??e.preferred_username??t),email:typeof e.email==`string`?e.email:void 0,avatar:typeof e.picture==`string`?e.picture:void 0}},IX=class extends Error{status;detail;constructor(e,t){super(t||`HTTP ${e}`),this.status=e,this.detail=t,this.name=`Refused`}},LX=async()=>{let e=await lX().getValidAccessToken().catch(()=>null);return e?{authorization:`Bearer ${e}`}:{}},RX=async(e,t)=>{let n=await fetch(e,{...t,headers:{accept:`application/json`,...t?.body?{"content-type":`application/json`}:{},...await LX(),...t?.headers}}),r=await n.text();if(!n.ok)throw new IX(n.status,BX(r)||n.statusText);if(r)try{return JSON.parse(r)}catch{throw new IX(n.status,`expected JSON, read ${r.length} bytes of ${n.headers.get(`content-type`)??`nothing`}`)}},zX=(e,t)=>RX(e,{method:`POST`,body:JSON.stringify(t)}),BX=e=>{try{let t=JSON.parse(e);return t.detail??t.message??``}catch{return e.slice(0,200)}},VX=class extends Error{code;constructor(e,t){super(t),this.code=e,this.name=`Denied`}get unauthorized(){return this.code.endsWith(`:Unauthorized`)}},HX=async(e,t={})=>{let n=await zX(rX.account,{method:e,params:t});if(n.error)throw new VX(n.error.code,n.error.params?.message??n.error.code);return n.result},UX=()=>HX(`getUserWorkspaces`),WX=e=>HX(`selectWorkspace`,{workspaceUrl:e}),GX={request:0,response:1,push:2},KX=16,qX=16,JX=24,YX=40,XX=0,ZX=4,QX=8,$X=16,eZ=new TextEncoder,tZ=new TextDecoder,nZ=e=>{let t=eZ.encode(e.method),n=e.payload,r=YX,i=r,a=t.length>0?r-24:0;t.length>0&&(r+=t.length);let o=r,s=n.length>0?r-32:0;n.length>0&&(r+=n.length);let c=new Uint8Array(r),l=new DataView(c.buffer);return c.set(eZ.encode(`ZAP\0`),0),l.setUint16(4,2,!0),l.setUint16(6,0,!0),l.setUint32(8,qX,!0),l.setUint32(12,r,!0),l.setUint32(16,e.id,!0),c[20]=e.kind,l.setUint32(24,a,!0),l.setUint32(28,t.length,!0),l.setUint32(32,s,!0),l.setUint32(36,n.length,!0),c.set(t,i),c.set(n,o),c},rZ=e=>{if(e.length<KX||tZ.decode(e.subarray(0,4))!==`ZAP\0`)return null;let t=new DataView(e.buffer,e.byteOffset,e.byteLength),n=t.getUint32(8,!0);return n<KX||n+JX>e.length?null:{id:t.getUint32(n+XX,!0),kind:e[n+ZX],method:tZ.decode(iZ(e,t,n+QX)),payload:iZ(e,t,n+$X).slice()}},iZ=(e,t,n)=>{if(n+8>e.length)return new Uint8Array;let r=t.getUint32(n,!0);if(r===0)return new Uint8Array;let i=t.getUint32(n+4,!0),a=n+r;return a<KX||a+i>e.length?new Uint8Array:e.subarray(a,a+i)},aZ=(e,t,n,r)=>nZ({id:e,kind:t,method:n,payload:eZ.encode(JSON.stringify(r))}),oZ=e=>tZ.decode(e.payload),sZ=e=>{if(e==null)return[];if(Array.isArray(e))return e;let t=e.value;if(Array.isArray(t))return t;throw Error(`findAll answered something that is not a list of documents`)},cZ=25e3,lZ=[500,1e3,2e3,5e3,1e4,2e4],uZ=class{slug;socket=null;next=1;waiting=new Map;listeners=new Set;standings=new Set;beat=null;retry=null;attempt=0;closed=!1;opening=null;standing=`idle`;entry=null;get account(){return this.entry?`hanzo:${this.entry.account}`:null}constructor(e){this.slug=e}watch(e){return this.listeners.add(e),()=>void this.listeners.delete(e)}observe(e){return this.standings.add(e),()=>void this.standings.delete(e)}async open(){if(this.socket?.readyState!==WebSocket.OPEN)return this.opening||=this.connect().finally(()=>{this.opening=null}),this.opening}close(){this.closed=!0,this.stopBeat(),this.retry&&clearTimeout(this.retry),this.socket?.close(),this.socket=null,this.settle(`idle`)}async find(e,t={},n={}){return sZ(await this.call(`findAll`,[e,t,n]))}async one(e,t){return(await this.find(e,t,{limit:1}))[0]}async write(e){await this.call(`tx`,[e])}async call(e,t=[]){await this.open();let n=this.socket;if(!n||n.readyState!==WebSocket.OPEN)throw Error(`the space plane is not open`);let r=this.next++;return new Promise((i,a)=>{this.waiting.set(r,{resolve:i,reject:a}),n.send(aZ(r,GX.request,e,{id:r,method:e,params:t}))})}async connect(){this.closed=!1,this.settle(`opening`);let e=await WX(this.slug);this.entry=e,await new Promise((t,n)=>{let r=new WebSocket(`${e.endpoint}/${e.token}`);r.binaryType=`arraybuffer`,this.socket=r,r.onmessage=e=>this.receive(e.data),r.onerror=()=>n(Error(`the space plane refused the connection`)),r.onclose=()=>{this.stopBeat();for(let e of this.waiting.values())e.reject(Error(`the space plane closed`));this.waiting.clear(),!this.closed&&(this.settle(`lost`),this.later())},r.onopen=()=>{this.call(`hello`,[]).then(()=>{this.attempt=0,this.settle(`live`),this.startBeat(),t()}).catch(n)}})}receive(e){if(typeof e==`string`)return;let t=rZ(new Uint8Array(e));if(!t)return;let n=oZ(t);if(n===`pong!`)return;let r;try{r=JSON.parse(n)}catch{return}if(t.kind===GX.push||r.id===void 0){let e=Array.isArray(r.result)?r.result:[];if(e.length)for(let t of this.listeners)t(e);return}let i=this.waiting.get(r.id);i&&(this.waiting.delete(r.id),r.error?i.reject(Error(String(r.error))):i.resolve(r.result))}startBeat(){this.stopBeat(),this.beat=setInterval(()=>{this.socket?.readyState===WebSocket.OPEN&&this.socket.send(nZ({id:0,kind:GX.request,method:``,payload:new TextEncoder().encode(`ping`)}))},cZ)}stopBeat(){this.beat&&clearInterval(this.beat),this.beat=null}later(){let e=lZ[Math.min(this.attempt++,lZ.length-1)];this.retry=setTimeout(()=>void this.open().catch(()=>this.later()),e)}settle(e){this.standing=e;for(let t of this.standings)t(e)}},dZ=(0,V.createContext)(null),fZ=()=>{let e=(0,V.useContext)(dZ);if(!e)throw Error(`useSpace outside <Space>`);return e},pZ=`team.space`,mZ=`${rX.account}/auth/openid`,hZ=({children:e})=>{let{standing:t}=CX(),[n,r]=(0,V.useState)(`unknown`),[i,a]=(0,V.useState)([]),[o,s]=(0,V.useState)(()=>localStorage.getItem(pZ)),[c,l]=(0,V.useState)(null),[u,d]=(0,V.useState)(`idle`),[f,p]=(0,V.useState)(null),m=(0,V.useRef)(!1),h=(0,V.useRef)(t);(0,V.useEffect)(()=>{h.current!==t&&(m.current=!1,yX()),h.current=t,!(t===`unknown`||m.current)&&(m.current=!0,(async()=>{let e=await(t===`in`?UX():Promise.resolve([])).catch(e=>e);if(e instanceof Error){p(e),r(e instanceof VX&&e.unauthorized?`stranger`:`refused`);return}if(a(e),e.length===0){r(`homeless`);return}s(t=>t&&e.some(e=>e.url===t)?t:e[0].url)})())},[t]),(0,V.useEffect)(()=>{if(!o)return;localStorage.setItem(pZ,o);let e=new uZ(o);l(e);let t=e.observe(d);return e.open().then(()=>r(`settled`)).catch(e=>{p(e),r(`refused`)}),()=>{t(),e.close()}},[o]),(0,V.useEffect)(()=>{if(c)return c.watch(e=>{for(let t of new Set(e.map(e=>String(e.objectClass??``))))t&&yX(t)})},[c]);let g=(0,V.useCallback)(e=>{yX(),s(e)},[]),_=(0,V.useMemo)(()=>i.find(e=>e.url===o)??null,[i,o]),v=(0,V.useMemo)(()=>({standing:n,all:i,current:_,org:_?.org??null,choose:g,plane:c,connection:u,refusal:f,enrolment:mZ}),[n,i,_,g,c,u,f]);return(0,H.jsx)(dZ.Provider,{value:v,children:e})},gZ={project:`tracker:class:Project`,issue:`tracker:class:Issue`,status:`tracker:class:IssueStatus`,milestone:`tracker:class:Milestone`,component:`tracker:class:Component`,person:`contact:class:Person`,channel:`chunter:class:Channel`,direct:`chunter:class:DirectMessage`,message:`chunter:class:ChatMessage`,reply:`chunter:class:ThreadMessage`,reaction:`activity:class:Reaction`,notice:`notification:class:ActivityInboxNotification`,tag:`tags:class:TagReference`},_Z={create:`core:class:TxCreateDoc`,update:`core:class:TxUpdateDoc`,remove:`core:class:TxRemoveDoc`},vZ={backlog:`tracker:issueStatusCategory:Backlog`,todo:`tracker:issueStatusCategory:Unstarted`,doing:`tracker:issueStatusCategory:Started`,done:`tracker:issueStatusCategory:Completed`,cancelled:`tracker:issueStatusCategory:Cancelled`},yZ={none:0,urgent:1,high:2,medium:3,low:4},bZ=e=>{let t=e?.name??``;if(!t.includes(`,`))return t.trim();let[n,r]=t.split(`,`);return[r,n].map(e=>e?.trim()).filter(Boolean).join(` `)},xZ=(e,t)=>e?`${e.identifier}-${t.number}`:`#${t.number}`,SZ=(e,...t)=>[e,...t.map(e=>e??``)].join(`|`),CZ=()=>{let e=Math.floor(Date.now()/1e3),t=crypto.getRandomValues(new Uint8Array(8));return e.toString(16).padStart(8,`0`)+Array.from(t,e=>e.toString(16).padStart(2,`0`)).join(``)},wZ=(e,t)=>({_id:CZ(),space:`core:space:Tx`,objectSpace:e,modifiedBy:t,modifiedOn:Date.now()}),TZ=(e,t,n,r,i=CZ())=>({...wZ(e,t),_class:_Z.create,objectId:i,objectClass:n,attributes:r}),EZ=(e,t,n)=>({...wZ(e.space,t),_class:_Z.update,objectId:e._id,objectClass:e._class,operations:n}),DZ=(e,t)=>({...wZ(e.space,t),_class:_Z.remove,objectId:e._id,objectClass:e._class}),OZ=`0123456789abcdefghijklmnopqrstuvwxyz`,kZ=0,AZ=35,jZ=OZ[18],MZ=(e,t)=>OZ.indexOf(e[t]),NZ=(e,t)=>{let n=e??``,r=t??``,i=0;for(;i<n.length&&i<r.length&&n[i]===r[i];)i++;return n.slice(0,i)+PZ(n.slice(i),r.slice(i))},PZ=(e,t)=>{if(t===``)return FZ(e);if(e===``)return IZ(t);let n=MZ(e,0),r=MZ(t,0);return r-n>1?OZ[Math.floor((n+r)/2)]:e[0]+FZ(e.slice(1))},FZ=e=>{for(let t=e.length-1;t>=0;t--)if(MZ(e,t)<AZ)return e.slice(0,t)+OZ[MZ(e,t)+1];return e+jZ},IZ=e=>{let t=MZ(e,0);return t>1?OZ[Math.floor(t/2)]:t===1?OZ[kZ]+jZ:OZ[kZ]+IZ(e.slice(1))},LZ=async(e,t)=>{let n=await e.find(gZ.notice,{space:t});return(n.length>0?n:await e.find(gZ.notice)).sort((e,t)=>t.modifiedOn-e.modifiedOn)},RZ=async(e,t)=>{let[n,r,i]=await Promise.all([e.find(gZ.channel,{space:t}),e.find(gZ.issue),e.find(gZ.project)]),a=n.length>0?n:await e.find(gZ.channel),o=new Map;for(let e of i)o.set(e._id,e.name);for(let e of a)o.set(e._id,`#${e.name}`);for(let e of r){let t=o.get(e.space);t&&o.set(e._id,t)}return o},zZ=(e,t,n)=>e.write(EZ(n,t,{isViewed:!0})),BZ=[vZ.backlog,vZ.todo,vZ.doing,vZ.done],VZ=e=>e.find(gZ.project),HZ=(e,t)=>e.one(gZ.project,{_id:t}),UZ=async(e,t)=>{let n=await e.find(gZ.status,t?{space:t}:{}),r=new Map(BZ.map((e,t)=>[e,t]));return n.sort((e,t)=>(r.get(e.category)??BZ.length)-(r.get(t.category)??BZ.length)||(e.rank??``).localeCompare(t.rank??``))},WZ=async(e,t)=>(await e.find(gZ.issue,t?{space:t}:{})).sort((e,t)=>(e.rank??``).localeCompare(t.rank??``)||e.number-t.number),GZ=e=>e.find(gZ.person),KZ=e=>e.find(gZ.tag),qZ=e=>e.find(gZ.component),JZ={projects:()=>SZ(gZ.project),statuses:e=>SZ(gZ.status,e),issues:e=>SZ(gZ.issue,e),people:()=>SZ(gZ.person),tags:()=>SZ(gZ.tag),components:()=>SZ(gZ.component)},YZ=(e,t,n,r,i={})=>e.write(EZ(n,t,{status:r,rank:NZ(i.before?.rank,i.after?.rank)})),XZ=(e,t,n,r)=>e.write(EZ(n,t,r)),ZZ=(e,t,n,r)=>e.write(TZ(n,t,gZ.issue,{title:r.title,status:r.status,priority:r.priority,number:r.number,rank:NZ(void 0,r.after?.rank),assignee:null,subIssues:0,comments:0,attachments:0,estimation:0,reportedTime:0,remainingTime:0})),QZ=[`all`,`task`,`chat`],$Z=(e,t)=>t===`all`?[...e]:e.filter(e=>e.kind===t),eQ=(e,t)=>e.reduce((e,n)=>e+ +(n.kind===t&&!n.seen),0),tQ=(e,t)=>e.map(e=>e.id===t?{...e,seen:!0}:e),nQ=`inbox`,rQ={list:()=>Promise.resolve([]),see:()=>Promise.resolve()},iQ=e=>{rQ=e,yX(nQ)},aQ=()=>vX(nQ,()=>rQ.list()),oQ=()=>(aQ().data??[]).reduce((e,t)=>e+ +!t.seen,0),sQ=e=>{let t=xX(nQ),n=t?.find(t=>t.id===e);t&&n&&!n.seen&&(bX(nQ,tQ(t,e)),rQ.see(e).catch(()=>bX(nQ,t)))},cQ=()=>{let e=xX(nQ);if(!e)return;let t=e.filter(e=>!e.seen);if(t.length!==0){bX(nQ,e.map(e=>e.seen?e:{...e,seen:!0}));for(let e of t)rQ.see(e.id).catch(()=>{})}},lQ=`team.aside`,uQ=`team.aside.kind`,dQ=()=>{try{return localStorage.getItem(lQ)===`yes`}catch{return!1}},fQ=()=>{try{return localStorage.getItem(uQ)===`inspector`?`inspector`:`inbox`}catch{return`inbox`}},pQ=dQ(),mQ=fQ(),hQ=new Set,gQ=()=>{for(let e of hQ)e()},_Q=e=>{if(e!==pQ){pQ=e;try{localStorage.setItem(lQ,e?`yes`:`no`)}catch{}gQ()}},vQ=e=>{let t=e!==mQ;mQ=e;try{localStorage.setItem(uQ,e)}catch{}pQ?t&&gQ():_Q(!0)},yQ=e=>{pQ&&mQ===e?_Q(!1):vQ(e)},bQ=()=>_Q(!1),xQ=()=>(0,V.useSyncExternalStore)(e=>(hQ.add(e),()=>hQ.delete(e)),()=>pQ,()=>!1),SQ=()=>(0,V.useSyncExternalStore)(e=>(hQ.add(e),()=>hQ.delete(e)),()=>mQ,()=>`inbox`),CQ=I(F,{name:`Card`,bg:`$background`,position:`relative`,rounded:`$true`}),wQ=`hanzo`,TQ=[{suffix:`hanzo.ai`,brand:`hanzo`},{suffix:`hanzo.id`,brand:`hanzo`},{suffix:`hanzo.chat`,brand:`hanzo`},{suffix:`hanzo.cloud`,brand:`hanzo`},{suffix:`lux.network`,brand:`lux`},{suffix:`lux.cloud`,brand:`lux`},{suffix:`lux.id`,brand:`lux`},{suffix:`lux.exchange`,brand:`lux`},{suffix:`zoo.ngo`,brand:`zoo`},{suffix:`zoo.network`,brand:`zoo`},{suffix:`zoo.cloud`,brand:`zoo`},{suffix:`zoolabs.id`,brand:`zoo`},{suffix:`pars.network`,brand:`pars`},{suffix:`pars.cloud`,brand:`pars`},{suffix:`pars.id`,brand:`pars`},{suffix:`pars.vote`,brand:`pars`},{suffix:`7stars.dev`,brand:`7stars`},{suffix:`yotoda.tech`,brand:`yotoda`}];function EQ(e){return(e??``).trim().toLowerCase().replace(/:\d+$/,``).replace(/\.+$/,``)}function DQ(e){let t=EQ(e);if(t){for(let e of TQ)if(t===e.suffix||t.endsWith(`.`+e.suffix))return e.brand}return wQ}var OQ=`<svg role="img" aria-label="Hanzo" viewBox="0 0 67 67" xmlns="http://www.w3.org/2000/svg">
38
+ <!-- Origami fold-in → hover: one 3-D turn → press: squash. Pure CSS, no JS. Canonical 7-path shaded H. -->
39
+
40
+ <style>.o{fill:currentColor;opacity:0;transform-box:fill-box;transform-origin:left center;animation:fold 0.42s cubic-bezier(.16,1,.3,1) forwards}
41
+ .s{fill:currentColor;opacity:.55}
42
+ @keyframes fold{from{opacity:0;transform:perspective(320px) rotateY(90deg)}to{opacity:1;transform:none}}
43
+ .o0{animation-delay:0.00s}.o1{animation-delay:0.06s}.o2{animation-delay:0.12s}.o3{animation-delay:0.18s}.o4{animation-delay:0.24s}
44
+ /* interaction — pure CSS, no JS: hover = one graceful turn (returns to rest), press = squash */
45
+ .hanzo-hov{transform-box:view-box;transform-origin:33.5px 33.5px}
46
+ .hanzo-prs{transform-box:view-box;transform-origin:33.5px 33.5px;transition:transform .22s cubic-bezier(.22,1,.36,1)}
47
+ svg:hover .hanzo-hov{animation:hanzoTurn 0.85s cubic-bezier(.45,0,.2,1)}
48
+ svg:active .hanzo-prs{transform:scale(.92)}
49
+ @keyframes hanzoTurn{0%{transform:perspective(300px) rotateY(0)}100%{transform:perspective(300px) rotateY(360deg)}}
50
+ @media (prefers-reduced-motion:reduce){.hanzo-hov,.hanzo-prs{animation:none!important;transform:none!important}.o{opacity:1;animation:none;transform:none}}
51
+ </style>
52
+ <g class="hanzo-hov"><g class="hanzo-prs">
53
+ <path class="o o0" d="M22.21 0H0V22.3184H22.21V0Z"/>
54
+ <path class="o o1" d="M66.7198 0H44.5098V22.3184H66.7198V0Z"/>
55
+ <path class="o o1 s" d="M66.6753 22.3185L44.5098 20.0822V22.3185H66.6753Z"/>
56
+ <path class="o o2" d="M66.7038 22.3184H22.2534L0.0878906 44.6367H44.4634L66.7038 22.3184Z"/>
57
+ <path class="o o3" d="M22.21 67V44.6369H0V67H22.21Z"/>
58
+ <path class="o o3 s" d="M0 44.6369L22.21 46.8285V44.6369H0Z"/>
59
+ <path class="o o4" d="M66.7198 67V44.6369H44.5098V67H66.7198Z"/>
60
+ </g></g>
61
+ </svg>`,kQ=`0 0 67 67`,AQ=[`M22.21 67V44.6369H0V67H22.21Z`,`M66.7038 22.3184H22.2534L0.0878906 44.6367H44.4634L66.7038 22.3184Z`,`M22.21 0H0V22.3184H22.21V0Z`,`M66.7198 0H44.5098V22.3184H66.7198V0Z`,`M66.7198 67V44.6369H44.5098V67H66.7198Z`],jQ=[`M0 44.6369L22.21 46.8285V44.6369H0Z`,`M66.6753 22.3185L44.5098 20.0822V22.3185H66.6753Z`],MQ=`<path d="${AQ[0]}"/><path class="shade" fill="#DDDDDD" d="${jQ[0]}"/><path d="${AQ[1]}"/><path d="${AQ[2]}"/><path d="${AQ[3]}"/><path class="shade" fill="#DDDDDD" d="${jQ[1]}"/><path d="${AQ[4]}"/>`;function NQ(){return`<svg viewBox="0 0 67 67" xmlns="http://www.w3.org/2000/svg">
62
+ <path d="M22.21 67V44.6369H0V67H22.21Z" fill="#ffffff"/>
63
+ <path d="M0 44.6369L22.21 46.8285V44.6369H0Z" fill="#DDDDDD"/>
64
+ <path d="M66.7038 22.3184H22.2534L0.0878906 44.6367H44.4634L66.7038 22.3184Z" fill="#ffffff"/>
65
+ <path d="M22.21 0H0V22.3184H22.21V0Z" fill="#ffffff"/>
66
+ <path d="M66.7198 0H44.5098V22.3184H66.7198V0Z" fill="#ffffff"/>
67
+ <path d="M66.6753 22.3185L44.5098 20.0822V22.3185H66.6753Z" fill="#DDDDDD"/>
68
+ <path d="M66.7198 67V44.6369H44.5098V67H66.7198Z" fill="#ffffff"/>
69
+ </svg>`}function PQ(){return`<svg viewBox="0 0 67 67" xmlns="http://www.w3.org/2000/svg">
70
+ <path d="M22.21 67V44.6369H0V67H22.21Z" fill="#000000"/>
71
+ <path d="M0 44.6369L22.21 46.8285V44.6369H0Z" fill="#000000"/>
72
+ <path d="M66.7038 22.3184H22.2534L0.0878906 44.6367H44.4634L66.7038 22.3184Z" fill="#000000"/>
73
+ <path d="M22.21 0H0V22.3184H22.21V0Z" fill="#000000"/>
74
+ <path d="M66.7198 0H44.5098V22.3184H66.7198V0Z" fill="#000000"/>
75
+ <path d="M66.6753 22.3185L44.5098 20.0822V22.3185H66.6753Z" fill="#000000"/>
76
+ <path d="M66.7198 67V44.6369H44.5098V67H66.7198Z" fill="#000000"/>
77
+ </svg>`}function FQ(){return`<svg viewBox="0 0 67 67" xmlns="http://www.w3.org/2000/svg">
78
+ <path d="M22.21 67V44.6369H0V67H22.21Z" fill="#ffffff"/>
79
+ <path d="M0 44.6369L22.21 46.8285V44.6369H0Z" fill="#DDDDDD"/>
80
+ <path d="M66.7038 22.3184H22.2534L0.0878906 44.6367H44.4634L66.7038 22.3184Z" fill="#ffffff"/>
81
+ <path d="M22.21 0H0V22.3184H22.21V0Z" fill="#ffffff"/>
82
+ <path d="M66.7198 0H44.5098V22.3184H66.7198V0Z" fill="#ffffff"/>
83
+ <path d="M66.6753 22.3185L44.5098 20.0822V22.3185H66.6753Z" fill="#DDDDDD"/>
84
+ <path d="M66.7198 67V44.6369H44.5098V67H66.7198Z" fill="#ffffff"/>
85
+ </svg>`}function IQ(){let e=e=>`<path d="${e}" fill="#000000"/>`,t=e=>`<path class="shade" d="${e}" fill="#222222"/>`;return`<svg viewBox="0 0 67 67" xmlns="http://www.w3.org/2000/svg"><rect width="67" height="67" fill="#ffffff"/>`+e(AQ[0])+t(jQ[0])+e(AQ[1])+e(AQ[2])+e(AQ[3])+t(jQ[1])+e(AQ[4])+`</svg>`}function LQ(){return`<svg viewBox="0 0 67 67" xmlns="http://www.w3.org/2000/svg">
86
+ <path d="M22.21 67V44.6369H0V67H22.21Z" fill="currentColor"/>
87
+ <path d="M0 44.6369L22.21 46.8285V44.6369H0Z" fill="currentColor"/>
88
+ <path d="M66.7038 22.3184H22.2534L0.0878906 44.6367H44.4634L66.7038 22.3184Z" fill="currentColor"/>
89
+ <path d="M22.21 0H0V22.3184H22.21V0Z" fill="currentColor"/>
90
+ <path d="M66.7198 0H44.5098V22.3184H66.7198V0Z" fill="currentColor"/>
91
+ <path d="M66.6753 22.3185L44.5098 20.0822V22.3185H66.6753Z" fill="currentColor"/>
92
+ <path d="M66.7198 67V44.6369H44.5098V67H66.7198Z" fill="currentColor"/>
93
+ </svg>`}var RQ=64,zQ=2,BQ=48/67,VQ=8,HQ=4/BQ,UQ=(e,t)=>` <defs><g id="m">
94
+ ${AQ.map(e=>` <path d="${e}"/>`).join(`
95
+ `)}
96
+ </g></defs>
97
+ <g transform="translate(${VQ} ${VQ}) scale(${BQ.toFixed(4)})">
98
+ <use href="#m" ${e} stroke-width="${HQ.toFixed(4)}" stroke-miterlimit="${zQ}"/>
99
+ <use href="#m" ${t}/>
100
+ </g>`;function WQ(){return`<svg viewBox="0 0 ${RQ} ${RQ}" xmlns="http://www.w3.org/2000/svg">
101
+ <style>
102
+ .core { fill: #ffffff }
103
+ .rim { fill: #000000; stroke: #000000 }
104
+ @media (prefers-color-scheme: light) { .core { fill: #000000 } }
105
+ @media (prefers-color-scheme: dark) { .rim { fill: #ffffff; stroke: #ffffff } }
106
+ </style>
107
+ ${UQ(`class="rim"`,`class="core"`)}
108
+ </svg>`}function GQ(e={}){let{variant:t=`current`}=e,n=``;switch(t){case`mono`:n=PQ();break;case`white`:n=FQ();break;case`light`:n=IQ();break;case`current`:n=LQ();break;case`favicon`:n=WQ();break;case`color`:n=NQ();break;default:n=LQ()}return`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(n)))}`}WQ(),GQ(),GQ({variant:`mono`}),GQ({variant:`white`}),GQ({variant:`favicon`});function KQ(){return OQ}function qQ(){return`data:image/svg+xml;base64,`+btoa(unescape(encodeURIComponent(OQ)))}qQ();var JQ=`.hanzo-motion{display:inline-flex;align-items:center;color:inherit}
109
+ .hanzo-motion .hanzo-mark{display:block;line-height:0;width:1.25em;height:1.25em;animation:hanzo-flip .5s cubic-bezier(.16,1,.3,1) .2s backwards,hanzo-breathe 6s ease-in-out 3.2s infinite}
110
+ .hanzo-motion .hanzo-mark svg{display:block;width:100%;height:100%}
111
+ .hanzo-motion .hanzo-word{overflow:hidden;display:inline-block;margin-left:.5em}
112
+ .hanzo-motion .hanzo-word>span{display:inline-block;white-space:nowrap;font-weight:600;transform:translateX(-102%);transition:transform .3s ease-out;animation:hanzo-word 2.8s ease-out}
113
+ .hanzo-motion:hover .hanzo-word>span{transform:translateX(0)}
114
+ @keyframes hanzo-flip{from{opacity:0;transform:perspective(320px) rotateY(180deg) scale(.6)}to{opacity:1;transform:none}}
115
+ @keyframes hanzo-breathe{0%,100%{transform:scale(1)}50%{transform:scale(1.04)}}
116
+ @keyframes hanzo-word{0%,40%{transform:translateX(-102%)}55%,82%{transform:translateX(0)}100%{transform:translateX(-102%)}}
117
+ @media (prefers-reduced-motion:reduce){.hanzo-motion .hanzo-mark,.hanzo-motion .hanzo-word>span{animation:none!important}.hanzo-motion .hanzo-word>span{transition:none}}`,YQ=({variant:e=`current`,size:t=64,className:n,style:r,animated:i=!1,wordmark:a=`Hanzo`})=>{if(i)return(0,H.jsxs)(`span`,{className:n,style:r,children:[(0,H.jsx)(`style`,{dangerouslySetInnerHTML:{__html:JQ}}),(0,H.jsxs)(`span`,{className:`hanzo-motion`,children:[(0,H.jsx)(`span`,{className:`hanzo-mark`,style:{width:t,height:t},dangerouslySetInnerHTML:{__html:LQ()}}),(0,H.jsx)(`span`,{className:`hanzo-word`,children:(0,H.jsx)(`span`,{children:a})})]})]});let o=``;switch(e){case`mono`:o=PQ();break;case`white`:o=FQ();break;case`light`:o=IQ();break;case`current`:o=LQ();break;case`favicon`:o=WQ();break;case`animated`:o=KQ();break;case`color`:o=NQ();break;default:o=LQ()}return(0,H.jsx)(`div`,{className:n,style:{width:t,height:t,...r},dangerouslySetInnerHTML:{__html:o}})},XQ={viewBox:kQ,content:MQ},ZQ={hanzo:XQ,lux:{viewBox:`0 0 100 100`,content:`<path d="M50 85 L15 25 L85 25 Z"/>`},zoo:{viewBox:`0 0 1024 1024`,colored:!0,content:`<defs><clipPath id="zooClip"><circle cx="512" cy="511" r="270"/></clipPath><clipPath id="zooGClip"><circle cx="513" cy="369" r="234"/></clipPath><clipPath id="zooRClip"><circle cx="365" cy="595" r="234"/></clipPath></defs><g clip-path="url(#zooClip)"><circle cx="513" cy="369" r="234" fill="#00A652"/><circle cx="365" cy="595" r="234" fill="#ED1C24"/><circle cx="643" cy="595" r="234" fill="#2E3192"/><g clip-path="url(#zooGClip)"><circle cx="365" cy="595" r="234" fill="#FCF006"/><circle cx="643" cy="595" r="234" fill="#01ACF1"/></g><g clip-path="url(#zooRClip)"><circle cx="643" cy="595" r="234" fill="#EA018E"/></g><g clip-path="url(#zooGClip)"><g clip-path="url(#zooRClip)"><circle cx="643" cy="595" r="234" fill="#FFFFFF"/></g></g></g>`},pars:{viewBox:`-120 -120 240 240`,content:`<path d="M0,-100 L30,-60 L100,-40 L60,0 L100,40 L30,60 L0,100 L-30,60 L-100,40 L-60,0 L-100,-40 L-30,-60 Z" fill="none" stroke="currentColor" stroke-width="4" stroke-linejoin="round"/><path d="M0,-70 L22,-42 L70,-28 L42,0 L70,28 L22,42 L0,70 L-22,42 L-70,28 L-42,0 L-70,-28 L-22,-42 Z" fill="currentColor" fill-opacity="0.15" stroke="currentColor" stroke-width="3" stroke-linejoin="round"/><circle r="55" fill="none" stroke="currentColor" stroke-width="1.5" opacity="0.4"/><circle r="35" fill="none" stroke="currentColor" stroke-width="1.5" opacity="0.4"/><circle r="8" fill="currentColor"/>`},"7stars":XQ,yotoda:XQ},QQ={accent1:`#000000`,surface1:`#FFFFFF`,surface2:`#FAFAFA`,neutral1:`#0A0A0A`,neutral2:`rgba(10, 10, 10, 0.6)`},$Q={accent1:`#FFFFFF`,surface1:`#000000`,surface2:`#111111`,neutral1:`#FAFAFA`,neutral2:`rgba(250, 250, 250, 0.6)`},e$=(e,t)=>`https://cdn.jsdelivr.net/npm/${e}/${t}`,t$={id:`hanzo`,name:`Hanzo`,title:`Hanzo AI`,tagline:`Enterprise AI infrastructure and frontier models`,legalName:`Hanzo AI Inc.`,domain:`hanzo.ai`,docsDomain:`docs.hanzo.ai`,adminDomain:`hanzo.ai`,accentColor:`#FFFFFF`,theme:{light:QQ,dark:$Q},social:{twitter:`https://x.com/hanzoai`,github:`https://github.com/hanzoai`,discord:`https://discord.gg/CJCyAsm9Vr`,linkedin:`https://linkedin.com/company/hanzoai`},mark:ZQ.hanzo,logoUrl:e$(`@hanzo/brand@1.4.7`,`assets/logo/logo.svg`),faviconUrl:e$(`@hanzo/brand@1.4.7`,`assets/logo/favicon.svg`)},n$={hanzo:t$,lux:{id:`lux`,name:`Lux`,title:`Lux Network`,tagline:`High-performance, post-quantum blockchain infrastructure`,legalName:`Lux Industries Inc.`,domain:`lux.network`,docsDomain:`docs.lux.network`,adminDomain:`lux.network`,accentColor:`#FFFFFF`,theme:{light:QQ,dark:$Q},social:{twitter:`https://x.com/luxdefi`,github:`https://github.com/luxfi`,discord:`https://discord.gg/lux`},mark:ZQ.lux,logoUrl:e$(`@luxfi/logo@1.0.8`,`svg/lux-icon-white.svg`),faviconUrl:e$(`@luxfi/logo@1.0.8`,`svg/lux-favicon.svg`)},zoo:{id:`zoo`,name:`Zoo`,title:`Zoo`,tagline:`Open, decentralized AI & science research network`,legalName:`Zoo Labs Foundation`,domain:`zoo.ngo`,docsDomain:`docs.zoo.ngo`,adminDomain:`zoo.ngo`,accentColor:`#01ACF1`,theme:{light:{...QQ,accent1:`#01ACF1`},dark:{...$Q,accent1:`#01ACF1`}},social:{twitter:`https://x.com/zoo_labs`,github:`https://github.com/zooai`,discord:`https://discord.gg/zoo`},mark:ZQ.zoo,logoUrl:e$(`@zooai/brand@1.4.1`,`assets/logo/logo.svg`),faviconUrl:e$(`@zooai/brand@1.4.1`,`assets/logo/logo.svg`)},pars:{id:`pars`,name:`Pars`,title:`Pars Network`,tagline:`A sovereign, verifiable identity layer for the Pars community`,legalName:`Parsis Foundation`,domain:`pars.network`,docsDomain:`docs.pars.network`,adminDomain:`pars.network`,accentColor:`#caa24a`,theme:{light:{...QQ,accent1:`#caa24a`},dark:{...$Q,accent1:`#caa24a`}},social:{twitter:`https://x.com/parsnetwork`,github:`https://github.com/parsdao`},mark:ZQ.pars,logoUrl:e$(`@parsdao/brand@1.0.1`,`assets/logo/logo.svg`),faviconUrl:e$(`@parsdao/brand@1.0.1`,`assets/logo/logo.svg`)},"7stars":{id:`7stars`,name:`7Stars`,title:`7Stars`,tagline:`Cloud, powered by Hanzo`,legalName:`7Stars`,domain:`7stars.dev`,docsDomain:`docs.7stars.dev`,adminDomain:`7stars.dev`,accentColor:`#FFFFFF`,theme:{light:QQ,dark:$Q},social:{},mark:ZQ[`7stars`],logoUrl:t$.logoUrl,faviconUrl:t$.faviconUrl},yotoda:{id:`yotoda`,name:`Yotoda`,title:`Yotoda`,tagline:`Cloud, powered by Hanzo`,legalName:`Yotoda`,domain:`yotoda.tech`,docsDomain:`docs.yotoda.tech`,adminDomain:`yotoda.tech`,accentColor:`#FFFFFF`,theme:{light:QQ,dark:$Q},social:{},mark:ZQ.yotoda,logoUrl:t$.logoUrl,faviconUrl:t$.faviconUrl}},r$=()=>typeof window>`u`?wQ:DQ(window.location.hostname);function i$({size:e=20,brand:t,wordmark:n,animated:r=!0,color:i=`currentColor`}){let a=t??r$(),o=ZQ[a]??ZQ.hanzo,s=n$[a]?.name??n$.hanzo.name,c=n===!1?s:n??s;if(typeof r==`function`){let t=r().replace(`<svg `,`<svg width="100%" height="100%" `);return(0,H.jsx)(`span`,{role:`img`,"aria-label":c,style:{width:e,height:e,display:`inline-flex`,flexShrink:0},dangerouslySetInnerHTML:{__html:t}})}return r&&a===`hanzo`?(0,H.jsx)(YQ,{animated:!0,size:e,wordmark:n===!1?void 0:c}):(0,H.jsx)(`svg`,{width:e,height:e,viewBox:o.viewBox,role:`img`,"aria-label":c,...o.colored?null:{fill:i},style:{display:`block`,flexShrink:0},dangerouslySetInnerHTML:{__html:o.content}})}function a$(e){let t=e.trim();if(!t||/^(https?:|data:|\/)/.test(t)||!/[\p{Extended_Pictographic}\p{Regional_Indicator}]/u.test(t))return!1;let n=Intl.Segmenter;return(n?[...new n().segment(t)].length:[...t].length)<=3}function o$(e){return(e.trim().split(/[\s._/-]+/).filter(Boolean).slice(0,2).map(e=>e[0]??``).join(``)||e.trim().slice(0,2)).toUpperCase()}var s$=e=>e<26?`$1`:e<34?`$2`:e<44?`$4`:`$6`;function c$({org:e,size:t=22,maxW:n}){let[r,i]=(0,V.useState)(!1);return(0,V.useEffect)(()=>i(!1),[e.logo]),e.logo&&a$(e.logo)?(0,H.jsx)(F,{width:t,height:t,items:`center`,justify:`center`,style:{flexShrink:0},children:(0,H.jsx)(U,{fontSize:Math.round(t*.72),lineHeight:t,children:e.logo.trim()})}):e.logo&&!r?(0,H.jsx)(`img`,{src:e.logo,alt:``,onError:()=>i(!0),style:{height:t,width:n?`auto`:t,maxWidth:n??t,objectFit:`contain`,display:`block`,borderRadius:6,flexShrink:0}}):(0,H.jsx)(F,{width:t,height:t,rounded:`$3`,bg:`$edge`,items:`center`,justify:`center`,style:{flexShrink:0},children:(0,H.jsx)(U,{fontSize:s$(t),fontWeight:`800`,color:`$ink`,children:o$(e.displayName||e.name)})})}var l$=`theme`;function u$(){if(typeof document>`u`)return;let e=document.documentElement;if(e.classList.contains(`dark`))return`dark`;if(e.classList.contains(`light`))return`light`;try{let e=window.localStorage.getItem(l$);if(e===`light`||e===`dark`)return e}catch{}}function d$(e){if(typeof document>`u`)return;let t=document.documentElement;t.classList.toggle(`dark`,e===`dark`),t.classList.toggle(`light`,e===`light`),t.style.colorScheme=e;try{window.localStorage.setItem(l$,e)}catch{}}function f$({theme:e,defaultTheme:t,onToggle:n,onThemeChange:r,size:i=`$2`,label:a}){let o=e!==void 0,[s,c]=(0,V.useState)(()=>e??t??u$()??`dark`),l=(o?e:s)===`dark`,u=He(),{t:d}=Ye();return(0,H.jsx)(se,{size:i,chromeless:!0,icon:l?(0,H.jsx)(bb,{size:16}):(0,H.jsx)(sb,{size:16}),onPress:()=>{let e=l?`light`:`dark`;u({component:`ThemeToggle`,action:`change`,value:e}),o||(c(e),d$(e)),n?.(e),r?.(e)},"aria-label":a??d(l?`Switch to light theme`:`Switch to dark theme`)})}var p$=(0,V.lazy)(()=>b(()=>import(`./ThemeToggleNext-D0-PyTrG.js`),__vite__mapDeps([0,1,2]))),m$=class extends V.Component{state={failed:!1};static getDerivedStateFromError(){return{failed:!0}}render(){return this.state.failed?this.props.fallback:this.props.children}};function h$(e){if(e.theme!==void 0||e.onToggle!==void 0||e.onThemeChange!==void 0)return(0,H.jsx)(f$,{...e});let t=(0,H.jsx)(f$,{...e});return(0,H.jsx)(m$,{fallback:t,children:(0,H.jsx)(V.Suspense,{fallback:t,children:(0,H.jsx)(p$,{size:e.size,label:e.label})})})}var g$=(0,V.createContext)({}),_$=()=>(0,V.useContext)(g$);function v$(e){let t=typeof e?.status==`number`?e.status:0,n=e instanceof Error?e.message:String(e);return t===503?{kind:`not-initialized`,message:n}:t===404||t===405?{kind:`unavailable`,message:n}:t===501?{kind:`not-implemented`,message:n}:t===402?{kind:`billing`,message:n}:t===401?{kind:`signin`,message:n}:t===403?{kind:`access`,message:n}:{kind:`error`,message:n}}var y$={"not-initialized":We(`Backend not initialized`),unavailable:We(`Not available on this deployment yet`),"not-implemented":We(`Not yet available`),access:We(`Not enabled for your account`),signin:We(`Your session expired`),billing:We(`Add credits to continue`),error:We(`Could not reach the backend`)},b$={"not-initialized":We(`The /v1 route is mounted but its runtime (or the console API key it proxies to) is not configured on this deployment yet. Real data appears here once it is — no placeholder data is shown.`),unavailable:We(`This endpoint is not mounted at the gateway on this host yet. The view lights up automatically once the route is live.`),"not-implemented":We(`This capability is planned but not wired yet. The backend answers honestly rather than pretending it worked — nothing here is fabricated, and the view lights up automatically once it ships.`),access:We(`You're signed in, but this isn't enabled for your organization on this deployment, or it's an admin-only surface. It appears here automatically once your account has access — nothing is fabricated.`),signin:We(`Your session has expired or isn’t recognized here. Sign in again to continue where you left off.`),billing:``,error:``};function x$({state:e,onRetry:t,hint:n}){let{signIn:r,addCredits:i}=_$(),{t:a}=Ye();return(0,H.jsxs)(CQ,{borderWidth:1,borderColor:`$borderColor`,p:`$4`,gap:`$2`,maxW:640,children:[(0,H.jsxs)(P,{gap:`$2`,items:`center`,children:[(0,H.jsx)(Eb,{size:16}),(0,H.jsx)(U,{fontSize:`$4`,fontWeight:`700`,children:a(y$[e.kind])})]}),(0,H.jsx)(U,{fontSize:`$3`,color:`$quiet`,children:b$[e.kind]?a(b$[e.kind]):e.message}),n?(0,H.jsx)(U,{fontSize:`$2`,color:`$soft`,children:n}):null,e.kind===`signin`&&r?(0,H.jsx)(se,{size:`$2`,theme:`light`,self:`flex-start`,onPress:r,children:a(`Sign in again`)}):e.kind===`billing`&&i?(0,H.jsxs)(P,{gap:`$2`,items:`center`,flexWrap:`wrap`,children:[(0,H.jsx)(se,{size:`$2`,theme:`light`,self:`flex-start`,icon:(0,H.jsx)(ky,{size:14}),onPress:i,children:a(`Add credits`)}),t?(0,H.jsx)(se,{size:`$2`,self:`flex-start`,onPress:t,children:a(`Retry`)}):null]}):t?(0,H.jsx)(se,{size:`$2`,self:`flex-start`,onPress:t,children:a(`Retry`)}):null]})}var S$={fontWeight:`600`,px:`$3`};function C$({onPress:e,...t}){let n=He(),r=Lx()===`compact`;return(0,H.jsx)(se,{bg:`var(--primary)`,color:`var(--primary-foreground)`,borderColor:`var(--primary)`,hoverStyle:{bg:`var(--primary-hover)`,borderColor:`var(--primary-hover)`},pressStyle:{bg:`var(--primary-hover)`,borderColor:`var(--primary-hover)`},onPress:r=>{n({component:`PrimaryButton`,action:`click`,id:$e(t.children)??t[`aria-label`]}),e?.(r)},...r?S$:null,...t})}function w$(e){typeof window<`u`&&window.open(e,`_blank`,`noopener`)}function T$({icon:e,title:t,description:n,bullets:r,primary:i,secondary:a}){let o=He();return(0,H.jsxs)(CQ,{borderWidth:1,borderColor:`$borderColor`,borderStyle:`dashed`,p:`$6`,gap:`$4`,items:`center`,maxW:640,self:`center`,width:`100%`,children:[(0,H.jsx)(F,{width:48,height:48,items:`center`,justify:`center`,rounded:`$4`,bg:`$hover`,children:(0,H.jsx)(e,{size:24})}),(0,H.jsxs)(F,{gap:`$2`,items:`center`,maxW:480,children:[(0,H.jsx)(U,{fontSize:`$6`,fontWeight:`500`,text:`center`,letterSpacing:-.3,children:t}),(0,H.jsx)(U,{fontSize:`$3`,color:`$quiet`,text:`center`,children:n})]}),r&&r.length?(0,H.jsx)(F,{gap:`$2`,self:`stretch`,maxW:420,mx:`auto`,children:r.map(e=>(0,H.jsxs)(P,{gap:`$2`,items:`flex-start`,children:[(0,H.jsx)(F,{pt:`$1`,children:(0,H.jsx)(hy,{size:14,color:`$soft`})}),(0,H.jsx)(U,{fontSize:`$3`,color:`$quiet`,flex:1,children:e})]},e))}):null,i||a?(0,H.jsxs)(P,{gap:`$2`,items:`center`,flexWrap:`wrap`,justify:`center`,children:[i?(0,H.jsx)(C$,{icon:i.icon,iconAfter:i.href?(0,H.jsx)(Ny,{size:16}):(0,H.jsx)(sy,{...Zx,size:16}),onPress:()=>{o({component:`EmptyState`,action:`click`,id:t,value:i.label}),i.href?w$(i.href):i.onPress?.()},children:i.label}):null,a?(0,H.jsx)(se,{chromeless:!0,icon:a.icon,iconAfter:a.href?(0,H.jsx)(Ny,{size:14}):void 0,onPress:()=>{o({component:`EmptyState`,action:`click`,id:t,value:a.label}),a.href?w$(a.href):a.onPress?.()},children:a.label}):null]}):null]})}var E$=new Map;function D$(e,t){E$.set(e,t)}function O$(e){return E$.get(e)}var k$={AC:`247`,AD:`376`,AE:`971`,AF:`93`,AG:`1`,AI:`1`,AL:`355`,AM:`374`,AO:`244`,AR:`54`,AS:`1`,AT:`43`,AU:`61`,AW:`297`,AX:`358`,AZ:`994`,BA:`387`,BB:`1`,BD:`880`,BE:`32`,BF:`226`,BG:`359`,BH:`973`,BI:`257`,BJ:`229`,BL:`590`,BM:`1`,BN:`673`,BO:`591`,BQ:`599`,BR:`55`,BS:`1`,BT:`975`,BW:`267`,BY:`375`,BZ:`501`,CA:`1`,CC:`61`,CD:`243`,CF:`236`,CG:`242`,CH:`41`,CI:`225`,CK:`682`,CL:`56`,CM:`237`,CN:`86`,CO:`57`,CR:`506`,CU:`53`,CV:`238`,CW:`599`,CX:`61`,CY:`357`,CZ:`420`,DE:`49`,DJ:`253`,DK:`45`,DM:`1`,DO:`1`,DZ:`213`,EC:`593`,EE:`372`,EG:`20`,EH:`212`,ER:`291`,ES:`34`,ET:`251`,FI:`358`,FJ:`679`,FK:`500`,FM:`691`,FO:`298`,FR:`33`,GA:`241`,GB:`44`,GD:`1`,GE:`995`,GF:`594`,GG:`44`,GH:`233`,GI:`350`,GL:`299`,GM:`220`,GN:`224`,GP:`590`,GQ:`240`,GR:`30`,GT:`502`,GU:`1`,GW:`245`,GY:`592`,HK:`852`,HN:`504`,HR:`385`,HT:`509`,HU:`36`,ID:`62`,IE:`353`,IL:`972`,IM:`44`,IN:`91`,IO:`246`,IQ:`964`,IR:`98`,IS:`354`,IT:`39`,JE:`44`,JM:`1`,JO:`962`,JP:`81`,KE:`254`,KG:`996`,KH:`855`,KI:`686`,KM:`269`,KN:`1`,KP:`850`,KR:`82`,KW:`965`,KY:`1`,KZ:`7`,LA:`856`,LB:`961`,LC:`1`,LI:`423`,LK:`94`,LR:`231`,LS:`266`,LT:`370`,LU:`352`,LV:`371`,LY:`218`,MA:`212`,MC:`377`,MD:`373`,ME:`382`,MF:`590`,MG:`261`,MH:`692`,MK:`389`,ML:`223`,MM:`95`,MN:`976`,MO:`853`,MP:`1`,MQ:`596`,MR:`222`,MS:`1`,MT:`356`,MU:`230`,MV:`960`,MW:`265`,MX:`52`,MY:`60`,MZ:`258`,NA:`264`,NC:`687`,NE:`227`,NF:`672`,NG:`234`,NI:`505`,NL:`31`,NO:`47`,NP:`977`,NR:`674`,NU:`683`,NZ:`64`,OM:`968`,PA:`507`,PE:`51`,PF:`689`,PG:`675`,PH:`63`,PK:`92`,PL:`48`,PM:`508`,PR:`1`,PS:`970`,PT:`351`,PW:`680`,PY:`595`,QA:`974`,RE:`262`,RO:`40`,RS:`381`,RU:`7`,RW:`250`,SA:`966`,SB:`677`,SC:`248`,SD:`249`,SE:`46`,SG:`65`,SH:`290`,SI:`386`,SJ:`47`,SK:`421`,SL:`232`,SM:`378`,SN:`221`,SO:`252`,SR:`597`,SS:`211`,ST:`239`,SV:`503`,SX:`1`,SY:`963`,SZ:`268`,TA:`290`,TC:`1`,TD:`235`,TG:`228`,TH:`66`,TJ:`992`,TK:`690`,TL:`670`,TM:`993`,TN:`216`,TO:`676`,TR:`90`,TT:`1`,TV:`688`,TW:`886`,TZ:`255`,UA:`380`,UG:`256`,US:`1`,UY:`598`,UZ:`998`,VA:`39`,VC:`1`,VE:`58`,VG:`1`,VI:`1`,VN:`84`,VU:`678`,WF:`681`,WS:`685`,XK:`383`,YE:`967`,YT:`262`,ZA:`27`,ZM:`260`,ZW:`263`},A$=e=>e==null?``:String(e),j$=e=>{if(e==null||e===``)return null;let t=typeof e==`number`?e:Number(e);return Number.isFinite(t)?t:null},M$=e=>Array.isArray(e)?e:e==null||e===``?[]:[e],N$=e=>{if(e==null||e===``)return``;if(e instanceof Date)return Number.isNaN(e.getTime())?``:e.toISOString().slice(0,10);let t=String(e),n=t.match(/^(\d{4}-\d{2}-\d{2})/);if(n)return n[1];let r=new Date(t);return Number.isNaN(r.getTime())?``:r.toISOString().slice(0,10)},P$=e=>{if(e==null||e===``)return null;let t=e instanceof Date?e:new Date(e);return Number.isNaN(t.getTime())?null:t},F$=e=>{if(e==null||e===``)return{};if(typeof e==`string`){let t=e.trim(),n=t.indexOf(` `);return n<0?{first:t}:{first:t.slice(0,n),last:t.slice(n+1).trim()}}if(typeof e!=`object`)return{first:String(e)};let t=e;return{first:A$(t.first??t.firstName).trim()||void 0,last:A$(t.last??t.lastName).trim()||void 0}},I$=e=>{let t=F$(e);return[t.first,t.last].filter(Boolean).join(` `)},L$=[`street1`,`street2`,`city`,`state`,`postcode`,`country`],R$=e=>{if(e==null||e===``)return{};if(typeof e==`string`)return{street1:e};let t=e,n={},r={street1:`addressStreet1`,street2:`addressStreet2`,city:`addressCity`,state:`addressState`,postcode:`addressPostcode`,country:`addressCountry`};for(let e of L$){let i=A$(t[e]??t[r[e]]).trim();i&&(n[e]=i)}return n},z$=(e,t)=>{if(!e)return``;if(!/^[A-Za-z]{2}$/.test(e))return e;try{return new Intl.DisplayNames(t?[t]:void 0,{type:`region`}).of(e.toUpperCase())??e}catch{return e}},B$=(e,t)=>{let n=R$(e);return L$.map(e=>e===`country`?z$(n.country,t):n[e]).filter(Boolean).join(`, `)},V$=e=>M$(e).map(e=>typeof e==`string`?{url:e}:e).filter(e=>!!e&&typeof e.url==`string`&&e.url.trim()!==``),H$=e=>{let t=e.trim();try{let e=new URL(/^[a-z][a-z0-9+.-]*:/i.test(t)?t:`https://${t}`);return e.host.replace(/^www\./,``)+(e.pathname===`/`?``:e.pathname.replace(/\/$/,``))}catch{return t}},U$=e=>{let t=e.trim();if(!t)return;let n=/^[a-z][a-z0-9+.-]*:/i.test(t)?t:`https://${t}`;try{let e=new URL(n);return[`http:`,`https:`,`mailto:`,`tel:`].includes(e.protocol)?e.href:void 0}catch{return}},W$=e=>{if(e&&typeof e==`object`&&!Array.isArray(e)){let t=e;return[A$(t.primaryEmail),...M$(t.additionalEmails).map(A$)].map(e=>e.trim()).filter(Boolean)}return M$(e).flatMap(e=>A$(e).split(/[,;]/)).map(e=>e.trim()).filter(Boolean)},G$=e=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e.trim()),K$=(()=>{let e={};for(let[t,n]of Object.entries(k$))(e[n]??=[]).push(t);for(let[t,n]of Object.entries({1:`US`,7:`RU`,44:`GB`,47:`NO`,61:`AU`,212:`MA`,262:`RE`,290:`SH`,358:`FI`,590:`GP`,599:`CW`})){let r=e[t];r?.includes(n)&&(e[t]=[n,...r.filter(e=>e!==n)])}return e})(),q$=(e,t)=>{if(e&&typeof e==`object`){let t=e,n=A$(t.number??t.primaryPhoneNumber).trim(),r=A$(t.country??t.countryCode??t.primaryPhoneCountryCode).trim().toUpperCase()||void 0;return{country:r,callingCode:A$(t.callingCode??t.primaryPhoneCallingCode).replace(/^\+/,``).trim()||(r?k$[r]:void 0),number:n}}let n=A$(e).trim();if(!n.startsWith(`+`)){let e=t?.toUpperCase();return{country:e,callingCode:e?k$[e]:void 0,number:n}}let r=n.slice(1).replace(/[^\d]/g,``);for(let e=Math.min(4,r.length);e>0;e--){let i=r.slice(0,e),a=K$[i];if(a)return{country:t&&a.includes(t.toUpperCase())?t.toUpperCase():a[0],callingCode:i,number:J$(n.slice(1),e)}}return{number:n}},J$=(e,t)=>{let n=0,r=0;for(;r<e.length&&n<t;)/\d/.test(e[r++])&&n++;return e.slice(r).replace(/^[\s.()-]+/,``).trim()},Y$=e=>{let t=e.number.trim();return t?e.callingCode?`+${e.callingCode} ${t.replace(/^0+(?=\d)/,``)}`:t:``},X$=e=>{let t=e.number.replace(/[^\d]/g,``).replace(/^0+(?=\d)/,``);if(t)return`tel:${e.callingCode?`+${e.callingCode}`:``}${t}`},Z$=e=>{if(e==null||e===``)return null;if(typeof e==`string`)return{name:e};let t=e,n=A$(t.name??t.workspaceMemberName??t.label).trim();return n?{name:n,source:A$(t.source).toLowerCase()||void 0,avatarUrl:A$(t.avatarUrl).trim()||void 0}:null},Q$=e=>{if(e==null||e===``)return``;if(typeof e==`object`){let t=e;return typeof t.markdown==`string`&&t.markdown.trim()?Q$(t.markdown):`blocknote`in t||`content`in t||`type`in t||Array.isArray(e)?Q$($$(e).join(`
118
+ `)):``}for(let t of String(e).split(`
119
+ `)){let e=t.replace(/^\s{0,3}(#{1,6}\s+|>\s?|[-*+]\s+|\d+[.)]\s+|-\s\[[ x]\]\s+)/i,``).replace(/!\[[^\]]*\]\([^)]*\)/g,``).replace(/\[([^\]]*)\]\([^)]*\)/g,`$1`).replace(/(\*\*|__|\*|_|~~|`)/g,``).trim();if(e)return e}return``},$$=e=>{if(typeof e==`string`)try{return $$(JSON.parse(e))}catch{return[e]}if(Array.isArray(e))return e.flatMap($$);if(e&&typeof e==`object`){let t=e,n=typeof t.text==`string`?[t.text]:[],r=[t.content,t.children,t.blocknote].flatMap(e=>e==null?[]:$$(e));return t.type&&r.length?[[...n,...r].join(``)]:[...n,...r]}return[]},e1=(e,t)=>{if(typeof t==`string`)return t;if(t&&typeof t==`object`){let n=t;return A$(n[e]??n.label??n.name??n.id)}return``};function t1(){return(0,H.jsx)(U,{fontSize:`$2`,color:`var(--text-faint)`,"aria-label":`Empty`,children:`—`})}var n1=({text:e,color:t=`$ink`,mono:n})=>(0,H.jsx)(XG,{text:e,size:`$2`,color:t,...n?{fontFamily:`$mono`}:null}),r1={target:`_blank`,rel:`noopener noreferrer`};function i1({label:e,color:t}){return(0,H.jsx)(eK,{color:t??`gray`,children:e})}var a1=(e,t)=>e?.find(e=>e.value===t)??{value:t,label:t};function o1({value:e}){let t=A$(e).trim();return t?(0,H.jsx)(n1,{text:t}):(0,H.jsx)(t1,{})}function s1({value:e}){let t=A$(e).trim();return t?(0,H.jsx)(XG,{text:t,lineClamp:2,size:`$2`,color:`$ink`,isTooltipMultiline:!0}):(0,H.jsx)(t1,{})}function c1({value:e}){let t=Q$(e);return t?(0,H.jsx)(n1,{text:t,color:`$aside`}):(0,H.jsx)(t1,{})}function l1({value:e}){let t=W$(e);return t.length===0?(0,H.jsx)(t1,{}):(0,H.jsx)(R1,{children:t.map((e,t)=>(0,H.jsx)(rK,{shape:`round`,variant:`soft`,label:e,href:`mailto:${e}`},`${e}-${t}`))})}var u1=({url:e,label:t})=>{let n=U$(e);return(0,H.jsx)(rK,{shape:`round`,variant:`soft`,label:t?.trim()||H$(e),tooltipContent:e,...n?{href:n,...r1}:null})};function d1({value:e}){let t=V$(e);return t.length===0?(0,H.jsx)(t1,{}):t.length===1?(0,H.jsx)(u1,{url:t[0].url,label:t[0].label}):(0,H.jsx)(R1,{children:t.map((e,t)=>(0,H.jsx)(u1,{url:e.url,label:e.label},`${e.url}-${t}`))})}function f1({value:e}){let t=V$(e);return t.length===0?(0,H.jsx)(t1,{}):(0,H.jsx)(R1,{children:t.map((e,t)=>(0,H.jsx)(u1,{url:e.url,label:e.label},`${e.url}-${t}`))})}function p1({field:e,value:t}){let n=e.metadata?.defaultCountry,r=(Array.isArray(t)?t:[t]).map(e=>q$(e,n)).filter(e=>e.number);return r.length===0?(0,H.jsx)(t1,{}):(0,H.jsx)(R1,{children:r.map((e,t)=>{let n=X$(e);return(0,H.jsx)(rK,{shape:`round`,variant:`soft`,label:Y$(e),...n?{href:n}:null},`${e.number}-${t}`)})})}var m1={fontVariant:[`tabular-nums`]},h1=({text:e})=>(0,H.jsx)(U,{fontSize:`$2`,color:`$ink`,numberOfLines:1,...m1,children:e});function g1({field:e,value:t}){let n=j$(t);if(n==null)return(0,H.jsx)(t1,{});let r=e.metadata??{},i=r.decimals==null?n.toLocaleString():n.toLocaleString(void 0,{minimumFractionDigits:r.decimals,maximumFractionDigits:r.decimals});return(0,H.jsx)(h1,{text:`${r.prefix??``}${i}${r.suffix??``}`})}function _1({field:e,value:t}){let n=j$(t);if(n==null)return(0,H.jsx)(t1,{});let r=(e.metadata??{}).decimals??0;return(0,H.jsx)(h1,{text:`${n.toLocaleString(void 0,{minimumFractionDigits:r,maximumFractionDigits:r})}%`})}function v1({field:e,value:t}){let n=e.metadata??{},r=t??{},i=j$(typeof r==`object`&&r?r.amount:t);if(i==null)return(0,H.jsx)(t1,{});let a=typeof r==`object`&&r?.currencyCode||n.currencyCode||`USD`,o;try{o=new Intl.NumberFormat(void 0,{style:`currency`,currency:a,maximumFractionDigits:n.decimals??2}).format(i)}catch{o=`${i} ${a}`}return(0,H.jsx)(h1,{text:o})}function y1({value:e,max:t,hover:n}){let r=ct().aside?.get?.()??`currentColor`,i=n??e;return(0,H.jsx)(P,{items:`center`,gap:2,"aria-hidden":!0,children:Array.from({length:t},(e,t)=>t+1).map(e=>(0,H.jsx)(yb,{size:16,color:e<=i?`$aside`:`$raised`,fill:e<=i?r:`none`},e))})}function b1({field:e,value:t}){let n=(e.metadata??{}).max??5,r=Math.max(0,Math.min(n,Math.round(j$(t)??0)));return(0,H.jsx)(P,{role:`img`,"aria-label":`${r} of ${n}`,children:(0,H.jsx)(y1,{value:r,max:n})})}function x1({field:e,value:t}){if(t==null||t===``)return(0,H.jsx)(t1,{});let n=e.metadata??{},r=t===!0||t===`true`||t===1;return(0,H.jsxs)(P,{items:`center`,gap:`$1`,height:20,children:[(0,H.jsx)(r?hy:Fb,{size:14,color:`$aside`}),(0,H.jsx)(U,{fontSize:`$2`,color:`$aside`,children:r?n.trueLabel??`Yes`:n.falseLabel??`No`})]})}function S1({field:e,value:t}){let n=A$(t);if(!n)return(0,H.jsx)(t1,{});let r=e.metadata?.options,i=a1(r,n);return(0,H.jsx)(i1,{label:i.label,color:i.color})}function C1({field:e,value:t}){let n=M$(t).map(A$).filter(Boolean);if(n.length===0)return(0,H.jsx)(t1,{});let r=e.metadata?.options;return(0,H.jsx)(R1,{children:n.map(e=>{let t=a1(r,e);return(0,H.jsx)(i1,{label:t.label,color:t.color},e)})})}var w1=[[`year`,31536e3],[`month`,2592e3],[`week`,604800],[`day`,86400],[`hour`,3600],[`minute`,60]],T1=(e,t=Date.now())=>{let n=(e.getTime()-t)/1e3,r=new Intl.RelativeTimeFormat(void 0,{numeric:`auto`});for(let[e,t]of w1)if(Math.abs(n)>=t)return r.format(Math.round(n/t),e);return r.format(Math.round(n),`second`)};function E1({field:e,value:t}){let n=N$(t);if(!n)return(0,H.jsx)(t1,{});let r=new Date(`${n}T00:00:00Z`);if(e.metadata?.display===`relative`){let e=new Date(new Date().toISOString().slice(0,10)+`T00:00:00Z`);return(0,H.jsx)(n1,{text:T1(r,e.getTime())})}return(0,H.jsx)(n1,{text:r.toLocaleDateString(void 0,{timeZone:`UTC`,year:`numeric`,month:`short`,day:`numeric`})})}function D1({field:e,value:t}){let n=P$(t);if(!n)return(0,H.jsx)(t1,{});let r=e.metadata?.display===`relative`;return(0,H.jsx)(n1,{text:r?T1(n):n.toLocaleString(void 0,{year:`numeric`,month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`,timeZoneName:`short`})})}function O1({label:e,seed:t,src:n,shape:r=`square`,href:i,onPress:a}){return(0,H.jsx)(rK,{label:e,startElement:(0,H.jsx)(VS,{size:`md`,shape:r===`circle`?`circle`:`square`,name:e,colorSeed:t??e,src:n??null}),...i?{href:i}:null,...a?{onPress:a}:null})}function k1({field:e,value:t}){let n=e.metadata??{},r=n.labelField??`name`,i=M$(t).map(e=>{let t=e1(r,e),i=e&&typeof e==`object`?e:null,a=i&&A$(i[n.avatarField??`avatarUrl`]).trim()||void 0;return{label:t,seed:i&&A$(i.id)||t,src:a}}).filter(e=>e.label);if(i.length===0)return(0,H.jsx)(t1,{});let a=i.map((e,t)=>(0,H.jsx)(O1,{label:e.label,seed:e.seed,src:e.src,shape:n.shape},`${e.seed}-${t}`));return i.length===1?a[0]:(0,H.jsx)(R1,{children:a})}var A1={api:Ty,import:Ob,email:Qy,calendar:my,workflow:Pb,webhook:Nb,system:uy,manual:jy};function j1({value:e}){let t=Z$(e);if(!t)return(0,H.jsx)(t1,{});let n=t.source&&t.source!==`member`?A1[t.source]:void 0;return(0,H.jsx)(rK,{label:t.name,startElement:n?(0,H.jsx)(n,{size:14,color:`$hint`}):(0,H.jsx)(VS,{size:`md`,shape:`circle`,name:t.name,src:t.avatarUrl??null})})}function M1({value:e}){let t=I$(e);return t?(0,H.jsx)(n1,{text:t}):(0,H.jsx)(t1,{})}function N1({value:e}){let t=B$(e);return t?(0,H.jsx)(n1,{text:t}):(0,H.jsx)(t1,{})}function P1({value:e}){let t=A$(e);return t?(0,H.jsx)(n1,{text:t,color:`$hint`,mono:!0}):(0,H.jsx)(t1,{})}function F1({value:e}){let t=M$(e).map(e=>typeof e==`string`?{name:e}:e).map(e=>({name:A$(e?.label??e?.name).trim()||`file`,url:A$(e?.url).trim()}));return t.length===0?(0,H.jsx)(t1,{}):(0,H.jsx)(R1,{children:t.map((e,t)=>{let n=e.url?U$(e.url):void 0;return(0,H.jsx)(rK,{variant:`soft`,label:e.name,maxW:120,startElement:(0,H.jsx)(cb,{size:14,color:`$hint`}),...n?{href:n,...r1}:null},`${e.name}-${t}`)})})}function I1({value:e}){if(e==null)return(0,H.jsx)(t1,{});let t;try{t=JSON.stringify(e)}catch{t=String(e)}return(0,H.jsx)(n1,{text:t,color:`$hint`,mono:!0})}function L1({value:e}){if(typeof e==`object`&&e)return(0,H.jsx)(I1,{field:{name:``,label:``,type:`json`},value:e});let t=A$(e);return t?(0,H.jsx)(n1,{text:t}):(0,H.jsx)(t1,{})}function R1({children:e}){return(0,H.jsx)(cK,{flex:1,minW:0,children:e})}var z1=e=>{let t=new Map;return n=>{let r=n??``,i=t.get(r);return i===void 0&&t.set(r,i=e(n)),i}},B1=(e,t)=>{try{return new Intl.DisplayNames(e?[e]:void 0,{type:t})}catch{return null}},V1=z1(e=>{let t=B1(e,`region`),n=new Intl.Collator(e);return Object.entries(k$).map(([e,n])=>{let r=e;try{r=t?.of(e)??e}catch{r=e}return{value:e,label:r,callingCode:n}}).sort((e,t)=>n.compare(e.label,t.label))}),H1=(e,t)=>{try{let n=new Intl.NumberFormat(t,{style:`currency`,currency:e,currencyDisplay:`narrowSymbol`}).formatToParts(0).find(e=>e.type===`currency`)?.value;return n&&n!==e?n:void 0}catch{return}},U1=z1(e=>{let t=Intl.supportedValuesOf,n=t?t(`currency`):[`USD`,`EUR`,`GBP`,`JPY`,`CNY`,`CAD`,`AUD`,`CHF`,`INR`,`BRL`],r=B1(e,`currency`);return n.map(t=>{let n=t;try{n=r?.of(t)??t}catch{n=t}return{code:t,name:n,symbol:H1(t,e)}})}),W1=e=>e.field.metadata?.options??[],G1=(e,t)=>{let n=e=>e.normalize(`NFD`).replace(/\p{M}/gu,``).toLowerCase(),r=n(t.trim());return r?e.filter(e=>n(e.label).includes(r)||n(e.value).includes(r)):e};function K1({onSubmit:e,onCancel:t,multiline:n,children:r}){return(0,H.jsx)(F,{width:`100%`,minW:0,onKeyDown:r=>{r.nativeEvent?.isComposing||(r.key===`Enter`&&!(n&&r.shiftKey)?(r.preventDefault?.(),e?.()):r.key===`Escape`&&(r.preventDefault?.(),t?.()))},children:r})}var q1=e=>e.field.label;function J1({field:e,value:t,onChange:n,onSubmit:r,onCancel:i,autoFocus:a}){let o=e.metadata?.placeholder;return(0,H.jsx)(K1,{onSubmit:r,onCancel:i,children:(0,H.jsx)(Dw,{"aria-label":e.label,value:A$(t),onChangeText:e=>n(e),placeholder:o,autoFocus:a})})}function Y1({field:e,value:t,onChange:n,onSubmit:r,onCancel:i,autoFocus:a}){let o=A$(Array.isArray(t)?t[0]:t),s=e.metadata?.placeholder??`name@example.com`;return(0,H.jsx)(K1,{onSubmit:r,onCancel:i,children:(0,H.jsx)(Dw,{"aria-label":e.label,type:`email`,inputMode:`email`,autoComplete:`email`,value:o,onChangeText:e=>n(e.trim()),placeholder:s,autoFocus:a,"aria-invalid":o!==``&&!G$(o)||void 0})})}function X1({field:e,value:t,onChange:n,onSubmit:r,onCancel:i,autoFocus:a}){let o=A$(typeof t==`object`&&t&&!Array.isArray(t)?t.url:t),s=e.metadata?.placeholder??`https://`;return(0,H.jsx)(K1,{onSubmit:r,onCancel:i,children:(0,H.jsx)(Dw,{"aria-label":e.label,type:`url`,inputMode:`url`,value:o,onChangeText:e=>n(e.trim()),placeholder:s,autoFocus:a})})}function Z1({field:e,value:t,onChange:n,onSubmit:r,onCancel:i,autoFocus:a}){let o=e.metadata??{},s=q$(t,o.defaultCountry),[c,l]=(0,V.useState)(s.country??o.defaultCountry?.toUpperCase()),u=(0,V.useMemo)(()=>V1(),[]),d=(e,r)=>{let i=e?k$[e]:void 0;n(typeof t==`object`&&t&&!Array.isArray(t)?{...t,number:r,countryCode:e,callingCode:i?`+${i}`:void 0}:r.trim()?i?`+${i} ${r.trim()}`:r.trim():null)};return(0,H.jsx)(K1,{onSubmit:r,onCancel:i,children:(0,H.jsxs)(Cw,{children:[(0,H.jsx)(EK,{countries:u,value:c??null,onValueChange:e=>{l(e??void 0),d(e??void 0,s.number)}}),(0,H.jsx)(Dw,{"aria-label":e.label,type:`tel`,inputMode:`tel`,autoComplete:`tel`,value:s.number,onChangeText:e=>d(c,e),placeholder:o.placeholder??`Phone number`,autoFocus:a})]})})}function Q1({field:e,value:t,onChange:n,onSubmit:r,onCancel:i,autoFocus:a}){let o=e.metadata??{};return(0,H.jsx)(K1,{onSubmit:r,onCancel:i,multiline:!0,children:(0,H.jsx)(pT,{"aria-label":e.label,value:A$(t),onChangeText:e=>n(e),placeholder:o.placeholder,autoFocus:a,rows:o.rows??3,maxRows:o.rows&&o.rows>10?o.rows:10})})}function $1({field:e,value:t,onChange:n,onSubmit:r,onCancel:i,autoFocus:a}){let o=e.metadata??{};return(0,H.jsx)(K1,{onSubmit:r,onCancel:i,children:(0,H.jsx)(gK,{"aria-label":e.label,value:j$(t),onValueChange:e=>n(e),placeholder:o.placeholder,autoFocus:a,allowOutOfRange:!0,...o.decimals==null?null:{format:{maximumFractionDigits:o.decimals}}})})}function e0({field:e,value:t,onChange:n,onSubmit:r,onCancel:i,autoFocus:a}){let o=(e.metadata??{}).decimals;return(0,H.jsx)(K1,{onSubmit:r,onCancel:i,children:(0,H.jsx)(Cw,{end:(0,H.jsx)(U,{fontSize:`$2`,color:`$hint`,children:`%`}),children:(0,H.jsx)(gK,{"aria-label":e.label,value:j$(t),onValueChange:e=>n(e),autoFocus:a,allowOutOfRange:!0,...o==null?null:{format:{maximumFractionDigits:o}}})})})}function t0({field:e,value:t,onChange:n,onSubmit:r,onCancel:i,autoFocus:a}){let o=e.metadata??{},s=t??{},c=j$(typeof s==`object`&&s?s.amount:t),l=typeof s==`object`&&s?.currencyCode||o.currencyCode||`USD`,u=(0,V.useMemo)(()=>U1(),[]);return(0,H.jsx)(K1,{onSubmit:r,onCancel:i,children:(0,H.jsxs)(Cw,{children:[(0,H.jsx)(CK,{currencies:u,value:l,onValueChange:e=>n({amount:c,currencyCode:e??l}),selectedFirst:!0}),(0,H.jsx)(gK,{"aria-label":e.label,value:c,onValueChange:e=>n({amount:e,currencyCode:l}),autoFocus:a,allowOutOfRange:!0,format:{maximumFractionDigits:o.decimals??2}})]})})}function n0({field:e,value:t,onChange:n}){let r=(e.metadata??{}).max??5,i=Math.max(0,Math.min(r,Math.round(j$(t)??0))),[a,o]=(0,V.useState)(null),s=e=>n(Math.max(0,Math.min(r,e)));return(0,H.jsx)(P,{role:`slider`,tabIndex:0,onKeyDown:e=>{let t=e.key===`ArrowRight`||e.key===`ArrowUp`?i+1:e.key===`ArrowLeft`||e.key===`ArrowDown`?i-1:e.key===`Home`?0:e.key===`End`?r:null;t!=null&&(e.preventDefault?.(),s(t))},"aria-label":e.label,"aria-valuemin":0,"aria-valuemax":r,"aria-valuenow":i,"aria-valuetext":`${i} of ${r}`,items:`center`,height:20,rounded:`$xs`,focusVisibleStyle:{outlineColor:`$outlineColor`,outlineWidth:2,outlineStyle:`solid`},onHoverOut:()=>o(null),children:(0,H.jsxs)(P,{position:`relative`,children:[(0,H.jsx)(y1,{value:i,max:r,hover:a}),(0,H.jsx)(P,{position:`absolute`,t:0,l:0,r:0,b:0,children:Array.from({length:r},(e,t)=>t+1).map(e=>(0,H.jsx)(P,{flex:1,cursor:`pointer`,onHoverIn:()=>o(e),onPress:()=>s(e===i?0:e),"data-star":e},e))})]})})}function r0({field:e,value:t,onChange:n}){let r=e.metadata??{},i=t===!0||t===`true`||t===1;return(0,H.jsxs)(P,{items:`center`,gap:`$2`,children:[(0,H.jsx)(tT,{"aria-label":e.label,checked:i,onCheckedChange:e=>n(e)}),(0,H.jsx)(U,{fontSize:`$2`,color:`$aside`,children:i?r.trueLabel??`Yes`:r.falseLabel??`No`})]})}function i0({children:e,...t}){return(0,H.jsx)(kS,{variant:`outline`,width:`100%`,justify:`space-between`,endIcon:(0,H.jsx)(gy,{color:`$hint`}),...t,children:(0,H.jsx)(P,{flex:1,minW:0,items:`center`,gap:`$1`,overflow:`hidden`,children:e})})}var a0=({text:e})=>(0,H.jsx)(U,{fontSize:`$2`,color:`$hush`,numberOfLines:1,children:e}),o0=e=>(0,V.useState)(!!e);function s0(e){let{value:t,onChange:n,autoFocus:r}=e,i=W1(e),[a,o]=o0(r),[s,c]=(0,V.useState)(``),l=A$(t),u=i.find(e=>e.value===l),d=G1(i,s);return(0,H.jsxs)(FC,{open:a,onOpenChange:e=>{o(e),e||c(``)},children:[(0,H.jsx)(LC,{asChild:!0,children:(0,H.jsx)(i0,{"aria-label":q1(e),children:u?(0,H.jsx)(i1,{label:u.label,color:u.color}):(0,H.jsx)(a0,{text:`Select…`})})}),(0,H.jsxs)(VC,{minW:240,children:[(0,H.jsx)(QC,{value:s,onValueChange:c,placeholder:`Search options`,"aria-label":`Search ${q1(e)}`}),l?(0,H.jsx)(GC,{onSelect:()=>n(null),children:`No ${q1(e)}`}):null,(0,H.jsx)(YC,{value:l||null,onValueChange:e=>n(e??null),children:(0,H.jsx)($C,{scrollable:!0,children:d.map(e=>(0,H.jsx)(ZC,{value:e.value,children:(0,H.jsx)(i1,{label:e.label,color:e.color})},e.value))})}),d.length===0?(0,H.jsx)(ow,{children:`No options`}):null]})]})}function c0(e){let{value:t,onChange:n,autoFocus:r}=e,i=W1(e),[a,o]=o0(r),[s,c]=(0,V.useState)(``),l=M$(t).map(A$).filter(Boolean),u=G1(i,s);return(0,H.jsxs)(FC,{open:a,onOpenChange:e=>{o(e),e||c(``)},children:[(0,H.jsx)(LC,{asChild:!0,children:(0,H.jsx)(i0,{"aria-label":q1(e),children:l.length>0?l.map(e=>{let t=i.find(t=>t.value===e)??{value:e,label:e};return(0,H.jsx)(i1,{label:t.label,color:t.color},e)}):(0,H.jsx)(a0,{text:`Select…`})})}),(0,H.jsxs)(VC,{minW:240,children:[(0,H.jsx)(QC,{value:s,onValueChange:c,placeholder:`Search options`,"aria-label":`Search ${q1(e)}`}),(0,H.jsx)(YC,{multiple:!0,value:l,onValueChange:e=>n(M$(e).map(A$)),children:(0,H.jsx)($C,{scrollable:!0,children:u.map(e=>(0,H.jsx)(ZC,{value:e.value,children:(0,H.jsx)(i1,{label:e.label,color:e.color})},e.value))})}),u.length===0?(0,H.jsx)(ow,{children:`No options`}):null]})]})}function l0(e){let{field:t,value:n,onChange:r,onSubmit:i,onCancel:a,autoFocus:o}=e,s=W1(e),c=(t.metadata??{}).shape??`square`,[l,u]=o0(o),[d,f]=(0,V.useState)(``);if(s.length===0){let e=A$(typeof n==`object`&&n?n.name??n.id:n);return(0,H.jsx)(K1,{onSubmit:i,onCancel:a,children:(0,H.jsx)(Dw,{"aria-label":t.label,value:e,onChangeText:e=>r(e),placeholder:`Related record id…`,autoFocus:o})})}let p=A$(typeof n==`object`&&n?n.id??n.value:n),m=s.find(e=>e.value===p),h=G1(s,d),g=e=>(0,H.jsxs)(P,{items:`center`,gap:`$2`,minW:0,children:[(0,H.jsx)(VS,{size:`md`,shape:c,name:e.label,colorSeed:e.value,src:e.avatarUrl??null}),(0,H.jsx)(U,{fontSize:`$2`,color:`$ink`,numberOfLines:1,children:e.label})]});return(0,H.jsxs)(FC,{open:l,onOpenChange:e=>{u(e),e||f(``)},children:[(0,H.jsx)(LC,{asChild:!0,children:(0,H.jsx)(i0,{"aria-label":t.label,children:m?g(m):(0,H.jsx)(a0,{text:`Link a record…`})})}),(0,H.jsxs)(VC,{minW:280,children:[(0,H.jsx)(QC,{value:d,onValueChange:f,placeholder:`Search records`,"aria-label":`Search ${t.label}`}),p?(0,H.jsx)(GC,{onSelect:()=>r(null),children:`No ${t.label}`}):null,(0,H.jsx)(YC,{value:p||null,onValueChange:e=>r(e??null),children:(0,H.jsx)($C,{scrollable:!0,children:h.map(e=>(0,H.jsx)(ZC,{value:e.value,children:g(e)},e.value))})}),h.length===0?(0,H.jsx)(ow,{children:`No record found`}):null]})]})}var u0=e=>String(e).padStart(2,`0`),d0=e=>{let[t,n,r]=e.split(`-`).map(Number);return new Date(t,n-1,r)},f0=e=>`${e.getFullYear()}-${u0(e.getMonth()+1)}-${u0(e.getDate())}`;function p0({field:e,value:t,onChange:n,onSubmit:r,onCancel:i,autoFocus:a}){let o=e.type===`dateTime`,[s,c]=o0(a),l=o&&t!=null&&t!==``?new Date(t):null,u=o&&l&&!Number.isNaN(l.getTime())?f0(l):N$(t),d=l&&!Number.isNaN(l.getTime())?`${u0(l.getHours())}:${u0(l.getMinutes())}`:``,[f,p]=(0,V.useState)(null),m=(e,t=d)=>{if(!e)return n(null);if(!o)return n(e);let r=new Date(`${e}T${/^\d{2}:\d{2}$/.test(t)?t:`00:00`}`);n(Number.isNaN(r.getTime())?null:r.toISOString())},h=u?d0(u).toLocaleDateString(void 0,{year:`numeric`,month:`short`,day:`numeric`})+(o&&d?` ${d}`:``):``;return(0,H.jsxs)(Mw,{open:s,onOpenChange:c,placement:`bottom-start`,children:[(0,H.jsx)(Nw,{asChild:!0,children:(0,H.jsxs)(i0,{"aria-label":e.label,children:[(0,H.jsx)(my,{size:14,color:`$hint`}),h?(0,H.jsx)(U,{fontSize:`$2`,color:`$ink`,numberOfLines:1,children:h}):(0,H.jsx)(a0,{text:`Pick a date…`})]})}),(0,H.jsx)(Pw,{size:`sm`,width:280,children:(0,H.jsx)(K1,{onSubmit:r,onCancel:i,children:(0,H.jsxs)(F,{gap:`$2`,children:[(0,H.jsxs)(P,{gap:`$1`,children:[(0,H.jsx)(Dw,{"aria-label":`${e.label}, as YYYY-MM-DD`,size:`sm`,flex:1,value:f??u,placeholder:`YYYY-MM-DD`,onChangeText:e=>{p(e),/^\d{4}-\d{2}-\d{2}$/.test(e)&&!Number.isNaN(d0(e).getTime())?m(e):e===``&&m(``)},onBlur:()=>p(null)}),o?(0,H.jsx)(Dw,{"aria-label":`${e.label}, time`,size:`sm`,width:72,value:d,placeholder:`HH:mm`,onChangeText:e=>{/^\d{2}:\d{2}$/.test(e)&&m(u||f0(new Date),e)}}):null]}),(0,H.jsx)(GA,{mode:`single`,selected:u?d0(u):void 0,defaultMonth:u?d0(u):void 0,onSelect:e=>{m(e?f0(e):``),o||c(!1)}}),u?(0,H.jsx)(kS,{size:`xs`,variant:`ghost`,emphasis:`subtle`,onPress:()=>{m(``),c(!1)},children:`Clear`}):null]})})})]})}function m0({field:e,value:t,onChange:n,onSubmit:r,onCancel:i,autoFocus:a}){let o=V$(t),[s,c]=(0,V.useState)(``);return(0,H.jsxs)(F,{gap:`$1`,width:`100%`,minW:0,children:[o.map((e,t)=>(0,H.jsxs)(P,{items:`center`,gap:`$2`,minH:24,children:[(0,H.jsx)(U,{flex:1,minW:0,fontSize:`$2`,color:`$ink`,numberOfLines:1,children:e.label?.trim()||H$(e.url)}),(0,H.jsx)(kS,{size:`icon-2xs`,variant:`ghost`,emphasis:`subtle`,"aria-label":`Remove ${e.label?.trim()||H$(e.url)}`,onPress:()=>n(o.filter((e,n)=>n!==t)),children:(0,H.jsx)(Fb,{})})]},`${e.url}-${t}`)),(0,H.jsx)(K1,{onSubmit:()=>{let e=s.trim();if(!e)return r?.();n([...o,{url:e}]),c(``)},onCancel:i,children:(0,H.jsx)(Dw,{"aria-label":`Add to ${e.label}`,type:`url`,inputMode:`url`,value:s,onChangeText:c,placeholder:`Add a link`,autoFocus:a})})]})}function h0({field:e,value:t,onChange:n,onSubmit:r,onCancel:i,autoFocus:a}){let o=F$(t),s=(e,t)=>n(!e?.trim()&&!t?.trim()?null:{first:e??``,last:t??``});return(0,H.jsx)(K1,{onSubmit:r,onCancel:i,children:(0,H.jsxs)(P,{gap:`$1`,children:[(0,H.jsx)(Dw,{"aria-label":`${e.label}, first name`,flex:1,value:o.first??``,placeholder:`First name`,autoFocus:a,onChangeText:e=>{let t=F$(e);t.last&&!o.last&&e.includes(` `)?s(t.first,t.last):s(e,o.last)}}),(0,H.jsx)(Dw,{"aria-label":`${e.label}, last name`,flex:1,value:o.last??``,placeholder:`Last name`,onChangeText:e=>s(o.first,e)})]})})}var g0={street1:`Address 1`,street2:`Address 2`,city:`City`,state:`State`,postcode:`Post code`,country:`Country`};function _0({field:e,value:t,onChange:n,onSubmit:r,onCancel:i,autoFocus:a}){let o=(e.metadata??{}).defaultCountry,s=R$(t),c=(0,V.useMemo)(()=>V1().map(e=>({value:e.value,label:e.label})),[]),l=(e,t)=>{let r={...s,[e]:t??void 0};t||delete r[e],n(Object.keys(r).length?r:null)};return(0,H.jsx)(K1,{onSubmit:r,onCancel:i,children:(0,H.jsxs)(F,{gap:`$1`,width:344,maxW:`100%`,children:[[`street1`,`street2`].map((e,t)=>(0,H.jsx)(Dw,{"aria-label":g0[e],placeholder:g0[e],value:s[e]??``,autoFocus:a&&t===0,onChangeText:t=>l(e,t)},e)),(0,H.jsxs)(P,{gap:`$1`,children:[(0,H.jsx)(Dw,{"aria-label":g0.city,placeholder:g0.city,flex:1,value:s.city??``,onChangeText:e=>l(`city`,e)}),(0,H.jsx)(Dw,{"aria-label":g0.state,placeholder:g0.state,flex:1,value:s.state??``,onChangeText:e=>l(`state`,e)})]}),(0,H.jsxs)(P,{gap:`$1`,children:[(0,H.jsx)(Dw,{"aria-label":g0.postcode,placeholder:g0.postcode,flex:1,value:s.postcode??``,onChangeText:e=>l(`postcode`,e)}),(0,H.jsx)(F,{flex:1,minW:0,children:(0,H.jsx)(kK,{"aria-label":g0.country,countries:c,value:(s.country&&/^[A-Za-z]{2}$/.test(s.country)?s.country.toUpperCase():null)??o?.toUpperCase()??null,onValueChange:e=>l(`country`,e)})})]})]})})}function v0({value:e,onChange:t}){let n=M$(e),r=e=>typeof e==`string`?e:A$(e?.label??e?.name??`file`);return(0,H.jsxs)(F,{gap:`$2`,children:[typeof document<`u`?(0,H.jsx)(kS,{size:`sm`,variant:`outline`,startIcon:(0,H.jsx)(Ob,{}),onPress:()=>{if(typeof document>`u`)return;let e=document.createElement(`input`);e.type=`file`,e.multiple=!0,e.onchange=()=>t(e.files?[...n,...Array.from(e.files)]:n),e.click()},self:`flex-start`,children:`Choose files`}):(0,H.jsx)(U,{fontSize:`$2`,color:`$hint`,children:`File upload is available on the web.`}),n.length>0?(0,H.jsx)(P,{gap:`$1`,flexWrap:`wrap`,children:n.map((e,i)=>(0,H.jsxs)(P,{items:`center`,gap:`$1`,height:24,pl:`$2`,pr:`$1`,rounded:`$xs`,bg:`$hover`,children:[(0,H.jsx)(U,{fontSize:`$2`,color:`$ink`,numberOfLines:1,maxW:160,children:r(e)}),(0,H.jsx)(kS,{size:`icon-2xs`,variant:`ghost`,emphasis:`subtle`,"aria-label":`Remove ${r(e)}`,onPress:()=>t(n.filter((e,t)=>t!==i)),children:(0,H.jsx)(Fb,{})})]},`${r(e)}-${i}`))}):null]})}function y0(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}function b0({field:e,value:t,onChange:n,onCancel:r}){let[i,a]=(0,V.useState)(()=>t==null?``:typeof t==`string`?t:y0(t));return(0,H.jsx)(F,{gap:`$1`,width:400,maxW:`100%`,onKeyDown:e=>e.key===`Escape`&&r?.(),children:(0,H.jsx)(kG,{label:e.label,language:`json`,value:i,minHeight:120,maxHeight:300,onChange:e=>{a(e);let t=iG(e);t.kind===`empty`?n(null):t.kind===`json`&&n(t.value)}})})}var x0=!1;function S0(){x0||(x0=!0,D$(`text`,{Display:o1,Input:J1}),D$(`longText`,{Display:s1,Input:Q1}),D$(`richText`,{Display:c1,Input:Q1}),D$(`number`,{Display:g1,Input:$1}),D$(`percent`,{Display:_1,Input:e0}),D$(`currency`,{Display:v1,Input:t0}),D$(`boolean`,{Display:x1,Input:r0}),D$(`select`,{Display:S1,Input:s0}),D$(`multiSelect`,{Display:C1,Input:c0}),D$(`date`,{Display:E1,Input:p0}),D$(`dateTime`,{Display:D1,Input:p0}),D$(`email`,{Display:l1,Input:Y1}),D$(`url`,{Display:d1,Input:X1}),D$(`phone`,{Display:p1,Input:Z1}),D$(`rating`,{Display:b1,Input:n0}),D$(`links`,{Display:f1,Input:m0}),D$(`relation`,{Display:k1,Input:l0}),D$(`json`,{Display:I1,Input:b0}),D$(`files`,{Display:F1,Input:v0}),D$(`uuid`,{Display:P1}),D$(`fullName`,{Display:M1,Input:h0}),D$(`address`,{Display:N1,Input:_0}),D$(`position`,{Display:g1}),D$(`actor`,{Display:j1}))}S0();function C0(e){let t=O$(e.field.type)?.Display??L1;return(0,H.jsx)(t,{...e})}function w0(e){let t=O$(e.field.type)?.Input;return t?(0,H.jsx)(t,{...e}):null}function T0(e){return!!O$(e)?.Input}function E0({trigger:e,children:t,open:n,onOpenChange:r,placement:i=`bottom-start`,width:a=240,maxHeight:o=320,header:s}){return(0,H.jsxs)(Mw,{placement:i,open:n,onOpenChange:r,allowFlip:!0,children:[(0,H.jsx)(Nw,{asChild:!0,children:e}),(0,H.jsxs)(Pw,{size:`sm`,p:0,gap:0,width:a,overflow:`hidden`,children:[s?(0,H.jsx)(F,{p:`$1`,borderBottomWidth:1,borderColor:`$borderColor`,children:s}):null,(0,H.jsx)(Kp,{style:{maxHeight:o},children:(0,H.jsx)(F,{p:`$1`,gap:2,children:t})})]})]})}function D0({children:e,onPress:t,active:n,icon:r,trailing:i,tone:a=`default`}){return(0,H.jsxs)(P,{role:`menuitem`,tabIndex:0,onPress:t,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault?.(),t?.())},cursor:`pointer`,items:`center`,gap:`$2`,minH:32,px:`$2`,rounded:`$xs`,bg:n?`$hover`:`transparent`,hoverStyle:{bg:a===`danger`?`var(--state-error-bg)`:`$hover`},focusVisibleStyle:{outlineColor:`$outlineColor`,outlineWidth:2,outlineStyle:`solid`},children:[r?(0,H.jsx)(P,{items:`center`,justify:`center`,shrink:0,children:r}):null,(0,H.jsx)(F,{flex:1,minW:0,children:typeof e==`string`?(0,H.jsx)(U,{fontSize:`$2`,color:a===`danger`?`$bad`:`$aside`,numberOfLines:1,children:e}):e}),i??null]})}function O0({checked:e,indeterminate:t,onChange:n,size:r=16,label:i}){return(0,H.jsx)($S,{size:r>16?`md`:`sm`,variant:`solid`,hoverable:!0,checked:t?`indeterminate`:!!e,onCheckedChange:()=>n?.(t?!0:!e),"aria-label":i??(t?`Select all`:`Select`)})}var k0=e=>e==null?``:String(e),A0=e=>{if(e==null||e===``)return null;if(typeof e==`object`&&!Array.isArray(e)&&`amount`in e)return A0(e.amount);let t=typeof e==`number`?e:Number(e);return Number.isFinite(t)?t:null},j0=e=>Array.isArray(e)?e:e==null?[]:[e],M0=864e5,N0=e=>typeof e==`string`&&/^\d{4}-\d{2}-\d{2}$/.test(e.trim()),P0=e=>{if(e==null||e===``)return null;let t=(e instanceof Date?e:new Date(e)).getTime();return Number.isNaN(t)?null:t},F0=(e,t)=>(e?.metadata?.options)?.find(e=>e.value===t)?.label??t;function I0(e,t){let n=e?.metadata?.labelField??`name`;if(typeof t==`string`)return t;if(t&&typeof t==`object`){let e=t;return k0(e[n]??e.label??e.name??e.id)}return``}function L0(e,t){switch(e?.type){case`number`:case`percent`:case`rating`:case`position`:return A0(t);case`currency`:{let e=t??{};return A0(typeof e==`object`&&e?e.amount:t)}case`boolean`:return+(t===!0||t===`true`||t===1);case`date`:case`dateTime`:return P0(t);case`select`:return t==null||t===``?null:F0(e,k0(t)).toLowerCase();case`multiSelect`:return j0(t).map(t=>F0(e,k0(t))).join(`, `).toLowerCase()||null;case`relation`:return I0(e,t).toLowerCase()||null;case`links`:return j0(t).map(e=>typeof e==`string`?e:e?.url??``).join(`, `).toLowerCase()||null;case`fullName`:return I$(t).toLowerCase()||null;case`address`:return B$(t).toLowerCase()||null;case`phone`:return Y$(q$(t)).toLowerCase()||null;case`email`:return W$(t).join(`, `).toLowerCase()||null;case`actor`:return Z$(t)?.name.toLowerCase()||null;case`richText`:return Q$(t).toLowerCase()||null;default:{let e=k0(t);return e===``?null:e.toLowerCase()}}}var R0=(e,t)=>e.find(e=>e.name===t);function z0(e,t){return typeof e==`number`&&typeof t==`number`?e-t:String(e).localeCompare(String(t))}function B0(e,t,n){return t.length===0?e.slice():e.map((e,t)=>[e,t]).sort(([e,r],[i,a])=>{for(let r of t){let t=R0(n,r.field),a=L0(t,e[r.field]),o=L0(t,i[r.field]);if(a===null&&o===null)continue;if(a===null)return 1;if(o===null)return-1;let s=z0(a,o);if(s!==0)return r.dir===`asc`?s:-s}return r-a}).map(([e])=>e)}function V0(e,t){let n=e.length===1&&e[0].field===t?e[0]:void 0;return n?n.dir===`asc`?[{field:t,dir:`desc`}]:[]:[{field:t,dir:`asc`}]}function H0(e,t){return e.find(e=>e.field===t)?.dir}function U0(e){let t=Array.isArray(e)?e:[],n=e=>e==null||e===``?void 0:e;return[n(t[0]),n(t[1])]}function W0(e){return e.op===`isEmpty`||e.op===`isNotEmpty`?!0:e.op===`between`?U0(e.value).some(e=>e!==void 0):e.op===`isAnyOf`?Array.isArray(e.value)&&e.value.length>0:e.value!=null&&e.value!==``}var G0={contains:`contains`,notContains:`does not contain`,is:`is`,isNot:`is not`,gt:`is greater than`,gte:`is at least`,lt:`is less than`,lte:`is at most`,isEmpty:`is empty`,isNotEmpty:`is not empty`,isAnyOf:`is any of`,between:`is between`},K0=[`contains`,`notContains`,`is`,`isNot`,`isEmpty`,`isNotEmpty`],q0=[`is`,`isNot`,`between`,`gt`,`gte`,`lt`,`lte`,`isEmpty`,`isNotEmpty`],J0=[`is`,`isNot`,`isAnyOf`,`isEmpty`,`isNotEmpty`],Y0=[`is`];function X0(e){switch(e){case`number`:case`percent`:case`currency`:case`rating`:case`date`:case`dateTime`:return q0;case`select`:case`multiSelect`:case`relation`:return J0;case`boolean`:return Y0;default:return K0}}var Z0=(e,t)=>t==null||t===``?!0:Array.isArray(t)?t.length===0:e?.type===`currency`&&A0(t?.amount)==null,Q0=e=>e===`number`||e===`percent`||e===`currency`||e===`rating`||e===`date`||e===`dateTime`;function $0(e,t){if(e?.type===`multiSelect`)return j0(t).map(k0).filter(e=>e!==``);if(e?.type===`relation`){let e=e2(t);return e?[e]:[]}let n=k0(t);return n===``?[]:[n]}var e2=e=>{if(typeof e==`string`)return e;if(e&&typeof e==`object`){let t=e;return k0(t.id??t.value??``)}return``};function t2(e,t,n){if(n.op===`isEmpty`)return Z0(e,t);if(n.op===`isNotEmpty`)return!Z0(e,t);let r=e?.type;if(r===`boolean`){let e=t===!0||t===`true`||t===1,r=n.value===!0||n.value===`true`||n.value===1;return n.op===`isNot`?e!==r:e===r}if(r===`select`||r===`multiSelect`||r===`relation`){let r=new Set($0(e,t));if(n.op===`isAnyOf`){let e=new Set((Array.isArray(n.value)?n.value:[]).map(k0));return e.size===0||[...r].some(t=>e.has(t))}let i=k0(n.value);return n.op===`is`?r.has(i):n.op!==`isNot`||!r.has(i)}if(Q0(r)){let i=L0(e,t),a=typeof i==`number`?i:null,o=r===`date`||r===`dateTime`,s=e=>o?P0(e):A0(e);if(n.op===`between`){let[e,t]=U0(n.value),r=e===void 0?null:s(e),i=t===void 0?null:s(t);if(a==null)return!1;let c=i!=null&&o&&N0(t)?i+M0-1:i;return(r==null||a>=r)&&(c==null||a<=c)}let c=s(n.value);if(a==null||c==null)return n.op===`isNot`;switch(n.op){case`is`:return a===c;case`isNot`:return a!==c;case`gt`:return a>c;case`gte`:return a>=c;case`lt`:return a<c;case`lte`:return a<=c;default:return!0}}let i=k0(L0(e,t)),a=k0(n.value).toLowerCase();switch(n.op){case`contains`:return i.includes(a);case`notContains`:return!i.includes(a);case`is`:return i===a;case`isNot`:return i!==a;default:return!0}}function n2(e,t,n,r=`and`){let i=t.filter(W0);if(i.length===0)return e.slice();let a=e=>t=>t2(R0(n,t.field),e[t.field],t);return e.filter(e=>r===`or`?i.some(a(e)):i.every(a(e)))}function r2(e,t,n){let r=t.trim().toLowerCase();return r?e.filter(e=>n.some(t=>{let n=L0(t,e[t.name]);return n!=null&&String(n).toLowerCase().includes(r)})):e.slice()}function i2(e,t,n){let r=e.length,i=Math.max(1,Math.ceil(r/n)),a=Math.min(Math.max(1,t),i),o=(a-1)*n,s=e.slice(o,o+n);return{items:s,page:a,pageCount:i,total:r,from:r===0?0:o+1,to:o+s.length}}function a2(e,t,n){let r=e.filter(e=>!n?.has(e.name));if(!t||t.length===0)return r;let i=new Map(r.map(e=>[e.name,e])),a=[];for(let e of t){let t=i.get(e);t&&(a.push(t),i.delete(e))}for(let e of r)i.has(e.name)&&a.push(e);return a}var o2=new Set([`boolean`,`select`,`multiSelect`,`date`,`dateTime`,`relation`,`rating`,`files`]),s2=80,c2={regular:{row:44,pad:12,select:44},compact:{row:32,pad:8,select:28}};function l2(e){let{fields:t,records:n,getRowKey:r,loading:i,empty:a=`No records yet.`,sorts:o=[],onSortChange:s,onOpen:c,selectable:l,onSelectionChange:u,bulkActions:d,editable:f,onEditCommit:p,fieldOptions:m,columnOrder:h,onColumnOrderChange:g,hiddenFields:_,pageSize:v=25,remote:y}=e,b=c2[Lx()],x=e.rowHeight??b.row,S=b.select,C=(0,V.useMemo)(()=>new Set(_??[]),[_]),[w,T]=(0,V.useState)(h);(0,V.useEffect)(()=>{h&&T(h)},[h]);let E=(0,V.useMemo)(()=>a2(t,w,C),[t,w,C]),[D,O]=(0,V.useState)({}),[k,A]=(0,V.useState)(new Set),[j,M]=(0,V.useState)(null),[ee,N]=(0,V.useState)(void 0),[te,ne]=(0,V.useState)(null),[re,ie]=(0,V.useState)(1),ae=(0,V.useCallback)((e,t)=>r?r(e,t):e.id==null?String(t):String(e.id),[r]),oe=(0,V.useMemo)(()=>{if(y){let e=v>0?v:Math.max(1,n.length),t=y.total===0||n.length===0?0:(y.page-1)*e+1;return{items:n,page:y.page,pageCount:Math.max(1,Math.ceil(y.total/e)),total:y.total,from:t,to:t===0?0:t+n.length-1}}return v>0?i2(n,re,v):{items:n,page:1,pageCount:1,total:n.length,from:+!!n.length,to:n.length}},[n,re,v,y]);(0,V.useEffect)(()=>{!y&&re>oe.pageCount&&ie(oe.pageCount)},[y,re,oe.pageCount]);let se=e=>{let t=Math.min(Math.max(1,e),oe.pageCount);y?y.onPage(t):ie(t)},ce=(0,V.useCallback)(e=>{A(e),u?.([...e])},[u]),le=oe.items.map((e,t)=>ae(e,t)),ue=le.length>0&&le.every(e=>k.has(e)),de=le.some(e=>k.has(e)),fe=()=>{let e=new Set(k);ue?le.forEach(t=>e.delete(t)):le.forEach(t=>e.add(t)),ce(e)},pe=e=>{let t=new Set(k);t.has(e)?t.delete(e):t.add(e),ce(t)},me=e=>s?.(V0(o,e)),he=(0,V.useRef)([]),[ge,_e]=(0,V.useState)(null),ve=(e,t)=>n=>{let r=n.clientX??n.nativeEvent?.clientX??0,i=t?.getBoundingClientRect().width??s2,a=t=>O(n=>({...n,[e]:Math.max(s2,i+(t.clientX-r))})),o=()=>{window.removeEventListener(`pointermove`,a),window.removeEventListener(`pointerup`,o)};window.addEventListener(`pointermove`,a),window.addEventListener(`pointerup`,o)},ye=e=>t=>{if(!g&&h)return;let n=he.current.map(e=>e?.getBoundingClientRect()??null),r=t.clientX??t.nativeEvent?.clientX??0;_e({from:e,x:r,target:e});let i=t=>{let r=n.length-1;for(let e=0;e<n.length;e++){let i=n[e];if(i&&t.clientX<i.left+i.width/2){r=e;break}}_e({from:e,x:t.clientX,target:r})},a=()=>{window.removeEventListener(`pointermove`,i),window.removeEventListener(`pointerup`,a),_e(e=>{if(e&&e.target!==e.from){let t=E.map(e=>e.name),[n]=t.splice(e.from,1);t.splice(e.target,0,n),T(t),g?.(t)}return null})};window.addEventListener(`pointermove`,i),window.addEventListener(`pointerup`,a)},be=(e,t,n)=>{f&&!t.readOnly&&T0(t.type)&&(M({key:e,field:t.name}),N(n))},xe=()=>{M(null),N(void 0)},Se=(0,V.useCallback)(async(e,t,n)=>{let r=`${j?.key}:${t.name}`;if(M(null),N(void 0),p)try{ne(r),await p(e,t,n)}finally{ne(null)}},[j,p]),Ce=!f&&!!c,we=(l?S:0)+E.reduce((e,t)=>e+(D[t.name]??t.width??160),0),Te=e=>{let t=D[e.name]??e.width;return t?{width:t}:{flex:1,minW:140}},I={borderBottomWidth:1,borderColor:`$borderColor`};return(0,H.jsxs)(F,{"data-slot":`data-table`,rounded:`$3`,overflow:`hidden`,borderWidth:1,borderColor:`$borderColor`,bg:`$background`,children:[l&&k.size>0?(0,H.jsxs)(P,{items:`center`,justify:`space-between`,px:b.pad,py:`$2`,bg:`$panel`,...I,children:[(0,H.jsx)(U,{fontSize:`$2`,fontWeight:`600`,color:`$ink`,children:`${k.size} selected`}),(0,H.jsxs)(P,{items:`center`,gap:`$2`,children:[d?.([...k]),(0,H.jsx)(kS,{size:`xs`,variant:`ghost`,emphasis:`subtle`,onPress:()=>ce(new Set),children:`Clear`})]})]}):null,(0,H.jsxs)(F,{role:`table`,"aria-rowcount":oe.total+1,style:{minWidth:we},children:[(0,H.jsxs)(P,{bg:`$panel`,minH:x,...I,role:`row`,children:[l?(0,H.jsx)(P,{width:S,items:`center`,justify:`center`,shrink:0,role:`columnheader`,children:(0,H.jsx)(O0,{checked:ue,indeterminate:!ue&&de,onChange:fe,label:`Select all rows`})}):null,E.map((e,t)=>{let n=H0(o,e.name),r=ge&&ge.target===t&&ge.from!==t;return(0,H.jsxs)(P,{...Te(e),role:`columnheader`,"aria-sort":n===`asc`?`ascending`:n===`desc`?`descending`:void 0,items:`center`,gap:`$1`,px:b.pad,borderLeftWidth:r?2:0,borderLeftColor:`var(--primary)`,opacity:ge?.from===t?.5:1,ref:e=>{he.current[t]=e},style:{position:`relative`},children:[(0,H.jsxs)(P,{items:`center`,gap:`$1`,flex:1,minW:0,cursor:`pointer`,onPress:()=>me(e.name),onPointerDown:ye(t),children:[(0,H.jsx)(U,{fontSize:`$2`,fontWeight:`500`,numberOfLines:1,color:`$aside`,children:e.label}),n===`asc`?(0,H.jsx)(cy,{size:12,color:`$hint`}):n===`desc`?(0,H.jsx)(ay,{size:12,color:`$hint`}):s?(0,H.jsx)(by,{size:12,color:`$hush`}):null]}),(0,H.jsx)(F,{width:8,height:`100%`,cursor:`col-resize`,onPointerDown:ve(e.name,he.current[t]),style:{position:`absolute`,right:-4,top:0,zIndex:2}})]},e.name)})]}),i?(0,H.jsx)(P,{role:`row`,children:(0,H.jsxs)(P,{flex:1,px:`$4`,py:`$6`,items:`center`,justify:`center`,gap:`$2`,role:`cell`,"aria-live":`polite`,children:[(0,H.jsx)(Xv,{size:`small`,"aria-hidden":!0}),(0,H.jsx)(U,{fontSize:`$2`,color:`$hint`,children:`Loading…`})]})}):oe.items.length===0?(0,H.jsx)(P,{role:`row`,children:(0,H.jsx)(F,{flex:1,px:`$4`,py:`$7`,items:`center`,gap:`$1`,role:`cell`,children:typeof a==`string`?(0,H.jsx)(U,{fontSize:`$2`,color:`$hint`,children:a}):a})}):oe.items.map((e,t)=>{let n=ae(e,t),r=k.has(n);return(0,H.jsxs)(P,{group:!0,role:`row`,"aria-selected":l?r:void 0,items:`stretch`,cursor:Ce?`pointer`:void 0,onPress:Ce?()=>c?.(e):void 0,bg:r?`$hover`:`transparent`,hoverStyle:{bg:`$hover`},minH:x,...I,children:[l?(0,H.jsx)(P,{width:S,items:`center`,justify:`center`,shrink:0,role:`cell`,children:(0,H.jsx)(O0,{checked:r,onChange:()=>pe(n),label:`Select row ${oe.from+t}`})}):null,E.map((t,r)=>{let i=f&&j?.key===n&&j.field===t.name,a=f&&!t.readOnly&&T0(t.type),o=`${n}:${t.name}`,s=m?.(t)?{...t,metadata:{...t.metadata,options:m(t)}}:t;return(0,H.jsxs)(P,{...Te(t),role:`cell`,items:`center`,px:b.pad,minW:0,style:{position:`relative`},children:[i?(0,H.jsx)(F,{flex:1,minW:0,py:`$1`,onPress:e=>e.stopPropagation?.(),children:(0,H.jsx)(w0,{field:s,value:ee,autoFocus:!0,onChange:n=>o2.has(t.type)?void Se(e,t,n):N(n),onSubmit:()=>void Se(e,t,ee),onCancel:xe})}):(0,H.jsxs)(P,{flex:1,minW:0,items:`center`,gap:`$1`,minH:x-8,cursor:a?`text`:void 0,onPress:a?()=>be(n,t,e[t.name]):void 0,hoverStyle:a?{bg:`$raised`}:void 0,rounded:`$xs`,px:a?`$1`:0,mx:a?-4:0,overflow:`hidden`,children:[(0,H.jsx)(C0,{field:t,value:e[t.name]}),te===o?(0,H.jsx)(Xv,{size:`small`,"aria-hidden":!0}):null]}),r===0&&c&&f&&!i?(0,H.jsx)(P,{position:`absolute`,r:b.pad/2,opacity:0,"$group-hover":{opacity:1},focusWithinStyle:{opacity:1},children:(0,H.jsx)(Vx,{framed:!0,size:`icon-2xs`,variant:`ghost`,children:(0,H.jsx)(kS,{size:`icon-2xs`,variant:`ghost`,emphasis:`subtle`,"aria-label":`Open record`,onPress:()=>c(e),children:(0,H.jsx)(eb,{})})})}):null]},t.name)})]},n)})]}),!i&&v>0&&oe.total>0?(0,H.jsxs)(P,{items:`center`,justify:`space-between`,px:b.pad,py:`$1`,bg:`$panel`,borderTopWidth:1,borderColor:`$borderColor`,children:[(0,H.jsx)(U,{fontSize:`$1`,color:`$hint`,children:`${oe.from.toLocaleString()}–${oe.to.toLocaleString()} of ${oe.total.toLocaleString()}`}),(0,H.jsxs)(P,{items:`center`,gap:`$1`,children:[(0,H.jsx)(kS,{size:`icon-xs`,variant:`ghost`,emphasis:`subtle`,"aria-label":`Previous page`,disabled:oe.page<=1,onPress:()=>se(oe.page-1),children:(0,H.jsx)(_y,{})}),(0,H.jsx)(U,{fontSize:`$1`,px:`$1`,color:`$hint`,children:`${oe.page.toLocaleString()} / ${oe.pageCount.toLocaleString()}`}),(0,H.jsx)(kS,{size:`icon-xs`,variant:`ghost`,emphasis:`subtle`,"aria-label":`Next page`,disabled:oe.page>=oe.pageCount,onPress:()=>se(oe.page+1),children:(0,H.jsx)(vy,{})})]})]}):null]})}var u2=`red.ruby.crimson.tomato.orange.amber.yellow.lime.grass.green.jade.mint.teal.cyan.sky.blue.iris.violet.purple.plum.pink.bronze.gold.brown.gray.mauve.olive.sage.sand.slate`.split(`.`),d2=e=>({bg:`var(--data-${e}-3)`,fg:`var(--data-${e}-11)`,border:`var(--data-${e}-6)`});Object.fromEntries(u2.map(e=>[e,d2(e)]));var f2={text:`#f4f4f5`,textMuted:`#a1a1aa`,textFaint:`#71717a`,surface:`#09090b`,surfaceRaised:`#0a0a0a`,border:`#27272a`,hover:`#18181b`,accent:`#60a5fa`,danger:`#fca5a5`},p2=I(F,{name:`Card`,backgroundColor:`$background`,position:`relative`,borderRadius:`$true`}),m2={header:32,check:24,value:156,icon:16,rows:2};function h2(e){return Lx()===`compact`?(0,H.jsx)(v2,{...e}):(0,H.jsx)(y2,{...e})}var g2=(e,t,n)=>{let r=e??t[0]?.name,i=r==null?void 0:n[r];return{name:r,text:i==null||i===``?`Untitled`:String(i)}},_2=e=>{let t=e?.target;return!!(t instanceof Element&&t.closest(`button, a, [role="button"], [role="checkbox"], [role="link"]`))};function v2({titleField:e,fields:t,record:n,onPress:r,selected:i=!1,onSelectedChange:a,active:o=!1,fieldIcons:s,imageField:c,drag:l}){let[u,d]=(0,V.useState)(!1),[f,p]=(0,V.useState)(!1),m=g2(e,t,n),h=t.filter(e=>e.name!==m.name&&e.name!==c),g=n.id==null?m.text:String(n.id),_=c?n[c]:void 0,v=r?()=>r(n):void 0,y=a&&(u||i);return(0,H.jsxs)(F,{"data-slot":`record-card`,"data-selected":i?``:void 0,"data-active":o?``:void 0,bg:i||o||f?`$hover`:`$panel`,borderWidth:1,borderColor:o?`$rim`:`$borderColor`,hoverStyle:{borderColor:`$rim`},rounded:`$xs`,overflow:`hidden`,cursor:v?`pointer`:void 0,opacity:l===`source`?.3:1,scale:l===`preview`?1.02:1,onHoverIn:()=>d(!0),onHoverOut:()=>d(!1),onFocus:()=>p(!0),onBlur:()=>p(!1),onPress:v?e=>_2(e)?void 0:v():void 0,children:[(0,H.jsxs)(P,{"data-slot":`record-card-header`,minH:m2.header,items:`center`,pt:`$2`,pr:`$2`,pb:`$1`,pl:`$2`,children:[(0,H.jsx)(P,{flex:1,minW:0,children:(0,H.jsx)(rK,{size:`sm`,weight:`medium`,label:m.text,startElement:(0,H.jsx)(VS,{size:`sm`,shape:`rounded`,name:m.text,colorSeed:g,src:_??null}),...v?{onPress:v}:null})}),a?(0,H.jsx)(P,{"data-slot":`record-card-check`,height:20,width:y?m2.check:0,$touchable:{width:m2.check},overflow:`hidden`,justify:`flex-end`,items:`center`,shrink:0,style:{transition:`width 160ms var(--ease-out, ease)`},children:(0,H.jsx)($S,{variant:`outline`,checked:i,onCheckedChange:e=>a(e===!0),"aria-label":`Select ${m.text}`})}):null]}),h.length?(0,H.jsx)(F,{"data-slot":`record-card-body`,gap:m2.rows,pt:0,pr:`$2`,pb:`$2`,pl:10,children:h.map(e=>(0,H.jsxs)(P,{items:`center`,gap:`$2`,minH:24,children:[s?.[e.name]?(0,H.jsx)(P,{width:m2.icon,height:m2.icon,items:`center`,justify:`center`,shrink:0,children:s[e.name]}):(0,H.jsx)(U,{fontSize:`$1`,color:`$hint`,numberOfLines:1,shrink:0,children:e.label}),(0,H.jsx)(F,{flex:1,minW:0,maxW:m2.value,children:(0,H.jsx)(C0,{field:e,value:n[e.name]})})]},e.name))}):null]})}function y2({titleField:e,fields:t,record:n,onPress:r}){let i=g2(e,t,n),a=t.filter(e=>e.name!==i.name);return(0,H.jsxs)(p2,{p:12,gap:8,borderWidth:1,rounded:8,cursor:r?`pointer`:void 0,hoverStyle:r?{bg:f2.hover}:void 0,onPress:r?()=>r(n):void 0,style:{backgroundColor:f2.surface,borderColor:f2.border},children:[(0,H.jsx)(U,{fontSize:14,fontWeight:`700`,numberOfLines:1,style:{color:f2.text},children:i.text}),a.map(e=>(0,H.jsxs)(P,{gap:8,items:`center`,children:[(0,H.jsx)(U,{fontSize:11,numberOfLines:1,width:84,style:{color:f2.textFaint},children:e.label}),(0,H.jsx)(F,{flex:1,children:(0,H.jsx)(C0,{field:e,value:n[e.name]})})]},e.name))]})}var b2=e=>e==null?``:String(e),x2=new Set([`select`,`boolean`,`relation`]);function S2(e){return e.filter(e=>x2.has(e.type))}function C2(e){let t=e.filter(e=>e.type===`select`);return t.length>0?t[0].name:S2(e)[0]?.name}function w2(e,t){if(e.type===`boolean`)return t==null||t===``?``:t===!0||t===`true`||t===1?`true`:`false`;if(e.type===`relation`){if(t&&typeof t==`object`){let e=t;return b2(e.id??e.value??``)}return b2(t)}return b2(t)}function T2(e){if(e.type===`boolean`){let t=e.metadata??{};return[{key:`true`,label:t.trueLabel??`Yes`,color:`green`},{key:`false`,label:t.falseLabel??`No`,color:`gray`}]}return(e.metadata?.options??[]).map(e=>({key:e.value,label:e.label,color:e.color}))}function E2(e,t,n={}){let r=n.includeEmpty??!0,i=T2(t),a=[],o=new Map,s=new Map,c=(e,t,n)=>{s.has(e)||(s.set(e,[]),a.push(e),o.set(e,{label:t,color:n}))};r&&c(``,n.emptyLabel??`No ${t.label.toLowerCase()}`);for(let e of i)c(e.key,e.label,e.color);for(let i of e){let e=w2(t,i[t.name]);(e!==``||r)&&(s.has(e)||c(e,e||(n.emptyLabel??`No ${t.label.toLowerCase()}`)),s.get(e).push(i))}return a.filter(e=>!(e===``&&(s.get(e)?.length??0)===0&&i.length>0)).map(e=>({key:e,...o.get(e),records:s.get(e)??[]}))}function D2(e,t){return e.type===`boolean`?{[e.name]:t===`true`}:{[e.name]:t===``?null:t}}var O2=300,k2=200;function A2(e){let{fields:t,records:n,groupField:r,titleField:i,cardFields:a,onOpen:o,onRecordChange:s,onCreate:c,getRowKey:l}=e,{selectedIds:u,onSelectedChange:d,activeId:f,fieldIcons:p}=e,m=e=>l?l(e):String(e.id??``),h=Lx()===`compact`,g=h?k2:O2,_=(e,t)=>h?{selected:u?.has(m(e))??!1,onSelectedChange:d?t=>d(e,t):void 0,active:f!=null&&f===m(e),fieldIcons:p,drag:t}:null,v=t.find(e=>e.name===r),[y,b]=(0,V.useState)({});(0,V.useEffect)(()=>{b({})},[n]);let x=(0,V.useRef)(null),S=(0,V.useRef)([]),[C,w]=(0,V.useState)(null),T=(0,V.useMemo)(()=>v?n.map(e=>y[m(e)]==null?e:{...e,[v.name]:y[m(e)]===``?null:y[m(e)]}):n,[n,y,v]),E=(0,V.useMemo)(()=>v?E2(T,v):[],[T,v]);if(!v)return h?(0,H.jsx)(F,{p:`$5`,items:`center`,borderWidth:1,rounded:`$xs`,borderColor:`$borderColor`,bg:`$panel`,children:(0,H.jsx)(U,{fontSize:`$2`,color:`$hint`,children:`Pick a select or status field to group the board by.`})}):(0,H.jsx)(F,{p:24,items:`center`,borderWidth:1,rounded:10,style:{borderColor:f2.border,backgroundColor:f2.surface},children:(0,H.jsx)(U,{style:{color:f2.textFaint},children:`Pick a select or status field to group the board by.`})});let D=e=>t=>{if(!s)return;let n=m(e),r=w2(v,e[v.name]),i=S.current.map(e=>e?.getBoundingClientRect()??null),a=t.clientX??t.nativeEvent?.clientX??0,o=t.clientY??t.nativeEvent?.clientY??0;w({id:n,from:r,x:a,y:o,target:r});let c=e=>{let t=r;for(let n=0;n<i.length;n++){let a=i[n];if(a&&e.clientX>=a.left&&e.clientX<=a.right){t=E[n]?.key??r;break}}w({id:n,from:r,x:e.clientX,y:e.clientY,target:t})},l=()=>{window.removeEventListener(`pointermove`,c),window.removeEventListener(`pointerup`,l),w(t=>(t&&t.target!==t.from&&(b(e=>({...e,[t.id]:t.target})),Promise.resolve(s(e,D2(v,t.target))).catch(()=>b(e=>{let n={...e};return delete n[t.id],n}))),null))};window.addEventListener(`pointermove`,c),window.addEventListener(`pointerup`,l)},O=C?T.find(e=>m(e)===C.id):void 0,k=()=>x.current?.getBoundingClientRect();return(0,H.jsxs)(F,{ref:e=>{x.current=e},style:{position:`relative`},children:[(0,H.jsx)(Kp,{horizontal:!0,showsHorizontalScrollIndicator:!1,children:(0,H.jsx)(P,{gap:h?8:12,py:2,items:`flex-start`,children:E.map((e,n)=>{let r=C&&C.target===e.key&&C.from!==e.key,l=h?{gap:8,p:4,rounded:`$xs`,bg:r?`$hover`:`transparent`}:{gap:8,p:8,rounded:12,style:{backgroundColor:f2.surfaceRaised,borderWidth:1,borderColor:r?f2.accent:f2.border}};return(0,H.jsxs)(F,{"data-slot":`board-column`,width:g,ref:e=>{S.current[n]=e},...l,children:[h?(0,H.jsxs)(P,{items:`center`,justify:`space-between`,minH:24,px:4,children:[(0,H.jsxs)(P,{items:`center`,gap:`$2`,minW:0,children:[e.key===``?(0,H.jsx)(eK,{variant:`outline`,borderStyle:`dashed`,color:`transparent`,children:e.label}):(0,H.jsx)(eK,{color:e.color??`gray`,children:e.label}),(0,H.jsx)(U,{fontSize:`$1`,color:`$hint`,children:e.records.length})]}),c?(0,H.jsx)(kS,{size:`icon-xs`,variant:`ghost`,emphasis:`subtle`,"aria-label":`Add to ${e.label}`,onPress:()=>c(e.key),children:(0,H.jsx)(lb,{})}):null]}):(0,H.jsxs)(P,{items:`center`,justify:`space-between`,px:4,py:2,children:[(0,H.jsxs)(P,{items:`center`,gap:8,children:[e.key===``?(0,H.jsx)(U,{fontSize:13,fontWeight:`700`,style:{color:f2.textMuted},children:e.label}):(0,H.jsx)(i1,{label:e.label,color:e.color}),(0,H.jsx)(U,{fontSize:12,style:{color:f2.textFaint},children:e.records.length})]}),c?(0,H.jsx)(F,{cursor:`pointer`,p:3,rounded:6,hoverStyle:{bg:f2.hover},onPress:()=>c(e.key),children:(0,H.jsx)(lb,{size:14,color:f2.textMuted})}):null]}),(0,H.jsxs)(F,{gap:8,style:{minHeight:40},children:[e.records.map(e=>{let n=C?.id===m(e);return(0,H.jsx)(F,{onPointerDown:D(e),style:{opacity:n&&!h?.35:1,cursor:s?`grab`:void 0},children:(0,H.jsx)(h2,{titleField:i,fields:a??t.filter(e=>e.name!==v.name),record:e,onPress:o,..._(e,n?`source`:void 0)})},m(e))}),e.records.length===0?h?(0,H.jsx)(F,{items:`center`,justify:`center`,py:`$4`,rounded:`$xs`,borderWidth:1,borderStyle:`dashed`,borderColor:`$borderColor`,children:(0,H.jsx)(U,{fontSize:`$1`,color:`$hint`,children:`Drop here`})}):(0,H.jsx)(F,{items:`center`,justify:`center`,py:16,rounded:8,style:{borderWidth:1,borderColor:f2.border,borderStyle:`dashed`},children:(0,H.jsx)(U,{fontSize:12,style:{color:f2.textFaint},children:`Drop here`})}):null]})]},e.key||`∅`)})})}),C&&O?(0,H.jsx)(F,{width:g-(h?8:20),style:{position:`absolute`,left:C.x-(k()?.left??0)-(g-(h?8:20))/2,top:C.y-(k()?.top??0)-20,pointerEvents:`none`,zIndex:50,...h?null:{transform:[{rotate:`2deg`}],boxShadow:`0 12px 32px rgba(0,0,0,0.4)`}},...h?{className:`elevation-2`}:null,children:(0,H.jsx)(h2,{titleField:i,fields:a??t.filter(e=>e.name!==v.name),record:O,..._(O,`preview`)})}):null]})}var j2=new Set([`boolean`,`select`,`multiSelect`,`date`,`dateTime`,`relation`,`rating`,`files`]),M2=({children:e})=>(0,H.jsx)(U,{fontSize:`$1`,fontWeight:`500`,color:`$hint`,numberOfLines:1,children:e});function N2({field:e,value:t,editable:n,onCommit:r,options:i}){let[a,o]=(0,V.useState)(!1),[s,c]=(0,V.useState)(t),l=n&&!e.readOnly&&T0(e.type)&&!!r,u=i?{...e,metadata:{...e.metadata,options:i}}:e,d=e=>{o(!1),r?.(e)};return(0,H.jsxs)(F,{gap:`$1`,py:`$2`,borderBottomWidth:1,borderColor:`$borderColor`,children:[(0,H.jsx)(M2,{children:e.label}),a?(0,H.jsx)(w0,{field:u,value:s,autoFocus:!0,onChange:t=>j2.has(e.type)?d(t):c(t),onSubmit:()=>d(s),onCancel:()=>{c(t),o(!1)}}):(0,H.jsx)(P,{items:`center`,minH:24,minW:0,cursor:l?`text`:void 0,rounded:`$xs`,px:l?`$1`:0,mx:l?-4:0,hoverStyle:l?{bg:`$hover`}:void 0,...l?{role:`button`,tabIndex:0,"aria-label":`Edit ${e.label}`}:null,onKeyDown:l?e=>{e.key===`Enter`&&(e.preventDefault?.(),c(t),o(!0))}:void 0,onPress:l?()=>{c(t),o(!0)}:void 0,children:(0,H.jsx)(C0,{field:e,value:t})})]})}function P2({fields:e,record:t,title:n,editable:r,onEditCommit:i,fieldOptions:a,related:o}){return(0,H.jsxs)(F,{gap:2,children:[n?(0,H.jsx)(F,{pb:`$3`,mb:`$1`,borderBottomWidth:1,borderColor:`$borderColor`,children:(0,H.jsx)(U,{fontSize:`$7`,fontWeight:`600`,numberOfLines:2,color:`$ink`,children:n})}):null,e.map(e=>(0,H.jsx)(N2,{field:e,value:t[e.name],editable:r,onCommit:i?t=>i(e,t):void 0,options:a?.(e)},e.name)),o?(0,H.jsx)(F,{pt:`$4`,gap:`$2`,children:o}):null]})}function F2(e,t=`default`,n=e===`board`?`Board`:`All records`){return{id:t,name:n,kind:e,filters:[],sorts:[]}}function I2(e,t,n){let r=e;return t.search&&t.search.trim()&&(r=r2(r,t.search,n)),r=n2(r,t.filters,n,t.match),r=B0(r,t.sorts,n),r}function L2(e){let t=X0(e.type);return{field:e.name,op:t[0]??`contains`}}function R2(e,t){return{...e,filters:[...e.filters,t]}}function z2(e,t,n){return{...e,filters:e.filters.map((e,r)=>r===t?{...e,...n}:e)}}function B2(e,t){return{...e,filters:e.filters.filter((e,n)=>n!==t)}}function V2(e,t){return{...e,match:t}}var H2=e=>e===`or`?`and`:`or`;function U2(e,t){return{...e,sorts:t}}function W2(e,t){return{...e,search:t}}function G2(e,t){return{...e,kind:t}}function K2(e,t){return{...e,groupField:t}}function q2(e,t){let n=new Set(e.hiddenFields??[]);return n.has(t)?n.delete(t):n.add(t),{...e,hiddenFields:[...n]}}var J2=new Set([`text`,`longText`,`email`,`url`]),Y2=new Set([`contains`,`notContains`,`is`,`isNot`]);function X2(e,t,n){let r=e.type===`currency`||e.type===`percent`||e.type===`rating`,i=Y2.has(t.op)&&!J2.has(e.type)&&e.type!==`select`&&e.type!==`multiSelect`&&e.type!==`relation`&&e.type!==`boolean`&&!r&&e.type!==`date`&&e.type!==`dateTime`&&e.type!==`number`,a=t.op===`isAnyOf`?{...e,type:`multiSelect`}:r?{...e,type:`number`}:i?{...e,type:`text`,metadata:void 0}:e;return n?{...a,metadata:{...a.metadata,options:n}}:a}function Z2(e,t){let n=t?.metadata?.options,r=e=>n?.find(t=>t.value===e)?.label??String(e);if(e.op===`between`){let[t,n]=U0(e.value);return t!==void 0&&n!==void 0?`${r(t)} to ${r(n)}`:t===void 0?n===void 0?``:`to ${r(n)}`:`from ${r(t)}`}return e.value==null||e.value===``?``:Array.isArray(e.value)?e.value.map(r).join(`, `):r(e.value)}var Q2=e=>e.op!==`isEmpty`&&e.op!==`isNotEmpty`;function $2({field:e,rule:t,onChange:n,fieldOptions:r}){let i=r?.(e),a=(0,V.useMemo)(()=>X2(e,t,i),[e,t,i]);if(t.op!==`between`)return(0,H.jsx)(w0,{field:a,value:t.value,onChange:n});let[o,s]=U0(t.value);return(0,H.jsxs)(P,{items:`center`,gap:6,flex:1,children:[(0,H.jsx)(P,{flex:1,minW:90,"aria-label":`From`,children:(0,H.jsx)(w0,{field:a,value:o,onChange:e=>n([e,s])})}),(0,H.jsx)(U,{fontSize:12,style:{color:f2.textFaint},children:`to`}),(0,H.jsx)(P,{flex:1,minW:90,"aria-label":`To`,children:(0,H.jsx)(w0,{field:a,value:s,onChange:e=>n([o,e])})})]})}var e4={top:39,details:32,chip:24,remove:20,name:130,menu:200,wide:240},t4=(e,t)=>e.find(e=>e.name===t),n4=(e,t)=>e.filter(e=>e.label.toLowerCase().includes(t.trim().toLowerCase()));function r4({open:e,icon:t,children:n,...r}){return(0,H.jsx)(kS,{size:`xs`,variant:`ghost`,color:`$aside`,startIcon:t,bg:e?`$hover`:void 0,...r,children:n})}function i4(e){let{fields:t,view:n,onView:r,extra:i,onCreate:a,createLabel:o=`New`,boardDisabled:s}=e,{savedViews:c,dirty:l=!1,onResetView:u,onSaveView:d,onSaveAsView:f}=e,[p,m]=(0,V.useState)(!1),h=n.sorts.length>0||n.filters.length>0||l&&(u||d);return(0,H.jsxs)(F,{"data-slot":`view-bar`,children:[(0,H.jsxs)(P,{"data-slot":`view-bar-top`,minH:e4.top+1,items:`center`,justify:`space-between`,gap:`$2`,ml:`$1`,pr:`$2`,borderBottomWidth:1,borderColor:`$borderColor`,children:[(0,H.jsx)(a4,{...e}),(0,H.jsxs)(P,{items:`center`,gap:`$0.5`,shrink:1,minW:0,children:[(0,H.jsx)(Cw,{size:`xs`,start:(0,H.jsx)(db,{size:14}),width:180,shrink:1,children:(0,H.jsx)(Dw,{value:n.search??``,onChangeText:e=>r(W2(n,e)),placeholder:`Search…`,"aria-label":`Search records`})}),(0,H.jsx)(o4,{fields:t,view:n,onView:r,open:p,onOpenChange:m,children:(0,H.jsx)(r4,{open:p,icon:(0,H.jsx)(Jy,{}),children:`Filter`})}),(0,H.jsx)(c4,{fields:t,view:n,onView:r}),(0,H.jsx)(l4,{fields:t,view:n,onView:r,boardDisabled:s}),i,a?(0,H.jsx)(kS,{size:`xs`,variant:`primary`,startIcon:(0,H.jsx)(lb,{}),onPress:a,children:o}):null]})]}),h?(0,H.jsxs)(P,{"data-slot":`view-bar-details`,minH:e4.details,items:`center`,gap:`$2`,py:`$1`,px:`$2`,borderTopWidth:1,borderColor:`$borderColor`,flexWrap:`wrap`,children:[n.sorts.map(e=>(0,H.jsx)(f4,{rule:e,fields:t,view:n,onView:r},`sort-${e.field}`)),n.sorts.length>0&&n.filters.length>0?(0,H.jsx)(F,{"data-slot":`view-bar-rule`,width:1,height:16,bg:`$raised`}):null,n.filters.map((t,i)=>(0,H.jsxs)(V.Fragment,{children:[i>0?(0,H.jsx)(kS,{size:`xs`,variant:`ghost`,color:`$aside`,fontWeight:`400`,"aria-label":`Rules combine by ${n.match===`or`?`or`:`and`}; press for ${H2(n.match)}`,onPress:()=>r(V2(n,H2(n.match))),children:n.match===`or`?`or`:`and`}):null,(0,H.jsx)(p4,{index:i,rule:t,...e})]},`filter-${i}`)),(0,H.jsx)(kS,{size:`xs`,variant:`ghost`,color:`$aside`,fontWeight:`400`,startIcon:(0,H.jsx)(lb,{}),onPress:()=>m(!0),children:`Add filter`}),(0,H.jsx)(P,{flex:1}),l&&u?(0,H.jsx)(kS,{size:`xs`,variant:`ghost`,color:`$aside`,fontWeight:`400`,onPress:u,children:`Reset`}):null,l&&d?(0,H.jsxs)(Vx,{size:`xs`,variant:`outline`,"aria-label":`Update view`,children:[(0,H.jsx)(kS,{onPress:d,children:`Update view`}),f?(0,H.jsxs)(FC,{children:[(0,H.jsx)(LC,{asChild:!0,children:(0,H.jsx)(kS,{size:`icon-xs`,"aria-label":`More ways to save the view`,children:(0,H.jsx)(gy,{})})}),(0,H.jsx)(VC,{align:`end`,minW:e4.menu,children:(0,H.jsx)(GC,{onSelect:f,children:`Save as new view`})})]}):null]}):null]}):null]})}function a4({view:e,onView:t,count:n,savedViews:r,boardDisabled:i}){let[a,o]=(0,V.useState)(!1),s=e.kind===`board`?Ky:xb;return(0,H.jsxs)(FC,{open:a,onOpenChange:o,children:[(0,H.jsx)(LC,{asChild:!0,children:(0,H.jsxs)(kS,{size:`xs`,variant:`ghost`,color:`$aside`,pl:`$1`,startIcon:(0,H.jsx)(s,{size:16}),endIcon:(0,H.jsx)(gy,{size:14,color:`$hush`}),bg:a?`$hover`:void 0,"aria-label":`View: ${e.name}`,children:[(0,H.jsx)(XG,{text:e.name,maxW:e4.name,fontSize:`$2`,fontWeight:`500`,color:`$aside`}),n==null?null:(0,H.jsx)(U,{fontSize:`$2`,color:`$hint`,children:`· ${n}`})]})}),(0,H.jsxs)(VC,{minW:e4.menu,children:[r&&r.views.length?(0,H.jsx)(YC,{value:r.activeId??e.id,onValueChange:e=>{let n=r?.views.find(t=>t.id===e);n&&r&&(r.onSelect(n.id),t(n))},children:(0,H.jsx)($C,{label:`Views`,children:r.views.map(e=>(0,H.jsx)(ZC,{value:e.id,children:e.name},e.id))})}):null,i?null:(0,H.jsxs)(YC,{value:e.kind,onValueChange:n=>n===`table`||n===`board`?t(G2(e,n)):void 0,children:[(0,H.jsx)(cw,{variant:`band`,children:`Layout`}),(0,H.jsx)(ZC,{value:`table`,children:`Table`}),(0,H.jsx)(ZC,{value:`board`,children:`Board`})]})]})]})}function o4({fields:e,view:t,onView:n,open:r,onOpenChange:i,children:a}){let[o,s]=(0,V.useState)(``),c=n4(e,o);return(0,H.jsxs)(FC,{open:r,onOpenChange:e=>{i(e),e||s(``)},children:[(0,H.jsx)(LC,{asChild:!0,children:a}),(0,H.jsxs)(VC,{minW:e4.menu,children:[(0,H.jsx)(QC,{value:o,onValueChange:s,placeholder:`Search fields`}),(0,H.jsx)($C,{scrollable:!0,children:c.map(e=>(0,H.jsx)(GC,{onSelect:()=>n(R2(t,L2(e))),children:e.label},e.name))}),c.length===0?(0,H.jsx)(ow,{children:`No field matches`}):null]})]})}var s4=(e,t)=>{let n=e.find(e=>e.field===t);return n?n.dir===`asc`?e.map(e=>e.field===t?{...e,dir:`desc`}:e):e.filter(e=>e.field!==t):[...e,{field:t,dir:`asc`}]};function c4({fields:e,view:t,onView:n}){let[r,i]=(0,V.useState)(!1),[a,o]=(0,V.useState)(``),s=n4(e,a);return(0,H.jsxs)(FC,{open:r,onOpenChange:e=>{i(e),e||o(``)},children:[(0,H.jsx)(LC,{asChild:!0,children:(0,H.jsx)(r4,{open:r,icon:(0,H.jsx)(iy,{}),children:`Sort`})}),(0,H.jsxs)(VC,{minW:e4.menu,children:[(0,H.jsx)(QC,{value:a,onValueChange:o,placeholder:`Search fields`}),(0,H.jsx)($C,{scrollable:!0,children:s.map(e=>{let r=t.sorts.find(t=>t.field===e.name)?.dir;return(0,H.jsx)(GC,{onSelect:()=>n(U2(t,s4(t.sorts,e.name))),children:(0,H.jsxs)(P,{flex:1,items:`center`,justify:`space-between`,gap:`$2`,children:[(0,H.jsx)(U,{fontSize:`$2`,color:`$aside`,numberOfLines:1,children:e.label}),r===`asc`?(0,H.jsx)(cy,{size:14,color:`$aside`}):r===`desc`?(0,H.jsx)(ay,{size:14,color:`$aside`}):null]})},e.name)})}),s.length===0?(0,H.jsx)(ow,{children:`No field matches`}):null]})]})}function l4({fields:e,view:t,onView:n,boardDisabled:r}){let[i,a]=(0,V.useState)(!1),o=new Set(t.hiddenFields??[]),s=e.filter(e=>!o.has(e.name)).map(e=>e.name),c=S2(e);return(0,H.jsxs)(FC,{open:i,onOpenChange:a,defaultPage:`options`,children:[(0,H.jsx)(LC,{asChild:!0,children:(0,H.jsx)(r4,{open:i,icon:(0,H.jsx)(hb,{}),children:`Options`})}),(0,H.jsxs)(VC,{align:`end`,minW:e4.wide,children:[(0,H.jsxs)(ew,{id:`options`,children:[(0,H.jsx)(nw,{children:(0,H.jsx)(rw,{children:`View options`})}),(0,H.jsx)(GC,{page:`fields`,children:`Fields`}),t.kind===`board`&&c.length?(0,H.jsx)(GC,{page:`group`,children:`Group by`}):null,r?null:(0,H.jsxs)(YC,{value:t.kind,onValueChange:e=>e===`table`||e===`board`?n(G2(t,e)):void 0,children:[(0,H.jsx)(cw,{variant:`band`,children:`Layout`}),(0,H.jsx)(ZC,{value:`table`,children:`Table`}),(0,H.jsx)(ZC,{value:`board`,children:`Board`})]})]}),(0,H.jsxs)(ew,{id:`fields`,children:[(0,H.jsx)(iw,{children:`Fields`}),(0,H.jsx)(YC,{multiple:!0,value:s,onValueChange:r=>{let i=new Set(Array.isArray(r)?r:r?[r]:[]),a=t;for(let t of e)i.has(t.name)===o.has(t.name)&&(a=q2(a,t.name));n(a)},children:(0,H.jsx)($C,{scrollable:!0,children:e.map(e=>(0,H.jsx)(ZC,{value:e.name,children:e.label},e.name))})})]}),(0,H.jsxs)(ew,{id:`group`,children:[(0,H.jsx)(iw,{children:`Group by`}),(0,H.jsx)(YC,{value:t.groupField??null,onValueChange:e=>n(K2(t,typeof e==`string`?e:void 0)),children:c.map(e=>(0,H.jsx)(ZC,{value:e.name,children:e.label},e.name))})]})]})]})}function u4({label:e,onRemove:t,children:n}){return(0,H.jsxs)(P,{"data-slot":`view-chip`,height:e4.chip,items:`center`,gap:`$1`,p:`$0.5`,pl:`$1`,rounded:`$xs`,bg:`$hover`,borderWidth:1,borderColor:`$borderColor`,children:[n,(0,H.jsx)(kS,{size:`icon-2xs`,variant:`ghost`,emphasis:`subtle`,"aria-label":`Remove ${e}`,onPress:t,children:(0,H.jsx)(Fb,{})})]})}var d4=(e,t,n={})=>(0,H.jsxs)(P,{role:`button`,tabIndex:0,"data-slot":`view-chip-body`,items:`center`,gap:`$1`,cursor:`pointer`,rounded:`$2xs`,focusVisibleStyle:{outlineColor:`$outlineColor`,outlineWidth:2,outlineStyle:`solid`},...n,children:[(0,H.jsx)(U,{fontSize:`$1`,fontWeight:`500`,color:`$ink`,numberOfLines:1,children:e}),t]});function f4({rule:e,fields:t,view:n,onView:r}){let i=t4(t,e.field)?.label??e.field,a=()=>r(U2(n,n.sorts.map(t=>t.field===e.field?{...t,dir:t.dir===`asc`?`desc`:`asc`}:t)));return(0,H.jsx)(u4,{label:`sort by ${i}`,onRemove:()=>r(U2(n,n.sorts.filter(t=>t.field!==e.field))),children:d4(i,e.dir===`asc`?(0,H.jsx)(cy,{size:14,color:`$ink`}):(0,H.jsx)(ay,{size:14,color:`$ink`}),{"aria-label":`Sort by ${i}, ${e.dir===`asc`?`ascending`:`descending`}`,onPress:a,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault?.(),a())}})})}function p4({index:e,rule:t,fields:n,view:r,onView:i,fieldOptions:a}){let[o,s]=(0,V.useState)(!1),c=t4(n,t.field)??n[0],l=X0(c.type),u=Z2(t,c);return(0,H.jsx)(u4,{label:`filter on ${c.label}`,onRemove:()=>i(B2(r,e)),children:(0,H.jsxs)(FC,{open:o,onOpenChange:s,children:[(0,H.jsx)(LC,{asChild:!0,children:d4(c.label,(0,H.jsx)(U,{fontSize:`$1`,color:`$ink`,numberOfLines:1,children:`: ${G0[t.op]}${u?` ${u}`:``}`}),{"aria-label":`Filter: ${c.label} ${G0[t.op]} ${u}`.trim()})}),(0,H.jsxs)(VC,{minW:e4.wide,children:[(0,H.jsxs)(YC,{value:t.op,closeOnSelect:!1,onValueChange:n=>{if(typeof n!=`string`)return;let a=n;i(z2(r,e,a===`between`||t.op===`between`?{op:a,value:void 0}:{op:a}))},children:[(0,H.jsx)(cw,{variant:`band`,children:c.label}),l.map(e=>(0,H.jsx)(ZC,{value:e,children:G0[e]},e))]}),Q2(t)?(0,H.jsx)(F,{p:`$1`,children:(0,H.jsx)($2,{field:c,rule:t,fieldOptions:a,onChange:t=>i(z2(r,e,{value:t}))})}):null]})]})})}var m4=(e,t)=>e.find(e=>e.name===t);function h4({icon:e,label:t,count:n,active:r,style:i,...a}){return(0,H.jsxs)(P,{role:`button`,tabIndex:0,"aria-label":t,...a,items:`center`,gap:6,px:10,py:7,rounded:8,borderWidth:1,cursor:`pointer`,hoverStyle:{borderColor:f2.textMuted},style:{...i,borderColor:r?f2.accent:f2.border,backgroundColor:r?f2.hover:`transparent`},children:[e,(0,H.jsx)(U,{fontSize:13,fontWeight:`600`,style:{color:r?f2.text:f2.textMuted},children:t}),n?(0,H.jsx)(P,{items:`center`,justify:`center`,width:18,height:18,rounded:9,style:{backgroundColor:f2.accent},children:(0,H.jsx)(U,{fontSize:11,fontWeight:`700`,style:{color:`#0b1220`},children:n})}):null]})}function g4({view:e,onView:t,boardDisabled:n}){let r=(n,r,i)=>{let a=e.kind===n;return(0,H.jsxs)(P,{items:`center`,gap:6,px:10,py:6,rounded:7,cursor:`pointer`,onPress:()=>t(G2(e,n)),style:{backgroundColor:a?f2.surface:`transparent`},hoverStyle:a?void 0:{bg:f2.hover},children:[r,(0,H.jsx)(U,{fontSize:13,fontWeight:`600`,style:{color:a?f2.text:f2.textFaint},children:i})]})};return(0,H.jsxs)(P,{p:3,gap:2,rounded:9,borderWidth:1,style:{borderColor:f2.border,backgroundColor:f2.surfaceRaised},children:[r(`table`,(0,H.jsx)(xb,{size:14,color:e.kind===`table`?f2.text:f2.textFaint}),`Table`),n?null:r(`board`,(0,H.jsx)(Ky,{size:14,color:e.kind===`board`?f2.text:f2.textFaint}),`Board`)]})}function _4({fields:e,value:t,onPick:n,trigger:r}){let[i,a]=(0,V.useState)(!1);return(0,H.jsx)(E0,{open:i,onOpenChange:a,width:220,trigger:r,children:e.map(e=>(0,H.jsx)(D0,{active:e.name===t,onPress:()=>{n(e.name),a(!1)},children:(0,H.jsx)(U,{fontSize:13,style:{color:f2.text},children:e.label})},e.name))})}function v4({ops:e,value:t,onPick:n}){let[r,i]=(0,V.useState)(!1);return(0,H.jsx)(E0,{open:r,onOpenChange:i,width:200,trigger:(0,H.jsx)(y4,{text:G0[t]}),children:e.map(e=>(0,H.jsx)(D0,{active:e===t,onPress:()=>{n(e),i(!1)},children:(0,H.jsx)(U,{fontSize:13,style:{color:f2.text},children:G0[e]})},e))})}function y4({text:e,style:t,...n}){return(0,H.jsx)(P,{role:`button`,tabIndex:0,...n,items:`center`,px:8,py:5,rounded:7,borderWidth:1,cursor:`pointer`,hoverStyle:{borderColor:f2.textMuted},style:{...t,borderColor:f2.border,backgroundColor:f2.surface},children:(0,H.jsx)(U,{fontSize:12,numberOfLines:1,style:{color:f2.text},children:e})})}function b4({fields:e,view:t,onView:n,fieldOptions:r}){let[i,a]=(0,V.useState)(!1),o=t.filters.filter(W0).length;return(0,H.jsx)(E0,{open:i,onOpenChange:a,width:420,trigger:(0,H.jsx)(h4,{icon:(0,H.jsx)(Jy,{size:14,color:f2.textMuted}),label:`Filter`,count:o,active:o>0}),children:(0,H.jsxs)(F,{gap:8,p:4,children:[t.filters.length===0?(0,H.jsx)(U,{px:6,py:4,fontSize:12,style:{color:f2.textFaint},children:`No filters yet.`}):null,t.filters.map((i,a)=>{let o=m4(e,i.field)??e[0],s=X0(o.type);return(0,H.jsxs)(P,{items:`center`,gap:6,children:[a===0?(0,H.jsx)(U,{fontSize:12,width:36,style:{color:f2.textFaint},children:`Where`}):(0,H.jsx)(P,{width:36,cursor:`pointer`,onPress:()=>n(V2(t,H2(t.match))),role:`button`,"aria-label":`Rules combine by ${t.match===`or`?`or`:`and`}; press for ${H2(t.match)}`,children:(0,H.jsx)(U,{fontSize:12,fontWeight:`600`,style:{color:f2.accent},children:t.match===`or`?`or`:`and`})}),(0,H.jsx)(_4,{fields:e,value:i.field,onPick:r=>{n(z2(t,a,{field:r,op:X0(m4(e,r).type)[0],value:void 0}))},trigger:(0,H.jsx)(y4,{text:o.label})}),(0,H.jsx)(v4,{ops:s,value:i.op,onPick:e=>n(z2(t,a,e===`between`||i.op===`between`?{op:e,value:void 0}:{op:e}))}),Q2(i)?(0,H.jsx)(P,{flex:1,minW:120,children:(0,H.jsx)($2,{field:o,rule:i,fieldOptions:r,onChange:e=>n(z2(t,a,{value:e}))})}):(0,H.jsx)(P,{flex:1}),(0,H.jsx)(F,{cursor:`pointer`,p:4,rounded:6,hoverStyle:{bg:f2.hover},onPress:()=>n(B2(t,a)),children:(0,H.jsx)(Fb,{size:14,color:f2.textFaint})})]},a)}),(0,H.jsx)(P,{children:(0,H.jsx)(se,{size:`$2`,icon:(0,H.jsx)(lb,{size:14}),onPress:()=>n(R2(t,L2(e[0]))),children:`Add filter`})})]})})}function x4({fields:e,view:t,onView:n}){let[r,i]=(0,V.useState)(!1),a=e=>t.sorts.find(t=>t.field===e)?.dir,o=e=>{let r=t.sorts.find(t=>t.field===e),i;i=r?r.dir===`asc`?t.sorts.map(t=>t.field===e?{...t,dir:`desc`}:t):t.sorts.filter(t=>t.field!==e):[...t.sorts,{field:e,dir:`asc`}],n(U2(t,i))};return(0,H.jsx)(E0,{open:r,onOpenChange:i,width:240,trigger:(0,H.jsx)(h4,{icon:(0,H.jsx)(iy,{size:14,color:f2.textMuted}),label:`Sort`,count:t.sorts.length,active:t.sorts.length>0}),children:e.map(e=>{let t=a(e.name);return(0,H.jsx)(D0,{active:!!t,onPress:()=>o(e.name),trailing:t===`asc`?(0,H.jsx)(cy,{size:13,color:f2.accent}):t===`desc`?(0,H.jsx)(ay,{size:13,color:f2.accent}):null,children:(0,H.jsx)(U,{fontSize:13,style:{color:f2.text},children:e.label})},e.name)})})}function S4({fields:e,view:t,onView:n}){let[r,i]=(0,V.useState)(!1),a=S2(e),o=m4(e,t.groupField??``);return(0,H.jsxs)(E0,{open:r,onOpenChange:i,width:220,trigger:(0,H.jsx)(h4,{icon:(0,H.jsx)(Ey,{size:14,color:f2.textMuted}),label:o?`Group: ${o.label}`:`Group by`,active:!!o}),children:[a.length===0?(0,H.jsx)(U,{px:10,py:6,fontSize:12,style:{color:f2.textFaint},children:`No groupable fields`}):null,a.map(e=>(0,H.jsx)(D0,{active:e.name===t.groupField,onPress:()=>{n(K2(t,e.name)),i(!1)},children:(0,H.jsx)(U,{fontSize:13,style:{color:f2.text},children:e.label})},e.name))]})}function C4(e){return Lx()===`compact`?(0,H.jsx)(i4,{...e}):(0,H.jsx)(w4,{...e})}function w4(e){let{fields:t,view:n,onView:r,onCreate:i,createLabel:a=`New`,extra:o,boardDisabled:s}=e;return(0,H.jsxs)(P,{items:`center`,gap:8,style:{flexWrap:`wrap`},children:[(0,H.jsx)(g4,{view:n,onView:r,boardDisabled:s}),(0,H.jsx)(b4,{...e}),(0,H.jsx)(x4,{fields:t,view:n,onView:r}),n.kind===`board`?(0,H.jsx)(S4,{fields:t,view:n,onView:r}):null,(0,H.jsxs)(P,{flex:1,minW:160,items:`center`,gap:6,px:10,py:6,rounded:8,borderWidth:1,style:{borderColor:f2.border,backgroundColor:f2.surface},children:[(0,H.jsx)(db,{size:14,color:f2.textFaint}),(0,H.jsx)(Jv,{flex:1,size:`$2`,value:n.search??``,onChangeText:e=>r(W2(n,e)),placeholder:`Search…`,style:{borderWidth:0,backgroundColor:`transparent`,paddingLeft:0,paddingRight:0}})]}),o?(0,H.jsx)(V.Fragment,{children:o}):null,i?(0,H.jsx)(se,{size:`$3`,icon:(0,H.jsx)(lb,{size:16}),theme:`blue`,onPress:i,children:a}):null]})}function T4(e){let{fields:t,records:n,loading:r,empty:i,view:a,onViewChange:o,defaultKind:s=`table`,savedViews:c,title:l,onOpen:u,onCreate:d,createLabel:f,onEditCommit:p,onRecordChange:m,fieldOptions:h,selectable:g=!0,editable:_=!0,bulkActions:v,toolbarExtra:y,boardDisabled:b,titleField:x,cardFields:S,remote:C}=e,[w,T]=(0,V.useState)(()=>{let e=F2(s);return s===`board`?{...e,groupField:C2(t)}:e}),E=a??w,D=e=>{let n=e.kind===`board`&&!e.groupField?{...e,groupField:C2(t)}:e;o?o(n):T(n)},O=(0,V.useMemo)(()=>C?n:I2(n,E,t),[C,n,E,t]),k=Lx()===`compact`,A=c?.views.find(e=>e.id===(c.activeId??E.id)),j=!!A&&JSON.stringify(A)!==JSON.stringify(E),M=k&&c?{savedViews:{views:c.views,activeId:c.activeId,onSelect:c.onSelect},dirty:j,onResetView:A?()=>D(A):void 0,onSaveView:()=>c.onSave(E),onSaveAsView:()=>c.onSave({...E,id:`view-${Date.now()}`,name:`View ${c.views.length+1}`})}:null,ee=m??(p?(e,n)=>{let[r]=Object.keys(n),i=t.find(e=>e.name===r);if(i)return p(e,i,n[r])}:void 0);return(0,H.jsxs)(F,{gap:12,children:[l?typeof l==`string`?(0,H.jsx)(U,{fontSize:20,fontWeight:`800`,style:{color:f2.text},children:l}):l:null,c&&!k?(0,H.jsx)(E4,{saved:c,current:E,onLoad:D}):null,(0,H.jsx)(C4,{fields:t,view:E,onView:D,onCreate:d,createLabel:f,fieldOptions:h,extra:y,boardDisabled:b,...k?{count:C?C.total:O.length}:null,...M}),E.kind===`board`?(0,H.jsx)(A2,{fields:t,records:O,groupField:E.groupField??C2(t)??``,titleField:x,cardFields:S,onOpen:u,onRecordChange:ee,onCreate:d?()=>d():void 0}):(0,H.jsx)(l2,{fields:t,records:O,loading:r,empty:i,sorts:E.sorts,onSortChange:e=>D(U2(E,e)),onOpen:u,selectable:g,bulkActions:v,editable:_,onEditCommit:p,fieldOptions:h,hiddenFields:E.hiddenFields,columnOrder:E.columnOrder,onColumnOrderChange:e=>D({...E,columnOrder:e}),pageSize:E.pageSize??25,remote:C})]})}function E4({saved:e,current:t,onLoad:n}){return(0,H.jsxs)(P,{items:`center`,gap:4,style:{flexWrap:`wrap`},children:[e.views.map(r=>{let i=r.id===(e.activeId??t.id);return(0,H.jsxs)(P,{items:`center`,gap:6,px:10,py:6,rounded:8,cursor:`pointer`,onPress:()=>{e.onSelect(r.id),n(r)},style:{backgroundColor:i?f2.hover:`transparent`,borderBottomWidth:2,borderBottomColor:i?f2.accent:`transparent`},hoverStyle:i?void 0:{bg:f2.surfaceRaised},children:[(0,H.jsx)(U,{fontSize:13,fontWeight:i?`700`:`500`,style:{color:i?f2.text:f2.textMuted},children:r.name}),e.onDelete&&e.views.length>1&&(e.deletable?.(r.id)??!0)?(0,H.jsx)(F,{role:`button`,tabIndex:0,"aria-label":`Delete view ${r.name}`,cursor:`pointer`,onPress:t=>{t?.stopPropagation?.(),e.onDelete?.(r.id)},children:(0,H.jsx)(Fb,{size:12,color:f2.textFaint})}):null]},r.id)}),(0,H.jsxs)(P,{items:`center`,gap:4,px:10,py:6,rounded:8,cursor:`pointer`,hoverStyle:{bg:f2.surfaceRaised},onPress:()=>e.onSave({...t,id:`view-${Date.now()}`,name:`View ${e.views.length+1}`}),children:[(0,H.jsx)(lb,{size:13,color:f2.textFaint}),(0,H.jsx)(U,{fontSize:13,style:{color:f2.textFaint},children:`New view`})]})]})}var D4=`with-`,O4=e=>`/bots?bot=${encodeURIComponent(e.name)}`,k4=e=>e?.startsWith(D4)?e.slice(5):void 0,A4=e=>e.filter(e=>e.bot&&!e.gone).sort((e,t)=>e.name.localeCompare(t.name)),j4=(e,t)=>e.kind===`direct`?t.find(t=>t.bot&&e.members.includes(t.id)):void 0,M4=e=>(N4(e)?P4(e):e).replace(/<\/(p|div|li|h[1-6])>|<br\s*\/?>/gi,`
120
+ `).replace(/<[^>]*>/g,``).split(`
121
+ `).map(e=>z4(e).trim()).filter(e=>e!==``),N4=e=>e.trimStart().startsWith(`{"type"`),P4=e=>{let t;try{t=JSON.parse(e)}catch{return e}let n=e=>e.type===`reference`?`@${e.attrs?.label??``}`:(e.text??``)+(e.content??[]).map(n).join(``);return(t.content??[]).map(e=>`<p>${B4(n(e))}</p>`).join(``)},F4=(e,t=[])=>I4(e,t)??L4(e),I4=(e,t)=>{let n=new Map;for(let e of t)e.name.trim()&&n.set(e.name.trim().toLowerCase(),e);if(n.size===0)return null;let r=!1,i=e.replace(/\r\n/g,`
122
+ `).split(`
123
+ `).map(e=>e.trimEnd()).filter(e=>e!==``).map(e=>{let t=[],i=0;for(let a of e.matchAll(/(?<![\w.@-])@([\w.-]+)/g)){let o=n.get(a[1].replace(/[.-]+$/,``).toLowerCase());if(!o)continue;let s=a.index+1+a[1].replace(/[.-]+$/,``).length;a.index>i&&t.push({type:`text`,text:e.slice(i,a.index)}),t.push({type:`reference`,attrs:{id:`person-${o.id}`,objectclass:`contact:class:Person`,label:o.name}}),i=s,r=!0}return i<e.length&&t.push({type:`text`,text:e.slice(i)}),{type:`paragraph`,content:t}});return r?JSON.stringify({type:`doc`,content:i}):null},L4=e=>e.replace(/\r\n/g,`
124
+ `).split(`
125
+ `).map(e=>e.trimEnd()).filter(e=>e!==``).map(e=>`<p>${B4(e)}</p>`).join(``)||`<p></p>`,R4={"&amp;":`&`,"&lt;":`<`,"&gt;":`>`,"&quot;":`"`,"&#39;":`'`,"&#34;":`"`,"&nbsp;":` `},z4=e=>e.replace(/&(?:amp|lt|gt|quot|nbsp|#39|#34);/g,e=>R4[e]??e),B4=e=>e.replace(/[&<>"']/g,e=>`&${{"&":`amp`,"<":`lt`,">":`gt`,'"':`quot`,"'":`#39`}[e]};`),V4=/(?<![\w.@-])(@[\w.-]+)|(https?:\/\/[^\s<>()]+)/g,H4=e=>{let t=[],n=0;for(let r of e.matchAll(V4)){let i=r.index;i>n&&t.push({kind:`text`,value:e.slice(n,i)}),t.push(r[1]?{kind:`mention`,value:r[1]}:{kind:`link`,value:r[2]}),n=i+r[0].length}return n<e.length&&t.push({kind:`text`,value:e.slice(n)}),t},U4={channel:gZ.channel,direct:gZ.direct,message:gZ.message,reply:gZ.reply,reaction:gZ.reaction,person:gZ.person},W4=_Z.create,G4=_Z.remove,K4=(e,t)=>e.name||e.members.map(e=>t.find(t=>t.id===e)?.name).filter(e=>!!e).join(`, `),q4=e=>typeof e==`string`?e:``,J4=e=>typeof e==`number`?e:0,Y4=async e=>{let[t,n]=await Promise.all([e.find(U4.channel),e.find(U4.direct)]);return[...t.map(e=>Z4(e,`channel`)),...n.map(e=>Z4(e,`direct`))].filter(e=>!e.archived)},X4=e=>{let t=new Set;if(Array.isArray(e.bindings))for(let n of e.bindings)typeof n==`string`&&n.startsWith(`connect:`)&&t.add(n.slice(8));let n=q4(e.topic)||q4(e.description);for(let e of n.matchAll(/connect:([a-z0-9_-]+)/gi))e[1]&&t.add(e[1].toLowerCase());let r=q4(e.name).match(/^[a-z0-9]+-x-([a-z0-9_-]+)$/i);return r?.[1]&&t.add(r[1].toLowerCase()),t.size>0?[...t]:void 0},Z4=(e,t)=>({id:q4(e._id),kind:t,name:q4(e.name),topic:q4(e.topic)||void 0,private:e.private===!0,archived:e.archived===!0,members:Array.isArray(e.members)?e.members.filter(e=>typeof e==`string`):[],connectedOrgs:X4(e)}),Q4=async(e,t)=>(await e.find(U4.message,{attachedTo:t})).map(e=>e3(e,t)).sort($4),$4=(e,t)=>e.at-t.at||(e.id<t.id?-1:1),e3=(e,t)=>({id:q4(e._id),room:t,author:q4(e.createdBy)||q4(e.modifiedBy),lines:M4(q4(e.message)),at:J4(e.createdOn)||J4(e.modifiedOn),replies:J4(e.replies),pinned:e.isPinned===!0}),t3=async(e,t)=>(await e.find(U4.reply,{attachedTo:t})).map(e=>({...n3(e),room:t})).sort($4),n3=e=>e3(e,q4(e.attachedTo)),r3=async(e,t)=>t.length===0?[]:(await e.find(U4.reaction,{attachedTo:{$in:t}})).map(e=>({id:q4(e._id),message:q4(e.attachedTo),emoji:q4(e.emoji),by:q4(e.createBy)||q4(e.createdBy)})),i3=e=>bZ({name:e}).replace(/\s+/g,` `),a3=e=>{let t=e[`contact:mixin:Employee`];return q4(e.position)||(t&&typeof t==`object`?q4(t.position):``)},o3=e=>{let t=e[`contact:mixin:Employee`],n=t&&typeof t==`object`?t.active:e.active;return typeof n==`boolean`?n:void 0},s3=async e=>(await e.find(U4.person)).map(e=>({id:q4(e.personUuid)||q4(e._id),name:i3(q4(e.name)),avatar:q4(e.avatar)||void 0,bot:a3(e)===`Agent`||void 0,gone:o3(e)===!1||void 0})),c3=(e,t,n,r=[])=>e.write(h3(g3(),U4.message,t.id,t.id,p3(t),`messages`,m3(e),{message:F4(n,r)})),l3=(e,t,n,r,i=[])=>e.write(h3(g3(),U4.reply,t.id,n.id,U4.message,`replies`,m3(e),{message:F4(r,i),objectId:t.id,objectClass:p3(t)})),u3=(e,t,n,r)=>e.write(h3(g3(),U4.reaction,t.id,n.id,U4.message,`reactions`,m3(e),{emoji:r})),d3=(e,t,n)=>e.write({_class:G4,objectId:n.id,objectClass:U4.reaction,objectSpace:t.id,modifiedBy:m3(e),modifiedOn:Date.now()}),f3=async(e,t,n,r)=>{let i=t.trim().replace(/^#+/,``).toLowerCase().replace(/[^a-z0-9_-]+/g,`-`),a=n.map(e=>e.trim().toLowerCase().replace(/[^a-z0-9_-]+/g,``)).filter(Boolean),o=`connect-${i}-${g3().slice(0,8)}`,s=Date.now(),c=m3(e),l=a.map(e=>`connect:${e}`),u=[r?.trim(),...l].filter(Boolean).join(` · `);return await e.write({_class:W4,objectId:o,objectClass:U4.channel,objectSpace:`core:space:Space`,modifiedBy:c,modifiedOn:s,createdBy:c,createdOn:s,attributes:{name:i,topic:u,description:u,private:!1,archived:!1,members:c?[c]:[],owners:c?[c]:[],life:`standing`,bindings:l}}),o},p3=e=>e.kind===`direct`?U4.direct:U4.channel,m3=e=>e.account??``,h3=(e,t,n,r,i,a,o,s)=>{let c=Date.now();return{_class:W4,objectId:e,objectClass:t,objectSpace:n,modifiedBy:o,modifiedOn:c,createdBy:o,createdOn:c,attributes:s,attachedTo:r,attachedToClass:i,collection:a}},g3=()=>[...crypto.getRandomValues(new Uint8Array(16))].map(e=>e.toString(16).padStart(2,`0`)).join(``),_3=(e,t)=>e.some(e=>{let n=q4(e.objectClass);return n!==U4.message&&n!==U4.reaction&&n!==U4.reply?!1:q4(e.objectSpace)===t||q4(e.attachedTo)===t||n!==U4.message}),v3=()=>{let{plane:e,current:t}=fZ();return vX(`chat:rooms:${t?.uuid??`-`}`,()=>e?Y4(e):Promise.resolve([]),{enabled:!!e})},y3=e=>{let{plane:t}=fZ();return vX(`chat:messages:${e??`-`}`,()=>t&&e?Q4(t,e):Promise.resolve([]),{enabled:!!(t&&e)})},b3=e=>{let{plane:t}=fZ();return vX(`chat:reactions:${e.join(`,`).slice(0,200)}:${e.length}`,()=>t?r3(t,e):Promise.resolve([]),{enabled:!!t&&e.length>0})},x3=e=>{let{plane:t}=fZ();return vX(`chat:replies:${e??`-`}`,()=>t&&e?t3(t,e):Promise.resolve([]),{enabled:!!(t&&e)})},S3=()=>{let{plane:e,current:t}=fZ();return vX(`chat:people:${t?.uuid??`-`}`,()=>e?s3(e):Promise.resolve([]),{enabled:!!e})},C3=e=>{let{plane:t}=fZ();(0,V.useEffect)(()=>{if(t&&e)return t.watch(t=>{_3(t,e)&&(yX(`chat:messages:${e}`),yX(`chat:reactions:`),yX(`chat:replies:`))})},[t,e])},w3=(e,t)=>{let n=t.startsWith(`hanzo:`)?t.slice(6):t;return e.find(e=>e.id===n||e.id===t)?.name||T3(n)},T3=e=>(e.length>12?`${e.slice(0,8)}…`:e)||`Someone`,E3=e=>e.split(/[\s._-]+/).filter(Boolean).slice(0,2).map(e=>e[0].toUpperCase()).join(``)||`?`,D3=e=>`var(--team-${e})`,X={ground:D3(`ground`),panel:D3(`panel`),card:D3(`card`),rule:D3(`rule`),ink:D3(`ink`),mute:D3(`mute`),dim:D3(`dim`),accent:D3(`accent`),alert:D3(`alert`)},O3={backlog:D3(`backlog`),todo:D3(`todo`),doing:D3(`doing`),done:D3(`done`)},k3=6,A3=e=>{let t=e.toLowerCase(),n=0;for(let e=0;e<t.length;e++)n=n*31+t.charCodeAt(e)|0;return Math.abs(n)%k3+1},j3=e=>({background:`var(--team-hue-${A3(e)})`,color:`var(--team-chip-ink)`}),M3=e=>`var(--team-hue-${A3(e)})`,N3=e=>e===1||e===2,P3=e=>N3(e)?{background:`var(--team-urgent)`,color:`var(--team-chip-ink)`}:{background:`var(--team-quiet)`,color:X.ink},Z={title:`$7`,row:`$4`,body:`$3`,small:`$2`,chip:`$1`,figure:`$7`},F3={tight:`$2`,inset:`$3`,wide:`$4`,edge:`$5`},Q={card:`$1`,panel:`$1`,field:`$1`,pill:`$10`},I3={textTransform:`uppercase`,letterSpacing:.08},L3={outlineColor:`$outlineColor`,outlineWidth:2,outlineStyle:`solid`};function R3(e,t){return e?.trim()?e.trim():(t?.split(`@`)[0])?.trim()||``}var z3=[{id:`crm`,label:`CRM`,productTitle:`Hanzo CRM`,description:`Pipeline, contacts, investors & deals`,href:`https://crm.hanzo.ai`,supportsFreshAuth:!0},{id:`team`,label:`Work`,productTitle:`Hanzo Team`,description:`Shared workspace, docs, tasks & drive`,href:`https://hanzo.team`,supportsFreshAuth:!1},{id:`cms`,label:`CMS`,productTitle:`Hanzo CMS`,description:`Content, pages, collections & media`,href:`https://cms.hanzo.ai/admin`,supportsFreshAuth:!1},{id:`email`,label:`Email`,productTitle:`Hanzo Email`,description:`Campaigns, journeys & broadcasts`,href:`https://marketing.hanzo.ai`,supportsFreshAuth:!0},{id:`ads`,label:`Ads`,productTitle:`Hanzo Ads`,description:`Ad spend, ROAS & attribution`,href:`https://ads.hanzo.ai`,supportsFreshAuth:!0},{id:`cal`,label:`Cal`,productTitle:`Hanzo Cal`,description:`Scheduling, bookings & availability`,href:`https://hanzo.team/cal`,supportsFreshAuth:!1},{id:`bots`,label:`Bots`,productTitle:`Hanzo Bots`,description:`Autonomous AI agents & workflows`,href:`https://hanzo.bot`,supportsFreshAuth:!1},{id:`post`,label:`Post`,productTitle:`Hanzo Post`,description:`AI social & blog publishing across 28+ channels`,href:`https://post.hanzo.ai`,supportsFreshAuth:!1},{id:`social`,label:`Social`,productTitle:`Hanzo Publish`,description:`Social scheduling, inbox & listening`,href:`https://social.hanzo.ai`,supportsFreshAuth:!0},{id:`chat`,label:`Chat`,productTitle:`Hanzo Chat`,description:`AI assistant, models & playground`,href:`https://hanzo.ai/chat`,supportsFreshAuth:!1},{id:`dev`,label:`Dev`,productTitle:`Hanzo Dev`,description:`Coding agents & cloud workspaces`,href:`https://hanzo.ai/dev`,supportsFreshAuth:!1},{id:`commerce`,label:`Commerce`,productTitle:`Hanzo Commerce`,description:`Store, products, orders & subscriptions`,href:`https://commerce-admin.hanzo.ai/admin/`,supportsFreshAuth:!1},{id:`analytics`,label:`Analytics`,productTitle:`Hanzo Analytics`,description:`Web traffic, funnels & retention`,href:`https://analytics.hanzo.ai`,supportsFreshAuth:!1},{id:`dataroom`,label:`Data Room`,productTitle:`Hanzo Data Room`,description:`Secure investor & deal data rooms`,href:`https://dataroom.hanzo.ai`,supportsFreshAuth:!1},{id:`sign`,label:`Sign`,productTitle:`Hanzo Sign`,description:`Document e-signatures & agreements`,href:`https://esign.hanzo.ai`,supportsFreshAuth:!1},{id:`billing`,label:`Billing`,productTitle:`Hanzo Billing`,description:`Usage, balance, invoices & payment methods`,href:`https://billing.hanzo.ai`,supportsFreshAuth:!1},{id:`console`,label:`Console`,productTitle:`Hanzo Console`,description:`Cloud, AI infrastructure & IAM`,href:`https://console.hanzo.ai`,supportsFreshAuth:!0},{id:`platform`,label:`Platform`,productTitle:`Hanzo Platform`,description:`PaaS deployments, clusters & containers`,href:`https://platform.hanzo.ai`,supportsFreshAuth:!0}];function B3({id:e,size:t=16}){switch(e){case`crm`:return(0,H.jsx)(dy,{size:t});case`team`:case`work`:return(0,H.jsx)(Mb,{size:t});case`cms`:return(0,H.jsx)(By,{size:t});case`email`:case`marketing`:return(0,H.jsx)(Qy,{size:t});case`ads`:return(0,H.jsx)(tb,{size:t});case`cal`:return(0,H.jsx)(my,{size:t});case`bots`:return(0,H.jsx)(uy,{size:t});case`post`:case`social`:return(0,H.jsx)(pb,{size:t});case`chat`:return(0,H.jsx)(rb,{size:t});case`dev`:return(0,H.jsx)(Cb,{size:t});case`commerce`:return(0,H.jsx)(mb,{size:t});case`analytics`:return(0,H.jsx)(Qv,{size:t});case`dataroom`:return(0,H.jsx)(Ry,{size:t});case`sign`:return(0,H.jsx)(Zv,{size:t});case`billing`:return(0,H.jsx)(ky,{size:t});case`console`:return(0,H.jsx)(_b,{size:t});case`platform`:return(0,H.jsx)(Ky,{size:t});default:return(0,H.jsx)(ny,{size:t})}}function V3(e,t){try{let n=new URL(e.href);if(e.supportsFreshAuth&&t?.who){let e=t?.org?`/?org=${encodeURIComponent(t.org)}`:`/`;return`${n.origin}/auth/fresh?next=${encodeURIComponent(e)}&who=${encodeURIComponent(t.who)}`}return t?.org&&!n.searchParams.has(`org`)&&n.searchParams.set(`org`,t.org),n.toString()}catch{return e.href}}var H3=[{id:`issues`,label:`Tracker — All issues`,desc:`Kanban board, list & project issues`,path:`/issues`},{id:`projects`,label:`Projects`,desc:`Every project in this space`,path:`/projects`}];function U3({appId:e=`team`,appTitle:t,showAppTitle:n=!1,apps:r=z3,onSelectApp:i,brandMark:a,currentOrg:o,orgs:s=[],onSelectOrg:c,onAllOrgs:l,onCreateOrg:u,leftSlot:d,children:f,rightSlot:p,onNavigate:m,user:h}){let[g,_]=(0,V.useState)(!1),[v,y]=(0,V.useState)(!1),[b,x]=(0,V.useState)(!1),[S,C]=(0,V.useState)(``),w=r.find(t=>t.id===e)??r[0],T=t||w?.productTitle||`Hanzo Team`,E=o?.displayName?.trim()||o?.name||`Hanzo AI`,D=h?.sub||``;(0,V.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`k`&&(e.preventDefault(),x(e=>!e))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]);let O=S3().data??[],k=v3().data??[],A=(0,V.useMemo)(()=>{let e=S.trim().toLowerCase(),t=A4(O).map(e=>({id:`bot-${e.id}`,kind:`bot`,label:e.name,desc:`Agent`,path:O4(e)})),n=k.filter(e=>e.kind===`channel`).map(e=>({id:e.id,kind:`channel`,label:`#${e.name}`,desc:e.topic??``,path:`/chat/${e.id}`})),r=[...H3.map(e=>({...e,kind:`surface`})),...n,...t];return e?r.filter(t=>t.label.toLowerCase().includes(e)||t.desc.toLowerCase().includes(e)).slice(0,14):r.slice(0,12)},[S,O,k]),j=e=>{if(_(!1),i){i(e);return}if(typeof window<`u`){let t=V3(e,{who:D||void 0,org:o?.name||void 0});window.location.assign(t)}},M=e=>{x(!1),C(``),m?m(e):typeof window<`u`&&window.location.assign(e)};return(0,H.jsxs)(P,{render:`header`,height:40,px:`$2.5`,gap:`$2`,items:`center`,justify:`space-between`,borderBottomWidth:1,borderColor:`$borderColor`,bg:`$background`,shrink:0,"data-testid":`hanzo-business-header`,children:[(0,H.jsxs)(P,{items:`center`,gap:`$1.5`,minW:0,shrink:0,children:[d,(0,H.jsxs)(wm,{open:g,onOpenChange:_,placement:`bottom-start`,allowFlip:!0,stayInFrame:!0,children:[(0,H.jsx)(wm.Trigger,{asChild:!0,children:(0,H.jsxs)(P,{role:`button`,tabIndex:0,cursor:`pointer`,items:`center`,gap:`$1`,height:30,px:`$2`,rounded:`$3`,hoverStyle:{bg:`$color3`},"aria-label":`${T} — Switch application`,"aria-haspopup":`menu`,"aria-expanded":g,"data-testid":`business-app-switcher-trigger`,children:[(0,H.jsx)(F,{items:`center`,justify:`center`,width:20,height:20,shrink:0,children:a??(0,H.jsx)(i$,{size:17,wordmark:``})}),n?(0,H.jsx)(U,{fontSize:`$2`,fontWeight:`700`,color:`$color12`,numberOfLines:1,children:T}):null,(0,H.jsx)(gy,{size:12,color:`$color10`})]})}),(0,H.jsx)(wm.Content,{role:`menu`,"aria-label":`Hanzo Business Applications`,borderWidth:1,elevation:`$4`,p:`$2.5`,width:350,bg:`$background`,borderColor:`$borderColor`,rounded:`$4`,style:{zIndex:1e5},children:(0,H.jsxs)(F,{gap:`$2`,width:`100%`,children:[(0,H.jsxs)(P,{items:`center`,justify:`space-between`,px:`$2`,pt:`$1`,children:[(0,H.jsx)(U,{fontSize:`$1`,fontWeight:`700`,color:`$color10`,textTransform:`uppercase`,letterSpacing:.6,children:`Hanzo Business Suite`}),(0,H.jsx)(U,{fontSize:`$1`,color:`$color10`,children:E})]}),(0,H.jsx)(F,{gap:`$0.5`,maxH:420,style:{overflowY:`auto`},children:r.map(t=>{let n=t.id===e;return(0,H.jsxs)(P,{role:`menuitem`,tabIndex:0,cursor:`pointer`,items:`center`,gap:`$2.5`,px:`$2.5`,py:`$2`,rounded:`$3`,bg:n?`$color3`:`transparent`,hoverStyle:{bg:`$color3`},onPress:()=>j(t),"data-testid":`app-switcher-item-${t.id}`,children:[(0,H.jsx)(F,{width:30,height:30,rounded:`$3`,bg:n?`$color4`:`$color2`,items:`center`,justify:`center`,shrink:0,children:(0,H.jsx)(B3,{id:t.id,size:15})}),(0,H.jsxs)(F,{flex:1,minW:0,gap:1,children:[(0,H.jsxs)(P,{items:`center`,gap:`$1.5`,children:[(0,H.jsx)(U,{fontSize:`$2`,fontWeight:`600`,color:`$color12`,numberOfLines:1,children:t.label}),n?(0,H.jsx)(U,{fontSize:10,fontWeight:`600`,color:`$color10`,px:`$1.5`,py:1,rounded:`$2`,bg:`$color4`,children:`Current`}):null]}),(0,H.jsx)(U,{fontSize:`$1`,color:`$color10`,numberOfLines:1,children:t.description})]}),n?(0,H.jsx)(hy,{size:14,color:`$color12`}):null]},t.id)})})]})})]}),(0,H.jsxs)(wm,{open:v,onOpenChange:y,placement:`bottom-start`,allowFlip:!0,stayInFrame:!0,children:[(0,H.jsx)(wm.Trigger,{asChild:!0,children:(0,H.jsxs)(P,{role:`button`,tabIndex:0,cursor:`pointer`,items:`center`,gap:`$1.5`,height:30,px:`$2`,rounded:`$3`,hoverStyle:{bg:`$color3`},"aria-label":`Current organization: ${E}. Click to switch organization.`,"data-testid":`business-org-subtitle-trigger`,children:[(0,H.jsx)(c$,{org:{name:E,logo:o?.logo},size:20}),(0,H.jsx)(U,{fontSize:`$2`,fontWeight:`600`,color:`$color12`,numberOfLines:1,maxW:180,children:E}),(0,H.jsx)(gy,{size:12,color:`$color10`})]})}),(0,H.jsx)(wm.Content,{role:`menu`,"aria-label":`Switch organization`,borderWidth:1,elevation:`$4`,p:`$2`,width:260,bg:`$background`,borderColor:`$borderColor`,rounded:`$4`,style:{zIndex:1e5},children:(0,H.jsxs)(F,{gap:`$1`,width:`100%`,children:[(0,H.jsx)(P,{px:`$2`,py:`$1`,items:`center`,justify:`space-between`,children:(0,H.jsx)(U,{fontSize:`$1`,fontWeight:`700`,color:`$color10`,textTransform:`uppercase`,letterSpacing:.5,children:`Switch organization`})}),s.map(e=>{let t=e.name===o?.name,n=e.displayName?.trim()||e.name;return(0,H.jsxs)(P,{role:`menuitem`,"aria-checked":t,tabIndex:0,cursor:`pointer`,items:`center`,gap:`$2.5`,px:`$2`,py:`$1.5`,rounded:`$3`,bg:t?`$color3`:`transparent`,hoverStyle:{bg:`$color3`},onPress:()=>{y(!1),c?.(e.name)},children:[(0,H.jsx)(c$,{org:{name:n,logo:e.logo},size:20}),(0,H.jsx)(U,{flex:1,fontSize:`$2`,fontWeight:t?`600`:`500`,color:`$color12`,numberOfLines:1,children:n}),t?(0,H.jsx)(hy,{size:14,color:`$color12`}):null]},e.name)}),l||u?(0,H.jsx)(Om,{borderColor:`$borderColor`,my:`$1`}):null,l?(0,H.jsxs)(P,{role:`menuitem`,tabIndex:0,cursor:`pointer`,items:`center`,gap:`$2`,px:`$2`,py:`$1.5`,rounded:`$3`,hoverStyle:{bg:`$color3`},onPress:()=>{y(!1),l()},children:[(0,H.jsx)(fy,{size:14,color:`$color10`}),(0,H.jsx)(U,{fontSize:`$2`,color:`$color12`,children:`All organizations…`})]}):null,u?(0,H.jsxs)(P,{role:`menuitem`,tabIndex:0,cursor:`pointer`,items:`center`,gap:`$2`,px:`$2`,py:`$1.5`,rounded:`$3`,hoverStyle:{bg:`$color3`},onPress:()=>{y(!1),u()},children:[(0,H.jsx)(lb,{size:14,color:`$color10`}),(0,H.jsx)(U,{fontSize:`$2`,color:`$color12`,children:`Create organization`})]}):null]})})]})]}),(0,H.jsx)(P,{flex:1,items:`center`,justify:`center`,gap:`$1.5`,minW:0,px:`$2`,children:f??(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(P,{items:`center`,gap:2,shrink:0,children:[(0,H.jsx)(P,{role:`button`,tabIndex:0,cursor:`pointer`,width:26,height:26,rounded:`$2`,items:`center`,justify:`center`,hoverStyle:{bg:`$color3`},"aria-label":`Go back`,onPress:()=>{typeof window<`u`&&window.history.back()},children:(0,H.jsx)(oy,{size:14,color:`$color10`})}),(0,H.jsx)(P,{role:`button`,tabIndex:0,cursor:`pointer`,width:26,height:26,rounded:`$2`,items:`center`,justify:`center`,hoverStyle:{bg:`$color3`},"aria-label":`Go forward`,onPress:()=>{typeof window<`u`&&window.history.forward()},children:(0,H.jsx)(sy,{size:14,color:`$color10`})}),(0,H.jsx)(P,{role:`button`,tabIndex:0,cursor:`pointer`,width:26,height:26,rounded:`$2`,items:`center`,justify:`center`,hoverStyle:{bg:`$color3`},"aria-label":`Recent activity`,onPress:()=>x(!0),children:(0,H.jsx)(wy,{size:13,color:`$color10`})})]}),(0,H.jsxs)(wm,{open:b,onOpenChange:x,placement:`bottom`,allowFlip:!0,stayInFrame:!0,children:[(0,H.jsx)(wm.Trigger,{asChild:!0,children:(0,H.jsxs)(P,{role:`button`,tabIndex:0,cursor:`pointer`,flex:1,maxW:460,height:28,px:`$2.5`,rounded:`$3`,bg:`$color2`,borderWidth:1,borderColor:`$borderColor`,items:`center`,justify:`space-between`,hoverStyle:{bg:`$color3`},"aria-label":`Search ${E}`,"data-testid":`slack-top-search-trigger`,children:[(0,H.jsxs)(P,{items:`center`,gap:`$2`,minW:0,flex:1,children:[(0,H.jsx)(db,{size:13,color:`$color10`}),(0,H.jsx)(U,{fontSize:12,color:`$color10`,numberOfLines:1,children:`Search ${E}…`})]}),(0,H.jsx)(U,{fontSize:10,fontWeight:`600`,color:`$color9`,px:`$1.5`,py:1,rounded:`$2`,bg:`$color3`,children:`⌘K`})]})}),(0,H.jsx)(wm.Content,{role:`dialog`,"aria-label":`Jump to channel, bot, or surface`,borderWidth:1,elevation:`$4`,p:`$2`,width:460,bg:`$background`,borderColor:`$borderColor`,rounded:`$4`,style:{zIndex:1e5},children:(0,H.jsxs)(F,{gap:`$2`,width:`100%`,children:[(0,H.jsxs)(P,{height:34,px:`$2.5`,items:`center`,gap:`$2`,rounded:`$3`,bg:`$color2`,borderWidth:1,borderColor:`$borderColor`,children:[(0,H.jsx)(db,{size:14,color:`$color10`}),(0,H.jsx)(Jv,{flex:1,height:30,fontSize:13,borderWidth:0,bg:`transparent`,placeholder:`Jump to a channel, bot or issue board…`,value:S,onChangeText:C,autoFocus:!0})]}),(0,H.jsx)(F,{gap:`$0.5`,maxH:340,style:{overflowY:`auto`},children:A.map(e=>(0,H.jsxs)(P,{role:`menuitem`,tabIndex:0,cursor:`pointer`,items:`center`,gap:`$2.5`,px:`$2.5`,py:`$1.5`,rounded:`$3`,hoverStyle:{bg:`$color3`},onPress:()=>M(e.path),children:[(0,H.jsx)(F,{width:24,height:24,rounded:`$2`,bg:`$color3`,items:`center`,justify:`center`,shrink:0,children:e.kind===`bot`?(0,H.jsx)(uy,{size:13,color:`$color11`}):e.kind===`channel`?(0,H.jsx)(Hy,{size:13,color:`$color11`}):(0,H.jsx)(vb,{size:13,color:`$color11`})}),(0,H.jsxs)(F,{flex:1,minW:0,children:[(0,H.jsx)(U,{fontSize:12,fontWeight:`600`,color:`$color12`,numberOfLines:1,children:e.label}),(0,H.jsx)(U,{fontSize:11,color:`$color10`,numberOfLines:1,children:e.desc})]})]},e.id))})]})})]})]})}),(0,H.jsx)(P,{items:`center`,gap:`$1.5`,shrink:0,children:p??(0,H.jsx)(h$,{})})]})}function W3({user:e,currentOrg:t,orgs:n=[],onSelectOrg:r,onCreateOrg:i,onConnectOrg:a,accounts:o=[],onSwitchAccount:s,onAddAccount:c,onSettings:l,onSignOut:u}){let[d,f]=(0,V.useState)(!1),p=t?.displayName?.trim()||t?.name||`Hanzo AI`,m=R3(e?.name,e?.email)||`Account`,h=e?.email||``,g=e?.sub||``,_=(()=>{let n=[],r=new Set;g&&(r.add(g),n.push({sub:g,owner:e?.owner||t?.name||`hanzo`,name:m,email:h||void 0,avatar:e?.avatar}));for(let e of o)e.sub&&!r.has(e.sub)&&(r.add(e.sub),n.push(e));return n})();return(0,H.jsxs)(wm,{open:d,onOpenChange:f,placement:`right-end`,allowFlip:!0,stayInFrame:!0,children:[(0,H.jsx)(wm.Trigger,{asChild:!0,children:(0,H.jsxs)(F,{role:`button`,tabIndex:0,cursor:`pointer`,width:36,height:36,rounded:Q.field,items:`center`,justify:`center`,position:`relative`,hoverStyle:{bg:`$color3`},"aria-label":`${m} · Account & settings`,"aria-haspopup":`menu`,"aria-expanded":d,"data-testid":`rail-account-menu-trigger`,onKeyDown:e=>{(e?.key===`Enter`||e?.key===` `)&&(e.preventDefault?.(),f(!d))},children:[e?.avatar||m?(0,H.jsx)(c$,{org:{name:m,logo:e?.avatar},size:30}):(0,H.jsx)(Ab,{size:18}),(0,H.jsx)(F,{position:`absolute`,b:1,r:1,width:9,height:9,rounded:Q.pill,borderWidth:1.5,borderColor:`$background`,style:{backgroundColor:O3.done}})]})}),(0,H.jsx)(wm.Content,{role:`menu`,"aria-label":`Account menu`,borderWidth:1,elevation:`$4`,p:`$2`,width:300,bg:`$background`,borderColor:`$borderColor`,rounded:`$4`,style:{zIndex:1e5},children:(0,H.jsxs)(F,{gap:`$1`,width:`100%`,children:[(0,H.jsxs)(P,{items:`center`,gap:`$2.5`,px:`$2`,py:`$2`,rounded:`$3`,bg:`$color2`,children:[(0,H.jsx)(c$,{org:{name:m,logo:e?.avatar},size:36}),(0,H.jsxs)(F,{flex:1,minW:0,gap:1,children:[(0,H.jsx)(U,{fontSize:`$3`,fontWeight:`700`,color:`$color12`,numberOfLines:1,children:m}),h&&h!==m?(0,H.jsx)(U,{fontSize:`$1`,color:`$color10`,numberOfLines:1,children:h}):null,(0,H.jsxs)(P,{items:`center`,gap:`$1.5`,mt:2,children:[(0,H.jsx)(F,{width:6,height:6,rounded:Q.pill,style:{backgroundColor:O3.done}}),(0,H.jsxs)(U,{fontSize:11,fontWeight:`600`,color:`$color10`,children:[`Active · `,p]})]})]})]}),(0,H.jsx)(Om,{borderColor:`$borderColor`,my:`$1`}),(0,H.jsxs)(F,{gap:`$0.5`,children:[(0,H.jsxs)(P,{px:`$2`,py:`$1`,items:`center`,justify:`space-between`,children:[(0,H.jsx)(U,{fontSize:`$1`,fontWeight:`700`,color:`$color10`,textTransform:`uppercase`,letterSpacing:.5,children:`Switch account`}),(0,H.jsx)(U,{fontSize:11,color:`$color9`,children:`Identities`})]}),_.map(e=>{let t=!!(g&&e.sub===g),n=e.name||e.email||e.sub;return(0,H.jsxs)(P,{role:`menuitem`,"aria-checked":t,tabIndex:0,cursor:`pointer`,items:`center`,gap:`$2.5`,px:`$2`,py:`$1.5`,rounded:`$3`,bg:t?`$color3`:`transparent`,hoverStyle:{bg:`$color3`},onPress:()=>{f(!1),t||s?.(e)},children:[(0,H.jsx)(c$,{org:{name:n,logo:e.avatar},size:24}),(0,H.jsxs)(F,{flex:1,minW:0,children:[(0,H.jsx)(U,{fontSize:`$2`,fontWeight:t?`600`:`500`,color:`$color12`,numberOfLines:1,children:n}),(0,H.jsx)(U,{fontSize:`$1`,color:`$color10`,numberOfLines:1,children:e.email&&e.email!==n?e.email:t?`Current account`:`Identity · ${e.owner}`})]}),t?(0,H.jsx)(hy,{size:14,color:`$color12`}):null]},e.sub)}),c?(0,H.jsxs)(P,{role:`menuitem`,tabIndex:0,cursor:`pointer`,items:`center`,gap:`$2.5`,px:`$2`,py:`$1.5`,rounded:`$3`,hoverStyle:{bg:`$color3`},onPress:()=>{f(!1),c()},children:[(0,H.jsx)(F,{width:24,height:24,rounded:Q.pill,bg:`$color3`,items:`center`,justify:`center`,children:(0,H.jsx)(kb,{size:13,color:`$color11`})}),(0,H.jsx)(U,{fontSize:`$2`,fontWeight:`500`,color:`$color12`,children:`Add another account`})]}):null]}),(0,H.jsx)(Om,{borderColor:`$borderColor`,my:`$1`}),(0,H.jsxs)(F,{gap:`$0.5`,children:[(0,H.jsxs)(P,{px:`$2`,py:`$1`,items:`center`,justify:`space-between`,children:[(0,H.jsx)(U,{fontSize:`$1`,fontWeight:`700`,color:`$color10`,textTransform:`uppercase`,letterSpacing:.5,children:`Switch organization`}),(0,H.jsx)(U,{fontSize:11,color:`$color9`,children:p})]}),n.slice(0,5).map(e=>{let n=e.name===t?.name,i=e.displayName?.trim()||e.name;return(0,H.jsxs)(P,{role:`menuitem`,"aria-checked":n,tabIndex:0,cursor:`pointer`,items:`center`,gap:`$2.5`,px:`$2`,py:`$1.5`,rounded:`$3`,bg:n?`$color3`:`transparent`,hoverStyle:{bg:`$color3`},onPress:()=>{f(!1),n||r?.(e.name)},children:[(0,H.jsx)(c$,{org:{name:i,logo:e.logo},size:20}),(0,H.jsx)(U,{flex:1,fontSize:`$2`,fontWeight:n?`600`:`500`,color:`$color12`,numberOfLines:1,children:i}),n?(0,H.jsx)(hy,{size:14,color:`$color12`}):null]},e.name)}),i?(0,H.jsxs)(P,{role:`menuitem`,tabIndex:0,cursor:`pointer`,items:`center`,gap:`$2.5`,px:`$2`,py:`$1.5`,rounded:`$3`,hoverStyle:{bg:`$color3`},onPress:()=>{f(!1),i()},children:[(0,H.jsx)(F,{width:20,height:20,rounded:Q.field,bg:`$color3`,items:`center`,justify:`center`,children:(0,H.jsx)(lb,{size:12,color:`$color11`})}),(0,H.jsx)(U,{fontSize:`$2`,fontWeight:`500`,color:`$color12`,children:`Create new organization…`})]}):null,a?(0,H.jsxs)(P,{role:`menuitem`,tabIndex:0,cursor:`pointer`,items:`center`,gap:`$2.5`,px:`$2`,py:`$1.5`,rounded:`$3`,hoverStyle:{bg:`$color3`},onPress:()=>{f(!1),a()},children:[(0,H.jsx)(F,{width:20,height:20,rounded:Q.field,bg:`$color3`,items:`center`,justify:`center`,children:(0,H.jsx)(pb,{size:12,color:`$color11`})}),(0,H.jsx)(U,{fontSize:`$2`,fontWeight:`500`,color:`$color12`,children:`Hanzo Connect (share channel)…`})]}):null]}),(0,H.jsx)(Om,{borderColor:`$borderColor`,my:`$1`}),(0,H.jsxs)(F,{gap:`$0.5`,children:[(0,H.jsxs)(P,{items:`center`,justify:`space-between`,px:`$2`,py:`$1.5`,rounded:`$3`,children:[(0,H.jsx)(U,{fontSize:`$2`,color:`$color12`,children:`Theme`}),(0,H.jsx)(h$,{})]}),l?(0,H.jsxs)(P,{role:`menuitem`,tabIndex:0,cursor:`pointer`,items:`center`,gap:`$2.5`,px:`$2`,py:`$1.5`,rounded:`$3`,hoverStyle:{bg:`$color3`},onPress:()=>{f(!1),l()},children:[(0,H.jsx)(fb,{size:15,color:`$color10`}),(0,H.jsx)(U,{fontSize:`$2`,color:`$color12`,children:`Preferences & Bots`})]}):null]}),u?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Om,{borderColor:`$borderColor`,my:`$1`}),(0,H.jsxs)(P,{role:`menuitem`,tabIndex:0,cursor:`pointer`,items:`center`,gap:`$2.5`,px:`$2`,py:`$1.5`,rounded:`$3`,hoverStyle:{bg:`$color3`},onPress:()=>{f(!1),u()},children:[(0,H.jsx)(Zy,{size:15,color:X.alert}),(0,H.jsx)(U,{fontSize:`$2`,fontWeight:`500`,style:{color:X.alert},children:`Sign out`})]})]}):null]})})]})}var G3=(e,t)=>({role:`button`,tabIndex:0,cursor:`pointer`,...t?{"aria-label":t}:{},onPress:e,onKeyDown:t=>{(t.nativeEvent.key===`Enter`||t.nativeEvent.key===` `)&&(t.preventDefault(),e())}}),K3=new Set,q3=null,J3=(e=`connect`)=>{q3=e;for(let e of K3)e(q3)},Y3=()=>{q3=null;for(let e of K3)e(null)};function X3(){let[e,t]=(0,V.useState)(q3),n=qn(),{all:r,current:i,plane:a}=fZ(),[s,c]=(0,V.useState)(`lux`),[l,u]=(0,V.useState)(``),[d,f]=(0,V.useState)(`hanzo-x-lux`),[p,m]=(0,V.useState)(`Cross-organization engineering, shared agents & delivery`),[h,g]=(0,V.useState)(!1);(0,V.useEffect)(()=>{let e=e=>t(e);return K3.add(e),()=>{K3.delete(e)}},[]);let _=i?.url??`hanzo`,v=i?.name??`Hanzo AI`,y=r.filter(e=>e.url!==_),b=(l.trim()||s||`partner`).toLowerCase().replace(/[^a-z0-9-]+/g,`-`).replace(/^-|-$/g,``);if((0,V.useEffect)(()=>{b&&f(`${_}-x-${b}`)},[_,b]),!e)return null;let x=async()=>{if(!a||h)return;let e=b||`partner`,t=d.trim().toLowerCase().replace(/^#+/,``).replace(/[^a-z0-9-]+/g,`-`).replace(/^-|-$/g,``)||`${_}-x-${e}`;g(!0);try{let r=await f3(a,t,[e],p);yX(`chat:rooms:`),Y3(),n(`/chat/${r}`)}finally{g(!1)}};return(0,H.jsx)(F,{position:`fixed`,t:0,l:0,r:0,b:0,z:1e5,items:`center`,justify:`center`,p:16,style:{backgroundColor:`var(--team-backdrop, rgba(0, 0, 0, 0.65))`,backdropFilter:`blur(4px)`},onPress:()=>Y3(),children:(0,H.jsxs)(F,{width:`100%`,maxW:520,rounded:Q.card,bg:`$panel`,borderWidth:1,borderColor:`$edge`,p:20,gap:16,onPress:e=>e.stopPropagation?.(),"data-testid":`hanzo-connect-modal`,children:[(0,H.jsxs)(P,{items:`center`,justify:`space-between`,gap:12,children:[(0,H.jsxs)(P,{items:`center`,gap:10,children:[(0,H.jsx)(F,{width:32,height:32,rounded:Q.field,bg:`$background`,borderWidth:1,borderColor:`$edge`,items:`center`,justify:`center`,children:(0,H.jsx)(pb,{size:16,color:`$ink`})}),(0,H.jsxs)(F,{children:[(0,H.jsx)(o,{fontSize:Z.row,fontWeight:`700`,color:`$ink`,children:`Hanzo Connect`}),(0,H.jsx)(o,{fontSize:Z.chip,color:`$soft`,children:`Multi-org shared channels & isolated organization workspaces`})]})]}),(0,H.jsx)(P,{...G3(()=>Y3(),`Close Hanzo Connect modal`),px:8,py:4,rounded:Q.field,hoverStyle:{background:`$hover`},children:(0,H.jsx)(o,{fontSize:Z.body,color:`$soft`,children:`✕`})})]}),(0,H.jsx)(P,{bg:`$background`,p:3,rounded:Q.field,borderWidth:1,borderColor:`$edge`,gap:4,children:(0,H.jsxs)(P,{flex:1,...G3(()=>t(`connect`),`Connect organizations tab`),py:7,px:10,rounded:Q.field,items:`center`,justify:`center`,gap:6,bg:e===`connect`?`$panel`:`transparent`,children:[(0,H.jsx)(pb,{size:14,color:e===`connect`?`$ink`:`$soft`}),(0,H.jsx)(o,{fontSize:Z.body,fontWeight:e===`connect`?`600`:`500`,color:e===`connect`?`$ink`:`$soft`,children:`Connect Orgs (Shared Channel)`})]})}),(0,H.jsx)(H.Fragment,{children:(0,H.jsxs)(F,{gap:14,children:[(0,H.jsxs)(P,{p:12,rounded:Q.field,bg:`$background`,borderWidth:1,borderColor:`$edge`,items:`center`,justify:`space-between`,gap:8,children:[(0,H.jsxs)(F,{gap:2,children:[(0,H.jsx)(o,{fontSize:Z.chip,color:`$faint`,children:`HOST ORGANIZATION`}),(0,H.jsxs)(o,{fontSize:Z.body,fontWeight:`700`,color:`$ink`,children:[v,` (`,_,`)`]})]}),(0,H.jsxs)(P,{px:8,py:3,rounded:Q.pill,bg:`$panel`,borderWidth:1,borderColor:`$edge`,items:`center`,gap:5,children:[(0,H.jsx)(By,{size:12,color:`$ink`}),(0,H.jsxs)(o,{fontSize:Z.chip,fontWeight:`600`,color:`$ink`,children:[`connect:`,b||`org`]})]}),(0,H.jsxs)(F,{gap:2,items:`flex-end`,children:[(0,H.jsx)(o,{fontSize:Z.chip,color:`$faint`,children:`PARTNER ORGANIZATION`}),(0,H.jsx)(o,{fontSize:Z.body,fontWeight:`700`,color:`$ink`,children:b||`partner`})]})]}),(0,H.jsxs)(F,{gap:6,children:[(0,H.jsx)(o,{fontSize:Z.chip,fontWeight:`600`,color:`$quiet`,children:`Select or enter partner organization slug`}),(0,H.jsx)(P,{gap:6,flexWrap:`wrap`,children:y.map(e=>{let t=!l.trim()&&s===e.url;return(0,H.jsxs)(P,{...G3(()=>{u(``),c(e.url)},`Select ${e.name}`),px:10,py:5,rounded:Q.pill,bg:t?`$ink`:`$background`,borderWidth:1,borderColor:t?`$ink`:`$edge`,items:`center`,gap:5,children:[t?(0,H.jsx)(hy,{size:12,color:`$background`}):null,(0,H.jsxs)(o,{fontSize:Z.chip,fontWeight:`600`,color:t?`$background`:`$ink`,children:[e.name,` (`,e.url,`)`]})]},e.url)})}),(0,H.jsx)(P,{px:10,py:6,rounded:Q.field,bg:`$background`,borderWidth:1,borderColor:`$edge`,children:(0,H.jsx)(`input`,{value:l,onChange:e=>u(e.target.value),placeholder:`Or enter external organization slug (e.g. acme, skully, partner)...`,style:{width:`100%`,border:`none`,background:`transparent`,color:`inherit`,fontSize:13,outline:`none`}})})]}),(0,H.jsxs)(F,{gap:6,children:[(0,H.jsx)(o,{fontSize:Z.chip,fontWeight:`600`,color:`$quiet`,children:`Shared channel name`}),(0,H.jsxs)(P,{items:`center`,gap:6,px:10,py:6,rounded:Q.field,bg:`$background`,borderWidth:1,borderColor:`$edge`,children:[(0,H.jsx)(Hy,{size:14,color:`$soft`}),(0,H.jsx)(`input`,{value:d,onChange:e=>f(e.target.value),placeholder:`hanzo-x-partner`,style:{flex:1,border:`none`,background:`transparent`,color:`inherit`,fontSize:13,outline:`none`}})]})]}),(0,H.jsxs)(F,{gap:6,children:[(0,H.jsx)(o,{fontSize:Z.chip,fontWeight:`600`,color:`$quiet`,children:`Channel purpose & agent scope`}),(0,H.jsx)(P,{px:10,py:6,rounded:Q.field,bg:`$background`,borderWidth:1,borderColor:`$edge`,children:(0,H.jsx)(`input`,{value:p,onChange:e=>m(e.target.value),placeholder:`Cross-org engineering, shared agents & delivery`,style:{width:`100%`,border:`none`,background:`transparent`,color:`inherit`,fontSize:13,outline:`none`}})})]}),(0,H.jsxs)(o,{fontSize:Z.chip,color:`$soft`,children:[`Both organizations keep strict tenant isolation (separate IAM, KMS secrets, private repos, and billing) while humans and AI agents (@vi, @dev, @mark) collaborate in real time inside #`,d||`${_}-x-${b}`,`.`]}),(0,H.jsxs)(P,{justify:`flex-end`,gap:8,pt:4,children:[(0,H.jsx)(P,{...G3(()=>Y3(),`Cancel`),px:12,py:8,rounded:Q.field,borderWidth:1,borderColor:`$edge`,children:(0,H.jsx)(o,{fontSize:Z.body,color:`$quiet`,children:`Cancel`})}),(0,H.jsxs)(P,{...G3(()=>void x(),`Connect and create shared channel`),px:14,py:8,rounded:Q.field,bg:`$ink`,items:`center`,gap:6,children:[(0,H.jsx)(pb,{size:14,color:`$background`}),(0,H.jsx)(o,{fontSize:Z.body,fontWeight:`600`,color:`$background`,children:h?`Connecting…`:`Connect & Share Channel`})]})]})]})})]})})}var Z3=1120,Q3=e=>{let t=e,n=new Set;return{set:e=>{if(e!==t){t=e;for(let e of n)e()}},use:()=>(0,V.useSyncExternalStore)(e=>(n.add(e),()=>n.delete(e)),()=>t,()=>e)}},$3=Q3(0),e6=Q3(null),t6=$3.set,n6=$3.use,r6=e6.set;e6.use;var i6=[{id:`chat`,label:`Chat`,icon:ab,path:`/chat`},{id:`bots`,label:`Bots`,icon:uy,path:`/bots`},{id:`tracker`,label:`Tracker`,icon:vb,path:`/issues`},{id:`crm`,label:`CRM`,icon:dy,path:`/crm`}],a6=e=>i6.find(t=>e===t.path||e.startsWith(`${t.path}/`)||t.id===`tracker`&&(e===`/mine`||e.startsWith(`/mine/`)||e===`/projects`||e===`/projects/`||e.startsWith(`/projects/`))),o6={outlineColor:`$outlineColor`,outlineWidth:2,outlineStyle:`solid`},s6={background:`radial-gradient(closest-side, var(--surface-3, rgb(255 255 255 / .12)), transparent)`},c6={background:X.alert},l6=({notices:e,onNotices:t,onSurface:n,account:r})=>{let{pathname:i}=Gn(),a=n6();return(0,H.jsxs)(F,{width:64,shrink:0,height:`100%`,items:`center`,justify:`space-between`,pt:8,pb:12,bg:`$background`,borderRightWidth:1,borderColor:`$edge`,"data-parity-key":`shell.rail`,children:[(0,H.jsx)(Vw,{flex:1,minH:0,width:`100%`,children:(0,H.jsxs)(F,{items:`center`,width:`100%`,gap:2,children:[(0,H.jsxs)(d6,{label:a>0?`${e?`Hide`:`Show`} Activity (${a} unread)`:e?`Hide Activity`:`Show Activity`,pressed:e,onPress:t,children:[(0,H.jsx)(ly,{size:18,color:e?`$ink`:`$soft`}),a>0?(0,H.jsx)(F,{position:`absolute`,t:4,r:3,minW:15,height:15,px:3,rounded:Q.pill,items:`center`,justify:`center`,style:c6,children:(0,H.jsx)(o,{fontSize:10,lineHeight:12,fontWeight:`700`,style:{color:X.panel},children:a})}):null]}),(0,H.jsx)(u6,{}),i6.map(e=>{let t=a6(i)?.id===e.id;return(0,H.jsx)(d6,{label:e.label,here:t,onPress:()=>n(e.path),children:(0,H.jsx)(e.icon,{size:18,color:t?`$ink`:`$soft`})},e.id)})]})}),(0,H.jsx)(F,{items:`center`,width:`100%`,gap:10,pt:6,children:(0,H.jsx)(W3,{...r})})]})},u6=()=>(0,H.jsx)(Om,{width:36,my:6,borderColor:`$edge`}),d6=({label:e,here:t=!1,pressed:n,onPress:r,children:i})=>(0,H.jsxs)(qx,{children:[(0,H.jsx)(Jx,{children:(0,H.jsxs)(F,{...G3(r,e),"aria-current":t?`page`:void 0,"aria-pressed":n,width:38,height:38,items:`center`,justify:`center`,position:`relative`,rounded:Q.field,focusVisibleStyle:o6,children:[t?(0,H.jsx)(F,{position:`absolute`,width:52,height:52,style:s6,pointerEvents:`none`}):null,i]})}),(0,H.jsx)(Xx,{children:e})]}),f6=({nav:e,children:t,aside:n})=>{let{pathname:r}=Gn(),i=qn(),{who:a,leave:o,depart:s}=CX(),{all:c,current:l,choose:u}=fZ(),[d,f]=(0,V.useState)(()=>typeof window>`u`?Z3:window.innerWidth),[p,m]=(0,V.useState)(268),[h,g]=(0,V.useState)(!1),[_,v]=(0,V.useState)(!1),y=xQ(),b=SQ(),x=d>=Z3,S=d>=800,C=t=>{if(!S&&e&&(r===t||r.startsWith(`${t}/`)))return g(!0);i(t)},w=c,T=l??w[0],E=r.startsWith(`/crm`)?`crm`:`team`,D=e=>{e.id===`crm`?i(`/crm/investors`):e.id===`team`||e.id===`work`?i(`/issues`):e.id===`chat`?i(`/chat`):typeof window<`u`&&(window.location.href=e.href)},O=a?{sub:a.id,name:a.label||a.name,email:a.email,avatar:a.avatar,owner:T?.org??``}:{sub:``,name:``,email:``,owner:``},k={name:T?.url??``,displayName:T?.name??``},A=w.map(e=>({name:e.url,displayName:e.name}));return(0,H.jsxs)(Qw,{bg:`$background`,children:[(0,H.jsx)(U3,{appId:E,showAppTitle:r.startsWith(`/crm`),currentOrg:k,orgs:A,onSelectOrg:e=>u(e),onSelectApp:D,onNavigate:C,user:O}),(0,H.jsxs)(P,{flex:1,minH:0,onLayout:e=>f(e.nativeEvent.layout.width),children:[(0,H.jsx)(l6,{notices:!!n&&(x?y&&b===`inbox`:_),onNotices:()=>{x?yQ(`inbox`):(vQ(`inbox`),v(!_))},onSurface:C,account:{user:O,currentOrg:k,orgs:A,onSelectOrg:e=>u(e),onConnectOrg:()=>J3(`connect`),onAddAccount:()=>void s(`another`),onSignOut:()=>o()}}),S&&e?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(F,{width:p,shrink:0,minH:0,"data-parity-key":`shell.nav`,children:e}),(0,H.jsx)(m6,{value:p,onChange:m})]}):null,(0,H.jsxs)(P,{flex:1,minW:0,minH:0,pt:6,pb:6,pr:6,gap:6,children:[(0,H.jsx)(p6,{parity:`shell.main`,children:t}),n&&y&&x?(0,H.jsx)(F,{width:304,shrink:0,children:(0,H.jsx)(p6,{parity:`shell.aside`,children:n})}):null]})]}),(0,H.jsx)(fA,{open:!!n&&!x&&_,onOpenChange:v,children:(0,H.jsx)(mA,{side:`right`,width:304,p:0,bg:`$panel`,children:n})}),(0,H.jsx)(fA,{open:!!e&&h&&!S,onOpenChange:g,children:(0,H.jsx)(mA,{side:`left`,width:268,p:0,bg:`$background`,children:e})}),(0,H.jsx)(X3,{})]})},p6=({parity:e,children:t})=>(0,H.jsx)(F,{flex:1,minW:0,minH:0,bg:`$panel`,rounded:Q.panel,overflow:`hidden`,"data-parity-key":e,children:t}),m6=({value:e,onChange:t})=>{let n=(0,V.useRef)(0),r=(0,V.useRef)(e),i=(0,V.useRef)(!1),a=e=>Math.min(380,Math.max(220,e));return(0,H.jsx)(F,{role:`separator`,"aria-orientation":`vertical`,"aria-label":`Resize the navigator`,"aria-valuenow":e,"aria-valuemin":220,"aria-valuemax":380,tabIndex:0,width:1,shrink:0,bg:`$edge`,position:`relative`,cursor:`col-resize`,hoverStyle:{bg:`$soft`},focusVisibleStyle:{bg:`$outlineColor`},onPointerDown:t=>{i.current=!0,n.current=t.clientX,r.current=e,t.currentTarget.setPointerCapture?.(t.pointerId)},onPointerMove:e=>{i.current&&t(a(r.current+e.clientX-n.current))},onPointerUp:e=>{i.current=!1,e.currentTarget.releasePointerCapture?.(e.pointerId)},onPointerCancel:()=>{i.current=!1},onKeyDown:n=>{let r=n.shiftKey?1:8;n.key===`ArrowLeft`&&t(a(e-r)),n.key===`ArrowRight`&&t(a(e+r))},children:(0,H.jsx)(F,{position:`absolute`,t:0,b:0,l:-8,r:-8})})},h6={outlineColor:`$outlineColor`,outlineWidth:2,outlineStyle:`solid`},g6={flexDirection:`row`},_6=({title:e,children:t})=>(0,H.jsxs)(F,{flex:1,minH:0,pt:12,pb:8,children:[(0,H.jsx)(P,{px:14,pb:10,items:`center`,justify:`space-between`,children:(0,H.jsx)(o,{fontSize:Z.row,fontWeight:`600`,color:`$ink`,numberOfLines:1,children:e})}),t]}),v6=({value:e,onChange:t})=>(0,H.jsxs)(P,{mx:14,height:34,items:`center`,gap:8,px:12,rounded:Q.field,borderWidth:1,borderColor:`$edge`,bg:`$panel`,focusWithinStyle:h6,children:[(0,H.jsx)(db,{size:16,color:`$soft`}),(0,H.jsx)(Dw,{flex:1,unstyled:!0,height:32,borderWidth:0,bg:`transparent`,fontSize:Z.body,color:`$ink`,placeholderTextColor:`$faint`,placeholder:`Search…`,value:e,onChangeText:t})]}),y6=()=>(0,H.jsx)(Om,{my:6,mx:14,borderColor:`$edge`}),b6=({children:e,count:t,open:n=!0,onToggle:r})=>(0,H.jsxs)(P,{...r?G3(r):{},height:28,items:`center`,justify:`space-between`,px:14,gap:6,children:[(0,H.jsxs)(P,{items:`center`,gap:6,minW:0,flex:1,children:[(0,H.jsx)(x6,{open:n}),(0,H.jsx)(o,{...I3,fontSize:Z.chip,fontWeight:`600`,color:`$quiet`,numberOfLines:1,children:e})]}),t===void 0?null:(0,H.jsx)(o,{fontSize:Z.chip,color:`$faint`,children:t})]}),x6=({open:e=!0})=>(0,H.jsx)(F,{width:18,height:18,items:`center`,justify:`center`,rotate:e?`0deg`:`-90deg`,children:(0,H.jsx)(F,{width:7,height:7,borderBottomWidth:1.5,borderRightWidth:1.5,borderColor:`$soft`,rotate:`45deg`,mt:-3})}),S6=({to:e,icon:t,children:n,indent:r})=>{let{pathname:i}=Gn(),a=i===e||i.startsWith(`${e}/`);return(0,H.jsx)(P,{asChild:!0,style:g6,height:r?30:34,items:`center`,gap:8,pl:r?40:14,pr:14,mx:4,rounded:Q.field,hoverStyle:{bg:`$hover`},focusVisibleStyle:h6,children:(0,H.jsxs)(ri,{to:e,"aria-current":a?`page`:void 0,children:[t?(0,H.jsx)(F,{width:18,height:18,items:`center`,justify:`center`,children:t}):null,(0,H.jsx)(o,{fontSize:Z.row,fontWeight:a?`500`:`400`,color:a?`$ink`:`$quiet`,numberOfLines:1,children:n})]})})},C6=({icon:e,children:t,open:n,onPress:r})=>(0,H.jsxs)(P,{...G3(r),"aria-expanded":n,height:34,items:`center`,gap:8,px:14,mx:4,rounded:Q.field,hoverStyle:{bg:`$hover`},focusVisibleStyle:h6,children:[e?(0,H.jsx)(F,{width:18,height:18,items:`center`,justify:`center`,children:e}):null,(0,H.jsx)(o,{fontSize:Z.row,color:`$quiet`,numberOfLines:1,children:t})]}),w6=({children:e})=>(0,H.jsxs)(F,{position:`relative`,children:[(0,H.jsx)(F,{position:`absolute`,l:27,t:0,b:0,width:1,bg:`$edge`}),e]}),T6=({children:e})=>(0,H.jsx)(Vw,{flex:1,minH:0,children:(0,H.jsx)(F,{pb:14,children:e})}),E6={[vZ.backlog]:`backlog`,[vZ.todo]:`todo`,[vZ.doing]:`progress`,[vZ.done]:`done`,[vZ.cancelled]:`done`},D6=[void 0,`urgent`,`high`,`medium`,`low`],O6={urgent:yZ.urgent,high:yZ.high,medium:yZ.medium,low:yZ.low},k6=e=>{let t=e.estimation??0;return t<=0?0:Math.max(0,Math.min(1,(e.reportedTime??0)/t))},A6=e=>({id:e._id,name:bZ(e),face:e.avatar??void 0}),j6=(e,t)=>{let n=[e.assignee,...e.collaborators??[]].filter(e=>!!e),r=new Set,i=[];for(let e of n){if(r.has(e))continue;r.add(e);let n=t.get(e);n&&i.push(A6(n))}return i},M6=(e,t)=>({id:e._id,key:xZ(t.project??t.projects.get(e.space),e),title:e.title,description:e.description,projectId:e.space,status:t.columns.get(e.status)??`backlog`,priority:D6[e.priority]??void 0,labels:t.words.get(e._id)??[],done:k6(e),people:j6(e,t.crowd),origin:e.component?N6(t.parts.get(e.component)):void 0,files:e.attachments??0,replies:e.comments??0}),N6=e=>e?{name:e}:void 0,P6=e=>new Map(e.map(e=>[e._id,E6[e.category]??`backlog`])),F6=(e,t)=>async(n,r,i)=>{let a=t??`proj-crm`,[o,s,c]=await Promise.all([WZ(e,a),UZ(e,a),HZ(e,a)]),l=s.find(e=>(E6[e.category]??`backlog`)===n)??s[0];if(!l)throw Error(`this project has no ${n} column`);let u=Math.max(c?.sequence??0,...o.map(e=>e.number))+1,d=i?.priority?O6[i.priority]:0;if(await ZZ(e,e.account??``,a,{title:r,status:l._id,priority:d,number:u,after:o.find(e=>e.status===l._id)}),i&&(i.description||i.assigneeId||i.labels&&i.labels.length>0)){let t=(await WZ(e,a)).find(e=>e.number===u&&e.title===r);if(t&&(await XZ(e,e.account??``,t,{...i.description===void 0?{}:{description:i.description},...i.assigneeId===void 0?{}:{assignee:i.assigneeId,collaborators:i.assigneeId?[i.assigneeId]:[]}}),i.labels&&i.labels.length>0))for(let n of i.labels)await e.write(TZ(a,e.account??``,gZ.tag,{attachedTo:t._id,attachedToClass:gZ.issue,collection:`labels`,tag:`tag-${n.toLowerCase()}`,title:n}))}},I6=(e,t)=>({watch(n,r){let i=!0,a=()=>{Promise.all([UZ(e,t),WZ(e,t),GZ(e),KZ(e),qZ(e),VZ(e)]).then(async([r,a,o,s,c,l])=>{if(!i)return;let u=t&&a.length?await HZ(e,t):void 0;if(!i)return;let d=new Map;for(let e of s){let t=d.get(e.attachedTo);t?t.push(e.title):d.set(e.attachedTo,[e.title])}let f={columns:P6(r),crowd:new Map(o.map(e=>[e._id,e])),words:d,parts:new Map(c.map(e=>[e._id,e.label])),project:u,projects:new Map(l.map(e=>[e._id,e]))};n(a.map(e=>M6(e,f)))}).catch(e=>i&&r(e instanceof Error?e:Error(String(e))))};a();let o=e.watch(a);return()=>{i=!1,o()}},add:F6(e,t),async move(n,r,i){let a=await WZ(e,t),o=a.find(e=>e._id===n);if(!o)throw Error(`no issue to move`);let s=(await UZ(e,o.space)).find(e=>(E6[e.category]??`backlog`)===r);if(!s)throw Error(`no column to move into`);let c=a.filter(e=>e.status===s._id&&e._id!==n),l=i?c.findIndex(e=>e._id===i):c.length,u=l<0?c.length:l;await YZ(e,e.account??``,o,s._id,{before:c[u-1],after:c[u]})},async update(n,r){let i=(await WZ(e,t)).find(e=>e._id===n);if(!i)return;let a={};if(r.title!==void 0&&(a.title=r.title),r.description!==void 0&&(a.description=r.description),r.priority!==void 0&&(a.priority=r.priority?O6[r.priority]:0),r.done!==void 0){let e=i.estimation&&i.estimation>0?i.estimation:100;a.estimation=e,a.reportedTime=Math.round(Math.max(0,Math.min(1,r.done))*e)}if(r.assigneeId!==void 0){a.assignee=r.assigneeId;let e=(i.collaborators??[]).filter(e=>e!==r.assigneeId);a.collaborators=r.assigneeId?[r.assigneeId,...e]:e}if(r.replies!==void 0&&(a.comments=r.replies),r.status!==void 0){let t=(await UZ(e,i.space)).find(e=>(E6[e.category]??`backlog`)===r.status);t&&(a.status=t._id)}if(Object.keys(a).length>0&&await XZ(e,e.account??``,i,a),r.labels!==void 0){let t=(await KZ(e)).filter(e=>e.attachedTo===n);for(let n of t)await e.write(DZ(n,e.account??``));for(let t of r.labels)await e.write(TZ(i.space,e.account??``,gZ.tag,{attachedTo:n,attachedToClass:gZ.issue,collection:`labels`,tag:`tag-${t.toLowerCase()}`,title:t}))}},async remove(n){let r=(await WZ(e,t)).find(e=>e._id===n);r&&await e.write(DZ(r,e.account??``))}}),L6=e=>{let{plane:t,current:n}=fZ();return(0,V.useMemo)(()=>t&&n?I6(t,e):null,[t,n,e])},R6=e=>{let{plane:t}=fZ(),n=vX(JZ.people(),()=>GZ(t),{enabled:!!t}),r=vX(JZ.projects(),()=>VZ(t),{enabled:!!t}),i=e?(r.data??[]).find(t=>t._id===e)?.members:void 0,a=new Map((n.data??[]).map(e=>[e._id,e]));return(i?i.map(e=>a.get(e)):n.data??[]).filter(e=>!!e).map(A6)},z6=e=>e===`refused`?`refused`:e===`homeless`?`nowhere`:`opening`,B6=()=>{let{plane:e}=fZ();return vX(JZ.projects(),()=>VZ(e),{enabled:!!e})},V6=e=>{let t=B6();return e?(t.data??[]).find(t=>t._id===e):void 0},H6=/(@[\w.-]+)/g,U6=(e,t)=>e?[{text:e,[t]:!0}]:[],W6=(e,t,n)=>{let r=[{text:e,strong:!0}];return(n?t.split(n):[t]).forEach((e,t)=>{t>0&&r.push(...U6(n,`strong`));for(let t of e.split(H6))t&&(t.startsWith(`@`)?r.push(...U6(t,`mention`)):r.push({text:t}))}),r.map((e,t)=>t===1&&e.text?{...e,text:` ${e.text}`}:e)},G6=(e,t,n)=>{let r=t.get(String(e.modifiedBy??``)),i=r?bZ(r):`Somebody`,a=n.get(String(e.attachedTo??``));return{id:e._id,kind:e.attachedToClass===gZ.channel||e.attachedToClass===gZ.direct||e.attachedToClass===gZ.message?`chat`:`task`,actor:{name:i,face:r?.avatar??void 0},line:W6(i,e.body??e.title??``,a),at:e.modifiedOn,place:a,seen:e.isViewed}},K6=()=>{let{plane:e,current:t,standing:n}=fZ();return(0,V.useEffect)(()=>{if(!e||!t){let e=z6(n);iQ({list:e===`refused`?()=>Promise.reject(Error(`Your workspace is not answering.`)):e===`nowhere`?()=>Promise.resolve([]):()=>new Promise(()=>{}),see:()=>Promise.resolve()});return}let r=t.uuid;iQ({async list(){let[t,n,i]=await Promise.all([LZ(e,r),GZ(e),RZ(e,r)]),a=new Map(n.map(e=>[e._id,e]));return t.map(e=>G6(e,a,i))},async see(t){let n=(await LZ(e,r)).find(e=>e._id===t);n&&!n.isViewed&&await zZ(e,e.account??``,n)}})},[e,t,n]),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(q6,{}),(0,H.jsx)(J6,{})]})},q6=()=>{let e=oQ();return(0,V.useEffect)(()=>t6(e),[e]),null},J6=()=>{let{plane:e}=fZ(),t=vX(JZ.statuses(),()=>UZ(e),{enabled:!!e}),n=vX(JZ.issues(),()=>WZ(e),{enabled:!!e}),r=P6(t.data??[]),i=n.data??[],a=i.filter(e=>r.get(e.status)!==`done`).length,o=i.length?Math.round(a/i.length*100):null;return(0,V.useEffect)(()=>r6(o),[o]),null},Y6=36,X6=21,Z6=9,Q6=18,$6=e=>e.split(/\s+/).slice(0,2).map(e=>e[0]??``).join(``).toUpperCase(),e8=({spans:e,clamp:t,parity:n})=>(0,H.jsx)(o,{"data-parity-key":n,size:Z.body,lineHeight:X6,color:X.mute,numberOfLines:t,children:e.map((e,t)=>(0,H.jsx)(o,{size:Z.body,lineHeight:X6,fontWeight:e.strong?`600`:`400`,color:e.mention?X.alert:e.strong?X.ink:X.mute,children:e.text},t))}),t8=({note:e,onSee:t})=>(0,H.jsxs)(P,{"data-parity-key":`inbox.row`,"data-seen":e.seen?`yes`:`no`,...G3(()=>t(e.id),e.line.map(e=>e.text).join(``)),px:14,py:F3.inset,gap:F3.tight,bg:e.seen?`transparent`:X.card,borderBottomWidth:1,borderColor:X.rule,hoverStyle:{background:X.card},focusVisibleStyle:L3,children:[(0,H.jsxs)(VS,{"data-parity-key":`inbox.face`,size:Y6,children:[e.actor.face?(0,H.jsx)(HS,{src:e.actor.face,alt:``}):null,(0,H.jsx)(US,{bg:j3(e.actor.name).background,children:(0,H.jsx)(o,{size:Z.small,fontWeight:`600`,color:j3(e.actor.name).color,children:$6(e.actor.name)})})]}),(0,H.jsxs)(F,{flex:1,minW:0,gap:F3.tight,children:[(0,H.jsxs)(F,{children:[(0,H.jsx)(e8,{spans:e.line,parity:`inbox.line`}),e.quote?(0,H.jsx)(e8,{spans:e.quote,clamp:1,parity:`inbox.quote`}):null]}),(0,H.jsxs)(P,{"data-parity-key":`inbox.meta`,items:`center`,gap:F3.tight,overflow:`hidden`,children:[(0,H.jsx)(o,{size:Z.small,lineHeight:Q6,color:X.dim,children:(0,H.jsx)(GG,{date:new Date(e.at),format:`short`,style:{fontSize:`inherit`,lineHeight:`inherit`,color:`inherit`,whiteSpace:`nowrap`}})}),e.place?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(o,{size:Z.small,lineHeight:Q6,color:X.dim,children:`•`}),(0,H.jsx)(o,{size:Z.small,lineHeight:Q6,color:X.dim,numberOfLines:1,children:e.place})]}):null]})]}),(0,H.jsx)(F,{"data-parity-key":`inbox.lane`,width:Z6,shrink:0,pt:6,children:e.seen?null:(0,H.jsx)(F,{"data-parity-key":`inbox.dot`,role:`img`,"aria-label":`unread`,width:Z6,height:Z6,rounded:Q.pill,bg:X.alert})})]}),n8=12,r8=12,i8=36,a8=6,o8=17,s8=16,c8=24,l8={all:Yy,task:Dy,chat:nb},u8={all:`All`,task:`Tasks`,chat:`Chat`},d8=e=>e.line.some(e=>e.mention||e.text.includes(`mentioned`))||(e.quote?.some(e=>e.mention)??!1),f8=({children:e})=>(0,H.jsx)(F,{flex:1,items:`center`,justify:`center`,p:14,gap:F3.inset,children:e}),p8=({tab:e,filter:t})=>{let n=aQ();if(n.phase===`loading`)return(0,H.jsx)(f8,{children:(0,H.jsx)($w,{})});if(n.phase===`failure`)return(0,H.jsxs)(f8,{children:[(0,H.jsx)(o,{size:Z.body,color:X.mute,children:`The inbox is not answering.`}),(0,H.jsx)(o,{size:Z.body,color:X.ink,textDecorationLine:`underline`,...G3(n.reload),focusVisibleStyle:L3,children:`Try again`})]});let r=$Z(n.data??[],e).filter(e=>t===`unread`?!e.seen:t!==`mentions`||d8(e));return r.length===0?(0,H.jsx)(f8,{children:(0,H.jsx)(o,{size:Z.body,color:X.dim,children:t===`unread`?`All caught up — no unread notifications.`:t===`mentions`?`No mentions in this view.`:`Nothing here.`})}):(0,H.jsx)(Vw,{"data-parity-key":`inbox.list`,flex:1,pt:a8,children:(0,H.jsx)(F,{role:`list`,children:r.map(e=>(0,H.jsx)(t8,{note:e,onSee:sQ},e.id))})})},m8=()=>{let[e,t]=(0,V.useState)(`all`),[n,r]=(0,V.useState)(`all`),i=aQ().data??[],a=oQ(),s=i.filter(d8).length;return(0,H.jsxs)(F,{"data-parity-key":`inbox.panel`,flex:1,minH:0,children:[(0,H.jsxs)(P,{px:14,pt:n8,items:`center`,justify:`space-between`,children:[(0,H.jsxs)(P,{items:`center`,gap:8,children:[(0,H.jsx)(o,{"data-parity-key":`inbox.title`,size:Z.row,fontWeight:`600`,color:X.ink,children:`Inbox`}),a>0?(0,H.jsx)(P,{px:7,py:2,rounded:Q.pill,items:`center`,justify:`center`,bg:X.alert,children:(0,H.jsx)(o,{size:Z.chip,fontWeight:`700`,color:X.panel,children:`${a} unread`})}):null]}),(0,H.jsxs)(P,{items:`center`,gap:6,children:[a>0?(0,H.jsx)(P,{...G3(cQ,`Mark all notifications as read`),px:7,py:3,rounded:Q.field,hoverStyle:{background:X.card},focusVisibleStyle:L3,children:(0,H.jsx)(o,{size:Z.chip,fontWeight:`500`,color:X.mute,children:`Mark all read`})}):null,(0,H.jsx)(P,{"data-parity-key":`inbox.close`,...G3(bQ,`Close the inbox`),width:c8,height:c8,items:`center`,justify:`center`,rounded:Q.field,hoverStyle:{background:X.card},focusVisibleStyle:L3,children:(0,H.jsx)(Fb,{size:14,color:X.dim})})]})]}),(0,H.jsxs)(aT,{value:e,onValueChange:e=>t(e),orientation:`horizontal`,flex:1,minH:0,gap:0,mt:r8,children:[(0,H.jsx)(F,{"data-parity-key":`inbox.rail`,borderBottomWidth:1,borderColor:X.rule,children:(0,H.jsx)(oT,{height:i8,self:`stretch`,justify:`flex-start`,items:`stretch`,p:0,pl:F3.tight,gap:F3.tight,bg:`transparent`,rounded:0,children:QZ.map(t=>{let n=t===e,r=l8[t],a=t===`all`?0:eQ(i,t);return(0,H.jsxs)(cT,{"data-parity-key":`inbox.tab.${t}`,value:t,height:`100%`,flexDirection:`row`,px:F3.tight,gap:`$1.5`,items:`center`,justify:`center`,rounded:0,bg:`transparent`,borderBottomWidth:2,borderColor:n?X.accent:`transparent`,activeStyle:{background:`transparent`},hoverStyle:{background:`transparent`},focusStyle:{background:`transparent`},focusVisibleStyle:L3,children:[(0,H.jsx)(r,{size:o8,color:n?X.ink:X.dim}),(0,H.jsx)(o,{size:Z.small,fontWeight:n?`600`:`500`,color:n?X.ink:X.dim,children:u8[t]}),a>0?(0,H.jsx)(F,{"data-parity-key":`inbox.badge`,minW:s8,height:s8,px:4,rounded:Q.pill,items:`center`,justify:`center`,bg:X.alert,children:(0,H.jsx)(o,{size:Z.chip,fontWeight:`600`,color:X.panel,children:a})}):null]},t)})})}),(0,H.jsx)(P,{px:14,py:8,gap:6,items:`center`,borderBottomWidth:1,borderColor:X.rule,children:[[`all`,`All (${i.length})`],[`unread`,`Unread (${a})`],[`mentions`,`Mentions (${s})`]].map(([e,t])=>{let i=n===e;return(0,H.jsx)(P,{...G3(()=>r(e),`Filter ${t}`),px:8,py:3,rounded:Q.pill,bg:i?X.card:`transparent`,borderWidth:1,borderColor:i?X.ink:X.rule,hoverStyle:{background:X.card},focusVisibleStyle:L3,children:(0,H.jsx)(o,{size:Z.chip,fontWeight:i?`600`:`500`,color:i?X.ink:X.mute,children:t})},e)})}),QZ.map(t=>(0,H.jsx)(lT,{value:t,flex:1,minH:0,children:t===e?(0,H.jsx)(p8,{tab:t,filter:n}):null},t))]})]})},h8=()=>{let{id:e}=Yn(),t=S3().data??[],n=v3().data??[],r=k4(e);if(r)return t.find(e=>e.id===r&&e.bot);let i=n.find(t=>t.id===e);return i?j4(i,t):void 0},g8=({person:e,size:t})=>(0,H.jsx)(F,{width:t,height:t,rounded:Q.pill,overflow:`hidden`,bg:`$panel`,borderWidth:1,borderColor:`$edge`,items:`center`,justify:`center`,shrink:0,children:e.avatar?(0,H.jsx)(`img`,{src:e.avatar,alt:e.name,width:t,height:t,style:{width:t,height:t,objectFit:`cover`,display:`block`}}):(0,H.jsx)(o,{fontSize:Math.max(10,t*.42),fontWeight:`600`,color:`$quiet`,children:e.name.slice(0,1).toUpperCase()})});function _8(){let e=SQ(),t=h8();return!t||e===`inbox`?(0,H.jsx)(m8,{}):(0,H.jsxs)(F,{flex:1,minH:0,px:14,pt:12,pb:14,gap:14,children:[(0,H.jsxs)(P,{items:`center`,justify:`space-between`,children:[(0,H.jsx)(o,{fontSize:Z.small,fontWeight:`600`,color:`$quiet`,children:`${t.name} · Agent`}),(0,H.jsx)(P,{...G3(bQ,`Close inspector`),width:24,height:24,items:`center`,justify:`center`,rounded:Q.field,hoverStyle:{background:X.card},focusVisibleStyle:L3,children:(0,H.jsx)(Fb,{size:14,color:X.dim})})]}),(0,H.jsxs)(F,{items:`center`,gap:6,children:[(0,H.jsx)(g8,{person:t,size:52}),(0,H.jsx)(o,{fontSize:Z.body,fontWeight:`600`,color:`$ink`,children:t.name})]})]})}var v8=async(e,t)=>{let n=await zX(rX.dms,{space:e,members:[t.id]});return{id:n.channel.id,kind:`direct`,name:t.name,private:!0,archived:n.channel.archived===!0,members:n.channel.members??[]}},y8=22,b8=11,x8=44,S8=198;function C8({placeholder:e,disabled:t,onSend:n}){let[r,i]=(0,V.useState)(``),[a,s]=(0,V.useState)(!1),[c,l]=(0,V.useState)(null),u=r.trim()!==``&&!a&&!t,d=async()=>{if(!u)return;let e=r;s(!0),l(null);try{await n(e),i(``)}catch(e){l(e instanceof Error?e.message:String(e))}finally{s(!1)}},f=Math.min(8,r.split(`
126
+ `).length),p=Math.max(x8,Math.min(S8,f*y8+22));return(0,H.jsxs)(F,{px:24,pb:16,pt:8,gap:6,children:[c?(0,H.jsx)(o,{fontSize:`$1`,style:{color:X.alert},children:c}):null,(0,H.jsxs)(P,{items:`flex-end`,gap:8,pl:16,pr:6,py:5,rounded:S8,bg:`$raised`,borderWidth:1,borderColor:`$edge`,opacity:t?.6:1,focusWithinStyle:{borderColor:`$bound`},children:[(0,H.jsx)(pT,{flex:1,unstyled:!0,rows:1,height:p,minH:p,maxH:S8,py:b8,borderWidth:0,bg:`transparent`,fontSize:`$3`,lineHeight:y8,color:`$ink`,placeholderTextColor:`$placeholderColor`,placeholder:t??e,value:r,disabled:!!t,"aria-label":e,onChangeText:i,onKeyDown:e=>{e.nativeEvent.key!==`Enter`||e.shiftKey||(e.preventDefault?.(),d())}}),(0,H.jsx)(F,{"aria-disabled":!u,...G3(()=>void d(),`Send`),cursor:u?`pointer`:`default`,width:32,height:32,items:`center`,justify:`center`,rounded:16,style:{background:u?X.accent:void 0},bg:u?void 0:`$hover`,opacity:u?1:.5,focusVisibleStyle:{outlineColor:`$outlineColor`,outlineWidth:2,outlineStyle:`solid`},children:(0,H.jsx)(cy,{size:17,color:u?`$background`:`$soft`})})]})]})}var w8=3e5,T8=e=>{let t=[],n=null,r=``;for(let i of e){let e=D8(i.at);if(e!==r&&(r=e,n=null,t.push({kind:`day`,id:`day:${e}`,at:i.at})),n&&n.author===i.author&&i.at-E8(n).at<=w8){n.messages.push(i);continue}n={id:i.id,author:i.author,at:i.at,messages:[i]},t.push({kind:`run`,...n})}return t},E8=e=>e.messages[e.messages.length-1],D8=e=>{let t=new Date(e);return`${t.getFullYear()}-${t.getMonth()+1}-${t.getDate()}`},O8=(e,t=Date.now())=>{let n=k8(t)-k8(e);if(n===0)return`Today`;if(n===1)return`Yesterday`;let r=new Date(e),i=r.getFullYear()===new Date(t).getFullYear()?void 0:`numeric`;return r.toLocaleDateString(void 0,{month:`long`,day:`numeric`,year:i})},k8=e=>{let t=new Date(e);return Math.floor((e-t.getTimezoneOffset()*6e4)/864e5)},A8=e=>new Date(e).toLocaleTimeString(void 0,{hour:`numeric`,minute:`2-digit`});function j8({author:e,at:t,messages:n,people:r,reactions:i,me:a,onReact:s,onOpen:c,open:l}){let u=w3(r,e),d=r.find(e=>e.name===u);return(0,H.jsxs)(P,{px:24,pt:12,gap:12,items:`flex-start`,children:[(0,H.jsxs)(VS,{circular:!0,size:36,children:[d?.avatar?(0,H.jsx)(HS,{src:d.avatar,alt:``}):null,(0,H.jsx)(US,{bg:`$raised`,children:(0,H.jsx)(o,{fontSize:`$2`,color:`$quiet`,children:E3(u)})})]}),(0,H.jsxs)(F,{flex:1,minW:0,gap:2,children:[(0,H.jsxs)(P,{gap:8,items:`baseline`,children:[(0,H.jsx)(o,{fontSize:`$3`,fontWeight:`600`,color:`$ink`,children:u}),(0,H.jsx)(o,{fontSize:`$1`,color:`$dim`,children:A8(t)})]}),n.map(e=>(0,H.jsx)(M8,{message:e,reactions:i.filter(t=>t.message===e.id),me:a,onReact:s,onOpen:c,open:l===e.id},e.id))]})]})}function M8({message:e,reactions:t,me:n,onReact:r,onOpen:i,open:a}){let s=F8(t);return(0,H.jsxs)(F,{group:!0,position:`relative`,pr:72,py:2,rounded:`$1`,bg:a?`$hover`:`transparent`,hoverStyle:{background:`$hover`},children:[e.lines.map((e,t)=>(0,H.jsx)(o,{fontSize:`$3`,lineHeight:22,color:`$ink`,children:H4(e).map((e,t)=>e.kind===`text`?(0,H.jsx)(o,{fontSize:`$3`,lineHeight:22,color:`$ink`,children:e.value},t):(0,H.jsx)(o,{fontSize:`$3`,lineHeight:22,style:{color:e.kind===`mention`?X.alert:X.accent},fontWeight:e.kind===`mention`?`500`:`400`,...e.kind===`link`?{tag:`a`,href:e.value,target:`_blank`,rel:`noreferrer`}:{},children:e.value},t))},t)),s.length>0?(0,H.jsx)(P,{gap:4,pt:4,flexWrap:`wrap`,children:s.map(t=>(0,H.jsx)(P8,{emoji:t.emoji,count:t.by.length,mine:t.by.includes(n),onPress:()=>r(e,t.emoji)},t.emoji))}):null,e.replies>0?(0,H.jsxs)(P,{items:`center`,gap:5,pt:4,...G3(()=>i(e)),children:[(0,H.jsx)(ib,{size:13,color:X.accent}),(0,H.jsx)(o,{fontSize:`$1`,style:{color:X.accent},children:e.replies===1?`1 reply`:`${e.replies} replies`})]}):null,(0,H.jsxs)(P,{position:`absolute`,t:0,r:8,gap:2,opacity:0,"$group-hover":{opacity:1},focusWithinStyle:{opacity:1},children:[(0,H.jsx)(N8,{label:`React`,onPress:()=>r(e,`👍`),children:(0,H.jsx)(gb,{size:15,color:`$soft`})}),(0,H.jsx)(N8,{label:`Reply in thread`,onPress:()=>i(e),children:(0,H.jsx)(ib,{size:15,color:`$soft`})})]})]})}var N8=({label:e,onPress:t,children:n})=>(0,H.jsx)(F,{width:26,height:26,items:`center`,justify:`center`,rounded:`$1`,bg:`$panel`,borderWidth:1,borderColor:`$edge`,...G3(t,e),hoverStyle:{background:`$hover`},focusVisibleStyle:{outlineColor:`$outlineColor`,outlineWidth:2,outlineStyle:`solid`},children:n}),P8=({emoji:e,count:t,mine:n,onPress:r})=>(0,H.jsxs)(P,{"aria-pressed":n,height:22,items:`center`,gap:4,px:7,rounded:11,borderWidth:1,borderColor:n?`$bound`:`$edge`,bg:n?`$hover`:`$raised`,...G3(r),hoverStyle:{borderColor:`$bound`},focusVisibleStyle:{outlineColor:`$outlineColor`,outlineWidth:2,outlineStyle:`solid`},children:[(0,H.jsx)(o,{fontSize:12,lineHeight:14,children:e}),(0,H.jsx)(o,{fontSize:`$1`,color:n?`$ink`:`$quiet`,children:t})]}),F8=e=>{let t=[];for(let n of e){let e=t.find(e=>e.emoji===n.emoji);e?e.by.push(n.by):t.push({emoji:n.emoji,by:[n.by]})}return t};function I8({room:e,phase:t,error:n,messages:r,people:i,reactions:a,me:o,onRetry:s,onReact:c,onOpen:l,open:u}){return t===`loading`?(0,H.jsx)(B8,{}):t===`failure`?(0,H.jsx)(V8,{error:n,onRetry:s}):r.length===0?(0,H.jsx)(H8,{room:e}):(0,H.jsx)(L8,{messages:r,people:i,reactions:a,me:o,onReact:c,onOpen:l,open:u})}function L8({messages:e,people:t,reactions:n,me:r,onReact:i,onOpen:a,open:o}){let s=(0,V.useRef)(null),c=e[e.length-1]?.id;return(0,V.useEffect)(()=>{s.current?.scrollIntoView({block:`end`})},[c]),(0,H.jsx)(F,{flex:1,minH:0,style:{overflowY:`auto`},children:(0,H.jsxs)(F,{pt:4,pb:12,children:[T8(e).map(e=>e.kind===`day`?(0,H.jsx)(R8,{at:e.at},e.id):(0,H.jsx)(j8,{author:e.author,at:e.at,messages:e.messages,people:t,reactions:n,me:r,onReact:i,onOpen:a,open:o},e.id)),(0,H.jsx)(`div`,{ref:e=>void(s.current=e)})]})})}var R8=({at:e})=>(0,H.jsx)(F,{px:24,pt:20,pb:4,children:(0,H.jsx)(F,{height:1,bg:`$edge`,position:`relative`,justify:`center`,children:(0,H.jsx)(o,{position:`absolute`,self:`center`,px:10,bg:`$panel`,fontSize:`$1`,color:`$dim`,children:O8(e)})})}),z8=({children:e})=>(0,H.jsx)(F,{flex:1,minH:0,items:`center`,justify:`center`,p:24,children:e}),B8=()=>(0,H.jsx)(z8,{children:(0,H.jsx)($w,{size:16})}),V8=({error:e,onRetry:t})=>(0,H.jsx)(z8,{children:(0,H.jsx)(x$,{state:v$(e),onRetry:t})}),H8=({room:e})=>(0,H.jsx)(z8,{children:(0,H.jsxs)(F,{gap:6,maxW:340,items:`center`,children:[(0,H.jsx)(o,{fontSize:`$4`,fontWeight:`500`,color:`$ink`,children:e.kind===`direct`?e.name:`#${e.name}`}),(0,H.jsx)(o,{fontSize:`$2`,color:`$dim`,text:`center`,children:e.topic?e.topic:e.kind===`direct`?`The beginning of your conversation.`:`This is the beginning of the channel. Say something.`})]})}),U8=({people:e,size:t=28,show:n=3,ground:r=X.ground})=>{if(e.length===0)return null;let i=e.slice(0,n),a=e.length-i.length,s=Math.round(t*.575);return(0,H.jsxs)(P,{items:`center`,"aria-label":`${e.length} assigned`,children:[i.map((e,n)=>(0,H.jsx)(F,{ml:n===0?0:s-t,rounded:9999,borderWidth:2,style:{backgroundColor:r,borderColor:r},children:(0,H.jsxs)(VS,{size:t,"aria-label":e.name,children:[e.face?(0,H.jsx)(HS,{src:e.face,alt:``}):null,(0,H.jsx)(US,{children:W8(e.name)})]})},e.id)),a>0?(0,H.jsxs)(o,{fontSize:`$2`,color:`$quiet`,ml:6,children:[`+`,a]}):null]})},W8=e=>(e[0]??``).toUpperCase();function G8({members:e,people:t}){return e.length===0?null:(0,H.jsx)(U8,{people:e.map(e=>({id:e,name:w3(t,e),face:K8(t,e)})),size:28,show:4,ground:`$panel`})}var K8=(e,t)=>{let n=t.startsWith(`hanzo:`)?t.slice(6):t;return e.find(e=>e.id===n||e.id===t)?.avatar};function q8({room:e,parent:t,replies:n,phase:r,error:i,people:a,reactions:s,me:c,onClose:l,onRetry:u,onReact:d,onSend:f}){return(0,H.jsxs)(F,{width:360,shrink:0,minH:0,borderLeftWidth:1,borderLeftColor:`$edge`,children:[(0,H.jsxs)(P,{height:56,items:`center`,px:20,gap:8,children:[(0,H.jsx)(o,{flex:1,fontSize:`$4`,fontWeight:`500`,color:`$ink`,children:`Thread`}),(0,H.jsx)(F,{width:28,height:28,items:`center`,justify:`center`,rounded:`$1`,...G3(l,`Close the thread`),hoverStyle:{background:`$hover`},focusVisibleStyle:{outlineColor:`$outlineColor`,outlineWidth:2,outlineStyle:`solid`},children:(0,H.jsx)(Fb,{size:16,color:`$soft`})})]}),(0,H.jsx)(F,{pb:8,borderBottomWidth:1,borderBottomColor:`$edge`,children:(0,H.jsx)(j8,{author:t.author,at:t.at,messages:[t],people:a,reactions:s,me:c,onReact:d,onOpen:()=>{}})}),(0,H.jsx)(I8,{room:e,phase:r,error:i,messages:n,people:a,reactions:s,me:c,onRetry:u,onReact:d,onOpen:()=>{}}),(0,H.jsx)(C8,{placeholder:`Reply…`,onSend:f})]})}var J8={"dm-algo":`dm-sci`,"dm-cal":`dm-mana`,"dm-core":`dm-opera`,"dm-db":`dm-data`,"dm-sec":`dm-cyber`};function Y8(){let{id:e}=Yn(),t=e&&(J8[e]??e),{plane:n,current:r}=fZ(),i=v3(),a=S3(),o=k4(t),s=(0,V.useMemo)(()=>o?(a.data??[]).find(e=>e.id===o):void 0,[o,a.data]),c=r?.uuid??``,l=vX(`chat:dm:${c}:${s?.id??`-`}`,()=>v8(c,s),{enabled:!!(n&&s&&c)}),u=(0,V.useMemo)(()=>(i.data??[]).find(e=>e.id===t)??null,[i.data,t]),d=o?l.data??null:u,f=d?j4(d,a.data??[]):void 0,p=y3(d?.id??null),m=p.data??[],h=b3((0,V.useMemo)(()=>m.map(e=>e.id),[m]));C3(d?.id??null);let[g,_]=(0,V.useState)(null),v=m.find(e=>e.id===g)??null,y=x3(v?.id??null),b=n?.account??``,x=a.data??[],S=h.data??[],C=(0,V.useCallback)((e,t)=>{if(!n||!d)return;let r=F8(S.filter(t=>t.message===e.id)).find(e=>e.emoji===t),i=S.find(n=>n.message===e.id&&n.emoji===t&&n.by===b);(r&&i?d3(n,d,i):u3(n,d,e,t)).then(()=>yX(`chat:reactions:`))},[n,d,S,b]);if(!t)return(0,H.jsx)(Z8,{});if(o){if(a.phase===`failure`)return(0,H.jsx)(V8,{error:a.error,onRetry:a.reload});if(a.phase===`loading`||!n)return(0,H.jsx)(B8,{});if(!s)return(0,H.jsx)(Q8,{});if(l.phase===`failure`)return(0,H.jsx)(V8,{error:l.error,onRetry:l.reload});if(!d)return(0,H.jsx)(B8,{})}else if(i.phase===`failure`)return(0,H.jsx)(V8,{error:i.error,onRetry:i.reload});else if(i.phase===`loading`||!n)return(0,H.jsx)(B8,{});return d?(0,H.jsxs)(P,{flex:1,minH:0,children:[(0,H.jsxs)(F,{flex:1,minW:0,minH:0,children:[(0,H.jsx)(X8,{room:d,people:x,agent:f}),(0,H.jsx)(I8,{room:d,phase:p.phase,error:p.error,messages:m,people:x,reactions:S,me:b,onRetry:p.reload,onReact:C,onOpen:e=>_(e.id),open:g??void 0}),(0,H.jsx)(C8,{placeholder:d.kind===`direct`?`Message ${K4(d,x)}`:`Message #${d.name}`,onSend:e=>c3(n,d,e,x)})]}),v?(0,H.jsx)(q8,{room:d,parent:v,replies:y.data??[],phase:y.phase,error:y.error,people:x,reactions:S,me:b,onClose:()=>_(null),onRetry:y.reload,onReact:C,onSend:e=>l3(n,d,v,e,x)}):null]}):(0,H.jsx)(Q8,{})}function X8({room:e,people:t,agent:n}){let r=n6(),i=xQ(),a=SQ();return(0,H.jsx)(F,{borderBottomWidth:1,borderBottomColor:`$edge`,bg:`$panel`,children:(0,H.jsxs)(P,{px:20,py:10,items:`center`,justify:`space-between`,gap:12,children:[n?(0,H.jsxs)(P,{flex:1,minW:0,items:`center`,gap:12,children:[(0,H.jsx)(g8,{person:n,size:34}),(0,H.jsxs)(P,{items:`center`,gap:8,flexWrap:`wrap`,children:[(0,H.jsx)(o,{fontSize:Z.row,fontWeight:`600`,color:`$ink`,children:n.name}),(0,H.jsx)(P,{px:7,py:2,rounded:Q.field,bg:`$raised`,borderWidth:1,borderColor:`$edge`,children:(0,H.jsx)(o,{fontSize:Z.chip,fontWeight:`500`,color:`$quiet`,children:`Agent`})})]})]}):(0,H.jsxs)(P,{flex:1,minW:0,items:`center`,gap:10,children:[(0,H.jsxs)(P,{items:`center`,gap:6,shrink:0,children:[e.kind===`direct`?null:e.private?(0,H.jsx)(Xy,{size:16,color:`$quiet`}):(0,H.jsx)(Hy,{size:17,color:`$quiet`}),(0,H.jsx)(o,{fontSize:Z.row,fontWeight:`600`,color:`$ink`,numberOfLines:1,children:K4(e,t??[])})]}),e.topic?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(F,{width:1,height:14,bg:`$edge`,shrink:0}),(0,H.jsx)(o,{fontSize:Z.small,color:`$dim`,numberOfLines:1,flex:1,children:e.topic})]}):null]}),(0,H.jsxs)(P,{items:`center`,gap:8,shrink:0,children:[n?null:(0,H.jsx)(G8,{members:e.members,people:t??[]}),(0,H.jsxs)(P,{...G3(()=>yQ(`inbox`),`Toggle Inbox drawer`),"aria-pressed":i&&a===`inbox`,px:9,py:5,rounded:Q.field,bg:i&&a===`inbox`?`$hover`:`$raised`,borderWidth:1,borderColor:i&&a===`inbox`?`$bound`:`$edge`,items:`center`,gap:6,hoverStyle:{background:`$hover`},focusVisibleStyle:L3,children:[(0,H.jsx)(ly,{size:13,color:i&&a===`inbox`?`$ink`:`$quiet`}),(0,H.jsx)(o,{fontSize:Z.chip,fontWeight:`500`,color:i&&a===`inbox`?`$ink`:`$quiet`,children:`Inbox`}),r>0?(0,H.jsx)(F,{minW:16,height:16,px:4,rounded:Q.pill,items:`center`,justify:`center`,style:{background:X.alert},children:(0,H.jsx)(o,{fontSize:10,lineHeight:12,fontWeight:`700`,style:{color:X.panel},children:r})}):null]})]})]})})}var Z8=()=>(0,H.jsx)(z8,{children:(0,H.jsx)(T$,{icon:ab,title:`Chat`,description:`Choose a channel or a conversation to read it.`})}),Q8=()=>(0,H.jsx)(z8,{children:(0,H.jsx)(T$,{icon:ab,title:`No such room`,description:`It may have been archived, or it may belong to another space.`})});function $8(){let{pathname:e}=Gn(),t=qn(),[n,r]=(0,V.useState)(``),[i,a]=(0,V.useState)(!0),[s,c]=(0,V.useState)(!0),[l,u]=(0,V.useState)(!0),d=v3(),f=S3().data??[],p=d.data??[],m=n.trim().toLowerCase(),h=m?p.filter(e=>e.name.toLowerCase().includes(m)):p,g=h.filter(e=>e.kind===`channel`),_=g.filter(e=>!e.connectedOrgs||e.connectedOrgs.length===0),v=g.filter(e=>e.connectedOrgs&&e.connectedOrgs.length>0),y=h.filter(e=>e.kind===`direct`),b=A4(f).filter(e=>!m||e.name.toLowerCase().includes(m));return(0,H.jsxs)(_6,{title:a6(e)?.label??`Chat`,children:[(0,H.jsx)(v6,{value:n,onChange:r}),(0,H.jsx)(F,{height:8}),(0,H.jsx)(y6,{}),(0,H.jsxs)(T6,{children:[d.phase===`loading`?(0,H.jsx)(F,{px:14,py:12,children:(0,H.jsx)($w,{size:16})}):null,d.phase===`failure`?(0,H.jsx)(n5,{children:`Your rooms could not be read.`}):null,d.phase===`ready`&&p.length===0&&b.length===0?(0,H.jsx)(n5,{children:`No rooms yet.`}):null,d.phase===`ready`&&p.length>0&&h.length===0&&b.length===0?(0,H.jsx)(n5,{children:`Nothing matches “${n.trim()}”.`}):null,_.length>0?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(b6,{count:_.length,open:i,onToggle:()=>a(e=>!e),children:`Channels`}),i?_.map(e=>(0,H.jsx)(e5,{room:e,roster:f},e.id)):null]}):null,d.phase===`ready`&&(!m||v.length>0)?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(y6,{}),(0,H.jsx)(b6,{count:v.length,open:s,onToggle:()=>c(e=>!e),children:`Hanzo Connect`}),s?(0,H.jsxs)(H.Fragment,{children:[v.map(e=>(0,H.jsx)(e5,{room:e,roster:f},e.id)),(0,H.jsxs)(P,{...G3(()=>J3(`connect`),`Connect external organization channel`),px:14,py:6,mx:4,gap:8,items:`center`,rounded:Q.field,hoverStyle:{background:`$hover`},"data-testid":`hanzo-connect-add-trigger`,children:[(0,H.jsx)(lb,{size:14,color:`$soft`}),(0,H.jsx)(o,{fontSize:Z.body,color:`$quiet`,fontWeight:`500`,children:`Connect organization…`})]})]}):null]}):null,b.length>0?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(y6,{}),(0,H.jsx)(b6,{count:b.length,open:l,onToggle:()=>u(e=>!e),children:`Bots`}),l?b.map(e=>{let n=O4(e);return(0,H.jsxs)(P,{...G3(()=>t(n),e.name),px:12,py:6,mx:4,gap:10,items:`center`,rounded:Q.field,bg:`transparent`,hoverStyle:{background:`$hover`},children:[(0,H.jsx)(g8,{person:e,size:26}),(0,H.jsx)(o,{fontSize:Z.body,fontWeight:`600`,color:`$ink`,numberOfLines:1,flex:1,children:e.name})]},e.id)}):null]}):null,y.length>0?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(y6,{}),(0,H.jsx)(b6,{count:y.length,children:`Direct`}),y.map(e=>(0,H.jsx)(e5,{room:e,roster:f},e.id))]}):null]})]})}var e5=({room:e,roster:t})=>{let n=e.connectedOrgs&&e.connectedOrgs.length>0?`${e.name} · ${e.connectedOrgs.join(`, `)}`:K4(e,t);return(0,H.jsx)(S6,{to:`/chat/${e.id}`,icon:(0,H.jsx)(t5,{room:e}),children:n})},t5=({room:e})=>e.kind===`direct`?null:e.connectedOrgs&&e.connectedOrgs.length>0?(0,H.jsx)(pb,{size:14,color:`$soft`}):e.private?(0,H.jsx)(Xy,{size:14,color:`$soft`}):(0,H.jsx)(Hy,{size:16,color:`$soft`}),n5=({children:e})=>(0,H.jsx)(o,{px:14,py:8,fontSize:`$2`,color:`$faint`,children:e});S0();var r5=`https://api.hanzo.ai`,i5=e=>RX(`${r5}${e}`),a5=[`investors`,`funds`,`customers`,`leads`,`feedback`,`errors`,`lists`],o5=[{value:`NEW`,label:`New`,color:`pink`},{value:`SCREENING`,label:`Screening`,color:`purple`},{value:`MEETING`,label:`Meeting`,color:`blue`},{value:`PROPOSAL`,label:`Proposal`,color:`amber`},{value:`CUSTOMER`,label:`Customer`,color:`green`}],s5=[{name:`name`,label:`Investor`,type:`text`,metadata:{avatar:`circle`}},{name:`company`,label:`Firm / Fund`,type:`relation`,metadata:{labelField:`name`,shape:`square`}},{name:`category`,label:`Category`,type:`select`,metadata:{options:[{value:`vc`,label:`Institutional VC`,color:`blue`},{value:`crypto_vc`,label:`Crypto / Web3 VC`,color:`purple`},{value:`accredited`,label:`Accredited High-Check`,color:`green`},{value:`angel`,label:`Angel Investor`,color:`amber`},{value:`family_office`,label:`Family Office`,color:`cyan`},{value:`crowdfunding_republic`,label:`Republic / Reg CF`,color:`orange`}]}},{name:`stage`,label:`Stage`,type:`select`,metadata:{options:o5}},{name:`email`,label:`Email`,type:`email`},{name:`title`,label:`Title`,type:`text`},{name:`checkSize`,label:`Check Size`,type:`text`},{name:`location`,label:`Location`,type:`text`}],c5=[{name:`name`,label:`Fund / Firm`,type:`text`,metadata:{avatar:`square`}},{name:`stage`,label:`Stage`,type:`select`,metadata:{options:o5}},{name:`aum`,label:`AUM`,type:`text`},{name:`checkSize`,label:`Check Size`,type:`text`},{name:`primaryEmail`,label:`Primary Email`,type:`email`},{name:`website`,label:`Url`,type:`url`},{name:`location`,label:`Location`,type:`text`}],l5=[{name:`name`,label:`Customer`,type:`text`,metadata:{avatar:`circle`}},{name:`email`,label:`Email`,type:`email`},{name:`product`,label:`Product`,type:`text`},{name:`totalSpent`,label:`Total Spent`,type:`currency`,metadata:{currencyCode:`USD`,decimals:0}},{name:`stage`,label:`Stage`,type:`select`,metadata:{options:o5}},{name:`location`,label:`Location`,type:`text`}],u5=[{name:`name`,label:`Developer`,type:`text`,metadata:{avatar:`circle`}},{name:`handle`,label:`GitHub`,type:`text`},{name:`email`,label:`Email`,type:`email`},{name:`company`,label:`Company`,type:`relation`,metadata:{labelField:`name`,shape:`square`}},{name:`stars`,label:`Stars`,type:`number`},{name:`followers`,label:`Followers`,type:`number`},{name:`location`,label:`Location`,type:`text`}],d5=[{name:`name`,label:`Audience / Segment`,type:`text`,metadata:{avatar:`square`}},{name:`purpose`,label:`Engine`,type:`text`},{name:`totalCount`,label:`Total Contacts`,type:`number`},{name:`eligibleCount`,label:`Deliverable`,type:`number`},{name:`description`,label:`Description`,type:`text`}],f5=[{name:`name`,label:`Subject / Summary`,type:`text`,metadata:{avatar:`square`}},{name:`program`,label:`Kind`,type:`text`},{name:`email`,label:`Submitter`,type:`email`},{name:`company`,label:`Organization`,type:`text`},{name:`source`,label:`Source`,type:`text`},{name:`recordCode`,label:`Ref / Report ID`,type:`text`,readOnly:!0},{name:`closeDate`,label:`Submitted At`,type:`date`}],p5=[{name:`name`,label:`Exception / Fault`,type:`text`,metadata:{avatar:`square`}},{name:`program`,label:`Class / Type`,type:`text`},{name:`company`,label:`Service / App`,type:`text`},{name:`location`,label:`Origin / File`,type:`text`},{name:`source`,label:`Env & Release`,type:`text`},{name:`recordCode`,label:`Event / Issue ID`,type:`text`,readOnly:!0},{name:`closeDate`,label:`Occurred At`,type:`date`}],m5={name:(0,H.jsx)(fy,{size:14,color:`$color10`}),domainName:(0,H.jsx)(qy,{size:14,color:`$color10`}),website:(0,H.jsx)(qy,{size:14,color:`$color10`}),createdBy:(0,H.jsx)(jb,{size:14,color:`$color10`}),city:(0,H.jsx)($y,{size:14,color:`$color10`}),location:(0,H.jsx)($y,{size:14,color:`$color10`}),country:(0,H.jsx)(By,{size:14,color:`$color10`}),employees:(0,H.jsx)(Mb,{size:14,color:`$color10`}),arr:(0,H.jsx)(Ay,{size:14,color:`$color10`}),amount:(0,H.jsx)(Ay,{size:14,color:`$color10`}),totalSpent:(0,H.jsx)(Ay,{size:14,color:`$color10`}),company:(0,H.jsx)(fy,{size:14,color:`$color10`}),pointOfContact:(0,H.jsx)(jb,{size:14,color:`$color10`}),rating:(0,H.jsx)(yb,{size:14,color:`$color10`}),closeDate:(0,H.jsx)(my,{size:14,color:`$color10`}),recordCode:(0,H.jsx)(Hy,{size:14,color:`$color10`}),email:(0,H.jsx)(Qy,{size:14,color:`$color10`}),primaryEmail:(0,H.jsx)(Qy,{size:14,color:`$color10`}),jobTitle:(0,H.jsx)(dy,{size:14,color:`$color10`}),title:(0,H.jsx)(dy,{size:14,color:`$color10`})};function h5(){let[e,t]=(0,V.useState)(``),n=e.trim().toLowerCase(),r=[{to:`investors`,label:`Investors`,icon:(0,H.jsx)(Tb,{size:15,color:M3(`investors`)}),group:`Audiences`},{to:`funds`,label:`Funds`,icon:(0,H.jsx)(dy,{size:15,color:M3(`funds`)}),group:`Audiences`},{to:`customers`,label:`Customers`,icon:(0,H.jsx)(Mb,{size:15,color:M3(`customers`)}),group:`Audiences`},{to:`leads`,label:`Developer Leads`,icon:(0,H.jsx)(Ib,{size:15,color:M3(`leads`)}),group:`Audiences`},{to:`feedback`,label:`Feedback, Bugs & Forms`,icon:(0,H.jsx)(Iy,{size:15,color:M3(`feedback`)}),group:`Inbound`},{to:`errors`,label:`Runtime & CLI Errors`,icon:(0,H.jsx)(ey,{size:15,color:M3(`errors`)}),group:`Inbound`},{to:`lists`,label:`Lists & Segments`,icon:(0,H.jsx)(Gy,{size:15,color:`$soft`}),group:`Engagement`}].filter(e=>!n||e.label.toLowerCase().includes(n)),i=[...new Set(r.map(e=>e.group))];return(0,H.jsxs)(_6,{title:`CRM`,children:[(0,H.jsx)(v6,{value:e,onChange:t}),(0,H.jsx)(F,{height:12}),(0,H.jsx)(T6,{children:i.map((e,t)=>(0,H.jsxs)(F,{children:[t>0?(0,H.jsx)(y6,{}):null,(0,H.jsx)(b6,{children:e}),r.filter(t=>t.group===e).map(e=>(0,H.jsx)(S6,{to:`/crm/${e.to}`,icon:e.icon,children:e.label},e.to))]},e))})]})}var g5=e=>[e.city,e.state,e.country].filter(Boolean).join(`, `)||String(e.location??``),_5=e=>typeof e==`string`?e.slice(0,10):``,v5=async(e,t,n)=>{switch(e){case`investors`:{let e=await i5(`/v1/crm/investors?limit=250&category=${n===`all`?`vc`:n}`),t=(e.items??[]).filter(e=>e.name||e.email).map(e=>({id:String(e.id),name:String(e.name??e.email),company:String(e.company??e.fund_name??``),category:String(e.category??``),stage:String(e.stage??``).toUpperCase(),email:String(e.email??``),title:String(e.title??``),checkSize:String(e.check_size??``),location:g5(e)}));return{rows:t,total:e.total??t.length}}case`funds`:{let e=await i5(`/v1/crm/funds?limit=250`),t=(e.items??[]).map(e=>({id:String(e.id),name:String(e.name??``),stage:String(e.stage??``).toUpperCase(),aum:String(e.aum??``),checkSize:String(e.check_size??``),primaryEmail:String(e.primary_email??``),website:String(e.website??``),location:String(e.location??e.country??``)}));return{rows:t,total:e.total??t.length}}case`customers`:{let e=await i5(`/v1/crm/customers?limit=250`),t=(e.items??[]).map(e=>({id:String(e.id),name:String(e.name??e.email??``),email:String(e.email??``),product:String(e.products??e.product??``),totalSpent:Number(e.total_spent??e.amount??0),stage:`CUSTOMER`,location:g5(e)}));return{rows:t,total:e.total??t.length}}case`leads`:{let e=new URLSearchParams({limit:`200`}),[n,r]=t===`all`?[]:t.endsWith(`+`)?[t.slice(0,-1)]:t.split(`-`);n&&e.set(`min_stars`,n===`0`?`1`:n),r&&e.set(`max_stars`,r);let i=await i5(`/v1/crm/leads?${e}`),a=(i.leads??[]).map((e,t)=>({id:String(e.id??e.github_login??t),name:String(e.name??e.github_login??e.email??``),handle:e.github_login?`@${e.github_login}`:``,email:String(e.email??``),company:String(e.company??``),stars:Number(e.total_stars??e.stars??0),followers:Number(e.followers??0),location:String(e.location??e.country??``)}));return{rows:a,total:i.total??a.length}}case`feedback`:{let[e,t]=await Promise.all([i5(`/v1/base/collections/activities/records?perPage=150&sort=-at,-created`),i5(`/v1/base/collections/people/records?perPage=250`)]),n=new Map((t.items??[]).map(e=>[String(e.id),e])),r=(e.items??[]).filter(e=>e.kind===`form`||e.data?.program).map((e,t)=>{let r=e.data??{},i=n.get(String(e.person_id??``))??{};return{id:String(e.id??t),name:String(e.subject??r.need??r.description??``),program:String(r.program??r.kind??`feedback`),email:String(i.email??r.email??``),company:String(i.company??i.name??r.company??``),source:String(r.source??e.channel??``),recordCode:String(r.public_ref??e.source_id??e.id??``),closeDate:_5(e.at??e.created)}});return{rows:r,total:e.totalItems??r.length}}case`errors`:{let e=await i5(`/v1/event/errors?limit=100`),t=(Array.isArray(e)?e:e.items??e.errors??[]).map((e,t)=>{let n=String(e.environment??e.env??``),r=String(e.release??``);return{id:String(e.id??e.event_id??t),name:String(e.value??e.message??e.title??``),program:String(e.type??e.class??e.name??``),company:String(e.app??e.service??e.product??``),location:String(e.culprit??e.origin??e.path??``),source:[n,r].filter(Boolean).join(` · `),recordCode:String(e.issue??e.id??e.event_id??``),closeDate:_5(e.timestamp??e.time??e.created_at)}});return{rows:t,total:t.length}}case`lists`:{let e=await i5(`/v1/crm/lists`),t=(e.items??[]).map(e=>({id:String(e.id),name:String(e.name??``),purpose:String(e.purpose??e.kind??``),totalCount:Number(e.total_count??e.eligible_count??0),eligibleCount:Number(e.eligible_count??e.total_count??0),description:String(e.description??``)}));return{rows:t,total:e.total??t.length}}}},y5={investors:s5,funds:c5,customers:l5,leads:u5,feedback:f5,errors:p5,lists:d5},b5={investors:{title:`Investors`,icon:(0,H.jsx)(Tb,{size:14})},funds:{title:`Funds`,icon:(0,H.jsx)(dy,{size:14})},customers:{title:`Customers`,icon:(0,H.jsx)(Mb,{size:14})},leads:{title:`Developer Leads`,icon:(0,H.jsx)(Ib,{size:14})},feedback:{title:`Feedback, Bugs & Forms`,icon:(0,H.jsx)(Iy,{size:14})},errors:{title:`Runtime & CLI Errors`,icon:(0,H.jsx)(ey,{size:14})},lists:{title:`Lists & Segments`,icon:(0,H.jsx)(Gy,{size:14})}},x5=[{id:`all`,label:`Institutional VCs`},{id:`crypto_vc`,label:`Crypto / Web3 VCs`},{id:`accredited`,label:`Accredited High-Check`},{id:`family_office`,label:`Family Offices`},{id:`crowdfunding_republic`,label:`Republic / Reg CF`}],S5=[`all`,`0-100`,`100-500`,`500-1000`,`1000-5000`,`5000-15000`,`15000+`];function C5(){let{section:e}=Yn(),t=a5.includes(e)?e:`investors`,[n,r]=(0,V.useState)(`all`),[i,a]=(0,V.useState)(`all`),[s,c]=(0,V.useState)(null),[l,u]=(0,V.useState)(null),[d,f]=(0,V.useState)(!1),[p,m]=(0,V.useState)(null),h=(0,V.useCallback)(async()=>{f(!0),m(null),u(null);try{c(await v5(t,n,i))}catch(e){c(null),u(e instanceof Error?e.message:`The read failed.`)}finally{f(!1)}},[t,n,i]);(0,V.useEffect)(()=>{h()},[h]);let g=y5[t],_=(0,V.useMemo)(()=>j3(t),[t]),{title:v,icon:y}=b5[t],b=(e,t,n)=>(0,H.jsx)(P,{height:36,px:`$3`,items:`center`,gap:`$1.5`,borderBottomWidth:1,borderColor:`$borderColor`,bg:`$background`,children:e.map(e=>(0,H.jsx)(kS,{size:`xs`,height:24,px:`$2`,rounded:`$2`,chromeless:t!==e.id,bg:t===e.id?`$color3`:`transparent`,onPress:()=>n(e.id),children:(0,H.jsx)(o,{fontSize:11,fontWeight:t===e.id?`600`:`400`,color:t===e.id?`$color12`:`$color10`,children:e.label})},e.id))});return(0,H.jsx)(Ix,{value:`compact`,children:(0,H.jsxs)(F,{flex:1,minH:0,bg:`$background`,children:[(0,H.jsxs)(P,{height:44,px:`$3`,items:`center`,justify:`space-between`,borderBottomWidth:1,borderColor:`$borderColor`,gap:`$2`,children:[(0,H.jsxs)(P,{items:`center`,gap:`$2`,children:[(0,H.jsx)(P,{width:22,height:22,rounded:`$2`,items:`center`,justify:`center`,style:{backgroundColor:_.background,color:_.color},children:y}),(0,H.jsx)(o,{fontSize:14,fontWeight:`600`,color:`$color12`,children:v}),s?(0,H.jsx)(o,{fontSize:12,color:`$color10`,children:`${s.total.toLocaleString()} total`}):null]}),(0,H.jsx)(kS,{size:`xs`,height:24,px:`$2`,chromeless:!0,startIcon:(0,H.jsx)(ub,{size:12}),onPress:()=>void h(),children:(0,H.jsx)(o,{fontSize:12,color:`$color10`,children:`Refresh`})})]}),t===`leads`?b(S5.map(e=>({id:e,label:e===`all`?`All`:`★ ${e}`})),n,r):null,t===`investors`?b(x5,i,a):null,l?(0,H.jsxs)(F,{p:`$4`,gap:`$2`,children:[(0,H.jsx)(o,{fontSize:13,fontWeight:`600`,color:`$color12`,children:`This list could not be read.`}),(0,H.jsx)(o,{fontSize:12,color:`$color10`,children:l})]}):(0,H.jsxs)(P,{flex:1,minW:0,minH:0,children:[(0,H.jsx)(Vw,{flex:1,minW:0,minH:0,children:(0,H.jsx)(T4,{fields:g,records:s?.rows??[],loading:d,editable:!1,selectable:!1,defaultKind:`table`,boardDisabled:!0,fieldIcons:m5,onOpen:e=>m(e),empty:`No records.`},t)}),p?(0,H.jsxs)(F,{width:380,shrink:0,borderLeftWidth:1,borderColor:`$borderColor`,bg:`$background`,children:[(0,H.jsxs)(P,{height:44,px:`$3`,items:`center`,justify:`space-between`,borderBottomWidth:1,borderColor:`$borderColor`,children:[(0,H.jsx)(o,{fontSize:13,fontWeight:`600`,color:`$color12`,numberOfLines:1,children:String(p.name||p.email||`Record`)}),(0,H.jsx)(kS,{size:`xs`,width:26,height:26,p:`$0`,chromeless:!0,onPress:()=>m(null),children:(0,H.jsx)(Fb,{size:14,color:`$color10`})})]}),(0,H.jsx)(Vw,{flex:1,minH:0,children:(0,H.jsx)(F,{p:`$3`,children:(0,H.jsx)(P2,{fields:g,record:p})})})]}):null]})]})})}var w5=[`issues`,`components`,`milestones`,`templates`],T5=e=>e[0].toUpperCase()+e.slice(1),E5=()=>{let[e,t]=(0,V.useState)(``),{pathname:n}=Gn(),{plane:r}=fZ(),i=vX(JZ.projects(),()=>VZ(r),{enabled:!!r}),a=(i.data??[]).filter(t=>t.name.toLowerCase().includes(e.trim().toLowerCase()));return(0,H.jsxs)(_6,{title:a6(n)?.label??`Tracker`,children:[(0,H.jsx)(v6,{value:e,onChange:t}),(0,H.jsx)(F,{height:24}),(0,H.jsx)(S6,{to:`/mine`,icon:(0,H.jsx)(zy,{size:16,color:`$soft`}),children:`My issues`}),(0,H.jsx)(S6,{to:`/issues`,icon:(0,H.jsx)(vb,{size:16,color:`$soft`}),children:`All issues`}),(0,H.jsx)(y6,{}),(0,H.jsx)(S6,{to:`/projects`,icon:(0,H.jsx)(ry,{size:16,color:`$soft`}),children:`All projects`}),(0,H.jsx)(y6,{}),(0,H.jsxs)(T6,{children:[(0,H.jsx)(b6,{children:`Your projects`}),i.phase===`loading`?(0,H.jsx)(F,{px:14,py:12,children:(0,H.jsx)($w,{size:16})}):null,i.phase===`failure`?(0,H.jsx)(A5,{children:`Your projects could not be read.`}):null,i.phase===`ready`&&a.length===0?(0,H.jsx)(A5,{children:e.trim()?`No project by that name.`:`No projects yet.`}):null,a.map(e=>(0,H.jsx)(D5,{project:e},e._id))]})]})},D5=({project:e})=>{let t=Yn().id===e._id,[n,r]=(0,V.useState)(t);return(0,H.jsxs)(F,{children:[(0,H.jsx)(C6,{open:n,onPress:()=>r(!n),icon:(0,H.jsx)(k5,{id:e._id}),children:e.name}),n?(0,H.jsx)(w6,{children:w5.map(t=>(0,H.jsx)(S6,{to:`/projects/${e._id}/${t}`,indent:!0,children:T5(t)},t))}):null]})},O5=[`M8 1.5 14.5 8 8 14.5 1.5 8Z`,`M8 1.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13Z`,`M8 1.5 15 14.5H1Z`,`M2 2h12v12H2Z`],k5=({id:e})=>(0,H.jsx)(`svg`,{width:16,height:16,viewBox:`0 0 16 16`,fill:`none`,"aria-hidden":!0,children:(0,H.jsx)(`path`,{d:O5[A3(e)%O5.length],stroke:M3(e),strokeWidth:1.5,strokeLinejoin:`round`})}),A5=({children:e})=>(0,H.jsx)(o,{px:14,py:8,fontSize:Z.small,color:`$faint`,children:e}),j5=({glyph:e,n:t,label:n})=>t>0?(0,H.jsxs)(P,{items:`center`,gap:4,"aria-label":`${t} ${n}`,children:[e,(0,H.jsx)(o,{fontSize:`$3`,color:`$dim`,children:t})]}):null,M5=[`backlog`,`todo`,`progress`,`done`],N5=[`low`,`medium`,`high`,`urgent`],P5={backlog:`Backlog`,todo:`To do`,progress:`In progress`,done:`Done`},F5={urgent:1,high:2,medium:3,low:4},I5=(e,t)=>t&&e.toLowerCase()===t?P3(F5[t]):j3(e),L5={backlog:O3.backlog,todo:O3.todo,progress:O3.doing,done:O3.done},R5={arc:X.accent,track:X.rule},z5=({done:e,size:t=16,width:n=2})=>{let r=Math.min(1,Math.max(0,e)),i=(t-n)/2,a=2*Math.PI*i;return(0,H.jsxs)(`svg`,{width:t,height:t,viewBox:`0 0 ${t} ${t}`,role:`img`,"aria-label":`${Math.round(r*100)}% done`,children:[(0,H.jsx)(`circle`,{cx:t/2,cy:t/2,r:i,fill:`none`,stroke:R5.track,strokeWidth:n}),r>0?(0,H.jsx)(`circle`,{cx:t/2,cy:t/2,r:i,fill:`none`,stroke:R5.arc,strokeWidth:n,strokeLinecap:`round`,strokeDasharray:`${a*r} ${a}`,transform:`rotate(-90 ${t/2} ${t/2})`}):null]})},B5=12,V5=48,H5=({issue:e,dragging:t,onOpen:n,...r})=>{let i=e.priority?[W5(e.priority),...e.labels]:e.labels;return(0,H.jsxs)(F,{"data-slot":`issue`,"data-issue":e.id,bg:`$raised`,rounded:Q.card,overflow:`hidden`,opacity:t?.4:1,cursor:n?`pointer`:`grab`,hoverStyle:{background:`$hover`},role:`article`,tabIndex:0,"aria-label":`${e.key} ${e.title}`,onPress:()=>n?.(e),...G5(r),children:[(0,H.jsxs)(F,{p:B5,gap:F3.tight,children:[e.cover?(0,H.jsx)(tc,{src:e.cover,alt:``,width:`100%`,aspectRatio:1.44,rounded:`$1`,mb:4}):null,(0,H.jsx)(P,{items:`center`,justify:`space-between`,gap:6,children:(0,H.jsx)(o,{fontSize:Z.small,fontWeight:`600`,color:`$dim`,children:e.key})}),(0,H.jsx)(o,{fontSize:Z.body,lineHeight:20,color:`$ink`,style:q5,children:e.title}),i.length>0?(0,H.jsx)(P,{gap:F3.tight,flexWrap:`wrap`,children:i.map(t=>{let{background:n,color:r}=I5(t,e.priority);return(0,H.jsx)(KS,{variant:`default`,style:{...U5,backgroundColor:n},children:(0,H.jsx)(o,{fontSize:Z.chip,fontWeight:`600`,style:{color:r},children:t})},t)})}):null,e.done!==void 0||e.origin?(0,H.jsxs)(P,{items:`center`,gap:`$4`,mt:`$2`,children:[e.done===void 0?null:(0,H.jsxs)(P,{items:`center`,gap:4,children:[(0,H.jsx)(z5,{done:e.done}),(0,H.jsxs)(o,{fontSize:Z.body,color:`$soft`,children:[Math.round(e.done*100),`%`]})]}),e.origin?(0,H.jsx)(K5,{name:e.origin.name,mark:e.origin.mark}):null]}):null]}),(0,H.jsx)(Om,{}),(0,H.jsxs)(P,{height:V5,px:B5,items:`center`,justify:`space-between`,children:[(0,H.jsx)(U8,{people:e.people}),(0,H.jsxs)(P,{items:`center`,gap:`$3`,children:[(0,H.jsx)(j5,{glyph:(0,H.jsx)(cb,{size:12,color:`$dim`}),n:e.files,label:`attachments`}),(0,H.jsx)(j5,{glyph:(0,H.jsx)(ib,{size:12,color:`$dim`}),n:e.replies,label:`replies`})]})]})]})},U5={minHeight:18,height:18,paddingHorizontal:8,borderRadius:9999},W5=e=>e[0].toUpperCase()+e.slice(1),G5=e=>({draggable:!0,...e}),K5=({name:e,mark:t})=>(0,H.jsxs)(P,{items:`center`,gap:6,children:[t?(0,H.jsx)(tc,{src:t,alt:``,width:20,height:20,rounded:9999}):(0,H.jsx)(P,{width:20,height:20,rounded:9999,bg:`$edge`,items:`center`,justify:`center`,children:(0,H.jsx)(o,{fontSize:`$1`,color:`$quiet`,children:e[0]?.toUpperCase()})}),(0,H.jsx)(o,{fontSize:`$2`,color:`$quiet`,children:e})]}),q5={display:`-webkit-box`,WebkitBoxOrient:`vertical`,WebkitLineClamp:3,overflow:`hidden`},J5=({column:e,drag:t,over:n,onOver:r,onDrop:i,onAdd:a,onOpen:s,onLift:c,onLand:l})=>{let u=t=>n=>{n.preventDefault(),n.stopPropagation(),i(e.status,t)},d=t=>n=>{n.preventDefault(),r(e.status,t)};return(0,H.jsxs)(F,{"data-slot":`column`,"data-status":e.status,width:208,shrink:0,gap:F3.tight,role:`list`,"aria-label":e.name,onDragOver:d(`end`),onDrop:u(),children:[(0,H.jsxs)(P,{items:`center`,gap:F3.tight,height:24,children:[(0,H.jsx)(F,{width:8,height:8,rounded:9999,shrink:0,style:{backgroundColor:L5[e.status]}}),(0,H.jsx)(o,{fontSize:Z.small,fontWeight:`700`,color:`$ink`,...I3,children:e.name}),(0,H.jsxs)(o,{fontSize:Z.small,color:`$dim`,children:[`– `,e.issues.length]}),(0,H.jsx)(P,{flex:1}),a?(0,H.jsxs)(FC,{children:[(0,H.jsx)(LC,{asChild:!0,children:(0,H.jsx)(kS,{variant:`ghost`,size:`icon-sm`,"aria-label":`${e.name} actions`,children:(0,H.jsx)($v,{size:14})})}),(0,H.jsx)(VC,{align:`end`,children:(0,H.jsx)(GC,{onSelect:()=>a(e.status),children:`Add issue`})})]}):null]}),a?(0,H.jsx)(kS,{variant:`ghost`,height:36,width:`100%`,borderWidth:1,borderStyle:`dashed`,borderColor:`$edge`,rounded:Q.card,"aria-label":`Add issue to ${e.name}`,onPress:()=>a(e.status),children:(0,H.jsx)(lb,{size:16})}):null,e.issues.map(e=>(0,H.jsxs)(F,{role:`listitem`,gap:F3.tight,onDragOver:d(e.id),onDrop:u(e.id),children:[t&&n===e.id?(0,H.jsx)(Y5,{height:t.cover?260:176}):null,(0,H.jsx)(H5,{issue:e,dragging:t?.id===e.id,onOpen:s,onDragStart:()=>c(e),onDragEnd:l})]},e.id)),t&&n===`end`?(0,H.jsx)(Y5,{height:t.cover?260:176}):null,(0,H.jsx)(F,{flex:1,minH:24})]})},Y5=({height:e})=>(0,H.jsx)(F,{height:e,rounded:Q.card,borderWidth:1,borderStyle:`dashed`,borderColor:`$edge`}),X5=e=>M5.map(t=>({status:t,name:P5[t],issues:e.filter(e=>e.status===t)})),Z5=(e,t,n,r)=>{let i=e.find(e=>e.id===t);if(!i||i.status===n&&r===void 0&&$5(e,n)?.id===t||t===r)return e;let a=e.filter(e=>e.id!==t),o={...i,status:n},s=r?a.findIndex(e=>e.id===r):-1;if(s<0){let e=a.map(e=>e.status===n).lastIndexOf(!0);return Q5(a,e<0?a.length:e+1,o)}return Q5(a,s,o)},Q5=(e,t,n)=>[...e.slice(0,t),n,...e.slice(t)],$5=(e,t)=>e.filter(e=>e.status===t).at(-1),e7=16,t7=24,n7=({source:e,only:t,onOpen:n,onCreateIn:r})=>{let[i,a]=(0,V.useState)(null),[o,s]=(0,V.useState)(null),[c,l]=(0,V.useState)(null),[u,d]=(0,V.useState)(null),[f,p]=(0,V.useState)(0);(0,V.useEffect)(()=>(a(null),s(null),e.watch(e=>{a(e),s(null)},s)),[e,f]);let m=(0,V.useCallback)((t,n)=>{d(null);let r=c;l(null),r&&i&&(a(Z5(i,r.id,t,n)),e.move(r.id,t,n).catch(s))},[c,i,e]),h=e.add?.bind(e),g=r??(h?e=>{h(e,`New issue`).catch(s)}:void 0);if(o)return(0,H.jsx)(a7,{why:o.message,onRetry:()=>p(e=>e+1)});if(!i)return(0,H.jsx)(r7,{});if(i.length===0)return(0,H.jsx)(i7,{onAdd:g&&(()=>g(`backlog`))});let _=t?.length?i.filter(e=>e.priority&&t.includes(e.priority)):i;return(0,H.jsx)(Kp,{horizontal:!0,contentContainerStyle:{p:t7,gap:e7,shrink:0},children:X5(_).map(e=>(0,H.jsx)(J5,{column:e,drag:c,over:u?.status===e.status?u.before:null,onOver:(e,t)=>d({status:e,before:t}),onDrop:m,onAdd:g,onOpen:n,onLift:l,onLand:()=>{l(null),d(null)}},e.status))})},r7=()=>(0,H.jsx)(P,{p:t7,gap:e7,"aria-busy":!0,"aria-label":`Loading issues`,children:[0,1,2,3].map(e=>(0,H.jsxs)(F,{width:208,gap:`$2`,children:[(0,H.jsx)(vA,{height:12,width:96}),(0,H.jsx)(vA,{height:36}),[0,1,2].map(e=>(0,H.jsx)(vA,{height:176},e))]},e))}),i7=({onAdd:e})=>(0,H.jsx)(F,{p:t7,items:`flex-start`,children:(0,H.jsx)(T$,{icon:Ky,title:`No issues yet`,description:`Issues you open appear here, one column per status.`,primary:e?{label:`New issue`,onPress:e}:void 0})}),a7=({why:e,onRetry:t})=>(0,H.jsxs)(F,{p:t7,gap:`$3`,items:`flex-start`,role:`alert`,children:[(0,H.jsx)(o,{fontSize:`$4`,color:`$ink`,children:e}),(0,H.jsx)(kS,{variant:`outline`,size:`sm`,onPress:t,children:`Try again`})]}),o7=()=>new Promise(()=>{}),s7=e=>({watch(t,n){return e===`refused`&&n(Error(`Your workspace is not answering.`)),e===`nowhere`&&t([]),()=>{}},move:o7}),c7=24,l7=20,u7=20,d7=8,f7=28,p7=20,m7=36,h7=[{id:`kanban`,label:`Kanban`,icon:Wy},{id:`list`,label:`List`,icon:Yy},{id:`timeline`,label:`Timeline`,icon:py}],g7=({trail:e,title:t,base:n,here:r,people:i,only:a,onOnly:s,onAdd:c})=>(0,H.jsxs)(F,{"data-parity-key":`board.head`,pt:l7,children:[(0,H.jsxs)(P,{px:c7,height:u7,items:`center`,gap:8,children:[(0,H.jsx)(_7,{steps:e}),(0,H.jsx)(P,{flex:1,minW:0}),i.length>0?(0,H.jsx)(P,{rounded:Q.pill,bg:`$hover`,px:6,py:2,items:`center`,children:(0,H.jsx)(U8,{people:i,size:24,show:4,ground:X.card})}):null,c?(0,H.jsx)(x7,{onAdd:c}):null]}),(0,H.jsx)(F,{height:d7}),(0,H.jsx)(P,{px:c7,height:f7,items:`center`,children:(0,H.jsx)(o,{fontSize:Z.title,fontWeight:`500`,color:`$ink`,children:t})}),(0,H.jsx)(F,{height:p7}),(0,H.jsxs)(P,{px:18,height:m7,items:`flex-end`,gap:4,children:[h7.map(e=>(0,H.jsxs)(y7,{to:e.id===`kanban`?n:`${n}/${e.id}`,here:e.id===r,children:[(0,H.jsx)(e.icon,{size:16,color:e.id===r?`$ink`:`$soft`}),(0,H.jsx)(o,{fontSize:Z.row,color:e.id===r?`$ink`:`$soft`,children:e.label})]},e.id)),(0,H.jsx)(P,{flex:1,minW:0}),(0,H.jsx)(b7,{only:a,onOnly:s}),c?(0,H.jsxs)(P,{role:`button`,tabIndex:0,cursor:`pointer`,height:28,mb:3,px:10,items:`center`,gap:6,rounded:Q.field,style:{backgroundColor:X.accent},focusVisibleStyle:L3,"aria-label":`New issue`,onPress:c,children:[(0,H.jsx)(lb,{size:14,color:X.ground}),(0,H.jsx)(o,{fontSize:Z.small,fontWeight:`600`,style:{color:X.ground},children:`New issue`})]}):null]}),(0,H.jsx)(Om,{borderColor:`$edge`})]}),_7=({steps:e})=>(0,H.jsx)(P,{items:`center`,gap:8,minW:0,children:e.map((e,t)=>(0,H.jsxs)(P,{items:`center`,gap:8,minW:0,children:[t>0?(0,H.jsx)(o,{fontSize:Z.small,color:`$faint`,children:`/`}):null,e.to?(0,H.jsx)(P,{asChild:!0,style:v7,rounded:Q.field,focusVisibleStyle:L3,children:(0,H.jsx)(ri,{to:e.to,children:(0,H.jsx)(o,{fontSize:Z.small,color:`$soft`,numberOfLines:1,hoverStyle:{color:`$ink`},children:e.label})})}):(0,H.jsx)(o,{fontSize:Z.small,numberOfLines:1,"aria-current":`page`,style:{color:X.accent},children:e.label})]},`${e.label}-${t}`))}),v7={flexDirection:`row`,alignItems:`center`},y7=({to:e,here:t,children:n})=>(0,H.jsx)(F,{asChild:!0,style:{alignItems:`center`},rounded:Q.field,focusVisibleStyle:L3,children:(0,H.jsxs)(ri,{to:e,"aria-current":t?`page`:void 0,children:[(0,H.jsx)(P,{height:32,px:6,items:`center`,gap:8,children:n}),(0,H.jsx)(F,{height:2,width:`100%`,rounded:Q.pill,style:{backgroundColor:t?X.accent:`transparent`}})]})}),b7=({only:e,onOnly:t})=>{let n=new Set(e),r=r=>t(n.has(r)?e.filter(e=>e!==r):[...e,r]);return(0,H.jsxs)(FC,{children:[(0,H.jsx)(LC,{asChild:!0,children:(0,H.jsxs)(P,{role:`button`,tabIndex:0,cursor:`pointer`,height:32,px:8,items:`center`,gap:8,rounded:Q.field,hoverStyle:{background:`$hover`},focusVisibleStyle:L3,"aria-label":`Filter issues`,children:[(0,H.jsx)(hb,{size:16,color:e.length?`$ink`:`$soft`}),(0,H.jsx)(o,{fontSize:Z.row,color:e.length?`$ink`:`$soft`,children:e.length?`Filter · ${e.length}`:`Filter`})]})}),(0,H.jsxs)(VC,{align:`end`,children:[(0,H.jsx)(cw,{children:`Priority`}),N5.map(e=>(0,H.jsx)(KC,{checked:n.has(e),onCheckedChange:()=>r(e),children:(0,H.jsx)(o,{...I3,fontSize:Z.small,children:e})},e)),e.length?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(lw,{}),(0,H.jsx)(GC,{onSelect:()=>t([]),children:`Show every priority`})]}):null]})]})},x7=({onAdd:e})=>(0,H.jsxs)(FC,{children:[(0,H.jsx)(LC,{asChild:!0,children:(0,H.jsx)(P,{role:`button`,tabIndex:0,cursor:`pointer`,width:24,height:24,items:`center`,justify:`center`,rounded:Q.field,hoverStyle:{background:`$hover`},focusVisibleStyle:L3,"aria-label":`Board actions`,children:(0,H.jsx)(My,{size:16,color:`$soft`})})}),(0,H.jsx)(VC,{align:`end`,children:(0,H.jsx)(GC,{onSelect:e,children:`New issue`})})]}),S7=[`Backend`,`Frontend`,`Devops`,`Feature`,`Design`,`Sales`,`Marketing`,`QA`,`Research`],C7=[0,.25,.5,.75,1],w7=e=>e[0].toUpperCase()+e.slice(1);function T7({issue:e,source:t,people:n,onClose:r}){let[i,a]=(0,V.useState)(e.title),[s,c]=(0,V.useState)(e.description??``),[l,u]=(0,V.useState)(``),[d,f]=(0,V.useState)(!1);(0,V.useEffect)(()=>{a(e.title),c(e.description??``)},[e.id,e.title,e.description]);let p=n=>{t.update?t.update(e.id,n):n.status&&t.move(e.id,n.status),f(!0),setTimeout(()=>f(!1),1200)},m=()=>{let t=i.trim()||e.title;p({title:t,description:s.trim()})},h=t=>{let n=e.labels.includes(t)?e.labels.filter(e=>e!==t):[...e.labels,t];p({labels:n})},g=()=>{let t=l.trim();t&&(e.labels.includes(t)||p({labels:[...e.labels,t]}),u(``))},_=e.people[0]?.id??null;return(0,H.jsxs)(F,{"data-slot":`issue-drawer`,width:420,shrink:0,borderLeftWidth:1,borderColor:`$edge`,bg:`$panel`,height:`100%`,children:[(0,H.jsxs)(P,{height:48,px:16,items:`center`,justify:`space-between`,borderBottomWidth:1,borderColor:`$edge`,gap:8,children:[(0,H.jsxs)(P,{items:`center`,gap:8,children:[(0,H.jsx)(F,{width:8,height:8,rounded:9999,style:{backgroundColor:L5[e.status]}}),(0,H.jsx)(o,{fontSize:Z.body,fontWeight:`700`,color:`$ink`,children:e.key}),e.origin?(0,H.jsx)(P,{px:8,height:20,rounded:9999,bg:`$raised`,borderWidth:1,borderColor:`$edge`,items:`center`,children:(0,H.jsx)(o,{fontSize:Z.chip,color:`$soft`,children:e.origin.name})}):null,d?(0,H.jsxs)(P,{items:`center`,gap:4,px:6,py:2,rounded:Q.pill,bg:`$hover`,children:[(0,H.jsx)(hy,{size:11,color:`$ink`}),(0,H.jsx)(o,{fontSize:Z.chip,color:`$ink`,children:`Saved`})]}):null]}),(0,H.jsxs)(P,{items:`center`,gap:4,children:[t.remove?(0,H.jsx)(kS,{variant:`ghost`,size:`icon-sm`,"aria-label":`Delete issue`,onPress:()=>{t.remove?.(e.id),r()},children:(0,H.jsx)(wb,{size:14,color:`$soft`})}):null,(0,H.jsx)(kS,{variant:`ghost`,size:`icon-sm`,"aria-label":`Close issue drawer`,onPress:r,children:(0,H.jsx)(Fb,{size:15,color:`$soft`})})]})]}),(0,H.jsx)(Vw,{flex:1,minH:0,children:(0,H.jsxs)(F,{p:16,gap:16,children:[(0,H.jsxs)(F,{gap:8,children:[(0,H.jsx)(o,{fontSize:Z.chip,fontWeight:`700`,color:`$dim`,...I3,children:`Title`}),(0,H.jsx)(Dw,{height:32,value:i,onChangeText:a,onBlur:m,fontSize:13,fontWeight:`600`,bg:`$raised`,borderColor:`$edge`})]}),(0,H.jsxs)(F,{gap:8,children:[(0,H.jsxs)(P,{items:`center`,justify:`space-between`,children:[(0,H.jsx)(o,{fontSize:Z.chip,fontWeight:`700`,color:`$dim`,...I3,children:`Specification & Notes`}),(0,H.jsx)(kS,{size:`xs`,height:22,px:8,rounded:Q.field,style:{backgroundColor:X.accent},onPress:m,children:(0,H.jsx)(o,{fontSize:11,fontWeight:`600`,style:{color:X.ground},children:`Save`})})]}),(0,H.jsx)(Dw,{height:32,value:s,onChangeText:c,onBlur:m,placeholder:`Add acceptance criteria, PR links, or technical context...`,fontSize:12,bg:`$raised`,borderColor:`$edge`})]}),(0,H.jsx)(Om,{borderColor:`$edge`}),(0,H.jsxs)(F,{gap:8,children:[(0,H.jsx)(o,{fontSize:Z.chip,fontWeight:`700`,color:`$dim`,...I3,children:`Workflow Status`}),(0,H.jsx)(P,{gap:6,flexWrap:`wrap`,children:M5.map(t=>{let n=e.status===t;return(0,H.jsxs)(P,{role:`button`,tabIndex:0,cursor:`pointer`,px:10,height:28,rounded:Q.field,items:`center`,gap:6,bg:n?`$hover`:`$raised`,borderWidth:1,borderColor:n?`$ink`:`$edge`,focusVisibleStyle:L3,onPress:()=>p({status:t}),children:[(0,H.jsx)(F,{width:7,height:7,rounded:9999,style:{backgroundColor:L5[t]}}),(0,H.jsx)(o,{fontSize:Z.small,fontWeight:n?`700`:`500`,color:n?`$ink`:`$soft`,children:P5[t]})]},t)})})]}),(0,H.jsxs)(F,{gap:8,children:[(0,H.jsx)(o,{fontSize:Z.chip,fontWeight:`700`,color:`$dim`,...I3,children:`Priority`}),(0,H.jsx)(P,{gap:6,flexWrap:`wrap`,children:N5.map(t=>{let n=e.priority===t,{background:r,color:i}=I5(w7(t),t);return(0,H.jsx)(P,{role:`button`,tabIndex:0,cursor:`pointer`,px:10,height:26,rounded:Q.pill,items:`center`,borderWidth:1,borderColor:n?`$ink`:`transparent`,style:{backgroundColor:r},onPress:()=>p({priority:n?null:t}),children:(0,H.jsx)(o,{fontSize:Z.chip,fontWeight:`700`,style:{color:i},children:w7(t)})},t)})})]}),(0,H.jsxs)(F,{gap:8,children:[(0,H.jsxs)(P,{items:`center`,justify:`space-between`,children:[(0,H.jsx)(o,{fontSize:Z.chip,fontWeight:`700`,color:`$dim`,...I3,children:`Completion Progress`}),(0,H.jsxs)(P,{items:`center`,gap:6,children:[(0,H.jsx)(z5,{done:e.done??0}),(0,H.jsxs)(o,{fontSize:Z.small,fontWeight:`600`,color:`$ink`,children:[Math.round((e.done??0)*100),`%`]})]})]}),(0,H.jsx)(P,{gap:6,children:C7.map(t=>{let n=Math.round(t*100),r=Math.round((e.done??0)*100)===n;return(0,H.jsx)(P,{role:`button`,tabIndex:0,cursor:`pointer`,flex:1,height:26,rounded:Q.field,items:`center`,justify:`center`,bg:r?`$hover`:`$raised`,borderWidth:1,borderColor:r?`$ink`:`$edge`,onPress:()=>p({done:t}),children:(0,H.jsxs)(o,{fontSize:Z.chip,fontWeight:r?`700`:`500`,color:r?`$ink`:`$soft`,children:[n,`%`]})},n)})})]}),(0,H.jsxs)(F,{gap:8,children:[(0,H.jsxs)(P,{items:`center`,gap:6,children:[(0,H.jsx)(jb,{size:12,color:`$dim`}),(0,H.jsx)(o,{fontSize:Z.chip,fontWeight:`700`,color:`$dim`,...I3,children:`Assignee`})]}),(0,H.jsx)(P,{gap:6,flexWrap:`wrap`,children:n.slice(0,10).map(e=>{let t=_===e.id;return(0,H.jsxs)(P,{role:`button`,tabIndex:0,cursor:`pointer`,px:8,height:28,rounded:Q.pill,items:`center`,gap:6,bg:t?`$hover`:`$raised`,borderWidth:1,borderColor:t?`$ink`:`$edge`,onPress:()=>p({assigneeId:e.id}),children:[(0,H.jsx)(U8,{people:[e],size:18,show:1}),(0,H.jsx)(o,{fontSize:Z.chip,fontWeight:t?`700`:`500`,color:t?`$ink`:`$soft`,children:e.name.split(` `)[0]})]},e.id)})})]}),(0,H.jsxs)(F,{gap:8,children:[(0,H.jsxs)(P,{items:`center`,gap:6,children:[(0,H.jsx)(Sb,{size:12,color:`$dim`}),(0,H.jsx)(o,{fontSize:Z.chip,fontWeight:`700`,color:`$dim`,...I3,children:`Labels`})]}),(0,H.jsx)(P,{gap:6,flexWrap:`wrap`,children:S7.map(t=>{let n=e.labels.includes(t),{background:r,color:i}=I5(t);return(0,H.jsx)(KS,{variant:`default`,style:{minHeight:22,height:22,paddingLeft:9,paddingRight:9,borderRadius:9999,cursor:`pointer`,backgroundColor:n?r:`transparent`,borderWidth:1,borderStyle:`solid`,borderColor:n?i:X.rule,opacity:n?1:.7},onClick:()=>h(t),children:(0,H.jsx)(o,{fontSize:Z.chip,fontWeight:`600`,style:{color:n?i:X.mute},children:n?`✓ ${t}`:t})},t)})}),(0,H.jsxs)(P,{gap:6,children:[(0,H.jsx)(Dw,{flex:1,height:26,fontSize:11,placeholder:`Add custom label...`,value:l,onChangeText:u,bg:`$raised`,borderColor:`$edge`}),(0,H.jsx)(kS,{size:`xs`,height:26,px:10,variant:`outline`,onPress:g,children:(0,H.jsx)(lb,{size:12})})]})]})]})})]})}function E7({initialStatus:e=`backlog`,people:t,onCreate:n,onClose:r}){let[i,a]=(0,V.useState)(``),[s,c]=(0,V.useState)(``),[l,u]=(0,V.useState)(e),[d,f]=(0,V.useState)(`medium`),[p,m]=(0,V.useState)(t[0]?.id??null),[h,g]=(0,V.useState)([`Feature`]),[_,v]=(0,V.useState)(!1),y=e=>{g(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},b=async()=>{let e=i.trim();if(e&&!_){v(!0);try{await n(l,e,{description:s.trim()||void 0,priority:d,assigneeId:p,labels:h}),r()}finally{v(!1)}}};return(0,H.jsx)(F,{position:`fixed`,t:0,l:0,r:0,b:0,z:1e3,bg:X.ground,items:`center`,justify:`center`,p:16,children:(0,H.jsxs)(F,{width:`100%`,maxW:520,rounded:Q.card,borderWidth:1,borderColor:`$edge`,bg:`$panel`,overflow:`hidden`,children:[(0,H.jsxs)(P,{height:46,px:16,items:`center`,justify:`space-between`,borderBottomWidth:1,borderColor:`$edge`,children:[(0,H.jsxs)(P,{items:`center`,gap:8,children:[(0,H.jsx)(uy,{size:15,color:`$ink`}),(0,H.jsx)(o,{fontSize:Z.body,fontWeight:`700`,color:`$ink`,children:`Create New Issue`})]}),(0,H.jsx)(kS,{variant:`ghost`,size:`icon-sm`,"aria-label":`Close modal`,onPress:r,children:(0,H.jsx)(Fb,{size:15,color:`$soft`})})]}),(0,H.jsxs)(F,{p:16,gap:14,children:[(0,H.jsxs)(F,{gap:6,children:[(0,H.jsx)(o,{fontSize:Z.chip,fontWeight:`700`,color:`$dim`,...I3,children:`Issue Title`}),(0,H.jsx)(Dw,{autoFocus:!0,placeholder:`e.g. Wire real-time webhook retry metrics in hanzo/cloud`,value:i,onChangeText:a,fontSize:13,bg:`$raised`,borderColor:`$edge`})]}),(0,H.jsxs)(F,{gap:6,children:[(0,H.jsx)(o,{fontSize:Z.chip,fontWeight:`700`,color:`$dim`,...I3,children:`Description & Acceptance Criteria`}),(0,H.jsx)(Dw,{placeholder:`Context, repository, and target milestone...`,value:s,onChangeText:c,fontSize:12,bg:`$raised`,borderColor:`$edge`})]}),(0,H.jsxs)(F,{gap:6,children:[(0,H.jsx)(o,{fontSize:Z.chip,fontWeight:`700`,color:`$dim`,...I3,children:`Status`}),(0,H.jsx)(P,{gap:6,flexWrap:`wrap`,children:M5.map(e=>{let t=l===e;return(0,H.jsxs)(P,{role:`button`,tabIndex:0,cursor:`pointer`,px:10,height:26,rounded:Q.field,items:`center`,gap:6,bg:t?`$hover`:`$raised`,borderWidth:1,borderColor:t?`$ink`:`$edge`,onPress:()=>u(e),children:[(0,H.jsx)(F,{width:7,height:7,rounded:9999,style:{backgroundColor:L5[e]}}),(0,H.jsx)(o,{fontSize:Z.chip,fontWeight:t?`700`:`500`,color:t?`$ink`:`$soft`,children:P5[e]})]},e)})})]}),(0,H.jsxs)(F,{gap:6,children:[(0,H.jsx)(o,{fontSize:Z.chip,fontWeight:`700`,color:`$dim`,...I3,children:`Priority`}),(0,H.jsx)(P,{gap:6,flexWrap:`wrap`,children:N5.map(e=>{let t=d===e,{background:n,color:r}=I5(w7(e),e);return(0,H.jsx)(P,{role:`button`,tabIndex:0,cursor:`pointer`,px:10,height:24,rounded:Q.pill,items:`center`,borderWidth:1,borderColor:t?`$ink`:`transparent`,style:{backgroundColor:n},onPress:()=>f(e),children:(0,H.jsx)(o,{fontSize:Z.chip,fontWeight:`700`,style:{color:r},children:w7(e)})},e)})})]}),(0,H.jsxs)(F,{gap:6,children:[(0,H.jsx)(o,{fontSize:Z.chip,fontWeight:`700`,color:`$dim`,...I3,children:`Assign to a team member`}),(0,H.jsx)(P,{gap:6,flexWrap:`wrap`,children:t.slice(0,8).map(e=>{let t=p===e.id;return(0,H.jsxs)(P,{role:`button`,tabIndex:0,cursor:`pointer`,px:8,height:26,rounded:Q.pill,items:`center`,gap:6,bg:t?`$hover`:`$raised`,borderWidth:1,borderColor:t?`$ink`:`$edge`,onPress:()=>m(e.id),children:[(0,H.jsx)(U8,{people:[e],size:16,show:1}),(0,H.jsx)(o,{fontSize:Z.chip,fontWeight:t?`700`:`500`,color:t?`$ink`:`$soft`,children:e.name.split(` `)[0]})]},e.id)})})]}),(0,H.jsxs)(F,{gap:6,children:[(0,H.jsx)(o,{fontSize:Z.chip,fontWeight:`700`,color:`$dim`,...I3,children:`Labels`}),(0,H.jsx)(P,{gap:6,flexWrap:`wrap`,children:S7.slice(0,6).map(e=>{let t=h.includes(e),{background:n,color:r}=I5(e);return(0,H.jsx)(KS,{variant:`default`,style:{minHeight:20,height:20,paddingLeft:8,paddingRight:8,borderRadius:9999,cursor:`pointer`,backgroundColor:t?n:`transparent`,borderWidth:1,borderStyle:`solid`,borderColor:t?r:X.rule},onClick:()=>y(e),children:(0,H.jsx)(o,{fontSize:Z.chip,fontWeight:`600`,style:{color:t?r:X.mute},children:e})},e)})})]})]}),(0,H.jsxs)(P,{px:16,py:12,items:`center`,justify:`flex-end`,gap:8,borderTopWidth:1,borderColor:`$edge`,bg:`$raised`,children:[(0,H.jsx)(kS,{size:`sm`,variant:`ghost`,onPress:r,children:`Cancel`}),(0,H.jsx)(kS,{size:`sm`,style:{backgroundColor:X.accent},disabled:!i.trim()||_,onPress:()=>void b(),children:(0,H.jsx)(o,{fontSize:12,fontWeight:`600`,style:{color:X.ground},children:_?`Creating…`:`Create issue`})})]})]})})}var D7={minHeight:18,height:18,paddingHorizontal:8,borderRadius:9999},O7=e=>e[0].toUpperCase()+e.slice(1),k7=e=>M5[(M5.indexOf(e)+1)%M5.length]??`backlog`,A7=({source:e,only:t,mine:n,onOpen:r,onCreateIn:i})=>{let[a,s]=(0,V.useState)(null),[c,l]=(0,V.useState)(null),[u,d]=(0,V.useState)(0);(0,V.useEffect)(()=>(s(null),l(null),e.watch(e=>{s(e),l(null)},l)),[e,u]);let f=e.add?.bind(e),p=i??(f?e=>void f(e,`New issue`).catch(l):void 0),m=t=>{if(!a)return;let n=k7(t.status);s(Z5(a,t.id,n)),e.move(t.id,n).catch(l)};if(c)return(0,H.jsxs)(F,{p:24,gap:`$3`,items:`flex-start`,role:`alert`,children:[(0,H.jsx)(o,{fontSize:`$4`,color:`$ink`,children:c.message}),(0,H.jsx)(kS,{variant:`outline`,size:`sm`,onPress:()=>d(e=>e+1),children:`Try again`})]});if(!a)return(0,H.jsx)(F,{p:24,gap:`$3`,"aria-busy":!0,"aria-label":`Loading issue list`,children:[0,1,2,3,4,5].map(e=>(0,H.jsx)(vA,{height:44},e))});let h=t?.length?a.filter(e=>e.priority&&t.includes(e.priority)):a,g=n?h.filter((e,t)=>t%2==0||h.length<=6):h;return g.length===0?(0,H.jsx)(F,{p:24,items:`flex-start`,children:(0,H.jsx)(T$,{icon:Yy,title:`No matching issues`,description:`Issues appear here grouped by workflow status.`,primary:p?{label:`New issue`,onPress:()=>p(`backlog`)}:void 0})}):(0,H.jsx)(Vw,{flex:1,minH:0,children:(0,H.jsx)(F,{p:24,gap:20,children:X5(g).map(e=>(0,H.jsxs)(F,{rounded:Q.card,borderWidth:1,borderColor:`$edge`,bg:`$background`,overflow:`hidden`,children:[(0,H.jsxs)(P,{px:16,height:40,items:`center`,gap:F3.tight,bg:`$panel`,borderBottomWidth:+(e.issues.length>0),borderColor:`$edge`,children:[(0,H.jsx)(F,{width:8,height:8,rounded:9999,shrink:0,style:{backgroundColor:L5[e.status]}}),(0,H.jsx)(o,{fontSize:Z.small,fontWeight:`700`,color:`$ink`,...I3,children:e.name}),(0,H.jsx)(o,{fontSize:Z.small,color:`$dim`,children:e.issues.length}),(0,H.jsx)(P,{flex:1}),p?(0,H.jsx)(kS,{variant:`ghost`,size:`icon-sm`,"aria-label":`Add issue to ${e.name}`,onPress:()=>p(e.status),children:(0,H.jsx)(lb,{size:14})}):null]}),e.issues.map((e,t)=>{let n=e.priority?[O7(e.priority),...e.labels]:e.labels;return(0,H.jsxs)(F,{children:[t>0?(0,H.jsx)(Om,{borderColor:`$edge`}):null,(0,H.jsxs)(P,{px:16,py:10,items:`center`,gap:12,cursor:r?`pointer`:`default`,hoverStyle:{background:`$hover`},onPress:()=>r?.(e),children:[(0,H.jsx)(P,{...G3(t=>{t?.stopPropagation?.(),m(e)},`Advance ${e.key} status`),width:20,height:20,rounded:9999,items:`center`,justify:`center`,borderWidth:1,borderColor:`$edge`,bg:`$panel`,children:(0,H.jsx)(F,{width:8,height:8,rounded:9999,style:{backgroundColor:L5[e.status]}})}),(0,H.jsx)(o,{fontSize:Z.small,fontWeight:`600`,color:`$soft`,width:68,shrink:0,children:e.key}),(0,H.jsx)(o,{fontSize:Z.body,color:`$ink`,flex:1,minW:160,numberOfLines:1,children:e.title}),(0,H.jsxs)(P,{gap:F3.tight,items:`center`,flexWrap:`wrap`,children:[n.map(t=>{let{background:n,color:r}=I5(t,e.priority);return(0,H.jsx)(KS,{variant:`default`,style:{...D7,backgroundColor:n},children:(0,H.jsx)(o,{fontSize:Z.chip,fontWeight:`600`,style:{color:r},children:t})},t)}),e.origin?(0,H.jsx)(P,{px:8,height:18,rounded:9999,bg:`$panel`,borderWidth:1,borderColor:`$edge`,items:`center`,children:(0,H.jsx)(o,{fontSize:Z.chip,color:`$quiet`,children:e.origin.name})}):null]}),(0,H.jsx)(P,{width:64,items:`center`,justify:`flex-end`,gap:4,shrink:0,children:e.done===void 0?null:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(z5,{done:e.done}),(0,H.jsxs)(o,{fontSize:Z.small,color:`$soft`,children:[Math.round(e.done*100),`%`]})]})}),(0,H.jsxs)(P,{width:64,items:`center`,justify:`flex-end`,gap:`$2`,shrink:0,children:[(0,H.jsx)(j5,{glyph:(0,H.jsx)(cb,{size:12,color:`$dim`}),n:e.files,label:`attachments`}),(0,H.jsx)(j5,{glyph:(0,H.jsx)(ib,{size:12,color:`$dim`}),n:e.replies,label:`replies`})]}),(0,H.jsx)(P,{width:76,justify:`flex-end`,shrink:0,children:(0,H.jsx)(U8,{people:e.people,size:24,show:3})})]})]},e.id)})]},e.status))})})},j7=[{id:`w1`,label:`W1 · Oct 20`,sub:`Sprint 14`},{id:`w2`,label:`W2 · Oct 27`,sub:`Sprint 14`},{id:`w3`,label:`W3 · Nov 03`,sub:`Current · Active`,now:!0},{id:`w4`,label:`W4 · Nov 10`,sub:`Sprint 15`},{id:`w5`,label:`W5 · Nov 17`,sub:`Sprint 15`},{id:`w6`,label:`W6 · Nov 24`,sub:`Release Cut`}],M7=(e,t)=>{switch(e){case`done`:return{start:t%2==0?0:1,span:2};case`progress`:return{start:1+t%2,span:2};case`todo`:return{start:2+t%2,span:2};default:return{start:3+t%2,span:2}}},N7=({source:e,only:t,mine:n,onOpen:r})=>{let[i,a]=(0,V.useState)(null),[s,c]=(0,V.useState)(null);(0,V.useEffect)(()=>(a(null),c(null),e.watch(e=>{a(e),c(null)},c)),[e]);let l=t=>{if(!i)return;let n=k7(t.status);a(Z5(i,t.id,n)),e.move(t.id,n).catch(c)};if(s)return(0,H.jsx)(F,{p:24,children:(0,H.jsx)(o,{fontSize:`$4`,color:`$ink`,children:s.message})});if(!i)return(0,H.jsx)(F,{p:24,gap:`$3`,"aria-busy":!0,"aria-label":`Loading timeline`,children:[0,1,2,3,4].map(e=>(0,H.jsx)(vA,{height:48},e))});let u=t?.length?i.filter(e=>e.priority&&t.includes(e.priority)):i,d=n?u.filter((e,t)=>t%2==0||u.length<=6):u;return d.length===0?(0,H.jsx)(F,{p:24,items:`flex-start`,children:(0,H.jsx)(T$,{icon:py,title:`No issues on timeline`,description:`Scheduled issues and sprint milestones appear here across weeks.`})}):(0,H.jsx)(Vw,{flex:1,minH:0,children:(0,H.jsx)(F,{p:24,gap:16,children:(0,H.jsxs)(F,{rounded:Q.card,borderWidth:1,borderColor:`$edge`,bg:`$background`,overflow:`hidden`,children:[(0,H.jsxs)(P,{bg:`$panel`,borderBottomWidth:1,borderColor:`$edge`,height:48,items:`center`,children:[(0,H.jsxs)(P,{width:280,shrink:0,px:16,items:`center`,justify:`space-between`,borderRightWidth:1,borderColor:`$edge`,height:`100%`,children:[(0,H.jsx)(o,{fontSize:Z.small,fontWeight:`700`,color:`$ink`,...I3,children:`Issue / Assignee`}),(0,H.jsxs)(o,{fontSize:Z.chip,color:`$soft`,children:[d.length,` tracked`]})]}),(0,H.jsx)(P,{flex:1,height:`100%`,children:j7.map(e=>(0,H.jsxs)(F,{flex:1,px:10,justify:`center`,borderRightWidth:1,borderColor:`$edge`,bg:`now`in e&&e.now?`$hover`:`transparent`,children:[(0,H.jsxs)(P,{items:`center`,gap:6,children:[`now`in e&&e.now?(0,H.jsx)(F,{width:6,height:6,rounded:9999,style:{backgroundColor:X.accent}}):null,(0,H.jsx)(o,{fontSize:Z.small,fontWeight:`600`,color:`now`in e&&e.now?`$ink`:`$soft`,children:e.label})]}),(0,H.jsx)(o,{fontSize:Z.chip,color:`$quiet`,children:e.sub})]},e.id))})]}),d.map((e,t)=>{let{start:n,span:i}=M7(e.status,t),a=n/j7.length*100,s=i/j7.length*100,c=Math.round((e.done??(e.status===`done`?1:.25))*100);return(0,H.jsxs)(F,{children:[t>0?(0,H.jsx)(Om,{borderColor:`$edge`}):null,(0,H.jsxs)(P,{height:46,items:`center`,hoverStyle:{background:`$hover`},children:[(0,H.jsxs)(P,{width:280,shrink:0,px:16,gap:8,items:`center`,borderRightWidth:1,borderColor:`$edge`,height:`100%`,cursor:r?`pointer`:`default`,onPress:()=>r?.(e),children:[(0,H.jsx)(F,{width:8,height:8,rounded:9999,shrink:0,style:{backgroundColor:L5[e.status]}}),(0,H.jsx)(o,{fontSize:Z.chip,fontWeight:`600`,color:`$soft`,width:54,shrink:0,children:e.key}),(0,H.jsx)(o,{fontSize:Z.small,color:`$ink`,flex:1,numberOfLines:1,children:e.title}),(0,H.jsx)(U8,{people:e.people,size:20,show:1})]}),(0,H.jsxs)(P,{flex:1,height:`100%`,position:`relative`,items:`center`,children:[j7.map(e=>(0,H.jsx)(F,{flex:1,height:`100%`,borderRightWidth:1,borderColor:`$edge`,bg:`now`in e&&e.now?`$panel`:`transparent`},e.id)),(0,H.jsxs)(P,{...G3(()=>l(e),`${e.key} (${c}% done) — click to advance status`),position:`absolute`,style:{left:`${a+1}%`,width:`${s-2}%`},height:26,rounded:Q.field,bg:`$panel`,borderWidth:1,borderColor:`$edge`,overflow:`hidden`,items:`center`,px:8,justify:`space-between`,children:[(0,H.jsx)(F,{position:`absolute`,l:0,t:0,b:0,width:`${c}%`,opacity:.22,pointerEvents:`none`,style:{backgroundColor:L5[e.status]}}),(0,H.jsx)(o,{fontSize:Z.chip,fontWeight:`600`,color:`$ink`,numberOfLines:1,z:1,children:e.title}),(0,H.jsxs)(o,{fontSize:Z.chip,color:`$soft`,shrink:0,ml:6,z:1,children:[c,`%`]})]})]})]})]},e.id)})]})})})},P7=e=>h7.find(t=>t.id===e)?.id??`kanban`,F7=({mine:e=!1})=>{let{id:t,view:n}=Yn(),r=V6(t),{standing:i}=fZ(),a=L6(t)??s7(z6(i)),o=a.add?.bind(a),s=R6(t),[c,l]=(0,V.useState)([]),[u,d]=(0,V.useState)(null),[f,p]=(0,V.useState)([]),[m,h]=(0,V.useState)(null),g=P7(n);(0,V.useEffect)(()=>a.watch(e=>p(e),()=>{}),[a]);let _=u?f.find(e=>e.id===u)??null:null,v=e?`/mine`:t?`/projects/${t}/issues`:`/issues`,y=[{label:`Your projects`,to:`/projects`},...t?[{label:r?.name??`…`,to:v}]:[],{label:e?`My issues`:t?`Issues`:`All issues`}];return(0,H.jsxs)(F,{flex:1,minH:0,children:[(0,H.jsx)(g7,{trail:y,title:e?`My issues`:t?`Issues`:`All issues`,base:v,here:g,people:s,only:c,onOnly:l,onAdd:o?()=>h(`backlog`):void 0}),(0,H.jsxs)(P,{flex:1,minH:0,minW:0,children:[(0,H.jsx)(F,{flex:1,minH:0,minW:0,children:g===`kanban`?(0,H.jsx)(n7,{source:a,only:c,onOpen:e=>d(e.id),onCreateIn:o?e=>h(e):void 0}):g===`list`?(0,H.jsx)(A7,{source:a,only:c,mine:e,onOpen:e=>d(e.id),onCreateIn:o?e=>h(e):void 0}):(0,H.jsx)(N7,{source:a,only:c,mine:e,onOpen:e=>d(e.id)})}),_?(0,H.jsx)(T7,{issue:_,source:a,people:s,onClose:()=>d(null)}):null]}),m&&o?(0,H.jsx)(E7,{initialStatus:m,people:s,onCreate:async(e,t,n)=>{await o(e,t,n)},onClose:()=>h(null)}):null]})};function I7(){let e=qn(),{current:t,standing:n}=fZ(),r=B6(),i=L6()??s7(z6(n)),a=R6(),[s,c]=(0,V.useState)([]);(0,V.useEffect)(()=>i.watch(e=>c(e),()=>{}),[i]);let l=r.data??[];return(0,H.jsx)(Vw,{flex:1,minH:0,children:(0,H.jsxs)(F,{p:24,gap:20,children:[(0,H.jsxs)(P,{items:`center`,justify:`space-between`,flexWrap:`wrap`,gap:12,children:[(0,H.jsxs)(F,{gap:4,children:[(0,H.jsxs)(o,{...I3,fontSize:Z.chip,fontWeight:`600`,color:`$soft`,children:[t?.name??`Hanzo AI`,` · Portfolio & Tracker`]}),(0,H.jsxs)(o,{fontSize:Z.title,fontWeight:`600`,color:`$ink`,children:[`All projects (`,l.length,`)`]}),(0,H.jsx)(o,{fontSize:Z.body,color:`$quiet`,children:`The projects in this space and the issues on their boards.`})]}),(0,H.jsxs)(P,{gap:8,items:`center`,children:[(0,H.jsx)(U8,{people:a,size:26,show:5}),(0,H.jsxs)(kS,{onPress:()=>e(`/issues`),children:[`All Issues (`,s.length,`)`]})]})]}),(0,H.jsx)(P,{flexWrap:`wrap`,gap:16,children:l.map(t=>{let n=t.identifier.toUpperCase(),r=s.filter(e=>e.key.startsWith(`${n}-`)),i=r.length||t.sequence,a=r.filter(e=>e.status===`done`).length,c=r.filter(e=>e.status===`progress`).length,l=r.filter(e=>e.status===`todo`).length,u=r.filter(e=>e.status===`backlog`).length,d=r.length>0?a/r.length:0;return(0,H.jsxs)(F,{width:380,grow:1,p:20,rounded:Q.card,bg:`$background`,borderWidth:1,borderColor:`$edge`,gap:14,children:[(0,H.jsxs)(P,{items:`center`,justify:`space-between`,gap:10,children:[(0,H.jsxs)(P,{items:`center`,gap:10,children:[(0,H.jsx)(F,{width:36,height:36,rounded:Q.field,items:`center`,justify:`center`,bg:`$panel`,borderWidth:1,borderColor:`$edge`,children:(0,H.jsx)(Ly,{size:18,color:`$ink`})}),(0,H.jsxs)(F,{children:[(0,H.jsxs)(P,{items:`center`,gap:8,children:[(0,H.jsx)(o,{fontSize:Z.row,fontWeight:`600`,color:`$ink`,children:t.name}),(0,H.jsx)(P,{px:8,py:2,rounded:Q.pill,style:j3(t.identifier),children:(0,H.jsx)(o,{fontSize:Z.chip,fontWeight:`700`,style:{color:j3(t.identifier).color},children:t.identifier})})]}),(0,H.jsxs)(o,{fontSize:Z.small,color:`$soft`,children:[r.length,` active issues · `,(t.members??[]).length,` members`]})]})]}),(0,H.jsxs)(P,{items:`center`,gap:6,children:[(0,H.jsx)(z5,{done:d,size:20,width:2.5}),(0,H.jsxs)(o,{fontSize:Z.small,fontWeight:`600`,color:`$ink`,children:[Math.round(d*100),`%`]})]})]}),(0,H.jsxs)(F,{gap:6,children:[(0,H.jsxs)(P,{height:6,rounded:Q.pill,bg:`$panel`,overflow:`hidden`,gap:2,children:[(0,H.jsx)(F,{flex:Math.max(1,a),style:{backgroundColor:O3.done}}),(0,H.jsx)(F,{flex:Math.max(1,c),style:{backgroundColor:O3.doing}}),(0,H.jsx)(F,{flex:Math.max(1,l),style:{backgroundColor:O3.todo}}),(0,H.jsx)(F,{flex:Math.max(1,u),style:{backgroundColor:O3.backlog}})]}),(0,H.jsxs)(P,{justify:`space-between`,flexWrap:`wrap`,gap:8,children:[(0,H.jsxs)(o,{fontSize:Z.chip,color:`$quiet`,children:[`Backlog: `,u]}),(0,H.jsxs)(o,{fontSize:Z.chip,color:`$quiet`,children:[`To do: `,l]}),(0,H.jsxs)(o,{fontSize:Z.chip,color:`$quiet`,children:[`In progress: `,c]}),(0,H.jsxs)(o,{fontSize:Z.chip,color:`$quiet`,children:[`Done: `,a,` / `,i]})]})]}),(0,H.jsxs)(P,{items:`center`,justify:`space-between`,flexWrap:`wrap`,gap:8,children:[(0,H.jsx)(P,{gap:6,flexWrap:`wrap`,children:[[`issues`,`Board`],[`issues/list`,`List`],[`issues/timeline`,`Timeline`]].map(([n,r])=>(0,H.jsx)(P,{...G3(()=>e(`/projects/${t._id}/${n}`),`${t.name} ${r}`),px:10,py:5,rounded:Q.field,bg:`$panel`,borderWidth:1,borderColor:`$edge`,hoverStyle:{background:`$hover`},children:(0,H.jsx)(o,{fontSize:Z.chip,fontWeight:`600`,color:`$soft`,children:r})},n))}),(0,H.jsx)(kS,{size:`sm`,onPress:()=>e(`/projects/${t._id}/issues`),children:`Open Board →`})]})]},t._id)})})]})})}var L7=(0,V.lazy)(()=>b(()=>import(`./Bots-DU1hNVB7.js`).then(e=>({default:e.Bots})),__vite__mapDeps([3,1,2]))),R7=()=>{let{id:e}=Yn();return(0,H.jsx)(_r,{to:e?`/projects/${e}/issues`:`/projects`,replace:!0})},z7=()=>{let e=B6();if(e.phase===`loading`)return B7(null);let t=[...e.data??[]].sort((e,t)=>e.name.localeCompare(t.name))[0];return(0,H.jsx)(_r,{to:t?`/projects/${t._id}/issues`:`/issues`,replace:!0})},B7=e=>(0,H.jsx)(f6,{nav:(0,H.jsx)(E5,{}),aside:(0,H.jsx)(m8,{}),children:e}),V7=e=>(0,H.jsx)(f6,{nav:(0,H.jsx)($8,{}),aside:(0,H.jsx)(_8,{}),children:e}),H7=[{path:`/`,element:(0,H.jsx)(z7,{})},{path:`/login`,element:(0,H.jsx)(z7,{})},{path:`/auth`,element:(0,H.jsx)(z7,{})},{path:`/auth/callback`,element:(0,H.jsx)(z7,{})},{path:`/issues`,element:B7((0,H.jsx)(F7,{}))},{path:`/issues/:view`,element:B7((0,H.jsx)(F7,{}))},{path:`/mine`,element:B7((0,H.jsx)(F7,{mine:!0}))},{path:`/mine/:view`,element:B7((0,H.jsx)(F7,{mine:!0}))},{path:`/projects`,element:B7((0,H.jsx)(I7,{}))},{path:`/projects/:id`,element:(0,H.jsx)(R7,{})},{path:`/projects/:id/issues`,element:B7((0,H.jsx)(F7,{}))},{path:`/projects/:id/issues/:view`,element:B7((0,H.jsx)(F7,{}))},{path:`/projects/:id/:page`,element:(0,H.jsx)(R7,{})},{path:`/chat`,element:V7((0,H.jsx)(Y8,{}))},{path:`/chat/:id`,element:V7((0,H.jsx)(Y8,{}))},{path:`/bots`,element:(0,H.jsx)(f6,{nav:null,children:(0,H.jsx)(V.Suspense,{fallback:null,children:(0,H.jsx)(L7,{})})})},{path:`/crm`,element:(0,H.jsx)(_r,{to:`/crm/investors`,replace:!0})},{path:`/crm/:section`,element:(e=>(0,H.jsx)(f6,{nav:(0,H.jsx)(h5,{}),children:e}))((0,H.jsx)(C5,{}))},{path:`/overview`,element:(0,H.jsx)(_r,{to:`/chat`,replace:!0})},{path:`/agents`,element:(0,H.jsx)(_r,{to:`/chat`,replace:!0})},{path:`/agents/:id`,element:(0,H.jsx)(_r,{to:`/chat`,replace:!0})},{path:`/apps`,element:(0,H.jsx)(_r,{to:`/chat`,replace:!0})},{path:`/apps/:appId`,element:(0,H.jsx)(_r,{to:`/chat`,replace:!0})},{path:`/calendar`,element:(0,H.jsx)(_r,{to:`/chat`,replace:!0})},{path:`/cal`,element:(0,H.jsx)(_r,{to:`/chat`,replace:!0})},{path:`/time`,element:(0,H.jsx)(_r,{to:`/chat`,replace:!0})},{path:`/meet`,element:(0,H.jsx)(_r,{to:`/chat`,replace:!0})},{path:`/inbox`,element:(0,H.jsx)(_r,{to:`/chat`,replace:!0})},{path:`/docs`,element:(0,H.jsx)(_r,{to:`/chat`,replace:!0})},{path:`/files`,element:(0,H.jsx)(_r,{to:`/chat`,replace:!0})},{path:`/mail`,element:(0,H.jsx)(_r,{to:`/chat`,replace:!0})},{path:`/admin`,element:(0,H.jsx)(_r,{to:`/chat`,replace:!0})},{path:`/settings`,element:(0,H.jsx)(_r,{to:`/chat`,replace:!0})},{path:`/people`,element:(0,H.jsx)(_r,{to:`/crm/investors`,replace:!0})},{path:`*`,element:(0,H.jsx)(_r,{to:`/chat`,replace:!0})}],U7=`<svg role="img" aria-label="Hanzo" viewBox="0 0 67 67" xmlns="http://www.w3.org/2000/svg">
127
+ <!-- Origami fold-in → hover: one 3-D turn → press: squash. Pure CSS, no JS. Canonical 7-path shaded H. -->
128
+
129
+ <style>.o{fill:#fff;opacity:0;transform-box:fill-box;transform-origin:left center;animation:fold 0.42s cubic-bezier(.16,1,.3,1) forwards}
130
+ .s{fill:#ddd}
131
+ @keyframes fold{from{opacity:0;transform:perspective(320px) rotateY(90deg)}to{opacity:1;transform:none}}
132
+ .o0{animation-delay:0.00s}.o1{animation-delay:0.06s}.o2{animation-delay:0.12s}.o3{animation-delay:0.18s}.o4{animation-delay:0.24s}
133
+ /* interaction — pure CSS, no JS: hover = one graceful turn (returns to rest), press = squash */
134
+ .hanzo-hov{transform-box:view-box;transform-origin:33.5px 33.5px}
135
+ .hanzo-prs{transform-box:view-box;transform-origin:33.5px 33.5px;transition:transform .22s cubic-bezier(.22,1,.36,1)}
136
+ svg:hover .hanzo-hov{animation:hanzoTurn 0.85s cubic-bezier(.45,0,.2,1)}
137
+ svg:active .hanzo-prs{transform:scale(.92)}
138
+ @keyframes hanzoTurn{0%{transform:perspective(300px) rotateY(0)}100%{transform:perspective(300px) rotateY(360deg)}}
139
+ @media (prefers-reduced-motion:reduce){.hanzo-hov,.hanzo-prs{animation:none!important;transform:none!important}.o{opacity:1;animation:none;transform:none}}
140
+ </style>
141
+ <g class="hanzo-hov"><g class="hanzo-prs">
142
+ <path class="o o0" d="M22.21 0H0V22.3184H22.21V0Z"/>
143
+ <path class="o o1" d="M66.7198 0H44.5098V22.3184H66.7198V0Z"/>
144
+ <path class="o o1 s" d="M66.6753 22.3185L44.5098 20.0822V22.3185H66.6753Z"/>
145
+ <path class="o o2" d="M66.7038 22.3184H22.2534L0.0878906 44.6367H44.4634L66.7038 22.3184Z"/>
146
+ <path class="o o3" d="M22.21 67V44.6369H0V67H22.21Z"/>
147
+ <path class="o o3 s" d="M0 44.6369L22.21 46.8285V44.6369H0Z"/>
148
+ <path class="o o4" d="M66.7198 67V44.6369H44.5098V67H66.7198Z"/>
149
+ </g></g>
150
+ </svg>`;function W7(){return`<svg viewBox="0 0 67 67" xmlns="http://www.w3.org/2000/svg">
151
+ <path d="M22.21 67V44.6369H0V67H22.21Z" fill="#ffffff"/>
152
+ <path d="M0 44.6369L22.21 46.8285V44.6369H0Z" fill="#DDDDDD"/>
153
+ <path d="M66.7038 22.3184H22.2534L0.0878906 44.6367H44.4634L66.7038 22.3184Z" fill="#ffffff"/>
154
+ <path d="M22.21 0H0V22.3184H22.21V0Z" fill="#ffffff"/>
155
+ <path d="M66.7198 0H44.5098V22.3184H66.7198V0Z" fill="#ffffff"/>
156
+ <path d="M66.6753 22.3185L44.5098 20.0822V22.3185H66.6753Z" fill="#DDDDDD"/>
157
+ <path d="M66.7198 67V44.6369H44.5098V67H66.7198Z" fill="#ffffff"/>
158
+ </svg>`}function G7(){return`<svg viewBox="0 0 67 67" xmlns="http://www.w3.org/2000/svg">
159
+ <path d="M22.21 67V44.6369H0V67H22.21Z" fill="#000000"/>
160
+ <path d="M0 44.6369L22.21 46.8285V44.6369H0Z" fill="#222222"/>
161
+ <path d="M66.7038 22.3184H22.2534L0.0878906 44.6367H44.4634L66.7038 22.3184Z" fill="#000000"/>
162
+ <path d="M22.21 0H0V22.3184H22.21V0Z" fill="#000000"/>
163
+ <path d="M66.7198 0H44.5098V22.3184H66.7198V0Z" fill="#000000"/>
164
+ <path d="M66.6753 22.3185L44.5098 20.0822V22.3185H66.6753Z" fill="#222222"/>
165
+ <path d="M66.7198 67V44.6369H44.5098V67H66.7198Z" fill="#000000"/>
166
+ </svg>`}function K7(){return`<svg viewBox="0 0 67 67" xmlns="http://www.w3.org/2000/svg">
167
+ <path d="M22.21 67V44.6369H0V67H22.21Z" fill="#ffffff"/>
168
+ <path d="M0 44.6369L22.21 46.8285V44.6369H0Z" fill="#DDDDDD"/>
169
+ <path d="M66.7038 22.3184H22.2534L0.0878906 44.6367H44.4634L66.7038 22.3184Z" fill="#ffffff"/>
170
+ <path d="M22.21 0H0V22.3184H22.21V0Z" fill="#ffffff"/>
171
+ <path d="M66.7198 0H44.5098V22.3184H66.7198V0Z" fill="#ffffff"/>
172
+ <path d="M66.6753 22.3185L44.5098 20.0822V22.3185H66.6753Z" fill="#DDDDDD"/>
173
+ <path d="M66.7198 67V44.6369H44.5098V67H66.7198Z" fill="#ffffff"/>
174
+ </svg>`}function q7(){return`<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg">
175
+ <rect width="64" height="64" rx="8" fill="#000000"/>
176
+ <g transform="translate(8, 8) scale(0.716)">
177
+ <path d="M22.21 67V44.6369H0V67H22.21Z" fill="#ffffff"/>
178
+ <path d="M66.7038 22.3184H22.2534L0.0878906 44.6367H44.4634L66.7038 22.3184Z" fill="#ffffff"/>
179
+ <path d="M22.21 0H0V22.3184H22.21V0Z" fill="#ffffff"/>
180
+ <path d="M66.7198 0H44.5098V22.3184H66.7198V0Z" fill="#ffffff"/>
181
+ <path d="M66.7198 67V44.6369H44.5098V67H66.7198Z" fill="#ffffff"/>
182
+ </g>
183
+ </svg>`}function J7(e={}){let{variant:t=`color`}=e,n=``;switch(t){case`mono`:n=G7();break;case`white`:n=K7();break;case`favicon`:n=q7();break;default:n=W7()}return`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(n)))}`}J7(),J7({variant:`mono`}),J7({variant:`white`}),J7({variant:`favicon`});function Y7(){return`data:image/svg+xml;base64,`+btoa(unescape(encodeURIComponent(U7)))}Y7();var X7=32;function Z7(e){let t=new Uint8Array(e);return crypto.getRandomValues(t),$7(t.buffer)}async function Q7(e){let t=new TextEncoder;return crypto.subtle.digest(`SHA-256`,t.encode(e))}function $7(e){let t=new Uint8Array(e),n=``;for(let e of t)n+=String.fromCharCode(e);return btoa(n).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/,``)}async function e9(){let e=Z7(X7);return{codeVerifier:e,codeChallenge:$7(await Q7(e))}}function t9(){return Z7(X7)}var n9={discovery:`/.well-known/openid-configuration`,authorize:`/v1/iam/oauth/authorize`,token:`/v1/iam/oauth/token`,userinfo:`/v1/iam/oauth/userinfo`,jwks:`/v1/iam/.well-known/jwks`,logout:`/v1/iam/oauth/logout`,revoke:`/v1/iam/oauth/revoke`},r9={authMethods:`/v1/iam/auth/methods`,authIdentifier:`/v1/iam/auth/identifier`,authApplication:`/v1/iam/auth/application`,onboarding:`/v1/iam/onboarding`,login:`/v1/iam/login`,sendCode:`/v1/iam/verification-codes`,federationMfa:`/v1/iam/oauth/federation/mfa`,signup:`/v1/iam/signup`,terms:`/v1/iam/terms`,password:`/v1/iam/password`,address:`/v1/iam/address`,accept:`/v1/iam/invitations/accept`,web3Nonce:`/v1/iam/web3/nonce`,web3Verify:`/v1/iam/web3/verify`};function i9(e){return e.replace(/\/+$/,``)}function a9(e,t){return`${i9(e)}${n9[t]}`}function o9(e){let t=new URL(e.endpoint??a9(e.serverUrl,`authorize`));t.searchParams.set(`client_id`,e.clientId),t.searchParams.set(`response_type`,`code`),t.searchParams.set(`redirect_uri`,e.redirectUri),t.searchParams.set(`scope`,e.scope??`openid profile email`),t.searchParams.set(`state`,e.state),e.codeChallenge&&(t.searchParams.set(`code_challenge`,e.codeChallenge),t.searchParams.set(`code_challenge_method`,`S256`)),e.prompt&&t.searchParams.set(`prompt`,e.prompt);for(let[n,r]of Object.entries(e.params??{}))t.searchParams.set(n,r);return t}function s9(e){if(!e)return{};try{let t=e.split(`.`)[1];return t?JSON.parse(atob(t.replace(/-/g,`+`).replace(/_/g,`/`))):{}}catch{return{}}}var c9={chain:`evm`,scheme:`secp256k1-eip191`};async function l9(e){let t=e.trim().toLowerCase().replace(/^0x/,``);if(!/^[0-9a-f]{40}$/.test(t))throw Error(`not an Ethereum address: ${e}`);let{keccak_256:n}=await b(async()=>{let{keccak_256:e}=await import(`./sha3-DDKddPFc.js`);return{keccak_256:e}},[]),r=n(new TextEncoder().encode(t)),i=`0x`;for(let e=0;e<t.length;e++){let n=e%2==0?r[e>>1]>>4:r[e>>1]&15;i+=n>=8?t[e].toUpperCase():t[e]}return i}function u9(e,t,n){let{domain:r,uri:i,statement:a,nonce:o,issuedAt:s,expirationTime:c,version:l}=e;if(a?.includes(`
184
+ `))throw Error(`the sign-in statement must be one line`);let u=[`${r} wants you to sign in with your Ethereum account:`,t,``];return a&&u.push(a,``),u.push(`URI: ${i}`,`Version: ${l||`1`}`,`Chain ID: ${n}`,`Nonce: ${o}`,`Issued At: ${s}`),c&&u.push(`Expiration Time: ${c}`),u.join(`
185
+ `)}function d9(e){let t=`0x`;for(let n of new TextEncoder().encode(e))t+=n.toString(16).padStart(2,`0`);return t}function f9(e){let t=typeof e==`string`?Number.parseInt(e,16):typeof e==`number`?e:NaN;return Number.isSafeInteger(t)&&t>0?t:1}var p9=1500,m9=`hanzo_iam_`,h9=`${m9}state`,g9=`${m9}code_verifier`,_9=`${m9}access_token`,v9=`${m9}refresh_token`,y9=`${m9}id_token`,b9=`${m9}expires_at`,x9=`${m9}hold`,S9=`${m9}spent`,Uee=`${m9}refresh`,C9=`${m9}refresh_lease`,Wee=3e4,Gee=50,Kee=50,w9=`${g9}:`;function T9(e){return`${w9}${e}`}var qee=12;function Jee(e,t){return`${t}.${e}`}function E9(e){let t=e.indexOf(`.`);if(t>0){let n=e.slice(0,t);if(/^\d+$/.test(n))return{issuedAt:Number(n),codeVerifier:e.slice(t+1)}}return{issuedAt:0,codeVerifier:e}}var Yee=`hanzo_iam_login`,Xee=`hanzo-iam`;function Zee(e,t){let n=new URLSearchParams({code:t});e.state&&n.set(`state`,e.state);let r=e.redirectUri.includes(`?`)?`&`:`?`;return`${e.redirectUri}${r}${n.toString()}`}var Qee=9e5,D9=class extends Error{constructor(e,t){super(e),this.code=t,this.name=`Refused`}code},$ee=class extends Error{constructor(e,t=[],n){super(`this account signs in with a second factor`),this.directive=e,this.factors=t,this.request=n,this.name=`SecondFactor`}directive;factors;request},O9=class extends Error{constructor(e,t){super(`confirm the account's email address to finish signing in`),this.email=e,this.request=t,this.name=`EmailRequired`}email;request};function k9(e){return`recovery`in e?{recoveryCode:e.recovery}:{mfaType:e.type,passcode:e.passcode}}function ete(e){if(!Array.isArray(e))return[];let t=e.flatMap(e=>{let t=e??{};return typeof t.mfaType!=`string`||!t.mfaType?[]:[{type:t.mfaType,preferred:t.isPreferred===!0,remember:typeof t.mfaRememberInHours==`number`?t.mfaRememberInHours:0}]}),n=``;for(let e of t)(e.type===`email`||e.type===`sms`)&&(n===``||e.preferred)&&(n=e.type);return t.map(({type:e,remember:t})=>({type:e,sent:e===n,remember:t}))}var tte=class extends Error{constructor(){super(`no account holds this address; accept the terms to create one`),this.name=`SignupRequired`}},A9=class extends Error{constructor(e){super(`the session has ended: ${e}`),this.reason=e,this.name=`SessionEnded`}reason},j9=class extends Error{constructor(e,t){super(e),this.reason=t,this.name=`Unmatched`}reason};function M9(e){try{let t=e(),n=`${m9}probe`;return t.setItem(n,`1`),t.removeItem(n),t}catch{return null}}function nte(){return M9(()=>localStorage)??M9(()=>sessionStorage)}function rte(){let e=new Map;return{get length(){return e.size},clear:()=>e.clear(),getItem:t=>e.has(t)?e.get(t):null,key:t=>Array.from(e.keys())[t]??null,removeItem:t=>{e.delete(t)},setItem:(t,n)=>{e.set(t,String(n))}}}var N9=e=>new Promise(t=>setTimeout(t,e));function ite(){try{return typeof navigator<`u`&&navigator.locks?navigator.locks:null}catch{return null}}async function ate(e,t){let n=ite();if(n)return n.request(Uee,t);let r=t9(),i=()=>e.getItem(C9)?.startsWith(`${r}.`)===!0;for(;;){let t=e.getItem(C9);if((t?Number(t.slice(t.indexOf(`.`)+1)):0)>Date.now()){await N9(Kee);continue}if(e.setItem(C9,`${r}.${Date.now()+Wee}`),await N9(Gee),i())break}try{return await t()}finally{i()&&e.removeItem(C9)}}function ote(e){try{let t=JSON.parse(e);return{error:typeof t.error==`string`?t.error:``,description:typeof t.error_description==`string`?t.error_description:``}}catch{return{error:``,description:``}}}async function P9(e,t){let n=await e.json().catch(()=>({}));if(!e.ok||n.status===`error`)throw new D9(typeof n.msg==`string`&&n.msg?n.msg:`${t} (${e.status})`,typeof n.code==`string`?n.code:``);return n}async function F9(e,t){return(await P9(e,t)).data}var ste=class{config;storage;txStorage;redeemable;discoveryCache=null;callbackInFlight=null;held;refreshing=null;constructor(e){this.config=e;let t=nte();this.storage=e.storage??t??rte(),this.txStorage=t??this.storage,this.redeemable=t!==null||e.storage!==void 0,this.held=this.stored()}async getDiscovery(){if(this.discoveryCache)return this.discoveryCache;let e=i9(this.config.serverUrl);try{let t=await fetch(`${e}${n9.discovery}`,{headers:{Accept:`application/json`}});if(t.ok)return this.discoveryCache=await t.json(),this.discoveryCache}catch{}return this.discoveryCache={issuer:e,authorization_endpoint:a9(e,`authorize`),token_endpoint:a9(e,`token`),userinfo_endpoint:a9(e,`userinfo`),jwks_uri:a9(e,`jwks`),revocation_endpoint:a9(e,`revoke`),end_session_endpoint:a9(e,`logout`),response_types_supported:[`code`],grant_types_supported:[`authorization_code`,`refresh_token`],scopes_supported:[`openid`,`email`,`profile`]},this.discoveryCache}async tokenEndpoint(){return this.config.proxyBaseUrl?a9(this.config.proxyBaseUrl,`token`):(await this.getDiscovery()).token_endpoint}async userinfoEndpoint(){return this.config.proxyBaseUrl?a9(this.config.proxyBaseUrl,`userinfo`):(await this.getDiscovery()).userinfo_endpoint}async revocationEndpoint(){return this.config.proxyBaseUrl?a9(this.config.proxyBaseUrl,`revoke`):(await this.getDiscovery()).revocation_endpoint??a9(this.config.serverUrl,`revoke`)}async endSessionEndpoint(){return this.config.proxyBaseUrl?a9(this.config.proxyBaseUrl,`logout`):(await this.getDiscovery()).end_session_endpoint??a9(this.config.serverUrl,`logout`)}stashPkce(e,t){this.sweepStaleVerifiers(),this.txStorage.setItem(T9(e),Jee(t,Date.now())),this.txStorage.setItem(h9,e),this.txStorage.setItem(g9,t)}sweepStaleVerifiers(){let e=[];for(let t=this.txStorage.length-1;t>=0;t--){let n=this.txStorage.key(t);if(!n||!n.startsWith(w9))continue;let r=this.txStorage.getItem(n);e.push({key:n,issuedAt:r?E9(r).issuedAt:0})}e.sort((e,t)=>t.issuedAt-e.issuedAt);for(let t of e.slice(qee-1))this.txStorage.removeItem(t.key)}async buildAuthorizeUrl(e){if(!this.redeemable)throw Error(`@hanzo/iam: this browser keeps neither localStorage nor sessionStorage, so the PKCE verifier cannot outlive the redirect to IAM and the callback would fail. Call usableStorage() before starting a login to catch this on the page.`);let t=await this.getDiscovery(),{codeVerifier:n,codeChallenge:r}=await e9(),i=t9();return this.stashPkce(i,n),{url:o9({endpoint:t.authorization_endpoint,serverUrl:this.config.serverUrl,clientId:this.config.clientId,redirectUri:this.config.redirectUri,state:i,scope:this.config.scope,codeChallenge:r,prompt:e?.prompt,params:e?.additionalParams}),codeVerifier:n,state:i}}async signinRedirect(e){let{url:t}=await this.buildAuthorizeUrl(e);window.location.replace(t.toString())}async getSigninUrl(e){let{url:t}=await this.buildAuthorizeUrl(e);return t.toString()}asking=null;parties=new Map;ask(e){this.asking=e&&e.state?{...e,state:e.state}:null}get client(){return this.asking?.clientId??this.config.clientId}async party(e){if(e===this.config.clientId)return{application:this.config.application??this.config.clientId,organization:this.config.organization};let t=this.parties.get(e);if(t)return t;let n=new URL(`${i9(this.config.serverUrl)}${r9.authApplication}`);n.searchParams.set(`clientId`,e);let r=await F9(await fetch(n.toString(),{headers:{Accept:`application/json`}}),`could not read the application`)??{};if(typeof r.organization!=`string`||!r.organization)throw Error(`IAM did not name the application's organization`);let i={application:typeof r.name==`string`&&r.name?r.name:e,organization:r.organization};return this.parties.set(e,i),i}async own(){return this.asking??await this.mine()}async mine(){let{codeVerifier:e,codeChallenge:t}=await e9(),n=t9();return this.stashPkce(n,e),{clientId:this.config.clientId,redirectUri:this.config.redirectUri,scope:this.config.scope,state:n,codeChallenge:t,codeChallengeMethod:`S256`}}async credentialLogin(e){return this.post(e,await this.own())}async post(e,t,n){let r=this.config.proxyBaseUrl??this.config.serverUrl,i=new URL(n??`${i9(r)}${r9.login}`);i.searchParams.set(`clientId`,t.clientId),i.searchParams.set(`responseType`,`code`),i.searchParams.set(`redirectUri`,t.redirectUri),i.searchParams.set(`scope`,t.scope??`openid profile email`),t.state&&i.searchParams.set(`state`,t.state),t.nonce&&i.searchParams.set(`nonce`,t.nonce),t.prompt&&i.searchParams.set(`prompt`,t.prompt),t.loginHint&&i.searchParams.set(`login_hint`,t.loginHint),i.searchParams.set(`type`,`code`),t.codeChallenge&&(i.searchParams.set(`code_challenge`,t.codeChallenge),i.searchParams.set(`code_challenge_method`,t.codeChallengeMethod??`S256`));let a=await fetch(i.toString(),{method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`},credentials:`include`,body:JSON.stringify({type:`code`,...await this.party(t.clientId),autoSignin:!0,...e})}),o;try{o=await P9(a,`sign-in failed`)}catch(e){throw e instanceof D9&&e.code===`login_required`&&this.release(),e}let s=o.data;if(s===`NextMfa`||s===`RequiredMfa`)throw s===`NextMfa`&&this.hold(),new $ee(s,ete(o.data2),t);if(s===`RequiredEmail`){this.hold();let e=o.data2??{};throw new O9(typeof e.email==`string`?e.email:``,t)}if(s===`SignupRequired`)throw new tte;if(typeof s!=`string`||s.length===0)throw Error(`IAM did not return an authorization code`);return this.release(),Zee(t,s)}hold(){this.txStorage.setItem(x9,String(Date.now()+Qee))}release(){this.txStorage.removeItem(x9)}holding(){return Number(this.txStorage.getItem(x9)??0)>Date.now()}async resume(e){if(this.holding())return null;try{return await this.credentialLogin(e?{loginHint:e}:{})}catch{return null}}loginWithPassword(e,t){return this.credentialLogin({username:e,password:t,signinMethod:`Password`})}loginWithCode(e,t){let n=e.includes(`@`);return this.credentialLogin({username:e,code:t,signinMethod:`Verification code`,...n?{email:e}:{phone:e}})}createAccountWithCode(e,t,n){return this.credentialLogin({username:e,code:t,signinMethod:`Verification code`,email:e,create:!0,terms:n.terms,aup:n.aup})}async verifyFactor(e,t,n=!1){if(!e.request)throw Error(`this second factor names no sign-in to finish`);try{return await this.post({...k9(t),enableMfaRemember:n},e.request)}catch(e){throw e instanceof D9&&this.release(),e}}async finishFederation(e){let t=this.config.proxyBaseUrl??this.config.serverUrl,n=(await P9(await fetch(`${i9(t)}${r9.federationMfa}`,{method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`},credentials:`include`,body:JSON.stringify(k9(e))}),`the sign-in could not be finished`)).data;if(typeof n!=`string`||!n)throw Error(`IAM did not say where the sign-in goes`);return n}confirmEmail(e,t){return this.post({passcode:t},e.request)}async changeEmail(e,t){try{await this.post({email:t},e.request)}catch(e){if(e instanceof O9)return e;throw e}throw Error(`IAM granted the sign-in without confirming the address`)}async resetPassword(e,t,n){await F9(await fetch(`${i9(this.config.serverUrl)}${r9.password}`,{method:`PUT`,headers:{"Content-Type":`application/json`,Accept:`application/json`},body:JSON.stringify({organization:this.config.organization,username:e,code:t,password:n})}),`could not set the password`)}async acceptInvite(e,t,n){let r=await this.getValidAccessToken();if(!r)throw new D9(`please sign in first`,`login_required`);let i=await F9(await fetch(`${i9(this.config.serverUrl)}${r9.accept}`,{method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`,Authorization:`Bearer ${r}`},body:JSON.stringify({owner:e,code:t,...n?{emailCode:n}:{}})}),`could not join the organization`)??{};if(i.joined!==!0)throw Error(`IAM did not join the organization`);return typeof i.org==`string`&&i.org?i.org:e}async acceptTerms(e){let t=await this.getValidAccessToken();if(!t)throw Error(`No valid access token — user must log in`);let n=this.config.proxyBaseUrl??this.config.serverUrl;await F9(await fetch(`${i9(n)}${r9.terms}`,{method:`PUT`,headers:{"Content-Type":`application/json`,Accept:`application/json`,Authorization:`Bearer ${t}`},body:JSON.stringify({terms:e.terms,aup:e.aup})}),`could not record the acceptance`)}async addAddress(e,t){let n=await this.getValidAccessToken();if(!n)throw new D9(`please sign in first`,`login_required`);let r=this.config.proxyBaseUrl??this.config.serverUrl,i=await F9(await fetch(`${i9(r)}${r9.address}`,{method:`PUT`,headers:{"Content-Type":`application/json`,Accept:`application/json`,Authorization:`Bearer ${n}`},body:JSON.stringify({clientId:this.client,address:e,code:t})}),`could not add the address`)??{};return{email:typeof i.email==`string`?i.email:``,phone:typeof i.phone==`string`?i.phone:``}}async sendLoginCode(e){let t=e.includes(`@`),n=this.config.proxyBaseUrl??this.config.serverUrl;await F9(await fetch(`${i9(n)}${r9.sendCode}`,{method:`POST`,headers:{"Content-Type":`application/x-www-form-urlencoded`,Accept:`application/json`},body:new URLSearchParams({applicationId:`admin/${(await this.party(this.client)).application}`,dest:e,type:t?`email`:`phone`}).toString()}),`could not send code`)}async signup(e){let t=this.config.proxyBaseUrl??this.config.serverUrl,n=new URL(`${i9(t)}${r9.signup}`);return n.searchParams.set(`clientId`,this.config.clientId),await F9(await fetch(n.toString(),{method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`},body:JSON.stringify({application:this.config.application??this.config.clientId,clientId:this.config.clientId,organization:this.config.organization,email:e.email,password:e.password,code:e.code,...e.name?{name:e.name}:{},...e.terms?{terms:e.terms.terms,aup:e.terms.aup}:{}})}),`sign-up failed`),this.loginWithPassword(e.email,e.password)}async methods(){let e=new URL(`${i9(this.config.serverUrl)}${r9.authMethods}`);e.searchParams.set(`clientId`,this.client);let t=await F9(await fetch(e.toString(),{headers:{Accept:`application/json`}}),`could not read the sign-in methods`)??{},n=Array.isArray(t.oauth)?t.oauth:[];return{password:t.password===!0,code:t.code===!0,signup:t.signup===!0,wallet:t.web3===!0&&(!Array.isArray(t.web3Chains)||t.web3Chains.includes(c9.chain)),address:t.address===!0,providers:n.filter(e=>typeof e.name==`string`&&typeof e.type==`string`).map(e=>({name:e.name,type:e.type}))}}async identify(e){let t=this.config.proxyBaseUrl??this.config.serverUrl,n=await F9(await fetch(`${i9(t)}${r9.authIdentifier}`,{method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`},body:JSON.stringify({clientId:this.client,identifier:e})}),`could not look up the address`)??{};return{account:n.account===!0,password:n.password===!0}}async handleCallback(e){let t=new URL(e??window.location.href),n=t.searchParams.get(`error`);if(n)throw this.isOwnAttempt(t.searchParams.get(`state`))?new D9(`OAuth error: ${t.searchParams.get(`error_description`)??n}`,n):new j9(`OAuth error on a sign-in this browser did not start. Restart sign-in.`,`foreign`);let r=t.searchParams.get(`code`);if(!r)throw new j9(`Missing authorization code in callback URL`,`empty`);let i=this.callbackInFlight;if(i&&i.code===r)return i.promise;let a=this.exchangeCode(t,r);return this.callbackInFlight={code:r,promise:a},a.catch(()=>{this.callbackInFlight?.promise===a&&(this.callbackInFlight=null)}),a}isOwnAttempt(e){if(!e)return!1;let t=T9(e);return this.txStorage.getItem(t)??this.storage.getItem(t)?!0:(this.txStorage.getItem(h9)??this.storage.getItem(h9))===e}async exchangeCode(e,t){let n=e.searchParams.get(`state`),r=n?T9(n):null,i=r?this.txStorage.getItem(r)??this.storage.getItem(r):null,a=i?E9(i).codeVerifier:null;if(a&&r)this.txStorage.removeItem(r),this.storage.removeItem(r),(this.txStorage.getItem(h9)===n||this.storage.getItem(h9)===n)&&(this.txStorage.removeItem(h9),this.txStorage.removeItem(g9),this.storage.removeItem(h9),this.storage.removeItem(g9));else{if(n&&this.spent().includes(n))throw new j9(`This sign-in already finished in this browser.`,`spent`);let e=this.txStorage.getItem(h9)??this.storage.getItem(h9);if(!e||n!==e)throw new j9(`OAuth state mismatch — stale, concurrent, or forged login. Restart sign-in.`,`foreign`);if(a=this.txStorage.getItem(g9)??this.storage.getItem(g9),!a)throw Error(`Missing PKCE code verifier — start sign-in via signinRedirect() or the embedded credential login.`);this.txStorage.removeItem(h9),this.txStorage.removeItem(g9),this.storage.removeItem(h9),this.storage.removeItem(g9)}let o=new URLSearchParams({grant_type:`authorization_code`,client_id:this.config.clientId,code:t,redirect_uri:this.config.redirectUri,code_verifier:a}),s=await this.tokenEndpoint(),c=await fetch(s,{method:`POST`,headers:{"Content-Type":`application/x-www-form-urlencoded`},body:o.toString()});if(!c.ok){let e=await c.text().catch(()=>``);throw Error(`Token exchange failed (${c.status}): ${e}`)}let l=await c.json();return this.storeTokens(l),n&&this.spend(n),I9(l)}spent(){try{let e=JSON.parse(this.txStorage.getItem(S9)??`[]`);return Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}catch{return[]}}spend(e){let t=this.spent().filter(t=>t!==e);t.push(e),this.txStorage.setItem(S9,JSON.stringify(t.slice(-12)))}refreshAccessToken(){return this.refreshing??=ate(this.storage,()=>this.refreshHeld()).finally(()=>{this.refreshing=null}),this.refreshing}async refreshHeld(){let e=this.stored(),t=e.access!==this.held.access||e.refresh!==this.held.refresh;if(e.access&&t&&!this.isTokenExpired()){this.held=e;let t=this.getExpiresAt();return{accessToken:e.access,refreshToken:e.refresh??void 0,idToken:this.getIdToken()??void 0,expiresIn:t===null?void 0:Math.max(0,Math.floor((t-Date.now())/1e3)),tokenType:`Bearer`}}if(!e.refresh)throw this.clearTokens(),new A9(`no refresh token is stored`);let n=await fetch(await this.tokenEndpoint(),{method:`POST`,headers:{"Content-Type":`application/x-www-form-urlencoded`},body:new URLSearchParams({grant_type:`refresh_token`,client_id:this.config.clientId,refresh_token:e.refresh}).toString()});if(!n.ok){let t=await n.text().catch(()=>``),{error:r,description:i}=ote(t);throw r===`invalid_grant`?(this.storage.getItem(v9)===e.refresh&&this.clearTokens(),new A9(i||r)):Error(`Token refresh failed (${n.status}): ${t}`)}let r=await n.json();return this.storeTokens(r),I9(r)}stored(){return{access:this.storage.getItem(_9),refresh:this.storage.getItem(v9)}}async signinPopup(e){let{url:t,state:n}=await this.buildAuthorizeUrl({additionalParams:e?.additionalParams}),r=e?.width??600,i=e?.height??700,a=window.screenX+(window.outerWidth-r)/2,o=window.screenY+(window.outerHeight-i)/2,s=new URL(this.config.redirectUri,window.location.href).origin;return new Promise((c,l)=>{let u=window.open(t.toString(),Yee,`width=${r},height=${i},left=${a},top=${o},menubar=no,toolbar=no`);if(!u){l(Error(`Failed to open login popup — blocked by browser?`));return}let d=!1,f=null,p=()=>{if(!d){d=!0,window.removeEventListener(`message`,m),clearInterval(h),clearTimeout(g),f&&clearTimeout(f);try{u.closed||u.close()}catch{}}},m=e=>{if(d||e.origin!==s)return;let t=e.data;if(!t||typeof t!=`object`||t.source!==Xee)return;if(typeof t.state!=`string`||t.state!==n){p(),l(Error(`OAuth state mismatch — possible CSRF (popup)`));return}if(t.error){p(),l(Error(`OAuth error: ${t.error}`));return}if(typeof t.code!=`string`||t.code.length===0){p(),l(Error(`Login popup returned no authorization code`));return}let r=t.code,i=t.state;p();let a=this.config.redirectUri.includes(`?`)?`&`:`?`,o=`${this.config.redirectUri}${a}code=${encodeURIComponent(r)}&state=${encodeURIComponent(i)}`;this.handleCallback(o).then(c,l)};window.addEventListener(`message`,m);let h=setInterval(()=>{d||!u.closed||f||(f=setTimeout(()=>{d||(p(),l(Error(`Login popup was closed before completing`)))},1e3))},300),g=setTimeout(()=>{d||(p(),l(Error(`Login popup timed out`)))},e?.timeoutMs??3e5)})}async loginWithWallet(e){let t=e?.provider??globalThis.ethereum;if(!t||typeof t.request!=`function`)throw Error(`No EIP-1193 wallet provider found (window.ethereum).`);let n=await t.request({method:`eth_requestAccounts`}),r=Array.isArray(n)?n[0]:void 0;if(typeof r!=`string`||!r)throw Error(`Wallet did not return an address`);let i=await l9(r),a=f9(await t.request({method:`eth_chainId`}).catch(()=>void 0)),o=await this.own(),s=i9(this.config.serverUrl),c=new URL(`${s}${r9.web3Nonce}`);c.searchParams.set(`chain`,c9.chain),c.searchParams.set(`address`,i),c.searchParams.set(`clientId`,o.clientId);let l=await F9(await fetch(c.toString(),{headers:{Accept:`application/json`},credentials:`include`}),`could not start the wallet sign-in`);if(!l||typeof l.nonce!=`string`||typeof l.domain!=`string`)throw Error(`IAM did not return a sign-in challenge`);let u=u9(l,i,a),d=await t.request({method:`personal_sign`,params:[d9(u),i]});if(typeof d!=`string`||!d)throw Error(`Wallet did not return a signature`);return this.post({...c9,address:i,message:u,signature:d,clientId:o.clientId,redirectUri:o.redirectUri,scope:o.scope??`openid profile email`,state:o.state,nonce:o.nonce,codeChallenge:o.codeChallenge,codeChallengeMethod:o.codeChallengeMethod},o,`${s}${r9.web3Verify}`)}storeTokens(e){if(this.storage.setItem(_9,e.access_token),e.refresh_token&&this.storage.setItem(v9,e.refresh_token),e.id_token&&this.storage.setItem(y9,e.id_token),e.expires_in){let t=Date.now()+e.expires_in*1e3;this.storage.setItem(b9,String(t))}else{let t=s9(e.access_token).exp;typeof t==`number`&&Number.isFinite(t)&&this.storage.setItem(b9,String(t*1e3))}this.held=this.stored()}getAccessToken(){return this.storage.getItem(_9)}getRefreshToken(){return this.storage.getItem(v9)}getIdToken(){return this.storage.getItem(y9)}getExpiresAt(){let e=this.storage.getItem(b9);if(!e)return null;let t=Number(e);return Number.isFinite(t)?t:null}isTokenExpired(){let e=this.storage.getItem(b9);return e?Date.now()>=Number(e):!1}async getValidAccessToken(){let e=this.getAccessToken();if(e&&!this.isTokenExpired())return e;if(this.getRefreshToken())try{return(await this.refreshAccessToken()).accessToken}catch{return null}return null}clearTokens(){this.storage.removeItem(_9),this.storage.removeItem(v9),this.storage.removeItem(y9),this.storage.removeItem(b9),this.held={access:null,refresh:null}}async logout(){let e=this.storage.getItem(_9),t=this.storage.getItem(v9),n=this.storage.getItem(y9);this.clearTokens();let r=await Promise.race([(async()=>(await this.revoke(t,`refresh_token`,e),await this.revoke(e,`access_token`,e),this.endSessionEndpoint()))(),new Promise(e=>setTimeout(()=>e(a9(this.config.serverUrl,`logout`)),p9))]),i=new URL(r);n&&i.searchParams.set(`id_token_hint`,n),i.searchParams.set(`client_id`,this.config.clientId),this.config.postLogoutRedirectUri&&i.searchParams.set(`post_logout_redirect_uri`,this.config.postLogoutRedirectUri),window.location.href=i.toString()}async end(){let e=this.storage.getItem(_9),t=this.storage.getItem(v9),n=this.storage.getItem(y9);this.clearTokens();let r=this.config.proxyBaseUrl??this.config.serverUrl,i=new URLSearchParams({client_id:this.config.clientId});n&&i.set(`id_token_hint`,n),await Promise.race([(async()=>{await this.revoke(t,`refresh_token`,e,a9(r,`revoke`)),await this.revoke(e,`access_token`,e,a9(r,`revoke`)),await fetch(a9(r,`logout`),{method:`POST`,credentials:`include`,redirect:`manual`,headers:{"Content-Type":`application/x-www-form-urlencoded`},body:i.toString()}).catch(()=>void 0)})(),new Promise(e=>setTimeout(e,p9))])}async revoke(e,t,n,r){if(e)try{await fetch(r??await this.revocationEndpoint(),{method:`POST`,credentials:`include`,headers:{"Content-Type":`application/x-www-form-urlencoded`,...n?{Authorization:`Bearer ${n}`}:{}},body:new URLSearchParams({token:e,token_type_hint:t,client_id:this.config.clientId}).toString()})}catch{}}async getUserInfo(){let e=await this.getValidAccessToken();if(!e)throw Error(`No valid access token — user must log in`);let t=await this.userinfoEndpoint(),n=await fetch(t,{headers:{Authorization:`Bearer ${e}`}});if(!n.ok)throw Error(`Userinfo fetch failed (${n.status})`);return await n.json()}async getUser(){if(!await this.getValidAccessToken())return null;let e=await this.getUserInfo();return{sub:e.sub??``,email:e.email,name:e.name,givenName:e.given_name,familyName:e.family_name,phoneNumber:e.phone_number,emailVerified:e.email_verified,picture:e.picture,owner:e.owner}}};function I9(e){return{accessToken:e.access_token,refreshToken:e.refresh_token,idToken:e.id_token,expiresIn:e.expires_in,tokenType:e.token_type,scope:e.scope}}var L9=2147483647,cte=3e4,R9=(0,V.createContext)(null);R9.displayName=`IamContext`;var lte=`hanzo_iam_current_org`,ute=`hanzo_iam_current_project`;function dte(e){let{config:t,autoInit:n=!0,onAuthChange:r,children:i}=e,a=(0,V.useMemo)(()=>new ste(t),[t.serverUrl,t.clientId,t.redirectUri]),[o,s]=(0,V.useState)(null),[c,l]=(0,V.useState)(!1),[u,d]=(0,V.useState)(n),[f,p]=(0,V.useState)(a.getAccessToken()),[m,h]=(0,V.useState)(null),g=(0,V.useRef)(null),_=(0,V.useCallback)(()=>{if(g.current&&clearTimeout(g.current),a.isTokenExpired())return;let e=a.getExpiresAt();if(e===null)return;let t=async()=>{try{let e=await a.refreshAccessToken();p(e.accessToken),_()}catch(e){if(e instanceof A9){l(!1),s(null),p(null);return}g.current=setTimeout(t,cte)}},n=e-Date.now()-6e4;if(n>L9){g.current=setTimeout(_,L9);return}if(n<=0){t();return}g.current=setTimeout(t,n)},[a]);(0,V.useEffect)(()=>{if(!n){d(!1);return}let e=!1;return(async()=>{try{let t=await a.getValidAccessToken();if(e)return;if(t){p(t),l(!0);try{let t=await a.getUserInfo();e||s(t)}catch{}_(),r?.(!0)}else r?.(!1)}catch(t){e||(h(t instanceof Error?t:Error(String(t))),r?.(!1))}finally{e||d(!1)}})(),()=>{e=!0}},[a,n]),(0,V.useEffect)(()=>()=>{g.current&&clearTimeout(g.current)},[]);let v=(0,V.useCallback)(async e=>{p(e.accessToken),l(!0);try{let e=await a.getUserInfo();s(e)}catch{}_(),r?.(!0)},[a,_,r]),y=(0,V.useCallback)(async e=>{h(null),await a.signinRedirect(e)},[a]),b=(0,V.useCallback)(async e=>{h(null);try{let t=await a.signinPopup(e);await v(t)}catch(e){let t=e instanceof Error?e:Error(String(e));throw h(t),t}},[a,v]),x=(0,V.useCallback)(async e=>{h(null);try{let t=await a.handleCallback(e);return await v(t),t}catch(e){let t=e instanceof Error?e:Error(String(e));throw h(t),t}},[a,v]),S=(0,V.useCallback)(async()=>{g.current&&clearTimeout(g.current);try{localStorage.removeItem(lte),localStorage.removeItem(ute)}catch{}try{await a.logout()}catch{a.clearTokens(),s(null),l(!1),p(null),h(null),r?.(!1)}},[a,r]),C=(0,V.useMemo)(()=>({sdk:a,config:t,user:o,isAuthenticated:c,isLoading:u,accessToken:f,login:y,loginPopup:b,handleCallback:x,logout:S,error:m}),[a,t,o,c,u,f,y,b,x,S,m]);return(0,V.createElement)(R9.Provider,{value:C},i)}function z9(){let e=(0,V.useContext)(R9);if(!e)throw Error(`useIam() must be used within an <IamProvider>`);return e}function fte(){let{sdk:e,accessToken:t,isAuthenticated:n}=z9(),r=(0,V.useCallback)(async()=>{try{return await e.getValidAccessToken()}catch{return null}},[e]);return{token:t,isValid:n&&!!t&&!e.isTokenExpired(),refresh:r}}var pte=`#181717`,mte=V.forwardRef(function({title:e=`GitHub`,color:t=`currentColor`,size:n=24,...r},i){return t==="default"&&(t=pte),(0,H.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:n,height:n,fill:t,viewBox:`0 0 24 24`,ref:i,...r,children:[(0,H.jsx)(`title`,{children:e}),(0,H.jsx)(`path`,{d:`M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12`})]})}),hte=`#4285F4`,gte=V.forwardRef(function({title:e=`Google`,color:t=`currentColor`,size:n=24,...r},i){return t==="default"&&(t=hte),(0,H.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:n,height:n,fill:t,viewBox:`0 0 24 24`,ref:i,...r,children:[(0,H.jsx)(`title`,{children:e}),(0,H.jsx)(`path`,{d:`M12.48 10.92v3.28h7.84c-.24 1.84-.853 3.187-1.787 4.133-1.147 1.147-2.933 2.4-6.053 2.4-4.827 0-8.6-3.893-8.6-8.72s3.773-8.72 8.6-8.72c2.6 0 4.507 1.027 5.907 2.347l2.307-2.307C18.747 1.44 16.133 0 12.48 0 5.867 0 .307 5.387.307 12s5.56 12 12.173 12c3.573 0 6.267-1.173 8.373-3.36 2.16-2.16 2.84-5.213 2.84-7.667 0-.76-.053-1.467-.173-2.053H12.48z`})]})}),B9=`https://hanzo.ai`;function _te(e,t,n=B9){let r=new URL(e).searchParams,i=n.replace(/\/+$/,``);switch(t.kind){case`provider`:return r.set(`provider`,t.provider),`${i}/v1/iam/oauth/authorize?${r}`;case`email`:return r.set(`login_hint`,t.email),`${i}/login?${r}`;case`another`:return r.set(`prompt`,`select_account`),`${i}/login?${r}`;case`signup`:return`${i}/signup?${r}`;case`login`:return`${i}/login?${r}`}}function vte(e){let t=e.trim();return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)?t:null}var yte={google:`Google`,github:`GitHub`},V9=`[data-slot="signin-panel"]`,H9=`var(--popover,var(--panel))`,U9=`var(--border,var(--edge))`,W9=`var(--border-strong,var(--bound))`,G9=`var(--foreground,var(--ink))`,K9=`var(--muted-foreground,var(--quiet))`,bte=`${V9} [data-signin-body]{container-type:inline-size;display:flex;flex-direction:column;gap:10px;width:100%}${V9} [data-signin-pair]{display:grid;grid-template-columns:1fr 1fr;gap:10px;width:100%}@container (max-width:379.98px){${V9} [data-signin-pair]{grid-template-columns:1fr}}${V9} [data-signin-btn]{box-sizing:border-box;display:flex;align-items:center;justify-content:center;gap:9px;width:100%;height:46px;margin:0;padding:0 14px;border-radius:14px;border:1px solid ${U9};background:${H9};color:${G9};font-family:var(--font-sans,Zen,system-ui,sans-serif);font-size:14px;font-weight:500;line-height:1;white-space:nowrap;cursor:pointer;box-shadow:0 1px 2px rgba(0,0,0,.04);transition:transform .2s cubic-bezier(.16,1,.3,1),border-color .2s,background-color .2s,opacity .2s}${V9} [data-signin-btn]:hover:not(:disabled){border-color:${W9};transform:translateY(-2px)}${V9} [data-signin-btn]:active:not(:disabled){transform:scale(.98)}${V9} [data-signin-btn]:disabled{opacity:.55;cursor:not-allowed}${V9} [data-signin-btn][data-solid]{background:${G9};color:var(--background);border-color:${G9}}${V9} [data-signin-btn][data-solid]:hover:not(:disabled){opacity:.92;transform:none}${V9} [data-signin-btn] svg{flex-shrink:0}${V9} [data-signin-or]{display:flex;align-items:center;gap:12px;font-size:12.5px;color:${K9}}${V9} [data-signin-or]::before,${V9} [data-signin-or]::after{content:'';flex:1;height:1px;background:${U9}}${V9} [data-signin-form]{display:flex;flex-direction:column;gap:10px;margin:0}${V9} [data-signin-field]{box-sizing:border-box;width:100%;height:46px;margin:0;padding:0 16px;border-radius:14px;border:1px solid ${U9};background-color:${H9};color:${G9};font-family:var(--font-sans,Zen,system-ui,sans-serif);font-size:14px;outline:none}${V9} [data-signin-field]::placeholder{color:${K9}}${V9} [data-signin-field]:focus-visible{border-color:${W9};box-shadow:0 0 0 2px var(--ring,${W9})}${V9} [data-signin-wrong]{margin:0;font-size:13px;color:var(--destructive,#e5484d)}${V9} [data-signin-quiet]{margin:0;font-size:13px;color:${K9}}${V9} [data-signin-quiet] button{padding:0;border:0;background:none;color:${G9};font:inherit;cursor:pointer}${V9} [data-signin-quiet] button:hover:not(:disabled){text-decoration:underline}${V9} [data-signin-terms]{margin:0;max-width:400px;text-align:center;font-size:12px;line-height:18px;color:${K9}}${V9} [data-signin-terms] a{color:${G9};text-decoration:none}${V9} [data-signin-terms] a:hover{text-decoration:underline;text-underline-offset:2px}`;function xte(e){return e.request?(0,H.jsx)(q9,{...e,mint:e.request}):(0,H.jsx)(Ste,{...e})}function Ste(e){let{sdk:t}=z9();return(0,H.jsx)(q9,{...e,mint:e=>t.getSigninUrl(e)})}function q9({title:e,line:t,providers:n=[`google`,`github`],signin:r=B9,signup:i=!1,termsHref:a=`https://hanzo.ai/terms`,privacyHref:o=`https://hanzo.ai/privacy`,authorize:s=e=>e,track:c,mint:l,background:u=`$background`,borderColor:d=`$borderColor`,bare:f=!1}){let{t:p}=Ye(),[m,h]=(0,V.useState)(``),[g,_]=(0,V.useState)(!1),[v,y]=(0,V.useState)(null),[b,x]=(0,V.useState)(null);async function S(e,t,n){x(null),y(e),c?.(`signin_started`,{method:e});try{let e=await l(n?{additionalParams:{login_hint:n}}:void 0);window.location.assign(s(_te(e,t,r)))}catch(e){x(e instanceof Error&&e.message?e.message:`Signing in could not start. Try again.`),y(null)}}function C(e){e.preventDefault();let t=vte(m);if(!t){x(`Enter your email address.`);return}S(`email`,{kind:`email`,email:t},t)}let w=f?{}:{bg:u,borderWidth:1,borderColor:d,rounded:`$6`,p:`$6`},T=p(v===`email`?`One moment…`:`Continue with email`);return(0,H.jsxs)(F,{"data-slot":`signin-panel`,"data-surface":f?`bare`:`card`,width:`100%`,maxW:f?400:464,items:`center`,gap:`$3`,...w,children:[(0,H.jsx)(`style`,{dangerouslySetInnerHTML:{__html:bte}}),e?(0,H.jsx)(Qi,{render:`h1`,size:`$8`,fontWeight:`500`,color:`$ink`,m:0,text:`center`,children:e}):null,t?(0,H.jsx)(Zi,{size:`$3`,color:`$quiet`,m:0,text:`center`,maxW:360,children:t}):null,(0,H.jsxs)(`div`,{"data-signin-body":``,style:e||t?{marginTop:12}:void 0,children:[n.length?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`div`,{"data-signin-pair":``,children:n.map(e=>(0,H.jsxs)(`button`,{"data-signin-btn":``,type:`button`,disabled:v!==null,onClick:()=>void S(e,{kind:`provider`,provider:e}),children:[e===`google`?(0,H.jsx)(gte,{size:17,"aria-hidden":!0}):(0,H.jsx)(mte,{size:17,"aria-hidden":!0}),p(`Continue with {provider}`,{provider:yte[e]})]},e))}),(0,H.jsx)(`div`,{"data-signin-or":``,children:p(`or`)})]}):null,g?(0,H.jsxs)(`form`,{"data-signin-form":``,onSubmit:C,noValidate:!0,children:[(0,H.jsx)(`input`,{id:`hanzo-signin-email`,"data-signin-field":``,type:`email`,name:`email`,autoComplete:`username`,"aria-label":p(`Email`),"aria-invalid":b?!0:void 0,value:m,onChange:e=>h(e.target.value),placeholder:`you@company.com`,autoFocus:!0}),b?(0,H.jsx)(`p`,{"data-signin-wrong":``,role:`alert`,children:p(b)}):null,(0,H.jsx)(`button`,{"data-signin-btn":``,"data-solid":``,type:`submit`,disabled:v!==null,children:T})]}):(0,H.jsxs)(H.Fragment,{children:[b?(0,H.jsx)(`p`,{"data-signin-wrong":``,role:`alert`,children:p(b)}):null,(0,H.jsx)(`button`,{"data-signin-btn":``,"data-solid":``,type:`button`,disabled:v!==null,onClick:()=>{x(null),_(!0)},children:T})]})]}),i?(0,H.jsxs)(`p`,{"data-signin-quiet":``,children:[`${p(`New to Hanzo?`)} `,(0,H.jsx)(`button`,{type:`button`,disabled:v!==null,onClick:()=>void S(`signup`,{kind:`signup`}),children:p(`Create account`)})]}):null,(0,H.jsx)(`p`,{"data-signin-terms":``,children:p(`By continuing, you agree to Hanzo's {terms} and {privacy}.`,{terms:(0,H.jsx)(`a`,{href:a,children:p(`Terms`)}),privacy:(0,H.jsx)(`a`,{href:o,children:p(`Privacy Policy`)})})})]})}var Cte=()=>{let{land:e}=CX(),[t,n]=(0,V.useState)(null);return(0,V.useEffect)(()=>{e().then(e=>window.location.replace(e)).catch(e=>n(e instanceof Error?e.message:String(e)))},[e]),(0,H.jsx)(F,{flex:1,items:`center`,justify:`center`,gap:F3.inset,bg:X.ground,children:t?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(o,{size:Z.body,color:X.alert,children:t}),(0,H.jsx)(o,{size:Z.small,color:X.mute,onPress:()=>window.location.replace(`/login`),children:`Try again`})]}):(0,H.jsx)($w,{})})},wte=520,Tte=[`general`,`engineering`,`revenue`,`support`],J9=`engineering`,Ete=()=>{let[e,t]=(0,V.useState)(!0);return(0,H.jsx)(`div`,{"aria-hidden":`true`,style:{width:`100%`,maxWidth:780},children:(0,H.jsxs)(F,{width:`100%`,rounded:Q.panel,bg:X.panel,borderWidth:1,borderColor:X.rule,overflow:`hidden`,onLayout:e=>t(e.nativeEvent.layout.width>=wte),children:[(0,H.jsxs)(P,{px:F3.inset,py:F3.tight,gap:F3.tight,items:`center`,borderBottomWidth:1,borderColor:X.rule,children:[[0,1,2].map(e=>(0,H.jsx)(F,{width:8,height:8,rounded:Q.pill,bg:X.rule},e)),(0,H.jsx)(o,{size:Z.chip,color:X.dim,ml:F3.tight,children:`hanzo.team`})]}),(0,H.jsxs)(P,{children:[e?(0,H.jsxs)(F,{width:168,p:F3.inset,gap:F3.tight,borderRightWidth:1,borderColor:X.rule,children:[(0,H.jsx)(o,{...I3,size:Z.chip,color:X.dim,children:`Channels`}),Tte.map(e=>(0,H.jsx)(P,{px:F3.tight,py:4,rounded:Q.field,bg:e===J9?X.card:void 0,children:(0,H.jsxs)(o,{size:Z.small,color:e===J9?X.ink:X.mute,children:[`# `,e]})},e))]}):null,(0,H.jsxs)(F,{flex:1,minW:0,p:F3.inset,gap:F3.inset,children:[(0,H.jsxs)(o,{size:Z.small,color:X.ink,fontWeight:`600`,children:[`# `,J9]}),(0,H.jsx)(Y9,{who:`Ana`,text:`@dev refunds are missing from the checkout webhook. Can you take it?`}),(0,H.jsx)(Y9,{who:`Dev`,agent:!0,text:`On it. Fixed the handler and opened a pull request: 14 of 14 checks pass.`,children:(0,H.jsxs)(P,{mt:F3.tight,p:F3.tight,gap:F3.tight,items:`center`,rounded:Q.card,bg:X.card,borderWidth:1,borderColor:X.rule,children:[(0,H.jsx)(F,{width:8,height:8,rounded:Q.pill,bg:O3.doing}),(0,H.jsx)(o,{size:Z.chip,color:X.dim,children:`TEAM-142`}),(0,H.jsx)(o,{size:Z.small,color:X.ink,flex:1,minW:0,numberOfLines:1,children:`Refunds missing from checkout webhook`}),(0,H.jsx)(o,{size:Z.chip,color:X.mute,children:`In review`})]})}),(0,H.jsxs)(P,{items:`center`,gap:F3.tight,children:[(0,H.jsx)($w,{size:16}),(0,H.jsx)(o,{size:Z.small,color:X.dim,children:`Dev is deploying the fix…`})]})]})]})]})})},Y9=({who:e,agent:t=!1,text:n,children:r})=>(0,H.jsxs)(P,{gap:F3.tight,items:`flex-start`,children:[(0,H.jsx)(F,{width:26,height:26,rounded:Q.pill,items:`center`,justify:`center`,style:j3(e),shrink:0,children:(0,H.jsx)(o,{size:Z.chip,fontWeight:`700`,style:{color:j3(e).color},children:e[0]})}),(0,H.jsxs)(F,{flex:1,minW:0,gap:2,children:[(0,H.jsxs)(P,{items:`center`,gap:F3.tight,children:[(0,H.jsx)(o,{size:Z.small,color:X.ink,fontWeight:`600`,children:e}),t?(0,H.jsx)(P,{px:6,py:1,rounded:Q.field,borderWidth:1,borderColor:X.rule,children:(0,H.jsx)(o,{size:Z.chip,color:X.mute,children:`Agent`})}):null]}),(0,H.jsx)(o,{size:Z.small,color:X.mute,children:n}),r]})]}),Dte=[[`Channels`,`Your people and your agents, in one conversation.`],[`Agents`,`Hand an agent the work; it reports back when it is done.`],[`Issue boards`,`Every task from backlog to done, on one board.`]],Ote=()=>(0,H.jsx)(P,{width:`100%`,maxW:780,gap:F3.wide,flexWrap:`wrap`,children:Dte.map(([e,t])=>(0,H.jsxs)(F,{flex:1,minW:200,gap:4,children:[(0,H.jsx)(o,{size:Z.body,color:X.ink,fontWeight:`600`,children:e}),(0,H.jsx)(o,{size:Z.small,color:X.mute,children:t})]},e))}),kte=`https://pay.hanzo.ai/cart`,Ate=(e,t)=>{let n=new URL(kte);return new URLSearchParams(e).forEach((e,t)=>n.searchParams.set(t,e)),n.searchParams.get(`plan`)||n.searchParams.set(`plan`,`team`),n.searchParams.set(`returnUrl`,`${t}/`),n.toString()},jte=`/auth/callback`,$=`https://hanzo.ai`,X9=`https://docs.hanzo.ai`,Mte=`https://github.com/hanzoai`,Nte=`https://status.hanzo.ai`,Pte=`https://hanzo.agency`,Fte=`https://hanzo.university`,Ite=[{label:`Features`,href:`https://hanzo.ai/team`},{label:`Docs`,href:`https://docs.hanzo.ai`},{label:`Hanzo Bot`,href:`https://hanzo.bot`},{label:`Hanzo App`,href:`https://hanzo.app`},{label:`API Platform`,href:`https://platform.hanzo.ai`},{label:`Hanzo AI`,href:`https://hanzo.ai`}],Lte=[{id:`damon`,name:`Damon Motorcycles`,logo:`/logos/customers/damon-motorcycles.svg`,href:`${$}/customers/damon-motorcycles`},{id:`kanoa`,name:`KANOA`,logo:`/logos/customers/kanoa.png`,href:`${$}/customers/kanoa`},{id:`skully`,name:`SKULLY`,logo:`/logos/customers/skully.png`,href:`${$}/customers#skully`},{id:`bellabeat`,name:`Bellabeat`,logo:`/logos/customers/bellabeat.svg`,href:`${$}/customers#bellabeat`},{id:`stoned`,name:`STONED Audio`,logo:`/logos/customers/stoned.svg`,href:`${$}/customers#stoned`},{id:`unikrn`,name:`Unikrn`,logo:`/logos/customers/unikoin-gold.svg`,href:`${$}/customers#unikoin-gold`},{id:`arca`,name:`Arca`,logo:`/logos/customers/arca.png`,href:`${$}/customers#arca`},{id:`casper`,name:`Casper Labs`,logo:`/logos/customers/casper-blockchain.svg`,href:`${$}/customers#casper-blockchain`},{id:`triller`,name:`Triller`,logo:`/logos/customers/trillerfest.png`,href:`${$}/customers#trillerfest`},{id:`cover`,name:`Cover Build`,logo:`/logos/customers/cover-build.svg`,href:`${$}/customers#cover-build`},{id:`myle`,name:`Myle Tap`,logo:`/logos/customers/myle-tap.png`,href:`${$}/customers#myle-tap`},{id:`keek`,name:`Personas Social`,logo:`/logos/customers/keek-social.svg`,href:`${$}/customers#keek-social`}],Rte=[[{title:`Products`,href:`${$}/products`,links:[{label:`Hanzo App`,href:`https://hanzo.app`},{label:`Hanzo Dev`,href:`${$}/dev`},{label:`Hanzo Bot`,href:`https://hanzo.bot`},{label:`Hanzo Team`,href:`https://hanzo.team`},{label:`Hanzo Science`,href:`${$}/science`},{label:`Hanzo Security`,href:`${$}/security`},{label:`Download app`,href:`${$}/download`},{label:`Pricing`,href:`${$}/pricing`},{label:`Log in`,href:`/login`}]},{title:`Capabilities`,links:[{label:`Hanzo Design`,href:`${$}/design`},{label:`MCP`,href:`${$}/mcp`},{label:`Skills`,href:`${$}/skills`},{label:`Integrations`,href:`${$}/integrations`},{label:`Hanzo CLI`,href:`${$}/cli`}]},{title:`Extensions`,links:[{label:`Hanzo in Chrome`,href:`${$}/extension`},{label:`Desktop app`,href:`${$}/desktop`},{label:`Hanzo IDE`,href:`${$}/ide`}]},{title:`Models`,href:`${$}/models`,links:[{label:`All models`,href:`${$}/models`},{label:`Zen`,href:`${$}/zen`},{label:`Enso`,href:`${$}/enso`},{label:`Kai`,href:`${$}/kai`},{label:`Video · Koma`,href:`${$}/koma`},{label:`Images · Iro`,href:`${$}/iro`},{label:`3D · Mori`,href:`${$}/mori`},{label:`Voice · Koe`,href:`${$}/koe`},{label:`Benchmarks`,href:`${$}/benchmarks`}]}],[{title:`Enterprise`,href:`${$}/enterprise`,links:[{label:`Overview`,href:`${$}/enterprise`},{label:`All solutions`,href:`${$}/solutions`},{label:`Customer stories`,href:`${$}/customers`},{label:`Contact sales`,href:`${$}/contact-sales`}]},{title:`Teams`,href:`${$}/solutions`,links:[{label:`Engineering`,href:`${$}/solutions/engineering`},{label:`Operations`,href:`${$}/solutions/operations`},{label:`Finance`,href:`${$}/solutions/finance`},{label:`Data`,href:`${$}/solutions/data`},{label:`Sales`,href:`${$}/solutions/sales`},{label:`Marketing`,href:`${$}/solutions/marketing`},{label:`Design`,href:`${$}/solutions/design`}]},{title:`Industries`,href:`${$}/solutions`,links:[{label:`Cybersecurity`,href:`${$}/solutions/cybersecurity`},{label:`Financial services`,href:`${$}/solutions/financial-services`},{label:`Government`,href:`${$}/solutions/government`},{label:`Healthcare`,href:`${$}/solutions/healthcare`},{label:`Education`,href:`${$}/solutions/education`},{label:`Law`,href:`${$}/solutions/law`},{label:`Retail`,href:`${$}/solutions/retail`}]},{title:`Programs`,href:`${$}/startups`,links:[{label:`Startups`,href:`${$}/startups`},{label:`Affiliate program`,href:`${$}/affiliate`},{label:`Referral program`,href:`${$}/referral`},{label:`Reserved tier`,href:`${$}/solutions/reserved`},{label:`OSS grants`,href:`${$}/open-source`}]}],[{title:`Developers`,href:X9,links:[{label:`Developer docs`,href:X9},{label:`API reference`,href:`${X9}/docs/openapi/`},{label:`Quickstart`,href:`${X9}/docs/quickstart/`},{label:`SDKs`,href:`${$}/sdks`},{label:`Console`,href:`https://platform.hanzo.ai`},{label:`GitHub`,href:Mte}]},{title:`API Platform`,href:`${$}/platform`,links:[{label:`Overview`,href:`${$}/platform`},{label:`API keys`,href:`https://platform.hanzo.ai/settings/organization/keys`},{label:`Gateway`,href:`${$}/gateway`},{label:`Agents`,href:`${$}/agents`},{label:`Playground`,href:`${$}/playground`}]},{title:`Cloud`,href:`${$}/products`,links:[{label:`Base`,href:`${$}/base`},{label:`Machines`,href:`${$}/machines`},{label:`Search`,href:`${$}/search`},{label:`Datastore`,href:`${$}/datastore`},{label:`Memory`,href:`${$}/products/memory`},{label:`Realtime`,href:`${$}/realtime`},{label:`Observability`,href:`${$}/o11y`},{label:`Insights`,href:`${$}/insights`},{label:`Commerce`,href:`${$}/commerce`}]},{title:`Help and security`,links:[{label:`Availability`,href:Nte},{label:`Help center`,href:`${$}/support`},{label:`Security and compliance`,href:`${$}/security`},{label:`Trust & transparency`,href:`${$}/trust`}]}],[{title:`Company`,href:`${$}/about`,links:[{label:`Hanzo AI`,href:`${$}/about`},{label:`Careers`,href:`${$}/careers`},{label:`Philosophy`,href:`${$}/philosophy`},{label:`Research`,href:`${$}/research`},{label:`News`,href:`${$}/press`},{label:`Investors`,href:`${$}/investors`},{label:`Brand`,href:`${$}/brand`},{label:`Open source`,href:`${$}/open-source`},{label:`Contact`,href:`${$}/contact`}]},{title:`Resources`,href:`${$}/learn`,links:[{label:`Blog`,href:`${$}/blog`},{label:`Guides`,href:`${X9}/docs/guides/`},{label:`Cookbook`,href:`${X9}/docs/guides/cookbook/`},{label:`Hanzo University`,href:Fte},{label:`Hanzo Agency`,href:Pte},{label:`Cost calculator`,href:`${$}/calculator`}]},{title:`Terms and policies`,href:`${$}/legal`,links:[{label:`Privacy choices`,href:`${$}/privacy#choices`},{label:`Privacy policy`,href:`${$}/privacy`},{label:`Terms of service`,href:`${$}/terms`},{label:`Usage policy`,href:`${$}/aup`},{label:`Cookie policy`,href:`${$}/cookies`},{label:`Other policies`,href:`${$}/legal`}]}]],zte=[{label:`Discord`,href:`https://discord.gg/XthHQQj`},{label:`Telegram`,href:`https://t.me/hanzoai`},{label:`X`,href:`https://x.com/hanzoai`},{label:`GitHub`,href:`https://github.com/hanzoai`},{label:`LinkedIn`,href:`https://linkedin.com/company/hanzo-ai`},{label:`Facebook`,href:`https://facebook.com/hanzoinc`},{label:`Bluesky`,href:`https://bsky.app/profile/hanzoai.bsky.social`},{label:`Reddit`,href:`https://www.reddit.com/r/HanzoAI/`},{label:`TikTok`,href:`https://www.tiktok.com/@hanzoinc`},{label:`Instagram`,href:`https://www.instagram.com/hanzoinc`}];function Bte(){let e=(0,V.useRef)(null);return(0,V.useEffect)(()=>{let t=e.current,n=t?.parentElement;if(!t||!n)return;let r=t.getContext(`2d`);if(!r)return;let i=.14,a=0,o=0,s=1,c=0,l={x:-9999,y:-9999},u={x:-9999,y:-9999},d=()=>{let e=n.getBoundingClientRect();s=Math.min(window.devicePixelRatio||1,2),a=e.width,o=e.height,t.width=Math.max(1,Math.round(a*s)),t.height=Math.max(1,Math.round(o*s)),r.setTransform(s,0,0,s,0,0)},f=e=>{let n=(e||0)*.001;r.clearRect(0,0,a,o),r.fillStyle=getComputedStyle(t).color;let i=Math.ceil(a/14),s=Math.ceil(o/14),c=(a-(i-1)*14)*.5,u=(o-(s-1)*14)*.5,d=a*.5,f=o*.45,p=a*.56,m=o*.58,h=l.x,g=l.y,_=h>-999,v=a*(.5+.28*Math.cos(n*.42)),y=o*(.45+.22*Math.sin(n*.31)),b=a*(.5+.32*Math.sin(n*.27+1.8)),x=o*(.48+.24*Math.cos(n*.36+.9)),S=Math.max(a,o)*.28,C=1/(S*S);for(let e=0;e<s;e++){let t=u+e*14,a=(t-f)/m;for(let o=0;o<i;o++){let i=c+o*14,s=(i-d)/p,l=Math.hypot(s,a),u=Math.max(0,Math.min(1,(l-.16)/.88)),f=Math.max(0,1-Math.max(0,l-.72)*1.45),m=.5+.5*Math.sin(o*.18+e*.14-n*1.15+Math.cos(o*.09-e*.11+n*.65)*1.3),S=(i-v)*(i-v)+(t-y)*(t-y),w=(i-b)*(i-b)+(t-x)*(t-x),T=Math.exp(-S*C)*.65+Math.exp(-w*C)*.55,E=(.7+u*2.1+m*.42+T*.95)*(.45+f*.55),D=(.045+u*.18+m*.035+T*.11)*f;if(_){let e=i-h,n=t-g,r=e*e+n*n;if(r<36100){let e=1-Math.sqrt(r)/190,t=e*e*(3-2*e);E+=t*1.9,D=Math.min(.68,D+t*.34)}}D<.01||E<.3||(r.globalAlpha=D,r.beginPath(),r.arc(i,t,E,0,Math.PI*2),r.fill())}}r.globalAlpha=1},p=e=>{l.x+=(u.x-l.x)*i,l.y+=(u.y-l.y)*i,f(e),c=requestAnimationFrame(p)},m=e=>{let t=n.getBoundingClientRect();u.x=e.clientX-t.left,u.y=e.clientY-t.top,l.x<-999&&(l.x=u.x,l.y=u.y)},h=()=>{u.x=-9999,u.y=-9999};d(),c=requestAnimationFrame(p);let g=new ResizeObserver(()=>d());return g.observe(n),n.addEventListener(`pointermove`,m,{passive:!0}),n.addEventListener(`pointerleave`,h,{passive:!0}),()=>{cancelAnimationFrame(c),g.disconnect(),n.removeEventListener(`pointermove`,m),n.removeEventListener(`pointerleave`,h)}},[]),(0,H.jsx)(`canvas`,{ref:e,"aria-hidden":`true`,style:{position:`absolute`,inset:0,width:`100%`,height:`100%`,pointerEvents:`none`,zIndex:0,color:`var(--foreground)`}})}var Vte=()=>{let{standing:e,depart:t,request:n}=CX(),[r,i]=(0,V.useState)(null);if(e===`in`)return null;let a=(e,n)=>{i(e),t(n).catch(()=>i(null))},s=r!==null;return(0,H.jsxs)(F,{flex:1,bg:X.ground,overflow:`scroll`,children:[(0,H.jsxs)(P,{width:`100%`,minH:68,px:F3.wide,py:F3.tight,items:`center`,justify:`space-between`,borderBottomWidth:1,borderColor:X.rule,bg:X.panel,style:{position:`sticky`,top:0,zIndex:40},children:[(0,H.jsx)(P,{items:`center`,gap:F3.tight,cursor:`pointer`,onPress:()=>window.location.assign(`/`),children:(0,H.jsx)(o,{size:Z.row,color:X.ink,fontWeight:`600`,children:JJ.title})}),(0,H.jsxs)(P,{items:`center`,gap:F3.tight,flexWrap:`wrap`,children:[Ite.map(e=>(0,H.jsx)(kS,{size:`sm`,chromeless:!0,rounded:Q.pill,onPress:()=>window.location.assign(e.href),children:(0,H.jsx)(o,{size:Z.small,color:X.mute,children:e.label})},e.label)),(0,H.jsx)(kS,{size:`sm`,variant:`outline`,rounded:Q.field,onPress:()=>window.location.assign(`https://hanzo.ai/contact-sales`),children:(0,H.jsx)(o,{size:Z.small,color:X.ink,children:`Contact sales`})}),(0,H.jsx)(kS,{size:`sm`,chromeless:!0,rounded:Q.field,disabled:s,onPress:()=>a(`nav`,`login`),children:(0,H.jsx)(o,{size:Z.small,color:X.ink,children:`Log in`})}),(0,H.jsx)(kS,{size:`sm`,rounded:Q.field,disabled:s,onPress:()=>a(`open`,`login`),children:(0,H.jsx)(o,{size:Z.small,color:X.ink,fontWeight:`600`,children:((e,t)=>r===e?`One moment…`:t)(`open`,`Open Hanzo Team`)})})]})]}),(0,H.jsxs)(`main`,{className:`hz-signin`,children:[(0,H.jsx)(Bte,{}),(0,H.jsxs)(`div`,{className:`hz-signin-row`,children:[(0,H.jsx)(`div`,{className:`hz-signin-copy`,children:(0,H.jsx)(xte,{title:`Sign in to Hanzo ${JJ.title}`,line:`AI cockpit, live streams, issue boards, channels, and bots for your team.`,request:n,termsHref:`${$}/terms`,privacyHref:`${$}/privacy`})}),(0,H.jsxs)(`div`,{className:`hz-signin-figure`,children:[(0,H.jsx)(Ete,{}),(0,H.jsx)(Ote,{})]})]})]}),(0,H.jsxs)(F,{width:`100%`,items:`center`,px:F3.wide,py:F3.edge,gap:F3.inset,bg:X.ground,children:[(0,H.jsx)(o,{size:Z.small,color:X.mute,fontWeight:`500`,style:{textAlign:`center`},children:`Companies building with the Hanzo API`}),(0,H.jsx)(`div`,{className:`hz-mq-view`,children:(0,H.jsx)(`div`,{className:`hz-mq-track`,children:[0,1].map(e=>Lte.map(t=>{let n=e>0;return(0,H.jsx)(`a`,{href:t.href,className:`hz-logo`,"aria-label":n?void 0:t.name,"aria-hidden":n||void 0,tabIndex:n?-1:void 0,target:`_blank`,rel:`noopener noreferrer`,title:t.name,children:(0,H.jsx)(`img`,{src:t.logo,alt:n?``:t.name,loading:`lazy`})},`${e}-${t.id}`)}))})})]}),(0,H.jsx)(F,{width:`100%`,borderTopWidth:1,borderColor:X.rule,bg:X.panel,px:F3.wide,py:F3.edge,children:(0,H.jsxs)(F,{width:`100%`,maxW:1240,mx:`auto`,gap:F3.edge,children:[(0,H.jsxs)(P,{justify:`space-between`,items:`flex-start`,gap:F3.edge,flexWrap:`wrap`,children:[(0,H.jsx)(F,{minW:160,gap:F3.tight,children:(0,H.jsxs)(P,{items:`center`,gap:F3.tight,cursor:`pointer`,onPress:()=>window.location.assign($),children:[(0,H.jsx)(F,{width:22,height:22,rounded:Q.field,bg:X.ink,items:`center`,justify:`center`,children:(0,H.jsx)(o,{size:Z.small,color:X.ground,fontWeight:`700`,children:`H`})}),(0,H.jsx)(o,{size:Z.row,color:X.ink,fontWeight:`600`,children:`Hanzo`})]})}),(0,H.jsx)(P,{gap:F3.edge,flexWrap:`wrap`,grow:1,justify:`space-between`,children:Rte.map((e,t)=>(0,H.jsx)(F,{minW:150,gap:F3.inset,children:e.map(e=>(0,H.jsxs)(F,{gap:F3.tight,children:[(0,H.jsx)(o,{size:Z.small,color:X.ink,fontWeight:`600`,cursor:e.href?`pointer`:void 0,onPress:e.href?()=>window.location.assign(e.href):void 0,style:{lineHeight:`1.35`},children:e.title}),(0,H.jsx)(F,{style:{gap:`2.5px`},children:e.links.map(e=>(0,H.jsx)(o,{size:Z.small,color:X.mute,cursor:`pointer`,onPress:()=>window.location.assign(e.href),style:{lineHeight:`1.32`},children:e.label},e.href+e.label))})]},e.title))},t))})]}),(0,H.jsx)(P,{pt:F3.inset,borderTopWidth:1,borderColor:X.rule,items:`center`,flexWrap:`wrap`,style:{columnGap:`24px`,rowGap:`8px`},children:zte.map(e=>(0,H.jsxs)(o,{size:Z.small,color:X.mute,cursor:`pointer`,onPress:()=>window.location.assign(e.href),style:{lineHeight:`1.35`},children:[e.label,` ↗`]},e.label))}),(0,H.jsxs)(P,{pt:F3.inset,borderTopWidth:1,borderColor:X.rule,items:`center`,justify:`space-between`,flexWrap:`wrap`,gap:F3.tight,children:[(0,H.jsx)(o,{size:Z.chip,color:X.dim,children:`© 2026 Hanzo AI, Inc. All rights reserved.`}),(0,H.jsx)(P,{gap:F3.inset,flexWrap:`wrap`,children:[[`Terms`,`${$}/terms`],[`Privacy`,`${$}/privacy`],[`Usage policy`,`${$}/aup`],[`Privacy choices`,`${$}/privacy#choices`]].map(([e,t])=>(0,H.jsx)(o,{size:Z.chip,color:X.dim,cursor:`pointer`,onPress:()=>window.location.assign(t),children:e},e))})]})]})})]})},Hte=({children:e})=>{let{standing:t}=CX(),{standing:n,refusal:r,enrolment:i}=fZ();return window.location.pathname===jte?(0,H.jsx)(Cte,{}):window.location.pathname===`/start`?(0,H.jsx)(Ute,{to:Ate(window.location.search,window.location.origin)}):t===`unknown`?(0,H.jsx)(Z9,{}):t===`out`?(0,H.jsx)(Vte,{}):n===`stranger`?(0,H.jsx)(Q9,{title:`One more step`,body:`Set up your workspace to see your projects.`,children:(0,H.jsx)(kS,{onPress:()=>window.location.assign(i),children:`Set up`})}):n===`refused`?(0,H.jsx)(Q9,{title:`Your workspace is not answering`,body:r?.message??``,children:(0,H.jsx)(kS,{onPress:()=>window.location.reload(),children:`Try again`})}):n===`unknown`?(0,H.jsx)(Z9,{}):(0,H.jsx)(H.Fragment,{children:e})},Ute=({to:e})=>((0,V.useEffect)(()=>window.location.replace(e),[e]),(0,H.jsx)(Z9,{})),Z9=()=>(0,H.jsx)(F,{flex:1,items:`center`,justify:`center`,bg:X.ground,children:(0,H.jsx)($w,{})}),Q9=({title:e,body:t,children:n})=>(0,H.jsxs)(F,{flex:1,items:`center`,justify:`center`,gap:F3.inset,bg:X.ground,p:F3.wide,children:[(0,H.jsx)(o,{size:Z.title,color:X.ink,children:e}),t?(0,H.jsx)(o,{size:Z.body,color:X.mute,children:t}):null,n]}),Wte=()=>Zn(H7),Gte=200,Kte=()=>(0,H.jsxs)(fJ,{children:[(0,H.jsx)(Yx,{delay:Gte,children:(0,H.jsx)(PX,{children:(0,H.jsxs)(hZ,{children:[(0,H.jsx)(K6,{}),(0,H.jsx)(Hte,{children:(0,H.jsx)(ni,{children:(0,H.jsx)(Wte,{})})})]})})}),(0,H.jsx)(OE,{theme:`dark`,position:`top-center`}),(0,H.jsx)(zJ,{floating:!1})]});S({token:()=>lX().getAccessToken()??void 0});var $9=document.getElementById(`root`);if(!$9)throw Error(`no #root`);(0,ht.createRoot)($9).render((0,H.jsx)(V.StrictMode,{children:(0,H.jsx)(Kte,{})}));export{Jv as C,U as S,li as T,$b as _,fZ as a,Oy as b,FC as c,cw as d,lw as f,Zb as g,Yb as h,f$ as i,VC as l,kS as m,z9 as n,cX as o,LC as p,fte as r,tT as s,dte as t,GC as u,W as v,Kp as w,hy as x,Rb as y};
186
+ //# sourceMappingURL=index-C6xlLqXz.js.map