agent-afk 5.333.0 → 5.335.0

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 (143) hide show
  1. package/dist/agent/daemon/handoff-store.d.ts +1 -1
  2. package/dist/agent/daemon/lease-store.d.ts +1 -0
  3. package/dist/agent/daemon.read-body.d.ts +2 -0
  4. package/dist/agent/memory/index.d.ts +2 -1
  5. package/dist/agent/session/model-slots.d.ts +4 -4
  6. package/dist/agent/session/model-slots.hints.d.ts +1 -1
  7. package/dist/agent/session/model-slots.output-override.d.ts +1 -0
  8. package/dist/agent/session/preamble-strip.d.ts +1 -0
  9. package/dist/agent/session-control/index.d.ts +1 -1
  10. package/dist/agent/session-control/preferences.d.ts +1 -0
  11. package/dist/agent/session-ledger-project.d.ts +3 -0
  12. package/dist/agent/session-ledger-segments.d.ts +39 -0
  13. package/dist/agent/session-ledger.d.ts +2 -0
  14. package/dist/cli/_lib/stream-renderer-contexts.d.ts +2 -0
  15. package/dist/cli/_lib/stream-renderer-lifecycle.d.ts +2 -0
  16. package/dist/cli/_lib/stream-renderer-options.d.ts +2 -0
  17. package/dist/cli/_lib/stream-renderer-process.d.ts +2 -0
  18. package/dist/cli/_lib/stream-renderer-source.d.ts +1 -0
  19. package/dist/cli/_lib/stream-renderer-subagent.d.ts +2 -0
  20. package/dist/cli/_lib/stream-renderer.d.ts +1 -0
  21. package/dist/cli/commands/interactive/shared.d.ts +1 -0
  22. package/dist/cli/commands/interactive/tool-lane.d.ts +4 -0
  23. package/dist/cli/commands/interactive/tool-lane.flush.d.ts +1 -0
  24. package/dist/cli/commands/interactive/tool-lane.queries.d.ts +1 -0
  25. package/dist/cli/config/types.d.ts +1 -0
  26. package/dist/cli/input/file-picker-predicate.d.ts +1 -0
  27. package/dist/cli/input/trigger.d.ts +1 -0
  28. package/dist/cli/session-store.d.ts +2 -0
  29. package/dist/cli/slash/commands/afk-md/targets.d.ts +1 -1
  30. package/dist/cli/slash/types.d.ts +2 -0
  31. package/dist/cli.mjs +476 -476
  32. package/dist/config/env.d.ts +49 -28
  33. package/dist/config/env.model-tiers.d.ts +19 -28
  34. package/dist/config/env.model-tiers.suggest.d.ts +31 -0
  35. package/dist/index.mjs +374 -374
  36. package/dist/insights/html.d.ts +1 -1
  37. package/dist/insights/html.helpers.d.ts +3 -0
  38. package/dist/telegram.mjs +395 -395
  39. package/dist/utils/git.d.ts +1 -0
  40. package/dist/web-server/elicitation-web.d.ts +1 -0
  41. package/dist/web-server/live-broker.d.ts +28 -0
  42. package/dist/web-server/model-catalog-groups.d.ts +19 -0
  43. package/dist/web-server/routes.commands.d.ts +1 -0
  44. package/dist/web-server/routes.commands.watchdog.d.ts +8 -0
  45. package/dist/web-server/routes.d.ts +1 -1
  46. package/dist/web-server/routes.models.d.ts +1 -1
  47. package/dist/web-server/routes.rewind.d.ts +3 -0
  48. package/dist/web-server/server.live.d.ts +10 -0
  49. package/dist/web-server/server.schedules.d.ts +2 -0
  50. package/dist/web-server/session-name-head.d.ts +6 -0
  51. package/dist/web-server/session-owner.autosave.d.ts +6 -1
  52. package/dist/web-server/session-owner.d.ts +5 -0
  53. package/dist/web-server/session-owner.mcp-warm.d.ts +6 -0
  54. package/dist/web-server/session-owner.projection.d.ts +16 -1
  55. package/dist/web-server/session-owner.wiring.d.ts +1 -0
  56. package/dist/web-server/session-source.d.ts +1 -0
  57. package/dist/web-server/shared/command-wire.d.ts +1 -0
  58. package/dist/web-server/shared/ledger-adapter.d.ts +7 -0
  59. package/dist/web-server/shared/live-wire.d.ts +24 -0
  60. package/dist/web-server/stream-route.d.ts +2 -1
  61. package/dist/web-ui-assets/assets/{angular-html-G2cKI8s3.js → angular-html-yx0ARBV3.js} +1 -1
  62. package/dist/web-ui-assets/assets/{angular-ts-Dbg6n4y8.js → angular-ts-DbFIkaOk.js} +1 -1
  63. package/dist/web-ui-assets/assets/{apl-D64VMgkV.js → apl-CD3Z8FMh.js} +1 -1
  64. package/dist/web-ui-assets/assets/{astro-Cl3AHcKf.js → astro-_a1Mawx8.js} +1 -1
  65. package/dist/web-ui-assets/assets/{blade-BaqLOt4E.js → blade-BpqE2nqD.js} +1 -1
  66. package/dist/web-ui-assets/assets/{c-CdaCEkA3.js → c-BPK0oKQW.js} +1 -1
  67. package/dist/web-ui-assets/assets/{chapel-jSWw1lD8.js → chapel-Bdq2RXcm.js} +1 -1
  68. package/dist/web-ui-assets/assets/{cobol-B3FAur3H.js → cobol-Dm910cGp.js} +1 -1
  69. package/dist/web-ui-assets/assets/{coffee-C_YNnHKr.js → coffee-D0vVlahm.js} +1 -1
  70. package/dist/web-ui-assets/assets/{cpp-k2DmhdJn.js → cpp-L5jZfNPu.js} +1 -1
  71. package/dist/web-ui-assets/assets/{crystal-D0ZAEmEr.js → crystal-j6TmYh5b.js} +1 -1
  72. package/dist/web-ui-assets/assets/{css-D7ctuinT.js → css-jMy9cwl8.js} +1 -1
  73. package/dist/web-ui-assets/assets/dist-tY8VZg98.js +153 -0
  74. package/dist/web-ui-assets/assets/{edge-BT_sLNqb.js → edge-Dj8o1mwq.js} +1 -1
  75. package/dist/web-ui-assets/assets/{elixir-BY-WcCQZ.js → elixir-BP3db5sG.js} +1 -1
  76. package/dist/web-ui-assets/assets/{elm-Bh9xmoSq.js → elm-BhK1MGZm.js} +1 -1
  77. package/dist/web-ui-assets/assets/{erb-D0HA_2hb.js → erb-DCs8M-ji.js} +1 -1
  78. package/dist/web-ui-assets/assets/{git-rebase-phN5MgDL.js → git-rebase-B7V_76Wb.js} +1 -1
  79. package/dist/web-ui-assets/assets/{glimmer-js-p7ASjwLN.js → glimmer-js-L962E3Ig.js} +1 -1
  80. package/dist/web-ui-assets/assets/{glimmer-ts-Dnn2i1-n.js → glimmer-ts-DMEUTFCF.js} +1 -1
  81. package/dist/web-ui-assets/assets/{glsl-kr7Sct5s.js → glsl-D7xM7bV0.js} +1 -1
  82. package/dist/web-ui-assets/assets/{graphql-GY0lkyG6.js → graphql-DNHZHaBi.js} +1 -1
  83. package/dist/web-ui-assets/assets/{hack-CSnhnTh1.js → hack-DjNXRCZb.js} +1 -1
  84. package/dist/web-ui-assets/assets/{haml-COJeGn3e.js → haml-DHPU_GTS.js} +1 -1
  85. package/dist/web-ui-assets/assets/{handlebars-DcGpplin.js → handlebars-CuDHPgaM.js} +1 -1
  86. package/dist/web-ui-assets/assets/{html-C_-nF5jA.js → html-DRVHoA1v.js} +1 -1
  87. package/dist/web-ui-assets/assets/{html-derivative-65GvQF5H.js → html-derivative-CLaG6N9I.js} +1 -1
  88. package/dist/web-ui-assets/assets/{http-CR-Y2vaj.js → http-DtmIjGvn.js} +1 -1
  89. package/dist/web-ui-assets/assets/{hurl-CT655Xcj.js → hurl-ohOUf-q6.js} +1 -1
  90. package/dist/web-ui-assets/assets/index-C6Xq_kK1.css +2 -0
  91. package/dist/web-ui-assets/assets/index-CyKNpQEH.js +94 -0
  92. package/dist/web-ui-assets/assets/{java-BfXOkHiS.js → java-D6tUjozH.js} +1 -1
  93. package/dist/web-ui-assets/assets/{javascript-bUx3f4E6.js → javascript-BczpLPbL.js} +1 -1
  94. package/dist/web-ui-assets/assets/{jinja-CeQJOvgo.js → jinja-CJc-aNgE.js} +1 -1
  95. package/dist/web-ui-assets/assets/{jison-CDdJF1T3.js → jison-C8TO-j1d.js} +1 -1
  96. package/dist/web-ui-assets/assets/{json-CNUeAnq3.js → json-qk5ZgNN2.js} +1 -1
  97. package/dist/web-ui-assets/assets/{jsx-jBPPj-2P.js → jsx-D9_7dCIy.js} +1 -1
  98. package/dist/web-ui-assets/assets/{julia-Ffo4oiNj.js → julia-Cs6e3o3f.js} +1 -1
  99. package/dist/web-ui-assets/assets/{just-WoqMhLPN.js → just-CsQqEC-Y.js} +1 -1
  100. package/dist/web-ui-assets/assets/{latex-DvTPJWnQ.js → latex-CxhRTd_v.js} +1 -1
  101. package/dist/web-ui-assets/assets/{liquid-BENhv3uZ.js → liquid-DC7vMnn1.js} +1 -1
  102. package/dist/web-ui-assets/assets/{lua-BuWrCSeh.js → lua-BLG60kKD.js} +1 -1
  103. package/dist/web-ui-assets/assets/{marko-C57EDP9e.js → marko-BAQaEaSE.js} +1 -1
  104. package/dist/web-ui-assets/assets/{mdc-DTwJqrEn.js → mdc-BR9-pBt-.js} +1 -1
  105. package/dist/web-ui-assets/assets/{nginx-btcrmW_3.js → nginx-D7r_KRDk.js} +1 -1
  106. package/dist/web-ui-assets/assets/{nim-0qpAss6M.js → nim-BM_9isyN.js} +1 -1
  107. package/dist/web-ui-assets/assets/{org-ChOz5H9b.js → org-DyBPQPnx.js} +1 -1
  108. package/dist/web-ui-assets/assets/{perl-DkGTCu5B.js → perl-BurvpJIf.js} +1 -1
  109. package/dist/web-ui-assets/assets/{php-BXq74HRi.js → php-NIIyTcOe.js} +1 -1
  110. package/dist/web-ui-assets/assets/{pug-VBly3Hrp.js → pug-ChWmTCw3.js} +1 -1
  111. package/dist/web-ui-assets/assets/{qml-By9BHV0E.js → qml-C4_tPV2a.js} +1 -1
  112. package/dist/web-ui-assets/assets/{r-wD-EKGhX.js → r-B3YNzF2C.js} +1 -1
  113. package/dist/web-ui-assets/assets/{razor-C7ua423D.js → razor-C1Y1xIpO.js} +1 -1
  114. package/dist/web-ui-assets/assets/{regexp-CGw_3plU.js → regexp-BNtP4mWg.js} +1 -1
  115. package/dist/web-ui-assets/assets/{rst-DYI5KAID.js → rst-CKxT7FdB.js} +1 -1
  116. package/dist/web-ui-assets/assets/{ruby-RXd2KUyd.js → ruby-Bro1R1oy.js} +1 -1
  117. package/dist/web-ui-assets/assets/{sas-BI_hDd-V.js → sas-DO8zMqBK.js} +1 -1
  118. package/dist/web-ui-assets/assets/{scss-BE93nrLY.js → scss-D-rLZprn.js} +1 -1
  119. package/dist/web-ui-assets/assets/{shellscript-Dm8eyzbm.js → shellscript-1hHXsJy9.js} +1 -1
  120. package/dist/web-ui-assets/assets/{shellsession-Dl0JKALg.js → shellsession-CT_DBlAY.js} +1 -1
  121. package/dist/web-ui-assets/assets/{soy-CKNrhHpK.js → soy-doWs1mXa.js} +1 -1
  122. package/dist/web-ui-assets/assets/{sql-CZNswWPI.js → sql-plJTsAQH.js} +1 -1
  123. package/dist/web-ui-assets/assets/{stata-DjmrbOUz.js → stata-B284Mk_I.js} +1 -1
  124. package/dist/web-ui-assets/assets/{surrealql-DqqZx4Ju.js → surrealql-CFyzkNbT.js} +1 -1
  125. package/dist/web-ui-assets/assets/{svelte-Chj9K27Z.js → svelte-Bw98z8h2.js} +1 -1
  126. package/dist/web-ui-assets/assets/{templ-BTLqJqYd.js → templ-DDvpKOEP.js} +1 -1
  127. package/dist/web-ui-assets/assets/{tex-CglhV978.js → tex-BY4qkrJH.js} +1 -1
  128. package/dist/web-ui-assets/assets/{ts-tags-79bKA5Ly.js → ts-tags-D33UpUyJ.js} +1 -1
  129. package/dist/web-ui-assets/assets/{tsx-CXyhTYi7.js → tsx-C58vom55.js} +1 -1
  130. package/dist/web-ui-assets/assets/{twig-BrJR9DgZ.js → twig-CEejFdE2.js} +1 -1
  131. package/dist/web-ui-assets/assets/{typescript-BR4aBNWU.js → typescript-DiH5Dvqw.js} +1 -1
  132. package/dist/web-ui-assets/assets/{typst-CAGgcUBq.js → typst-DR7AC2lC.js} +1 -1
  133. package/dist/web-ui-assets/assets/{vue-B5T6PehN.js → vue-DOJhe2Gn.js} +1 -1
  134. package/dist/web-ui-assets/assets/{vue-html-CE1dGrtN.js → vue-html-FL5rtnCl.js} +1 -1
  135. package/dist/web-ui-assets/assets/{vue-vine-Cc40SVDS.js → vue-vine-BpRsuFph.js} +1 -1
  136. package/dist/web-ui-assets/assets/{xml-CAOCSYKi.js → xml-CY2oPwco.js} +1 -1
  137. package/dist/web-ui-assets/assets/{xsl-fa6Mwxua.js → xsl-DWbbchMc.js} +1 -1
  138. package/dist/web-ui-assets/assets/{yaml-CyELmWi2.js → yaml-v3gSCIuY.js} +1 -1
  139. package/dist/web-ui-assets/index.html +2 -2
  140. package/package.json +1 -1
  141. package/dist/web-ui-assets/assets/dist-C2cBizxO.js +0 -13
  142. package/dist/web-ui-assets/assets/index-eYIUud5F.js +0 -88
  143. package/dist/web-ui-assets/assets/index-hjXgYuFP.css +0 -2
@@ -0,0 +1,94 @@
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(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 u=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function O(e,t){return D(e.type,t,e.props)}function ee(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function te(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var k=/\/+/g;function A(e,t){return typeof e==`object`&&e&&e.key!=null?te(``+e.key):t.toString(36)}function ne(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function re(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,re(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+A(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(k,`$&/`)+`/`),re(o,r,i,``,function(e){return e})):o!=null&&(ee(o)&&(o=O(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(k,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+A(a,u),c+=re(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+A(a,u++),c+=re(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return re(ne(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function ie(e,t,n){if(e==null)return e;var r=[],i=0;return re(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function j(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var ae=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)};function oe(e){var t=T.T,n={};n.types=t===null?null:t.types,T.T=n;try{var r=e(),i=T.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(w,ae)}catch(e){ae(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function se(e){var t=T.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else oe(se.bind(null,e))}var ce={map:ie,forEach:function(e,t,n){ie(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ie(e,function(){t++}),t},toArray:function(e){return ie(e,function(e){return e})||[]},only:function(e){if(!ee(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=ce,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return T.H.useMemoCache(e)}},e.addTransitionType=se,e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!E.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return D(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)E.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return D(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=ee,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:j}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=oe,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.1`})),d=o(((e,t)=>{t.exports=u()})),f=o((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&&k(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&&k(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 ee=new MessageChannel,te=ee.port2;ee.port1.onmessage=D,O=function(){te.postMessage(null)}}else O=function(){_(D,0)};function k(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,k(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}}}})),p=o(((e,t)=>{t.exports=f()})),m=o((e=>{var t=d();function n(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 r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`),o=Symbol.for(`react.recoverable`),s=Symbol.for(`react.optimistic_key`);function c(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===s?s:``+r,children:e,containerInfo:t,implementation:n}}var l=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.browser=function(e){return{$$typeof:o,_reason:e}},e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return c(e,t,null,r)},e.flushSync=function(e){var t=l.T,n=i.p;try{if(l.T=null,i.p=2,e)return e()}finally{l.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=u(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=u(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return l.H.useFormState(e,t,n)},e.useFormStatus=function(){return l.H.useHostTransitionStatus()},e.version=`19.3.1`})),h=o(((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=m()})),g=o((e=>{var t=p(),n=d(),r=h();function i(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 a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){for(var t=e,n=t;n&&!n.alternate;)t=n,t.flags&4098&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function s(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 c(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 l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(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}function m(e,t,n,r,i,a){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,r,i,a)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&m(e.child,t,n,r,i,a))return!0;e=e.sibling}return!1}function g(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function _(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),e.tag!==3&&e.tag!==5&&e.tag!==27);)e=e.return;return t}function v(e){var t=[null,null],n=g(e);return n===null||y(t,e,n.child,{foundSelf:!1}),t}function y(e,t,n,r){for(;n!==null;){if(n===t)r.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(r.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&y(e,t,n.child,r))return!0;n=n.sibling}return!1}function b(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(i(559))}}var x=null,S=null;function C(e,t,n){return e===n||e===t&&(x=e,!0)}function w(e,t,n){return e===n?(S=e,!1):e===t&&(S!==null&&(x=e),!0)}function T(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function E(e,t,n){for(var r=0,i=e;i;i=n(i))r++;i=0;for(var a=t;a;a=n(a))i++;for(;0<r-i;)e=n(e),r--;for(;0<i-r;)t=n(t),i--;for(;r--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var D=Object.assign,O=Symbol.for(`react.element`),ee=Symbol.for(`react.transitional.element`),te=Symbol.for(`react.portal`),k=Symbol.for(`react.fragment`),A=Symbol.for(`react.strict_mode`),ne=Symbol.for(`react.profiler`),re=Symbol.for(`react.consumer`),ie=Symbol.for(`react.context`),j=Symbol.for(`react.forward_ref`),ae=Symbol.for(`react.suspense`),oe=Symbol.for(`react.suspense_list`),se=Symbol.for(`react.memo`),ce=Symbol.for(`react.lazy`),le=Symbol.for(`react.activity`),ue=Symbol.for(`react.legacy_hidden`),de=Symbol.for(`react.memo_cache_sentinel`),fe=Symbol.for(`react.view_transition`),pe=Symbol.for(`react.recoverable`),me=Symbol.iterator;function he(e){return typeof e!=`object`||!e?null:(e=me&&e[me]||e[`@@iterator`],typeof e==`function`?e:null)}var ge=Symbol.for(`react.client.reference`);function _e(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===ge?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case k:return`Fragment`;case ne:return`Profiler`;case A:return`StrictMode`;case ae:return`Suspense`;case oe:return`SuspenseList`;case le:return`Activity`;case fe:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case te:return`Portal`;case ie:return e.displayName||`Context`;case re:return(e._context.displayName||`Context`)+`.Consumer`;case j:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case se:return t=e.displayName||null,t===null?_e(e.type)||`Memo`:t;case ce:t=e._payload,e=e._init;try{return _e(e(t))}catch{}}return null}var ve=Array.isArray,M=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,N=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ye={pending:!1,data:null,method:null,action:null},be=[],xe=-1;function Se(e){return{current:e}}function Ce(e){0>xe||(e.current=be[xe],be[xe]=null,xe--)}function we(e,t){xe++,be[xe]=e.current,e.current=t}var Te=Se(null),Ee=Se(null),De=Se(null),Oe=Se(null);function ke(e,t){switch(we(De,t),we(Ee,e),we(Te,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?pp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=pp(t),e=mp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}Ce(Te),we(Te,e)}function Ae(){Ce(Te),Ce(Ee),Ce(De)}function je(e){var t=e.memoizedState;t!==null&&(sh._currentValue=t.memoizedState,we(Oe,e)),t=Te.current;var n=mp(t,e.type);t!==n&&(we(Ee,e),we(Te,n))}function Me(e){Ee.current===e&&(Ce(Te),Ce(Ee)),Oe.current===e&&(Ce(Oe),sh._currentValue=ye)}var Ne,Pe;function Fe(e){if(Ne===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Ne=t&&t[1]||``,Pe=-1<e.stack.indexOf(`
2
+ at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
3
+ `+Ne+e+Pe}var Ie=!1;function Le(e,t){if(!e||Ie)return``;Ie=!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}n=!1;try{var i=Object.getOwnPropertyDescriptor(e.prototype,`props`);Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),n=!0,new e}finally{n&&(i===void 0?delete e.prototype.props:Object.defineProperty(e.prototype,"props",i))}}}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(`
4
+ `),l=s.split(`
5
+ `);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=`
6
+ `+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{Ie=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Fe(n):``}function Re(e,t){switch(e.tag){case 26:case 27:case 5:return Fe(e.type);case 16:return Fe(`Lazy`);case 13:return e.child!==t&&t!==null?Fe(`Suspense Fallback`):Fe(`Suspense`);case 19:return Fe(`SuspenseList`);case 0:case 15:return Le(e.type,!1);case 11:return Le(e.type.render,!1);case 1:return Le(e.type,!0);case 31:return Fe(`Activity`);case 30:return Fe(`ViewTransition`);default:return``}}function ze(e){try{var t=``,n=null;do t+=Re(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
7
+ Error generating stack: `+e.message+`
8
+ `+e.stack}}var Be=Object.prototype.hasOwnProperty,Ve=t.unstable_scheduleCallback,He=t.unstable_cancelCallback,Ue=t.unstable_shouldYield,We=t.unstable_requestPaint,Ge=t.unstable_now,Ke=t.unstable_getCurrentPriorityLevel,qe=t.unstable_ImmediatePriority,Je=t.unstable_UserBlockingPriority,Ye=t.unstable_NormalPriority,Xe=t.unstable_LowPriority,Ze=t.unstable_IdlePriority,Qe=t.log,$e=t.unstable_setDisableYieldValue,et=null,tt=null;function nt(e){if(typeof Qe==`function`&&$e(e),tt&&typeof tt.setStrictMode==`function`)try{tt.setStrictMode(et,e)}catch{}}var rt=Math.clz32?Math.clz32:ot,it=Math.log,at=Math.LN2;function ot(e){return e>>>=0,e===0?32:31-(it(e)/at|0)|0}var st=256,ct=262144,lt=4194304;function ut(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&-e;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 dt(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=ut(n))):i=ut(o):i=ut(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=ut(n))):i=ut(o)):i=ut(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 ft(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function pt(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-rt(n),i=1<<r;t|=e[r],n&=~i}return t}function mt(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 ht(){var e=lt;return lt<<=1,!(lt&62914560)&&(lt=4194304),e}function gt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function _t(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function vt(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-rt(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&&yt(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function yt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-rt(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function bt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-rt(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function xt(e,t){var n=t&-t;return n=n&42?1:St(n),(n&(e.suspendedLanes|t))===0?n:0}function St(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 Ct(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function wt(){var e=N.p;return e===0?(e=window.event,e===void 0?32:Ch(e.type)):e}function Tt(e,t){var n=N.p;try{return N.p=e,t()}finally{N.p=n}}var Et=Math.random().toString(36).slice(2),Dt=`__reactFiber$`+Et,Ot=`__reactProps$`+Et,kt=`__reactContainer$`+Et,At=`__reactEvents$`+Et,jt=`__reactListeners$`+Et,Mt=`__reactHandles$`+Et,Nt=`__reactResources$`+Et,Pt=`__reactMarker$`+Et,Ft=`__reactLoad$`+Et;function It(e){delete e[Dt],delete e[Ot],delete e[jt],delete e[Mt]}function Lt(e){var t;if(t=e[Dt])return t;for(var n=e.parentNode;n;){if(t=n[kt]||n[Dt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=hm(e);e!==null;){if(n=e[Dt])return n;e=hm(e)}return t}e=n,n=e.parentNode}return null}function Rt(e){if(e=e[Dt]||e[kt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function zt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Bt(e){var t=e[Nt];return t||=e[Nt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Vt(e){e[Pt]=!0}function Ht(e){e[Ft]=void 0}var Ut=new Set,Wt={};function Gt(e,t){Kt(e,t),Kt(e+`Capture`,t)}function Kt(e,t){for(Wt[e]=t,e=0;e<t.length;e++)Ut.add(t[e])}var qt=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]*$`),Jt={},Yt={};function Xt(e){return Be.call(Yt,e)?!0:Be.call(Jt,e)?!1:qt.test(e)?Yt[e]=!0:(Jt[e]=!0,!1)}var P=!1;function Zt(){var e=P;return P=!1,e}function Qt(e,t,n){if(Xt(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 $t(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 en(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 tn(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function nn(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function rn(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 an(e){if(!e._valueTracker){var t=nn(e)?`checked`:`value`;e._valueTracker=rn(e,t,``+e[t])}}function on(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=nn(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var sn=/[\n"\\]/g;function cn(e){return e.replace(sn,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function ln(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=``+tn(t)):e.value!==``+tn(t)&&(e.value=``+tn(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):dn(e,tn(n)):o===`number`&&e.value==t?dn(e,tn(e.value)):dn(e,tn(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=``+tn(s):e.removeAttribute(`name`)}function un(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)){an(e);return}n=n==null?``:``+tn(n),t=t==null?n:``+tn(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),an(e)}function dn(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function fn(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=``+tn(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 pn(e,t,n){t!=null&&(t=``+tn(t),t!==e.value&&(e.value=t),n==null)?e.defaultValue!==t&&(e.defaultValue=t):e.defaultValue=n==null?``:``+tn(n)}function mn(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(ve(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=tn(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),an(e)}function hn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var gn=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 _n(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||gn.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function vn(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(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]=``,P=!0);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&(_n(e,a,r),P=!0)}else for(var o in t)t.hasOwnProperty(o)&&_n(e,o,t[o])}function yn(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 bn=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`],[`maskType`,`mask-type`],[`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`]]),xn=/^[\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 Sn(e){return xn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Cn(){}var wn=null;function Tn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var En=null,Dn=null;function On(e){var t=Rt(e);if(t&&(e=t.stateNode)){var n=e[Ot]||null;a:switch(e=t.stateNode,t.type){case`input`:if(ln(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="`+cn(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[Ot]||null;if(!a)throw Error(i(90));ln(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&on(r)}break a;case`textarea`:pn(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&fn(e,!!n.multiple,t,!1)}}}var kn=!1;function An(e,t,n){if(kn)return e(t,n);kn=!0;try{return e(t)}finally{if(kn=!1,(En!==null||Dn!==null)&&(Hd(),En&&(t=En,e=Dn,Dn=En=null,On(t),e)))for(t=0;t<e.length;t++)On(e[t])}}function jn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[Ot]||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(i(231,t,typeof n));return n}var Mn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,Nn=!1;if(Mn)try{var Pn={};Object.defineProperty(Pn,"passive",{get:function(){Nn=!0}}),window.addEventListener(`test`,Pn,Pn),window.removeEventListener(`test`,Pn,Pn)}catch{Nn=!1}var Fn=null,In=null,Ln=null;function Rn(){if(Ln)return Ln;var e,t=In,n=t.length,r,i=`value`in Fn?Fn.value:Fn.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 Ln=i.slice(e,1<r?1-r:void 0)}function F(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 zn(){return!0}function Bn(){return!1}function Vn(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)?zn:Bn,this.isPropagationStopped=Bn,this}return D(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=zn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=zn)},persist:function(){},isPersistent:zn}),t}var Hn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Un=Vn(Hn),Wn=D({},Hn,{view:0,detail:0}),Gn=Vn(Wn),Kn,qn,Jn,Yn=D({},Wn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ir,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!==Jn&&(Jn&&e.type===`mousemove`?(Kn=e.screenX-Jn.screenX,qn=e.screenY-Jn.screenY):qn=Kn=0,Jn=e),Kn)},movementY:function(e){return`movementY`in e?e.movementY:qn}}),I=Vn(Yn),Xn=Vn(D({},Yn,{dataTransfer:0})),Zn=Vn(D({},Wn,{relatedTarget:0})),Qn=Vn(D({},Hn,{animationName:0,elapsedTime:0,pseudoElement:0})),$n=Vn(D({},Hn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),er=Vn(D({},Hn,{data:0})),tr={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},nr={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`},L={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function rr(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=L[e])?!!t[e]:!1}function ir(){return rr}var ar=Vn(D({},Wn,{key:function(e){if(e.key){var t=tr[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=F(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?nr[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ir,charCode:function(e){return e.type===`keypress`?F(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?F(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),or=Vn(D({},Yn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),sr=Vn(D({},Hn,{submitter:0})),cr=Vn(D({},Wn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ir})),lr=Vn(D({},Hn,{propertyName:0,elapsedTime:0,pseudoElement:0})),ur=Vn(D({},Yn,{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})),dr=Vn(D({},Hn,{newState:0,oldState:0,source:0})),fr=[9,13,27,32],pr=Mn&&`CompositionEvent`in window,mr=null;Mn&&`documentMode`in document&&(mr=document.documentMode);var hr=Mn&&`TextEvent`in window&&!mr,gr=Mn&&(!pr||mr&&8<mr&&11>=mr),_r=` `,vr=!1;function yr(e,t){switch(e){case`keyup`:return fr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function br(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var R=!1;function xr(e,t){switch(e){case`compositionend`:return br(t);case`keypress`:return t.which===32?(vr=!0,_r):null;case`textInput`:return e=t.data,e===_r&&vr?null:e;default:return null}}function z(e,t){if(R)return e===`compositionend`||!pr&&yr(e,t)?(e=Rn(),Ln=In=Fn=null,R=!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 gr&&t.locale!==`ko`?null:t.data;default:return null}}var Sr={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 Cr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!Sr[e.type]:t===`textarea`}function wr(e,t,n,r){En?Dn?Dn.push(r):Dn=[r]:En=r,t=Xf(t,`onChange`),0<t.length&&(n=new Un(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Tr=null,Er=null;function Dr(e){Uf(e,0)}function Or(e){if(on(zt(e)))return e}function kr(e,t){if(e===`change`)return t}var Ar=!1;if(Mn){var jr;if(Mn){var Mr=`oninput`in document;if(!Mr){var Nr=document.createElement(`div`);Nr.setAttribute(`oninput`,`return;`),Mr=typeof Nr.oninput==`function`}jr=Mr}else jr=!1;Ar=jr&&(!document.documentMode||9<document.documentMode)}function Pr(){Tr&&(Tr.detachEvent(`onpropertychange`,Fr),Er=Tr=null)}function Fr(e){if(e.propertyName===`value`&&Or(Er)){var t=[];wr(t,Er,e,Tn(e)),An(Dr,t)}}function Ir(e,t,n){e===`focusin`?(Pr(),Tr=t,Er=n,Tr.attachEvent(`onpropertychange`,Fr)):e===`focusout`&&Pr()}function Lr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Or(Er)}function Rr(e,t){if(e===`click`)return Or(t)}function zr(e,t){if(e===`input`||e===`change`)return Or(t)}function Br(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Vr=typeof Object.is==`function`?Object.is:Br;function Hr(e,t){if(Vr(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(!Be.call(t,i)||!Vr(e[i],t[i]))return!1}return!0}function Ur(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function Wr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Gr(e,t){var n=Wr(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=Wr(n)}}function Kr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Kr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function qr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ur(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=Ur(e.document)}return t}function Jr(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 Yr=Mn&&`documentMode`in document&&11>=document.documentMode,Xr=null,Zr=null,Qr=null,$r=!1;function ei(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;$r||Xr==null||Xr!==Ur(r)||(r=Xr,`selectionStart`in r&&Jr(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}),Qr&&Hr(Qr,r)||(Qr=r,r=Xf(Zr,`onSelect`),0<r.length&&(t=new Un(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Xr)))}function ti(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var ni={animationend:ti(`Animation`,`AnimationEnd`),animationiteration:ti(`Animation`,`AnimationIteration`),animationstart:ti(`Animation`,`AnimationStart`),transitionrun:ti(`Transition`,`TransitionRun`),transitionstart:ti(`Transition`,`TransitionStart`),transitioncancel:ti(`Transition`,`TransitionCancel`),transitionend:ti(`Transition`,`TransitionEnd`)},ri={},ii={};Mn&&(ii=document.createElement(`div`).style,`AnimationEvent`in window||(delete ni.animationend.animation,delete ni.animationiteration.animation,delete ni.animationstart.animation),`TransitionEvent`in window||delete ni.transitionend.transition);function ai(e){if(ri[e])return ri[e];if(!ni[e])return e;var t=ni[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in ii)return ri[e]=t[n];return e}var oi=ai(`animationend`),si=ai(`animationiteration`),ci=ai(`animationstart`),li=ai(`transitionrun`),ui=ai(`transitionstart`),di=ai(`transitioncancel`),fi=ai(`transitionend`),pi=new Map,mi=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError 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(` `);mi.push(`scrollEnd`);function hi(e,t){pi.set(e,t),Gt(t,[e])}var gi=0;function _i(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=Cd.identifierPrefix;var n=gi++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function vi(e){if(e==null||typeof e==`string`)return e;var t=null,n=jd;if(n!==null)for(var r=0;r<n.length;r++){var i=e[n[r]];if(i!=null){if(i===`none`)return`none`;t=t==null?i:t+(` `+i)}}return t??e.default}function yi(e,t){return e=vi(e),t=vi(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var bi=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)},xi=[],Si=0,Ci=0;function wi(){for(var e=Si,t=Ci=Si=0;t<e;){var n=xi[t];xi[t++]=null;var r=xi[t];xi[t++]=null;var i=xi[t];xi[t++]=null;var a=xi[t];if(xi[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&&Oi(n,i,a)}}function Ti(e,t,n,r){xi[Si++]=e,xi[Si++]=t,xi[Si++]=n,xi[Si++]=r,Ci|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Ei(e,t,n,r){return Ti(e,t,n,r),ki(e)}function Di(e,t){return Ti(e,null,null,t),ki(e)}function Oi(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-rt(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ki(e){if(50<Md)throw Md=0,Nd=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ai={};function ji(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 Mi(e,t,n,r){return new ji(e,t,n,r)}function Ni(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Pi(e,t){var n=e.alternate;return n===null?(n=Mi(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&1206910976,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 Fi(e,t){e.flags&=1206910978;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 Ii(e,t,n,r,a,o){var s=0;if(r=e,typeof r==`function`)Ni(r)&&(s=1);else if(typeof r==`string`)s=qm(e,n,Te.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case le:return e=Mi(31,n,t,a),e.elementType=le,e.lanes=o,e;case k:return Li(n.children,a,o,t);case A:s=8,a|=24;break;case ne:return e=Mi(12,n,t,a|2),e.elementType=ne,e.lanes=o,e;case ae:return e=Mi(13,n,t,a),e.elementType=ae,e.lanes=o,e;case oe:return e=Mi(19,n,t,a),e.elementType=oe,e.lanes=o,e;case ue:case fe:return e=a|32,e=Mi(30,n,t,e),e.elementType=fe,e.lanes=o,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r==`object`&&r)switch(r.$$typeof){case ie:s=10;break a;case re:s=9;break a;case j:s=11;break a;case se:s=14;break a;case ce:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=Mi(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function Li(e,t,n,r){return e=Mi(7,e,r,t),e.lanes=n,e}function Ri(e,t,n){return e=Mi(6,e,null,t),e.lanes=n,e}function zi(e){var t=Mi(18,null,null,0);return t.stateNode=e,t}function Bi(e,t,n){return t=Mi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Vi=new WeakMap;function Hi(e,t){if(typeof e==`object`&&e){var n=Vi.get(e);return n===void 0?(t={value:e,source:t,stack:ze(t)},Vi.set(e,t),t):n}return{value:e,source:t,stack:ze(t)}}var Ui=[],Wi=0,Gi=null,Ki=0,qi=[],Ji=0,Yi=null,Xi=1,Zi=``;function Qi(e,t){Ui[Wi++]=Ki,Ui[Wi++]=Gi,Gi=e,Ki=t}function $i(e,t,n){qi[Ji++]=Xi,qi[Ji++]=Zi,qi[Ji++]=Yi,Yi=e;var r=Xi;e=Zi;var i=32-rt(r)-1;r&=~(1<<i),n+=1;var a=32-rt(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Xi=1<<32-rt(t)+i|n<<i|r,Zi=a+e}else Xi=1<<a|n<<i|r,Zi=e}function ea(e){e.return!==null&&(Qi(e,1),$i(e,1,0))}function ta(e){for(;e===Gi;)Gi=Ui[--Wi],Ui[Wi]=null,Ki=Ui[--Wi],Ui[Wi]=null;for(;e===Yi;)Yi=qi[--Ji],qi[Ji]=null,Zi=qi[--Ji],qi[Ji]=null,Xi=qi[--Ji],qi[Ji]=null}function na(e,t){qi[Ji++]=Xi,qi[Ji++]=Zi,qi[Ji++]=Yi,Xi=t.id,Zi=t.overflow,Yi=e}var B=null,ra=null,V=!1,ia=null,aa=!1,oa=Error(i(519));function sa(e){throw pa(Hi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),oa}function ca(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Dt]=e,t[Ot]=r,n){case`dialog`:X(`cancel`,t),X(`close`,t);break;case`iframe`:case`object`:case`embed`:X(`load`,t);break;case`video`:case`audio`:for(n=0;n<Vf.length;n++)X(Vf[n],t);break;case`source`:X(`error`,t);break;case`img`:case`image`:case`link`:X(`error`,t),X(`load`,t);break;case`details`:X(`toggle`,t);break;case`input`:X(`invalid`,t),un(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:X(`invalid`,t);break;case`textarea`:X(`invalid`,t),mn(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||np(t.textContent,n)?(r.popover!=null&&(X(`beforetoggle`,t),X(`toggle`,t)),r.onScroll!=null&&X(`scroll`,t),r.onScrollEnd!=null&&X(`scrollend`,t),r.onClick!=null&&(t.onclick=Cn),t=!0):t=!1,t||sa(e,!0)}function la(e){for(B=e.return;B;)switch(B.tag){case 5:case 31:case 13:aa=!1;return;case 27:case 3:aa=!0;return;default:B=B.return}}function ua(e){if(e!==B)return!1;if(!V)return la(e),V=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||gp(e.type,e.memoizedProps)),n=!n),n&&ra&&sa(e),la(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));ra=mm(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));ra=mm(e)}else t===27?(t=ra,Tp(e.type)?(e=pm,pm=null,ra=e):ra=t):ra=B?fm(e.stateNode.nextSibling):null;return!0}function da(){ra=B=null,V=!1}function fa(){var e=ia;return e!==null&&(hd===null?hd=e:hd.push.apply(hd,e),ia=null),e}function pa(e){ia===null?ia=[e]:ia.push(e)}var ma=Se(null),ha=null,ga=null;function _a(e,t,n){we(ma,t._currentValue),t._currentValue=n}function va(e){e._currentValue=ma.current,Ce(ma)}function ya(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 ba(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),ya(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),ya(s,n,e),s=null}else a.tag===13&&a.memoizedState!==null&&a.memoizedState.dehydrated===null?(a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),ya(a.return,n,e),s=a.child,s=s===null?null:s.sibling):s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function xa(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Vr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===Oe.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[sh]:e.push(sh))}a=a.return}return e!==null&&ba(t,e,n,r),t.flags|=262144,e!==null}function Sa(e){for(e=e.firstContext;e!==null;){if(!Vr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ca(e){ha=e,ga=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function wa(e){return Ea(ha,e)}function Ta(e,t){return ha===null&&Ca(e),Ea(e,t)}function Ea(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},ga===null){if(e===null)throw Error(i(308));ga=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ga=ga.next=t;return n}var Da=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()})}},Oa=t.unstable_scheduleCallback,ka=t.unstable_NormalPriority,Aa={$$typeof:ie,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ja(){return{controller:new Da,data:new Map,refCount:0}}function Ma(e){e.refCount--,e.refCount===0&&Oa(ka,function(){e.controller.abort()})}function Na(e,t){if(e.pendingLanes&4194048){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var r=t[e];n.indexOf(r)===-1&&n.push(r)}}}var Pa=null;function Fa(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Ia=null,La=0,Ra=0,za=null;function Ba(e,t){if(Ia===null){var n=Ia=[];La=0,Ra=If(),za={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return La++,t.then(Va,Va),t}function Va(){if(--La===0&&(Pa=null,Ia!==null)){za!==null&&(za.status=`fulfilled`);var e=Ia;Ia=null,Ra=0,za=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Ha(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 Ua=M.S;M.S=function(e,t){if(vd=Ge(),typeof t==`object`&&t&&typeof t.then==`function`&&Ba(e,t),Pa!==null)for(var n=wf;n!==null;)Na(n,Pa),n=n.next;if(n=e.types,n!==null){for(var r=wf;r!==null;)Na(r,n),r=r.next;if(Ra!==0){r=Pa,r===null&&(r=Pa=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}Ua!==null&&Ua(e,t)};var Wa=Se(null);function Ga(){var e=Wa.current;return e===null?nd.pooledCache:e}function Ka(e,t){t===null?we(Wa,Wa.current):we(Wa,t.pool)}function qa(){var e=Ga();return e===null?null:{parent:Aa._currentValue,pool:e}}var Ja=Error(i(460)),Ya=Error(i(474)),Xa=Error(i(542)),Za={then:function(){}};function Qa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function $a(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Cn,Cn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ro(e),e===void 0&&!(`reason`in t)?Error(i(600)):e;default:if(typeof t.status==`string`)t.then(Cn,Cn);else{if(e=nd,e!==null&&100<e.shellSuspendCounter)throw Error(i(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,ro(e),e}throw to=t,Ja}}function eo(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(to=e,Ja):e}}var to=null;function no(){if(to===null)throw Error(i(459));var e=to;return to=null,e}function ro(e){if(e===Ja||e===Xa)throw Error(i(483))}var io=null,ao=0;function oo(e){var t=ao;return ao+=1,io===null&&(io=[]),$a(io,e,t)}function so(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function co(e,t){throw t.$$typeof===O?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function lo(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 a(e,t){return e=Pi(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|=134217730,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=134217730),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=Ri(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===k?(e=d(e,t,n.props.children,r,n.key),so(e,n),e):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===ce&&eo(i)===t.type)?(t=a(t,n.props),so(t,n),t.return=e,t):(t=Ii(n.type,n.key,n.props,null,e.mode,r),so(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=Bi(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=Li(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=Ri(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case ee:return n=Ii(t.type,t.key,t.props,null,e.mode,n),so(n,t),n.return=e,n;case te:return t=Bi(t,e.mode,n),t.return=e,t;case ce:return t=eo(t),f(e,t,n)}if(ve(t)||he(t))return t=Li(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,oo(t),n);if(t.$$typeof===ie)return f(e,Ta(e,t),n);co(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 ee:return n.key===i?l(e,t,n,r):null;case te:return n.key===i?u(e,t,n,r):null;case ce:return n=eo(n),p(e,t,n,r)}if(ve(n)||he(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,oo(n),r);if(n.$$typeof===ie)return p(e,t,Ta(e,n),r);co(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 ee:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case te:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case ce:return r=eo(r),m(e,t,n,r,i)}if(ve(r)||he(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,oo(r),i);if(r.$$typeof===ie)return m(e,t,n,Ta(t,r),i);co(t,r)}return null}function h(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),V&&Qi(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 V&&Qi(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(_.key===null?h:_.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)}),V&&Qi(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(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(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),V&&Qi(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return V&&Qi(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&(_=v.alternate,_!==null&&h.delete(_.key===null?g:_.key)),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),V&&Qi(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===k&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case ee:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===k){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),so(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===ce&&eo(l)===r.type){n(e,r.sibling),c=a(r,o.props),so(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===k?(c=Li(o.props.children,e.mode,c,o.key),so(c,o),c.return=e,e=c):(c=Ii(o.type,o.key,o.props,null,e.mode,c),so(c,o),c.return=e,e=c)}return s(e);case te: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=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=Bi(o,e.mode,c),c.return=e,e=c}return s(e);case ce:return o=eo(o),_(e,r,o,c)}if(ve(o))return h(e,r,o,c);if(he(o)){if(l=he(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,oo(o),c);if(o.$$typeof===ie)return _(e,r,Ta(e,o),c);co(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=a(r,o),c.return=e,e=c):(n(e,r),c=Ri(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{ao=0;var i=_(e,t,n,r);return io=null,i}catch(t){if(t===Ja||t===Xa)throw t;var a=Mi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var uo=lo(!0),fo=lo(!1),po=!1;function mo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ho(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 go(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function _o(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,td&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ki(e),Oi(e,null,n),t}return Ti(e,r,t,n),ki(e)}function vo(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,bt(e,n)}}function yo(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}else e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var bo=!1;function xo(){if(bo){var e=za;if(e!==null)throw e}}function So(e,t,n,r){bo=!1;var i=e.updateQueue;po=!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,p=f!==s.lane;if(p?(K&f)===f:(r&f)===f){f!==0&&f===Ra&&(bo=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=D({},d,f);break a;case 2:po=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,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),ld|=o,e.lanes=o,e.memoizedState=d}}function Co(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function wo(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Co(n[e],t)}var To=Se(null),Eo=Se(0);function Do(e,t){e=sd,we(Eo,e),we(To,t),sd=e|t.baseLanes}function Oo(){we(Eo,sd),we(To,To.current)}function ko(){sd=Eo.current,Ce(To),Ce(Eo)}var Ao=Se(null),jo=null;function Mo(e){var t=e.alternate;we(Lo,Lo.current&1),we(Ao,e),jo===null&&(t===null||To.current!==null||t.memoizedState!==null)&&(jo=e)}function No(e){we(Lo,Lo.current),we(Ao,e),jo===null&&(jo=e)}function Po(e){e.tag===22?(we(Lo,Lo.current),we(Ao,e),jo===null&&(jo=e)):Fo()}function Fo(){we(Lo,Lo.current),we(Ao,Ao.current)}function Io(e){Ce(Ao),jo===e&&(jo=null),Ce(Lo)}var Lo=Se(0);function Ro(e,t){we(Ao,Ao.current),we(Lo,t)}function zo(e){Ce(Lo),Ce(Ao),jo===e&&(jo=null)}function Bo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||lm(n)||um(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==`independent`){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 Vo=0,H=null,Ho=null,Uo=null,Wo=!1,Go=!1,Ko=!1,qo=0,Jo=0,Yo=null,Xo=0;function Zo(){throw Error(i(321))}function Qo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Vr(e[n],t[n]))return!1;return!0}function $o(e,t,n,r,i,a){return Vo=a,H=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,M.H=e===null||e.memoizedState===null?gc:_c,Ko=!1,a=n(r,i),Ko=!1,Go&&(a=ts(t,n,r,i)),es(e),a}function es(e){M.H=hc;var t=Ho!==null&&Ho.next!==null;if(Vo=0,Uo=Ho=H=null,Wo=!1,Jo=0,Yo=null,t)throw Error(i(300));e===null||Nc||(e=e.dependencies,e!==null&&Sa(e)&&(Nc=!0))}function ts(e,t,n,r){H=e;var a=0;do{if(Go&&(Yo=null),Jo=0,Go=!1,25<=a)throw Error(i(301));if(a+=1,Uo=Ho=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}M.H=vc,o=t(n,r)}while(Go);return o}function ns(){var e=M.H,t=e.useState()[0];return t=typeof t.then==`function`?ls(t):t,e=e.useState()[0],(Ho===null?null:Ho.memoizedState)!==e&&(H.flags|=1024),t}function rs(){var e=qo!==0;return qo=0,e}function is(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function as(e){if(Wo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Wo=!1}Vo=0,Uo=Ho=H=null,Go=!1,Jo=qo=0,Yo=null}function os(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Uo===null?H.memoizedState=Uo=e:Uo=Uo.next=e,Uo}function ss(){if(Ho===null){var e=H.alternate;e=e===null?null:e.memoizedState}else e=Ho.next;var t=Uo===null?H.memoizedState:Uo.next;if(t!==null)Uo=t,Ho=e;else{if(e===null)throw H.alternate===null?Error(i(467)):Error(i(310));Ho=e,e={memoizedState:Ho.memoizedState,baseState:Ho.baseState,baseQueue:Ho.baseQueue,queue:Ho.queue,next:null},Uo===null?H.memoizedState=Uo=e:Uo=Uo.next=e}return Uo}function cs(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ls(e){var t=Jo;return Jo+=1,Yo===null&&(Yo=[]),e=$a(Yo,e,t),t=H,(Uo===null?t.memoizedState:Uo.next)===null&&(t=t.alternate,M.H=t===null||t.memoizedState===null?gc:_c),e}function us(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return ls(e);if(e.$$typeof===pe)return;if(e.$$typeof===ie)return wa(e)}throw Error(i(438,String(e)))}function ds(e){var t=null,n=H.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=H.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=cs(),H.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]=de;return t.index++,n}function fs(e,t){return typeof t==`function`?t(e):t}function ps(e){return ms(ss(),Ho,e)}function ms(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(Vo&f)===f:(K&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===Ra&&(d=!0);else if((Vo&p)===p){u=u.next,p===Ra&&(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,H.lanes|=p,ld|=p;f=u.action,Ko&&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,H.lanes|=f,ld|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Vr(o,e.memoizedState)&&(Nc=!0,d&&(n=za,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function hs(e){var t=ss(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Vr(o,t.memoizedState)||(Nc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function gs(e,t,n){var r=H,a=ss(),o=V;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Vr((Ho||a).memoizedState,n);if(s&&(a.memoizedState=n,Nc=!0),a=a.queue,Vs(ys.bind(null,r,a,e),[e]),e=a.getSnapshot!==t||s||Uo!==null&&!!(Uo.memoizedState.tag&1),Is(e?9:8,{destroy:void 0},vs.bind(null,r,a,n,t),null),e){if(r.flags|=2048,nd===null)throw Error(i(349));o||Vo&127||_s(r,t,n)}return n}function _s(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=H.updateQueue,t===null?(t=cs(),H.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function vs(e,t,n,r){t.value=n,t.getSnapshot=r,bs(t)&&xs(e)}function ys(e,t,n){return n(function(){bs(t)&&xs(e)})}function bs(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Vr(e,n)}catch{return!0}}function xs(e){var t=Di(e,2);t!==null&&Ld(t,e,2)}function Ss(e){var t=os();if(typeof e==`function`){var n=e;if(e=n(),Ko){nt(!0);try{n()}finally{nt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:fs,lastRenderedState:e},t}function Cs(e,t,n,r){return e.baseState=n,ms(e,Ho,typeof r==`function`?r:fs)}function ws(e,t,n,r,a){if(fc(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};M.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Ts(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Ts(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=M.T,o={};o.types=a===null?null:a.types,M.T=o;try{var s=n(i,r),c=M.S;c!==null&&c(o,s),Es(e,t,s)}catch(n){Os(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),M.T=a}}else try{a=n(i,r),Es(e,t,a)}catch(n){Os(e,t,n)}}function Es(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Ds(e,t,n)},function(n){return Os(e,t,n)}):Ds(e,t,n)}function Ds(e,t,n){t.status=`fulfilled`,t.value=n,ks(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Ts(e,n)))}function Os(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,ks(t),t=t.next;while(t!==r)}e.action=null}function ks(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function As(e,t){return t}function js(e,t){if(V){var n=nd.formState;if(n!==null){a:{var r=H;if(V){if(ra){b:{for(var i=ra,a=aa;i.nodeType!==8;)if(!a||(i=fm(i.nextSibling),i===null)){i=null;break b}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){ra=fm(i.nextSibling),r=i.data===`F!`;break a}}sa(r)}r=!1}r&&(t=n[0])}}return n=os(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:As,lastRenderedState:t},n.queue=r,n=lc.bind(null,H,r),r.dispatch=n,r=Ss(!1),a=dc.bind(null,H,!1,r.queue),r=os(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=ws.bind(null,H,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Ms(e){return Ns(ss(),Ho,e)}function Ns(e,t,n){if(t=ms(e,t,As)[0],e=ps(fs)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=ls(t)}catch(e){throw e===Ja?Xa:e}else r=t;t=ss();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(H.flags|=2048,Is(9,{destroy:void 0},Ps.bind(null,i,n),null)),[r,a,e]}function Ps(e,t){e.action=t}function Fs(e){var t=ss(),n=Ho;if(n!==null)return Ns(t,n,e);ss(),t=t.memoizedState,n=ss();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Is(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=H.updateQueue,t===null&&(t=cs(),H.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 Ls(){return ss().memoizedState}function Rs(e,t,n,r){var i=os();H.flags|=e,i.memoizedState=Is(1|t,{destroy:void 0},n,r===void 0?null:r)}function zs(e,t,n,r){var i=ss();r=r===void 0?null:r;var a=i.memoizedState.inst;Ho!==null&&r!==null&&Qo(r,Ho.memoizedState.deps)?i.memoizedState=Is(t,a,n,r):(H.flags|=e,i.memoizedState=Is(1|t,a,n,r))}function Bs(e,t){Rs(8390656,8,e,t)}function Vs(e,t){zs(2048,8,e,t)}function Hs(e){H.flags|=4;var t=H.updateQueue;if(t===null)t=cs(),H.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Us(e){var t=ss().memoizedState;return Hs({ref:t,nextImpl:e}),function(){if(td&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Ws(e,t){return zs(4,2,e,t)}function Gs(e,t){return zs(4,4,e,t)}function Ks(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 qs(e,t,n){n=n==null?null:n.concat([e]),zs(4,4,Ks.bind(null,t,e),n)}function Js(){}function Ys(e,t){var n=ss();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Qo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Xs(e,t){var n=ss();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Qo(t,r[1]))return r[0];if(r=e(),Ko){nt(!0);try{e()}finally{nt(!1)}}return n.memoizedState=[r,t],r}function Zs(e,t,n){return n===void 0||Vo&1073741824&&!(K&261930)?e.memoizedState=t:(e.memoizedState=n,e=Fd(),H.lanes|=e,ld|=e,n)}function Qs(e,t,n,r){return Vr(n,t)?n:To.current===null?!(Vo&106)||Vo&1073741824&&!(K&261930)?(Nc=!0,e.memoizedState=n):(e=Fd(),H.lanes|=e,ld|=e,t):(e=Zs(e,n,r),Vr(e,t)||(Nc=!0),e)}function $s(e,t,n,r,i){var a=N.p;N.p=a!==0&&8>a?a:8;var o=M.T,s={};s.types=o===null?null:o.types,M.T=s,dc(e,!1,t,n);try{var c=i(),l=M.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?uc(e,t,Ha(c,r),Pd(e)):uc(e,t,r,Pd(e))}catch(n){uc(e,t,{then:function(){},status:`rejected`,reason:n},Pd())}finally{N.p=a,o!==null&&s.types!==null&&(o.types=s.types),M.T=o}}function ec(){}function tc(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=nc(e).queue;$s(e,a,t,ye,n===null?ec:function(){return rc(e),n(r)})}function nc(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ye,baseState:ye,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fs,lastRenderedState:ye},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fs,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function rc(e){var t=nc(e);t.next===null&&(t=e.alternate.memoizedState),uc(e,t.next.queue,{},Pd())}function ic(){return wa(sh)}function ac(){return ss().memoizedState}function oc(){return ss().memoizedState}function sc(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Pd();e=go(n);var r=_o(t,e,n);r!==null&&(Ld(r,t,n),vo(r,t,n)),t={cache:ja()},e.payload=t;return}t=t.return}}function cc(e,t,n){var r=Pd();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},fc(e)?pc(t,n):(n=Ei(e,t,n,r),n!==null&&(Ld(n,e,r),mc(n,t,r)))}function lc(e,t,n){uc(e,t,n,Pd())}function uc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(fc(e))pc(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,Vr(s,o))return Ti(e,t,i,0),nd===null&&wi(),!1}catch{}if(n=Ei(e,t,i,r),n!==null)return Ld(n,e,r),mc(n,t,r),!0}return!1}function dc(e,t,n,r){if(r={lane:2,revertLane:If(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},fc(e)){if(t)throw Error(i(479))}else t=Ei(e,n,r,2),t!==null&&Ld(t,e,2)}function fc(e){var t=e.alternate;return e===H||t!==null&&t===H}function pc(e,t){Go=Wo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function mc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,bt(e,n)}}var hc={readContext:wa,use:us,useCallback:Zo,useContext:Zo,useEffect:Zo,useImperativeHandle:Zo,useLayoutEffect:Zo,useInsertionEffect:Zo,useMemo:Zo,useReducer:Zo,useRef:Zo,useState:Zo,useDebugValue:Zo,useDeferredValue:Zo,useTransition:Zo,useSyncExternalStore:Zo,useId:Zo,useHostTransitionStatus:Zo,useFormState:Zo,useActionState:Zo,useOptimistic:Zo,useMemoCache:Zo,useCacheRefresh:Zo,useEffectEvent:Zo},gc={readContext:wa,use:us,useCallback:function(e,t){return os().memoizedState=[e,t===void 0?null:t],e},useContext:wa,useEffect:Bs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Rs(4194308,4,Ks.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Rs(4194308,4,e,t)},useInsertionEffect:function(e,t){Rs(4,2,e,t)},useMemo:function(e,t){var n=os();t=t===void 0?null:t;var r=e();if(Ko){nt(!0);try{e()}finally{nt(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=os();if(n!==void 0){var i=n(t);if(Ko){nt(!0);try{n(t)}finally{nt(!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=cc.bind(null,H,e),[r.memoizedState,e]},useRef:function(e){var t=os();return e={current:e},t.memoizedState=e},useState:function(e){e=Ss(e);var t=e.queue,n=lc.bind(null,H,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Js,useDeferredValue:function(e,t){return Zs(os(),e,t)},useTransition:function(){var e=Ss(!1);return e=$s.bind(null,H,e.queue,!0,!1),os().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=H,a=os();if(V){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),nd===null)throw Error(i(349));K&127||_s(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Bs(ys.bind(null,r,o,e),[e]),r.flags|=2048,Is(9,{destroy:void 0},vs.bind(null,r,o,n,t),null),n},useId:function(){var e=os(),t=nd.identifierPrefix;if(V){var n=Zi,r=Xi;n=(r&~(1<<32-rt(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=qo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Xo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:ic,useFormState:js,useActionState:js,useOptimistic:function(e){var t=os();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=dc.bind(null,H,!0,n),n.dispatch=t,[e,t]},useMemoCache:ds,useCacheRefresh:function(){return os().memoizedState=sc.bind(null,H)},useEffectEvent:function(e){var t=os(),n={impl:e};return t.memoizedState=n,function(){if(td&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},_c={readContext:wa,use:us,useCallback:Ys,useContext:wa,useEffect:Vs,useImperativeHandle:qs,useInsertionEffect:Ws,useLayoutEffect:Gs,useMemo:Xs,useReducer:ps,useRef:Ls,useState:function(){return ps(fs)},useDebugValue:Js,useDeferredValue:function(e,t){return Qs(ss(),Ho.memoizedState,e,t)},useTransition:function(){var e=ps(fs)[0],t=ss().memoizedState;return[typeof e==`boolean`?e:ls(e),t]},useSyncExternalStore:gs,useId:ac,useHostTransitionStatus:ic,useFormState:Ms,useActionState:Ms,useOptimistic:function(e,t){return Cs(ss(),Ho,e,t)},useMemoCache:ds,useCacheRefresh:oc,useEffectEvent:Us},vc={readContext:wa,use:us,useCallback:Ys,useContext:wa,useEffect:Vs,useImperativeHandle:qs,useInsertionEffect:Ws,useLayoutEffect:Gs,useMemo:Xs,useReducer:hs,useRef:Ls,useState:function(){return hs(fs)},useDebugValue:Js,useDeferredValue:function(e,t){var n=ss();return Ho===null?Zs(n,e,t):Qs(n,Ho.memoizedState,e,t)},useTransition:function(){var e=hs(fs)[0],t=ss().memoizedState;return[typeof e==`boolean`?e:ls(e),t]},useSyncExternalStore:gs,useId:ac,useHostTransitionStatus:ic,useFormState:Fs,useActionState:Fs,useOptimistic:function(e,t){var n=ss();return Ho===null?(n.baseState=e,[e,n.queue.dispatch]):Cs(n,Ho,e,t)},useMemoCache:ds,useCacheRefresh:oc,useEffectEvent:Us};function yc(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:D({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var bc={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Pd(),i=go(r);i.payload=t,n!=null&&(i.callback=n),t=_o(e,i,r),t!==null&&(Ld(t,e,r),vo(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Pd(),i=go(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=_o(e,i,r),t!==null&&(Ld(t,e,r),vo(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Pd(),r=go(n);r.tag=2,t!=null&&(r.callback=t),t=_o(e,r,n),t!==null&&(Ld(t,e,n),vo(t,e,n))}};function xc(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?!Hr(n,r)||!Hr(i,a):!0}function Sc(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&&bc.enqueueReplaceState(t,t.state,null)}function Cc(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=D({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function wc(e){bi(e)}function Tc(e){console.error(e)}function U(e){bi(e)}function Ec(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Dc(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 Oc(e,t,n){return n=go(n),n.tag=3,n.payload={element:null},n.callback=function(){Ec(e,t)},n}function kc(e){return e=go(e),e.tag=3,e}function Ac(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(){Dc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Dc(t,n,r),typeof i!=`function`&&(xd===null?xd=new Set([this]):xd.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function jc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&xa(t,n,a,!0),n=Ao.current,n!==null){switch(n.tag){case 31:case 13:case 19:return jo===null?Yd():n.alternate===null&&cd===0&&(cd=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Za?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),vf(e,r,a)),!1;case 22:return n.flags|=65536,r===Za?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)),vf(e,r,a)),!1}throw Error(i(435,n.tag))}return vf(e,r,a),Yd(),!1}if(V)return t=Ao.current,t===null?(r!==oa&&(t=Error(i(423),{cause:r}),pa(Hi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Hi(r,n),a=Oc(e.stateNode,r,a),yo(e,a),cd!==4&&(cd=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==oa&&(e=Error(i(422),{cause:r}),pa(Hi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=Hi(o,n),md===null?md=[o]:md.push(o),cd!==4&&(cd=2),t===null)return!0;r=Hi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Oc(n.stateNode,r,e),yo(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`&&(xd===null||!xd.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=kc(a),Ac(a,e,n,r),yo(n,a),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Mc=Error(i(461)),Nc=!1;function Pc(e,t,n,r){t.child=e===null?fo(t,null,n,r):uo(t,e.child,n,r)}function Fc(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 Ca(t),r=$o(e,t,n,o,a,i),s=rs(),e!==null&&!Nc?(is(e,t,i),ll(e,t,i)):(V&&s&&ea(t),t.flags|=1,Pc(e,t,r,i),t.child)}function Ic(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Ni(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Lc(e,t,a,r,i)):(e=Ii(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!ul(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Hr:n,n(o,r)&&e.ref===t.ref)return ll(e,t,i)}return t.flags|=1,e=Pi(a,r),e.ref=t.ref,e.return=t,t.child=e}function Lc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Hr(a,r)&&e.ref===t.ref){if(Nc=!1,t.pendingProps=r=a,ul(e,i))e.flags&131072&&(Nc=!0);else return t.lanes=e.lanes,ll(e,t,i)}}return Gc(e,t,n,r,i)}function Rc(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 Bc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ka(t,a===null?null:a.cachePool),a===null?Oo():Do(t,a),Po(t);else return r=t.lanes=536870912,Bc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Ka(t,null),Oo(),Fo()):(Ka(t,a.cachePool),Do(t,a),Fo(),t.memoizedState=null);return Pc(e,t,i,n),t.child}function zc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Bc(e,t,n,r,i){var a=Ga();return a=a===null?null:{parent:Aa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Ka(t,null),Oo(),Po(t),e!==null&&xa(e,t,r,!0),t.childLanes=i,null}function Vc(e,t){return t=el({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Hc(e,t,n){return uo(t,e.child,null,n),e=Vc(t,t.pendingProps),e.flags|=2,Io(t),t.memoizedState=null,e}function Uc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(V){if(r.mode===`hidden`)return e=Vc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},zc(null,e);if(No(t),(e=ra)?(e=cm(e,aa),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Yi===null?null:{id:Xi,overflow:Zi},retryLane:536870912,hydrationErrors:null},n=zi(e),n.return=t,t.child=n,B=t,ra=null)):e=null,e===null)throw sa(t);return t.lanes=536870912,null}return Vc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(No(t),a){if(t.flags&256)t.flags&=-257,t=Hc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(Nc||xa(e,t,n,!1),a=(n&e.childLanes)!==0,Nc||a){if(To.current===null){if(r=nd,r!==null&&(s=xt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Di(e,s),Ld(r,e,s),Mc;Yd()}t=Hc(e,t,n)}else e=o.treeContext,ra=fm(s.nextSibling),B=t,V=!0,ia=null,aa=!1,e!==null&&na(t,e),t=Vc(t,r),t.flags|=134221824;return t}return e=Pi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Wc(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(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Gc(e,t,n,r,i){return Ca(t),n=$o(e,t,n,r,void 0,i),r=rs(),e!==null&&!Nc?(is(e,t,i),ll(e,t,i)):(V&&r&&ea(t),t.flags|=1,Pc(e,t,n,i),t.child)}function Kc(e,t,n,r,i,a){return Ca(t),t.updateQueue=null,n=ts(t,r,n,i),es(e),r=rs(),e!==null&&!Nc?(is(e,t,a),ll(e,t,a)):(V&&r&&ea(t),t.flags|=1,Pc(e,t,n,a),t.child)}function qc(e,t,n,r,i){if(Ca(t),t.stateNode===null){var a=Ai,o=n.contextType;typeof o==`object`&&o&&(a=wa(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=bc,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},mo(t),o=n.contextType,a.context=typeof o==`object`&&o?wa(o):Ai,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(yc(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&&bc.enqueueReplaceState(a,a.state,null),So(t,r,a,i),xo(),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=Cc(n,s);a.props=c;var l=a.context,u=n.contextType;o=Ai,typeof u==`object`&&u&&(o=wa(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)&&Sc(t,a,r,o),po=!1;var f=t.memoizedState;a.state=f,So(t,r,a,i),xo(),l=t.memoizedState,s||f!==l||po?(typeof d==`function`&&(yc(t,n,d,r),l=t.memoizedState),(c=po||xc(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,ho(e,t),o=t.memoizedProps,u=Cc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Ai,typeof l==`object`&&l&&(c=wa(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)&&Sc(t,a,r,c),po=!1,f=t.memoizedState,a.state=f,So(t,r,a,i),xo();var p=t.memoizedState;o!==d||f!==p||po||e!==null&&e.dependencies!==null&&Sa(e.dependencies)?(typeof s==`function`&&(yc(t,n,s,r),p=t.memoizedState),(u=po||xc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Sa(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,Wc(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=uo(t,e.child,null,i),t.child=uo(t,null,n,i)):Pc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=ll(e,t,i),e}function Jc(e,t,n,r){return da(),t.flags|=256,Pc(e,t,n,r),t.child}var Yc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Xc(e){return{baseLanes:e,cachePool:qa()}}function Zc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=fd),e}function Qc(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(Lo.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(V){if(i?Mo(t):Fo(),(e=ra)?(e=cm(e,aa),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Yi===null?null:{id:Xi,overflow:Zi},retryLane:536870912,hydrationErrors:null},n=zi(e),n.return=t,t.child=n,B=t,ra=null)):e=null,e===null)throw sa(t);return t.lanes=um(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(Fo(),i=t.mode,a=el({mode:`hidden`,children:a},i),r=Li(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=Xc(n),r.childLanes=Zc(e,o,n),t.memoizedState=Yc,zc(null,r)):(Mo(t),$c(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return nl(e,t,a,o,r,c,s,n)}return i?(Fo(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=Pi(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=Li(i,a,n,null),i.flags|=2):i=Pi(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,zc(null,r),r=t.child,i=e.child.memoizedState,i===null?i=Xc(n):(a=i.cachePool,a===null?a=qa():(s=Aa._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=Zc(e,o,n),t.memoizedState=Yc,zc(e.child,r)):(Mo(t),n=e.child,e=n.sibling,n=Pi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function $c(e,t){return t=el({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function el(e,t){return e=Mi(22,e,null,t),e.lanes=0,e}function tl(e,t,n){return uo(t,e.child,null,n),e=$c(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function nl(e,t,n,r,a,o,s,c){if(n)return t.flags&256?(Mo(t),t.flags&=-257,tl(e,t,c)):t.memoizedState===null?(Fo(),o=a.fallback,s=t.mode,a=el({mode:`visible`,children:a.children},s),o=Li(o,s,c,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,uo(t,e.child,null,c),a=t.child,a.memoizedState=Xc(c),a.childLanes=Zc(e,r,c),t.memoizedState=Yc,zc(null,a)):(Fo(),t.child=e.child,t.flags|=128,null);if(Mo(t),um(o)){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,r!==``&&(a=Error(i(419)),a.stack=``,a.digest=r,pa({value:a,source:null,stack:null})),tl(e,t,c)}if(Nc||xa(e,t,c,!1),r=(c&e.childLanes)!==0,Nc||r){if(To.current!==null)return tl(e,t,c);if(r=nd,r!==null&&(a=xt(r,c),a!==0&&a!==s.retryLane))throw s.retryLane=a,Di(e,a),Ld(r,e,a),Mc;return lm(o)||Yd(),tl(e,t,c)}return lm(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,ra=fm(o.nextSibling),B=t,V=!0,ia=null,aa=!1,e!==null&&na(t,e),t=$c(t,a.children),t.flags|=134221824,t)}function rl(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ya(e.return,t,n)}function il(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&Bo(n)===null&&(t=e),e=e.sibling}return t}function al(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 ol(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function sl(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Lo.current;if(t.flags&128)return Ro(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,Ro(t,o),i===`backwards`&&e!==null?(ol(e),Pc(e,t,r,n),ol(e)):Pc(e,t,r,n),r=V?Ki:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&rl(e,n,t);else if(e.tag===19)rl(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`backwards`:n=il(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,ol(t)),al(t,!0,i,null,a,r);break;case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Bo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}al(t,!0,n,null,a,r);break;case`together`:al(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=il(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),al(t,!1,i,n,a,r)}return t.child}function cl(e,t,n){var r=t.pendingProps;return _a(t,t.type,r.value),Pc(e,t,r.children,n),t.child}function ll(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ld|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(xa(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=Pi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Pi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function ul(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&Sa(e)))}function dl(e,t,n){switch(t.tag){case 3:ke(t,t.stateNode.containerInfo),_a(t,Aa,e.memoizedState.cache),da();break;case 27:case 5:je(t);break;case 4:ke(t,t.stateNode.containerInfo);break;case 10:_a(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,No(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return Mo(t),t.flags|=128,null;r=xa(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?Qc(e,t,n):(Mo(t),e=ll(e,t,n),e===null?null:e.sibling)}Mo(t);break;case 19:if(t.flags&128)return sl(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(xa(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return sl(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ro(t,Lo.current),r)break;return null;case 22:return t.lanes=0,Rc(e,t,n,t.pendingProps);case 24:_a(t,Aa,e.memoizedState.cache)}return ll(e,t,n)}function fl(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)Nc=!0;else{if(!ul(e,n)&&!(t.flags&128))return Nc=!1,dl(e,t,n);Nc=!!(e.flags&131072)}}else Nc=!1,V&&t.flags&1048576&&$i(t,Ki,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=eo(t.elementType),t.type=e,typeof e==`function`)Ni(e)?(r=Cc(e,r),t.tag=1,t=qc(null,t,e,r,n)):(t.tag=0,t=Gc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===j){t.tag=11,t=Fc(null,t,e,r,n);break a}if(a===se){t.tag=14,t=Ic(null,t,e,r,n);break a}if(a===ie){t.tag=10,t.type=e,t=cl(null,t,n);break a}}throw t=_e(e)||e,Error(i(306,t,``))}}return t;case 0:return Gc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Cc(r,t.pendingProps),qc(e,t,r,a,n);case 3:a:{if(ke(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,ho(e,t),So(t,r,null,n);var s=t.memoizedState;if(r=s.cache,_a(t,Aa,r),r!==o.cache&&ba(t,[Aa],n,!0),xo(),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=Jc(e,t,r,n);break a}if(r!==a){a=Hi(Error(i(424)),t),pa(a),t=Jc(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(ra=fm(e.firstChild),B=t,V=!0,ia=null,aa=!0,n=fo(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(da(),r===a){t=ll(e,t,n);break a}Pc(e,t,r,n)}t=t.child}return t;case 26:return Wc(e,t),e===null?(n=Nm(t.type,null,t.pendingProps,null))?t.memoizedState=n:V||(t.stateNode=hp(t.type,t.pendingProps,De.current,t)):t.memoizedState=Nm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return je(t),e===null&&V&&(r=t.stateNode=Z(t.type,t.pendingProps,De.current),B=t,aa=!0,a=ra,Tp(t.type)?(pm=a,ra=fm(r.firstChild)):ra=a),Pc(e,t,t.pendingProps.children,n),Wc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&V&&((a=r=ra)&&(r=om(r,t.type,t.pendingProps,aa),r===null?a=!1:(t.stateNode=r,B=t,ra=fm(r.firstChild),aa=!1,a=!0)),a||sa(t)),je(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,gp(a,o)?r=null:s!==null&&gp(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=$o(e,t,ns,null,null,n),sh._currentValue=a),Wc(e,t),Pc(e,t,r,n),t.child;case 6:return e===null&&V&&((e=n=ra)&&(n=sm(n,t.pendingProps,aa),n===null?e=!1:(t.stateNode=n,B=t,ra=null,e=!0)),e||sa(t)),null;case 13:return Qc(e,t,n);case 4:return ke(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=uo(t,null,r,n):Pc(e,t,r,n),t.child;case 11:return Fc(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,Wc(e,t),Pc(e,t,r,n),t.child;case 8:return Pc(e,t,t.pendingProps.children,n),t.child;case 12:return Pc(e,t,t.pendingProps.children,n),t.child;case 10:return cl(e,t,n);case 9:return a=t.type._context,r=t.pendingProps.children,Ca(t),a=wa(a),r=r(a),t.flags|=1,Pc(e,t,r,n),t.child;case 14:return Ic(e,t,t.type,t.pendingProps,n);case 15:return Lc(e,t,t.type,t.pendingProps,n);case 19:return sl(e,t,n);case 31:return Uc(e,t,n);case 22:return Rc(e,t,n,t.pendingProps);case 24:return Ca(t),r=wa(Aa),e===null?(a=Ga(),a===null&&(a=nd,o=ja(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},mo(t),_a(t,Aa,a)):((e.lanes&n)!==0&&(ho(e,t),So(t,null,null,n),xo()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,_a(t,Aa,r),r!==a.cache&&ba(t,[Aa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),_a(t,Aa,r))),Pc(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),r=t.pendingProps,r.name!=null&&r.name!==`auto`?t.flags|=e===null?18882560:18874368:V&&ea(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:Wc(e,t),Pc(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function pl(e){e.flags|=4}function ml(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?Jm(t,r):Jm(t,r)&&(r.src!==n.src||r.srcSet!==n.srcSet)),a){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(Kd())e.flags|=8192;else throw to=Za,Ya}}else e.flags&=-16777217}function hl(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Ym(t)){if(Kd())e.flags|=8192;else throw to=Za,Ya}}function gl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:ht(),e.lanes|=t,pd|=t)}function _l(e,t){if(!V)switch(e.tailMode){case`visible`:break;case`collapsed`:for(var n=e.tail,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;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function vl(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&1206910976,r|=i.flags&1206910976,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 yl(e,t,n){var r=t.pendingProps;switch(ta(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return vl(t),null;case 1:return vl(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),va(Aa),Ae(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ua(t)?pl(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,fa())),vl(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(pl(t),o===null?(vl(t),ml(t,a,null,r,n)):(vl(t),hl(t,o))):o?o===e.memoizedState?(vl(t),t.flags&=-16777217):(pl(t),vl(t),hl(t,o)):(e=e.memoizedProps,e!==r&&pl(t),vl(t),ml(t,a,e,r,n)),null;case 27:if(Me(t),n=De.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&pl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return vl(t),t.subtreeFlags&=-33554433,null}e=Te.current,ua(t)?ca(t,e):(e=Z(a,r,n),t.stateNode=e,pl(t))}return vl(t),t.subtreeFlags&=-33554433,null;case 5:if(Me(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&pl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return vl(t),t.subtreeFlags&=-33554433,null}if(o=Te.current,ua(t))ca(t,o);else{var s=fp(De.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);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(a,{is:r.is}):s.createElement(a)}}o[Dt]=t,o[Ot]=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(ap(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&pl(t)}}return vl(t),t.subtreeFlags&=-33554433,ml(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&pl(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=De.current,ua(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=B,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[Dt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||np(e.nodeValue,n)),e||sa(t,!0)}else e=fp(e).createTextNode(r),e[Dt]=t,t.stateNode=e}return vl(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=ua(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[Dt]=t}else da(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;vl(t),e=!1}else n=fa(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Io(t),t):(Io(t),null);if(t.flags&128)throw Error(i(558))}return vl(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=ua(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[Dt]=t}else da(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;vl(t),a=!1}else a=fa(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Io(t),t):(Io(t),null)}return Io(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),gl(t,t.updateQueue),vl(t),null);case 4:return Ae(),e===null&&Kf(t.stateNode.containerInfo),t.flags|=67108864,vl(t),null;case 10:return va(t.type),vl(t),null;case 19:if(zo(t),r=t.memoizedState,r===null)return vl(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)_l(r,!1);else{if(cd!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Bo(e),o!==null){for(t.flags|=128,_l(r,!1),e=o.updateQueue,t.updateQueue=e,gl(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Fi(n,e),n=n.sibling;return Ro(t,Lo.current&1|2),V&&Qi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ge()>yd&&(t.flags|=128,a=!0,_l(r,!1),t.lanes=4194304)}}else{if(!a){if(e=Bo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,gl(t,e),_l(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!V)return vl(t),null}else 2*Ge()-r.renderingStartTime>yd&&n!==536870912&&(t.flags|=128,a=!0,_l(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)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ge(),e.sibling=null,o=Lo.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||V?Ro(t,o):(n=o,we(Ao,t),we(Lo,n),jo===null&&(jo=t)),V&&Qi(t,r.treeForkCount),e}return vl(t),null;case 22:case 23:return Io(t),ko(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(vl(t),t.subtreeFlags&6&&(t.flags|=8192)):vl(t),n=t.updateQueue,n!==null&&gl(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&&Ce(Wa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),va(Aa),vl(t),null;case 25:return null;case 30:return t.flags|=33554432,vl(t),null}throw Error(i(156,t.tag))}function bl(e,t){switch(ta(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return va(Aa),Ae(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Me(t),null;case 31:if(t.memoizedState!==null){if(Io(t),t.alternate===null)throw Error(i(340));da()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Io(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));da()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return zo(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return Ae(),null;case 10:return va(t.type),null;case 22:case 23:return Io(t),ko(),e!==null&&Ce(Wa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return va(Aa),null;case 25:return null;default:return null}}function xl(e,t){switch(ta(t),t.tag){case 3:va(Aa),Ae();break;case 26:case 27:case 5:Me(t);break;case 4:Ae();break;case 31:t.memoizedState!==null&&Io(t);break;case 13:Io(t);break;case 19:zo(t);break;case 10:va(t.type);break;case 22:case 23:Io(t),ko(),e!==null&&Ce(Wa);break;case 24:va(Aa)}}function Sl(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){_f(t,t.return,e)}}function Cl(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){_f(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){_f(t,t.return,e)}}function wl(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{wo(t,n)}catch(t){_f(e,e.return,t)}}}function Tl(e,t,n){n.props=Cc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){_f(e,t,n)}}function El(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:var i=e.stateNode,a=_i(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Lp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Rp(e);m(e.child,!1,tm,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){_f(e,t,n)}}function Dl(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){_f(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){_f(e,t,n)}else n.current=null}}function Ol(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)rm(e.stateNode,t[n])}function kl(e){for(var t=e.return;t!==null&&(Ml(t)&&rm(e.stateNode,t.stateNode),!jl(t));)t=t.return}function Al(e){for(var t=e.return;t!==null&&(Ml(t)&&im(e.stateNode,t.stateNode),!jl(t));)t=t.return}function jl(e){return e.tag===5||e.tag===3||e.tag===27}function Ml(e){return e&&e.tag===7&&e.stateNode!==null}function Nl(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){_f(e,e.return,t)}}function Pl(e,t,n){try{var r=e.stateNode;sp(r,e.type,n,t),r[Ot]=t}catch(t){_f(e,e.return,t)}}function Fl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Tp(e.type)||e.tag===4}function Il(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Fl(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&&Tp(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 Ll(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(i,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(i),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Cn)),Ol(e,r),P=!0;else if(i!==4&&(i===27&&(Ol(e,r),r=null,Tp(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(Ll(e,t,n,r),e=e.sibling;e!==null;)Ll(e,t,n,r),e=e.sibling}function Rl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),Ol(e,r),P=!0;else if(i!==4&&(i===27&&(Ol(e,r),r=null,Tp(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Rl(e,t,n,r),e=e.sibling;e!==null;)Rl(e,t,n,r),e=e.sibling}function zl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);ap(t,r,n),t[Dt]=e,t[Ot]=n}catch(t){_f(e,e.return,t)}}var Bl=!1,Vl=null;function Hl(e){(e.tag===30||e.subtreeFlags&33554432)&&(Bl=!0)}var Ul=null;function Wl(){var e=Ul;return Ul=null,e}var Gl=0;function Kl(e,t,n,r,i){return Gl=0,ql(e.child,t,n,r,i)}function ql(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=jp(o);r.push(s),s.view&&(a=!0)}else a||jp(o).view&&(a=!0);Bl=!0,Op(o,Gl===0?t:t+`_`+Gl,n),Gl++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&i||ql(e.child,t,n,r,i)&&(a=!0));e=e.sibling}return a}function Jl(e,t){for(;e!==null;)e.tag===5?kp(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||Jl(e.child,t)),e=e.sibling}function Yl(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Yl(e),e.tag===30&&e.flags&18874368&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name===`auto`)throw Error(i(544));var n=t.name;t=yi(t.default,t.share),t!==`none`&&(Kl(e,n,t,null,!1)||Jl(e.child,!1))}e=e.sibling}}function Xl(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=_i(r,n),a=yi(r.default,n.paired?r.share:r.enter);a===`none`?Yl(e):Kl(e,i,a,null,!1)?(Yl(e),n.paired||t||Id(e,r.onEnter)):Jl(e.child,!1)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Xl(e,t),e=e.sibling;else Yl(e)}function Zl(e){if(Vl!==null&&Vl.size!==0){var t=Vl;if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var n=e.memoizedProps,r=n.name;if(r!=null&&r!==`auto`){var i=t.get(r);if(i!==void 0){var a=yi(n.default,n.share);if(a!==`none`&&(Kl(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,Id(e,n.onShare)):Jl(e.child,!1)),t.delete(r),t.size===0)break}}}Zl(e)}e=e.sibling}}}function Ql(e){if(e.tag===30){var t=e.memoizedProps,n=_i(t,e.stateNode),r=Vl===null?void 0:Vl.get(n),i=yi(t.default,r===void 0?t.exit:t.share);i!==`none`&&(Kl(e,n,i,null,!1)?r===void 0?Id(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,Vl.delete(n),Id(e,t.onShare)):Jl(e.child,!1)),Vl!==null&&Zl(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Ql(e),e=e.sibling;else Vl!==null&&Zl(e)}function $l(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=_i(t,e.stateNode);t=yi(t.default,t.update),e.flags&=-5,t!==`none`&&Kl(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&$l(e);e=e.sibling}}function eu(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var t=e.stateNode;t.paired!==null&&(t.paired=null,Jl(e.child,!1))}eu(e)}e=e.sibling}}function tu(e){if(e.tag===30)e.stateNode.paired=null,Jl(e.child,!1),eu(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)tu(e),e=e.sibling;else eu(e)}function nu(e){for(e=e.child;e!==null;)e.tag===30?Jl(e.child,!1):e.subtreeFlags&33554432&&nu(e),e=e.sibling}function ru(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&Gl<a.length){var l=a[Gl],u=jp(c);(l.view||u.view)&&(s=!0);var d;if(d=!(e.flags&4)){if(u.clip)d=!0;else{d=l.rect;var f=u.rect;d=d.y!==f.y||d.x!==f.x||d.height!==f.height||d.width!==f.width}}d&&(e.flags|=4),u.abs?u=!l.abs:(l=l.rect,u=u.rect,u=l.height!==u.height||l.width!==u.width),u&&(e.flags|=32)}else e.flags|=32;e.flags&4&&Op(c,Gl===0?n:n+`_`+Gl,i),s&&e.flags&4||(Ul===null&&(Ul=[]),Ul.push(c,Gl===0?r:r+`_`+Gl,t.memoizedProps)),Gl++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:ru(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function iu(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=_i(n,r),a=yi(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(Mp)}else o=e.memoizedState,e.memoizedState=null;r=e;var s=e.child;Gl=0,i=ru(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||Id(e,n.onUpdate))}else e.subtreeFlags&33554432&&iu(e,t);e=e.sibling}}var au=!1,W=!1,ou=!1,su=!1,cu=typeof WeakSet==`function`?WeakSet:Set,lu=null,uu=!1,du=!1,fu=!1,pu=!1;function mu(e,t,n){if(e=e.containerInfo,up=gh,e=qr(e),Jr(e)){if(`selectionStart`in e)var r={start:e.selectionStart,end:e.selectionEnd};else a:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==r||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===r&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}r=c===-1||l===-1?null:{start:c,end:l}}else r=null}r||={start:0,end:0}}else r=null;for(dp={focusedElem:e,selectionRange:r},gh=!1,n=(n&335544064)===n,lu=t,t=n?9270:1024;lu!==null;){if(e=lu,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&Ql(r[a]);if(e.alternate===null&&e.flags&2)n&&Hl(e),hu(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&Ql(r),hu(n);continue}if(r!==null&&r.memoizedState!==null){n&&Hl(e),hu(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,lu=r):(n&&$l(e),hu(n))}}Vl=null}function hu(e){for(;lu!==null;){var t=lu,n=e,r=t.alternate,a=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if(a&1024&&r!==null){n=void 0,a=r.memoizedProps,r=r.memoizedState;var o=t.stateNode;try{var s=Cc(t.type,a);n=o.getSnapshotBeforeUpdate(s,r),o.__reactInternalSnapshotBeforeUpdate=n}catch(e){_f(t,t.return,e)}}break;case 3:if(a&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)am(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:am(r);break;default:r.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&r!==null&&(n=_i(r.memoizedProps,r.stateNode),a=t.memoizedProps,a=yi(a.default,a.update),a!==`none`&&Kl(r,n,a,r.memoizedState=[],!0));break;default:if(a&1024)throw Error(i(163))}if(r=t.sibling,r!==null){r.return=t.return,lu=r;break}lu=t.return}}function gu(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Iu(e,n),r&4&&Sl(5,n);break;case 1:if(Iu(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){_f(n,n.return,e)}else{var i=Cc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){_f(n,n.return,e)}}}r&64&&wl(n),r&512&&El(n,n.return);break;case 3:if(Iu(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{wo(e,t)}catch(e){_f(n,n.return,e)}}break;case 27:t===null&&r&4&&zl(n);case 26:case 5:Iu(e,n),t===null&&r&4&&Nl(n),r&512&&El(n,n.return);break;case 12:Iu(e,n);break;case 31:Iu(e,n),r&4&&Tu(e,n);break;case 13:Iu(e,n),r&4&&Eu(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=xf.bind(null,n),dm(e,n))));break;case 22:if(r=n.memoizedState!==null||au,!r){var a=t!==null&&t.memoizedState!==null||W;t=au,i=W,au=r,(W=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),Ru(e,n,r)):Iu(e,n),au=t,W=i}break;case 30:Iu(e,n),r&512&&El(n,n.return);break;case 7:r&512&&El(n,n.return);default:Iu(e,n)}}function _u(e,t){for(e=e.child;e!==null;)vu(e,t),e=e.sibling}function vu(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var r=n.style;typeof r.setProperty==`function`?r.setProperty(`display`,`none`,`important`):r.display=`none`}else{var i=e.stateNode,a=e.memoizedProps.style,o=a!=null&&a.hasOwnProperty(`display`)?a.display:null;i.style.display=o==null||typeof o==`boolean`?``:(``+o).trim()}}catch(t){_f(e,e.return,t)}yu(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,P=!0}catch(t){_f(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?Dp(s,!0):Dp(e.stateNode,!1)}catch(t){_f(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&_u(e,t);break;default:_u(e,t)}}function yu(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:vu(n,r);break a;case 22:n.memoizedState===null&&yu(n,r);break a;default:yu(n,r)}}e=e.sibling}}function bu(e){var t=e.alternate;t!==null&&(e.alternate=null,bu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&It(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 xu=null,Su=!1;function Cu(e,t,n){for(n=n.child;n!==null;)wu(e,t,n),n=n.sibling}function wu(e,t,n){if(tt&&typeof tt.onCommitFiberUnmount==`function`)try{tt.onCommitFiberUnmount(et,n)}catch{}switch(n.tag){case 26:W||Dl(n,t),Cu(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!W&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:W||Dl(n,t),Al(n);var r=xu,i=Su;Tp(n.type)&&(xu=n.stateNode,Su=!1),Cu(e,t,n),vm(n.stateNode,n.type,n.memoizedProps),xu=r,Su=i;break;case 5:W||Dl(n,t),Al(n);case 6:if(n.tag===6&&Al(n),r=xu,i=Su,xu=null,Cu(e,t,n),xu=r,Su=i,xu!==null){if(Su)try{(xu.nodeType===9?xu.body:xu.nodeName===`HTML`?xu.ownerDocument.body:xu).removeChild(n.stateNode),P=!0}catch(e){_f(n,t,e)}else try{xu.removeChild(n.stateNode),P=!0}catch(e){_f(n,t,e)}}break;case 18:xu!==null&&(Su?(e=xu,Ep(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Hh(e)):Ep(xu,n.stateNode));break;case 4:r=xu,i=Su,xu=n.stateNode.containerInfo,Su=!0,Cu(e,t,n),xu=r,Su=i;break;case 0:case 11:case 14:case 15:Cl(2,n,t),W||Cl(4,n,t),Cu(e,t,n);break;case 1:W||(Dl(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Tl(n,t,r)),Cu(e,t,n);break;case 21:Cu(e,t,n);break;case 22:W=(r=W)||n.memoizedState!==null,Cu(e,t,n),W=r;break;case 30:Dl(n,t),Cu(e,t,n);break;case 7:W||Dl(n,t),Cu(e,t,n);break;default:Cu(e,t,n)}}function Tu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Hh(e)}catch(e){_f(t,t.return,e)}}}function Eu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Hh(e)}catch(e){_f(t,t.return,e)}}function Du(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new cu),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new cu),t;default:throw Error(i(435,e.tag))}}function Ou(e,t){var n=Du(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Sf.bind(null,e,t);t.then(r,r)}})}function ku(e,t,n){var r=t.deletions;if(r!==null)for(var a=0;a<r.length;a++){var o=r[a],s=e,c=t,l=c;a:for(;l!==null;){switch(l.tag){case 27:if(Tp(l.type)){xu=l.stateNode,Su=!1;break a}break;case 5:xu=l.stateNode,Su=!1;break a;case 3:case 4:xu=l.stateNode.containerInfo,Su=!0;break a}l=l.return}if(xu===null)throw Error(i(160));wu(s,c,o),xu=null,Su=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)ju(t,e,n),t=t.sibling}var Au=null;function ju(e,t,n){var r=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(a&4&&(r=e.updateQueue,r=r===null?null:r.events,r!==null))for(var o=0;o<r.length;o++){var s=r[o];s.ref.impl=s.nextImpl}ku(t,e,n),Mu(e),a&4&&(Cl(3,e,e.return),Sl(3,e),Cl(5,e,e.return));break;case 1:ku(t,e,n),Mu(e),a&512&&(W||r===null||Dl(r,r.return)),a&64&&au&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(o=Au,ku(t,e,n),Mu(e),a&512&&(W||r===null||Dl(r,r.return)),a&4){if(a=r===null?null:r.memoizedState,n=e.memoizedState,r===null){if(n===null){if(e.stateNode===null){if(au)e.stateNode=hp(e.type,e.memoizedProps,t.containerInfo,e);else{a:{t=e.type,n=e.memoizedProps,a=o.ownerDocument||o;b:switch(t){case`title`:r=a.getElementsByTagName(`title`)[0],(!r||r[Pt]||r[Dt]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=a.createElement(t),a.head.insertBefore(r,a.querySelector(`head > title`))),ap(r,t,n),r[Dt]=e,Vt(r),t=r;break a;case`link`:if(o=Gm(`link`,`href`,a).get(t+(n.href||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&r.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&r.getAttribute(`title`)===(n.title==null?null:n.title)&&r.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(s,1);break b}}r=a.createElement(t),ap(r,t,n),a.head.appendChild(r);break;case`meta`:if(o=Gm(`meta`,`content`,a).get(t+(n.content||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`content`)===(n.content==null?null:``+n.content)&&r.getAttribute(`name`)===(n.name==null?null:n.name)&&r.getAttribute(`property`)===(n.property==null?null:n.property)&&r.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){o.splice(s,1);break b}}r=a.createElement(t),ap(r,t,n),a.head.appendChild(r);break;default:throw Error(i(468,t))}r[Dt]=e,Vt(r),t=r}e.stateNode=t}}else au||Km(o,e.type,e.stateNode)}else e.stateNode=Bm(o,n,e.memoizedProps)}else a===n?n===null&&e.stateNode!==null&&Pl(e,e.memoizedProps,r.memoizedProps):(a===null?(t=r.stateNode,t===null||W||t.parentNode.removeChild(t)):a.count--,n===null?au||Km(o,e.type,e.stateNode):Bm(o,n,e.memoizedProps))}break;case 27:ku(t,e,n),Mu(e),a&512&&(W||r===null||Dl(r,r.return)),r!==null&&a&4&&Pl(e,e.memoizedProps,r.memoizedProps);break;case 5:if(o=ou,ou=!1,ku(t,e,n),ou=o,Mu(e),a&512&&(W||r===null||Dl(r,r.return)),e.flags&32){t=e.stateNode;try{hn(t,``),P=!0}catch(t){_f(e,e.return,t)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,Pl(e,t,r===null?t:r.memoizedProps)),a&1024&&(su=!0);break;case 6:if(ku(t,e,n),Mu(e),a&4){if(e.stateNode===null)throw Error(i(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,P=!0}catch(t){_f(e,e.return,t)}}break;case 3:if(P=!1,Wm=null,o=Au,Au=xm(t.containerInfo),ku(t,e,n),Au=o,Mu(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{Hh(t.containerInfo)}catch(t){_f(e,e.return,t)}su&&(su=!1,Nu(e)),P=!1;break;case 4:a=ou,ou=au,r=Zt(),o=Au,Au=xm(e.stateNode.containerInfo),ku(t,e,n),Mu(e),Au=o,P&&du&&(fu=!0),P=r,ou=a;break;case 12:ku(t,e,n),Mu(e);break;case 31:ku(t,e,n),Mu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Ou(e,t)));break;case 13:ku(t,e,n),Mu(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(_d=Ge()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Ou(e,t)));break;case 22:o=e.memoizedState!==null,s=r!==null&&r.memoizedState!==null;var c=au,l=W,u=ou;au=c||o,ou=u||o,W=l||s,ku(t,e,n),W=l,ou=u,au=c,Mu(e),a&8192&&(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,!o||r===null||s||au||W||(t=s||W,n=au,r=W,au=o||au,W=t,Lu(e,2),au=n,W=r),!o&&ou||_u(e,o)),a&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,Ou(e,n))));break;case 19:ku(t,e,n),Mu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Ou(e,t)));break;case 30:a&512&&(W||r===null||Dl(r,r.return)),a=Zt(),o=du,s=(n&335544064)===n,c=e.memoizedProps,du=s&&yi(c.default,c.update)!==`none`,ku(t,e,n),Mu(e),s&&r!==null&&P&&(e.flags|=4),du=o,P=a;break;case 21:break;case 7:a&512&&(W||r===null||Dl(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:ku(t,e,n),Mu(e)}}function Mu(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Fl(r)){n=r;break}r=r.return}r=null;for(var a=e.return;a!==null;){if(Ml(a)){var o=a.stateNode;r===null?r=[o]:r.push(o)}if(jl(a))break;a=a.return}var s=r;if(n==null)throw Error(i(160));switch(n.tag){case 27:var c=n.stateNode;Rl(e,Il(e),c,s);break;case 5:var l=n.stateNode;n.flags&32&&(hn(l,``),n.flags&=-33),Rl(e,Il(e),l,s);break;case 3:case 4:var u=n.stateNode.containerInfo;Ll(e,Il(e),u,s);break;default:throw Error(i(161))}}catch(t){_f(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Nu(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Nu(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,gh=!0,t.reset(),gh=!1),e=e.sibling}}function Pu(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Fu(t,e),t=t.sibling;else iu(t,!1)}function Fu(e,t){var n=e.alternate;if(n===null)Xl(e,!1);else switch(e.tag){case 3:if(pu=uu=!1,Wl(),Pu(t,e),!uu&&!fu){if(e=Ul,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];kp(n,e[r+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(`+i+`)`})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===``&&(e.style.viewTransitionName=`none`,e.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(root)`}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition`})),pu=!0}Ul=null;break;case 5:Pu(t,e);break;case 4:r=uu,uu=!1,Pu(t,e),uu&&(fu=!0),uu=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?Pu(t,e):Xl(e,!1));break;case 30:r=uu,i=Wl(),uu=!1,Pu(t,e),uu&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=_i(a,o),o=_i(n.memoizedProps,o);var s=yi(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,Gl=0,t=ru(e,n,t,o,s,a,!0),Gl!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(Id(e,e.memoizedProps.onUpdate),Ul=i):i!==null&&(i.push.apply(i,Ul),Ul=i),uu=e.flags&32?!0:r;break;default:Pu(t,e)}}function Iu(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)gu(e,t.alternate,t),t=t.sibling}function Lu(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:Cl(4,n,n.return),Lu(n,r);break;case 1:Dl(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&Tl(n,n.return,i),Lu(n,r);break;case 27:r&2&&vm(n.stateNode,n.type,n.memoizedProps);case 5:Dl(n,n.return),n.tag!==5&&n.tag!==27||Al(n),Lu(n,r);break;case 6:Al(n);break;case 26:Dl(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||W||i.parentNode.removeChild(i),Lu(n,r);break;case 22:n.memoizedState===null&&Lu(n,r);break;case 30:Dl(n,n.return),Lu(n,r);break;case 7:Dl(n,n.return);default:Lu(n,r)}e=e.sibling}}function Ru(e,t,n){for(n=t.subtreeFlags&8772?n:n&-2,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags,s=!!(n&1);switch(a.tag){case 0:case 11:case 15:Ru(i,a,n),Sl(4,a);break;case 1:if(Ru(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){_f(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var c=r.stateNode;try{var l=i.shared.hiddenCallbacks;if(l!==null)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)Co(l[i],c)}catch(e){_f(r,r.return,e)}}s&&o&64&&wl(a),El(a,a.return);break;case 27:n&2&&zl(a);case 5:a.tag!==5&&a.tag!==27||kl(a),Ru(i,a,n),s&&r===null&&o&4&&Nl(a),El(a,a.return);break;case 6:kl(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||au||Km(xm(c.ownerDocument),a.type,c),Ru(i,a,n),s&&r===null&&o&4&&Nl(a),El(a,a.return);break;case 12:Ru(i,a,n);break;case 31:Ru(i,a,n),s&&o&4&&Tu(i,a);break;case 13:Ru(i,a,n),s&&o&4&&Eu(i,a);break;case 22:a.memoizedState===null&&Ru(i,a,n),El(a,a.return);break;case 30:Ru(i,a,n),El(a,a.return);break;case 7:El(a,a.return);default:Ru(i,a,n)}t=t.sibling}}function zu(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&&Ma(n))}function Bu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ma(e))}function Vu(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)Hu(e,t,n,r),t=t.sibling;else i&&nu(t)}function Hu(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&tu(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:Vu(e,t,n,r),a&2048&&Sl(9,t);break;case 1:Vu(e,t,n,r);break;case 3:Vu(e,t,n,r),i&&pu&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,e.style.viewTransitionName===`root`&&(e.style.viewTransitionName=``),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===`none`&&(e.style.viewTransitionName=``)),a&2048&&(a=null,t.alternate!==null&&(a=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==a&&(t.refCount++,a!=null&&Ma(a)));break;case 12:if(a&2048){Vu(e,t,n,r),a=t.stateNode;try{var o=t.memoizedProps,s=o.id,c=o.onPostCommit;typeof c==`function`&&c(s,t.alternate===null?`mount`:`update`,a.passiveEffectDuration,-0)}catch(e){_f(t,t.return,e)}}else Vu(e,t,n,r);break;case 31:Vu(e,t,n,r);break;case 13:Vu(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,s=t.alternate,t.memoizedState===null?(i&&s!==null&&s.memoizedState!==null&&tu(t),o._visibility&2?Vu(e,t,n,r):(o._visibility|=2,Uu(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&tu(s),o._visibility&2?Vu(e,t,n,r):Wu(e,t)),a&2048&&zu(s,t);break;case 24:Vu(e,t,n,r),a&2048&&Bu(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(Jl(a.child,!0),Jl(t.child,!0))),Vu(e,t,n,r);break;default:Vu(e,t,n,r)}}function Uu(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:Uu(a,o,s,c,i),Sl(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Uu(a,o,s,c,i)):u._visibility&2?Uu(a,o,s,c,i):Wu(a,o),i&&l&2048&&zu(o.alternate,o);break;case 24:Uu(a,o,s,c,i),i&&l&2048&&Bu(o.alternate,o);break;default:Uu(a,o,s,c,i)}t=t.sibling}}function Wu(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:Wu(n,r),i&2048&&zu(r.alternate,r);break;case 24:Wu(n,r),i&2048&&Bu(r.alternate,r);break;default:Wu(n,r)}t=t.sibling}}var Gu=8192;function Ku(e,t,n){if(e.subtreeFlags&Gu)for(e=e.child;e!==null;)qu(e,t,n),e=e.sibling}function qu(e,t,n){switch(e.tag){case 26:Ku(e,t,n),e.flags&Gu&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&Zm(n,e)):Qm(n,Au,e.memoizedState,e.memoizedProps));break;case 5:Ku(e,t,n),e.flags&Gu&&(e=e.stateNode,(t&335544128)===t&&Zm(n,e));break;case 3:case 4:var r=Au;Au=xm(e.stateNode.containerInfo),Ku(e,t,n),Au=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Gu,Gu=16777216,Ku(e,t,n),Gu=r):Ku(e,t,n));break;case 30:if((e.flags&Gu)!==0&&(r=e.memoizedProps.name,r!=null&&r!==`auto`)){var i=e.stateNode;i.paired=null,Vl===null&&(Vl=new Map),Vl.set(r,i)}Ku(e,t,n);break;default:Ku(e,t,n)}}function Ju(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 Yu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];lu=r,Qu(r,e)}Ju(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Xu(e),e=e.sibling}function Xu(e){switch(e.tag){case 0:case 11:case 15:Yu(e),e.flags&2048&&Cl(9,e,e.return);break;case 3:Yu(e);break;case 12:Yu(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Zu(e)):Yu(e);break;default:Yu(e)}}function Zu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];lu=r,Qu(r,e)}Ju(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Cl(8,t,t.return),Zu(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Zu(t));break;default:Zu(t)}e=e.sibling}}function Qu(e,t){for(;lu!==null;){var n=lu;switch(n.tag){case 0:case 11:case 15:Cl(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:Ma(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,lu=r;else a:for(n=e;lu!==null;){r=lu;var i=r.sibling,a=r.return;if(bu(r),r===n){lu=null;break a}if(i!==null){i.return=a,lu=i;break a}lu=a}}}var $u={getCacheForType:function(e){var t=wa(Aa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return wa(Aa).controller.signal}},ed=typeof WeakMap==`function`?WeakMap:Map,td=0,nd=null,G=null,K=0,q=0,rd=null,id=!1,ad=!1,od=!1,sd=0,cd=0,ld=0,ud=0,dd=0,fd=0,pd=0,md=null,hd=null,gd=!1,_d=0,vd=0,yd=1/0,bd=null,xd=null,Sd=0,Cd=null,wd=null,Td=0,Ed=0,Dd=null,Od=null,kd=null,Ad=null,jd=null,Md=0,Nd=null;function Pd(){return td&2&&K!==0?K&-K:M.T===null?wt():If()}function Fd(){if(fd===0){if(!(K&536870912)||V){var e=ct;ct<<=1,!(ct&3932160)&&(ct=262144),fd=e}else fd=536870912}return e=Ao.current,e!==null&&(e.flags|=32),fd}function Id(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=Lp(_i(e.memoizedProps,n))),Ad===null&&(Ad=[]),Ad.push(t.bind(null,r))}}function Ld(e,t,n){(e===nd&&(q===2||q===9)||e.cancelPendingCommit!==null)&&(Wd(e,0),Vd(e,K,fd,!1)),_t(e,n),(!(td&2)||e!==nd)&&(e===nd&&(!(td&2)&&(ud|=n),cd===4&&Vd(e,K,fd,!1)),Af(e))}function Rd(e,t,n){if(td&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||ft(e,t),a=r?Qd(e,t):Xd(e,t,!0),o=r;do{if(a===0){ad&&!r&&Vd(e,t,0,!1);break}if(n=e.current.alternate,o&&!Bd(n))a=Xd(e,t,!1),o=!1;else{if(a===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;a=md;var l=c.current.memoizedState.isDehydrated;if(l&&(Wd(c,s).flags|=256),s=Xd(c,s,!1),s!==2&&s!==6){if(od&&!l){c.errorRecoveryDisabledLanes|=o,ud|=o,a=4;break a}o=hd,hd=a,o!==null&&(hd===null?hd=o:hd.push.apply(hd,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Wd(e,0),Vd(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:Vd(r,t,fd,!id);break a;case 2:hd=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=_d+300-Ge(),10<a)){if(Vd(r,t,fd,!id),dt(r,0,!0)!==0)break a;Td=t,r.timeoutHandle=yp(zd.bind(null,r,n,hd,bd,gd,t,fd,ud,pd,id,o,`Throttled`,-0,0),a);break a}zd(r,n,hd,bd,gd,t,fd,ud,pd,id,o,null,-0,0)}break}}while(1);Af(e)}function zd(e,t,n,r,i,a,o,s,c,l,u,d,f,p){e.timeoutHandle=-1;var m=t.subtreeFlags,h=(a&335544064)===a;d=null,(h||m&8192||(m&16785408)==16785408)&&(d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Cn},Vl=null,qu(t,a,d),h&&(m=d,h=e.containerInfo,h=(h.nodeType===9?h:h.ownerDocument).__reactViewTransition,h!=null&&(m.count++,m.waitingForViewTransition=!0,m=nh.bind(m),h.finished.then(m,m))),m=(a&62914560)===a?_d-Ge():(a&4194048)===a?vd-Ge():0,m=eh(d,m),m!==null)?(Td=a,e.cancelPendingCommit=m(of.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),Vd(e,a,o,!l)):of(e,t,a,n,r,i,o,s,c,l,u,d)}function Bd(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(!Vr(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 Vd(e,t,n,r){t=pt(e,t),t&=~dd,t&=~ud,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-rt(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&yt(e,n,t)}function Hd(){return td&6?!0:(jf(0,!1),!1)}function Ud(){if(G!==null){if(q===0)var e=G.return;else e=G,ga=ha=null,as(e),io=null,ao=0,e=G;for(;e!==null;)xl(e.alternate,e),e=e.return;G=null}}function Wd(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,bp(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Td=0,Ud(),nd=e,G=n=Pi(e.current,null),K=t,q=0,rd=null,id=!1,ad=ft(e,t),od=!1,pd=fd=dd=ud=ld=cd=0,hd=md=null,gd=!1,sd=pt(e,t),wi(),n}function Gd(e,t){H=null,M.H=hc,t===Ja||t===Xa?(t=no(),q=3):t===Ya?(t=no(),q=4):q=t===Mc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,rd=t,G===null&&(cd=1,Ec(e,Hi(t,e.current)))}function Kd(){var e=Ao.current;return e===null?!0:(K&4194048)===K?jo===null:(K&62914560)===K||K&536870912?e===jo:!1}function qd(){var e=M.H;return M.H=hc,e===null?hc:e}function Jd(){var e=M.A;return M.A=$u,e}function Yd(){cd=4,id||(K&4194048)!==K&&Ao.current!==null||(ad=!0),!(ld&134217727)&&!(ud&134217727)||nd===null||Vd(nd,K,fd,!1)}function Xd(e,t,n){var r=td;td|=2;var i=qd(),a=Jd();(nd!==e||K!==t)&&(bd=null,Wd(e,t)),t=!1;var o=cd;a:do try{if(q!==0&&G!==null){var s=G,c=rd;switch(q){case 8:Ud(),o=6;break a;case 3:case 2:case 9:case 6:Ao.current===null&&(t=!0);var l=q;if(q=0,rd=null,nf(e,s,c,l),n&&ad){o=0;break a}break;default:l=q,q=0,rd=null,nf(e,s,c,l)}}Zd(),o=cd;break}catch(t){Gd(e,t)}while(1);return t&&e.shellSuspendCounter++,ga=ha=null,td=r,M.H=i,M.A=a,G===null&&(nd=null,K=0,wi()),o}function Zd(){for(;G!==null;)ef(G)}function Qd(e,t){var n=td;td|=2;var r=qd(),a=Jd();nd!==e||K!==t?(bd=null,yd=Ge()+500,Wd(e,t)):ad=ft(e,t);a:do try{if(q!==0&&G!==null){t=G;var o=rd;b:switch(q){case 1:q=0,rd=null,nf(e,t,o,1);break;case 2:case 9:if(Qa(o)){q=0,rd=null,tf(t);break}t=function(){q!==2&&q!==9||nd!==e||(q=7),Af(e)},o.then(t,t);break a;case 3:q=7;break a;case 4:q=5;break a;case 7:Qa(o)?(q=0,rd=null,tf(t)):(q=0,rd=null,nf(e,t,o,7));break;case 5:var s=null;switch(G.tag){case 26:s=G.memoizedState;case 5:case 27:var c=G;if(s?Ym(s):c.stateNode.complete){q=0,rd=null;var l=c.sibling;if(l!==null)G=l;else{var u=c.return;u===null?G=null:(G=u,rf(u))}break b}}q=0,rd=null,nf(e,t,o,5);break;case 6:q=0,rd=null,nf(e,t,o,6);break;case 8:Ud(),cd=6;break a;default:throw Error(i(462))}}$d();break}catch(t){Gd(e,t)}while(1);return ga=ha=null,M.H=r,M.A=a,td=n,G===null?(nd=null,K=0,wi(),cd):0}function $d(){for(;G!==null&&!Ue();)ef(G)}function ef(e){var t=fl(e.alternate,e,sd);e.memoizedProps=e.pendingProps,t===null?rf(e):G=t}function tf(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Kc(n,t,t.pendingProps,t.type,void 0,K);break;case 11:t=Kc(n,t,t.pendingProps,t.type.render,t.ref,K);break;case 5:as(t);var r=t;r===B&&(V?(la(r),r.tag===5&&r.stateNode!=null&&(ra=r.stateNode)):(la(r),V=!0));default:xl(n,t),t=G=Fi(t,sd),t=fl(n,t,sd)}e.memoizedProps=e.pendingProps,t===null?rf(e):G=t}function nf(e,t,n,r){ga=ha=null,as(t),io=null,ao=0;var i=t.return;try{if(jc(e,i,t,n,K)){cd=1,Ec(e,Hi(n,e.current)),G=null;return}}catch(t){if(i!==null)throw G=i,t;cd=1,Ec(e,Hi(n,e.current)),G=null;return}t.flags&32768?(V||r===1?e=!0:ad||K&536870912?e=!1:(id=e=!0,(r===2||r===9||r===3||r===6)&&(r=Ao.current,r!==null&&r.tag===13&&(r.flags|=16384))),af(t,e)):rf(t)}function rf(e){var t=e;do{if(t.flags&32768){af(t,id);return}e=t.return;var n=yl(t.alternate,t,sd);if(n!==null){G=n;return}if(t=t.sibling,t!==null){G=t;return}G=t=e}while(t!==null);cd===0&&(cd=5)}function af(e,t){do{var n=bl(e.alternate,e);if(n!==null){n.flags&=32767,G=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){G=e;return}G=e=n}while(e!==null);cd=6,G=null}function of(e,t,n,r,a,o,s,c,l,u,d,f){e.cancelPendingCommit=null;do mf();while(Sd!==0);if(td&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));e===nd&&(G=nd=null,K=0),wd=t,Cd=e,Td=n,Dd=a,Od=r,sf(e,t,n,s,c,l,f)}}function sf(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(Ed=s,s|=Ci,vt(e,n,s,r,i,a),Ad=null,(n&335544064)===n?(jd=Fa(e),r=10262):(jd=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,Cf(Ye,function(){return hf(),null})):(e.callbackNode=null,e.callbackPriority=0),Bl=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=M.T,M.T=null,i=N.p,N.p=2,a=td,td|=4;try{mu(e,t,n)}finally{td=a,N.p=i,M.T=r}}Sd=1,Bl?kd=Fp(o,e.containerInfo,jd,uf,df,lf,ff,hf,cf,null,null):(uf(),df(),ff())}function cf(e){if(Sd!==0){var t=Cd.onRecoverableError;t(e,{componentStack:null})}}function lf(){Sd===3&&(Sd=0,Fu(wd,Cd),Sd=4)}function uf(){if(Sd===1){Sd=0;var e=Cd,t=wd,n=Td,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=M.T,M.T=null;var i=N.p;N.p=2;var a=td;td|=4;try{du=fu=!1,ju(t,e,n),n=dp;var o=qr(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&Kr(s.ownerDocument.documentElement,s)){if(c!==null&&Jr(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 _=Gr(s,h),v=Gr(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}}gh=!!up,dp=up=null}finally{td=a,N.p=i,M.T=r}}e.current=t,Sd=2}}function df(){if(Sd===2){Sd=0;var e=Cd,t=wd,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=M.T,M.T=null;var r=N.p;N.p=2;var i=td;td|=4;try{gu(e,t.alternate,t)}finally{td=i,N.p=r,M.T=n}}Sd=3}}function ff(){if(Sd===4||Sd===3){Sd=0;var e=kd;kd=null,We();var t=Cd,n=wd,r=Td,i=Od,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?Sd=5:(Sd=0,wd=Cd=null,pf(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(xd=null),Ct(r),n=n.stateNode,tt&&typeof tt.onCommitFiberRoot==`function`)try{tt.onCommitFiberRoot(et,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=M.T,a=N.p,N.p=2,M.T=null;try{for(var o=t.onRecoverableError,s=0;s<i.length;s++){var c=i[s];o(c.value,{componentStack:c.stack})}}finally{M.T=n,N.p=a}}if(i=Ad,o=jd,jd=null,i!==null&&(Ad=null,o===null&&(o=[]),e!==null))for(c=0;c<i.length;c++)n=(0,i[c])(o),n!==void 0&&e.finished.finally(n);Td&3&&mf(),Af(t),a=t.pendingLanes,r&261930&&a&42?t===Nd?Md++:(Md=0,Nd=t):(Md=0,Nd=null),jf(0,!1)}}function pf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ma(t)))}function mf(){return kd!==null&&(kd.skipTransition(),kd=null),uf(),df(),ff(),hf()}function hf(){if(Sd!==5)return!1;var e=Cd,t=Ed;Ed=0;var n=Ct(Td),r=M.T,a=N.p;try{N.p=32>n?32:n,M.T=null,n=Dd,Dd=null;var o=Cd,s=Td;if(Sd=0,wd=Cd=null,Td=0,td&6)throw Error(i(331));var c=td;if(td|=4,Xu(o.current),Hu(o,o.current,s,n),td=c,jf(0,!1),tt&&typeof tt.onPostCommitFiberRoot==`function`)try{tt.onPostCommitFiberRoot(et,o)}catch{}return!0}finally{N.p=a,M.T=r,pf(e,t)}}function gf(e,t,n){t=Hi(n,t),t=Oc(e.stateNode,t,2),e=_o(e,t,2),e!==null&&(_t(e,2),Af(e))}function _f(e,t,n){if(e.tag===3)gf(e,e,n);else for(;t!==null;){if(t.tag===3){gf(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(xd===null||!xd.has(r))){e=Hi(n,e),n=kc(2),r=_o(t,n,2),r!==null&&(Ac(n,r,t,e),_t(r,2),Af(r));break}}t=t.return}}function vf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new ed;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)||(od=!0,i.add(n),e=yf.bind(null,e,t,n),t.then(e,e))}function yf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,nd===e&&(K&n)===n&&(cd===4||cd===3&&(K&62914560)===K&&300>Ge()-_d?td&2?dd|=n:Wd(e,0):dd|=n,pd===K&&(pd=0)),Af(e)}function bf(e,t){t===0&&(t=ht()),e=Di(e,t),e!==null&&(_t(e,t),Af(e))}function xf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),bf(e,n)}function Sf(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),bf(e,n)}function Cf(e,t){return Ve(e,t)}var wf=null,Tf=null,Ef=!1,Df=!1,Of=!1,kf=0;function Af(e){e!==Tf&&e.next===null&&(Tf===null?wf=Tf=e:Tf=Tf.next=e),Df=!0,Ef||(Ef=!0,Y())}function jf(e,t){if(!Of&&Df){Of=!0;do for(var n=!1,r=wf;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-rt(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Ff(r,a))}else a=K,a=dt(r,r===nd?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||ft(r,a)||(n=!0,Ff(r,a))}r=r.next}while(n);Of=!1}}function Mf(){Nf()}function Nf(){Df=Ef=!1;var e=0;kf!==0&&vp()&&(e=kf);for(var t=Ge(),n=null,r=wf;r!==null;){var i=r.next,a=J(r,t);a===0?(r.next=null,n===null?wf=i:n.next=i,i===null&&(Tf=n)):(n=r,(e!==0||a&3)&&(Df=!0)),r=i}Sd!==0&&Sd!==5||jf(e,!1),kf!==0&&(kf=0)}function J(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-rt(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=mt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=nd,n=K,n=dt(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(q===2||q===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&He(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||ft(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&He(r),Ct(n)){case 2:case 8:n=Je;break;case 32:n=Ye;break;case 268435456:n=Ze;break;default:n=Ye}return r=Pf.bind(null,e),n=Ve(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&He(r),e.callbackPriority=2,e.callbackNode=null,2}function Pf(e,t){if(Sd!==0&&Sd!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(mf()&&e.callbackNode!==n)return null;var r=K;return r=dt(e,e===nd?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Rd(e,r,t),J(e,Ge()),e.callbackNode!=null&&e.callbackNode===n?Pf.bind(null,e):null)}function Ff(e,t){if(mf())return null;Rd(e,t,!0)}function Y(){Cp(function(){td&6?Ve(qe,Mf):Nf()})}function If(){if(kf===0){var e=Ra;e===0&&(e=st,st<<=1,!(st&261888)&&(st=256)),kf=e}return kf}function Lf(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Sn(e)}function Rf(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Lf((i[Ot]||null).action),o=r.submitter;o&&(t=(t=o[Ot]||null)?Lf(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Un(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(kf!==0){var e=new FormData(i,o);tc(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),tc(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var zf=0;zf<mi.length;zf++){var Bf=mi[zf];hi(Bf.toLowerCase(),`on`+(Bf[0].toUpperCase()+Bf.slice(1)))}hi(oi,`onAnimationEnd`),hi(si,`onAnimationIteration`),hi(ci,`onAnimationStart`),hi(`dblclick`,`onDoubleClick`),hi(`focusin`,`onFocus`),hi(`focusout`,`onBlur`),hi(li,`onTransitionRun`),hi(ui,`onTransitionStart`),hi(di,`onTransitionCancel`),hi(fi,`onTransitionEnd`),Kt(`onMouseEnter`,[`mouseout`,`mouseover`]),Kt(`onMouseLeave`,[`mouseout`,`mouseover`]),Kt(`onPointerEnter`,[`pointerout`,`pointerover`]),Kt(`onPointerLeave`,[`pointerout`,`pointerover`]),Gt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Gt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Gt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Gt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Gt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Gt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Vf=`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(` `),Hf=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Vf));function Uf(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){bi(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){bi(e)}i.currentTarget=null,a=c}}}}function X(e,t){var n=t[At];n===void 0&&(n=t[At]=new Set);var r=e+`__bubble`;n.has(r)||(qf(t,e,2,!1),n.add(r))}function Wf(e,t,n){var r=0;t&&(r|=4),qf(n,e,r,t)}var Gf=`_reactListening`+Math.random().toString(36).slice(2);function Kf(e){if(!e[Gf]){e[Gf]=!0,Ut.forEach(function(t){t!==`selectionchange`&&(Hf.has(t)||Wf(t,!1,e),Wf(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Gf]||(t[Gf]=!0,Wf(`selectionchange`,!1,t))}}function qf(e,t,n,r){switch(Ch(t)){case 2:var i=_h;break;case 8:i=vh;break;default:i=yh}n=i.bind(null,t,n,e),i=void 0,!Nn||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 Jf(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=Lt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}An(function(){var r=a,i=Tn(n),s=[];a:{var c=pi.get(e);if(c!==void 0){var l=Un,u=e;switch(e){case`keypress`:if(F(n)===0)break a;case`keydown`:case`keyup`:l=ar;break;case`focusin`:u=`focus`,l=Zn;break;case`focusout`:u=`blur`,l=Zn;break;case`beforeblur`:case`afterblur`:l=Zn;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=I;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Xn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=cr;break;case oi:case si:case ci:l=Qn;break;case fi:l=lr;break;case`scroll`:case`scrollend`:l=Gn;break;case`wheel`:l=ur;break;case`copy`:case`cut`:case`paste`:l=$n;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=or;break;case`submit`:l=sr;break;case`toggle`:case`beforetoggle`:l=dr}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=jn(m,p),g!=null&&d.push(Yf(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(l=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,l&&n!==wn&&(u=n.relatedTarget||n.fromElement)&&(Lt(u)||u[kt]))break a;(c||l)&&(u=i.window===i?i:(l=i.ownerDocument)?l.defaultView||l.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?Lt(l):null,l!==null&&(f=o(l),d=l.tag,l!==f||d!==5&&d!==27&&d!==6)&&(l=null)):(c=null,l=r),c!==l&&(d=I,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=or,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?u:zt(c),h=l==null?u:zt(l),u=new d(g,m+`leave`,c,n,i),u.target=f,u.relatedTarget=h,g=null,Lt(i)===r&&(d=new d(p,m+`enter`,l,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,d=c&&l?E(c,l,Zf):null,c!==null&&Qf(s,u,c,d,!1),l!==null&&f!==null&&Qf(s,f,l,d,!0)))}a:{if(c=r?zt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var _=kr;else if(Cr(c)){if(Ar)_=zr;else{_=Lr;var v=Ir}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&yn(r.elementType)&&(_=kr):_=Rr;if(_&&=_(e,r)){wr(s,_,n,i);break a}v&&v(e,c,r)}switch(v=r?zt(r):window,e){case`focusin`:(Cr(v)||v.contentEditable===`true`)&&(Xr=v,Zr=r,Qr=null);break;case`focusout`:Qr=Zr=Xr=null;break;case`mousedown`:$r=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:$r=!1,ei(s,n,i);break;case`selectionchange`:if(Yr)break;case`keydown`:case`keyup`:ei(s,n,i)}var y;if(pr)b:{switch(e){case`compositionstart`:var b=`onCompositionStart`;break b;case`compositionend`:b=`onCompositionEnd`;break b;case`compositionupdate`:b=`onCompositionUpdate`;break b}b=void 0}else R?yr(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(gr&&n.locale!==`ko`&&(R||b!==`onCompositionStart`?b===`onCompositionEnd`&&R&&(y=Rn()):(Fn=i,In=`value`in Fn?Fn.value:Fn.textContent,R=!0)),v=Xf(r,b),0<v.length&&(b=new er(b,e,null,n,i),s.push({event:b,listeners:v}),y?b.data=y:(y=br(n),y!==null&&(b.data=y)))),(y=hr?xr(e,n):z(e,n))&&(b=Xf(r,`onBeforeInput`),0<b.length&&(v=new er(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:v,listeners:b}),v.data=y)),Rf(s,e,r,n,i)}Uf(s,t)})}function Yf(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Xf(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=jn(e,n),i!=null&&r.unshift(Yf(e,i,a)),i=jn(e,t),i!=null&&r.push(Yf(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Zf(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Qf(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=jn(n,a),l!=null&&o.unshift(Yf(n,l,c))):i||(l=jn(n,a),l!=null&&o.push(Yf(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var $f=/\r\n?/g,ep=/\u0000|\uFFFD/g;function tp(e){return(typeof e==`string`?e:``+e).replace($f,`
9
+ `).replace(ep,``)}function np(e,t){return t=tp(t),tp(e)===t}function rp(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||hn(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&hn(e,``+r);else return;break;case`className`:$t(e,`class`,r);break;case`tabIndex`:$t(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:$t(e,n,r);break;case`style`:vn(e,r,o);return;case`data`:if(t!==`object`){$t(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)||r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Sn(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`&&rp(e,t,`name`,a.name,a,null),rp(e,t,`formEncType`,a.formEncType,a,null),rp(e,t,`formMethod`,a.formMethod,a,null),rp(e,t,`formTarget`,a.formTarget,a,null)):(rp(e,t,`encType`,a.encType,a,null),rp(e,t,`method`,a.method,a,null),rp(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Sn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Cn);return;case`onScroll`:r!=null&&X(`scroll`,e);return;case`onScrollEnd`:r!=null&&X(`scrollend`,e);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(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=Sn(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`credentialless`: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`:X(`beforetoggle`,e),X(`toggle`,e),Qt(e,`popover`,r);break;case`xlinkActuate`:en(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:en(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:en(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:en(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:en(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:en(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:en(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:en(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:en(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Qt(e,`is`,r);break;case`innerText`:case`textContent`:return;default:if(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)n=bn.get(n)||n,Qt(e,n,r);else return}P=!0}function ip(e,t,n,r,a,o){switch(n){case`style`:vn(e,r,o);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`children`:if(typeof r==`string`)hn(e,r);else if(typeof r==`number`||typeof r==`bigint`)hn(e,``+r);else return;break;case`onScroll`:r!=null&&X(`scroll`,e);return;case`onScrollEnd`:r!=null&&X(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=Cn);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!Wt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),o=n.slice(2,a?n.length-7:void 0),t=e[Ot]||null,t=t==null?null:t[n],typeof t==`function`&&e.removeEventListener(o,t,a),typeof r==`function`)){typeof t!=`function`&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(o,r,a);break a}P=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):Qt(e,n,r)}return}P=!0}function ap(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:X(`error`,e),X(`load`,e);var r=!1,a=!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`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:rp(e,t,o,s,n,null)}}a&&rp(e,t,`srcSet`,n.srcSet,n,null),r&&rp(e,t,`src`,n.src,n,null);return;case`input`:X(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=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(i(137,t));break;default:rp(e,t,r,d,n,null)}}un(e,o,c,l,u,s,a,!1);return;case`select`:for(a in X(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:rp(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&fn(e,!!r,n,!0):fn(e,!!r,t,!1);return;case`textarea`:for(s in X(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:rp(e,t,s,c,n,null)}mn(e,r,a,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:rp(e,t,l,r,n,null)}return;case`dialog`:X(`beforetoggle`,e),X(`toggle`,e),X(`cancel`,e),X(`close`,e);break;case`iframe`:case`object`:X(`load`,e);break;case`video`:case`audio`:for(r=0;r<Vf.length;r++)X(Vf[r],e);break;case`image`:X(`error`,e),X(`load`,e);break;case`details`:X(`toggle`,e);break;case`embed`:case`source`:case`link`:X(`error`,e),X(`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(i(137,t));default:rp(e,t,u,r,n,null)}return;default:if(yn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&ip(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&rp(e,t,c,r,n,null))}var op={};function sp(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 a=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)||rp(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`:m!==f&&(P=!0),o=m;break;case`name`:m!==f&&(P=!0),a=m;break;case`checked`:m!==f&&(P=!0),u=m;break;case`defaultChecked`:m!==f&&(P=!0),d=m;break;case`value`:m!==f&&(P=!0),s=m;break;case`defaultValue`:m!==f&&(P=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&rp(e,t,p,m,r,f)}}ln(e,s,c,l,u,d,o,a);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)||rp(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:o!==l&&(P=!0),p=o;break;case`defaultValue`:o!==l&&(P=!0),c=o;break;case`multiple`:o!==l&&(P=!0),s=o;default:o!==l&&rp(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?fn(e,!!n,n?[]:``,!1):fn(e,!!n,t,!0)):fn(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:rp(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:a!==o&&(P=!0),p=a;break;case`defaultValue`:a!==o&&(P=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&rp(e,t,s,a,r,o)}pn(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:rp(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`:p!==m&&(P=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:rp(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)&&rp(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(i(137,t));break;default:rp(e,t,u,p,r,m)}return;default:if(yn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&ip(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||ip(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&rp(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||rp(e,t,f,p,r,m)}function cp(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function lp(){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&&cp(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&&cp(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 up=null,dp=null;function fp(e){return e.nodeType===9?e:e.ownerDocument}function pp(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 mp(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 hp(e,t,n,r){return n=fp(n).createElement(e),n[Dt]=r,n[Ot]=t,ap(n,e,t),Vt(n),n}function gp(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 _p=null;function vp(){var e=window.event;return e&&e.type===`popstate`?e!==_p&&(_p=e,!0):(_p=null,!1)}var yp=typeof setTimeout==`function`?setTimeout:void 0,bp=typeof clearTimeout==`function`?clearTimeout:void 0,xp=typeof Promise==`function`?Promise:void 0,Sp=typeof requestAnimationFrame==`function`?requestAnimationFrame:yp,Cp=typeof queueMicrotask==`function`?queueMicrotask:xp===void 0?yp:function(e){return xp.resolve(null).then(e).catch(wp)};function wp(e){setTimeout(function(){throw e})}function Tp(e){return e===`head`}function Ep(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),Hh(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)Q(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,Q(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[Pt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&Q(e.ownerDocument.body)}n=i}while(n);Hh(t)}function Dp(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 Op(e,t,n){if(t=CSS.escape(t)===t?t:`r-`+btoa(t).replace(/=/g,``),e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display===`inline`){if(t=e.getClientRects(),t.length===1)var r=1;else for(var i=r=0;i<t.length;i++){var a=t[i];0<a.width&&0<a.height&&r++}r===1&&(e=e.style,e.display=t.length===1?`inline-block`:`block`,e.marginTop=`-`+n.paddingTop,e.marginBottom=`-`+n.paddingBottom)}}function kp(e,t){e=e.style,t=t.style;var n=t==null?null:t.hasOwnProperty(`viewTransitionName`)?t.viewTransitionName:t.hasOwnProperty(`view-transition-name`)?t[`view-transition-name`]:null;e.viewTransitionName=n==null||typeof n==`boolean`?``:(``+n).trim(),n=t==null?null:t.hasOwnProperty(`viewTransitionClass`)?t.viewTransitionClass:t.hasOwnProperty(`view-transition-class`)?t[`view-transition-class`]:null,e.viewTransitionClass=n==null||typeof n==`boolean`?``:(``+n).trim(),e.display===`inline-block`&&(t==null?e.display=e.margin=``:(n=t.display,e.display=n==null||typeof n==`boolean`?``:n,n=t.margin,n==null?(n=t.hasOwnProperty(`marginTop`)?t.marginTop:t[`margin-top`],e.marginTop=n==null||typeof n==`boolean`?``:n,t=t.hasOwnProperty(`marginBottom`)?t.marginBottom:t[`margin-bottom`],e.marginBottom=t==null||typeof t==`boolean`?``:t):e.margin=n))}function Ap(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position===`absolute`||t.position===`fixed`,clip:t.clipPath!==`none`||t.overflow!==`visible`||t.filter!==`none`||t.mask!==`none`||t.mask!==`none`||t.borderRadius!==`0px`,view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function jp(e){return Ap(e.getBoundingClientRect(),getComputedStyle(e),e)}function Mp(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return Ap(t,n,e)}function Np(e){return e.documentElement.clientHeight}function Pp(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Fp(e,t,n,r,i,a,o,s,c){var l=t.nodeType===9?t:t.ownerDocument;try{var u=l.startViewTransition({update:function(){var t=l.defaultView,n=t.navigation&&t.navigation.transition,o=l.fonts.status;r();var s=[];if(o===`loaded`&&(Np(l),l.fonts.status===`loading`&&s.push(l.fonts.ready)),o=s.length,e!==null)for(var c=e.suspenseyImages,u=0,d=0;d<c.length;d++){var f=c[d];if(!f.complete){var p=f.getBoundingClientRect();if(0<p.bottom&&0<p.right&&p.top<t.innerHeight&&p.left<t.innerWidth){if(u+=Xm(f),u>$m){s.length=o;break}f=new Promise(Pp.bind(f)),s.push(f)}}}if(0<s.length)return t=Promise.race([Promise.all(s),new Promise(function(e){return setTimeout(e,500)})]).then(i,i),(n?Promise.allSettled([n.finished,t]):t).then(a,a);if(i(),n)return n.finished.then(a,a);a()},types:n});l.__reactViewTransition=u;var d=[];return u.ready.then(function(){for(var e=l.documentElement.getAnimations({subtree:!0}),t=0;t<e.length;t++){var n=e[t],r=n.effect,i=r.pseudoElement;if(i!=null&&i.startsWith(`::view-transition`)){d.push(n),n=r.getKeyframes();for(var a=i=void 0,s=!0,c=0;c<n.length;c++){var u=n[c],f=u.width;if(i===void 0)i=f;else if(i!==f){s=!1;break}if(f=u.height,a===void 0)a=f;else if(a!==f){s=!1;break}delete u.width,delete u.height,u.transform===`none`&&delete u.transform}s&&i!==void 0&&a!==void 0&&(r.setKeyframes(n),s=getComputedStyle(r.target,r.pseudoElement),s.width!==i||s.height!==a)&&(s=n[0],s.width=i,s.height=a,s=n[n.length-1],s.width=i,s.height=a,r.setKeyframes(n))}}o()},function(e){l.__reactViewTransition===u&&(l.__reactViewTransition=null);try{if(typeof e==`object`&&e)switch(e.name){case`InvalidStateError`:(e.message===`View transition was skipped because document visibility state is hidden.`||e.message===`Skipping view transition because document visibility state has become hidden.`||e.message===`Skipping view transition because viewport size changed.`||e.message===`Transition was aborted because of invalid state`)&&(e=null)}e!==null&&c(e)}finally{r(),i(),o()}}),u.finished.finally(function(){for(var e=0;e<d.length;e++)d[e].cancel();l.__reactViewTransition===u&&(l.__reactViewTransition=null),s()}),u}catch{return r(),i(),o(),null}}function Ip(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Ip.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:D({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Ip.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),r=[],i=0;i<n.length;i++){var a=n[i].effect;a!==null&&a.target===e&&a.pseudoElement===t&&r.push(n[i])}return r},Ip.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Lp(e){return{name:e,group:new Ip(`group`,e),imagePair:new Ip(`image-pair`,e),old:new Ip(`old`,e),new:new Ip(`new`,e)}}function Rp(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Rp.prototype.addEventListener=function(e,t,n){var r=null,i=null;if(!(n!=null&&typeof n!=`boolean`&&(r=n.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var a=this._eventListeners;if(Up(a,e,t,n)===-1){var o=this,s=t;n!=null&&typeof n!=`boolean`&&!0===n.once&&(s=function(r){o.removeEventListener(e,t,n),typeof t==`function`?t.call(this,r):t.handleEvent(r)}),r!==null&&(i=o.removeEventListener.bind(o,e,t,n),r.addEventListener(`abort`,i,{once:!0}),i=r.removeEventListener.bind(r,`abort`,i)),r=Vp(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),m(this._fragmentFiber.child,!1,zp,e,s,r)}this._eventListeners=a}};function zp(e,t,n,r){return b(e).addEventListener(t,n,r),!1}Rp.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Up(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=Vp(i.optionsOrUseCapture),m(this._fragmentFiber.child,!1,Bp,e,n,i),r.splice(t,1),a!==null&&a()}};function Bp(e,t,n,r){return b(e).removeEventListener(t,n,r),!1}function Vp(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Hp(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Up(e,t,n,r){if(e.length===0)return-1;r=Hp(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&Hp(a.optionsOrUseCapture)===r)return i}return-1}Rp.prototype.dispatchEvent=function(e){var t=g(this._fragmentFiber);if(t===null)return!0;t=b(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var r=t.nodeType===9?t.createComment(``):document.createTextNode(``);if(n)for(var i=0;i<n.length;i++){var a=n[i];r.addEventListener(a.type,a.attachedListener,Vp(a.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),n)for(i=0;i<n.length;i++)a=n[i],r.removeEventListener(a.type,a.attachedListener,Vp(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},Rp.prototype.focus=function(e){m(this._fragmentFiber.child,!0,Wp,e,void 0,void 0)};function Wp(e,t){return e.tag!==6&&(e=b(e),gm(e,t))}Rp.prototype.focusLast=function(e){var t=[];m(this._fragmentFiber.child,!0,Gp,t,void 0,void 0);for(var n=t.length-1;0<=n&&!Wp(t[n],e);n--);};function Gp(e,t){return t.push(e),!1}Rp.prototype.blur=function(){var e=g(this._fragmentFiber);e!==null&&(e=b(e),e=fp(e).activeElement,e!==null&&m(this._fragmentFiber.child,!1,Kp,e,void 0,void 0))};function Kp(e,t){return e.tag!==6&&(e=b(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Rp.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),m(this._fragmentFiber.child,!1,qp,e,void 0,void 0)};function qp(e,t){return e.tag===6||(e=b(e),t.observe(e)),!1}Rp.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),m(this._fragmentFiber.child,!1,Jp,e,void 0,void 0);for(var n=t=0;n<Yp.length;n++){var r=Yp[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):Yp[t++]=r}Yp.length=t}};function Jp(e,t){return e.tag===6||(e=b(e),t.unobserve(e)),!1}var Yp=[],Xp=!1;function Zp(e,t,n){Yp.push({fragmentInstance:e,observer:t,instance:n}),Xp||(Xp=!0,_m(function(){Xp=!1;var e=Yp;Yp=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}Rp.prototype.getClientRects=function(){var e=[];return m(this._fragmentFiber.child,!1,Qp,e,void 0,void 0),e};function Qp(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=b(e),t.push.apply(t,e.getClientRects());return!1}Rp.prototype.getRootNode=function(e){var t=g(this._fragmentFiber);return t===null?this:b(t).getRootNode(e)},Rp.prototype.compareDocumentPosition=function(e){var t=g(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];m(this._fragmentFiber.child,!1,Gp,n,void 0,void 0);var r=b(t);if(n.length===0){if(n=r,_(this._fragmentFiber)){a:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break a}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var i=r=n.compareDocumentPosition(e);return n===e?i=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=v(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=b(n).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=b(n[0]),i=b(n[n.length-1]);var a=_(this._fragmentFiber)?t.parentElement:r;if(a==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,a=a.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),s=i.compareDocumentPosition(e),c=o&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=r&&a&&o&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||a&&i===e||c||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!a&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||$p(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function $p(e,t,n,r,i){var a=Lt(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!a)a:{for(;a!==null;){if(a.tag===7&&(a===t||a.alternate===t)){n=!0;break a}a=a.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(a===null)return a=i.ownerDocument,i===a||i===a.documentElement||i===a.body;a:{for(a=t,t=g(t);a!==null;){if(!(a.tag!==5&&a.tag!==3&&a.tag!==27||a!==t&&a.alternate!==t)){a=!0;break a}a=a.return}a=!1}return a}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!a)&&!(t=a===n)&&(t=E(n,a,T),t===null?t=!1:(m(t,!0,C,a,n),a=x,x=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=E(r,a,T),t===null?t=!1:(m(t,!0,w,a,r),a=x,S=x=null,t=a!==null)),t):!1}function em(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}Rp.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];m(this._fragmentFiber.child,!1,Gp,t,void 0,void 0);var n=!1!==e;if(t.length===0){var r=v(this._fragmentFiber);if(r=n?r[1]||r[0]||g(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=b(r),em(e,n);return}if(r=b(r),r.nodeType!==9){if(r.nodeType===11){n=`host`in r?r.host:null,n!==null&&n.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=n?t.length-1:0;r!==(n?-1:t.length);){var a=t[r];a.tag===6?(a=b(a),em(a,n)):b(a).scrollIntoView(e),r+=n?-1:1}};function tm(e,t){return e=b(e),nm(e,t),!1}function nm(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function rm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.addEventListener(i.type,i.attachedListener,Vp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<Yp.length;i++){var a=Yp[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(Yp[r++]=a)}Yp.length=r,n.observe(e)}),nm(e,t))}function im(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.removeEventListener(i.type,i.attachedListener,Vp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?Zp(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function am(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`:am(n),It(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function om(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[Pt])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=fm(e.nextSibling),e===null)break}return null}function sm(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=fm(e.nextSibling),e===null))return null;return e}function cm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=fm(e.nextSibling),e===null))return null;return e}function lm(e){return e.data===`$?`||e.data===`$~`}function um(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function dm(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 fm(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 pm=null;function mm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return fm(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function hm(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 gm(e,t){function n(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener(`focus`,n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener(`focus`,n,!0)}return r}function _m(e){Sp(function(){Sp(function(t){return e(t)})})}function Z(e,t,n){switch(t=fp(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function vm(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&rp(e,t,r,null,op,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===Cn&&(e.onclick=null),It(e)}function Q(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);It(e)}var ym=new Map,bm=new Set;function xm(e){if(typeof e.getRootNode==`function`){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var Sm=N.d;N.d={f:$,r:Cm,D:Em,C:Dm,L:Om,m:km,X:jm,S:Am,M:Mm};function $(){var e=Sm.f(),t=Hd();return e||t}function Cm(e){var t=Rt(e);t!==null&&t.tag===5&&t.type===`form`?rc(t):Sm.r(e)}var wm=typeof document>`u`?null:document;function Tm(e,t,n){var r=wm;if(r&&typeof t==`string`&&t){var i=cn(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),bm.has(i)||(bm.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),ap(t,`link`,e),Vt(t),r.head.appendChild(t)))}}function Em(e){Sm.D(e),Tm(`dns-prefetch`,e,null)}function Dm(e,t){Sm.C(e,t),Tm(`preconnect`,e,t)}function Om(e,t,n){Sm.L(e,t,n);var r=wm;if(r&&e&&t){var i=`link[rel="preload"][as="`+cn(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+cn(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+cn(n.imageSizes)+`"]`)):i+=`[href="`+cn(e)+`"]`;var a=i;switch(t){case`style`:a=Pm(e);break;case`script`:a=Rm(e)}if(!(ym.has(a)||(e=D({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),ym.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Fm(a))||t===`script`&&r.querySelector(zm(a))))){var o=r.createElement(`link`);ap(o,`link`,e),t===`style`&&(o[Ft]=!0,o.onload=o.onerror=function(){Ht(o)}),Vt(o),r.head.appendChild(o)}}}function km(e,t){Sm.m(e,t);var n=wm;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+cn(r)+`"][href="`+cn(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Rm(e)}if(!ym.has(a)&&(e=D({rel:`modulepreload`,href:e},t),ym.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(zm(a)))return}r=n.createElement(`link`),ap(r,`link`,e),Vt(r),n.head.appendChild(r)}}}function Am(e,t,n){Sm.S(e,t,n);var r=wm;if(r&&e){var i=Bt(r).hoistableStyles,a=Pm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Fm(a)))s.loading=5;else{e=D({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=ym.get(a))&&Hm(e,n);var c=o=r.createElement(`link`);Vt(c),ap(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,Vm(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function jm(e,t){Sm.X(e,t);var n=wm;if(n&&e){var r=Bt(n).hoistableScripts,i=Rm(e),a=r.get(i);a||(a=n.querySelector(zm(i)),a||(e=D({src:e,async:!0},t),(t=ym.get(i))&&Um(e,t),a=n.createElement(`script`),Vt(a),ap(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Mm(e,t){Sm.M(e,t);var n=wm;if(n&&e){var r=Bt(n).hoistableScripts,i=Rm(e),a=r.get(i);a||(a=n.querySelector(zm(i)),a||(e=D({src:e,async:!0,type:`module`},t),(t=ym.get(i))&&Um(e,t),a=n.createElement(`script`),Vt(a),ap(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Nm(e,t,n,r){var a=(a=De.current)?xm(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=Pm(n.href),t=Bt(a).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,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=Pm(n.href);var o=Bt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Fm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=ym.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},ym.set(e,o)),Lm(a,e,o,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=Rm(n),t=Bt(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Pm(e){return`href="`+cn(e)+`"`}function Fm(e){return`link[rel="stylesheet"][`+e+`]`}function Im(e){return D({},e,{"data-precedence":e.precedence,precedence:null})}function Lm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[Ft]){r.loading=1;return}}else t=e.createElement(`link`),t[Ft]=!0,t.onload=t.onerror=Ht.bind(null,t),ap(t,`link`,n),Vt(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function Rm(e){return`[src="`+cn(e)+`"]`}function zm(e){return`script[async]`+e}function Bm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+cn(n.href)+`"]`);if(r)return t.instance=r,Vt(r),r;var a=D({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Vt(r),ap(r,`style`,a),Vm(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Pm(n.href);var o=e.querySelector(Fm(a));if(o)return t.state.loading|=4,t.instance=o,Vt(o),o;r=Im(n),(a=ym.get(a))&&Hm(r,a),o=(e.ownerDocument||e).createElement(`link`),Vt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),ap(o,`link`,r),t.state.loading|=4,Vm(o,n.precedence,e),t.instance=o;case`script`:return o=Rm(n.src),(a=e.querySelector(zm(o)))?(t.instance=a,Vt(a),a):(r=n,(a=ym.get(o))&&(r=D({},n),Um(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Vt(a),ap(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Vm(r,n.precedence,e));return t.instance}function Vm(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 Hm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Um(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Wm=null;function Gm(e,t,n){if(Wm===null){var r=new Map,i=Wm=new Map;i.set(n,r)}else i=Wm,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[Pt]||a[Dt]||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 Km(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function qm(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 Jm(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function Ym(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Xm(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function Zm(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=Xm(t),e.suspenseyImages.push(t)),e=rh.bind(e),t.decode().then(e,e))}function Qm(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=Pm(r.href),a=t.querySelector(Fm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=nh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Vt(a);return}a=t.ownerDocument||t,r=Im(r),(i=ym.get(i))&&Hm(r,i),a=a.createElement(`link`),Vt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),ap(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=nh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var $m=0;function eh(e,t){return e.stylesheets&&e.count===0&&ah(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&ah(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&$m===0&&($m=62500*lp());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ah(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>$m?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function th(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)ah(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function nh(){this.count--,th(this)}function rh(){this.imgCount--,th(this)}var ih=null;function ah(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ih=new Map,t.forEach(oh,e),ih=null,nh.call(e))}function oh(e,t){if(!(t.state.loading&4)){var n=ih.get(e);if(n)var r=n.get(null);else{n=new Map,ih.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=nh.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 sh={$$typeof:ie,Provider:null,Consumer:null,_currentValue:ye,_currentValue2:ye,_threadCount:0};function ch(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=gt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gt(0),this.hiddenUpdates=gt(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.transitionTypes=null,this.incompleteTransitions=new Map}function lh(e,t,n,r,i,a,o,s,c,l,u,d){return e=new ch(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Mi(3,null,null,t),e.current=a,a.stateNode=e,t=ja(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},mo(a),e}function uh(e){return e?(e=Ai,e):Ai}function dh(e,t,n,r,i,a){i=uh(i),r.context===null?r.context=i:r.pendingContext=i,r=go(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=_o(e,r,t),n!==null&&(Ld(n,e,t),vo(n,e,t))}function fh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ph(e,t){fh(e,t),(e=e.alternate)&&fh(e,t)}function mh(e){if(e.tag===13||e.tag===31){var t=Di(e,67108864);t!==null&&Ld(t,e,67108864),ph(e,67108864)}}function hh(e){if(e.tag===13||e.tag===31){var t=Pd();t=St(t);var n=Di(e,t);n!==null&&Ld(n,e,t),ph(e,t)}}var gh=!0;function _h(e,t,n,r){var i=M.T;M.T=null;var a=N.p;try{N.p=2,yh(e,t,n,r)}finally{N.p=a,M.T=i}}function vh(e,t,n,r){var i=M.T;M.T=null;var a=N.p;try{N.p=8,yh(e,t,n,r)}finally{N.p=a,M.T=i}}function yh(e,t,n,r){if(gh){var i=bh(r);if(i===null)Jf(e,t,r,xh,n),Mh(e,r);else if(Ph(i,e,t,n,r))r.stopPropagation();else if(Mh(e,r),t&4&&-1<jh.indexOf(e)){for(;i!==null;){var a=Rt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=ut(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-rt(o);s.entanglements[1]|=c,o&=~c}Af(a),!(td&6)&&(yd=Ge()+500,jf(0,!1))}}break;case 31:case 13:s=Di(a,2),s!==null&&Ld(s,a,2),Hd(),ph(a,2)}if(a=bh(r),a===null&&Jf(e,t,r,xh,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Jf(e,t,r,null,n)}}function bh(e){return e=Tn(e),Sh(e)}var xh=null;function Sh(e){if(xh=null,e=Lt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(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 xh=e,null}function Ch(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`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`fullscreenerror`: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`resize`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Ke()){case qe:return 2;case Je:return 8;case Ye:case Xe:return 32;case Ze:return 268435456;default:return 32}default:return 32}}var wh=!1,Th=null,Eh=null,Dh=null,Oh=new Map,kh=new Map,Ah=[],jh=`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 Mh(e,t){switch(e){case`focusin`:case`focusout`:Th=null;break;case`dragenter`:case`dragleave`:Eh=null;break;case`mouseover`:case`mouseout`:Dh=null;break;case`pointerover`:case`pointerout`:Oh.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:kh.delete(t.pointerId)}}function Nh(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=Rt(t),t!==null&&mh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Ph(e,t,n,r,i){switch(t){case`focusin`:return Th=Nh(Th,e,t,n,r,i),!0;case`dragenter`:return Eh=Nh(Eh,e,t,n,r,i),!0;case`mouseover`:return Dh=Nh(Dh,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Oh.set(a,Nh(Oh.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,kh.set(a,Nh(kh.get(a)||null,e,t,n,r,i)),!0}return!1}function Fh(e){var t=Lt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,Tt(e.priority,function(){hh(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,Tt(e.priority,function(){hh(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 Ih(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=bh(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);wn=r,n.target.dispatchEvent(r),wn=null}else return t=Rt(n),t!==null&&mh(t),e.blockedOn=n,!1;t.shift()}return!0}function Lh(e,t,n){Ih(e)&&n.delete(t)}function Rh(){wh=!1,Th!==null&&Ih(Th)&&(Th=null),Eh!==null&&Ih(Eh)&&(Eh=null),Dh!==null&&Ih(Dh)&&(Dh=null),Oh.forEach(Lh),kh.forEach(Lh)}function zh(e,n){e.blockedOn===n&&(e.blockedOn=null,wh||(wh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Rh)))}var Bh=null;function Vh(e){Bh!==e&&(Bh=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Bh===e&&(Bh=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(Sh(r||n)===null)continue;break}var a=Rt(n);a!==null&&(e.splice(t,3),t-=3,tc(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Hh(e){function t(t){return zh(t,e)}Th!==null&&zh(Th,e),Eh!==null&&zh(Eh,e),Dh!==null&&zh(Dh,e),Oh.forEach(t),kh.forEach(t);for(var n=0;n<Ah.length;n++){var r=Ah[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Ah.length&&(n=Ah[0],n.blockedOn===null);)Fh(n),n.blockedOn===null&&Ah.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[Ot]||null;if(typeof a==`function`)o||Vh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[Ot]||null)s=o.formAction;else if(Sh(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Vh(n)}}}function Uh(){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 Wh(e){this._internalRoot=e}Gh.prototype.render=Wh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;dh(n,Pd(),e,t,null,null)},Gh.prototype.unmount=Wh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;dh(e.current,2,null,e,null,null),Hd(),t[kt]=null}};function Gh(e){this._internalRoot=e}Gh.prototype.unstable_scheduleHydration=function(e){if(e){var t=wt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ah.length&&t!==0&&t<Ah[n].priority;n++);Ah.splice(n,0,e),n===0&&Fh(e)}};var Kh=n.version;if(Kh!==`19.3.1`)throw Error(i(527,Kh,`19.3.1`));N.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var qh={bundleType:0,version:`19.3.1`,rendererPackageName:`react-dom`,currentDispatcherRef:M,reconcilerVersion:`19.3.1`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Jh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jh.isDisabled&&Jh.supportsFiber)try{et=Jh.inject(qh),tt=Jh}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=wc,s=Tc,c=U;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=lh(e,1,!1,null,null,n,r,null,o,s,c,Uh),e[kt]=t.current,Kf(e),new Wh(t)}})),_=o(((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=g()})),v=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function y(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:v(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var b=e=>{let t=``,n=!1;for(let r of e)r===`-`||r===`_`||r<=` `?n=t.length>0:(t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1);return t},x=e=>{let t=b(e);return t.charAt(0).toUpperCase()+t.slice(1)},S=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),C={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function w(e){return e!=null}function T(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??C.width,a=e.size??e.height??C.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?S(...c):S(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??C[`stroke-width`])*Number(e.size??e.width??C.width)/Number(t.size??t.width??C.width):t.strokeWidth??C[`stroke-width`];return[`svg`,{...Object.entries(C).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&w(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&w(t.width)&&{[r(`width`)]:t.width},...`height`in t&&w(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function E(e,t={}){return T(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var D=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},O=l(d(),1),ee=(0,O.createContext)({}),te=()=>(0,O.useContext)(ee),k=(0,O.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,className:s=``,children:c,iconNode:l=[],icon:u={node:l,aliases:[],size:24},...d},f)=>{let{size:p=24,strokeWidth:m=2,absoluteStrokeWidth:h=!1,nonScalingStroke:g=!1,color:_=`currentColor`,className:v=``}=te()??{},y=!!c||D(d),[b,x,C=[]]=E(u,{color:e??_,width:n??t??p,height:r??t??p,strokeWidth:i??m,absoluteStrokeWidth:a??h,nonScalingStroke:o??g,className:S(v,s),hasA11yProp:y,attributes:d});return(0,O.createElement)(b,{ref:f,...x},[...C.map(([e,t])=>(0,O.createElement)(e,t)),...Array.isArray(c)?c:[c]])});function A(e,t=[],n=[]){let r=typeof e==`string`?y(e,t,n):e,i=(0,O.forwardRef)(({className:e,...t},n)=>(0,O.createElement)(k,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=x(r.name)),i}var ne={name:`arrow-down`,size:24,node:[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]};ne.node;var re=A(ne),ie={name:`arrow-up`,size:24,node:[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]};ie.node;var j=A(ie),ae={name:`bell`,size:24,node:[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,key:`11g9vi`}]]};ae.node;var oe=A(ae),se={name:`brain`,size:24,node:[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`,key:`1e3is1`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`,key:`1gqd8o`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`,key:`iwvgf7`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`,key:`efp6ie`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`,key:`1gq6am`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`,key:`k1g0md`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`,key:`q97ue3`}]]};se.node;var ce=A(se),le={name:`briefcase`,size:24,node:[[`path`,{d:`M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16`,key:`jecpp`}],[`rect`,{width:`20`,height:`14`,x:`2`,y:`6`,rx:`2`,key:`i6l2r4`}]]};le.node;var ue=A(le),de={name:`calendar`,size:24,node:[[`path`,{d:`M8 2v3`,key:`1ioesn`}],[`path`,{d:`M16 2v3`,key:`otl347`}],[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}],[`path`,{d:`M3 9h18`,key:`1pudct`}]]};de.node;var fe=A(de),pe={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};pe.node;var me=A(pe),he={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]};he.node;var ge=A(he),_e={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};_e.node;var ve=A(_e),M={name:`circle-alert`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]],aliases:[`alert-circle`]};M.node;var N=A(M),ye={name:`circle-check-big`,size:24,node:[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`,key:`yps3ct`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]],aliases:[`check-circle`]};ye.node;var be=A(ye),xe={name:`circle-check`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 9-5.5 5.5L8 12`,key:`xofnsj`}]],aliases:[`check-circle-2`]};xe.node;var Se=A(xe),Ce={name:`circle-question-mark`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`help-circle`,`circle-help`]};Ce.node;var we=A(Ce),Te={name:`circle-x`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]],aliases:[`x-circle`]};Te.node;var Ee=A(Te),De={name:`clock`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]};De.node;var Oe=A(De),ke={name:`copy`,size:24,node:[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]};ke.node;var Ae=A(ke),je={name:`cpu`,size:24,node:[[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M17 20v2`,key:`1rnc9c`}],[`path`,{d:`M17 2v2`,key:`11trls`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M2 17h2`,key:`7oei6x`}],[`path`,{d:`M2 7h2`,key:`asdhe0`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`M20 17h2`,key:`1fpfkl`}],[`path`,{d:`M20 7h2`,key:`1o8tra`}],[`path`,{d:`M7 20v2`,key:`4gnj0m`}],[`path`,{d:`M7 2v2`,key:`1i4yhu`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,key:`1vbyd7`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`,key:`z9xiuo`}]]};je.node;var Me=A(je),Ne={name:`database`,size:24,node:[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]};Ne.node;var Pe=A(Ne),Fe={name:`external-link`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]};Fe.node;var Ie=A(Fe),Le={name:`file-pen`,size:24,node:[[`path`,{d:`M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34`,key:`o6klzx`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z`,key:`zhnas1`}]],aliases:[`file-edit`]};Le.node;var Re=A(Le),ze={name:`file-search`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`circle`,{cx:`11.5`,cy:`14.5`,r:`2.5`,key:`1bq0ko`}],[`path`,{d:`M13.3 16.3 15 18`,key:`2quom7`}]]};ze.node;var Be=A(ze),Ve={name:`file-text`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]};Ve.node;var He=A(Ve),Ue={name:`folder-open`,size:24,node:[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 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.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]};Ue.node;var We=A(Ue),Ge={name:`git-branch`,size:24,node:[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]};Ge.node;var Ke=A(Ge),qe={name:`globe`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]};qe.node;var Je=A(qe),Ye={name:`info`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]};Ye.node;var Xe=A(Ye),Ze={name:`keyboard`,size:24,node:[[`path`,{d:`M10 8h.01`,key:`1r9ogq`}],[`path`,{d:`M12 12h.01`,key:`1mp3jc`}],[`path`,{d:`M14 8h.01`,key:`1primd`}],[`path`,{d:`M16 12h.01`,key:`1l6xoz`}],[`path`,{d:`M18 8h.01`,key:`emo2bl`}],[`path`,{d:`M6 8h.01`,key:`x9i8wu`}],[`path`,{d:`M7 16h10`,key:`wp8him`}],[`path`,{d:`M8 12h.01`,key:`czm47f`}],[`rect`,{width:`20`,height:`16`,x:`2`,y:`4`,rx:`2`,key:`18n3k1`}]]};Ze.node;var Qe=A(Ze),$e={name:`list-todo`,size:24,node:[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`rect`,{x:`3`,y:`4`,width:`6`,height:`6`,rx:`1`,key:`cif1o7`}]]};$e.node;var et=A($e),tt={name:`loader-circle`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]],aliases:[`loader-2`]};tt.node;var nt=A(tt),rt={name:`message-square`,size:24,node:[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]};rt.node;var it=A(rt),at={name:`network`,size:24,node:[[`rect`,{x:`16`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`4q2zg0`}],[`rect`,{x:`2`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`8cvhb9`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`6`,rx:`1`,key:`1egb70`}],[`path`,{d:`M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3`,key:`1jsf9p`}],[`path`,{d:`M12 12V8`,key:`2874zd`}]]};at.node;var ot=A(at),st={name:`octagon-x`,size:24,node:[[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z`,key:`2d38gg`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]],aliases:[`x-octagon`]};st.node;var ct=A(st),lt={name:`panel-left-close`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m16 15-3-3 3-3`,key:`14y99z`}]],aliases:[`sidebar-close`]};lt.node;var ut=A(lt),dt={name:`panel-left`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}]],aliases:[`sidebar`]};dt.node;var ft=A(dt),pt={name:`pencil`,size:24,node:[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]};pt.node;var mt=A(pt),ht={name:`play`,size:24,node:[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]};ht.node;var gt=A(ht),_t={name:`plus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]};_t.node;var vt=A(_t),yt={name:`plug`,size:24,node:[[`path`,{d:`M12 22v-5`,key:`1ega77`}],[`path`,{d:`M15 8V2`,key:`18g5xt`}],[`path`,{d:`M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z`,key:`1xoxul`}],[`path`,{d:`M9 8V2`,key:`14iosj`}]]};yt.node;var bt=A(yt),xt={name:`refresh-cw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]};xt.node;var St=A(xt),Ct={name:`rotate-ccw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]};Ct.node;var wt=A(Ct),Tt={name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]};Tt.node;var Et=A(Tt),Dt={name:`send`,size:24,node:[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]};Dt.node;var Ot=A(Dt),kt={name:`settings`,size:24,node:[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]};kt.node;var At=A(kt),jt={name:`sparkles`,size:24,node:[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]],aliases:[`stars`]};jt.node;var Mt=A(jt),Nt={name:`square-pen`,size:24,node:[[`path`,{d:`M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`,key:`1m0v6g`}],[`path`,{d:`M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z`,key:`ohrbg2`}]],aliases:[`pen-box`,`edit`,`pen-square`]};Nt.node;var Pt=A(Nt),Ft={name:`square-slash`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`line`,{x1:`9`,x2:`15`,y1:`15`,y2:`9`,key:`1dfufj`}]],aliases:[`slash-square`]};Ft.node;var It=A(Ft),Lt={name:`square`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]};Lt.node;var Rt=A(Lt),zt={name:`terminal`,size:24,node:[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]};zt.node;var Bt=A(zt),Vt={name:`triangle-alert`,size:24,node:[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`alert-triangle`]};Vt.node;var Ht=A(Vt),Ut={name:`wrench`,size:24,node:[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`,key:`1ngwbx`}]]};Ut.node;var Wt=A(Ut),Gt={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};Gt.node;var Kt=A(Gt),qt=_();function Jt(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Jt(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function Yt(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Jt(e))&&(r&&(r+=` `),r+=t);return r}var Xt=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},P=(e,t)=>({classGroupId:e,validator:t}),Zt=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Qt=`-`,$t=[],en=`arbitrary..`,tn=e=>{let t=an(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return rn(e);let n=e.split(Qt);return nn(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?Xt(i,t):t:i||$t}return n[e]||$t}}},nn=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=nn(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(Qt):e.slice(t).join(Qt),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},rn=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?en+r:void 0})(),an=e=>{let{theme:t,classGroups:n}=e;return on(n,t)},on=(e,t)=>{let n=Zt();for(let r in e){let i=e[r];sn(i,n,r,t)}return n},sn=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];cn(i,t,n,r)}},cn=(e,t,n,r)=>{typeof e==`string`?ln(e,t,n):typeof e==`function`?un(e,t,n,r):dn(e,t,n,r)},ln=(e,t,n)=>{let r=e===``?t:fn(t,e);r.classGroupId=n},un=(e,t,n,r)=>{pn(e)?sn(e(r),t,n,r):(t.validators===null&&(t.validators=[]),t.validators.push(P(n,e)))},dn=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];sn(o,fn(t,a),n,r)}},fn=(e,t)=>{let n=e,r=t.split(Qt),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=Zt(),n.nextPart.set(t,i)),n=i}return n},pn=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,mn=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},hn=`!`,gn=`:`,_n=[],vn=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),yn=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===gn){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(hn)?(c=s.slice(0,-1),l=!0):s.startsWith(hn)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return vn(t,l,c,u)};if(t){let e=t+gn,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):vn(_n,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},bn=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},xn=e=>({cache:mn(e.cacheSize),parseClassName:yn(e),sortModifiers:bn(e),postfixLookupClassGroupIds:Sn(e),...tn(e)}),Sn=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},Cn=/\s+/,wn=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(Cn),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h||(g=r(p),!g)){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+hn:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},Tn=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=En(n))&&(i&&(i+=` `),i+=r);return i},En=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=En(e[r]))&&(n&&(n+=` `),n+=t);return n},Dn=(e,...t)=>{let n,r,i,a,o=o=>(n=xn(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=wn(e,n);return i(e,a),a};return a=o,(...e)=>a(Tn(...e))},On=[],kn=e=>{let t=t=>t[e]||On;return t.isThemeGetter=!0,t.themeKey=e,t},An=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,jn=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Mn=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Nn=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Pn=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Fn=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,In=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ln=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Rn=e=>Mn.test(e),F=e=>!!e&&!Number.isNaN(Number(e)),zn=e=>!!e&&Number.isInteger(Number(e)),Bn=e=>e.endsWith(`%`)&&F(e.slice(0,-1)),Vn=e=>Nn.test(e),Hn=()=>!0,Un=e=>Pn.test(e)&&!Fn.test(e),Wn=()=>!1,Gn=e=>In.test(e),Kn=e=>Ln.test(e),qn=e=>!I(e)&&!L(e),Jn=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),Yn=e=>ur(e,mr,Wn),I=e=>An.test(e),Xn=e=>ur(e,hr,Un),Zn=e=>ur(e,gr,F),Qn=e=>ur(e,vr,Hn),$n=e=>ur(e,_r,Wn),er=e=>ur(e,fr,Wn),tr=e=>ur(e,pr,Kn),nr=e=>ur(e,yr,Gn),L=e=>jn.test(e),rr=e=>dr(e,hr),ir=e=>dr(e,_r),ar=e=>dr(e,fr),or=e=>dr(e,mr),sr=e=>dr(e,pr),cr=e=>dr(e,yr,!0),lr=e=>dr(e,vr,!0),ur=(e,t,n)=>{let r=An.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},dr=(e,t,n=!1)=>{let r=jn.exec(e);return r?r[1]?t(r[1]):n:!1},fr=e=>e===`position`||e===`percentage`,pr=e=>e===`image`||e===`url`,mr=e=>e===`length`||e===`size`||e===`bg-size`,hr=e=>e===`length`,gr=e=>e===`number`,_r=e=>e===`family-name`,vr=e=>e===`number`||e===`weight`,yr=e=>e===`shadow`,br=Dn(()=>{let e=kn(`color`),t=kn(`font`),n=kn(`text`),r=kn(`font-weight`),i=kn(`tracking`),a=kn(`leading`),o=kn(`breakpoint`),s=kn(`container`),c=kn(`spacing`),l=kn(`radius`),u=kn(`shadow`),d=kn(`inset-shadow`),f=kn(`text-shadow`),p=kn(`drop-shadow`),m=kn(`blur`),h=kn(`perspective`),g=kn(`aspect`),_=kn(`ease`),v=kn(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),L,I],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[L,I,c],T=()=>[Rn,`full`,`auto`,...w()],E=()=>[zn,`none`,`subgrid`,L,I],D=()=>[`auto`,{span:[`full`,zn,L,I]},zn,L,I],O=()=>[zn,`auto`,L,I],ee=()=>[`auto`,`min`,`max`,`fr`,L,I],te=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],k=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],A=()=>[`auto`,...w()],ne=()=>[Rn,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],re=()=>[s,Rn,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],ie=()=>[Rn,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],j=()=>[e,L,I],ae=()=>[...b(),ar,er,{position:[L,I]}],oe=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],se=()=>[`auto`,`cover`,`contain`,or,Yn,{size:[L,I]}],ce=()=>[Bn,rr,Xn],le=()=>[``,`none`,`full`,l,L,I],ue=()=>[``,F,rr,Xn],de=()=>[`solid`,`dashed`,`dotted`,`double`],fe=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],pe=()=>[F,Bn,ar,er],me=()=>[``,`none`,m,L,I],he=()=>[`none`,F,L,I],ge=()=>[`none`,F,L,I],_e=()=>[F,L,I],ve=()=>[Rn,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[Vn],breakpoint:[Vn],color:[Hn],container:[Vn],"drop-shadow":[Vn],ease:[`in`,`out`,`in-out`],font:[qn],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[Vn],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[Vn],shadow:[Vn],spacing:[`px`,F],text:[Vn],"text-shadow":[Vn],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,Rn,I,L,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,L,I]}],"container-named":[Jn],columns:[{columns:[F,`auto`,I,L,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[zn,`auto`,L,I]}],basis:[{basis:[Rn,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[F,Rn,`auto`,`initial`,`none`,I]}],grow:[{grow:[``,F,L,I]}],shrink:[{shrink:[``,F,L,I]}],order:[{order:[zn,`first`,`last`,`none`,L,I]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":ee()}],"auto-rows":[{"auto-rows":ee()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...te(),`normal`]}],"justify-items":[{"justify-items":[...k(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...k()]}],"align-content":[{content:[`normal`,...te()]}],"align-items":[{items:[...k(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...k(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":te()}],"place-items":[{"place-items":[...k(),`baseline`]}],"place-self":[{"place-self":[`auto`,...k()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:A()}],mx:[{mx:A()}],my:[{my:A()}],ms:[{ms:A()}],me:[{me:A()}],mbs:[{mbs:A()}],mbe:[{mbe:A()}],mt:[{mt:A()}],mr:[{mr:A()}],mb:[{mb:A()}],ml:[{ml:A()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:ne()}],"inline-size":[{inline:[`auto`,...re()]}],"min-inline-size":[{"min-inline":[`auto`,...re()]}],"max-inline-size":[{"max-inline":[`none`,...re()]}],"block-size":[{block:[`auto`,...ie()]}],"min-block-size":[{"min-block":[`auto`,...ie()]}],"max-block-size":[{"max-block":[`none`,...ie()]}],w:[{w:[s,`screen`,...ne()]}],"min-w":[{"min-w":[s,`screen`,`none`,...ne()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...ne()]}],h:[{h:[`screen`,`lh`,...ne()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...ne()]}],"max-h":[{"max-h":[`screen`,`lh`,`none`,...ne()]}],"font-size":[{text:[`base`,n,rr,Xn]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,lr,Qn]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,Bn,I]}],"font-family":[{font:[ir,$n,t]}],"font-features":[{"font-features":[I]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,L,I]}],"line-clamp":[{"line-clamp":[F,`none`,L,Zn]}],leading:[{leading:[`none`,a,...w()]}],"list-image":[{"list-image":[`none`,L,I]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,L,I]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:j()}],"text-color":[{text:j()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...de(),`wavy`]}],"text-decoration-thickness":[{decoration:[F,`from-font`,`auto`,L,Xn]}],"text-decoration-color":[{decoration:j()}],"underline-offset":[{"underline-offset":[F,`auto`,L,I]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[zn,L,I]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,L,I]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,L,I]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:ae()}],"bg-repeat":[{bg:oe()}],"bg-size":[{bg:se()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},zn,L,I],radial:[``,L,I],conic:[``,zn,L,I]},sr,tr]}],"bg-color":[{bg:j()}],"gradient-from-pos":[{from:ce()}],"gradient-via-pos":[{via:ce()}],"gradient-to-pos":[{to:ce()}],"gradient-from":[{from:j()}],"gradient-via":[{via:j()}],"gradient-to":[{to:j()}],rounded:[{rounded:le()}],"rounded-s":[{"rounded-s":le()}],"rounded-e":[{"rounded-e":le()}],"rounded-t":[{"rounded-t":le()}],"rounded-r":[{"rounded-r":le()}],"rounded-b":[{"rounded-b":le()}],"rounded-l":[{"rounded-l":le()}],"rounded-ss":[{"rounded-ss":le()}],"rounded-se":[{"rounded-se":le()}],"rounded-ee":[{"rounded-ee":le()}],"rounded-es":[{"rounded-es":le()}],"rounded-tl":[{"rounded-tl":le()}],"rounded-tr":[{"rounded-tr":le()}],"rounded-br":[{"rounded-br":le()}],"rounded-bl":[{"rounded-bl":le()}],"border-w":[{border:ue()}],"border-w-x":[{"border-x":ue()}],"border-w-y":[{"border-y":ue()}],"border-w-s":[{"border-s":ue()}],"border-w-e":[{"border-e":ue()}],"border-w-bs":[{"border-bs":ue()}],"border-w-be":[{"border-be":ue()}],"border-w-t":[{"border-t":ue()}],"border-w-r":[{"border-r":ue()}],"border-w-b":[{"border-b":ue()}],"border-w-l":[{"border-l":ue()}],"divide-x":[{"divide-x":ue()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":ue()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...de(),`hidden`,`none`]}],"divide-style":[{divide:[...de(),`hidden`,`none`]}],"border-color":[{border:j()}],"border-color-x":[{"border-x":j()}],"border-color-y":[{"border-y":j()}],"border-color-s":[{"border-s":j()}],"border-color-e":[{"border-e":j()}],"border-color-bs":[{"border-bs":j()}],"border-color-be":[{"border-be":j()}],"border-color-t":[{"border-t":j()}],"border-color-r":[{"border-r":j()}],"border-color-b":[{"border-b":j()}],"border-color-l":[{"border-l":j()}],"divide-color":[{divide:j()}],"outline-style":[{outline:[...de(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[F,L,I]}],"outline-w":[{outline:[``,F,rr,Xn]}],"outline-color":[{outline:j()}],shadow:[{shadow:[``,`inner`,`none`,u,cr,nr]}],"shadow-color":[{shadow:j()}],"inset-shadow":[{"inset-shadow":[`none`,d,cr,nr]}],"inset-shadow-color":[{"inset-shadow":j()}],"ring-w":[{ring:ue()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:j()}],"ring-offset-w":[{"ring-offset":[F,Xn]}],"ring-offset-color":[{"ring-offset":j()}],"inset-ring-w":[{"inset-ring":ue()}],"inset-ring-color":[{"inset-ring":j()}],"text-shadow":[{"text-shadow":[`none`,f,cr,nr]}],"text-shadow-color":[{"text-shadow":j()}],opacity:[{opacity:[F,L,I]}],"mix-blend":[{"mix-blend":[...fe(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":fe()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[F]}],"mask-image-linear-from-pos":[{"mask-linear-from":pe()}],"mask-image-linear-to-pos":[{"mask-linear-to":pe()}],"mask-image-linear-from-color":[{"mask-linear-from":j()}],"mask-image-linear-to-color":[{"mask-linear-to":j()}],"mask-image-t-from-pos":[{"mask-t-from":pe()}],"mask-image-t-to-pos":[{"mask-t-to":pe()}],"mask-image-t-from-color":[{"mask-t-from":j()}],"mask-image-t-to-color":[{"mask-t-to":j()}],"mask-image-r-from-pos":[{"mask-r-from":pe()}],"mask-image-r-to-pos":[{"mask-r-to":pe()}],"mask-image-r-from-color":[{"mask-r-from":j()}],"mask-image-r-to-color":[{"mask-r-to":j()}],"mask-image-b-from-pos":[{"mask-b-from":pe()}],"mask-image-b-to-pos":[{"mask-b-to":pe()}],"mask-image-b-from-color":[{"mask-b-from":j()}],"mask-image-b-to-color":[{"mask-b-to":j()}],"mask-image-l-from-pos":[{"mask-l-from":pe()}],"mask-image-l-to-pos":[{"mask-l-to":pe()}],"mask-image-l-from-color":[{"mask-l-from":j()}],"mask-image-l-to-color":[{"mask-l-to":j()}],"mask-image-x-from-pos":[{"mask-x-from":pe()}],"mask-image-x-to-pos":[{"mask-x-to":pe()}],"mask-image-x-from-color":[{"mask-x-from":j()}],"mask-image-x-to-color":[{"mask-x-to":j()}],"mask-image-y-from-pos":[{"mask-y-from":pe()}],"mask-image-y-to-pos":[{"mask-y-to":pe()}],"mask-image-y-from-color":[{"mask-y-from":j()}],"mask-image-y-to-color":[{"mask-y-to":j()}],"mask-image-radial":[{"mask-radial":[L,I]}],"mask-image-radial-from-pos":[{"mask-radial-from":pe()}],"mask-image-radial-to-pos":[{"mask-radial-to":pe()}],"mask-image-radial-from-color":[{"mask-radial-from":j()}],"mask-image-radial-to-color":[{"mask-radial-to":j()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[F]}],"mask-image-conic-from-pos":[{"mask-conic-from":pe()}],"mask-image-conic-to-pos":[{"mask-conic-to":pe()}],"mask-image-conic-from-color":[{"mask-conic-from":j()}],"mask-image-conic-to-color":[{"mask-conic-to":j()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:ae()}],"mask-repeat":[{mask:oe()}],"mask-size":[{mask:se()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,L,I]}],filter:[{filter:[``,`none`,L,I]}],blur:[{blur:me()}],brightness:[{brightness:[F,L,I]}],contrast:[{contrast:[F,L,I]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,cr,nr]}],"drop-shadow-color":[{"drop-shadow":j()}],grayscale:[{grayscale:[``,F,L,I]}],"hue-rotate":[{"hue-rotate":[F,L,I]}],invert:[{invert:[``,F,L,I]}],saturate:[{saturate:[F,L,I]}],sepia:[{sepia:[``,F,L,I]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,L,I]}],"backdrop-blur":[{"backdrop-blur":me()}],"backdrop-brightness":[{"backdrop-brightness":[F,L,I]}],"backdrop-contrast":[{"backdrop-contrast":[F,L,I]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,F,L,I]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[F,L,I]}],"backdrop-invert":[{"backdrop-invert":[``,F,L,I]}],"backdrop-opacity":[{"backdrop-opacity":[F,L,I]}],"backdrop-saturate":[{"backdrop-saturate":[F,L,I]}],"backdrop-sepia":[{"backdrop-sepia":[``,F,L,I]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,L,I]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[F,`initial`,L,I]}],ease:[{ease:[`linear`,`initial`,_,L,I]}],delay:[{delay:[F,L,I]}],animate:[{animate:[`none`,v,L,I]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,L,I]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:he()}],"rotate-x":[{"rotate-x":he()}],"rotate-y":[{"rotate-y":he()}],"rotate-z":[{"rotate-z":he()}],scale:[{scale:ge()}],"scale-x":[{"scale-x":ge()}],"scale-y":[{"scale-y":ge()}],"scale-z":[{"scale-z":ge()}],"scale-3d":[`scale-3d`],skew:[{skew:_e()}],"skew-x":[{"skew-x":_e()}],"skew-y":[{"skew-y":_e()}],transform:[{transform:[L,I,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:ve()}],"translate-x":[{"translate-x":ve()}],"translate-y":[{"translate-y":ve()}],"translate-z":[{"translate-z":ve()}],"translate-none":[`translate-none`],zoom:[{zoom:[zn,L,I]}],accent:[{accent:j()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:j()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,L,I]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":j()}],"scrollbar-track-color":[{"scrollbar-track":j()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,L,I]}],fill:[{fill:[`none`,...j()]}],"stroke-w":[{stroke:[F,rr,Xn,Zn]}],stroke:[{stroke:[`none`,...j()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`start`,`end`,`right`,`left`],"inset-y":[`inset-bs`,`inset-be`,`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`ps`,`pe`,`pr`,`pl`],py:[`pbs`,`pbe`,`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`ms`,`me`,`mr`,`ml`],my:[`mbs`,`mbe`,`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-s`,`border-w-e`,`border-w-r`,`border-w-l`],"border-w-y":[`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-s`,`border-color-e`,`border-color-r`,`border-color-l`],"border-color-y":[`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-ms`,`scroll-me`,`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-ps`,`scroll-pe`,`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function R(...e){return br(Yt(e))}var xr=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),z=o(((e,t)=>{t.exports=xr()}))(),Sr={"needs-input":{label:`Needs Input`,className:`bg-status-blocked/20 text-status-blocked border-status-blocked/30`},active:{label:`Idle`,className:`bg-status-running/20 text-status-running border-status-running/30`},completed:{label:`Done`,className:`bg-muted text-muted-foreground border-border`}};function Cr(e,t,n){return t.has(e.id)?`needs-input`:e.mode===`live`||e.alive||n?.has(e.id)?`active`:`completed`}function wr({status:e,className:t,running:n=!1}){let r=Sr[e];return(0,z.jsxs)(`span`,{className:R(`inline-flex items-center gap-1.5 rounded-full border px-2 py-0.5 text-xs font-medium`,r.className,t),children:[e===`active`&&n&&(0,z.jsx)(`span`,{className:`size-1.5 animate-pulse rounded-full bg-current`}),e===`active`&&n?`Running`:r.label]})}function Tr(e){if(/\s/.test(e))return e;let t=e.replace(/[-_]+/g,` `).trim();return t.charAt(0).toUpperCase()+t.slice(1)}function Er(e,t){return e.title?e.titleExplicit?e.title:Tr(e.title):t}function Dr(e){let t=Date.now(),n=new Date(e).getTime(),r=Math.floor((t-n)/1e3);if(r<60)return`just now`;let i=Math.floor(r/60);if(i<60)return`${i}m ago`;let a=Math.floor(i/60);if(a<24)return`${a}h ago`;let o=Math.floor(a/24);return o<7?`${o}d ago`:new Date(e).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`})}function Or(e){let t=e.replace(/\/+$/,``).split(`/`);return t[t.length-1]??e}function kr({session:e,pendingSessionIds:t,busySessionIds:n,selected:r,onSelect:i,onResume:a,running:o=!1}){let s=Cr(e,t,n),c=Er(e,e.mode===`live`?`New session`:`Untitled session`);return(0,z.jsxs)(`div`,{className:R(`group flex w-full flex-col gap-1.5 rounded-lg border p-3 text-left transition-colors`,`hover:bg-accent/50`,r?`border-brand/50 bg-brand/5`:`border-transparent`),children:[(0,z.jsxs)(`button`,{onClick:()=>i(e.id),className:`flex w-full flex-col gap-1.5 text-left`,children:[(0,z.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,z.jsx)(`span`,{className:`line-clamp-2 text-sm font-medium leading-snug`,children:c}),(0,z.jsx)(wr,{status:s,running:o,className:`shrink-0`})]}),(0,z.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-muted-foreground`,children:[e.model&&(0,z.jsx)(`span`,{className:`rounded bg-muted px-1.5 py-0.5 font-mono text-[10px] text-foreground/80`,children:e.model}),e.cwd&&(0,z.jsx)(`span`,{className:`truncate font-mono text-[10px] text-foreground/60`,title:e.cwd,children:Or(e.cwd)}),(0,z.jsx)(`span`,{className:`ml-auto shrink-0 text-foreground/60`,children:e.updatedAt?Dr(e.updatedAt):``})]})]}),e.mode===`readonly`&&e.alive!==!0&&a&&(0,z.jsxs)(`button`,{onClick:t=>{t.stopPropagation(),a(e.id)},className:R(`flex items-center gap-1.5 self-start rounded px-2 py-0.5`,`text-xs text-muted-foreground transition-colors`,`hover:bg-accent hover:text-foreground`,`opacity-0 group-hover:opacity-100 focus-visible:opacity-100`),title:`Resume this session`,"aria-label":`Resume this session`,children:[(0,z.jsx)(wt,{className:`size-3`}),`Resume`]})]})}var Ar=new Map;function jr(e){Ar.set(e.id,Object.freeze({...e}))}function Mr(e){return Ar.get(e)}function Nr(){return[...Ar.values()]}[{id:`sessions`,label:`Sessions`,title:`Sessions`,icon:it},{id:`memory`,label:`Memory`,title:`Memory`,icon:ce},{id:`schedules`,label:`Schedules`,title:`Schedules`,icon:fe},{id:`jobs`,label:`Jobs`,title:`Background Jobs`,icon:ue},{id:`handoffs`,label:`Handoffs`,title:`Pending Handoffs`,icon:oe},{id:`settings`,label:`Settings`,title:`Settings`,icon:At}].forEach(jr);function Pr({sessions:e,pendingSessionIds:t,busySessionIds:n,selectedSessionId:r,onSelectSession:i,onResumeSession:a,activeNav:o,onNavChange:s,collapsed:c,onToggleCollapse:l,onNewSession:u,starting:d=!1,runningSessionId:f}){return(0,z.jsxs)(`aside`,{className:R(`flex h-full shrink-0 flex-col border-r bg-card transition-[width] duration-200`,c?`w-72 md:w-14`:`w-72`,`max-w-[85vw]`),children:[(0,z.jsxs)(`div`,{className:`flex h-12 items-center justify-between border-b px-3`,children:[!c&&(0,z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,z.jsx)(`img`,{src:`/brand-mark.svg`,alt:`AFK`,width:24,height:24}),(0,z.jsx)(`span`,{className:`text-sm font-semibold tracking-tight`,children:`AFK`})]}),(0,z.jsx)(`button`,{onClick:l,className:`hidden rounded-md p-1.5 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground md:block`,title:c?`Expand sidebar`:`Collapse sidebar`,children:c?(0,z.jsx)(ft,{className:`size-4`}):(0,z.jsx)(ut,{className:`size-4`})})]}),u&&(0,z.jsxs)(`button`,{onClick:u,disabled:d,title:`Start a new chat`,className:`mx-2 mt-3 flex min-h-10 items-center justify-center gap-2 rounded-lg bg-brand px-2 text-sm font-medium text-primary-foreground disabled:opacity-60`,children:[(0,z.jsx)(vt,{className:`size-4 shrink-0`}),!c&&(d?`Starting…`:`New chat`)]}),(0,z.jsx)(`nav`,{className:`flex flex-col gap-0.5 p-2`,children:Nr().map(e=>(0,z.jsxs)(`button`,{onClick:()=>s(e.id),className:R(`flex items-center gap-2 rounded-md px-2.5 py-1.5 text-sm transition-colors`,o===e.id?`bg-accent text-accent-foreground font-medium`:`text-muted-foreground hover:bg-accent/50 hover:text-foreground`),title:c?e.label:void 0,"aria-label":e.label,"aria-current":o===e.id?`page`:void 0,children:[(0,z.jsx)(e.icon,{className:`size-4`,"aria-hidden":`true`}),!c&&(0,z.jsx)(`span`,{children:e.label})]},e.id))}),o===`sessions`&&!c&&(0,z.jsx)(`div`,{className:`flex-1 overflow-y-auto border-t px-2 py-2`,children:e.length===0?(0,z.jsx)(`p`,{className:`px-2 py-4 text-center text-xs text-muted-foreground`,children:`No sessions found`}):(0,z.jsx)(`div`,{className:`flex flex-col gap-0.5`,children:e.map(e=>(0,z.jsx)(kr,{session:e,pendingSessionIds:t,busySessionIds:n,selected:r===e.id,running:f===e.id,onSelect:i,onResume:a},e.id))})})]})}var Fr=1,Ir=.9,Lr=.8,Rr=.17,zr=.1,Br=.999,Vr=.9999,Hr=.99,Ur=/[\\\/_+.#"@\[\(\{&]/,Wr=/[\\\/_+.#"@\[\(\{&]/g,Gr=/[\s-]/,Kr=/[\s-]/g;function qr(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?Fr:Hr;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;l>=0;)d=qr(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=Fr:Ur.test(e.charAt(l-1))?(d*=Lr,p=e.slice(i,l-1).match(Wr),p&&i>0&&(d*=Br**+p.length)):Gr.test(e.charAt(l-1))?(d*=Ir,m=e.slice(i,l-1).match(Kr),m&&i>0&&(d*=Br**+m.length)):(d*=Rr,i>0&&(d*=Br**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=Vr)),(d<zr&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=qr(e,t,n,r,l+1,a+2,o),f*zr>d&&(d=f*zr)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function Jr(e){return e.toLowerCase().replace(Kr,` `)}function Yr(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,qr(e,t,Jr(e),Jr(t),0,0,{})}var Xr=Object.defineProperty,Zr=(e,t)=>Xr(e,`name`,{value:t,configurable:!0}),Qr=!!(typeof window<`u`&&window.document&&window.document.createElement);function $r(e,t,{checkForDefaultPrevented:n=!0}={}){return Zr(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}Zr($r,`composeEventHandlers`);function ei(e){if(!Qr)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}Zr(ei,`getOwnerWindow`);function ti(e){if(!Qr)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}Zr(ti,`getOwnerDocument`);function ni(e,t=!1){let{activeElement:n}=ti(e);if(!n?.nodeName)return null;if(ri(n)&&n.contentDocument)return ni(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=ti(n).getElementById(e);if(t)return t}}return n}Zr(ni,`getActiveElement`);function ri(e){return e.tagName===`IFRAME`}Zr(ri,`isFrame`);var ii=Object.defineProperty,ai=(e,t)=>ii(e,`name`,{value:t,configurable:!0});function oi(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}ai(oi,`setRef`);function si(...e){return t=>{let n=!1,r=e.map(e=>{let r=oi(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():oi(e[t],null)}}}}ai(si,`composeRefs`);function ci(...e){return O.useCallback(si(...e),e)}ai(ci,`useComposedRefs`);var li=Object.defineProperty,ui=(e,t)=>li(e,`name`,{value:t,configurable:!0});function di(e,t){let n=O.createContext(t);n.displayName=e+`Context`;let r=ui(e=>{let{children:t,...r}=e,i=O.useMemo(()=>r,Object.values(r));return(0,z.jsx)(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:a=!1}=i,o=O.useContext(n);if(o)return o;if(t!==void 0)return t;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return ui(i,`useContext`),[r,i]}ui(di,`createContext`);function fi(e,t=[]){let n=[];function r(t,r){let i=O.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=ui(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=O.useMemo(()=>o,Object.values(o));return(0,z.jsx)(s.Provider,{value:c,children:r})},`Provider`);o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,l=o?.[e]?.[a]||i,u=O.useContext(l);if(u)return u;if(r!==void 0)return r;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return ui(s,`useContext`),[o,s]}ui(r,`createContext`);let i=ui(()=>{let t=n.map(e=>O.createContext(e));return ui(function(n){let r=n?.[e]||t;return O.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,pi(i,...t)]}ui(fi,`createContextScope`);function pi(...e){let t=e[0];if(e.length===1)return t;let n=ui(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return ui(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return O.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}ui(pi,`composeContextScopes`);var mi=globalThis?.document?O.useLayoutEffect:()=>{},hi=Object.defineProperty,gi=(e,t)=>hi(e,`name`,{value:t,configurable:!0}),_i=O.useId||(()=>void 0),vi=0;function yi(e){let[t,n]=O.useState(_i());return mi(()=>{e||n(e=>e??String(vi++))},[e]),e||(t?`radix-${t}`:``)}gi(yi,`useId`);var bi=Object.defineProperty,xi=(e,t)=>bi(e,`name`,{value:t,configurable:!0}),Si=O.useEffectEvent,Ci=O.useInsertionEffect;function wi(e){if(typeof Si==`function`)return Si(e);let t=O.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof Ci==`function`?Ci(()=>{t.current=e}):mi(()=>{t.current=e}),O.useMemo(()=>((...e)=>t.current?.(...e)),[])}xi(wi,`useEffectEvent`);var Ti=Object.defineProperty,Ei=(e,t)=>Ti(e,`name`,{value:t,configurable:!0}),Di=O.useInsertionEffect||mi;function Oi({prop:e,defaultProp:t,onChange:n=Ei(()=>{},`onChange`),caller:r}){let[i,a,o]=ki({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,O.useCallback(t=>{if(s){let n=Ai(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}Ei(Oi,`useControllableState`);function ki({defaultProp:e,onChange:t}){let[n,r]=O.useState(e),i=O.useRef(n),a=O.useRef(t);return Di(()=>{a.current=t},[t]),O.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}Ei(ki,`useUncontrolledState`);function Ai(e){return typeof e==`function`}Ei(Ai,`isFunction`);var ji=Symbol(`RADIX:SYNC_STATE`);function Mi(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=wi(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=O.useReducer((t,n)=>{if(n.type===ji)return{...t,state:n.state};let r=e(t,n);return c&&!Object.is(r.state,t.state)&&l(r.state),r},...u),p=d.state,m=O.useRef(p);O.useEffect(()=>{m.current!==p&&(m.current=p,c||l(p))},[p,m,c]);let h=O.useMemo(()=>i===void 0?d:{...d,state:i},[d,i]);return O.useEffect(()=>{c&&!Object.is(i,d.state)&&f({type:ji,state:i})},[i,d.state,c]),[h,f]}Ei(Mi,`useControllableStateReducer`);var Ni=l(h(),1),Pi=Object.defineProperty,Fi=(e,t)=>Pi(e,`name`,{value:t,configurable:!0});function Ii(e){let t=O.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];Wi(r)&&typeof Ji==`function`&&(r=Ji(r._payload)),O.Children.forEach(r,e=>{if(Hi(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;Wi(n)&&typeof Ji==`function`&&(n=Ji(n._payload)),a=zi(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=O.cloneElement(a,void 0,s):!o&&O.Children.count(r)===1&&O.isValidElement(r)&&(a=r);let c=a?Vi(a):void 0,l=ci(n,c);if(!a){if(r||r===0)throw Error(o?qi(e):Ki(e));return r}let u=Bi(i,a.props??{});return a.type!==O.Fragment&&(u.ref=n?l:c),O.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}Fi(Ii,`createSlot`);var Li=Symbol.for(`radix.slottable`);function Ri(e){let t=Fi(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=Li,t}Fi(Ri,`createSlottable`);var zi=Fi((e,t)=>{if(`child`in e.props){let t=e.props.child;return O.isValidElement(t)?O.cloneElement(t,void 0,e.props.children(t.props.children)):null}return O.isValidElement(t)?t:null},`getSlottableElementFromSlottable`);function Bi(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}Fi(Bi,`mergeProps`);function Vi(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}Fi(Vi,`getElementRef`);function Hi(e){return O.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Li}Fi(Hi,`isSlottable`);var Ui=Symbol.for(`react.lazy`);function Wi(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Ui&&`_payload`in e&&Gi(e._payload)}Fi(Wi,`isLazyComponent`);function Gi(e){return typeof e==`object`&&!!e&&`then`in e}Fi(Gi,`isPromiseLike`);var Ki=Fi(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),qi=Fi(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),Ji=O.use,Yi=Object.defineProperty,Xi=(e,t)=>Yi(e,`name`,{value:t,configurable:!0}),Zi=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Ii(`Primitive.${t}`),r=O.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,z.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Qi(e,t){e&&Ni.flushSync(()=>e.dispatchEvent(t))}Xi(Qi,`dispatchDiscreteCustomEvent`);var $i=Object.defineProperty,ea=(e,t)=>$i(e,`name`,{value:t,configurable:!0});function ta(e){let t=O.useRef(e);return O.useEffect(()=>{t.current=e}),O.useMemo(()=>((...e)=>t.current?.(...e)),[])}ea(ta,`useCallbackRef`);var na=Object.defineProperty,B=(e,t)=>na(e,`name`,{value:t,configurable:!0}),ra=`dismissableLayer.update`,V=`dismissableLayer.pointerDownOutside`,ia=`dismissableLayer.focusOutside`,aa,oa=O.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),sa=O.forwardRef(B(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...l}=e,u=O.useContext(oa),[d,f]=O.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=O.useState({}),h=ci(t,f),g=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=_?g.indexOf(_):-1,y=d?g.indexOf(d):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,x=y>=v,S=O.useRef(!1),C=ua(e=>{a?.(e),s?.(e),e.defaultPrevented||c?.()},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:S,dismissableSurfaces:u.dismissableSurfaces,shouldHandlePointerDownOutside:O.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...u.branches].some(t=>t.contains(e));return x&&!t},[u.branches,x])}),w=da(e=>{if(r&&S.current)return;let t=e.target;[...u.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},p),T=d?y===g.length-1:!1,E=ta(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return O.useEffect(()=>{if(T)return p.addEventListener(`keydown`,E,{capture:!0}),()=>p.removeEventListener(`keydown`,E,{capture:!0})},[p,T,E]),O.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(aa=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),fa(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=aa))}},[d,p,n,u]),O.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),fa())},[d,u]),O.useEffect(()=>{let e=B(()=>m({}),`handleUpdate`);return document.addEventListener(ra,e),()=>document.removeEventListener(ra,e)},[]),(0,z.jsx)(Zi.div,{...l,ref:h,style:{pointerEvents:b?x?`auto`:`none`:void 0,...e.style},onFocusCapture:$r(e.onFocusCapture,w.onFocusCapture),onBlurCapture:$r(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:$r(e.onPointerDownCapture,C.onPointerDownCapture)})},`DismissableLayer`));function ca(){let e=O.useContext(oa),[t,n]=O.useState(null);return O.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}B(ca,`useDismissableLayerSurface`);var la=B(()=>!0,`IS_TRUE`);function ua(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=la}=t,s=ta(e),c=O.useRef(!1),l=O.useRef(!1),u=O.useRef(new Map),d=O.useRef(()=>{});return O.useEffect(()=>{function e(){l.current=!1,i.current=!1,u.current.clear()}B(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}B(t,`isOutsideInteractionIntercepted`);function f(e){if(!l.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||u.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{l.current&&d.current()},0)}B(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}B(p,`handleInteractionBubble`);let m=B(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||pa(V,s,p,{discrete:!0})};if(B(f,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,d.current),e(),c.current=!1;return}let p={originalEvent:a};l.current=!0,i.current=r&&a.button===0,u.current.clear(),!r||a.button!==0?f():(n.removeEventListener(`click`,d.current),d.current=f,n.addEventListener(`click`,d.current,{once:!0}))}else n.removeEventListener(`click`,d.current),e();c.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,f,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,d.current);for(let e of h)n.removeEventListener(e,f,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:B(()=>c.current=!0,`onPointerDownCapture`)}}B(ua,`usePointerDownOutside`);function da(e,t=globalThis?.document){let n=ta(e),r=O.useRef(!1);return O.useEffect(()=>{let e=B(e=>{e.target&&!r.current&&pa(ia,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:B(()=>r.current=!0,`onFocusCapture`),onBlurCapture:B(()=>r.current=!1,`onBlurCapture`)}}B(da,`useFocusOutside`);function fa(){let e=new CustomEvent(ra);document.dispatchEvent(e)}B(fa,`dispatchUpdate`);function pa(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?Qi(i,a):i.dispatchEvent(a)}B(pa,`handleAndDispatchCustomEvent`);var ma=Object.defineProperty,ha=(e,t)=>ma(e,`name`,{value:t,configurable:!0}),ga=`focusScope.autoFocusOnMount`,_a=`focusScope.autoFocusOnUnmount`,va={bubbles:!1,cancelable:!0},ya=O.forwardRef(ha(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=O.useState(null),l=ta(i),u=ta(a),d=O.useRef(null),f=ci(t,c),p=O.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;O.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:Ea(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||Ea(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&Ea(s)};ha(e,`handleFocusIn`),ha(t,`handleFocusOut`),ha(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),O.useEffect(()=>{if(s){Da.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(ga,va);s.addEventListener(ga,l),s.dispatchEvent(t),t.defaultPrevented||(ba(Aa(Sa(s)),{select:!0}),document.activeElement===e&&Ea(s))}return()=>{s.removeEventListener(ga,l),setTimeout(()=>{let t=new CustomEvent(_a,va);s.addEventListener(_a,u),s.dispatchEvent(t),t.defaultPrevented||Ea(e??document.body,{select:!0}),s.removeEventListener(_a,u),Da.remove(p)},0)}}},[s,l,u,p]);let m=O.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=xa(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&Ea(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&Ea(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,z.jsx)(Zi.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})},`FocusScope`));function ba(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(Ea(r,{select:t}),document.activeElement!==n)return}ha(ba,`focusFirst`);function xa(e){let t=Sa(e);return[Ca(t,e),Ca(t.reverse(),e)]}ha(xa,`getTabbableEdges`);function Sa(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:ha(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},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}ha(Sa,`getTabbableCandidates`);function Ca(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):wa(r,{upTo:t})))return r}ha(Ca,`findVisible`);function wa(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}ha(wa,`isHidden`);function Ta(e){return e instanceof HTMLInputElement&&`select`in e}ha(Ta,`isSelectableInput`);function Ea(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Ta(e)&&t&&e.select()}}ha(Ea,`focus`);var Da=Oa();function Oa(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=ka(e,t),e.unshift(t)},remove(t){e=ka(e,t),e[0]?.resume()}}}ha(Oa,`createFocusScopesStack`);function ka(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}ha(ka,`arrayRemove`);function Aa(e){return e.filter(e=>e.tagName!==`A`)}ha(Aa,`removeLinks`);var ja=Object.defineProperty,Ma=O.forwardRef(((e,t)=>ja(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=O.useState(!1);mi(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?Ni.createPortal((0,z.jsx)(Zi.div,{...r,ref:t}),o):null},`Portal`)),Na=Object.defineProperty,Pa=(e,t)=>Na(e,`name`,{value:t,configurable:!0});function Fa(e,t){return O.useReducer((e,n)=>t[e][n]??e,e)}Pa(Fa,`useStateMachine`);var Ia=Pa(e=>{let{present:t,children:n}=e,r=La(t),i=typeof n==`function`?n({present:r.isPresent}):O.Children.only(n),a=za(r.ref,Va(i));return typeof n==`function`||r.isPresent?O.cloneElement(i,{ref:a}):null},`Presence`);function La(e){let[t,n]=O.useState(),r=O.useRef(null),i=O.useRef(e),a=O.useRef(`none`),o=O.useRef(void 0),[s,c]=Fa(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return O.useEffect(()=>{s===`mounted`?(a.current=o.current??Ba(r.current),o.current=void 0):a.current=`none`},[s]),mi(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=Ba(t);e?(o.current=s,c(`MOUNT`)):s===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),mi(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=Pa(a=>{let o=Ba(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=Pa(e=>{e.target===t&&(a.current=Ba(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:O.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=Ba(t)}else r.current=null;n(e)},[])}}Pa(La,`usePresence`);function Ra(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}Pa(Ra,`setRef`);function za(...e){let t=O.useRef(e);return t.current=e,O.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=Ra(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():Ra(n[e],null)}}},[])}Pa(za,`useStableComposedRefs`);function Ba(e){return e?.animationName||`none`}Pa(Ba,`getAnimationName`);function Va(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}Pa(Va,`getElementRef`);var Ha=Object.defineProperty,Ua=(e,t)=>Ha(e,`name`,{value:t,configurable:!0}),Wa=0,Ga=null;function Ka(e){return qa(),e.children}Ua(Ka,`FocusGuards`);function qa(){O.useEffect(()=>{Ga||={start:Ja(),end:Ja()};let{start:e,end:t}=Ga;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),Wa++,()=>{Wa===1&&(Ga?.start.remove(),Ga?.end.remove(),Ga=null),Wa=Math.max(0,Wa-1)}},[])}Ua(qa,`useFocusGuards`);function Ja(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}Ua(Ja,`createFocusGuard`);var Ya=function(){return Ya=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ya.apply(this,arguments)};function Xa(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Za(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Qa=`right-scroll-bar-position`,$a=`width-before-scroll-bar`,eo=`with-scroll-bars-hidden`,to=`--removed-body-scroll-bar-size`;function no(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function ro(e,t){var n=(0,O.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var io=typeof window<`u`?O.useLayoutEffect:O.useEffect,ao=new WeakMap;function oo(e,t){var n=ro(t||null,function(t){return e.forEach(function(e){return no(e,t)})});return io(function(){var t=ao.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||no(e,null)}),i.forEach(function(e){r.has(e)||no(e,a)})}ao.set(n,e)},[e]),n}function so(e){return e}function co(e,t){t===void 0&&(t=so);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function lo(e){e===void 0&&(e={});var t=co(null);return t.options=Ya({async:!0,ssr:!1},e),t}var uo=function(e){var t=e.sideCar,n=Xa(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return O.createElement(r,Ya({},n))};uo.isSideCarExport=!0;function fo(e,t){return e.useMedium(t),uo}var po=lo(),mo=function(){},ho=O.forwardRef(function(e,t){var n=O.useRef(null),r=O.useState({onScrollCapture:mo,onWheelCapture:mo,onTouchMoveCapture:mo}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=Xa(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=oo([n,t]),C=Ya(Ya({},b),i);return O.createElement(O.Fragment,null,u&&O.createElement(x,{sideCar:po,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?O.cloneElement(O.Children.only(s),Ya(Ya({},C),{ref:S})):O.createElement(v,Ya({},C,{className:c,ref:S}),s))});ho.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},ho.classNames={fullWidth:$a,zeroRight:Qa};var go=function(){if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function _o(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=go();return t&&e.setAttribute(`nonce`,t),e}function vo(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function yo(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var bo=function(){var e=0,t=null;return{add:function(n){e==0&&(t=_o())&&(vo(t,n),yo(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},xo=function(){var e=bo();return function(t,n){O.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},So=function(){var e=xo();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Co={left:0,top:0,right:0,gap:0},wo=function(e){return parseInt(e||``,10)||0},To=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[wo(n),wo(r),wo(i)]},Eo=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Co;var t=To(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Do=So(),Oo=`data-scroll-locked`,ko=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
10
+ .${eo} {
11
+ overflow: hidden ${r};
12
+ padding-right: ${s}px ${r};
13
+ }
14
+ body[${Oo}] {
15
+ overflow: hidden ${r};
16
+ overscroll-behavior: contain;
17
+ ${[t&&`position: relative ${r};`,n===`margin`&&`
18
+ padding-left: ${i}px;
19
+ padding-top: ${a}px;
20
+ padding-right: ${o}px;
21
+ margin-left:0;
22
+ margin-top:0;
23
+ margin-right: ${s}px ${r};
24
+ `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
25
+ }
26
+
27
+ .${Qa} {
28
+ right: ${s}px ${r};
29
+ }
30
+
31
+ .${$a} {
32
+ margin-right: ${s}px ${r};
33
+ }
34
+
35
+ .${Qa} .${Qa} {
36
+ right: 0 ${r};
37
+ }
38
+
39
+ .${$a} .${$a} {
40
+ margin-right: 0 ${r};
41
+ }
42
+
43
+ body[${Oo}] {
44
+ ${to}: ${s}px;
45
+ }
46
+ `},Ao=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},jo=function(){O.useEffect(function(){return document.body.setAttribute(Oo,(Ao()+1).toString()),function(){var e=Ao()-1;e<=0?document.body.removeAttribute(Oo):document.body.setAttribute(Oo,e.toString())}},[])},Mo=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;jo();var a=O.useMemo(function(){return Eo(i)},[i]);return O.createElement(Do,{styles:ko(a,!t,i,n?``:`!important`)})},No=!1;if(typeof window<`u`)try{var Po=Object.defineProperty({},"passive",{get:function(){return No=!0,!0}});window.addEventListener(`test`,Po,Po),window.removeEventListener(`test`,Po,Po)}catch{No=!1}var Fo=No?{passive:!1}:!1,Io=function(e){return e.tagName===`TEXTAREA`},Lo=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!Io(e)&&n[t]===`visible`)},Ro=function(e){return Lo(e,`overflowY`)},zo=function(e){return Lo(e,`overflowX`)},Bo=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),Ho(e,r)){var i=Uo(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Vo=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},H=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},Ho=function(e,t){return e===`v`?Ro(t):zo(t)},Uo=function(e,t){return e===`v`?Vo(t):H(t)},Wo=function(e,t){return e===`h`&&t===`rtl`?-1:1},Go=function(e,t,n,r,i){var a=Wo(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=Uo(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&Ho(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},Ko=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},qo=function(e){return[e.deltaX,e.deltaY]},Jo=function(e){return e&&`current`in e?e.current:e},Yo=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Xo=function(e){return`
47
+ .block-interactivity-${e} {pointer-events: none;}
48
+ .allow-interactivity-${e} {pointer-events: all;}
49
+ `},Zo=0,Qo=[];function $o(e){var t=O.useRef([]),n=O.useRef([0,0]),r=O.useRef(),i=O.useState(Zo++)[0],a=O.useState(So)[0],o=O.useRef(e);O.useEffect(function(){o.current=e},[e]),O.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=Za([e.lockRef.current],(e.shards||[]).map(Jo),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=O.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=Ko(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=Bo(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Bo(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return Go(h,t,e,h===`h`?s:c,!0)},[]),c=O.useCallback(function(e){var n=e;if(Qo.length&&Qo[Qo.length-1]===a){var r=`deltaY`in n?qo(n):Ko(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Yo(e.delta,r)})[0];if(i&&i.should)n.cancelable&&n.preventDefault();else if(!i){var c=(o.current.shards||[]).map(Jo).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=O.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:es(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=O.useCallback(function(e){n.current=Ko(e),r.current=void 0},[]),d=O.useCallback(function(t){l(t.type,qo(t),t.target,s(t,e.lockRef.current))},[]),f=O.useCallback(function(t){l(t.type,Ko(t),t.target,s(t,e.lockRef.current))},[]);O.useEffect(function(){return Qo.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,Fo),document.addEventListener(`touchmove`,c,Fo),document.addEventListener(`touchstart`,u,Fo),function(){Qo=Qo.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,Fo),document.removeEventListener(`touchmove`,c,Fo),document.removeEventListener(`touchstart`,u,Fo)}},[]);var p=e.removeScrollBar,m=e.inert;return O.createElement(O.Fragment,null,m?O.createElement(a,{styles:Xo(i)}):null,p?O.createElement(Mo,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function es(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var ts=fo(po,$o),ns=O.forwardRef(function(e,t){return O.createElement(ho,Ya({},e,{ref:t,sideCar:ts}))});ns.classNames=ho.classNames;var rs=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},is=new WeakMap,as=new WeakMap,os={},ss=0,cs=function(e){return e&&(e.host||cs(e.parentNode))},ls=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=cs(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},us=function(e,t,n,r){var i=ls(t,Array.isArray(e)?e:[e]);os[n]||(os[n]=new WeakMap);var a=os[n],o=[],s=new Set,c=new Set(i),l=function(e){e&&!s.has(e)&&(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){e&&!c.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(is.get(e)||0)+1,l=(a.get(e)||0)+1;is.set(e,c),a.set(e,l),o.push(e),c===1&&i&&as.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),ss++,function(){o.forEach(function(e){var t=is.get(e)-1,i=a.get(e)-1;is.set(e,t),a.set(e,i),t||(as.has(e)||e.removeAttribute(r),as.delete(e)),i||e.removeAttribute(n)}),ss--,ss||(is=new WeakMap,is=new WeakMap,as=new WeakMap,os={})}},ds=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||rs(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),us(r,i,n,`aria-hidden`)):function(){return null}},fs=Object.defineProperty,ps=(e,t)=>fs(e,`name`,{value:t,configurable:!0}),ms=`Dialog`,[hs,gs]=fi(ms),[_s,vs]=hs(ms),ys=ps(e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=O.useRef(null),c=O.useRef(null),[l,u]=Oi({prop:r,defaultProp:i??!1,onChange:a,caller:ms}),[d,f]=O.useState(0),[p,m]=O.useState(0);return(0,z.jsx)(_s,{scope:t,triggerRef:s,contentRef:c,contentId:yi(),titleId:yi(),descriptionId:yi(),titlePresent:d>0,descriptionPresent:p>0,setTitleCount:f,setDescriptionCount:m,open:l,onOpenChange:u,onOpenToggle:O.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})},`Dialog`),bs=`DialogPortal`,[xs,Ss]=hs(bs,{forceMount:void 0}),Cs=ps(e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=vs(bs,t);return(0,z.jsx)(xs,{scope:t,forceMount:n,children:O.Children.map(r,e=>(0,z.jsx)(Ia,{present:n||a.open,children:(0,z.jsx)(Ma,{asChild:!0,container:i,children:e})}))})},`DialogPortal`),ws=`DialogOverlay`,Ts=O.forwardRef(ps(function(e,t){let n=Ss(ws,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=vs(ws,e.__scopeDialog);return a.modal?(0,z.jsx)(Ia,{present:r||a.open,children:(0,z.jsx)(Ds,{...i,ref:t})}):null},`DialogOverlay`)),Es=Ii(`DialogOverlay.RemoveScroll`),Ds=O.forwardRef(ps(function(e,t){let{__scopeDialog:n,...r}=e,i=vs(ws,n),a=ci(t,ca());return(0,z.jsx)(ns,{as:Es,allowPinchZoom:!0,shards:[i.contentRef],children:(0,z.jsx)(Zi.div,{"data-state":Ns(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})},`DialogOverlayImpl`)),Os=`DialogContent`,ks=O.forwardRef(ps(function(e,t){let n=Ss(Os,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=vs(Os,e.__scopeDialog);return(0,z.jsx)(Ia,{present:r||a.open,children:a.modal?(0,z.jsx)(As,{...i,ref:t}):(0,z.jsx)(js,{...i,ref:t})})},`DialogContent`)),As=O.forwardRef(ps(function(e,t){let n=vs(Os,e.__scopeDialog),r=O.useRef(null),i=ci(t,n.contentRef,r);return O.useEffect(()=>{let e=r.current;if(e)return ds(e)},[]),(0,z.jsx)(Ms,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:$r(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:$r(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:$r(e.onFocusOutside,e=>e.preventDefault())})},`DialogContentModal`)),js=O.forwardRef(ps(function(e,t){let n=vs(Os,e.__scopeDialog),r=O.useRef(!1),i=O.useRef(!1);return(0,z.jsx)(Ms,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`DialogContentNonModal`)),Ms=O.forwardRef(ps(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=vs(Os,n);return qa(),(0,z.jsx)(z.Fragment,{children:(0,z.jsx)(ya,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,z.jsx)(sa,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionPresent?s.descriptionId:void 0,"aria-labelledby":s.titlePresent?s.titleId:void 0,"data-state":Ns(s.open),...o,ref:t,deferPointerDownOutside:!0,onDismiss:()=>s.onOpenChange(!1)})})})},`DialogContentImpl`));function Ns(e){return e?`open`:`closed`}ps(Ns,`getState`);var Ps=`[cmdk-group=""]`,Fs=`[cmdk-group-items=""]`,Is=`[cmdk-group-heading=""]`,Ls=`[cmdk-item=""]`,Rs=`${Ls}:not([aria-disabled="true"])`,zs=`cmdk-item-select`,Bs=`data-value`,Vs=(e,t,n)=>Yr(e,t,n),Hs=O.createContext(void 0),Us=()=>O.useContext(Hs),Ws=O.createContext(void 0),Gs=()=>O.useContext(Ws),Ks=O.createContext(void 0),qs=O.forwardRef((e,t)=>{let n=sc(()=>({search:``,value:e.value??e.defaultValue??``,selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),r=sc(()=>new Set),i=sc(()=>new Map),a=sc(()=>new Map),o=sc(()=>new Set),s=ac(e),{label:c,children:l,value:u,onValueChange:d,filter:f,shouldFilter:p,loop:m,disablePointerSelection:h=!1,vimBindings:g=!0,..._}=e,v=yi(),y=yi(),b=yi(),x=O.useRef(null),S=uc();oc(()=>{if(u!==void 0){let e=u.trim();n.current.value=e,C.emit()}},[u]),oc(()=>{S(6,te)},[]);let C=O.useMemo(()=>({subscribe:e=>(o.current.add(e),()=>o.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var i,a,o;if(!Object.is(n.current[e],t)){if(n.current[e]=t,e===`search`)ee(),E(),S(1,D);else if(e===`value`){if(document.activeElement.hasAttribute(`cmdk-input`)||document.activeElement.hasAttribute(`cmdk-root`)){let e=document.getElementById(b);e?e.focus():(i=document.getElementById(v))==null||i.focus()}if(S(7,()=>{n.current.selectedItemId=k()?.id,C.emit()}),r||S(5,te),s.current?.value!==void 0){let e=t??``;(o=(a=s.current).onValueChange)==null||o.call(a,e);return}}C.emit()}},emit:()=>{o.current.forEach(e=>e())}}),[]),w=O.useMemo(()=>({value:(e,t,r)=>{t!==a.current.get(e)?.value&&(a.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,T(t,r)),S(2,()=>{E(),C.emit()}))},item:(e,t)=>(r.current.add(e),t&&(i.current.has(t)?i.current.get(t).add(e):i.current.set(t,new Set([e]))),S(3,()=>{ee(),E(),n.current.value||D(),C.emit()}),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=k();S(4,()=>{ee(),t?.getAttribute(`id`)===e&&D(),C.emit()})}),group:e=>(i.current.has(e)||i.current.set(e,new Set),()=>{a.current.delete(e),i.current.delete(e)}),filter:()=>s.current.shouldFilter,label:c||e[`aria-label`],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:v,inputId:b,labelId:y,listInnerRef:x}),[]);function T(e,t){let r=s.current?.filter??Vs;return e?r(e,n.current.search,t):0}function E(){if(!n.current.search||s.current.shouldFilter===!1)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=i.current.get(n),a=0;r.forEach(t=>{let n=e.get(t);a=Math.max(n,a)}),t.push([n,a])});let r=x.current;A().sort((t,n)=>{let r=t.getAttribute(`id`),i=n.getAttribute(`id`);return(e.get(i)??0)-(e.get(r)??0)}).forEach(e=>{let t=e.closest(Fs);t?t.appendChild(e.parentElement===t?e:e.closest(`${Fs} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${Fs} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=x.current?.querySelector(`${Ps}[${Bs}="${encodeURIComponent(e[0])}"]`);t?.parentElement.appendChild(t)})}function D(){let e=A().find(e=>e.getAttribute(`aria-disabled`)!==`true`)?.getAttribute(Bs);C.setState(`value`,e||void 0)}function ee(){if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let e=0;for(let t of r.current){let r=T(a.current.get(t)?.value??``,a.current.get(t)?.keywords??[]);n.current.filtered.items.set(t,r),r>0&&e++}for(let[e,t]of i.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=e}function te(){var e;let t=k();t&&(t.parentElement?.firstChild===t&&((e=t.closest(Ps)?.querySelector(Is))==null||e.scrollIntoView({block:`nearest`})),t.scrollIntoView({block:`nearest`}))}function k(){return x.current?.querySelector(`${Ls}[aria-selected="true"]`)}function A(){return Array.from(x.current?.querySelectorAll(Rs)||[])}function ne(e){let t=A()[e];t&&C.setState(`value`,t.getAttribute(Bs))}function re(e){var t;let n=k(),r=A(),i=r.findIndex(e=>e===n),a=r[i+e];(t=s.current)!=null&&t.loop&&(a=i+e<0?r[r.length-1]:i+e===r.length?r[0]:r[i+e]),a&&C.setState(`value`,a.getAttribute(Bs))}function ie(e){let t=k()?.closest(Ps),n;for(;t&&!n;)t=e>0?rc(t,Ps):ic(t,Ps),n=t?.querySelector(Rs);n?C.setState(`value`,n.getAttribute(Bs)):re(e)}let j=()=>ne(A().length-1),ae=e=>{e.preventDefault(),e.metaKey?j():e.altKey?ie(1):re(1)},oe=e=>{e.preventDefault(),e.metaKey?ne(0):e.altKey?ie(-1):re(-1)};return O.createElement(Zi.div,{ref:t,tabIndex:-1,..._,"cmdk-root":``,onKeyDown:e=>{var t;(t=_.onKeyDown)==null||t.call(_,e);let n=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||n))switch(e.key){case`n`:case`j`:g&&e.ctrlKey&&ae(e);break;case`ArrowDown`:ae(e);break;case`p`:case`k`:g&&e.ctrlKey&&oe(e);break;case`ArrowUp`:oe(e);break;case`Home`:e.preventDefault(),ne(0);break;case`End`:e.preventDefault(),j();break;case`Enter`:{e.preventDefault();let t=k();if(t){let e=new Event(zs);t.dispatchEvent(e)}}}}},O.createElement(`label`,{"cmdk-label":``,htmlFor:w.inputId,id:w.labelId,style:pc},c),fc(e,e=>O.createElement(Ws.Provider,{value:C},O.createElement(Hs.Provider,{value:w},e))))}),Js=O.forwardRef((e,t)=>{let n=yi(),r=O.useRef(null),i=O.useContext(Ks),a=Us(),o=ac(e),s=o.current?.forceMount??i?.forceMount;oc(()=>{if(!s)return a.item(n,i?.id)},[s]);let c=lc(n,r,[e.value,e.children,r],e.keywords),l=Gs(),u=cc(e=>e.value&&e.value===c.current),d=cc(e=>s||a.filter()===!1?!0:!e.search||e.filtered.items.get(n)>0);O.useEffect(()=>{let t=r.current;if(t&&!e.disabled)return t.addEventListener(zs,f),()=>t.removeEventListener(zs,f)},[d,e.onSelect,e.disabled]);function f(){var e,t;p(),(t=(e=o.current).onSelect)==null||t.call(e,c.current)}function p(){l.setState(`value`,c.current,!0)}if(!d)return null;let{disabled:m,value:h,onSelect:g,forceMount:_,keywords:v,...y}=e;return O.createElement(Zi.div,{ref:si(r,t),...y,id:n,"cmdk-item":``,role:`option`,"aria-disabled":!!m,"aria-selected":!!u,"data-disabled":!!m,"data-selected":!!u,onPointerMove:m||a.getDisablePointerSelection()?void 0:p,onClick:m?void 0:f},e.children)}),Ys=O.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...a}=e,o=yi(),s=O.useRef(null),c=O.useRef(null),l=yi(),u=Us(),d=cc(e=>i||u.filter()===!1?!0:!e.search||e.filtered.groups.has(o));oc(()=>u.group(o),[]),lc(o,s,[e.value,e.heading,c]);let f=O.useMemo(()=>({id:o,forceMount:i}),[i]);return O.createElement(Zi.div,{ref:si(s,t),...a,"cmdk-group":``,role:`presentation`,hidden:!d||void 0},n&&O.createElement(`div`,{ref:c,"cmdk-group-heading":``,"aria-hidden":!0,id:l},n),fc(e,e=>O.createElement(`div`,{"cmdk-group-items":``,role:`group`,"aria-labelledby":n?l:void 0},O.createElement(Ks.Provider,{value:f},e))))}),Xs=O.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=O.useRef(null),a=cc(e=>!e.search);return!n&&!a?null:O.createElement(Zi.div,{ref:si(i,t),...r,"cmdk-separator":``,role:`separator`})}),Zs=O.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=Gs(),o=cc(e=>e.search),s=cc(e=>e.selectedItemId),c=Us();return O.useEffect(()=>{e.value!=null&&a.setState(`search`,e.value)},[e.value]),O.createElement(Zi.input,{ref:t,...r,"cmdk-input":``,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,"aria-autocomplete":`list`,role:`combobox`,"aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":s,id:c.inputId,type:`text`,value:i?e.value:o,onChange:e=>{i||a.setState(`search`,e.target.value),n?.(e.target.value)}})}),Qs=O.forwardRef((e,t)=>{let{children:n,label:r=`Suggestions`,...i}=e,a=O.useRef(null),o=O.useRef(null),s=cc(e=>e.selectedItemId),c=Us();return O.useEffect(()=>{if(o.current&&a.current){let e=o.current,t=a.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty(`--cmdk-list-height`,n.toFixed(1)+`px`)})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),O.createElement(Zi.div,{ref:si(a,t),...i,"cmdk-list":``,role:`listbox`,tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:c.listId},fc(e,e=>O.createElement(`div`,{ref:si(o,c.listInnerRef),"cmdk-list-sizer":``},e)))}),$s=O.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:o,...s}=e;return O.createElement(ys,{open:n,onOpenChange:r},O.createElement(Cs,{container:o},O.createElement(Ts,{"cmdk-overlay":``,className:i}),O.createElement(ks,{"aria-label":e.label,"cmdk-dialog":``,className:a},O.createElement(qs,{ref:t,...s}))))}),ec=O.forwardRef((e,t)=>cc(e=>e.filtered.count===0)?O.createElement(Zi.div,{ref:t,...e,"cmdk-empty":``,role:`presentation`}):null),tc=O.forwardRef((e,t)=>{let{progress:n,children:r,label:i=`Loading...`,...a}=e;return O.createElement(Zi.div,{ref:t,...a,"cmdk-loading":``,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},fc(e,e=>O.createElement(`div`,{"aria-hidden":!0},e)))}),nc=Object.assign(qs,{List:Qs,Item:Js,Input:Zs,Group:Ys,Separator:Xs,Dialog:$s,Empty:ec,Loading:tc});function rc(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function ic(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function ac(e){let t=O.useRef(e);return oc(()=>{t.current=e}),t}var oc=typeof window>`u`?O.useEffect:O.useLayoutEffect;function sc(e){let t=O.useRef();return t.current===void 0&&(t.current=e()),t}function cc(e){let t=Gs(),n=()=>e(t.snapshot());return O.useSyncExternalStore(t.subscribe,n,n)}function lc(e,t,n,r=[]){let i=O.useRef(),a=Us();return oc(()=>{var o;let s=(()=>{for(let e of n){if(typeof e==`string`)return e.trim();if(typeof e==`object`&&`current`in e)return e.current?e.current.textContent?.trim():i.current}})(),c=r.map(e=>e.trim());a.value(e,s,c),(o=t.current)==null||o.setAttribute(Bs,s),i.current=s}),i}var uc=()=>{let[e,t]=O.useState(),n=sc(()=>new Map);return oc(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function dc(e){let t=e.type;return typeof t==`function`?t(e.props):`render`in t?t.render(e.props):e}function fc({asChild:e,children:t},n){return e&&O.isValidElement(t)?O.cloneElement(dc(t),{ref:t.ref},n(t.props.children)):n(t)}var pc={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`};function mc(e,t){let n=t.trim().toLowerCase();if(!n)return 1;let r=e.toLowerCase();if(!r)return 0;if(r===n)return 1;if(r.startsWith(n))return .95;if(r.startsWith(`/`)&&!n.startsWith(`/`)&&r.slice(1).startsWith(n))return r.slice(1)===n?.99:.95;let i=r.indexOf(n);if(i>0)return hc(r,i)?.9:.8;let a=0,o=0,s=0,c=0;for(let e of n){if(e===` `)continue;let t=-1;for(;a<r.length;){if(r[a]===e){t=a;break}a++}if(t<0)return 0;o++,s=t>0&&r[t-1]===n[o-2]?s+1:0,c+=(hc(r,t)?2:0)+s,a=t+1}let l=o/Math.max(r.length,1);return Math.min(.7,.2+.3*l+.02*c)}function hc(e,t){return t===0||/[\s\-_/.:]/.test(e[t-1]??``)}function gc(e,t,n){if(!n||n.length===0)return 0;let r=0;return n.forEach((e,n)=>{let i=mc(e,t);r=Math.max(r,n===0?i:Math.min(i,.93))}),r}function _c(e){return e.startsWith(`/`)?e.slice(1):e}function vc(e){return`/${_c(e)}`}function yc(e,t){return _c(e).startsWith(_c(t))}var bc=`afk_web_token`,xc=`__AFK_WEB_TOKEN__`,Sc=null;function Cc(){Sc=null;try{sessionStorage.removeItem(bc)}catch{}}function wc(){if(Sc)return Sc;let e=document.querySelector(`meta[name="afk-token"]`)?.content;if(e&&e!==xc){Sc=e;try{sessionStorage.setItem(bc,e)}catch{}return Tc(),e}try{let e=sessionStorage.getItem(bc);if(e)return Sc=e,e}catch{}return``}function Tc(){let e=new URL(window.location.href);(e.searchParams.has(`token`)||e.searchParams.has(`k`))&&(e.searchParams.delete(`token`),e.searchParams.delete(`k`),window.history.replaceState({},``,e.toString()))}async function U(e,t={}){let n=wc(),r=new Headers(t.headers);n&&r.set(`Authorization`,`Bearer ${n}`),t.body&&!r.has(`Content-Type`)&&r.set(`Content-Type`,`application/json`);let i=await fetch(e,{...t,headers:r});if(!i.ok){i.status===401&&Cc();let e=await i.text().catch(()=>i.statusText),t;try{t=JSON.parse(e)}catch{}throw new Ec(i.status,e,t)}return i.json()}var Ec=class extends Error{status;body;constructor(e,t,n){super(`API ${e}: ${t}`),this.status=e,this.name=`ApiError`,this.body=n}},Dc=`afk_slash_recent`,Oc=5;function kc(e){try{let t=[e,...JSON.parse(localStorage.getItem(Dc)??`[]`).filter(t=>t!==e)].slice(0,Oc);localStorage.setItem(Dc,JSON.stringify(t))}catch{}}function Ac(){try{return JSON.parse(localStorage.getItem(Dc)??`[]`)}catch{return[]}}var jc=new Set([`/model`,`/clear`,`/compact`,`/cost`,`/rewind`,`/fork`,`/resume`,`/help`,`/exit`]);function Mc(e,t,n,r=12){if(t.trim().toLowerCase().length>0){let n=e.filter(e=>yc(e.name,t)).slice(0,r);return n.length>0?[{label:``,commands:n}]:[]}let i=[],a=[],o=[],s=new Set;for(let t of jc){if(i.length>=7)break;let n=e.find(e=>e.name===t);n&&(i.push(n),s.add(n.name))}for(let t of n){if(s.has(t))continue;let n=e.find(e=>e.name===t);n&&(a.push(n),s.add(n.name))}let c=e.filter(e=>!s.has(e.name));o.push(...c);let l=[];i.length>0&&l.push({label:`Chat`,commands:i}),a.length>0&&l.push({label:`Recent`,commands:a}),o.length>0&&l.push({label:`Skills`,commands:o});let u=r;return l.map(e=>{let t=e.commands.slice(0,u);return u=Math.max(0,u-t.length),{...e,commands:t}}).filter(e=>e.commands.length>0)}function Nc({query:e,commands:t,onSelect:n,visible:r}){let[i,a]=(0,O.useState)(0),[o,s]=(0,O.useState)([]),c=(0,O.useRef)(null);(0,O.useEffect)(()=>{r&&s(Ac())},[r]);let l=Mc(t,e,o),u=l.flatMap(e=>e.commands);return(0,O.useEffect)(()=>{a(0)},[e]),(0,O.useEffect)(()=>{(c.current?.querySelector(`[data-idx="${i}"]`))?.scrollIntoView({block:`nearest`})},[i]),!r||u.length===0?null:(0,z.jsx)(`ul`,{ref:c,role:`listbox`,"aria-label":`Slash commands`,className:R(`absolute bottom-full left-0 mb-1 w-full max-h-72 overflow-y-auto`,`rounded-lg border border-border bg-popover shadow-lg z-50`,`text-sm`),children:l.map(e=>(0,z.jsxs)(`li`,{role:`presentation`,children:[e.label&&(0,z.jsx)(`div`,{className:`px-3 pt-2 pb-0.5 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground select-none`,children:e.label}),(0,z.jsx)(`ul`,{role:`presentation`,children:e.commands.map(e=>{let t=u.indexOf(e),r=t===i;return(0,z.jsxs)(`li`,{role:`option`,"aria-selected":r,"data-idx":t,className:R(`flex items-baseline gap-2 px-3 py-2 cursor-pointer select-none`,r?`bg-accent text-accent-foreground`:`hover:bg-accent/50`),onMouseEnter:()=>a(t),onMouseDown:t=>{t.preventDefault(),n(e.name)},children:[(0,z.jsx)(`span`,{className:`font-mono font-semibold shrink-0`,children:vc(e.name)}),(0,z.jsx)(`span`,{className:`text-muted-foreground truncate`,children:e.summary})]},e.name)})})]},e.label||`filtered`))})}function Pc(e,t,n,r,i,a,o,s=!1){return!t||n===0?!1:e.key===`Tab`?(a(r),!0):e.key===`Enter`&&s?!1:e.key===`ArrowDown`?(i((r+1)%n),!0):e.key===`ArrowUp`?(i((r-1+n)%n),!0):e.key===`Enter`?(a(r),!0):e.key===`Escape`&&(o(),!0)}function Fc(e){let t=e.trim();return t?t.startsWith(`/`)||t.startsWith(`./`)||t.startsWith(`~/`)||/^[\w.]/.test(t):!1}function Ic({onInsert:e}){let[t,n]=(0,O.useState)(!1),[r,i]=(0,O.useState)(``),[a,o]=(0,O.useState)(!1),s=(0,O.useRef)(null),c=(0,O.useRef)(null),l=(0,O.useRef)(null),u=(0,O.useCallback)(()=>{n(!1),o(!1),i(``)},[]),d=(0,O.useCallback)(()=>{let t=r.trim();Fc(t)?(e(`@${t}`),u()):(o(!0),s.current?.focus())},[r,e,u]);return(0,O.useEffect)(()=>{t&&requestAnimationFrame(()=>s.current?.focus())},[t]),(0,O.useEffect)(()=>{if(!t)return;function e(e){let t=e.target;c.current&&!c.current.contains(t)&&l.current&&!l.current.contains(t)&&u()}return document.addEventListener(`click`,e,{capture:!0}),()=>document.removeEventListener(`click`,e,{capture:!0})},[t,u]),(0,z.jsxs)(`div`,{className:`relative`,children:[(0,z.jsx)(`button`,{ref:l,type:`button`,onClick:()=>t?u():n(!0),"aria-label":`Insert file reference`,"aria-expanded":t,className:R(`flex h-8 w-8 items-center justify-center rounded-md text-sm`,`transition-colors hover:bg-accent hover:text-accent-foreground`,t&&`bg-accent text-accent-foreground`),title:`Insert @file reference`,children:(0,z.jsx)(He,{className:`h-4 w-4`})}),t&&(0,z.jsxs)(`div`,{ref:c,role:`dialog`,"aria-label":`Insert file path`,className:R(`absolute bottom-full left-0 mb-2 w-72 rounded-lg border`,`bg-popover p-3 shadow-lg animate-fade-in`),children:[(0,z.jsxs)(`p`,{className:`mb-2 text-xs text-muted-foreground`,children:[`Type a file path. `,(0,z.jsx)(`code`,{className:`text-[10px]`,children:`@~/file.ts`}),` or`,` `,(0,z.jsx)(`code`,{className:`text-[10px]`,children:`@src/file.ts`})]}),(0,z.jsxs)(`div`,{className:`flex gap-2`,children:[(0,z.jsx)(`input`,{ref:s,type:`text`,value:r,onChange:e=>{i(e.target.value),o(!1)},onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),d()),e.key===`Escape`&&u()},placeholder:`src/foo.ts or ~/file.ts`,autoComplete:`off`,spellCheck:!1,className:R(`flex-1 rounded-md border bg-secondary px-2 py-1 text-sm`,`placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring`,a&&`border-destructive`)}),(0,z.jsx)(`button`,{type:`button`,onClick:d,className:R(`rounded-md bg-primary px-3 py-1 text-sm font-medium`,`text-primary-foreground hover:bg-primary/90`),children:`Add`})]}),a&&(0,z.jsx)(`p`,{className:`mt-1 text-xs text-destructive`,children:`Enter a valid file path.`})]})]})}var Lc=[{id:`sonnet`,label:`Sonnet`},{id:`haiku`,label:`Haiku`},{id:`opus`,label:`Opus`}];function Rc({onSelect:e,current:t,className:n,disabled:r}){let[i,a]=(0,O.useState)(Lc),[o,s]=(0,O.useState)();(0,O.useEffect)(()=>{let e=!1;return U(`/api/models`).then(t=>{e||(t.models?.length>0&&a(t.models),t.default&&s(t.default))}).catch(()=>{}),()=>{e=!0}},[]);let c=t??o??``,l=(0,O.useCallback)(t=>{t.target.value&&e(t.target.value)},[e]);return(0,z.jsxs)(`div`,{className:R(`relative inline-flex items-center`,n),children:[(0,z.jsxs)(`select`,{value:c,disabled:r,onChange:l,"aria-label":`Model`,className:R(`max-w-44 appearance-none rounded-md border bg-secondary pl-2 pr-7 py-1`,`text-xs font-medium text-secondary-foreground`,`cursor-pointer focus:outline-none focus:ring-1 focus:ring-ring`),children:[!i.some(e=>e.id===c)&&(0,z.jsx)(`option`,{value:c,disabled:!c,children:c||`Server default`}),i.map(e=>(0,z.jsx)(`option`,{value:e.id,children:e.label},e.id))]}),(0,z.jsx)(ge,{className:`pointer-events-none absolute right-1.5 h-3 w-3 text-muted-foreground`})]})}function zc({queue:e}){let{entries:t,moveItemUp:n,moveItemDown:r,removeItem:i,editItem:a}=e;return t.length===0?null:(0,z.jsxs)(`div`,{className:`flex flex-col gap-1 border-b border-border/50 px-3 py-2`,children:[(0,z.jsxs)(`p`,{className:`text-[10px] font-medium uppercase tracking-wider text-muted-foreground`,children:[`Queued (`,t.length,`)`]}),t.map((e,o)=>(0,z.jsx)(Bc,{text:e.text,isFirst:o===0,isLast:o===t.length-1,onMoveUp:()=>n(o),onMoveDown:()=>r(o),onRemove:()=>i(o),onEdit:e=>a(o,e)},e.id))]})}function Bc({text:e,isFirst:t,isLast:n,onMoveUp:r,onMoveDown:i,onRemove:a,onEdit:o}){let[s,c]=(0,O.useState)(!1),[l,u]=(0,O.useState)(e),d=(0,O.useRef)(null);(0,O.useEffect)(()=>{s&&d.current?.focus()},[s]);let f=(0,O.useCallback)(()=>{u(e),c(!0)},[e]),p=(0,O.useCallback)(()=>{let t=l.trim();t&&t!==e&&o(t),c(!1)},[l,e,o]),m=(0,O.useCallback)(()=>{c(!1),u(e)},[e]);return(0,z.jsxs)(`div`,{className:R(`group flex items-center gap-1.5 rounded-md border border-border/50`,`bg-secondary/50 px-2 py-1 text-sm animate-fade-in`),children:[s?(0,z.jsx)(`input`,{ref:d,type:`text`,value:l,onChange:e=>u(e.target.value),onKeyDown:e=>{e.key===`Enter`&&p(),e.key===`Escape`&&m()},onBlur:p,className:R(`min-w-0 flex-1 bg-transparent text-sm`,`focus:outline-none`)}):(0,z.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-foreground/80`,children:e}),(0,z.jsxs)(`div`,{className:`flex shrink-0 items-center gap-0.5 opacity-60 group-hover:opacity-100`,children:[s?(0,z.jsx)(Vc,{label:`Confirm edit`,onClick:p,children:(0,z.jsx)(me,{className:`h-3 w-3`})}):(0,z.jsx)(Vc,{label:`Edit`,onClick:f,children:(0,z.jsx)(mt,{className:`h-3 w-3`})}),(0,z.jsx)(Vc,{label:`Move up`,onClick:r,disabled:t,children:(0,z.jsx)(j,{className:`h-3 w-3`})}),(0,z.jsx)(Vc,{label:`Move down`,onClick:i,disabled:n,children:(0,z.jsx)(re,{className:`h-3 w-3`})}),(0,z.jsx)(Vc,{label:`Remove`,onClick:a,destructive:!0,children:(0,z.jsx)(Kt,{className:`h-3 w-3`})})]})]})}function Vc({label:e,onClick:t,disabled:n,destructive:r,children:i}){return(0,z.jsx)(`button`,{type:`button`,onClick:t,disabled:n,"aria-label":e,title:e,className:R(`flex h-5 w-5 items-center justify-center rounded`,`transition-colors`,n?`cursor-not-allowed opacity-30`:r?`hover:bg-destructive/20 hover:text-destructive`:`hover:bg-accent hover:text-accent-foreground`),children:i})}function Hc({sessionId:e,setText:t,onNavigate:n,onSessionEnded:r,onToast:i}){return{handleControl:(0,O.useCallback)(async(a,o,s=0)=>{switch(a.kind){case`continue`:return!0;case`clear`:return!0;case`exit`:return r?.(),i?.(`Session ended. Select or create a session from the sidebar.`),!0;case`navigate`:return n?.(a.sessionId),!0;case`prefill`:return t(a.message),!1;case`submit`:return await U(`/api/sessions/${e}/prompt`,{method:`POST`,body:JSON.stringify({text:a.message})}),!0;case`rerun`:return s>=3?(i?.(`Command rerun limit reached`),!0):(await U(`/api/sessions/${e}/commands`,{method:`POST`,body:JSON.stringify({input:a.input})}),!0);case`forward`:return await U(`/api/sessions/${e}/prompt`,{method:`POST`,body:JSON.stringify({text:o})}),!0;default:return!0}},[e,t,n,r,i])}}var Uc=100,Wc=new Map;function Gc(e){let t=Wc.get(e);return t||(t=[],Wc.set(e,t)),t}function Kc(e){let t=(0,O.useRef)(-1),n=(0,O.useRef)(``),r=(0,O.useRef)(e);return r.current!==e&&(r.current=e,t.current=-1,n.current=``),{push:(0,O.useCallback)(n=>{let r=n.trim();if(!r)return;let i=Gc(e);i.length>0&&i[i.length-1]===r||(i.push(r),i.length>Uc&&i.splice(0,i.length-Uc),t.current=-1)},[e]),navigate:(0,O.useCallback)((r,i,a)=>{if(r===`ArrowUp`){let e=i.indexOf(`
50
+ `);if(!(e===-1||a<=e))return null}let o=Gc(e);if(o.length===0)return null;if(r===`ArrowUp`){if(t.current===-1)n.current=i,t.current=o.length-1;else if(t.current>0)--t.current;else return o[0]??null;return o[t.current]??null}return t.current===-1?null:t.current<o.length-1?(t.current+=1,o[t.current]??null):(t.current=-1,n.current)},[e])}}var qc=`afk:draft:`;function Jc(e){return`${qc}${e}`}function Yc(e){let t=(0,O.useCallback)(()=>{try{return localStorage.getItem(Jc(e))??``}catch{return``}},[e]),n=(0,O.useCallback)(t=>{try{t?localStorage.setItem(Jc(e),t):localStorage.removeItem(Jc(e))}catch{}},[e]),r=(0,O.useCallback)(()=>{try{localStorage.removeItem(Jc(e))}catch{}},[e]);return(0,O.useEffect)(()=>{try{let t=`${Jc(e)}:ts`,n=localStorage.getItem(t);n?Date.now()-Number(n)>6048e5&&(localStorage.removeItem(Jc(e)),localStorage.removeItem(t)):localStorage.setItem(t,String(Date.now()))}catch{}},[e]),{load:t,save:n,clear:r}}var Xc=new Set;function Zc(){if(Xc.size===0)return!1;for(let e of Xc)e();return!0}function Qc(e,t){let[n,r]=(0,O.useState)(null);(0,O.useEffect)(()=>{let e=()=>r(Date.now());return Xc.add(e),()=>{Xc.delete(e)}},[]),(0,O.useEffect)(()=>{if(n===null)return;if(Date.now()-n>1e4){r(null);return}let i=e.current;t&&i&&!i.disabled&&(i.focus(),r(null))},[n,t,e])}var $c=null;function el(){$c=null}async function tl(){return $c||($c=(await U(`/api/commands`)).commands,$c)}function nl(e,t){return t!==void 0&&rl(e.trimStart().split(/\s+/)[0]??``)===rl(t)}function rl(e){return e.startsWith(`/`)?e:`/${e}`}function il(e,t){let n=rl(t);return e.find(e=>rl(e.name)===n)}function al(e){return e.startsWith(`/`)&&e.indexOf(` `)===-1?e.slice(1):null}function ol(e,t){if(!(e instanceof Ec))return String(e);let n=e.body,r=typeof n?.error==`string`?n.error:``;if(r===`command_gated`)return(typeof n?.reason==`string`?n.reason:``)||(typeof n?.message==`string`?n.message:e.message);if(r===`unknown_command`){let e=typeof n?.suggestion==`string`?n.suggestion:``;return e?`Unknown command ${t}. Did you mean ${e}?`:`Unknown command ${t}.`}return r===`session_busy`?`Session is busy — try again when the turn finishes.`:typeof n?.message==`string`?n.message:e.message}function sl({sessionId:e,sessionMode:t,isBusy:n,queue:r,onModelSelect:i,currentModel:a,onCommandOutput:o,onCommandStart:s,onPromptSent:c,onToast:l,onNavigate:u,onSessionEnded:d,suggestions:f,prefill:p}){let m=Yc(e),[h,g]=(0,O.useState)(()=>m.load()),[_,v]=(0,O.useState)(!1),[y,b]=(0,O.useState)([]),[x,S]=(0,O.useState)(0),C=(0,O.useRef)(null),w=(0,O.useRef)({active:!0}),T=Kc(e);(0,O.useEffect)(()=>{let e={active:!0};return w.current=e,g(m.load()),()=>{e.active=!1}},[e]),(0,O.useEffect)(()=>{p&&(g(p.text),C.current?.focus())},[p]),(0,O.useEffect)(()=>{m.save(h)},[h,m]);let E=t===`readonly`;Qc(C,!E&&!_);let D=al(h),ee=D!==null&&(y?.length??0)>0,te=ee?y.filter(e=>yc(e.name,D)).slice(0,8):[];(0,O.useEffect)(()=>{let e=()=>{document.visibilityState===`visible`&&el()};return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[]),(0,O.useEffect)(()=>{let e=C.current;if(!e)return;e.style.height=`auto`;let t=(parseInt(getComputedStyle(e).lineHeight)||20)*5;e.style.height=`${Math.min(e.scrollHeight,t)}px`},[h]),(0,O.useEffect)(()=>{if(D!==null){let e=!1;return tl().then(t=>{e||b(t??[])}).catch(()=>void 0),()=>{e=!0}}},[D]);let k=(0,O.useCallback)(async t=>{c?.(),await U(`/api/sessions/${e}/prompt`,{method:`POST`,body:JSON.stringify({text:t})})},[e,c]),{handleControl:A}=Hc({sessionId:e,setText:g,onNavigate:u,onSessionEnded:d,onToast:l}),ne=(0,O.useCallback)(async(t,n=0)=>{let r=w.current;s?.(t);let a=await U(`/api/sessions/${e}/commands`,{method:`POST`,body:JSON.stringify({input:t})});return r.active?(o?.(t,a),a.session?.model&&i?.(a.session.model),A(a.control,t,n)):!1},[e,s,o,i,A]),re=(0,O.useCallback)(async e=>{if(!(E||_||n||e===a)){v(!0);try{await ne(`/model ${e}`)}catch(e){l?.(ol(e,`/model`))}finally{v(!1)}}},[E,_,n,a,ne,l]),ie=(0,O.useCallback)(async e=>{let t=(e??h).trim();if(!(!t||_||E)){v(!0);try{if(t.startsWith(`/`)){let e=await tl(),i=t.split(/\s+/)[0];kc(i);let a=il(e,i);if(a?.kind===`skill`){n&&r?r.enqueue(t):await k(t),T.push(t),g(``),m.clear();return}if(a?.kind===`native`&&a.web===`gated`){let e=a.gateReason??`${rl(a.name)} is not available on the web surface`;l?l(e):console.warn(`[composer] gated command dismissed:`,e);return}try{await ne(t)&&(T.push(t),g(``),m.clear())}catch(e){l?.(ol(e,i))}return}await k(t),T.push(t),g(``),m.clear()}catch{}finally{v(!1)}}},[h,_,E,k,ne,l,T,m,n,r]),j=(0,O.useCallback)(async()=>{try{await U(`/api/sessions/${e}/interrupt`,{method:`POST`})}catch{}},[e]),ae=(0,O.useCallback)(e=>{kc(e),g(`${vc(e)} `),S(0),C.current?.focus()},[]),oe=(0,O.useCallback)(e=>{if(e.key===`Escape`&&n)e.preventDefault(),j();else if(e.key===`.`&&(e.metaKey||e.ctrlKey)&&n)e.preventDefault(),j();else if(Pc(e,ee,te.length,x,S,e=>{let t=te[e];t&&ae(t.name)},()=>g(e=>e),nl(h,te[x]?.name)))e.preventDefault();else{if(!ee&&(e.key===`ArrowUp`||e.key===`ArrowDown`)){let t=C.current?.selectionStart??0,n=T.navigate(e.key,h,t);if(n!==null){e.preventDefault(),g(n),requestAnimationFrame(()=>{let e=C.current;e&&e.setSelectionRange(e.value.length,e.value.length)});return}}if(e.key===`Enter`&&!e.shiftKey){if(e.preventDefault(),n&&r){let e=h.trim();e&&(r.enqueue(e),g(``),m.clear())}else ie()}}},[ee,te,x,ae,ie,n,h,r,j,T,m]),se=(0,O.useCallback)(e=>{let t=C.current;if(!t){g(t=>t+` `+e+` `);return}let n=t.selectionStart??t.value.length,r=t.selectionEnd??n,i=t.value.slice(0,n),a=t.value.slice(r),o=i.length>0&&!/\s$/.test(i)?` `:``,s=i+o+e+` `+a;g(s),requestAnimationFrame(()=>{let r=n+o.length+e.length+1;t.setSelectionRange(r,r),t.focus()})},[]);return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`div`,{className:`pointer-events-none h-8 bg-gradient-to-t from-background/80 to-transparent`}),(0,z.jsxs)(`div`,{className:R(`relative flex flex-col gap-2`,`border-t border-border/50 px-4 py-3`,`backdrop-blur-xl bg-background/80`,`shadow-[0_-4px_16px_-4px_rgba(0,0,0,0.1)]`,E&&`opacity-50`),children:[r&&(0,z.jsx)(zc,{queue:r}),f&&f.length>0&&!h&&!n&&(0,z.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:f.map(e=>(0,z.jsx)(`button`,{type:`button`,onClick:()=>void ie(e),className:R(`rounded-full border border-border px-2.5 py-0.5 text-xs`,`text-muted-foreground hover:text-foreground hover:bg-secondary`,`transition-colors`),children:e},e))}),(0,z.jsx)(Nc,{query:D??``,commands:y,onSelect:ae,visible:ee}),(0,z.jsxs)(`div`,{className:R(`grid gap-x-2 gap-y-1.5`,`[grid-template-areas:"ta_btn"_"bar_bar"]`,`[grid-template-columns:1fr_auto]`,`sm:[grid-template-areas:"bar_ta_btn"]`,`sm:[grid-template-columns:auto_1fr_auto]`),children:[(0,z.jsx)(`textarea`,{ref:C,rows:1,"data-testid":`composer-textarea`,value:h,disabled:E||_,onChange:e=>g(e.target.value),onKeyDown:oe,placeholder:E?`Read-only session`:n?`Running… (Esc or ⌘. to stop, Enter to queue)`:`Send a message… (/ for commands)`,className:R(`[grid-area:ta] self-end`,`w-full resize-none rounded-xl border border-input bg-background`,`px-3 py-2 text-sm leading-5 shadow-sm`,`placeholder:text-muted-foreground`,`focus:outline-none focus:ring-2 focus:ring-ring`,`disabled:cursor-not-allowed`)}),n?(0,z.jsx)(`button`,{onClick:()=>void j(),title:`Stop (Esc or ⌘.)`,className:`[grid-area:btn] self-end shrink-0 flex items-center justify-center h-9 w-9 rounded-lg bg-destructive text-destructive-foreground hover:bg-destructive/90 transition-colors`,children:(0,z.jsx)(Rt,{className:`h-4 w-4 fill-current`})}):(0,z.jsx)(`button`,{onClick:()=>void ie(),disabled:!h.trim()||_||E,title:`Send`,className:R(`[grid-area:btn] self-end shrink-0 flex items-center justify-center h-9 w-9 rounded-lg`,`bg-primary text-primary-foreground hover:bg-primary/90 transition-colors`,`disabled:opacity-40 disabled:cursor-not-allowed`),children:(0,z.jsx)(Ot,{className:`h-4 w-4`})}),(0,z.jsxs)(`div`,{className:`[grid-area:bar] flex shrink-0 items-center gap-1 self-end`,children:[(0,z.jsx)(Ic,{onInsert:se}),i&&(0,z.jsx)(Rc,{onSelect:e=>void re(e),current:a,disabled:E||_||n})]})]})]})]})}var cl=R(`flex cursor-pointer items-center gap-3 rounded-lg px-3 py-2 text-sm`,`text-popover-foreground transition-colors`,`data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground`),ll=`px-2 [&_[cmdk-group-heading]]:px-3 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-[11px] [&_[cmdk-group-heading]]:font-semibold [&_[cmdk-group-heading]]:uppercase [&_[cmdk-group-heading]]:tracking-wide [&_[cmdk-group-heading]]:text-foreground/70`;function ul({onNavigate:e,sessions:t=[],onSelectSession:n,onInsertCommand:r}){let[i,a]=(0,O.useState)(!1),[o,s]=(0,O.useState)([]),c=(0,O.useRef)(null);(0,O.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`k`&&(e.preventDefault(),a(e=>(e||(c.current=document.activeElement instanceof HTMLElement?document.activeElement:null),!e)))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),(0,O.useEffect)(()=>{if(!i||!r)return;let e=!1;return tl().then(t=>{e||s(t??[])}).catch(()=>void 0),()=>{e=!0}},[i,r]);let l=(0,O.useCallback)(e=>{if(a(!1),!e)return;let t=c.current;setTimeout(()=>{t?.isConnected&&t.focus()},0)},[]);if(!i)return null;let u=o.filter(e=>e.web!==`gated`);return(0,z.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-start justify-center px-3 pt-[15vh]`,onClick:()=>l(!0),"data-testid":`command-palette`,children:[(0,z.jsx)(`div`,{className:`absolute inset-0 bg-black/50 backdrop-blur-sm`,"aria-hidden":!0}),(0,z.jsx)(`div`,{role:`dialog`,"aria-modal":`true`,"aria-label":`Command palette`,className:R(`relative z-10 w-full max-w-lg rounded-xl border border-border`,`bg-popover text-popover-foreground shadow-2xl`,`overflow-hidden`),onClick:e=>e.stopPropagation(),onKeyDown:e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),l(!0))},children:(0,z.jsxs)(nc,{filter:gc,loop:!0,label:`Command palette`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-border px-4 py-3`,children:[(0,z.jsxs)(`svg`,{className:`h-4 w-4 shrink-0 text-muted-foreground`,xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,"aria-hidden":!0,children:[(0,z.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,z.jsx)(`path`,{d:`m21 21-4.35-4.35`})]}),(0,z.jsx)(nc.Input,{autoFocus:!0,placeholder:`Search sessions, commands, views…`,className:R(`flex-1 bg-transparent text-sm outline-none`,`placeholder:text-muted-foreground`)}),(0,z.jsx)(`kbd`,{className:`hidden rounded border border-border px-1.5 py-0.5 text-xs text-muted-foreground sm:inline-block`,children:`ESC`})]}),(0,z.jsxs)(nc.List,{className:`max-h-[min(60vh,24rem)] overflow-y-auto py-2`,children:[(0,z.jsx)(nc.Empty,{className:`py-6 text-center text-sm text-muted-foreground`,children:`No results found.`}),t.length>0&&(0,z.jsx)(nc.Group,{heading:`Sessions`,className:ll,children:t.map(e=>{let t=Er(e,e.mode===`live`?`New session`:`Untitled session`);return(0,z.jsxs)(nc.Item,{value:`session:${e.id}`,keywords:[t,e.model??``],onSelect:()=>{l(!1),n?.(e.id)},className:cl,children:[(0,z.jsx)(it,{className:`h-4 w-4 shrink-0 text-muted-foreground`}),(0,z.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:t}),e.model&&(0,z.jsx)(`span`,{className:`shrink-0 font-mono text-[11px] text-muted-foreground`,children:e.model})]},e.id)})}),r&&u.length>0&&(0,z.jsx)(nc.Group,{heading:`Commands`,className:ll,children:u.map(e=>{let t=vc(e.name);return(0,z.jsxs)(nc.Item,{value:`command:${e.name}`,keywords:[t,e.summary],onSelect:()=>{l(!1),r(`${t} `)},className:cl,children:[(0,z.jsx)(It,{className:`h-4 w-4 shrink-0 text-muted-foreground`}),(0,z.jsx)(`span`,{className:`shrink-0 font-mono text-xs`,children:t}),(0,z.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-xs text-muted-foreground`,children:e.summary})]},e.name)})}),(0,z.jsx)(nc.Group,{heading:`Navigation`,className:ll,children:Nr().map(({id:t,label:n,title:r,icon:i})=>(0,z.jsxs)(nc.Item,{value:`nav:${t}`,keywords:[n,r],onSelect:()=>{l(!1),e(t)},className:cl,children:[(0,z.jsx)(i,{className:`h-4 w-4 text-muted-foreground`}),n]},t))})]})]})})]})}var dl={1:`sessions`,2:`memory`,3:`schedules`,4:`jobs`};function fl({onNavigate:e}){return(0,O.useEffect)(()=>{function t(t){if(!(t.metaKey||t.ctrlKey))return;let n=dl[t.key];n&&(t.preventDefault(),e(n))}return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[e]),null}function pl(){return(0,z.jsx)(`span`,{className:`text-muted-foreground/40`,"aria-hidden":!0,children:`·`})}function ml({label:e,value:t}){return(0,z.jsxs)(`span`,{className:`flex items-baseline gap-1`,children:[(0,z.jsx)(`span`,{className:`text-[10px] text-muted-foreground`,children:e}),(0,z.jsx)(`span`,{className:`font-mono text-xs text-foreground`,children:t})]})}function hl(e){if(e<1e3)return`${e}ms`;let t=e/1e3;return t<60?`${t.toFixed(1)}s`:`${Math.floor(t/60)}m ${Math.round(t%60)}s`}function gl(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function _l({totals:e,className:t}){if(!e||e.costUsd===0&&e.durationMs===0&&e.turns===0)return null;let n=(e.inputTokens??0)+(e.outputTokens??0)+(e.cacheReadTokens??0),r=[];return e.turns>0&&r.push((0,z.jsx)(ml,{label:`turns`,value:String(e.turns)},`turns`)),e.costUsd>0&&(r.length>0&&r.push((0,z.jsx)(pl,{},`sep-cost`)),r.push((0,z.jsx)(ml,{label:`cost`,value:`$${e.costUsd.toFixed(4)}`},`cost`))),n>0&&(r.length>0&&r.push((0,z.jsx)(pl,{},`sep-tok`)),r.push((0,z.jsx)(ml,{label:`tokens`,value:gl(n)},`tokens`))),e.durationMs>0&&(r.length>0&&r.push((0,z.jsx)(pl,{},`sep-dur`)),r.push((0,z.jsx)(ml,{label:`duration`,value:hl(e.durationMs)},`duration`))),r.length===0?null:(0,z.jsx)(`div`,{className:R(`flex flex-nowrap items-center gap-2 whitespace-nowrap`,t),children:r})}var vl={preference:`Preference`,convention:`Convention`,decision:`Decision`,learning:`Learning`};function yl({type:e}){return(0,z.jsx)(`span`,{className:R(`inline-flex items-center rounded px-1.5 py-0.5 text-xs font-medium`,e===`fact`?`bg-blue-500/15 text-blue-400`:`bg-violet-500/15 text-violet-400`),children:e})}function bl({category:e}){return e?(0,z.jsx)(`span`,{className:`inline-flex items-center rounded px-1.5 py-0.5 text-xs font-medium bg-zinc-700 text-zinc-300`,children:vl[e]??e}):null}function xl({result:e}){let t=e.content.length>200?e.content.slice(0,200)+`…`:e.content,n=e.created_at?new Date(e.created_at).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`}):null;return(0,z.jsxs)(`div`,{className:`rounded-lg border border-zinc-800 bg-zinc-900 p-3 space-y-2`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,z.jsx)(yl,{type:e.type}),(0,z.jsx)(bl,{category:e.category}),n&&(0,z.jsx)(`span`,{className:`text-xs text-zinc-500 ml-auto`,children:n})]}),(0,z.jsx)(`p`,{className:`text-sm text-zinc-300 leading-relaxed whitespace-pre-wrap break-words`,children:t})]})}function Sl({pct:e,truncated:t}){let n=Math.min(e,100);return(0,z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,z.jsx)(`div`,{className:`flex-1 h-2 rounded-full bg-zinc-800 overflow-hidden`,children:(0,z.jsx)(`div`,{className:R(`h-full rounded-full transition-all`,e>=100?`bg-red-500`:e>=80?`bg-amber-400`:`bg-accent`),style:{width:`${n}%`}})}),t&&(0,z.jsx)(`span`,{className:`inline-flex items-center rounded px-1.5 py-0.5 text-xs font-medium bg-amber-400/15 text-amber-400`,children:`Truncated`})]})}function Cl({hot:e}){if(!e)return null;let{content:t,usage:n}=e;return(0,z.jsxs)(`section`,{className:`space-y-2`,children:[(0,z.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,z.jsx)(`h3`,{className:`text-sm font-semibold text-zinc-200`,children:`HOT Memory`}),(0,z.jsxs)(`span`,{className:`text-xs text-zinc-500`,children:[n.tokens.toLocaleString(),` / `,n.maxTokens.toLocaleString(),` tokens`]})]}),(0,z.jsx)(Sl,{pct:n.pct,truncated:n.truncated}),t?(0,z.jsx)(`pre`,{className:`rounded-md border border-zinc-800 bg-zinc-950 p-3 text-xs text-zinc-300 font-mono overflow-x-auto whitespace-pre-wrap max-h-48`,children:t}):(0,z.jsx)(`p`,{className:`text-xs text-zinc-500 italic`,children:`No hot memory loaded.`})]})}var wl=[{value:``,label:`All Categories`},{value:`preference`,label:`Preference`},{value:`convention`,label:`Convention`},{value:`decision`,label:`Decision`},{value:`learning`,label:`Learning`}];function Tl(){let[e,t]=(0,O.useState)(null),[n,r]=(0,O.useState)(``),[i,a]=(0,O.useState)(``),[o,s]=(0,O.useState)(null),[c,l]=(0,O.useState)(!1),[u,d]=(0,O.useState)(null);(0,O.useEffect)(()=>{U(`/api/memory/hot`).then(t).catch(()=>{})},[]);let f=(0,O.useCallback)(async e=>{e.preventDefault(),l(!0),d(null);try{let e=new URLSearchParams({q:n,limit:`20`});i&&e.set(`category`,i);let t=await U(`/api/memory/search?${e.toString()}`);s(t.results)}catch(e){d(e instanceof Error?e.message:`Search failed`)}finally{l(!1)}},[n,i]);return(0,z.jsxs)(`div`,{className:`flex flex-col gap-6 p-4`,children:[(0,z.jsx)(Cl,{hot:e}),(0,z.jsxs)(`section`,{className:`space-y-3`,children:[(0,z.jsx)(`h3`,{className:`text-sm font-semibold text-zinc-200`,children:`Search Memory`}),(0,z.jsxs)(`form`,{onSubmit:f,className:`flex gap-2 flex-wrap`,children:[(0,z.jsx)(`input`,{type:`text`,value:n,onChange:e=>r(e.target.value),placeholder:`FTS5 query…`,className:`flex-1 min-w-0 rounded-md border border-zinc-700 bg-zinc-900 px-3 py-1.5 text-sm text-zinc-100 placeholder-zinc-500 focus:outline-none focus:ring-1 focus:ring-accent`}),(0,z.jsx)(`select`,{value:i,onChange:e=>a(e.target.value),className:`rounded-md border border-zinc-700 bg-zinc-900 px-2 py-1.5 text-sm text-zinc-100 focus:outline-none focus:ring-1 focus:ring-accent`,children:wl.map(e=>(0,z.jsx)(`option`,{value:e.value,children:e.label},e.value))}),(0,z.jsx)(`button`,{type:`submit`,disabled:c,className:`rounded-md bg-accent px-3 py-1.5 text-sm font-medium text-white disabled:opacity-50 hover:opacity-90 transition-opacity`,children:c?`Searching…`:`Search`})]}),u&&(0,z.jsx)(`p`,{className:`text-xs text-red-400`,children:u}),o!==null&&(0,z.jsx)(`div`,{className:`space-y-2`,children:o.length===0?(0,z.jsx)(`p`,{className:`text-sm text-zinc-500 italic text-center py-6`,children:`No results found.`}):o.map(e=>(0,z.jsx)(xl,{result:e},`${e.type}-${e.created_at}-${e.content.slice(0,32)}`))})]})]})}var El={success:{label:`Success`,className:`bg-status-done/20 text-status-done border-status-done/30`},error:{label:`Error`,className:`bg-status-failed/20 text-status-failed border-status-failed/30`},skipped:{label:`Skipped`,className:`bg-muted text-muted-foreground border-border`}};function Dl(e){if(e<1e3)return`${e}ms`;let t=Math.floor(e/1e3);return t<60?`${t}s`:`${Math.floor(t/60)}m ${t%60}s`}function Ol(e){return new Date(e).toLocaleString(`en-US`,{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`})}function kl({schedule:e,onClose:t}){let[n,r]=(0,O.useState)([]),[i,a]=(0,O.useState)(!0),[o,s]=(0,O.useState)(null);return(0,O.useEffect)(()=>{let t=!1;return a(!0),s(null),U(`/api/schedules/${e.id}/history`).then(e=>{t||r(e.history)}).catch(e=>{t||s(e instanceof Error?e.message:`Failed to load history`)}).finally(()=>{t||a(!1)}),()=>{t=!0}},[e.id]),(0,O.useEffect)(()=>{let e=e=>{e.key===`Escape`&&t()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[t]),(0,z.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4`,onClick:e=>{e.target===e.currentTarget&&t()},children:(0,z.jsxs)(`div`,{className:`flex max-h-[80vh] w-full max-w-lg flex-col rounded-xl border border-border bg-card shadow-xl`,children:[(0,z.jsxs)(`div`,{className:`flex items-center justify-between border-b border-border px-5 py-4`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`h2`,{className:`text-sm font-semibold`,children:e.name}),(0,z.jsx)(`p`,{className:`mt-0.5 font-mono text-xs text-muted-foreground`,children:e.cron})]}),(0,z.jsx)(`button`,{onClick:t,className:`flex size-7 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground`,"aria-label":`Close`,children:`✕`})]}),(0,z.jsxs)(`div`,{className:`flex-1 overflow-y-auto px-5 py-3`,children:[i&&(0,z.jsx)(`p`,{className:`py-8 text-center text-sm text-muted-foreground`,children:`Loading history…`}),o&&(0,z.jsx)(`p`,{className:`py-8 text-center text-sm text-status-failed`,children:o}),!i&&!o&&n.length===0&&(0,z.jsx)(`p`,{className:`py-8 text-center text-sm text-muted-foreground`,children:`No runs recorded yet.`}),!i&&!o&&n.length>0&&(0,z.jsx)(`ul`,{className:`space-y-2`,children:n.map((e,t)=>{let n=El[e.status];return(0,z.jsxs)(`li`,{className:`flex items-start gap-3 rounded-lg border border-border bg-background/50 px-4 py-3`,children:[(0,z.jsx)(`span`,{className:R(`mt-0.5 shrink-0 rounded-full border px-2 py-0.5 text-xs font-medium`,n.className),children:n.label}),(0,z.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,z.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,z.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:Ol(e.triggeredAt)}),(0,z.jsx)(`span`,{className:`font-mono text-xs text-muted-foreground`,children:Dl(e.durationMs)})]}),e.errorMessage&&(0,z.jsx)(`p`,{className:`mt-1 truncate font-mono text-xs text-status-failed`,children:e.errorMessage})]})]},`${e.taskId}-${e.triggeredAt}-${t}`)})})]})]})})}function Al({status:e}){return e?(0,z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,z.jsx)(`span`,{className:R(`size-2 rounded-full`,e.running?`animate-pulse bg-status-done`:`bg-status-failed`)}),(0,z.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:e.running?`Running${e.tasks==null?``:` (${e.tasks} task${e.tasks===1?``:`s`})`}`:`Stopped`})]}):null}function jl({checked:e,onChange:t,disabled:n}){return(0,z.jsx)(`button`,{role:`switch`,"aria-checked":e,onClick:e=>{e.stopPropagation(),t()},disabled:n,className:R(`relative inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent`,`transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,`disabled:cursor-not-allowed disabled:opacity-50`,e?`bg-brand`:`bg-muted`),children:(0,z.jsx)(`span`,{className:R(`block size-4 rounded-full bg-white shadow transition-transform`,e?`translate-x-4`:`translate-x-0`)})})}function Ml({schedule:e,onToggle:t,onDelete:n,onShowHistory:r}){let[i,a]=(0,O.useState)(!1),[o,s]=(0,O.useState)(!1),c=async()=>{a(!0),await t(e.id).finally(()=>a(!1))},l=async t=>{t.stopPropagation(),window.confirm(`Delete schedule "${e.name}"? This cannot be undone.`)&&(s(!0),await n(e.id).finally(()=>s(!1)))},u=e.trigger===`both`?`cron + session start`:e.trigger??`cron`;return(0,z.jsxs)(`div`,{className:R(`group flex cursor-pointer flex-col gap-3 rounded-xl border border-border bg-card p-4`,`transition-colors hover:border-brand/40 hover:bg-accent/30`,!e.enabled&&`opacity-60`),onClick:()=>r(e),children:[(0,z.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,z.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,z.jsx)(`p`,{className:`truncate text-sm font-semibold`,children:e.name}),(0,z.jsx)(`p`,{className:`mt-0.5 font-mono text-xs text-muted-foreground`,children:e.cron})]}),(0,z.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[(0,z.jsx)(jl,{checked:e.enabled,onChange:()=>{c()},disabled:i}),(0,z.jsx)(`button`,{onClick:l,disabled:o,"aria-label":`Delete schedule ${e.name}`,className:R(`flex size-7 items-center justify-center rounded-md text-muted-foreground`,`opacity-0 transition-opacity group-hover:opacity-100`,`hover:bg-destructive/20 hover:text-status-failed`,`disabled:cursor-not-allowed disabled:opacity-40`),children:`🗑`})]})]}),(0,z.jsx)(`code`,{className:`block truncate rounded-md bg-secondary px-3 py-2 font-mono text-xs text-secondary-foreground`,children:e.command}),(0,z.jsxs)(`div`,{className:`flex items-center gap-3 text-xs text-muted-foreground`,children:[(0,z.jsx)(`span`,{className:`rounded bg-muted px-1.5 py-0.5 capitalize`,children:u}),e.notifyOn&&e.notifyOn!==`never`&&(0,z.jsxs)(`span`,{className:`rounded bg-muted px-1.5 py-0.5`,children:[`notify: `,e.notifyOn]}),(0,z.jsx)(`span`,{className:`ml-auto`,children:`Click for history`})]})]})}var Nl={name:``,command:``,cron:``,trigger:`cron`,notifyOn:`failure`,enabled:!0};function Pl({onCreated:e,onCancel:t}){let[n,r]=(0,O.useState)(Nl),[i,a]=(0,O.useState)(!1),[o,s]=(0,O.useState)(null),c=async t=>{if(t.preventDefault(),s(null),!n.name.trim())s(`Name is required.`);else if(!n.command.trim())s(`Command is required.`);else if(!n.cron.trim())s(`Cron expression is required.`);else{a(!0);try{let t=await U(`/api/schedules`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(n)});e(t.schedule,t.syncNote)}catch(e){s(e instanceof Error?e.message:`Failed to create schedule.`)}finally{a(!1)}}},l=(e,t)=>(0,z.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,z.jsx)(`label`,{className:`text-xs font-medium text-muted-foreground`,children:e}),t]}),u=R(`h-8 rounded-md border border-border bg-card px-3 text-sm`,`placeholder:text-muted-foreground/50`,`focus:outline-none focus:ring-2 focus:ring-ring`,`disabled:cursor-not-allowed disabled:opacity-50`);return(0,z.jsxs)(`form`,{onSubmit:e=>{c(e)},className:`flex flex-col gap-4 rounded-xl border border-brand/40 bg-card p-4`,children:[(0,z.jsx)(`p`,{className:`text-sm font-semibold`,children:`New Schedule`}),(0,z.jsxs)(`div`,{className:`grid grid-cols-1 gap-3 sm:grid-cols-2`,children:[l(`Name *`,(0,z.jsx)(`input`,{type:`text`,className:u,placeholder:`e.g. Nightly cleanup`,value:n.name,onChange:e=>r(t=>({...t,name:e.target.value})),required:!0,disabled:i})),l(`Cron expression *`,(0,z.jsx)(`input`,{type:`text`,className:R(u,`font-mono`),placeholder:`0 2 * * *`,value:n.cron,onChange:e=>r(t=>({...t,cron:e.target.value})),required:!0,disabled:i}))]}),l(`Command *`,(0,z.jsx)(`input`,{type:`text`,className:R(u,`font-mono`),placeholder:`/my-skill --auto`,value:n.command,onChange:e=>r(t=>({...t,command:e.target.value})),required:!0,disabled:i})),(0,z.jsxs)(`div`,{className:`grid grid-cols-1 gap-3 sm:grid-cols-3`,children:[l(`Trigger`,(0,z.jsxs)(`select`,{className:u,value:n.trigger,onChange:e=>r(t=>({...t,trigger:e.target.value})),disabled:i,children:[(0,z.jsx)(`option`,{value:`cron`,children:`cron`}),(0,z.jsx)(`option`,{value:`sessionstart`,children:`session start`}),(0,z.jsx)(`option`,{value:`both`,children:`both`})]})),l(`Notify on`,(0,z.jsxs)(`select`,{className:u,value:n.notifyOn,onChange:e=>r(t=>({...t,notifyOn:e.target.value})),disabled:i,children:[(0,z.jsx)(`option`,{value:`failure`,children:`failure`}),(0,z.jsx)(`option`,{value:`always`,children:`always`}),(0,z.jsx)(`option`,{value:`never`,children:`never`})]})),(0,z.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,z.jsx)(`label`,{className:`text-xs font-medium text-muted-foreground`,children:`Enabled`}),(0,z.jsx)(`div`,{className:`flex h-8 items-center`,children:(0,z.jsx)(jl,{checked:n.enabled,onChange:()=>r(e=>({...e,enabled:!e.enabled})),disabled:i})})]})]}),o&&(0,z.jsx)(`p`,{className:`rounded-md border border-status-failed/30 bg-status-failed/10 px-3 py-2 text-xs text-status-failed`,children:o}),(0,z.jsxs)(`div`,{className:`flex items-center justify-end gap-2`,children:[(0,z.jsx)(`button`,{type:`button`,onClick:t,disabled:i,className:R(`h-8 rounded-md px-3 text-sm text-muted-foreground`,`hover:bg-accent hover:text-foreground`,`disabled:cursor-not-allowed disabled:opacity-50`),children:`Cancel`}),(0,z.jsx)(`button`,{type:`submit`,disabled:i,className:R(`h-8 rounded-md bg-brand px-4 text-sm font-medium text-white`,`hover:bg-brand/90`,`disabled:cursor-not-allowed disabled:opacity-50`),children:i?`Creating…`:`Create`})]})]})}function Fl(){let[e,t]=(0,O.useState)([]),[n,r]=(0,O.useState)(null),[i,a]=(0,O.useState)(!0),[o,s]=(0,O.useState)(null),[c,l]=(0,O.useState)(null),[u,d]=(0,O.useState)(!1),[f,p]=(0,O.useState)(null);(0,O.useEffect)(()=>{let e=!1;return a(!0),s(null),Promise.all([U(`/api/schedules`),U(`/api/daemon/status`)]).then(([n,i])=>{e||(t(n.schedules),r(i))}).catch(t=>{e||s(t instanceof Error?t.message:`Failed to load schedules`)}).finally(()=>{e||a(!1)}),()=>{e=!0}},[]);let m=(0,O.useCallback)(async e=>{let n=await U(`/api/schedules/${e}/toggle`,{method:`POST`});t(t=>t.map(t=>t.id===e?{...t,enabled:n.enabled}:t)),n.syncNote&&(p(n.syncNote),setTimeout(()=>p(null),8e3))},[]),h=(0,O.useCallback)(async e=>{await U(`/api/schedules/${e}`,{method:`DELETE`}),t(t=>t.filter(t=>t.id!==e))},[]),g=(0,O.useCallback)((e,n)=>{t(t=>[...t,e]),d(!1),n&&(p(n),setTimeout(()=>p(null),8e3))},[]);return i?(0,z.jsx)(`div`,{className:`flex flex-1 items-center justify-center`,children:(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Loading schedules…`})}):(0,z.jsxs)(`div`,{className:`flex flex-1 flex-col gap-4 overflow-y-auto p-4`,children:[(0,z.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,z.jsx)(`h1`,{className:`text-base font-semibold`,children:`Schedules`}),(0,z.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,z.jsx)(Al,{status:n}),(0,z.jsx)(`button`,{onClick:()=>d(e=>!e),className:R(`h-7 rounded-md px-3 text-xs font-medium`,u?`bg-muted text-muted-foreground hover:bg-muted/80`:`bg-brand text-white hover:bg-brand/90`),children:u?`Cancel`:`+ New Schedule`})]})]}),u&&(0,z.jsx)(Pl,{onCreated:g,onCancel:()=>d(!1)}),f&&(0,z.jsx)(`p`,{className:`rounded-lg border border-yellow-500/30 bg-yellow-500/10 px-4 py-3 text-sm text-yellow-700 dark:text-yellow-400`,children:f}),o&&(0,z.jsx)(`p`,{className:`rounded-lg border border-status-failed/30 bg-status-failed/10 px-4 py-3 text-sm text-status-failed`,children:o}),!o&&e.length===0&&!u&&(0,z.jsx)(`p`,{className:`mt-8 text-center text-sm text-muted-foreground`,children:`No schedules configured.`}),(0,z.jsx)(`div`,{className:`grid gap-3`,children:e.map(e=>(0,z.jsx)(Ml,{schedule:e,onToggle:m,onDelete:h,onShowHistory:l},e.id))}),c&&(0,z.jsx)(kl,{schedule:c,onClose:()=>l(null)})]})}function Il(e,t){let n=(t??Date.now())-e;if(n<1e3)return`${n}ms`;let r=Math.floor(n/1e3);if(r<60)return`${r}s`;let i=Math.floor(r/60);return i<60?`${i}m ${r%60}s`:`${Math.floor(i/60)}h ${i%60}m`}function Ll(e){let t=Math.floor((Date.now()-e)/1e3);if(t<60)return`${t}s ago`;let n=Math.floor(t/60);if(n<60)return`${n}m ago`;let r=Math.floor(n/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}function Rl(e){let t=e.lastIndexOf(`/`);return t===-1?e:e.slice(t+1)}var zl={running:`bg-green-500/20 text-green-400 border border-green-500/30`,completed:`bg-blue-500/20 text-blue-400 border border-blue-500/30`,failed:`bg-red-500/20 text-red-400 border border-red-500/30`,cancelled:`bg-neutral-500/20 text-neutral-400 border border-neutral-500/30`};function Bl(e){return e.status!==`running`}function Vl({status:e}){return(0,z.jsxs)(`span`,{className:R(`inline-flex items-center gap-1.5 rounded px-1.5 py-0.5 text-xs font-medium`,zl[e]),children:[e===`running`&&(0,z.jsx)(`span`,{className:`size-1.5 rounded-full bg-green-400 animate-pulse`}),e]})}function Hl({job:e,now:t}){let[n,r]=(0,O.useState)(!1),i=Il(e.startedAt,e.status===`running`?t:e.endedAt),a=Ll(e.startedAt);return(0,z.jsxs)(`div`,{className:`rounded-lg border border-neutral-800 bg-neutral-900 overflow-hidden`,children:[(0,z.jsxs)(`div`,{role:`button`,tabIndex:0,onClick:()=>r(e=>!e),onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),r(e=>!e))},className:`w-full text-left px-4 py-3 flex flex-col gap-2 hover:bg-neutral-800/50 transition-colors cursor-pointer`,children:[(0,z.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-1.5 min-w-0`,children:[(0,z.jsx)(n?ge:ve,{className:`size-3.5 shrink-0 text-neutral-500`}),(0,z.jsx)(`span`,{className:`text-sm font-medium text-neutral-100 truncate`,children:e.label||e.jobId})]}),(0,z.jsxs)(`div`,{className:`flex items-center gap-2 shrink-0`,children:[(0,z.jsx)(Vl,{status:e.status}),e.status===`running`&&(0,z.jsx)(`button`,{type:`button`,disabled:!0,title:`Cancel from the owning session with /bgsub:cancel ${e.jobId}${e.ownerPid===void 0?``:` (owner PID: ${e.ownerPid})`}`,"aria-label":`Cancel job ${e.jobId} — use /bgsub:cancel from the owning session`,className:R(`flex items-center gap-1 rounded px-1.5 py-0.5 text-xs`,`text-neutral-600 cursor-not-allowed opacity-40`),children:`Cancel`})]})]}),(0,z.jsxs)(`div`,{className:`flex items-center gap-3 text-xs text-neutral-500 pl-5`,children:[(0,z.jsx)(`span`,{className:`font-mono bg-neutral-800 rounded px-1.5 py-0.5 text-neutral-300`,children:Rl(e.model)}),(0,z.jsx)(`span`,{children:i}),(0,z.jsx)(`span`,{children:a})]}),(e.status===`failed`||e.status===`cancelled`)&&e.stopReason&&(0,z.jsxs)(`div`,{className:`pl-5 text-xs text-neutral-500`,children:[(0,z.jsx)(`span`,{className:`text-neutral-600`,children:`reason:`}),` `,(0,z.jsx)(`span`,{className:`font-mono text-neutral-400 line-clamp-2`,title:e.stopReason,children:e.stopReason})]})]}),n&&(0,z.jsxs)(`div`,{className:`border-t border-neutral-800 px-4 py-3 bg-neutral-950 grid grid-cols-[auto_1fr] gap-x-4 gap-y-1.5 text-xs`,children:[(0,z.jsx)(Ul,{label:`Job ID`,value:e.jobId,mono:!0}),(0,z.jsx)(Ul,{label:`Subagent ID`,value:e.subagentId,mono:!0}),(0,z.jsx)(Ul,{label:`Model`,value:e.model,mono:!0}),(0,z.jsx)(Ul,{label:`Status`,value:e.status}),(0,z.jsx)(Ul,{label:`Started`,value:new Date(e.startedAt).toLocaleString()}),e.endedAt!==void 0&&(0,z.jsx)(Ul,{label:`Ended`,value:new Date(e.endedAt).toLocaleString()}),(0,z.jsx)(Ul,{label:`Duration`,value:i}),e.parentSessionId&&(0,z.jsx)(Ul,{label:`Parent session`,value:e.parentSessionId,mono:!0}),e.stopReason&&(0,z.jsx)(Ul,{label:`Stop reason`,value:e.stopReason.length>200?e.stopReason.slice(0,200)+`…`:e.stopReason,mono:!0}),(0,z.jsx)(Ul,{label:`Prompt hash`,value:e.promptHash,mono:!0}),(0,z.jsx)(Ul,{label:`Schema version`,value:String(e.schemaVersion)})]})]})}function Ul({label:e,value:t,mono:n=!1}){return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`span`,{className:`text-neutral-600 whitespace-nowrap`,children:e}),(0,z.jsx)(`span`,{className:R(`text-neutral-300 break-all`,n&&`font-mono`),children:t})]})}function Wl({label:e,count:t}){return(0,z.jsxs)(`div`,{className:`flex items-center gap-2 text-xs font-medium text-neutral-500 uppercase tracking-wider`,children:[(0,z.jsx)(`span`,{children:e}),(0,z.jsx)(`span`,{className:`rounded-full bg-neutral-800 px-1.5 py-0.5 text-neutral-400 normal-case`,children:t})]})}function Gl(){let[e,t]=(0,O.useState)([]),[n,r]=(0,O.useState)(!0),[i,a]=(0,O.useState)(null),[o,s]=(0,O.useState)(()=>Date.now()),c=(0,O.useRef)(null),l=(0,O.useCallback)((e=!1)=>{e||r(!0),a(null),U(`/api/bg-jobs`).then(({jobs:e})=>t([...e].sort((e,t)=>t.startedAt-e.startedAt))).catch(e=>a(e instanceof Error?e.message:String(e))).finally(()=>{e||r(!1)})},[]);(0,O.useEffect)(()=>{l()},[l]),(0,O.useEffect)(()=>{let t=e.some(e=>!Bl(e));return t&&!c.current&&(c.current=setInterval(()=>l(!0),5e3)),!t&&c.current&&(clearInterval(c.current),c.current=null),()=>{c.current&&=(clearInterval(c.current),null)}},[e,l]),(0,O.useEffect)(()=>{if(!e.some(e=>!Bl(e)))return;let t=setInterval(()=>s(Date.now()),1e3);return()=>clearInterval(t)},[e]);let u=e.filter(e=>e.status===`running`),d=e.filter(e=>Bl(e)),f=e.some(e=>!Bl(e));return(0,z.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,z.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2 text-sm font-semibold text-neutral-200`,children:[(0,z.jsx)(ue,{className:`size-4 text-neutral-400`}),`Background Jobs`,f&&(0,z.jsx)(`span`,{className:`text-xs font-normal text-neutral-500`,children:`(auto-refreshing)`})]}),(0,z.jsxs)(`button`,{onClick:()=>l(),disabled:n,className:`flex items-center gap-1.5 rounded px-2 py-1 text-xs text-neutral-400 hover:text-neutral-200 hover:bg-neutral-800 disabled:opacity-50 transition-colors`,children:[(0,z.jsx)(St,{className:R(`size-3`,n&&`animate-spin`)}),`Refresh`]})]}),i&&(0,z.jsx)(`p`,{className:`rounded border border-red-900/40 bg-red-950/30 px-3 py-2 text-xs text-red-400`,children:i}),!n&&e.length===0&&!i&&(0,z.jsx)(`p`,{className:`text-sm text-neutral-500 text-center py-8`,children:`No background jobs`}),u.length>0&&(0,z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,z.jsx)(Wl,{label:`Running`,count:u.length}),u.map(e=>(0,z.jsx)(Hl,{job:e,now:o},e.jobId))]}),d.length>0&&(0,z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,z.jsx)(Wl,{label:`Settled`,count:d.length}),d.map(e=>(0,z.jsx)(Hl,{job:e,now:o},e.jobId))]})]})}var Kl=3e3;async function ql(){return(await U(`/api/handoffs`)).handoffs.filter(e=>e.status===`pending`)}async function Jl(e,t){await U(`/api/handoffs/${encodeURIComponent(e)}/answer`,{method:`POST`,body:JSON.stringify({answer:t})})}function Yl({handoff:e,onAnswered:t}){let{taskId:n,sessionId:r,createdAt:i,question:a}=e,[o,s]=(0,O.useState)(``),[c,l]=(0,O.useState)(!1),[u,d]=(0,O.useState)(null),f=(0,O.useRef)(!1),p=(0,O.useCallback)(async e=>{if(!f.current){f.current=!0,l(!0),d(null);try{await Jl(n,e),s(``),t(n)}catch(e){e instanceof Ec&&e.status===409?d(`This handoff is no longer active (already answered).`):d(`Failed to submit — try again.`)}finally{f.current=!1,l(!1)}}},[n,t]),m=Array.isArray(a.choices)&&a.choices.length>0,h=a.type??`confirm`,g=m,_=!g&&h===`confirm`,v=(()=>{try{let e=Date.now()-new Date(i).getTime(),t=Math.floor(e/1e3);if(t<60)return`${t}s ago`;let n=Math.floor(t/60);return n<60?`${n}m ago`:`${Math.floor(n/60)}h ago`}catch{return``}})();return(0,z.jsxs)(`div`,{className:R(`rounded-xl border-2 border-yellow-500/60 bg-yellow-500/5 p-4`,`flex flex-col gap-3`),children:[(0,z.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,z.jsx)(Ht,{className:`mt-0.5 h-4 w-4 shrink-0 text-yellow-500`}),(0,z.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,z.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Session `,(0,z.jsx)(`span`,{className:`font-mono`,children:r}),v&&(0,z.jsxs)(`span`,{children:[` · `,v]})]}),a.message&&(0,z.jsx)(`p`,{className:`mt-1 text-sm font-medium text-foreground`,children:a.message}),!a.message&&(0,z.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground italic`,children:`(no message)`})]})]}),g&&(0,z.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:(a.choices??[]).map((e,t)=>{let n=String(e);return(0,z.jsx)(`button`,{onClick:()=>{p(e)},disabled:c,className:R(`rounded-md border border-border px-3 py-1 text-xs font-medium`,`transition-colors hover:bg-accent disabled:cursor-not-allowed disabled:opacity-50`),children:n},`${n}-${t}`)})}),_&&(0,z.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,z.jsx)(`button`,{onClick:()=>{p(!1)},disabled:c,className:R(`h-7 rounded-md px-3 text-xs text-muted-foreground`,`hover:bg-accent hover:text-foreground disabled:opacity-50`),children:`No`}),(0,z.jsx)(`button`,{onClick:()=>{p(!0)},disabled:c,className:R(`h-7 rounded-md bg-brand px-3 text-xs font-medium text-white`,`hover:bg-brand/90 disabled:opacity-50`),children:`Yes`})]}),!g&&!_&&(0,z.jsxs)(`div`,{className:`flex gap-2`,children:[(0,z.jsx)(`input`,{type:`text`,value:o,onChange:e=>s(e.target.value),disabled:c,placeholder:`Your answer…`,className:R(`flex-1 rounded-md border border-input bg-background px-3 py-1 text-sm`,`placeholder:text-muted-foreground/50`,`focus:outline-none focus:ring-2 focus:ring-ring`,`disabled:cursor-not-allowed disabled:opacity-50`),onKeyDown:e=>{e.key===`Enter`&&o.trim()&&p(o.trim())}}),(0,z.jsx)(`button`,{onClick:()=>{p(o.trim())},disabled:c||!o.trim(),className:R(`h-8 rounded-md bg-brand px-3 text-xs font-medium text-white`,`hover:bg-brand/90 disabled:opacity-50`),children:`Submit`})]}),u&&(0,z.jsx)(`p`,{className:`rounded-md border border-status-failed/30 bg-status-failed/10 px-3 py-2 text-xs text-status-failed`,children:u}),(0,z.jsx)(`p`,{className:`font-mono text-[10px] text-muted-foreground/60`,children:n})]})}function Xl(){let[e,t]=(0,O.useState)([]),[n,r]=(0,O.useState)(!0),[i,a]=(0,O.useState)(null),[o,s]=(0,O.useState)(new Set),c=(0,O.useRef)(void 0),l=(0,O.useRef)(!1),u=(0,O.useCallback)(async()=>{if(!l.current){l.current=!0;try{let e=await ql();t(e);let n=new Set(e.map(e=>e.taskId));s(e=>{let t=new Set([...e].filter(e=>n.has(e)));return t.size===e.size?e:t}),a(null)}catch(e){a(e instanceof Error?e.message:`Failed to load handoffs.`)}finally{l.current=!1,r(!1)}}},[]);(0,O.useEffect)(()=>{u();function e(){clearInterval(c.current),c.current=setInterval(()=>{u()},Kl)}function t(){clearInterval(c.current)}function n(){document.hidden?t():(u(),e())}return document.hidden||e(),document.addEventListener(`visibilitychange`,n),()=>{t(),document.removeEventListener(`visibilitychange`,n)}},[u]);let d=(0,O.useCallback)(e=>{s(t=>new Set([...t,e]))},[]),f=e.filter(e=>!o.has(e.taskId));return n?(0,z.jsx)(`div`,{className:`flex flex-1 items-center justify-center`,children:(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Loading handoffs…`})}):(0,z.jsxs)(`div`,{className:`flex flex-1 flex-col gap-4 overflow-y-auto p-4`,children:[(0,z.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,z.jsx)(`h1`,{className:`text-base font-semibold`,children:`Pending Handoffs`}),f.length>0&&(0,z.jsxs)(`span`,{className:`rounded-full bg-yellow-500/20 px-2 py-0.5 text-xs font-medium text-yellow-700 dark:text-yellow-400`,children:[f.length,` pending`]})]}),i&&(0,z.jsx)(`p`,{className:`rounded-lg border border-status-failed/30 bg-status-failed/10 px-4 py-3 text-sm text-status-failed`,children:i}),!i&&f.length===0&&(0,z.jsx)(`p`,{className:`mt-8 text-center text-sm text-muted-foreground`,children:`No pending handoffs.`}),(0,z.jsx)(`div`,{className:`flex flex-col gap-3`,children:f.map(e=>(0,z.jsx)(Yl,{handoff:e,onAnswered:d},e.taskId))})]})}function Zl({icon:e,title:t,children:n}){return(0,z.jsxs)(`section`,{className:`space-y-3`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,z.jsx)(e,{className:`size-4 text-muted-foreground`}),(0,z.jsx)(`h2`,{className:`text-sm font-semibold`,children:t})]}),(0,z.jsx)(`div`,{className:`rounded-xl border border-border bg-card`,children:n})]})}function Ql({label:e,value:t,mono:n=!1,last:r=!1}){return(0,z.jsxs)(`div`,{className:R(`flex items-center justify-between gap-4 px-4 py-2.5`,!r&&`border-b border-border`),children:[(0,z.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:e}),(0,z.jsx)(`span`,{className:R(`min-w-0 truncate text-right text-xs`,n?`font-mono text-zinc-300`:`text-zinc-200`),children:t})]})}function $l({model:e,last:t}){return(0,z.jsxs)(`div`,{className:R(`flex items-center justify-between gap-4 px-4 py-2.5`,!t&&`border-b border-border`),children:[(0,z.jsx)(`span`,{className:`text-xs text-zinc-200`,children:e.label}),(0,z.jsx)(`span`,{className:`font-mono text-xs text-muted-foreground`,children:e.id})]})}var eu=[{keys:`⌘K`,description:`Open command palette`},{keys:`⌘1`,description:`Go to Sessions`},{keys:`⌘2`,description:`Go to Memory`},{keys:`⌘3`,description:`Go to Schedules`},{keys:`⌘4`,description:`Go to Background Jobs`}];function tu({keys:e,description:t,last:n}){return(0,z.jsxs)(`div`,{className:R(`flex items-center justify-between gap-4 px-4 py-2.5`,!n&&`border-b border-border`),children:[(0,z.jsx)(`span`,{className:`text-xs text-zinc-200`,children:t}),(0,z.jsx)(`kbd`,{className:`rounded border border-border bg-secondary px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground`,children:e})]})}function nu({status:e}){return e?(0,z.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,z.jsx)(`span`,{className:R(`size-1.5 rounded-full`,e.running?`animate-pulse bg-status-done`:`bg-status-failed`)}),(0,z.jsx)(`span`,{className:R(`text-xs`,e.running?`text-zinc-200`:`text-muted-foreground`),children:e.running?`Running${e.tasks==null?``:` · ${e.tasks} task${e.tasks===1?``:`s`}`}`:`Stopped`})]}):(0,z.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`–`})}function ru(){let[e,t]=(0,O.useState)({config:null,models:null,daemon:null,configError:null,modelsError:null,daemonError:null});(0,O.useEffect)(()=>{let e=!1,n=e=>e instanceof Error?e.message:`Failed to load`;return Promise.all([U(`/api/config`).then(e=>({ok:!0,config:e}),e=>({ok:!1,error:n(e)})),U(`/api/models`).then(e=>({ok:!0,models:e.models}),e=>({ok:!1,error:n(e)})),U(`/api/daemon/status`).then(e=>({ok:!0,daemon:e}),e=>({ok:!1,error:n(e)}))]).then(([n,r,i])=>{e||t({config:n.ok?n.config:null,configError:n.ok?null:n.error,models:r.ok?r.models:null,modelsError:r.ok?null:r.error,daemon:i.ok?i.daemon:null,daemonError:i.ok?null:i.error})}).catch(()=>{}),()=>{e=!0}},[]);let n=e.config,r=(0,z.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Loading…`});return(0,z.jsxs)(`div`,{className:`flex flex-1 flex-col gap-6 overflow-y-auto p-4`,children:[(0,z.jsxs)(Zl,{icon:Xe,title:`About`,children:[(0,z.jsx)(Ql,{label:`AFK version`,value:n?n.version:r,mono:!0}),(0,z.jsx)(Ql,{label:`Node.js`,value:n?n.nodeVersion:r,mono:!0}),(0,z.jsx)(Ql,{label:`App`,value:`AFK Dashboard`,last:!0})]}),(0,z.jsxs)(Zl,{icon:Me,title:`Model`,children:[(0,z.jsx)(Ql,{label:`Default model`,value:n?n.model:r,mono:!0}),e.modelsError?(0,z.jsx)(`div`,{className:`px-4 py-3 text-xs text-status-failed`,children:e.modelsError}):e.models===null?(0,z.jsx)(Ql,{label:`Available tiers`,value:r,last:!0}):e.models.length===0?(0,z.jsx)(Ql,{label:`Available tiers`,value:`None listed`,last:!0}):e.models.map((t,n)=>(0,z.jsx)($l,{model:t,last:n===(e.models?.length??0)-1},t.id))]}),(0,z.jsxs)(Zl,{icon:We,title:`Paths`,children:[(0,z.jsx)(Ql,{label:`AFK home`,value:n?n.afkHome:r,mono:!0}),(0,z.jsx)(Ql,{label:`State dir`,value:n?n.stateDir:r,mono:!0}),(0,z.jsx)(Ql,{label:`Config dir`,value:n?n.configDir:r,mono:!0,last:!0})]}),(0,z.jsxs)(Zl,{icon:Je,title:`Web Server`,children:[(0,z.jsx)(Ql,{label:`Host`,value:n?n.webHost:r,mono:!0}),(0,z.jsx)(Ql,{label:`Port`,value:n?String(n.webPort):r,mono:!0}),(0,z.jsx)(Ql,{label:`Daemon`,value:(0,z.jsx)(nu,{status:e.daemon})}),!e.daemonError&&(0,z.jsx)(Ql,{label:`Tasks scheduled`,value:e.daemon?.tasks==null?`–`:String(e.daemon.tasks),last:!0}),e.daemonError&&(0,z.jsx)(Ql,{label:`Daemon error`,value:e.daemonError,last:!0})]}),(0,z.jsx)(Zl,{icon:Qe,title:`Keyboard Shortcuts`,children:eu.map((e,t)=>(0,z.jsx)(tu,{keys:e.keys,description:e.description,last:t===eu.length-1},e.keys))})]})}async function iu(e){await U(`/api/approve`,{method:`POST`,body:JSON.stringify(e)})}function au({approval:e,onAnswered:t}){let{id:n,request:r}=e,[i,a]=(0,O.useState)(typeof r.questionDefault==`string`?r.questionDefault:``),o=(0,O.useRef)(!1),[s,c]=(0,O.useState)(!1),[l,u]=(0,O.useState)(null),d=async(e,r)=>{if(!o.current){o.current=!0,c(!0),u(null);try{await iu({requestId:n,response:{action:e,content:r}}),t(),document.querySelector(`[data-testid="composer-textarea"]`)?.focus()}catch{u(`Failed to submit — try again`)}finally{o.current=!1,c(!1)}}},f=r.type??`confirm`;return(0,z.jsxs)(`div`,{role:`dialog`,"aria-label":r.title||`Approval required`,"aria-busy":s,tabIndex:0,onKeyDown:e=>{f!==`confirm`||s||e.repeat||e.ctrlKey||e.metaKey||e.altKey||(e.key.toLowerCase()===`y`||e.key.toLowerCase()===`n`)&&(e.preventDefault(),d(e.key.toLowerCase()===`y`?`accept`:`decline`))},className:R(`rounded-lg border-2 border-yellow-500/60 bg-yellow-500/5 p-3 text-sm`,`flex flex-col gap-2 focus-visible:outline-2 focus-visible:outline-ring [&_button:focus-visible]:outline-2 [&_button:focus-visible]:outline-ring`),children:[(0,z.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,z.jsx)(Ht,{className:`h-4 w-4 text-yellow-500 mt-0.5 shrink-0`}),(0,z.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[r.title&&(0,z.jsx)(`p`,{className:`font-semibold text-foreground`,children:r.title}),r.message&&(0,z.jsx)(`p`,{className:`text-muted-foreground`,children:r.message}),r.description&&(0,z.jsx)(`p`,{className:`text-muted-foreground text-xs mt-0.5`,children:r.description})]}),(0,z.jsx)(`button`,{onClick:()=>void d(`decline`),disabled:s,className:`shrink-0 text-muted-foreground hover:text-foreground`,title:`Dismiss`,"aria-label":`Dismiss approval`,children:(0,z.jsx)(Kt,{className:`h-4 w-4`})})]}),f===`number`&&(0,z.jsxs)(`div`,{className:`flex gap-2`,children:[(0,z.jsx)(`input`,{type:`number`,"aria-label":r.title||`Approval response`,value:i,onChange:e=>a(e.target.value),disabled:s,...r.questionMin===void 0?{}:{min:r.questionMin},...r.questionMax===void 0?{}:{max:r.questionMax},className:R(`flex-1 rounded border border-input bg-background px-2 py-1 text-sm`,`focus:outline-none focus:ring-1 focus:ring-ring`)}),(0,z.jsx)(W,{onClick:()=>{let e=Number(i);isNaN(e)||r.questionMin!==void 0&&e<r.questionMin||r.questionMax!==void 0&&e>r.questionMax||d(`accept`,{number:e})},disabled:s||i===``||isNaN(Number(i))||r.questionMin!==void 0&&Number(i)<r.questionMin||r.questionMax!==void 0&&Number(i)>r.questionMax,label:`Submit`,variant:`primary`})]}),f===`text`&&(0,z.jsxs)(`div`,{className:`flex gap-2`,children:[(0,z.jsx)(`input`,{type:`text`,"aria-label":r.title||`Approval response`,value:i,onChange:e=>a(e.target.value),disabled:s,className:R(`flex-1 rounded border border-input bg-background px-2 py-1 text-sm`,`focus:outline-none focus:ring-1 focus:ring-ring`)}),(0,z.jsx)(W,{onClick:()=>void d(`accept`,{text:i}),disabled:s,label:`Submit`,variant:`primary`})]}),f===`confirm`&&(0,z.jsxs)(`div`,{className:`flex gap-2 justify-end`,children:[(0,z.jsx)(W,{onClick:()=>void d(`decline`),disabled:s,label:`No`,variant:`ghost`}),(0,z.jsx)(W,{onClick:()=>void d(`accept`),disabled:s,label:`Yes`,variant:`primary`})]}),(f===`choice`||f===`multi_choice`)&&(0,z.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:(r.choices??[]).map(e=>(0,z.jsx)(W,{onClick:()=>void d(`accept`,{choice:e}),disabled:s,label:e,variant:`outline`},e))}),l&&(0,z.jsx)(`p`,{role:`alert`,className:`text-xs text-foreground`,children:l})]})}function W({onClick:e,disabled:t,label:n,variant:r}){return(0,z.jsx)(`button`,{onClick:e,disabled:t,className:R(`rounded px-3 py-1 text-xs font-medium transition-colors disabled:opacity-50`,r===`primary`&&`bg-primary text-primary-foreground hover:bg-primary/90`,r===`ghost`&&`text-muted-foreground hover:text-foreground hover:bg-accent`,r===`outline`&&`border border-border hover:bg-accent`),children:n})}function ou({approvals:e,onDismiss:t}){let[n,r]=(0,O.useState)(new Set),i=e.filter(e=>!n.has(e.id)),a=e=>{r(t=>new Set([...t,e])),t?.()};return(0,z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,z.jsx)(`p`,{role:`status`,"aria-live":`polite`,"aria-atomic":`true`,className:`sr-only`,children:i.length?`Approval required: ${i.map(e=>e.request.title||e.request.message||`Please respond`).join(`; `)}`:``}),i.map(e=>(0,z.jsx)(au,{approval:e,onAnswered:()=>a(e.id)},e.id))]})}function su({open:e,onClose:t,children:n}){return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`div`,{className:R(`fixed inset-0 z-40 bg-black/50 transition-opacity duration-200 md:hidden`,e?`opacity-100 pointer-events-auto`:`opacity-0 pointer-events-none`),onClick:t,"aria-hidden":`true`}),(0,z.jsx)(`div`,{className:R(`fixed inset-y-0 left-0 z-50 w-max max-w-[85vw] overflow-hidden bg-sidebar transition-transform duration-200 ease-in-out md:hidden`,e?`translate-x-0`:`-translate-x-full`),role:`dialog`,"aria-label":`Sidebar`,"aria-modal":e||void 0,"aria-hidden":!e,inert:!e,children:n})]})}function cu({onClick:e,className:t}){return(0,z.jsx)(`button`,{onClick:e,className:R(`inline-flex items-center justify-center rounded-md p-2 text-muted-foreground hover:bg-muted hover:text-foreground md:hidden`,t),"aria-label":`Open sidebar`,children:(0,z.jsx)(`svg`,{className:`h-5 w-5`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2,children:(0,z.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M4 6h16M4 12h16M4 18h16`})})})}var lu=(0,O.createContext)(null),uu={success:`bg-green-600 text-white`,error:`bg-red-600 text-white`,info:`bg-muted text-muted-foreground border border-border`};function du({children:e}){let[t,n]=(0,O.useState)([]),r=(0,O.useRef)(0),i=(0,O.useCallback)((e,t=`info`)=>{let i=++r.current;n(n=>[...n.slice(-2),{id:i,message:e,type:t}]),setTimeout(()=>{n(e=>e.filter(e=>e.id!==i))},3e3)},[]);return(0,z.jsxs)(lu.Provider,{value:{toast:i},children:[e,(0,z.jsx)(`div`,{className:`fixed bottom-4 right-4 z-50 flex flex-col gap-2 pointer-events-none`,"aria-live":`polite`,role:`region`,"aria-label":`Notifications`,children:t.map(e=>(0,z.jsx)(`div`,{className:R(`pointer-events-auto max-w-sm rounded-lg px-4 py-3 text-sm shadow-lg animate-slide-in-right`,uu[e.type]),children:e.message},e.id))})]})}function fu(){let e=(0,O.useContext)(lu);if(!e)throw Error(`useToast must be used within <ToastProvider>`);return e}var pu=1e4;function mu(){let[e,t]=(0,O.useState)([]),[n,r]=(0,O.useState)(!0),[i,a]=(0,O.useState)(null),o=(0,O.useRef)(void 0),s=(0,O.useCallback)(async()=>{try{let e=await U(`/api/sessions`);t(hu(e.sessions)),a(null)}catch(e){a(e instanceof Error?e.message:`Failed to fetch sessions`)}finally{r(!1)}},[]);return(0,O.useEffect)(()=>(s(),o.current=setInterval(()=>void s(),pu),()=>clearInterval(o.current)),[s]),{sessions:e,loading:n,error:i,refresh:s}}function hu(e){return[...e].sort((e,t)=>{let n=+!!gu(e),r=+!!gu(t);if(n!==r)return r-n;let i=e.updatedAt?new Date(e.updatedAt).getTime():0;return(t.updatedAt?new Date(t.updatedAt).getTime():0)-i})}function gu(e){return e.mode===`live`||e.alive===!0}var _u=1e3;function vu(){let[e,t]=(0,O.useState)([]),n=(0,O.useRef)(void 0),r=(0,O.useCallback)(async()=>{try{let e=await U(`/api/pending`);t(e.pending)}catch{}},[]);return(0,O.useEffect)(()=>(r(),n.current=setInterval(()=>void r(),_u),()=>clearInterval(n.current)),[r]),{approvals:e,pendingSessionIds:new Set(e.map(e=>e.sessionId).filter(e=>!!e))}}function yu(e){return typeof e==`object`&&!!e&&typeof e.type==`string`&&e.type.startsWith(`live_`)}var bu=15e3,xu=500;function Su(e){let t=e.replace(/\r\n/g,`
51
+ `).split(`
52
+
53
+ `),n=t.pop()??``,r=[];for(let e of t){if(e.trim()===``)continue;let t,n;for(let r of e.split(`
54
+ `))r.startsWith(`id: `)?t=r.slice(4):r.startsWith(`id:`)?t=r.slice(3).trimStart():r.startsWith(`data: `)?n=r.slice(6):r.startsWith(`data:`)&&(n=r.slice(5).trimStart());n!==void 0&&r.push({id:t,data:n})}return{events:r,remainder:n}}function Cu(e){return typeof e==`object`&&!!e&&e.end===!0}function wu(e,t=0,n,r){let i=`${e??``}:${t}`,[a,o]=(0,O.useState)({key:i,events:[],generation:0}),s=(0,O.useRef)(n);s.current=n;let c=(0,O.useRef)(r);c.current=r;let[l,u]=(0,O.useState)(`connecting`),[d,f]=(0,O.useState)(null),p=(0,O.useRef)(void 0),m=(0,O.useRef)(void 0),h=(0,O.useRef)(0);return(0,O.useEffect)(()=>{let t=!1,n;if(e===null){o({key:i,events:[],generation:0}),u(`connecting`),f(null);return}let r=e;o({key:i,events:[],generation:0}),f(null),m.current=void 0,h.current=0;async function a(){if(t)return;u(h.current===0?`connecting`:`reconnecting`),h.current>0&&(o(e=>({...e,events:[...e.events,{type:`choice_stream_boundary`}]})),c.current?.({type:`live_reset`}));let e=!1,l=new AbortController;p.current=l;let d=wc(),g={};d&&(g.authorization=`Bearer ${d}`),m.current!==void 0&&(g[`last-event-id`]=m.current);try{let n=await fetch(`/api/sessions/${encodeURIComponent(r)}/stream`,{headers:g,signal:l.signal});if(t)return;if(!n.ok){if(n.status===401||n.status===403||n.status===404){t=!0;let e=n.status===401?`unauthorized`:n.status===403?`forbidden`:`not-found`;f(e),u(`closed`);return}throw Error(`stream ${n.status}`)}if(n.body===null)throw Error(`stream: no body`);h.current=0,u(`open`);let a=n.body.getReader(),d=new TextDecoder,p=``;outer:for(;;){let{done:n,value:r}=await a.read();if(t||n)break;p+=d.decode(r,{stream:!0});let{events:l,remainder:u}=Su(p);p=u;let f=[],h=()=>{if(f.length===0)return;let e=f;f=[],o(t=>({...t,key:i,events:[...t.events,...e]}))};for(let n of l){n.id!==void 0&&(m.current=n.id);let r;try{r=JSON.parse(n.data)}catch{continue}if(Cu(r)){h(),e=!0,t=!0;break outer}typeof r==`object`&&r&&r.reset===!0?(m.current=n.id,f=[],s.current?.(),c.current?.({type:`live_reset`}),o(e=>({key:i,events:[],generation:e.generation+1}))):yu(r)?c.current?.(r):f.push(r)}h()}}catch(e){if(e instanceof DOMException&&e.name===`AbortError`)return}if(t){e&&u(`ended`);return}h.current+=1;let _=.75+Math.random()*.5,v=Math.min(xu*2**(h.current-1),bu)*_;n=setTimeout(()=>void a(),v)}return a(),()=>{t=!0,clearTimeout(n),p.current?.abort()}},[e,t,i]),{events:a.key===i?a.events:[],status:l,error:d,generation:a.key===i?a.generation:0}}function Tu(e){return e.live}var Eu=0,Du=(e,t,n)=>`${e}:${t}:${n}`,Ou=e=>e.turn??0;function ku(e,t,n){let r;for(let i of e){let e=i[1];e.part===t&&e.seg===n&&(!r||e.turn<r[1].turn)&&(r=i)}return r}function Au(e){return e.part===`text`?{kind:`assistant`,id:e.id,text:e.text,live:e.state}:{kind:`thinking`,id:e.id,text:e.text,live:e.state}}var ju=e=>{if(typeof requestAnimationFrame==`function`){let t=requestAnimationFrame(e);return()=>cancelAnimationFrame(t)}let t=setTimeout(e,16);return()=>clearTimeout(t)};function Mu(){let e=(0,O.useRef)(new Map),t=(0,O.useRef)(new Map),n=(0,O.useRef)(new Set),r=(0,O.useRef)(void 0),[i,a]=(0,O.useState)([]),o=(0,O.useRef)(void 0),s=(0,O.useCallback)(()=>{o.current?.(),o.current=void 0;let n=[...t.current.values(),...[...e.current.values()].sort((e,t)=>e.turn-t.turn||e.seg-t.seg)];a(n.filter(e=>e.text.length>0).map(Au))},[]),c=(0,O.useCallback)(()=>{o.current||=ju(()=>{o.current=void 0,s()})},[s]);return(0,O.useEffect)(()=>()=>o.current?.(),[]),{drafts:i,onLive:(0,O.useCallback)(i=>{let a=e.current;if(i.type!==`live_reset`){let e=Ou(i),t=r.current;(!t||e>t.turn)&&(r.current={turn:e,ended:!1})}switch(i.type){case`live_reset`:a.clear(),n.current.clear(),r.current=void 0;break;case`live_snapshot`:{let e=Du(Ou(i),i.part,i.seg);if(n.current.has(e))return;let t=a.get(e);a.set(e,{id:t?.id??`live-${++Eu}`,turn:Ou(i),seg:i.seg,part:i.part,text:i.text,state:`streaming`,stale:!1});break}case`live_delta`:{let e=Du(Ou(i),i.part,i.seg);if(n.current.has(e))return;let t=a.get(e);if(!t&&i.offset===0&&(t={id:`live-${++Eu}`,turn:Ou(i),seg:i.seg,part:i.part,text:``,state:`streaming`,stale:!1},a.set(e,t)),!t||t.stale)return;let r=i.offset+i.text.length;if(i.offset>t.text.length){t.stale=!0;return}if(r<=t.text.length)return;t.text+=i.text.slice(t.text.length-i.offset);break}case`live_seal`:{let e=a.get(Du(Ou(i),i.part,i.seg));e&&(e.state=`sealed`);break}case`live_end`:{let e=Ou(i);r.current?.turn===e&&(r.current.ended=!0);for(let t of n.current){let r=Number(t.split(`:`)[0]);Number.isFinite(r)&&r<e&&n.current.delete(t)}for(let[n,r]of a)r.turn>e||(i.reason===`aborted`?(t.current.set(n,{...r,state:`interrupted`}),a.delete(n)):r.state=`sealed`);break}}c()},[c]),claim:(0,O.useCallback)((i,a)=>{let o=ku(t.current,i,a)??ku(e.current,i,a);if(!o){let e=r.current;e&&!e.ended&&n.current.add(Du(e.turn,i,a));return}let[c,l]=o;return t.current.get(c)===l?t.current.delete(c):(e.current.delete(c),n.current.add(c)),s(),l.id},[s]),settle:(0,O.useCallback)(()=>{let t=r.current,n=!1;for(let[r,i]of e.current){let a=!t||i.turn<t.turn||i.turn===t.turn&&t.ended;i.state===`sealed`&&a&&(e.current.delete(r),n=!0)}n&&s()},[s]),clearAll:(0,O.useCallback)(()=>{e.current.clear(),n.current.clear(),t.current.clear(),r.current=void 0,s()},[s])}}function Nu(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Pu(e){if(!Nu(e)||typeof e.corrId!=`string`||typeof e.title!=`string`||!Array.isArray(e.options)||e.cancellable!==void 0&&typeof e.cancellable!=`boolean`)return null;let t=[];for(let n of e.options){if(!Nu(n)||typeof n.value!=`string`||typeof n.label!=`string`)return null;t.push({value:n.value,label:n.label,...typeof n.description==`string`?{description:n.description}:{}})}return t.length===0?null:{corrId:e.corrId,title:e.title,options:t,...typeof e.cancellable==`boolean`?{cancellable:e.cancellable}:{},...typeof e.default==`string`?{default:e.default}:{}}}function Fu(e){let t=(0,O.useRef)({first:void 0,count:0,choices:new Map,progress:new Map});return(0,O.useMemo)(()=>{let n=t.current;(e.length<n.count||n.count>0&&e[0]!==n.first)&&(n.count=0,n.choices=new Map,n.progress=new Map);let{choices:r,progress:i}=n;for(let t=n.count;t<e.length;t++){let n=e[t];if(Nu(n)){if(n.type===`choice_stream_boundary`)r.clear(),i.clear();else if(n.type===`choice_request`){let e=Pu(n.request);e&&r.set(e.corrId,e)}else if(n.type===`choice_settled`&&typeof n.corrId==`string`)r.delete(n.corrId);else if(n.type===`progress`&&typeof n.corrId==`string`){if(n.phase===`end`)i.delete(n.corrId);else if((n.phase===`start`||n.phase===`update`)&&typeof n.label==`string`){let e=typeof n.fraction==`number`&&Number.isFinite(n.fraction)?Math.max(0,Math.min(1,n.fraction)):void 0;i.set(n.corrId,{corrId:n.corrId,label:n.label,...e===void 0?{}:{fraction:e}})}}}}return n.first=e[0],n.count=e.length,{choices:[...r.values()],progress:[...i.values()]}},[e])}var Iu=0;function Lu(){Iu=0}function Ru(e){return Iu+=1,`${e}_${Iu}`}function zu(e){return typeof e==`string`?e:void 0}function Bu(e){return typeof e==`number`?e:void 0}var Vu=`… [truncated]`;function Hu(e){return e.endsWith(Vu)}function Uu(e,t){return`/api/sessions/${encodeURIComponent(e)}/tool-results/${encodeURIComponent(t)}`}function Wu(e,t){let n=zu(e.toolUseId),r=zu(e.content)??zu(e.output)??``,i=n===void 0?void 0:t?.get(n);if(i===void 0)return{kind:`notice`,id:Ru(`n`),text:`tool result: ${r.slice(0,80)}`};i.output=r,i.outputUnavailable=!1,i.outputClipped=Hu(r),i.status=`ok`;let a=Bu(e.durationMs);a!==void 0&&(i.durationMs=a);let o=zu(e.diff);o!==void 0&&(i.diff=o)}function Gu(e){if(e!==void 0)for(let t of e.values())t.status===`running`&&(t.status=`ok`)}function Ku(e,t,n){if(typeof e.kind==`string`)switch(e.kind){case`user`:{let t=zu(e.input)??zu(e.text)??``;return{kind:`user`,id:Ru(`u`),text:t,...e.ts===void 0?{}:{ts:e.ts}}}case`assistant`:return{kind:`assistant`,id:Ru(`a`),text:zu(e.text)??``,...e.ts===void 0?{}:{ts:e.ts}};case`thinking`:return{kind:`thinking`,id:Ru(`th`),text:zu(e.text)??``};case`tool`:{let n=zu(e.input)??``;if(n.trim()===`…`)return;let r=zu(e.toolUseId),i={kind:`tool`,id:Ru(`t`),name:zu(e.toolName)??`tool`,toolUseId:r,inputPreview:n,status:`running`,outputUnavailable:!0};return t!==void 0&&r!==void 0&&t.set(r,i),i}case`tool_result`:return Wu(e,t);case`tool_error`:{let t=zu(e.content)??``,n=t.split(`
55
+ `,1)[0]??``;return{kind:`tool`,id:Ru(`t`),name:zu(e.toolName)??`error`,inputPreview:n,status:`error`,output:t}}case`error`:return Gu(t),{kind:`error`,id:Ru(`e`),message:zu(e.message)??`error`};case`done`:{Gu(t);let n=zu(e.stopReason)===`interrupted`,r=e.costUsd,i=e.durationMs,a=[];typeof r==`number`&&a.push(`$${r.toFixed(4)}`),typeof i==`number`&&a.push(`${(i/1e3).toFixed(1)}s`);let o=Bu(e.inputTokens),s=Bu(e.outputTokens),c=Bu(e.cacheReadTokens);if(o!==void 0||s!==void 0){let e=[];o!==void 0&&e.push(`${o}in`),s!==void 0&&e.push(`${s}out`),c!==void 0&&e.push(`${c}cache`),a.push(e.join(`/`))}return n?{kind:`stopped`,id:Ru(`n`),text:a.length?`Stopped · ${a.join(` · `)}`:`Stopped`}:{kind:`notice`,id:Ru(`n`),text:a.length?`turn complete · ${a.join(` · `)}`:`turn complete`}}case`paused`:return{kind:`notice`,id:Ru(`n`),text:`paused — usage limit`};case`resumed`:return{kind:`notice`,id:Ru(`n`),text:`resumed`};case`tool_activity`:{let t=Bu(e.activeCount)??0;if(t===0)return{kind:`notice`,id:Ru(`n`),text:`tool wave complete`};let n=t===1?`tool`:`tools`;return{kind:`notice`,id:Ru(`n`),text:`Running ${t} ${n} in parallel`}}case`rate_limit`:{let t=Bu(e.retryAfterMs),n=t===void 0?``:` (retrying in ${Math.ceil(t/1e3)}s)`;return{kind:`notice`,id:Ru(`n`),text:`Rate limited${n}`}}case`progress`:return{kind:`notice`,id:Ru(`n`),text:zu(e.message)??`progress`};case`subagent_lifecycle`:{let t=zu(e.subagentId)??`subagent`,r=zu(e.status)??`unknown`,i=zu(e.agentType),a=i?`${i} (${t.slice(0,8)})`:t.slice(0,12);if(n!==void 0){let i=n.get(t);if(i!==void 0){i.status=r;let t=Bu(e.durationMs);t!==void 0&&(i.durationMs=t);let n=Bu(e.totalCostUsd);n!==void 0&&(i.totalCostUsd=n);let a=Bu(e.turnCount);a!==void 0&&(i.turnCount=a);let o=zu(e.stopReason);o!==void 0&&(i.stopReason=o);return}}let o={kind:`subagent`,id:Ru(`sa`),subagentId:t,parentId:zu(e.parentId),status:r,label:a,model:zu(e.model),agentType:zu(e.agentType),durationMs:Bu(e.durationMs),totalCostUsd:Bu(e.totalCostUsd),promptHead:zu(e.promptHead),turnCount:Bu(e.turnCount),stopReason:zu(e.stopReason),parentToolUseId:zu(e.parentToolUseId)};return n?.set(t,o),o}case`background_job`:{let t=zu(e.jobId)??`job`,n=zu(e.status)??`unknown`,r=zu(e.label)??t.slice(0,12);return{kind:`bg_job`,id:Ru(`bj`),jobId:t,status:n,label:r}}case`plan_mode`:{let t=zu(e.mode)??`default`;return{kind:`notice`,id:Ru(`n`),text:`Switched to ${t} mode`}}default:return}}function qu(e,t){if(t.kind!==`done`)return e;let n=t.costUsd,r=t.durationMs,i=t.inputTokens,a=t.outputTokens,o=t.cacheReadTokens;return{costUsd:e.costUsd+(typeof n==`number`?n:0),durationMs:e.durationMs+(typeof r==`number`?r:0),turns:e.turns+1,inputTokens:(e.inputTokens??0)+(typeof i==`number`?i:0),outputTokens:(e.outputTokens??0)+(typeof a==`number`?a:0),cacheReadTokens:(e.cacheReadTokens??0)+(typeof o==`number`?o:0)}}var Ju={costUsd:0,durationMs:0,turns:0};function Yu(e,t){let[n,r]=(0,O.useState)({}),i=e?n[e]??0:0,a=Mu(),{events:o,status:s,error:c,generation:l}=wu(e,i,t,a.onLive),{choices:u,progress:d}=Fu(o),[f,p]=(0,O.useState)([]),[m,h]=(0,O.useState)(Ju),[g,_]=(0,O.useState)(!1),[v,y]=(0,O.useState)(0),b=(0,O.useRef)(new Map),x=(0,O.useRef)(new Map),S=(0,O.useRef)(0),C=(0,O.useCallback)(()=>{e&&r(t=>({...t,[e]:(t[e]??0)+1}))},[e]);return(0,O.useEffect)(()=>{Lu(),S.current=0,b.current=new Map,x.current=new Map,p([]),h(Ju),_(!1),y(0),l===0&&a.clearAll()},[e,i,l,a]),(0,O.useEffect)(()=>{let e=o.slice(S.current);if(e.length===0)return;S.current=o.length;let t=b.current,n=[],r=Ju,i=!1,s=null,c=0;for(let o of e){let e=o;if(e.type===`choice_request`||e.type===`choice_settled`||e.type===`choice_stream_boundary`||e.type===`progress`||e.type?.startsWith(`live_`))continue;let l=e.record??o,u=e.replay===!0;l.kind===`user`?s=!0:(l.kind===`done`||l.kind===`error`||l.kind===`stopped`)&&(s=!1,a.settle()),(l.kind===`done`||l.kind===`stopped`)&&!u&&(c+=1),r=qu(r,l);let d=Ku(l,t,x.current);if(d!==void 0){let e=l.seg;if(typeof e==`number`&&(d.kind===`assistant`||d.kind===`thinking`)){let t=a.claim(d.kind===`assistant`?`text`:`thinking`,e);t!==void 0&&(d.id=t)}n.push(d)}else(l.kind===`tool_result`||l.kind===`subagent_lifecycle`)&&(i=!0)}n.length>0?p(e=>[...e,...n]):i&&p(e=>[...e]),(r.costUsd!==0||r.durationMs!==0||r.turns!==0)&&h(e=>({costUsd:e.costUsd+r.costUsd,durationMs:e.durationMs+r.durationMs,turns:e.turns+r.turns,inputTokens:(e.inputTokens??0)+(r.inputTokens??0),outputTokens:(e.outputTokens??0)+(r.outputTokens??0),cacheReadTokens:(e.cacheReadTokens??0)+(r.cacheReadTokens??0)})),s!==null&&_(s),c>0&&y(e=>e+c)},[o,l]),{items:(0,O.useMemo)(()=>a.drafts.length===0?f:[...f,...a.drafts],[f,a.drafts]),totals:m,status:s,error:c,turnActive:g,liveTurns:v,clear:C,choices:u,progress:d}}var Xu=50,Zu=200;function Qu(){let e=(0,O.useRef)(null),[t,n]=(0,O.useState)(!0),[r,i]=(0,O.useState)(!1),[a,o]=(0,O.useState)(!1),s=(0,O.useRef)(!1),c=(0,O.useRef)(!0),l=(0,O.useRef)(0);return(0,O.useEffect)(()=>{let t=e.current;if(t===null)return;l.current=t.scrollTop;let r=l.current,a=t.scrollHeight;function u(){if(t===null)return;let e=t.scrollHeight<a;a=t.scrollHeight;let u=t.scrollTop<r&&!e;r=t.scrollTop,l.current=r,c.current&&!u&&t.scrollHeight-t.scrollTop-t.clientHeight>Xu&&(t.scrollTop=t.scrollHeight,r=t.scrollTop,l.current=r);let d=t.scrollHeight-t.scrollTop-t.clientHeight,f=d<=Xu;c.current=f;let p=d>Zu;s.current=p,n(f),i(p),f&&o(!1)}let d=t.firstElementChild,f=typeof ResizeObserver>`u`||d===null?null:new ResizeObserver(()=>{c.current&&t.scrollHeight-t.scrollTop-t.clientHeight>Xu&&(t.scrollTop=t.scrollHeight,r=t.scrollTop,l.current=r)});return f!==null&&d!==null&&f.observe(d),t.addEventListener(`scroll`,u,{passive:!0}),()=>{f?.disconnect(),t.removeEventListener(`scroll`,u)}},[]),{containerRef:e,scrollToBottom:(0,O.useCallback)(()=>{let t=e.current;t!==null&&(t.scrollTop=t.scrollHeight,l.current=t.scrollTop,c.current=!0,o(!1))},[]),isPinned:t,showScrollButton:r,hasNewContent:a,notifyNewContent:(0,O.useCallback)(()=>{s.current&&o(!0)},[])}}function $u(e,t){return Number.isInteger(t)&&t>=0&&t<e.length}function ed(e,t){if(!$u(e,t)||t===0)return e.slice();let n=e.slice(),r=n[t-1],i=n[t];return r===void 0||i===void 0?e.slice():(n[t-1]=i,n[t]=r,n)}function td(e,t){if(!$u(e,t)||t===e.length-1)return e.slice();let n=e.slice(),r=n[t+1],i=n[t];return r===void 0||i===void 0?e.slice():(n[t+1]=i,n[t]=r,n)}function nd(e,t){if(!$u(e,t))return e.slice();let n=e.slice();return n.splice(t,1),n}function G(e,t,n){if(!$u(e,t))return e.slice();let r=e.slice();return r[t]={...r[t],text:n},r}function K({submit:e,isLive:t}){let[n,r]=(0,O.useState)([]),i=(0,O.useRef)(!1),a=(0,O.useRef)(0),o=(0,O.useRef)([]);return{entries:n,enqueue:(0,O.useCallback)(e=>{let t=a.current++,n=[...o.current,{id:t,text:e}];o.current=n,r(n)},[]),moveItemUp:(0,O.useCallback)(e=>{let t=ed(o.current,e);o.current=t,r(t)},[]),moveItemDown:(0,O.useCallback)(e=>{let t=td(o.current,e);o.current=t,r(t)},[]),removeItem:(0,O.useCallback)(e=>{let t=nd(o.current,e);o.current=t,r(t)},[]),editItem:(0,O.useCallback)((e,t)=>{let n=G(o.current,e,t);o.current=n,r(n)},[]),clear:(0,O.useCallback)(()=>{o.current=[],r([])},[]),flush:(0,O.useCallback)(async()=>{if(i.current||!t)return;let n=o.current[0];if(n===void 0)return;let a=n.id,s=n.text;i.current=!0,e(s).then(()=>{let e=o.current.filter(e=>e.id!==a);o.current=e,r(e)}).catch(()=>{}).finally(()=>{i.current=!1})},[e,t])}}var q=[],rd=0,id=`afk.command-outputs.v1`,ad=1e6;function od(){try{let e=sessionStorage.getItem(id);if(!e||e.length>ad)return{};let t=JSON.parse(e);if(!t||typeof t!=`object`||Array.isArray(t))return{};let n={};for(let[e,r]of Object.entries(t)){if(!Array.isArray(r))continue;let t=r.filter(e=>!!e&&typeof e.key==`number`&&typeof e.input==`string`&&Number.isInteger(e.afterCount)&&e.afterCount>=0&&Array.isArray(e.response?.blocks)&&typeof e.response?.control?.kind==`string`);n[e]=t;for(let e of t)rd=Math.max(rd,e.key)}return n}catch{return{}}}function sd(){let[e,t]=(0,O.useState)(od);(0,O.useEffect)(()=>{try{let t=Object.fromEntries(Object.entries(e).slice(-20).map(([e,t])=>[e,t.slice(-50)])),n=JSON.stringify(t);for(;n.length>ad&&Object.keys(t).length;)delete t[Object.keys(t)[0]],n=JSON.stringify(t);sessionStorage.setItem(id,n)}catch{}},[e]);let n=(0,O.useCallback)((e,n,r,i)=>{let a=r.control.kind===`clear`,o=!r.blocks.some(e=>e.text.trim().length>0)&&r.session?.model?{...r,blocks:[{text:`Switched to ${r.session.model}`,ansi:``}]}:r;if(!o.blocks.some(e=>e.text.trim().length>0)&&r.control.kind===`continue`)return;let s={key:++rd,input:n,response:o,afterCount:a?0:i};t(t=>({...t,[e]:[...a?q:t[e]??q,s]}))},[]),r=(0,O.useCallback)((e,n=!1)=>{t(t=>{let r=n?[...t[e]??q].reverse().find(e=>e.response.control.kind===`clear`):void 0;return{...t,[e]:r?[r]:q}})},[]);return{itemsFor:(0,O.useCallback)(t=>t===null?q:e[t]??q,[e]),addItem:n,clearItems:r}}function cd(){return new URL(window.location.href).searchParams.get(`session`)||null}function ld(){let[e,t]=(0,O.useState)(cd);return(0,O.useEffect)(()=>{let e=()=>t(cd());return window.addEventListener(`popstate`,e),()=>window.removeEventListener(`popstate`,e)},[]),[e,(0,O.useCallback)(e=>{let n=new URL(window.location.href);e?n.searchParams.set(`session`,e):n.searchParams.delete(`session`),n.href!==window.location.href&&window.history.pushState({},``,n),t(e)},[])]}var ud=200;function dd({text:e,isStreaming:t=!1}){let[n,r]=(0,O.useState)(!1),i=e.length>ud,a=i&&!n?e.slice(0,ud)+`…`:e;return(0,z.jsxs)(`details`,{className:`group rounded-md border border-border/30 bg-muted/20`,children:[(0,z.jsxs)(`summary`,{className:`flex cursor-pointer list-none items-center gap-1.5 px-3 py-2 text-xs text-muted-foreground select-none hover:text-foreground`,children:[(0,z.jsx)(ce,{className:[`h-3.5 w-3.5 shrink-0 text-brand/60`,t?`animate-pulse`:``].filter(Boolean).join(` `)}),(0,z.jsx)(`span`,{className:`font-medium`,children:`Thinking`}),e.length>0&&(0,z.jsxs)(`span`,{className:`text-[10px] text-muted-foreground/50 tabular-nums`,children:[e.length.toLocaleString(),` chars`]}),t&&(0,z.jsx)(`span`,{className:`ml-0.5 flex items-center gap-px`,children:[0,150,300].map(e=>(0,z.jsx)(`span`,{className:`inline-block h-1 w-1 rounded-full bg-muted-foreground/50 animate-shimmer-pulse`,style:{animationDelay:`${e}ms`}},e))})]}),(0,z.jsxs)(`div`,{className:`border-t border-border/30 px-3 py-2`,children:[(0,z.jsx)(`p`,{className:`whitespace-pre-wrap break-words text-xs italic leading-relaxed text-muted-foreground/70`,children:a}),i&&(0,z.jsx)(`button`,{type:`button`,onClick:e=>{e.preventDefault(),r(e=>!e)},className:`mt-1.5 text-[10px] text-brand/60 hover:text-brand/80 transition-colors`,children:n?`Show less`:`Show more`})]})]})}var fd=(e,t)=>typeof e[t]==`string`?e[t]:``,pd=e=>t=>fd(t,e),md=e=>{let t=fd(e,`url`);try{return new URL(t).host}catch{return t||fd(e,`query`)}};function hd(e,t){let n=fd(e,`pattern`);if(!n)return``;let r=fd(e,`path`)||fd(e,`include`);if(r&&t){let e=t.replace(/[\\/]+$/,``).replaceAll(`\\`,`/`),n=r.replaceAll(`\\`,`/`);n.startsWith(`${e}/`)?r=n.slice(e.length+1):n===e&&(r=`.`)}return r?`grep "${n}" in ${r}`:`grep "${n}"`}function gd(e){let t=fd(e,`pattern`);return t?`glob "${t}"`:``}var _d={read_file:pd(`file_path`),edit_file:pd(`file_path`),write_file:pd(`file_path`),list_directory:pd(`path`),extract_document:pd(`file_path`),bash:pd(`command`),grep:hd,glob:gd,web_scrape:md,web_request:md,browser_open:md,agent:pd(`prompt`),remote_agent:pd(`prompt`),skill:pd(`name`)},vd=new Set([`read_file`,`edit_file`,`write_file`,`list_directory`,`extract_document`]);function yd(e,t,n){let r=t.trim();try{let t=JSON.parse(r);t&&typeof t==`object`&&!Array.isArray(t)&&(r=_d[e]?.(t,n)||r)}catch{}if(vd.has(e)&&n){let e=n.replace(/[\\/]+$/,``).replaceAll(`\\`,`/`),t=r.replaceAll(`\\`,`/`);t.startsWith(`${e}/`)&&(r=t.slice(e.length+1))}if((e===`grep`||e===`glob`)&&n){let t=n.replace(/[\\/]+$/,``).replaceAll(`\\`,`/`);r=r.replaceAll(`\\`,`/`).replace(` in ${t}/`,` in `).replace(RegExp(` in ${t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}$`),` in .`),e===`grep`&&r.startsWith(`"`)&&(r=`grep ${r}`),e===`glob`&&r.startsWith(`"`)&&(r=`glob ${r}`)}if([`web_scrape`,`web_request`,`browser_open`].includes(e))try{r=new URL(r).host}catch{}return r.split(/\r?\n/,1)[0]??``}var bd=(0,O.createContext)(null);function xd(e){return e instanceof Ec&&e.status===404?e.message.includes(`journal_not_found`)?`Full output unavailable: this session has no message journal.`:`Full output not found in the session journal.`:e instanceof Error?e.message:String(e)}function Sd(e){let t=(0,O.useContext)(bd),[n,r]=(0,O.useState)({status:`idle`}),i=t!==null&&e!==void 0&&e.length>0,a=(0,O.useRef)(null);return(0,O.useEffect)(()=>(r({status:`idle`}),()=>{a.current?.abort(),a.current=null}),[t,e]),{state:n,canLoad:i,load:(0,O.useCallback)(()=>{if(!i||t===null||e===void 0)return;a.current?.abort();let n=new AbortController;a.current=n,r({status:`loading`}),U(Uu(t,e),{signal:n.signal}).then(e=>{n.signal.aborted||r({status:`loaded`,result:e})},e=>{n.signal.aborted||r({status:`error`,message:xd(e)})})},[i,t,e])}}var Cd=(0,O.createContext)(void 0);function wd({children:e}){let t=(0,O.useContext)(bd),[n,r]=(0,O.useState)();return(0,O.useEffect)(()=>{if(!t)return;let e=new AbortController;return U(`/api/sessions`,{signal:e.signal}).then(n=>{e.signal.aborted||r({id:t,cwd:n.sessions.find(e=>e.id===t)?.cwd})}).catch(()=>{}),()=>e.abort()},[t]),(0,z.jsx)(Cd.Provider,{value:n?.id===t?n?.cwd:void 0,children:e})}function Td({open:e,children:t}){return(0,z.jsx)(`div`,{className:R(`grid transition-[grid-template-rows] duration-200 ease-out`,e?`grid-rows-[1fr]`:`grid-rows-[0fr]`),children:(0,z.jsx)(`div`,{className:`min-h-0 overflow-hidden`,children:t})})}function Ed({diff:e}){let t=e.split(`
56
+ `);return(0,z.jsx)(`div`,{className:`overflow-x-auto rounded bg-secondary font-mono text-xs leading-5`,children:(0,z.jsx)(`table`,{className:`w-full border-collapse`,children:(0,z.jsx)(`tbody`,{children:t.map((e,t)=>{let n=e.startsWith(`+`)&&!e.startsWith(`+++`),r=e.startsWith(`-`)&&!e.startsWith(`---`),i=e.startsWith(`@@`),a=e.startsWith(`+++`)||e.startsWith(`---`);return(0,z.jsxs)(`tr`,{className:R(n&&`bg-status-running/15 text-foreground`,r&&`bg-status-failed/15 text-foreground`,i&&`bg-muted text-muted-foreground`,a&&`text-muted-foreground`,!n&&!r&&!i&&!a&&`text-foreground`),children:[(0,z.jsx)(`td`,{className:`select-none px-2 py-0 text-right text-muted-foreground tabular-nums`,children:t+1}),(0,z.jsx)(`td`,{className:`w-full whitespace-pre px-2 py-0`,children:e||` `})]},t)})})})})}var Dd=`overflow-x-auto whitespace-pre-wrap font-mono text-[11px] text-foreground`;function Od({text:e}){let[t,n]=(0,O.useState)(!1),[r,i]=(0,O.useState)(!1),a=e.split(`
57
+ `),o=Math.max(0,a.length-25);return(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`button`,{type:`button`,onClick:()=>{navigator.clipboard.writeText(e).then(()=>i(!0)).catch(()=>i(!1))},className:`mb-1 text-xs text-foreground rounded focus-visible:outline-2 focus-visible:outline-ring`,children:r?`Copied output`:`Copy output`}),(0,z.jsxs)(`div`,{className:`relative`,children:[(0,z.jsx)(`pre`,{className:Dd,children:t?e:a.slice(0,25).join(`
58
+ `)}),o>0&&!t&&(0,z.jsx)(`div`,{"aria-hidden":`true`,className:`pointer-events-none absolute inset-x-0 bottom-0 h-8 bg-gradient-to-t from-card to-transparent`})]}),o>0&&(0,z.jsx)(`button`,{type:`button`,"aria-expanded":t,onClick:()=>n(e=>!e),className:`w-full py-2 text-xs text-foreground rounded focus-visible:outline-2 focus-visible:outline-ring`,children:t?`Show less`:`Show ${o} more lines`})]})}function kd({toolUseId:e,preview:t,clipped:n,unavailable:r}){let{state:i,canLoad:a,load:o}=Sd(e);if(i.status===`loaded`){let{result:e}=i;return(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Od,{text:e.text}),e.truncated&&(0,z.jsxs)(`p`,{className:`mt-1 text-[11px] italic text-muted-foreground`,children:[`Showing the first `,e.text.length.toLocaleString(),` of`,` `,e.totalChars.toLocaleString(),` characters.`]})]})}return(0,z.jsxs)(`div`,{children:[r&&!t&&(0,z.jsx)(`p`,{className:`text-[11px] italic text-muted-foreground`,children:`Output not in the live record (replayed session)`}),t&&(0,z.jsx)(Od,{text:t}),a&&(n===!0||r===!0)&&(0,z.jsx)(`button`,{type:`button`,onClick:o,disabled:i.status===`loading`,className:`mt-1 text-[11px] text-muted-foreground underline underline-offset-2 hover:text-foreground disabled:opacity-50`,children:i.status===`loading`?`Loading full output…`:`Load full output`}),i.status===`error`&&(0,z.jsx)(`p`,{className:`mt-1 text-[11px] italic text-status-failed`,children:i.message})]})}var Ad={read_file:{Icon:Be,colorClass:`text-cat-read`},glob:{Icon:Be,colorClass:`text-cat-read`},grep:{Icon:Be,colorClass:`text-cat-read`},list_directory:{Icon:Be,colorClass:`text-cat-read`},json_query:{Icon:Be,colorClass:`text-cat-read`},write_file:{Icon:Re,colorClass:`text-cat-write`},edit_file:{Icon:Re,colorClass:`text-cat-write`},patch_apply:{Icon:Re,colorClass:`text-cat-write`},bash:{Icon:Bt,colorClass:`text-cat-shell`},test_run:{Icon:Bt,colorClass:`text-cat-shell`},agent:{Icon:Ke,colorClass:`text-cat-agent`},compose:{Icon:Ke,colorClass:`text-cat-agent`},skill:{Icon:Ke,colorClass:`text-cat-agent`},browser_open:{Icon:Je,colorClass:`text-cat-browser`},browser_act:{Icon:Je,colorClass:`text-cat-browser`},browser_observe:{Icon:Je,colorClass:`text-cat-browser`},browser_screenshot:{Icon:Je,colorClass:`text-cat-browser`},web_scrape:{Icon:Ie,colorClass:`text-cat-web`},web_request:{Icon:Ie,colorClass:`text-cat-web`},memory_search:{Icon:Pe,colorClass:`text-cat-mcp`},memory_update:{Icon:Pe,colorClass:`text-cat-mcp`},state_get:{Icon:Pe,colorClass:`text-cat-mcp`},state_put:{Icon:Pe,colorClass:`text-cat-mcp`}};function jd(e){return Ad[e]??{Icon:Wt,colorClass:`text-cat-other`}}function Md({status:e}){return e===`running`?(0,z.jsx)(nt,{className:`h-3.5 w-3.5 shrink-0 animate-spin-slow text-status-blocked`,"aria-label":`running`}):e===`ok`?(0,z.jsx)(Se,{className:`h-3.5 w-3.5 shrink-0 text-status-running`,"aria-label":`ok`}):(0,z.jsx)(N,{className:`h-3.5 w-3.5 shrink-0 text-status-failed`,"aria-label":`error`})}function Nd({ms:e,live:t}){let n=e===void 0?t===void 0?null:`...${t}s`:`${(e/1e3).toFixed(1)}s`;return n===null?null:(0,z.jsx)(`span`,{className:`rounded bg-secondary px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground`,children:n})}var Pd=(0,O.memo)(function({toolUseId:e,name:t,inputPreview:n,status:r,output:i,outputUnavailable:a,outputClipped:o,diff:s,durationMs:c}){let[l,u]=(0,O.useState)(!1),[d,f]=(0,O.useState)(!1),[p,m]=(0,O.useState)(0),h=(0,O.useRef)(null);(0,O.useEffect)(()=>(r===`running`&&c===void 0?h.current=setInterval(()=>{m(e=>e+1)},1e3):h.current!==null&&(clearInterval(h.current),h.current=null),()=>{h.current!==null&&clearInterval(h.current)}),[r,c]);let{Icon:g,colorClass:_}=jd(t),v=s||a||i&&i.trim().length>0,y=yd(t,n,(0,O.useContext)(Cd)),b=n.trim();return(0,z.jsxs)(`div`,{className:R(`rounded-md border bg-card text-sm`,r===`error`?`border-status-failed/40`:`border-border`),children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2`,children:[(0,z.jsx)(g,{className:R(`h-3.5 w-3.5 shrink-0`,_)}),(0,z.jsx)(`span`,{className:`font-mono text-xs font-medium text-foreground`,children:t}),(0,z.jsx)(`span`,{className:`text-xs text-foreground`,children:r===`ok`?`Done`:r===`error`?`Error`:`Running`}),(0,z.jsxs)(`div`,{className:`ml-auto flex items-center gap-1.5`,children:[(0,z.jsx)(Nd,{ms:c,live:r===`running`?p:void 0}),(0,z.jsx)(Md,{status:r})]})]}),y&&(0,z.jsx)(`p`,{"data-tool-summary":!0,title:y,className:`px-3 pb-2 truncate font-mono text-xs text-foreground`,children:y}),b.length>0&&(0,z.jsx)(`button`,{type:`button`,onClick:()=>f(e=>!e),className:`w-full border-t border-border/50 px-3 py-1.5 text-left`,"aria-expanded":d,children:(0,z.jsx)(`p`,{className:R(`font-mono text-[11px] text-muted-foreground`,!d&&`line-clamp-2`),children:b})}),v&&(0,z.jsxs)(`div`,{className:`border-t border-border/50`,children:[(0,z.jsxs)(`button`,{type:`button`,onClick:()=>u(e=>!e),className:`flex w-full cursor-pointer items-center gap-1 px-3 py-1.5 text-[11px] text-muted-foreground select-none hover:text-foreground`,"aria-expanded":l,children:[(0,z.jsx)(ve,{className:R(`h-3 w-3 shrink-0 transition-transform duration-150`,l&&`rotate-90`)}),`Output`]}),(0,z.jsx)(Td,{open:l,children:(0,z.jsxs)(`div`,{className:`px-3 pb-2 pt-1`,children:[s&&(0,z.jsx)(Ed,{diff:s}),!s&&(0,z.jsx)(kd,{toolUseId:e,preview:i,clipped:o,unavailable:a})]})})]})]})});function Fd(e){if(e<1e3)return`${e}ms`;let t=e/1e3;return t<60?`${t.toFixed(1)}s`:`${Math.floor(t/60)}m ${Math.floor(t%60)}s`}function Id(e){return e<.001?`<$0.001`:`$${e.toFixed(3)}`}function Ld({status:e}){let t=`h-3.5 w-3.5 shrink-0`;switch(e){case`started`:return(0,z.jsx)(gt,{className:R(t,`animate-pulse text-status-blocked`),"aria-label":`running`});case`succeeded`:case`completed`:return(0,z.jsx)(be,{className:R(t,`text-status-running`),"aria-label":`succeeded`});case`failed`:return(0,z.jsx)(Ee,{className:R(t,`text-status-failed`),"aria-label":`failed`});case`cancelled`:return(0,z.jsx)(Rt,{className:R(t,`text-muted-foreground`),"aria-label":`cancelled`});default:return(0,z.jsx)(we,{className:R(t,`text-muted-foreground`),"aria-label":`unknown`})}}function Rd(e){switch(e){case`succeeded`:case`completed`:return`text-foreground`;case`failed`:return`text-foreground`;case`started`:return`text-foreground`;default:return`text-muted-foreground`}}function zd({node:e,isExpanded:t,onToggle:n,isChild:r}){let{item:i}=e,a=e.children.length>0;return(0,z.jsxs)(`div`,{className:R(`flex items-start gap-2 px-3 py-2`,a&&`cursor-pointer select-none`,r&&`py-1.5`),onClick:a?n:void 0,role:a?`button`:void 0,tabIndex:a?0:void 0,onKeyDown:a?e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),n())}:void 0,"aria-expanded":a?t:void 0,children:[a?(0,z.jsx)(ve,{className:R(`mt-0.5 h-3 w-3 shrink-0 text-muted-foreground transition-transform`,t&&`rotate-90`)}):(0,z.jsx)(`span`,{className:`h-3 w-3 shrink-0`}),(0,z.jsx)(`span`,{className:`mt-0.5`,children:(0,z.jsx)(Ld,{status:i.status})}),(0,z.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[(0,z.jsx)(`span`,{className:`text-xs font-medium text-foreground`,children:i.agentType??i.label}),i.model&&(0,z.jsx)(`span`,{className:`rounded bg-secondary px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground`,children:i.model}),i.durationMs!==void 0&&(0,z.jsx)(`span`,{className:`rounded bg-secondary px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground`,children:Fd(i.durationMs)}),i.totalCostUsd!==void 0&&(0,z.jsx)(`span`,{className:`rounded bg-secondary px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground`,children:Id(i.totalCostUsd)}),(0,z.jsx)(`span`,{className:R(`ml-auto font-mono text-[10px] capitalize`,Rd(i.status)),children:i.status})]}),i.promptHead&&(0,z.jsxs)(`p`,{className:`mt-0.5 line-clamp-1 text-[11px] italic text-muted-foreground`,children:[`“`,i.promptHead,`”`]})]})]})}function Bd({node:e,isChild:t=!1}){let[n,r]=(0,O.useState)(!0),i=e.children.length>0;return(0,z.jsxs)(`div`,{children:[(0,z.jsx)(zd,{node:e,isExpanded:n,onToggle:()=>r(e=>!e),isChild:t}),i&&n&&(0,z.jsx)(`div`,{className:`ml-6 border-l border-border/50 pl-3`,children:e.children.map((t,n)=>(0,z.jsx)(`div`,{className:R(n<e.children.length-1&&`border-b border-border/30`),children:(0,z.jsx)(Bd,{node:t,isChild:!0})},t.item.subagentId))})]})}function Vd({roots:e,className:t}){return e.length===0?null:(0,z.jsx)(`div`,{className:R(`rounded-md border border-border bg-card`,t),children:e.map((t,n)=>(0,z.jsx)(`div`,{className:R(n<e.length-1&&`border-b border-border/50`),children:(0,z.jsx)(Bd,{node:t})},t.item.subagentId))})}function Hd(e){let t=new Map,n=[];for(let r of e){if(r.kind!==`subagent`||t.get(r.subagentId))continue;let e={item:r,children:[]};if(t.set(r.subagentId,e),r.parentId){let i=t.get(r.parentId);i?i.children.push(e):n.push(e)}else n.push(e)}let r=[];for(let e of n){let n=e.item.parentId?t.get(e.item.parentId):void 0;n?n.children.push(e):r.push(e)}return r}var Ud=new Set([`read_file`,`glob`,`grep`,`list_directory`,`json_query`,`read_witness`,`search_witness`,`get_facet`,`clipboard_read`]),Wd=new Set([`write_file`,`edit_file`,`patch_apply`,`clipboard_write`,`procedure_write`]),Gd=new Set([`bash`,`test_run`,`wait_for`]),Kd=new Set([`agent`,`send_message_to_agent`,`cancel_background_job`]),qd=new Set([`skill`]),Jd=new Set([`compose`]),Yd=new Set([`web_scrape`,`web_request`]),Xd=new Set([`browser_open`,`browser_act`,`browser_observe`,`browser_screenshot`,`browser_close`]),Zd=new Set([`memory_search`,`memory_update`,`state_get`,`state_put`,`state_cas`,`state_delete`,`state_query`,`workspace_publish`,`workspace_query`]);function Qd(e){return Ud.has(e)?`read`:Wd.has(e)?`write`:Gd.has(e)?`shell`:Kd.has(e)?`agent`:qd.has(e)?`skill`:Jd.has(e)?`dag`:Yd.has(e)?`web`:Xd.has(e)?`browser`:Zd.has(e)?`other`:e.startsWith(`mcp__`)?`mcp`:`other`}function $d(e){if(e<1e3)return`<1s`;let t=e/1e3;return t<60?`${t.toFixed(1)}s`:`${Math.floor(t/60)}m ${Math.floor(t%60)}s`}function ef(e){return e<.001?`<$0.001`:`$${e.toFixed(3)}`}function tf(e){return e===`error`?`error`:e===`ok`?`ok`:`running`}function nf(e){return e===`succeeded`?`ok`:e===`failed`?`error`:e===`cancelled`?`cancelled`:`running`}function rf(e,t){let n=tf(e.status);return{id:e.id,kind:`tool`,label:e.name,category:Qd(e.name),status:n,preview:e.inputPreview,durationMs:e.durationMs,output:e.output,outputClipped:e.outputClipped,outputUnavailable:e.outputUnavailable,children:[],isActive:n===`running`,sourceId:e.toolUseId,seq:t}}function af(e,t){let n=nf(e.status);return{id:e.id,kind:`agent`,label:e.label,category:`agent`,status:n,preview:e.promptHead,durationMs:e.durationMs,costUsd:e.totalCostUsd,model:e.model,agentType:e.agentType,turnCount:e.turnCount,children:[],isActive:n===`running`,sourceId:e.subagentId,seq:t}}function of(e){let t=[],n=[],r=new Map;for(let i=0;i<e.length;i++){let a=e[i];a!==void 0&&(a.kind===`tool`&&(t.push(a),r.set(a.id,i)),a.kind===`subagent`&&(n.push(a),r.set(a.id,i)))}let i=new Map;for(let e of t)e.toolUseId&&i.set(e.toolUseId,e);let a=new Map,o=new Map;for(let e of t)a.set(e.id,rf(e,r.get(e.id)??0));for(let e of n)o.set(e.subagentId,af(e,r.get(e.id)??0));let s=[],c=[];for(let e of n){let t=o.get(e.subagentId);if(t){if(e.parentToolUseId){let n=i.get(e.parentToolUseId);if(n){let e=a.get(n.id);if(e){e.kind=`agent`,e.children.push(t);continue}}c.push(t)}else if(e.parentId){let n=o.get(e.parentId);if(n){n.children.push(t);continue}c.push(t)}else s.push(t)}}let l=[];for(let e of c){let t=n.find(t=>t.subagentId===e.sourceId);if(!t){s.push(e);continue}let r=!1;if(t.parentToolUseId){let n=i.get(t.parentToolUseId);if(n){let t=a.get(n.id);t&&(t.kind=`agent`,t.children.push(e),r=!0)}}if(!r&&t.parentId){let n=o.get(t.parentId);n&&(n.children.push(e),r=!0)}r||l.push(e)}for(let e of l)s.push(e);for(let e of t){let t=a.get(e.id);t&&s.push(t)}return s.sort((e,t)=>e.seq-t.seq),s}var sf={read:Be,write:Re,shell:Bt,agent:Ke,skill:Mt,dag:ot,mcp:bt,web:Ie,browser:Je,plan:et,other:Wt},cf={read:`text-cat-read`,write:`text-cat-write`,shell:`text-cat-shell`,agent:`text-cat-agent`,skill:`text-cat-skill`,dag:`text-cat-dag`,mcp:`text-cat-mcp`,web:`text-cat-web`,browser:`text-cat-browser`,plan:`text-cat-plan`,other:`text-cat-other`};function lf(e){let t=0;for(let n of e.children)n.kind===`tool`&&t++,t+=lf(n);return t}function uf(e){let t=e.durationMs??0;for(let n of e.children)t+=uf(n);return t}function df({category:e,status:t}){let n=sf[e],r=cf[e];return(0,z.jsx)(n,{className:R(`h-3.5 w-3.5 shrink-0`,r,t===`running`&&`animate-shimmer-pulse`,t===`error`&&`text-status-failed`,t===`cancelled`&&`opacity-50`),"aria-hidden":!0})}function ff({node:e}){if(e.status===`running`||e.children.length===0)return null;if(e.status===`error`)return(0,z.jsx)(`div`,{className:`mt-0.5 pl-5 text-[11px] text-status-failed`,children:`Failed`});if(e.status===`cancelled`)return(0,z.jsx)(`div`,{className:`mt-0.5 pl-5 text-[11px] text-muted-foreground`,children:`Cancelled`});let t=lf(e),n=e.durationMs??uf(e),r=e.costUsd,i=[];return t>0&&i.push(`${t} tool${t===1?``:`s`}`),n>0&&i.push($d(n)),r!=null&&r>0&&i.push(ef(r)),(0,z.jsxs)(`div`,{className:`mt-0.5 pl-5 text-[11px] text-muted-foreground`,children:[`Done`,i.length>0?` (${i.join(` · `)})`:``]})}function pf({node:e,depth:t=0,isLast:n=!1}){let r=e.kind===`agent`&&e.children.length>0,[i,a]=(0,O.useState)(e.isActive),o=e.kind===`tool`&&(e.output!==void 0&&e.output.trim().length>0||e.sourceId!==void 0&&e.outputUnavailable===!0),[s,c]=(0,O.useState)(!1),l=(0,O.useContext)(Cd),u=yd(e.label,e.preview??``,l),d=e.children.length>0,f=e.kind===`agent`,p=i?ge:ve,m=r||o;return(0,z.jsxs)(`div`,{className:R(`relative`,t>0&&`pl-3`),children:[(0,z.jsxs)(`div`,{className:R(`flex flex-wrap items-center gap-1.5 py-1 group rounded focus-visible:outline-2 focus-visible:outline-ring`,m&&`cursor-pointer select-none hover:bg-muted/20`),onClick:m?()=>{r?a(e=>!e):o&&c(e=>!e)}:void 0,role:m?`button`:void 0,tabIndex:m?0:void 0,onKeyDown:m?e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),r?a(e=>!e):o&&c(e=>!e))}:void 0,"aria-expanded":r?i:o?s:void 0,children:[r?(0,z.jsx)(p,{className:`h-3 w-3 shrink-0 text-muted-foreground`}):(0,z.jsx)(`span`,{className:`h-3 w-3 shrink-0`,"aria-hidden":!0}),(0,z.jsx)(df,{category:e.category,status:e.status}),(0,z.jsx)(`span`,{className:R(`text-[12px] font-mono leading-none`,e.status===`cancelled`&&`opacity-50`,e.status===`error`&&`text-foreground`,e.status===`running`&&`text-foreground`,e.status===`ok`&&`text-foreground/80`),children:e.label}),(0,z.jsx)(`span`,{className:`text-[10px] text-foreground shrink-0`,children:e.status===`ok`?`✓ Done`:e.status===`error`?`! Error`:e.status===`cancelled`?`— Cancelled`:`◌ Running`}),f&&e.model&&(0,z.jsx)(`span`,{className:`bg-secondary rounded px-1 py-0.5 text-[10px] font-mono text-muted-foreground`,children:e.model}),f&&e.agentType&&(0,z.jsx)(`span`,{className:`bg-secondary rounded px-1 py-0.5 text-[10px] font-mono text-muted-foreground`,children:e.agentType}),f&&e.turnCount!=null&&e.turnCount>0&&(0,z.jsxs)(`span`,{className:`text-[10px] font-mono text-muted-foreground`,children:[e.turnCount,` turn`,e.turnCount===1?``:`s`]}),e.durationMs!=null&&e.durationMs>0&&(0,z.jsx)(`span`,{className:`text-[10px] font-mono text-muted-foreground tabular-nums`,children:$d(e.durationMs)}),f&&e.costUsd!=null&&e.costUsd>0&&(0,z.jsx)(`span`,{className:`text-[10px] font-mono text-muted-foreground`,children:ef(e.costUsd)}),u&&(0,z.jsx)(`span`,{title:u,className:`min-w-0 basis-full pl-5 truncate font-mono text-xs text-foreground`,"data-tool-summary":!0,children:u})]}),o&&s&&(0,z.jsx)(`div`,{className:`pl-5 mb-1`,children:(0,z.jsx)(`div`,{className:`mt-0.5 rounded border border-border/50 bg-card px-2 py-1`,children:(0,z.jsx)(kd,{toolUseId:e.sourceId,preview:e.output,clipped:e.outputClipped,unavailable:e.outputUnavailable})})}),f&&!i&&d&&(0,z.jsx)(ff,{node:e}),d&&i&&(0,z.jsxs)(`div`,{className:R(`relative mt-0.5 ml-[22px]`,`border-l-2 border-spine`),children:[e.children.map((n,r)=>{let i=r===e.children.length-1;return(0,z.jsxs)(`div`,{className:`relative`,children:[(0,z.jsx)(`div`,{className:R(`absolute left-0 top-[10px] h-0 w-3`,`border-t-2 border-spine`,i&&`last-child-clip`),"aria-hidden":!0}),i&&(0,z.jsx)(`div`,{className:`absolute left-[-2px] top-[10px] bottom-0 w-[2px] bg-background`,"aria-hidden":!0}),(0,z.jsx)(`div`,{className:`pl-3`,children:(0,z.jsx)(pf,{node:n,depth:t+1,isLast:i})})]},n.id)}),f&&e.status!==`running`&&(0,z.jsx)(ff,{node:e})]}),f&&(!d||!i)&&e.status!==`running`&&(d?null:(0,z.jsx)(ff,{node:e}))]})}function mf({nodes:e,className:t}){return e.length===0?null:(0,z.jsxs)(`div`,{className:R(`relative pl-3 border-l-2 border-spine/40`,t),children:[(0,z.jsx)(`div`,{className:`mb-1 text-[10px] font-semibold uppercase tracking-widest text-foreground/60 select-none`,children:`Execution`}),(0,z.jsx)(`div`,{className:`flex flex-col gap-0.5`,children:e.map((t,n)=>(0,z.jsx)(pf,{node:t,depth:0,isLast:n===e.length-1},t.id))})]})}var hf=new Set([`tool`,`subagent`,`notice`]),gf=new Set([`user`,`assistant`,`thinking`,`error`,`stopped`,`bg_job`]);function _f(e){let t=[],n=0;for(;n<e.length;){let r=e[n];if(r===void 0){n++;continue}if(gf.has(r.kind)||!hf.has(r.kind)){t.push({kind:`text`,item:r}),n++;continue}let i=[];for(;n<e.length;){let t=e[n];if(t===void 0||!hf.has(t.kind))break;i.push(t),n++}if(i.length>0){let e=of(i);e.length>0&&t.push({kind:`execution`,items:i,id:i[0].id,spineNodes:e})}}return t}function vf({slots:e,renderTextItem:t}){return(0,z.jsx)(wd,{children:e.map((e,n)=>e.kind===`text`?t(e.item,n):(0,z.jsx)(`div`,{className:`py-2 px-1 [content-visibility:auto] [contain-intrinsic-size:auto_100px]`,children:(0,z.jsx)(mf,{nodes:e.spineNodes})},e.id))})}function yf(e){return(0,O.useMemo)(()=>_f(e),[e])}function bf(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var xf=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Sf=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Cf={};function wf(e,t){return((t||Cf).jsx?Sf:xf).test(e)}var Tf=/[ \t\n\f\r]/g;function Ef(e){return typeof e==`object`?e.type===`text`&&Df(e.value):Df(e)}function Df(e){return e.replace(Tf,``)===``}var Of=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Of.prototype.normal={},Of.prototype.property={},Of.prototype.space=void 0;function kf(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Of(n,r,t)}function Af(e){return e.toLowerCase()}var jf=class{constructor(e,t){this.attribute=t,this.property=e}};jf.prototype.attribute=``,jf.prototype.booleanish=!1,jf.prototype.boolean=!1,jf.prototype.commaOrSpaceSeparated=!1,jf.prototype.commaSeparated=!1,jf.prototype.defined=!1,jf.prototype.mustUseProperty=!1,jf.prototype.number=!1,jf.prototype.overloadedBoolean=!1,jf.prototype.property=``,jf.prototype.spaceSeparated=!1,jf.prototype.space=void 0;var Mf=s({boolean:()=>J,booleanish:()=>Pf,commaOrSpaceSeparated:()=>Rf,commaSeparated:()=>Lf,number:()=>Y,overloadedBoolean:()=>Ff,spaceSeparated:()=>If}),Nf=0,J=zf(),Pf=zf(),Ff=zf(),Y=zf(),If=zf(),Lf=zf(),Rf=zf();function zf(){return 2**++Nf}var Bf=Object.keys(Mf),Vf=class extends jf{constructor(e,t,n,r){let i=-1;if(super(e,t),Hf(this,`space`,r),typeof n==`number`)for(;++i<Bf.length;){let e=Bf[i];Hf(this,Bf[i],(n&Mf[e])===Mf[e])}}};Vf.prototype.defined=!0;function Hf(e,t,n){n&&(e[t]=n)}function Uf(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new Vf(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Af(r)]=r,n[Af(a.attribute)]=r}return new Of(t,n,e.space)}var X=Uf({properties:{ariaActiveDescendant:null,ariaAtomic:Pf,ariaAutoComplete:null,ariaBusy:Pf,ariaChecked:Pf,ariaColCount:Y,ariaColIndex:Y,ariaColSpan:Y,ariaControls:If,ariaCurrent:null,ariaDescribedBy:If,ariaDetails:null,ariaDisabled:Pf,ariaDropEffect:If,ariaErrorMessage:null,ariaExpanded:Pf,ariaFlowTo:If,ariaGrabbed:Pf,ariaHasPopup:null,ariaHidden:Pf,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:If,ariaLevel:Y,ariaLive:null,ariaModal:Pf,ariaMultiLine:Pf,ariaMultiSelectable:Pf,ariaOrientation:null,ariaOwns:If,ariaPlaceholder:null,ariaPosInSet:Y,ariaPressed:Pf,ariaReadOnly:Pf,ariaRelevant:null,ariaRequired:Pf,ariaRoleDescription:If,ariaRowCount:Y,ariaRowIndex:Y,ariaRowSpan:Y,ariaSelected:Pf,ariaSetSize:Y,ariaSort:null,ariaValueMax:Y,ariaValueMin:Y,ariaValueNow:Y,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function Wf(e,t){return t in e?e[t]:t}function Gf(e,t){return Wf(e,t.toLowerCase())}var Kf=Uf({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:Lf,acceptCharset:If,accessKey:If,action:null,allow:null,allowFullScreen:J,allowPaymentRequest:J,allowUserMedia:J,alpha:J,alt:null,as:null,async:J,autoCapitalize:null,autoComplete:If,autoFocus:J,autoPlay:J,blocking:If,capture:null,charSet:null,checked:J,cite:null,className:If,closedBy:null,colorSpace:null,cols:Y,colSpan:Y,command:null,commandFor:null,content:null,contentEditable:Pf,controls:J,controlsList:If,coords:Y|Lf,crossOrigin:null,data:null,dateTime:null,decoding:null,default:J,defer:J,dir:null,dirName:null,disabled:J,download:Ff,draggable:Pf,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:J,formTarget:null,headers:If,height:Y,hidden:Ff,high:Y,href:null,hrefLang:null,htmlFor:If,httpEquiv:If,id:null,imageSizes:null,imageSrcSet:null,inert:J,inputMode:null,integrity:null,is:null,isMap:J,itemId:null,itemProp:If,itemRef:If,itemScope:J,itemType:If,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:J,low:Y,manifest:null,max:null,maxLength:Y,media:null,method:null,min:null,minLength:Y,multiple:J,muted:J,name:null,nonce:null,noModule:J,noValidate:J,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:J,optimum:Y,pattern:null,ping:If,placeholder:null,playsInline:J,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:J,referrerPolicy:null,rel:If,required:J,reversed:J,rows:Y,rowSpan:Y,sandbox:If,scope:null,scoped:J,seamless:J,selected:J,shadowRootClonable:J,shadowRootCustomElementRegistry:J,shadowRootDelegatesFocus:J,shadowRootMode:null,shadowRootSerializable:J,shape:null,size:Y,sizes:null,slot:null,span:Y,spellCheck:Pf,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Y,step:null,style:null,tabIndex:Y,target:null,title:null,translate:null,type:null,typeMustMatch:J,useMap:null,value:Pf,width:Y,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:If,axis:null,background:null,bgColor:null,border:Y,borderColor:null,bottomMargin:Y,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:J,declare:J,event:null,face:null,frame:null,frameBorder:null,hSpace:Y,leftMargin:Y,link:null,longDesc:null,lowSrc:null,marginHeight:Y,marginWidth:Y,noResize:J,noHref:J,noShade:J,noWrap:J,object:null,profile:null,prompt:null,rev:null,rightMargin:Y,rules:null,scheme:null,scrolling:Pf,standby:null,summary:null,text:null,topMargin:Y,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Y,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:J,disablePictureInPicture:J,disableRemotePlayback:J,exportParts:Lf,part:If,prefix:null,property:null,results:Y,security:null,unselectable:null},space:`html`,transform:Gf}),qf=Uf({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:Rf,accentHeight:Y,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Y,amplitude:Y,arabicForm:null,ascent:Y,attributeName:null,attributeType:null,azimuth:Y,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Y,by:null,calcMode:null,capHeight:Y,className:If,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Y,diffuseConstant:Y,direction:null,display:null,dur:null,divisor:Y,dominantBaseline:null,download:J,dx:null,dy:null,edgeMode:null,editable:null,elevation:Y,enableBackground:null,end:null,event:null,exponent:Y,externalResourcesRequired:null,fill:null,fillOpacity:Y,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Lf,g2:Lf,glyphName:Lf,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Y,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Y,horizOriginX:Y,horizOriginY:Y,id:null,ideographic:Y,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Y,k:Y,k1:Y,k2:Y,k3:Y,k4:Y,kernelMatrix:Rf,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Y,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Y,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Y,overlineThickness:Y,paintOrder:null,panose1:null,path:null,pathLength:Y,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:If,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Y,pointsAtY:Y,pointsAtZ:Y,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Rf,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Rf,rev:Rf,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Rf,requiredFeatures:Rf,requiredFonts:Rf,requiredFormats:Rf,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Y,specularExponent:Y,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Y,strikethroughThickness:Y,string:null,stroke:null,strokeDashArray:Rf,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Y,strokeOpacity:Y,strokeWidth:null,style:null,surfaceScale:Y,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Rf,tabIndex:Y,tableValues:null,target:null,targetX:Y,targetY:Y,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Rf,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Y,underlineThickness:Y,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Y,values:null,vAlphabetic:Y,vMathematical:Y,vectorEffect:null,vHanging:Y,vIdeographic:Y,version:null,vertAdvY:Y,vertOriginX:Y,vertOriginY:Y,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Y,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:Wf}),Jf=Uf({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),Yf=Uf({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:Gf}),Xf=Uf({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),Zf={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},Qf=/[A-Z]/g,$f=/-[a-z]/g,ep=/^data[-\w.:]+$/i;function tp(e,t){let n=Af(t),r=t,i=jf;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&ep.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace($f,rp);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!$f.test(e)){let n=e.replace(Qf,np);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Vf}return new i(r,t)}function np(e){return`-`+e.toLowerCase()}function rp(e){return e.charAt(1).toUpperCase()}var ip=kf([X,Kf,Jf,Yf,Xf],`html`),ap=kf([X,qf,Jf,Yf,Xf],`svg`);function op(e){return e.join(` `).trim()}var sp=o(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
59
+ `);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),cp=o((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(sp());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),lp=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),up=o(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(cp()),r=lp();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),dp=pp(`end`),fp=pp(`start`);function pp(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function mp(e){let t=fp(e),n=dp(e);if(t&&n)return{start:t,end:n}}function hp(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?_p(e.position):`start`in e||`end`in e?_p(e):`line`in e||`column`in e?gp(e):``}function gp(e){return vp(e&&e.line)+`:`+vp(e&&e.column)}function _p(e){return gp(e&&e.start)+`-`+gp(e&&e.end)}function vp(e){return e&&typeof e==`number`?e:1}var yp=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=hp(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};yp.prototype.file=``,yp.prototype.name=``,yp.prototype.reason=``,yp.prototype.message=``,yp.prototype.stack=``,yp.prototype.column=void 0,yp.prototype.line=void 0,yp.prototype.ancestors=void 0,yp.prototype.cause=void 0,yp.prototype.fatal=void 0,yp.prototype.place=void 0,yp.prototype.ruleId=void 0,yp.prototype.source=void 0;var bp=l(up(),1),xp={}.hasOwnProperty,Sp=new Map,Cp=/[A-Z]/g,wp=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),Tp=new Set([`td`,`th`]),Ep=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function Dp(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=Rp(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=Lp(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?ap:ip,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Op(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Op(e,t,n){if(t.type===`element`)return kp(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return Ap(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return Mp(e,t,n);if(t.type===`mdxjsEsm`)return jp(e,t);if(t.type===`root`)return Np(e,t,n);if(t.type===`text`)return Pp(e,t)}function kp(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=ap,e.schema=i),e.ancestors.push(t);let a=Wp(e,t.tagName,!1),o=zp(e,t),s=Vp(e,t);return wp.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!Ef(e)})),Fp(e,o,a,t),Ip(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Ap(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Gp(e,t.position)}function jp(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Gp(e,t.position)}function Mp(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=ap,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:Wp(e,t.name,!0),o=Bp(e,t),s=Vp(e,t);return Fp(e,o,a,t),Ip(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Np(e,t,n){let r={};return Ip(r,Vp(e,t)),e.create(t,e.Fragment,r,n)}function Pp(e,t){return t.value}function Fp(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Ip(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function Lp(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function Rp(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=fp(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function zp(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&xp.call(t.properties,i)){let a=Hp(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&Tp.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function Bp(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Gp(e,t.position)}else{let i=r.name,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else Gp(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function Vp(e,t){let n=[],r=-1,i=e.passKeys?new Map:Sp;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=Op(e,a,o);s!==void 0&&n.push(s)}return n}function Hp(e,t,n){let r=tp(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?bf(n):op(n)),r.property===`style`){let t=typeof n==`object`?n:Up(e,String(n));return e.stylePropertyNameCase===`css`&&(t=Kp(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?Zf[r.property]||r.property:r.attribute,n]}}function Up(e,t){try{return(0,bp.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new yp("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=Ep+`#cannot-parse-style-attribute`,r}}function Wp(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=wf(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=wf(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return xp.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Gp(e)}function Gp(e,t){let n=new yp("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=Ep+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function Kp(e){let t={},n;for(n in e)xp.call(e,n)&&(t[qp(n)]=e[n]);return t}function qp(e){let t=e.replace(Cp,Jp);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function Jp(e){return`-`+e.toLowerCase()}var Yp={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},Xp={};function Zp(e,t){let n=t||Xp;return Qp(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function Qp(e,t,n){if(em(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return $p(e.children,t,n)}return Array.isArray(e)?$p(e,t,n):``}function $p(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=Qp(e[i],t,n);return r.join(``)}function em(e){return!!(e&&typeof e==`object`)}var tm=document.createElement(`i`);function nm(e){let t=`&`+e+`;`;tm.innerHTML=t;let n=tm.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function rm(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function im(e,t){return e.length>0?(rm(e,e.length,0,t),e):t}var am={}.hasOwnProperty;function om(e){let t={},n=-1;for(;++n<e.length;)sm(t,e[n]);return t}function sm(e,t){let n;for(n in t){let r=(am.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){am.call(r,a)||(r[a]=[]);let e=i[a];cm(r[a],Array.isArray(e)?e:e?[e]:[])}}}function cm(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);rm(e,0,0,r)}function lm(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function um(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var dm=xm(/[A-Za-z]/),fm=xm(/[\dA-Za-z]/),pm=xm(/[#-'*+\--9=?A-Z^-~]/);function mm(e){return e!==null&&(e<32||e===127)}var hm=xm(/\d/),gm=xm(/[\dA-Fa-f]/),_m=xm(/[!-/:-@[-`{-~]/);function Z(e){return e!==null&&e<-2}function vm(e){return e!==null&&(e<0||e===32)}function Q(e){return e===-2||e===-1||e===32}var ym=xm(/\p{P}|\p{S}/u),bm=xm(/\s/);function xm(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Sm(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&fm(e.charCodeAt(n+1))&&fm(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function $(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return Q(r)?(e.enter(n),s(r)):t(r)}function s(r){return Q(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var Cm={tokenize:wm};function wm(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null)e.consume(n);else return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),$(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null)e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);else return Z(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var Tm={tokenize:Dm},Em={tokenize:Om};function Dm(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return rm(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!(!i.currentConstruct||i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Em,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(Em,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null)i&&v(),_(0),e.consume(n);else return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null)g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);else return Z(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;rm(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Om(e,t,n){return $(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function km(e){if(e===null||vm(e)||bm(e))return 1;if(ym(e))return 2}function Am(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var jm={name:`attention`,resolveAll:Mm,tokenize:Nm};function Mm(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};Pm(d,-c),Pm(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=im(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=im(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=im(l,Am(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=im(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=im(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,rm(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function Nm(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=km(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=km(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function Pm(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Fm={name:`autolink`,tokenize:Im};function Im(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return dm(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||fm(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||fm(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||mm(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):pm(t)?(e.consume(t),l):n(t)}function u(e){return fm(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||fm(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var Lm={partial:!0,tokenize:Rm};function Rm(e,t,n){return r;function r(t){return Q(t)?$(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||Z(e)?t(e):n(e)}}var zm={continuation:{tokenize:Vm},exit:Hm,name:`blockQuote`,tokenize:Bm};function Bm(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return Q(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function Vm(e,t,n){let r=this;return i;function i(t){return Q(t)?$(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(zm,t,n)(r)}}function Hm(e){e.exit(`blockQuote`)}var Um={name:`characterEscape`,tokenize:Wm};function Wm(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return _m(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var Gm={name:`characterReference`,tokenize:Km};function Km(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=fm,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=gm,u):(e.enter(`characterReferenceValue`),a=7,o=hm,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===fm&&!nm(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var qm={partial:!0,tokenize:Xm},Jm={concrete:!0,name:`codeFenced`,tokenize:Ym};function Ym(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),Q(t)?$(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||Z(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(qm,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||Z(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):Q(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),$(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||Z(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||Z(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&Q(t)?$(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||Z(t)?e.check(qm,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||Z(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),Q(t)?$(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),Q(t)?$(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||Z(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function Xm(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var Zm={name:`codeIndented`,tokenize:$m},Qm={partial:!0,tokenize:eh};function $m(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),$(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):Z(t)?e.attempt(Qm,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||Z(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function eh(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):Z(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):$(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):Z(e)?i(e):n(e)}}var th={name:`codeText`,previous:rh,resolve:nh,tokenize:ih};function nh(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function rh(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function ih(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):Z(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||Z(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var ah=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&oh(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),oh(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),oh(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e<this.left.length){let t=this.left.splice(e,1/0);oh(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);oh(this.left,t.reverse())}}}};function oh(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function sh(e){let t={},n=-1,r,i,a,o,s,c,l,u=new ah(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,ch(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(o[1].type!==`linePrefix`&&o[1].type!==`listItemIndent`)break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return rm(e,0,1/0,u.slice(0)),!l}function ch(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var lh={resolve:dh,tokenize:fh},uh={partial:!0,tokenize:ph};function dh(e){return sh(e),e}function fh(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):Z(t)?e.check(uh,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function ph(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),$(e,a,`linePrefix`)}function a(i){if(i===null||Z(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function mh(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||mm(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||Z(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||vm(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||mm(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function hh(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):Z(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||Z(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!Q(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function gh(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):Z(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),$(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||Z(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function _h(e,t){let n;return r;function r(i){return Z(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):Q(i)?$(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var vh={name:`definition`,tokenize:bh},yh={partial:!0,tokenize:xh};function bh(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return hh.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=um(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return vm(t)?_h(e,l)(t):l(t)}function l(t){return mh(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(yh,d,d)(t)}function d(t){return Q(t)?$(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||Z(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function xh(e,t,n){return r;function r(t){return vm(t)?_h(e,i)(t):n(t)}function i(t){return gh(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return Q(t)?$(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||Z(e)?t(e):n(e)}}var Sh={name:`hardBreakEscape`,tokenize:Ch};function Ch(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return Z(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var wh={name:`headingAtx`,resolve:Th,tokenize:Eh};function Th(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},rm(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function Eh(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||vm(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||Z(n)?(e.exit(`atxHeading`),t(n)):Q(n)?$(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||vm(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var Dh=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),Oh=[`pre`,`script`,`style`,`textarea`],kh={concrete:!0,name:`htmlFlow`,resolveTo:Mh,tokenize:Nh},Ah={partial:!0,tokenize:Fh},jh={partial:!0,tokenize:Ph};function Mh(e){let t=e.length;for(;t--&&(e[t][0]!==`enter`||e[t][1].type!==`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Nh(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:j):dm(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):dm(a)?(e.consume(a),i=4,r.interrupt?t:j):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:j):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return dm(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||vm(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&Oh.includes(l)?(i=1,r.interrupt?t(s):O(s)):Dh.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||fm(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return Q(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||dm(t)?(e.consume(t),b):Q(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||fm(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):Q(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):Q(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||Z(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||vm(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||Q(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||Z(t)?O(t):Q(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),A):t===60&&i===1?(e.consume(t),ne):t===62&&i===4?(e.consume(t),ae):t===63&&i===3?(e.consume(t),j):t===93&&i===5?(e.consume(t),ie):Z(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(Ah,oe,ee)(t)):t===null||Z(t)?(e.exit(`htmlFlowData`),ee(t)):(e.consume(t),O)}function ee(t){return e.check(jh,te,oe)(t)}function te(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),k}function k(t){return t===null||Z(t)?ee(t):(e.enter(`htmlFlowData`),O(t))}function A(t){return t===45?(e.consume(t),j):O(t)}function ne(t){return t===47?(e.consume(t),o=``,re):O(t)}function re(t){if(t===62){let n=o.toLowerCase();return Oh.includes(n)?(e.consume(t),ae):O(t)}return dm(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),re):O(t)}function ie(t){return t===93?(e.consume(t),j):O(t)}function j(t){return t===62?(e.consume(t),ae):t===45&&i===2?(e.consume(t),j):O(t)}function ae(t){return t===null||Z(t)?(e.exit(`htmlFlowData`),oe(t)):(e.consume(t),ae)}function oe(n){return e.exit(`htmlFlow`),t(n)}}function Ph(e,t,n){let r=this;return i;function i(t){return Z(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function Fh(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(Lm,t,n)}}var Ih={name:`htmlText`,tokenize:Lh};function Lh(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):dm(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):dm(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):Z(t)?(o=d,ne(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?A(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):Z(t)?(o=h,ne(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?A(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?A(t):Z(t)?(o=v,ne(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):Z(t)?(o=y,ne(t)):(e.consume(t),y)}function b(e){return e===62?A(e):y(e)}function x(t){return dm(t)?(e.consume(t),S):n(t)}function S(t){return t===45||fm(t)?(e.consume(t),S):C(t)}function C(t){return Z(t)?(o=C,ne(t)):Q(t)?(e.consume(t),C):A(t)}function w(t){return t===45||fm(t)?(e.consume(t),w):t===47||t===62||vm(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),A):t===58||t===95||dm(t)?(e.consume(t),E):Z(t)?(o=T,ne(t)):Q(t)?(e.consume(t),T):A(t)}function E(t){return t===45||t===46||t===58||t===95||fm(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):Z(t)?(o=D,ne(t)):Q(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,ee):Z(t)?(o=O,ne(t)):Q(t)?(e.consume(t),O):(e.consume(t),te)}function ee(t){return t===i?(e.consume(t),i=void 0,k):t===null?n(t):Z(t)?(o=ee,ne(t)):(e.consume(t),ee)}function te(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||vm(t)?T(t):(e.consume(t),te)}function k(e){return e===47||e===62||vm(e)?T(e):n(e)}function A(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function ne(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),re}function re(t){return Q(t)?$(e,ie,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):ie(t)}function ie(t){return e.enter(`htmlTextData`),o(t)}}var Rh={name:`labelEnd`,resolveAll:Hh,resolveTo:Uh,tokenize:Wh},zh={tokenize:Gh},Bh={tokenize:Kh},Vh={tokenize:qh};function Hh(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&rm(e,0,e.length,n),e}function Uh(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=im(s,e.slice(a+1,a+r+3)),s=im(s,[[`enter`,u,t]]),s=im(s,Am(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=im(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=im(s,e.slice(o+1)),s=im(s,[[`exit`,c,t]]),rm(e,a,e.length,s),e}function Wh(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(um(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(zh,u,o?u:d)(t):t===91?e.attempt(Bh,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(Vh,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function Gh(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return vm(t)?_h(e,a)(t):a(t)}function a(t){return t===41?u(t):mh(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return vm(t)?_h(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?gh(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return vm(t)?_h(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function Kh(e,t,n){let r=this;return i;function i(t){return hh.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(um(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function qh(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var Jh={name:`labelStartImage`,resolveAll:Rh.resolveAll,tokenize:Yh};function Yh(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var Xh={name:`labelStartLink`,resolveAll:Rh.resolveAll,tokenize:Zh};function Zh(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var Qh={name:`lineEnding`,tokenize:$h};function $h(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),$(e,t,`linePrefix`)}}var eg={name:`thematicBreak`,tokenize:tg};function tg(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||Z(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),Q(t)?$(e,s,`whitespace`)(t):s(t))}}var ng={continuation:{tokenize:og},exit:cg,name:`list`,tokenize:ag},rg={partial:!0,tokenize:lg},ig={partial:!0,tokenize:sg};function ag(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:hm(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(eg,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return hm(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(Lm,r.interrupt?n:u,e.attempt(rg,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return Q(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function og(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(Lm,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,$(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!Q(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(ig,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,$(e,e.attempt(ng,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function sg(e,t,n){let r=this;return $(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function cg(e){e.exit(this.containerState.type)}function lg(e,t,n){let r=this;return $(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!Q(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var ug={name:`setextUnderline`,resolveTo:dg,tokenize:fg};function dg(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function fg(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),Q(t)?$(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||Z(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var pg={tokenize:mg};function mg(e){let t=this,n=e.attempt(Lm,r,e.attempt(this.parser.constructs.flowInitial,i,$(e,e.attempt(this.parser.constructs.flow,i,e.attempt(lh,i)),`linePrefix`)));return n;function r(r){if(r===null)e.consume(r);else return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null)e.consume(r);else return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var hg={resolveAll:yg()},gg=vg(`string`),_g=vg(`text`);function vg(e){return{resolveAll:yg(e===`text`?bg:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null)t.consume(e);else return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function yg(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function bg(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var xg=s({attentionMarkers:()=>kg,contentInitial:()=>Cg,disable:()=>Ag,document:()=>Sg,flow:()=>Tg,flowInitial:()=>wg,insideSpan:()=>Og,string:()=>Eg,text:()=>Dg}),Sg={42:ng,43:ng,45:ng,48:ng,49:ng,50:ng,51:ng,52:ng,53:ng,54:ng,55:ng,56:ng,57:ng,62:zm},Cg={91:vh},wg={[-2]:Zm,[-1]:Zm,32:Zm},Tg={35:wh,42:eg,45:[ug,eg],60:kh,61:ug,95:eg,96:Jm,126:Jm},Eg={38:Gm,92:Um},Dg={[-5]:Qh,[-4]:Qh,[-3]:Qh,33:Jh,38:Gm,42:jm,60:[Fm,Ih],91:Xh,92:[Sh,Um],93:Rh,95:jm,96:th},Og={null:[jm,hg]},kg={null:[42,95]},Ag={null:[]};function jg(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=im(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=Am(a,l.events,l),l.events):[]}function f(e,t){return Ng(p(e),t)}function p(e){return Mg(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){Z(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&rm(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Mg(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function Ng(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
60
+ `;break;case-3:o=`\r
61
+ `;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function Pg(e){let t={constructs:om([xg,...(e||{}).extensions||[]]),content:n(Cm),defined:[],document:n(Tm),flow:n(pg),lazy:{},string:n(gg),text:n(_g)};return t;function n(e){return n;function n(n){return jg(t,e,n)}}}function Fg(e){for(;!sh(e););return e}var Ig=/[\0\t\n\r]/g;function Lg(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(Ig.lastIndex=u,c=Ig.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var Rg=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function zg(e){return e.replace(Rg,Bg)}function Bg(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return lm(n.slice(t?2:1),t?16:10)}return nm(n)||e}var Vg={}.hasOwnProperty;function Hg(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),Ug(n)(Fg(Pg(n).document().write(Lg()(e,t,!0))))}function Ug(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(xe),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(M),blockQuote:a(me),characterEscape:T,characterReference:T,codeFenced:a(he),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(he,o),codeText:a(ge,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(_e),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(ve),hardBreakEscape:a(N),hardBreakTrailing:a(N),htmlFlow:a(ye,o),htmlFlowData:T,htmlText:a(ye,o),htmlTextData:T,image:a(be),label:o,link:a(xe),listItem:a(Ce),listItemValue:f,listOrdered:a(Se,d),listUnordered:a(Se),paragraph:a(we),reference:se,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(M),strong:a(Te),thematicBreak:a(De)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:pe,autolinkProtocol:fe,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:le,characterReferenceMarkerNumeric:le,characterReferenceValue:ue,characterReference:de,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(k),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(ee),htmlFlowData:E,htmlText:c(te),htmlTextData:E,image:c(ne),label:ie,labelText:re,lineEnding:D,link:c(A),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:ce,resourceDestinationString:j,resourceTitleString:ae,resource:oe,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};Gg(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];Vg.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||qg).call(a,void 0,e[0])}for(r.position={start:Wg(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Wg(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(t[1].type!==`linePrefix`&&t[1].type!==`blockQuotePrefix`&&t[1].type!==`blockQuotePrefixWhitespace`&&t[1].type!==`blockQuoteMarker`&&t[1].type!==`listItemIndent`)break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:Wg(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||qg).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+hp({start:e.start,end:e.end})+`): it’s not open`);n.position.end=Wg(e.end)}function u(){return Zp(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=um(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=Ee(),n.position={start:Wg(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Wg(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=Wg(e.end),this.data.atHardBreak=void 0}else!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function ee(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function te(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ne(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function re(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=zg(t),n.identifier=um(t).toLowerCase()}function ie(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function j(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function ae(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function oe(){this.data.inReference=void 0}function se(){this.data.referenceType=`collapsed`}function ce(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=um(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function le(e){this.data.characterReferenceType=e.type}function ue(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=lm(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=nm(t);let i=this.stack[this.stack.length-1];i.value+=r}function de(e){let t=this.stack.pop();t.position.end=Wg(e.end)}function fe(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function pe(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function me(){return{type:`blockquote`,children:[]}}function he(){return{type:`code`,lang:null,meta:null,value:``}}function ge(){return{type:`inlineCode`,value:``}}function _e(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function ve(){return{type:`emphasis`,children:[]}}function M(){return{type:`heading`,depth:0,children:[]}}function N(){return{type:`break`}}function ye(){return{type:`html`,value:``}}function be(){return{type:`image`,title:null,url:``,alt:null}}function xe(){return{type:`link`,title:null,url:``,children:[]}}function Se(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function Ce(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function we(){return{type:`paragraph`,children:[]}}function Te(){return{type:`strong`,children:[]}}function Ee(){return{type:`text`,value:``}}function De(){return{type:`thematicBreak`}}}function Wg(e){return{line:e.line,column:e.column,offset:e.offset}}function Gg(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?Gg(e,r):Kg(e,r)}}function Kg(e,t){let n;for(n in t)if(Vg.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function qg(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+hp({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+hp({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+hp({start:t.start,end:t.end})+`) is still open`)}function Jg(e){let t=this;t.parser=n;function n(n){return Hg(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function Yg(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Xg(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
62
+ `}]}function Zg(e,t){let n=t.value?t.value+`
63
+ `:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function Qg(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function $g(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function e_(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=Sm(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function t_(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function n_(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function r_(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function i_(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return r_(e,t);let i={src:Sm(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function a_(e,t){let n={src:Sm(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function o_(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function s_(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return r_(e,t);let i={href:Sm(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function c_(e,t){let n={href:Sm(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function l_(e,t,n){let r=e.all(t),i=n?u_(n):d_(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
64
+ `}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
65
+ `});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function u_(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=d_(n[r])}return t}function d_(e){return e.spread??e.children.length>1}function f_(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function p_(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function m_(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function h_(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function g_(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=fp(t.children[1]),o=dp(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function __(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function v_(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var y_=9,b_=32;function x_(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(S_(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(S_(t.slice(i),i>0,!1)),a.join(``)}function S_(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===y_||t===b_;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===y_||t===b_;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function C_(e,t){let n={type:`text`,value:x_(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function w_(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var T_={blockquote:Yg,break:Xg,code:Zg,delete:Qg,emphasis:$g,footnoteReference:e_,heading:t_,html:n_,imageReference:i_,image:a_,inlineCode:o_,linkReference:s_,link:c_,listItem:l_,list:f_,paragraph:p_,root:m_,strong:h_,table:g_,tableCell:v_,tableRow:__,text:C_,thematicBreak:w_,toml:E_,yaml:E_,definition:E_,footnoteDefinition:E_};function E_(){}var{defineProperty:D_}=Object,O_=typeof self==`object`?self:globalThis,k_=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new O_[e](t)},A_=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o){let i=r(t),a=r(n);i===`__proto__`?D_(e,i,{value:a,configurable:!0,enumerable:!0,writable:!0}):e[i]=a}return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(typeof O_[e]==`function`?k_(e,t):Error(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}case`-0`:return-0}return n(k_(a,o),i)};return r},j_=e=>A_(new Map,e)(0),M_=``,{toString:N_}={},{keys:P_,is:F_}=Object,I_=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=N_.call(e).slice(8,-1);switch(n){case`Array`:return[1,M_];case`Object`:return[2,M_];case`Date`:return[3,M_];case`RegExp`:return[4,M_];case`Map`:return[5,M_];case`Set`:return[6,M_];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},L_=([e,t])=>e===0&&(t===`function`||t===`symbol`),R_=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=o=>{if(n.has(o))return n.get(o);let[s,c]=I_(o);switch(s){case 0:{let t=o;switch(c){case`bigint`:s=8,t=o.toString();break;case`number`:if(!o&&F_(o,-0))return r.push([`-0`])-1;break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+c);t=null;break;case`undefined`:return i([-1],o)}return i([s,t],o)}case 1:{if(c){let e=o;return c===`DataView`?e=new Uint8Array(o.buffer):c===`ArrayBuffer`&&(e=new Uint8Array(o)),i([c,[...e]],o)}let e=[],t=i([s,e],o);for(let t of o)e.push(a(t));return t}case 2:{if(c)switch(c){case`BigInt`:return i([c,o.toString()],o);case`Boolean`:case`Number`:case`String`:return i([c,o.valueOf()],o)}if(t&&`toJSON`in o)return a(o.toJSON());let n=[],r=i([s,n],o);for(let t of P_(o))(e||!L_(I_(o[t])))&&n.push([a(t),a(o[t])]);return r}case 3:return i([s,isNaN(o.getTime())?M_:o.toISOString()],o);case 4:{let{source:e,flags:t}=o;return i([s,{source:e,flags:t}],o)}case 5:{let t=[],n=i([s,t],o);for(let[n,r]of o)(e||!(L_(I_(n))||L_(I_(r))))&&t.push([a(n),a(r)]);return n}case 6:{let t=[],n=i([s,t],o);for(let n of o)(e||!L_(I_(n)))&&t.push(a(n));return n}}let{message:l}=o;return i([s,{name:c,message:l}],o)};return a},z_=(e,{json:t,lossy:n}={})=>{let r=[];return R_(!(t||n),!!t,new Map,r)(e),r},B_=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?j_(z_(e,t)):structuredClone(e):(e,t)=>j_(z_(e,t));function V_(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function H_(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function U_(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||V_,r=e.options.footnoteBackLabel||H_,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=Sm(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...B_(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
66
+ `},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
67
+ `}]}}var W_=(function(e){if(e==null)return Y_;if(typeof e==`function`)return J_(e);if(typeof e==`object`)return Array.isArray(e)?G_(e):K_(e);if(typeof e==`string`)return q_(e);throw Error(`Expected function, string, or object as test`)});function G_(e){let t=[],n=-1;for(;++n<e.length;)t[n]=W_(e[n]);return J_(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function K_(e){let t=e;return J_(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function q_(e){return J_(t);function t(t){return t&&t.type===e}}function J_(e){return t;function t(t,n,r){return!!(X_(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function Y_(){return!0}function X_(e){return typeof e==`object`&&!!e&&`type`in e}function Z_(e){return e}var Q_=[];function $_(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=W_(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,"name",{value:`node (`+Z_(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=Q_,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=ev(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function ev(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?Q_:[e]}function tv(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),$_(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var nv={}.hasOwnProperty,rv={};function iv(e,t){let n=t||rv,r=new Map,i=new Map,a={all:s,applyData:ov,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...T_,...n.handlers},one:o,options:n,patch:av,wrap:cv};return tv(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(nv.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=B_(n);return r.children=a.all(e),r}return B_(e)}return(a.options.unknownHandler||sv)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=lv(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=lv(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function av(e,t){e.position&&(t.position=mp(e))}function ov(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,B_(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function sv(e,t){let n=t.data||{},r=`value`in t&&!(nv.call(n,`hProperties`)||nv.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function cv(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
68
+ `});++r<e.length;)r&&n.push({type:`text`,value:`
69
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
70
+ `}),n}function lv(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function uv(e,t){let n=iv(e,t),r=n.one(e,void 0),i=U_(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
71
+ `},i)),a}function dv(e,t){return e&&`run`in e?async function(n,r){let i=uv(n,{file:r,...t});await e.run(i,r)}:function(n,r){return uv(n,{file:r,...e||t})}}function fv(e){if(e)throw e}var pv=o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function mv(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function hv(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a)r(a);else{for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?gv(s,i)(...o):r(null,...o)}}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function gv(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var _v={basename:vv,dirname:yv,extname:bv,join:xv,sep:`/`};function vv(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);wv(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function yv(e){if(wv(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function bv(e){wv(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}}else n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function xv(...e){let t=-1,n;for(;++t<e.length;)wv(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:Sv(n)}function Sv(e){wv(e);let t=e.codePointAt(0)===47,n=Cv(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function Cv(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(i!==o-1&&a!==1){if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function wv(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var Tv={cwd:Ev};function Ev(){return`/`}function Dv(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function Ov(e){if(typeof e==`string`)e=new URL(e);else if(!Dv(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return kv(e)}function kv(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var Av=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],jv=class{constructor(e){let t;t=e?Dv(e)?{path:e}:typeof e==`string`||Fv(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:Tv.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<Av.length;){let e=Av[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)Av.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?_v.basename(this.path):void 0}set basename(e){Nv(e,`basename`),Mv(e,`basename`),this.path=_v.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?_v.dirname(this.path):void 0}set dirname(e){Pv(this.basename,`dirname`),this.path=_v.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?_v.extname(this.path):void 0}set extname(e){if(Mv(e,`extname`),Pv(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=_v.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){Dv(e)&&(e=Ov(e)),Nv(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?_v.basename(this.path,this.extname):void 0}set stem(e){Nv(e,`stem`),Mv(e,`stem`),this.path=_v.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new yp(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function Mv(e,t){if(e&&e.includes(_v.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+_v.sep+"`")}function Nv(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function Pv(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function Fv(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Iv=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),Lv=l(pv(),1),Rv={}.hasOwnProperty,zv=new class e extends Iv{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=hv()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,Lv.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(Hv(`data`,this.frozen),this.namespace[e]=t,this):Rv.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Hv(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=Gv(e),n=this.parser||this.Parser;return Bv(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),Bv(`process`,this.parser||this.Parser),Vv(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=Gv(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);qv(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),Bv(`processSync`,this.parser||this.Parser),Vv(`processSync`,this.compiler||this.Compiler),this.process(e,r),Wv(`processSync`,`process`,t),n;function r(e,r){t=!0,fv(e),n=r}}run(e,t,n){Uv(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=Gv(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),Wv(`runSync`,`run`,n),r;function i(e,t){fv(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=Gv(t),r=this.compiler||this.Compiler;return Vv(`stringify`,r),Uv(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(Hv(`use`,this.frozen),e!=null){if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`")}return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`){if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e)}else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,Lv.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null){if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];mv(o)&&mv(r)&&(r=(0,Lv.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function Bv(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function Vv(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function Hv(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Uv(e){if(!mv(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function Wv(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function Gv(e){return Kv(e)?e:new jv(e)}function Kv(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function qv(e){return typeof e==`string`||Jv(e)}function Jv(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Yv=[],Xv={allowDangerousHtml:!0},Zv=/^(https?|ircs?|mailto|xmpp)$/i,Qv=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function $v(e){let t=ey(e),n=ty(e);return ny(t.runSync(t.parse(n),n),e)}function ey(e){let t=e.rehypePlugins||Yv,n=e.remarkPlugins||Yv,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Xv}:Xv;return zv().use(Jg).use(n).use(dv,r).use(t)}function ty(e){let t=e.children||``,n=new jv;return typeof t==`string`?n.value=t:``+t,n}function ny(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||ry;for(let e of Qv)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return tv(e,l),Dp(e,{Fragment:z.Fragment,components:i,ignoreInvalidStyle:!0,jsx:z.jsx,jsxs:z.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in Yp)if(Object.hasOwn(Yp,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=Yp[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function ry(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||Zv.test(e.slice(0,t))?e:``}function iy(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function ay(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function oy(e,t,n){let r=W_((n||{}).ignore||[]),i=sy(t),a=-1;for(;++a<i.length;)$_(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function sy(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([cy(e[0]),ly(e[1])])}return t}function cy(e){return typeof e==`string`?new RegExp(ay(e),`g`):e}function ly(e){return typeof e==`function`?e:function(){return e}}var uy=`phrasing`,dy=[`autolink`,`link`,`image`,`label`];function fy(){return{transforms:[by],enter:{literalAutolink:my,literalAutolinkEmail:hy,literalAutolinkHttp:hy,literalAutolinkWww:hy},exit:{literalAutolink:yy,literalAutolinkEmail:vy,literalAutolinkHttp:gy,literalAutolinkWww:_y}}}function py(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:uy,notInConstruct:dy},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:uy,notInConstruct:dy},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:uy,notInConstruct:dy}]}}function my(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function hy(e){this.config.enter.autolinkProtocol.call(this,e)}function gy(e){this.config.exit.autolinkProtocol.call(this,e)}function _y(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function vy(e){this.config.exit.autolinkEmail.call(this,e)}function yy(e){this.exit(e)}function by(e){oy(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,xy],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,Sy]],{ignore:[`link`,`linkReference`]})}function xy(e,t,n,r,i){let a=``;if(!Ty(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!Cy(n)))return!1;let o=wy(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function Sy(e,t,n,r){return!Ty(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function Cy(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function wy(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=iy(e,`(`),a=iy(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function Ty(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||bm(n)||ym(n))&&(!t||n!==47)}Fy.peek=Py;function Ey(){this.buffer()}function Dy(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function Oy(){this.buffer()}function ky(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function Ay(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=um(this.sliceSerialize(e)).toLowerCase(),n.label=t}function jy(e){this.exit(e)}function My(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=um(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Ny(e){this.exit(e)}function Py(){return`[`}function Fy(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function Iy(){return{enter:{gfmFootnoteCallString:Ey,gfmFootnoteCall:Dy,gfmFootnoteDefinitionLabelString:Oy,gfmFootnoteDefinition:ky},exit:{gfmFootnoteCallString:Ay,gfmFootnoteCall:jy,gfmFootnoteDefinitionLabelString:My,gfmFootnoteDefinition:Ny}}}function Ly(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Fy},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
72
+ `:` `)+r.indentLines(r.containerFlow(e,a.current()),t?zy:Ry))),s(),o}}function Ry(e,t,n){return t===0?e:zy(e,t,n)}function zy(e,t,n){return(n?``:` `)+e}var By=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];Gy.peek=Ky;function Vy(){return{canContainEols:[`delete`],enter:{strikethrough:Uy},exit:{strikethrough:Wy}}}function Hy(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:By}],handlers:{delete:Gy}}}function Uy(e){this.enter({type:`delete`,children:[]},e)}function Wy(e){this.exit(e)}function Gy(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function Ky(){return`~`}function qy(e){return e.length}function Jy(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||qy,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=Yy(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=Xy(r[d]);else{let e=Xy(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding!==!1&&(n.alignDelimiters!==!1||i!==``)&&(n.delimiterStart!==!1||d)&&r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
73
+ `)}function Yy(e){return e==null?``:String(e)}function Xy(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function Zy(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),Qy);return i(),o}function Qy(e,t,n){return`>`+(n?``:` `)+e}function $y(e,t){return eb(e,t.inConstruct,!0)&&!eb(e,t.notInConstruct,!1)}function eb(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function tb(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
74
+ `&&$y(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
75
+ `}function nb(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function rb(e,t){return!(t.options.fences!==!1||!e.value||e.lang||!/[^ \r\n]/.test(e.value)||/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function ib(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function ab(e,t,n,r){let i=ib(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(rb(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,ob);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(nb(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:`
76
+ `,encode:["`"],...s.current()})),t()}return u+=s.move(`
77
+ `),a&&(u+=s.move(a+`
78
+ `)),u+=s.move(c),l(),u}function ob(e,t,n){return(n?``:` `)+e}function sb(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function cb(e,t,n,r){let i=sb(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
79
+ `,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function lb(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function ub(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function db(e,t,n){let r=km(e),i=km(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}fb.peek=pb;function fb(e,t,n,r){let i=lb(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=db(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=ub(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=db(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+ub(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function pb(e,t,n){return n.options.emphasis||`*`}function mb(e,t){let n=!1;return tv(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&Zp(e)&&(t.options.setext||n))}function hb(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(mb(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
80
+ `,after:`
81
+ `});return r(),t(),o+`
82
+ `+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
83
+ `))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
84
+ `,...a.current()});return/^[\t ]/.test(l)&&(l=ub(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}gb.peek=_b;function gb(e){return e.value||``}function _b(){return`<`}vb.peek=yb;function vb(e,t,n,r){let i=sb(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function yb(){return`!`}bb.peek=xb;function bb(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function xb(){return`!`}Sb.peek=Cb;function Sb(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function Cb(){return"`"}function wb(e,t){let n=Zp(e);return!(t.options.resourceLink||!e.url||e.title||!e.children||e.children.length!==1||e.children[0].type!==`text`||n!==e.url&&`mailto:`+n!==e.url||!/^[a-z][a-z+.-]+:/i.test(e.url)||/[\0- <>\u007F]/.test(e.url))}Tb.peek=Eb;function Tb(e,t,n,r){let i=sb(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(wb(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function Eb(e,t,n){return wb(e,n)?`<`:`[`}Db.peek=Ob;function Db(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Ob(){return`[`}function kb(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Ab(e){let t=kb(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function jb(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Mb(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Nb(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?jb(n):kb(n),s=e.ordered?o===`.`?`)`:`.`:Ab(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),Mb(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function Pb(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Fb(e,t,n,r){let i=Pb(n),a=n.bulletCurrent||kb(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function Ib(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var Lb=W_([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function Rb(e,t,n,r){return(e.children.some(function(e){return Lb(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function zb(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Bb.peek=Vb;function Bb(e,t,n,r){let i=zb(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=db(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=ub(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=db(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+ub(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function Vb(e,t,n){return n.options.strong||`*`}function Hb(e,t,n,r){return n.safe(e.value,r)}function Ub(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Wb(e,t,n){let r=(Mb(n)+(n.options.ruleSpaces?` `:``)).repeat(Ub(n));return n.options.ruleSpaces?r.slice(0,-1):r}var Gb={blockquote:Zy,break:tb,code:ab,definition:cb,emphasis:fb,hardBreak:tb,heading:hb,html:gb,image:vb,imageReference:bb,inlineCode:Sb,link:Tb,linkReference:Db,list:Nb,listItem:Fb,paragraph:Ib,root:Rb,strong:Bb,text:Hb,thematicBreak:Wb};function Kb(){return{enter:{table:qb,tableData:Zb,tableHeader:Zb,tableRow:Yb},exit:{codeText:Qb,table:Jb,tableData:Xb,tableHeader:Xb,tableRow:Xb}}}function qb(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function Jb(e){this.exit(e),this.data.inTable=void 0}function Yb(e){this.enter({type:`tableRow`,children:[]},e)}function Xb(e){this.exit(e)}function Zb(e){this.enter({type:`tableCell`,children:[]},e)}function Qb(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,$b));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function $b(e,t){return t===`|`?t:e}function ex(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
85
+ `,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
86
+ `))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return Jy(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=Gb.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function tx(){return{exit:{taskListCheckValueChecked:rx,taskListCheckValueUnchecked:rx,paragraph:ix}}}function nx(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:ax}}}function rx(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function ix(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function ax(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=Gb.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function ox(){return[fy(),Iy(),Vy(),Kb(),tx()]}function sx(e){return{extensions:[py(),Ly(e),Hy(),ex(e),nx()]}}var cx={tokenize:Sx,partial:!0},lx={tokenize:Cx,partial:!0},ux={tokenize:wx,partial:!0},dx={tokenize:Tx,partial:!0},fx={tokenize:Ex,partial:!0},px={name:`wwwAutolink`,tokenize:bx,previous:Dx},mx={name:`protocolAutolink`,tokenize:xx,previous:Ox},hx={name:`emailAutolink`,tokenize:yx,previous:kx},gx={};function _x(){return{text:gx}}for(var vx=48;vx<123;)gx[vx]=hx,vx++,vx===58?vx=65:vx===91&&(vx=97);gx[43]=hx,gx[45]=hx,gx[46]=hx,gx[95]=hx,gx[72]=[hx,mx],gx[104]=[hx,mx],gx[87]=[hx,px],gx[119]=[hx,px];function yx(e,t,n){let r=this,i,a;return o;function o(t){return!Ax(t)||!kx.call(r,r.previous)||jx(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return Ax(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(fx,u,l)(t):t===45||t===95||fm(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&dm(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function bx(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!Dx.call(r,r.previous)||jx(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(cx,e.attempt(lx,e.attempt(ux,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function xx(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&Ox.call(r,r.previous)&&!jx(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(dm(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||mm(t)||vm(t)||bm(t)||ym(t)?n(t):e.attempt(lx,e.attempt(ux,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function Sx(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function Cx(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(dx,c,s)(t):t===null||vm(t)||bm(t)||t!==45&&ym(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function wx(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(dx,t,a)(o):o===null||vm(o)||bm(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function Tx(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||vm(o)||bm(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||vm(e)||bm(e)?t(e):r(e)}function a(e){return dm(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):dm(t)?(e.consume(t),o):n(t)}}function Ex(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return fm(e)?n(e):t(e)}}function Dx(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||vm(e)}function Ox(e){return!dm(e)}function kx(e){return!(e===47||Ax(e))}function Ax(e){return e===43||e===45||e===46||e===95||fm(e)}function jx(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var Mx={tokenize:Bx,partial:!0};function Nx(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:Lx,continuation:{tokenize:Rx},exit:zx}},text:{91:{name:`gfmFootnoteCall`,tokenize:Ix},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:Px,resolveTo:Fx}}}}function Px(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=um(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function Fx(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function Ix(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||vm(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(um(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return vm(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function Lx(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||vm(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=um(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return vm(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),$(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function Rx(e,t,n){return e.check(Lm,t,e.attempt(Mx,t,n))}function zx(e){e.exit(`gfmFootnoteDefinition`)}function Bx(e,t,n){let r=this;return $(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function Vx(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&rm(o,o.length,0,Am(s,e.slice(r+1,n),t)),rm(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),rm(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=km(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=km(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var Hx=class{constructor(){this.map=[]}add(e,t,n){Ux(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function Ux(e,t,n,r){let i=0;if(n!==0||r.length!==0){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function Wx(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function Gx(){return{flow:{null:{name:`table`,tokenize:Kx,resolveAll:qx}}}}function Kx(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124||(o=!0,a+=1),u(e)}function u(t){return t===null?n(t):Z(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):Q(t)?$(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||vm(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,Q(t)?$(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return Q(t)?$(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||Z(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return Q(t)?$(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||Z(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||Z(n)?(e.exit(`tableRow`),t(n)):Q(n)?$(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||vm(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function qx(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new Hx;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(Yx(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=Jx(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=Jx(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=Jx(f,t,o,i,n,d)):(o[0]=o[1],d=Jx(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&Yx(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=Wx(t.events,n))}return e}function Jx(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},Xx(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=Xx(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=Xx(t.events,n[2]),a=Xx(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},Xx(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function Yx(e,t,n,r,i){let a=[],o=Xx(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function Xx(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var Zx={name:`tasklistCheck`,tokenize:$x};function Qx(){return{text:{91:Zx}}}function $x(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return vm(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return Z(r)?t(r):Q(r)?e.check({tokenize:eS},t,n)(r):n(r)}}function eS(e,t,n){return $(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function tS(e){return om([_x(),Nx(),Vx(e),Gx(),Qx()])}var nS={};function rS(e){let t=this,n=e||nS,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(tS(n)),a.push(ox()),o.push(sx(n))}var iS=`modulepreload`,aS=function(e){return`/`+e},oS={},sS=function(e){return e.pathname.endsWith(`.css`)},cS=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},lS=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=aS(t,n);let r=s(t),i=sS(r);return cS(oS,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:iS,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),document.head.appendChild(t),i)return new Promise((e,n)=>{t.addEventListener(`load`,e),t.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${r}`)))})})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},uS=null,dS=new Map;function fS(){return uS||=(async()=>{let{createHighlighter:e,createJavaScriptRegexEngine:t}=await lS(async()=>{let{createHighlighter:e,createJavaScriptRegexEngine:t}=await import(`./dist-tY8VZg98.js`);return{createHighlighter:e,createJavaScriptRegexEngine:t}},[]);return e({themes:[`github-dark`],langs:[`plaintext`],engine:t()})})(),uS}async function pS(e){let t=dS.get(e);if(t)return t;let n=(async()=>{let{isSpecialLang:t,bundledLanguages:n}=await lS(async()=>{let{isSpecialLang:e,bundledLanguages:t}=await import(`./dist-tY8VZg98.js`);return{isSpecialLang:e,bundledLanguages:t}},[]);if(t(e))return;let r=n[e];if(!r)throw Error(`shiki: unknown lang "${e}"`);let i=await fS();i.getLoadedLanguages().includes(e)||await i.loadLanguage(r)})().catch(t=>{throw dS.delete(e),t});return dS.set(e,n),n}async function mS(e,t){let n=await fS(),r=`plaintext`;if(t){let{isSpecialLang:e}=await lS(async()=>{let{isSpecialLang:e}=await import(`./dist-tY8VZg98.js`);return{isSpecialLang:e}},[]),i=n.getLoadedLanguages();e(t)||i.includes(t)?r=t:(await pS(t).catch(()=>{}),n.getLoadedLanguages().includes(t)&&(r=t))}let i=n.codeToTokens(e,{lang:r,theme:`github-dark`});return{lines:i.tokens,bg:i.bg??`#24292e`,fg:i.fg??`#e1e4e8`}}function hS(e){return pS(e).catch(()=>{})}var gS=25;function _S({lines:e,fg:t}){return(0,z.jsx)(z.Fragment,{children:e.map((e,n)=>(0,z.jsx)(`span`,{style:{display:`block`,minHeight:`1.25rem`},children:e.length===0?`
87
+ `:e.map((e,n)=>(0,z.jsx)(`span`,{style:{color:e.color??t,fontStyle:e.fontStyle!==void 0&&e.fontStyle&1?`italic`:void 0,fontWeight:e.fontStyle!==void 0&&e.fontStyle&2?`bold`:void 0,textDecoration:e.fontStyle!==void 0&&e.fontStyle&4?`underline`:void 0},children:e.content},n))},n))})}var vS=(0,O.memo)(function({code:e,language:t}){let[n,r]=(0,O.useState)(!1),i=e.split(`
88
+ `),a=Math.max(0,i.length-gS),o=n?e:i.slice(0,gS).join(`
89
+ `),[s,c]=(0,O.useState)(null),[l,u]=(0,O.useState)(!1),d=(0,O.useRef)(null);(0,O.useEffect)(()=>()=>{d.current!==null&&clearTimeout(d.current)},[]),(0,O.useEffect)(()=>{let e=!1;async function n(){t&&hS(t);let n=await mS(o,t);e||c(n)}return c(null),n().catch(()=>{}),()=>{e=!0}},[o,t]);let f=(0,O.useCallback)(()=>{navigator.clipboard.writeText(e).then(()=>{u(!0),d.current!==null&&clearTimeout(d.current),d.current=setTimeout(()=>u(!1),2e3)}).catch(()=>{})},[e]),p=s?.bg??`#0d1117`;return(0,z.jsxs)(`div`,{className:`relative group rounded-md overflow-hidden mb-2`,style:{backgroundColor:p},children:[(0,z.jsxs)(`div`,{className:`flex items-center justify-between px-3 pt-1.5 pb-0.5`,children:[(0,z.jsx)(`span`,{className:`text-[10px] select-none font-mono`,style:{color:`#9ba3ae`},children:t??`plaintext`}),(0,z.jsx)(`button`,{onClick:f,"aria-label":`Copy code`,className:`opacity-100 focus-visible:outline-2 focus-visible:outline-ring transition-opacity rounded p-1 text-muted-foreground hover:text-foreground hover:bg-white/10`,children:l?(0,z.jsx)(me,{size:13,strokeWidth:2.5}):(0,z.jsx)(Ae,{size:13,strokeWidth:2})})]}),(0,z.jsxs)(`div`,{className:`relative`,children:[s===null?(0,z.jsx)(`pre`,{className:`overflow-x-auto p-3 font-mono text-xs leading-5 text-foreground`,tabIndex:0,"aria-label":t?`${t} code block`:`code block`,children:(0,z.jsx)(`code`,{children:o})}):(0,z.jsx)(`div`,{className:`overflow-x-auto whitespace-pre p-3 font-mono text-xs leading-5`,tabIndex:0,"aria-label":t?`${t} code block`:`code block`,style:{backgroundColor:p},children:(0,z.jsx)(_S,{lines:s.lines,fg:s.fg})}),a>0&&!n&&(0,z.jsx)(`div`,{"aria-hidden":`true`,className:`pointer-events-none absolute inset-x-0 bottom-0 h-10`,style:{background:`linear-gradient(to top, ${p}, transparent)`}})]}),a>0&&(0,z.jsx)(`button`,{type:`button`,"aria-expanded":n,onClick:()=>r(e=>!e),className:`w-full py-2 text-xs text-foreground hover:bg-white/5 rounded focus-visible:outline-2 focus-visible:outline-ring`,children:n?`Show less`:`Show ${a} more lines`})]})});function yS(e){let t=``;return O.Children.forEach(e,e=>{typeof e==`string`||typeof e==`number`?t+=String(e):(0,O.isValidElement)(e)&&(t+=yS(e.props.children))}),t}function bS(e){return yS(e).trim().length<=40?`whitespace-nowrap`:`min-w-[14rem] max-w-[28rem]`}function xS({children:e}){let t=(0,O.useRef)(null),[n,r]=(0,O.useState)({left:!1,right:!1}),i=(0,O.useCallback)(()=>{let e=t.current;if(!e)return;let n=e.scrollLeft>1,i=e.scrollLeft+e.clientWidth<e.scrollWidth-1;r(e=>e.left===n&&e.right===i?e:{left:n,right:i})},[]);return(0,O.useEffect)(()=>{i();let e=t.current;if(!e||typeof ResizeObserver>`u`)return;let n=new ResizeObserver(i);return n.observe(e),e.firstElementChild&&n.observe(e.firstElementChild),()=>n.disconnect()},[i]),(0,z.jsxs)(`div`,{className:`relative mb-2`,"data-table-scroll":n.right||n.left?`scrollable`:`fits`,children:[(0,z.jsx)(`div`,{ref:t,onScroll:i,className:`overflow-x-auto rounded border border-border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,tabIndex:0,"aria-label":`data table`,role:`region`,children:(0,z.jsx)(`table`,{className:`w-full text-xs sm:text-sm`,children:e})}),(0,z.jsx)(`div`,{"aria-hidden":!0,"data-edge-fade":`left`,className:R(`pointer-events-none absolute inset-y-px left-px w-6 rounded-l bg-gradient-to-r from-background to-transparent transition-opacity`,n.left?`opacity-100`:`opacity-0`)}),(0,z.jsx)(`div`,{"aria-hidden":!0,"data-edge-fade":`right`,className:R(`pointer-events-none absolute inset-y-px right-px w-8 rounded-r bg-gradient-to-l from-background to-transparent transition-opacity`,n.right?`opacity-100`:`opacity-0`)})]})}var SS={h1:({children:e})=>(0,z.jsx)(`h1`,{className:`mb-3 text-xl font-bold`,children:e}),h2:({children:e})=>(0,z.jsx)(`h2`,{className:`mb-2 text-lg font-semibold`,children:e}),h3:({children:e})=>(0,z.jsx)(`h3`,{className:`mb-1.5 text-base font-semibold`,children:e}),p:({children:e})=>(0,z.jsx)(`p`,{className:`mb-2 last:mb-0 leading-relaxed text-[15px]`,children:e}),ul:({children:e})=>(0,z.jsx)(`ul`,{className:`mb-2 pl-6 list-disc list-outside space-y-0.5`,children:e}),ol:({children:e,start:t})=>{let n=Array.isArray(e)?e.length:1,r=(typeof t==`number`?t:1)+n-1>=100?`pl-9`:`pl-6`;return(0,z.jsx)(`ol`,{className:`mb-2 ${r} list-decimal list-outside space-y-0.5`,children:e})},li:({children:e})=>(0,z.jsx)(`li`,{className:`text-[15px] leading-relaxed`,children:e}),blockquote:({children:e})=>(0,z.jsx)(`blockquote`,{className:`mb-2 border-l-2 border-brand/50 pl-3 italic text-muted-foreground`,children:e}),a:({href:e,children:t})=>e&&/^(https?:\/\/|\/(?!\/)|#)/i.test(e)?(0,z.jsx)(`a`,{href:e,className:`text-brand underline underline-offset-2 hover:text-brand/80`,target:`_blank`,rel:`noopener noreferrer`,children:t}):(0,z.jsx)(`span`,{className:`text-muted-foreground`,children:t}),strong:({children:e})=>(0,z.jsx)(`strong`,{className:`font-semibold text-foreground`,children:e}),em:({children:e})=>(0,z.jsx)(`em`,{className:`italic text-muted-foreground`,children:e}),hr:()=>(0,z.jsx)(`hr`,{className:`my-3 border-border`}),table:({children:e})=>(0,z.jsx)(xS,{children:e}),thead:({children:e})=>(0,z.jsx)(`thead`,{className:`bg-secondary text-secondary-foreground`,children:e}),th:({children:e})=>(0,z.jsx)(`th`,{className:R(`px-3 py-1.5 text-left font-medium min-w-[80px]`,bS(e)),children:e}),td:({children:e})=>(0,z.jsx)(`td`,{className:R(`border-t border-border px-3 py-1.5 min-w-[80px]`,bS(e)),children:e}),code:({children:e,className:t})=>/language-(\w+)/.exec(t??``)?.[1]?(0,z.jsx)(`code`,{className:R(`text-xs`,t),children:e}):(0,z.jsx)(`code`,{className:`rounded bg-secondary px-1 py-0.5 font-mono text-[11px] text-foreground`,children:e}),pre:({children:e})=>{let t=e,n=/language-(\w+)/.exec(t?.props?.className??``)?.[1],r=String(t?.props?.children??``).replace(/\n$/,``);return(0,z.jsx)(vS,{code:r,language:n})}},CS=(0,O.memo)(function({text:e,className:t}){return(0,z.jsx)(`div`,{className:R(`text-[15px] text-foreground max-w-[70ch]`,t),children:(0,z.jsx)($v,{remarkPlugins:[rS],components:SS,children:e})})});function wS(){return(0,z.jsx)(`span`,{className:`streaming-cursor`,"aria-hidden":`true`})}var TS=/^[ \t]*(`{3,}|~{4,})/;function ES(e){let t=e.lastIndexOf(`
90
+ `)+1;return t>=e.length?e.length:TS.test(e.slice(t))?t:e.length}function DS({text:e,isStreaming:t}){let n=t?e.slice(0,ES(e)):e;return(0,z.jsxs)(`span`,{className:`streaming-text-root`,children:[(0,z.jsx)(CS,{text:n}),t&&(0,z.jsx)(wS,{})]})}function OS({kind:e,text:t,ts:n,className:r,onRetry:i,onEdit:a,isBusy:o}){let[s,c]=(0,O.useState)(!1),[l,u]=(0,O.useState)(!1),[d,f]=(0,O.useState)(t),p=(0,O.useRef)(null),m=(0,O.useRef)(null);(0,O.useEffect)(()=>{f(t)},[t]),(0,O.useEffect)(()=>()=>{p.current!==null&&clearTimeout(p.current)},[]),(0,O.useEffect)(()=>{if(l){let e=m.current;e&&(e.focus(),e.setSelectionRange(e.value.length,e.value.length))}},[l]);function h(){navigator.clipboard.writeText(t).then(()=>{c(!0),p.current!==null&&clearTimeout(p.current),p.current=setTimeout(()=>c(!1),2e3)}).catch(()=>{})}function g(){let e=d.trim();u(!1),e&&e!==t&&a?.(e)}function _(e){e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),g()),e.key===`Escape`&&(u(!1),f(t))}let v=n===void 0?void 0:new Date(n).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`});return l?(0,z.jsxs)(`div`,{className:`mt-1 flex w-full max-w-2xl flex-col gap-1`,children:[(0,z.jsx)(`textarea`,{ref:m,value:d,onChange:e=>f(e.target.value),onKeyDown:_,rows:Math.min(8,d.split(`
91
+ `).length+1),className:R(`w-full resize-none rounded-lg border border-ring bg-background`,`px-3 py-2 text-sm leading-5 shadow-sm`,`focus:outline-none focus:ring-2 focus:ring-ring`)}),(0,z.jsxs)(`div`,{className:`flex gap-1.5 justify-end`,children:[(0,z.jsx)(`button`,{type:`button`,onClick:()=>{u(!1),f(t)},className:`rounded px-2 py-0.5 text-xs text-muted-foreground hover:text-foreground border border-border hover:bg-secondary transition-colors`,children:`Cancel`}),(0,z.jsx)(`button`,{type:`button`,onClick:g,disabled:!d.trim()||o,className:R(`rounded px-2 py-0.5 text-xs font-medium`,`bg-primary text-primary-foreground hover:bg-primary/90 transition-colors`,`disabled:opacity-40 disabled:cursor-not-allowed`),children:`Send`})]})]}):(0,z.jsx)(`div`,{className:R(`absolute top-1 right-1`,`opacity-0 group-hover:opacity-100 transition-opacity duration-150`,r),children:(0,z.jsxs)(`div`,{className:`flex items-center gap-0.5 rounded-md border border-border bg-card px-1 py-0.5 shadow-sm`,children:[v&&(0,z.jsxs)(`span`,{className:`flex items-center gap-0.5 px-1 text-[10px] text-muted-foreground/70`,title:n===void 0?void 0:new Date(n).toLocaleString(),children:[(0,z.jsx)(Oe,{className:`h-2.5 w-2.5`}),v]}),(0,z.jsx)(kS,{onClick:h,title:s?`Copied!`:`Copy`,children:s?(0,z.jsx)(me,{className:`h-3.5 w-3.5 text-status-running`}):(0,z.jsx)(Ae,{className:`h-3.5 w-3.5`})}),e===`assistant`&&i&&(0,z.jsx)(kS,{onClick:i,title:o?`Stop the turn before retrying`:`Retry`,disabled:o,children:(0,z.jsx)(wt,{className:`h-3.5 w-3.5`})}),e===`user`&&a&&(0,z.jsx)(kS,{onClick:()=>u(!0),title:o?`Stop the turn before editing`:`Edit and resend`,disabled:o,children:(0,z.jsx)(mt,{className:`h-3.5 w-3.5`})})]})})}function kS({onClick:e,title:t,disabled:n,children:r}){return(0,z.jsx)(`button`,{type:`button`,onClick:e,title:t,disabled:n,className:R(`h-6 w-6 rounded flex items-center justify-center`,`hover:bg-secondary text-muted-foreground hover:text-foreground transition-colors`,n&&`opacity-40 cursor-not-allowed`),children:r})}function AS({text:e,ts:t,onEdit:n,isBusy:r}){return(0,z.jsxs)(`div`,{className:`group relative flex flex-col items-start gap-1`,children:[(0,z.jsx)(`span`,{className:`text-[11px] font-medium uppercase tracking-widest text-muted-foreground`,children:`You`}),(0,z.jsx)(`div`,{className:`max-w-xl rounded-xl bg-secondary/70 px-4 py-2.5 border border-border/50`,children:(0,z.jsx)(`p`,{className:`text-[15px] leading-relaxed text-foreground whitespace-pre-wrap`,children:e})}),(0,z.jsx)(OS,{kind:`user`,text:e,ts:t,onEdit:n,isBusy:r})]})}function jS({text:e,ts:t,isStreaming:n=!1,onRetry:r,isBusy:i}){return(0,z.jsxs)(`div`,{className:`group relative flex flex-col gap-1`,children:[(0,z.jsx)(`span`,{className:`text-[11px] font-medium uppercase tracking-widest text-brand/80`,children:`Agent`}),(0,z.jsx)(`div`,{className:`max-w-3xl`,children:n?(0,z.jsx)(DS,{text:e,isStreaming:!0}):(0,z.jsx)(CS,{text:e})}),(0,z.jsx)(OS,{kind:`assistant`,text:e,ts:t,onRetry:r,isBusy:i})]})}function MS({message:e}){return(0,z.jsxs)(`div`,{className:`flex items-start gap-2.5 rounded-xl border border-destructive/20 bg-destructive/5 px-4 py-3`,children:[(0,z.jsx)(N,{className:`mt-0.5 h-4 w-4 shrink-0 text-status-failed`}),(0,z.jsx)(`p`,{className:`text-sm leading-relaxed text-status-failed`,children:e})]})}function NS({text:e}){return(0,z.jsxs)(`div`,{className:`flex items-start gap-2 rounded-md border border-border bg-muted/30 px-3 py-2`,children:[(0,z.jsx)(Xe,{className:`mt-0.5 h-3.5 w-3.5 shrink-0 text-muted-foreground`}),(0,z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e})]})}function PS({text:e,onRetry:t,isBusy:n}){return(0,z.jsxs)(`div`,{"data-testid":`stopped-item`,className:`flex items-center gap-2.5 rounded-xl border border-amber-500/20 bg-amber-500/5 px-4 py-2.5`,children:[(0,z.jsx)(ct,{className:`h-3.5 w-3.5 shrink-0 text-amber-500`}),(0,z.jsx)(`p`,{className:`flex-1 text-xs text-amber-600 dark:text-amber-400`,children:e}),t&&(0,z.jsx)(`button`,{type:`button`,onClick:t,disabled:n,className:R(`rounded px-2 py-0.5 text-[11px] font-medium`,`border border-amber-500/30 text-amber-600 dark:text-amber-400`,`hover:bg-amber-500/10 transition-colors`,`disabled:opacity-40 disabled:cursor-not-allowed`),children:`Retry`})]})}function FS({item:e}){return(0,z.jsxs)(`div`,{className:`flex items-center gap-2 rounded-md border border-border bg-muted/30 px-3 py-1.5`,children:[(0,z.jsx)(`span`,{className:`text-[10px] text-muted-foreground`,children:`BG`}),(0,z.jsx)(`span`,{className:`text-xs text-foreground`,children:e.label}),(0,z.jsx)(`span`,{className:R(`ml-auto font-mono text-[10px] capitalize`,e.status===`completed`?`text-status-running`:``,e.status===`failed`?`text-status-failed`:``,e.status===`running`?`text-status-blocked`:``),children:e.status})]})}function IS(){let[e,t]=(0,O.useState)(0),n=(0,O.useRef)(null);return(0,O.useEffect)(()=>(t(0),n.current=setInterval(()=>t(e=>e+1),1e3),()=>{n.current!==null&&clearInterval(n.current)}),[]),e}function LS(e,t){return e===`running`?t?`Running ${t}`:`Running tool`:e===`writing`?`Writing…`:`Thinking`}function RS({className:e}){return(0,z.jsx)(`span`,{"aria-hidden":`true`,className:R(`inline-block h-2 w-2 rounded-full bg-brand motion-safe:animate-pulse`,e)})}function zS({phase:e=`thinking`,toolName:t,className:n}){let r=IS(),i=LS(e,t);return(0,z.jsxs)(`div`,{className:R(`flex min-h-10 items-center gap-2 rounded-md px-1 py-2`,n),children:[(0,z.jsx)(`span`,{className:`sr-only`,"aria-live":`polite`,"aria-atomic":`true`,children:i}),(0,z.jsx)(RS,{}),(0,z.jsx)(`span`,{className:`text-sm text-muted-foreground`,"aria-hidden":`true`,children:i}),(0,z.jsxs)(`span`,{className:`font-mono text-xs text-muted-foreground`,"aria-hidden":`true`,children:[r,`s`]})]})}function BS(e){let t={};for(let n=e.length-1;n>=0;n--){let r=e[n];if(r.kind===`stopped`&&!t.user&&!t.stopped&&(t.stopped=r.id),r.kind===`assistant`&&!t.user&&!t.assistant&&(t.assistant=r.id),r.kind===`user`){t.user=r.id;break}}return t}function VS(e){let t=[],n=0;for(;n<e.length;){let r=e[n];if(r===void 0){n++;continue}if(r.kind!==`subagent`){t.push({kind:`item`,item:r}),n++;continue}let i=[];for(;n<e.length;){let t=e[n];if(t===void 0||t.kind!==`subagent`)break;i.push(t),n++}t.push({kind:`subagent-group`,items:i,id:i[0].id})}return t}function HS(e,t=!1){let n=typeof t==`boolean`?t:t.isStreaming??!1,r=typeof t==`object`?t:{};switch(e.kind){case`user`:return(0,z.jsx)(AS,{text:e.text,ts:e.ts,onEdit:r.onEdit,isBusy:r.isBusy});case`assistant`:return(0,z.jsx)(jS,{text:e.text,ts:e.ts,isStreaming:n,onRetry:r.onRetry,isBusy:r.isBusy});case`thinking`:return(0,z.jsx)(dd,{text:e.text,isStreaming:n});case`tool`:return(0,z.jsx)(Pd,{...e});case`error`:return(0,z.jsx)(MS,{message:e.message});case`notice`:return(0,z.jsx)(NS,{text:e.text});case`stopped`:return(0,z.jsx)(PS,{text:e.text,onRetry:r.onRetry,isBusy:r.isBusy});case`bg_job`:return(0,z.jsx)(FS,{item:e});case`subagent`:return null}}function US(e,t=!1){let n=typeof t==`boolean`?t:t.isStreaming??!1,r=typeof t==`object`?t:{};switch(e.kind){case`user`:return(0,z.jsx)(AS,{text:e.text,ts:e.ts,onEdit:r.onEdit,isBusy:r.isBusy});case`assistant`:return(0,z.jsx)(jS,{text:e.text,ts:e.ts,isStreaming:n,onRetry:r.onRetry,isBusy:r.isBusy});case`thinking`:return(0,z.jsx)(dd,{text:e.text,isStreaming:n});case`error`:return(0,z.jsx)(MS,{message:e.message});case`notice`:return(0,z.jsx)(NS,{text:e.text});case`stopped`:return(0,z.jsx)(PS,{text:e.text,onRetry:r.onRetry,isBusy:r.isBusy});case`bg_job`:return(0,z.jsx)(FS,{item:e});default:return null}}function WS(e){return e.kind!==`assistant`&&e.kind!==`thinking`?!1:e.text.slice(0,ES(e.text)).replace(/^[ \t]*(?:[-*+]|\d+[.)]|#{1,6}|>)[ \t]*$/gm,``).trim().length>0}function GS(e,t){let n=e[e.length-1],r,i=-1;for(let t=e.length-1;t>=0;t--){let n=e[t];if(n.kind===`user`){i=t;break}n.kind===`tool`&&n.status===`running`&&r===void 0&&(r=n.name)}let a=e.some((e,t)=>{let n=Tu(e);return e.kind!==`assistant`||!WS(e)?!1:n===`streaming`||n===`sealed`&&t>i&&!r}),o=n?.kind===`tool`||n?.kind===`notice`;return{showWorking:t&&!a,workingPhase:r?`running`:o?`writing`:`thinking`,...r?{runningTool:r}:{}}}function KS({sessionId:e,...t}){return(0,z.jsx)(bd.Provider,{value:e??null,children:(0,z.jsx)(qS,{...t})})}function qS({items:e,thinkingUi:t=`live`,spineMode:n=!0,turnActive:r=!1,hideEmptyState:i=!1,onRetry:a,onEdit:o,isBusy:s,rewindIds:c}){let l=(0,O.useMemo)(()=>BS(e),[e]),u=c??l,d=(0,O.useCallback)((e,t)=>({isStreaming:t,isBusy:s,...e.id===u.assistant||e.id===u.stopped?{onRetry:a}:{},...e.id===u.user?{onEdit:o}:{}}),[u.user,u.assistant,u.stopped,a,o,s]),f=(0,O.useMemo)(()=>t===`off`?e.filter(e=>e.kind!==`thinking`):e,[e,t]),p=(0,O.useMemo)(()=>VS(f),[f]),m=yf(f),h=(0,O.useCallback)((e,t)=>{let n=e.kind===`user`&&t>0,r=Tu(e)===`streaming`;return(0,z.jsxs)(`div`,{className:Tu(e)?void 0:`[content-visibility:auto] [contain-intrinsic-size:auto_160px]`,...Tu(e)?{"data-live":Tu(e)}:{},children:[n&&(0,z.jsx)(`div`,{className:`my-6 border-t border-border/40`,"aria-hidden":`true`}),(0,z.jsx)(`div`,{className:`py-2 px-1`,children:US(e,d(e,r))})]},e.id)},[d]),{showWorking:g,workingPhase:_,runningTool:v}=GS(f,r);return(0,z.jsxs)(`div`,{role:`log`,"aria-label":`Conversation`,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-busy":r,className:`flex flex-col gap-0 max-w-4xl mx-auto w-full [&_button:focus-visible]:outline-2 [&_button:focus-visible]:outline-ring [&_a:focus-visible]:outline-2 [&_a:focus-visible]:outline-ring`,children:[e.length===0&&i?null:e.length===0?(0,z.jsx)(`p`,{className:`py-12 text-center text-sm text-muted-foreground`,children:`No transcript items yet.`}):n?(0,z.jsx)(vf,{slots:m,renderTextItem:h}):p.map((e,t)=>{if(e.kind===`item`){let{item:n}=e,r=n.kind===`user`&&t>0,i=Tu(n)===`streaming`;return(0,z.jsxs)(`div`,{className:Tu(n)?void 0:`[content-visibility:auto] [contain-intrinsic-size:auto_160px]`,...Tu(n)?{"data-live":Tu(n)}:{},children:[r&&(0,z.jsx)(`div`,{className:`my-6 border-t border-border/40`,"aria-hidden":`true`}),(0,z.jsx)(`div`,{className:`py-2 px-1`,children:HS(n,d(n,i))})]},n.id)}let n=Hd(e.items);return(0,z.jsx)(`div`,{className:`py-2 px-1 [content-visibility:auto] [contain-intrinsic-size:auto_100px]`,children:(0,z.jsx)(Vd,{roots:n})},e.id)}),g&&(0,z.jsx)(`div`,{className:`py-2 px-1`,"data-testid":`working-indicator`,children:(0,z.jsx)(zS,{phase:_,...v?{toolName:v}:{}})})]})}var JS={30:`black`,31:`red`,32:`green`,33:`yellow`,34:`blue`,35:`magenta`,36:`cyan`,37:`white`,90:`bright-black`,91:`bright-red`,92:`bright-green`,93:`bright-yellow`,94:`bright-blue`,95:`bright-magenta`,96:`bright-cyan`,97:`bright-white`},YS={40:`black`,41:`red`,42:`green`,43:`yellow`,44:`blue`,45:`magenta`,46:`cyan`,47:`white`,100:`bright-black`,101:`bright-red`,102:`bright-green`,103:`bright-yellow`,104:`bright-blue`,105:`bright-magenta`,106:`bright-cyan`,107:`bright-white`},XS={0:`black`,1:`red`,2:`green`,3:`yellow`,4:`blue`,5:`magenta`,6:`cyan`,7:`white`,8:`bright-black`,9:`bright-red`,10:`bright-green`,11:`bright-yellow`,12:`bright-blue`,13:`bright-magenta`,14:`bright-cyan`,15:`bright-white`};function ZS(){return{bold:!1,dim:!1,italic:!1,underline:!1,fg:null,bg:null,fgClass:null,bgClass:null}}function QS(e){if(e<16)return{cls:`ansi-fg-${XS[e]??`white`}`,color:null};if(e<232){let t=e-16,n=t%6,r=Math.floor(t/6)%6,i=Math.floor(t/36),a=e=>e===0?0:55+e*40;return{cls:null,color:`rgb(${a(i)},${a(r)},${a(n)})`}}let t=8+(e-232)*10;return{cls:null,color:`rgb(${t},${t},${t})`}}function $S(e){let{cls:t,color:n}=QS(e);return{cls:t?t.replace(`ansi-fg-`,`ansi-bg-`):null,color:n}}function eC(e,t){let n=0;for(;n<e.length;){let r=e[n];if(r===0)Object.assign(t,ZS());else if(r===1)t.bold=!0;else if(r===2)t.dim=!0;else if(r===3)t.italic=!0;else if(r===4)t.underline=!0;else if(r===22)t.bold=!1,t.dim=!1;else if(r===23)t.italic=!1;else if(r===24)t.underline=!1;else if(r in JS)t.fgClass=`ansi-fg-${JS[r]}`,t.fg=null;else if(r===39)t.fg=null,t.fgClass=null;else if(r in YS)t.bgClass=`ansi-bg-${YS[r]}`,t.bg=null;else if(r===49)t.bg=null,t.bgClass=null;else if(r===38){if(e[n+1]===5&&n+2<e.length){let{cls:r,color:i}=QS(e[n+2]);t.fgClass=r,t.fg=i,n+=2}else e[n+1]===2&&n+4<e.length&&(t.fg=`rgb(${e[n+2]},${e[n+3]},${e[n+4]})`,t.fgClass=null,n+=4)}else if(r===48){if(e[n+1]===5&&n+2<e.length){let{cls:r,color:i}=$S(e[n+2]);t.bgClass=r,t.bg=i,n+=2}else e[n+1]===2&&n+4<e.length&&(t.bg=`rgb(${e[n+2]},${e[n+3]},${e[n+4]})`,t.bgClass=null,n+=4)}n++}}function tC(e,t,n){let r=[],i={};t.bold&&r.push(`ansi-bold`),t.dim&&r.push(`ansi-dim`),t.italic&&r.push(`ansi-italic`),t.underline&&r.push(`ansi-underline`),t.fgClass&&r.push(t.fgClass),t.bgClass&&r.push(t.bgClass),t.fg&&(i.color=t.fg),t.bg&&(i.backgroundColor=t.bg);let a={key:n};return r.length&&(a.className=r.join(` `)),Object.keys(i).length&&(a.style=i),(0,O.createElement)(`span`,a,e)}function nC(e){try{return(0,O.createElement)(`span`,null,...rC(e))}catch{return(0,O.createElement)(`span`,null,e)}}function rC(e){let t=[],n=0,r=ZS(),i=/\x1b\[([0-9;]*)m|\x1b\]8;;([^\x07\x1b]*)(?:\x07|\x1b\\)([^\x1b]*)(?:\x1b\]8;;(?:\x07|\x1b\\))?|\x1b\[[0-9;]*[@-~]|\x1b\][^\x07\x1b]*(?:\x07|\x1b\\)|\x1b./g,a=0;for(let o of e.matchAll(i)){let i=o.index;if(i>a){let o=e.slice(a,i);t.push(tC(o,r,n++))}let[s,c,l,u]=o;c===void 0?l!==void 0&&u!==void 0&&(/^https?:\/\//i.test(l)&&u?t.push((0,O.createElement)(`a`,{key:n++,href:l,rel:`noopener noreferrer`,target:`_blank`},u)):u&&t.push(tC(u,r,n++))):eC(c===``?[0]:c.split(`;`).map(Number),r),a=i+s.length}return a<e.length&&t.push(tC(e.slice(a),r,n++)),t}function iC(e){return e.kind===`table`?(0,z.jsx)(`div`,{className:R(`max-w-full overflow-x-auto rounded border border-border`,`focus:outline-none focus:ring-1 focus:ring-ring`),role:`region`,"aria-label":e.title??`Command table`,tabIndex:0,children:(0,z.jsxs)(`table`,{className:`w-full text-left text-sm`,children:[e.title&&(0,z.jsx)(`caption`,{className:`px-3 py-2 text-left font-medium text-foreground`,children:e.title}),(0,z.jsx)(`thead`,{className:`bg-muted/50 text-muted-foreground`,children:(0,z.jsx)(`tr`,{children:e.columns.map((e,t)=>(0,z.jsx)(`th`,{scope:`col`,className:`whitespace-nowrap px-3 py-2 font-medium`,children:e},t))})}),(0,z.jsx)(`tbody`,{children:e.rows.map((e,t)=>(0,z.jsx)(`tr`,{className:`border-t border-border/50`,children:e.map((e,t)=>(0,z.jsx)(`td`,{className:`whitespace-pre-wrap px-3 py-2 align-top`,children:e},t))},t))})]})}):(0,z.jsx)(`span`,{children:e.text})}function aC(e){return e.kind===`keyValue`?(0,z.jsxs)(`div`,{children:[e.title&&(0,z.jsx)(`h3`,{className:`mb-2 font-medium text-foreground`,children:e.title}),(0,z.jsx)(`dl`,{className:`grid grid-cols-[minmax(0,1fr)_minmax(0,2fr)] gap-x-4 gap-y-1`,children:e.entries.map((e,t)=>(0,z.jsxs)(O.Fragment,{children:[(0,z.jsx)(`dt`,{className:`text-muted-foreground`,children:e.key}),(0,z.jsx)(`dd`,{className:`whitespace-pre-wrap break-words`,children:e.value})]},t))})]}):(0,z.jsx)(`span`,{children:e.text})}function oC(e){return e.kind===`diff`?(0,z.jsxs)(`div`,{children:[e.fileName&&(0,z.jsx)(`h3`,{className:`mb-2 font-medium text-foreground`,children:e.fileName}),(0,z.jsx)(`pre`,{className:`max-w-full overflow-x-auto rounded border border-border p-2 text-xs`,"aria-label":e.fileName?`Diff for ${e.fileName}`:`Diff`,tabIndex:0,children:(0,z.jsx)(`code`,{children:e.diff.split(`
92
+ `).map((e,t,n)=>(0,z.jsxs)(`span`,{className:R(e.startsWith(`+`)&&!e.startsWith(`+++`)&&`bg-status-done/10 text-status-done`,e.startsWith(`-`)&&!e.startsWith(`---`)&&`bg-status-failed/10 text-status-failed`,(e.startsWith(`@@`)||e.startsWith(`+++`)||e.startsWith(`---`))&&`text-muted-foreground`),children:[e,t<n.length-1?`
93
+ `:``]},t))})})]}):(0,z.jsx)(`span`,{children:e.text})}function sC(e){return e.kind===`list`?(0,z.jsxs)(`div`,{children:[e.title&&(0,z.jsx)(`h3`,{className:`mb-2 font-medium text-foreground`,children:e.title}),(0,z.jsx)(`ul`,{className:`list-disc space-y-1 pl-5`,children:e.items.map((e,t)=>(0,z.jsxs)(`li`,{children:[(0,z.jsx)(`span`,{children:e.text}),e.description&&(0,z.jsx)(`p`,{className:`whitespace-pre-wrap text-muted-foreground`,children:e.description})]},t))})]}):(0,z.jsx)(`span`,{children:e.text})}function cC(e){if(e.kind!==`link`)return(0,z.jsx)(`span`,{children:e.text});let t;try{t=new URL(e.url)}catch{return(0,z.jsx)(`span`,{children:e.text})}return[`https:`,`http:`].includes(t.protocol)?(0,z.jsx)(`a`,{href:t.href,target:`_blank`,rel:`noopener noreferrer`,className:R(`break-all text-primary underline underline-offset-2`,`rounded focus:outline-none focus:ring-1 focus:ring-ring`),children:e.label}):(0,z.jsx)(`span`,{children:e.text})}var lC=new Map;function uC(e,t){lC.set(e,t)}function dC(e){return lC.get(e)??fC}var fC=e=>(0,O.createElement)(`span`,null,e.text);uC(`text`,e=>{try{return nC(e.ansi)}catch{return(0,O.createElement)(`span`,null,e.text)}}),uC(`table`,iC),uC(`keyValue`,aC),uC(`diff`,oC),uC(`list`,sC),uC(`link`,cC);function pC({input:e,blocks:t}){let[n,r]=(0,O.useState)(!1),i=t.map(e=>e.text).join(`
94
+ `);return(0,z.jsxs)(`div`,{className:R(`rounded-lg border border-border/50 bg-muted/20`,`text-sm font-mono`,`overflow-hidden`),role:`region`,"aria-label":`Output for ${e}`,children:[(0,z.jsxs)(`div`,{className:`flex items-center justify-between px-3 py-1.5 border-b border-border/40 bg-muted/40 select-none`,children:[(0,z.jsxs)(`span`,{className:`flex items-center gap-1.5 text-xs text-muted-foreground min-w-0`,children:[(0,z.jsx)(`span`,{className:`text-primary/70`,"aria-hidden":`true`,children:`❯`}),(0,z.jsx)(`span`,{className:`truncate font-medium`,children:e})]}),(0,z.jsxs)(`button`,{type:`button`,onClick:()=>{navigator.clipboard.writeText(i).then(()=>{r(!0),setTimeout(()=>r(!1),1500)})},title:`Copy output`,"aria-label":`Copy command output`,className:R(`ml-2 shrink-0 flex items-center gap-1 rounded px-1.5 py-0.5 text-xs`,`text-muted-foreground hover:text-foreground hover:bg-accent transition-colors`,`focus:outline-none focus:ring-1 focus:ring-ring`),children:[n?(0,z.jsx)(me,{className:`h-3 w-3 text-status-done`,"aria-hidden":`true`}):(0,z.jsx)(Ae,{className:`h-3 w-3`,"aria-hidden":`true`}),(0,z.jsx)(`span`,{children:n?`Copied`:`Copy`})]})]}),(0,z.jsx)(`div`,{className:`min-w-0 px-3 py-2 flex flex-col gap-2 break-words leading-snug`,children:t.map((e,t)=>{let n=dC(e.kind??`text`);try{return(0,z.jsx)(`div`,{className:`min-w-0 whitespace-pre-wrap`,children:n(e)},t)}catch{return(0,z.jsx)(`div`,{className:`whitespace-pre-wrap`,children:e.text},t)}})})]})}function mC(e,t){let n=[...t].sort((e,t)=>e.afterCount-t.afterCount||e.key-t.key),r=[],i=0;for(let t of n){let n=Math.min(Math.max(t.afterCount,0),e.length);n>i&&(r.push({kind:`transcript`,items:e.slice(i,n)}),i=n),r.push({kind:`command`,item:t})}return i<e.length&&r.push({kind:`transcript`,items:e.slice(i)}),r}function hC({loading:e,sessions:t,selectedSession:n,items:r,cmdItems:i,totals:a,status:o,turnActive:s,thinkingUi:c,onNewSession:l,starting:u,onSuggest:d,onRetry:f,onEdit:p,isBusy:m,currentModel:h,serverCwd:g}){if(e&&!t.length)return(0,z.jsx)(`div`,{className:`flex h-full items-center justify-center`,children:(0,z.jsxs)(`div`,{className:`flex flex-col items-center gap-2 text-muted-foreground`,children:[(0,z.jsx)(`div`,{className:`size-6 animate-spin rounded-full border-2 border-current border-t-transparent`}),(0,z.jsx)(`span`,{className:`text-sm`,children:`Loading sessions...`})]})});if(n&&(r.length>0||i.length>0))return(0,z.jsx)(gC,{sessionId:n.id,items:r,cmdItems:i,totals:a,turnActive:s,thinkingUi:c,onRetry:f,onEdit:p,isBusy:m});if(n)return(0,z.jsx)(`div`,{className:`flex h-full items-center justify-center text-muted-foreground`,children:(0,z.jsx)(`div`,{className:`flex flex-col items-center gap-2`,children:o===`connecting`||o===`reconnecting`?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`div`,{className:`size-5 animate-spin rounded-full border-2 border-current border-t-transparent`}),(0,z.jsx)(`span`,{className:`text-sm`,children:`Connecting to session...`})]}):n.mode===`live`?(0,z.jsxs)(`div`,{className:`mx-auto w-full max-w-xl px-5 py-10 text-center`,children:[(0,z.jsx)(`h2`,{className:`text-2xl font-semibold tracking-tight text-foreground`,children:`What can we work on?`}),(0,z.jsx)(vC,{cwd:n.cwd??g,model:h}),(0,z.jsx)(`p`,{className:`mt-3 text-sm leading-relaxed`,children:`Ask a question, explore your project, or turn an idea into working code.`}),(0,z.jsx)(`div`,{className:`mt-6 grid gap-3 sm:grid-cols-2`,children:[[`Explore this project`,`Give me a concise overview of this project and its architecture.`],[`Find a bug`,`Help me investigate a bug. Ask me what is going wrong first.`],[`Plan a feature`,`Help me plan a new feature. Ask me what I want to build.`],[`Review my changes`,`Review my current changes for correctness and potential risks.`]].map(([e,t])=>(0,z.jsx)(`button`,{onClick:()=>d?.(t),className:`rounded-xl border bg-card p-4 text-left text-sm font-medium text-foreground transition-colors hover:border-brand/60 hover:bg-accent focus-visible:ring-2 focus-visible:ring-ring`,children:e},e))})]}):(0,z.jsx)(`span`,{className:`text-sm`,children:`No transcript data`})})});let _=_C(g??t.find(e=>e.cwd)?.cwd);return(0,z.jsx)(`div`,{className:`flex h-full items-center justify-center text-muted-foreground`,children:(0,z.jsxs)(`div`,{className:`max-w-lg px-6 py-12 text-center`,children:[(0,z.jsx)(`img`,{src:`/brand-mark.svg`,alt:``,className:`mx-auto mb-6 size-12`}),(0,z.jsx)(`h2`,{className:`text-3xl font-semibold tracking-tight text-foreground`,children:`Your next idea starts here`}),(_??h)&&(0,z.jsxs)(`p`,{className:`mt-2 flex items-center justify-center gap-2 text-xs text-muted-foreground`,children:[_&&(0,z.jsx)(`span`,{className:`rounded bg-secondary px-1.5 py-0.5 font-mono`,children:_}),h&&(0,z.jsx)(`span`,{className:`rounded bg-secondary px-1.5 py-0.5 font-mono`,children:h})]}),(0,z.jsx)(`p`,{className:`mt-4 text-sm leading-relaxed`,children:`Chat with an agent that can explore your project, explain code, and help you get things done. You stay in control.`}),(0,z.jsx)(`button`,{onClick:l,disabled:u,className:`mt-7 min-h-11 rounded-xl bg-brand px-6 text-sm font-semibold text-primary-foreground transition-colors hover:bg-brand/90 disabled:opacity-60`,children:u?`Starting…`:`New chat`}),t.length>0&&(0,z.jsx)(`p`,{className:`mt-4 text-xs`,children:`Or continue a conversation from the sidebar.`})]})})}function gC({sessionId:e,items:t,cmdItems:n,totals:r,turnActive:i,thinkingUi:a,onRetry:o,onEdit:s,isBusy:c}){let l=mC(t,n),u=BS(t),d=l[0]?.kind!==`transcript`;return(0,z.jsxs)(`div`,{className:`flex flex-col gap-0 max-w-4xl mx-auto w-full px-1`,children:[d&&(0,z.jsx)(KS,{sessionId:e,items:[],totals:r,hideEmptyState:!0}),l.map((t,n)=>t.kind===`transcript`?(0,z.jsx)(KS,{sessionId:e,items:t.items,...n===0?{totals:r}:{},turnActive:i&&n===l.length-1,hideEmptyState:!0,thinkingUi:a,onRetry:o,onEdit:s,isBusy:c,rewindIds:u},`t-${n}`):(0,z.jsx)(`div`,{className:`px-2 py-3`,children:(0,z.jsx)(pC,{input:t.item.input,blocks:t.item.response.blocks})},`c-${t.item.key}`))]})}function _C(e){if(e)return e.replace(/[/\\]+$/,``).split(/[/\\]/).pop()||e}function vC({cwd:e,model:t}){let n=_C(e);return!n&&!t?null:(0,z.jsxs)(`p`,{className:`mt-2 flex items-center justify-center gap-2 text-xs text-muted-foreground`,"data-testid":`workspace-chips`,children:[n&&(0,z.jsx)(`span`,{className:`rounded bg-secondary px-1.5 py-0.5 font-mono`,title:e,"data-testid":`folder-chip`,children:n}),t&&(0,z.jsx)(`span`,{className:`rounded bg-secondary px-1.5 py-0.5 font-mono`,"data-testid":`model-chip`,children:t})]})}function yC(e){return/model/i.test(e)}function bC({sessionId:e,request:t,onAnswered:n}){let[r,i]=(0,O.useState)(()=>{let e=t.options.findIndex(e=>e.value===t.default);return e<0?0:e}),[a,o]=(0,O.useState)(!1),[s,c]=(0,O.useState)(``),l=(0,O.useRef)(null),u=(0,O.useRef)([]),d=(0,O.useRef)(null),f=(0,O.useRef)(null),p=(0,O.useRef)(!0);(0,O.useEffect)(()=>{p.current=!0;let e=document.activeElement instanceof HTMLElement?document.activeElement:null;u.current[r]?.focus();let t=e=>{l.current?.contains(e.target)||u.current[r]?.focus()};return document.addEventListener(`focusin`,t),()=>{p.current=!1,document.removeEventListener(`focusin`,t),e?.focus()}},[]);async function m(r){if(!a){o(!0),c(``);try{await U(`/api/sessions/${encodeURIComponent(e)}/choices/${encodeURIComponent(t.corrId)}`,{method:`POST`,body:JSON.stringify({value:r})}),p.current&&n()}catch{p.current&&(c(`Could not submit choice. Try again.`),o(!1))}}}function h(e){if(e.key===`Escape`)e.stopPropagation(),t.cancellable&&!a&&(e.preventDefault(),m(null));else{if(e.key===`Tab`){e.stopPropagation();let n=[...u.current.filter(e=>!!e&&!e.disabled),...t.cancellable&&d.current&&!d.current.disabled?[d.current]:[],...f.current&&!f.current.disabled?[f.current]:[]];if(!n.length){e.preventDefault(),l.current?.focus();return}let r=n.indexOf(document.activeElement);e.preventDefault(),n[r<0?e.shiftKey?n.length-1:0:(r+(e.shiftKey?-1:1)+n.length)%n.length]?.focus()}if((e.key===`ArrowDown`||e.key===`ArrowRight`||e.key===`ArrowUp`||e.key===`ArrowLeft`)&&u.current.includes(document.activeElement)){e.preventDefault();let n=(r+(e.key===`ArrowDown`||e.key===`ArrowRight`?1:-1)+t.options.length)%t.options.length;i(n),u.current[n]?.focus()}}}return(0,z.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4`,children:(0,z.jsxs)(`div`,{ref:l,role:`dialog`,tabIndex:-1,"aria-modal":`true`,"aria-labelledby":`choice-title`,"aria-describedby":s?`choice-error`:void 0,onKeyDown:h,className:`flex max-h-[calc(100dvh-2rem)] w-full max-w-lg flex-col rounded-lg border bg-background p-5 shadow-xl`,children:[(0,z.jsx)(`h2`,{id:`choice-title`,className:`text-lg font-semibold`,children:t.title}),(0,z.jsx)(`div`,{role:`radiogroup`,"aria-label":`Choices`,className:`mt-4 flex min-h-0 flex-col gap-2 overflow-y-auto`,children:t.options.map((e,t)=>(0,z.jsxs)(`button`,{ref:e=>{u.current[t]=e},type:`button`,role:`radio`,"aria-checked":r===t,tabIndex:r===t?0:-1,disabled:a,onClick:()=>i(t),className:`rounded-md border p-3 text-left text-sm focus-visible:ring-2 focus-visible:ring-ring ${r===t?`border-brand bg-accent`:`border-border`}`,children:[(0,z.jsx)(`span`,{className:`font-medium`,children:e.label}),e.description&&(0,z.jsx)(`span`,{className:`mt-1 block text-muted-foreground`,children:e.description})]},e.value))}),s&&(0,z.jsx)(`p`,{id:`choice-error`,role:`alert`,className:`mt-3 text-sm text-red-400`,children:s}),(0,z.jsxs)(`div`,{className:`mt-5 flex justify-end gap-2`,children:[t.cancellable&&(0,z.jsx)(`button`,{ref:d,type:`button`,disabled:a,className:`rounded border px-3 py-2 text-sm`,onClick:()=>void m(null),children:`Cancel`}),(0,z.jsx)(`button`,{ref:f,type:`button`,disabled:a,className:`rounded bg-brand px-3 py-2 text-sm text-primary-foreground disabled:opacity-50`,onClick:()=>void m(t.options[r].value),children:a?`Submitting…`:`Select`})]})]})})}var xC=2;function SC({aliases:e,has1m:t,selectedAlias:n,rowId:r,onSelect:i}){let a=[...e.map(e=>({key:e,label:e,alias:e})),...t?[{key:`${r}_1m`,label:`1M`,alias:`${r}_1m`}]:[]],o=a.slice(0,xC),s=a.length-xC;return(0,z.jsxs)(`span`,{className:`ml-2 flex shrink-0 items-center gap-1`,children:[o.map(({key:e,label:t,alias:r})=>(0,z.jsx)(`span`,{onClick:e=>{e.stopPropagation(),i(r)},className:[`cursor-pointer rounded px-1.5 py-0.5 text-[10px] font-mono transition-colors`,n===r?`bg-brand text-primary-foreground`:`bg-muted text-muted-foreground hover:bg-muted/70`].join(` `),children:t},e)),s>0&&(0,z.jsxs)(`span`,{className:`rounded bg-muted px-1.5 py-0.5 text-[10px] font-mono text-muted-foreground`,children:[`+`,s]})]})}function CC({sessionId:e,request:t,onAnswered:n,groups:r,currentModel:i}){let[a,o]=(0,O.useState)(``),[s,c]=(0,O.useState)(t.default??i??r[0]?.rows[0]?.id??``),[l,u]=(0,O.useState)(!1),[d,f]=(0,O.useState)(``),p=(0,O.useRef)(null),m=(0,O.useRef)(!0),h=(0,O.useRef)(null);(0,O.useEffect)(()=>(m.current=!0,h.current=document.activeElement instanceof HTMLElement?document.activeElement:null,p.current?.focus(),()=>{m.current=!1,Zc()||h.current?.focus()}),[]);async function g(r){if(!l){u(!0),f(``);try{await U(`/api/sessions/${encodeURIComponent(e)}/choices/${encodeURIComponent(t.corrId)}`,{method:`POST`,body:JSON.stringify({value:r})}),m.current&&n()}catch{m.current&&(f(`Could not submit. Try again.`),u(!1))}}}function _(r){r.key===`Escape`&&(r.stopPropagation(),r.preventDefault(),l||(n(),Zc()||h.current?.focus(),U(`/api/sessions/${encodeURIComponent(e)}/choices/${encodeURIComponent(t.corrId)}`,{method:`POST`,body:JSON.stringify({value:null})}).catch(()=>void 0)))}let v=a.trim().toLowerCase(),y=r.map(e=>({...e,rows:e.rows.filter(e=>!v||e.id.toLowerCase().includes(v)||e.name.toLowerCase().includes(v)||e.aliases.some(e=>e.toLowerCase().includes(v)))})).filter(e=>e.rows.length>0);return(0,z.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4`,onKeyDown:_,children:(0,z.jsxs)(`div`,{role:`dialog`,"aria-modal":`true`,"aria-labelledby":`mpicker-title`,"aria-describedby":d?`mpicker-error`:void 0,className:`flex max-h-[calc(100dvh-2rem)] w-full max-w-lg flex-col rounded-lg border bg-background shadow-xl`,children:[(0,z.jsxs)(`div`,{className:`px-5 pt-5 pb-3 shrink-0`,children:[(0,z.jsx)(`h2`,{id:`mpicker-title`,className:`text-lg font-semibold mb-3`,children:t.title}),(0,z.jsxs)(`div`,{className:`relative`,children:[(0,z.jsx)(Et,{className:`absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground pointer-events-none`}),(0,z.jsx)(`input`,{ref:p,type:`text`,value:a,onChange:e=>o(e.target.value),placeholder:`Filter models…`,"aria-label":`Filter models`,className:`w-full rounded-md border bg-secondary pl-8 pr-3 py-1.5 text-sm focus:outline-none focus:ring-1 focus:ring-ring`})]})]}),(0,z.jsxs)(`div`,{role:`radiogroup`,"aria-label":`Models`,className:`min-h-0 overflow-y-auto px-5 pb-2 flex flex-col gap-3`,children:[y.length===0&&(0,z.jsxs)(`p`,{className:`py-4 text-center text-sm text-muted-foreground`,children:[`No models match “`,a,`”`]}),y.map(e=>(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`p`,{className:`mb-1 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground`,children:e.label}),(0,z.jsx)(`div`,{className:`flex flex-col gap-1`,children:e.rows.map(e=>{let t=e.aliases.includes(i)||e.id===i,n=e.aliases.includes(s)||e.id===s;return(0,z.jsxs)(`button`,{type:`button`,role:`radio`,disabled:l,"aria-checked":n,"aria-label":e.name,tabIndex:n?0:-1,onClick:()=>c(e.id),onDoubleClick:()=>{c(e.id),g(e.id)},className:[`flex items-center justify-between rounded-md border px-3 py-2 text-left text-sm transition-colors`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,n?`border-brand bg-accent`:`border-border hover:bg-accent/50`].join(` `),children:[(0,z.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,z.jsx)(`span`,{className:`font-medium truncate`,children:e.name}),t&&(0,z.jsx)(`span`,{className:`shrink-0 rounded-full bg-status-done/15 px-1.5 py-0.5 text-[10px] font-medium text-status-done`,children:`current`})]}),(0,z.jsx)(SC,{aliases:e.aliases,has1m:e.has1m,selectedAlias:s,rowId:e.id,onSelect:e=>{c(e)}})]},e.id)})})]},e.label))]}),d&&(0,z.jsx)(`p`,{id:`mpicker-error`,role:`alert`,className:`mx-5 mt-1 text-sm text-red-400`,children:d}),(0,z.jsxs)(`div`,{className:`shrink-0 flex justify-end gap-2 border-t border-border/40 px-5 py-3`,children:[(0,z.jsx)(`button`,{type:`button`,disabled:l,className:`rounded border px-3 py-2 text-sm hover:bg-accent`,onClick:()=>{g(null),Zc()},children:`Cancel`}),(0,z.jsx)(`button`,{type:`button`,disabled:l||!s,className:`rounded bg-brand px-3 py-2 text-sm text-primary-foreground disabled:opacity-50`,onClick:()=>void g(s),children:l?`Switching…`:`Select`})]})]})})}function wC({sessionId:e,request:t,onAnswered:n}){let[r,i]=(0,O.useState)(null),[a,o]=(0,O.useState)({}),[s,c]=(0,O.useState)(``),l=yC(t.title);if((0,O.useEffect)(()=>{if(!l)return;let e=!1;return U(`/api/models`).then(t=>{e||(t?.groups&&i(t.groups),t?.models&&o(Object.fromEntries(t.models.map(e=>[e.id,e.label]))),t?.default&&c(t.default))}).catch(()=>void 0),()=>{e=!0}},[l]),l){let i=r??[{label:`Models`,rows:t.options.map(e=>({id:e.value,name:a[e.value]??e.label,aliases:[e.value],has1m:!1}))}];return(0,z.jsx)(CC,{sessionId:e,request:t,onAnswered:n,groups:i,currentModel:s})}return(0,z.jsx)(bC,{sessionId:e,request:t,onAnswered:n})}function TC({progress:e}){return e.length?(0,z.jsx)(`div`,{role:`group`,"aria-label":`Command progress`,className:`mx-auto w-full max-w-4xl space-y-2 px-3 py-2`,children:e.map(({corrId:e,label:t,fraction:n})=>(0,z.jsxs)(`div`,{role:`status`,"aria-live":`polite`,className:`rounded-md border bg-secondary/40 px-3 py-2 text-xs`,children:[(0,z.jsx)(`span`,{children:t}),n!==void 0&&(0,z.jsx)(`progress`,{className:`mt-1 block w-full`,value:n,max:1,"aria-label":`${t} progress`})]},e))}):null}function EC(e,t){return{retry:(0,O.useCallback)(async n=>{t||await U(`/api/sessions/${encodeURIComponent(e)}/rewind`,{method:`POST`,body:JSON.stringify(n?.trim()?{mode:`retry`,text:n}:{mode:`retry`})})},[e,t]),editAndResend:(0,O.useCallback)(async n=>{!t&&n.trim()&&await U(`/api/sessions/${encodeURIComponent(e)}/rewind`,{method:`POST`,body:JSON.stringify({mode:`edit`,text:n})})},[e,t])}}var DC=`(✓) `;function OC({liveTurns:e,sessionTitle:t,isSelected:n}){let r=(0,O.useRef)(e),i=(0,O.useRef)(!1),a=(0,O.useRef)(document.title.startsWith(DC)?document.title.slice(4):document.title);(0,O.useEffect)(()=>{function e(){i.current&&=(document.title=a.current,!1)}return window.addEventListener(`focus`,e),()=>window.removeEventListener(`focus`,e)},[]),(0,O.useEffect)(()=>{let o=r.current;if(r.current=e,!(e<=o)&&(document.hidden||n===!1)&&(i.current||(a.current=document.title.startsWith(DC)?document.title.slice(4):document.title),document.title=DC+a.current,i.current=!0,typeof Notification<`u`&&Notification.permission===`granted`))try{let e=new Notification(`afk — turn complete`,{body:t?`Session: ${t}`:`A turn finished.`,tag:`afk-turn-complete`});setTimeout(()=>e.close(),5e3)}catch{}},[e,t,n])}function kC(){return(0,z.jsx)(du,{children:(0,z.jsx)(AC,{})})}function AC(){let{sessions:e,loading:t,refresh:n}=mu(),[r,i]=(0,O.useState)({}),a=e.map(e=>({...e,...r[e.id]})),{approvals:o,pendingSessionIds:s}=vu(),{toast:c}=fu(),[l,u]=(0,O.useState)(`sessions`),[d,f]=ld(),[p,m]=(0,O.useState)(),[h,g]=(0,O.useState)(!1),_=(0,O.useRef)(!1),[v,y]=(0,O.useState)(!1),[b,x]=(0,O.useState)(!1),S=a.find(e=>e.id===d),C=(0,O.useRef)({}),w=(0,O.useRef)({}),T=(0,O.useRef)({}),{items:E,totals:D,status:ee,turnActive:te,liveTurns:k,choices:A,progress:ne}=Yu(d,()=>{d&&(C.current[d]=(C.current[d]??0)+1,de(d,T.current[d]),T.current[d]=!1,je.clear(),Me.current=0,Ae.current?.abort())}),{containerRef:ie,scrollToBottom:j,isPinned:ae,showScrollButton:oe,hasNewContent:se,notifyNewContent:ce}=Qu(),{itemsFor:le,addItem:ue,clearItems:de}=sd(),fe=le(d),[pe,me]=(0,O.useState)(null),he=ee===`open`&&S?.mode===`live`?A.find(e=>`${d}:${e.corrId}`!==pe):void 0;(0,O.useEffect)(()=>{me(null),m(void 0),we(void 0)},[d]),(0,O.useEffect)(()=>{pe&&!A.some(e=>`${d}:${e.corrId}`===pe)&&me(null)},[A,d,pe]),(0,O.useEffect)(()=>{ae?j():ce()},[E,fe.length]),(0,O.useEffect)(()=>{j()},[d,j]),(0,O.useEffect)(()=>{d&&u(`sessions`)},[d]);let ge=e=>{Mr(e)&&(u(e),x(!1))},_e=e=>{f(e),u(`sessions`),x(!1)},ve=te,{retry:M,editAndResend:N}=EC(d??``,ve);OC({liveTurns:k,sessionTitle:S?.title,isSelected:!0});let ye=e=>{let t=e instanceof Ec&&typeof e.body?.message==`string`?e.body.message:e instanceof Error?e.message:``;c(t?`Could not rewind: ${t}`:`Could not rewind`,`info`)},[be,xe]=(0,O.useState)(),Se=S?.model??be,[Ce,we]=(0,O.useState)(),Te=(e,t)=>{if(!d)return;t.control.kind===`clear`&&(je.clear(),Me.current=0,T.current[d]=w.current[d]===(C.current[d]??0)),ue(d,e,t,E.length);let n=t.session;n&&i(e=>({...e,[d]:{...e[d],...n.model===void 0?{}:{model:n.model},...n.name===void 0?{}:{title:n.name,titleExplicit:n.nameExplicit===!0},...n.thinkingUi===void 0?{}:{thinkingUi:n.thinkingUi}}}))},Ee=(0,O.useCallback)(e=>{f(e),u(`sessions`),n()},[n,f]),De=(0,O.useCallback)(()=>{f(null),n()},[n,f]),Oe=(0,O.useCallback)(async e=>{try{let t=await U(`/api/sessions/${encodeURIComponent(e)}/resume`,{method:`POST`});f(t.session.id),n()}catch(e){c(e instanceof Error?`Could not resume: ${e.message}`:`Could not resume this session`,`info`)}},[c,n,f]),ke=(0,O.useCallback)(async()=>{if(!_.current){_.current=!0,g(!0);try{let e=await U(`/api/sessions`,{method:`POST`,body:JSON.stringify(be?{model:be}:{})});f(e.session.id),u(`sessions`),x(!1),we(e.session.cwd),await n()}catch(e){c(e instanceof Error?`Could not start chat: ${e.message}`:`Could not start chat`,`info`)}finally{_.current=!1,g(!1)}}},[be,f,n,c]),Ae=(0,O.useRef)(null),je=K({submit:(0,O.useCallback)(async e=>{if(!d)throw Error(`no session`);let t=new AbortController;Ae.current=t,await U(`/api/sessions/${d}/prompt`,{method:`POST`,body:JSON.stringify({text:e}),signal:t.signal})},[d]),isLive:S?.mode===`live`}),Me=(0,O.useRef)(0);(0,O.useEffect)(()=>{Ae.current?.abort(),Ae.current=null,je.clear(),Me.current=0},[d]),(0,O.useEffect)(()=>{k>Me.current&&je.flush(),Me.current=k},[k,je.flush]);let Ne=(0,z.jsx)(Pr,{sessions:a,pendingSessionIds:s,busySessionIds:ve&&d?new Set([d]):void 0,selectedSessionId:d,onSelectSession:_e,onResumeSession:e=>void Oe(e),activeNav:l,onNavChange:ge,collapsed:v,runningSessionId:te?d:null,onNewSession:()=>void ke(),starting:h,onToggleCollapse:()=>y(e=>!e)});return(0,z.jsxs)(`div`,{className:`flex h-dvh overflow-hidden`,children:[(0,z.jsx)(ul,{onNavigate:ge,sessions:a,onSelectSession:_e,...S?.mode===`live`&&d?{onInsertCommand:e=>{u(`sessions`),m({text:e,nonce:Date.now(),sessionId:d})}}:{}}),(0,z.jsx)(fl,{onNavigate:ge}),(0,z.jsx)(`div`,{className:`hidden md:block`,children:Ne}),(0,z.jsx)(su,{open:b,onClose:()=>x(!1),children:(0,z.jsx)(Pr,{sessions:a,pendingSessionIds:s,busySessionIds:ve&&d?new Set([d]):void 0,selectedSessionId:d,onSelectSession:_e,onResumeSession:e=>void Oe(e),activeNav:l,onNavChange:ge,collapsed:!1,onToggleCollapse:()=>void 0,runningSessionId:te?d:null,onNewSession:()=>void ke(),starting:h})}),(0,z.jsxs)(`main`,{className:`flex min-w-0 flex-1 flex-col overflow-hidden`,children:[(0,z.jsxs)(`header`,{className:`flex min-h-14 shrink-0 items-center justify-between gap-2 border-b px-3 md:px-4`,children:[(0,z.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,z.jsx)(cu,{className:`md:hidden`,onClick:()=>x(!0)}),l===`sessions`&&S?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(jC,{status:ee}),(0,z.jsx)(`h1`,{className:`min-w-0 truncate text-sm font-medium text-foreground`,title:S.title??void 0,children:Er(S,`New session`)}),S.model&&(0,z.jsx)(`span`,{className:`hidden shrink-0 rounded bg-secondary px-1.5 py-0.5 font-mono text-[10px] text-secondary-foreground sm:inline-block`,title:`Session model`,children:S.model})]}):(0,z.jsx)(`h1`,{className:`text-sm font-medium text-muted-foreground`,children:Mr(l)?.title})]}),(0,z.jsxs)(`div`,{className:`flex shrink-0 items-center gap-3`,children:[(0,z.jsx)(`button`,{type:`button`,onClick:()=>void ke(),disabled:h,title:`New chat`,"aria-label":`New chat`,className:`inline-flex h-9 w-9 items-center justify-center rounded-md text-muted-foreground hover:bg-secondary hover:text-foreground disabled:opacity-50 md:hidden`,children:(0,z.jsx)(Pt,{className:`h-4 w-4`})}),l===`sessions`&&S&&(0,z.jsx)(_l,{totals:D,className:`hidden lg:flex`}),(0,z.jsx)(`kbd`,{className:`hidden rounded border bg-secondary px-1.5 py-0.5 font-mono text-[10px] text-foreground/70 sm:inline-block`,children:`⌘K`})]})]}),(0,z.jsxs)(`div`,{className:`relative flex flex-1 flex-col overflow-hidden`,children:[(0,z.jsx)(`div`,{ref:ie,"data-testid":`transcript-scroll`,className:`relative flex min-h-0 flex-1 flex-col overflow-y-auto overscroll-contain`,style:oe?{paddingBottom:`2.5rem`}:void 0,children:(0,z.jsxs)(`div`,{className:`flex-1`,children:[l===`sessions`&&(0,z.jsx)(hC,{loading:t,sessions:a,selectedSession:S,items:E,cmdItems:fe,totals:D,status:ee,turnActive:te,thinkingUi:S?.thinkingUi,onNewSession:()=>void ke(),starting:h,onSuggest:e=>{d&&m({text:e,nonce:Date.now(),sessionId:d})},onRetry:()=>{j(),M(MC(E)).catch(ye)},onEdit:e=>{j(),N(e).catch(ye)},isBusy:ve,currentModel:Se,serverCwd:S?.cwd??Ce}),l===`sessions`&&S&&ee===`open`&&(0,z.jsx)(TC,{progress:ne}),l===`memory`&&(0,z.jsx)(Tl,{}),l===`schedules`&&(0,z.jsx)(Fl,{}),l===`jobs`&&(0,z.jsx)(Gl,{}),l===`handoffs`&&(0,z.jsx)(Xl,{}),l===`settings`&&(0,z.jsx)(ru,{})]})}),l===`sessions`&&S&&S.mode===`live`&&(0,z.jsxs)(`div`,{className:`relative shrink-0 pb-[env(safe-area-inset-bottom)]`,"data-testid":`composer-dock`,children:[oe&&(0,z.jsxs)(`button`,{onClick:j,"aria-label":se?`New messages`:`Jump to latest`,className:`absolute -top-10 left-1/2 z-20 flex -translate-x-1/2 items-center gap-1.5 whitespace-nowrap rounded-full bg-brand px-3 py-2 text-xs font-medium text-primary-foreground shadow-lg`,children:[(0,z.jsx)(re,{className:`size-3`}),se?`New messages`:`Jump to latest`]}),o.length>0&&(0,z.jsx)(ou,{approvals:o}),(0,z.jsx)(sl,{sessionId:S.id,prefill:p?.sessionId===S.id?p:void 0,sessionMode:S.mode,isBusy:ve,queue:je,onModelSelect:xe,currentModel:Se,onPromptSent:j,onCommandStart:e=>{j(),/^\/clear(?:\s|$)/.test(e)&&(w.current[S.id]=C.current[S.id]??0)},onCommandOutput:Te,onToast:e=>c(e,`info`),onNavigate:Ee,onSessionEnded:De},S.id)]})]})]}),l===`sessions`&&d&&he&&(0,z.jsx)(wC,{sessionId:d,request:he,onAnswered:()=>me(`${d}:${he.corrId}`)},`${d}:${he.corrId}`)]})}function jC({status:e}){return e===`open`?(0,z.jsx)(`span`,{className:`size-2 rounded-full bg-status-running`,title:`Live`}):e===`connecting`||e===`reconnecting`?(0,z.jsx)(`span`,{className:`size-2 animate-pulse rounded-full bg-status-blocked`,title:e}):e===`ended`?(0,z.jsx)(`span`,{className:`size-2 rounded-full bg-muted-foreground`,title:`Session ended`}):null}function MC(e){for(let t=e.length-1;t>=0;t--)if(e[t].kind===`user`)return e[t].text}var NC=document.getElementById(`root`);if(!NC)throw Error(`Root element #root not found`);(0,qt.createRoot)(NC).render((0,z.jsx)(O.StrictMode,{children:(0,z.jsx)(kC,{})}));export{ap as a,bf as c,ip as i,s as l,iy as n,tp as o,op as r,Ef as s,lS as t};