@davidbalzan/groundwork-console 0.1.4 → 0.1.6

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 (102) hide show
  1. package/README.md +3 -3
  2. package/bin/groundwork-console.mjs +19 -2
  3. package/dist/bus.js +11 -4
  4. package/dist/runs.js +34 -2
  5. package/dist/server.js +43 -1
  6. package/dist/tmux.js +32 -0
  7. package/dist/uploads.js +31 -1
  8. package/package.json +1 -1
  9. package/public/assets/{abnfDiagram-N423BO3Z-DjcI5EtN.js → abnfDiagram-N423BO3Z-CdHjY-Rl.js} +1 -1
  10. package/public/assets/{arc-CLreMRTi.js → arc-BrWBiZCE.js} +1 -1
  11. package/public/assets/architecture-TIHT7OUA-nRAC6cKL.js +1 -0
  12. package/public/assets/{architectureDiagram-T3A2C74G-GVsKASaE.js → architectureDiagram-T3A2C74G-BlL-ALnB.js} +1 -1
  13. package/public/assets/{blockDiagram-VBNYF7ZC-kUIhKmE4.js → blockDiagram-VBNYF7ZC-DZyulKP3.js} +1 -1
  14. package/public/assets/{c4Diagram-5PPSVZJV-BQFI1po0.js → c4Diagram-5PPSVZJV-BMMLwghr.js} +1 -1
  15. package/public/assets/channel-CmRhJjbj.js +1 -0
  16. package/public/assets/{chunk-2GRJ4B5K-CAC9E6Lc.js → chunk-2GRJ4B5K-BzJtMGzP.js} +1 -1
  17. package/public/assets/{chunk-4I5QYGJK-Do801ucH.js → chunk-4I5QYGJK-DwFXVxXp.js} +1 -1
  18. package/public/assets/{chunk-5RXB4S5H-DgGb8Ei0.js → chunk-5RXB4S5H-BohnhuTy.js} +1 -1
  19. package/public/assets/{chunk-6Q2QTUOP-N3v574-9.js → chunk-6Q2QTUOP-BXxDc17T.js} +1 -1
  20. package/public/assets/{chunk-7Z6QIM7H-BGVpdvGU.js → chunk-7Z6QIM7H-k5qXgkB4.js} +1 -1
  21. package/public/assets/{chunk-GF5L2VYU-CyQ84gnX.js → chunk-GF5L2VYU-Cl8z_Pcd.js} +1 -1
  22. package/public/assets/{chunk-I66GZJ75-Bazokq-r.js → chunk-I66GZJ75-CCxcXl9W.js} +1 -1
  23. package/public/assets/{chunk-JQJVKLGR-BXG1sCkI.js → chunk-JQJVKLGR-Dah9RJ-p.js} +1 -1
  24. package/public/assets/{chunk-KBJHAD2P-Bi0agcVN.js → chunk-KBJHAD2P-B1kM7HCm.js} +1 -1
  25. package/public/assets/{chunk-NSK5VX7P-CRNBZms6.js → chunk-NSK5VX7P-Ddw2Pneq.js} +1 -1
  26. package/public/assets/{chunk-QR6OTTB3-BVNnO0nC.js → chunk-QR6OTTB3-SR1VT_gf.js} +1 -1
  27. package/public/assets/{chunk-RYQCIY6F-BDA4j6A-.js → chunk-RYQCIY6F-CsMzInBn.js} +1 -1
  28. package/public/assets/{chunk-UBXNYLIW-DGeBgwe-.js → chunk-UBXNYLIW-CysKciL_.js} +1 -1
  29. package/public/assets/{chunk-W5SLKNZC-xcy3l2eH.js → chunk-W5SLKNZC-CueNCRji.js} +1 -1
  30. package/public/assets/{chunk-WRU74C26-CIO3U59-.js → chunk-WRU74C26-CVxduXc3.js} +1 -1
  31. package/public/assets/{chunk-XXDRQBXY-lsNR2odJ.js → chunk-XXDRQBXY-DOdFQa-t.js} +1 -1
  32. package/public/assets/classDiagram-JCYQIIEL-BhHtVWEo.js +1 -0
  33. package/public/assets/classDiagram-v2-OCEON4UE-BhHtVWEo.js +1 -0
  34. package/public/assets/{cose-bilkent-JH36ORCC-Dgq33rVP.js → cose-bilkent-JH36ORCC-B2Z9nj2r.js} +1 -1
  35. package/public/assets/{cynefin-VYW2F7L2-BHP3DZqn.js → cynefin-VYW2F7L2-CmV_z2bb.js} +1 -1
  36. package/public/assets/{cynefinDiagram-MW4NZA55-BmxpLFSH.js → cynefinDiagram-MW4NZA55-zeWgiEbQ.js} +1 -1
  37. package/public/assets/{dagre-VZM6K2ZE-3sD0lAzD.js → dagre-VZM6K2ZE-CaMVheN4.js} +1 -1
  38. package/public/assets/{diagram-7IWD3JNH-CyaD0_jh.js → diagram-7IWD3JNH-BTJeDC0S.js} +1 -1
  39. package/public/assets/{diagram-B4RE2ZJO-td2N4qE1.js → diagram-B4RE2ZJO-BUtRYMUD.js} +1 -1
  40. package/public/assets/{diagram-LBJQPF4R-D_wWDJ4F.js → diagram-LBJQPF4R-DM--EdGk.js} +1 -1
  41. package/public/assets/{diagram-Q27KOJAE-DKPs8Pt1.js → diagram-Q27KOJAE-Dcp9D1k4.js} +1 -1
  42. package/public/assets/{diagram-UB23O5K3-DMH09z4H.js → diagram-UB23O5K3-DzLpzKu2.js} +1 -1
  43. package/public/assets/{dist-BFMCu1a5.js → dist-DFkPtM9v.js} +1 -1
  44. package/public/assets/{ebnfDiagram-BXEA7PRR-Cl2AEyY9.js → ebnfDiagram-BXEA7PRR-C2lFoa24.js} +1 -1
  45. package/public/assets/{erDiagram-JOGREHBK-CyAJ5sjB.js → erDiagram-JOGREHBK-GvedjkFY.js} +1 -1
  46. package/public/assets/eventmodeling-45OFAUF4-CVrSQ2LC.js +1 -0
  47. package/public/assets/flowDiagram-UKHOOZJN-BWxvJEZS.js +1 -0
  48. package/public/assets/{ganttDiagram-PKOTCBZU-YM9FA8H8.js → ganttDiagram-PKOTCBZU-NzyabXr_.js} +1 -1
  49. package/public/assets/{gitGraph-TEB2WS4Q-ws9TESN2.js → gitGraph-TEB2WS4Q-CAnBW3hc.js} +1 -1
  50. package/public/assets/{gitGraphDiagram-DS77QQ5N-CZu8bXTF.js → gitGraphDiagram-DS77QQ5N-ChFOjBWW.js} +1 -1
  51. package/public/assets/index-CsJm47wv.css +2 -0
  52. package/public/assets/index-DPLoCbew.js +40 -0
  53. package/public/assets/{info-DKCQHKI2-RSQw6txJ.js → info-DKCQHKI2-9HGQNL8q.js} +1 -1
  54. package/public/assets/{infoDiagram-6WML65LV-Bxmxzous.js → infoDiagram-6WML65LV-CSZIpCN6.js} +1 -1
  55. package/public/assets/{ishikawaDiagram-WSZJBQD7-C80fxFdg.js → ishikawaDiagram-WSZJBQD7-m5LI_l0g.js} +1 -1
  56. package/public/assets/{journeyDiagram-NVQOT4AX-DQTG0OdM.js → journeyDiagram-NVQOT4AX-DlhpOOGP.js} +1 -1
  57. package/public/assets/{kanban-definition-27J2QSJJ-B5WxFLvF.js → kanban-definition-27J2QSJJ-CpS1zcAJ.js} +1 -1
  58. package/public/assets/{line-D-jeoEtL.js → line-DqdLvBGQ.js} +1 -1
  59. package/public/assets/{linear-7oKWtFDc.js → linear-ZFSYfg_z.js} +1 -1
  60. package/public/assets/{mermaid-parser.core-DG-hDTtF.js → mermaid-parser.core-B4KSdud0.js} +3 -3
  61. package/public/assets/{mermaid.core-CxtgV-Z8.js → mermaid.core-CSBAT3ig.js} +4 -4
  62. package/public/assets/{mindmap-definition-FAOFIHXS-DyT9O-XZ.js → mindmap-definition-FAOFIHXS-DM39eR7l.js} +1 -1
  63. package/public/assets/{packet-7NZHBO7P-fYfZRQ_r.js → packet-7NZHBO7P-CaKShi1f.js} +1 -1
  64. package/public/assets/{pegDiagram-VL7TDLO6-BIKwmoZk.js → pegDiagram-VL7TDLO6-CeupMOTZ.js} +1 -1
  65. package/public/assets/{pie-RZYD4A2V-hHye9M3B.js → pie-RZYD4A2V-CdyK9ryQ.js} +1 -1
  66. package/public/assets/{pieDiagram-7S7Q4E2Y-B9IF9fZk.js → pieDiagram-7S7Q4E2Y-BTsBpWka.js} +1 -1
  67. package/public/assets/{quadrantDiagram-CIZ2JOQS-CriT2z0D.js → quadrantDiagram-CIZ2JOQS-UamjAqXX.js} +1 -1
  68. package/public/assets/{radar-I7S5WNFK-UHbLAuY0.js → radar-I7S5WNFK-BHPrA655.js} +1 -1
  69. package/public/assets/{railroad-3IZDKUUU-3enNyn3l.js → railroad-3IZDKUUU-BmnKim6H.js} +1 -1
  70. package/public/assets/railroad-abnf-AHOZXSZD-n6VUqVzW.js +1 -0
  71. package/public/assets/railroad-ebnf-EBAXGLYW-Buhu71hT.js +1 -0
  72. package/public/assets/railroad-peg-LSFZ7HO6-DxxRF3eB.js +1 -0
  73. package/public/assets/{railroadDiagram-AXF67PYL-Bkr9TUm0.js → railroadDiagram-AXF67PYL-bbNt4a4d.js} +1 -1
  74. package/public/assets/{requirementDiagram-LRYGKXZP-CEp-ppYZ.js → requirementDiagram-LRYGKXZP-BrwBiGll.js} +1 -1
  75. package/public/assets/{sankeyDiagram-W5VNT64P-CU-4IBMj.js → sankeyDiagram-W5VNT64P-BeKu1QRQ.js} +1 -1
  76. package/public/assets/{sequenceDiagram-SI44F4Z6-Asi631mZ.js → sequenceDiagram-SI44F4Z6-DiBZBmdo.js} +1 -1
  77. package/public/assets/{src-CJc45UuW.js → src-B2eptEoc.js} +1 -1
  78. package/public/assets/{stateDiagram-OKZ733FA-DkDphzLX.js → stateDiagram-OKZ733FA-Tjie08JN.js} +1 -1
  79. package/public/assets/stateDiagram-v2-UEYNNEHI-Bt5as9x1.js +1 -0
  80. package/public/assets/{swimlanes-SLNWSIFB-BVnRBmZ_.js → swimlanes-SLNWSIFB-B_W9IMQM.js} +1 -1
  81. package/public/assets/swimlanesDiagram-ULZ7WXOC-B1GEgwSB.js +8 -0
  82. package/public/assets/{timeline-definition-Z64GVDOM-B3jYbkKD.js → timeline-definition-Z64GVDOM-B3CqBSPD.js} +1 -1
  83. package/public/assets/{treeView-QDETBFTQ-FZndVHM1.js → treeView-QDETBFTQ-BUEh9zyF.js} +1 -1
  84. package/public/assets/{treemap-6X3UGDF4-CKoOe0fa.js → treemap-6X3UGDF4-D_t1bJ-9.js} +1 -1
  85. package/public/assets/{vennDiagram-T6HMQDX7-B7qlSH-y.js → vennDiagram-T6HMQDX7-B1_XMyC0.js} +1 -1
  86. package/public/assets/{wardley-OPB4EBWU-DlWXVdBE.js → wardley-OPB4EBWU-BlIYjwGG.js} +1 -1
  87. package/public/assets/{wardleyDiagram-T6FBY63Y-Dk0uBYWd.js → wardleyDiagram-T6FBY63Y-BUJJz-1q.js} +1 -1
  88. package/public/assets/{xychartDiagram-ELKLHX3M-BDrlWQ3J.js → xychartDiagram-ELKLHX3M-CgWS9hey.js} +1 -1
  89. package/public/index.html +2 -2
  90. package/public/assets/architecture-TIHT7OUA-BxHBbCM_.js +0 -1
  91. package/public/assets/channel-DiEdto8Z.js +0 -1
  92. package/public/assets/classDiagram-JCYQIIEL-DQfOF2lx.js +0 -1
  93. package/public/assets/classDiagram-v2-OCEON4UE-DQfOF2lx.js +0 -1
  94. package/public/assets/eventmodeling-45OFAUF4-CA3qsYNk.js +0 -1
  95. package/public/assets/flowDiagram-UKHOOZJN-BmCE-89P.js +0 -1
  96. package/public/assets/index-C3zhnM_H.css +0 -2
  97. package/public/assets/index-C84drWhX.js +0 -40
  98. package/public/assets/railroad-abnf-AHOZXSZD-CxQOPSx1.js +0 -1
  99. package/public/assets/railroad-ebnf-EBAXGLYW-CQ4P6ont.js +0 -1
  100. package/public/assets/railroad-peg-LSFZ7HO6-sSkmKuAv.js +0 -1
  101. package/public/assets/stateDiagram-v2-UEYNNEHI-DUHdaHkv.js +0 -1
  102. package/public/assets/swimlanesDiagram-ULZ7WXOC-RkUs-XHd.js +0 -8
@@ -0,0 +1,40 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mermaid.core-CSBAT3ig.js","assets/chunk-Y2CYZVJY-DsF7k-Jl.js","assets/src-B2eptEoc.js","assets/chunk-I66GZJ75-CCxcXl9W.js","assets/chunk-NSK5VX7P-Ddw2Pneq.js","assets/dist-DFkPtM9v.js","assets/chunk-4I5QYGJK-DwFXVxXp.js","assets/chunk-WRU74C26-CVxduXc3.js","assets/chunk-7BUUIJ7U-Bb538aSH.js","assets/chunk-UBXNYLIW-CysKciL_.js","assets/chunk-W5SLKNZC-CueNCRji.js","assets/chunk-QR6OTTB3-SR1VT_gf.js","assets/rough.esm-Dy-Kn_BL.js","assets/chunk-7Z6QIM7H-k5qXgkB4.js","assets/line-DqdLvBGQ.js","assets/path-fybaL0A-.js","assets/array-BifhSqXX.js"])))=>i.map(i=>d[i]);
2
+ 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.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})),d=o(((e,t)=>{t.exports=u()})),f=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.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.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`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function ee(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(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 M(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,M(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),M(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=M(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=M(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return M(ee(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 te(e,t,n){if(e==null)return e;var r=[],i=0;return M(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function N(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var P=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)},F={map:te,forEach:function(e,t,n){te(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return te(e,function(){t++}),t},toArray:function(e){return te(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=F,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},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=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.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 E(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)T.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 E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:N}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,P)}catch(e){P(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.8`})),p=o(((e,t)=>{t.exports=f()})),m=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&&j(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),h=o(((e,t)=>{t.exports=m()})),g=o((e=>{var t=p();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`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(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.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 o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.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=c(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=c(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})}}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=c(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=c(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})}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 s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.8`})),_=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=o((e=>{var t=h(),n=p(),r=_();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){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function 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 d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var f=Object.assign,m=Symbol.for(`react.element`),g=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),k=Symbol.for(`react.activity`),A=Symbol.for(`react.memo_cache_sentinel`),j=Symbol.iterator;function ee(e){return typeof e!=`object`||!e?null:(e=j&&e[j]||e[`@@iterator`],typeof e==`function`?e:null)}var M=Symbol.for(`react.client.reference`);function te(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===M?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case k:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?te(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return te(e(t))}catch{}}return null}var N=Array.isArray,P=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne={pending:!1,data:null,method:null,action:null},re=[],ie=-1;function I(e){return{current:e}}function ae(e){0>ie||(e.current=re[ie],re[ie]=null,ie--)}function L(e,t){ie++,re[ie]=e.current,e.current=t}var R=I(null),oe=I(null),se=I(null),ce=I(null);function le(e,t){switch(L(se,t),L(oe,e),L(R,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ae(R),L(R,e)}function ue(){ae(R),ae(oe),ae(se)}function de(e){e.memoizedState!==null&&L(ce,e);var t=R.current,n=Hd(t,e.type);t!==n&&(L(oe,e),L(R,n))}function fe(e){oe.current===e&&(ae(R),ae(oe)),ce.current===e&&(ae(ce),Qf._currentValue=ne)}var pe,me;function he(e){if(pe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);pe=t&&t[1]||``,me=-1<e.stack.indexOf(`
3
+ at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
4
+ `+pe+e+me}var ge=!1;function _e(e,t){if(!e||ge)return``;ge=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
5
+ `),l=s.split(`
6
+ `);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
7
+ `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{ge=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?he(n):``}function ve(e,t){switch(e.tag){case 26:case 27:case 5:return he(e.type);case 16:return he(`Lazy`);case 13:return e.child!==t&&t!==null?he(`Suspense Fallback`):he(`Suspense`);case 19:return he(`SuspenseList`);case 0:case 15:return _e(e.type,!1);case 11:return _e(e.type.render,!1);case 1:return _e(e.type,!0);case 31:return he(`Activity`);default:return``}}function ye(e){try{var t=``,n=null;do t+=ve(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
8
+ Error generating stack: `+e.message+`
9
+ `+e.stack}}var be=Object.prototype.hasOwnProperty,xe=t.unstable_scheduleCallback,Se=t.unstable_cancelCallback,Ce=t.unstable_shouldYield,we=t.unstable_requestPaint,Te=t.unstable_now,Ee=t.unstable_getCurrentPriorityLevel,De=t.unstable_ImmediatePriority,Oe=t.unstable_UserBlockingPriority,ke=t.unstable_NormalPriority,Ae=t.unstable_LowPriority,je=t.unstable_IdlePriority,Me=t.log,Ne=t.unstable_setDisableYieldValue,Pe=null,Fe=null;function Ie(e){if(typeof Me==`function`&&Ne(e),Fe&&typeof Fe.setStrictMode==`function`)try{Fe.setStrictMode(Pe,e)}catch{}}var Le=Math.clz32?Math.clz32:Be,Re=Math.log,ze=Math.LN2;function Be(e){return e>>>=0,e===0?32:31-(Re(e)/ze|0)|0}var Ve=256,He=262144,Ue=4194304;function We(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ge(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=We(n))):i=We(o):i=We(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=We(n))):i=We(o)):i=We(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Ke(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function qe(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 Je(){var e=Ue;return Ue<<=1,!(Ue&62914560)&&(Ue=4194304),e}function Ye(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Xe(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ze(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Le(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&Qe(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Qe(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Le(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function $e(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Le(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function et(e,t){var n=t&-t;return n=n&42?1:tt(n),(n&(e.suspendedLanes|t))===0?n:0}function tt(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 nt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function rt(){var e=F.p;return e===0?(e=window.event,e===void 0?32:mp(e.type)):e}function it(e,t){var n=F.p;try{return F.p=e,t()}finally{F.p=n}}var at=Math.random().toString(36).slice(2),ot=`__reactFiber$`+at,st=`__reactProps$`+at,ct=`__reactContainer$`+at,lt=`__reactEvents$`+at,ut=`__reactListeners$`+at,dt=`__reactHandles$`+at,ft=`__reactResources$`+at,pt=`__reactMarker$`+at;function mt(e){delete e[ot],delete e[st],delete e[lt],delete e[ut],delete e[dt]}function ht(e){var t=e[ot];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ct]||n[ot]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=df(e);e!==null;){if(n=e[ot])return n;e=df(e)}return t}e=n,n=e.parentNode}return null}function gt(e){if(e=e[ot]||e[ct]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function _t(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function vt(e){var t=e[ft];return t||=e[ft]={hoistableStyles:new Map,hoistableScripts:new Map},t}function yt(e){e[pt]=!0}var bt=new Set,xt={};function St(e,t){Ct(e,t),Ct(e+`Capture`,t)}function Ct(e,t){for(xt[e]=t,e=0;e<t.length;e++)bt.add(t[e])}var wt=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]*$`),Tt={},Et={};function Dt(e){return be.call(Et,e)?!0:be.call(Tt,e)?!1:wt.test(e)?Et[e]=!0:(Tt[e]=!0,!1)}function Ot(e,t,n){if(Dt(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 kt(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 At(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 jt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Mt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Nt(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 Pt(e){if(!e._valueTracker){var t=Mt(e)?`checked`:`value`;e._valueTracker=Nt(e,t,``+e[t])}}function Ft(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Mt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}function It(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Lt=/[\n"\\]/g;function Rt(e){return e.replace(Lt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function zt(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=``+jt(t)):e.value!==``+jt(t)&&(e.value=``+jt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Vt(e,o,jt(n)):Vt(e,o,jt(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=``+jt(s):e.removeAttribute(`name`)}function Bt(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)){Pt(e);return}n=n==null?``:``+jt(n),t=t==null?n:``+jt(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),Pt(e)}function Vt(e,t,n){t===`number`&&It(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Ht(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=``+jt(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 Ut(e,t,n){if(t!=null&&(t=``+jt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+jt(n)}function Wt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(N(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=jt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Pt(e)}function Gt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Kt=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 qt(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||Kt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Jt(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]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&qt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&qt(e,o,t[o])}function Yt(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 Xt=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),Zt=/^[\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 Qt(e){return Zt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function $t(){}var en=null;function tn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var nn=null,rn=null;function an(e){var t=gt(e);if(t&&(e=t.stateNode)){var n=e[st]||null;a:switch(e=t.stateNode,t.type){case`input`:if(zt(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="`+Rt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[st]||null;if(!a)throw Error(i(90));zt(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&&Ft(r)}break a;case`textarea`:Ut(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Ht(e,!!n.multiple,t,!1)}}}var on=!1;function sn(e,t,n){if(on)return e(t,n);on=!0;try{return e(t)}finally{if(on=!1,(nn!==null||rn!==null)&&(yu(),nn&&(t=nn,e=rn,rn=nn=null,an(t),e)))for(t=0;t<e.length;t++)an(e[t])}}function cn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[st]||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 ln=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),un=!1;if(ln)try{var dn={};Object.defineProperty(dn,"passive",{get:function(){un=!0}}),window.addEventListener(`test`,dn,dn),window.removeEventListener(`test`,dn,dn)}catch{un=!1}var fn=null,pn=null,mn=null;function hn(){if(mn)return mn;var e,t=pn,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 mn=i.slice(e,1<r?1-r:void 0)}function gn(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 _n(){return!0}function vn(){return!1}function yn(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)?_n:vn,this.isPropagationStopped=vn,this}return f(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=_n)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=_n)},persist:function(){},isPersistent:_n}),t}var bn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},xn=yn(bn),Sn=f({},bn,{view:0,detail:0}),Cn=yn(Sn),wn,Tn,En,Dn=f({},Sn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Rn,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!==En&&(En&&e.type===`mousemove`?(wn=e.screenX-En.screenX,Tn=e.screenY-En.screenY):Tn=wn=0,En=e),wn)},movementY:function(e){return`movementY`in e?e.movementY:Tn}}),On=yn(Dn),kn=yn(f({},Dn,{dataTransfer:0})),An=yn(f({},Sn,{relatedTarget:0})),jn=yn(f({},bn,{animationName:0,elapsedTime:0,pseudoElement:0})),Mn=yn(f({},bn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Nn=yn(f({},bn,{data:0})),Pn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Fn={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`},In={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Ln(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=In[e])?!!t[e]:!1}function Rn(){return Ln}var zn=yn(f({},Sn,{key:function(e){if(e.key){var t=Pn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=gn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Fn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Rn,charCode:function(e){return e.type===`keypress`?gn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?gn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Bn=yn(f({},Dn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Vn=yn(f({},Sn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Rn})),Hn=yn(f({},bn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Un=yn(f({},Dn,{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})),Wn=yn(f({},bn,{newState:0,oldState:0})),Gn=[9,13,27,32],Kn=ln&&`CompositionEvent`in window,qn=null;ln&&`documentMode`in document&&(qn=document.documentMode);var Jn=ln&&`TextEvent`in window&&!qn,Yn=ln&&(!Kn||qn&&8<qn&&11>=qn),Xn=` `,Zn=!1;function Qn(e,t){switch(e){case`keyup`:return Gn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function $n(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var er=!1;function tr(e,t){switch(e){case`compositionend`:return $n(t);case`keypress`:return t.which===32?(Zn=!0,Xn):null;case`textInput`:return e=t.data,e===Xn&&Zn?null:e;default:return null}}function nr(e,t){if(er)return e===`compositionend`||!Kn&&Qn(e,t)?(e=hn(),mn=pn=fn=null,er=!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 Yn&&t.locale!==`ko`?null:t.data;default:return null}}var rr={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 ir(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!rr[e.type]:t===`textarea`}function ar(e,t,n,r){nn?rn?rn.push(r):rn=[r]:nn=r,t=Td(t,`onChange`),0<t.length&&(n=new xn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var or=null,sr=null;function cr(e){vd(e,0)}function lr(e){if(Ft(_t(e)))return e}function ur(e,t){if(e===`change`)return t}var dr=!1;if(ln){var fr;if(ln){var pr=`oninput`in document;if(!pr){var mr=document.createElement(`div`);mr.setAttribute(`oninput`,`return;`),pr=typeof mr.oninput==`function`}fr=pr}else fr=!1;dr=fr&&(!document.documentMode||9<document.documentMode)}function hr(){or&&(or.detachEvent(`onpropertychange`,gr),sr=or=null)}function gr(e){if(e.propertyName===`value`&&lr(sr)){var t=[];ar(t,sr,e,tn(e)),sn(cr,t)}}function _r(e,t,n){e===`focusin`?(hr(),or=t,sr=n,or.attachEvent(`onpropertychange`,gr)):e===`focusout`&&hr()}function vr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return lr(sr)}function yr(e,t){if(e===`click`)return lr(t)}function br(e,t){if(e===`input`||e===`change`)return lr(t)}function xr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Sr=typeof Object.is==`function`?Object.is:xr;function Cr(e,t){if(Sr(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)||!Sr(e[i],t[i]))return!1}return!0}function wr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Tr(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 Er(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Er(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Dr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=It(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=It(e.document)}return t}function Or(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 kr=ln&&`documentMode`in document&&11>=document.documentMode,Ar=null,jr=null,Mr=null,Nr=!1;function Pr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Nr||Ar==null||Ar!==It(r)||(r=Ar,`selectionStart`in r&&Or(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}),Mr&&Cr(Mr,r)||(Mr=r,r=Td(jr,`onSelect`),0<r.length&&(t=new xn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Ar)))}function Fr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Ir={animationend:Fr(`Animation`,`AnimationEnd`),animationiteration:Fr(`Animation`,`AnimationIteration`),animationstart:Fr(`Animation`,`AnimationStart`),transitionrun:Fr(`Transition`,`TransitionRun`),transitionstart:Fr(`Transition`,`TransitionStart`),transitioncancel:Fr(`Transition`,`TransitionCancel`),transitionend:Fr(`Transition`,`TransitionEnd`)},Lr={},Rr={};ln&&(Rr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Ir.animationend.animation,delete Ir.animationiteration.animation,delete Ir.animationstart.animation),`TransitionEvent`in window||delete Ir.transitionend.transition);function zr(e){if(Lr[e])return Lr[e];if(!Ir[e])return e;var t=Ir[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Rr)return Lr[e]=t[n];return e}var Br=zr(`animationend`),Vr=zr(`animationiteration`),Hr=zr(`animationstart`),Ur=zr(`transitionrun`),Wr=zr(`transitionstart`),Gr=zr(`transitioncancel`),Kr=zr(`transitionend`),qr=new Map,Jr=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);Jr.push(`scrollEnd`);function Yr(e,t){qr.set(e,t),St(t,[e])}var Xr=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},Zr=[],Qr=0,$r=0;function ei(){for(var e=Qr,t=$r=Qr=0;t<e;){var n=Zr[t];Zr[t++]=null;var r=Zr[t];Zr[t++]=null;var i=Zr[t];Zr[t++]=null;var a=Zr[t];if(Zr[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&ri(n,i,a)}}function ti(e,t,n,r){Zr[Qr++]=e,Zr[Qr++]=t,Zr[Qr++]=n,Zr[Qr++]=r,$r|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ni(e,t,n,r){return ti(e,t,n,r),ii(e)}function z(e,t){return ti(e,null,null,t),ii(e)}function ri(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Le(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ii(e){if(50<uu)throw uu=0,du=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 oi(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 si(e,t,n,r){return new oi(e,t,n,r)}function ci(e){return e=e.prototype,!(!e||!e.isReactComponent)}function li(e,t){var n=e.alternate;return n===null?(n=si(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function ui(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function di(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)ci(e)&&(s=1);else if(typeof e==`string`)s=Uf(e,n,R.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case k:return e=si(31,n,t,a),e.elementType=k,e.lanes=o,e;case y:return fi(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=si(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=si(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=si(19,n,t,a),e.elementType=E,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:s=10;break a;case S:s=9;break a;case w:s=11;break a;case D:s=14;break a;case O:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=si(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function fi(e,t,n,r){return e=si(7,e,r,t),e.lanes=n,e}function pi(e,t,n){return e=si(6,e,null,t),e.lanes=n,e}function mi(e){var t=si(18,null,null,0);return t.stateNode=e,t}function hi(e,t,n){return t=si(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var gi=new WeakMap;function _i(e,t){if(typeof e==`object`&&e){var n=gi.get(e);return n===void 0?(t={value:e,source:t,stack:ye(t)},gi.set(e,t),t):n}return{value:e,source:t,stack:ye(t)}}var vi=[],yi=0,bi=null,xi=0,Si=[],Ci=0,wi=null,Ti=1,Ei=``;function Di(e,t){vi[yi++]=xi,vi[yi++]=bi,bi=e,xi=t}function Oi(e,t,n){Si[Ci++]=Ti,Si[Ci++]=Ei,Si[Ci++]=wi,wi=e;var r=Ti;e=Ei;var i=32-Le(r)-1;r&=~(1<<i),n+=1;var a=32-Le(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Ti=1<<32-Le(t)+i|n<<i|r,Ei=a+e}else Ti=1<<a|n<<i|r,Ei=e}function ki(e){e.return!==null&&(Di(e,1),Oi(e,1,0))}function Ai(e){for(;e===bi;)bi=vi[--yi],vi[yi]=null,xi=vi[--yi],vi[yi]=null;for(;e===wi;)wi=Si[--Ci],Si[Ci]=null,Ei=Si[--Ci],Si[Ci]=null,Ti=Si[--Ci],Si[Ci]=null}function ji(e,t){Si[Ci++]=Ti,Si[Ci++]=Ei,Si[Ci++]=wi,Ti=t.id,Ei=t.overflow,wi=e}var B=null,Mi=null,V=!1,Ni=null,Pi=!1,Fi=Error(i(519));function Ii(e){throw Hi(_i(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Fi}function Li(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[ot]=e,t[st]=r,n){case`dialog`:$(`cancel`,t),$(`close`,t);break;case`iframe`:case`object`:case`embed`:$(`load`,t);break;case`video`:case`audio`:for(n=0;n<gd.length;n++)$(gd[n],t);break;case`source`:$(`error`,t);break;case`img`:case`image`:case`link`:$(`error`,t),$(`load`,t);break;case`details`:$(`toggle`,t);break;case`input`:$(`invalid`,t),Bt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:$(`invalid`,t);break;case`textarea`:$(`invalid`,t),Wt(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||jd(t.textContent,n)?(r.popover!=null&&($(`beforetoggle`,t),$(`toggle`,t)),r.onScroll!=null&&$(`scroll`,t),r.onScrollEnd!=null&&$(`scrollend`,t),r.onClick!=null&&(t.onclick=$t),t=!0):t=!1,t||Ii(e,!0)}function Ri(e){for(B=e.return;B;)switch(B.tag){case 5:case 31:case 13:Pi=!1;return;case 27:case 3:Pi=!0;return;default:B=B.return}}function zi(e){if(e!==B)return!1;if(!V)return Ri(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`||Ud(e.type,e.memoizedProps)),n=!n),n&&Mi&&Ii(e),Ri(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Mi=uf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Mi=uf(e)}else t===27?(t=Mi,Zd(e.type)?(e=lf,lf=null,Mi=e):Mi=t):Mi=B?cf(e.stateNode.nextSibling):null;return!0}function Bi(){Mi=B=null,V=!1}function Vi(){var e=Ni;return e!==null&&(Xl===null?Xl=e:Xl.push.apply(Xl,e),Ni=null),e}function Hi(e){Ni===null?Ni=[e]:Ni.push(e)}var Ui=I(null),Wi=null,Gi=null;function Ki(e,t,n){L(Ui,t._currentValue),t._currentValue=n}function qi(e){e._currentValue=Ui.current,ae(Ui)}function Ji(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 Yi(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),Ji(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),Ji(s,n,e),s=null}else 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 Xi(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;Sr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===ce.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[Qf]:e.push(Qf))}a=a.return}e!==null&&Yi(t,e,n,r),t.flags|=262144}function Zi(e){for(e=e.firstContext;e!==null;){if(!Sr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Qi(e){Wi=e,Gi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function $i(e){return ta(Wi,e)}function ea(e,t){return Wi===null&&Qi(e),ta(e,t)}function ta(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Gi===null){if(e===null)throw Error(i(308));Gi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Gi=Gi.next=t;return n}var na=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()})}},ra=t.unstable_scheduleCallback,ia=t.unstable_NormalPriority,aa={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function oa(){return{controller:new na,data:new Map,refCount:0}}function sa(e){e.refCount--,e.refCount===0&&ra(ia,function(){e.controller.abort()})}var ca=null,la=0,ua=0,da=null;function fa(e,t){if(ca===null){var n=ca=[];la=0,ua=ud(),da={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return la++,t.then(pa,pa),t}function pa(){if(--la===0&&ca!==null){da!==null&&(da.status=`fulfilled`);var e=ca;ca=null,ua=0,da=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ma(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 ha=P.S;P.S=function(e,t){$l=Te(),typeof t==`object`&&t&&typeof t.then==`function`&&fa(e,t),ha!==null&&ha(e,t)};var ga=I(null);function _a(){var e=ga.current;return e===null?Il.pooledCache:e}function va(e,t){t===null?L(ga,ga.current):L(ga,t.pool)}function ya(){var e=_a();return e===null?null:{parent:aa._currentValue,pool:e}}var ba=Error(i(460)),xa=Error(i(474)),Sa=Error(i(542)),Ca={then:function(){}};function wa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function H(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then($t,$t),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ea(e),e;default:if(typeof t.status==`string`)t.then($t,$t);else{if(e=Il,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,Ea(e),e}throw Ta=t,ba}}function U(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Ta=e,ba):e}}var Ta=null;function W(){if(Ta===null)throw Error(i(459));var e=Ta;return Ta=null,e}function Ea(e){if(e===ba||e===Sa)throw Error(i(483))}var Da=null,Oa=0;function ka(e){var t=Oa;return Oa+=1,Da===null&&(Da=[]),H(Da,e,t)}function Aa(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function G(e,t){throw t.$$typeof===m?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function ja(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=li(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=pi(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===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===O&&U(i)===t.type)?(t=a(t,n.props),Aa(t,n),t.return=e,t):(t=di(n.type,n.key,n.props,null,e.mode,r),Aa(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=hi(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=fi(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=pi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case g:return n=di(t.type,t.key,t.props,null,e.mode,n),Aa(n,t),n.return=e,n;case v:return t=hi(t,e.mode,n),t.return=e,t;case O:return t=U(t),f(e,t,n)}if(N(t)||ee(t))return t=fi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,ka(t),n);if(t.$$typeof===C)return f(e,ea(e,t),n);G(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 g:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case O:return n=U(n),p(e,t,n,r)}if(N(n)||ee(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,ka(n),r);if(n.$$typeof===C)return p(e,t,ea(e,n),r);G(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 g:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case O:return r=U(r),m(e,t,n,r,i)}if(N(r)||ee(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,ka(r),i);if(r.$$typeof===C)return m(e,t,n,ea(t,r),i);G(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&&Di(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&&Di(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),V&&Di(i,h),l}function _(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&&Di(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&&Di(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(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),V&&Di(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case g:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===O&&U(l)===r.type){n(e,r.sibling),c=a(r,o.props),Aa(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===y?(c=fi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=di(o.type,o.key,o.props,null,e.mode,c),Aa(c,o),c.return=e,e=c)}return s(e);case v: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=hi(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=U(o),b(e,r,o,c)}if(N(o))return h(e,r,o,c);if(ee(o)){if(l=ee(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),_(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,ka(o),c);if(o.$$typeof===C)return b(e,r,ea(e,o),c);G(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=pi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Oa=0;var i=b(e,t,n,r);return Da=null,i}catch(t){if(t===ba||t===Sa)throw t;var a=si(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ma=ja(!0),Na=ja(!1),Pa=!1;function Fa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function K(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 Ia(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function La(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Y&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ii(e),ri(e,null,n),t}return ti(e,r,t,n),ii(e)}function Ra(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,$e(e,n)}}function za(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ba=!1;function Va(){if(Ba){var e=da;if(e!==null)throw e}}function Ha(e,t,n,r){Ba=!1;var i=e.updateQueue;Pa=!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 p=s.lane&-536870913,m=p!==s.lane;if(m?(Z&p)===p:(r&p)===p){p!==0&&p===ua&&(Ba=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;p=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,p);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,p=typeof h==`function`?h.call(_,d,p):h,p==null)break a;d=f({},d,p);break a;case 2:Pa=!0}}p=s.callback,p!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[p]:m.push(p))}else m={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Wl|=o,e.lanes=o,e.memoizedState=d}}function Ua(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Wa(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ua(n[e],t)}var Ga=I(null),Ka=I(0);function qa(e,t){e=Hl,L(Ka,e),L(Ga,t),Hl=e|t.baseLanes}function Ja(){L(Ka,Hl),L(Ga,Ga.current)}function Ya(){Hl=Ka.current,ae(Ga),ae(Ka)}var Xa=I(null),Za=null;function Qa(e){var t=e.alternate;L(ro,ro.current&1),L(Xa,e),Za===null&&(t===null||Ga.current!==null||t.memoizedState!==null)&&(Za=e)}function $a(e){L(ro,ro.current),L(Xa,e),Za===null&&(Za=e)}function eo(e){e.tag===22?(L(ro,ro.current),L(Xa,e),Za===null&&(Za=e)):to(e)}function to(){L(ro,ro.current),L(Xa,Xa.current)}function no(e){ae(Xa),Za===e&&(Za=null),ae(ro)}var ro=I(0);function io(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||af(n)||of(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ao=0,q=null,oo=null,so=null,co=!1,lo=!1,uo=!1,fo=0,po=0,mo=null,ho=0;function go(){throw Error(i(321))}function _o(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Sr(e[n],t[n]))return!1;return!0}function vo(e,t,n,r,i,a){return ao=a,q=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,P.H=e===null||e.memoizedState===null?Fs:Is,uo=!1,a=n(r,i),uo=!1,lo&&(a=bo(t,n,r,i)),yo(e),a}function yo(e){P.H=Ps;var t=oo!==null&&oo.next!==null;if(ao=0,so=oo=q=null,co=!1,po=0,mo=null,t)throw Error(i(300));e===null||$s||(e=e.dependencies,e!==null&&Zi(e)&&($s=!0))}function bo(e,t,n,r){q=e;var a=0;do{if(lo&&(mo=null),po=0,lo=!1,25<=a)throw Error(i(301));if(a+=1,so=oo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}P.H=Ls,o=t(n,r)}while(lo);return o}function xo(){var e=P.H,t=e.useState()[0];return t=typeof t.then==`function`?Oo(t):t,e=e.useState()[0],(oo===null?null:oo.memoizedState)!==e&&(q.flags|=1024),t}function So(){var e=fo!==0;return fo=0,e}function Co(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function wo(e){if(co){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}co=!1}ao=0,so=oo=q=null,lo=!1,po=fo=0,mo=null}function To(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return so===null?q.memoizedState=so=e:so=so.next=e,so}function Eo(){if(oo===null){var e=q.alternate;e=e===null?null:e.memoizedState}else e=oo.next;var t=so===null?q.memoizedState:so.next;if(t!==null)so=t,oo=e;else{if(e===null)throw q.alternate===null?Error(i(467)):Error(i(310));oo=e,e={memoizedState:oo.memoizedState,baseState:oo.baseState,baseQueue:oo.baseQueue,queue:oo.queue,next:null},so===null?q.memoizedState=so=e:so=so.next=e}return so}function Do(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Oo(e){var t=po;return po+=1,mo===null&&(mo=[]),e=H(mo,e,t),t=q,(so===null?t.memoizedState:so.next)===null&&(t=t.alternate,P.H=t===null||t.memoizedState===null?Fs:Is),e}function ko(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Oo(e);if(e.$$typeof===C)return $i(e)}throw Error(i(438,String(e)))}function Ao(e){var t=null,n=q.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=q.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=Do(),q.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]=A;return t.index++,n}function jo(e,t){return typeof t==`function`?t(e):t}function Mo(e){return No(Eo(),oo,e)}function No(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?(ao&f)===f:(Z&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===ua&&(d=!0);else if((ao&p)===p){u=u.next,p===ua&&(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,q.lanes|=p,Wl|=p;f=u.action,uo&&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,q.lanes|=f,Wl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Sr(o,e.memoizedState)&&($s=!0,d&&(n=da,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 Po(e){var t=Eo(),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);Sr(o,t.memoizedState)||($s=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Fo(e,t,n){var r=q,a=Eo(),o=V;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Sr((oo||a).memoizedState,n);if(s&&(a.memoizedState=n,$s=!0),a=a.queue,os(Ro.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||so!==null&&so.memoizedState.tag&1){if(r.flags|=2048,ts(9,{destroy:void 0},Lo.bind(null,r,a,n,t),null),Il===null)throw Error(i(349));o||ao&127||Io(r,t,n)}return n}function Io(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=q.updateQueue,t===null?(t=Do(),q.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Lo(e,t,n,r){t.value=n,t.getSnapshot=r,zo(t)&&Bo(e)}function Ro(e,t,n){return n(function(){zo(t)&&Bo(e)})}function zo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Sr(e,n)}catch{return!0}}function Bo(e){var t=z(e,2);t!==null&&mu(t,e,2)}function Vo(e){var t=To();if(typeof e==`function`){var n=e;if(e=n(),uo){Ie(!0);try{n()}finally{Ie(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:jo,lastRenderedState:e},t}function Ho(e,t,n,r){return e.baseState=n,No(e,oo,typeof r==`function`?r:jo)}function Uo(e,t,n,r,a){if(js(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)}};P.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Wo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Wo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=P.T,o={};P.T=o;try{var s=n(i,r),c=P.S;c!==null&&c(o,s),Go(e,t,s)}catch(n){qo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),P.T=a}}else try{a=n(i,r),Go(e,t,a)}catch(n){qo(e,t,n)}}function Go(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Ko(e,t,n)},function(n){return qo(e,t,n)}):Ko(e,t,n)}function Ko(e,t,n){t.status=`fulfilled`,t.value=n,Jo(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Wo(e,n)))}function qo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Jo(t),t=t.next;while(t!==r)}e.action=null}function Jo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Yo(e,t){return t}function Xo(e,t){if(V){var n=Il.formState;if(n!==null){a:{var r=q;if(V){if(Mi){b:{for(var i=Mi,a=Pi;i.nodeType!==8;){if(!a){i=null;break b}if(i=cf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Mi=cf(i.nextSibling),r=i.data===`F!`;break a}}Ii(r)}r=!1}r&&(t=n[0])}}return n=To(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Yo,lastRenderedState:t},n.queue=r,n=Os.bind(null,q,r),r.dispatch=n,r=Vo(!1),a=As.bind(null,q,!1,r.queue),r=To(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Uo.bind(null,q,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Zo(e){return Qo(Eo(),oo,e)}function Qo(e,t,n){if(t=No(e,t,Yo)[0],e=Mo(jo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Oo(t)}catch(e){throw e===ba?Sa:e}else r=t;t=Eo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(q.flags|=2048,ts(9,{destroy:void 0},$o.bind(null,i,n),null)),[r,a,e]}function $o(e,t){e.action=t}function es(e){var t=Eo(),n=oo;if(n!==null)return Qo(t,n,e);Eo(),t=t.memoizedState,n=Eo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function ts(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=q.updateQueue,t===null&&(t=Do(),q.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 ns(){return Eo().memoizedState}function rs(e,t,n,r){var i=To();q.flags|=e,i.memoizedState=ts(1|t,{destroy:void 0},n,r===void 0?null:r)}function is(e,t,n,r){var i=Eo();r=r===void 0?null:r;var a=i.memoizedState.inst;oo!==null&&r!==null&&_o(r,oo.memoizedState.deps)?i.memoizedState=ts(t,a,n,r):(q.flags|=e,i.memoizedState=ts(1|t,a,n,r))}function as(e,t){rs(8390656,8,e,t)}function os(e,t){is(2048,8,e,t)}function ss(e){q.flags|=4;var t=q.updateQueue;if(t===null)t=Do(),q.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function cs(e){var t=Eo().memoizedState;return ss({ref:t,nextImpl:e}),function(){if(Y&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function ls(e,t){return is(4,2,e,t)}function us(e,t){return is(4,4,e,t)}function ds(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 fs(e,t,n){n=n==null?null:n.concat([e]),is(4,4,ds.bind(null,t,e),n)}function ps(){}function ms(e,t){var n=Eo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&_o(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function hs(e,t){var n=Eo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&_o(t,r[1]))return r[0];if(r=e(),uo){Ie(!0);try{e()}finally{Ie(!1)}}return n.memoizedState=[r,t],r}function gs(e,t,n){return n===void 0||ao&1073741824&&!(Z&261930)?e.memoizedState=t:(e.memoizedState=n,e=pu(),q.lanes|=e,Wl|=e,n)}function _s(e,t,n,r){return Sr(n,t)?n:Ga.current===null?!(ao&42)||ao&1073741824&&!(Z&261930)?($s=!0,e.memoizedState=n):(e=pu(),q.lanes|=e,Wl|=e,t):(e=gs(e,n,r),Sr(e,t)||($s=!0),e)}function vs(e,t,n,r,i){var a=F.p;F.p=a!==0&&8>a?a:8;var o=P.T,s={};P.T=s,As(e,!1,t,n);try{var c=i(),l=P.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?ks(e,t,ma(c,r),fu(e)):ks(e,t,r,fu(e))}catch(n){ks(e,t,{then:function(){},status:`rejected`,reason:n},fu())}finally{F.p=a,o!==null&&s.types!==null&&(o.types=s.types),P.T=o}}function ys(){}function bs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=xs(e).queue;vs(e,a,t,ne,n===null?ys:function(){return Ss(e),n(r)})}function xs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jo,lastRenderedState:ne},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ss(e){var t=xs(e);t.next===null&&(t=e.alternate.memoizedState),ks(e,t.next.queue,{},fu())}function Cs(){return $i(Qf)}function ws(){return Eo().memoizedState}function Ts(){return Eo().memoizedState}function Es(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=fu();e=Ia(n);var r=La(t,e,n);r!==null&&(mu(r,t,n),Ra(r,t,n)),t={cache:oa()},e.payload=t;return}t=t.return}}function Ds(e,t,n){var r=fu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},js(e)?Ms(t,n):(n=ni(e,t,n,r),n!==null&&(mu(n,e,r),Ns(n,t,r)))}function Os(e,t,n){ks(e,t,n,fu())}function ks(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(js(e))Ms(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,Sr(s,o))return ti(e,t,i,0),Il===null&&ei(),!1}catch{}if(n=ni(e,t,i,r),n!==null)return mu(n,e,r),Ns(n,t,r),!0}return!1}function As(e,t,n,r){if(r={lane:2,revertLane:ud(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},js(e)){if(t)throw Error(i(479))}else t=ni(e,n,r,2),t!==null&&mu(t,e,2)}function js(e){var t=e.alternate;return e===q||t!==null&&t===q}function Ms(e,t){lo=co=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ns(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,$e(e,n)}}var Ps={readContext:$i,use:ko,useCallback:go,useContext:go,useEffect:go,useImperativeHandle:go,useLayoutEffect:go,useInsertionEffect:go,useMemo:go,useReducer:go,useRef:go,useState:go,useDebugValue:go,useDeferredValue:go,useTransition:go,useSyncExternalStore:go,useId:go,useHostTransitionStatus:go,useFormState:go,useActionState:go,useOptimistic:go,useMemoCache:go,useCacheRefresh:go};Ps.useEffectEvent=go;var Fs={readContext:$i,use:ko,useCallback:function(e,t){return To().memoizedState=[e,t===void 0?null:t],e},useContext:$i,useEffect:as,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),rs(4194308,4,ds.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=To();t=t===void 0?null:t;var r=e();if(uo){Ie(!0);try{e()}finally{Ie(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=To();if(n!==void 0){var i=n(t);if(uo){Ie(!0);try{n(t)}finally{Ie(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Ds.bind(null,q,e),[r.memoizedState,e]},useRef:function(e){var t=To();return e={current:e},t.memoizedState=e},useState:function(e){e=Vo(e);var t=e.queue,n=Os.bind(null,q,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ps,useDeferredValue:function(e,t){return gs(To(),e,t)},useTransition:function(){var e=Vo(!1);return e=vs.bind(null,q,e.queue,!0,!1),To().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=q,a=To();if(V){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Il===null)throw Error(i(349));Z&127||Io(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,as(Ro.bind(null,r,o,e),[e]),r.flags|=2048,ts(9,{destroy:void 0},Lo.bind(null,r,o,n,t),null),n},useId:function(){var e=To(),t=Il.identifierPrefix;if(V){var n=Ei,r=Ti;n=(r&~(1<<32-Le(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=fo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=ho++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Cs,useFormState:Xo,useActionState:Xo,useOptimistic:function(e){var t=To();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=As.bind(null,q,!0,n),n.dispatch=t,[e,t]},useMemoCache:Ao,useCacheRefresh:function(){return To().memoizedState=Es.bind(null,q)},useEffectEvent:function(e){var t=To(),n={impl:e};return t.memoizedState=n,function(){if(Y&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Is={readContext:$i,use:ko,useCallback:ms,useContext:$i,useEffect:os,useImperativeHandle:fs,useInsertionEffect:ls,useLayoutEffect:us,useMemo:hs,useReducer:Mo,useRef:ns,useState:function(){return Mo(jo)},useDebugValue:ps,useDeferredValue:function(e,t){return _s(Eo(),oo.memoizedState,e,t)},useTransition:function(){var e=Mo(jo)[0],t=Eo().memoizedState;return[typeof e==`boolean`?e:Oo(e),t]},useSyncExternalStore:Fo,useId:ws,useHostTransitionStatus:Cs,useFormState:Zo,useActionState:Zo,useOptimistic:function(e,t){return Ho(Eo(),oo,e,t)},useMemoCache:Ao,useCacheRefresh:Ts};Is.useEffectEvent=cs;var Ls={readContext:$i,use:ko,useCallback:ms,useContext:$i,useEffect:os,useImperativeHandle:fs,useInsertionEffect:ls,useLayoutEffect:us,useMemo:hs,useReducer:Po,useRef:ns,useState:function(){return Po(jo)},useDebugValue:ps,useDeferredValue:function(e,t){var n=Eo();return oo===null?gs(n,e,t):_s(n,oo.memoizedState,e,t)},useTransition:function(){var e=Po(jo)[0],t=Eo().memoizedState;return[typeof e==`boolean`?e:Oo(e),t]},useSyncExternalStore:Fo,useId:ws,useHostTransitionStatus:Cs,useFormState:es,useActionState:es,useOptimistic:function(e,t){var n=Eo();return oo===null?(n.baseState=e,[e,n.queue.dispatch]):Ho(n,oo,e,t)},useMemoCache:Ao,useCacheRefresh:Ts};Ls.useEffectEvent=cs;function Rs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:f({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var zs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=fu(),i=Ia(r);i.payload=t,n!=null&&(i.callback=n),t=La(e,i,r),t!==null&&(mu(t,e,r),Ra(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=fu(),i=Ia(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=La(e,i,r),t!==null&&(mu(t,e,r),Ra(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=fu(),r=Ia(n);r.tag=2,t!=null&&(r.callback=t),t=La(e,r,n),t!==null&&(mu(t,e,n),Ra(t,e,n))}};function Bs(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?!Cr(n,r)||!Cr(i,a):!0}function Vs(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&&zs.enqueueReplaceState(t,t.state,null)}function Hs(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=f({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Us(e){Xr(e)}function Ws(e){console.error(e)}function Gs(e){Xr(e)}function Ks(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function qs(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Js(e,t,n){return n=Ia(n),n.tag=3,n.payload={element:null},n.callback=function(){Ks(e,t)},n}function Ys(e){return e=Ia(e),e.tag=3,e}function Xs(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){qs(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){qs(t,n,r),typeof i!=`function`&&(nu===null?nu=new Set([this]):nu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Zs(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Xi(t,n,a,!0),n=Xa.current,n!==null){switch(n.tag){case 31:case 13:return Za===null?Eu():n.alternate===null&&Ul===0&&(Ul=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Ca?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Wu(e,r,a)),!1;case 22:return n.flags|=65536,r===Ca?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)),Wu(e,r,a)),!1}throw Error(i(435,n.tag))}return Wu(e,r,a),Eu(),!1}if(V)return t=Xa.current,t===null?(r!==Fi&&(t=Error(i(423),{cause:r}),Hi(_i(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=_i(r,n),a=Js(e.stateNode,r,a),za(e,a),Ul!==4&&(Ul=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Fi&&(e=Error(i(422),{cause:r}),Hi(_i(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=_i(o,n),Yl===null?Yl=[o]:Yl.push(o),Ul!==4&&(Ul=2),t===null)return!0;r=_i(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Js(n.stateNode,r,e),za(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`&&(nu===null||!nu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Ys(a),Xs(a,e,n,r),za(n,a),!1}n=n.return}while(n!==null);return!1}var Qs=Error(i(461)),$s=!1;function ec(e,t,n,r){t.child=e===null?Na(t,null,n,r):Ma(t,e.child,n,r)}function tc(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 Qi(t),r=vo(e,t,n,o,a,i),s=So(),e!==null&&!$s?(Co(e,t,i),wc(e,t,i)):(V&&s&&ki(t),t.flags|=1,ec(e,t,r,i),t.child)}function nc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ci(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,rc(e,t,a,r,i)):(e=di(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Tc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Cr:n,n(o,r)&&e.ref===t.ref)return wc(e,t,i)}return t.flags|=1,e=li(a,r),e.ref=t.ref,e.return=t,t.child=e}function rc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Cr(a,r)&&e.ref===t.ref){if($s=!1,t.pendingProps=r=a,Tc(e,i))e.flags&131072&&($s=!0);else return t.lanes=e.lanes,wc(e,t,i)}}return dc(e,t,n,r,i)}function ic(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 oc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&va(t,a===null?null:a.cachePool),a===null?Ja():qa(t,a),eo(t);else return r=t.lanes=536870912,oc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&va(t,null),Ja(),to(t)):(va(t,a.cachePool),qa(t,a),to(t),t.memoizedState=null);return ec(e,t,i,n),t.child}function ac(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function oc(e,t,n,r,i){var a=_a();return a=a===null?null:{parent:aa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&va(t,null),Ja(),eo(t),e!==null&&Xi(e,t,r,!0),t.childLanes=i,null}function sc(e,t){return t=bc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function cc(e,t,n){return Ma(t,e.child,null,n),e=sc(t,t.pendingProps),e.flags|=2,no(t),t.memoizedState=null,e}function lc(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=sc(t,r),t.lanes=536870912,ac(null,e);if($a(t),(e=Mi)?(e=rf(e,Pi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:wi===null?null:{id:Ti,overflow:Ei},retryLane:536870912,hydrationErrors:null},n=mi(e),n.return=t,t.child=n,B=t,Mi=null)):e=null,e===null)throw Ii(t);return t.lanes=536870912,null}return sc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if($a(t),a){if(t.flags&256)t.flags&=-257,t=cc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if($s||Xi(e,t,n,!1),a=(n&e.childLanes)!==0,$s||a){if(r=Il,r!==null&&(s=et(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,z(e,s),mu(r,e,s),Qs;Eu(),t=cc(e,t,n)}else e=o.treeContext,Mi=cf(s.nextSibling),B=t,V=!0,Ni=null,Pi=!1,e!==null&&ji(t,e),t=sc(t,r),t.flags|=4096;return t}return e=li(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function uc(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 dc(e,t,n,r,i){return Qi(t),n=vo(e,t,n,r,void 0,i),r=So(),e!==null&&!$s?(Co(e,t,i),wc(e,t,i)):(V&&r&&ki(t),t.flags|=1,ec(e,t,n,i),t.child)}function fc(e,t,n,r,i,a){return Qi(t),t.updateQueue=null,n=bo(t,r,n,i),yo(e),r=So(),e!==null&&!$s?(Co(e,t,a),wc(e,t,a)):(V&&r&&ki(t),t.flags|=1,ec(e,t,n,a),t.child)}function pc(e,t,n,r,i){if(Qi(t),t.stateNode===null){var a=ai,o=n.contextType;typeof o==`object`&&o&&(a=$i(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=zs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Fa(t),o=n.contextType,a.context=typeof o==`object`&&o?$i(o):ai,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Rs(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&&zs.enqueueReplaceState(a,a.state,null),Ha(t,r,a,i),Va(),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=Hs(n,s);a.props=c;var l=a.context,u=n.contextType;o=ai,typeof u==`object`&&u&&(o=$i(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)&&Vs(t,a,r,o),Pa=!1;var f=t.memoizedState;a.state=f,Ha(t,r,a,i),Va(),l=t.memoizedState,s||f!==l||Pa?(typeof d==`function`&&(Rs(t,n,d,r),l=t.memoizedState),(c=Pa||Bs(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,K(e,t),o=t.memoizedProps,u=Hs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ai,typeof l==`object`&&l&&(c=$i(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)&&Vs(t,a,r,c),Pa=!1,f=t.memoizedState,a.state=f,Ha(t,r,a,i),Va();var p=t.memoizedState;o!==d||f!==p||Pa||e!==null&&e.dependencies!==null&&Zi(e.dependencies)?(typeof s==`function`&&(Rs(t,n,s,r),p=t.memoizedState),(u=Pa||Bs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Zi(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,uc(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=Ma(t,e.child,null,i),t.child=Ma(t,null,n,i)):ec(e,t,n,i),t.memoizedState=a.state,e=t.child):e=wc(e,t,i),e}function mc(e,t,n,r){return Bi(),t.flags|=256,ec(e,t,n,r),t.child}var hc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function gc(e){return{baseLanes:e,cachePool:ya()}}function _c(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=ql),e}function vc(e,t,n){var r=t.pendingProps,a=!1,o=!!(t.flags&128),s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:!!(ro.current&2)),s&&(a=!0,t.flags&=-129),s=!!(t.flags&32),t.flags&=-33,e===null){if(V){if(a?Qa(t):to(t),(e=Mi)?(e=rf(e,Pi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:wi===null?null:{id:Ti,overflow:Ei},retryLane:536870912,hydrationErrors:null},n=mi(e),n.return=t,t.child=n,B=t,Mi=null)):e=null,e===null)throw Ii(t);return of(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(to(t),a=t.mode,c=bc({mode:`hidden`,children:c},a),r=fi(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=gc(n),r.childLanes=_c(e,s,n),t.memoizedState=hc,ac(null,r)):(Qa(t),yc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(Qa(t),t.flags&=-257,t=xc(e,t,n)):t.memoizedState===null?(to(t),c=r.fallback,a=t.mode,r=bc({mode:`visible`,children:r.children},a),c=fi(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ma(t,e.child,null,n),r=t.child,r.memoizedState=gc(n),r.childLanes=_c(e,s,n),t.memoizedState=hc,t=ac(null,r)):(to(t),t.child=e.child,t.flags|=128,t=null);else if(Qa(t),of(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Hi({value:r,source:null,stack:null}),t=xc(e,t,n)}else if($s||Xi(e,t,n,!1),s=(n&e.childLanes)!==0,$s||s){if(s=Il,s!==null&&(r=et(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,z(e,r),mu(s,e,r),Qs;af(c)||Eu(),t=xc(e,t,n)}else af(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Mi=cf(c.nextSibling),B=t,V=!0,Ni=null,Pi=!1,e!==null&&ji(t,e),t=yc(t,r.children),t.flags|=4096);return t}return a?(to(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=li(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=fi(c,a,n,null),c.flags|=2):c=li(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,ac(null,r),r=t.child,c=e.child.memoizedState,c===null?c=gc(n):(a=c.cachePool,a===null?a=ya():(l=aa._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=_c(e,s,n),t.memoizedState=hc,ac(e.child,r)):(Qa(t),n=e.child,e=n.sibling,n=li(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function yc(e,t){return t=bc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function bc(e,t){return e=si(22,e,null,t),e.lanes=0,e}function xc(e,t,n){return Ma(t,e.child,null,n),e=yc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function J(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ji(e.return,t,n)}function Sc(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 Cc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=ro.current,s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,L(ro,o),ec(e,t,r,n),r=V?xi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&J(e,n,t);else if(e.tag===19)J(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&io(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Sc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&io(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Sc(t,!0,n,null,a,r);break;case`together`:Sc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function wc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Wl|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(Xi(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=li(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=li(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Tc(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&Zi(e)))}function Ec(e,t,n){switch(t.tag){case 3:le(t,t.stateNode.containerInfo),Ki(t,aa,e.memoizedState.cache),Bi();break;case 27:case 5:de(t);break;case 4:le(t,t.stateNode.containerInfo);break;case 10:Ki(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,$a(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(Qa(t),e=wc(e,t,n),e===null?null:e.sibling):vc(e,t,n):(Qa(t),t.flags|=128,null);Qa(t);break;case 19:var i=!!(e.flags&128);if(r=(n&t.childLanes)!==0,r||=(Xi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Cc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),L(ro,ro.current),r)break;return null;case 22:return t.lanes=0,ic(e,t,n,t.pendingProps);case 24:Ki(t,aa,e.memoizedState.cache)}return wc(e,t,n)}function Dc(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)$s=!0;else{if(!Tc(e,n)&&!(t.flags&128))return $s=!1,Ec(e,t,n);$s=!!(e.flags&131072)}}else $s=!1,V&&t.flags&1048576&&Oi(t,xi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=U(t.elementType),t.type=e,typeof e==`function`)ci(e)?(r=Hs(e,r),t.tag=1,t=pc(null,t,e,r,n)):(t.tag=0,t=dc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=tc(null,t,e,r,n);break a}if(a===D){t.tag=14,t=nc(null,t,e,r,n);break a}}throw t=te(e)||e,Error(i(306,t,``))}}return t;case 0:return dc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Hs(r,t.pendingProps),pc(e,t,r,a,n);case 3:a:{if(le(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,K(e,t),Ha(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Ki(t,aa,r),r!==o.cache&&Yi(t,[aa],n,!0),Va(),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=mc(e,t,r,n);break a}if(r!==a){a=_i(Error(i(424)),t),Hi(a),t=mc(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(Mi=cf(e.firstChild),B=t,V=!0,Ni=null,Pi=!0,n=Na(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Bi(),r===a){t=wc(e,t,n);break a}ec(e,t,r,n)}t=t.child}return t;case 26:return uc(e,t),e===null?(n=kf(t.type,null,t.pendingProps,null))?t.memoizedState=n:V||(n=t.type,e=t.pendingProps,r=Bd(se.current).createElement(n),r[ot]=t,r[st]=e,Pd(r,n,e),yt(r),t.stateNode=r):t.memoizedState=kf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return de(t),e===null&&V&&(r=t.stateNode=ff(t.type,t.pendingProps,se.current),B=t,Pi=!0,a=Mi,Zd(t.type)?(lf=a,Mi=cf(r.firstChild)):Mi=a),ec(e,t,t.pendingProps.children,n),uc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&V&&((a=r=Mi)&&(r=tf(r,t.type,t.pendingProps,Pi),r===null?a=!1:(t.stateNode=r,B=t,Mi=cf(r.firstChild),Pi=!1,a=!0)),a||Ii(t)),de(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Ud(a,o)?r=null:s!==null&&Ud(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=vo(e,t,xo,null,null,n),Qf._currentValue=a),uc(e,t),ec(e,t,r,n),t.child;case 6:return e===null&&V&&((e=n=Mi)&&(n=nf(n,t.pendingProps,Pi),n===null?e=!1:(t.stateNode=n,B=t,Mi=null,e=!0)),e||Ii(t)),null;case 13:return vc(e,t,n);case 4:return le(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ma(t,null,r,n):ec(e,t,r,n),t.child;case 11:return tc(e,t,t.type,t.pendingProps,n);case 7:return ec(e,t,t.pendingProps,n),t.child;case 8:return ec(e,t,t.pendingProps.children,n),t.child;case 12:return ec(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Ki(t,t.type,r.value),ec(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,Qi(t),a=$i(a),r=r(a),t.flags|=1,ec(e,t,r,n),t.child;case 14:return nc(e,t,t.type,t.pendingProps,n);case 15:return rc(e,t,t.type,t.pendingProps,n);case 19:return Cc(e,t,n);case 31:return lc(e,t,n);case 22:return ic(e,t,n,t.pendingProps);case 24:return Qi(t),r=$i(aa),e===null?(a=_a(),a===null&&(a=Il,o=oa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Fa(t),Ki(t,aa,a)):((e.lanes&n)!==0&&(K(e,t),Ha(t,null,null,n),Va()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Ki(t,aa,r),r!==a.cache&&Yi(t,[aa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Ki(t,aa,r))),ec(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Oc(e){e.flags|=4}function kc(e,t,n,r,i){if((t=!!(e.mode&32))&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(Cu())e.flags|=8192;else throw Ta=Ca,xa}}else e.flags&=-16777217}function Ac(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Wf(t)){if(Cu())e.flags|=8192;else throw Ta=Ca,xa}}function jc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Je(),e.lanes|=t,Jl|=t)}function Mc(e,t){if(!V)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Nc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Pc(e,t,n){var r=t.pendingProps;switch(Ai(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Nc(t),null;case 1:return Nc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),qi(aa),ue(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(zi(t)?Oc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Vi())),Nc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Oc(t),o===null?(Nc(t),kc(t,a,null,r,n)):(Nc(t),Ac(t,o))):o?o===e.memoizedState?(Nc(t),t.flags&=-16777217):(Oc(t),Nc(t),Ac(t,o)):(e=e.memoizedProps,e!==r&&Oc(t),Nc(t),kc(t,a,e,r,n)),null;case 27:if(fe(t),n=se.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Oc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Nc(t),null}e=R.current,zi(t)?Li(t,e):(e=ff(a,r,n),t.stateNode=e,Oc(t))}return Nc(t),null;case 5:if(fe(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Oc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Nc(t),null}if(o=R.current,zi(t))Li(t,o);else{var s=Bd(se.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[ot]=t,o[st]=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(Pd(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&&Oc(t)}}return Nc(t),kc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Oc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=se.current,zi(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[ot]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||jd(e.nodeValue,n)),e||Ii(t,!0)}else e=Bd(e).createTextNode(r),e[ot]=t,t.stateNode=e}return Nc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=zi(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[ot]=t}else Bi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Nc(t),e=!1}else n=Vi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(no(t),t):(no(t),null);if(t.flags&128)throw Error(i(558))}return Nc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=zi(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[ot]=t}else Bi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Nc(t),a=!1}else a=Vi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(no(t),t):(no(t),null)}return no(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),jc(t,t.updateQueue),Nc(t),null);case 4:return ue(),e===null&&xd(t.stateNode.containerInfo),Nc(t),null;case 10:return qi(t.type),Nc(t),null;case 19:if(ae(ro),r=t.memoizedState,r===null)return Nc(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)Mc(r,!1);else{if(Ul!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=io(e),o!==null){for(t.flags|=128,Mc(r,!1),e=o.updateQueue,t.updateQueue=e,jc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ui(n,e),n=n.sibling;return L(ro,ro.current&1|2),V&&Di(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Te()>eu&&(t.flags|=128,a=!0,Mc(r,!1),t.lanes=4194304)}}else{if(!a){if(e=io(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,jc(t,e),Mc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!V)return Nc(t),null}else 2*Te()-r.renderingStartTime>eu&&n!==536870912&&(t.flags|=128,a=!0,Mc(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Nc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Te(),e.sibling=null,n=ro.current,L(ro,a?n&1|2:n&1),V&&Di(t,r.treeForkCount),e);case 22:case 23:return no(t),Ya(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Nc(t),t.subtreeFlags&6&&(t.flags|=8192)):Nc(t),n=t.updateQueue,n!==null&&jc(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&&ae(ga),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),qi(aa),Nc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Fc(e,t){switch(Ai(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return qi(aa),ue(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return fe(t),null;case 31:if(t.memoizedState!==null){if(no(t),t.alternate===null)throw Error(i(340));Bi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(no(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Bi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ae(ro),null;case 4:return ue(),null;case 10:return qi(t.type),null;case 22:case 23:return no(t),Ya(),e!==null&&ae(ga),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return qi(aa),null;case 25:return null;default:return null}}function Ic(e,t){switch(Ai(t),t.tag){case 3:qi(aa),ue();break;case 26:case 27:case 5:fe(t);break;case 4:ue();break;case 31:t.memoizedState!==null&&no(t);break;case 13:no(t);break;case 19:ae(ro);break;case 10:qi(t.type);break;case 22:case 23:no(t),Ya(),e!==null&&ae(ga);break;case 24:qi(aa)}}function Lc(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){Q(t,t.return,e)}}function Rc(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){Q(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Q(t,t.return,e)}}function zc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Wa(t,n)}catch(t){Q(e,e.return,t)}}}function Bc(e,t,n){n.props=Hs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Q(e,t,n)}}function Vc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Q(e,t,n)}}function Hc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){Q(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){Q(e,t,n)}else n.current=null}}function Uc(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){Q(e,e.return,t)}}function Wc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[st]=t}catch(t){Q(e,e.return,t)}}function Gc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function Kc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Gc(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&&Zd(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 qc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=$t));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(qc(e,t,n),e=e.sibling;e!==null;)qc(e,t,n),e=e.sibling}function Jc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Jc(e,t,n),e=e.sibling;e!==null;)Jc(e,t,n),e=e.sibling}function Yc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[ot]=e,t[st]=n}catch(t){Q(e,e.return,t)}}var Xc=!1,Zc=!1,Qc=!1,$c=typeof WeakSet==`function`?WeakSet:Set,el=null;function tl(e,t){if(e=e.containerInfo,Rd=sp,e=Dr(e),Or(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(zd={focusedElem:e,selectionRange:n},sp=!1,el=t;el!==null;)if(t=el,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,el=e;else for(;el!==null;){switch(t=el,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Hs(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Q(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ef(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:ef(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,el=e;break}el=t.return}}function nl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:_l(e,n),r&4&&Lc(5,n);break;case 1:if(_l(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Q(n,n.return,e)}else{var i=Hs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Q(n,n.return,e)}}}r&64&&zc(n),r&512&&Vc(n,n.return);break;case 3:if(_l(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{Wa(e,t)}catch(e){Q(n,n.return,e)}}break;case 27:t===null&&r&4&&Yc(n);case 26:case 5:_l(e,n),t===null&&r&4&&Uc(n),r&512&&Vc(n,n.return);break;case 12:_l(e,n);break;case 31:_l(e,n),r&4&&cl(e,n);break;case 13:_l(e,n),r&4&&ll(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=qu.bind(null,n),sf(e,n))));break;case 22:if(r=n.memoizedState!==null||Xc,!r){t=t!==null&&t.memoizedState!==null||Zc,i=Xc;var a=Zc;Xc=r,(Zc=t)&&!a?yl(e,n,!!(n.subtreeFlags&8772)):_l(e,n),Xc=i,Zc=a}break;case 30:break;default:_l(e,n)}}function rl(e){var t=e.alternate;t!==null&&(e.alternate=null,rl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&mt(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 il=null,al=!1;function ol(e,t,n){for(n=n.child;n!==null;)sl(e,t,n),n=n.sibling}function sl(e,t,n){if(Fe&&typeof Fe.onCommitFiberUnmount==`function`)try{Fe.onCommitFiberUnmount(Pe,n)}catch{}switch(n.tag){case 26:Zc||Hc(n,t),ol(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Zc||Hc(n,t);var r=il,i=al;Zd(n.type)&&(il=n.stateNode,al=!1),ol(e,t,n),pf(n.stateNode),il=r,al=i;break;case 5:Zc||Hc(n,t);case 6:if(r=il,i=al,il=null,ol(e,t,n),il=r,al=i,il!==null){if(al)try{(il.nodeType===9?il.body:il.nodeName===`HTML`?il.ownerDocument.body:il).removeChild(n.stateNode)}catch(e){Q(n,t,e)}else try{il.removeChild(n.stateNode)}catch(e){Q(n,t,e)}}break;case 18:il!==null&&(al?(e=il,Qd(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):Qd(il,n.stateNode));break;case 4:r=il,i=al,il=n.stateNode.containerInfo,al=!0,ol(e,t,n),il=r,al=i;break;case 0:case 11:case 14:case 15:Rc(2,n,t),Zc||Rc(4,n,t),ol(e,t,n);break;case 1:Zc||(Hc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Bc(n,t,r)),ol(e,t,n);break;case 21:ol(e,t,n);break;case 22:Zc=(r=Zc)||n.memoizedState!==null,ol(e,t,n),Zc=r;break;default:ol(e,t,n)}}function cl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Np(e)}catch(e){Q(t,t.return,e)}}}function ll(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Np(e)}catch(e){Q(t,t.return,e)}}function ul(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new $c),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new $c),t;default:throw Error(i(435,e.tag))}}function dl(e,t){var n=ul(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Ju.bind(null,e,t);t.then(r,r)}})}function fl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(Zd(c.type)){il=c.stateNode,al=!1;break a}break;case 5:il=c.stateNode,al=!1;break a;case 3:case 4:il=c.stateNode.containerInfo,al=!0;break a}c=c.return}if(il===null)throw Error(i(160));sl(o,s,a),il=null,al=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)ml(t,e),t=t.sibling}var pl=null;function ml(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:fl(t,e),hl(e),r&4&&(Rc(3,e,e.return),Lc(3,e),Rc(5,e,e.return));break;case 1:fl(t,e),hl(e),r&512&&(Zc||n===null||Hc(n,n.return)),r&64&&Xc&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=pl;if(fl(t,e),hl(e),r&512&&(Zc||n===null||Hc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null){if(r===null){if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[pt]||o[ot]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Pd(o,r,n),o[ot]=e,yt(o),r=o;break a;case`link`:var s=Vf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Pd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Vf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Pd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[ot]=e,yt(o),r=o}e.stateNode=r}else Hf(a,e.type,e.stateNode)}else e.stateNode=If(a,r,e.memoizedProps)}else o===r?r===null&&e.stateNode!==null&&Wc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Hf(a,e.type,e.stateNode):If(a,r,e.memoizedProps))}break;case 27:fl(t,e),hl(e),r&512&&(Zc||n===null||Hc(n,n.return)),n!==null&&r&4&&Wc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(fl(t,e),hl(e),r&512&&(Zc||n===null||Hc(n,n.return)),e.flags&32){a=e.stateNode;try{Gt(a,``)}catch(t){Q(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Wc(e,a,n===null?a:n.memoizedProps)),r&1024&&(Qc=!0);break;case 6:if(fl(t,e),hl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Q(e,e.return,t)}}break;case 3:if(Bf=null,a=pl,pl=gf(t.containerInfo),fl(t,e),pl=a,hl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){Q(e,e.return,t)}Qc&&(Qc=!1,gl(e));break;case 4:r=pl,pl=gf(e.stateNode.containerInfo),fl(t,e),hl(e),pl=r;break;case 12:fl(t,e),hl(e);break;case 31:fl(t,e),hl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,dl(e,r)));break;case 13:fl(t,e),hl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Ql=Te()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,dl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=Xc,d=Zc;if(Xc=u||a,Zc=d||l,fl(t,e),Zc=d,Xc=u,hl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||Xc||Zc||vl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Q(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Q(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?$d(m,!0):$d(l.stateNode,!1)}catch(e){Q(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,dl(e,n))));break;case 19:fl(t,e),hl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,dl(e,r)));break;case 30:break;case 21:break;default:fl(t,e),hl(e)}}function hl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Gc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;Jc(e,Kc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Gt(o,``),n.flags&=-33),Jc(e,Kc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;qc(e,Kc(e),s);break;default:throw Error(i(161))}}catch(t){Q(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function gl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;gl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function _l(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)nl(e,t.alternate,t),t=t.sibling}function vl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Rc(4,t,t.return),vl(t);break;case 1:Hc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Bc(t,t.return,n),vl(t);break;case 27:pf(t.stateNode);case 26:case 5:Hc(t,t.return),vl(t);break;case 22:t.memoizedState===null&&vl(t);break;case 30:vl(t);break;default:vl(t)}e=e.sibling}}function yl(e,t,n){for(n&&=!!(t.subtreeFlags&8772),t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:yl(i,a,n),Lc(4,a);break;case 1:if(yl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Q(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Ua(c[i],s)}catch(e){Q(r,r.return,e)}}n&&o&64&&zc(a),Vc(a,a.return);break;case 27:Yc(a);case 26:case 5:yl(i,a,n),n&&r===null&&o&4&&Uc(a),Vc(a,a.return);break;case 12:yl(i,a,n);break;case 31:yl(i,a,n),n&&o&4&&cl(i,a);break;case 13:yl(i,a,n),n&&o&4&&ll(i,a);break;case 22:a.memoizedState===null&&yl(i,a,n),Vc(a,a.return);break;case 30:break;default:yl(i,a,n)}t=t.sibling}}function bl(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&&sa(n))}function xl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&sa(e))}function Sl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Cl(e,t,n,r),t=t.sibling}function Cl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Sl(e,t,n,r),i&2048&&Lc(9,t);break;case 1:Sl(e,t,n,r);break;case 3:Sl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&sa(e)));break;case 12:if(i&2048){Sl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Q(t,t.return,e)}}else Sl(e,t,n,r);break;case 31:Sl(e,t,n,r);break;case 13:Sl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Sl(e,t,n,r):(a._visibility|=2,wl(e,t,n,r,!!(t.subtreeFlags&10256)||!1)):a._visibility&2?Sl(e,t,n,r):Tl(e,t),i&2048&&bl(o,t);break;case 24:Sl(e,t,n,r),i&2048&&xl(t.alternate,t);break;default:Sl(e,t,n,r)}}function wl(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:wl(a,o,s,c,i),Lc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,wl(a,o,s,c,i)):u._visibility&2?wl(a,o,s,c,i):Tl(a,o),i&&l&2048&&bl(o.alternate,o);break;case 24:wl(a,o,s,c,i),i&&l&2048&&xl(o.alternate,o);break;default:wl(a,o,s,c,i)}t=t.sibling}}function Tl(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:Tl(n,r),i&2048&&bl(r.alternate,r);break;case 24:Tl(n,r),i&2048&&xl(r.alternate,r);break;default:Tl(n,r)}t=t.sibling}}var El=8192;function Dl(e,t,n){if(e.subtreeFlags&El)for(e=e.child;e!==null;)Ol(e,t,n),e=e.sibling}function Ol(e,t,n){switch(e.tag){case 26:Dl(e,t,n),e.flags&El&&e.memoizedState!==null&&Gf(n,pl,e.memoizedState,e.memoizedProps);break;case 5:Dl(e,t,n);break;case 3:case 4:var r=pl;pl=gf(e.stateNode.containerInfo),Dl(e,t,n),pl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=El,El=16777216,Dl(e,t,n),El=r):Dl(e,t,n));break;default:Dl(e,t,n)}}function kl(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 Al(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];el=r,Nl(r,e)}kl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)jl(e),e=e.sibling}function jl(e){switch(e.tag){case 0:case 11:case 15:Al(e),e.flags&2048&&Rc(9,e,e.return);break;case 3:Al(e);break;case 12:Al(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ml(e)):Al(e);break;default:Al(e)}}function Ml(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];el=r,Nl(r,e)}kl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Rc(8,t,t.return),Ml(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Ml(t));break;default:Ml(t)}e=e.sibling}}function Nl(e,t){for(;el!==null;){var n=el;switch(n.tag){case 0:case 11:case 15:Rc(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:sa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,el=r;else a:for(n=e;el!==null;){r=el;var i=r.sibling,a=r.return;if(rl(r),r===n){el=null;break a}if(i!==null){i.return=a,el=i;break a}el=a}}}var Pl={getCacheForType:function(e){var t=$i(aa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return $i(aa).controller.signal}},Fl=typeof WeakMap==`function`?WeakMap:Map,Y=0,Il=null,X=null,Z=0,Ll=0,Rl=null,zl=!1,Bl=!1,Vl=!1,Hl=0,Ul=0,Wl=0,Gl=0,Kl=0,ql=0,Jl=0,Yl=null,Xl=null,Zl=!1,Ql=0,$l=0,eu=1/0,tu=null,nu=null,ru=0,iu=null,au=null,ou=0,su=0,cu=null,lu=null,uu=0,du=null;function fu(){return Y&2&&Z!==0?Z&-Z:P.T===null?rt():ud()}function pu(){if(ql===0){if(!(Z&536870912)||V){var e=He;He<<=1,!(He&3932160)&&(He=262144),ql=e}else ql=536870912}return e=Xa.current,e!==null&&(e.flags|=32),ql}function mu(e,t,n){(e===Il&&(Ll===2||Ll===9)||e.cancelPendingCommit!==null)&&(xu(e,0),vu(e,Z,ql,!1)),Xe(e,n),(!(Y&2)||e!==Il)&&(e===Il&&(!(Y&2)&&(Gl|=n),Ul===4&&vu(e,Z,ql,!1)),nd(e))}function hu(e,t,n){if(Y&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||Ke(e,t),a=r?ku(e,t):Du(e,t,!0),o=r;do{if(a===0){Bl&&!r&&vu(e,t,0,!1);break}if(n=e.current.alternate,o&&!_u(n)){a=Du(e,t,!1),o=!1;continue}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=Yl;var l=c.current.memoizedState.isDehydrated;if(l&&(xu(c,s).flags|=256),s=Du(c,s,!1),s!==2){if(Vl&&!l){c.errorRecoveryDisabledLanes|=o,Gl|=o,a=4;break a}o=Xl,Xl=a,o!==null&&(Xl===null?Xl=o:Xl.push.apply(Xl,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){xu(e,0),vu(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)break;case 6:vu(r,t,ql,!zl);break a;case 2:Xl=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=Ql+300-Te(),10<a)){if(vu(r,t,ql,!zl),Ge(r,0,!0)!==0)break a;ou=t,r.timeoutHandle=Kd(gu.bind(null,r,n,Xl,tu,Zl,t,ql,Gl,Jl,zl,o,`Throttled`,-0,0),a);break a}gu(r,n,Xl,tu,Zl,t,ql,Gl,Jl,zl,o,null,-0,0)}break}while(1);nd(e)}function gu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:$t},Ol(t,a,d);var m=(a&62914560)===a?Ql-Te():(a&4194048)===a?$l-Te():0;if(m=qf(d,m),m!==null){ou=a,e.cancelPendingCommit=m(Iu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),vu(e,a,o,!l);return}}Iu(e,t,a,n,r,i,o,s,c)}function _u(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(!Sr(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 vu(e,t,n,r){t&=~Kl,t&=~Gl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Le(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Qe(e,n,t)}function yu(){return Y&6?!0:(rd(0,!1),!1)}function bu(){if(X!==null){if(Ll===0)var e=X.return;else e=X,Gi=Wi=null,wo(e),Da=null,Oa=0,e=X;for(;e!==null;)Ic(e.alternate,e),e=e.return;X=null}}function xu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,qd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),ou=0,bu(),Il=e,X=n=li(e.current,null),Z=t,Ll=0,Rl=null,zl=!1,Bl=Ke(e,t),Vl=!1,Jl=ql=Kl=Gl=Wl=Ul=0,Xl=Yl=null,Zl=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Le(r),a=1<<i;t|=e[i],r&=~a}return Hl=t,ei(),n}function Su(e,t){q=null,P.H=Ps,t===ba||t===Sa?(t=W(),Ll=3):t===xa?(t=W(),Ll=4):Ll=t===Qs?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Rl=t,X===null&&(Ul=1,Ks(e,_i(t,e.current)))}function Cu(){var e=Xa.current;return e===null?!0:(Z&4194048)===Z?Za===null:(Z&62914560)===Z||Z&536870912?e===Za:!1}function wu(){var e=P.H;return P.H=Ps,e===null?Ps:e}function Tu(){var e=P.A;return P.A=Pl,e}function Eu(){Ul=4,zl||(Z&4194048)!==Z&&Xa.current!==null||(Bl=!0),!(Wl&134217727)&&!(Gl&134217727)||Il===null||vu(Il,Z,ql,!1)}function Du(e,t,n){var r=Y;Y|=2;var i=wu(),a=Tu();(Il!==e||Z!==t)&&(tu=null,xu(e,t)),t=!1;var o=Ul;a:do try{if(Ll!==0&&X!==null){var s=X,c=Rl;switch(Ll){case 8:bu(),o=6;break a;case 3:case 2:case 9:case 6:Xa.current===null&&(t=!0);var l=Ll;if(Ll=0,Rl=null,Nu(e,s,c,l),n&&Bl){o=0;break a}break;default:l=Ll,Ll=0,Rl=null,Nu(e,s,c,l)}}Ou(),o=Ul;break}catch(t){Su(e,t)}while(1);return t&&e.shellSuspendCounter++,Gi=Wi=null,Y=r,P.H=i,P.A=a,X===null&&(Il=null,Z=0,ei()),o}function Ou(){for(;X!==null;)ju(X)}function ku(e,t){var n=Y;Y|=2;var r=wu(),a=Tu();Il!==e||Z!==t?(tu=null,eu=Te()+500,xu(e,t)):Bl=Ke(e,t);a:do try{if(Ll!==0&&X!==null){t=X;var o=Rl;b:switch(Ll){case 1:Ll=0,Rl=null,Nu(e,t,o,1);break;case 2:case 9:if(wa(o)){Ll=0,Rl=null,Mu(t);break}t=function(){Ll!==2&&Ll!==9||Il!==e||(Ll=7),nd(e)},o.then(t,t);break a;case 3:Ll=7;break a;case 4:Ll=5;break a;case 7:wa(o)?(Ll=0,Rl=null,Mu(t)):(Ll=0,Rl=null,Nu(e,t,o,7));break;case 5:var s=null;switch(X.tag){case 26:s=X.memoizedState;case 5:case 27:var c=X;if(s?Wf(s):c.stateNode.complete){Ll=0,Rl=null;var l=c.sibling;if(l!==null)X=l;else{var u=c.return;u===null?X=null:(X=u,Pu(u))}break b}}Ll=0,Rl=null,Nu(e,t,o,5);break;case 6:Ll=0,Rl=null,Nu(e,t,o,6);break;case 8:bu(),Ul=6;break a;default:throw Error(i(462))}}Au();break}catch(t){Su(e,t)}while(1);return Gi=Wi=null,P.H=r,P.A=a,Y=n,X===null?(Il=null,Z=0,ei(),Ul):0}function Au(){for(;X!==null&&!Ce();)ju(X)}function ju(e){var t=Dc(e.alternate,e,Hl);e.memoizedProps=e.pendingProps,t===null?Pu(e):X=t}function Mu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=fc(n,t,t.pendingProps,t.type,void 0,Z);break;case 11:t=fc(n,t,t.pendingProps,t.type.render,t.ref,Z);break;case 5:wo(t);default:Ic(n,t),t=X=ui(t,Hl),t=Dc(n,t,Hl)}e.memoizedProps=e.pendingProps,t===null?Pu(e):X=t}function Nu(e,t,n,r){Gi=Wi=null,wo(t),Da=null,Oa=0;var i=t.return;try{if(Zs(e,i,t,n,Z)){Ul=1,Ks(e,_i(n,e.current)),X=null;return}}catch(t){if(i!==null)throw X=i,t;Ul=1,Ks(e,_i(n,e.current)),X=null;return}t.flags&32768?(V||r===1?e=!0:Bl||Z&536870912?e=!1:(zl=e=!0,(r===2||r===9||r===3||r===6)&&(r=Xa.current,r!==null&&r.tag===13&&(r.flags|=16384))),Fu(t,e)):Pu(t)}function Pu(e){var t=e;do{if(t.flags&32768){Fu(t,zl);return}e=t.return;var n=Pc(t.alternate,t,Hl);if(n!==null){X=n;return}if(t=t.sibling,t!==null){X=t;return}X=t=e}while(t!==null);Ul===0&&(Ul=5)}function Fu(e,t){do{var n=Fc(e.alternate,e);if(n!==null){n.flags&=32767,X=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){X=e;return}X=e=n}while(e!==null);Ul=6,X=null}function Iu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Vu();while(ru!==0);if(Y&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=$r,Ze(e,n,o,s,c,l),e===Il&&(X=Il=null,Z=0),au=t,iu=e,ou=n,su=o,cu=a,lu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Yu(ke,function(){return Hu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=P.T,P.T=null,a=F.p,F.p=2,s=Y,Y|=4;try{tl(e,t,n)}finally{Y=s,F.p=a,P.T=r}}ru=1,Lu(),Ru(),zu()}}function Lu(){if(ru===1){ru=0;var e=iu,t=au,n=!!(t.flags&13878);if(t.subtreeFlags&13878||n){n=P.T,P.T=null;var r=F.p;F.p=2;var i=Y;Y|=4;try{ml(t,e);var a=zd,o=Dr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Er(s.ownerDocument.documentElement,s)){if(c!==null&&Or(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 _=Tr(s,h),v=Tr(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}}sp=!!Rd,zd=Rd=null}finally{Y=i,F.p=r,P.T=n}}e.current=t,ru=2}}function Ru(){if(ru===2){ru=0;var e=iu,t=au,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=P.T,P.T=null;var r=F.p;F.p=2;var i=Y;Y|=4;try{nl(e,t.alternate,t)}finally{Y=i,F.p=r,P.T=n}}ru=3}}function zu(){if(ru===4||ru===3){ru=0,we();var e=iu,t=au,n=ou,r=lu;t.subtreeFlags&10256||t.flags&10256?ru=5:(ru=0,au=iu=null,Bu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(nu=null),nt(n),t=t.stateNode,Fe&&typeof Fe.onCommitFiberRoot==`function`)try{Fe.onCommitFiberRoot(Pe,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=P.T,i=F.p,F.p=2,P.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{P.T=t,F.p=i}}ou&3&&Vu(),nd(e),i=e.pendingLanes,n&261930&&i&42?e===du?uu++:(uu=0,du=e):uu=0,rd(0,!1)}}function Bu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,sa(t)))}function Vu(){return Lu(),Ru(),zu(),Hu()}function Hu(){if(ru!==5)return!1;var e=iu,t=su;su=0;var n=nt(ou),r=P.T,a=F.p;try{F.p=32>n?32:n,P.T=null,n=cu,cu=null;var o=iu,s=ou;if(ru=0,au=iu=null,ou=0,Y&6)throw Error(i(331));var c=Y;if(Y|=4,jl(o.current),Cl(o,o.current,s,n),Y=c,rd(0,!1),Fe&&typeof Fe.onPostCommitFiberRoot==`function`)try{Fe.onPostCommitFiberRoot(Pe,o)}catch{}return!0}finally{F.p=a,P.T=r,Bu(e,t)}}function Uu(e,t,n){t=_i(n,t),t=Js(e.stateNode,t,2),e=La(e,t,2),e!==null&&(Xe(e,2),nd(e))}function Q(e,t,n){if(e.tag===3)Uu(e,e,n);else for(;t!==null;){if(t.tag===3){Uu(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(nu===null||!nu.has(r))){e=_i(n,e),n=Ys(2),r=La(t,n,2),r!==null&&(Xs(n,r,t,e),Xe(r,2),nd(r));break}}t=t.return}}function Wu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Fl;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)||(Vl=!0,i.add(n),e=Gu.bind(null,e,t,n),t.then(e,e))}function Gu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Il===e&&(Z&n)===n&&(Ul===4||Ul===3&&(Z&62914560)===Z&&300>Te()-Ql?!(Y&2)&&xu(e,0):Kl|=n,Jl===Z&&(Jl=0)),nd(e)}function Ku(e,t){t===0&&(t=Je()),e=z(e,t),e!==null&&(Xe(e,t),nd(e))}function qu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ku(e,n)}function Ju(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),Ku(e,n)}function Yu(e,t){return xe(e,t)}var Xu=null,Zu=null,Qu=!1,$u=!1,ed=!1,td=0;function nd(e){e!==Zu&&e.next===null&&(Zu===null?Xu=Zu=e:Zu=Zu.next=e),$u=!0,Qu||(Qu=!0,ld())}function rd(e,t){if(!ed&&$u){ed=!0;do for(var n=!1,r=Xu;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Le(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,cd(r,a))}else a=Z,a=Ge(r,r===Il?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ke(r,a)||(n=!0,cd(r,a))}r=r.next}while(n);ed=!1}}function id(){ad()}function ad(){$u=Qu=!1;var e=0;td!==0&&Gd()&&(e=td);for(var t=Te(),n=null,r=Xu;r!==null;){var i=r.next,a=od(r,t);a===0?(r.next=null,n===null?Xu=i:n.next=i,i===null&&(Zu=n)):(n=r,(e!==0||a&3)&&($u=!0)),r=i}ru!==0&&ru!==5||rd(e,!1),td!==0&&(td=0)}function od(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Le(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=qe(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Il,n=Z,n=Ge(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Ll===2||Ll===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Se(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Ke(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Se(r),nt(n)){case 2:case 8:n=Oe;break;case 32:n=ke;break;case 268435456:n=je;break;default:n=ke}return r=sd.bind(null,e),n=xe(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Se(r),e.callbackPriority=2,e.callbackNode=null,2}function sd(e,t){if(ru!==0&&ru!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Vu()&&e.callbackNode!==n)return null;var r=Z;return r=Ge(e,e===Il?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(hu(e,r,t),od(e,Te()),e.callbackNode!=null&&e.callbackNode===n?sd.bind(null,e):null)}function cd(e,t){if(Vu())return null;hu(e,t,!0)}function ld(){Yd(function(){Y&6?xe(De,id):ad()})}function ud(){if(td===0){var e=ua;e===0&&(e=Ve,Ve<<=1,!(Ve&261888)&&(Ve=256)),td=e}return td}function dd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Qt(``+e)}function fd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function pd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=dd((i[st]||null).action),o=r.submitter;o&&(t=(t=o[st]||null)?dd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new xn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(td!==0){var e=o?fd(i,o):new FormData(i);bs(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?fd(i,o):new FormData(i),bs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var md=0;md<Jr.length;md++){var hd=Jr[md];Yr(hd.toLowerCase(),`on`+(hd[0].toUpperCase()+hd.slice(1)))}Yr(Br,`onAnimationEnd`),Yr(Vr,`onAnimationIteration`),Yr(Hr,`onAnimationStart`),Yr(`dblclick`,`onDoubleClick`),Yr(`focusin`,`onFocus`),Yr(`focusout`,`onBlur`),Yr(Ur,`onTransitionRun`),Yr(Wr,`onTransitionStart`),Yr(Gr,`onTransitionCancel`),Yr(Kr,`onTransitionEnd`),Ct(`onMouseEnter`,[`mouseout`,`mouseover`]),Ct(`onMouseLeave`,[`mouseout`,`mouseover`]),Ct(`onPointerEnter`,[`pointerout`,`pointerover`]),Ct(`onPointerLeave`,[`pointerout`,`pointerover`]),St(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),St(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),St(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),St(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),St(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),St(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var gd=`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(` `),_d=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(gd));function vd(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){Xr(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){Xr(e)}i.currentTarget=null,a=c}}}}function $(e,t){var n=t[lt];n===void 0&&(n=t[lt]=new Set);var r=e+`__bubble`;n.has(r)||(Sd(t,e,2,!1),n.add(r))}function yd(e,t,n){var r=0;t&&(r|=4),Sd(n,e,r,t)}var bd=`_reactListening`+Math.random().toString(36).slice(2);function xd(e){if(!e[bd]){e[bd]=!0,bt.forEach(function(t){t!==`selectionchange`&&(_d.has(t)||yd(t,!1,e),yd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[bd]||(t[bd]=!0,yd(`selectionchange`,!1,t))}}function Sd(e,t,n,r){switch(mp(t)){case 2:var i=cp;break;case 8:i=lp;break;default:i=up}n=i.bind(null,t,n,e),i=void 0,!un||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 Cd(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=ht(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}sn(function(){var r=a,i=tn(n),s=[];a:{var c=qr.get(e);if(c!==void 0){var l=xn,u=e;switch(e){case`keypress`:if(gn(n)===0)break a;case`keydown`:case`keyup`:l=zn;break;case`focusin`:u=`focus`,l=An;break;case`focusout`:u=`blur`,l=An;break;case`beforeblur`:case`afterblur`:l=An;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=On;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=kn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Vn;break;case Br:case Vr:case Hr:l=jn;break;case Kr:l=Hn;break;case`scroll`:case`scrollend`:l=Cn;break;case`wheel`:l=Un;break;case`copy`:case`cut`:case`paste`:l=Mn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Bn;break;case`toggle`:case`beforetoggle`:l=Wn}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=cn(m,p),g!=null&&d.push(wd(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(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==en&&(u=n.relatedTarget||n.fromElement)&&(ht(u)||u[ct]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?ht(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=On,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Bn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:_t(l),h=u==null?c:_t(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,ht(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Ed,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Dd(s,c,l,d,!1),u!==null&&f!==null&&Dd(s,f,u,d,!0)}}a:{if(c=r?_t(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=ur;else if(ir(c)){if(dr)v=br;else{v=vr;var y=_r}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Yt(r.elementType)&&(v=ur):v=yr;if(v&&=v(e,r)){ar(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Vt(c,`number`,c.value)}switch(y=r?_t(r):window,e){case`focusin`:(ir(y)||y.contentEditable===`true`)&&(Ar=y,jr=r,Mr=null);break;case`focusout`:Mr=jr=Ar=null;break;case`mousedown`:Nr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Nr=!1,Pr(s,n,i);break;case`selectionchange`:if(kr)break;case`keydown`:case`keyup`:Pr(s,n,i)}var b;if(Kn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else er?Qn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Yn&&n.locale!==`ko`&&(er||x!==`onCompositionStart`?x===`onCompositionEnd`&&er&&(b=hn()):(fn=i,pn=`value`in fn?fn.value:fn.textContent,er=!0)),y=Td(r,x),0<y.length&&(x=new Nn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=$n(n),b!==null&&(x.data=b)))),(b=Jn?tr(e,n):nr(e,n))&&(x=Td(r,`onBeforeInput`),0<x.length&&(y=new Nn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),pd(s,e,r,n,i)}vd(s,t)})}function wd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Td(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=cn(e,n),i!=null&&r.unshift(wd(e,i,a)),i=cn(e,t),i!=null&&r.push(wd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Ed(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Dd(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=cn(n,a),l!=null&&o.unshift(wd(n,l,c))):i||(l=cn(n,a),l!=null&&o.push(wd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Od=/\r\n?/g,kd=/\u0000|\uFFFD/g;function Ad(e){return(typeof e==`string`?e:``+e).replace(Od,`
10
+ `).replace(kd,``)}function jd(e,t){return t=Ad(t),Ad(e)===t}function Md(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Gt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Gt(e,``+r);break;case`className`:kt(e,`class`,r);break;case`tabIndex`:kt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:kt(e,n,r);break;case`style`:Jt(e,r,o);break;case`data`:if(t!==`object`){kt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Qt(``+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`&&Md(e,t,`name`,a.name,a,null),Md(e,t,`formEncType`,a.formEncType,a,null),Md(e,t,`formMethod`,a.formMethod,a,null),Md(e,t,`formTarget`,a.formTarget,a,null)):(Md(e,t,`encType`,a.encType,a,null),Md(e,t,`method`,a.method,a,null),Md(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Qt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=$t);break;case`onScroll`:r!=null&&$(`scroll`,e);break;case`onScrollEnd`:r!=null&&$(`scrollend`,e);break;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));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=Qt(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:$(`beforetoggle`,e),$(`toggle`,e),Ot(e,`popover`,r);break;case`xlinkActuate`:At(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:At(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:At(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:At(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:At(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:At(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:At(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:At(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:At(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Ot(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Xt.get(n)||n,Ot(e,n,r))}}function Nd(e,t,n,r,a,o){switch(n){case`style`:Jt(e,r,o);break;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));e.innerHTML=n}}break;case`children`:typeof r==`string`?Gt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Gt(e,``+r);break;case`onScroll`:r!=null&&$(`scroll`,e);break;case`onScrollEnd`:r!=null&&$(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=$t);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!xt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[st]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):Ot(e,n,r)}}}function Pd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:$(`error`,e),$(`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:Md(e,t,o,s,n,null)}}a&&Md(e,t,`srcSet`,n.srcSet,n,null),r&&Md(e,t,`src`,n.src,n,null);return;case`input`:$(`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:Md(e,t,r,d,n,null)}}Bt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in $(`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:Md(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Ht(e,!!r,n,!0):Ht(e,!!r,t,!1);return;case`textarea`:for(s in $(`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:Md(e,t,s,c,n,null)}Wt(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:Md(e,t,l,r,n,null)}return;case`dialog`:$(`beforetoggle`,e),$(`toggle`,e),$(`cancel`,e),$(`close`,e);break;case`iframe`:case`object`:$(`load`,e);break;case`video`:case`audio`:for(r=0;r<gd.length;r++)$(gd[r],e);break;case`image`:$(`error`,e),$(`load`,e);break;case`details`:$(`toggle`,e);break;case`embed`:case`source`:case`link`:$(`error`,e),$(`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:Md(e,t,u,r,n,null)}return;default:if(Yt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Nd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Md(e,t,c,r,n,null))}function Fd(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)||Md(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Md(e,t,p,m,r,f)}}zt(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)||Md(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`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Md(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Ht(e,!!n,n?[]:``,!1):Ht(e,!!n,t,!0)):Ht(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:Md(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`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Md(e,t,s,a,r,o)}Ut(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:Md(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Md(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)&&Md(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:Md(e,t,u,p,r,m)}return;default:if(Yt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Nd(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||Nd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Md(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||Md(e,t,f,p,r,m)}function Id(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Ld(){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&&Id(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&&Id(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 Rd=null,zd=null;function Bd(e){return e.nodeType===9?e:e.ownerDocument}function Vd(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 Hd(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 Ud(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 Wd=null;function Gd(){var e=window.event;return e&&e.type===`popstate`?e!==Wd&&(Wd=e,!0):(Wd=null,!1)}var Kd=typeof setTimeout==`function`?setTimeout:void 0,qd=typeof clearTimeout==`function`?clearTimeout:void 0,Jd=typeof Promise==`function`?Promise:void 0,Yd=typeof queueMicrotask==`function`?queueMicrotask:Jd===void 0?Kd:function(e){return Jd.resolve(null).then(e).catch(Xd)};function Xd(e){setTimeout(function(){throw e})}function Zd(e){return e===`head`}function Qd(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),Np(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)pf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,pf(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`&&pf(e.ownerDocument.body)}n=i}while(n);Np(t)}function $d(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 ef(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`:ef(n),mt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function tf(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=cf(e.nextSibling),e===null)break}return null}function nf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=cf(e.nextSibling),e===null))return null;return e}function rf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=cf(e.nextSibling),e===null))return null;return e}function af(e){return e.data===`$?`||e.data===`$~`}function of(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function sf(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 cf(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 lf=null;function uf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return cf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function df(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 ff(e,t,n){switch(t=Bd(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 pf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);mt(e)}var mf=new Map,hf=new Set;function gf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _f=F.d;F.d={f:vf,r:yf,D:Sf,C:Cf,L:wf,m:Tf,X:Df,S:Ef,M:Of};function vf(){var e=_f.f(),t=yu();return e||t}function yf(e){var t=gt(e);t!==null&&t.tag===5&&t.type===`form`?Ss(t):_f.r(e)}var bf=typeof document>`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=Rt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),yt(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Rt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Rt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Rt(n.imageSizes)+`"]`)):i+=`[href="`+Rt(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),yt(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Rt(r)+`"][href="`+Rt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=f({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),yt(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=vt(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);yt(c),Pd(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,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=vt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=f({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),yt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=vt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),yt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var a=(a=se.current)?gf(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`?(t=Af(n.href),n=vt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Af(n.href);var o=vt(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(jf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),mf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mf.set(e,n),o||Nf(a,e,n,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`?(t=Pf(n),n=vt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Af(e){return`href="`+Rt(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Pd(t,`link`,n),yt(t),e.head.appendChild(t))}function Pf(e){return`[src="`+Rt(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Rt(n.href)+`"]`);if(r)return t.instance=r,yt(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),yt(r),Pd(r,`style`,a),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Af(n.href);var o=e.querySelector(jf(a));if(o)return t.state.loading|=4,t.instance=o,yt(o),o;r=Mf(n),(a=mf.get(a))&&Rf(r,a),o=(e.ownerDocument||e).createElement(`link`),yt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Pd(o,`link`,r),t.state.loading|=4,Lf(o,n.precedence,e),t.instance=o;case`script`:return o=Pf(n.src),(a=e.querySelector(Ff(o)))?(t.instance=a,yt(a),a):(r=n,(a=mf.get(o))&&(r=f({},n),zf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),yt(a),Pd(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,Lf(r,n.precedence,e));return t.instance}function Lf(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 Rf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Bf=null;function Vf(e,t,n){if(Bf===null){var r=new Map,i=Bf=new Map;i.set(n,r)}else i=Bf,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[ot]||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 Hf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Uf(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 Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(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=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,yt(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),yt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(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=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Kf===0&&(Kf=62500*Ld());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.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=Jf.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 Qf={$$typeof:C,Provider:null,Consumer:null,_currentValue:ne,_currentValue2:ne,_threadCount:0};function $f(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=Ye(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ye(0),this.hiddenUpdates=Ye(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ep(e,t,n,r,i,a,o,s,c,l,u,d){return e=new $f(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=si(3,null,null,t),e.current=a,a.stateNode=e,t=oa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Fa(a),e}function tp(e){return e?(e=ai,e):ai}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=Ia(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=La(e,r,t),n!==null&&(mu(n,e,t),Ra(n,e,t))}function rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ip(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function ap(e){if(e.tag===13||e.tag===31){var t=z(e,67108864);t!==null&&mu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=fu();t=tt(t);var n=z(e,t);n!==null&&mu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=2,up(e,t,n,r)}finally{F.p=a,P.T=i}}function lp(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=8,up(e,t,n,r)}finally{F.p=a,P.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)Cd(e,t,r,fp,n),Cp(e,r);else if(Tp(i,e,t,n,r))r.stopPropagation();else if(Cp(e,r),t&4&&-1<Sp.indexOf(e)){for(;i!==null;){var a=gt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=We(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Le(o);s.entanglements[1]|=c,o&=~c}nd(a),!(Y&6)&&(eu=Te()+500,rd(0,!1))}}break;case 31:case 13:s=z(a,2),s!==null&&mu(s,a,2),yu(),ip(a,2)}if(a=dp(r),a===null&&Cd(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Cd(e,t,r,null,n)}}function dp(e){return e=tn(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=ht(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 fp=e,null}function mp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Ee()){case De:return 2;case Oe:return 8;case ke:case Ae:return 32;case je:return 268435456;default:return 32}default:return 32}}var hp=!1,gp=null,_p=null,vp=null,yp=new Map,bp=new Map,xp=[],Sp=`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 Cp(e,t){switch(e){case`focusin`:case`focusout`:gp=null;break;case`dragenter`:case`dragleave`:_p=null;break;case`mouseover`:case`mouseout`:vp=null;break;case`pointerover`:case`pointerout`:yp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:bp.delete(t.pointerId)}}function wp(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=gt(t),t!==null&&ap(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Tp(e,t,n,r,i){switch(t){case`focusin`:return gp=wp(gp,e,t,n,r,i),!0;case`dragenter`:return _p=wp(_p,e,t,n,r,i),!0;case`mouseover`:return vp=wp(vp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return yp.set(a,wp(yp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,bp.set(a,wp(bp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ep(e){var t=ht(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,it(e.priority,function(){op(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,it(e.priority,function(){op(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 Dp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);en=r,n.target.dispatchEvent(r),en=null}else return t=gt(n),t!==null&&ap(t),e.blockedOn=n,!1;t.shift()}return!0}function Op(e,t,n){Dp(e)&&n.delete(t)}function kp(){hp=!1,gp!==null&&Dp(gp)&&(gp=null),_p!==null&&Dp(_p)&&(_p=null),vp!==null&&Dp(vp)&&(vp=null),yp.forEach(Op),bp.forEach(Op)}function Ap(e,n){e.blockedOn===n&&(e.blockedOn=null,hp||(hp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,kp)))}var jp=null;function Mp(e){jp!==e&&(jp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){jp===e&&(jp=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(pp(r||n)===null)continue;break}var a=gt(n);a!==null&&(e.splice(t,3),t-=3,bs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Np(e){function t(t){return Ap(t,e)}gp!==null&&Ap(gp,e),_p!==null&&Ap(_p,e),vp!==null&&Ap(vp,e),yp.forEach(t),bp.forEach(t);for(var n=0;n<xp.length;n++){var r=xp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<xp.length&&(n=xp[0],n.blockedOn===null);)Ep(n),n.blockedOn===null&&xp.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[st]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[st]||null)s=o.formAction;else if(pp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Mp(n)}}}function Pp(){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 Fp(e){this._internalRoot=e}Ip.prototype.render=Fp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;np(n,fu(),e,t,null,null)},Ip.prototype.unmount=Fp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;np(e.current,2,null,e,null,null),yu(),t[ct]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=rt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xp.length&&t!==0&&t<xp[n].priority;n++);xp.splice(n,0,e),n===0&&Ep(e)}};var Lp=n.version;if(Lp!==`19.2.8`)throw Error(i(527,Lp,`19.2.8`));F.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:d(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.8`,rendererPackageName:`react-dom`,currentDispatcherRef:P,reconcilerVersion:`19.2.8`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{Pe=zp.inject(Rp),Fe=zp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Us,s=Ws,c=Gs;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=ep(e,1,!1,null,null,n,r,null,o,s,c,Pp),e[ct]=t.current,xd(e),new Fp(t)}})),y=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=v()})),b=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,x=/^[\\/]{2}/;function S(e,t){return t+e.replace(/\\/g,`/`)}var C=`popstate`;function w(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function T(e={}){function t(e,t){let{pathname:n=`/`,search:r=``,hash:i=``}=ee(e.location.hash.substring(1));return!n.startsWith(`/`)&&!n.startsWith(`.`)&&(n=`/`+n),A(``,{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||`default`)}function n(e,t){let n=e.document.querySelector(`base`),r=``;if(n&&n.getAttribute(`href`)){let t=e.location.href,n=t.indexOf(`#`);r=n===-1?t:t.slice(0,n)}return r+`#`+(typeof t==`string`?t:j(t))}function r(e,t){D(e.pathname.charAt(0)===`/`,`relative pathnames are not supported in hash history.push(${JSON.stringify(t)})`)}return M(t,n,r,e)}function E(e,t){if(e===!1||e==null)throw Error(t)}function D(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function O(){return Math.random().toString(36).substring(2,10)}function k(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function A(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?ee(t):t,state:n,key:t&&t.key||r||O(),mask:i}}function j({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function ee(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function M(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=w(e)?e:A(h.location,e,t);n&&n(r,e),l=u()+1;let d=k(r,l),f=h.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=w(e)?e:A(h.location,e,t);n&&n(r,e),l=u();let i=k(r,l),d=h.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return te(i,e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(C,d),c=e,()=>{i.removeEventListener(C,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function te(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),E(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:j(t);return i=i.replace(/ $/,`%20`),!n&&x.test(i)&&(i=r+i),new URL(i,r)}var N=l(p(),1),P=class{#e=new Map;constructor(e){if(e)for(let[t,n]of e)this.set(t,n)}get(e){if(this.#e.has(e))return this.#e.get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw Error(`No value found for context`)}set(e,t){this.#e.set(e,t)}},F=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`children`]);function ne(e){return F.has(e)}var re=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`middleware`,`children`]);function ie(e){return re.has(e)}function I(e){return e.index===!0}function ae(e){let t={};return e.Component&&Object.assign(t,{element:N.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:N.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:N.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}function L(e,t=ae,n=[],r={},i=!1){return e.map((e,a)=>{let o=[...n,String(a)],s=typeof e.id==`string`?e.id:o.join(`-`);if(E(e.index!==!0||!e.children,`Cannot specify children on an index route`),E(i||!r[s],`Found a route id collision on id "${s}". Route id's must be globally unique within Data Router usages`),I(e)){let n={...e,id:s};return r[s]=R(n,t(n)),n}{let n={...e,id:s,children:void 0};return r[s]=R(n,t(n)),e.children&&(n.children=L(e.children,t,o,r,i)),n}})}function R(e,t){return Object.assign(e,{...t,...typeof t.lazy==`object`&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function oe(e,t,n=`/`){return se(e,t,n,!1)}function se(e,t,n,r,i){let a=ke((typeof t==`string`?ee(t):t).pathname||`/`,n);if(a==null)return null;let o=i??le(e),s=null,c=Oe(a);for(let e=0;s==null&&e<o.length;++e)s=we(o[e],c,r);return s}function ce(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,loaderData:t[n.id],handle:n.handle}}function le(e){let t=ue(e);return fe(t),t}function ue(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;E(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=ze([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(E(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),ue(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:Se(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=De(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of de(e.path))a(e,t,!0,n)}),t}function de(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=de(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function fe(e){e.sort((e,t)=>e.score===t.score?Ce(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var pe=/^:[\w-]+$/,me=/^:[\w-]+/,he=3.5,ge=3,_e=2,ve=1,ye=10,be=-2,xe=e=>e===`*`;function Se(e,t){let n=e.split(`/`),r=n.length;return n.some(xe)&&(r+=be),t&&(r+=_e),n.filter(e=>!xe(e)).reduce((e,t)=>e+(pe.test(t)?ge:me.test(t)?he:t===``?ve:ye),r)}function Ce(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function we(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?Ee(u,l,s.matcher,s.compiledParams):Te(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=Te({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:ze([a,d.pathname]),pathnameBase:Ve(ze([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=ze([a,d.pathnameBase]))}return o}function Te(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=De(e.path,e.caseSensitive,e.end);return Ee(e,t,n,r)}function Ee(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return e[t]=n&&!i?void 0:(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function De(e,t=!1,n=!0){D(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(?=\/|$|\()/g,`(?:/$1)?`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function Oe(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return D(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function ke(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function Ae({basename:e,pathname:t}){return t===`/`?e:ze([e,t])}var je=e=>b.test(e);function Me(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?ee(e):e,a;return n?(n=Re(n),a=n.startsWith(`/`)?Ne(n.substring(1),`/`):Ne(n,t)):a=t,{pathname:a,search:He(r),hash:Ue(i)}}function Ne(e,t){let n=Be(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function Pe(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Fe(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Ie(e){let t=Fe(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Le(e,t,n,r=!1){let i;typeof e==`string`?i=ee(e):(i={...e},E(!i.pathname||!i.pathname.includes(`?`),Pe(`?`,`pathname`,`search`,i)),E(!i.pathname||!i.pathname.includes(`#`),Pe(`#`,`pathname`,`hash`,i)),E(!i.search||!i.search.includes(`#`),Pe(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=Me(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var Re=e=>e.replace(/[\\/]{2,}/g,`/`),ze=e=>Re(e.join(`/`)),Be=e=>e.replace(/\/+$/,``),Ve=e=>Be(e).replace(/^\/*/,`/`),He=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,Ue=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,We=[`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],Ge=class{status;statusText;data;error;internal;constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Ke(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function qe(e){return ze(e.map(e=>e.route.path).filter(Boolean))||`/`}function Je(e,t){let n=new URL(typeof e==`string`||e instanceof URL?e:e.url),r=typeof t==`string`?ee(t):t;if(n.pathname=r.pathname||`/`,r.search){let e=new URLSearchParams(r.search),t=e.getAll(`index`);e.delete(`index`);for(let n of t.filter(Boolean))e.append(`index`,n);let i=e.toString();n.search=i?`?${i}`:``}else n.search=``;return n.hash=r.hash||``,n}var Ye=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Xe(e,t){let n=e;if(typeof n!=`string`||!b.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Ye)try{let e=new URL(window.location.href),r=x.test(n)?new URL(S(n,e.protocol)):new URL(n),a=ke(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{D(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}var Ze=Symbol(`Uninstrumented`),Qe=new WeakMap;function $e(e,t){let n={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(e=>e({id:t.id,index:t.index,path:t.path,instrument(e){e.lazy!=null&&n.lazy.push(e.lazy),e[`lazy.loader`]!=null&&n[`lazy.loader`].push(e[`lazy.loader`]),e[`lazy.action`]!=null&&n[`lazy.action`].push(e[`lazy.action`]),e[`lazy.middleware`]!=null&&n[`lazy.middleware`].push(e[`lazy.middleware`]),e.middleware!=null&&n.middleware.push(e.middleware),e.loader!=null&&n.loader.push(e.loader),e.action!=null&&n.action.push(e.action)}}));let r={};if(typeof t.lazy==`function`&&n.lazy.length>0){let e=t.lazy;r.lazy=async(...t)=>at(await ot(n.lazy,void 0,()=>e(...t),st))}if(typeof t.lazy==`object`){let e=t.lazy;if(typeof e.middleware==`function`&&n[`lazy.middleware`].length>0){let t=e.middleware;r.lazy=Object.assign(r.lazy||{},{middleware:async(...e)=>at(await ot(n[`lazy.middleware`],void 0,()=>t(...e),st))})}if(typeof e.loader==`function`&&n[`lazy.loader`].length>0){let t=e.loader;r.lazy=Object.assign(r.lazy||{},{loader:async(...e)=>at(await ot(n[`lazy.loader`],void 0,()=>t(...e),st))})}if(typeof e.action==`function`&&n[`lazy.action`].length>0){let t=e.action;r.lazy=Object.assign(r.lazy||{},{action:async(...e)=>at(await ot(n[`lazy.action`],void 0,()=>t(...e),st))})}}if(typeof t.loader==`function`&&n.loader.length>0){let e=tt(t.loader),i=async(...t)=>at(await ot(n.loader,ct(t[0]),()=>e(...t),st));e.hydrate===!0&&(i.hydrate=!0),nt(i,e),r.loader=i}if(typeof t.action==`function`&&n.action.length>0){let e=tt(t.action),i=async(...t)=>at(await ot(n.action,ct(t[0]),()=>e(...t),st));nt(i,e),r.action=i}return t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map(e=>{let t=tt(e),r=async(...e)=>at(await ot(n.middleware,ct(e[0]),()=>t(...e),st));return nt(r,t),r})),r}function et(e,t){let n={navigate:[],fetch:[]};if(t.forEach(e=>e({instrument(e){e.navigate!=null&&n.navigate.push(e.navigate),e.fetch!=null&&n.fetch.push(e.fetch)}})),n.navigate.length>0){let t=tt(e.navigate),r=async(...r)=>{let[i,a]=r,o,s={to:typeof i==`number`||typeof i==`string`?i:i?j(i):`.`,...lt(e,a??{})};return at(await ot(n.navigate,s,async()=>{if(typeof i==`number`)return await t(...r);let n=rt(e,e=>{o=e});try{return await t(...r)}finally{n()}},e=>({...st(e),meta:o})))};nt(r,t),e.navigate=r}if(n.fetch.length>0){let t=tt(e.fetch),r=async(...r)=>{let[i,a,o,s]=r,c;return at(await ot(n.fetch,{href:o??`.`,fetcherKey:i,...lt(e,s??{})},async()=>{let n=rt(e,e=>{c=e});try{return await t(...r)}finally{n()}},e=>({...st(e),meta:c})))};nt(r,t),e.fetch=r}return e}function tt(e){return e[Ze]??e}function nt(e,t){e[Ze]=t}function rt(e,t){return Qe.set(e,t),()=>{Qe.get(e)===t&&Qe.delete(e)}}function it(e){let t=Qe.get(e);return Qe.delete(e),t}function at(e){if(e.type===`error`)throw e.value;return e.value}async function ot(e,t,n,r,i={result:null,innerResult:null},a=e.length-1){let o=e[a];if(o){let s,c=async()=>(s?console.error(`You cannot call instrumented handlers more than once`):s=ot(e,t,n,r,i,a-1),await s,E(i.innerResult,`Expected an inner result`),i.innerResult);try{await o(c,t)}catch(e){console.error(`An instrumentation function threw an error:`,e)}s||await c(),await s}else{try{i.result={type:`success`,value:await n()}}catch(e){i.result={type:`error`,value:e}}i.innerResult=r(i.result,t)}return i.result?i.result:(i.result={type:`error`,value:Error(`No result assigned in instrumentation chain.`)},i.innerResult=r(i.result,t),i.result)}function st(e){return e.type===`error`&&e.value instanceof Error?{status:`error`,error:e.value}:{status:`success`,error:void 0}}function ct(e){let{request:t,context:n,params:r}=e;return{...e,request:ut(t),params:{...r},context:dt(n)}}function lt(e,t){return{currentUrl:j(e.state.location),...`formMethod`in t?{formMethod:t.formMethod}:{},...`formEncType`in t?{formEncType:t.formEncType}:{},...`formData`in t?{formData:t.formData}:{},...`body`in t?{body:t.body}:{}}}function ut(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function dt(e){return{get:t=>e.get(t)}}var ft=[`POST`,`PUT`,`PATCH`,`DELETE`],pt=new Set(ft),mt=[`GET`,...ft],ht=new Set(mt),gt=new Set([301,302,303,307,308]),_t=new Set([307,308]),vt={state:`idle`,location:void 0,matches:void 0,historyAction:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},yt={state:`idle`,data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},bt={state:`unblocked`,proceed:void 0,reset:void 0,location:void 0},xt=`remix-router-transitions`,St=Symbol(`ResetLoaderData`),Ct=class{#e;#t;#n;#r;constructor(e){this.#e=e,this.#t=le(e)}get stableRoutes(){return this.#e}get activeRoutes(){return this.#n??this.#e}get branches(){return this.#r??this.#t}get hasHMRRoutes(){return this.#n!=null}setRoutes(e){this.#e=e,this.#t=le(e)}setHmrRoutes(e){this.#n=e,this.#r=le(e)}commitHmrRoutes(){this.#n&&(this.#e=this.#n,this.#t=this.#r,this.#n=void 0,this.#r=void 0)}};function wt(e){let t=e.window?e.window:typeof window<`u`?window:void 0,n=t!==void 0&&t.document!==void 0&&t.document.createElement!==void 0;E(e.routes.length>0,`You must provide a non-empty routes array to createRouter`);let r=e.hydrationRouteProperties||[],i=e.mapRouteProperties,a=i||(()=>({}));if(e.instrumentations){let t=e.instrumentations;a=e=>({...i?.(e),...$e(t.map(e=>e.route).filter(Boolean),e)})}let o={},s=new Ct(L(e.routes,a,void 0,o)),c=e.basename||`/`;c.startsWith(`/`)||(c=`/${c}`);let l=e.dataStrategy||Vt,u={...e.future},d=null,f=new Set,p=null,m=null,h=null,g=null,_=e.hydrationData!=null,v=se(s.activeRoutes,e.history.location,c,!1,s.branches),y=!1,b=null,x,S;if(v==null&&!e.patchRoutesOnNavigation){let t=fn(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=dn(s.activeRoutes);x=!0,S=!x,v=n,b={[r.id]:t}}else if(v&&!e.hydrationData&&ot(v,s.activeRoutes,e.history.location.pathname).active&&(v=null),!v){x=!1,S=!x,v=[];let t=ot(null,s.activeRoutes,e.history.location.pathname);t.active&&t.matches&&(y=!0,v=t.matches)}else if(v.some(e=>e.route.lazy))x=!1,S=!x;else if(!v.some(e=>kt(e.route)))x=!0,S=!x;else{let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null,r=v;if(n){let e=v.findIndex(e=>n[e.route.id]!==void 0);r=r.slice(0,e+1)}S=!1,x=!0,r.forEach(e=>{let r=At(e.route,t,n);S||=r.renderFallback,x&&=!r.shouldLoad})}let C,w={historyAction:e.history.action,location:e.history.location,matches:v,initialized:x,renderFallback:S,navigation:vt,restoreScrollPosition:e.hydrationData==null&&null,preventScrollReset:!1,revalidation:`idle`,loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||b,fetchers:new Map,blockers:new Map},T=`POP`,O=null,k=!1,j,M=!1,N=new Map,F=null,ne=!1,re=!1,ie=new Set,I=new Map,ae=0,R=-1,oe=new Map,le=new Set,ue=new Map,de=new Map,fe=new Set,pe=new Map,me,he=null;function ge(){if(d=e.history.listen(({action:t,location:n,delta:r})=>{if(me){me(),me=void 0;return}D(pe.size===0||r!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let i=Ze({currentLocation:w.location,nextLocation:n,historyAction:t});if(i&&r!=null){let t=new Promise(e=>{me=e});e.history.go(r*-1),Xe(i,{state:`blocked`,location:n,proceed(){Xe(i,{state:`proceeding`,proceed:void 0,reset:void 0,location:n}),t.then(()=>e.history.go(r))},reset(){let e=new Map(w.blockers);e.set(i,bt),ye({blockers:e})}}),O?.resolve(),O=null;return}return Ce(t,n)}),n){Ln(t,N);let e=()=>Rn(t,N);t.addEventListener(`pagehide`,e),F=()=>t.removeEventListener(`pagehide`,e)}return w.initialized||Ce(`POP`,w.location,{initialHydration:!0}),C}function _e(){d&&d(),F&&F(),f.clear(),j&&j.abort(),w.fetchers.forEach((e,t)=>Ve(w.fetchers,t)),w.blockers.forEach((e,t)=>Ye(t))}function ve(e){if(f.add(e),p){let{newErrors:t}=p;p=null,e(w,{deletedFetchers:[],newErrors:t,viewTransitionOpts:void 0,flushSync:!1})}return()=>f.delete(e)}function ye(e,t={}){e.matches&&=e.matches.map(e=>{let t=o[e.route.id],n=e.route;return n.element!==t.element||n.errorElement!==t.errorElement||n.hydrateFallbackElement!==t.hydrateFallbackElement?{...e,route:t}:e}),w={...w,...e};let n=[],r=[];w.fetchers.forEach((e,t)=>{e.state===`idle`&&(fe.has(t)?n.push(t):r.push(t))}),fe.forEach(e=>{!w.fetchers.has(e)&&!I.has(e)&&n.push(e)}),f.size===0&&(p={newErrors:e.errors??null}),[...f].forEach(r=>r(w,{deletedFetchers:n,newErrors:e.errors??null,viewTransitionOpts:t.viewTransitionOpts,flushSync:t.flushSync===!0})),n.forEach(e=>Ve(w.fetchers,e)),r.forEach(e=>w.fetchers.delete(e))}function be(t,n,{flushSync:r}={}){let i=w.actionData!=null&&w.navigation.formMethod!=null&&Dn(w.navigation.formMethod)&&w.navigation.state===`loading`&&t.state?._isRedirect!==!0,a;a=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:i?w.actionData:null;let o=n.loaderData?cn(w.loaderData,n.loaderData,n.matches||[],n.errors):w.loaderData,c=w.blockers;c.size>0&&!ne&&(c=new Map(c),c.forEach((e,t)=>c.set(t,bt)));let l=!ne&&at(t,n.matches||w.matches),u=k===!0||w.navigation.formMethod!=null&&Dn(w.navigation.formMethod)&&t.state?._isRedirect!==!0;s.commitHmrRoutes(),ne||T===`POP`||(T===`PUSH`?e.history.push(t,t.state):T===`REPLACE`&&e.history.replace(t,t.state));let d;if(T===`POP`){let e=N.get(w.location.pathname);e&&e.has(t.pathname)?d={currentLocation:w.location,nextLocation:t}:N.has(t.pathname)&&(d={currentLocation:t,nextLocation:w.location})}else if(M){let e=N.get(w.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),N.set(w.location.pathname,e)),d={currentLocation:w.location,nextLocation:t}}ye({...n,actionData:a,loaderData:o,historyAction:T,location:t,initialized:!0,renderFallback:!1,navigation:vt,revalidation:`idle`,restoreScrollPosition:l,preventScrollReset:u,blockers:c},{viewTransitionOpts:d,flushSync:r===!0}),T=`POP`,k=!1,M=!1,ne=!1,re=!1,O?.resolve(),O=null,he?.resolve(),he=null}async function xe(t,n){if(O?.resolve(),O=null,typeof t==`number`){O||=zn();let n=O.promise;return e.history.go(t),n}let r=it(C),{path:i,submission:a,error:o}=Dt(!1,Et(w.location,w.matches,c,t,n?.fromRouteId,n?.relative),n),s;n?.mask&&(s={pathname:``,search:``,hash:``,...typeof n.mask==`string`?ee(n.mask):{...w.location.mask,...n.mask}});let l=w.location,u=A(l,i,n&&n.state,void 0,s);u={...u,...e.history.encodeLocation(u)};let d=n&&n.replace!=null?n.replace:void 0,f=`PUSH`;d===!0?f=`REPLACE`:d===!1||a!=null&&Dn(a.formMethod)&&a.formAction===w.location.pathname+w.location.search&&(f=`REPLACE`);let p=n&&`preventScrollReset`in n?n.preventScrollReset===!0:void 0,m=(n&&n.flushSync)===!0,h=Ze({currentLocation:l,nextLocation:u,historyAction:f});if(h){Xe(h,{state:`blocked`,location:u,proceed(){Xe(h,{state:`proceeding`,proceed:void 0,reset:void 0,location:u}),xe(t,n)},reset(){let e=new Map(w.blockers);e.set(h,bt),ye({blockers:e})}});return}await Ce(f,u,{submission:a,pendingError:o,preventScrollReset:p,replace:n&&n.replace,enableViewTransition:n&&n.viewTransition,flushSync:m,callSiteDefaultShouldRevalidate:n&&n.defaultShouldRevalidate,instrumentationNavigateMetaReceiver:r})}function Se(){he||=zn(),Ie(),ye({revalidation:`loading`});let e=he.promise;return w.navigation.state===`submitting`?e:w.navigation.state===`idle`?(Ce(w.historyAction,w.location,{startUninterruptedRevalidation:!0}),e):(Ce(T||w.historyAction,w.navigation.location,{overrideNavigation:w.navigation,enableViewTransition:M===!0}),e)}async function Ce(t,n,r){j&&j.abort(),j=null,T=t,ne=(r&&r.startUninterruptedRevalidation)===!0,rt(w.location,w.matches),k=(r&&r.preventScrollReset)===!0,M=(r&&r.enableViewTransition)===!0;let i=s.activeRoutes,a=r?.initialHydration&&w.matches&&w.matches.length>0&&!y?w.matches:se(i,n,c,!1,s.branches),o=(r&&r.flushSync)===!0;if(a&&w.initialized&&!re&&hn(w.location,n)&&!(r&&r.submission&&Dn(r.submission.formMethod))){be(n,{matches:a},{flushSync:o});return}let l=ot(a,i,n.pathname);if(l.active&&l.matches&&(a=l.matches),r?.instrumentationNavigateMetaReceiver){let t=An(e.history,n,a);r.instrumentationNavigateMetaReceiver(t)}if(!a){let{error:e,notFoundMatches:t,route:r}=Qe(n.pathname);be(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:o});return}let u=r&&r.overrideNavigation?{...r.overrideNavigation,matches:a,historyAction:t}:void 0;j=new AbortController;let d=nn(e.history,n,j.signal,r&&r.submission),f=e.getContext?await e.getContext():new P,p;if(r&&r.pendingError)p=[un(a).route.id,{type:`error`,error:r.pendingError}];else if(r&&r.submission&&Dn(r.submission.formMethod)){let i=await we(d,n,r.submission,a,t,f,l.active,r&&r.initialHydration===!0,{replace:r.replace,flushSync:o});if(i.shortCircuited)return;if(i.pendingActionResult){let[e,t]=i.pendingActionResult;if(bn(t)&&Ke(t.error)&&t.error.status===404){j=null,be(n,{matches:i.matches,loaderData:{},errors:{[e]:t.error}});return}}a=i.matches||a,p=i.pendingActionResult,u=Mn(n,a,t,r.submission),o=!1,l.active=!1,d=nn(e.history,d.url,d.signal)}let{shortCircuited:m,matches:h,loaderData:g,errors:_,workingFetchers:v}=await Te(d,n,a,t,f,l.active,u,r&&r.submission,r&&r.fetcherSubmission,r&&r.replace,r&&r.initialHydration===!0,o,p,r&&r.callSiteDefaultShouldRevalidate);m||(j=null,be(n,{matches:h||a,...ln(p),loaderData:g,errors:_,...v?{fetchers:v}:{}}))}async function we(t,n,i,l,u,d,f,p,m={}){if(Ie(),ye({navigation:Nn(n,l,u,i)},{flushSync:m.flushSync===!0}),f){let e=await st(l,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=dn(s.activeRoutes);return{matches:t,pendingActionResult:[n.id,{type:`error`,error:e.error}]}}let t=un(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:`error`,error:e.error}]}}if(e.matches)l=e.matches;else{let{notFoundMatches:e,error:t,route:r}=Qe(n.pathname);return{matches:e,pendingActionResult:[r.id,{type:`error`,error:t}]}}}let h,g=kn(l,n);if(!g.route.action&&!g.route.lazy)h={type:`error`,error:fn(405,{method:t.method,pathname:n.pathname,routeId:g.route.id})};else{let e=await Pe(t,n,qt(a,o,t,n,l,g,p?[]:r,d),d,null);if(h=e[g.route.id],!h){for(let t of l)if(e[t.route.id]){h=e[t.route.id];break}}if(t.signal.aborted)return{shortCircuited:!0}}if(xn(h)){let n;return n=m&&m.replace!=null?m.replace:tn(h.response.headers.get(`Location`),new URL(t.url),c,e.history)===w.location.pathname+w.location.search,await Ne(t,h,!0,{submission:i,replace:n}),{shortCircuited:!0}}if(bn(h)){let e=un(l,g.route.id);return(m&&m.replace)!==!0&&(T=`PUSH`),{matches:l,pendingActionResult:[e.route.id,h,g.route.id]}}return{matches:l,pendingActionResult:[g.route.id,h]}}async function Te(t,n,i,l,u,d,f,p,m,h,g,_,v,y){let b=f||Mn(n,i,l,p),x=p||m||jn(b),S=!ne&&!g;if(d){if(S){let e=Ee(v);ye({navigation:b,...e===void 0?{}:{actionData:e}},{flushSync:_})}let e=await st(i,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=dn(s.activeRoutes);return{matches:t,loaderData:{},errors:{[n.id]:e.error}}}let t=un(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}if(e.matches)i=e.matches;else{let{error:e,notFoundMatches:t,route:r}=Qe(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}}let C=s.activeRoutes,{dsMatches:T,revalidatingFetchers:E}=Ot(t,u,a,o,e.history,w,i,x,n,g?[]:r,g===!0,re,ie,fe,ue,le,C,c,e.patchRoutesOnNavigation!=null,s.branches,v,y);if(R=++ae,!e.dataStrategy&&!T.some(e=>e.shouldLoad)&&!T.some(e=>e.route.middleware&&e.route.middleware.length>0)&&E.length===0){let e=new Map(w.fetchers),t=Ge(e);return be(n,{matches:i,loaderData:{},errors:v&&bn(v[1])?{[v[0]]:v[1].error}:null,...ln(v),...t?{fetchers:e}:{}},{flushSync:_}),{shortCircuited:!0}}if(S){let e={};if(!d){e.navigation=b;let t=Ee(v);t!==void 0&&(e.actionData=t)}E.length>0&&(e.fetchers=De(E)),ye(e,{flushSync:_})}E.forEach(e=>{Ue(e.key),e.controller&&I.set(e.key,e.controller)});let D=()=>E.forEach(e=>Ue(e.key));j&&j.signal.addEventListener(`abort`,D);let{loaderResults:O,fetcherResults:k}=await Fe(T,E,t,n,u);if(t.signal.aborted)return{shortCircuited:!0};j&&j.signal.removeEventListener(`abort`,D),E.forEach(e=>I.delete(e.key));let A=pn(O);if(A)return await Ne(t,A.result,!0,{replace:h}),{shortCircuited:!0};if(A=pn(k),A)return le.add(A.key),await Ne(t,A.result,!0,{replace:h}),{shortCircuited:!0};let ee=new Map(w.fetchers),{loaderData:M,errors:te}=sn(w,i,O,v,E,k,ee);g&&w.errors&&(te={...w.errors,...te});let N=Ge(ee),P=qe(R,ee),F=N||P||E.length>0;return{matches:i,loaderData:M,errors:te,...F?{workingFetchers:ee}:{}}}function Ee(e){if(e&&!bn(e[1]))return{[e[0]]:e[1].data};if(w.actionData)return Object.keys(w.actionData).length===0?null:w.actionData}function De(e){let t=new Map(w.fetchers);return e.forEach(e=>{let n=t.get(e.key),r=Pn(void 0,n?n.data:void 0);t.set(e.key,r)}),t}async function Oe(t,n,r,i){Ue(t);let a=(i&&i.flushSync)===!0,o=it(C),l=s.activeRoutes,u=Et(w.location,w.matches,c,r,n,i?.relative),d=se(l,u,c,!1,s.branches),f=ot(d,l,u);if(f.active&&f.matches&&(d=f.matches),o&&o(An(e.history,u,d)),!d){Re(t,n,fn(404,{pathname:u}),{flushSync:a});return}let{path:p,submission:m,error:h}=Dt(!0,u,i);if(h){Re(t,n,h,{flushSync:a});return}let g=e.getContext?await e.getContext():new P,_=(i&&i.preventScrollReset)===!0;if(m&&Dn(m.formMethod)){await Ae(t,n,p,d,g,f.active,a,_,m,i&&i.defaultShouldRevalidate);return}ue.set(t,{routeId:n,path:p}),await Me(t,n,p,d,g,f.active,a,_,m)}async function Ae(t,n,i,l,u,d,f,p,m,h){Ie(),ue.delete(t),Le(t,Fn(m,w.fetchers.get(t)),{flushSync:f});let g=new AbortController,_=nn(e.history,i,g.signal,m);if(d){let e=await st(l,new URL(_.url).pathname,_.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){Re(t,n,e.error,{flushSync:f});return}if(e.matches)l=e.matches;else{Re(t,n,fn(404,{pathname:i}),{flushSync:f});return}}let v=kn(l,i);if(!v.route.action&&!v.route.lazy){Re(t,n,fn(405,{method:m.formMethod,pathname:i,routeId:n}),{flushSync:f});return}I.set(t,g);let y=ae,b=qt(a,o,_,i,l,v,r,u),x=await Pe(_,i,b,u,t),S=x[v.route.id];if(!S){for(let e of b)if(x[e.route.id]){S=x[e.route.id];break}}if(_.signal.aborted){I.get(t)===g&&I.delete(t);return}if(fe.has(t)){if(xn(S)||bn(S)){Le(t,In(void 0));return}}else{if(xn(S)){if(I.delete(t),R>y){Le(t,In(void 0));return}return le.add(t),Le(t,Pn(m)),Ne(_,S,!1,{fetcherSubmission:m,preventScrollReset:p})}if(bn(S)){Re(t,n,S.error);return}}let C=w.navigation.location||w.location,D=nn(e.history,C,g.signal),O=s.activeRoutes,k=w.navigation.state===`idle`?w.matches:se(O,w.navigation.location,c,!1,s.branches);E(k,`Didn't find any matches after fetcher action`);let A=++ae;oe.set(t,A);let{dsMatches:ee,revalidatingFetchers:M}=Ot(D,u,a,o,e.history,w,k,m,C,r,!1,re,ie,fe,ue,le,O,c,e.patchRoutesOnNavigation!=null,s.branches,[v.route.id,S],h),te=Pn(m,S.data),N=new Map(w.fetchers);N.set(t,te),M.filter(e=>e.key!==t).forEach(e=>{let t=e.key,n=N.get(t),r=Pn(void 0,n?n.data:void 0);N.set(t,r),Ue(t),e.controller&&I.set(t,e.controller)}),ye({fetchers:N});let P=()=>M.forEach(e=>Ue(e.key));g.signal.addEventListener(`abort`,P);let{loaderResults:F,fetcherResults:ne}=await Fe(ee,M,D,C,u);if(g.signal.aborted)return;g.signal.removeEventListener(`abort`,P),oe.delete(t),I.delete(t),M.forEach(e=>I.delete(e.key));let L=w.fetchers.has(t),ce=e=>{if(!L)return e;let n=new Map(e.fetchers);return n.set(t,In(S.data)),{...e,fetchers:n}},de=pn(F);if(de)return w=ce(w),Ne(D,de.result,!1,{preventScrollReset:p});if(de=pn(ne),de)return le.add(de.key),w=ce(w),Ne(D,de.result,!1,{preventScrollReset:p});let pe=new Map(w.fetchers);L&&pe.set(t,In(S.data));let{loaderData:me,errors:he}=sn(w,k,F,void 0,M,ne,pe);qe(A,pe),w.navigation.state===`loading`&&A>R?(E(T,`Expected pending action`),j&&j.abort(),be(w.navigation.location,{matches:k,loaderData:me,errors:he,fetchers:pe})):(ye({errors:he,loaderData:cn(w.loaderData,me,k,he),fetchers:pe}),re=!1)}async function Me(t,n,i,s,c,l,u,d,f){let p=w.fetchers.get(t);Le(t,Pn(f,p?p.data:void 0),{flushSync:u});let m=new AbortController,h=nn(e.history,i,m.signal);if(l){let e=await st(s,new URL(h.url).pathname,h.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){Re(t,n,e.error,{flushSync:u});return}if(e.matches)s=e.matches;else{Re(t,n,fn(404,{pathname:i}),{flushSync:u});return}}let g=kn(s,i);I.set(t,m);let _=ae,v=await Pe(h,i,qt(a,o,h,i,s,g,r,c),c,t),y=v[g.route.id];if(!y){for(let e of s)if(v[e.route.id]){y=v[e.route.id];break}}if(I.get(t)===m&&I.delete(t),!h.signal.aborted){if(fe.has(t)){Le(t,In(void 0));return}if(xn(y)){if(R>_){Le(t,In(void 0));return}le.add(t),await Ne(h,y,!1,{preventScrollReset:d});return}if(bn(y)){Re(t,n,y.error);return}Le(t,In(y.data))}}async function Ne(r,i,a,{submission:o,fetcherSubmission:s,preventScrollReset:l,replace:u}={}){a||(O?.resolve(),O=null),i.response.headers.has(`X-Remix-Revalidate`)&&(re=!0);let d=i.response.headers.get(`Location`);E(d,`Expected a Location header on the redirect Response`),d=tn(d,new URL(r.url),c,e.history);let f=A(w.location,d,{_isRedirect:!0});if(n){let e=!1;if(i.response.headers.has(`X-Remix-Reload-Document`))e=!0;else if(je(d)){let n=te(t,d,!0);e=n.origin!==t.location.origin||ke(n.pathname,c)==null}if(e){u?t.location.replace(d):t.location.assign(d);return}}j=null;let p=u===!0||i.response.headers.has(`X-Remix-Replace`)?`REPLACE`:`PUSH`,{formMethod:m,formAction:h,formEncType:g}=w.navigation;!o&&!s&&m&&h&&g&&(o=jn(w.navigation));let _=o||s;_t.has(i.response.status)&&_&&Dn(_.formMethod)?await Ce(p,f,{submission:{..._,formAction:d},preventScrollReset:l||k,enableViewTransition:a?M:void 0}):await Ce(p,f,{overrideNavigation:Mn(f,[],p,o),fetcherSubmission:s,preventScrollReset:l||k,enableViewTransition:a?M:void 0})}async function Pe(e,t,n,r,i){let a,o={};try{a=await Jt(l,e,t,n,i,r,!1)}catch(e){return n.filter(e=>e.shouldLoad).forEach(t=>{o[t.route.id]={type:`error`,error:e}}),o}if(e.signal.aborted)return o;if(!Dn(e.method))for(let e of n){if(a[e.route.id]?.type===`error`)break;!a.hasOwnProperty(e.route.id)&&!w.loaderData.hasOwnProperty(e.route.id)&&(!w.errors||!w.errors.hasOwnProperty(e.route.id))&&e.shouldCallHandler()&&(a[e.route.id]={type:`error`,result:Error(`No result returned from dataStrategy for route ${e.route.id}`)})}for(let[t,r]of Object.entries(a))if(yn(r)){let i=r.result;o[t]={type:`redirect`,response:Qt(i,e,t,n,c)}}else o[t]=await Zt(r);return o}async function Fe(e,t,n,r,i){let a=Pe(n,r,e,i,null),o=Promise.all(t.map(async e=>{if(e.matches&&e.match&&e.request&&e.controller){let t=(await Pe(e.request,e.path,e.matches,i,e.key))[e.match.route.id];return{[e.key]:t}}return Promise.resolve({[e.key]:{type:`error`,error:fn(404,{pathname:e.path})}})}));return{loaderResults:await a,fetcherResults:(await o).reduce((e,t)=>Object.assign(e,t),{})}}function Ie(){re=!0,ue.forEach((e,t)=>{I.has(t)&&ie.add(t),Ue(t)})}function Le(e,t,n={}){let r=new Map(w.fetchers);r.set(e,t),ye({fetchers:r},{flushSync:(n&&n.flushSync)===!0})}function Re(e,t,n,r={}){let i=un(w.matches,t),a=new Map(w.fetchers);Ve(a,e),ye({errors:{[i.route.id]:n},fetchers:a},{flushSync:(r&&r.flushSync)===!0})}function ze(e){return de.set(e,(de.get(e)||0)+1),fe.has(e)&&fe.delete(e),w.fetchers.get(e)||yt}function Be(e,t){Ue(e,t?.reason),Le(e,In(null))}function Ve(e,t){let n=w.fetchers.get(t);I.has(t)&&!(n&&n.state===`loading`&&oe.has(t))&&Ue(t),ue.delete(t),oe.delete(t),le.delete(t),fe.delete(t),ie.delete(t),e.delete(t)}function He(e){let t=(de.get(e)||0)-1;t<=0?(de.delete(e),fe.add(e)):de.set(e,t),ye({fetchers:new Map(w.fetchers)})}function Ue(e,t){let n=I.get(e);n&&(n.abort(t),I.delete(e))}function We(e,t){for(let n of e){let e=t.get(n);E(e,`Expected fetcher: ${n}`);let r=In(e.data);t.set(n,r)}}function Ge(e){let t=[],n=!1;for(let r of le){let i=e.get(r);E(i,`Expected fetcher: ${r}`),i.state===`loading`&&(le.delete(r),t.push(r),n=!0)}return We(t,e),n}function qe(e,t){let n=[];for(let[r,i]of oe)if(i<e){let e=t.get(r);E(e,`Expected fetcher: ${r}`),e.state===`loading`&&(Ue(r),oe.delete(r),n.push(r))}return We(n,t),n.length>0}function Je(e,t){let n=w.blockers.get(e)||bt;return pe.get(e)!==t&&pe.set(e,t),n}function Ye(e){w.blockers.delete(e),pe.delete(e)}function Xe(e,t){let n=w.blockers.get(e)||bt;E(n.state===`unblocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`proceeding`||n.state===`blocked`&&t.state===`unblocked`||n.state===`proceeding`&&t.state===`unblocked`,`Invalid blocker state transition: ${n.state} -> ${t.state}`);let r=new Map(w.blockers);r.set(e,t),ye({blockers:r})}function Ze({currentLocation:e,nextLocation:t,historyAction:n}){if(pe.size===0)return;pe.size>1&&D(!1,`A router only supports one blocker at a time`);let r=Array.from(pe.entries()),[i,a]=r[r.length-1],o=w.blockers.get(i);if(!(o&&o.state===`proceeding`)&&a({currentLocation:e,nextLocation:t,historyAction:n}))return i}function Qe(e){let t=fn(404,{pathname:e}),n=s.activeRoutes,{matches:r,route:i}=dn(n);return{notFoundMatches:r,route:i,error:t}}function tt(e,t,n){if(m=e,g=t,h=n||null,!_&&w.navigation===vt){_=!0;let e=at(w.location,w.matches);e!=null&&ye({restoreScrollPosition:e})}return()=>{m=null,g=null,h=null}}function nt(e,t){return h&&h(e,t.map(e=>ce(e,w.loaderData)))||e.key}function rt(e,t){if(m&&g){let n=nt(e,t);m[n]=g()}}function at(e,t){if(m){let n=nt(e,t),r=m[n];if(typeof r==`number`)return r}return null}function ot(t,n,r){if(e.patchRoutesOnNavigation){let e=s.branches;if(!t)return{active:!0,matches:se(n,r,c,!0,e)||[]};if(Object.keys(t[0].params).length>0)return{active:!0,matches:se(n,r,c,!0,e)}}return{active:!1,matches:null}}async function st(t,n,r,i){if(!e.patchRoutesOnNavigation)return{type:`success`,matches:t};let l=t;for(;;){let t=o;try{await e.patchRoutesOnNavigation({signal:r,path:n,matches:l,fetcherKey:i,patch:(e,n)=>{r.aborted||Pt(e,n,s,t,a,!1)}})}catch(e){return{type:`error`,error:e,partialMatches:l}}if(r.aborted)return{type:`aborted`};let u=s.branches,d=se(s.activeRoutes,n,c,!1,u),f=null;if(d&&(Object.keys(d[0].params).length===0||(f=se(s.activeRoutes,n,c,!0,u),!(f&&l.length<f.length&&ct(l,f.slice(0,l.length))))))return{type:`success`,matches:d};if(f||=se(s.activeRoutes,n,c,!0,u),!f||ct(l,f))return{type:`success`,matches:null};l=f}}function ct(e,t){return e.length===t.length&&e.every((e,n)=>e.route.id===t[n].route.id)}function lt(e){o={},s.setHmrRoutes(L(e,a,void 0,o))}function ut(e,t,n=!1){Pt(e,t,s,o,a,n),s.hasHMRRoutes||ye({})}return C={get basename(){return c},get future(){return u},get state(){return w},get routes(){return s.stableRoutes},get branches(){return s.branches},get manifest(){return o},get window(){return t},initialize:ge,subscribe:ve,enableScrollRestoration:tt,navigate:xe,fetch:Oe,revalidate:Se,createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:ze,resetFetcher:Be,deleteFetcher:He,dispose:_e,getBlocker:Je,deleteBlocker:Ye,patchRoutes:ut,_internalFetchControllers:I,_internalSetRoutes:lt,_internalSetStateDoNotUseOrYouWillBreakYourApp(e){ye(e)}},e.instrumentations&&(C=et(C,e.instrumentations.map(e=>e.router).filter(Boolean))),C}function Tt(e){return e!=null&&(`formData`in e&&e.formData!=null||`body`in e&&e.body!==void 0)}function Et(e,t,n,r,i,a){let o,s;if(i){o=[];for(let e of t)if(o.push(e),e.route.id===i){s=e;break}}else o=t,s=t[t.length-1];let c=Le(r||`.`,Ie(o),ke(e.pathname,n)||e.pathname,a===`path`);if(r??(c.search=e.search,c.hash=e.hash),(r==null||r===``||r===`.`)&&s){let e=On(c.search);if(s.route.index&&!e)c.search=c.search?c.search.replace(/^\?/,`?index&`):`?index`;else if(!s.route.index&&e){let e=new URLSearchParams(c.search),t=e.getAll(`index`);e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();c.search=n?`?${n}`:``}}return n!==`/`&&(c.pathname=Ae({basename:n,pathname:c.pathname})),j(c)}function Dt(e,t,n){if(!n||!Tt(n))return{path:t};if(n.formMethod&&!En(n.formMethod))return{path:t,error:fn(405,{method:n.formMethod})};let r=()=>({path:t,error:fn(400,{type:`invalid-body`})}),i=(n.formMethod||`get`).toUpperCase(),a=mn(t);if(n.body!==void 0){if(n.formEncType===`text/plain`){if(!Dn(i))return r();let e=typeof n.body==`string`?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((e,[t,n])=>`${e}${t}=${n}\n`,``):String(n.body);return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:void 0,text:e}}}if(n.formEncType===`application/json`){if(!Dn(i))return r();try{let e=typeof n.body==`string`?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:e,text:void 0}}}catch{return r()}}}E(typeof FormData==`function`,`FormData is not available in this environment`);let o,s;if(n.formData)o=rn(n.formData),s=n.formData;else if(n.body instanceof FormData)o=rn(n.body),s=n.body;else if(n.body instanceof URLSearchParams)o=n.body,s=an(o);else if(n.body==null)o=new URLSearchParams,s=new FormData;else try{o=new URLSearchParams(n.body),s=an(o)}catch{return r()}let c={formMethod:i,formAction:a,formEncType:n&&n.formEncType||`application/x-www-form-urlencoded`,formData:s,json:void 0,text:void 0};if(Dn(c.formMethod))return{path:t,submission:c};let l=ee(t);return e&&l.search&&On(l.search)&&o.append(`index`,``),l.search=`?${o}`,{path:j(l),submission:c}}function Ot(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x){let S=b?bn(b[1])?b[1].error:b[1].data:void 0,C=i.createURL(a.location),w=i.createURL(c),T;if(u&&a.errors){let e=Object.keys(a.errors)[0];T=o.findIndex(t=>t.route.id===e)}else if(b&&bn(b[1])){let e=b[0];T=o.findIndex(t=>t.route.id===e)-1}let E=b?b[1].statusCode:void 0,D=E&&E>=400,O={currentUrl:C,currentParams:a.matches[0]?.params||{},nextUrl:w,nextParams:o[0].params,...s,actionResult:S,actionStatus:E},k=qe(o),A=o.map((i,o)=>{let{route:s}=i,f=null;if(T!=null&&o>T)f=!1;else if(s.lazy)f=!0;else if(!kt(s))f=!1;else if(u){let{shouldLoad:e}=At(s,a.loaderData,a.errors);f=e}else jt(a.loaderData,a.matches[o],i)&&(f=!0);if(f!==null)return Kt(n,r,e,c,k,i,l,t,f);let p=!1;typeof x==`boolean`?p=x:D?p=!1:d||C.pathname+C.search===w.pathname+w.search?p=!0:C.search===w.search?Mt(a.matches[o],i)&&(p=!0):p=!0;let m={...O,defaultShouldRevalidate:p};return Kt(n,r,e,c,k,i,l,t,Nt(i,m),m,x)}),j=[];return m.forEach((e,s)=>{if(u||!o.some(t=>t.route.id===e.routeId)||p.has(s))return;let c=a.fetchers.get(s),m=c&&c.state!==`idle`&&c.data===void 0,b=se(g,e.path,_??`/`,!1,y);if(!b){if(v&&m)return;j.push({key:s,routeId:e.routeId,path:e.path,matches:null,match:null,request:null,controller:null});return}if(h.has(s))return;let S=kn(b,e.path),C=new AbortController,w=nn(i,e.path,C.signal),T=null;if(f.has(s))f.delete(s),T=qt(n,r,w,e.path,b,S,l,t);else if(m)d&&(T=qt(n,r,w,e.path,b,S,l,t));else{let i;i=typeof x==`boolean`?x:!D&&d;let a={...O,defaultShouldRevalidate:i};Nt(S,a)&&(T=qt(n,r,w,e.path,b,S,l,t,a))}T&&j.push({key:s,routeId:e.routeId,path:e.path,matches:T,match:S,request:w,controller:C})}),{dsMatches:A,revalidatingFetchers:j}}function kt(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function At(e,t,n){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!kt(e))return{shouldLoad:!1,renderFallback:!1};let r=t!=null&&e.id in t,i=n!=null&&n[e.id]!==void 0;if(!r&&i)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader==`function`&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!r};let a=!r&&!i;return{shouldLoad:a,renderFallback:a}}function jt(e,t,n){let r=!t||n.route.id!==t.route.id,i=!e.hasOwnProperty(n.route.id);return r||i}function Mt(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith(`*`)&&e.params[`*`]!==t.params[`*`]}function Nt(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n==`boolean`)return n}return t.defaultShouldRevalidate}function Pt(e,t,n,r,i,a){let o;if(e){let t=r[e];E(t,`No route found to patch children into: routeId = ${e}`),t.children||=[],o=t.children}else o=n.activeRoutes;let s=[],c=[];if(t.forEach(e=>{let t=o.find(t=>Ft(e,t));t?c.push({existingRoute:t,newRoute:e}):s.push(e)}),s.length>0){let t=L(s,i,[e||`_`,`patch`,String(o?.length||`0`)],r);o.push(...t)}if(a&&c.length>0)for(let e=0;e<c.length;e++){let{existingRoute:t,newRoute:n}=c[e],r=t,[a]=L([n],i,[],{},!0);Object.assign(r,{element:a.element?a.element:r.element,errorElement:a.errorElement?a.errorElement:r.errorElement,hydrateFallbackElement:a.hydrateFallbackElement?a.hydrateFallbackElement:r.hydrateFallbackElement})}n.hasHMRRoutes||n.setRoutes([...n.activeRoutes])}function Ft(e,t){return`id`in e&&`id`in t&&e.id===t.id?!0:e.index!==t.index||e.path!==t.path||e.caseSensitive!==t.caseSensitive?!1:(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children?.every((e,n)=>t.children?.some(t=>Ft(e,t)))??!1}var It=new WeakMap,Lt=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let i=n[t.id];if(E(i,`No route found in manifest`),!i.lazy||typeof i.lazy!=`object`)return;let a=i.lazy[e];if(!a)return;let o=It.get(i);o||(o={},It.set(i,o));let s=o[e];if(s)return s;let c=(async()=>{let t=ne(e),n=i[e]!==void 0;if(t)D(!t,`Route property `+e+` is not a supported lazy route property. This property will be ignored.`),o[e]=Promise.resolve();else if(n)D(!1,`Route "${i.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let t=await a();t!=null&&(Object.assign(i,{[e]:t}),Object.assign(i,r(i)))}typeof i.lazy==`object`&&(i.lazy[e]=void 0,Object.values(i.lazy).every(e=>e===void 0)&&(i.lazy=void 0))})();return o[e]=c,c},Rt=new WeakMap;function zt(e,t,n,r,i){let a=n[e.id];if(E(a,`No route found in manifest`),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy==`function`){let t=Rt.get(a);if(t)return{lazyRoutePromise:t,lazyHandlerPromise:t};let n=(async()=>{E(typeof e.lazy==`function`,`No lazy route function found`);let t=await e.lazy(),n={};for(let e in t){let r=t[e];if(r===void 0)continue;let i=ie(e),o=a[e]!==void 0;i?D(!i,`Route property `+e+` is not a supported property to be returned from a lazy route function. This property will be ignored.`):o?D(!o,`Route "${a.id}" has a static property "${e}" defined but its lazy function is also returning a value for this property. The lazy route property "${e}" will be ignored.`):n[e]=r}Object.assign(a,n),Object.assign(a,{...r(a),lazy:void 0})})();return Rt.set(a,n),n.catch(()=>{}),{lazyRoutePromise:n,lazyHandlerPromise:n}}let o=Object.keys(e.lazy),s=[],c;for(let a of o){if(i&&i.includes(a))continue;let o=Lt({key:a,route:e,manifest:n,mapRouteProperties:r});o&&(s.push(o),a===t&&(c=o))}let l=s.length>0?Promise.all(s).then(()=>{}):void 0;return l?.catch(()=>{}),c?.catch(()=>{}),{lazyRoutePromise:l,lazyHandlerPromise:c}}async function Bt(e){let t=e.matches.filter(e=>e.shouldLoad),n={};return(await Promise.all(t.map(e=>e.resolve()))).forEach((e,r)=>{n[t[r].route.id]=e}),n}async function Vt(e){return e.matches.some(e=>e.route.middleware)?Ht(e,()=>Bt(e)):Bt(e)}function Ht(e,t){return Ut(e,t,e=>{if(Tn(e))throw e;return e},_n,n);async function n(t,n,r){if(r)return Object.assign(r.value,{[n]:{type:`error`,result:t}});{let{matches:r}=e,i=Math.min(Math.max(r.findIndex(e=>e.route.id===n),0),Math.max(r.findIndex(e=>e.shouldCallHandler()),0)),a=r[i].route.id;for(let e of r.slice(0,i+1))try{await e._lazyPromises?.route}catch{a=e.route.id;break}return{[un(r,a).route.id]:{type:`error`,result:t}}}}}async function Ut(e,t,n,r,i){let{matches:a,...o}=e;return await Wt(o,a.flatMap(e=>e.route.middleware?e.route.middleware.map(t=>[e.route.id,t]):[]),t,n,r,i)}async function Wt(e,t,n,r,i,a,o=0){let{request:s}=e;if(s.signal.aborted)throw s.signal.reason??Error(`Request aborted: ${s.method} ${s.url}`);let c=t[o];if(!c)return await n();let[l,u]=c,d,f=async()=>{if(d)throw Error("You may only call `next()` once per middleware");try{return d={value:await Wt(e,t,n,r,i,a,o+1)},d.value}catch(e){return d={value:await a(e,l,d)},d.value}};try{let t=await u(e,f),n=t==null?void 0:r(t);return i(n)?n:d?n??d.value:(d={value:await f()},d.value)}catch(e){return await a(e,l,d)}}function Gt(e,t,n,r,i){let a=Lt({key:`middleware`,route:r.route,manifest:t,mapRouteProperties:e}),o=zt(r.route,Dn(n.method)?`action`:`loader`,t,e,i);return{middleware:a,route:o.lazyRoutePromise,handler:o.lazyHandlerPromise}}function Kt(e,t,n,r,i,a,o,s,c,l=null,u){let d=!1,f=Gt(e,t,n,a,o);return{...a,_lazyPromises:f,shouldLoad:c,shouldRevalidateArgs:l,shouldCallHandler(e){return d=!0,l?typeof u==`boolean`?Nt(a,{...l,defaultShouldRevalidate:u}):typeof e==`boolean`?Nt(a,{...l,defaultShouldRevalidate:e}):Nt(a,l):c},resolve(e){let{lazy:t,loader:o,middleware:l}=a.route,u=d||c||e&&!Dn(n.method)&&(t||o),p=l&&l.length>0&&!o&&!t;return u&&(Dn(n.method)||!p)?Yt({request:n,path:r,pattern:i,match:a,lazyHandlerPromise:f?.handler,lazyRoutePromise:f?.route,handlerOverride:e,scopedContext:s}):Promise.resolve({type:`data`,result:void 0})}}}function qt(e,t,n,r,i,a,o,s,c=null){return i.map(l=>l.route.id===a.route.id?Kt(e,t,n,r,qe(i),l,o,s,!0,c):{...l,shouldLoad:!1,shouldRevalidateArgs:c,shouldCallHandler:()=>!1,_lazyPromises:Gt(e,t,n,l,o),resolve:()=>Promise.resolve({type:`data`,result:void 0})})}async function Jt(e,t,n,r,i,a,o){r.some(e=>e._lazyPromises?.middleware)&&await Promise.all(r.map(e=>e._lazyPromises?.middleware));let s={request:t,url:Je(t,n),pattern:qe(r),params:r[0].params,context:a,matches:r},c=o?()=>{throw Error("You cannot call `runClientMiddleware()` from a static handler `dataStrategy`. Middleware is run outside of `dataStrategy` during SSR in order to bubble up the Response. You can enable middleware via the `respond` API in `query`/`queryRoute`")}:e=>{let t=s;return Ht(t,()=>e({...t,fetcherKey:i,runClientMiddleware:()=>{throw Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))},l=await e({...s,fetcherKey:i,runClientMiddleware:c});try{await Promise.all(r.flatMap(e=>[e._lazyPromises?.handler,e._lazyPromises?.route]))}catch{}return l}async function Yt({request:e,path:t,pattern:n,match:r,lazyHandlerPromise:i,lazyRoutePromise:a,handlerOverride:o,scopedContext:s}){let c,l,u=Dn(e.method),d=u?`action`:`loader`,f=i=>{let a,c=new Promise((e,t)=>a=t);l=()=>a(),e.signal.addEventListener(`abort`,l);let u=a=>typeof i==`function`?i({request:e,url:Je(e,t),pattern:n,params:r.params,context:s},...a===void 0?[]:[a]):Promise.reject(Error(`You cannot call the handler for a route which defines a boolean "${d}" [routeId: ${r.route.id}]`)),f=(async()=>{try{return{type:`data`,result:await(o?o(e=>u(e)):u())}}catch(e){return{type:`error`,result:e}}})();return Promise.race([f,c])};try{let t=u?r.route.action:r.route.loader;if(i||a){if(t){let e,[n]=await Promise.all([f(t).catch(t=>{e=t}),i,a]);if(e!==void 0)throw e;c=n}else{await i;let t=u?r.route.action:r.route.loader;if(t)[c]=await Promise.all([f(t),a]);else if(d===`action`){let t=new URL(e.url),n=t.pathname+t.search;throw fn(405,{method:e.method,pathname:n,routeId:r.route.id})}else return{type:`data`,result:void 0}}}else if(t)c=await f(t);else{let t=new URL(e.url);throw fn(404,{pathname:t.pathname+t.search})}}catch(e){return{type:`error`,result:e}}finally{l&&e.signal.removeEventListener(`abort`,l)}return c}async function Xt(e){let t=e.headers.get(`Content-Type`);return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function Zt(e){let{result:t,type:n}=e;if(Cn(t)){let e;try{e=await Xt(t)}catch(e){return{type:`error`,error:e}}return n===`error`?{type:`error`,error:new Ge(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:`data`,data:e,statusCode:t.status,headers:t.headers}}return n===`error`?Sn(t)?t.data instanceof Error?{type:`error`,error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:gn(t),statusCode:Ke(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:t,statusCode:Ke(t)?t.status:void 0}:Sn(t)?{type:`data`,data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`data`,data:t}}function Qt(e,t,n,r,i){let a=e.headers.get(`Location`);if(E(a,`Redirects returned/thrown from loaders/actions must have a Location header`),!je(a)){let o=r.slice(0,r.findIndex(e=>e.route.id===n)+1);a=Et(new URL(t.url),o,i,a),e.headers.set(`Location`,a)}return e}var $t=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function en(e){try{return $t.includes(new URL(e).protocol)}catch{return!1}}function tn(e,t,n,r){if(je(e)){let r=e,i=x.test(r)?new URL(S(r,t.protocol)):new URL(r);if(en(i.toString()))throw Error(`Invalid redirect location`);let a=ke(i.pathname,n)!=null;if(i.origin===t.origin&&a)return Re(i.pathname)+i.search+i.hash}try{if(en(r.createURL(e).toString()))throw Error(`Invalid redirect location`)}catch{}return e}function nn(e,t,n,r){let i=e.createURL(mn(t)).toString(),a={signal:n};if(r&&Dn(r.formMethod)){let{formMethod:e,formEncType:t}=r;a.method=e.toUpperCase(),t===`application/json`?(a.headers=new Headers({"Content-Type":t}),a.body=JSON.stringify(r.json)):a.body=t===`text/plain`?r.text:t===`application/x-www-form-urlencoded`&&r.formData?rn(r.formData):r.formData}return new Request(i,a)}function rn(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r==`string`?r:r.name);return t}function an(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function on(e,t,n,r=!1,i=!1){let a={},o=null,s,c=!1,l={},u=n&&bn(n[1])?n[1].error:void 0;return e.forEach(n=>{if(!(n.route.id in t))return;let d=n.route.id,f=t[d];if(E(!xn(f),`Cannot handle redirect results in processLoaderData`),bn(f)){let t=f.error;if(u!==void 0&&(t=u,u=void 0),o||={},i)o[d]=t;else{let n=un(e,d);o[n.route.id]??(o[n.route.id]=t)}r||(a[d]=St),c||(c=!0,s=Ke(f.error)?f.error.status:500),f.headers&&(l[d]=f.headers)}else a[d]=f.data,f.statusCode&&f.statusCode!==200&&!c&&(s=f.statusCode),f.headers&&(l[d]=f.headers)}),u!==void 0&&n&&(o={[n[0]]:u},n[2]&&(a[n[2]]=void 0)),{loaderData:a,errors:o,statusCode:s||200,loaderHeaders:l}}function sn(e,t,n,r,i,a,o){let{loaderData:s,errors:c}=on(t,n,r);return i.filter(e=>!e.matches||e.matches.some(e=>e.shouldLoad)).forEach(t=>{let{key:n,match:r,controller:i}=t;if(i&&i.signal.aborted)return;let s=a[n];if(E(s,`Did not find corresponding fetcher result`),bn(s)){let t=un(e.matches,r?.route.id);c&&c[t.route.id]||(c={...c,[t.route.id]:s.error}),o.delete(n)}else if(xn(s))E(!1,`Unhandled fetcher revalidation redirect`);else{let e=In(s.data);o.set(n,e)}}),{loaderData:s,errors:c}}function cn(e,t,n,r){let i=Object.entries(t).filter(([,e])=>e!==St).reduce((e,[t,n])=>(e[t]=n,e),{});for(let a of n){let n=a.route.id;if(!t.hasOwnProperty(n)&&e.hasOwnProperty(n)&&a.route.loader&&(i[n]=e[n]),r&&r.hasOwnProperty(n))break}return i}function ln(e){return e?bn(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function un(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e]).reverse().find(e=>e.route.ErrorBoundary!=null||e.route.errorElement!=null)||e[0]}function dn(e){let t=e.length===1?e[0]:e.find(e=>e.index||!e.path||e.path===`/`)||{id:`__shim-error-route__`};return{matches:[{params:{},pathname:``,pathnameBase:``,route:t}],route:t}}function fn(e,{pathname:t,routeId:n,method:r,type:i,message:a}={}){let o=`Unknown Server Error`,s=`Unknown @remix-run/router error`;return e===400?(o=`Bad Request`,r&&t&&n?s=`You made a ${r} request to "${t}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:i===`invalid-body`&&(s=`Unable to encode submission body`)):e===403?(o=`Forbidden`,s=`Route "${n}" does not match URL "${t}"`):e===404?(o=`Not Found`,s=`No route matches URL "${t}"`):e===405&&(o=`Method Not Allowed`,r&&t&&n?s=`You made a ${r.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:r&&(s=`Invalid request method "${r.toUpperCase()}"`)),new Ge(e||500,o,Error(s),!0)}function pn(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(xn(r))return{key:n,result:r}}}function mn(e){return j({...typeof e==`string`?ee(e):e,hash:``})}function hn(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===``?t.hash!==``:e.hash===t.hash||t.hash!==``}function gn(e){return new Ge(e.init?.status??500,e.init?.statusText??`Internal Server Error`,e.data)}function _n(e){return typeof e==`object`&&!!e&&Object.entries(e).every(([e,t])=>typeof e==`string`&&vn(t))}function vn(e){return typeof e==`object`&&!!e&&`type`in e&&`result`in e&&(e.type===`data`||e.type===`error`)}function yn(e){return Cn(e.result)&&gt.has(e.result.status)}function bn(e){return e.type===`error`}function xn(e){return(e&&e.type)===`redirect`}function Sn(e){return typeof e==`object`&&!!e&&`type`in e&&`data`in e&&`init`in e&&e.type===`DataWithResponseInit`}function Cn(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.headers==`object`&&e.body!==void 0}function wn(e){return gt.has(e)}function Tn(e){return Cn(e)&&wn(e.status)&&e.headers.has(`Location`)}function En(e){return ht.has(e.toUpperCase())}function Dn(e){return pt.has(e.toUpperCase())}function On(e){return new URLSearchParams(e).getAll(`index`).some(e=>e===``)}function kn(e,t){let n=typeof t==`string`?ee(t).search:t.search;if(e[e.length-1].route.index&&On(n||``))return e[e.length-1];let r=Fe(e);return r[r.length-1]}function An(e,t,n){return{url:Je(e.createURL(t),t),pattern:n?qe(n):``,params:n?.[0]?.params?{...n[0].params}:{}}}function jn(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:a,json:o}=e;if(!(!t||!n||!r)){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(a!=null)return{formMethod:t,formAction:n,formEncType:r,formData:a,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:o,text:void 0}}}function Mn(e,t,n,r){return r?{state:`loading`,location:e,matches:t,historyAction:n,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}:{state:`loading`,location:e,matches:t,historyAction:n,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Nn(e,t,n,r){return{state:`submitting`,location:e,matches:t,historyAction:n,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}}function Pn(e,t){return e?{state:`loading`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:`loading`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Fn(e,t){return{state:`submitting`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function In(e){return{state:`idle`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Ln(e,t){try{let n=e.sessionStorage.getItem(xt);if(n){let e=JSON.parse(n);for(let[n,r]of Object.entries(e||{}))r&&Array.isArray(r)&&t.set(n,new Set(r||[]))}}catch{}}function Rn(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(xt,JSON.stringify(n))}catch(e){D(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}}function zn(){let e,t,n=new Promise((r,i)=>{e=async e=>{r(e);try{await n}catch{}},t=async e=>{i(e);try{await n}catch{}}});return{promise:n,resolve:e,reject:t}}var Bn=N.createContext(null);Bn.displayName=`DataRouter`;var Vn=N.createContext(null);Vn.displayName=`DataRouterState`;var Hn=N.createContext(!1);function Un(){return N.useContext(Hn)}var Wn=N.createContext({isTransitioning:!1});Wn.displayName=`ViewTransition`;var Gn=N.createContext(new Map);Gn.displayName=`Fetchers`;var Kn=N.createContext(null);Kn.displayName=`Await`;var qn=N.createContext(null);qn.displayName=`Navigation`;var Jn=N.createContext(null);Jn.displayName=`Location`;var Yn=N.createContext({outlet:null,matches:[],isDataRoute:!1});Yn.displayName=`Route`;var Xn=N.createContext(null);Xn.displayName=`RouteError`;var Zn=`REACT_ROUTER_ERROR`,Qn=`REDIRECT`,$n=`ROUTE_ERROR_RESPONSE`;function er(e){if(e.startsWith(`${Zn}:${Qn}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function tr(e){if(e.startsWith(`${Zn}:${$n}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new Ge(t.status,t.statusText,t.data)}catch{}}function nr(e,{relative:t}={}){E(rr(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=N.useContext(qn),{hash:i,pathname:a,search:o}=dr(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:ze([n,a])),r.createHref({pathname:s,search:o,hash:i})}function rr(){return N.useContext(Jn)!=null}function ir(){return E(rr(),`useLocation() may be used only in the context of a <Router> component.`),N.useContext(Jn).location}var ar=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function or(){let{isDataRoute:e}=N.useContext(Yn);return e?Dr():sr()}function sr(){E(rr(),`useNavigate() may be used only in the context of a <Router> component.`);let e=N.useContext(Bn),{basename:t,navigator:n}=N.useContext(qn),{matches:r}=N.useContext(Yn),{pathname:i}=ir(),a=JSON.stringify(Ie(r)),o=N.useRef(!1);return N.useLayoutEffect(()=>{o.current=!0}),N.useCallback((r,s={})=>{if(D(o.current,ar),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=Le(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:ze([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var cr=N.createContext(null);function lr(e){let t=N.useContext(Yn).outlet;return N.useMemo(()=>t&&N.createElement(cr.Provider,{value:e},t),[t,e])}function ur(){let{matches:e}=N.useContext(Yn);return e[e.length-1]?.params??{}}function dr(e,{relative:t}={}){let{matches:n}=N.useContext(Yn),{pathname:r}=ir(),i=JSON.stringify(Ie(n));return N.useMemo(()=>Le(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function fr(e,t,n){E(rr(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=N.useContext(qn),{matches:i}=N.useContext(Yn),a=i[i.length-1],o=a?a.params:{};a&&a.pathname;let s=a?a.pathnameBase:`/`;a&&a.route;let c=ir(),l;if(t){let e=typeof t==`string`?ee(t):t;E(s===`/`||e.pathname?.startsWith(s),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${s}" but pathname "${e.pathname}" was given in the \`location\` prop.`),l=e}else l=c;let u=l.pathname||`/`,d=u;if(s!==`/`){let e=s.replace(/^\//,``).split(`/`);d=`/`+u.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let f=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):oe(e,{pathname:d}),p=yr(f&&f.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:ze([s,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?s:ze([s,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&p?N.createElement(Jn.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...l},navigationType:`POP`}},p):p}function pr(){let e=Er(),t=Ke(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null;return N.createElement(N.Fragment,null,N.createElement(`h2`,null,`Unexpected Application Error!`),N.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?N.createElement(`pre`,{style:{padding:`0.5rem`,backgroundColor:`rgba(200,200,200, 0.5)`}},n):null,null)}var mr=N.createElement(pr,null),hr=class extends N.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static contextType=Hn;static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=tr(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:N.createElement(Yn.Provider,{value:this.props.routeContext},N.createElement(Xn.Provider,{value:e,children:this.props.component}));return this.context?N.createElement(_r,{error:e},t):t}},gr=new WeakMap;function _r({children:e,error:t}){let{basename:n}=N.useContext(qn);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=er(t.digest);if(e){let r=gr.get(t);if(r)throw r;let i=Xe(e.location,n),a=i.absoluteURL||i.to;if(en(a))throw Error(`Invalid redirect location`);if(Ye&&!gr.get(t)){if(i.isExternal||e.reloadDocument)window.location.href=a;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw gr.set(t,n),n}}return N.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${a}`})}}return e}function vr({routeContext:e,match:t,children:n}){let r=N.useContext(Bn);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),N.createElement(Yn.Provider,{value:e},n)}function yr(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);E(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:qe(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||mr,o&&(s<0&&c===0?(kr(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=u?f:d?p:n.route.Component?N.createElement(n.route.Component,null):n.route.element?n.route.element:e,N.createElement(vr,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?N.createElement(hr,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function br(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function xr(e){let t=N.useContext(Bn);return E(t,br(e)),t}function Sr(e){let t=N.useContext(Vn);return E(t,br(e)),t}function Cr(e){let t=N.useContext(Yn);return E(t,br(e)),t}function wr(e){let t=Cr(e),n=t.matches[t.matches.length-1];return E(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Tr(){return wr(`useRouteId`)}function Er(){let e=N.useContext(Xn),t=Sr(`useRouteError`),n=wr(`useRouteError`);return e===void 0?t.errors?.[n]:e}function Dr(){let{router:e}=xr(`useNavigate`),t=wr(`useNavigate`),n=N.useRef(!1);return N.useLayoutEffect(()=>{n.current=!0}),N.useCallback(async(r,i={})=>{D(n.current,ar),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var Or={};function kr(e,t,n){!t&&!Or[e]&&(Or[e]=!0,D(!1,n))}var Ar={};function jr(e,t){!e&&!Ar[t]&&(Ar[t]=!0,console.warn(t))}var Mr=[`HydrateFallback`,`hydrateFallbackElement`],Nr=class{status=`pending`;promise;resolve;reject;constructor(){this.promise=new Promise((e,t)=>{this.resolve=t=>{this.status===`pending`&&(this.status=`resolved`,e(t))},this.reject=e=>{this.status===`pending`&&(this.status=`rejected`,t(e))}})}};function Pr({router:e,flushSync:t,onError:n,useTransitions:r}){r=Un()||r;let[i,a]=N.useState(e.state),[o,s]=(0,N.useOptimistic)(i),[c,l]=N.useState(),[u,d]=N.useState({isTransitioning:!1}),[f,p]=N.useState(),[m,h]=N.useState(),[g,_]=N.useState(),v=N.useRef(new Map),y=N.useCallback((i,{deletedFetchers:o,newErrors:c,flushSync:u,viewTransitionOpts:g})=>{c&&n&&Object.values(c).forEach(e=>n(e,{location:i.location,params:i.matches[0]?.params??{},pattern:qe(i.matches)})),i.fetchers.forEach((e,t)=>{e.data!==void 0&&v.current.set(t,e.data)}),o.forEach(e=>v.current.delete(e)),jr(u===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let y=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition==`function`;if(jr(g==null||y,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!g||!y){t&&u?t(()=>a(i)):r===!1?a(i):N.startTransition(()=>{r===!0&&s(e=>Fr(e,i)),a(i)});return}if(t&&u){t(()=>{m&&(f?.resolve(),m.skipTransition()),d({isTransitioning:!0,flushSync:!0,currentLocation:g.currentLocation,nextLocation:g.nextLocation})});let n=e.window.document.startViewTransition(()=>{t(()=>a(i))});n.finished.finally(()=>{t(()=>{p(void 0),h(void 0),l(void 0),d({isTransitioning:!1})})}),t(()=>h(n));return}m?(f?.resolve(),m.skipTransition(),_({state:i,currentLocation:g.currentLocation,nextLocation:g.nextLocation})):(l(i),d({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}))},[e.window,t,m,f,r,s,n]);N.useLayoutEffect(()=>e.subscribe(y),[e,y]),N.useEffect(()=>{u.isTransitioning&&!u.flushSync&&p(new Nr)},[u]),N.useEffect(()=>{if(f&&c&&e.window){let t=c,n=f.promise,i=e.window.document.startViewTransition(async()=>{r===!1?a(t):N.startTransition(()=>{r===!0&&s(e=>Fr(e,t)),a(t)}),await n});i.finished.finally(()=>{p(void 0),h(void 0),l(void 0),d({isTransitioning:!1})}),h(i)}},[c,f,e.window,r,s]),N.useEffect(()=>{f&&c&&o.location.key===c.location.key&&f.resolve()},[f,m,o.location,c]),N.useEffect(()=>{!u.isTransitioning&&g&&(l(g.state),d({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}),_(void 0))},[u.isTransitioning,g]);let b=N.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:t=>e.navigate(t),push:(t,n,r)=>e.navigate(t,{state:n,preventScrollReset:r?.preventScrollReset}),replace:(t,n,r)=>e.navigate(t,{replace:!0,state:n,preventScrollReset:r?.preventScrollReset})}),[e]),x=e.basename||`/`,S=N.useMemo(()=>({router:e,navigator:b,static:!1,basename:x,onError:n}),[e,b,x,n]);return N.createElement(N.Fragment,null,N.createElement(Bn.Provider,{value:S},N.createElement(Vn.Provider,{value:o},N.createElement(Gn.Provider,{value:v.current},N.createElement(Wn.Provider,{value:u},N.createElement(Br,{basename:x,location:o.location,navigationType:o.historyAction,navigator:b,useTransitions:r},N.createElement(Ir,{routes:e.routes,manifest:e.manifest,future:e.future,state:o,isStatic:!1,onError:n})))))),null)}function Fr(e,t){return{...e,navigation:t.navigation.state===`idle`?e.navigation:t.navigation,revalidation:t.revalidation===`idle`?e.revalidation:t.revalidation,actionData:t.navigation.state===`submitting`?e.actionData:t.actionData,fetchers:t.fetchers}}var Ir=N.memo(Lr);function Lr({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return fr(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function Rr({to:e,replace:t,state:n,relative:r}){E(rr(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i}=N.useContext(qn);D(!i,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:a}=N.useContext(Yn),{pathname:o}=ir(),s=or(),c=Le(e,Ie(a),o,r===`path`),l=JSON.stringify(c);return N.useEffect(()=>{s(JSON.parse(l),{replace:t,state:n,relative:r})},[s,l,r,t,n]),null}function zr(e){return lr(e.context)}function Br({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){E(!rr(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=N.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=ee(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,mask:m}=n,h=N.useMemo(()=>{let e=ke(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);return D(h!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),h==null?null:N.createElement(qn.Provider,{value:c},N.createElement(Jn.Provider,{children:t,value:h}))}N.Component;var Vr=`application/x-www-form-urlencoded`;function Hr(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Ur(e){return Hr(e)&&e.tagName.toLowerCase()===`button`}function Wr(e){return Hr(e)&&e.tagName.toLowerCase()===`form`}function Gr(e){return Hr(e)&&e.tagName.toLowerCase()===`input`}function Kr(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function qr(e,t){return e.button===0&&(!t||t===`_self`)&&!Kr(e)}function Jr(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function Yr(e,t){let n=Jr(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var Xr=null;function Zr(){if(Xr===null)try{new FormData(document.createElement(`form`),0),Xr=!1}catch{Xr=!0}return Xr}var Qr=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function $r(e){return e!=null&&!Qr.has(e)?(D(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Vr}"`),null):e}function ei(e,t){let n,r,i,a,o;if(Wr(e)){let o=e.getAttribute(`action`);r=o?ke(o,t):null,n=e.getAttribute(`method`)||`get`,i=$r(e.getAttribute(`enctype`))||Vr,a=new FormData(e)}else if(Ur(e)||Gr(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?ke(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||`get`,i=$r(e.getAttribute(`formenctype`))||$r(o.getAttribute(`enctype`))||Vr,a=new FormData(o,e),!Zr()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(Hr(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=`get`,r=null,i=Vr,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}function ti(e,t){if(e===!1||e==null)throw Error(t)}function ni(e,t){let n=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n.pathname=n.pathname.endsWith(`/`)?`${n.pathname}_.${t}`:`${n.pathname}.${t}`,n}var z=d(),ri=y(),ii=`modulepreload`,ai=function(e){return`/`+e},oi={},si=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=ai(t,n),t=s(t),t in oi)return;oi[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:ii,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};async function ci(e,t){if(e.id in t)return t[e.id];try{let n=await si(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function li(e){return e!=null&&typeof e.page==`string`}function ui(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function di(e,t,n){return gi((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await ci(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(ui).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function fi(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function pi(e,t,{includeHydrateFallback:n}={}){return mi(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function mi(e){return[...new Set(e)]}function hi(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function gi(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!li(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(hi(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function _i(){let e=N.useContext(Bn);return ti(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function vi(){let e=N.useContext(Vn);return ti(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var yi=N.createContext(void 0);yi.displayName=`FrameworkContext`;function bi(){let e=N.useContext(yi);return ti(e,`You must render this element inside a <HydratedRouter> element`),e}function xi(e,t){let n=N.useContext(yi),[r,i]=N.useState(!1),[a,o]=N.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=N.useRef(null);N.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),N.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:Si(s,p),onBlur:Si(c,m),onMouseEnter:Si(l,p),onMouseLeave:Si(u,m),onTouchStart:Si(d,p)}]:[a,f,{}]:[!1,f,{}]}function Si(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Ci({page:e,...t}){let n=Un(),{nonce:r}=bi(),{router:i}=_i(),a=N.useMemo(()=>oe(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?N.createElement(Ti,{page:e,matches:a,...t}):N.createElement(Ei,{page:e,matches:a,...t})):null}function wi(e){let{manifest:t,routeModules:n}=bi(),[r,i]=N.useState([]);return N.useEffect(()=>{let r=!1;return di(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function Ti({page:e,matches:t,...n}){let r=ir(),i=N.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=ni(e,`rsc`),i=!1,a=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?i=!0:a.push(e.route.id);return i&&a.length>0&&n.searchParams.set(`_routes`,a.join(`,`)),[n.pathname+n.search]},[e,r,t]);return N.createElement(N.Fragment,null,i.map(e=>N.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function Ei({page:e,matches:t,...n}){let r=ir(),{manifest:i,routeModules:a}=bi(),{loaderData:o,matches:s}=vi(),c=N.useMemo(()=>fi(e,t,s,i,r,`data`),[e,t,s,i,r]),l=N.useMemo(()=>fi(e,t,s,i,r,`assets`),[e,t,s,i,r]),u=N.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,s=!1;if(t.forEach(e=>{let t=i.routes[e.route.id];!t||!t.hasLoader||(!c.some(t=>t.route.id===e.route.id)&&e.route.id in o&&a[e.route.id]?.shouldRevalidate||t.hasClientLoader?s=!0:n.add(e.route.id))}),n.size===0)return[];let l=ni(e,`data`);return s&&n.size>0&&l.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[l.pathname+l.search]},[o,r,i,c,t,e,a]),d=N.useMemo(()=>pi(l,i),[l,i]),f=wi(l);return N.createElement(N.Fragment,null,u.map(e=>N.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),d.map(e=>N.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),f.map(({key:e,link:t})=>N.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function Di(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}var Oi=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{Oi&&(window.__reactRouterVersion=`8.3.0`)}catch{}function ki(e,t){return wt({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:T({window:t?.window}),hydrationData:t?.hydrationData||Ai(),routes:e,mapRouteProperties:ae,hydrationRouteProperties:Mr,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,instrumentations:t?.instrumentations}).initialize()}function Ai(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:ji(e.errors)}),e}function ji(e){if(!e)return null;let t=Object.entries(e),n={};for(let[e,r]of t)if(r&&r.__type===`RouteErrorResponse`)n[e]=new Ge(r.status,r.statusText,r.data,r.internal===!0);else if(r&&r.__type===`Error`){if(typeof r.__subType==`string`&&We.includes(r.__subType)){let t=window[r.__subType];if(typeof t==`function`)try{let i=new t(r.message);i.stack=``,n[e]=i}catch{}}if(n[e]==null){let t=Error(r.message);t.stack=``,n[e]=t}}else n[e]=r;return n}var B=N.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m){let{basename:h,navigator:g,useTransitions:_}=N.useContext(qn),v=typeof l==`string`&&b.test(l),y=Xe(l,h);l=y.to;let x=nr(l,{relative:r}),S=ir(),C=null;if(o){let e=Le(o,[],S.mask?S.mask.pathname:`/`,!0);h!==`/`&&(e.pathname=e.pathname===`/`?h:ze([h,e.pathname])),C=g.createHref(e)}let[w,T,E]=xi(n,p),D=Fi(l,{replace:a,mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,defaultShouldRevalidate:f,useTransitions:_});function O(t){e&&e(t),t.defaultPrevented||D(t)}let k=!(y.isExternal||i),A=N.createElement(`a`,{...p,...E,href:(k?C:void 0)||y.absoluteURL||x,onClick:k?O:e,ref:Di(m,T),target:c,"data-discover":!v&&t===`render`?`true`:void 0});return w&&!v?N.createElement(N.Fragment,null,A,N.createElement(Ci,{page:x})):A});B.displayName=`Link`;var Mi=N.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=dr(a,{relative:c.relative}),d=ir(),f=N.useContext(Vn),{navigator:p,basename:m}=N.useContext(qn),h=f!=null&&Vi(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,_=d.pathname,v=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(_=_.toLowerCase(),v=v?v.toLowerCase():null,g=g.toLowerCase()),v&&m&&(v=ke(v,m)||v);let y=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,b=_===g||!r&&_.startsWith(g)&&_.charAt(y)===`/`,x=v!=null&&(v===g||!r&&v.startsWith(g)&&v.charAt(y)===`/`),S={isActive:b,isPending:x,isTransitioning:h},C=b?e:void 0,w;w=typeof n==`function`?n(S):[n,b?`active`:null,x?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let T=typeof i==`function`?i(S):i;return N.createElement(B,{...c,"aria-current":C,className:w,ref:l,style:T,to:a,viewTransition:o},typeof s==`function`?s(S):s)});Mi.displayName=`NavLink`;var V=N.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=`get`,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m)=>{let{useTransitions:h}=N.useContext(qn),g=zi(),_=Bi(s,{relative:l}),v=o.toLowerCase()===`get`?`get`:`post`,y=typeof s==`string`&&b.test(s);return N.createElement(`form`,{ref:m,method:v,action:_,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>g(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f});h&&n!==!1?N.startTransition(()=>p()):p()},...p,"data-discover":!y&&e===`render`?`true`:void 0})});V.displayName=`Form`;function Ni(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Pi(e){let t=N.useContext(Bn);return E(t,Ni(e)),t}function Fi(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:l}={}){let u=or(),d=ir(),f=dr(e,{relative:o});return N.useCallback(p=>{if(qr(p,t)){p.preventDefault();let t=n===void 0?j(d)===j(f):n,m=()=>u(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});l?N.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}function Ii(e){D(typeof URLSearchParams<`u`,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=N.useRef(Jr(e)),n=N.useRef(!1),r=ir(),i=N.useMemo(()=>Yr(r.search,n.current?null:t.current),[r.search]),a=or();return[i,N.useCallback((e,t)=>{let r=Jr(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var Li=0,Ri=()=>`__${String(++Li)}__`;function zi(){let{router:e}=Pi(`useSubmit`),{basename:t}=N.useContext(qn),n=Tr(),r=e.fetch,i=e.navigate;return N.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=ei(e,t);a.navigate===!1?await r(a.fetcherKey||Ri(),n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function Bi(e,{relative:t}={}){let{basename:n}=N.useContext(qn),r=N.useContext(Yn);E(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...dr(e||`.`,{relative:t})},o=ir();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:ze([n,a.pathname])),j(a)}function Vi(e,{relative:t}={}){let n=N.useContext(Wn);E(n!=null,"`useViewTransitionState` must be used within `react-router/dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Pi(`useViewTransitionState`),i=dr(e,{relative:t});if(!n.isTransitioning)return!1;let a=ke(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=ke(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Te(i.pathname,o)!=null||Te(i.pathname,a)!=null}var Hi=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Ui=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),Wi=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),Gi=e=>{let t=Wi(e);return t.charAt(0).toUpperCase()+t.slice(1)},Ki={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},qi=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Ji=(0,N.createContext)({}),Yi=()=>(0,N.useContext)(Ji),Xi=(0,N.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=Yi()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,N.createElement)(`svg`,{ref:c,...Ki,width:t??l??Ki.width,height:t??l??Ki.height,stroke:e??f,strokeWidth:m,className:Hi(`lucide`,p,i),...!a&&!qi(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,N.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),Zi=(e,t)=>{let n=(0,N.forwardRef)(({className:n,...r},i)=>(0,N.createElement)(Xi,{ref:i,iconNode:t,className:Hi(`lucide-${Ui(Gi(e))}`,`lucide-${e}`,n),...r}));return n.displayName=Gi(e),n},Qi=Zi(`activity`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),$i=Zi(`bell-ring`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M22 8c0-2.3-.8-4.3-2-6`,key:`5bb3ad`}],[`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`}],[`path`,{d:`M4 2C2.8 3.7 2 5.7 2 8`,key:`tap9e0`}]]),ea=Zi(`book-marked`,[[`path`,{d:`M10 2v8l3-3 3 3V2`,key:`sqw3rj`}],[`path`,{d:`M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20`,key:`k3hazp`}]]),ta=Zi(`circle-check-big`,[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`,key:`yps3ct`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]]),na=Zi(`door-open`,[[`path`,{d:`M11 20H2`,key:`nlcfvz`}],[`path`,{d:`M11 4.562v16.157a1 1 0 0 0 1.242.97L19 20V5.562a2 2 0 0 0-1.515-1.94l-4-1A2 2 0 0 0 11 4.561z`,key:`au4z13`}],[`path`,{d:`M11 4H8a2 2 0 0 0-2 2v14`,key:`74r1mk`}],[`path`,{d:`M14 12h.01`,key:`1jfl7z`}],[`path`,{d:`M22 20h-3`,key:`vhrsz`}]]),ra=Zi(`file-text`,[[`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`}]]),ia=Zi(`gavel`,[[`path`,{d:`m14 13-8.381 8.38a1 1 0 0 1-3.001-3l8.384-8.381`,key:`pgg06f`}],[`path`,{d:`m16 16 6-6`,key:`vzrcl6`}],[`path`,{d:`m21.5 10.5-8-8`,key:`a17d9x`}],[`path`,{d:`m8 8 6-6`,key:`18bi4p`}],[`path`,{d:`m8.5 7.5 8 8`,key:`1oyaui`}]]),aa=Zi(`git-pull-request`,[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M13 6h3a2 2 0 0 1 2 2v7`,key:`1yeb86`}],[`line`,{x1:`6`,x2:`6`,y1:`9`,y2:`21`,key:`rroup`}]]),oa=Zi(`hash`,[[`line`,{x1:`4`,x2:`20`,y1:`9`,y2:`9`,key:`4lhtct`}],[`line`,{x1:`4`,x2:`20`,y1:`15`,y2:`15`,key:`vyu0kd`}],[`line`,{x1:`10`,x2:`8`,y1:`3`,y2:`21`,key:`1ggp8o`}],[`line`,{x1:`16`,x2:`14`,y1:`3`,y2:`21`,key:`weycgp`}]]),sa=Zi(`key-round`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]),ca=Zi(`layers`,[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]]),la=Zi(`layout-grid`,[[`rect`,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`1g98yp`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`3`,rx:`1`,key:`6d4xhi`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`14`,rx:`1`,key:`nxv5o0`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`1bb6yr`}]]),ua=Zi(`list-todo`,[[`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`}]]),da=Zi(`milestone`,[[`path`,{d:`M12 13v8`,key:`1l5pq0`}],[`path`,{d:`M12 3v3`,key:`1n5kay`}],[`path`,{d:`M18.172 6a2 2 0 0 1 1.414.586l2.06 2.06a1.207 1.207 0 0 1 0 1.708l-2.06 2.06a2 2 0 0 1-1.414.586H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1z`,key:`8gz4t4`}]]),fa=Zi(`monitor-dot`,[[`path`,{d:`M12 17v4`,key:`1riwvh`}],[`path`,{d:`M22 12.307V15a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h8.693`,key:`1dx6ho`}],[`path`,{d:`M8 21h8`,key:`1ev6f3`}],[`circle`,{cx:`19`,cy:`6`,r:`3`,key:`108a5v`}]]),pa=Zi(`package`,[[`path`,{d:`M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z`,key:`1a0edw`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`polyline`,{points:`3.29 7 12 12 20.71 7`,key:`ousv84`}],[`path`,{d:`m7.5 4.27 9 5.15`,key:`1c824w`}]]),ma=Zi(`radio`,[[`path`,{d:`M16.247 7.761a6 6 0 0 1 0 8.478`,key:`1fwjs5`}],[`path`,{d:`M19.075 4.933a10 10 0 0 1 0 14.134`,key:`ehdyv1`}],[`path`,{d:`M4.925 19.067a10 10 0 0 1 0-14.134`,key:`1q22gi`}],[`path`,{d:`M7.753 16.239a6 6 0 0 1 0-8.478`,key:`r2q7qm`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}]]),ha=Zi(`rocket`,[[`path`,{d:`M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5`,key:`qeys4`}],[`path`,{d:`M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09`,key:`u4xsad`}],[`path`,{d:`M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z`,key:`676m9`}],[`path`,{d:`M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05`,key:`92ym6u`}]]),ga=Zi(`scroll-text`,[[`path`,{d:`M15 12h-5`,key:`r7krc0`}],[`path`,{d:`M15 8h-5`,key:`1khuty`}],[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`,key:`zz82l3`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`,key:`1ph1d7`}]]),_a=Zi(`shield-check`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),va=Zi(`stethoscope`,[[`path`,{d:`M11 2v2`,key:`1539x4`}],[`path`,{d:`M5 2v2`,key:`1yf1q8`}],[`path`,{d:`M5 3H4a2 2 0 0 0-2 2v4a6 6 0 0 0 12 0V5a2 2 0 0 0-2-2h-1`,key:`rb5t3r`}],[`path`,{d:`M8 15a6 6 0 0 0 12 0v-3`,key:`x18d4x`}],[`circle`,{cx:`20`,cy:`10`,r:`2`,key:`ts1r5v`}]]),ya=Zi(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),ba=Zi(`users`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]),xa=Zi(`wand-sparkles`,[[`path`,{d:`m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72`,key:`ul74o6`}],[`path`,{d:`m14 7 3 3`,key:`1r5n42`}],[`path`,{d:`M5 6v4`,key:`ilb8ba`}],[`path`,{d:`M19 14v4`,key:`blhpug`}],[`path`,{d:`M10 2v2`,key:`7u0qdc`}],[`path`,{d:`M7 8H3`,key:`zfb6yr`}],[`path`,{d:`M21 16h-4`,key:`1cnmox`}],[`path`,{d:`M11 3H9`,key:`1obp7u`}]]),Sa=Zi(`waves-horizontal`,[[`path`,{d:`M2 12q2.5 2 5 0t5 0 5 0 5 0`,key:`8ddzzs`}],[`path`,{d:`M2 19q2.5 2 5 0t5 0 5 0 5 0`,key:`1wj4st`}],[`path`,{d:`M2 5q2.5 2 5 0t5 0 5 0 5 0`,key:`69x50u`}]]),Ca={size:18,strokeWidth:1.75,"aria-hidden":!0},wa={home:e=>(0,z.jsx)(la,{...Ca,...e}),board:e=>(0,z.jsx)(ca,{...Ca,...e}),streams:e=>(0,z.jsx)(Sa,{...Ca,...e}),queue:e=>(0,z.jsx)(ua,{...Ca,...e}),done:e=>(0,z.jsx)(ta,{...Ca,...e}),phases:e=>(0,z.jsx)(da,{...Ca,...e}),facts:e=>(0,z.jsx)(ea,{...Ca,...e}),doctor:e=>(0,z.jsx)(va,{...Ca,...e}),bus:e=>(0,z.jsx)(ma,{...Ca,...e}),room:e=>(0,z.jsx)(oa,{...Ca,...e}),fleet:e=>(0,z.jsx)(ba,{...Ca,...e}),release:e=>(0,z.jsx)(ha,{...Ca,...e}),skills:e=>(0,z.jsx)(xa,{...Ca,...e}),docs:e=>(0,z.jsx)(ra,{...Ca,...e}),needsDavid:e=>(0,z.jsx)($i,{...Ca,...e}),kit:e=>(0,z.jsx)(pa,{...Ca,...e}),health:e=>(0,z.jsx)(Qi,{...Ca,...e}),gates:e=>(0,z.jsx)(_a,{...Ca,...e}),tokens:e=>(0,z.jsx)(sa,{...Ca,...e}),knowledge:e=>(0,z.jsx)(ga,{...Ca,...e}),prs:e=>(0,z.jsx)(aa,{...Ca,...e}),rooms:e=>(0,z.jsx)(na,{...Ca,...e}),risks:e=>(0,z.jsx)(ya,{...Ca,...e}),decisions:e=>(0,z.jsx)(ia,{...Ca,...e}),monitor:e=>(0,z.jsx)(fa,{...Ca,...e})};function H({children:e,className:t=``}){return(0,z.jsx)(`section`,{className:`bg-paper border border-sand rounded-kit shadow-panel min-w-0 overflow-hidden ${t}`,children:e})}function U({title:e,eyebrow:t,path:n,icon:r,children:i}){return(0,z.jsxs)(`div`,{className:`flex items-baseline justify-between gap-3 px-3 pt-2.5 pb-2 min-w-0`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0 shrink`,children:[r&&(0,z.jsx)(`span`,{className:`text-umber/80 shrink-0 translate-y-px`,children:wa[r]()}),(0,z.jsx)(`span`,{className:`font-display font-bold text-[20px] leading-tight text-umber truncate shrink-0 max-w-full`,children:e}),t&&(0,z.jsx)(`span`,{className:`ml-1 font-mono font-medium text-[12px] uppercase tracking-[.1em] text-ink3 whitespace-nowrap hidden md:inline`,children:t})]}),(0,z.jsxs)(`div`,{className:`flex items-center gap-1.5 min-w-0 shrink basis-0 grow justify-end`,children:[n&&(0,z.jsx)(`span`,{className:`font-mono text-[12px] text-ink3 truncate min-w-[4ch]`,title:n,children:n}),i]})]})}var Ta={neutral:`bg-slate-wash text-slate border-slate-line`,ok:`bg-moss-wash text-moss border-moss-line`,warn:`bg-amber-wash text-amber border-amber-line`,bad:`bg-brick-wash text-brick border-brick-line`,david:`bg-ember-wash text-ember-deep border-ember-line`,outline:`bg-transparent text-umber border-dust font-medium`,solid:`bg-brick text-white border-brick`};function W({tone:e=`neutral`,children:t}){return(0,z.jsx)(`span`,{className:`inline-flex items-center gap-1.5 h-[22px] px-[9px] rounded-full font-mono font-semibold text-[12px] tracking-[.03em] border whitespace-nowrap ${Ta[e]}`,children:t})}var Ea=[`BLOCKER`,`RISK`,`DONE`,`FYI`,`AGENT_ACTION`,`GO`,`SCOPE CHANGE`,`VERDICT`,`DAVID_DECISION`],Da={FYI:`bg-linen text-umber shadow-[inset_0_0_0_1px_var(--color-sand)]`,AGENT_ACTION:`bg-slate-wash text-slate`,DAVID_DECISION:`bg-ember-wash text-ember-deep`,BLOCKER:`bg-brick-wash text-brick`,RISK:`bg-amber-wash text-amber`,DONE:`bg-moss-wash text-moss`,GO:`bg-walnut text-paper`,"SCOPE CHANGE":`bg-amber-wash text-amber shadow-[inset_0_0_0_1px_var(--color-amber-line)]`,VERDICT:`bg-moss-wash text-moss shadow-[inset_0_0_0_1px_var(--color-moss-line)]`};function Oa({prefix:e,fail:t}){let n=t&&e===`VERDICT`?`bg-brick-wash text-brick shadow-[inset_0_0_0_1px_var(--color-brick-line)]`:Da[e];return(0,z.jsx)(`span`,{className:`font-mono font-bold text-[12px] tracking-[.04em] px-[7px] py-[3px] rounded-[4px] mr-1.5 align-[1px] ${n}`,children:e})}function ka({glyph:e,raw:t,showRaw:n=!1,malformed:r=!1,children:i,className:a=``}){return(0,z.jsxs)(`div`,{className:`grid grid-cols-[var(--spacing-gutter)_1fr] min-h-10 items-center border-b border-sand last:border-b-0 hover:bg-linen/60 ${r?`shadow-[inset_3px_0_0_var(--color-brick)]`:``} ${a}`,children:[(0,z.jsx)(`div`,{className:`self-stretch flex items-center justify-center font-mono font-medium text-[12px] whitespace-nowrap tracking-[-.02em] border-r select-none ${n?`text-ember border-ember`:r?`text-brick border-brick`:`text-tan border-sand`}`,children:e}),n&&t?(0,z.jsx)(`pre`,{className:`m-0 px-3 py-2 font-mono text-[13px] leading-[1.5] text-walnut whitespace-pre-wrap`,children:t}):(0,z.jsx)(`div`,{className:`px-3 min-w-0`,children:i})]})}function Aa({cols:e,children:t}){return(0,z.jsx)(`div`,{className:`grid items-center h-[34px] pr-3 pl-[var(--spacing-gutter)] bg-cream border-b border-dust font-mono font-semibold text-[12px] uppercase tracking-[.07em] text-ink3 gap-3`,style:{gridTemplateColumns:e},children:t})}function G({tone:e=`default`,size:t=`md`,children:n,...r}){return(0,z.jsx)(`button`,{className:`font-medium leading-none rounded-kit border cursor-pointer whitespace-nowrap ${e===`primary`?`bg-ember border-ember text-white hover:bg-ember-deep hover:border-ember-deep`:e===`ghost`?`border-transparent bg-transparent text-umber hover:bg-linen hover:text-walnut`:`border-dust bg-paper text-walnut hover:bg-linen`} ${t===`sm`?`px-2 py-[5px] text-[12px]`:`px-3 py-2 text-[13px]`}`,...r,children:n})}function ja(){return(0,z.jsx)(`span`,{className:`font-mono font-medium text-[11px] tracking-[.06em] uppercase text-ink3 border border-dashed border-dust rounded-full px-[7px] py-[3px] ml-1.5 align-[1px]`,children:`proposed`})}function Ma({state:e,active:t,title:n}){return(0,z.jsx)(`span`,{className:`relative inline-block w-2 h-2 rounded-full ${e===`live`?`bg-moss shadow-[0_0_0_3px_var(--color-moss-wash)]`:e===`idle`?`bg-amber`:`bg-dust`}`,title:n??(t?`pane active < 60 s`:e),children:t&&(0,z.jsx)(`span`,{className:`absolute inset-0 rounded-full bg-moss animate-ping opacity-60`})})}function Na({size:e=14,className:t=``}){return(0,z.jsx)(`span`,{className:`inline-block rounded-full border-2 border-current border-t-transparent animate-spin align-[-2px] ${t}`,style:{width:e,height:e},"aria-label":`working`})}function Pa({size:e=22}){return(0,z.jsxs)(`svg`,{width:e,height:e,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":`true`,className:`shrink-0`,children:[(0,z.jsx)(`path`,{d:`M3 19.5h18`,stroke:`var(--color-walnut)`,strokeWidth:`2`,strokeLinecap:`round`}),(0,z.jsx)(`path`,{d:`M12 19.5V10`,stroke:`var(--color-leaf)`,strokeWidth:`2`,strokeLinecap:`round`}),(0,z.jsx)(`path`,{d:`M12 12.5c0-3.6-2.6-6-6.5-6 .3 3.7 2.8 6 6.5 6Z`,fill:`var(--color-leaf)`}),(0,z.jsx)(`path`,{d:`M12 9.5c0-3.6 2.6-6 6.5-6-.3 3.7-2.8 6-6.5 6Z`,fill:`var(--color-leaf-light)`}),(0,z.jsx)(`circle`,{cx:`12`,cy:`21.5`,r:`1.4`,fill:`var(--color-ember)`})]})}var Fa=`/api`;function K(e,t=0){let[n,r]=(0,N.useState)(null),[i,a]=(0,N.useState)(null),[o,s]=(0,N.useState)(!!e),[c,l]=(0,N.useState)(0);return(0,N.useEffect)(()=>{if(!e)return;let n=!0;s(!0),fetch(Fa+e).then(async e=>{if(e.status===401&&window.dispatchEvent(new Event(`groundwork-console:unauthorized`)),!e.ok)throw Error(`${e.status} ${e.statusText}`);return await e.json()}).then(e=>{n&&(r(e),a(null))}).catch(e=>{n&&a(e.message)}).finally(()=>{n&&s(!1)});let i=t>0?setInterval(()=>l(e=>e+1),t):void 0;return()=>{n=!1,i&&clearInterval(i)}},[e,c,t]),{data:n,error:i,loading:o,refresh:()=>l(e=>e+1)}}async function Ia(e,t){let n=await fetch(Fa+e,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t??{})});n.status===401&&window.dispatchEvent(new Event(`groundwork-console:unauthorized`));let r=await n.json();if(!n.ok&&!r.status)throw Error(r.error??`${n.status}`);return r}async function La(e,t,n){let r=await fetch(`${Fa}/projects/${encodeURIComponent(e)}/docs/${encodeURIComponent(t)}`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(n)}),i=await r.json();if(!r.ok)throw Error(i.error??`${r.status}`);if(!i.sha||!i.run)throw Error(`write response missing sha/run`);return{sha:i.sha,run:i.run}}var Ra=(0,N.createContext)({projects:[],current:``,setCurrent:()=>{},error:null,refresh:()=>{}});function za({children:e}){let{data:t,error:n,refresh:r}=K(`/projects`,3e4),[i,a]=(0,N.useState)(()=>localStorage.getItem(`groundwork-console.project`)??``);return(0,N.useEffect)(()=>{t?.length&&!t.some(e=>e.name===i)&&a(t[0].name)},[t,i]),(0,N.useEffect)(()=>{i&&localStorage.setItem(`groundwork-console.project`,i)},[i]),(0,z.jsx)(Ra.Provider,{value:{projects:t??[],current:i,setCurrent:a,error:n,refresh:r},children:e})}var Ba=()=>(0,N.useContext)(Ra),Va=(0,N.createContext)({runs:[],running:0,refresh:()=>{}});function Ha({children:e}){let{data:t,refresh:n}=K(`/runs?limit=100`),[r,i]=(0,N.useState)([]);(0,N.useEffect)(()=>{t&&i(t.runs)},[t]),(0,N.useEffect)(()=>{let e=new EventSource(`/api/runs/stream`);return e.onmessage=e=>{let t=JSON.parse(e.data);t.type!==`hello`&&i(e=>{let n=e.findIndex(e=>e.id===t.id);if(n>=0){let r=e.slice();return r[n]=t,r}return[t,...e].slice(0,100)})},()=>e.close()},[]);let a=r.filter(e=>e.status===`running`||e.status===`queued`).length;return(0,z.jsx)(Va.Provider,{value:{runs:r,running:a,refresh:n},children:e})}var Ua=()=>(0,N.useContext)(Va),Wa=`groundwork-console.recent`,Ga=()=>{try{return JSON.parse(localStorage.getItem(Wa)??`[]`)}catch{return[]}};function Ka(){let{projects:e,current:t,setCurrent:n,refresh:r}=Ba(),[i,a]=(0,N.useState)(!1),[o,s]=(0,N.useState)(!1),[c,l]=(0,N.useState)(``),[u,d]=(0,N.useState)(Ga),f=(0,N.useRef)(null);(0,N.useEffect)(()=>{t&&d(e=>{let n=[t,...e.filter(e=>e!==t)].slice(0,3);return localStorage.setItem(Wa,JSON.stringify(n)),n})},[t]),(0,N.useEffect)(()=>{let e=e=>{f.current&&!f.current.contains(e.target)&&a(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[]);let p=u.filter(t=>e.some(e=>e.name===t)),m=e.filter(e=>!p.includes(e.name)),h=e.filter(e=>!c||e.name.includes(c)||(e.room??``).includes(c)||e.path.includes(c));return(0,z.jsxs)(`div`,{ref:f,className:`relative flex items-center gap-0.5 whitespace-nowrap`,children:[p.map(e=>(0,z.jsx)(`button`,{onClick:()=>n(e),className:`px-2.5 py-1.5 rounded-full font-mono font-medium text-[12px] cursor-pointer border-0 ${e===t?`bg-walnut text-paper`:`bg-transparent text-umber hover:bg-linen`}`,children:e},e)),(0,z.jsxs)(`button`,{onClick:()=>a(e=>!e),"aria-expanded":i,className:`inline-flex items-center gap-1 px-2.5 py-1.5 rounded-full font-mono font-medium text-[12px] cursor-pointer border ${i?`bg-paper border-dust text-walnut`:`bg-transparent border-transparent text-umber hover:bg-linen`}`,children:[m.length?`+${m.length} more`:`all`,` `,(0,z.jsx)(`span`,{className:`text-tan`,children:`▾`})]}),i&&(0,z.jsxs)(`div`,{className:`absolute right-0 top-[calc(100%+6px)] z-50 w-[420px] bg-paper border border-sand rounded-kit shadow-panel whitespace-normal text-left`,children:[(0,z.jsx)(`div`,{className:`p-2 border-b border-sand`,children:(0,z.jsx)(`input`,{autoFocus:!0,value:c,onChange:e=>l(e.target.value),placeholder:`Search projects, rooms, paths…`,className:`w-full text-[13px] px-2.5 py-2 border border-dust rounded-kit bg-paper text-walnut`})}),(0,z.jsxs)(`div`,{className:`max-h-[50vh] overflow-auto`,children:[h.map(e=>(0,z.jsxs)(`button`,{onClick:()=>{n(e.name),a(!1),l(``)},className:`w-full text-left grid grid-cols-[1fr_auto] gap-2 items-center px-3 py-2 border-0 cursor-pointer border-b border-sand last:border-b-0 ${e.name===t?`bg-linen`:`bg-transparent hover:bg-linen/60`}`,children:[(0,z.jsxs)(`span`,{className:`min-w-0`,children:[(0,z.jsx)(`span`,{className:`font-mono font-medium text-[13px]`,children:e.name}),e.room&&(0,z.jsxs)(`span`,{className:`ml-2 font-mono text-[12px] text-ink3`,children:[`#`,e.room]}),(0,z.jsx)(`div`,{className:`font-mono text-[11px] text-tan truncate`,children:e.path.replace(/^\/Users\/[^/]+/,`~`)})]}),(0,z.jsxs)(`span`,{className:`flex gap-1`,children:[e.behind&&(0,z.jsx)(W,{tone:`warn`,children:`behind`}),e.schema===`workstreams.v1`?(0,z.jsx)(W,{tone:`ok`,children:`v1`}):e.schema?(0,z.jsx)(W,{tone:`warn`,children:e.schema.replace(`workstreams.`,``)}):(0,z.jsx)(W,{tone:`outline`,children:`no seam`})]})]},e.name)),h.length===0&&(0,z.jsx)(`div`,{className:`px-3 py-3 text-[13px] text-umber`,children:`no match`})]}),(0,z.jsxs)(`div`,{className:`p-2 border-t border-sand flex justify-between items-center`,children:[(0,z.jsxs)(`span`,{className:`text-[12px] text-umber font-mono`,children:[e.length,` projects · groundwork-console.config.json`]}),(0,z.jsx)(G,{size:`sm`,tone:`primary`,onClick:()=>{s(!0),a(!1)},children:`+ Add project`})]})]}),o&&(0,z.jsx)(Ja,{onClose:()=>{s(!1),r()}})]})}var qa=`/api`;function Ja({onClose:e}){let[t,n]=(0,N.useState)(``),[r,i]=(0,N.useState)(`~/workspace/`),[a,o]=(0,N.useState)(``),[s,c]=(0,N.useState)(null),[l,u]=(0,N.useState)(null),[d,f]=(0,N.useState)(!1),p=async()=>{c(await Ia(`/projects/validate`,{path:r}))},[m,h]=(0,N.useState)([]),[g,_]=(0,N.useState)(!1);(0,N.useEffect)(()=>{let e=setTimeout(async()=>{try{let e=await fetch(`${qa}/projects/browse?prefix=${encodeURIComponent(r)}`);h((await e.json()).dirs??[])}catch{h([])}},150);return()=>clearTimeout(e)},[r]),(0,N.useEffect)(()=>{if(!g){let e=r.replace(/\/+$/,``).split(`/`).pop()??``;e&&!e.startsWith(`~`)&&n(e.toLowerCase().replace(/[^a-z0-9-_]/g,`-`))}},[r,g]);let v=K(`/bus/rooms`,6e4).data??[];return(0,N.useEffect)(()=>{!a&&t&&v.some(e=>e.room===t)&&o(t)},[t,v,a]),(0,z.jsx)(`div`,{className:`fixed inset-0 z-[60] bg-walnut/30 flex items-start justify-center pt-[12vh] whitespace-normal text-left`,onMouseDown:t=>{t.target===t.currentTarget&&e()},children:(0,z.jsxs)(`div`,{className:`w-[520px] bg-paper border border-sand rounded-kit shadow-panel`,children:[(0,z.jsxs)(`div`,{className:`px-4 py-3 border-b border-sand flex items-center gap-2 font-display font-bold text-[18px] text-umber`,children:[wa.home(),` Add project`]}),(0,z.jsxs)(`div`,{className:`p-4 grid gap-3 text-[13px]`,children:[(0,z.jsxs)(`label`,{className:`grid gap-1`,children:[(0,z.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Name`}),(0,z.jsx)(`input`,{value:t,onChange:e=>{_(!0),n(e.target.value.trim())},placeholder:`edgewatch`,className:`px-2.5 py-2 border border-dust rounded-kit bg-paper text-walnut font-mono`})]}),(0,z.jsxs)(`label`,{className:`grid gap-1`,children:[(0,z.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Repo path (must exist; ideally has docs/ with a seam)`}),(0,z.jsxs)(`div`,{className:`flex gap-2`,children:[(0,z.jsx)(`input`,{list:`gwc-dirs`,value:r,onChange:e=>{i(e.target.value),c(null)},className:`flex-1 px-2.5 py-2 border border-dust rounded-kit bg-paper text-walnut font-mono`}),(0,z.jsx)(G,{size:`sm`,onClick:p,children:`Check`})]}),(0,z.jsx)(`datalist`,{id:`gwc-dirs`,children:m.map(e=>(0,z.jsx)(`option`,{value:e.path,children:e.registered?`already registered`:e.hasDocs?`docs/ ✓`:e.isGit?`git`:``},e.path))})]}),s&&(s.ok?(0,z.jsxs)(`div`,{className:`flex gap-1.5 flex-wrap items-center`,children:[(0,z.jsx)(W,{tone:`ok`,children:`exists`}),s.isGit&&(0,z.jsx)(W,{tone:`ok`,children:`git`}),s.hasDocs?(0,z.jsx)(W,{tone:`ok`,children:`docs/`}):(0,z.jsx)(W,{tone:`warn`,children:`no docs/ — run groundwork init`}),(s.hasSeam??[]).map(e=>(0,z.jsx)(W,{tone:`ok`,children:e},e))]}):(0,z.jsx)(`div`,{className:`text-brick`,children:s.reason})),(0,z.jsxs)(`label`,{className:`grid gap-1`,children:[(0,z.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Bus room (optional) — links Board/Bus/Fleets/Release to this channel`}),(0,z.jsx)(`input`,{list:`gwc-rooms`,value:a,onChange:e=>o(e.target.value.replace(/^#/,``)),placeholder:t||`room-name`,className:`px-2.5 py-2 border border-dust rounded-kit bg-paper text-walnut font-mono`}),(0,z.jsxs)(`span`,{className:`text-[12px] text-umber`,children:[`The room itself is created on the bus by the first agent that joins it (or via `,(0,z.jsx)(`code`,{children:`join_room`}),` once bus writes are on) — the console only records the link.`]}),(0,z.jsx)(`datalist`,{id:`gwc-rooms`,children:v.map(e=>(0,z.jsx)(`option`,{value:e.room},e.room))})]}),l&&(0,z.jsx)(`div`,{className:`text-brick`,children:l})]}),(0,z.jsxs)(`div`,{className:`px-4 py-3 border-t border-sand flex justify-end gap-2`,children:[(0,z.jsx)(G,{size:`sm`,onClick:e,children:`Cancel`}),(0,z.jsx)(G,{size:`sm`,tone:`primary`,onClick:async()=>{f(!0),u(null);try{let n=await Ia(`/projects`,{name:t,path:r,room:a||void 0});if(n.status!==`ok`)throw Error(n.error??`failed`);e()}catch(e){u(e.message)}finally{f(!1)}},disabled:!t||!r||d,children:d?`Adding…`:`Add to groundwork-console.config.json`})]})]})})}function Ya(){let{data:e,refresh:t}=K(`/admin/seam-writes`,1e4),[n,r]=(0,N.useState)(!1),i=!!e?.enabled,a=async e=>{r(!0);try{await Ia(`/admin/seam-writes`,{enabled:e}),t()}finally{r(!1)}};return(0,z.jsx)(z.Fragment,{children:(0,z.jsx)(`button`,{onClick:()=>a(!i),disabled:n,className:`ml-1.5 shrink-0 font-mono text-[11px] uppercase tracking-[.08em] rounded-full px-2 py-1 border cursor-pointer ${i?`bg-amber-wash text-amber border-amber-line`:`bg-transparent text-ink3 border-dashed border-dust`}`,title:i?`seam & docs writes ON — Add item / Re-verify (seam) and Docs Save (non-seam files); click to turn off`:`seam & docs writes off — click to enable Add item / Re-verify / Docs Save. Both header switches off ⇒ console cannot change disk or bus.`,children:i?`seam & docs on`:`seam & docs`})})}function Xa(){let{data:e,refresh:t}=K(`/admin/bus-writes`,1e4),[n,r]=(0,N.useState)(!1),i=!!e?.enabled,a=async e=>{r(!0);try{await Ia(`/admin/bus-writes`,{enabled:e}),t()}finally{r(!1)}};return(0,z.jsx)(z.Fragment,{children:(0,z.jsx)(`button`,{onClick:()=>a(!i),disabled:n,className:`ml-3 shrink-0 font-mono text-[11px] uppercase tracking-[.08em] rounded-full px-2 py-1 border cursor-pointer ${i?`bg-brick-wash text-brick border-brick-line`:`bg-transparent text-ink3 border-dashed border-dust`}`,title:i?`bus writes ON — click to turn off. Sends/prune/unregister/decommission are armed (each still confirms). Persisted in ~/.groundwork-console/switches.json.`:`bus writes off — click to enable (send_message, prune, unregister, decommission). Persisted across API restarts.`,children:i?`writes on`:`read-only · v0.1`})})}var Za=[{kind:`decision`,label:`Needs David`},{kind:`blocker`,label:`BLOCKER in a watched room`},{kind:`dm`,label:`DM to david`},{kind:`run.failed`,label:`Run failed`},{kind:`run.side-effect`,label:`Side-effecting run finished`},{kind:`rule.sent`,label:`Rule sent a message`}],Qa=(0,N.createContext)({items:[],unseen:0,seenAt:0,markSeen:()=>{},muted:new Set,toggleMute:()=>{},toasts:[],dismissToast:()=>{},browserPerm:`default`,askBrowser:()=>{}}),$a=`groundwork-console.notify.seenAt`,eo=`groundwork-console.notify.muted`;function to({children:e}){let{data:t}=K(`/notifications?limit=100`),[n,r]=(0,N.useState)([]),[i,a]=(0,N.useState)(()=>Number(localStorage.getItem($a)??0)),[o,s]=(0,N.useState)(()=>new Set(JSON.parse(localStorage.getItem(eo)??`[]`))),[c,l]=(0,N.useState)([]),[u,d]=(0,N.useState)(typeof Notification>`u`?`unsupported`:Notification.permission),f=(0,N.useRef)(o);f.current=o,(0,N.useEffect)(()=>{t&&r(e=>{let n=new Set(e.map(e=>e.id));return[...e,...t.filter(e=>!n.has(e.id))].sort((e,t)=>t.ts-e.ts)})},[t]),(0,N.useEffect)(()=>{let e=new EventSource(`/api/notifications/stream`);return e.onmessage=e=>{let t=JSON.parse(e.data);if(t.type!==`hello`&&(r(e=>e.some(e=>e.id===t.id)?e:[t,...e].slice(0,200)),!f.current.has(t.kind)&&t.urgent&&(l(e=>[t,...e].slice(0,4)),setTimeout(()=>l(e=>e.filter(e=>e.id!==t.id)),12e3),document.hidden&&typeof Notification<`u`&&Notification.permission===`granted`)))try{let e=new Notification(t.title,{body:t.body,tag:t.id});e.onclick=()=>{window.focus(),location.hash=`#`+t.link}}catch{}},()=>e.close()},[]);let p=n.filter(e=>e.ts>i&&!o.has(e.kind)).length;return(0,z.jsx)(Qa.Provider,{value:{items:n,unseen:p,seenAt:i,markSeen:()=>{let e=Date.now();a(e),localStorage.setItem($a,String(e))},muted:o,toggleMute:e=>s(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),localStorage.setItem(eo,JSON.stringify([...n])),n}),toasts:c,dismissToast:e=>l(t=>t.filter(t=>t.id!==e)),browserPerm:u,askBrowser:()=>{typeof Notification>`u`||Notification.requestPermission().then(d)}},children:e})}var no=()=>(0,N.useContext)(Qa),ro={decision:`david`,blocker:`bad`,dm:`neutral`,"run.failed":`bad`,"run.side-effect":`ok`,"rule.sent":`warn`},io={decision:`needs David`,blocker:`BLOCKER`,dm:`DM`,"run.failed":`run failed`,"run.side-effect":`run done`,"rule.sent":`rule sent`},ao=e=>{let t=Math.floor((Date.now()-e)/6e4);return t<1?`now`:t<60?`${t} min`:t<1440?`${Math.floor(t/60)} h`:`${Math.floor(t/1440)} d`};function q(){let{items:e,unseen:t,seenAt:n,markSeen:r,muted:i,toggleMute:a,browserPerm:o,askBrowser:s}=no(),[c,l]=(0,N.useState)(!1),[u,d]=(0,N.useState)(!1),f=(0,N.useRef)(null);(0,N.useEffect)(()=>{let e=e=>{f.current&&!f.current.contains(e.target)&&l(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[]);let p=e.filter(e=>!i.has(e.kind)).slice(0,60),{runs:m}=Ua(),h=[...m.filter(e=>e.status===`running`||e.status===`queued`),...m.filter(e=>e.status!==`running`&&e.status!==`queued`)].slice(0,5),g=e=>e===`ok`?`ok`:e===`failed`?`bad`:e===`running`||e===`queued`?`warn`:`neutral`;return(0,z.jsxs)(`div`,{ref:f,className:`relative ml-2 shrink-0`,children:[(0,z.jsxs)(`button`,{onClick:()=>{l(e=>!e),c||r()},className:`relative inline-flex items-center justify-center w-8 h-8 rounded-full border cursor-pointer ${c?`bg-paper border-dust`:`bg-transparent border-transparent hover:bg-linen`} text-umber`,title:`notifications`,"aria-label":`notifications`,children:[wa.needsDavid({size:16}),t>0&&(0,z.jsx)(`span`,{className:`absolute -top-1 -right-1 min-w-[18px] h-[18px] px-1 rounded-full bg-ember text-paper font-mono font-bold text-[10px] flex items-center justify-center`,children:t>99?`99+`:t})]}),c&&(0,z.jsxs)(`div`,{className:`absolute right-0 top-[calc(100%+6px)] z-50 w-[440px] bg-paper border border-sand rounded-kit shadow-panel whitespace-normal text-left`,children:[(0,z.jsxs)(`div`,{className:`flex items-center justify-between px-3 py-2 border-b border-sand`,children:[(0,z.jsx)(`span`,{className:`font-semibold text-[13px] uppercase tracking-[.08em] text-umber`,children:`Notifications`}),(0,z.jsxs)(`div`,{className:`flex gap-1.5 items-center`,children:[(0,z.jsx)(G,{size:`sm`,tone:`ghost`,onClick:()=>d(e=>!e),"aria-pressed":u,children:`prefs`}),(0,z.jsx)(B,{to:`/ops/runs`,onClick:()=>l(!1),className:`font-mono text-[12px]`,children:`runs →`})]})]}),u&&(0,z.jsxs)(`div`,{className:`px-3 py-2 border-b border-sand grid gap-1 text-[12px]`,children:[Za.map(e=>(0,z.jsxs)(`label`,{className:`flex items-center gap-2 cursor-pointer`,children:[(0,z.jsx)(`input`,{type:`checkbox`,checked:!i.has(e.kind),onChange:()=>a(e.kind)}),(0,z.jsx)(W,{tone:ro[e.kind],children:io[e.kind]}),(0,z.jsx)(`span`,{className:`text-umber`,children:e.label})]},e.kind)),(0,z.jsxs)(`div`,{className:`mt-1 flex items-center gap-2 text-umber`,children:[`Browser notifications when the tab is hidden: `,o===`unsupported`?(0,z.jsx)(`span`,{className:`text-tan`,children:`unsupported`}):o===`granted`?(0,z.jsx)(W,{tone:`ok`,children:`on`}):o===`denied`?(0,z.jsx)(W,{tone:`bad`,children:`blocked in browser`}):(0,z.jsx)(G,{size:`sm`,onClick:s,children:`Enable`})]}),(0,z.jsx)(`div`,{className:`text-[11px] font-mono text-tan`,children:`urgent kinds toast for 12 s: needs David · BLOCKER · run failed. Muted kinds don't count or toast. Watched rooms = rooms linked to your projects.`})]}),h.length>0&&(0,z.jsxs)(`div`,{className:`border-b border-sand`,children:[(0,z.jsxs)(`div`,{className:`flex items-center justify-between px-3 pt-2 pb-1`,children:[(0,z.jsxs)(`span`,{className:`font-mono text-[10px] uppercase tracking-[.1em] text-tan`,children:[`runs · last `,h.length]}),(0,z.jsx)(B,{to:`/ops/runs`,onClick:()=>l(!1),className:`font-mono text-[11px] text-ember-deep`,children:`all runs →`})]}),h.map(e=>(0,z.jsxs)(B,{to:`/ops/runs?run=${e.id}`,onClick:()=>l(!1),className:`grid grid-cols-[auto_1fr_auto] gap-2 items-center px-3 py-1 hover:no-underline hover:bg-linen/60 text-inherit`,children:[(0,z.jsx)(W,{tone:g(e.status),children:e.status}),(0,z.jsxs)(`span`,{className:`min-w-0 truncate text-[12px]`,title:e.label,children:[e.label,e.project&&(0,z.jsxs)(`span`,{className:`font-mono text-[10px] text-tan`,children:[` · `,e.project]})]}),(0,z.jsx)(`span`,{className:`font-mono text-[11px] text-ink3 whitespace-nowrap`,children:ao(e.endedAt??e.startedAt)})]},e.id))]}),(0,z.jsxs)(`div`,{className:`max-h-[60vh] overflow-auto`,children:[p.length===0&&(0,z.jsx)(`div`,{className:`px-3 py-4 text-[13px] text-umber`,children:`Nothing yet. New DMs to david, DAVID_DECISION / BLOCKER in watched rooms, failed or side-effecting runs and rule sends will show here.`}),p.map(e=>(0,z.jsxs)(B,{to:e.link,onClick:()=>l(!1),className:`grid grid-cols-[auto_1fr_auto] gap-2 items-start px-3 py-2 border-b border-sand last:border-b-0 hover:no-underline hover:bg-linen/60 text-inherit ${e.ts>n?`bg-ember-wash/25`:``}`,children:[(0,z.jsx)(`span`,{className:`pt-0.5`,children:(0,z.jsx)(W,{tone:ro[e.kind],children:io[e.kind]})}),(0,z.jsxs)(`span`,{className:`min-w-0`,children:[(0,z.jsx)(`span`,{className:`block text-[13px] font-semibold truncate`,children:e.title}),e.body&&(0,z.jsx)(`span`,{className:`block text-[12px] text-umber line-clamp-2`,children:e.body}),(e.project||e.from)&&(0,z.jsxs)(`span`,{className:`block font-mono text-[11px] text-tan`,children:[e.project??``,e.from?` · ${e.from}`:``]})]}),(0,z.jsx)(`span`,{className:`font-mono text-[11px] text-ink3 whitespace-nowrap`,children:ao(e.ts)})]},e.id))]})]})]})}function oo(){let{toasts:e,dismissToast:t}=no();return e.length===0?null:(0,z.jsx)(`div`,{className:`fixed right-4 bottom-4 z-[70] grid gap-2 w-[380px] whitespace-normal text-left`,children:e.map(e=>(0,z.jsxs)(`div`,{className:`bg-paper border rounded-kit shadow-panel px-3 py-2.5 grid grid-cols-[1fr_auto] gap-2 ${e.kind===`decision`?`border-ember`:`border-brick`}`,children:[(0,z.jsxs)(B,{to:e.link,onClick:()=>t(e.id),className:`min-w-0 hover:no-underline text-inherit`,children:[(0,z.jsxs)(`span`,{className:`block font-semibold text-[13px] truncate`,children:[(0,z.jsx)(W,{tone:ro[e.kind],children:io[e.kind]}),` `,(0,z.jsx)(`span`,{className:`ml-1`,children:e.title})]}),e.body&&(0,z.jsx)(`span`,{className:`block text-[12px] text-umber line-clamp-3 mt-0.5`,children:e.body})]}),(0,z.jsx)(`button`,{onClick:()=>t(e.id),className:`border-0 bg-transparent text-tan cursor-pointer self-start`,"aria-label":`dismiss`,children:`✕`})]},e.id))})}var so={30:`#3B2A1E`,31:`#F08A48`,32:`#9CB86A`,33:`#E8A83E`,34:`#8FB0A6`,35:`#D9A070`,36:`#8FBF9F`,37:`#D9CDBB`,90:`#8A7660`,91:`#F6A56E`,92:`#B7D389`,93:`#F2C25E`,94:`#A9C9BF`,95:`#E8B88E`,96:`#A9D6B8`,97:`#FCFAF6`},co={40:`#3B2A1E`,41:`#7A3A1C`,42:`#3E5A2A`,43:`#7A5A12`,44:`#3E5650`,45:`#6B4A32`,46:`#3E5C4A`,47:`#8A7660`,100:`#5A4030`,101:`#B7521A`,102:`#6B8E3D`,103:`#C88A1E`,104:`#5C7A72`,105:`#96704F`,106:`#5C8C70`,107:`#C9B99A`},lo=e=>{if(e<16)return so[e<8?30+e:82+e]??`#EFE5D8`;if(e>=232){let t=8+(e-232)*10;return`rgb(${t},${t},${t})`}let t=e-16,n=Math.floor(t/36),r=Math.floor(t%36/6),i=t%6,a=e=>e?55+e*40:0;return`rgb(${a(n)},${a(r)},${a(i)})`},uo=e=>{let t=e.match(/(\d+)/g)?.map(Number);return!t||t.length<3?!1:(t[0]*299+t[1]*587+t[2]*114)/1e3<60};function fo(e){let t=[],n={},r=0,i=/\x1b\[([0-9;?]*)([ -/]*[@-~])/g,a=0,o,s=e=>{if(!e)return;let i={},a=n.color,o=n.bg;n.inverse&&([a,o]=[o??`#241A12`,a??`#EFE5D8`]),a&&(i.color=a&&uo(a)?`#8A7660`:a),o&&o!==`#241A12`&&(i.background=o),n.bold&&(i.fontWeight=700),n.dim&&(i.opacity=.6),n.italic&&(i.fontStyle=`italic`),n.underline&&(i.textDecoration=`underline`),t.push(Object.keys(i).length?(0,z.jsx)(`span`,{style:i,children:e},r++):e)};for(;o=i.exec(e);){if(s(e.slice(a,o.index)),a=i.lastIndex,o[2]!==`m`)continue;let t=(o[1]||`0`).split(`;`).map(e=>e===``?0:Number(e));for(let e=0;e<t.length;e++){let r=t[e];if(r===0)n={};else if(r===1)n.bold=!0;else if(r===2)n.dim=!0;else if(r===3)n.italic=!0;else if(r===4)n.underline=!0;else if(r===7)n.inverse=!0;else if(r===22)n.bold=!1,n.dim=!1;else if(r===23)n.italic=!1;else if(r===24)n.underline=!1;else if(r===27)n.inverse=!1;else if(r===39)n.color=void 0;else if(r===49)n.bg=void 0;else if(so[r])n.color=so[r];else if(co[r])n.bg=co[r];else if(r===38||r===48){let i=r===38;if(t[e+1]===5){let r=lo(t[e+2]??0);i?n.color=r:n.bg=r,e+=2}else if(t[e+1]===2){let r=`rgb(${t[e+2]??0},${t[e+3]??0},${t[e+4]??0})`;i?n.color=r:n.bg=r,e+=4}}}}return s(e.slice(a)),t}var po={};function mo(e){let t=po[e];if(t)return t;t=po[e]=[];for(let e=0;e<128;e++){let n=String.fromCharCode(e);t.push(n)}for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t[r]=`%`+(`0`+r.toString(16).toUpperCase()).slice(-2)}return t}function ho(e,t){typeof t!=`string`&&(t=ho.defaultChars);let n=mo(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(e){let t=``;for(let r=0,i=e.length;r<i;r+=3){let a=parseInt(e.slice(r+1,r+3),16);if(a<128){t+=n[a];continue}if((a&224)==192&&r+3<i){let n=parseInt(e.slice(r+4,r+6),16);if((n&192)==128){let e=a<<6&1984|n&63;t+=e<128?`��`:String.fromCharCode(e),r+=3;continue}}if((a&240)==224&&r+6<i){let n=parseInt(e.slice(r+4,r+6),16),i=parseInt(e.slice(r+7,r+9),16);if((n&192)==128&&(i&192)==128){let e=a<<12&61440|n<<6&4032|i&63;t+=e<2048||e>=55296&&e<=57343?`���`:String.fromCharCode(e),r+=6;continue}}if((a&248)==240&&r+9<i){let n=parseInt(e.slice(r+4,r+6),16),i=parseInt(e.slice(r+7,r+9),16),o=parseInt(e.slice(r+10,r+12),16);if((n&192)==128&&(i&192)==128&&(o&192)==128){let e=a<<18&1835008|n<<12&258048|i<<6&4032|o&63;e<65536||e>1114111?t+=`����`:(e-=65536,t+=String.fromCharCode(55296+(e>>10),56320+(e&1023))),r+=9;continue}}t+=`�`}return t})}ho.defaultChars=`;/?:@&=+$,#`,ho.componentChars=``;var go={};function _o(e){let t=go[e];if(t)return t;t=go[e]=[];for(let e=0;e<128;e++){let n=String.fromCharCode(e);/^[0-9a-z]$/i.test(n)?t.push(n):t.push(`%`+(`0`+e.toString(16).toUpperCase()).slice(-2))}for(let n=0;n<e.length;n++)t[e.charCodeAt(n)]=e[n];return t}function vo(e,t,n){typeof t!=`string`&&(n=t,t=vo.defaultChars),n===void 0&&(n=!0);let r=_o(t),i=``;for(let t=0,a=e.length;t<a;t++){let o=e.charCodeAt(t);if(n&&o===37&&t+2<a&&/^[0-9a-f]{2}$/i.test(e.slice(t+1,t+3))){i+=e.slice(t,t+3),t+=2;continue}if(o<128){i+=r[o];continue}if(o>=55296&&o<=57343){if(o>=55296&&o<=56319&&t+1<a){let n=e.charCodeAt(t+1);if(n>=56320&&n<=57343){i+=encodeURIComponent(e[t]+e[t+1]),t++;continue}}i+=`%EF%BF%BD`;continue}i+=encodeURIComponent(e[t])}return i}vo.defaultChars=`;/?:@&=+$,-_.!~*'()#`,vo.componentChars=`-_.!~*'()`;function yo(e){let t=``;return t+=e.protocol||``,t+=e.slashes?`//`:``,t+=e.auth?e.auth+`@`:``,e.hostname&&e.hostname.indexOf(`:`)!==-1?t+=`[`+e.hostname+`]`:t+=e.hostname||``,t+=e.port?`:`+e.port:``,t+=e.pathname||``,t+=e.search||``,t+=e.hash||``,t}function bo(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var xo=/^([a-z0-9.+-]+:)/i,So=/:[0-9]*$/,Co=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,wo=[`%`,`/`,`?`,`;`,`#`,`'`,`{`,`}`,`|`,`\\`,`^`,"`",`<`,`>`,`"`,"`",` `,`\r`,`
11
+ `,` `],To=[`/`,`?`,`#`],Eo=255,Do=/^[+a-z0-9A-Z_-]{0,63}$/,Oo=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,ko={javascript:!0,"javascript:":!0},Ao={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function jo(e,t){if(e&&e instanceof bo)return e;let n=new bo;return n.parse(e,t),n}bo.prototype.parse=function(e,t){let n,r,i,a=e;if(a=a.trim(),!t&&e.split(`#`).length===1){let e=Co.exec(a);if(e)return this.pathname=e[1],e[2]&&(this.search=e[2]),this}let o=xo.exec(a);if(o&&(o=o[0],n=o.toLowerCase(),this.protocol=o,a=a.substr(o.length)),(t||o||a.match(/^\/\/[^@\/]+@[^@\/]+/))&&(i=a.substr(0,2)===`//`,i&&!(o&&ko[o])&&(a=a.substr(2),this.slashes=!0)),!ko[o]&&(i||o&&!Ao[o])){let e=-1;for(let t=0;t<To.length;t++)r=a.indexOf(To[t]),r!==-1&&(e===-1||r<e)&&(e=r);let t,n;n=e===-1?a.lastIndexOf(`@`):a.lastIndexOf(`@`,e),n!==-1&&(t=a.slice(0,n),a=a.slice(n+1),this.auth=t),e=-1;for(let t=0;t<wo.length;t++)r=a.indexOf(wo[t]),r!==-1&&(e===-1||r<e)&&(e=r);e===-1&&(e=a.length),a[e-1]===`:`&&e--;let i=a.slice(0,e);a=a.slice(e),this.parseHost(i),this.hostname=this.hostname||``;let o=this.hostname[0]===`[`&&this.hostname[this.hostname.length-1]===`]`;if(!o){let e=this.hostname.split(/\./);for(let t=0,n=e.length;t<n;t++){let n=e[t];if(n&&!n.match(Do)){let r=``;for(let e=0,t=n.length;e<t;e++)n.charCodeAt(e)>127?r+=`x`:r+=n[e];if(!r.match(Do)){let r=e.slice(0,t),i=e.slice(t+1),o=n.match(Oo);o&&(r.push(o[1]),i.unshift(o[2])),i.length&&(a=i.join(`.`)+a),this.hostname=r.join(`.`);break}}}}this.hostname.length>Eo&&(this.hostname=``),o&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}let s=a.indexOf(`#`);s!==-1&&(this.hash=a.substr(s),a=a.slice(0,s));let c=a.indexOf(`?`);return c!==-1&&(this.search=a.substr(c),a=a.slice(0,c)),a&&(this.pathname=a),Ao[n]&&this.hostname&&!this.pathname&&(this.pathname=``),this},bo.prototype.parseHost=function(e){let t=So.exec(e);t&&(t=t[0],t!==`:`&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var Mo=s({decode:()=>ho,encode:()=>vo,format:()=>yo,parse:()=>jo}),No=s({Any:()=>Po,Cc:()=>Fo,Cf:()=>Io,P:()=>Lo,S:()=>Ro,Z:()=>zo}),Po=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Fo=/[\0-\x1F\x7F-\x9F]/,Io=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,Lo=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B4E\u1B4F\u1B5A-\u1B60\u1B7D-\u1B7F\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDD6E\uDEAD\uDED0\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9\uDFD4\uDFD5\uDFD7\uDFD8]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09\uDFE1]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDD6D-\uDD6F\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD839\uDDFF|\uD83A[\uDD5E\uDD5F]/,Ro=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C1\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2429\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E5\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD803[\uDD8E\uDD8F\uDED1-\uDED8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDC00-\uDCEF\uDCFA-\uDCFC\uDD00-\uDEB3\uDEBA-\uDED0\uDEE0-\uDEF0\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED8\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0-\uDCBB\uDCC0\uDCC1\uDCD0-\uDCD8\uDD00-\uDE57\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF-\uDEF8\uDF00-\uDF92\uDF94-\uDFEF\uDFFA]/,zo=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,Bo=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function Vo(e){return e>=55296&&e<=57343||e>1114111?65533:Bo.get(e)??e}function Ho(e){let t=atob(e),n=t.length&-2,r=new Uint16Array(n/2);for(let e=0,i=0;e<n;e+=2){let n=t.charCodeAt(e),a=t.charCodeAt(e+1);r[i++]=n|a<<8}return r}var Uo=Ho(`QR08ALkAAgH6AYsDNQR2BO0EPgXZBQEGLAbdBxMISQrvCmQLfQurDKQNLw4fD4YPpA+6D/IPAAAAAAAAAAAAAAAAKhBMEY8TmxUWF2EYLBkxGuAa3RsJHDscWR8YIC8jSCSIJcMl6ie3Ku8rEC0CLjoupS7kLgAIRU1hYmNmZ2xtbm9wcnN0dVQAWgBeAGUAaQBzAHcAfgCBAIQAhwCSAJoAoACsALMAbABpAGcAO4DGAMZAUAA7gCYAJkBjAHUAdABlADuAwQDBQHIiZXZlAAJhAAFpeW0AcgByAGMAO4DCAMJAEGRyAADgNdgE3XIAYQB2AGUAO4DAAMBA8CFoYZFj4SFjcgBhZAAAoFMqAAFncIsAjgBvAG4ABGFmAADgNdg43fAlbHlGdW5jdGlvbgCgYSBpAG4AZwA7gMUAxUAAAWNzpACoAHIAAOA12Jzc6SFnbgCgVCJpAGwAZABlADuAwwDDQG0AbAA7gMQAxEAABGFjZWZvcnN1xQDYANoA7QDxAPYA+QD8AAABY3LJAM8AayNzbGFzaAAAoBYidgHTANUAAKDnKmUAZAAAoAYjeQARZIABY3J0AOAA5QDrAGEidXNlAACgNSLuI291bGxpcwCgLCFhAJJjcgAA4DXYBd1wAGYAAOA12Dnd5SF2ZdhiYwDyAOoAbSJwZXEAAKBOIgAHSE9hY2RlZmhpbG9yc3UXARoBHwE6AVIBVQFiAWQBZgGCAakB6QHtAfIBYwB5ACdkUABZADuAqQCpQIABY3B5ACUBKAE1AfUhdGUGYWmg0iJ0KGFsRGlmZmVyZW50aWFsRAAAoEUhbCJleXMAAKAtIQACYWVpb0EBRAFKAU0B8iFvbgxhZABpAGwAO4DHAMdAcgBjAAhhbiJpbnQAAKAwIm8AdAAKYQABZG5ZAV0BaSJsbGEAuGB0I2VyRG90ALdg8gA5AWkAp2NyImNsZQAAAkRNUFRwAXQBeQF9AW8AdAAAoJkiaSJudXMAAKCWIuwhdXMAoJUiaSJtZXMAAKCXIm8AAAFjc4cBlAFrKndpc2VDb250b3VySW50ZWdyYWwAAKAyImUjQ3VybHkAAAFEUZwBpAFvJXVibGVRdW90ZQAAoB0gdSJvdGUAAKAZIAACbG5wdbABtgHNAdgBbwBuAGWgNyIAoHQqgAFnaXQAvAHBAcUB8iJ1ZW50AKBhIm4AdAAAoC8i7yV1ckludGVncmFsAKAuIgABZnLRAdMBAKACIe8iZHVjdACgECJuLnRlckNsb2Nrd2lzZUNvbnRvdXJJbnRlZ3JhbAAAoDMi7yFzcwCgLypjAHIAAOA12J7ccABDoNMiYQBwAACgTSKABURKU1phY2VmaW9zAAsCEgIVAhgCGwIsAjQCOQI9AnMCfwNvoEUh9CJyYWhkAKARKWMAeQACZGMAeQAFZGMAeQAPZIABZ3JzACECJQIoAuchZXIAoCEgcgAAoKEhaAB2AACg5CoAAWF5MAIzAvIhb24OYRRkbAB0oAciYQCUY3IAAOA12AfdAAFhZkECawIAAWNtRQJnAvIjaXRpY2FsAAJBREdUUAJUAl8CYwJjInV0ZQC0YG8AdAFZAloC2WJiJGxlQWN1dGUA3WJyImF2ZQBgYGkibGRlANxi7yFuZACgxCJmJWVyZW50aWFsRAAAoEYhcAR9AgAAAAAAAIECjgIAABoDZgAA4DXYO91EoagAhQKJAm8AdAAAoNwgcSJ1YWwAAKBQIuIhbGUAA0NETFJVVpkCqAK1Au8C/wIRA28AbgB0AG8AdQByAEkAbgB0AGUAZwByAGEA7ADEAW8AdAKvAgAAAACwAqhgbiNBcnJvdwAAoNMhAAFlb7kC0AJmAHQAgAFBUlQAwQLGAs0CciJyb3cAAKDQIekkZ2h0QXJyb3cAoNQhZQDlACsCbgBnAAABTFLWAugC5SFmdAABQVLcAuECciJyb3cAAKD4J+kkZ2h0QXJyb3cAoPon6SRnaHRBcnJvdwCg+SdpImdodAAAAUFU9gL7AnIicm93AACg0iFlAGUAAKCoInAAQQIGAwAAAAALA3Iicm93AACg0SFvJHduQXJyb3cAAKDVIWUlcnRpY2FsQmFyAACgJSJuAAADQUJMUlRhJAM2AzoDWgNxA3oDciJyb3cAAKGTIUJVLAMwA2EAcgAAoBMpcCNBcnJvdwAAoPUhciJldmUAEWPlIWZ00gJDAwAASwMAAFIDaSVnaHRWZWN0b3IAAKBQKWUkZVZlY3RvcgAAoF4p5SJjdG9yQqC9IWEAcgAAoFYpaSJnaHQA1AFiAwAAaQNlJGVWZWN0b3IAAKBfKeUiY3RvckKgwSFhAHIAAKBXKWUAZQBBoKQiciJyb3cAAKCnIXIAcgBvAPcAtAIAAWN0gwOHA3IAAOA12J/c8iFvaxBhAAhOVGFjZGZnbG1vcHFzdHV4owOlA6kDsAO/A8IDxgPNA9ID8gP9AwEEFAQeBCAEJQRHAEphSAA7gNAA0EBjAHUAdABlADuAyQDJQIABYWl5ALYDuQO+A/Ihb24aYXIAYwA7gMoAykAtZG8AdAAWYXIAAOA12AjdcgBhAHYAZQA7gMgAyEDlIm1lbnQAoAgiAAFhcNYD2QNjAHIAEmF0AHkAUwLhAwAAAADpA20lYWxsU3F1YXJlAACg+yVlJ3J5U21hbGxTcXVhcmUAAKCrJQABZ3D2A/kDbwBuABhhZgAA4DXYPN3zImlsb26VY3UAAAFhaQYEDgRsAFSgdSppImxkZQAAoEIi7CNpYnJpdW0AoMwhAAFjaRgEGwRyAACgMCFtAACgcyphAJdjbQBsADuAywDLQAABaXApBC0E8yF0cwCgAyLvJG5lbnRpYWxFAKBHIYACY2Zpb3MAPQQ/BEMEXQRyBHkAJGRyAADgNdgJ3WwibGVkAFMCTAQAAAAAVARtJWFsbFNxdWFyZQAAoPwlZSdyeVNtYWxsU3F1YXJlAACgqiVwA2UEAABpBAAAAABtBGYAAOA12D3dwSFsbACgACLyI2llcnRyZgCgMSFjAPIAcQQABkpUYWJjZGZnb3JzdIgEiwSOBJMElwSkBKcEqwStBLIE5QTqBGMAeQADZDuAPgA+QO0hbWFkoJMD3GNyImV2ZQAeYYABZWl5AJ0EoASjBOQhaWwiYXIAYwAcYRNkbwB0ACBhcgAA4DXYCt0AoNkicABmAADgNdg+3eUiYXRlcgADRUZHTFNUvwTIBM8E1QTZBOAEcSJ1YWwATKBlIuUhc3MAoNsidSRsbEVxdWFsAACgZyJyI2VhdGVyAACgoirlIXNzAKB3IuwkYW50RXF1YWwAoH4qaSJsZGUAAKBzImMAcgAA4DXYotwAoGsiAARBYWNmaW9zdfkE/QQFBQgFCwUTBSIFKwVSIkRjeQAqZAABY3QBBQQFZQBrAMdiXmDpIXJjJGFyAACgDCFsJWJlcnRTcGFjZQAAoAsh8AEYBQAAGwVmAACgDSHpJXpvbnRhbExpbmUAoAAlAAFjdCYFKAXyABIF8iFvayZhbQBwAEQBMQU5BW8AdwBuAEgAdQBtAPAAAAFxInVhbAAAoE8iAAdFSk9hY2RmZ21ub3N0dVMFVgVZBVwFYwVtBXAFcwV6BZAFtgXFBckFzQVjAHkAFWTsIWlnMmFjAHkAAWRjAHUAdABlADuAzQDNQAABaXlnBWwFcgBjADuAzgDOQBhkbwB0ADBhcgAAoBEhcgBhAHYAZQA7gMwAzEAAoREhYXB/BYsFAAFjZ4MFhQVyACphaSNuYXJ5SQAAoEghbABpAGUA8wD6AvQBlQUAAKUFZaAsIgABZ3KaBZ4F8iFhbACgKyLzI2VjdGlvbgCgwiJpI3NpYmxlAAABQ1SsBbEFbyJtbWEAAKBjIGkibWVzAACgYiCAAWdwdAC8Bb8FwwVvAG4ALmFmAADgNdhA3WEAmWNjAHIAAKAQIWkibGRlAChh6wHSBQAA1QVjAHkABmRsADuAzwDPQIACY2Zvc3UA4QXpBe0F8gX9BQABaXnlBegFcgBjADRhGWRyAADgNdgN3XAAZgAA4DXYQd3jAfcFAAD7BXIAAOA12KXc8iFjeQhk6yFjeQRkgANISmFjZm9zAAwGDwYSBhUGHQYhBiYGYwB5ACVkYwB5AAxk8CFwYZpjAAFleRkGHAbkIWlsNmEaZHIAAOA12A7dcABmAADgNdhC3WMAcgAA4DXYptyABUpUYWNlZmxtb3N0AD0GQAZDBl4GawZkB2gHcAd0B80H2gdjAHkACWQ7gDwAPECAAmNtbnByAEwGTwZSBlUGWwb1IXRlOWHiIWRhm2NnAACg6ifsI2FjZXRyZgCgEiFyAACgniGAAWFleQBkBmcGagbyIW9uPWHkIWlsO2EbZAABZnNvBjQHdAAABUFDREZSVFVWYXKABp4GpAbGBssG3AYDByEHwQIqBwABbnKEBowGZyVsZUJyYWNrZXQAAKDoJ/Ihb3cAoZAhQlKTBpcGYQByAACg5CHpJGdodEFycm93AKDGIWUjaWxpbmcAAKAII28A9QGqBgAAsgZiJWxlQnJhY2tldAAAoOYnbgDUAbcGAAC+BmUkZVZlY3RvcgAAoGEp5SJjdG9yQqDDIWEAcgAAoFkpbCJvb3IAAKAKI2kiZ2h0AAABQVbSBtcGciJyb3cAAKCUIeUiY3RvcgCgTikAAWVy4AbwBmUAAKGjIkFW5gbrBnIicm93AACgpCHlImN0b3IAoFopaSNhbmdsZQBCorIi+wYAAAAA/wZhAHIAAKDPKXEidWFsAACgtCJwAIABRFRWAAoHEQcYB+8kd25WZWN0b3IAoFEpZSRlVmVjdG9yAACgYCnlImN0b3JCoL8hYQByAACgWCnlImN0b3JCoLwhYQByAACgUilpAGcAaAB0AGEAcgByAG8A9wDMAnMAAANFRkdMU1Q/B0cHTgdUB1gHXwfxJXVhbEdyZWF0ZXIAoNoidSRsbEVxdWFsAACgZiJyI2VhdGVyAACgdiLlIXNzAKChKuwkYW50RXF1YWwAoH0qaSJsZGUAAKByInIAAOA12A/dZaDYIuYjdGFycm93AKDaIWkiZG90AD9hgAFucHcAege1B7kHZwAAAkxSbHKCB5QHmwerB+UhZnQAAUFSiAeNB3Iicm93AACg9SfpJGdodEFycm93AKD3J+kkZ2h0QXJyb3cAoPYn5SFmdAABYXLcAqEHaQBnAGgAdABhAHIAcgBvAPcA5wJpAGcAaAB0AGEAcgByAG8A9wDuAmYAAOA12EPdZQByAAABTFK/B8YHZSRmdEFycm93AACgmSHpJGdodEFycm93AKCYIYABY2h0ANMH1QfXB/IAWgYAoLAh8iFva0FhAKBqIgAEYWNlZmlvc3XpB+wH7gf/BwMICQgOCBEIcAAAoAUpeQAcZAABZGzyB/kHaSR1bVNwYWNlAACgXyBsI2ludHJmAACgMyFyAADgNdgQ3e4jdXNQbHVzAKATInAAZgAA4DXYRN1jAPIA/gecY4AESmFjZWZvc3R1ACEIJAgoCDUIgQiFCDsKQApHCmMAeQAKZGMidXRlAENhgAFhZXkALggxCDQI8iFvbkdh5CFpbEVhHWSAAWdzdwA7CGEIfQjhInRpdmWAAU1UVgBECEwIWQhlJWRpdW1TcGFjZQAAoAsgaABpAAABY25SCFMIawBTAHAAYQBjAOUASwhlAHIAeQBUAGgAaQDuAFQI9CFlZAABR0xnCHUIcgBlAGEAdABlAHIARwByAGUAYQB0AGUA8gDrBGUAcwBzAEwAZQBzAPMA2wdMImluZQAKYHIAAOA12BHdAAJCbnB0jAiRCJkInAhyImVhawAAoGAgwiZyZWFraW5nU3BhY2WgYGYAAKAVIUOq7CqzCMIIzQgAAOcIGwkAAAAAAAAtCQAAbwkAAIcJAACdCcAJGQoAADQKAAFvdbYIvAjuI2dydWVudACgYiJwIkNhcAAAoG0ibyh1YmxlVmVydGljYWxCYXIAAKAmIoABbHF4ANII1wjhCOUibWVudACgCSL1IWFsVKBgImkibGRlAADgQiI4A2kic3RzAACgBCJyI2VhdGVyAACjbyJFRkdMU1T1CPoIAgkJCQ0JFQlxInVhbAAAoHEidSRsbEVxdWFsAADgZyI4A3IjZWF0ZXIAAOBrIjgD5SFzcwCgeSLsJGFudEVxdWFsAOB+KjgDaSJsZGUAAKB1IvUhbXBEASAJJwnvI3duSHVtcADgTiI4A3EidWFsAADgTyI4A2UAAAFmczEJRgn0JFRyaWFuZ2xlQqLqIj0JAAAAAEIJYQByAADgzyk4A3EidWFsAACg7CJzAICibiJFR0xTVABRCVYJXAlhCWkJcSJ1YWwAAKBwInIjZWF0ZXIAAKB4IuUhc3MA4GoiOAPsJGFudEVxdWFsAOB9KjgDaSJsZGUAAKB0IuUic3RlZAABR0x1CX8J8iZlYXRlckdyZWF0ZXIA4KIqOAPlI3NzTGVzcwDgoSo4A/IjZWNlZGVzAKGAIkVTjwmVCXEidWFsAADgryo4A+wkYW50RXF1YWwAoOAiAAFlaaAJqQl2JmVyc2VFbGVtZW50AACgDCLnJWh0VHJpYW5nbGVCousitgkAAAAAuwlhAHIAAODQKTgDcSJ1YWwAAKDtIgABcXXDCeAJdSNhcmVTdQAAAWJwywnVCfMhZXRF4I8iOANxInVhbAAAoOIi5SJyc2V0ReCQIjgDcSJ1YWwAAKDjIoABYmNwAOYJ8AkNCvMhZXRF4IIi0iBxInVhbAAAoIgi4yJlZWRzgKGBIkVTVAD6CQAKBwpxInVhbAAA4LAqOAPsJGFudEVxdWFsAKDhImkibGRlAADgfyI4A+UicnNldEXggyLSIHEidWFsAACgiSJpImxkZQCAoUEiRUZUACIKJwouCnEidWFsAACgRCJ1JGxsRXF1YWwAAKBHImkibGRlAACgSSJlJXJ0aWNhbEJhcgAAoCQiYwByAADgNdip3GkAbABkAGUAO4DRANFAnWMAB0VhY2RmZ21vcHJzdHV2XgphCmgKcgp2CnoKgQqRCpYKqwqtCrsKyArNCuwhaWdSYWMAdQB0AGUAO4DTANNAAAFpeWwKcQpyAGMAO4DUANRAHmRiImxhYwBQYXIAAOA12BLdcgBhAHYAZQA7gNIA0kCAAWFlaQCHCooKjQpjAHIATGFnAGEAqWNjInJvbgCfY3AAZgAA4DXYRt3lI25DdXJseQABRFGeCqYKbyV1YmxlUXVvdGUAAKAcIHUib3RlAACgGCAAoFQqAAFjbLEKtQpyAADgNdiq3GEAcwBoADuA2ADYQGkAbAHACsUKZABlADuA1QDVQGUAcwAAoDcqbQBsADuA1gDWQGUAcgAAAUJQ0wrmCgABYXLXCtoKcgAAoD4gYQBjAAABZWvgCuIKAKDeI2UAdAAAoLQjYSVyZW50aGVzaXMAAKDcI4AEYWNmaGlsb3JzAP0KAwsFCwkLCwsMCxELIwtaC3IjdGlhbEQAAKACInkAH2RyAADgNdgT3WkApmOgY/Ujc01pbnVzsWAAAWlwFQsgC24AYwBhAHIAZQBwAGwAYQBuAOUACgVmAACgGSGAobsqZWlvACoLRQtJC+MiZWRlc4CheiJFU1QANAs5C0ALcSJ1YWwAAKCvKuwkYW50RXF1YWwAoHwiaSJsZGUAAKB+Im0AZQAAoDMgAAFkcE0LUQv1IWN0AKAPIm8jcnRpb24AYaA3ImwAAKAdIgABY2leC2ILcgAA4DXYq9yoYwACVWZvc2oLbwtzC3cLTwBUADuAIgAiQHIAAOA12BTdcABmAACgGiFjAHIAAOA12KzcAAZCRWFjZWZoaW9yc3WPC5MLlwupC7YL2AvbC90LhQyTDJoMowzhIXJyAKAQKUcAO4CuAK5AgAFjbnIAnQugC6ML9SF0ZVRhZwAAoOsncgB0oKAhbAAAoBYpgAFhZXkArwuyC7UL8iFvblhh5CFpbFZhIGR2oBwhZSJyc2UAAAFFVb8LzwsAAWxxwwvIC+UibWVudACgCyL1JGlsaWJyaXVtAKDLIXAmRXF1aWxpYnJpdW0AAKBvKXIAAKAcIW8AoWPnIWh0AARBQ0RGVFVWYewLCgwQDDIMNwxeDHwM9gIAAW5y8Av4C2clbGVCcmFja2V0AACg6SfyIW93AKGSIUJM/wsDDGEAcgAAoOUhZSRmdEFycm93AACgxCFlI2lsaW5nAACgCSNvAPUBFgwAAB4MYiVsZUJyYWNrZXQAAKDnJ24A1AEjDAAAKgxlJGVWZWN0b3IAAKBdKeUiY3RvckKgwiFhAHIAAKBVKWwib29yAACgCyMAAWVyOwxLDGUAAKGiIkFWQQxGDHIicm93AACgpiHlImN0b3IAoFspaSNhbmdsZQBCorMiVgwAAAAAWgxhAHIAAKDQKXEidWFsAACgtSJwAIABRFRWAGUMbAxzDO8kd25WZWN0b3IAoE8pZSRlVmVjdG9yAACgXCnlImN0b3JCoL4hYQByAACgVCnlImN0b3JCoMAhYQByAACgUykAAXB1iQyMDGYAAKAdIe4kZEltcGxpZXMAoHAp6SRnaHRhcnJvdwCg2yEAAWNongyhDHIAAKAbIQCgsSHsJGVEZWxheWVkAKD0KYAGSE9hY2ZoaW1vcXN0dQC/DMgMzAzQDOIM5gwKDQ0NFA0ZDU8NVA1YDQABQ2PDDMYMyCFjeSlkeQAoZEYiVGN5ACxkYyJ1dGUAWmEAorwqYWVpedgM2wzeDOEM8iFvbmBh5CFpbF5hcgBjAFxhIWRyAADgNdgW3e8hcnQAAkRMUlXvDPYM/QwEDW8kd25BcnJvdwAAoJMhZSRmdEFycm93AACgkCHpJGdodEFycm93AKCSIXAjQXJyb3cAAKCRIechbWGjY+EkbGxDaXJjbGUAoBgicABmAADgNdhK3XICHw0AAAAAIg10AACgGiLhIXJlgKGhJUlTVQAqDTINSg3uJXRlcnNlY3Rpb24AoJMidQAAAWJwNw1ADfMhZXRFoI8icSJ1YWwAAKCRIuUicnNldEWgkCJxInVhbAAAoJIibiJpb24AAKCUImMAcgAA4DXYrtxhAHIAAKDGIgACYmNtcF8Nag2ODZANc6DQImUAdABFoNAicSJ1YWwAAKCGIgABY2huDYkNZSJlZHMAgKF7IkVTVAB4DX0NhA1xInVhbAAAoLAq7CRhbnRFcXVhbACgfSJpImxkZQAAoH8iVABoAGEA9ADHCwCgESIAodEiZXOVDZ8NciJzZXQARaCDInEidWFsAACghyJlAHQAAKDRIoAFSFJTYWNmaGlvcnMAtQ27Db8NyA3ODdsN3w3+DRgOHQ4jDk8AUgBOADuA3gDeQMEhREUAoCIhAAFIY8MNxg1jAHkAC2R5ACZkAAFidcwNzQ0JYKRjgAFhZXkA1A3XDdoN8iFvbmRh5CFpbGJhImRyAADgNdgX3QABZWnjDe4N8gHoDQAA7Q3lImZvcmUAoDQiYQCYYwABY27yDfkNayNTcGFjZQAA4F8gCiDTInBhY2UAoAkg7CFkZYChPCJFRlQABw4MDhMOcSJ1YWwAAKBDInUkbGxFcXVhbAAAoEUiaSJsZGUAAKBIInAAZgAA4DXYS93pI3BsZURvdACg2yAAAWN0Jw4rDnIAAOA12K/c8iFva2Zh4QpFDlYOYA5qDgAAbg5yDgAAAAAAAAAAAAB5DnwOqA6zDgAADg8RDxYPGg8AAWNySA5ODnUAdABlADuA2gDaQHIAb6CfIeMhaXIAoEkpcgDjAVsOAABdDnkADmR2AGUAbGEAAWl5Yw5oDnIAYwA7gNsA20AjZGIibGFjAHBhcgAA4DXYGN1yAGEAdgBlADuA2QDZQOEhY3JqYQABZGl/Dp8OZQByAAABQlCFDpcOAAFhcokOiw5yAF9gYQBjAAABZWuRDpMOAKDfI2UAdAAAoLUjYSVyZW50aGVzaXMAAKDdI28AbgBQoMMi7CF1cwCgjiIAAWdwqw6uDm8AbgByYWYAAOA12EzdAARBREVUYWRwc78O0g7ZDuEOBQPqDvMOBw9yInJvdwDCoZEhyA4AAMwOYQByAACgEilvJHduQXJyb3cAAKDFIW8kd25BcnJvdwAAoJUhcSV1aWxpYnJpdW0AAKBuKWUAZQBBoKUiciJyb3cAAKClIW8AdwBuAGEAcgByAG8A9wAQA2UAcgAAAUxS+Q4AD2UkZnRBcnJvdwAAoJYh6SRnaHRBcnJvdwCglyFpAGyg0gNvAG4ApWPpIW5nbmFjAHIAAOA12LDcaSJsZGUAaGFtAGwAO4DcANxAgAREYmNkZWZvc3YALQ8xDzUPNw89D3IPdg97D4AP4SFzaACgqyJhAHIAAKDrKnkAEmThIXNobKCpIgCg5ioAAWVyQQ9DDwCgwSKAAWJ0eQBJD00Paw9hAHIAAKAWIGmgFiDjIWFsAAJCTFNUWA9cD18PZg9hAHIAAKAjIukhbmV8YGUkcGFyYXRvcgAAoFgnaSJsZGUAAKBAItQkaGluU3BhY2UAoAogcgAA4DXYGd1wAGYAAOA12E3dYwByAADgNdix3GQiYXNoAACgqiKAAmNlZm9zAI4PkQ+VD5kPng/pIXJjdGHkIWdlAKDAInIAAOA12BrdcABmAADgNdhO3WMAcgAA4DXYstwAAmZpb3OqD64Prw+0D3IAAOA12BvdnmNwAGYAAOA12E/dYwByAADgNdiz3IAEQUlVYWNmb3N1AMgPyw/OD9EP2A/gD+QP6Q/uD2MAeQAvZGMAeQAHZGMAeQAuZGMAdQB0AGUAO4DdAN1AAAFpedwP3w9yAGMAdmErZHIAAOA12BzdcABmAADgNdhQ3WMAcgAA4DXYtNxtAGwAeGEABEhhY2RlZm9z/g8BEAUQDRAQEB0QIBAkEGMAeQAWZGMidXRlAHlhAAFheQkQDBDyIW9ufWEXZG8AdAB7YfIBFRAAABwQbwBXAGkAZAB0AOgAVAhhAJZjcgAAoCghcABmAACgJCFjAHIAAOA12LXc4QtCEEkQTRAAAGcQbRByEAAAAAAAAAAAeRCKEJcQ8hD9EAAAGxEhETIROREAAD4RYwB1AHQAZQA7gOEA4UByImV2ZQADYYCiPiJFZGl1eQBWEFkQWxBgEGUQAOA+IjMDAKA/InIAYwA7gOIA4kB0AGUAO4C0ALRAMGRsAGkAZwA7gOYA5kByoGEgAOA12B7dcgBhAHYAZQA7gOAA4EAAAWVwfBCGEAABZnCAEIQQ8yF5bQCgNSHoAIMQaABhALFjAAFhcI0QWwAAAWNskRCTEHIAAWFnAACgPypkApwQAAAAALEQAKInImFkc3ajEKcQqRCuEG4AZAAAoFUqAKBcKmwib3BlAACgWCoAoFoqAKMgImVsbXJzersQvRDAEN0Q5RDtEACgpCllAACgICJzAGQAYaAhImEEzhDQENIQ1BDWENgQ2hDcEACgqCkAoKkpAKCqKQCgqykAoKwpAKCtKQCgrikAoK8pdAB2oB8iYgBkoL4iAKCdKQABcHTpEOwQaAAAoCIixWDhIXJyAKB8IwABZ3D1EPgQbwBuAAVhZgAA4DXYUt0Ao0giRWFlaW9wBxEJEQ0RDxESERQRAKBwKuMhaXIAoG8qAKBKImQAAKBLInMAJ2DyIW94ZaBIIvEADhFpAG4AZwA7gOUA5UCAAWN0eQAmESoRKxFyAADgNdi23CpgbQBwAGWgSCLxAPgBaQBsAGQAZQA7gOMA40BtAGwAO4DkAORAAAFjaUERRxFvAG4AaQBuAPQA6AFuAHQAAKARKgAITmFiY2RlZmlrbG5vcHJzdWQRaBGXEZ8RpxGrEdIR1hErEjASexKKEn0RThNbE3oTbwB0AACg7SoAAWNybBGJEWsAAAJjZXBzdBF4EX0RghHvIW5nAKBMInAjc2lsb24A9mNyImltZQAAoDUgaQBtAGWgPSJxAACgzSJ2AY0RkRFlAGUAAKC9ImUAZABnoAUjZQAAoAUjcgBrAHSgtSPiIXJrAKC2IwABb3mjEaYRbgDnAHcRMWTxIXVvAKAeIIACY21wcnQAtBG5Eb4RwRHFEeEhdXPloDUi5ABwInR5dgAAoLApcwDpAH0RbgBvAPUA6gCAAWFodwDLEcwRzhGyYwCgNiHlIWVuAKBsInIAAOA12B/dZwCAA2Nvc3R1dncA4xHyEQUSEhIhEiYSKRKAAWFpdQDpEesR7xHwAKMFcgBjAACg7yVwAACgwyKAAWRwdAD4EfwRABJvAHQAAKAAKuwhdXMAoAEqaSJtZXMAAKACKnECCxIAAAAADxLjIXVwAKAGKmEAcgAAoAUm8iNpYW5nbGUAAWR1GhIeEu8hd24AoL0lcAAAoLMlcCJsdXMAAKAEKmUA5QBCD+UAkg9hInJvdwAAoA0pgAFha28ANhJoEncSAAFjbjoSZRJrAIABbHN0AEESRxJNEm8jemVuZ2UAAKDrKXEAdQBhAHIA5QBcBPIjaWFuZ2xlgKG0JWRscgBYElwSYBLvIXduAKC+JeUhZnQAoMIlaSJnaHQAAKC4JWsAAKAjJLEBbRIAAHUSsgFxEgAAcxIAoJIlAKCRJTQAAKCTJWMAawAAoIglAAFlb38ShxJx4D0A5SD1IWl2AOBhIuUgdAAAoBAjAAJwdHd4kRKVEpsSnxJmAADgNdhT3XSgpSJvAG0AAKClIvQhaWUAoMgiAAZESFVWYmRobXB0dXayEsES0RLgEvcS+xIKExoTHxMjEygTNxMAAkxSbHK5ErsSvRK/EgCgVyUAoFQlAKBWJQCgUyUAolAlRFVkdckSyxLNEs8SAKBmJQCgaSUAoGQlAKBnJQACTFJsctgS2hLcEt4SAKBdJQCgWiUAoFwlAKBZJQCjUSVITFJobHLrEu0S7xLxEvMS9RIAoGwlAKBjJQCgYCUAoGslAKBiJQCgXyVvAHgAAKDJKQACTFJscgITBBMGEwgTAKBVJQCgUiUAoBAlAKAMJQCiACVEVWR1EhMUExYTGBMAoGUlAKBoJQCgLCUAoDQlaSJudXMAAKCfIuwhdXMAoJ4iaSJtZXMAAKCgIgACTFJsci8TMRMzEzUTAKBbJQCgWCUAoBglAKAUJQCjAiVITFJobHJCE0QTRhNIE0oTTBMAoGolAKBhJQCgXiUAoDwlAKAkJQCgHCUAAWV2UhNVE3YA5QD5AGIAYQByADuApgCmQAACY2Vpb2ITZhNqE24TcgAA4DXYt9xtAGkAAKBPIG0A5aA9IogRbAAAoVwAYmh0E3YTAKDFKfMhdWIAoMgnbAF+E4QTbABloCIgdAAAoCIgcAAAoU4iRWWJE4sTAKCuKvGgTyI8BeEMqRMAAN8TABQDFB8UAAAjFDQUAAAAAIUUAAAAAI0UAAAAANcU4xT3FPsUAACIFQAAlhWAAWNwcgCuE7ET1RP1IXRlB2GAoikiYWJjZHMAuxO/E8QTzhPSE24AZAAAoEQqciJjdXAAAKBJKgABYXXIE8sTcAAAoEsqcAAAoEcqbwB0AACgQCoA4CkiAP4AAWVv2RPcE3QAAKBBIO4ABAUAAmFlaXXlE+8T9RP4E/AB6hMAAO0TcwAAoE0qbwBuAA1hZABpAGwAO4DnAOdAcgBjAAlhcABzAHOgTCptAACgUCpvAHQAC2GAAWRtbgAIFA0UEhRpAGwAO4C4ALhAcCJ0eXYAAKCyKXQAAIGiADtlGBQZFKJAcgBkAG8A9ABiAXIAAOA12CDdgAFjZWkAKBQqFDIUeQBHZGMAawBtoBMn4SFyawCgEyfHY3IAAKPLJUVjZWZtcz8UQRRHFHcUfBSAFACgwykAocYCZWxGFEkUcQAAoFciZQBhAlAUAAAAAGAUciJyb3cAAAFsclYUWhTlIWZ0AKC6IWkiZ2h0AACguyGAAlJTYWNkAGgUaRRrFG8UcxSuYACgyCRzAHQAAKCbIukhcmMAoJoi4SFzaACgnSJuImludAAAoBAqaQBkAACg7yrjIWlyAKDCKfUhYnN1oGMmaQB0AACgYybsApMUmhS2FAAAwxRvAG4AZaA6APGgVCKrAG0CnxQAAAAAoxRhAHSgLABAYAChASJmbKcUqRTuABMNZQAAAW14rhSyFOUhbnQAoAEiZQDzANIB5wG6FAAAwBRkoEUibwB0AACgbSpuAPQAzAGAAWZyeQDIFMsUzhQA4DXYVN1vAOQA1wEAgakAO3MeAdMUcgAAoBchAAFhb9oU3hRyAHIAAKC1IXMAcwAAoBcnAAFjdeYU6hRyAADgNdi43AABYnDuFPIUZaDPKgCg0SploNAqAKDSKuQhb3QAoO8igANkZWxwcnZ3AAYVEBUbFSEVRBVlFYQV4SFycgABbHIMFQ4VAKA4KQCgNSlwAhYVAAAAABkVcgAAoN4iYwAAoN8i4SFycnCgtiEAoD0pgKIqImJjZG9zACsVMBU6FT4VQRVyImNhcAAAoEgqAAFhdTQVNxVwAACgRipwAACgSipvAHQAAKCNInIAAKBFKgDgKiIA/gACYWxydksVURVuFXMVcgByAG2gtyEAoDwpeQCAAWV2dwBYFWUVaRVxAHACXxUAAAAAYxVyAGUA4wAXFXUA4wAZFWUAZQAAoM4iZSJkZ2UAAKDPImUAbgA7gKQApEBlI2Fycm93AAABbHJ7FX8V5SFmdACgtiFpImdodAAAoLchZQDkAG0VAAFjaYsVkRVvAG4AaQBuAPQAkwFuAHQAAKAxImwiY3R5AACgLSOACUFIYWJjZGVmaGlqbG9yc3R1d3oAuBW7Fb8V1RXgFegV+RUKFhUWHxZUFlcWZRbFFtsW7xb7FgUXChdyAPIAtAJhAHIAAKBlKQACZ2xyc8YVyhXOFdAV5yFlcgCgICDlIXRoAKA4IfIA9QxoAHagECAAoKMiawHZFd4VYSJyb3cAAKAPKWEA4wBfAgABYXnkFecV8iFvbg9hNGQAoUYhYW/tFfQVAAFnciEC8RVyAACgyiF0InNlcQAAoHcqgAFnbG0A/xUCFgUWO4CwALBAdABhALRjcCJ0eXYAAKCxKQABaXIOFhIW8yFodACgfykA4DXYId1hAHIAAAFschsWHRYAoMMhAKDCIYACYWVnc3YAKBauAjYWOhY+Fm0AAKHEIm9zLhY0Fm4AZABzoMQi9SFpdACgZiZhIm1tYQDdY2kAbgAAoPIiAKH3AGlvQxZRFmQAZQAAgfcAO29KFksW90BuI3RpbWVzAACgxyJuAPgAUBZjAHkAUmRjAG8CXhYAAAAAYhZyAG4AAKAeI28AcAAAoA0jgAJscHR1dwBuFnEWdRaSFp4W7CFhciRgZgAA4DXYVd0AotkCZW1wc30WhBaJFo0WcQBkoFAibwB0AACgUSJpIm51cwAAoDgi7CF1cwCgFCLxInVhcmUAoKEiYgBsAGUAYgBhAHIAdwBlAGQAZwDlANcAbgCAAWFkaAClFqoWtBZyAHIAbwD3APUMbwB3AG4AYQByAHIAbwB3APMA8xVhI3Jwb29uAAABbHK8FsAWZQBmAPQAHBZpAGcAaAD0AB4WYgHJFs8WawBhAHIAbwD3AJILbwLUFgAAAADYFnIAbgAAoB8jbwBwAACgDCOAAWNvdADhFukW7BYAAXJ55RboFgDgNdi53FVkbAAAoPYp8iFvaxFhAAFkcvMW9xZvAHQAAKDxImkA5qC/JVsSAAFhaP8WAhdyAPIANQNhAPIA1wvhIm5nbGUAoKYpAAFjaQ4XEBd5AF9k5yJyYXJyAKD/JwAJRGFjZGVmZ2xtbm9wcXJzdHV4MRc4F0YXWxcyBF4XaRd5F40XrBe0F78X2RcVGCEYLRg1GEAYAAFEbzUXgRZvAPQA+BUAAWNzPBdCF3UAdABlADuA6QDpQPQhZXIAoG4qAAJhaW95TRdQF1YXWhfyIW9uG2FyAGOgViI7gOoA6kDsIW9uAKBVIk1kbwB0ABdhAAFEcmIXZhdvAHQAAKBSIgDgNdgi3XKhmipuF3QXYQB2AGUAO4DoAOhAZKCWKm8AdAAAoJgqgKGZKmlscwCAF4UXhxfuInRlcnMAoOcjAKATIWSglSpvAHQAAKCXKoABYXBzAJMXlheiF2MAcgATYXQAeQBzogUinxcAAAAAoRdlAHQAAKAFInAAMaADIDMBqRerFwCgBCAAoAUgAAFnc7AXsRdLYXAAAKACIAABZ3C4F7sXbwBuABlhZgAA4DXYVt2AAWFscwDFF8sXzxdyAHOg1SJsAACg4yl1AHMAAKBxKmkAAKG1A2x21RfYF28AbgC1Y/VjAAJjc3V24BfoF/0XEBgAAWlv5BdWF3IAYwAAoFYiaQLuFwAAAADwF+0ADQThIW50AAFnbPUX+Rd0AHIAAKCWKuUhc3MAoJUqgAFhZWkAAxgGGAoYbABzAD1gcwB0AACgXyJ2AESgYSJEAACgeCrwImFyc2wAoOUpAAFEYRkYHRhvAHQAAKBTInIAcgAAoHEpgAFjZGkAJxgqGO0XcgAAoC8hbwD0AIwCAAFhaDEYMhi3YzuA8ADwQAABbXI5GD0YbAA7gOsA60BvAACgrCCAAWNpcABGGEgYSxhsACFgcwD0ACwEAAFlb08YVxhjAHQAYQB0AGkAbwDuABoEbgBlAG4AdABpAGEAbADlADME4Ql1GAAAgRgAAIMYiBgAAAAAoRilGAAAqhgAALsYvhjRGAAA1xgnGWwAbABpAG4AZwBkAG8AdABzAGUA8QBlF3kARGRtImFsZQAAoEAmgAFpbHIAjRiRGJ0Y7CFpZwCgA/tpApcYAAAAAJoYZwAAoAD7aQBnAACgBPsA4DXYI93sIWlnAKAB++whaWcA4GYAagCAAWFsdACvGLIYthh0AACgbSZpAGcAAKAC+24AcwAAoLElbwBmAJJh8AHCGAAAxhhmAADgNdhX3QABYWvJGMwYbADsAGsEdqDUIgCg2SphI3J0aW50AACgDSoAAWFv2hgiGQABY3PeGB8ZsQPnGP0YBRkSGRUZAAAdGbID7xjyGPQY9xj5GAAA+xg7gL0AvUAAoFMhO4C8ALxAAKBVIQCgWSEAoFshswEBGQAAAxkAoFQhAKBWIbQCCxkOGQAAAAAQGTuAvgC+QACgVyEAoFwhNQAAoFghtgEZGQAAGxkAoFohAKBdITgAAKBeIWwAAKBEIHcAbgAAoCIjYwByAADgNdi73IAIRWFiY2RlZmdpamxub3JzdHYARhlKGVoZXhlmGWkZkhmWGZkZnRmgGa0ZxhnLGc8Z4BkjGmygZyIAoIwqgAFjbXAAUBlTGVgZ9SF0ZfVhbQBhAOSgswM6FgCghipyImV2ZQAfYQABaXliGWUZcgBjAB1hM2RvAHQAIWGAoWUibHFzAMYEcBl6GfGhZSLOBAAAdhlsAGEAbgD0AN8EgKF+KmNkbACBGYQZjBljAACgqSpvAHQAb6CAKmyggioAoIQqZeDbIgD+cwAAoJQqcgAA4DXYJN3noGsirATtIWVsAKA3IWMAeQBTZIChdyJFYWoApxmpGasZAKCSKgCgpSoAoKQqAAJFYWVztBm2Gb0ZwhkAoGkicABwoIoq8iFveACgiipxoIgq8aCIKrUZaQBtAACg5yJwAGYAAOA12FjdYQB2AOUAYwIAAWNp0xnWGXIAAKAKIW0AAKFzImVs3BneGQCgjioAoJAqAIM+ADtjZGxxco0E6xn0GfgZ/BkBGgABY2nvGfEZAKCnKnIAAKB6Km8AdAAAoNci0CFhcgCglSl1ImVzdAAAoHwqgAJhZGVscwAKGvQZFhrVBCAa8AEPGgAAFBpwAHIAbwD4AFkZcgAAoHgpcQAAAWxxxAQbGmwAZQBzAPMASRlpAO0A5AQAAWVuJxouGnIjdG5lcXEAAOBpIgD+xQAsGgAFQWFiY2Vma29zeUAaQxpmGmoabRqDGocalhrCGtMacgDyAMwCAAJpbG1yShpOGlAaVBpyAHMA8ABxD2YAvWBpAGwA9AASBQABZHJYGlsaYwB5AEpkAKGUIWN3YBpkGmkAcgAAoEgpAKCtIWEAcgAAoA8h6SFyYyVhgAFhbHIAcxp7Gn8a8iF0c3WgZSZpAHQAAKBlJuwhaXAAoCYg4yFvbgCguSJyAADgNdgl3XMAAAFld4wakRphInJvdwAAoCUpYSJyb3cAAKAmKYACYW1vcHIAnxqjGqcauhq+GnIAcgAAoP8h9CFodACgOyJrAAABbHKsGrMaZSRmdGFycm93AACgqSHpJGdodGFycm93AKCqIWYAAOA12Fnd4iFhcgCgFSCAAWNsdADIGswa0BpyAADgNdi93GEAcwDoAGka8iFvaydhAAFicNca2xr1IWxsAKBDIOghZW4AoBAg4Qr2GgAA/RoAAAgbExsaGwAAIRs7GwAAAAA+G2IbmRuVG6sbAACyG80b0htjAHUAdABlADuA7QDtQAChYyBpeQEbBhtyAGMAO4DuAO5AOGQAAWN4CxsNG3kANWRjAGwAO4ChAKFAAAFmcssCFhsA4DXYJt1yAGEAdgBlADuA7ADsQIChSCFpbm8AJxsyGzYbAAFpbisbLxtuAHQAAKAMKnQAAKAtIuYhaW4AoNwpdABhAACgKSHsIWlnM2GAAWFvcABDG1sbXhuAAWNndABJG0sbWRtyACthgAFlbHAAcQVRG1UbaQBuAOUAyAVhAHIA9AByBWgAMWFmAACgtyJlAGQAtWEAoggiY2ZvdGkbbRt1G3kb4SFyZQCgBSFpAG4AdKAeImkAZQAAoN0pZABvAPQAWxsAoisiY2VscIEbhRuPG5QbYQBsAACguiIAAWdyiRuNG2UAcgDzACMQ4wCCG2EicmhrAACgFyryIW9kAKA8KgACY2dwdJ8boRukG6gbeQBRZG8AbgAvYWYAAOA12FrdYQC5Y3UAZQBzAHQAO4C/AL9AAAFjabUbuRtyAADgNdi+3G4AAKIIIkVkc3bCG8QbyBvQAwCg+SJvAHQAAKD1Inag9CIAoPMiaaBiIOwhZGUpYesB1hsAANkbYwB5AFZkbAA7gO8A70AAA2NmbW9zdeYb7hvyG/Ub+hsFHAABaXnqG+0bcgBjADVhOWRyAADgNdgn3eEhdGg3YnAAZgAA4DXYW93jAf8bAAADHHIAAOA12L/c8iFjeVhk6yFjeVRkAARhY2ZnaGpvcxUcGhwiHCYcKhwtHDAcNRzwIXBhdqC6A/BjAAFleR4cIRzkIWlsN2E6ZHIAAOA12CjdciJlZW4AOGFjAHkARWRjAHkAXGRwAGYAAOA12FzdYwByAADgNdjA3IALQUJFSGFiY2RlZmdoamxtbm9wcnN0dXYAXhxtHHEcdRx5HN8cBx0dHTwd3B3tHfEdAR4EHh0eLB5FHrwewx7hHgkfPR9LH4ABYXJ0AGQcZxxpHHIA8gBvB/IAxQLhIWlsAKAbKeEhcnIAoA4pZ6BmIgCgiyphAHIAAKBiKWMJjRwAAJAcAACVHAAAAAAAAAAAAACZHJwcAACmHKgcrRwAANIc9SF0ZTph7SJwdHl2AKC0KXIAYQDuAFoG4iFkYbtjZwAAoegnZGyhHKMcAKCRKeUAiwYAoIUqdQBvADuAqwCrQHIAgKOQIWJmaGxwc3QAuhy/HMIcxBzHHMoczhxmoOQhcwAAoB8pcwAAoB0p6wCyGnAAAKCrIWwAAKA5KWkAbQAAoHMpbAAAoKIhAKGrKmFl1hzaHGkAbAAAoBkpc6CtKgDgrSoA/oABYWJyAOUc6RztHHIAcgAAoAwpcgBrAACgcicAAWFr8Rz4HGMAAAFla/Yc9xx7YFtgAAFlc/wc/hwAoIspbAAAAWR1Ax0FHQCgjykAoI0pAAJhZXV5Dh0RHRodHB3yIW9uPmEAAWRpFR0YHWkAbAA8YewAowbiAPccO2QAAmNxcnMkHScdLB05HWEAAKA2KXUAbwDyoBwgqhEAAWR1MB00HeghYXIAoGcpcyJoYXIAAKBLKWgAAKCyIQCiZCJmZ3FzRB1FB5Qdnh10AIACYWhscnQATh1WHWUdbB2NHXIicm93AHSgkCFhAOkAzxxhI3Jwb29uAAABZHVeHWId7yF3bgCgvSFwAACgvCHlJGZ0YXJyb3dzAKDHIWkiZ2h0AIABYWhzAHUdex2DHXIicm93APOglCGdBmEAcgBwAG8AbwBuAPMAzgtxAHUAaQBnAGEAcgByAG8A9wBlGugkcmVldGltZXMAoMsi8aFkIk0HAACaHWwAYQBuAPQAXgcAon0qY2Rnc6YdqR2xHbcdYwAAoKgqbwB0AG+gfypyoIEqAKCDKmXg2iIA/nMAAKCTKoACYWRlZ3MAwB3GHcod1h3ZHXAAcAByAG8A+ACmHG8AdAAAoNYicQAAAWdxzx3SHXQA8gBGB2cAdADyAHQcdADyAFMHaQDtAGMHgAFpbHIA4h3mHeod8yFodACgfClvAG8A8gDKBgDgNdgp3UWgdiIAoJEqYQH1Hf4dcgAAAWR1YB35HWygvCEAoGopbABrAACghCVjAHkAWWQAomoiYWNodAweDx4VHhkecgDyAGsdbwByAG4AZQDyAGAW4SFyZACgaylyAGkAAKD6JQABaW8hHiQe5CFvdEBh9SFzdGGgsCPjIWhlAKCwIwACRWFlczMeNR48HkEeAKBoInAAcKCJKvIhb3gAoIkqcaCHKvGghyo0HmkAbQAAoOYiAARhYm5vcHR3elIeXB5fHoUelh6mHqsetB4AAW5yVh5ZHmcAAKDsJ3IAAKD9IXIA6wCwBmcAgAFsbXIAZh52Hnse5SFmdAABYXKIB2weaQBnAGgAdABhAHIAcgBvAPcAkwfhInBzdG8AoPwnaQBnAGgAdABhAHIAcgBvAPcAmgdwI2Fycm93AAABbHKNHpEeZQBmAPQAxhxpImdodAAAoKwhgAFhZmwAnB6fHqIecgAAoIUpAOA12F3ddQBzAACgLSppIm1lcwAAoDQqYQGvHrMecwB0AACgFyLhAIoOZaHKJbkeRhLuIWdlAKDKJWEAcgBsoCgAdAAAoJMpgAJhY2htdADMHs8e1R7bHt0ecgDyAJ0GbwByAG4AZQDyANYWYQByAGSgyyEAoG0pAKAOIHIAaQAAoL8iAANhY2hpcXTrHu8e1QfzHv0eBh/xIXVvAKA5IHIAAOA12MHcbQDloXIi+h4AAPweAKCNKgCgjyoAAWJ19xwBH28AcqAYIACgGiDyIW9rQmEAhDwAO2NkaGlscXJCBhcfxh0gHyQfKB8sHzEfAAFjaRsfHR8AoKYqcgAAoHkqcgBlAOUAkx3tIWVzAKDJIuEhcnIAoHYpdSJlc3QAAKB7KgABUGk1HzkfYQByAACglillocMlAgdfEnIAAAFkdUIfRx9zImhhcgAAoEop6CFhcgCgZikAAWVuTx9WH3IjdG5lcXEAAOBoIgD+xQBUHwAHRGFjZGVmaGlsbm9wc3VuH3Ifoh+rH68ftx+7H74f5h/uH/MfBwj/HwsgxCFvdACgOiIAAmNscHJ5H30fiR+eH3IAO4CvAK9AAAFldIEfgx8AoEImZaAgJ3MAZQAAoCAnc6CmIXQAbwCAoaYhZGx1AJQfmB+cH28AdwDuAHkDZQBmAPQA6gbwAOkO6yFlcgCgriUAAW95ph+qH+0hbWEAoCkqPGThIXNoAKAUIOElc3VyZWRhbmdsZQCgISJyAADgNdgq3W8AAKAnIYABY2RuAMQfyR/bH3IAbwA7gLUAtUBhoiMi0B8AANMf1x9zAPQAKxFpAHIAAKDwKm8AdAA7gLcAt0B1AHMA4qESIh4TAADjH3WgOCIAoCoqYwHqH+0fcAAAoNsq8gB+GnAAbAB1APMACAgAAWRw9x/7H+UhbHMAoKciZgAA4DXYXt0AAWN0AyAHIHIAAOA12MLc8CFvcwCgPiJsobwDECAVIPQiaW1hcACguCJhAPAAEyAADEdMUlZhYmNkZWZnaGlqbG1vcHJzdHV2dzwgRyBmIG0geSCqILgg2iDeIBEhFSEyIUMhTSFQIZwhnyHSIQAiIyKLIrEivyIUIwABZ3RAIEMgAODZIjgD9uBrItIgBwmAAWVsdABNIF8gYiBmAHQAAAFhclMgWCByInJvdwAAoM0h6SRnaHRhcnJvdwCgziEA4NgiOAP24Goi0iBfCekkZ2h0YXJyb3cAoM8hAAFEZHEgdSDhIXNoAKCvIuEhc2gAoK4igAJiY25wdACCIIYgiSCNIKIgbABhAACgByL1IXRlRGFnAADgICLSIACiSSJFaW9wlSCYIJwgniAA4HAqOANkAADgSyI4A3MASWFyAG8A+AAyCnUAcgBhoG4mbADzoG4mmwjzAa8gAACzIHAAO4CgAKBAbQBwAOXgTiI4AyoJgAJhZW91eQDBIMogzSDWINkg8AHGIAAAyCAAoEMqbwBuAEhh5CFpbEZhbgBnAGSgRyJvAHQAAOBtKjgDcAAAoEIqPWThIXNoAKATIACjYCJBYWRxc3jpIO0g+SD+IAIhDCFyAHIAAKDXIXIAAAFocvIg9SBrAACgJClvoJch9wAGD28AdAAA4FAiOAN1AGkA9gC7CAABZWkGIQohYQByAACgKCntAN8I6SFzdPOgBCLlCHIAAOA12CvdAAJFZXN0/wgcISshLiHxoXEiIiEAABMJ8aFxIgAJAAAnIWwAYQBuAPQAEwlpAO0AGQlyoG8iAKBvIoABQWFwADghOyE/IXIA8gBeIHIAcgAAoK4hYQByAACg8ipzogsiSiEAAAAAxwtkoPwiAKD6ImMAeQBaZIADQUVhZGVzdABcIV8hYiFmIWkhkyGWIXIA8gBXIADgZiI4A3IAcgAAoJohcgAAoCUggKFwImZxcwBwIYQhjiF0AAABYXJ1IXohcgByAG8A9wBlIWkAZwBoAHQAYQByAHIAbwD3AD4h8aFwImAhAACKIWwAYQBuAPQAZwlz4H0qOAMAoG4iaQDtAG0JcqBuImkA5aDqIkUJaQDkADoKAAFwdKMhpyFmAADgNdhf3YCBrAA7aW4AriGvIcchrEBuAIChCSJFZHYAtyG6Ib8hAOD5IjgDbwB0AADg9SI4A+EB1gjEIcYhAKD3IgCg9iJpAHagDCLhAagJzyHRIQCg/iIAoP0igAFhb3IA2CHsIfEhcgCAoSYiYXN0AOAh5SHpIWwAbABlAOwAywhsAADg/SrlIADgAiI4A2wiaW50AACgFCrjoYAi9yEAAPohdQDlAJsJY+CvKjgDZaCAIvEAkwkAAkFhaXQHIgoiFyIeInIA8gBsIHIAcgAAoZshY3cRIhQiAOAzKTgDAOCdITgDZyRodGFycm93AACgmyFyAGkA5aDrIr4JgANjaGltcHF1AC8iPCJHIpwhTSJQIloigKGBImNlcgA2Iv0JOSJ1AOUABgoA4DXYw9zvIXJ0bQKdIQAAAABEImEAcgDhAOEhbQBloEEi8aBEIiYKYQDyAMsIcwB1AAABYnBWIlgi5QDUCeUA3wmAAWJjcABgInMieCKAoYQiRWVzAGci7glqIgDgxSo4A2UAdABl4IIi0iBxAPGgiCJoImMAZaCBIvEA/gmAoYUiRWVzAH8iFgqCIgDgxio4A2UAdABl4IMi0iBxAPGgiSKAIgACZ2lscpIilCKaIpwi7AAMCWwAZABlADuA8QDxQOcAWwlpI2FuZ2xlAAABbHKkIqoi5SFmdGWg6iLxAEUJaSJnaHQAZaDrIvEAvgltoL0DAKEjAGVzuCK8InIAbwAAoBYhcAAAoAcggARESGFkZ2lscnMAziLSItYi2iLeIugi7SICIw8j4SFzaACgrSLhIXJyAKAEKXAAAOBNItIg4SFzaACgrCIAAWV04iLlIgDgZSLSIADgPgDSIG4iZmluAACg3imAAUFldADzIvci+iJyAHIAAKACKQDgZCLSIHLgPADSIGkAZQAA4LQi0iAAAUF0BiMKI3IAcgAAoAMp8iFpZQDgtSLSIGkAbQAA4Dwi0iCAAUFhbgAaIx4jKiNyAHIAAKDWIXIAAAFociMjJiNrAACgIylvoJYh9wD/DuUhYXIAoCcpUxJqFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVCMAAF4jaSN/I4IjjSOeI8AUAAAAAKYjwCMAANoj3yMAAO8jHiQvJD8kRCQAAWNzVyNsFHUAdABlADuA8wDzQAABaXlhI2cjcgBjoJoiO4D0APRAPmSAAmFiaW9zAHEjdCN3I3EBeiNzAOgAdhTsIWFjUWF2AACgOCrvIWxkAKC8KewhaWdTYQABY3KFI4kjaQByAACgvykA4DXYLN1vA5QjAAAAAJYjAACcI24A22JhAHYAZQA7gPIA8kAAoMEpAAFibaEjjAphAHIAAKC1KQACYWNpdKwjryO6I70jcgDyAFkUAAFpcrMjtiNyAACgvinvIXNzAKC7KW4A5QDZCgCgwCmAAWFlaQDFI8gjyyNjAHIATWFnAGEAyWOAAWNkbgDRI9Qj1iPyIW9uv2MAoLYpdQDzAHgBcABmAADgNdhg3YABYWVsAOQj5yPrI3IAAKC3KXIAcAAAoLkpdQDzAHwBAKMoImFkaW9zdvkj/CMPJBMkFiQbJHIA8gBeFIChXSplZm0AAyQJJAwkcgBvoDQhZgAAoDQhO4CqAKpAO4C6ALpA5yFvZgCgtiJyAACgVipsIm9wZQAAoFcqAKBbKoABY2xvACMkJSQrJPIACCRhAHMAaAA7gPgA+EBsAACgmCJpAGwBMyQ4JGQAZQA7gPUA9UBlAHMAYaCXInMAAKA2Km0AbAA7gPYA9kDiIWFyAKA9I+EKXiQAAHokAAB8JJQkAACYJKkkAAAAALUkEQsAAPAkAAAAAAQleiUAAIMlcgCAoSUiYXN0AGUkbyQBCwCBtgA7bGokayS2QGwAZQDsABgDaQJ1JAAAAAB4JG0AAKDzKgCg/Sp5AD9kcgCAAmNpbXB0AIUkiCSLJJkSjyRuAHQAJWBvAGQALmBpAGwAAKAwIOUhbmsAoDEgcgAA4DXYLd2AAWltbwCdJKAkpCR2oMYD1WNtAGEA9AD+B24AZQAAoA4m9KHAA64kAAC0JGMjaGZvcmsAAKDUItZjAAFhdbgkxCRuAAABY2u9JMIkawBooA8hAKAOIfYAaRpzAACkKwBhYmNkZW1zdNMkIRPXJNsk4STjJOck6yTjIWlyAKAjKmkAcgAAoCIqAAFvdYsW3yQAoCUqAKByKm4AO4CxALFAaQBtAACgJip3AG8AAKAnKoABaXB1APUk+iT+JO4idGludACgFSpmAADgNdhh3W4AZAA7gKMAo0CApHoiRWFjZWlub3N1ABMlFSUYJRslTCVRJVklSSV1JQCgsypwAACgtyp1AOUAPwtjoK8qgKJ6ImFjZW5zACclLSU0JTYlSSVwAHAAcgBvAPgAFyV1AHIAbAB5AGUA8QA/C/EAOAuAAWFlcwA8JUElRSXwInByb3gAoLkqcQBxAACgtSppAG0AAKDoImkA7QBEC20AZQDzoDIgIguAAUVhcwBDJVclRSXwAEAlgAFkZnAATwtfJXElgAFhbHMAZSVpJW0l7CFhcgCgLiPpIW5lAKASI/UhcmYAoBMjdKAdIu8AWQvyIWVsAKCwIgABY2l9JYElcgAA4DXYxdzIY24iY3NwAACgCCAAA2Zpb3BzdZElKxuVJZolnyWkJXIAAOA12C7dcABmAADgNdhi3XIiaW1lAACgVyBjAHIAAOA12MbcgAFhZW8AqiW6JcAldAAAAWVpryW2JXIAbgBpAG8AbgDzABkFbgB0AACgFipzAHQAZaA/APEACRj0AG0LgApBQkhhYmNkZWZoaWxtbm9wcnN0dXgA4yXyJfYl+iVpJpAmpia9JtUm5ib4JlonaCdxJ3UnnietJ7EnyCfiJ+cngAFhcnQA6SXsJe4lcgDyAJkM8gD6AuEhaWwAoBwpYQByAPIA3BVhAHIAAKBkKYADY2RlbnFydAAGJhAmEyYYJiYmKyZaJgABZXUKJg0mAOA9IjEDdABlAFVhaQDjACAN7SJwdHl2AKCzKWcAgKHpJ2RlbAAgJiImJCYAoJIpAKClKeUA9wt1AG8AO4C7ALtAcgAApZIhYWJjZmhscHN0dz0mQCZFJkcmSiZMJk4mUSZVJlgmcAAAoHUpZqDlIXMAAKAgKQCgMylzAACgHinrALka8ACVHmwAAKBFKWkAbQAAoHQpbAAAoKMhAKCdIQABYWleJmImaQBsAACgGilvAG6gNiJhAGwA8wB2C4ABYWJyAG8mciZ2JnIA8gAvEnIAawAAoHMnAAFha3omgSZjAAABZWt/JoAmfWBdYAABZXOFJocmAKCMKWwAAAFkdYwmjiYAoI4pAKCQKQACYWV1eZcmmiajJqUm8iFvbllhAAFkaZ4moSZpAGwAV2HsAA8M4gCAJkBkAAJjbHFzrSawJrUmuiZhAACgNylkImhhcgAAoGkpdQBvAPKgHSCjAWgAAKCzIYABYWNnAMMm0iaUC2wAgKEcIWlwcwDLJs4migxuAOUAoAxhAHIA9ADaC3QAAKCtJYABaWxyANsm3ybjJvMhaHQAoH0pbwBvAPIANgwA4DXYL90AAWFv6ib1JnIAAAFkde8m8SYAoMEhbKDAIQCgbCl2oMED8WOAAWducwD+Jk4nUCdoAHQAAANhaGxyc3QKJxInISc1Jz0nRydyInJvdwB0oJIhYQDpAFYmYSNycG9vbgAAAWR1GiceJ28AdwDuAPAmcAAAoMAh5SFmdAABYWgnJy0ncgByAG8AdwDzAAkMYQByAHAAbwBvAG4A8wATBGklZ2h0YXJyb3dzAACgySFxAHUAaQBnAGEAcgByAG8A9wBZJugkcmVldGltZXMAoMwiZwDaYmkAbgBnAGQAbwB0AHMAZQDxABwYgAFhaG0AYCdjJ2YncgDyAAkMYQDyABMEAKAPIG8idXN0AGGgsSPjIWhlAKCxI+0haWQAoO4qAAJhYnB0fCeGJ4knmScAAW5ygCeDJ2cAAKDtJ3IAAKD+IXIA6wAcDIABYWZsAI8nkieVJ3IAAKCGKQDgNdhj3XUAcwAAoC4qaSJtZXMAAKA1KgABYXCiJ6gncgBnoCkAdAAAoJQp7yJsaW50AKASKmEAcgDyADwnAAJhY2hxuCe8J6EMwCfxIXVvAKA6IHIAAOA12MfcAAFidYAmxCdvAPKgGSCoAYABaGlyAM4n0ifWJ3IAZQDlAE0n7SFlcwCgyiJpAIChuSVlZmwAXAxjEt4n9CFyaQCgzinsInVoYXIAoGgpAKAeIWENBSgJKA0oSyhVKIYoAACLKLAoAAAAAOMo5ygAABApJCkxKW0pcSmHKaYpAACYKgAAAACxKmMidXRlAFthcQB1AO8ABR+ApHsiRWFjZWlucHN5ABwoHignKCooLygyKEEoRihJKACgtCrwASMoAAAlKACguCpvAG4AYWF1AOUAgw1koLAqaQBsAF9hcgBjAF1hgAFFYXMAOCg6KD0oAKC2KnAAAKC6KmkAbQAAoOki7yJsaW50AKATKmkA7QCIDUFkbwB0AGKixSKRFgAAAABTKACgZiqAA0FhY21zdHgAYChkKG8ocyh1KHkogihyAHIAAKDYIXIAAAFocmkoayjrAJAab6CYIfcAzAd0ADuApwCnQGkAO2D3IWFyAKApKW0AAAFpbn4ozQBuAHUA8wDOAHQAAKA2J3IA7+A12DDdIxkAAmFjb3mRKJUonSisKHIAcAAAoG8mAAFoeZkonChjAHkASWRIZHIAdABtAqUoAAAAAKgoaQDkAFsPYQByAGEA7ABsJDuArQCtQAABZ22zKLsobQBhAAChwwNmdroouijCY4CjPCJkZWdsbnByAMgozCjPKNMo1yjaKN4obwB0AACgairxoEMiCw5FoJ4qAKCgKkWgnSoAoJ8qZQAAoEYi7CF1cwCgJCrhIXJyAKByKWEAcgDyAPwMAAJhZWl07Sj8KAEpCCkAAWxz8Sj4KGwAcwBlAHQAbQDpAH8oaABwAACgMyrwImFyc2wAoOQpAAFkbFoPBSllAACgIyNloKoqc6CsKgDgrCoA/oABZmxwABUpGCkfKfQhY3lMZGKgLwBhoMQpcgAAoD8jZgAA4DXYZN1hAAABZHIoKRcDZQBzAHWgYCZpAHQAAKBgJoABY3N1ADYpRilhKQABYXU6KUApcABzoJMiAOCTIgD+cABzoJQiAOCUIgD+dQAAAWJwSylWKQChjyJlcz4NUCllAHQAZaCPIvEAPw0AoZAiZXNIDVspZQB0AGWgkCLxAEkNAKGhJWFmZilbBHIAZQFrKVwEAKChJWEAcgDyAAMNAAJjZW10dyl7KX8pgilyAADgNdjI3HQAbQDuAM4AaQDsAAYpYQByAOYAVw0AAWFyiimOKXIA5qAGJhESAAFhbpIpoylpImdodAAAAWVwmSmgKXAAcwBpAGwAbwDuANkXaADpAKAkcwCvYIACYmNtbnAArin8KY4NJSooKgCkgiJFZGVtbnByc7wpvinCKcgpzCnUKdgp3CkAoMUqbwB0AACgvSpkoIYibwB0AACgwyr1IWx0AKDBKgABRWXQKdIpAKDLKgCgiiLsIXVzAKC/KuEhcnIAoHkpgAFlaXUA4inxKfQpdAAAoYIiZW7oKewpcQDxoIYivSllAHEA8aCKItEpbQAAoMcqAAFicPgp+ikAoNUqAKDTKmMAgKJ7ImFjZW5zAAcqDSoUKhYqRihwAHAAcgBvAPgAIyh1AHIAbAB5AGUA8QCDDfEAfA2AAWFlcwAcKiIqPShwAHAAcgBvAPgAPChxAPEAOShnAACgaiYApoMiMTIzRWRlaGxtbnBzPCo/KkIqRSpHKlIqWCpjKmcqaypzKncqO4C5ALlAO4CyALJAO4CzALNAAKDGKgABb3NLKk4qdAAAoL4qdQBiAACg2CpkoIcibwB0AACgxCpzAAABb3VdKmAqbAAAoMknYgAAoNcq4SFycgCgeyn1IWx0AKDCKgABRWVvKnEqAKDMKgCgiyLsIXVzAKDAKoABZWl1AH0qjCqPKnQAAKGDImVugyqHKnEA8aCHIkYqZQBxAPGgiyJwKm0AAKDIKgABYnCTKpUqAKDUKgCg1iqAAUFhbgCdKqEqrCpyAHIAAKDZIXIAAAFocqYqqCrrAJUab6CZIfcAxQf3IWFyAKAqKWwAaQBnADuA3wDfQOELzyrZKtwq6SrsKvEqAAD1KjQrAAAAAAAAAAAAAEwrbCsAAHErvSsAAAAAAADRK3IC1CoAAAAA2CrnIWV0AKAWI8RjcgDrAOUKgAFhZXkA4SrkKucq8iFvbmVh5CFpbGNhQmRvAPQAIg5sInJlYwAAoBUjcgAA4DXYMd0AAmVpa2/7KhIrKCsuK/IBACsAAAkrZQAAATRm6g0EK28AcgDlAOsNYQBzorgDECsAAAAAEit5AG0A0WMAAWNuFislK2sAAAFhcxsrIStwAHAAcgBvAPgAFw5pAG0AAKA8InMA8AD9DQABYXMsKyEr8AAXDnIAbgA7gP4A/kDsATgrOyswG2QA5QBnAmUAcwCAgdcAO2JkAEMrRCtJK9dAYaCgInIAAKAxKgCgMCqAAWVwcwBRK1MraSvhAAkh4qKkIlsrXysAAAAAYytvAHQAAKA2I2kAcgAAoPEqb+A12GXdcgBrAACg2irhAHgociJpbWUAAKA0IIABYWlwAHYreSu3K2QA5QC+DYADYWRlbXBzdACFK6MrmiunK6wrsCuzK24iZ2xlAACitSVkbHFykCuUK5ornCvvIXduAKC/JeUhZnRloMMl8QACBwCgXCJpImdodABloLkl8QBdDG8AdAAAoOwlaSJudXMAAKA6KuwhdXMAoDkqYgAAoM0p6SFtZQCgOyrlInppdW0AoOIjgAFjaHQAwivKK80rAAFyecYrySsA4DXYydxGZGMAeQBbZPIhb2tnYQABaW/UK9creAD0ANERaCJlYWQAAAFsct4r5ytlAGYAdABhAHIAcgBvAPcAXQbpJGdodGFycm93AKCgIQAJQUhhYmNkZmdobG1vcHJzdHV3CiwNLBEsHSwnLDEsQCxLLFIsYix6LIQsjyzLLOgs7Sz/LAotcgDyAAkDYQByAACgYykAAWNyFSwbLHUAdABlADuA+gD6QPIACQ1yAOMBIywAACUseQBeZHYAZQBtYQABaXkrLDAscgBjADuA+wD7QENkgAFhYmgANyw6LD0scgDyANEO7CFhY3FhYQDyAOAOAAFpckQsSCzzIWh0AKB+KQDgNdgy3XIAYQB2AGUAO4D5APlAYQFWLF8scgAAAWxyWixcLACgvyEAoL4hbABrAACggCUAAWN0Zix2LG8CbCwAAAAAcyxyAG4AZaAcI3IAAKAcI28AcAAAoA8jcgBpAACg+CUAAWFsfiyBLGMAcgBrYTuAqACoQAABZ3CILIssbwBuAHNhZgAA4DXYZt0AA2FkaGxzdZksniynLLgsuyzFLHIAcgBvAPcACQ1vAHcAbgBhAHIAcgBvAPcA2A5hI3Jwb29uAAABbHKvLLMsZQBmAPQAWyxpAGcAaAD0AF0sdQDzAKYOaQAAocUDaGzBLMIs0mNvAG4AxWPwI2Fycm93cwCgyCGAAWNpdADRLOEs5CxvAtcsAAAAAN4scgBuAGWgHSNyAACgHSNvAHAAAKAOI24AZwBvYXIAaQAAoPklYwByAADgNdjK3IABZGlyAPMs9yz6LG8AdAAAoPAi7CFkZWlhaQBmoLUlAKC0JQABYW0DLQYtcgDyAMosbAA7gPwA/EDhIm5nbGUAoKcpgAdBQkRhY2RlZmxub3Byc3oAJy0qLTAtNC2bLZ0toS2/LcMtxy3TLdgt3C3gLfwtcgDyABADYQByAHag6CoAoOkqYQBzAOgA/gIAAW5yOC08LechcnQAoJwpgANla25wcnN0AJkpSC1NLVQtXi1iLYItYQBwAHAA4QAaHG8AdABoAGkAbgDnAKEXgAFoaXIAoSmzJFotbwBwAPQAdCVooJUh7wD4JgABaXVmLWotZwBtAOEAuygAAWJwbi14LXMjZXRuZXEAceCKIgD+AODLKgD+cyNldG5lcQBx4IsiAP4A4MwqAP4AAWhyhi2KLWUAdADhABIraSNhbmdsZQAAAWxyki2WLeUhZnQAoLIiaSJnaHQAAKCzInkAMmThIXNoAKCiIoABZWxyAKcttC24LWKiKCKuLQAAAACyLWEAcgAAoLsicQAAoFoi7CFpcACg7iIAAWJ0vC1eD2EA8gBfD3IAAOA12DPddAByAOkAlS1zAHUAAAFicM0t0C0A4IIi0iAA4IMi0iBwAGYAAOA12GfdcgBvAPAAWQt0AHIA6QCaLQABY3XkLegtcgAA4DXYy9wAAWJw7C30LW4AAAFFZXUt8S0A4IoiAP5uAAABRWV/LfktAOCLIgD+6SJnemFnAKCaKYADY2Vmb3BycwANLhAuJS4pLiMuLi40LukhcmN1YQABZGkULiEuAAFiZxguHC5hAHIAAKBfKmUAcaAnIgCgWSLlIXJwAKAYIXIAAOA12DTdcABmAADgNdho3WWgQCJhAHQA6ABqD2MAcgAA4DXYzNzjCuQRUC4AAFQuAABYLmIuAAAAAGMubS5wLnQuAAAAAIguki4AAJouJxIqEnQAcgDpAB0ScgAA4DXYNd0AAUFhWy5eLnIA8gDnAnIA8gCTB75jAAFBYWYuaS5yAPIA4AJyAPIAjAdhAPAAeh5pAHMAAKD7IoABZHB0APgReS6DLgABZmx9LoAuAOA12GnddQDzAP8RaQBtAOUABBIAAUFhiy6OLnIA8gDuAnIA8gCaBwABY3GVLgoScgAA4DXYzdwAAXB0nS6hLmwAdQDzACUScgDpACASAARhY2VmaW9zdbEuvC7ELsguzC7PLtQu2S5jAAABdXm2LrsudABlADuA/QD9QE9kAAFpecAuwy5yAGMAd2FLZG4AO4ClAKVAcgAA4DXYNt1jAHkAV2RwAGYAAOA12GrdYwByAADgNdjO3AABY23dLt8ueQBOZGwAO4D/AP9AAAVhY2RlZmhpb3N38y73Lv8uAi8MLxAvEy8YLx0vIi9jInV0ZQB6YQABYXn7Lv4u8iFvbn5hN2RvAHQAfGEAAWV0Bi8KL3QAcgDmAB8QYQC2Y3IAAOA12DfdYwB5ADZk5yJyYXJyAKDdIXAAZgAA4DXYa91jAHIAAOA12M/cAAFqbiYvKC8AoA0gagAAoAwg`),Wo;(function(e){e[e.VALUE_LENGTH=49152]=`VALUE_LENGTH`,e[e.FLAG13=8192]=`FLAG13`,e[e.BRANCH_LENGTH=8064]=`BRANCH_LENGTH`,e[e.JUMP_TABLE=127]=`JUMP_TABLE`})(Wo||={});var Go;(function(e){e[e.NUM=35]=`NUM`,e[e.SEMI=59]=`SEMI`,e[e.EQUALS=61]=`EQUALS`,e[e.ZERO=48]=`ZERO`,e[e.NINE=57]=`NINE`,e[e.LOWER_A=97]=`LOWER_A`,e[e.LOWER_F=102]=`LOWER_F`,e[e.LOWER_X=120]=`LOWER_X`,e[e.LOWER_Z=122]=`LOWER_Z`,e[e.UPPER_A=65]=`UPPER_A`,e[e.UPPER_F=70]=`UPPER_F`,e[e.UPPER_Z=90]=`UPPER_Z`})(Go||={});var Ko=32;function qo(e){return e>=Go.ZERO&&e<=Go.NINE}function Jo(e){return e>=Go.UPPER_A&&e<=Go.UPPER_F||e>=Go.LOWER_A&&e<=Go.LOWER_F}function Yo(e){return e>=Go.UPPER_A&&e<=Go.UPPER_Z||e>=Go.LOWER_A&&e<=Go.LOWER_Z||qo(e)}function Xo(e){return e===Go.EQUALS||Yo(e)}var Zo;(function(e){e[e.EntityStart=0]=`EntityStart`,e[e.NumericStart=1]=`NumericStart`,e[e.NumericDecimal=2]=`NumericDecimal`,e[e.NumericHex=3]=`NumericHex`,e[e.NamedEntity=4]=`NamedEntity`})(Zo||={});var Qo;(function(e){e[e.Legacy=0]=`Legacy`,e[e.Strict=1]=`Strict`,e[e.Attribute=2]=`Attribute`})(Qo||={});var $o=class{decodeTree;emitCodePoint;errors;constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n}state=Zo.EntityStart;consumed=1;result=0;treeIndex=0;excess=1;decodeMode=Qo.Strict;runConsumed=0;startEntity(e){this.decodeMode=e,this.state=Zo.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1,this.runConsumed=0}write(e,t){switch(this.state){case Zo.EntityStart:return e.charCodeAt(t)===Go.NUM?(this.state=Zo.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=Zo.NamedEntity,this.stateNamedEntity(e,t));case Zo.NumericStart:return this.stateNumericStart(e,t);case Zo.NumericDecimal:return this.stateNumericDecimal(e,t);case Zo.NumericHex:return this.stateNumericHex(e,t);case Zo.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|Ko)===Go.LOWER_X?(this.state=Zo.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=Zo.NumericDecimal,this.stateNumericDecimal(e,t))}stateNumericHex(e,t){for(;t<e.length;){let n=e.charCodeAt(t);if(qo(n)||Jo(n)){let e=n<=Go.NINE?n-Go.ZERO:(n|Ko)-Go.LOWER_A+10;this.result=this.result*16+e,this.consumed++,t++}else return this.emitNumericEntity(n,3)}return-1}stateNumericDecimal(e,t){for(;t<e.length;){let n=e.charCodeAt(t);if(qo(n))this.result=this.result*10+(n-Go.ZERO),this.consumed++,t++;else return this.emitNumericEntity(n,2)}return-1}emitNumericEntity(e,t){if(this.consumed<=t)return this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===Go.SEMI)this.consumed+=1;else if(this.decodeMode===Qo.Strict)return 0;return this.emitCodePoint(Vo(this.result),this.consumed),this.errors&&(e!==Go.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){let{decodeTree:n}=this,r=n[this.treeIndex],i=(r&Wo.VALUE_LENGTH)>>14;for(;t<e.length;){if(i===0&&(r&Wo.FLAG13)!==0){let a=(r&Wo.BRANCH_LENGTH)>>7;if(this.runConsumed===0){let n=r&Wo.JUMP_TABLE;if(e.charCodeAt(t)!==n)return this.result===0?0:this.emitNotTerminatedNamedEntity();t++,this.excess++,this.runConsumed++}for(;this.runConsumed<a;){if(t>=e.length)return-1;let r=this.runConsumed-1,i=n[this.treeIndex+1+(r>>1)],a=r%2==0?i&255:i>>8&255;if(e.charCodeAt(t)!==a)return this.runConsumed=0,this.result===0?0:this.emitNotTerminatedNamedEntity();t++,this.excess++,this.runConsumed++}this.runConsumed=0,this.treeIndex+=1+(a>>1),r=n[this.treeIndex],i=(r&Wo.VALUE_LENGTH)>>14}if(t>=e.length)break;let a=e.charCodeAt(t);if(a===Go.SEMI&&i!==0&&(r&Wo.FLAG13)!==0)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);if(this.treeIndex=ts(n,r,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return this.result===0||this.decodeMode===Qo.Attribute&&(i===0||Xo(a))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],i=(r&Wo.VALUE_LENGTH)>>14,i!==0){if(a===Go.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==Qo.Strict&&(r&Wo.FLAG13)===0&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}t++,this.excess++}return-1}emitNotTerminatedNamedEntity(){let{result:e,decodeTree:t}=this,n=(t[e]&Wo.VALUE_LENGTH)>>14;return this.emitNamedEntityData(e,n,this.consumed),this.errors?.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){let{decodeTree:r}=this;return this.emitCodePoint(t===1?r[e]&~(Wo.VALUE_LENGTH|Wo.FLAG13):r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){switch(this.state){case Zo.NamedEntity:return this.result!==0&&(this.decodeMode!==Qo.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Zo.NumericDecimal:return this.emitNumericEntity(0,2);case Zo.NumericHex:return this.emitNumericEntity(0,3);case Zo.NumericStart:return this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Zo.EntityStart:return 0}}};function es(e){let t=``,n=new $o(e,e=>t+=String.fromCodePoint(e));return function(e,r){let i=0,a=0;for(;(a=e.indexOf(`&`,a))>=0;){t+=e.slice(i,a),n.startEntity(r);let o=n.write(e,a+1);if(o<0){i=a+n.end();break}i=a+o,a=o===0?i+1:i}let o=t+e.slice(i);return t=``,o}}function ts(e,t,n,r){let i=(t&Wo.BRANCH_LENGTH)>>7,a=t&Wo.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){let t=r-a;return t<0||t>=i?-1:e[n+t]-1}let o=i+1>>1,s=0,c=i-1;for(;s<=c;){let t=s+c>>>1,i=e[n+(t>>1)]>>(t&1)*8&255;if(i<r)s=t+1;else if(i>r)c=t-1;else return e[n+o+t]}return-1}var ns=es(Uo);function rs(e){return ns(e,Qo.Strict)}var is=class{src_Any=Po.source;src_Cc=Fo.source;src_Z=zo.source;src_P=Lo.source;src_ZPCc=[this.src_Z,this.src_P,this.src_Cc].join(`|`);src_ZCc=[this.src_Z,this.src_Cc].join(`|`);cache={};opts={maxLength:1e4,urlAuth:!1,schema_names:[]};constructor(e={}){this.opts={...this.opts,...e}}set(e={}){return this.opts={...this.opts,...e},this.cache={},this}escapeRE(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,`\\$&`)}nestedPairRE(e,t,n=4){let r=this.escapeRE(e),i=this.escapeRE(t),a=`(?:(?!${this.src_ZCc}|${r}|${i}).)`,o=`${r}${a}{0,1000}${i}`;for(let e=2;e<=n;e++)o=`${r}(?:${a}|${o}){0,1000}${i}`;return o}get_text_separators(){return this.cache.text_separators??=/[><\uff5c]/}get_pseudo_letter(){return this.cache.src_pseudo_letter??=RegExp(`(?:(?!${this.get_text_separators().source}|${this.src_ZPCc})${this.src_Any})`)}get_ipv4_addr(){return this.cache.src_ip4??=RegExp(`(?:(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])[.]){3}(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])`)}get_ipv6_addr(){let e=`[0-9A-Fa-f]{1,4}`,t=`(?:(?:${e}:${e})|${this.get_ipv4_addr().source})`;return this.cache.src_ip6_addr??=RegExp(`(?:(?:${e}:){6}${t}|::(?:${e}:){5}${t}|(?:${e})?::(?:${e}:){4}${t}|(?:(?:${e}:){0,1}${e})?::(?:${e}:){3}${t}|(?:(?:${e}:){0,2}${e})?::(?:${e}:){2}${t}|(?:(?:${e}:){0,3}${e})?::${e}:${t}|(?:(?:${e}:){0,4}${e})?::${t}|(?:(?:${e}:){0,5}${e})?::${e}|(?:(?:${e}:){0,6}${e})?::)`)}get_ipv6_url_host(){return this.cache.src_ip6_host??=RegExp(`\\[${this.get_ipv6_addr().source}\\]`)}get_ipv6_mail_host(){return this.cache.src_ipv6_mail_host??=RegExp(`\\[IPv6:${this.get_ipv6_addr().source}\\]`)}get_auth(){return this.cache.src_auth??=RegExp(`(?:(?:(?!${this.src_ZCc}|[@/\\[\\]()]).){1,50}@)?`)}get_port(){return this.cache.src_port??=RegExp(`(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?`)}get_host_terminator(){return this.cache.src_host_terminator??=RegExp(`(?=$|${this.get_text_separators().source}|${this.src_ZPCc})(?!${this.opts[`---`]?`-(?!--)|`:`-|`}_|:\\d|\\.-|\\.(?!$|${this.src_ZPCc}))`)}get_path_terminator(){return this.cache.src_path_terminator??=RegExp(`${this.src_ZPCc}|${this.get_text_separators().source}`)}get_path(){return this.cache.src_path??=RegExp(`(?:[/?#](?:${this.nestedPairRE(`[`,`]`)}|${this.nestedPairRE(`(`,`)`)}|${this.nestedPairRE(`{`,`}`)}|\\"(?:(?!${this.src_ZCc}|["]).){1,100}\\"|\\'(?:(?!${this.src_ZCc}|[']).){1,100}\\'|\\'(?=${this.get_pseudo_letter().source}|[-])|\\.{2,20}[:]?[a-zA-Z0-9%/&]|\\.(?!${this.src_ZCc}|[.]|$)|`+(this.opts[`---`]?`\\-(?!--(?:[^-]|$))(?:-{0,19})|`:`\\-{1,20}|`)+`,(?!${this.src_ZCc}|$)|;(?!${this.src_ZCc}|$)|\\!{1,20}(?!${this.src_ZCc}|[!]|$)|\\?(?!${this.src_ZCc}|[?]|$)|`+this.get_path_extra().source+`[\\\\/:%@#&=_~*]|(?!${this.get_path_terminator().source}).){1,${this.opts.maxLength}}|\\/)?`)}get_mail_name(){return this.cache.src_mail_name??=RegExp("[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9](?:[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9]|[.](?=[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9])){0,63}")}get_xn(){return this.cache.src_xn??=RegExp(`xn--[a-z0-9\\-]{1,59}`)}get_tld(){if(this.cache.tld)return this.cache.tld;let e=[...new Set(this.opts.tlds||[])].sort().reverse().join(`|`);return this.cache.tld=RegExp(`${e||`$#none#$`}|${this.get_xn().source}`),this.cache.tld}get_domain_root(){return this.cache.src_domain_root??=RegExp(`(?:`+this.get_xn().source+`|${this.get_pseudo_letter().source}{1,63})`)}get_domain(){return this.cache.src_domain??=RegExp(`(?:`+this.get_xn().source+`|(?:${this.get_pseudo_letter().source})|(?:${this.get_pseudo_letter().source}(?:-|${this.get_pseudo_letter().source}){0,61}${this.get_pseudo_letter().source}))`)}get_url_host_port(){return this.cache.url_host_port??=RegExp(`(?:`+this.get_ipv6_url_host().source+`|(?:(?:(?:${this.get_domain().source})\\.){0,10}${this.get_domain().source}))`+this.get_port().source+this.get_host_terminator().source)}get_fuzzy_url_host_port(){return this.cache.fuzzy_url_host_port??=RegExp(`(?:`+(this.opts.fuzzyIP?this.get_ipv4_addr().source+`|`:``)+`(?:(?:(?:${this.get_domain().source})\\.){1,10}(?:${this.get_tld().source})))`+this.get_host_terminator().source)}get_mail_host(){return this.cache.src_mail_host??=RegExp(`(?:`+this.get_ipv6_mail_host().source+`|(?:(?:(?:${this.get_domain().source})\\.){0,4}${this.get_domain().source}))`+this.get_host_terminator().source)}get_fuzzy_mail_host(){return this.cache.src_fuzzy_mail_host??=RegExp(`(?:`+this.get_ipv6_mail_host().source+`|(?:(?:(?:${this.get_domain().source})[.]){1,4}${this.get_domain_root().source}))`+this.get_host_terminator().source)}get_path_extra(){return this.cache.src_path_extra??=RegExp(``)}get_fuzzy_mail_host_search(){return this.cache.mail_fuzzy_host_search??=RegExp(`@${this.get_fuzzy_mail_host().source}`,`ig`)}get_fuzzy_link_search(){return this.cache.link_fuzzy_search??=RegExp(`(^|(?![.:/\\-_@])(?:[$+<=>^\`|\uff5c]|${this.src_ZPCc}))(?:(?![$+<=>^\`|\uff5c])${this.get_fuzzy_url_host_port().source}${this.get_path().source})`,`ig`)}get_http_validator(){return this.cache.http_validator??=RegExp(`\\/\\/`+(this.opts.urlAuth?this.get_auth().source:``)+this.get_url_host_port().source+this.get_path().source,`iy`)}get_relative_proto_validator(){return this.cache.relative_proto_validator??=RegExp((this.opts.urlAuth?this.get_auth().source:``)+`(?:localhost|${this.get_ipv6_url_host().source}|(?:(?:${this.get_domain().source})[.]){1,10}${this.get_domain_root().source})`+this.get_port().source+this.get_host_terminator().source+this.get_path().source,`iy`)}get_mail_name_validator(){return this.cache.mail_name_validator??=RegExp(`(?:^|${this.get_text_separators().source}|"|\\(|${this.src_ZCc})(${this.get_mail_name().source})$`)}get_mailto_validator(){return this.cache.mailto_validator??=RegExp(`${this.get_mail_name().source}@${this.get_mail_host().source}`,`iy`)}get_schema_names(){return this.cache.schema_names??=new RegExp((this.opts.schema_names||[]).map(e=>this.escapeRE(e)).join(`|`))}get_schema_search(){return this.cache.schema_search??=RegExp(`(^|(?!_)(?:[><\uff5c]|${this.src_ZPCc}))(${this.get_schema_names().source})`,`ig`)}get_schema_at_start(){return this.cache.schema_at_start??=RegExp(`^${this.get_schema_search().source}`,`i`)}},as={validate:(e,t,n)=>{let r=n.re.get_http_validator();r.lastIndex=t;let i=r.exec(e);return i?i[0].length:0},normalize:(e,t)=>t.normalize(e)},os={"http:":as,"https:":as,"ftp:":as,"//":{validate:function(e,t,n){let r=n.re.get_relative_proto_validator();r.lastIndex=t;let i=r.exec(e);return i?t>=3&&e[t-3]===`:`||t>=3&&e[t-3]===`/`?0:i[0].length:0},normalize:(e,t)=>t.normalize(e)},"mailto:":{validate:function(e,t,n){let r=n.re.get_mailto_validator();r.lastIndex=t;let i=r.exec(e);return i?i[0].length:0},normalize:(e,t)=>t.normalize(e)}},ss=`a:cdefgilmnoqrstuwxz|b:abdefghijmnorstvwyz|c:acdfghiklmnoruvwxyz|d:ejkmoz|e:cegrstu|f:ijkmor|g:abdefghilmnpqrstuwy|h:kmnrtu|i:delmnoqrst|j:emop|k:eghimnprwyz|l:abcikrstuvy|m:acdeghklmnopqrstuvwxyz|n:acefgilopruz|o:m|p:aefghklmnrstwy|q:a|r:eosuw|s:abcdeghijklmnortuvxyz|t:cdfghjklmnortvwz|u:agksyz|v:aceginu|w:fs|y:et|z:amw`,cs=`biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф`;function ls(){let e=cs.split(`|`);return ss.split(`|`).forEach(t=>{let n=t.indexOf(`:`),r=t.slice(0,n);for(let i of t.slice(n+1))e.push(r+i)}),e}var us={fuzzyLink:!1,fuzzyEmail:!0,fuzzyIP:!1,"---":!1,tlds:ls(),urlAuth:!1,maxLength:1e4},ds=class{schema;index;lastIndex;raw;text;url;constructor(e,t,n,r){let i=e.slice(n,r);this.schema=t.toLowerCase(),this.index=n,this.lastIndex=r,this.raw=i,this.text=i,this.url=i}},fs=class{__opts__;__schemas__;re;constructor(e={}){let{rebuilder:t,...n}=e;this.__opts__={...us,...n},this.__schemas__={...os},this.re=t||new is,this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)})}add(e,t=null){if(!t)delete this.__schemas__[e];else{let n={normalize:(e,t)=>t.normalize(e),...t};this.__schemas__[e]=n}return this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}set(e={}){return this.__opts__={...this.__opts__,...e},this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}test(e){if(!e.length)return!1;let t,n;for(n=this.re.get_schema_search(),n.lastIndex=0;(t=n.exec(e))!==null;)if(this.testSchemaAt(e,t[2],n.lastIndex))return!0;if(this.__opts__.fuzzyLink&&this.__schemas__[`http:`]&&(n=this.re.get_fuzzy_link_search(),n.lastIndex=0,n.exec(e)!==null))return!0;if(this.__opts__.fuzzyEmail&&this.__schemas__[`mailto:`]&&e.indexOf(`@`)>=0){let n=this.re.get_fuzzy_mail_host_search(),r=this.re.get_mail_name_validator();for(n.lastIndex=0;(t=n.exec(e))!==null;){let n=e.slice(Math.max(0,t.index-65),t.index);if(r.test(n))return!0}}return!1}testSchemaAt(e,t,n){return this.__schemas__[t.toLowerCase()]?this.__schemas__[t.toLowerCase()].validate(e.slice(0,n+this.__opts__.maxLength),n,this):0}match(e){let t=[],n=this.re.get_schema_search(),r,i,a,o,s,c,l=!1,u=!1,d=!1,f=0;if(!e.length)return null;for(n.lastIndex=0,this.__opts__.fuzzyLink&&this.__schemas__[`http:`]&&(r=this.re.get_fuzzy_link_search(),r.lastIndex=0),this.__opts__.fuzzyEmail&&this.__schemas__[`mailto:`]&&(i=this.re.get_fuzzy_mail_host_search(),i.lastIndex=0,a=this.re.get_mail_name_validator());;){let p=Math.max(f-1,0);if(i&&a&&!d&&(!s||s.index<f))for(i.lastIndex<p&&(i.lastIndex=p);;){let t=i.exec(e);if(!t){d=!0,s=void 0;break}let n=a.exec(e.slice(Math.max(0,t.index-65),t.index));if(n){if(s={schema:`mailto:`,index:t.index-n[1].length,lastIndex:t.index+t[0].length},s.index>=f)break;i.lastIndex<p&&(i.lastIndex=p)}}if(r&&!u&&(!o||o.index<f))for(r.lastIndex<p&&(r.lastIndex=p);;){let t=r.exec(e);if(!t){u=!0,o=void 0;break}if(o={schema:``,index:t.index+t[1].length,lastIndex:t.index+t[0].length},o.index>=f)break;r.lastIndex<p&&(r.lastIndex=p)}let m=s;(!m||o&&(o.index<m.index||o.index===m.index&&o.lastIndex>m.lastIndex))&&(m=o);let h;if(!l)for(;;){if(!c){n.lastIndex<p&&(n.lastIndex=p);let t=n.exec(e);if(!t){l=!0;break}c={schema:t[2],index:t.index+t[1].length,lastIndex:t.index+t[0].length}}if(c.index<f){c=void 0;continue}if(m&&c.index>m.index)break;let t=c;c=void 0;let r=this.testSchemaAt(e,t.schema,t.lastIndex);if(r){h={schema:t.schema,index:t.index,lastIndex:t.lastIndex+r};break}}let g=h;if((!g||s&&(s.index<g.index||s.index===g.index&&s.lastIndex>g.lastIndex))&&(g=s),(!g||o&&(o.index<g.index||o.index===g.index&&o.lastIndex>g.lastIndex))&&(g=o),!g)break;g===s?s=void 0:g===o&&(o=void 0);let _=new ds(e,g.schema,g.index,g.lastIndex);_.schema?this.__schemas__[_.schema].normalize(_,this):this.normalize(_),t.push(_),f=g.lastIndex}return t.length?t:null}matchAtStart(e){if(!e.length)return null;let t=this.re.get_schema_at_start().exec(e);if(!t)return null;let n=this.testSchemaAt(e,t[2],t[0].length);if(!n)return null;let r=new ds(e,t[2],t.index+t[1].length,t.index+t[0].length+n);return this.__schemas__[r.schema].normalize(r,this),r}tlds(e,t=!1){return e=Array.isArray(e)?e:[e],t?this.__opts__.tlds=this.__opts__.tlds.concat(e):this.__opts__.tlds=e,this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}normalize(e){e.schema||(e.url=`http://${e.url}`),e.schema===`mailto:`&&!/^mailto:/i.test(e.url)&&(e.url=`mailto:${e.url}`)}},ps=2147483647,ms=36,hs=1,gs=26,_s=38,vs=700,ys=72,bs=128,xs=`-`,Ss=/^xn--/,Cs=/[^\0-\x7F]/,ws=/[\x2E\u3002\uFF0E\uFF61]/g,Ts={overflow:`Overflow: input needs wider integers to process`,"not-basic":`Illegal input >= 0x80 (not a basic code point)`,"invalid-input":`Invalid input`},Es=35,Ds=Math.floor,Os=String.fromCharCode;function ks(e){throw RangeError(Ts[e])}function As(e,t){let n=[],r=e.length;for(;r--;)n[r]=t(e[r]);return n}function js(e,t){let n=e.split(`@`),r=``;n.length>1&&(r=n[0]+`@`,e=n[1]),e=e.replace(ws,`.`);let i=As(e.split(`.`),t).join(`.`);return r+i}function Ms(e){let t=[],n=0,r=e.length;for(;n<r;){let i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){let r=e.charCodeAt(n++);(r&64512)==56320?t.push(((i&1023)<<10)+(r&1023)+65536):(t.push(i),n--)}else t.push(i)}return t}var Ns=e=>String.fromCodePoint(...e),Ps=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:ms},Fs=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},Is=function(e,t,n){let r=0;for(e=n?Ds(e/vs):e>>1,e+=Ds(e/t);e>455;r+=ms)e=Ds(e/Es);return Ds(r+36*e/(e+_s))},Ls=function(e){let t=[],n=e.length,r=0,i=bs,a=ys,o=e.lastIndexOf(xs);o<0&&(o=0);for(let n=0;n<o;++n)e.charCodeAt(n)>=128&&ks(`not-basic`),t.push(e.charCodeAt(n));for(let s=o>0?o+1:0;s<n;){let o=r;for(let t=1,i=ms;;i+=ms){s>=n&&ks(`invalid-input`);let o=Ps(e.charCodeAt(s++));o>=ms&&ks(`invalid-input`),o>Ds((ps-r)/t)&&ks(`overflow`),r+=o*t;let c=i<=a?hs:i>=a+gs?gs:i-a;if(o<c)break;let l=ms-c;t>Ds(ps/l)&&ks(`overflow`),t*=l}let c=t.length+1;a=Is(r-o,c,o==0),Ds(r/c)>ps-i&&ks(`overflow`),i+=Ds(r/c),r%=c,t.splice(r++,0,i)}return String.fromCodePoint(...t)},Rs=function(e){let t=[];e=Ms(e);let n=e.length,r=bs,i=0,a=ys;for(let n of e)n<128&&t.push(Os(n));let o=t.length,s=o;for(o&&t.push(xs);s<n;){let n=ps;for(let t of e)t>=r&&t<n&&(n=t);let c=s+1;n-r>Ds((ps-i)/c)&&ks(`overflow`),i+=(n-r)*c,r=n;for(let n of e)if(n<r&&++i>ps&&ks(`overflow`),n===r){let e=i;for(let n=ms;;n+=ms){let r=n<=a?hs:n>=a+gs?gs:n-a;if(e<r)break;let i=e-r,o=ms-r;t.push(Os(Fs(r+i%o,0))),e=Ds(i/o)}t.push(Os(Fs(e,0))),a=Is(i,c,s===o),i=0,++s}++i,++r}return t.join(``)},zs={version:`2.3.1`,ucs2:{decode:Ms,encode:Ns},decode:Ls,encode:Rs,toASCII:function(e){return js(e,function(e){return Cs.test(e)?`xn--`+Rs(e):e})},toUnicode:function(e){return js(e,function(e){return Ss.test(e)?Ls(e.slice(4).toLowerCase()):e})}},Bs=Object.defineProperty,Vs=(e,t)=>{let n={};for(var r in e)Bs(n,r,{get:e[r],enumerable:!0});return t||Bs(n,Symbol.toStringTag,{value:`Module`}),n},Hs=Vs({arrayReplaceAt:()=>Ws,asciiTrim:()=>pc,callable:()=>Us,escapeHtml:()=>rc,escapeRE:()=>ac,fromCodePoint:()=>Ks,isMdAsciiPunct:()=>uc,isPunctChar:()=>cc,isPunctCharCode:()=>lc,isSpace:()=>oc,isValidEntityCode:()=>Gs,isWhiteSpace:()=>sc,lib:()=>mc,normalizeReference:()=>dc,unescapeAll:()=>Qs,unescapeMd:()=>Zs});function Us(e){let t=function(...n){return Reflect.construct(e,n,new.target&&new.target!==t?new.target:e)};return Object.defineProperty(t,"name",{value:e.name}),Object.setPrototypeOf(t,e),t.prototype=e.prototype,t}function Ws(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function Gs(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)==65535||(e&65535)==65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function Ks(e){if(e>65535){e-=65536;let t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var qs=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,Js=RegExp(`${qs.source}|&([a-z#][a-z0-9]{1,31});`,`gi`),Ys=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function Xs(e,t){if(t.charCodeAt(0)===35&&Ys.test(t)){let n=t[1].toLowerCase()===`x`?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return Gs(n)?Ks(n):e}let n=rs(e);return n===e?e:n}function Zs(e){return e.indexOf(`\\`)<0?e:e.replace(qs,`$1`)}function Qs(e){return e.indexOf(`\\`)<0&&e.indexOf(`&`)<0?e:e.replace(Js,function(e,t,n){return t||Xs(e,n)})}var $s=/[&<>"]/,ec=/[&<>"]/g,tc={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`};function nc(e){return tc[e]}function rc(e){return $s.test(e)?e.replace(ec,nc):e}var ic=/[.?*+^$[\]\\(){}|-]/g;function ac(e){return e.replace(ic,`\\$&`)}function oc(e){switch(e){case 9:case 32:return!0}return!1}function sc(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function cc(e){return Lo.test(e)||Ro.test(e)}function lc(e){return cc(Ks(e))}function uc(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function dc(e){return e=e.trim().replace(/\s+/g,` `),e.toLowerCase().toUpperCase()}function fc(e){return e===32||e===9||e===10||e===13}function pc(e){let t=0;for(;t<e.length&&fc(e.charCodeAt(t));t++);let n=e.length-1;for(;n>=t&&fc(e.charCodeAt(n));n--);return e.slice(t,n+1)}var mc={mdurl:Mo,ucmicro:No};function hc(e,t,n){let r,i,a,o,s=e.posMax,c=e.pos;for(e.pos=t+1,r=1;e.pos<s;){if(a=e.src.charCodeAt(e.pos),a===93&&(r--,r===0)){i=!0;break}if(o=e.pos,e.md.inline.skipToken(e),a===91){if(o===e.pos-1)r++;else if(n)return e.pos=c,-1}}let l=-1;return i&&(l=e.pos),e.pos=c,l}function gc(e,t,n){let r,i=t,a={ok:!1,pos:0,str:``};if(e.charCodeAt(i)===60){for(i++;i<n;){if(r=e.charCodeAt(i),r===10||r===60)return a;if(r===62)return a.pos=i+1,a.str=Qs(e.slice(t+1,i)),a.ok=!0,a;if(r===92&&i+1<n){i+=2;continue}i++}return a}let o=0;for(;i<n&&(r=e.charCodeAt(i),!(r===32||r<32||r===127));){if(r===92&&i+1<n){if(e.charCodeAt(i+1)===32){i++;continue}i+=2;continue}if(r===40&&(o++,o>32))return a;if(r===41){if(o===0)break;o--}i++}return t===i||o!==0?a:(a.str=Qs(e.slice(t,i)),a.pos=i,a.ok=!0,a)}function _c(e,t,n,r){let i,a=t,o={ok:!1,can_continue:!1,pos:0,str:``,marker:0};if(r)o.str=r.str,o.marker=r.marker;else{if(a>=n)return o;let r=e.charCodeAt(a);if(r!==34&&r!==39&&r!==40)return o;t++,a++,r===40&&(r=41),o.marker=r}for(;a<n;){if(i=e.charCodeAt(a),i===o.marker)return o.pos=a+1,o.str+=Qs(e.slice(t,a)),o.ok=!0,o;if(i===40&&o.marker===41)return o;i===92&&a+1<n&&a++,a++}return o.can_continue=!0,o.str+=Qs(e.slice(t,a)),o}var vc=Vs({parseLinkDestination:()=>gc,parseLinkLabel:()=>hc,parseLinkTitle:()=>_c});function yc(e){"@babel/helpers - typeof";return yc=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},yc(e)}function bc(e,t){if(yc(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(yc(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function xc(e){var t=bc(e,`string`);return yc(t)==`symbol`?t:t+``}function J(e,t,n){return(t=xc(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Sc=class{constructor(e,t,n){J(this,`map`,null),J(this,`level`,0),J(this,`children`,null),J(this,`content`,``),J(this,`markup`,``),J(this,`info`,``),J(this,`block`,!1),J(this,`hidden`,!1),this.type=e,this.tag=t,this.attrs=null,this.nesting=n,this.meta=null}attrIndex(e){if(!this.attrs)return-1;let t=this.attrs;for(let n=0,r=t.length;n<r;n++)if(t[n][0]===e)return n;return-1}attrPush(e){this.attrs?this.attrs.push(e):this.attrs=[e]}attrSet(e,t){let n=this.attrIndex(e),r=[e,t];n<0?this.attrPush(r):this.attrs[n]=r}attrGet(e){let t=this.attrIndex(e),n=null;return t>=0&&(n=this.attrs[t][1]),n}attrJoin(e,t){let n=this.attrIndex(e);n<0?this.attrPush([e,t]):this.attrs[n][1]=`${this.attrs[n][1]} ${t}`}},Cc=class{constructor(){J(this,`__rules__`,[]),J(this,`__cache__`,null)}__find__(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1}__compile__(){let e=new Set;this.__rules__.forEach(t=>{t.enabled&&t.alt.forEach(t=>{t&&e.add(t)})}),this.__cache__=Object.create(null),this.__cache__[``]=[],this.__rules__.forEach(e=>{e.enabled&&this.__cache__[``].push(e.fn)}),e.forEach(e=>{this.__cache__[e]=[],this.__rules__.forEach(t=>{t.enabled&&t.alt.indexOf(e)>=0&&this.__cache__[e].push(t.fn)})})}at(e,t,n={}){let r=this.__find__(e);if(r===-1)throw Error(`Parser rule not found: ${e}`);this.__rules__[r].fn=t,this.__rules__[r].alt=n.alt||[],this.__cache__=null}before(e,t,n,r={}){let i=this.__find__(e);if(i===-1)throw Error(`Parser rule not found: ${e}`);this.__rules__.splice(i,0,{name:t,enabled:!0,fn:n,alt:r.alt||[]}),this.__cache__=null}after(e,t,n,r={}){let i=this.__find__(e);if(i===-1)throw Error(`Parser rule not found: ${e}`);this.__rules__.splice(i+1,0,{name:t,enabled:!0,fn:n,alt:r.alt||[]}),this.__cache__=null}push(e,t,n={}){this.__rules__.push({name:e,enabled:!0,fn:t,alt:n.alt||[]}),this.__cache__=null}enable(e,t=!1){Array.isArray(e)||(e=[e]);let n=[];return e.forEach(e=>{let r=this.__find__(e);if(r<0){if(t)return;throw Error(`Rules manager: invalid rule name ${e}`)}this.__rules__[r].enabled=!0,n.push(e)}),this.__cache__=null,n}enableOnly(e,t=!1){Array.isArray(e)||(e=[e]),this.__rules__.forEach(e=>{e.enabled=!1}),this.enable(e,t)}disable(e,t=!1){Array.isArray(e)||(e=[e]);let n=[];return e.forEach(e=>{let r=this.__find__(e);if(r<0){if(t)return;throw Error(`Rules manager: invalid rule name ${e}`)}this.__rules__[r].enabled=!1,n.push(e)}),this.__cache__=null,n}getRules(e){return this.__cache__||this.__compile__(),this.__cache__[e]||[]}},wc={};wc.code_inline=function(e,t,n,r,i){let a=e[t];return`<code${i.renderAttrs(a)}>${rc(a.content)}</code>`},wc.code_block=function(e,t,n,r,i){let a=e[t];return`<pre${i.renderAttrs(a)}><code>${rc(e[t].content)}</code></pre>\n`},wc.fence=function(e,t,n,r,i){let a=e[t],o=a.info?Qs(a.info).trim():``,s=``,c=``;if(o){let e=o.split(/(\s+)/g);s=e[0],c=e.slice(2).join(``)}let l;if(l=n.highlight&&n.highlight(a.content,s,c)||rc(a.content),l.indexOf(`<pre`)===0)return l+`
12
+ `;if(o){let e=a.attrIndex(`class`),t=a.attrs?a.attrs.slice():[];e<0?t.push([`class`,`${n.langPrefix}${s}`]):(t[e]=[t[e][0],t[e][1]],t[e][1]+=` ${n.langPrefix}${s}`);let r={attrs:t};return`<pre><code${i.renderAttrs(r)}>${l}</code></pre>\n`}return`<pre><code${i.renderAttrs(a)}>${l}</code></pre>\n`},wc.image=function(e,t,n,r,i){let a=e[t];return a.attrs[a.attrIndex(`alt`)][1]=i.renderInlineAsText(a.children,n,r),i.renderToken(e,t,n)},wc.hardbreak=function(e,t,n){return n.xhtmlOut?`<br />
13
+ `:`<br>
14
+ `},wc.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?`<br />
15
+ `:`<br>
16
+ `:`
17
+ `},wc.text=function(e,t){return rc(e[t].content)},wc.html_block=function(e,t){return e[t].content},wc.html_inline=function(e,t){return e[t].content};var Tc=class{constructor(){J(this,`rules`,Object.assign({},wc))}renderAttrs(e){let t,n,r;if(!e.attrs)return``;for(r=``,t=0,n=e.attrs.length;t<n;t++)r+=` ${rc(e.attrs[t][0])}="${rc(String(e.attrs[t][1]))}"`;return r}renderToken(e,t,n){let r=e[t],i=``;if(r.hidden)return``;let a=t-1;for(;a>=0&&e[a].hidden&&e[a].nesting===0;)a--;r.block&&r.nesting!==-1&&a>=0&&e[a].hidden&&e[a].nesting===-1&&(i+=`
18
+ `),i+=(r.nesting===-1?`</`:`<`)+r.tag,i+=this.renderAttrs(r),r.nesting===0&&n.xhtmlOut&&(i+=` /`);let o=!1;if(r.block&&(o=!0,r.nesting===1)){let n=t+1;for(;n<e.length&&e[n].hidden&&e[n].nesting===0;)n++;if(n<e.length){let t=e[n];(t.type===`inline`||t.hidden||t.nesting===-1&&t.tag===r.tag)&&(o=!1)}}return i+=o?`>
19
+ `:`>`,i}renderInline(e,t,n){let r=``,i=this.rules;for(let a=0,o=e.length;a<o;a++){let o=e[a].type;i[o]===void 0?r+=this.renderToken(e,a,t):r+=i[o](e,a,t,n,this)}return r}renderInlineAsText(e,t,n){let r=``;for(let i=0,a=e.length;i<a;i++)switch(e[i].type){case`text`:case`code_inline`:r+=e[i].content;break;case`image`:r+=this.renderInlineAsText(e[i].children,t,n);break;case`html_inline`:case`html_block`:r+=e[i].content;break;case`softbreak`:case`hardbreak`:r+=`
20
+ `}return r}render(e,t,n){let r=``,i=this.rules;for(let a=0,o=e.length;a<o;a++){let o=e[a].type;o===`inline`?r+=this.renderInline(e[a].children,t,n):i[o]===void 0?r+=this.renderToken(e,a,t):r+=i[o](e,a,t,n,this)}return r}},Ec=class{constructor(e,t,n){J(this,`tokens`,[]),J(this,`inlineMode`,!1),J(this,`Token`,Sc),this.src=e,this.env=n,this.md=t}},Dc=/\r\n?|\n/g,Oc=/\0/g;function kc(e){let t;t=e.src.replace(Dc,`
21
+ `),t=t.replace(Oc,`�`),e.src=t}function Ac(e){let t;e.inlineMode?(t=new e.Token(`inline`,``,0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function jc(e){let t=e.tokens,n=0;for(let e=0;e<t.length;e++)t[e].type!==`reference_definition`&&(e!==n&&(t[n]=t[e]),n++);t.length!==n&&(t.length=n)}function Mc(e){let t=e.tokens;for(let n=0,r=t.length;n<r;n++){let r=t[n];r.type===`inline`&&e.md.inline.parse(r.content,e.md,e.env,r.children)}}function Nc(e){return/^<a[>\s]/i.test(e)}function Pc(e){return/^<\/a\s*>/i.test(e)}function Fc(e){let t=e.tokens;if(e.md.options.linkify)for(let n=0,r=t.length;n<r;n++){if(t[n].type!==`inline`||!e.md.linkify.test(t[n].content))continue;let r=t[n].children,i=0;for(let a=r.length-1;a>=0;a--){let o=r[a];if(o.type===`link_close`){for(a--;r[a].level!==o.level&&r[a].type!==`link_open`;)a--;continue}if(o.type===`html_inline`&&(Nc(o.content)&&i>0&&i--,Pc(o.content)&&i++),!(i>0)&&o.type===`text`&&e.md.linkify.test(o.content)){let i=o.content,s=e.md.linkify.match(i),c=[],l=o.level,u=0;s.length>0&&s[0].index===0&&a>0&&r[a-1].type===`text_special`&&(s=s.slice(1));for(let t=0;t<s.length;t++){let n=s[t].url,r=e.md.normalizeLink(n);if(!e.md.validateLink(r))continue;let a=s[t].text;a=s[t].schema?s[t].schema===`mailto:`&&!/^mailto:/i.test(a)?e.md.normalizeLinkText(`mailto:${a}`).replace(/^mailto:/,``):e.md.normalizeLinkText(a):e.md.normalizeLinkText(`http://${a}`).replace(/^http:\/\//,``);let o=s[t].index;if(o>u){let t=new e.Token(`text`,``,0);t.content=i.slice(u,o),t.level=l,c.push(t)}let d=new e.Token(`link_open`,`a`,1);d.attrs=[[`href`,r]],d.level=l++,d.markup=`linkify`,d.info=`auto`,c.push(d);let f=new e.Token(`text`,``,0);f.content=a,f.level=l,c.push(f);let p=new e.Token(`link_close`,`a`,-1);p.level=--l,p.markup=`linkify`,p.info=`auto`,c.push(p),u=s[t].lastIndex}if(u<i.length){let t=new e.Token(`text`,``,0);t.content=i.slice(u),t.level=l,c.push(t)}t[n].children=r=Ws(r,a,c)}}}}var Ic=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,Lc=/\((c|tm|r)\)/i,Rc=/\((c|tm|r)\)/gi,zc={c:`©`,r:`®`,tm:`™`};function Bc(e,t){return zc[t.toLowerCase()]}function Vc(e){let t=0;for(let n=e.length-1;n>=0;n--){let r=e[n];r.type===`text`&&!t&&(r.content=r.content.replace(Rc,Bc)),r.type===`link_open`&&r.info===`auto`&&t--,r.type===`link_close`&&r.info===`auto`&&t++}}function Hc(e){let t=0;for(let n=e.length-1;n>=0;n--){let r=e[n];r.type===`text`&&!t&&Ic.test(r.content)&&(r.content=r.content.replace(/\+-/g,`±`).replace(/\.{2,}/g,`…`).replace(/([?!])…/g,`$1..`).replace(/([?!]){4,}/g,`$1$1$1`).replace(/,{2,}/g,`,`).replace(/(^|[^-])---(?=[^-]|$)/gm,`$1—`).replace(/(^|\s)--(?=\s|$)/gm,`$1–`).replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,`$1–`)),r.type===`link_open`&&r.info===`auto`&&t--,r.type===`link_close`&&r.info===`auto`&&t++}}function Uc(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type===`inline`&&(Lc.test(e.tokens[t].content)&&Vc(e.tokens[t].children),Ic.test(e.tokens[t].content)&&Hc(e.tokens[t].children))}var Wc=/['"]/,Gc=/['"]/g,Kc=`’`;function qc(e,t,n,r){e[t]||(e[t]=[]),e[t].push({pos:n,ch:r})}function Jc(e,t){let n=``,r=0;t.sort((e,t)=>e.pos-t.pos);for(let i=0;i<t.length;i++){let a=t[i];n+=e.slice(r,a.pos)+a.ch,r=a.pos+1}return n+e.slice(r)}function Yc(e,t){let n,r=[],i={};for(let a=0;a<e.length;a++){let o=e[a],s=e[a].level;for(n=r.length-1;n>=0&&!(r[n].level<=s);n--);if(r.length=n+1,o.type!==`text`)continue;let c=o.content,l=0,u=c.length;OUTER:for(;l<u;){Gc.lastIndex=l;let o=Gc.exec(c);if(!o)break;let d=!0,f=!0;l=o.index+1;let p=o[0]===`'`,m=32;if(o.index-1>=0)m=c.charCodeAt(o.index-1);else for(n=a-1;n>=0&&e[n].type!==`softbreak`&&e[n].type!==`hardbreak`;n--)if(e[n].content){m=e[n].content.charCodeAt(e[n].content.length-1);break}let h=32;if(l<u)h=c.charCodeAt(l);else for(n=a+1;n<e.length&&e[n].type!==`softbreak`&&e[n].type!==`hardbreak`;n++)if(e[n].content){h=e[n].content.charCodeAt(0);break}let g=uc(m)||lc(m),_=uc(h)||lc(h),v=sc(m),y=sc(h);if(y?d=!1:_&&(v||g||(d=!1)),v?f=!1:g&&(y||_||(f=!1)),h===34&&o[0]===`"`&&m>=48&&m<=57&&(f=d=!1),d&&f&&(d=g,f=_),!d&&!f){p&&qc(i,a,o.index,Kc);continue}if(f)for(n=r.length-1;n>=0;n--){let e=r[n];if(r[n].level<s)break;if(e.single===p&&r[n].level===s){e=r[n];let s,c;p?(s=t.md.options.quotes[2],c=t.md.options.quotes[3]):(s=t.md.options.quotes[0],c=t.md.options.quotes[1]),qc(i,a,o.index,c),qc(i,e.token,e.pos,s),r.length=n;continue OUTER}}d?r.push({token:a,pos:o.index,single:p,level:s}):f&&p&&qc(i,a,o.index,Kc)}}Object.keys(i).forEach(function(t){let n=Number(t);e[n].content=Jc(e[n].content,i[t])})}function Xc(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)e.tokens[t].type!==`inline`||!Wc.test(e.tokens[t].content)||Yc(e.tokens[t].children,e)}function Zc(e){let t,n,r=e.length;for(t=0;t<r;t++)e[t].type===`text_special`&&(e[t].type=`text`);for(t=n=0;t<r;t++)e[t].type===`text`&&t+1<r&&e[t+1].type===`text`?e[t+1].content=e[t].content+e[t+1].content:(t!==n&&(e[n]=e[t]),n++);t!==n&&(e.length=n)}function Qc(e){let t,n,r=e.tokens,i=r.length;for(let e=0;e<i;e++){if(r[e].type!==`inline`)continue;let i=r[e].children,a=i.length;for(t=0;t<a;t++)i[t].type===`text_special`&&(i[t].type=`text`),i[t].children&&Zc(i[t].children);for(t=n=0;t<a;t++)i[t].type===`text`&&t+1<a&&i[t+1].type===`text`?i[t+1].content=i[t].content+i[t+1].content:(t!==n&&(i[n]=i[t]),n++);t!==n&&(i.length=n)}}var $c=[[`normalize`,kc],[`block`,Ac],[`strip_references`,jc],[`inline`,Mc],[`linkify`,Fc],[`replacements`,Uc],[`smartquotes`,Xc],[`text_join`,Qc]],el=class{constructor(){J(this,`ruler`,new Cc),J(this,`State`,Ec);for(let e=0;e<$c.length;e++)this.ruler.push($c[e][0],$c[e][1])}process(e){let t=this.ruler.getRules(``);for(let n=0,r=t.length;n<r;n++)t[n](e)}},tl=class{constructor(e,t,n,r){J(this,`bMarks`,[]),J(this,`eMarks`,[]),J(this,`tShift`,[]),J(this,`sCount`,[]),J(this,`bsCount`,[]),J(this,`blkIndent`,0),J(this,`line`,0),J(this,`lineMax`,0),J(this,`tight`,!1),J(this,`listIndent`,-1),J(this,`parentType`,`root`),J(this,`level`,0),J(this,`Token`,Sc),this.src=e,this.md=t,this.env=n,this.tokens=r;let i=this.src;for(let e=0,t=0,n=0,r=0,a=i.length,o=!1;t<a;t++){let s=i.charCodeAt(t);if(!o){if(oc(s)){n++,s===9?r+=4-r%4:r++;continue}o=!0}(s===10||t===a-1)&&(s!==10&&t++,this.bMarks.push(e),this.eMarks.push(t),this.tShift.push(n),this.sCount.push(r),this.bsCount.push(0),o=!1,n=0,r=0,e=t+1)}this.bMarks.push(i.length),this.eMarks.push(i.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}push(e,t,n){let r=new Sc(e,t,n);return r.block=!0,n<0&&this.level--,r.level=this.level,n>0&&this.level++,this.tokens.push(r),r}isEmpty(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]}skipEmptyLines(e){for(let t=this.lineMax;e<t&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e}skipSpaces(e){for(let t=this.src.length;e<t&&oc(this.src.charCodeAt(e));e++);return e}skipSpacesBack(e,t){if(e<=t)return e;for(;e>t;)if(!oc(this.src.charCodeAt(--e)))return e+1;return e}skipChars(e,t){for(let n=this.src.length;e<n&&this.src.charCodeAt(e)===t;e++);return e}skipCharsBack(e,t,n){if(e<=n)return e;for(;e>n;)if(t!==this.src.charCodeAt(--e))return e+1;return e}getLines(e,t,n,r){if(e>=t)return``;let i=Array(t-e);for(let a=0,o=e;o<t;o++,a++){let e=0,s=this.bMarks[o],c=s,l;for(l=o+1<t||r?this.eMarks[o]+1:this.eMarks[o];c<l&&e<n;){let t=this.src.charCodeAt(c);if(oc(t))t===9?e+=4-(e+this.bsCount[o])%4:e++;else if(c-s<this.tShift[o])e++;else break;c++}e>n?i[a]=Array(e-n+1).join(` `)+this.src.slice(c,l):i[a]=this.src.slice(c,l)}return i.join(``)}},nl=65536;function rl(e,t){let n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function il(e){let t=[],n=e.length,r=0,i=e.charCodeAt(r),a=!1,o=0,s=``;for(;r<n;)i===124&&(a?(s+=e.substring(o,r-1),o=r):(t.push(s+e.substring(o,r)),s=``,o=r+1)),a=i===92,r++,i=e.charCodeAt(r);return t.push(s+e.substring(o)),t}function al(e,t,n,r){if(t+2>n)return!1;let i=t+1;if(e.sCount[i]<e.blkIndent||e.sCount[i]-e.blkIndent>=4)return!1;let a=e.bMarks[i]+e.tShift[i];if(a>=e.eMarks[i])return!1;let o=e.src.charCodeAt(a++);if(o!==124&&o!==45&&o!==58||a>=e.eMarks[i])return!1;let s=e.src.charCodeAt(a++);if(s!==124&&s!==45&&s!==58&&!oc(s)||o===45&&oc(s))return!1;for(;a<e.eMarks[i];){let t=e.src.charCodeAt(a);if(t!==124&&t!==45&&t!==58&&!oc(t))return!1;a++}let c=rl(e,t+1),l=c.split(`|`),u=[];for(let e=0;e<l.length;e++){let t=l[e].trim();if(!t){if(e===0||e===l.length-1)continue;return!1}if(!/^:?-+:?$/.test(t))return!1;t.charCodeAt(t.length-1)===58?u.push(t.charCodeAt(0)===58?`center`:`right`):t.charCodeAt(0)===58?u.push(`left`):u.push(``)}if(c=rl(e,t).trim(),c.indexOf(`|`)===-1||e.sCount[t]-e.blkIndent>=4)return!1;l=il(c),l.length&&l[0]===``&&l.shift(),l.length&&l[l.length-1]===``&&l.pop();let d=l.length;if(d===0||d!==u.length)return!1;if(r)return!0;let f=e.parentType;e.parentType=`table`;let p=e.md.block.ruler.getRules(`blockquote`),m=e.push(`table_open`,`table`,1),h=[t,0];m.map=h;let g=e.push(`thead_open`,`thead`,1);g.map=[t,t+1];let _=e.push(`tr_open`,`tr`,1);_.map=[t,t+1];for(let t=0;t<l.length;t++){let n=e.push(`th_open`,`th`,1);u[t]&&(n.attrs=[[`style`,`text-align:${u[t]}`]]);let r=e.push(`inline`,``,0);r.content=l[t].trim(),r.children=[],e.push(`th_close`,`th`,-1)}e.push(`tr_close`,`tr`,-1),e.push(`thead_close`,`thead`,-1);let v,y=0;for(i=t+2;i<n&&!(e.sCount[i]<e.blkIndent);i++){let r=!1;for(let t=0,a=p.length;t<a;t++)if(p[t](e,i,n,!0)){r=!0;break}if(r||(c=rl(e,i).trim(),!c)||e.sCount[i]-e.blkIndent>=4||(l=il(c),l.length&&l[0]===``&&l.shift(),l.length&&l[l.length-1]===``&&l.pop(),y+=d-l.length,y>nl))break;if(i===t+2){let n=e.push(`tbody_open`,`tbody`,1);n.map=v=[t+2,0]}let a=e.push(`tr_open`,`tr`,1);a.map=[i,i+1];for(let t=0;t<d;t++){let n=e.push(`td_open`,`td`,1);u[t]&&(n.attrs=[[`style`,`text-align:${u[t]}`]]);let r=e.push(`inline`,``,0);r.content=l[t]?l[t].trim():``,r.children=[],e.push(`td_close`,`td`,-1)}e.push(`tr_close`,`tr`,-1)}return v&&(e.push(`tbody_close`,`tbody`,-1),v[1]=i),e.push(`table_close`,`table`,-1),h[1]=i,e.parentType=f,e.line=i,!0}function ol(e,t,n){if(e.sCount[t]-e.blkIndent<4)return!1;let r=t+1,i=r;for(;r<n;){if(e.isEmpty(r)){r++;continue}if(e.sCount[r]-e.blkIndent>=4){r++,i=r;continue}break}e.line=i;let a=e.push(`code_block`,`code`,0);return a.content=e.getLines(t,i,4+e.blkIndent,!1)+`
22
+ `,a.map=[t,e.line],!0}function sl(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||i+3>a)return!1;let o=e.src.charCodeAt(i);if(o!==126&&o!==96)return!1;let s=i;i=e.skipChars(i,o);let c=i-s;if(c<3)return!1;let l=e.src.slice(s,i),u=e.src.slice(i,a);if(o===96&&u.indexOf(String.fromCharCode(o))>=0)return!1;if(r)return!0;let d=t,f=!1;for(;d++,!(d>=n||(i=s=e.bMarks[d]+e.tShift[d],a=e.eMarks[d],i<a&&e.sCount[d]<e.blkIndent));)if(e.src.charCodeAt(i)===o&&!(e.sCount[d]-e.blkIndent>=4)&&(i=e.skipChars(i,o),!(i-s<c)&&(i=e.skipSpaces(i),!(i<a)))){f=!0;break}c=e.sCount[t],e.line=d+ +!!f;let p=e.push(`fence`,`code`,0);return p.info=u,p.content=e.getLines(t+1,d,c,!0),p.markup=l,p.map=[t,e.line],!0}function cl(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t],o=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(i)!==62)return!1;if(r)return!0;let s=[],c=[],l=[],u=[],d=e.md.block.ruler.getRules(`blockquote`),f=e.parentType;e.parentType=`blockquote`;let p=!1,m;for(m=t;m<n;m++){let t=e.sCount[m]<e.blkIndent;if(i=e.bMarks[m]+e.tShift[m],a=e.eMarks[m],i>=a)break;if(e.src.charCodeAt(i++)===62&&!t){let t=e.sCount[m]+1,n,r;e.src.charCodeAt(i)===32?(i++,t++,r=!1,n=!0):e.src.charCodeAt(i)===9?(n=!0,(e.bsCount[m]+t)%4==3?(i++,t++,r=!1):r=!0):n=!1;let o=t;for(s.push(e.bMarks[m]),e.bMarks[m]=i;i<a;){let t=e.src.charCodeAt(i);if(oc(t))t===9?o+=4-(o+e.bsCount[m]+ +!!r)%4:o++;else break;i++}p=i>=a,c.push(e.bsCount[m]),e.bsCount[m]=e.sCount[m]+1+ +!!n,l.push(e.sCount[m]),e.sCount[m]=o-t,u.push(e.tShift[m]),e.tShift[m]=i-e.bMarks[m];continue}if(p)break;let r=!1;for(let t=0,i=d.length;t<i;t++)if(d[t](e,m,n,!0)){r=!0;break}if(r){e.lineMax=m,e.blkIndent!==0&&(s.push(e.bMarks[m]),c.push(e.bsCount[m]),u.push(e.tShift[m]),l.push(e.sCount[m]),e.sCount[m]-=e.blkIndent);break}s.push(e.bMarks[m]),c.push(e.bsCount[m]),u.push(e.tShift[m]),l.push(e.sCount[m]),e.sCount[m]=-1}let h=e.blkIndent;e.blkIndent=0;let g=e.push(`blockquote_open`,`blockquote`,1);g.markup=`>`;let _=[t,0];g.map=_,e.md.block.tokenize(e,t,m);let v=e.push(`blockquote_close`,`blockquote`,-1);v.markup=`>`,e.lineMax=o,e.parentType=f,_[1]=e.line;for(let n=0;n<u.length;n++)e.bMarks[n+t]=s[n],e.tShift[n+t]=u[n],e.sCount[n+t]=l[n],e.bsCount[n+t]=c[n];return e.blkIndent=h,!0}function ll(e,t,n,r){let i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let a=e.bMarks[t]+e.tShift[t],o=e.src.charCodeAt(a++);if(o!==42&&o!==45&&o!==95)return!1;let s=1;for(;a<i;){let t=e.src.charCodeAt(a++);if(t!==o&&!oc(t))return!1;t===o&&s++}if(s<3)return!1;if(r)return!0;e.line=t+1;let c=e.push(`hr`,`hr`,0);return c.map=[t,e.line],c.markup=Array(s+1).join(String.fromCharCode(o)),!0}function ul(e,t){let n=e.eMarks[t],r=e.bMarks[t]+e.tShift[t],i=e.src.charCodeAt(r++);return i!==42&&i!==45&&i!==43||r<n&&!oc(e.src.charCodeAt(r))?-1:r}function dl(e,t){let n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t],i=n;if(i+1>=r)return-1;let a=e.src.charCodeAt(i++);if(a<48||a>57)return-1;for(;;){if(i>=r)return-1;if(a=e.src.charCodeAt(i++),a>=48&&a<=57){if(i-n>=10)return-1;continue}if(a===41||a===46)break;return-1}return i<r&&(a=e.src.charCodeAt(i),!oc(a))?-1:i}function fl(e,t){let n=e.level+2;for(let r=t+2,i=e.tokens.length-2;r<i;r++)e.tokens[r].level===n&&e.tokens[r].type===`paragraph_open`&&(e.tokens[r+2].hidden=!0,e.tokens[r].hidden=!0,r+=2)}function pl(e,t,n,r){let i,a,o,s,c=t,l=!0;if(e.sCount[c]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[c]-e.listIndent>=4&&e.sCount[c]<e.blkIndent)return!1;let u=!1;r&&e.parentType===`paragraph`&&e.sCount[c]>=e.blkIndent&&(u=!0);let d,f,p;if((p=dl(e,c))>=0){if(d=!0,o=e.bMarks[c]+e.tShift[c],f=Number(e.src.slice(o,p-1)),u&&f!==1)return!1}else if((p=ul(e,c))>=0)d=!1;else return!1;if(u&&e.skipSpaces(p)>=e.eMarks[c])return!1;if(r)return!0;let m=e.src.charCodeAt(p-1),h=e.tokens.length;d?(s=e.push(`ordered_list_open`,`ol`,1),f!==1&&(s.attrs=[[`start`,f]])):s=e.push(`bullet_list_open`,`ul`,1);let g=[c,0];s.map=g,s.markup=String.fromCharCode(m);let _=!1,v=e.md.block.ruler.getRules(`list`),y=e.parentType;for(e.parentType=`list`;c<n;){a=p,i=e.eMarks[c];let t=e.sCount[c]+p-(e.bMarks[c]+e.tShift[c]),r=t;for(;a<i;){let t=e.src.charCodeAt(a);if(t===9)r+=4-(r+e.bsCount[c])%4;else if(t===32)r++;else break;a++}let u=a,f;f=u>=i?1:r-t,f>4&&(f=1);let h=t+f;s=e.push(`list_item_open`,`li`,1),s.markup=String.fromCharCode(m);let g=[c,0];s.map=g,d&&(s.info=e.src.slice(o,p-1));let y=e.tight,b=e.tShift[c],x=e.sCount[c],S=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=h,e.tight=!0,e.tShift[c]=u-e.bMarks[c],e.sCount[c]=r,u>=i&&e.isEmpty(c+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,c,n),(!e.tight||_)&&(l=!1),_=e.line-c>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=S,e.tShift[c]=b,e.sCount[c]=x,e.tight=y,s=e.push(`list_item_close`,`li`,-1),s.markup=String.fromCharCode(m),c=e.line,g[1]=c,c>=n||e.sCount[c]<e.blkIndent||e.sCount[c]-e.blkIndent>=4)break;let C=!1;for(let t=0,r=v.length;t<r;t++)if(v[t](e,c,n,!0)){C=!0;break}if(C)break;if(d){if(p=dl(e,c),p<0)break;o=e.bMarks[c]+e.tShift[c]}else if(p=ul(e,c),p<0)break;if(m!==e.src.charCodeAt(p-1))break}return s=d?e.push(`ordered_list_close`,`ol`,-1):e.push(`bullet_list_close`,`ul`,-1),s.markup=String.fromCharCode(m),g[1]=c,e.line=c,e.parentType=y,l&&fl(e,h),!0}function ml(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t],o=t+1;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(i)!==91)return!1;function s(t){let n=e.lineMax;if(t>=n||e.isEmpty(t))return null;let r=!1;if(e.sCount[t]-e.blkIndent>3&&(r=!0),e.sCount[t]<0&&(r=!0),!r){let r=e.md.block.ruler.getRules(`reference`),i=e.parentType;e.parentType=`reference`;let a=!1;for(let i=0,o=r.length;i<o;i++)if(r[i](e,t,n,!0)){a=!0;break}if(e.parentType=i,a)return null}let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];return e.src.slice(i,a+1)}let c=e.src.slice(i,a+1);a=c.length;let l=-1;for(i=1;i<a;i++){let e=c.charCodeAt(i);if(e===91)return!1;if(e===93){l=i;break}if(e===10){let e=s(o);e!==null&&(c+=e,a=c.length,o++)}else if(e===92&&(i++,i<a&&c.charCodeAt(i)===10)){let e=s(o);e!==null&&(c+=e,a=c.length,o++)}}if(l<0||c.charCodeAt(l+1)!==58)return!1;for(i=l+2;i<a;i++){let e=c.charCodeAt(i);if(e===10){let e=s(o);e!==null&&(c+=e,a=c.length,o++)}else if(!oc(e))break}let u=e.md.helpers.parseLinkDestination(c,i,a);if(!u.ok)return!1;let d=e.md.normalizeLink(u.str);if(!e.md.validateLink(d))return!1;i=u.pos;let f=i,p=o,m=i;for(;i<a;i++){let e=c.charCodeAt(i);if(e===10){let e=s(o);e!==null&&(c+=e,a=c.length,o++)}else if(!oc(e))break}let h=e.md.helpers.parseLinkTitle(c,i,a);for(;h.can_continue;){let t=s(o);if(t===null)break;c+=t,i=a,a=c.length,o++,h=e.md.helpers.parseLinkTitle(c,i,a,h)}let g;for(i<a&&m!==i&&h.ok?(g=h.str,i=h.pos):(g=``,i=f,o=p);i<a&&oc(c.charCodeAt(i));)i++;if(i<a&&c.charCodeAt(i)!==10&&g)for(g=``,i=f,o=p;i<a&&oc(c.charCodeAt(i));)i++;if(i<a&&c.charCodeAt(i)!==10)return!1;let _=dc(c.slice(1,l));if(!_)return!1;if(r)return!0;e.env.references===void 0&&(e.env.references={}),e.env.references[_]===void 0&&(e.env.references[_]={title:g,href:d});let v=e.push(`reference_definition`,``,0);v.map=[t,o],v.hidden=!0;let y=Object.create(null);return y.label=_,v.meta=y,e.line=o,!0}var hl=`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(`.`),gl=`<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^"'=<>\`\\x00-\\x20]+|'[^']*'|"[^"]*"))?)*\\s*\\/?>`,_l=`<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>`,vl=RegExp(`^(?:${gl}|${_l}|<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->|<[?][\\s\\S]*?[?]>|<![A-Za-z][^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)`),yl=RegExp(`^(?:${gl}|${_l})`),bl=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Za-z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[RegExp(`^</?(${hl.join(`|`)})(?=(\\s|/?>|$))`,`i`),/^$/,!0],[RegExp(`${yl.source}\\s*$`),/^$/,!1]];function xl(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(i)!==60)return!1;let o=e.src.slice(i,a),s=0;for(;s<bl.length&&!bl[s][0].test(o);s++);if(s===bl.length)return!1;if(r)return bl[s][2];let c=t+1,l=bl[s][1].test(``);if(!bl[s][1].test(o)){for(;c<n&&!(e.sCount[c]<e.blkIndent&&(l||!e.isEmpty(c)));c++)if(i=e.bMarks[c]+e.tShift[c],a=e.eMarks[c],o=e.src.slice(i,a),bl[s][1].test(o)){o.length!==0&&c++;break}}e.line=c;let u=e.push(`html_block`,``,0);return u.map=[t,c],u.content=e.getLines(t,c,e.blkIndent,!0),!0}function Sl(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let o=e.src.charCodeAt(i);if(o!==35||i>=a)return!1;let s=1;for(o=e.src.charCodeAt(++i);o===35&&i<a&&s<=6;)s++,o=e.src.charCodeAt(++i);if(s>6||i<a&&!oc(o))return!1;if(r)return!0;a=e.skipSpacesBack(a,i);let c=e.skipCharsBack(a,35,i);c>i&&oc(e.src.charCodeAt(c-1))&&(a=c),e.line=t+1;let l=e.push(`heading_open`,`h${s}`,1);l.markup=`########`.slice(0,s),l.map=[t,e.line];let u=e.push(`inline`,``,0);u.content=pc(e.src.slice(i,a)),u.map=[t,e.line],u.children=[];let d=e.push(`heading_close`,`h${s}`,-1);return d.markup=`########`.slice(0,s),!0}function Cl(e,t,n){let r=e.md.block.ruler.getRules(`paragraph`);if(e.sCount[t]-e.blkIndent>=4)return!1;let i=e.parentType;e.parentType=`paragraph`;let a=0,o,s=t+1;for(;s<n&&!e.isEmpty(s);s++){if(e.sCount[s]-e.blkIndent>3)continue;if(e.sCount[s]>=e.blkIndent){let t=e.bMarks[s]+e.tShift[s],n=e.eMarks[s];if(t<n&&(o=e.src.charCodeAt(t),(o===45||o===61)&&(t=e.skipChars(t,o),t=e.skipSpaces(t),t>=n))){a=o===61?1:2;break}}if(e.sCount[s]<0)continue;let t=!1;for(let i=0,a=r.length;i<a;i++)if(r[i](e,s,n,!0)){t=!0;break}if(t)break}if(!a)return e.parentType=i,!1;let c=pc(e.getLines(t,s,e.blkIndent,!1));e.line=s+1;let l=e.push(`heading_open`,`h${a}`,1);l.markup=String.fromCharCode(o),l.map=[t,e.line];let u=e.push(`inline`,``,0);u.content=c,u.map=[t,e.line-1],u.children=[];let d=e.push(`heading_close`,`h${a}`,-1);return d.markup=String.fromCharCode(o),e.parentType=i,!0}function wl(e,t,n){let r=e.md.block.ruler.getRules(`paragraph`),i=e.parentType,a=t+1;for(e.parentType=`paragraph`;a<n&&!e.isEmpty(a);a++){if(e.sCount[a]-e.blkIndent>3||e.sCount[a]<0)continue;let t=!1;for(let i=0,o=r.length;i<o;i++)if(r[i](e,a,n,!0)){t=!0;break}if(t)break}let o=pc(e.getLines(t,a,e.blkIndent,!1));e.line=a;let s=e.push(`paragraph_open`,`p`,1);s.map=[t,e.line];let c=e.push(`inline`,``,0);return c.content=o,c.map=[t,e.line],c.children=[],e.push(`paragraph_close`,`p`,-1),e.parentType=i,!0}var Tl=[[`table`,al,[`paragraph`,`reference`]],[`code`,ol],[`fence`,sl,[`paragraph`,`reference`,`blockquote`,`list`]],[`blockquote`,cl,[`paragraph`,`reference`,`blockquote`,`list`]],[`hr`,ll,[`paragraph`,`reference`,`blockquote`,`list`]],[`list`,pl,[`paragraph`,`reference`,`blockquote`]],[`reference`,ml],[`html_block`,xl,[`paragraph`,`reference`,`blockquote`]],[`heading`,Sl,[`paragraph`,`reference`,`blockquote`]],[`lheading`,Cl],[`paragraph`,wl]],El=class{constructor(){J(this,`ruler`,new Cc),J(this,`State`,tl);for(let e=0;e<Tl.length;e++)this.ruler.push(Tl[e][0],Tl[e][1],{alt:(Tl[e][2]||[]).slice()})}tokenize(e,t,n){let r=this.ruler.getRules(``),i=r.length,a=e.md.options.maxNesting,o=t,s=!1;for(;o<n&&(e.line=o=e.skipEmptyLines(o),!(o>=n||e.sCount[o]<e.blkIndent));){if(e.level>=a){e.line=n;break}let t=e.line,c=!1;for(let a=0;a<i;a++)if(c=r[a](e,o,n,!1),c){if(t>=e.line)throw Error(`block rule didn't increment state.line`);break}if(!c)throw Error(`none of the block rules matched`);e.tight=!s,e.isEmpty(e.line-1)&&(s=!0),o=e.line,o<n&&e.isEmpty(o)&&(s=!0,o++,e.line=o)}}parse(e,t,n,r){if(!e)return;let i=new this.State(e,t,n,r);this.tokenize(i,i.line,i.lineMax)}},Dl=class{constructor(e,t,n,r){J(this,`pos`,0),J(this,`level`,0),J(this,`pending`,``),J(this,`pendingLevel`,0),J(this,`cache`,{}),J(this,`backticks`,{}),J(this,`backticksScanned`,!1),J(this,`linkLevel`,0),J(this,`delimiters`,[]),J(this,`_prev_delimiters`,[]),J(this,`Token`,Sc),this.src=e,this.env=n,this.md=t,this.tokens=r,this.tokens_meta=Array(r.length),this.posMax=this.src.length}pushPending(){let e=new Sc(`text`,``,0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending=``,e}push(e,t,n){this.pending&&this.pushPending();let r=new Sc(e,t,n),i;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),r.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],i={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(i),r}scanDelims(e,t){let n=this.posMax,r=this.src.charCodeAt(e),i;if(e===0)i=32;else if(e===1)i=this.src.charCodeAt(0),(i&63488)==55296&&(i=65533);else if(i=this.src.charCodeAt(e-1),(i&64512)==56320){let t=this.src.charCodeAt(e-2);i=(t&64512)==55296?65536+(t-55296<<10)+(i-56320):65533}else(i&64512)==55296&&(i=65533);let a=e;for(;a<n&&this.src.charCodeAt(a)===r;)a++;let o=a-e,s=a<n?this.src.charCodeAt(a):32;if((s&64512)==55296){let e=this.src.charCodeAt(a+1);s=(e&64512)==56320?65536+(s-55296<<10)+(e-56320):65533}else(s&64512)==56320&&(s=65533);let c=uc(i)||lc(i),l=uc(s)||lc(s),u=sc(i),d=sc(s),f=!d&&(!l||u||c),p=!u&&(!c||d||l);return{can_open:f&&(t||!p||c),can_close:p&&(t||!f||l),length:o}}};function Ol(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function kl(e,t){let n=e.pos;for(;n<e.posMax&&!Ol(e.src.charCodeAt(n));)n++;return n!==e.pos&&(t||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}var Al=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function jl(e,t){if(!e.md.options.linkify||e.linkLevel>0)return!1;let n=e.pos,r=e.posMax;if(n+3>r||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;let i=e.pending.match(Al);if(!i)return!1;let a=i[1],o=e.md.linkify.matchAtStart(e.src.slice(n-a.length));if(!o)return!1;let s=o.url;if(s.length<=a.length)return!1;let c=s.length;for(;c>0&&s.charCodeAt(c-1)===42;)c--;c!==s.length&&(s=s.slice(0,c));let l=e.md.normalizeLink(s);if(!e.md.validateLink(l))return!1;if(!t){e.pending=e.pending.slice(0,-a.length);let t=e.push(`link_open`,`a`,1);t.attrs=[[`href`,l]],t.markup=`linkify`,t.info=`auto`;let n=e.push(`text`,``,0);n.content=e.md.normalizeLinkText(s);let r=e.push(`link_close`,`a`,-1);r.markup=`linkify`,r.info=`auto`}return e.pos+=s.length-a.length,!0}function Ml(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;let r=e.pending.length-1,i=e.posMax;if(!t){if(r>=0&&e.pending.charCodeAt(r)===32){if(r>=1&&e.pending.charCodeAt(r-1)===32){let t=r-1;for(;t>=1&&e.pending.charCodeAt(t-1)===32;)t--;e.pending=e.pending.slice(0,t),e.push(`hardbreak`,`br`,0)}else e.pending=e.pending.slice(0,-1),e.push(`softbreak`,`br`,0)}else e.push(`softbreak`,`br`,0)}for(n++;n<i&&oc(e.src.charCodeAt(n));)n++;return e.pos=n,!0}var Nl=[];for(let e=0;e<256;e++)Nl.push(0);`\\!"#$%&'()*+,./:;<=>?@[]^_\`{|}~-`.split(``).forEach(function(e){Nl[e.charCodeAt(0)]=1});function Pl(e,t){let n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==92||(n++,n>=r))return!1;let i=e.src.charCodeAt(n);if(i===10){for(t||e.push(`hardbreak`,`br`,0),n++;n<r&&(i=e.src.charCodeAt(n),oc(i));)n++;return e.pos=n,!0}if(i===32){if(!t){let t=e.push(`text_special`,``,0);t.content=`\\`,t.markup=`\\`,t.info=`escape`}return e.pos=n,!0}let a=e.src[n];if(i>=55296&&i<=56319&&n+1<r){let t=e.src.charCodeAt(n+1);t>=56320&&t<=57343&&(a+=e.src[n+1],n++)}let o=`\\`+a;if(!t){let t=e.push(`text_special`,``,0);t.content=i<256&&Nl[i]!==0?a:o,t.markup=o,t.info=`escape`}return e.pos=n+1,!0}function Fl(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==96)return!1;let r=n;n++;let i=e.posMax;for(;n<i&&e.src.charCodeAt(n)===96;)n++;let a=e.src.slice(r,n),o=a.length;if(e.backticksScanned&&(e.backticks[o]||0)<=r)return t||(e.pending+=a),e.pos+=o,!0;let s=n,c;for(;(c=e.src.indexOf("`",s))!==-1;){for(s=c+1;s<i&&e.src.charCodeAt(s)===96;)s++;let r=s-c;if(r===o){if(!t){let t=e.push(`code_inline`,`code`,0);t.markup=a,t.content=e.src.slice(n,c).replace(/\n/g,` `).replace(/^ (.+) $/,`$1`)}return e.pos=s,!0}e.backticks[r]=c}return e.backticksScanned=!0,t||(e.pending+=a),e.pos+=o,!0}function Y(e,t){let n=e.pos,r=e.src.charCodeAt(n);if(t||r!==126)return!1;let i=e.scanDelims(e.pos,!0),a=i.length,o=String.fromCharCode(r);if(a<2)return!1;let s;a%2&&(s=e.push(`text`,``,0),s.content=o,a--);for(let t=0;t<a;t+=2)s=e.push(`text`,``,0),s.content=o+o,e.delimiters.push({marker:r,length:0,token:e.tokens.length-1,end:-1,open:i.can_open,close:i.can_close});return e.pos+=i.length,!0}function Il(e,t){let n,r=[],i=t.length;for(let a=0;a<i;a++){let i=t[a];if(i.marker!==126||i.end===-1)continue;let o=t[i.end];n=e.tokens[i.token],n.type=`s_open`,n.tag=`s`,n.nesting=1,n.markup=`~~`,n.content=``,n=e.tokens[o.token],n.type=`s_close`,n.tag=`s`,n.nesting=-1,n.markup=`~~`,n.content=``,e.tokens[o.token-1].type===`text`&&e.tokens[o.token-1].content===`~`&&r.push(o.token-1)}for(;r.length;){let t=r.pop(),i=t+1;for(;i<e.tokens.length&&e.tokens[i].type===`s_close`;)i++;i--,t!==i&&(n=e.tokens[i],e.tokens[i]=e.tokens[t],e.tokens[t]=n)}}function X(e){let t=e.tokens_meta,n=e.tokens_meta.length;Il(e,e.delimiters);for(let r=0;r<n;r++){let n=t[r]?.delimiters;n&&Il(e,n)}}var Z={tokenize:Y,postProcess:X};function Ll(e,t){let n=e.pos,r=e.src.charCodeAt(n);if(t||r!==95&&r!==42)return!1;let i=e.scanDelims(e.pos,r===42);for(let t=0;t<i.length;t++){let t=e.push(`text`,``,0);t.content=String.fromCharCode(r),e.delimiters.push({marker:r,length:i.length,token:e.tokens.length-1,end:-1,open:i.can_open,close:i.can_close})}return e.pos+=i.length,!0}function Rl(e,t){let n=t.length;for(let r=n-1;r>=0;r--){let n=t[r];if(n.marker!==95&&n.marker!==42||n.end===-1)continue;let i=t[n.end],a=r>0&&t[r-1].end===n.end+1&&t[r-1].marker===n.marker&&t[r-1].token===n.token-1&&t[n.end+1].token===i.token+1,o=String.fromCharCode(n.marker),s=e.tokens[n.token];s.type=a?`strong_open`:`em_open`,s.tag=a?`strong`:`em`,s.nesting=1,s.markup=a?o+o:o,s.content=``;let c=e.tokens[i.token];c.type=a?`strong_close`:`em_close`,c.tag=a?`strong`:`em`,c.nesting=-1,c.markup=a?o+o:o,c.content=``,a&&(e.tokens[t[r-1].token].content=``,e.tokens[t[n.end+1].token].content=``,r--)}}function zl(e){let t=e.tokens_meta,n=e.tokens_meta.length;Rl(e,e.delimiters);for(let r=0;r<n;r++){let n=t[r]?.delimiters;n&&Rl(e,n)}}var Bl={tokenize:Ll,postProcess:zl};function Vl(e,t){let n,r,i,a,o=``,s=``,c=e.pos,l=!0;if(e.src.charCodeAt(e.pos)!==91)return!1;let u=e.pos,d=e.posMax,f=e.pos+1,p=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(p<0)return!1;let m=p+1;if(m<d&&e.src.charCodeAt(m)===40){for(l=!1,m++;m<d&&(n=e.src.charCodeAt(m),!(!oc(n)&&n!==10));m++);if(m>=d)return!1;if(c=m,i=e.md.helpers.parseLinkDestination(e.src,m,e.posMax),i.ok){for(o=e.md.normalizeLink(i.str),e.md.validateLink(o)?m=i.pos:o=``,c=m;m<d&&(n=e.src.charCodeAt(m),!(!oc(n)&&n!==10));m++);if(i=e.md.helpers.parseLinkTitle(e.src,m,e.posMax),m<d&&c!==m&&i.ok)for(s=i.str,m=i.pos;m<d&&(n=e.src.charCodeAt(m),!(!oc(n)&&n!==10));m++);}(m>=d||e.src.charCodeAt(m)!==41)&&(l=!0),m++}if(l){if(e.env.references===void 0)return!1;if(m<d&&e.src.charCodeAt(m)===91?(c=m+1,m=e.md.helpers.parseLinkLabel(e,m),m>=0?r=e.src.slice(c,m++):m=p+1):m=p+1,r||=e.src.slice(f,p),r=dc(r),a=e.env.references[r],!a)return e.pos=u,!1;o=a.href,s=a.title}if(!t){e.pos=f,e.posMax=p;let t=e.push(`link_open`,`a`,1),n=[[`href`,o]];if(t.attrs=n,s&&n.push([`title`,s]),r){let e=Object.create(null);e.label=r,t.meta=e}e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push(`link_close`,`a`,-1)}return e.pos=m,e.posMax=d,!0}function Hl(e,t){let n,r,i,a,o,s,c,l,u=``,d=e.pos,f=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;let p=e.pos+2,m=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(m<0)return!1;if(a=m+1,a<f&&e.src.charCodeAt(a)===40){for(a++;a<f&&(n=e.src.charCodeAt(a),!(!oc(n)&&n!==10));a++);if(a>=f)return!1;for(l=a,s=e.md.helpers.parseLinkDestination(e.src,a,e.posMax),s.ok&&(u=e.md.normalizeLink(s.str),e.md.validateLink(u)?a=s.pos:u=``),l=a;a<f&&(n=e.src.charCodeAt(a),!(!oc(n)&&n!==10));a++);if(s=e.md.helpers.parseLinkTitle(e.src,a,e.posMax),a<f&&l!==a&&s.ok)for(c=s.str,a=s.pos;a<f&&(n=e.src.charCodeAt(a),!(!oc(n)&&n!==10));a++);else c=``;if(a>=f||e.src.charCodeAt(a)!==41)return e.pos=d,!1;a++}else{if(e.env.references===void 0)return!1;if(a<f&&e.src.charCodeAt(a)===91?(l=a+1,a=e.md.helpers.parseLinkLabel(e,a),a>=0?i=e.src.slice(l,a++):a=m+1):a=m+1,i||=e.src.slice(p,m),i=dc(i),o=e.env.references[i],!o)return e.pos=d,!1;u=o.href,c=o.title}if(!t){r=e.src.slice(p,m);let t=[];e.md.inline.parse(r,e.md,e.env,t);let n=e.push(`image`,`img`,0),a=[[`src`,u],[`alt`,``]];if(n.attrs=a,n.children=t,n.content=r,c&&a.push([`title`,c]),i){let e=Object.create(null);e.label=i,n.meta=e}}return e.pos=a,e.posMax=f,!0}var Ul=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,Wl=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function Gl(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;let r=e.pos,i=e.posMax;for(;;){if(++n>=i)return!1;let t=e.src.charCodeAt(n);if(t===60)return!1;if(t===62)break}let a=e.src.slice(r+1,n);if(Wl.test(a)){let n=e.md.normalizeLink(a);if(!e.md.validateLink(n))return!1;if(!t){let t=e.push(`link_open`,`a`,1);t.attrs=[[`href`,n]],t.markup=`autolink`,t.info=`auto`;let r=e.push(`text`,``,0);r.content=e.md.normalizeLinkText(a);let i=e.push(`link_close`,`a`,-1);i.markup=`autolink`,i.info=`auto`}return e.pos+=a.length+2,!0}if(Ul.test(a)){let n=e.md.normalizeLink(`mailto:${a}`);if(!e.md.validateLink(n))return!1;if(!t){let t=e.push(`link_open`,`a`,1);t.attrs=[[`href`,n]],t.markup=`autolink`,t.info=`auto`;let r=e.push(`text`,``,0);r.content=e.md.normalizeLinkText(a);let i=e.push(`link_close`,`a`,-1);i.markup=`autolink`,i.info=`auto`}return e.pos+=a.length+2,!0}return!1}function Kl(e){return/^<a[>\s]/i.test(e)}function ql(e){return/^<\/a\s*>/i.test(e)}function Jl(e){let t=e|32;return t>=97&&t<=122}function Yl(e,t){if(!e.md.options.html)return!1;let n=e.posMax,r=e.pos;if(e.src.charCodeAt(r)!==60||r+2>=n)return!1;let i=e.src.charCodeAt(r+1);if(i!==33&&i!==63&&i!==47&&!Jl(i))return!1;let a=e.src.slice(r).match(vl);if(!a)return!1;if(!t){let t=e.push(`html_inline`,``,0);t.content=a[0],Kl(t.content)&&e.linkLevel++,ql(t.content)&&e.linkLevel--}return e.pos+=a[0].length,!0}var Xl=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,Zl=/^&([a-z][a-z0-9]{1,31});/i;function Ql(e,t){let n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=r)return!1;if(e.src.charCodeAt(n+1)===35){let r=e.src.slice(n).match(Xl);if(r){if(!t){let t=r[1][0].toLowerCase()===`x`?parseInt(r[1].slice(1),16):parseInt(r[1],10),n=e.push(`text_special`,``,0);n.content=Gs(t)?Ks(t):Ks(65533),n.markup=r[0],n.info=`entity`}return e.pos+=r[0].length,!0}}else{let r=e.src.slice(n).match(Zl);if(r){let n=rs(r[0]);if(n!==r[0]){if(!t){let t=e.push(`text_special`,``,0);t.content=n,t.markup=r[0],t.info=`entity`}return e.pos+=r[0].length,!0}}}return!1}function $l(e){let t={},n=e.length;if(!n)return;let r=0,i=-2,a=[];for(let o=0;o<n;o++){let n=e[o];if(a.push(0),(e[r].marker!==n.marker||i!==n.token-1)&&(r=o),i=n.token,n.length=n.length||0,!n.close)continue;t.hasOwnProperty(n.marker)||(t[n.marker]=[-1,-1,-1,-1,-1,-1]);let s=t[n.marker][(n.open?3:0)+n.length%3],c=r-a[r]-1,l=c;for(;c>s;c-=a[c]+1){let t=e[c];if(t.marker===n.marker&&t.open&&t.end<0){let r=!1;if((t.close||n.open)&&(t.length+n.length)%3==0&&(t.length%3!=0||n.length%3!=0)&&(r=!0),!r){let r=c>0&&!e[c-1].open?a[c-1]+1:0;a[o]=o-c+r,a[c]=r,n.open=!1,t.end=o,t.close=!1,l=-1,i=-2;break}}}l!==-1&&(t[n.marker][(n.open?3:0)+(n.length||0)%3]=l)}}function eu(e){let t=e.tokens_meta,n=e.tokens_meta.length;$l(e.delimiters);for(let e=0;e<n;e++){let n=t[e]?.delimiters;n&&$l(n)}}function tu(e){let t,n,r=0,i=e.tokens,a=e.tokens.length;for(t=n=0;t<a;t++)i[t].nesting<0&&r--,i[t].level=r,i[t].nesting>0&&r++,i[t].type===`text`&&t+1<a&&i[t+1].type===`text`?i[t+1].content=i[t].content+i[t+1].content:(t!==n&&(i[n]=i[t]),n++);t!==n&&(i.length=n)}var nu=[[`text`,kl],[`linkify`,jl],[`newline`,Ml],[`escape`,Pl],[`backticks`,Fl],[`strikethrough`,Z.tokenize],[`emphasis`,Bl.tokenize],[`link`,Vl],[`image`,Hl],[`autolink`,Gl],[`html_inline`,Yl],[`entity`,Ql]],ru=[[`balance_pairs`,eu],[`strikethrough`,Z.postProcess],[`emphasis`,Bl.postProcess],[`fragments_join`,tu]],iu=class{constructor(){J(this,`ruler`,new Cc),J(this,`ruler2`,new Cc),J(this,`State`,Dl);for(let e=0;e<nu.length;e++)this.ruler.push(nu[e][0],nu[e][1]);for(let e=0;e<ru.length;e++)this.ruler2.push(ru[e][0],ru[e][1])}skipToken(e){let t=e.pos,n=this.ruler.getRules(``),r=n.length,i=e.md.options.maxNesting,a=e.cache;if(a[t]!==void 0){e.pos=a[t];return}let o=!1;if(e.level<i){for(let i=0;i<r;i++)if(e.level++,o=n[i](e,!0),e.level--,o){if(t>=e.pos)throw Error(`inline rule didn't increment state.pos`);break}}else e.pos=e.posMax;o||e.pos++,a[t]=e.pos}tokenize(e){let t=this.ruler.getRules(``),n=t.length,r=e.posMax,i=e.md.options.maxNesting;for(;e.pos<r;){let a=e.pos,o=!1;if(e.level<i){for(let r=0;r<n;r++)if(o=t[r](e,!1),o){if(a>=e.pos)throw Error(`inline rule didn't increment state.pos`);break}}if(o){if(e.pos>=r)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()}parse(e,t,n,r){let i=new this.State(e,t,n,r);this.tokenize(i);let a=this.ruler2.getRules(``),o=a.length;for(let e=0;e<o;e++)a[e](i)}},au={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:`language-`,linkify:!1,typographer:!1,quotes:`“”‘’`,highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},zero:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:`language-`,linkify:!1,typographer:!1,quotes:`“”‘’`,highlight:null,maxNesting:20},components:{core:{rules:[`normalize`,`block`,`strip_references`,`inline`,`text_join`]},block:{rules:[`paragraph`]},inline:{rules:[`text`],rules2:[`balance_pairs`,`fragments_join`]}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:`language-`,linkify:!1,typographer:!1,quotes:`“”‘’`,highlight:null,maxNesting:20},components:{core:{rules:[`normalize`,`block`,`strip_references`,`inline`,`text_join`]},block:{rules:[`blockquote`,`code`,`fence`,`heading`,`hr`,`html_block`,`lheading`,`list`,`reference`,`paragraph`]},inline:{rules:[`autolink`,`backticks`,`emphasis`,`entity`,`escape`,`html_inline`,`image`,`link`,`newline`,`text`],rules2:[`balance_pairs`,`emphasis`,`fragments_join`]}}}},ou=/^(vbscript|javascript|file|data):/,su=/^data:image\/(gif|png|jpeg|webp);/,cu=[`http:`,`https:`,`mailto:`],lu=class{validateLink(e){let t=e.trim().toLowerCase();return!ou.test(t)||su.test(t)}normalizeLink(e){let t=jo(e,!0);if(t.hostname&&(!t.protocol||cu.indexOf(t.protocol)>=0))try{t.hostname=zs.toASCII(t.hostname)}catch{}return vo(yo(t))}normalizeLinkText(e){let t=jo(e,!0);if(t.hostname&&(!t.protocol||cu.indexOf(t.protocol)>=0))try{t.hostname=zs.toUnicode(t.hostname)}catch{}return ho(yo(t),ho.defaultChars+`%`)}constructor(...e){J(this,`inline`,new iu),J(this,`block`,new El),J(this,`core`,new el),J(this,`renderer`,new Tc),J(this,`linkify`,new fs),J(this,`utils`,Hs),J(this,`helpers`,Object.assign({},vc));let[t,n]=e;typeof t==`string`?(this.configure(t),n&&this.set(n)):(this.configure(`default`),this.set(t||{}))}set(e){return Object.assign(this.options,e),this}configure(e){let t;if(typeof e==`string`){let n=e;if(t=au[n],!t)throw Error(`Wrong 'markdown-it' preset "${n}", check name`)}else t=e;if(!t)throw Error("Wrong `markdown-it` preset, can't be empty");t.options&&(this.options={...t.options});let n=t.components;if(n){[`core`,`block`,`inline`].forEach(e=>{let t=n[e]?.rules;t&&this[e].ruler.enableOnly(t)});let e=n.inline?.rules2;e&&this.inline.ruler2.enableOnly(e)}return this}enable(e,t=!1){let n=[];Array.isArray(e)||(e=[e]),[`core`,`block`,`inline`].forEach(t=>{n=n.concat(this[t].ruler.enable(e,!0))}),n=n.concat(this.inline.ruler2.enable(e,!0));let r=e.filter(e=>n.indexOf(e)<0);if(r.length&&!t)throw Error(`MarkdownIt. Failed to enable unknown rule(s): ${r}`);return this}disable(e,t=!1){let n=[];Array.isArray(e)||(e=[e]),[`core`,`block`,`inline`].forEach(t=>{n=n.concat(this[t].ruler.disable(e,!0))}),n=n.concat(this.inline.ruler2.disable(e,!0));let r=e.filter(e=>n.indexOf(e)<0);if(r.length&&!t)throw Error(`MarkdownIt. Failed to disable unknown rule(s): ${r}`);return this}use(e,...t){return e.apply(e,[this,...t]),this}parse(e,t){if(typeof e!=`string`)throw Error(`Input data should be a String`);let n=new this.core.State(e,this,t);return this.core.process(n),n.tokens}render(e,t={}){return this.renderer.render(this.parse(e,t),this.options,t)}parseInline(e,t){let n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens}renderInline(e,t={}){return this.renderer.render(this.parseInline(e,t),this.options,t)}};J(lu,`Token`,Sc),J(lu,`Ruler`,Cc),J(lu,`Renderer`,Tc),J(lu,`ParserCore`,el),J(lu,`StateCore`,Ec),J(lu,`ParserBlock`,El),J(lu,`StateBlock`,tl),J(lu,`ParserInline`,iu),J(lu,`StateInline`,Dl);var uu=new(Us(lu))({html:!1,linkify:!0,typographer:!1}),du=0;uu.core.ruler.push(`source_map`,e=>{for(let t of e.tokens)t.map&&t.block&&t.nesting>=0&&t.type!==`inline`&&(t.attrSet(`data-line`,String(t.map[0]+1+du)),t.attrSet(`data-line-end`,String(t.map[1]+1+du)))});var fu=e=>e.toLowerCase().replace(/<[^>]+>/g,``).replace(/[`*_~]/g,``).replace(/[^\p{L}\p{N}\s-]/gu,``).trim().replace(/\s+/g,`-`).slice(0,80)||`section`,pu=new Map;uu.renderer.rules.heading_open=(e,t,n,r,i)=>{let a=e[t+1],o=fu(a?.type===`inline`?a.content:``),s=pu.get(o)??0;return pu.set(o,s+1),s&&(o=`${o}-${s+1}`),e[t].attrSet(`id`,o),i.renderToken(e,t,n)};var mu=uu.renderer.rules.fence;uu.renderer.rules.fence=(e,t,n,r,i)=>{let a=e[t],o=a.map?` data-line="${a.map[0]+1+du}" data-line-end="${a.map[1]+1+du}"`:``;return a.info.trim()===`mermaid`?`<div class="mermaid"${o}>${uu.utils.escapeHtml(a.content)}</div>`:mu(e,t,n,r,i).replace(/^<pre/,`<pre${o}`)};var hu=new Map;function gu(e){let t=e.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n?/);return t?{meta:t[1].split(`
23
+ `).map(e=>{let t=e.indexOf(`:`);return t>0?[e.slice(0,t).trim(),e.slice(t+1).trim()]:null}).filter(e=>!!e&&!!e[0]),body:e.slice(t[0].length)}:{meta:null,body:e}}function _u(e){let t=hu.get(e);if(t)return t;let{meta:n,body:r}=gu(e),i=e.length-r.length?e.slice(0,e.length-r.length).split(`
24
+ `).length-1:0,a=n?`<div class="frontmatter" data-line="1" data-line-end="${i+1}"><table>${n.map(([e,t])=>`<tr><th>${uu.utils.escapeHtml(e)}</th><td>${uu.utils.escapeHtml(t)}</td></tr>`).join(``)}</table></div>`:``;du=i,pu=new Map;let o=a+uu.render(r).replace(/\[\[([^\]|]+)(?:\|([^\]]+))?\]\]/g,(e,t,n)=>`<a class="wikilink" href="#/docs/${encodeURIComponent(t)}">${n??t}</a>`).replace(/<li([^>]*)>\[( |x|X)\] /g,(e,t,n)=>`<li${t} class="task"><input type="checkbox" disabled${n.trim()?` checked`:``}> `);return hu.size>200&&hu.clear(),hu.set(e,o),o}var vu={theme:`base`,themeVariables:{primaryColor:`#FFFFFF`,primaryBorderColor:`#2B1D14`,primaryTextColor:`#2B1D14`,lineColor:`#9A7A60`,secondaryColor:`#FBE3D0`,tertiaryColor:`#EFE5D8`,fontFamily:`"Source Sans 3", system-ui, sans-serif`,fontSize:`13px`}};function yu(e){let t=[],n=e.newStart,r=!1;for(let i of e.lines)if(i.startsWith(`+`)){let e=t[t.length-1];e&&e[1]===n?e[1]=n+1:t.push([n,n+1]),n++,r=!1}else i.startsWith(`-`)?r||=(t.push([n,n+1]),!0):(n++,r=!1);return t}function bu(e,t){e.querySelectorAll(`[data-chg]`).forEach(e=>{e.removeAttribute(`data-chg`),e.removeAttribute(`data-hunk`),e.classList.remove(`chg-uncommitted`,`chg-commit`)});let n=[...e.querySelectorAll(`[data-line]`)];t.forEach((e,t)=>e.hunks.forEach((r,i)=>{let a=yu(r),o=n.filter(e=>{let t=+e.dataset.line,n=+e.dataset.lineEnd;return a.some(([e,r])=>t<r&&n>e)});for(let n of o)o.some(e=>e!==n&&n.contains(e))||n.dataset.chg!==`uncommitted`&&(n.dataset.chg=e.kind,n.dataset.hunk=`${t}:${i}`,n.classList.add(e.kind===`uncommitted`?`chg-uncommitted`:`chg-commit`))}))}function xu(e,t){if(t.length===0)return e;let n=document.createElement(`div`);return n.innerHTML=e,bu(n,t),n.innerHTML}var Su=(0,N.memo)(function({html:e,className:t,onOver:n,onLeave:r}){let i=(0,N.useRef)(null);return(0,N.useEffect)(()=>{let e=i.current;if(!e)return;let t=e.querySelectorAll(`.mermaid:not([data-processed])`);if(t.length===0)return;let n=!1;return si(async()=>{let{default:e}=await import(`./mermaid.core-CSBAT3ig.js`);return{default:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16])).then(async({default:e})=>{n||(e.initialize({startOnLoad:!1,...vu}),await e.run({nodes:t}))}),()=>{n=!0}},[e]),(0,z.jsx)(`div`,{ref:i,className:`md ${t}`,dangerouslySetInnerHTML:{__html:e},onMouseOver:n,onMouseLeave:r})});function Cu({source:e,changes:t=[],className:n=``}){let r=_u(e),[i,a]=(0,N.useState)(null),o=(0,N.useMemo)(()=>xu(r,t),[r,t]),s=(0,N.useRef)(t);s.current=t;let c=(0,N.useCallback)(e=>{let t=e.target.closest(`[data-hunk]`);if(!t){a(e=>e&&null);return}let[n,r]=t.dataset.hunk.split(`:`).map(Number),i=s.current[n],o=i?.hunks[r];if(!i||!o){a(null);return}let c=t.getBoundingClientRect();a({x:Math.min(c.left,window.innerWidth-560),y:c.bottom+6,change:i,hunk:o})},[]),l=(0,N.useCallback)(()=>a(null),[]);return(0,z.jsxs)(`div`,{className:`relative`,children:[(0,z.jsx)(Su,{html:o,className:n,onOver:c,onLeave:l}),i&&(0,z.jsxs)(`div`,{className:`fixed z-50 max-w-[540px] max-h-[50vh] overflow-auto bg-paper border border-sand rounded-kit shadow-panel text-[12px]`,style:{left:i.x,top:i.y},children:[(0,z.jsxs)(`div`,{className:`px-3 py-1.5 border-b border-sand font-mono flex gap-2 items-baseline ${i.change.kind===`uncommitted`?`text-amber`:`text-leaf`}`,children:[(0,z.jsx)(`b`,{children:i.change.kind===`uncommitted`?`uncommitted`:`last commit`}),(0,z.jsx)(`span`,{className:`text-ink3 truncate`,children:i.change.label}),(0,z.jsxs)(`span`,{className:`ml-auto text-tan`,children:[`@@ +`,i.hunk.newStart,`,`,i.hunk.newLines]})]}),(0,z.jsx)(`pre`,{className:`m-0 px-3 py-2 font-mono leading-[1.5] whitespace-pre-wrap`,children:i.hunk.lines.map((e,t)=>(0,z.jsx)(`div`,{className:e.startsWith(`+`)?`bg-moss-wash text-moss`:e.startsWith(`-`)?`bg-brick-wash text-brick line-through decoration-brick/40`:`text-umber`,children:e},t))})]})]})}function wu(e,t){let n=e.trim().replace(/^['"`<(]+|[>'"`)]+$/g,``),r,i=n.match(/:(\d+)$/);i&&(r=Number(i[1]),n=n.slice(0,-i[0].length)),n.startsWith(`[[`)&&n.endsWith(`]]`)&&(n=n.slice(2,-2).split(`|`)[0].trim()),n=n.replace(/\\/g,`/`);let a=n.toLowerCase().lastIndexOf(`/docs/`);a>=0&&(n=n.slice(a+1)),n.startsWith(`./`)&&(n=n.slice(2));let o=n.toLowerCase().startsWith(`docs/`)?n.slice(5):n,s=o.replace(/\.md$/i,``);if(!t.length)return/^[\w./-]+\.md$/i.test(o)?{file:o,line:r}:s&&!s.includes(` `)?{file:`${s}.md`,line:r}:null;let c=t.filter(e=>{let t=e.replace(/\.md$/i,``),n=e.split(`/`).pop()?.replace(/\.md$/i,``);return e===o||e===`${o}.md`||t===s||t.endsWith(`/${s}`)||e.endsWith(`/${o}`)||n===s});return c.length===1?{file:c[0],line:r}:c.includes(o)?{file:o,line:r}:c.includes(`${o}.md`)?{file:`${o}.md`,line:r}:null}var Tu=/\[\[([^\]|]+)(?:\|[^\]]+)?\]\](?::\d+)?|(?:(?:~\/|\.{1,2}\/)?(?:[\w.-]+\/)+)?[\w.-]+\.md(?::\d+)?/g;function Eu(e,t,n){return e==null||typeof e==`boolean`||typeof e==`number`?e:typeof e==`string`?Du(e,t,n):Array.isArray(e)?e.map((e,r)=>{let i=Eu(e,t,n);return(0,N.isValidElement)(i)&&i.key==null?(0,N.cloneElement)(i,{key:r}):i}):(0,N.isValidElement)(e)&&e.props.children!=null?(0,N.cloneElement)(e,void 0,Eu(e.props.children,t,n)):e}function Du(e,t,n){if(Tu.lastIndex=0,!Tu.test(e))return e;Tu.lastIndex=0;let r=[],i=0,a,o=0;for(;a=Tu.exec(e);){a.index>i&&r.push(e.slice(i,a.index));let s=a[0],c=wu(s,t);c?r.push((0,z.jsx)(`button`,{type:`button`,className:`md-ref`,title:`Open ${c.file}${c.line?`:${c.line}`:``}`,onClick:e=>{e.preventDefault(),e.stopPropagation(),n(c)},children:s},`md-${o++}`)):r.push(s),i=a.index+s.length}return i<e.length&&r.push(e.slice(i)),r.length===1?r[0]:r}var Ou=(0,N.createContext)({files:[],open:()=>{},linkify:e=>e}),ku=()=>(0,N.useContext)(Ou);function Au({children:e}){let{current:t}=Ba(),n=or(),[r,i]=(0,N.useState)(null),a=K(t?`/projects/${t}/docs`:null,3e4).data?.files??[],o=K(r?`/projects/${r.project}/docs/${encodeURIComponent(r.ref.file)}`:null),s=(e,n)=>{let r=n||t;r&&i({ref:e,project:r})};return(0,N.useEffect)(()=>{if(!r)return;let e=e=>{e.key===`Escape`&&(e.stopPropagation(),e.preventDefault(),i(null))};return window.addEventListener(`keydown`,e,!0),()=>window.removeEventListener(`keydown`,e,!0)},[r]),(0,N.useEffect)(()=>{if(!r||!o.data||!r.ref.line)return;let e=setTimeout(()=>document.getElementById(`L${r.ref.line}`)?.scrollIntoView({block:`center`}),80);return()=>clearTimeout(e)},[r,o.data]),(0,z.jsxs)(Ou.Provider,{value:{files:a,open:s,linkify:(e,n)=>Eu(e,a,e=>s(e,n||t))},children:[e,r&&(0,z.jsx)(`div`,{className:`fixed inset-0 z-[70] bg-walnut/40 flex items-start justify-center pt-[8vh] px-4`,onMouseDown:e=>{e.target===e.currentTarget&&i(null)},children:(0,z.jsxs)(`div`,{className:`w-[min(820px,94vw)] max-h-[84vh] bg-paper border border-sand rounded-kit shadow-panel grid grid-rows-[auto_1fr] overflow-hidden`,children:[(0,z.jsxs)(`div`,{className:`px-4 py-2.5 border-b border-sand flex items-center gap-2 min-w-0`,children:[(0,z.jsxs)(`span`,{className:`font-mono text-[12px] text-ink3 truncate`,title:o.data?.path??r.ref.file,children:[o.data?.path??`docs/${r.ref.file}`,r.ref.line?`:${r.ref.line}`:``]}),(0,z.jsxs)(`span`,{className:`ml-auto flex items-center gap-1.5 shrink-0`,children:[(0,z.jsx)(G,{size:`sm`,onClick:()=>{n(`/docs/${encodeURIComponent(r.ref.file)}${r.ref.line?`?view=source&line=${r.ref.line}`:``}`),i(null)},children:`Open in Docs`}),(0,z.jsx)(G,{size:`sm`,onClick:()=>i(null),children:`Close (Esc)`})]})]}),(0,z.jsxs)(`div`,{className:`overflow-auto px-6 py-4`,children:[o.loading&&(0,z.jsx)(`div`,{className:`text-[13px] text-umber`,children:`loading…`}),o.error&&(0,z.jsxs)(`div`,{className:`text-[13px] text-brick`,children:[`Could not load — not in `,r.project,`’s docs/? `,o.error]}),o.data&&(0,z.jsx)(Cu,{source:o.data.source})]})]})})]})}var ju=[`circle`,`square`,`diamond`,`hexagon`,`triangle`,`shield`,`leaf`,`pentagon`];function Mu(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}var Nu=e=>ju[Mu(e)%ju.length];function Pu(e,t){let n=t/2,r=t/2-1,i=(e,t=-Math.PI/2)=>Array.from({length:e},(i,a)=>{let o=t+a*2*Math.PI/e;return`${(n+r*Math.cos(o)).toFixed(2)},${(n+r*Math.sin(o)).toFixed(2)}`}).join(` `);switch(e){case`circle`:return(0,z.jsx)(`circle`,{cx:n,cy:n,r});case`square`:return(0,z.jsx)(`rect`,{x:1.5,y:1.5,width:t-3,height:t-3,rx:2});case`diamond`:return(0,z.jsx)(`polygon`,{points:i(4)});case`hexagon`:return(0,z.jsx)(`polygon`,{points:i(6,0)});case`triangle`:return(0,z.jsx)(`polygon`,{points:i(3)});case`pentagon`:return(0,z.jsx)(`polygon`,{points:i(5)});case`shield`:return(0,z.jsx)(`path`,{d:`M${n} 1.5 L${t-1.5} ${t*.3} V${t*.55} Q${t-1.5} ${t-2} ${n} ${t-1.5} Q1.5 ${t-2} 1.5 ${t*.55} V${t*.3} Z`});case`leaf`:return(0,z.jsx)(`path`,{d:`M${n} 1.5 Q${t-1.5} ${t*.35} ${t-2.5} ${t-2} Q${t*.35} ${t-1.5} 1.5 ${n} Q${t*.35} 1.5 ${n} 1.5 Z`})}}function Fu({id:e,role:t,size:n=18,state:r,active:i,className:a=``}){let o=od(t),s=Nu(e),c=r===`dead`?.35:r===`idle`?.7:1,l=e.replace(/[^a-z0-9]/gi,``).slice(0,1).toUpperCase();return(0,z.jsxs)(`span`,{className:`relative inline-flex shrink-0 ${a}`,style:{width:n,height:n},title:`${e}${t?` · ${t}`:``}`,children:[(0,z.jsxs)(`svg`,{width:n,height:n,viewBox:`0 0 ${n} ${n}`,style:{opacity:c},"aria-hidden":!0,children:[(0,z.jsx)(`g`,{fill:o,stroke:o,strokeWidth:`1`,children:Pu(s,n)}),(0,z.jsx)(`text`,{x:n/2,y:n/2+n*.22,textAnchor:`middle`,fontSize:n*.55,fontFamily:`JetBrains Mono, monospace`,fontWeight:`700`,fill:`#FCFAF6`,children:l})]}),i&&(0,z.jsx)(`span`,{className:`absolute -right-0.5 -bottom-0.5 w-2 h-2 rounded-full bg-moss ring-2 ring-paper`,children:(0,z.jsx)(`span`,{className:`absolute inset-0 rounded-full bg-moss animate-ping opacity-60`})})]})}var Iu=e=>/done|merged|deployed|complete|closed|✅/i.test(e);function Lu(e){return e?e.workstreams.rows.filter(e=>!(`malformed`in e)).map(e=>e.schema===`workstreams.v1`?{name:e.stream,owner:e.owner,status:e.status,note:e.lastNote??``}:{name:e.lane,owner:e.owner,status:e.state,note:e.currentSlice??``}).map(e=>({...e,done:Iu(e.status)})):[]}var Ru=e=>e.match(/^Task\s+(\d+)\b/i)?.[1]??null;function zu(e,t,n){if(!n)return null;let r=t.replace(/\./g,`\\.`),i=RegExp(`(^|\\b)(P${r}[-.\\s]?T${n}\\b|Phase\\s*${r}\\b.*\\bT(?:ask)?\\s*${n}\\b)`,`i`);return e.find(e=>i.test(e.name))??null}function Bu(e,t){let n=e.trim().toLowerCase();return t.find(e=>e.toLowerCase()===n)??t.find(e=>n.includes(e.toLowerCase()))??null}var Vu=/(`[^`\n]+`)|(\*\*[^*\n]+\*\*)|(~~[^~\n]+~~)|(\[\[([^\]|\n]+)(?:\|([^\]\n]+))?\]\])|(\[([^\]\n]+)\]\((https?:\/\/[^)\s]+)\))|(\bhttps?:\/\/[^\s<>()"']+[^\s<>()"'.,;:!?])|((?<![\w*])\*(?!\s)([^*\n]+?)(?<!\s)\*(?![\w*]))|((?<![\w_])_(?!\s)([^_\n]+?)(?<!\s)_(?![\w_]))/g;function Hu({text:e,className:t}){let n=[],r=0,i,a=0;for(Vu.lastIndex=0;i=Vu.exec(e);)i.index>r&&n.push(e.slice(r,i.index)),i[1]?n.push((0,z.jsx)(`code`,{className:`font-mono text-[.92em] px-1 rounded bg-linen text-walnut`,children:i[1].slice(1,-1)},a++)):i[2]?n.push((0,z.jsx)(`b`,{children:i[2].slice(2,-2)},a++)):i[3]?n.push((0,z.jsx)(`s`,{className:`text-tan`,children:i[3].slice(2,-2)},a++)):i[4]?n.push((0,z.jsx)(B,{to:`/docs/${encodeURIComponent(i[5])}`,onClick:e=>e.stopPropagation(),className:`text-ember-deep`,children:i[6]??i[5]},a++)):i[7]?n.push((0,z.jsx)(`a`,{href:i[9],target:`_blank`,rel:`noreferrer`,onClick:e=>e.stopPropagation(),className:`text-ember-deep`,children:i[8]},a++)):i[10]?n.push((0,z.jsxs)(`a`,{href:i[10],target:`_blank`,rel:`noreferrer`,onClick:e=>e.stopPropagation(),className:`text-ember-deep break-all`,children:[i[10].replace(/^https?:\/\//,``).slice(0,60),i[10].replace(/^https?:\/\//,``).length>60?`…`:``]},a++)):i[11]?n.push((0,z.jsx)(`i`,{children:i[12]},a++)):i[13]&&n.push((0,z.jsx)(`i`,{children:i[14]},a++)),r=i.index+i[0].length;return r<e.length&&n.push(e.slice(r)),t?(0,z.jsx)(`span`,{className:t,children:n}):(0,z.jsx)(z.Fragment,{children:n})}var Uu=({text:e})=>(0,z.jsx)(Hu,{text:e});function Q({stream:e,agents:t,size:n=`sm`}){if(!e)return null;let r=Bu(e.owner,t.map(e=>e.agentId));return(0,z.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 shrink-0`,title:`${e.name} · ${e.owner} · ${e.status}${e.note?` · ${e.note}`:``}`,children:[r?(0,z.jsx)(id,{id:r,bare:!0,size:n}):(0,z.jsxs)(`span`,{className:`inline-flex items-center gap-1 font-mono text-[11px] text-umber`,children:[(0,z.jsx)(Fu,{id:e.owner,size:14,state:`dead`}),e.owner]}),(0,z.jsx)(W,{tone:e.done?`ok`:/block/i.test(e.status)?`bad`:/queued|hold|wait/i.test(e.status)?`warn`:`neutral`,children:e.status.replace(/^[^\w]+/,``).slice(0,16)})]})}function Wu({project:e,phase:t,highlight:n,maxH:r=`46vh`,compact:i=!1}){let{data:a,error:o}=K(`/projects/${e}/phases/${t.id}/tasks`,15e3),s=K(`/projects/${e}/board`,15e3).data,c=K(`/bus/agents`,2e4).data??[],l=Lu(s),[u,d]=(0,N.useState)({}),f=K(`/admin/bus-writes`,1e4).data?.enabled??!1,[p,m]=(0,N.useState)({}),h=async(n,r)=>{m(e=>({...e,[n]:{to:r??`aide`,ts:Date.now()}}));try{let i=await Ia(`/actions/task/${e}/${t.id}/${n}`,{owner:r??void 0});if(i.status!==`ok`)throw Error(i.error??i.log?.slice(-1)[0]??`failed`);m(e=>({...e,[n]:{to:i.owner??r??`aide`,ts:Date.now()}}))}catch(e){m(t=>({...t,[n]:{err:e.message}}))}};return o?(0,z.jsx)(`div`,{className:`px-3 py-2 text-[13px] text-brick`,children:o}):a?a.sections.length===0?(0,z.jsxs)(`div`,{className:`px-3 py-3 text-[13px] text-umber`,children:[`No tasks yet — run `,(0,z.jsx)(`code`,{children:`/plan-phase`}),` (roadmap → Plan).`]}):(0,z.jsx)(`div`,{className:`grid gap-0 overflow-auto overscroll-contain min-w-0`,style:{maxHeight:r},children:a.sections.map(e=>{let r=e.tasks.filter(e=>e.done).length,o=r===e.tasks.length,s=zu(l,t.n,Ru(e.title)),m=!!n&&!!s&&Bu(s.owner,c.map(e=>e.agentId))===n,g=u[e.line]===void 0?o:!u[e.line];return(0,z.jsxs)(`div`,{className:`border-b border-sand last:border-b-0 min-w-0 ${m?`bg-ember/[.04]`:``}`,children:[(0,z.jsxs)(`div`,{className:`sticky top-0 z-[1] px-3 py-1.5 min-w-0 ${m?`bg-ember-wash`:`bg-cream`} ${i?`grid gap-0.5`:`flex items-center gap-2`}`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[(0,z.jsx)(`button`,{type:`button`,onClick:()=>d(t=>({...t,[e.line]:g})),className:`border-0 bg-transparent p-0 cursor-pointer font-mono text-[11px] text-tan w-3 shrink-0 hover:text-umber`,title:g?`expand`:`collapse`,"aria-expanded":!g,children:g?`▸`:`▾`}),m&&(0,z.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full bg-ember shrink-0`,title:`this agent's task`}),(0,z.jsx)(B,{to:`/docs/${encodeURIComponent(a.file)}?view=source&line=${e.line}`,className:`font-semibold text-[12px] hover:no-underline hover:text-ember-deep truncate ${o?`text-tan`:`text-umber`}`,children:e.title}),(0,z.jsxs)(`span`,{className:`font-mono text-[11px] shrink-0 ${o?`text-leaf`:`text-tan`}`,children:[r,`/`,e.tasks.length,o?` ✓`:``]}),!i&&(0,z.jsxs)(`span`,{className:`ml-auto flex items-center gap-2`,children:[(0,z.jsx)(Q,{stream:s,agents:c}),(0,z.jsx)(`span`,{className:`h-1 w-24 rounded-full bg-linen overflow-hidden`,children:(0,z.jsx)(`span`,{className:`block h-full ${o?`bg-leaf`:`bg-ember`}`,style:{width:`${e.tasks.length?r/e.tasks.length*100:0}%`}})})]})]}),i&&s&&(0,z.jsx)(`div`,{className:`flex items-center gap-2 min-w-0 pl-5`,children:(0,z.jsx)(Q,{stream:s,agents:c})})]}),!g&&e.tasks.map(e=>(0,z.jsxs)(`div`,{className:`group grid grid-cols-[var(--spacing-gutter)_minmax(0,1fr)_auto] items-start hover:bg-linen/60 border-t border-sand/60 min-w-0`,style:{paddingLeft:e.depth*12},children:[(0,z.jsx)(`span`,{className:`self-stretch flex items-start justify-center pt-1.5 font-mono text-[11px] border-r border-sand ${e.done?`text-leaf`:p[e.line]&&!(`err`in p[e.line])?`text-amber`:`text-tan`}`,title:p[e.line]&&!(`err`in p[e.line])?`asked ${p[e.line].to} to tick it`:void 0,children:e.done?`- [x]`:p[e.line]&&!(`err`in p[e.line])?`- [~]`:`- [ ]`}),(0,z.jsxs)(B,{to:`/docs/${encodeURIComponent(a.file)}?view=source&line=${e.line}`,className:`px-3 py-1.5 min-w-0 break-words hover:no-underline text-inherit ${i?`text-[12px] leading-snug`:`text-[13px]`} ${e.done?`text-tan line-through decoration-dust`:``}`,children:[(0,z.jsx)(Uu,{text:e.text}),p[e.line]&&`err`in p[e.line]&&(0,z.jsx)(`span`,{className:`ml-2 font-mono text-[10px] text-brick`,children:p[e.line].err})]}),(0,z.jsx)(`span`,{className:`pr-2 pt-1 shrink-0`,children:!e.done&&(p[e.line]&&!(`err`in p[e.line])?(0,z.jsxs)(`span`,{className:`font-mono text-[10px] text-amber whitespace-nowrap`,title:`the owner was asked to run /check-task; the tick appears when it does`,children:[`asked · `,p[e.line].to.split(`-`).slice(-1)[0]]}):(0,z.jsx)(`button`,{type:`button`,disabled:!f,onClick:()=>h(e.line,s?Bu(s.owner,c.map(e=>e.agentId)):null),className:`opacity-0 group-hover:opacity-100 focus:opacity-100 font-mono text-[10px] px-1.5 py-0.5 rounded border ${f?`border-dust text-umber bg-paper hover:text-leaf hover:border-leaf cursor-pointer`:`border-dashed border-dust text-tan cursor-not-allowed`}`,title:f?`ask ${s?s.owner:`the aide`} to run /check-task for this line`:`bus writes are off (header) — mark done DMs the owner`,children:`✓ done`}))})]},e.line))]},e.line)})}):(0,z.jsx)(`div`,{className:`px-3 py-2 font-mono text-[12px] text-tan`,children:`…`})}function Gu({project:e,phase:t,onClose:n}){let{data:r}=K(`/projects/${e}/phases/${t.id}/tasks`,15e3),i=r?.total?Math.round(r.done/r.total*100):0;return(0,z.jsxs)(`div`,{className:`mt-3 border border-sand rounded-kit bg-paper`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2 border-b border-sand`,children:[(0,z.jsx)(`b`,{className:`text-[13px]`,children:t.title}),(0,z.jsx)(W,{tone:r?.total&&r.done===r.total?`ok`:`neutral`,children:r?`${r.done}/${r.total} · ${i}%`:`…`}),(0,z.jsx)(`span`,{className:`font-mono text-[11px] text-ink3`,children:r?.file??`no tasks file`}),(0,z.jsxs)(`span`,{className:`ml-auto flex gap-1.5`,children:[r?.file&&(0,z.jsx)(B,{to:`/docs/${encodeURIComponent(r.file)}`,className:`hover:no-underline`,children:(0,z.jsx)(G,{size:`sm`,tone:`ghost`,children:`Open doc`})}),(0,z.jsx)(G,{size:`sm`,tone:`ghost`,onClick:n,children:`✕`})]})]}),(0,z.jsx)(Wu,{project:e,phase:t})]})}var Ku=`/api`,qu=/\[image: (\S+) · (\S+)\]/g,Ju=e=>`${Ku}/uploads/${encodeURIComponent(e.split(`/`).pop()??``)}`;function Yu(e){let t=e?.persistKey,[n,r]=(0,N.useState)(()=>{if(!t)return[];try{return JSON.parse(localStorage.getItem(t)??`[]`)}catch{return[]}}),i=(0,N.useCallback)(e=>r(n=>{let r=e(n);if(t)try{r.length?localStorage.setItem(t,JSON.stringify(r)):localStorage.removeItem(t)}catch{}return r}),[t]);(0,N.useEffect)(()=>{if(t)try{r(JSON.parse(localStorage.getItem(t)??`[]`))}catch{r([])}},[t]);let[a,o]=(0,N.useState)(0),[s,c]=(0,N.useState)(null),l=(0,N.useCallback)(async e=>{let t=e.filter(e=>e.type.startsWith(`image/`));if(t.length){o(e=>e+t.length),c(null);for(let e of t)try{let t=new FormData;t.append(`file`,e,e.name||`paste.png`);let n=await fetch(`${Ku}/uploads`,{method:`POST`,body:t}),r=await n.json();if(!n.ok)throw Error(r.error??`${n.status}`);i(e=>e.some(e=>e.name===r.name)?e:[...e,r])}catch(e){c(e.message)}finally{o(e=>e-1)}}},[]),u=(0,N.useCallback)(e=>{let t=Array.from(e.clipboardData?.files??[]);t.length&&(e.preventDefault(),l(t))},[l]),d=(0,N.useCallback)(e=>{let t=Array.from(e.dataTransfer?.files??[]);t.length&&(e.preventDefault(),l(t))},[l]),f=(0,N.useCallback)(e=>{e.dataTransfer?.types.includes(`Files`)&&e.preventDefault()},[]);return{items:n,busy:a>0,err:s,onPaste:u,onDrop:d,onDragOver:f,remove:e=>i(t=>t.filter(t=>t.name!==e)),clear:()=>i(()=>[]),withRefs:e=>n.length?`${e.trim()}${e.trim()?`
25
+ `:``}${n.map(e=>e.ref).join(`
26
+ `)}`:e,hasContent:e=>!!e.trim()||n.length>0}}function Xu({a:e}){return!e.items.length&&!e.busy&&!e.err?null:(0,z.jsxs)(`div`,{className:`flex items-center gap-1.5 flex-wrap`,children:[e.items.map(t=>(0,z.jsxs)(`span`,{className:`relative inline-flex items-center gap-1 border border-sand rounded-kit bg-cream/60 p-0.5`,title:`${t.path}\n${t.url}`,children:[(0,z.jsx)(`img`,{src:Ju(t.name),alt:t.name,className:`h-10 w-auto max-w-[120px] rounded object-cover`}),(0,z.jsxs)(`span`,{className:`font-mono text-[10px] text-ink3 pr-1`,children:[Math.round(t.bytes/1024),` KB`]}),(0,z.jsx)(`button`,{type:`button`,onClick:()=>e.remove(t.name),className:`absolute -top-1.5 -right-1.5 w-4 h-4 rounded-full bg-walnut text-paper text-[10px] leading-none border-0 cursor-pointer`,title:`remove`,children:`×`})]},t.name)),e.busy&&(0,z.jsx)(`span`,{className:`font-mono text-[11px] text-ink3`,children:`uploading…`}),e.err&&(0,z.jsx)(`span`,{className:`font-mono text-[11px] text-brick`,children:e.err})]})}function Zu({text:e}){let t=[],n=0,r,i=0;for(qu.lastIndex=0;r=qu.exec(e);){r.index>n&&t.push((0,z.jsx)(Hu,{text:e.slice(n,r.index)},`t${i++}`));let[,a,o]=r;t.push((0,z.jsx)(`a`,{href:Ju(o),target:`_blank`,rel:`noreferrer`,className:`inline-block align-top my-1 mr-1 border border-sand rounded-kit p-0.5 bg-cream/60 hover:no-underline`,title:a,children:(0,z.jsx)(`img`,{src:Ju(o),alt:a.split(`/`).pop(),className:`max-h-40 max-w-[280px] rounded object-contain`,loading:`lazy`})},i++)),n=r.index+r[0].length}return n<e.length&&t.push((0,z.jsx)(Hu,{text:e.slice(n)},`t${i++}`)),(0,z.jsx)(z.Fragment,{children:t})}var Qu=`/api`;function $u({agentId:e,onClose:t}){let{linkify:n}=ku(),[r,i]=(0,N.useState)(null),[a,o]=(0,N.useState)(null),[s,c]=(0,N.useState)(200),[l,u]=(0,N.useState)(!0),[d,f]=(0,N.useState)(!0),[p,m]=(0,N.useState)(()=>localStorage.getItem(`groundwork-console.pane.tasks`)!==`0`),h=e=>{m(e),localStorage.setItem(`groundwork-console.pane.tasks`,e?`1`:`0`)},{current:g,projects:_}=Ba(),v=K(`/admin/bus-writes`,1e4).data?.enabled??!1,y=(K(`/bus/agents`,3e4).data??[]).find(t=>t.agentId===e),b=y?.project&&_.some(e=>e.name===y.project||e.room===y.project)?_.find(e=>e.name===y.project||e.room===y.project).name:g,[x,S]=(0,N.useState)(``),[C,w]=(0,N.useState)(null),T=Yu(),E=async()=>{if(T.hasContent(x)){w(`sending`);try{let t=await Ia(`/actions/send`,{as:`david`,to:e,text:T.withRefs(x)});w(t.status===`ok`?`sent — lands in the pane via tmux-push`:t.error??t.log?.slice(-1)[0]??`failed`),t.status===`ok`&&(S(``),T.clear())}catch(e){w(e.message)}}},D=(0,N.useRef)(null);return(0,N.useEffect)(()=>{let t=!0,n=async()=>{try{let n=await fetch(`${Qu}/bus/agents/${encodeURIComponent(e)}/pane?lines=${s}${d?`&colors=1`:``}`),r=await n.json();if(!t)return;if(!n.ok){o(r.error??`${n.status}`);return}o(null),i(r)}catch(e){t&&o(e.message)}};n();let r=setInterval(n,3e3);return()=>{t=!1,clearInterval(r)}},[e,s,d]),(0,N.useEffect)(()=>{l&&D.current&&(D.current.scrollTop=D.current.scrollHeight)},[r,l]),(0,N.useEffect)(()=>{let e=document.body.style.overflow;return document.body.style.overflow=`hidden`,()=>{document.body.style.overflow=e}},[]),(0,N.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-[60] bg-walnut/30 flex justify-end`,onMouseDown:e=>{e.target===e.currentTarget&&t()},children:(0,z.jsxs)(`div`,{className:`${p?`w-[min(1340px,calc(100vw-16px))]`:`w-[min(920px,92vw)]`} h-full max-h-screen bg-paper border-l border-sand shadow-panel grid grid-rows-[auto_minmax(0,1fr)] whitespace-normal text-left transition-[width] duration-200`,style:{borderTop:`4px solid ${od(y?.role)}`},children:[(0,z.jsxs)(`div`,{className:`px-4 py-2.5 border-b border-sand flex items-center gap-2`,children:[(0,z.jsx)(Fu,{id:e,role:y?.role,size:22,state:y?.liveness,active:y?.active}),(0,z.jsx)(`span`,{className:`font-display font-bold text-[16px] text-umber`,children:e}),y?.role&&(0,z.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.06em]`,style:{color:od(y.role)},children:y.role}),r&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`span`,{className:`font-mono text-[12px] text-ink3`,children:[r.pane,` · `,r.command]}),r.active?(0,z.jsx)(W,{tone:`ok`,children:`active`}):(0,z.jsx)(W,{tone:`outline`,children:`quiet`}),(0,z.jsxs)(`span`,{className:`font-mono text-[11px] text-tan`,children:[r.lines,` lines · `,new Date(r.capturedAt).toLocaleTimeString()]})]}),(0,z.jsxs)(`span`,{className:`ml-auto flex items-center gap-1.5`,children:[(0,z.jsx)(`span`,{className:`inline-flex border border-dust rounded-kit overflow-hidden`,children:[[`colors`,d,()=>f(e=>!e)],[`tasks`,p,()=>h(!p)],[`follow`,l,()=>u(e=>!e)]].map(([e,t,n])=>(0,z.jsx)(`button`,{type:`button`,onClick:n,"aria-pressed":t,className:`px-2 py-[3px] text-[11px] font-mono border-0 cursor-pointer ${t?`bg-walnut text-paper`:`bg-paper text-umber`}`,children:e},e))}),(0,z.jsx)(`select`,{value:s,onChange:e=>c(Number(e.target.value)),className:`font-mono text-[11px] px-1.5 py-1 border border-dust rounded bg-paper text-umber`,children:[100,200,500,1e3,2e3].map(e=>(0,z.jsxs)(`option`,{value:e,children:[e,` lines`]},e))}),(0,z.jsx)(G,{size:`sm`,onClick:t,children:`Close (Esc)`})]})]}),(0,z.jsxs)(`div`,{className:`min-h-0 grid ${p?`grid-cols-[minmax(0,1fr)_minmax(300px,380px)]`:`grid-cols-1`}`,children:[(0,z.jsxs)(`div`,{className:`min-h-0 grid grid-rows-[minmax(0,1fr)_auto]`,children:[(0,z.jsx)(`pre`,{ref:D,onScroll:()=>{let e=D.current;if(!e)return;let t=e.scrollHeight-e.scrollTop-e.clientHeight<24;t!==l&&u(t)},className:`m-0 px-4 py-3 min-h-0 overflow-auto overscroll-contain font-mono text-[12px] leading-[1.45] whitespace-pre-wrap break-words pane-dark`,children:a?(0,z.jsx)(`span`,{className:`text-brick`,children:a}):r?n(d&&r.ansi?fo(r.ansi):r.text):`capturing…`}),(0,z.jsxs)(`div`,{className:`px-4 py-2 border-t border-sand grid gap-1.5`,children:[(0,z.jsxs)(`div`,{className:`grid grid-cols-[1fr_auto] gap-2 items-center`,children:[(0,z.jsx)(`input`,{value:x,onChange:e=>S(e.target.value),onKeyDown:e=>{e.key===`Enter`&&v&&E()},onPaste:T.onPaste,onDrop:T.onDrop,onDragOver:T.onDragOver,disabled:!v,placeholder:v?`DM ${e} as david — paste or drop an image, delivered by its tmux-push into this pane`:`DM needs bus writes on (header badge)`,className:`text-[13px] px-2.5 py-2 border border-dust rounded-kit bg-paper text-walnut`}),(0,z.jsx)(G,{size:`sm`,tone:`primary`,onClick:E,disabled:!v||!T.hasContent(x)||T.busy||C===`sending`,children:`Send DM`})]}),(0,z.jsx)(Xu,{a:T}),(0,z.jsxs)(`div`,{className:`font-mono text-[11px] text-tan`,children:[`read-only `,(0,z.jsx)(`code`,{children:`tmux capture-pane`}),` · 3 s refresh · the console never types into panes — the DM goes through the bus (a Run) and the agent's own pusher types it`,C&&C!==`sending`?(0,z.jsxs)(`span`,{className:/^sent/.test(C)?` text-leaf`:` text-brick`,children:[` · `,C]}):null]})]})]}),p&&(0,z.jsx)(ed,{project:b,agentId:e})]})]})})}function ed({project:e,agentId:t}){let n=K(e?`/projects/${e}/board`:null,15e3).data,r=K(`/bus/agents`,2e4).data??[],i=n?.phases.find(e=>e.state===`ongoing`)??n?.phases.find(e=>e.state===`planned`),a=Lu(n).filter(e=>!e.done&&Bu(e.owner,r.map(e=>e.agentId))===t);return(0,z.jsxs)(`aside`,{className:`min-h-0 min-w-0 overflow-hidden overscroll-contain border-l border-sand bg-cream/40 grid grid-rows-[auto_auto_minmax(0,1fr)]`,children:[(0,z.jsxs)(`div`,{className:`px-3 py-2 border-b border-sand flex items-center gap-2 flex-wrap`,children:[(0,z.jsx)(`span`,{className:`font-mono text-[10px] uppercase tracking-[.1em] text-tan`,children:`now`}),i?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(B,{to:`/board`,className:`font-semibold text-[13px] text-walnut hover:text-ember-deep hover:no-underline`,children:i.title}),(0,z.jsx)(W,{tone:i.state===`ongoing`?`david`:`neutral`,children:i.state}),(0,z.jsxs)(`span`,{className:`font-mono text-[11px] text-ink3`,children:[i.done,`/`,i.total]})]}):(0,z.jsx)(`span`,{className:`text-[13px] text-umber`,children:e?`no phase in flight`:`no project selected`})]}),(0,z.jsxs)(`div`,{className:`px-3 py-2 border-b border-sand grid gap-1`,children:[(0,z.jsxs)(`span`,{className:`font-mono text-[10px] uppercase tracking-[.1em] text-tan`,children:[t,` is on`]}),a.length===0&&(0,z.jsx)(`span`,{className:`text-[12px] text-umber`,children:`no active stream owned by this agent`}),a.map(e=>(0,z.jsxs)(`div`,{className:`flex items-center gap-2 text-[12px]`,children:[(0,z.jsx)(`span`,{className:`font-mono text-umber truncate`,title:e.note,children:e.name}),(0,z.jsx)(`span`,{className:`ml-auto`,children:(0,z.jsx)(Q,{stream:e,agents:r})})]},e.name))]}),i&&e?(0,z.jsx)(Wu,{project:e,phase:i,highlight:t,maxH:`100%`,compact:!0}):(0,z.jsx)(`div`,{className:`px-3 py-3 text-[12px] text-umber`,children:`Pick a project (header) to see its phase tasks.`})]})}var td=`/api`,nd=e=>{if(!e)return`—`;let t=Math.floor((Date.now()-e)/1e3);return t<60?`${t}s`:t<3600?`${Math.floor(t/60)}m`:`${Math.floor(t/3600)}h`};function rd({agentId:e,lines:t=4,className:n=``,label:r}){let[i,a]=(0,N.useState)(null),[o,s]=(0,N.useState)(null),[c,l]=(0,N.useState)(!1);(0,N.useEffect)(()=>{let n=!0,r=async()=>{try{let r=await fetch(`${td}/bus/agents/${encodeURIComponent(e)}/pane?lines=${t+6}&colors=1`),i=await r.json();if(!n)return;if(!r.ok){s(i.error??String(r.status));return}s(null),a(i)}catch(e){n&&s(e.message)}};r();let i=setInterval(r,3e3);return()=>{n=!1,clearInterval(i)}},[e,t]);let u=e=>e.split(`
27
+ `).filter(e=>e.trim().length>0).slice(-t).join(`
28
+ `);return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`button`,{onClick:()=>l(!0),className:`w-full text-left rounded-[4px] overflow-hidden border border-sand bg-transparent p-0 cursor-pointer group ${n}`,title:`${e} · pane ${i?.pane??``} · click for the full view`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-1.5 px-2 py-[3px] bg-linen border-b border-sand`,children:[(0,z.jsx)(`span`,{className:`relative inline-block w-1.5 h-1.5 rounded-full ${i?.active?`bg-moss`:`bg-dust`}`,children:i?.active&&(0,z.jsx)(`span`,{className:`absolute inset-0 rounded-full bg-moss animate-ping opacity-60`})}),(0,z.jsx)(`span`,{className:`font-mono text-[10px] text-ink3 truncate`,children:r??e}),(0,z.jsx)(`span`,{className:`ml-auto font-mono text-[10px] text-tan`,children:i?i.active?`active`:`quiet ${nd(i.paneActivity)}`:`…`})]}),(0,z.jsx)(`pre`,{className:`m-0 px-2 py-1 pane-dark font-mono text-[10.5px] leading-[1.35] whitespace-pre-wrap break-words max-h-[calc(1.35em*4+8px)] overflow-hidden group-hover:opacity-90`,style:{maxHeight:`calc(1.35em * ${t} + 8px)`},children:o?(0,z.jsx)(`span`,{className:`text-brick`,children:o}):i?i.ansi?fo(u(i.ansi)):u(i.text):`capturing…`})]}),c&&(0,z.jsx)($u,{agentId:e,onClose:()=>l(!1)})]})}function id({id:e,prefix:t,size:n=`sm`,className:r=``,bare:i=!1,noDot:a=!1}){let o=(K(`/bus/agents`,2e4).data??[]).find(t=>t.agentId===e),[s,c]=(0,N.useState)(!1),[l,u]=(0,N.useState)(!1),d=(0,N.useRef)(null),f=()=>{d.current&&window.clearTimeout(d.current),d.current=window.setTimeout(()=>c(!0),250)},p=()=>{d.current&&window.clearTimeout(d.current),d.current=window.setTimeout(()=>c(!1),200)};(0,N.useEffect)(()=>()=>{d.current&&window.clearTimeout(d.current)},[]);let m=!!o?.pane;return(0,z.jsxs)(`span`,{className:`relative inline-flex ${r}`,onMouseEnter:f,onMouseLeave:p,children:[(0,z.jsxs)(`button`,{onClick:()=>m&&u(!0),className:i?`inline-flex items-center gap-1.5 font-mono font-semibold ${n===`sm`?`text-[12px]`:`text-[13px]`} border-0 bg-transparent p-0 text-walnut ${m?`cursor-pointer hover:text-ember-deep`:`cursor-default`}`:`inline-flex items-center gap-1.5 rounded-full border font-mono ${n===`sm`?`text-[11px] px-2 py-0.5`:`text-[12px] px-2.5 py-1`} ${m?`cursor-pointer border-dust bg-paper hover:border-ember`:`cursor-default border-sand bg-linen/60`} text-walnut`,title:m?`${e} · pane ${o.pane} · click to pop out`:`${e}${o?` · ${o.liveness}`:` · not on the bus`}`,children:[t&&(0,z.jsx)(`span`,{className:`text-tan`,children:t}),!a&&(0,z.jsx)(Fu,{id:e,role:o?.role,size:n===`sm`?14:18,state:o?.liveness??`dead`,active:o?.active}),(0,z.jsx)(`span`,{className:`truncate max-w-[220px]`,children:e}),o&&!o.transport&&o.liveness!==`dead`&&(0,z.jsx)(`span`,{className:`text-amber`,title:`not attached — DMs won't reach its pane`,children:`⚠`})]}),s&&m&&(0,z.jsx)(`span`,{className:`absolute left-0 top-[calc(100%+6px)] z-50 w-[420px] whitespace-normal text-left`,onMouseEnter:f,onMouseLeave:p,children:(0,z.jsx)(rd,{agentId:e,lines:6,label:`${e} · ${o.role??``}`,className:`shadow-panel bg-paper`})}),l&&(0,z.jsx)($u,{agentId:e,onClose:()=>u(!1)})]})}var ad=[{re:/coordinator/i,label:`coordinator`,dot:`#4A6A2C`,ring:`#B9CFA0`},{re:/aide|liaison|curator/i,label:`aide`,dot:`#C4587A`,ring:`#F0C2D2`},{re:/\bqa\b|quality/i,label:`qa`,dot:`#C88A1E`,ring:`#F0DFA6`},{re:/\bci\b/i,label:`ci`,dot:`#E8702A`,ring:`#F6C9A6`},{re:/audit/i,label:`audit`,dot:`#7A4A6A`,ring:`#DDBFD3`},{re:/automation/i,label:`automation`,dot:`#8A7660`,ring:`#D9CDBB`},{re:/human|david/i,label:`human`,dot:`#B7521A`,ring:`#F6C9A6`}],od=e=>ad.find(t=>t.re.test(e??``))?.dot??`#5C7A96`,sd=e=>ad.find(t=>t.re.test(e??``))?.label??`worker`;function cd(){let{projects:e,current:t}=Ba(),n=K(`/bus/agents`,15e3).data??[],r=e.find(e=>e.name===t)?.room,i=n.filter(e=>e.liveness!==`dead`&&![`groundwork-console`,`david`].includes(e.agentId)&&(e.project===t||r&&e.project===r)),a=n.filter(e=>e.liveness!==`dead`&&![`groundwork-console`,`david`].includes(e.agentId)&&!i.includes(e)),o=e=>[`aide`,`coordinator`,`qa`,`ci`,`worker`,`audit`].indexOf(sd(e.role))+1||9,s=[...i].sort((e,t)=>o(e)-o(t)||e.agentId.localeCompare(t.agentId)),[c,l]=(0,N.useState)(!1);return(0,z.jsxs)(`div`,{className:`flex items-center gap-2 px-4 py-1.5 border-b border-sand bg-paper/70 min-h-[34px] whitespace-nowrap overflow-x-auto [scrollbar-width:none]`,children:[(0,z.jsxs)(`span`,{className:`font-mono text-[10px] uppercase tracking-[.1em] text-tan shrink-0`,children:[`online · `,t||`—`]}),s.length===0&&(0,z.jsx)(`span`,{className:`font-mono text-[12px] text-tan`,children:`no agents for this project`}),s.map(e=>(0,z.jsxs)(`span`,{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded-full border border-sand bg-paper`,style:{borderColor:od(e.role)+`66`},title:`${e.agentId} · ${sd(e.role)}${e.pane?` · ${e.pane}`:``}`,children:[(0,z.jsx)(Fu,{id:e.agentId,role:e.role,size:16,state:e.liveness,active:e.active}),(0,z.jsx)(id,{id:e.agentId,bare:!0,noDot:!0,size:`sm`}),(0,z.jsx)(`span`,{className:`font-mono text-[10px] uppercase tracking-[.06em]`,style:{color:od(e.role)},children:sd(e.role)})]},e.agentId)),c&&a.map(e=>(0,z.jsxs)(`span`,{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded-full border border-dashed border-sand bg-cream/60`,title:`${e.agentId} · ${sd(e.role)} · ${e.project??`?`}`,children:[(0,z.jsx)(Fu,{id:e.agentId,role:e.role,size:16,state:e.liveness,active:e.active}),(0,z.jsx)(id,{id:e.agentId,bare:!0,noDot:!0,size:`sm`}),(0,z.jsx)(`span`,{className:`font-mono text-[10px] text-tan`,children:e.project})]},e.agentId)),a.length>0&&(0,z.jsx)(`button`,{onClick:()=>l(e=>!e),"aria-pressed":c,className:`ml-auto font-mono text-[11px] text-ink3 shrink-0 border-0 bg-transparent cursor-pointer hover:text-umber`,title:c?`show only this project`:a.map(e=>e.agentId).join(`, `),children:c?`only this project`:`+${a.length} elsewhere`}),(0,z.jsx)(`span`,{className:`ml-3 font-mono text-[10px] text-tan shrink-0 hidden xl:inline-flex items-center gap-2`,children:[[`coordinator`,`#4A6A2C`],[`aide`,`#C4587A`],[`qa`,`#C88A1E`],[`ci`,`#E8702A`],[`worker`,`#5C7A96`]].map(([e,t])=>(0,z.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[(0,z.jsx)(`span`,{className:`inline-block w-1.5 h-1.5 rounded-full`,style:{background:t}}),e]},e))})]})}function ld(e,t){let n=e.slice(0,t),r=n.match(/(^|\s)\/([\w-]*)$/);return r?{start:n.length-r[2].length-1,query:r[2]}:null}function ud(e){let t=K(e?`/projects/${e}/skills`:null,6e4).data;return(0,N.useMemo)(()=>[...(t?.groundwork.skills??[]).map(e=>({name:e.name,description:e.description,source:`groundwork`})),...(t?.playbook.cards??[]).map(e=>({name:e.name,description:e.description,source:`playbook`}))],[t])}function dd({skills:e,query:t,onPick:n,onClose:r,bind:i}){let a=(0,N.useMemo)(()=>{let n=t.toLowerCase(),r=e.filter(e=>e.name.toLowerCase().includes(n));return(r.length?r:e.filter(e=>e.description.toLowerCase().includes(n))).sort((e,t)=>Number(t.name.toLowerCase().startsWith(n))-Number(e.name.toLowerCase().startsWith(n))||e.name.localeCompare(t.name)).slice(0,12)},[e,t]),[o,s]=(0,N.useState)(0),c=(0,N.useRef)(null);return(0,N.useEffect)(()=>{s(0)},[t]),(0,N.useEffect)(()=>(i(e=>e.key===`ArrowDown`?(s(e=>Math.min(e+1,a.length-1)),!0):e.key===`ArrowUp`?(s(e=>Math.max(e-1,0)),!0):(e.key===`Enter`||e.key===`Tab`)&&a[o]?(n(a[o].name),!0):e.key===`Escape`&&(r(),!0)),()=>i(null)),[i,a,o,n,r]),(0,N.useEffect)(()=>{c.current?.querySelector(`[data-i="${o}"]`)?.scrollIntoView({block:`nearest`})},[o]),a.length===0?(0,z.jsxs)(`div`,{className:`absolute left-0 right-0 bottom-full mb-1 bg-paper border border-sand rounded-kit shadow-panel px-2 py-1.5 font-mono text-[11px] text-tan`,children:[`no skill matches “/`,t,`” — Enter sends the text as typed`]}):(0,z.jsxs)(`div`,{ref:c,role:`listbox`,"aria-label":`slash commands`,className:`absolute left-0 right-0 bottom-full mb-1 max-h-[240px] overflow-auto overscroll-contain bg-paper border border-sand rounded-kit shadow-panel grid`,children:[a.map((e,t)=>(0,z.jsxs)(`button`,{"data-i":t,type:`button`,role:`option`,"aria-selected":t===o,onMouseDown:t=>{t.preventDefault(),n(e.name)},onMouseEnter:()=>s(t),className:`grid grid-cols-[auto_1fr_auto] gap-2 items-baseline px-2 py-1 text-left border-0 cursor-pointer ${t===o?`bg-linen`:`bg-transparent`}`,children:[(0,z.jsxs)(`span`,{className:`font-mono text-[12px] font-semibold text-walnut`,children:[`/`,e.name]}),(0,z.jsx)(`span`,{className:`text-[12px] text-umber truncate`,title:e.description,children:e.description}),(0,z.jsx)(W,{tone:e.source===`playbook`?`neutral`:`outline`,children:e.source})]},`${e.source}:${e.name}`)),(0,z.jsx)(`div`,{className:`px-2 py-1 font-mono text-[10px] text-tan border-t border-sand`,children:`↑↓ move · Enter/Tab insert · Esc close · sent as a text DM; the agent runs the skill`})]})}var fd=(e,t)=>window.dispatchEvent(new CustomEvent(`groundwork-console:summon`,{detail:{agentId:e,answers:t?.answers}})),pd=e=>`groundwork-console.summon.${e}`,md=e=>`groundwork-console.summon.seen.${e}`;function hd(e){let t=ir(),n=t.pathname.match(/^\/docs\/(.+)$/),r=new URLSearchParams(t.search);if(n){let t=decodeURIComponent(n[1]),i=r.get(`line`);return t.startsWith(`kb:`)?{label:`knowledge/${t.slice(3)}${i?`:${i}`:``}`,cite:`groundwork-knowledge/${t.slice(3)}${i?`:${i}`:``}`}:{label:`${t}${i?`:${i}`:``}`,cite:`${e}/docs/${t}${i?`:${i}`:``}`}}let i=t.pathname===`/`?`home`:t.pathname.slice(1).split(`/`)[0];return{label:i,cite:`groundwork-console /${i}${e?` · ${e}`:``}`}}function gd(){let{current:e}=Ba(),t=K(`/bus/agents`,2e4).data??[],n=K(e?`/projects/${e}/agents`:null,3e4).data,r=t.filter(e=>e.liveness!==`dead`&&e.agentId!==`david`&&e.agentId!==`groundwork-console`),[i,a]=(0,N.useState)(()=>e?localStorage.getItem(pd(e)):null);(0,N.useEffect)(()=>{a(e?localStorage.getItem(pd(e)):null)},[e]);let o=(i&&t.some(e=>e.agentId===i)?i:null)??n?.aide??n?.coordinator??r[0]?.agentId??null,s=t.find(e=>e.agentId===o),[c,l]=(0,N.useState)(!1),[u,d]=(0,N.useState)(!1),f=t=>{a(t),e&&localStorage.setItem(pd(e),t),d(!1),l(!0)},p=K(o?`/bus/dm/${encodeURIComponent(o)}?limit=80`:null,c?4e3:2e4).data,m=K(`/bus/inbox?limit=100`,2e4).data?.decisions??{},[h,g]=(0,N.useState)(0);(0,N.useEffect)(()=>{o&&g(Number(localStorage.getItem(md(o))??0))},[o]),(0,N.useEffect)(()=>{c&&o&&p&&(localStorage.setItem(md(o),String(p.lastFromAgent)),g(p.lastFromAgent))},[c,o,p]);let _=!!p&&p.lastFromAgent>h;(0,N.useEffect)(()=>{let e=e=>{e.key===`Escape`&&(d(!1),l(!1))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]);let[v,y]=(0,N.useState)([]);(0,N.useEffect)(()=>{let e=e=>{let t=e.detail;y(t?.answers??[]),t?.agentId?f(t.agentId):(l(!1),d(!0))};return window.addEventListener(`groundwork-console:summon`,e),()=>window.removeEventListener(`groundwork-console:summon`,e)});let[b,x]=(0,N.useState)(``);if((0,N.useEffect)(()=>{u||x(``)},[u]),!o)return null;let S=e=>Math.max(e.paneActivity??0,e.lastSeen??0,e.lastHeartbeat??0),C=[...r].sort((e,t)=>Number(/aide/i.test(t.role??``))-Number(/aide/i.test(e.role??``))||S(t)-S(e)),w=r.length>6,T=w?C.slice(0,6):C,E=b.trim()?r.filter(e=>`${e.agentId} ${e.role??``} ${e.project??``}`.toLowerCase().includes(b.trim().toLowerCase())):C.slice(6),D=T.length,O=e=>{let t=(D===1?.5:e/(D-1))*(Math.PI/2);return{x:-Math.sin(t)*96,y:-Math.cos(t)*96}};return(0,z.jsxs)(z.Fragment,{children:[c&&(0,z.jsx)($,{agentId:o,me:s,project:e,thread:p??void 0,answers:v,onAnswered:()=>y([]),onClose:()=>l(!1),onSwitch:()=>{d(!0)}}),(0,z.jsxs)(`div`,{className:`fixed right-5 bottom-5 z-[55]`,style:{width:52,height:52},children:[u&&(0,z.jsxs)(`div`,{className:`absolute inset-0`,"aria-label":`pick an agent`,children:[T.map((e,t)=>{let n=O(t);return(0,z.jsxs)(`button`,{onClick:()=>f(e.agentId),title:`${e.agentId} · ${sd(e.role)}`,className:`absolute rounded-full border-2 bg-paper shadow-panel cursor-pointer p-[3px] transition-transform hover:scale-110`,style:{left:26+n.x-17,top:26+n.y-17,borderColor:od(e.role),width:34,height:34,animation:`summon-pop .18s ease-out ${t*30}ms both`},children:[(0,z.jsx)(Fu,{id:e.agentId,role:e.role,size:26,state:e.liveness,active:e.active}),m[e.agentId]?(0,z.jsx)(_d,{n:m[e.agentId],small:!0}):null]},e.agentId)}),T.length===0&&(0,z.jsx)(`span`,{className:`absolute right-0 bottom-14 whitespace-nowrap font-mono text-[11px] text-tan bg-paper border border-sand rounded-kit px-2 py-1`,children:`no live agents`}),w&&(0,z.jsxs)(`div`,{className:`absolute right-0 bottom-[130px] w-[300px] bg-paper border border-sand rounded-kit shadow-panel p-2 grid gap-1`,onMouseDown:e=>e.stopPropagation(),children:[(0,z.jsx)(`input`,{autoFocus:!0,value:b,onChange:e=>x(e.target.value),onKeyDown:e=>{e.key===`Enter`&&E[0]&&f(E[0].agentId),e.key===`Escape`&&d(!1)},placeholder:`${r.length} live — type to filter (id · role · project)`,className:`text-[12px] px-2 py-1.5 border border-dust rounded-kit bg-paper text-walnut font-mono`}),(0,z.jsxs)(`div`,{className:`max-h-[220px] overflow-auto overscroll-contain grid`,children:[E.slice(0,40).map((e,t)=>(0,z.jsxs)(`button`,{onClick:()=>f(e.agentId),className:`grid grid-cols-[auto_1fr_auto] items-center gap-2 px-1.5 py-1 rounded border-0 cursor-pointer text-left ${t===0&&b.trim()?`bg-linen`:`bg-transparent hover:bg-linen/60`}`,title:`${e.agentId} · ${sd(e.role)} · ${e.project??``}`,children:[(0,z.jsx)(Fu,{id:e.agentId,role:e.role,size:16,state:e.liveness,active:e.active}),(0,z.jsxs)(`span`,{className:`min-w-0 truncate font-mono text-[12px] text-walnut`,children:[e.agentId,(0,z.jsxs)(`span`,{className:`text-tan`,children:[` · `,sd(e.role),e.project?` · ${e.project}`:``]})]}),m[e.agentId]?(0,z.jsxs)(`span`,{className:`font-mono text-[10px] text-ember`,children:[`★`,m[e.agentId]]}):null]},e.agentId)),E.length===0&&(0,z.jsx)(`span`,{className:`px-1.5 py-1 font-mono text-[11px] text-tan`,children:`no match`})]}),(0,z.jsxs)(`span`,{className:`font-mono text-[10px] text-tan px-1`,children:[`ring = aide + `,5,` most recent · Enter picks the first match`]})]})]}),(0,z.jsxs)(`button`,{onClick:()=>u?d(!1):l(e=>!e),title:`${o} · ${sd(s?.role)} — click to chat`,className:`absolute inset-0 rounded-full border-2 bg-paper shadow-panel cursor-pointer p-1 hover:scale-105 transition-transform`,style:{borderColor:od(s?.role)},children:[(0,z.jsx)(Fu,{id:o,role:s?.role,size:40,state:s?.liveness??`dead`,active:s?.active}),m[o]?(0,z.jsx)(_d,{n:m[o]}):_&&(0,z.jsx)(`span`,{className:`absolute -top-0.5 -right-0.5 w-3 h-3 rounded-full bg-ember border-2 border-paper`,title:`new message`})]}),(0,z.jsx)(`button`,{onClick:()=>d(e=>!e),"aria-pressed":u,title:`pick another agent`,className:`absolute -left-2 -top-2 w-6 h-6 rounded-full border border-dust shadow-panel cursor-pointer text-[13px] leading-none flex items-center justify-center ${u?`bg-walnut text-paper`:`bg-paper text-umber`}`,children:u?`×`:`+`})]}),(0,z.jsx)(`style`,{children:`.summon-dots{display:inline-flex;gap:3px}.summon-dots i{width:5px;height:5px;border-radius:50%;background:currentColor;opacity:.25;animation:summon-dot 1.2s infinite}.summon-dots i:nth-child(2){animation-delay:.2s}.summon-dots i:nth-child(3){animation-delay:.4s}@keyframes summon-dot{0%,80%,100%{opacity:.25}40%{opacity:1}}@keyframes summon-pop{from{transform:scale(.4);opacity:0}to{transform:scale(1);opacity:1}}@keyframes summon-pulse{0%,100%{box-shadow:0 0 0 0 rgba(200,120,42,.55)}50%{box-shadow:0 0 0 6px rgba(200,120,42,0)}}`})]})}function _d({n:e,small:t=!1}){return(0,z.jsx)(`span`,{className:`absolute -top-1 -right-1 rounded-full bg-ember text-paper border-2 border-paper font-mono font-bold flex items-center justify-center leading-none ${t?`w-4 h-4 text-[9px]`:`w-5 h-5 text-[10px]`}`,title:`${e} decision${e===1?``:`s`} waiting on you`,style:{animation:`summon-pulse 1.6s ease-in-out infinite`},children:`★`})}var vd=e=>{let t=Math.round(e/1e3);return t<60?`${t} s`:t<3600?`${Math.floor(t/60)} min`:`${Math.floor(t/3600)} h`};function $({agentId:e,me:t,project:n,thread:r,answers:i=[],onAnswered:a,onClose:o,onSwitch:s}){let c=K(`/admin/bus-writes`,1e4).data?.enabled??!1,l=hd(n),[u,d]=(0,N.useState)(!0),f=`groundwork-console.summon.draft.${e}`,[p,m]=(0,N.useState)(()=>localStorage.getItem(f)??``),[h,g]=(0,N.useState)(null),_=e=>{m(e);try{e?localStorage.setItem(f,e):localStorage.removeItem(f)}catch{}};(0,N.useEffect)(()=>{m(localStorage.getItem(`groundwork-console.summon.draft.${e}`)??``)},[e]);let[v,y]=(0,N.useState)(!1),[b,x]=(0,N.useState)(()=>localStorage.getItem(`groundwork-console.summon.max`)===`1`),S=()=>x(e=>(localStorage.setItem(`groundwork-console.summon.max`,e?`0`:`1`),!e)),C=Yu({persistKey:`groundwork-console.summon.att.${e}`}),w=ud(n),T=(0,N.useRef)(null),[E,D]=(0,N.useState)(0),[O,k]=(0,N.useState)(!0),A=O?ld(p,E):null,j=(0,N.useRef)(null),ee=(0,N.useCallback)(e=>{j.current=e},[]),M=(0,N.useRef)(null),te=(0,N.useCallback)(e=>{let t=ld(p,E);if(!t)return;let n=`${p.slice(0,t.start)}/${e} ${p.slice(E)}`,r=t.start+e.length+2;_(n),D(r),M.current=r},[p,E]);(0,N.useEffect)(()=>{if(M.current!==null&&T.current){let e=M.current;M.current=null,T.current.focus(),T.current.setSelectionRange(e,e)}},[p]);let P=(0,N.useRef)(null),[F,ne]=(0,N.useState)([]),re=r?.messages??[],ie=F.filter(e=>!re.some(t=>t.from===`david`&&Number(t.ts??0)>=Number(e.ts??0)-2e3&&(t.text??``)===(e.text??``))),I=[...re,...ie],[ae,L]=(0,N.useState)(0);(0,N.useEffect)(()=>{let e=setInterval(()=>L(e=>e+1),1e3);return()=>clearInterval(e)},[]);let R=(K(`/bus/agents`,4e3).data??[]).find(t=>t.agentId===e)??t,oe=R?.paneActivity?Date.now()-R.paneActivity:1/0,se=oe<2e4,ce=([...I].reverse().find(e=>e.from===`david`)?.ts??0)>([...I].reverse().find(e=>e.from!==`david`)?.ts??0);(0,N.useEffect)(()=>{P.current&&(P.current.scrollTop=P.current.scrollHeight)},[I.length,se,ce]);let le=async()=>{if(!C.hasContent(p))return;g(`sending`);let t=p.trim(),n=t.startsWith(`/`)?`AGENT_ACTION: run ${t}`:t,r=C.withRefs(n),o=u?`${r}\n(context: ${l.cite})`:r,s={id:`local-${Date.now()}`,ts:Date.now(),from:`david`,to:e,text:o,prefix:null,pending:!0};ne(e=>[...e,s]),_(``),C.clear();try{let t=await Ia(`/actions/send`,{as:`david`,to:e,text:o,answers:i.length?i:void 0});if(t.status===`ok`)g(null),a?.();else{let e=t.error??t.log?.slice(-1)[0]??`failed`;g(e),ne(t=>t.map(t=>t.id===s.id?{...t,failed:e}:t))}}catch(e){let t=e.message;g(t),ne(e=>e.map(e=>e.id===s.id?{...e,failed:t}:e))}},ue=e=>e?new Date(e).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`}):``,de=(0,N.useMemo)(()=>I,[I]);return(0,z.jsxs)(z.Fragment,{children:[v&&(0,z.jsx)($u,{agentId:e,onClose:()=>y(!1)}),(0,z.jsxs)(`div`,{className:`fixed z-[54] bg-paper border border-sand rounded-kit shadow-panel grid grid-rows-[auto_minmax(0,1fr)_auto] whitespace-normal text-left transition-[width,height] duration-150 ${b?`right-5 bottom-[84px] w-[min(1100px,calc(100vw-40px))] h-[calc(100vh-110px)]`:`right-5 bottom-[84px] w-[min(400px,calc(100vw-40px))] h-[min(560px,calc(100vh-140px))]`}`,style:{borderTop:`3px solid ${od(t?.role)}`},children:[(0,z.jsxs)(`div`,{className:`px-3 py-2 border-b border-sand flex items-center gap-2 min-w-0`,children:[(0,z.jsx)(Fu,{id:e,role:t?.role,size:22,state:t?.liveness??`dead`,active:t?.active}),(0,z.jsx)(`span`,{className:`font-display font-bold text-[14px] text-umber truncate`,children:e}),(0,z.jsx)(`span`,{className:`font-mono text-[10px] uppercase tracking-[.06em]`,style:{color:od(t?.role)},children:sd(t?.role)}),t?(0,z.jsx)(W,{tone:t.liveness===`live`?`ok`:t.liveness===`idle`?`warn`:`bad`,children:t.active?`active`:t.liveness}):(0,z.jsx)(W,{tone:`bad`,children:`offline`}),(0,z.jsxs)(`span`,{className:`ml-auto flex items-center gap-1`,children:[t?.pane&&(0,z.jsx)(G,{size:`sm`,tone:`ghost`,onClick:()=>y(!0),title:`open its pane`,children:`pane`}),(0,z.jsx)(G,{size:`sm`,tone:`ghost`,onClick:s,title:`summon another agent`,children:`switch`}),(0,z.jsx)(G,{size:`sm`,tone:`ghost`,onClick:S,title:b?`restore`:`maximize`,children:b?`⇲`:`⇱`}),(0,z.jsx)(G,{size:`sm`,tone:`ghost`,onClick:o,children:`✕`})]})]}),(0,z.jsxs)(`div`,{ref:P,className:`min-h-0 overflow-auto overscroll-contain px-3 py-2 grid gap-1.5 content-start bg-cream/40`,children:[!r&&(0,z.jsx)(`span`,{className:`font-mono text-[11px] text-tan`,children:`loading thread…`}),r&&de.length===0&&(0,z.jsxs)(`span`,{className:`text-[12px] text-umber`,children:[`No DMs with `,e,` yet. Say what you need — it lands in its pane via tmux-push.`]}),de.map((e,t)=>{let n=e.from===`david`,r=String(e.text??``),i=e.prefix?r.replace(RegExp(`^${e.prefix}:?\\s*`),``):r;return(0,z.jsxs)(`div`,{className:`${e.pending?`opacity-70`:``} ${b?`max-w-[70%]`:`max-w-[88%]`} rounded-kit px-2.5 py-1.5 text-[12.5px] leading-snug whitespace-pre-wrap break-words border ${n?`justify-self-end bg-paper border-sand`:`justify-self-start bg-linen/70 border-sand/70`}`,children:[e.prefix&&(0,z.jsx)(Oa,{prefix:e.prefix}),(0,z.jsx)(Zu,{text:i}),(0,z.jsx)(`div`,{className:`font-mono text-[10px] mt-0.5 ${n?`text-right`:``} ${e.failed?`text-brick`:`text-tan`}`,children:e.failed?`not sent · ${e.failed}`:e.pending?`sending…`:ue(e.ts)})]},e.id??t)}),(se||ce)&&(0,z.jsx)(`div`,{className:`justify-self-start inline-flex items-center gap-2 px-2.5 py-1.5 rounded-kit border border-sand/70 bg-linen/50 font-mono text-[11px] text-ink3`,title:R?.paneActivity?`last pane output ${Math.round(oe/1e3)} s ago`:`no pane activity`,children:se?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`span`,{className:`summon-dots`,"aria-hidden":!0,children:[(0,z.jsx)(`i`,{}),(0,z.jsx)(`i`,{}),(0,z.jsx)(`i`,{})]}),(0,z.jsxs)(`span`,{children:[e.split(`-`)[0],` is working`]})]}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full bg-tan`}),(0,z.jsxs)(`span`,{children:[`delivered · quiet for `,oe===1/0?`a while`:vd(oe)]})]})})]}),(0,z.jsxs)(`div`,{className:`px-3 py-2 border-t border-sand grid gap-1.5`,children:[(0,z.jsxs)(`label`,{className:`flex items-center gap-1.5 font-mono text-[11px] text-ink3 min-w-0`,children:[(0,z.jsx)(`input`,{type:`checkbox`,checked:u,onChange:e=>d(e.target.checked)}),(0,z.jsx)(`span`,{className:`shrink-0`,children:`context:`}),(0,z.jsx)(`span`,{className:`truncate text-umber`,title:l.cite,children:l.label})]}),(0,z.jsxs)(`div`,{className:`relative grid grid-cols-[1fr_auto] gap-1.5 items-center`,children:[(0,z.jsx)(`textarea`,{ref:T,value:p,onChange:e=>{_(e.target.value),D(e.target.selectionStart??e.target.value.length),k(!0)},onClick:e=>D(e.target.selectionStart??0),onKeyUp:e=>D(e.target.selectionStart??0),onKeyDown:e=>{if(A&&j.current&&j.current(e)){e.preventDefault();return}e.key===`Enter`&&!e.shiftKey&&c&&(e.preventDefault(),le())},onPaste:C.onPaste,onDrop:C.onDrop,onDragOver:C.onDragOver,disabled:!c,rows:b?4:2,placeholder:c?`DM ${e} as david — Enter to send, ⇧Enter newline, paste images`:`bus writes are off (header badge)`,className:`text-[13px] px-2.5 py-2 border border-dust rounded-kit bg-paper text-walnut resize-none min-w-0`}),(0,z.jsx)(G,{size:`sm`,tone:`primary`,onClick:le,disabled:!c||!C.hasContent(p)||C.busy||h===`sending`,children:h===`sending`?`…`:`Send`}),A&&c&&(0,z.jsx)(dd,{skills:w,query:A.query,onPick:te,onClose:()=>k(!1),bind:ee})]}),(0,z.jsx)(Xu,{a:C}),p.trim().startsWith(`/`)&&(0,z.jsxs)(`div`,{className:`font-mono text-[11px] text-ink3`,children:[`sends as `,(0,z.jsxs)(`span`,{className:`text-umber`,children:[`AGENT_ACTION: run `,p.trim().split(/\s/)[0],` …`]}),` — the bus pusher drops raw leading-slash DMs; the agent runs the skill from the request`]}),h&&h!==`sending`&&(0,z.jsx)(`div`,{className:`font-mono text-[11px] text-brick`,children:h})]})]})]})}var yd={h:`/`,b:`/board`,m:`/monitor`,u:`/bus`,d:`/docs`,o:`/ops`},bd=e=>{let t=e;return!!t&&(t.tagName===`INPUT`||t.tagName===`TEXTAREA`||t.tagName===`SELECT`||t.isContentEditable)};function xd(){let e=or(),[t,n]=(0,N.useState)(!1);return(0,N.useEffect)(()=>{let t=0,r=r=>{if(!(r.metaKey||r.ctrlKey||r.altKey||bd(r.target))){if(r.key===`Escape`){n(!1);return}if(r.key===`?`){n(e=>!e);return}if(r.key===`/`){r.preventDefault(),fd(``);return}if(r.key===`g`){t=Date.now();return}Date.now()-t<900&&yd[r.key]&&(r.preventDefault(),e(yd[r.key]),t=0)}};return window.addEventListener(`keydown`,r),()=>window.removeEventListener(`keydown`,r)},[e]),t?(0,z.jsx)(`div`,{className:`fixed inset-0 z-[70] bg-walnut/30 flex items-center justify-center`,onMouseDown:()=>n(!1),children:(0,z.jsxs)(`div`,{className:`bg-paper border border-sand rounded-kit shadow-panel p-4 grid gap-2 min-w-[320px]`,onMouseDown:e=>e.stopPropagation(),children:[(0,z.jsx)(`div`,{className:`font-display font-bold text-[15px] text-umber`,children:`Keyboard`}),[[`/`,`summon an agent (picker)`],[`g h`,`Home`],[`g b`,`Board`],[`g m`,`Monitor`],[`g u`,`Bus`],[`g d`,`Docs`],[`g o`,`Ops`],[`Esc`,`close drawer / picker / this`],[`?`,`toggle this list`]].map(([e,t])=>(0,z.jsxs)(`div`,{className:`grid grid-cols-[64px_1fr] gap-3 items-baseline text-[13px]`,children:[(0,z.jsx)(`kbd`,{className:`font-mono text-[12px] px-1.5 py-0.5 border border-dust rounded bg-cream text-walnut justify-self-start`,children:e}),(0,z.jsx)(`span`,{className:`text-umber`,children:t})]},e)),(0,z.jsx)(`div`,{className:`font-mono text-[11px] text-tan mt-1`,children:`In the Summon drawer: Enter sends · ⇧Enter newline · paste images.`})]})}):null}var Sd=`/api`;function Cd({children:e}){let[t,n]=(0,N.useState)(`checking`),[r,i]=(0,N.useState)(``),[a,o]=(0,N.useState)(null),[s,c]=(0,N.useState)(!1),l=async()=>{try{let e=await(await fetch(`${Sd}/auth/status`)).json();n(e.authed?`in`:`out`)}catch{n(`offline`)}};(0,N.useEffect)(()=>{l()},[]),(0,N.useEffect)(()=>{t!==`in`&&fetch(`${Sd}/health`).then(e=>e.json()).then(e=>{document.title=e.hostname?`Sign in · ${e.hostname}`:`Sign in · Groundwork Console`}).catch(()=>{document.title=`Sign in · Groundwork Console`})},[t]),(0,N.useEffect)(()=>{let e=()=>n(`out`);return window.addEventListener(`groundwork-console:unauthorized`,e),()=>window.removeEventListener(`groundwork-console:unauthorized`,e)},[]);let u=async()=>{c(!0),o(null);try{let e=await fetch(`${Sd}/auth/login`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({token:r})}),t=await e.json();if(!e.ok)throw Error(t.error??`${e.status}`);i(``),n(`in`)}catch(e){o(e.message)}finally{c(!1)}};return t===`in`?(0,z.jsx)(z.Fragment,{children:e}):t===`checking`?(0,z.jsx)(`div`,{className:`min-h-screen grid place-items-center font-mono text-[12px] text-tan`,children:`checking session…`}):(0,z.jsx)(`div`,{className:`min-h-screen grid place-items-center bg-cream p-6`,children:(0,z.jsxs)(`div`,{className:`w-[380px] bg-paper border border-sand rounded-kit shadow-panel`,children:[(0,z.jsxs)(`div`,{className:`px-5 py-4 border-b border-sand flex items-center gap-2 font-display font-bold text-[18px] text-ember`,children:[(0,z.jsx)(Pa,{}),` Groundwork Console`]}),(0,z.jsx)(`div`,{className:`p-5 grid gap-3 text-[13px]`,children:t===`offline`?(0,z.jsxs)(`div`,{className:`text-brick`,children:[`API unreachable — start it with `,(0,z.jsx)(`code`,{children:`pnpm dev:api`}),`, then `,(0,z.jsx)(`button`,{className:`underline border-0 bg-transparent p-0 cursor-pointer text-ember-deep`,onClick:l,children:`retry`}),`.`]}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`div`,{className:`text-umber`,children:[`This console can write to your bus and docs. Enter the console token — it's in `,(0,z.jsx)(`code`,{className:`font-mono text-[12px]`,children:`~/.groundwork-console/token`}),` on the machine running the API (or `,(0,z.jsx)(`code`,{className:`font-mono text-[12px]`,children:`GROUNDWORK_CONSOLE_TOKEN`}),`).`]}),(0,z.jsx)(`input`,{type:`password`,autoFocus:!0,value:r,onChange:e=>i(e.target.value),onKeyDown:e=>{e.key===`Enter`&&r&&u()},placeholder:`token`,className:`px-2.5 py-2 border border-dust rounded-kit bg-paper text-walnut font-mono`}),a&&(0,z.jsx)(`div`,{className:`text-brick`,children:a}),(0,z.jsx)(G,{tone:`primary`,onClick:u,disabled:!r||s,children:s?`Signing in…`:`Sign in`}),(0,z.jsx)(`div`,{className:`font-mono text-[11px] text-tan`,children:`Cookie lasts 30 days on this browser. Single shared token — no accounts.`})]})})]})})}var wd=[{to:`/`,label:`Home`,icon:`home`},{to:`/board`,label:`Board`,icon:`board`},{to:`/bus`,label:`Bus`,icon:`bus`},{to:`/monitor`,label:`Monitor`,icon:`monitor`},{to:`/docs`,label:`Docs`,icon:`docs`},{to:`/ops`,label:`Ops`,icon:`fleet`}];function Td(){let{error:e}=Ba(),{running:t}=Ua(),n=K(`/bus/unread`,3e4).data?.inbox??0,r=K(`/kit`).data,i=K(`/health`,6e4).data?.hostname,a=ir();(0,N.useEffect)(()=>{let e=a.pathname===`/`?``:a.pathname.split(`/`)[1],t=wd.find(t=>t.to===`/`?e===``:t.to===`/${e}`)?.label??(e?e[0].toUpperCase()+e.slice(1):`Home`);document.title=i?`${t} · ${i}`:t},[a.pathname,i]);let o=r?.packages?`${r.name} ${r.kitVersion} · seam ${r.packages.seam?.version} · mcp ${r.packages.mcp?.version}`:`kit · offline`;return(0,z.jsx)(Cd,{children:(0,z.jsx)(Au,{children:(0,z.jsxs)(`div`,{className:`grid grid-rows-[48px_auto_1fr] min-h-screen`,children:[(0,z.jsxs)(`header`,{className:`grid grid-cols-[auto_auto_1fr] items-center gap-4 px-4 border-b border-sand bg-cream min-w-0`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2 font-display font-bold text-[16px] text-ember whitespace-nowrap`,title:o,children:[(0,z.jsx)(Pa,{}),` Groundwork Console`]}),(0,z.jsx)(`nav`,{className:`flex gap-0.5 whitespace-nowrap`,children:wd.map(e=>(0,z.jsxs)(Mi,{to:e.to===`/bus`&&n>0?`/bus?view=inbox`:e.to,end:e.to===`/`,className:({isActive:e})=>`inline-flex items-center gap-1.5 px-3 py-2 rounded-kit font-medium ${e?`bg-paper text-walnut shadow-[inset_0_0_0_1px_var(--color-sand)]`:`text-umber hover:no-underline hover:bg-linen`}`,children:[(0,z.jsx)(`span`,{className:`text-tan`,children:wa[e.icon]({size:16})}),(0,z.jsx)(`span`,{className:`hidden xl:inline`,children:e.label}),e.to===`/ops`&&t>0?(0,z.jsxs)(`span`,{className:`ml-1.5 inline-flex items-center gap-1 text-amber`,children:[(0,z.jsx)(Na,{size:12}),(0,z.jsx)(W,{tone:`warn`,children:t})]}):null,e.to===`/bus`&&n>0?(0,z.jsx)(`span`,{className:`ml-1.5 inline-flex`,title:`${n} unread DM(s) to david`,children:(0,z.jsx)(W,{tone:`david`,children:n})}):null,e.badge?(0,z.jsx)(`span`,{className:`ml-1.5 inline-flex`,children:(0,z.jsx)(W,{tone:`david`,children:e.badge})}):null]},e.to))}),(0,z.jsxs)(`div`,{className:`flex gap-0.5 items-center justify-end min-w-0 whitespace-nowrap`,children:[e&&(0,z.jsx)(`span`,{className:`font-mono text-[12px] text-brick mr-2`,title:e,children:`api offline`}),(0,z.jsx)(Ka,{}),(0,z.jsx)(Xa,{}),(0,z.jsx)(Ya,{}),(0,z.jsx)(q,{}),(0,z.jsx)(`button`,{onClick:async()=>{await fetch(`/api/auth/logout`,{method:`POST`}),window.dispatchEvent(new Event(`groundwork-console:unauthorized`))},className:`ml-1 font-mono text-[11px] text-tan border-0 bg-transparent cursor-pointer hover:text-umber`,title:`sign out (clears the session cookie)`,children:`⎋`})]})]}),(0,z.jsx)(cd,{}),(0,z.jsx)(zr,{}),(0,z.jsx)(oo,{}),(0,z.jsx)(gd,{}),(0,z.jsx)(xd,{})]})})})}function Ed(e,t=Date.now()){let n=Math.max(0,(t-e)/1e3)/60,r=n/60,i=r/24;if(n<1)return`just now`;if(r<1)return`${Math.floor(n)} min ago`;if(i<1)return`${Math.floor(r)} h ago`;if(i<2)return`yesterday`;if(i<7)return`${Math.floor(i)} days ago`;let a=i/7;if(a<2)return`last week`;if(i<30)return`${Math.floor(a)} weeks ago`;let o=i/30;return o<2?`last month`:i<365?`${Math.floor(o)} months ago`:i<730?`last year`:`${Math.floor(i/365)} years ago`}function Dd(e,t=Date.now()){let n=(t-e)/864e5;return n<1?`text-tan`:n<7?`text-amber`:`text-brick font-semibold`}var Od=e=>new Date(e).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`,second:`2-digit`}),kd=e=>!!e&&Ea.includes(e),Ad={"state.fact.stale":`warn`,"state.board.malformed":`bad`,"state.decision.open":`david`,"state.phase.active":`neutral`,"phase.completed":`ok`,"phase.started":`ok`,"phase.progress":`neutral`,"done.appended":`ok`,"queue.item.added":`neutral`,"queue.item.closed":`ok`,"fact.stale":`warn`,"board.malformed":`bad`,"decision.posted":`david`};function jd(){let{data:e,refresh:t}=K(`/events?limit=40`,15e3),[n,r]=(0,N.useState)(!1),[i,a]=(0,N.useState)(``),[o,s]=(0,N.useState)(!1),c=async(e,n)=>{s(!0);try{await Ia(`/events/config`,{rule:e,enabled:n}),t()}finally{s(!1)}},l=async e=>{s(!0);try{await Ia(`/events/config`,{dryRun:e,confirm:e?void 0:i}),t(),r(!1),a(``)}finally{s(!1)}},[u,d]=(0,N.useState)([]);(0,N.useEffect)(()=>{let e=new EventSource(`/api/events/stream`);return e.onmessage=e=>{let t=JSON.parse(e.data);t.type!==`hello`&&d(e=>{let n=e.findIndex(e=>e.id===t.id);if(n>=0){let r=e.slice();return r[n]=t,r}return[t,...e].slice(0,40)})},()=>e.close()},[]);let f=[...u,...(e?.recent??[]).filter(e=>!u.some(t=>t.id===e.id)).slice().reverse()].slice(0,40),p=e?.config;return(0,z.jsxs)(H,{children:[(0,z.jsxs)(U,{title:`Events`,icon:`health`,path:p?`${p.identity.displayName??p.identity.agentId} · ${p.rules.filter(e=>e.enabled).length}/${p.rules.length} rules enabled · dedupe ${p.limits?.dedupeTtlHours??72} h · max ${p.limits?.maxPerRulePerProjectPerHour??3}/h`:`detector`,children:[p&&(p.live?(0,z.jsx)(W,{tone:`bad`,children:`LIVE — sending`}):p.dryRun?(0,z.jsx)(W,{tone:`outline`,children:`dry-run`}):(0,z.jsx)(W,{tone:`warn`,children:`armed · bus writes off`})),p&&(p.dryRun?(0,z.jsx)(G,{size:`sm`,onClick:()=>r(!0),disabled:o,children:`Go live…`}):(0,z.jsx)(G,{size:`sm`,onClick:()=>l(!0),disabled:o,children:`Back to dry-run`}))]}),p&&(0,z.jsxs)(`div`,{className:`px-3 py-2 border-b border-sand grid gap-1`,children:[p.rules.map(e=>(0,z.jsxs)(`label`,{className:`grid grid-cols-[auto_1fr] gap-2 items-baseline font-mono text-[12px] text-ink3 cursor-pointer`,children:[(0,z.jsx)(`input`,{type:`checkbox`,checked:!!e.enabled,disabled:o||e.action.type===`none`,onChange:t=>c(e.id,t.target.checked),title:e.action.type===`none`?`informational rule — nothing to send`:`enable this rule`}),(0,z.jsxs)(`span`,{children:[(0,z.jsx)(`span`,{className:`text-walnut`,children:e.on}),` → `,e.action.type===`none`?(0,z.jsx)(`span`,{className:`text-tan`,children:e.action.note}):(0,z.jsxs)(z.Fragment,{children:[e.action.to?e.action.to:`#${e.action.room}`,` · `,kd(e.action.prefix)&&(0,z.jsx)(Oa,{prefix:e.action.prefix}),(0,z.jsx)(`span`,{className:`text-umber`,children:e.action.text})]})]})]},e.id)),(0,z.jsxs)(`div`,{className:`text-[11px] font-mono text-tan`,children:[`a rule sends only when: bus writes ON (header) · dry-run OFF · rule enabled · not a duplicate (key, `,p.limits?.dedupeTtlHours??72,` h) · under the rate limit · a live coordinator exists for the project. Baseline state.* events never trigger rules.`]})]}),n&&(0,z.jsx)(`div`,{className:`fixed inset-0 z-[60] bg-walnut/30 flex items-start justify-center pt-[12vh]`,onMouseDown:e=>{e.target===e.currentTarget&&r(!1)},children:(0,z.jsxs)(`div`,{className:`w-[520px] bg-paper border border-brick rounded-kit shadow-panel`,children:[(0,z.jsx)(`div`,{className:`px-4 py-3 border-b border-sand font-display font-bold text-[18px] text-brick`,children:`Turn dry-run off`}),(0,z.jsxs)(`div`,{className:`p-4 grid gap-3 text-[13px] text-umber`,children:[(0,z.jsxs)(`div`,{children:[`Enabled rules will really `,(0,z.jsx)(`code`,{children:`send_message`}),` as `,(0,z.jsx)(`b`,{className:`text-walnut`,children:`groundwork-console`}),` (automation) whenever bus writes are on. Dedupe + rate limit apply; every send is a Run. Persisted in `,(0,z.jsx)(`code`,{children:`groundwork-console.rules.json`}),`.`]}),(0,z.jsxs)(`label`,{className:`grid gap-1`,children:[(0,z.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Type LIVE to confirm`}),(0,z.jsx)(`input`,{value:i,onChange:e=>a(e.target.value),className:`px-2.5 py-2 border border-dust rounded-kit bg-paper text-walnut font-mono`})]})]}),(0,z.jsxs)(`div`,{className:`px-4 py-3 border-t border-sand flex justify-end gap-2`,children:[(0,z.jsx)(G,{size:`sm`,onClick:()=>r(!1),children:`Cancel`}),(0,z.jsx)(G,{size:`sm`,tone:`primary`,onClick:()=>l(!1),disabled:i!==`LIVE`||o,children:`Go live`})]})]})}),f.length===0&&(0,z.jsx)(`div`,{className:`px-3 py-3 text-[13px] text-umber`,children:`Watching seam files + rooms every 15 s. Nothing dirty at baseline and nothing changed since.`}),f.map(e=>(0,z.jsxs)(`div`,{className:`grid grid-cols-[var(--spacing-gutter)_1fr] border-b border-sand last:border-b-0`,children:[(0,z.jsx)(`div`,{className:`py-2.5 flex justify-center font-mono text-[12px] text-tan border-r border-sand`,children:`⚡`}),(0,z.jsxs)(`div`,{className:`px-3 pt-2 pb-2.5 min-w-0`,children:[(0,z.jsxs)(`div`,{className:`flex gap-2 items-baseline mb-0.5 flex-wrap`,children:[(0,z.jsx)(W,{tone:Ad[e.type]??`neutral`,children:e.type}),e.data.baseline?(0,z.jsx)(`span`,{className:`font-mono text-[11px] text-tan`,children:`baseline · no action`}):null,(0,z.jsx)(`span`,{className:`font-mono text-[12px] text-umber`,children:e.project}),(0,z.jsx)(`span`,{className:`font-mono text-[12px] text-ink3`,children:Od(e.ts)})]}),(0,z.jsx)(`div`,{className:`font-mono text-[12px] text-umber break-all`,children:Object.entries(e.data).filter(([e])=>![`project`,`room`].includes(e)).map(([e,t])=>`${e}=${String(t)}`).join(` · `)}),e.actions.filter(e=>e.type!==`none`).map(e=>(0,z.jsxs)(`div`,{className:`mt-1 text-[13px] pl-2 border-l-2 ${e.sent?`border-leaf`:e.skipped?`border-amber`:`border-dust`}`,children:[(0,z.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.06em] mr-1.5 ${e.sent?`text-leaf`:e.skipped?`text-amber`:`text-tan`}`,children:e.sent?`sent`:e.skipped?`skipped · ${e.skipped}`:e.dryRun?`would send`:`sending`}),kd(e.prefix)&&(0,z.jsx)(Oa,{prefix:e.prefix}),(0,z.jsx)(`span`,{className:`text-walnut`,children:e.text}),` `,(0,z.jsxs)(`span`,{className:`font-mono text-[12px] text-ink3`,children:[`→ `,e.to??`#${e.room}`]}),e.runId&&(0,z.jsx)(`span`,{className:`ml-2 font-mono text-[11px] text-tan`,children:e.runId})]},e.ruleId))]})]},e.id))]})}function Md(){let{data:e}=K(`/events?limit=40`,3e4),t=e?.config;if(!t)return null;let n=t.rules.filter(e=>e.enabled).length,r=Date.now()-864e5,i=(e?.recent??[]).filter(e=>e.ts>r).flatMap(e=>e.actions).filter(e=>e.sent).length;return(0,z.jsxs)(`div`,{className:`flex items-center gap-2 font-mono text-[11px] text-ink3 px-1`,children:[(0,z.jsx)(`span`,{className:`uppercase tracking-[.1em] text-tan`,children:`events`}),t.live?(0,z.jsx)(W,{tone:`bad`,children:`live`}):t.dryRun?(0,z.jsx)(W,{tone:`outline`,children:`dry-run`}):(0,z.jsx)(W,{tone:`warn`,children:`armed · bus writes off`}),(0,z.jsxs)(`span`,{children:[n,`/`,t.rules.length,` rules on · `,i,` sent in 24 h`]}),(0,z.jsx)(B,{to:`/ops/events`,className:`ml-auto text-ember-deep`,children:`Ops → Events`})]})}var Nd={complete:{label:`complete`,tone:`ok`,dot:`bg-leaf border-leaf`,ring:`text-leaf`,hint:`all tasks ticked`},ongoing:{label:`ongoing`,tone:`david`,dot:`bg-ember border-ember`,ring:`text-ember`,hint:`streams in flight or tasks ticked`},planned:{label:`planned`,tone:`neutral`,dot:`bg-paper border-umber`,ring:`text-umber`,hint:`tasks written, none started`},pending:{label:`pending`,tone:`outline`,dot:`bg-paper border-dust border-dashed`,ring:`text-tan`,hint:`no PHASE*_TASKS.md yet — run /plan-phase`}};function Pd({pct:e,cls:t,size:n=44}){let r=(n-6)/2,i=2*Math.PI*r;return(0,z.jsxs)(`svg`,{width:n,height:n,viewBox:`0 0 ${n} ${n}`,className:t,"aria-hidden":!0,children:[(0,z.jsx)(`circle`,{cx:n/2,cy:n/2,r,fill:`none`,stroke:`currentColor`,strokeOpacity:`.18`,strokeWidth:`4`}),(0,z.jsx)(`circle`,{cx:n/2,cy:n/2,r,fill:`none`,stroke:`currentColor`,strokeWidth:`4`,strokeLinecap:`round`,strokeDasharray:`${e/100*i} ${i}`,transform:`rotate(-90 ${n/2} ${n/2})`})]})}function Fd({project:e,phases:t,canWrite:n,prd:r}){let i=K(`/projects/${e}/agents`,3e4).data,[a,o]=(0,N.useState)(null),[s,c]=(0,N.useState)(null),[l,u]=(0,N.useState)(null),d=`groundwork-console.roadmap.last.${e}`,[f,p]=(0,N.useState)(()=>{try{return JSON.parse(localStorage.getItem(d)??`{}`)}catch{return{}}}),m=(e,t,n)=>p(r=>{let i={...r,[e]:{verb:t,to:n,ts:Date.now()}};return localStorage.setItem(d,JSON.stringify(i)),i}),h=e=>{let t=Math.floor((Date.now()-e)/6e4);return t<1?`just now`:t<60?`${t} min ago`:`${Math.floor(t/60)} h ago`},g=async(t,r)=>{if(!n){c(`bus writes are off — click the header badge (read-only · v0.1) and type ENABLE, then retry`);return}if(r===`plan`&&!i?.aide){c(`no live aide for ${e} — start one (coord-aide) in #room, or DM the coordinator from Bus`);return}if(r!==`plan`&&!i?.coordinator){c(`no live coordinator for ${e}`);return}o(`${t.id}:${r}`),c(null);try{let n=await Ia(`/actions/phase/${e}/${t.id}/${r}`),i=n.args?.to??``;n.status===`ok`&&m(t.id,r,i),c(n.status===`ok`?`sent → ${i}`:n.error??n.log?.slice(-1)[0]??`failed`)}catch(e){c(e.message)}finally{o(null)}},_=async t=>{if(!n){c(`bus writes are off — switch them on in the header, then retry`);return}o(t),c(null);try{let n=await Ia(`/actions/project/${e}/${t}`),r=n.args?.to??``;c(n.status===`ok`?`sent → ${r} — continue in its thread`:n.error??n.log?.slice(-1)[0]??`failed`),n.status===`ok`&&r&&fd(r)}catch(e){c(e.message)}finally{o(null)}},v=t.filter(e=>e.state===`complete`).length,y=t.find(e=>e.state===`ongoing`)??t.find(e=>e.state===`planned`)??t.find(e=>e.state===`pending`);return(0,z.jsxs)(H,{children:[(0,z.jsx)(U,{title:`Roadmap`,icon:`phases`,eyebrow:`PRODUCTION_ROADMAP · phases/`,path:`${v}/${t.length} complete${y?` · next: ${y.title}`:``}`,children:(0,z.jsxs)(`span`,{className:`flex items-center gap-1.5 flex-wrap`,children:[i?.aide?(0,z.jsx)(id,{id:i.aide,prefix:`aide`}):(0,z.jsx)(`span`,{className:`font-mono text-[11px] text-tan`,children:`no live aide`}),i?.coordinator?(0,z.jsx)(id,{id:i.coordinator,prefix:`coord`}):(0,z.jsx)(`span`,{className:`font-mono text-[11px] text-tan`,children:`no live coordinator`})]})}),t.length===0&&(0,z.jsxs)(`div`,{className:`px-3 py-3 grid gap-2 text-[13px]`,children:[r==null?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`div`,{className:`text-walnut`,children:[`No PRD yet. The roadmap starts from `,(0,z.jsx)(`code`,{children:`docs/PRD.md`}),` — write it with your aide (it runs `,(0,z.jsx)(`code`,{children:`/create-prd`}),` and asks you what it needs).`]}),(0,z.jsxs)(`div`,{className:`flex gap-2 items-center flex-wrap`,children:[(0,z.jsx)(G,{size:`sm`,tone:`primary`,disabled:!!a||!i?.aide,title:i?.aide?`DM ${i.aide}: run /create-prd with me`:`no live aide — spawn one under Ops → Fleets`,onClick:()=>_(`create-prd`),children:a===`create-prd`?(0,z.jsx)(Na,{size:12}):`Write the PRD with the aide`}),i?.aide&&(0,z.jsx)(G,{size:`sm`,tone:`ghost`,onClick:()=>fd(i.aide),children:`Open the aide's thread`}),!i?.aide&&(0,z.jsx)(B,{to:`/ops/fleets`,className:`hover:no-underline`,children:(0,z.jsx)(G,{size:`sm`,children:`Spawn aide`})})]})]}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`div`,{className:`text-walnut`,children:[`PRD is `,(0,z.jsx)(`b`,{children:r.status??`present`}),r.roadmap?` and a roadmap exists`:``,` — no `,(0,z.jsx)(`code`,{children:`docs/phases/`}),` yet. Kickstart builds the roadmap + doc scaffold (roadmap, tech stack, architecture, decisions, workstreams, queue, done, facts); phases follow with `,(0,z.jsx)(`code`,{children:`/plan-phase 1`}),`.`]}),(0,z.jsxs)(`div`,{className:`flex gap-2 items-center flex-wrap`,children:[(0,z.jsx)(G,{size:`sm`,tone:`primary`,disabled:!!a||!i?.aide,title:i?.aide?`DM ${i.aide}: run /kickstart in ${e}`:`no live aide — spawn one under Ops → Fleets`,onClick:()=>_(`kickstart`),children:a===`kickstart`?(0,z.jsx)(Na,{size:12}):`Kickstart with the aide`}),i?.aide&&(0,z.jsx)(G,{size:`sm`,tone:`ghost`,onClick:()=>fd(i.aide),children:`Open the aide's thread`}),!i?.aide&&(0,z.jsx)(B,{to:`/ops/fleets`,className:`hover:no-underline`,children:(0,z.jsx)(G,{size:`sm`,children:`Spawn aide`})})]})]}),s&&(0,z.jsx)(`div`,{className:`font-mono text-[12px] ${/^sent/.test(s)?`text-leaf`:`text-brick`}`,children:s})]}),t.length>0&&(0,z.jsxs)(`div`,{className:`px-3 pt-3 pb-2 overflow-x-auto`,children:[(0,z.jsx)(`ol`,{className:`flex items-start gap-0 min-w-max`,children:t.map((e,n)=>{let r=Nd[e.state],i=e.total?Math.round(e.done/e.total*100):0,o=n===t.length-1;return(0,z.jsxs)(`li`,{className:`flex items-start`,children:[(0,z.jsxs)(`div`,{className:`w-[190px] grid gap-1.5 justify-items-center text-center`,children:[(0,z.jsxs)(`button`,{onClick:()=>u(t=>t===e.id?null:e.id),className:`relative border-0 bg-transparent p-0 cursor-pointer rounded-full ${l===e.id?`ring-2 ring-ember ring-offset-2 ring-offset-paper`:``}`,title:`show tasks`,children:[(0,z.jsx)(Pd,{pct:e.state===`complete`?100:i,cls:r.ring}),(0,z.jsx)(`span`,{className:`absolute inset-0 flex items-center justify-center font-mono font-bold text-[12px] ${r.ring}`,children:e.state===`complete`?`✓`:e.n})]}),(0,z.jsx)(`button`,{onClick:()=>u(t=>t===e.id?null:e.id),className:`font-semibold text-[13px] leading-tight line-clamp-2 px-1 border-0 bg-transparent cursor-pointer text-walnut hover:text-ember-deep`,title:e.title,children:e.title}),(0,z.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,z.jsx)(W,{tone:r.tone,children:r.label}),(0,z.jsxs)(`span`,{className:`font-mono text-[11px] text-ink3`,children:[e.total?`${e.done}/${e.total}`:`—`,e.streams?` · ${e.streams} stream${e.streams===1?``:`s`}`:``]})]}),f[e.id]&&(0,z.jsxs)(`div`,{className:`font-mono text-[10px] text-ink3 flex items-center gap-1 justify-center flex-wrap`,title:new Date(f[e.id].ts).toLocaleString(),children:[(0,z.jsx)(`span`,{className:`uppercase tracking-[.06em]`,children:f[e.id].verb===`kickoff`?`kicked off`:f[e.id].verb===`plan`?`plan requested`:`audit requested`}),(0,z.jsx)(`span`,{children:`→`}),(0,z.jsx)(id,{id:f[e.id].to,bare:!0}),(0,z.jsx)(`span`,{className:`text-tan`,children:h(f[e.id].ts)})]}),(0,z.jsxs)(`div`,{className:`flex gap-1 flex-wrap justify-center`,children:[(e.tasks||e.readme)&&(0,z.jsx)(B,{to:`/docs/${encodeURIComponent(e.tasks??e.readme)}`,className:`hover:no-underline`,children:(0,z.jsx)(G,{size:`sm`,tone:`ghost`,children:`Open`})}),e.state===`pending`&&(0,z.jsx)(G,{size:`sm`,tone:`primary`,disabled:!!a,title:`DM the aide: run /plan-phase`,onClick:()=>g(e,`plan`),children:a===`${e.id}:plan`?(0,z.jsx)(Na,{size:12}):`Plan`}),e.state===`planned`&&(0,z.jsx)(G,{size:`sm`,tone:`primary`,disabled:!!a,title:`GO to the coordinator`,onClick:()=>g(e,`kickoff`),children:a===`${e.id}:kickoff`?(0,z.jsx)(Na,{size:12}):`Kick off`}),e.state===`ongoing`&&(0,z.jsx)(G,{size:`sm`,disabled:!!a,title:`ask the coordinator to run /coord-audit`,onClick:()=>g(e,`audit`),children:a===`${e.id}:audit`?(0,z.jsx)(Na,{size:12}):`Audit`})]})]}),!o&&(0,z.jsx)(`div`,{className:`mt-[21px] h-[3px] w-6 rounded ${e.state===`complete`?`bg-leaf`:`bg-sand`}`})]},e.id)})}),l&&(0,z.jsx)(Gu,{project:e,phase:t.find(e=>e.id===l),onClose:()=>u(null)}),s&&(0,z.jsx)(`div`,{className:`mt-2 font-mono text-[12px] flex items-center gap-2 ${/^sent/.test(s)?`text-leaf`:`text-brick`}`,children:/^sent → /.test(s)?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`span`,{children:`sent →`}),(0,z.jsx)(id,{id:s.replace(/^sent → /,``),bare:!0})]}):s}),(0,z.jsx)(`div`,{className:`mt-2 font-mono text-[11px] text-tan flex gap-3 flex-wrap`,children:Object.keys(Nd).map(e=>(0,z.jsxs)(`span`,{children:[(0,z.jsx)(`span`,{className:`inline-block w-2 h-2 rounded-full border mr-1 align-middle ${Nd[e].dot}`}),Nd[e].label,` — `,Nd[e].hint]},e))})]})]})}function Id({phases:e}){return e?.length?(0,z.jsxs)(`span`,{className:`inline-flex items-center gap-1`,title:e.map(e=>`${e.n}: ${e.state}${e.total?` ${e.done}/${e.total}`:``}`).join(` · `),children:[e.map((e,t)=>(0,z.jsx)(`span`,{className:`inline-block w-2.5 h-2.5 rounded-full border ${Nd[e.state].dot}`},t)),(0,z.jsxs)(`span`,{className:`ml-1 font-mono text-[11px] text-ink3`,children:[e.filter(e=>e.state===`complete`).length,`/`,e.length]})]}):(0,z.jsx)(`span`,{className:`font-mono text-[11px] text-tan`,children:`no phases`})}function Ld({project:e,canWrite:t,onClose:n,initialRole:r}){let{data:i}=K(`/actions/spawn/options?project=${encodeURIComponent(e)}`),[a,o]=(0,N.useState)(r??`worker`),[s,c]=(0,N.useState)(`claude`),[l,u]=(0,N.useState)(``),[d,f]=(0,N.useState)(``),[p,m]=(0,N.useState)(``),[h,g]=(0,N.useState)(``),[_,v]=(0,N.useState)(8),[y,b]=(0,N.useState)(!1),[x,S]=(0,N.useState)(null),[C,w]=(0,N.useState)(null),T=or(),{runs:E}=Ua(),D=x?E.find(e=>e.id===x.id)??x:null;(0,N.useEffect)(()=>{i&&!l&&u(i.suggest[a]??``)},[i,a,l]),(0,N.useEffect)(()=>{i&&u(i.suggest[a]??``)},[a]);let O=async()=>{b(!0),w(null);try{let t=await Ia(`/actions/spawn`,{project:e,role:a,harness:s,agentId:l,lane:d||void 0,model:p||void 0,note:h||void 0,waitSeconds:_});if(!t.status)throw Error(t.error??`failed`);S(t)}catch(e){w(e.message)}finally{b(!1)}},k=i?.roles.find(e=>e.id===a)?.skill??``;return(0,z.jsx)(`div`,{className:`fixed inset-0 z-[60] bg-walnut/30 flex items-start justify-center pt-[8vh] whitespace-normal text-left`,onMouseDown:e=>{e.target===e.currentTarget&&!y&&n()},children:(0,z.jsxs)(`div`,{className:`w-[640px] bg-paper border border-sand rounded-kit shadow-panel`,children:[(0,z.jsxs)(`div`,{className:`px-4 py-3 border-b border-sand font-display font-bold text-[18px] text-umber`,children:[`Spawn agent · `,e]}),(0,z.jsxs)(`div`,{className:`p-4 grid gap-3 text-[13px]`,children:[(0,z.jsxs)(`div`,{className:`flex gap-1.5 flex-wrap items-center text-umber`,children:[(0,z.jsx)(W,{tone:t?`warn`:`outline`,children:t?`bus writes on`:`bus writes OFF`}),(0,z.jsxs)(`span`,{children:[`tmux window `,(0,z.jsxs)(`code`,{children:[`fleet-`,e]}),` · cwd `,(0,z.jsx)(`code`,{children:i?.repoPath?.replace(/^\/Users\/[^/]+/,`~`)}),i?.room?(0,z.jsxs)(z.Fragment,{children:[` · room `,(0,z.jsxs)(`code`,{children:[`#`,i.room]})]}):` · no room linked`]})]}),!t&&(0,z.jsx)(`div`,{className:`text-brick`,children:`Turn on bus writes (header toggle) first — spawning launches a process and types the role invocation into the new pane.`}),(0,z.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,z.jsxs)(`label`,{className:`grid gap-1`,children:[(0,z.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Role · playbook card`}),(0,z.jsx)(`select`,{value:a,onChange:e=>o(e.target.value),className:`px-2.5 py-2 border border-dust rounded-kit bg-paper text-walnut font-mono`,children:(i?.roles??[]).map(e=>(0,z.jsxs)(`option`,{value:e.id,children:[e.id,` · `,e.skill]},e.id))})]}),(0,z.jsxs)(`label`,{className:`grid gap-1`,children:[(0,z.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Harness`}),(0,z.jsx)(`select`,{value:s,onChange:e=>c(e.target.value),className:`px-2.5 py-2 border border-dust rounded-kit bg-paper text-walnut font-mono`,children:(i?.harnesses??[]).map(e=>(0,z.jsxs)(`option`,{value:e.id,children:[e.id,` · `,e.cmd]},e.id))})]}),(0,z.jsxs)(`label`,{className:`grid gap-1`,children:[(0,z.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Agent id`}),(0,z.jsx)(`input`,{value:l,onChange:e=>u(e.target.value.trim()),className:`px-2.5 py-2 border border-dust rounded-kit bg-paper text-walnut font-mono`})]}),a===`worker`?(0,z.jsxs)(`label`,{className:`grid gap-1`,children:[(0,z.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Lane`}),(0,z.jsx)(`input`,{value:d,onChange:e=>f(e.target.value),placeholder:`repo-owner · rendering · api`,className:`px-2.5 py-2 border border-dust rounded-kit bg-paper text-walnut font-mono`})]}):(0,z.jsxs)(`label`,{className:`grid gap-1`,children:[(0,z.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Model (Claude only, optional)`}),(0,z.jsx)(`input`,{value:p,onChange:e=>m(e.target.value),placeholder:`claude-sonnet-4-6`,className:`px-2.5 py-2 border border-dust rounded-kit bg-paper text-walnut font-mono`})]})]}),(0,z.jsxs)(`label`,{className:`grid gap-1`,children:[(0,z.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Extra instruction (optional, injected after the skill)`}),(0,z.jsx)(`input`,{value:h,onChange:e=>g(e.target.value),placeholder:`e.g. mission: re-verify the design doc after PR4`,className:`px-2.5 py-2 border border-dust rounded-kit bg-paper text-walnut`})]}),(0,z.jsxs)(`div`,{className:`flex items-center gap-3 text-umber`,children:[(0,z.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Start wait`}),(0,z.jsx)(`input`,{type:`range`,min:3,max:30,value:_,onChange:e=>v(Number(e.target.value))}),(0,z.jsxs)(`span`,{className:`font-mono text-[12px]`,children:[_,` s`]}),(0,z.jsx)(`span`,{className:`text-[12px]`,children:`before injecting the skill`})]}),(0,z.jsxs)(`div`,{className:`font-mono text-[12px] text-ink3 bg-linen rounded px-2 py-1.5`,children:[`will type: `,(0,z.jsx)(`b`,{className:`text-walnut`,children:i?.harnesses.find(e=>e.id===s)?.cmd}),` → wait `,_,` s → `,s===`claude`?`/color · `:``,(0,z.jsxs)(`b`,{className:`text-walnut`,children:[k,` --id=`,l||`…`,d?` --lane=${d}`:``,i?.room?` --room=${i.room}`:``]}),` → wait for register (≤ 90 s)`]}),C&&(0,z.jsx)(`div`,{className:`text-brick`,children:C}),D&&(0,z.jsxs)(`div`,{className:`p-2 rounded-kit border ${D.status===`ok`?`border-moss-line bg-moss-wash/50`:D.status===`failed`?`border-brick-line bg-brick-wash/50`:`border-amber-line bg-amber-wash/40`}`,children:[(0,z.jsxs)(`div`,{className:`font-mono text-[12px]`,children:[D.status===`running`?(0,z.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-amber`,children:[(0,z.jsx)(Na,{}),` `,(0,z.jsx)(W,{tone:`warn`,children:`running`})]}):(0,z.jsx)(W,{tone:D.status===`ok`?`ok`:`bad`,children:D.status}),` `,(0,z.jsx)(`b`,{children:D.label}),D.status===`running`&&(0,z.jsx)(`span`,{className:`ml-2 text-tan`,children:`live — you can close this; it keeps running (see Runs)`})]}),(0,z.jsxs)(`pre`,{className:`m-0 mt-1 font-mono text-[12px] whitespace-pre-wrap max-h-[30vh] overflow-auto`,children:[D.log.join(`
29
+ `),D.error?`
30
+ `+D.error:``]})]})]}),(0,z.jsxs)(`div`,{className:`px-4 py-3 border-t border-sand flex justify-end gap-2`,children:[(0,z.jsx)(G,{size:`sm`,onClick:n,disabled:y,children:D?D.status===`running`?`Close (keeps running)`:`Close`:`Cancel`}),D&&(0,z.jsx)(G,{size:`sm`,onClick:()=>{n(),T(`/monitor`)},children:`Open Monitor`}),!D&&(0,z.jsx)(G,{size:`sm`,tone:`primary`,onClick:O,disabled:!t||y||!l,children:y?(0,z.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,z.jsx)(Na,{}),` Starting…`]}):`Spawn`})]})]})})}function Rd({project:e,fleet:t,canWrite:n,compact:r=!1}){let i=K(`/bus/agents`,2e4).data??[],[a,o]=(0,N.useState)(null),s=e=>e?i.find(t=>t.agentId===e):void 0,c=({role:e,id:t,wide:n})=>{let r=s(t);return t?(0,z.jsxs)(`div`,{className:`px-2.5 py-1.5 rounded-kit border border-sand bg-paper ${n?``:`min-w-[170px]`}`,children:[(0,z.jsx)(id,{id:t,size:`md`,bare:!0}),(0,z.jsxs)(`span`,{className:`block font-mono text-[10px] uppercase tracking-[.08em] text-tan mt-0.5`,children:[e,r?.pane?` · ${r.pane}`:``]})]}):(0,z.jsxs)(`button`,{onClick:()=>o(e),className:`grid grid-cols-[auto_1fr] gap-2 items-center px-2.5 py-1.5 rounded-kit border border-dashed border-dust bg-transparent text-left cursor-pointer hover:border-ember ${n?``:`min-w-[150px]`}`,title:`spawn a ${e}`,children:[(0,z.jsx)(`span`,{className:`inline-block w-2 h-2 rounded-full border border-dashed border-dust`}),(0,z.jsxs)(`span`,{className:`min-w-0`,children:[(0,z.jsx)(`span`,{className:`block font-mono text-[12px] text-tan`,children:`missing`}),(0,z.jsxs)(`span`,{className:`block font-mono text-[10px] uppercase tracking-[.08em] text-tan`,children:[e,` · spawn`]})]})]})},l=({v:e=!1})=>(0,z.jsx)(`span`,{className:e?`w-px h-4 bg-dust mx-auto`:`h-px w-5 bg-dust self-center`}),u=t.roles.workers;return(0,z.jsxs)(`div`,{className:`grid gap-1 ${r?`text-[12px]`:``}`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,z.jsx)(`div`,{className:`px-2.5 py-1.5 rounded-kit border border-ember bg-ember-wash/40 font-mono font-semibold text-[12px] text-ember-deep`,children:`David`}),(0,z.jsx)(l,{}),(0,z.jsx)(c,{role:`aide`,id:t.roles.aide}),(0,z.jsx)(l,{}),(0,z.jsx)(c,{role:`coordinator`,id:t.roles.coordinator}),(0,z.jsx)(l,{}),(0,z.jsxs)(`div`,{className:`grid gap-1`,children:[(0,z.jsxs)(`div`,{className:`flex gap-1 flex-wrap`,children:[(0,z.jsx)(c,{role:`qa`,id:t.roles.qa}),(0,z.jsx)(c,{role:`ci`,id:t.roles.ci})]}),(0,z.jsxs)(`div`,{className:`flex gap-1 flex-wrap`,children:[u.map(e=>(0,z.jsx)(c,{role:`worker`,id:e},e)),(0,z.jsx)(c,{role:`worker`,id:null})]})]})]}),!r&&(0,z.jsx)(`div`,{className:`font-mono text-[11px] text-tan`,children:`you talk to the aide · the coordinator faces the fleet · qa gates · ci ships · workers own lanes. Click a filled slot to watch its pane, a dashed one to spawn that role.`}),a&&(0,z.jsx)(Ld,{project:e,canWrite:n,initialRole:a,onClose:()=>o(null)})]})}var zd={absent:`bad`,partial:`warn`,present:`ok`};function Bd({fleet:e}){if(!e)return null;let t=e.state===`absent`?`no fleet`:e.state===`partial`?`fleet partial · missing ${e.missing.join(`, `)}`:`fleet · ${e.live.length} live`;return(0,z.jsx)(W,{tone:zd[e.state],children:t})}function Vd({project:e,canWrite:t}){let{data:n,refresh:r}=K(`/projects/${e}/fleet`,2e4),[i,a]=(0,N.useState)(!1);return!n||n.state===`present`?null:(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`div`,{className:`rounded-kit border px-4 py-3 grid gap-2 ${n.state===`absent`?`border-brick-line bg-brick-wash/40`:`border-amber-line bg-amber-wash/50`}`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-3 flex-wrap`,children:[(0,z.jsx)(Bd,{fleet:n}),(0,z.jsx)(`span`,{className:`text-[13px] text-umber`,children:n.state===`absent`?(0,z.jsxs)(z.Fragment,{children:[`No agents are live for `,(0,z.jsx)(`b`,{className:`text-walnut`,children:e}),`. Boards and docs still read fine; Plan / Fix / Kick off need someone to talk to.`]}):(0,z.jsxs)(z.Fragment,{children:[`Missing `,(0,z.jsx)(`b`,{className:`text-walnut`,children:n.missing.join(`, `)}),`.`]})}),(0,z.jsxs)(`span`,{className:`ml-auto flex gap-1.5`,children:[(0,z.jsx)(G,{size:`sm`,tone:`primary`,onClick:()=>a(!0),children:`Spawn fleet…`}),(0,z.jsx)(B,{to:`/ops/fleets`,className:`hover:no-underline`,children:(0,z.jsx)(G,{size:`sm`,children:`Fleets`})})]})]}),(0,z.jsx)(Rd,{project:e,fleet:n,canWrite:t,compact:!0})]}),i&&(0,z.jsx)(Hd,{project:e,templates:n.templates,missing:n.missing,canWrite:t,onClose:()=>{a(!1),r()}})]})}function Hd({project:e,templates:t,missing:n,canWrite:r,onClose:i}){let[a,o]=(0,N.useState)(t.find(e=>e.id===`standard`)?.id??t[0]?.id??`standard`),[s,c]=(0,N.useState)(`claude`),[l,u]=(0,N.useState)(`claude`),[d,f]=(0,N.useState)(null),[p,m]=(0,N.useState)(``),[h,g]=(0,N.useState)(8),[_,v]=(0,N.useState)(!1),[y,b]=(0,N.useState)(null),[x,S]=(0,N.useState)(null),{runs:C}=Ua(),w=y?C.find(e=>e.id===y.id)??y:null,T=t.find(e=>e.id===a),E=d??T?.workers??0;return(0,z.jsx)(`div`,{className:`fixed inset-0 z-[60] bg-walnut/30 flex items-start justify-center pt-[8vh] whitespace-normal text-left`,onMouseDown:e=>{e.target===e.currentTarget&&!_&&i()},children:(0,z.jsxs)(`div`,{className:`w-[680px] bg-paper border border-sand rounded-kit shadow-panel`,children:[(0,z.jsxs)(`div`,{className:`px-4 py-3 border-b border-sand font-display font-bold text-[18px] text-umber`,children:[`Spawn a fleet · `,e]}),(0,z.jsxs)(`div`,{className:`p-4 grid gap-3 text-[13px]`,children:[(0,z.jsxs)(`div`,{className:`text-umber`,children:[`Shapes from the playbook layout. Agents are launched one after another in tmux window `,(0,z.jsxs)(`code`,{children:[`fleet-`,e]}),`, each injected with its role card and `,(0,z.jsx)(`code`,{children:`--id`}),`, and the console waits for each to register.`,n.length>0&&(0,z.jsxs)(z.Fragment,{children:[` Currently missing: `,(0,z.jsx)(`b`,{className:`text-walnut`,children:n.join(`, `)}),`.`]})]}),!r&&(0,z.jsx)(`div`,{className:`text-brick`,children:`Turn on bus writes (header toggle) first.`}),(0,z.jsx)(`div`,{className:`grid gap-1.5`,children:t.map(e=>(0,z.jsxs)(`label`,{className:`grid grid-cols-[auto_1fr] gap-2 items-start px-3 py-2 rounded-kit border cursor-pointer ${a===e.id?`border-ember bg-ember-wash/40`:`border-sand`}`,children:[(0,z.jsx)(`input`,{type:`radio`,name:`tpl`,checked:a===e.id,onChange:()=>{o(e.id),f(null)}}),(0,z.jsxs)(`span`,{children:[(0,z.jsx)(`b`,{children:e.label}),(0,z.jsx)(`span`,{className:`block text-[12px] text-umber`,children:e.hint}),(0,z.jsx)(`span`,{className:`block font-mono text-[11px] text-tan`,children:[...e.roles,...Array.from({length:e.workers},(e,t)=>`worker-${t+1}`)].join(` · `)})]})]},e.id))}),(0,z.jsxs)(`div`,{className:`grid grid-cols-3 gap-3`,children:[(0,z.jsxs)(`label`,{className:`grid gap-1`,children:[(0,z.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Harness`}),(0,z.jsx)(`select`,{value:s,onChange:e=>c(e.target.value),className:`px-2.5 py-2 border border-dust rounded-kit bg-paper text-walnut font-mono`,children:[`claude`,`grok`,`codex`,`opencode`].map(e=>(0,z.jsx)(`option`,{children:e},e))})]}),T?.roles.includes(`ci`)&&(0,z.jsxs)(`label`,{className:`grid gap-1`,children:[(0,z.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`CI harness (cheap)`}),(0,z.jsx)(`select`,{value:l,onChange:e=>u(e.target.value),className:`px-2.5 py-2 border border-dust rounded-kit bg-paper text-walnut font-mono`,children:[`claude`,`grok`,`codex`,`opencode`].map(e=>(0,z.jsx)(`option`,{children:e},e))})]}),(0,z.jsxs)(`label`,{className:`grid gap-1`,children:[(0,z.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Workers`}),(0,z.jsx)(`input`,{type:`number`,min:0,max:8,value:E,onChange:e=>f(Number(e.target.value)),className:`px-2.5 py-2 border border-dust rounded-kit bg-paper text-walnut font-mono`})]})]}),E>0&&(0,z.jsxs)(`label`,{className:`grid gap-1`,children:[(0,z.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Lanes (comma-separated, optional)`}),(0,z.jsx)(`input`,{value:p,onChange:e=>m(e.target.value),placeholder:`rendering, gameplay, infra`,className:`px-2.5 py-2 border border-dust rounded-kit bg-paper text-walnut font-mono`})]}),(0,z.jsxs)(`div`,{className:`flex items-center gap-3 text-umber`,children:[(0,z.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Start wait`}),(0,z.jsx)(`input`,{type:`range`,min:3,max:30,value:h,onChange:e=>g(Number(e.target.value))}),(0,z.jsxs)(`span`,{className:`font-mono text-[12px]`,children:[h,` s per agent`]}),(0,z.jsxs)(`span`,{className:`text-[12px]`,children:[`· total ≈ `,(T?.roles.length??0)+E,` × (`,h,` s + register)`]})]}),x&&(0,z.jsx)(`div`,{className:`text-brick`,children:x}),w&&(0,z.jsxs)(`div`,{className:`p-2 rounded-kit border ${w.status===`ok`?`border-moss-line bg-moss-wash/50`:w.status===`failed`?`border-brick-line bg-brick-wash/50`:`border-amber-line bg-amber-wash/40`}`,children:[(0,z.jsxs)(`div`,{className:`font-mono text-[12px]`,children:[w.status===`running`?(0,z.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-amber`,children:[(0,z.jsx)(Na,{}),` `,(0,z.jsx)(W,{tone:`warn`,children:`running`})]}):(0,z.jsx)(W,{tone:w.status===`ok`?`ok`:`bad`,children:w.status}),` `,(0,z.jsx)(`b`,{children:w.label})]}),(0,z.jsx)(`pre`,{className:`m-0 mt-1 font-mono text-[12px] whitespace-pre-wrap max-h-[30vh] overflow-auto`,children:w.log.join(`
31
+ `)})]})]}),(0,z.jsxs)(`div`,{className:`px-4 py-3 border-t border-sand flex justify-end gap-2`,children:[(0,z.jsx)(G,{size:`sm`,onClick:i,disabled:_,children:w?`Close (keeps running)`:`Cancel`}),!w&&(0,z.jsx)(G,{size:`sm`,tone:`primary`,onClick:async()=>{v(!0),S(null);try{let t=await Ia(`/actions/spawn-fleet`,{project:e,template:a,harness:s,ciHarness:l,workers:E,lanes:p.split(`,`).map(e=>e.trim()).filter(Boolean),waitSeconds:h});if(!t.status)throw Error(t.error??`failed`);b(t)}catch(e){S(e.message)}finally{v(!1)}},disabled:!r||_||!T,children:_?(0,z.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,z.jsx)(Na,{}),` Starting…`]}):`Spawn ${(T?.roles.length??0)+E} agents`})]})]})})}var Ud=e=>{let t=Date.now()-e,n=Math.floor(t/6e4);if(n<1)return`just now`;if(n<60)return`${n} min ago`;let r=Math.floor(n/60);return r<24?`${r} h ago`:`${Math.floor(r/24)} d ago`},Wd=e=>e===`workstreams.v1`?[e,`ok`]:e===`workstreams.lanes-v0`?[`lanes-v0 · legacy`,`warn`]:e===`unknown`?[`unknown workstreams grammar`,`bad`]:[`no WORKSTREAMS.md`,`outline`];function Gd(){let{projects:e,setCurrent:t,error:n,refresh:r}=Ba(),i=K(`/kit`).data,a=K(`/bus/agents`,3e4).data??[],o=a.filter(e=>e.liveness===`live`).length,s=a.filter(e=>e.liveness===`dead`),c=K(`/needs-david`,3e4).data??[],[l,u]=(0,N.useState)(!1);return(0,z.jsxs)(`div`,{className:`p-4 pb-10 grid gap-[18px] content-start`,children:[l&&(0,z.jsx)(Ja,{onClose:()=>{u(!1),r()}}),(0,z.jsxs)(`div`,{className:`flex items-baseline justify-between`,children:[(0,z.jsxs)(`div`,{className:`flex items-baseline gap-3 flex-wrap`,children:[(0,z.jsx)(`span`,{className:`font-display font-bold text-[34px] leading-[1.1] tracking-[-.015em] text-ember`,children:`Projects`}),(0,z.jsx)(G,{size:`sm`,tone:`primary`,onClick:()=>u(!0),title:`register a repo path with the console`,children:`Add project`}),(0,z.jsxs)(`span`,{className:`ml-3 text-[13px] text-umber`,children:[`Groundwork-managed repos with a seam in `,(0,z.jsx)(`code`,{children:`docs/`}),` · from `,(0,z.jsx)(`code`,{children:`groundwork-console.config.json`})]})]}),(0,z.jsxs)(`div`,{className:`flex gap-2.5 items-center flex-wrap`,children:[i?.requires&&!i.requires.ok&&(0,z.jsx)(`span`,{className:`font-mono text-[11px] px-2 py-1 rounded-full bg-ember-wash text-ember-deep border border-ember/40`,title:Object.entries(i.requires).filter(([e])=>[`seam`,`mcp`,`groundwork`,`playbook`].includes(e)).map(([e,t])=>`${e}: has ${t.installed??`none`}, needs ${t.required}`).join(`
32
+ `),children:`kit version mismatch`}),i?.source===`installed packages`&&(0,z.jsx)(`span`,{className:`font-mono text-[11px] text-tan`,title:`no kit checkout on this machine — versions come from the installed npm packages`,children:`npm-installed`}),i?.packages?Object.entries({kit:{version:i.kitVersion},...i.packages}).map(([e,t])=>(0,z.jsxs)(`span`,{className:`font-mono font-medium text-[12px] px-[9px] py-1.5 border border-sand rounded-kit bg-paper text-umber`,children:[e,` `,(0,z.jsx)(`b`,{className:`text-walnut`,children:t.version})]},e)):(0,z.jsx)(`span`,{className:`text-[13px] text-umber`,children:`kit.json unavailable`}),(0,z.jsx)(`span`,{className:`text-[13px] text-umber`,children:`· from kit.json`})]})]}),n&&(0,z.jsxs)(H,{className:`px-4 py-3 text-[13px] text-brick`,children:[`API unreachable (`,n,`) — start it with `,(0,z.jsx)(`code`,{children:`pnpm dev:api`}),`.`]}),(0,z.jsx)(`div`,{className:`grid grid-cols-[repeat(auto-fill,minmax(300px,1fr))] gap-3.5`,children:[...e].sort((e,t)=>(t.lastActive??0)-(e.lastActive??0)).map(e=>{let[n,r]=Wd(e.schema);return(0,z.jsx)(B,{to:`/board`,onClick:()=>t(e.name),className:`block hover:no-underline text-inherit h-full`,children:(0,z.jsxs)(H,{className:`px-4 py-3.5 hover:border-dust h-full flex flex-col`,children:[(0,z.jsx)(`div`,{className:`font-display font-bold text-[20px] text-ember break-words`,title:e.name,children:e.name}),(0,z.jsxs)(`div`,{className:`mt-1 flex gap-1.5 flex-wrap`,children:[(0,z.jsx)(Bd,{fleet:e.fleet}),e.versionMarker?e.behind?(0,z.jsxs)(W,{tone:`warn`,children:[`groundwork `,e.versionMarker,` → `,e.kitGroundwork]}):(0,z.jsxs)(W,{tone:`ok`,children:[`groundwork `,e.versionMarker]}):(0,z.jsx)(W,{tone:`outline`,children:`no groundwork marker`})]}),(0,z.jsxs)(`div`,{className:`font-mono text-[12px] leading-[1.6] text-ink3 mt-0.5 mb-2.5 truncate`,title:e.path,children:[e.path.replace(/^\/Users\/[^/]+/,`~`),e.room?` · #${e.room}`:``]}),(0,z.jsxs)(`div`,{className:`font-mono text-[11px] text-tan -mt-2 mb-2 flex items-center justify-between gap-2`,children:[(0,z.jsx)(`span`,{children:e.lastActive?`active ${Ud(e.lastActive)} · ${e.lastActiveSource}`:`no activity recorded`}),(0,z.jsx)(Id,{phases:e.phaseStrip??[]})]}),(0,z.jsx)(`div`,{className:`grid grid-cols-4 gap-2`,children:[[`streams`,e.counts.streams],[`queue`,e.counts.queue],[`done`,e.counts.done],[`stale facts`,e.counts.staleFacts]].map(([e,t])=>(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`b`,{className:`block font-bold text-[20px] leading-none text-walnut`,children:t}),(0,z.jsx)(`span`,{className:`font-mono font-medium text-[11px] uppercase tracking-[.06em] text-ink3`,children:e})]},e))}),(0,z.jsxs)(`div`,{className:`flex gap-1.5 flex-wrap mt-auto pt-2.5`,children:[(0,z.jsx)(W,{tone:r,children:n}),e.files.queue?(0,z.jsx)(W,{tone:`ok`,children:`queue.v1`}):(0,z.jsx)(W,{tone:`outline`,children:`no QUEUE.md`}),e.files.done?(0,z.jsx)(W,{tone:`ok`,children:`done.v1`}):(0,z.jsx)(W,{tone:`outline`,children:`no DONE.md`}),e.files.facts?(0,z.jsxs)(W,{tone:e.counts.staleFacts?`warn`:`ok`,children:[`facts.v1`,e.counts.staleFacts?` · ${e.counts.staleFacts} stale`:``]}):(0,z.jsx)(W,{tone:`outline`,children:`no FACTS.md`}),e.counts.malformed?(0,z.jsxs)(W,{tone:`bad`,children:[e.counts.malformed,` malformed`]}):null]})]})},e.name)})}),(0,z.jsxs)(`div`,{className:`grid grid-cols-2 gap-4 max-[980px]:grid-cols-1`,children:[(0,z.jsxs)(H,{children:[(0,z.jsx)(U,{title:`Needs David`,icon:`needsDavid`,path:`${c.length} open · WORKSTREAMS ## Needs David + DAVID_DECISION`}),c.length===0&&(0,z.jsx)(`div`,{className:`px-3 py-2.5 text-[13px] text-umber`,children:`Nothing waiting on you.`}),c.slice(0,8).map((e,t)=>(0,z.jsx)(ka,{glyph:`★`,children:(0,z.jsxs)(`div`,{className:`py-2 min-w-0`,children:[(0,z.jsxs)(`div`,{className:`flex gap-2 items-baseline`,children:[(0,z.jsx)(`b`,{className:`font-mono text-[13px]`,children:e.project}),(0,z.jsx)(`span`,{className:`font-mono text-[11px] text-tan truncate`,children:e.source}),e.ts?(0,z.jsx)(`span`,{className:`ml-auto shrink-0 font-mono text-[11px] ${Dd(e.ts)}`,title:new Date(e.ts).toLocaleString(),children:Ed(e.ts)}):null]}),(0,z.jsx)(`div`,{className:`text-[14px] break-words line-clamp-2`,title:e.title,children:(0,z.jsx)(Hu,{text:e.title})}),e.detail&&(0,z.jsx)(`div`,{className:`text-[13px] text-umber break-words line-clamp-2`,children:(0,z.jsx)(Hu,{text:e.detail})}),e.msgId&&e.room?(0,z.jsx)(B,{className:`font-mono text-[12px]`,to:`/bus?room=${e.room}&msg=${e.msgId}`,children:`Open packet →`}):e.from?(0,z.jsx)(`button`,{className:`font-mono text-[12px] text-ember-deep border-0 bg-transparent p-0 cursor-pointer`,onClick:t=>{t.preventDefault(),fd(e.from,{answers:e.msgId?[e.msgId]:void 0})},children:`Reply →`}):null]})},t))]}),(0,z.jsxs)(H,{children:[(0,z.jsx)(U,{title:`Bus health`,icon:`health`,path:`agents.json · transports · status`}),(0,z.jsx)(ka,{glyph:`✓`,children:(0,z.jsxs)(`div`,{className:`py-2 flex items-center gap-2`,children:[(0,z.jsx)(W,{tone:a.length?`ok`:`warn`,children:a.length?`reachable`:`no store`}),(0,z.jsxs)(`span`,{className:`text-[13px] text-umber`,children:[a.length,` registered · `,o,` live · `,s.length,` dead`]})]})}),s.length>0&&(0,z.jsx)(ka,{glyph:`!`,children:(0,z.jsxs)(`div`,{className:`py-2 flex items-center gap-2 min-w-0`,children:[(0,z.jsxs)(W,{tone:`warn`,children:[s.length,` stale agents`]}),(0,z.jsxs)(`span`,{className:`text-[13px] text-umber truncate`,children:[s.slice(0,4).map(e=>e.agentId).join(`, `),s.length>4?`…`:``,` — `,(0,z.jsx)(B,{to:`/ops/fleets`,children:`fleet`})]})]})})]})]}),(0,z.jsx)(Md,{})]})}function Kd({scope:e}){return e?(0,z.jsxs)(`span`,{className:`inline-flex items-center gap-1 font-mono text-[12px] text-ink3`,title:e.note??``,children:[(0,z.jsx)(`span`,{className:`text-tan`,children:`✎`}),e.owner,(0,z.jsxs)(`span`,{className:`text-tan`,children:[`· `,e.mode]})]}):(0,z.jsx)(`span`,{className:`font-mono text-[12px] text-tan`,title:`no scope declared`,children:`unscoped`})}function qd({project:e,req:t,seamOn:n,scope:r,onClose:i}){let[a,o]=(0,N.useState)(`P2`),[s,c]=(0,N.useState)(``),[l,u]=(0,N.useState)(``),[d,f]=(0,N.useState)(t.kind===`fact`?t.claim??``:``),[p,m]=(0,N.useState)(!1),[h,g]=(0,N.useState)(null),[_,v]=(0,N.useState)(null),y=async()=>{m(!0),v(null);try{let n=t.kind===`add`?await Ia(`/actions/queue-add/${e}`,{priority:a,text:s}):await Ia(`/actions/fact-reverify/${e}`,{id:t.id,method:l,claim:d||void 0});if(n.error&&!n.status)throw Error(n.error);g(n)}catch(e){v(e.message)}finally{m(!1)}},b=t.kind===`add`?`Add queue item · ${e}`:`Re-verify fact · ${t.id}`;return(0,z.jsx)(`div`,{className:`fixed inset-0 z-[60] bg-walnut/30 flex items-start justify-center pt-[10vh] whitespace-normal text-left`,onMouseDown:e=>{e.target===e.currentTarget&&i()},children:(0,z.jsxs)(`div`,{className:`w-[600px] bg-paper border border-sand rounded-kit shadow-panel`,children:[(0,z.jsx)(`div`,{className:`px-4 py-3 border-b border-sand font-display font-bold text-[18px] text-umber`,children:b}),(0,z.jsxs)(`div`,{className:`p-4 grid gap-3 text-[13px]`,children:[(0,z.jsxs)(`div`,{className:`flex gap-1.5 flex-wrap items-center text-umber`,children:[(0,z.jsx)(W,{tone:n?`warn`:`outline`,children:n?`seam writes on`:`seam writes OFF`}),(0,z.jsxs)(`span`,{children:[`scope: `,r?`${r.owner} · ${r.mode}`:`unscoped`]}),(0,z.jsx)(`span`,{children:`· round-trip guard · re-parse after write · a Run`})]}),!n&&(0,z.jsxs)(`div`,{className:`text-brick`,children:[`Enable seam writes in the header (`,(0,z.jsx)(`code`,{children:`seam`}),` badge, type SEAM) first.`]}),t.kind===`add`?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`label`,{className:`grid gap-1`,children:[(0,z.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Priority`}),(0,z.jsx)(`span`,{className:`inline-flex border border-dust rounded-kit overflow-hidden w-max`,children:[`P1`,`P2`,`P3`].map(e=>(0,z.jsx)(`button`,{onClick:()=>o(e),"aria-pressed":a===e,className:`px-3 py-1.5 font-mono text-[12px] border-0 cursor-pointer ${a===e?`bg-walnut text-paper`:`bg-paper text-umber`}`,children:e},e))})]}),(0,z.jsxs)(`label`,{className:`grid gap-1`,children:[(0,z.jsxs)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:[`Item (one line · queue.v1: `,(0,z.jsxs)(`code`,{children:[`- [ ] (`,a,`) …`]}),`)`]}),(0,z.jsx)(`textarea`,{value:s,onChange:e=>c(e.target.value),rows:3,placeholder:`Short imperative — see [[phases/phaseN/PHASEN_TASKS]] · acceptance: …`,className:`px-2.5 py-2 border border-dust rounded-kit bg-paper text-walnut`})]}),(0,z.jsxs)(`div`,{className:`font-mono text-[12px] text-ink3 bg-linen rounded px-2 py-1.5`,children:[`- [ ] (`,a,`) `,s.trim().replace(/\s+/g,` `)||`…`]})]}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`label`,{className:`grid gap-1`,children:[(0,z.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Claim (leave as is unless it changed)`}),(0,z.jsx)(`input`,{value:d,onChange:e=>f(e.target.value),className:`px-2.5 py-2 border border-dust rounded-kit bg-paper text-walnut`})]}),(0,z.jsxs)(`label`,{className:`grid gap-1`,children:[(0,z.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Method — how you verified it just now`}),(0,z.jsx)(`input`,{value:l,onChange:e=>u(e.target.value),placeholder:`curl 200 · checked dashboard · ran script`,className:`px-2.5 py-2 border border-dust rounded-kit bg-paper text-walnut`})]}),(0,z.jsxs)(`div`,{className:`font-mono text-[12px] text-ink3 bg-linen rounded px-2 py-1.5`,children:["- `",t.id,"` — ",d||`…`,(0,z.jsx)(`br`,{}),` verified: now · by: david · method: `,l||`…`]})]}),_&&(0,z.jsx)(`div`,{className:`text-brick`,children:_}),h&&(0,z.jsxs)(`div`,{className:`p-2 rounded-kit border ${h.status===`ok`?`border-moss-line bg-moss-wash/50`:`border-brick-line bg-brick-wash/50`}`,children:[(0,z.jsxs)(`div`,{className:`font-mono text-[12px]`,children:[(0,z.jsx)(W,{tone:h.status===`ok`?`ok`:`bad`,children:h.status}),` `,(0,z.jsx)(`b`,{children:h.label})]}),(0,z.jsxs)(`pre`,{className:`m-0 mt-1 font-mono text-[12px] whitespace-pre-wrap`,children:[h.log.join(`
33
+ `),h.error?`
34
+ `+h.error:``]}),h.status===`ok`&&(0,z.jsx)(`div`,{className:`mt-1 text-[12px] text-umber`,children:`Written to the working tree (uncommitted). Review the diff in Docs, then commit in the repo.`})]})]}),(0,z.jsxs)(`div`,{className:`px-4 py-3 border-t border-sand flex justify-end gap-2`,children:[(0,z.jsx)(G,{size:`sm`,onClick:i,children:h?`Close`:`Cancel`}),!h&&(0,z.jsx)(G,{size:`sm`,tone:`primary`,onClick:y,disabled:!n||p||(t.kind===`add`?!s.trim():!l.trim()),children:p?`Writing…`:t.kind===`add`?`Append to QUEUE.md`:`Write to FACTS.md`})]})]})})}var Jd=`1.6fr 1.1fr 1.4fr 1fr 1fr 2fr`,Yd=`1.4fr 1fr 1fr 1.6fr 1.6fr`,Xd=e=>/block/i.test(e)?`bad`:/done|merged|deployed|✅/i.test(e)||/watch|soak/i.test(e)?`ok`:`neutral`,Zd=({k:e})=>(0,z.jsx)(`kbd`,{className:`ml-1 font-mono text-[12px] border border-dust border-b-2 rounded px-1 text-umber bg-paper`,children:e});function Qd({r:e,raw:t,cols:n}){return`malformed`in e?(0,z.jsx)(ka,{glyph:`|`,malformed:!0,raw:e.raw,showRaw:t,children:(0,z.jsxs)(`div`,{className:`py-2 flex items-center gap-2 min-w-0`,children:[(0,z.jsx)(W,{tone:`solid`,children:`MalformedRow`}),(0,z.jsx)(`span`,{className:`text-[13px] text-umber truncate`,children:e.issue??`line ${e.line??`?`} · expected ${e.expected??`?`} columns, found ${e.actual??`?`} — kept byte-exact, not parsed.`}),e.line?(0,z.jsx)(B,{className:`text-[13px]`,to:`/docs/WORKSTREAMS.md?view=source&line=${e.line}`,children:`Show line`}):null]})}):e.schema===`workstreams.v1`?(0,z.jsx)(ka,{glyph:`|`,raw:e.raw,showRaw:t,children:(0,z.jsxs)(`div`,{className:`grid gap-3 items-center py-1.5`,style:{gridTemplateColumns:n},children:[(0,z.jsx)(`b`,{className:`truncate`,title:e.stream,children:(0,z.jsx)(Hu,{text:e.stream})}),(0,z.jsx)(`span`,{className:`font-mono font-medium text-[13px] text-umber truncate`,children:e.owner}),(0,z.jsx)(`span`,{className:`font-mono text-[13px] truncate`,children:e.branchWorktree}),(0,z.jsx)(`span`,{className:`min-w-0`,children:(0,z.jsx)(W,{tone:Xd(e.status),children:e.status})}),(0,z.jsx)(`span`,{className:`min-w-0 truncate`,children:/david/i.test(e.blocker)?(0,z.jsx)(W,{tone:`david`,children:e.blocker}):(0,z.jsx)(`span`,{className:e.blocker===`—`?`font-mono text-tan`:`text-[13px]`,children:(0,z.jsx)(Hu,{text:e.blocker})})}),(0,z.jsx)(`span`,{className:`text-[13px] text-umber truncate`,title:e.lastNote,children:(0,z.jsx)(Hu,{text:e.lastNote})})]})}):(0,z.jsx)(ka,{glyph:`|`,raw:e.raw,showRaw:t,children:(0,z.jsxs)(`div`,{className:`grid gap-3 items-center py-1.5`,style:{gridTemplateColumns:n},children:[(0,z.jsx)(`b`,{className:`truncate`,children:(0,z.jsx)(Hu,{text:e.lane})}),(0,z.jsx)(`span`,{className:`font-mono font-medium text-[13px] text-umber truncate`,children:e.owner}),(0,z.jsx)(`span`,{className:`min-w-0`,children:(0,z.jsx)(W,{tone:Xd(e.state),children:e.state})}),(0,z.jsx)(`span`,{className:`text-[13px] truncate`,children:(0,z.jsx)(Hu,{text:e.currentSlice})}),(0,z.jsx)(`span`,{className:`text-[13px] text-umber truncate`,children:(0,z.jsx)(Hu,{text:e.nextGo})})]})})}function $d(){let{current:e}=Ba(),[t,n]=(0,N.useState)(!1);(0,N.useEffect)(()=>{let e=e=>{e.key===`s`&&!e.metaKey&&!e.ctrlKey&&!e.altKey&&!(e.target instanceof HTMLInputElement)&&!(e.target instanceof HTMLTextAreaElement)&&!(e.target instanceof HTMLSelectElement)&&n(e=>!e)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]);let{data:r,error:i,loading:a}=K(e?`/projects/${e}/board`:null,15e3),o=K(e?`/projects/${e}/doctor`:null,6e4),s=o.data,c=K(e?`/projects/${e}/doctor/fixers`:null,3e4).data?.fixers??{},[l,u]=(0,N.useState)(null),[d,f]=(0,N.useState)({}),p=async(t,n)=>{if(!m){f(e=>({...e,[t]:`bus writes are off — toggle in the header`}));return}u(t);try{let r=await Ia(`/actions/doctor-fix/${e}`,{check:t,items:n});f(e=>({...e,[t]:r.status===`ok`?`sent → ${r.args?.to}`:r.error??`failed`}))}catch(e){f(n=>({...n,[t]:e.message}))}finally{u(null)}},m=K(`/admin/bus-writes`,1e4).data?.enabled??!1,h=K(`/admin/seam-writes`,1e4).data?.enabled??!1,[g,_]=(0,N.useState)(()=>{try{return JSON.parse(localStorage.getItem(`groundwork-console.board.fold`)??``)}catch{return{done:!1,facts:!1}}}),v=e=>_(t=>{let n={...t,[e]:!t[e]};return localStorage.setItem(`groundwork-console.board.fold`,JSON.stringify(n)),n}),y=(r?.facts?.entries.filter(e=>e.stale).length??0)+(r?.facts?.issues.length??0),[b,x]=(0,N.useState)(null),[S,C]=(0,N.useState)(!1),w=async()=>{C(!0);try{await Ia(`/actions/project-doctor/${e}`),o.refresh()}finally{C(!1)}};if(!e)return(0,z.jsx)(`div`,{className:`p-4 text-umber`,children:`No project selected.`});if(i)return(0,z.jsx)(`div`,{className:`p-4`,children:(0,z.jsxs)(H,{className:`px-4 py-3 text-[13px] text-brick`,children:[`API error: `,i]})});if(!r)return(0,z.jsx)(`div`,{className:`p-4 text-umber`,children:a?`Reading seam…`:``});let T=r.workstreams.schema,E=T===`workstreams.v1`,D=E?Jd:Yd,O=e=>r.scopes[e]?{path:e,owner:r.scopes[e].owner,mode:r.scopes[e].mode??`shared`,note:r.scopes[e].note}:void 0,k=r.phases.find(e=>e.state===`ongoing`);return(0,z.jsxs)(`div`,{className:`grid grid-cols-[1fr_340px] gap-4 p-4 max-[980px]:grid-cols-1`,children:[b&&(0,z.jsx)(qd,{project:e,req:b,seamOn:h,scope:b.kind===`add`?O(`docs/QUEUE.md`):O(`docs/FACTS.md`),onClose:()=>{x(null)}}),(0,z.jsxs)(`div`,{className:`grid gap-3.5 content-start min-w-0`,children:[(0,z.jsxs)(`div`,{className:`flex items-baseline justify-between`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`span`,{className:`font-display font-bold text-[34px] leading-[1.1] tracking-[-.015em] text-ember`,children:e}),k&&(0,z.jsxs)(`span`,{className:`ml-3 text-[13px] text-umber`,children:[k.title,` · `,k.done,`/`,k.total]})]}),(0,z.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,z.jsx)(`span`,{className:`text-[13px] text-umber`,children:a?`refreshing…`:`read from disk · 15 s`}),(0,z.jsx)(G,{size:`sm`,onClick:w,disabled:S,children:S?(0,z.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,z.jsx)(Na,{size:12}),` Doctor`]}):`Doctor`})]})]}),(0,z.jsx)(Vd,{project:e,canWrite:m}),(0,z.jsx)(Fd,{project:e,phases:r.phases,canWrite:m,prd:r.prd}),(0,z.jsxs)(H,{children:[(0,z.jsxs)(U,{title:`Active Streams`,icon:`streams`,eyebrow:T??`no WORKSTREAMS.md`,path:`docs/WORKSTREAMS.md`,children:[(0,z.jsx)(Kd,{scope:O(`docs/WORKSTREAMS.md`)}),(0,z.jsxs)(G,{tone:`ghost`,size:`sm`,onClick:()=>n(e=>!e),"aria-pressed":t,children:[t?`Rendered`:`View source`,(0,z.jsx)(Zd,{k:`s`})]})]}),T===`unknown`&&(0,z.jsxs)(`div`,{className:`px-3 py-3 text-[13px]`,children:[(0,z.jsx)(W,{tone:`bad`,children:`unknown workstreams grammar`}),(0,z.jsx)(`span`,{className:`ml-2 text-umber`,children:`expected workstreams.v1 (6-col Active Streams). Never auto-migrated — coordinator rewrites to v1.`})]}),T===`workstreams.lanes-v0`&&(0,z.jsxs)(`div`,{className:`px-3 py-2 text-[13px]`,children:[(0,z.jsx)(W,{tone:`warn`,children:`lanes-v0 · legacy`}),(0,z.jsx)(`span`,{className:`ml-2 text-umber`,children:`5-col Lanes parses read-only; new writes should be workstreams.v1.`})]}),r.workstreams.rows.length>0&&(E?(0,z.jsxs)(Aa,{cols:D,children:[(0,z.jsx)(`span`,{children:`Stream`}),(0,z.jsx)(`span`,{children:`Owner / Agent`}),(0,z.jsx)(`span`,{children:`Branch · Worktree`}),(0,z.jsx)(`span`,{children:`Status`}),(0,z.jsx)(`span`,{children:`Blocker`}),(0,z.jsx)(`span`,{children:`Last note`})]}):(0,z.jsxs)(Aa,{cols:D,children:[(0,z.jsx)(`span`,{children:`Lane`}),(0,z.jsx)(`span`,{children:`Owner`}),(0,z.jsx)(`span`,{children:`State`}),(0,z.jsx)(`span`,{children:`Current slice`}),(0,z.jsx)(`span`,{children:`Next GO`})]})),r.workstreams.rows.map((e,n)=>(0,z.jsx)(Qd,{r:e,raw:t,cols:D},n)),r.workstreams.issues.length>0&&(0,z.jsxs)(`div`,{className:`px-3 py-2 border-t border-sand text-[12px] font-mono text-ink3`,children:[r.workstreams.issues.length,` parser issue`,r.workstreams.issues.length>1?`s`:``,`: `,r.workstreams.issues.slice(0,3).join(` · `),r.workstreams.issues.length>3?` …`:``]})]}),(0,z.jsxs)(H,{children:[(0,z.jsxs)(U,{title:`Queue`,icon:`queue`,eyebrow:`queue.v1`,path:`docs/QUEUE.md`,children:[(0,z.jsx)(Kd,{scope:O(`docs/QUEUE.md`)}),(0,z.jsx)(G,{size:`sm`,tone:h?`primary`:`default`,onClick:()=>x({kind:`add`}),title:h?`append a queue.v1 item through the seam`:`seam writes are off — enable in the header`,children:`Add item…`}),!h&&(0,z.jsx)(`span`,{className:`font-mono text-[10px] text-tan ml-1`,title:`seam & docs writes are off`,children:`seam & docs off · header`})]}),r.queue.length===0&&(0,z.jsx)(`div`,{className:`px-3 py-3 text-[13px] text-umber`,children:`Queue empty.`}),r.queue.map(e=>(0,z.jsx)(ka,{glyph:e.done?`- [x]`:`- [ ]`,raw:e.raw,showRaw:t,children:(0,z.jsxs)(`div`,{className:`grid grid-cols-[44px_1fr] gap-2.5 items-baseline py-2`,children:[(0,z.jsx)(`span`,{className:`font-mono font-bold text-[12px] px-[7px] py-[3px] rounded text-center ${e.priority===`P1`?`bg-ember-wash text-ember-deep`:e.priority===`P2`?`bg-amber-wash text-amber`:`bg-slate-wash text-slate`}`,children:e.priority}),(0,z.jsx)(`span`,{className:e.done?`line-through text-tan`:``,children:(0,z.jsx)(Hu,{text:e.text})})]})},e.id))]}),(0,z.jsxs)(H,{children:[(0,z.jsxs)(U,{title:`Done`,icon:`done`,eyebrow:`done.v1 · append-only`,path:`docs/DONE.md · ${r.done.length}`,children:[(0,z.jsx)(Kd,{scope:O(`docs/DONE.md`)}),(0,z.jsx)(ef,{k:`done`,open:g.done,onToggle:v})]}),g.done&&r.done.slice(-8).reverse().map(e=>(0,z.jsx)(ka,{glyph:`—`,raw:e.raw,showRaw:t,children:(0,z.jsxs)(`div`,{className:`grid grid-cols-[1fr_auto] gap-3 items-baseline py-2`,children:[(0,z.jsx)(`span`,{className:`truncate`,title:e.text,children:(0,z.jsx)(Hu,{text:e.text})}),(0,z.jsx)(`span`,{className:`font-mono text-[12px] text-ink3`,children:e.date??``})]})},e.id))]})]}),(0,z.jsxs)(`aside`,{className:`grid gap-3.5 content-start bg-cream -m-4 ml-0 p-4 border-l border-sand min-w-0`,children:[(0,z.jsxs)(H,{children:[(0,z.jsxs)(U,{title:`Facts`,icon:`facts`,path:`docs/FACTS.md · ${r.facts?.entries.length??0}${y?` · ${y} need attention`:``}`,children:[(0,z.jsx)(Kd,{scope:O(`docs/FACTS.md`)}),(0,z.jsx)(ef,{k:`facts`,open:g.facts||y>0,onToggle:v})]}),(g.facts||y>0)&&!r.facts&&(0,z.jsxs)(`div`,{className:`px-3 py-3 text-[13px] text-umber`,children:[`No FACTS.md yet (run `,(0,z.jsx)(`code`,{children:`groundwork update --docs`}),`).`]}),(g.facts||y>0)&&r.facts?.entries.map(e=>(0,z.jsx)(ka,{glyph:`##`,raw:e.raw,showRaw:t,children:(0,z.jsxs)(`div`,{className:`py-2 grid grid-cols-[1fr_auto] gap-2 items-start min-w-0`,children:[(0,z.jsxs)(`div`,{className:`min-w-0`,children:[(0,z.jsxs)(`div`,{className:`font-mono font-medium text-[13px] truncate`,children:[e.id,e.stale&&(0,z.jsx)(`span`,{className:`ml-2 inline-flex`,children:(0,z.jsx)(W,{tone:`warn`,children:`stale`})})]}),e.value&&(0,z.jsx)(`div`,{className:`text-umber truncate`,title:e.value,children:(0,z.jsx)(Hu,{text:e.value})}),(0,z.jsxs)(`div`,{className:`font-mono text-[12px] text-ink3`,children:[e.ageDays===null?`unverified`:`${e.ageDays} d`,e.by?` · ${e.by}`:``,e.method?` · ${e.method}`:``]})]}),(0,z.jsx)(G,{size:`sm`,tone:e.stale?`primary`:`ghost`,onClick:()=>x({kind:`fact`,id:e.id,claim:e.value}),title:`upsert this fact through the seam with a fresh timestamp`,children:`Re-verify…`})]})},e.id)),r.facts&&r.facts.issues.length>0&&(0,z.jsxs)(`div`,{className:`px-3 py-2 border-t border-sand text-[12px] font-mono text-ink3`,children:[r.facts.issues.length,` issue`,r.facts.issues.length>1?`s`:``,`: `,r.facts.issues[0]]})]}),(0,z.jsxs)(H,{children:[(0,z.jsx)(U,{title:`Project doctor`,icon:`doctor`,path:s?`groundwork doctor --json · ${s.checks.filter(e=>e.level!==`ok`).length} flagged`:`groundwork doctor`}),!s&&(0,z.jsx)(`div`,{className:`px-3 py-3 text-[13px] text-umber`,children:`running…`}),s?.error&&(0,z.jsx)(`div`,{className:`px-3 py-3 text-[13px] text-brick`,children:s.error}),s?.checks.map(e=>(0,z.jsx)(ka,{glyph:e.level===`ok`?`✓`:`!`,children:(0,z.jsxs)(`div`,{className:`py-1.5 text-[13px] min-w-0`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,z.jsxs)(W,{tone:e.level===`ok`?`ok`:e.level===`error`?`bad`:`warn`,children:[e.check,e.level!==`ok`&&e.items.length>1?` · ${e.items.length}`:``]}),e.level!==`ok`&&(e.check===`version-marker`?(0,z.jsx)(B,{to:`/ops/skills`,className:`ml-auto font-mono text-[11px]`,children:`Update via Skills →`}):c[e.check]?c[e.check].agent?(0,z.jsxs)(`span`,{className:`ml-auto inline-flex items-center gap-1`,children:[(0,z.jsx)(`button`,{onClick:()=>p(e.check,e.items),disabled:l===e.check,className:`font-mono text-[11px] px-2 py-0.5 rounded-full border cursor-pointer ${m?`bg-ember-wash text-ember-deep border-ember-line`:`bg-paper text-umber border-dust`}`,title:`DM ${c[e.check].agent} as david: ${c[e.check].how}`,children:l===e.check?(0,z.jsx)(Na,{size:11}):`Fix →`}),(0,z.jsx)(id,{id:c[e.check].agent})]}):(0,z.jsxs)(`span`,{className:`ml-auto font-mono text-[11px] text-tan`,title:`needs a live ${c[e.check].role} for this project`,children:[`no `,c[e.check].role,` online`]}):null)]}),(0,z.jsxs)(`div`,{className:`text-umber mt-1 grid gap-0.5`,children:[e.items.slice(0,e.level===`ok`?1:3).map((e,t)=>(0,z.jsx)(`div`,{className:`truncate`,title:e,children:e},t)),e.level!==`ok`&&e.items.length>3&&(0,z.jsxs)(`div`,{className:`text-tan`,children:[`+`,e.items.length-3,` more`]})]}),d[e.check]&&(0,z.jsx)(`div`,{className:`mt-1 font-mono text-[11px] flex items-center gap-1.5 ${/^sent/.test(d[e.check])?`text-leaf`:`text-brick`}`,children:/^sent → /.test(d[e.check])?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`span`,{children:`sent →`}),(0,z.jsx)(id,{id:d[e.check].replace(/^sent → /,``)})]}):d[e.check]})]})},e.check))]})]})]})}function ef({k:e,open:t,onToggle:n}){return(0,z.jsx)(`button`,{onClick:()=>n(e),className:`ml-1 font-mono text-[11px] text-tan border-0 bg-transparent cursor-pointer hover:text-umber`,title:t?`collapse`:`expand`,children:t?`▾`:`▸`})}var tf=({children:e})=>(0,z.jsx)(`div`,{className:`font-mono font-semibold text-[11px] uppercase tracking-[.1em] text-ink3 mx-2 mt-3.5 mb-1.5`,children:e}),nf=e=>e?new Date(e).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`}):``,rf=e=>e?new Date(e).toLocaleDateString([],{month:`short`,day:`numeric`}):``,af=e=>!!e&&Ea.includes(e),of=(e,t)=>t&&e.startsWith(t)?e.slice(t.length).replace(/^:?\s*/,``):e,sf=`/api`;function cf(){let{projects:e,current:t}=Ba(),[n,r]=Ii(),i=K(`/bus/rooms`,2e4).data??[],[a,o]=(0,N.useState)(!1),[s,c]=(0,N.useState)(!1),l=K(`/bus/agents`,3e4).data??[],u=e.find(e=>e.name===t)?.room??i[0]?.room??`general`,d=n.get(`view`)===`status`?`status`:n.get(`view`)===`inbox`?`inbox`:`room`,f=n.get(`room`)??u,p=[...i].sort((e,t)=>t.lastTs-e.lastTs),m=p.filter(e=>Date.now()-e.lastTs>6048e5&&e.room!==f),h=a?p:p.filter(e=>!m.includes(e)),g=n.get(`msg`),_=i.find(e=>e.room===f),{data:v,error:y}=K(d===`room`&&f?`/bus/rooms/${f}/messages?limit=80`:null,1e4),b=K(d===`status`?`/bus/status?limit=100`:null,15e3).data??[],x=K(d===`inbox`?`/bus/inbox?limit=200`:null,2e4),[S,C]=(0,N.useState)(!1),w=async()=>{C(!0);try{await Ia(`/bus/inbox/read`),x.refresh()}finally{C(!1)}},[T,E]=(0,N.useState)([]),[D,O]=(0,N.useState)(!1);(0,N.useEffect)(()=>{E([])},[f]);let k=(0,N.useMemo)(()=>{let e=new Set;return[...T,...v?.messages??[]].filter(t=>{let n=t.id??`${t.ts}-${t.from}`;return!e.has(n)&&(e.add(n),!0)})},[T,v]),A=k.filter(e=>!e.system).slice().reverse(),j=async()=>{let e=k[0]?.ts;if(e){O(!0);try{let t=await(await fetch(`${sf}/bus/rooms/${f}/messages?limit=80&before=${e}`)).json();E(e=>[...t.messages,...e])}finally{O(!1)}}};(0,N.useEffect)(()=>{if(!g)return;let e=document.getElementById(`msg-${g}`);e&&(e.scrollIntoView({block:`center`}),e.classList.add(`ring-2`,`ring-ember`),setTimeout(()=>e.classList.remove(`ring-2`,`ring-ember`),2500))},[g,A.length]);let ee=A.filter(e=>e.prefix===`DAVID_DECISION`&&!e.answered),M=(_?.members??[]).map(e=>l.find(t=>t.agentId===e)??{agentId:e,liveness:`dead`,pane:null,role:void 0,active:!1}),te=e=>Date.now()-e.lastTs<3e5,P=e=>{let t=new URLSearchParams(n);for(let[n,r]of Object.entries(e))r===null?t.delete(n):t.set(n,r);r(t,{replace:!0})},F=!!v&&k.length<v.total,ne=!!K(`/admin/bus-writes`,1e4).data?.enabled,[re,ie]=(0,N.useState)(`david`),[I,ae]=(0,N.useState)(``),[L,R]=(0,N.useState)(!1),[oe,se]=(0,N.useState)(null),[ce,le]=(0,N.useState)(null),ue=Yu(),[de,fe]=(0,N.useState)(null),pe=K(`/bus/unread`,3e4).data?.inbox??0,me=`#${f}`,he=async()=>{R(!0),se(null);try{let e=me.startsWith(`#`)?{room:me.slice(1)}:{to:me.replace(/^@/,``)},t=await Ia(`/actions/send`,{as:re,...e,text:ue.withRefs(I),answers:ce?.id?[ce.id]:void 0,kind:/^DAVID_DECISION/.test(I)?`decision`:void 0});if(t.status!==`ok`)throw Error(t.error??t.log?.slice(-1)[0]??`failed`);ae(``),le(null),ue.clear()}catch(e){se(e.message)}finally{R(!1)}};return(0,z.jsxs)(`div`,{className:`grid ${ee.length>0?`grid-cols-[240px_1fr_320px]`:`grid-cols-[240px_1fr]`} gap-4 p-4 max-[980px]:grid-cols-1`,children:[de&&(0,z.jsx)($u,{agentId:de,onClose:()=>fe(null)}),(0,z.jsxs)(`aside`,{className:`bg-cream -m-4 mr-0 px-2 py-4 border-r border-sand min-w-0 overflow-auto`,children:[(0,z.jsx)(tf,{children:`Rooms · list_rooms`}),h.map(e=>(0,z.jsxs)(`button`,{onClick:()=>P({room:e.room,view:null,msg:null}),className:`w-full text-left grid grid-cols-[1fr_auto] gap-2 px-2 py-1.5 rounded-kit font-mono text-[13px] border-0 cursor-pointer ${d===`room`&&e.room===f?`bg-paper text-walnut shadow-[inset_0_0_0_1px_var(--color-sand)]`:`bg-transparent text-umber hover:bg-linen`}`,children:[(0,z.jsxs)(`span`,{className:`truncate flex items-center gap-1.5`,children:[te(e)&&(0,z.jsx)(`span`,{className:`inline-block w-1.5 h-1.5 rounded-full bg-moss`,title:`message in the last 5 min`}),`#`,e.room]}),(0,z.jsx)(`span`,{className:`font-semibold text-[11px] px-1.5 py-0.5 rounded-full bg-linen text-umber`,children:e.messageCount})]},e.room)),m.length>0&&(0,z.jsxs)(`button`,{onClick:()=>o(e=>!e),className:`w-full text-left px-2 py-1 font-mono text-[11px] text-tan border-0 bg-transparent cursor-pointer hover:text-umber`,children:[a?`▾ hide`:`▸ show`,` `,m.length,` quiet room`,m.length===1?``:`s`,` (no traffic in 7 d)`]}),(0,z.jsx)(tf,{children:`Direct · inbox`}),(0,z.jsxs)(`button`,{onClick:()=>P({view:`inbox`,msg:null}),className:`w-full text-left grid grid-cols-[1fr_auto] gap-2 px-2 py-1.5 rounded-kit font-mono text-[13px] border-0 cursor-pointer ${d===`inbox`?`bg-paper text-walnut shadow-[inset_0_0_0_1px_var(--color-sand)]`:`bg-transparent text-umber hover:bg-linen`}`,children:[(0,z.jsx)(`span`,{children:`@david · my DMs`}),pe>0&&(0,z.jsxs)(`span`,{className:`font-semibold text-[11px] px-1.5 py-0.5 rounded-full bg-ember-wash text-ember-deep`,children:[pe,` unread`]})]}),(0,z.jsx)(tf,{children:`Status stream`}),(0,z.jsx)(`button`,{onClick:()=>P({view:`status`,msg:null}),className:`w-full text-left px-2 py-1.5 rounded-kit font-mono text-[13px] border-0 cursor-pointer ${d===`status`?`bg-paper text-walnut shadow-[inset_0_0_0_1px_var(--color-sand)]`:`bg-transparent text-umber hover:bg-linen`}`,children:`post_status feed`})]}),d===`inbox`?(0,z.jsxs)(H,{className:`min-w-0`,children:[(0,z.jsxs)(U,{title:`Inbox · david`,icon:`bus`,path:`read_messages source=inbox · unread = bus cursor`,children:[x.data&&(x.data.unread>0?(0,z.jsxs)(W,{tone:`david`,children:[x.data.unread,` unread`]}):(0,z.jsx)(W,{tone:`outline`,children:`all read`})),x.data&&x.data.unread>0&&(0,z.jsx)(G,{size:`sm`,onClick:w,disabled:S,children:S?`…`:`Mark all read`})]}),x.error&&(0,z.jsx)(`div`,{className:`px-3 py-3 text-[13px] text-brick`,children:x.error}),x.data&&x.data.messages.length===0&&(0,z.jsx)(`div`,{className:`px-3 py-3 text-[13px] text-umber`,children:`No DMs to david.`}),(x.data?.messages??[]).slice().reverse().map((e,t)=>{let n=String(e.text??``),r=n.match(/^(BLOCKER|RISK|DONE|FYI|AGENT_ACTION|GO|SCOPE CHANGE|VERDICT|DAVID_DECISION)\b/)?.[1]??null;return(0,z.jsxs)(`div`,{className:`grid grid-cols-[var(--spacing-gutter)_1fr] border-b border-sand last:border-b-0 ${e.unread?`bg-ember-wash/35`:``}`,children:[(0,z.jsx)(`div`,{className:`py-2.5 flex justify-center font-mono text-[12px] border-r border-sand ${e.unread?`text-ember font-bold`:`text-tan`}`,children:e.unread?`●`:`@`}),(0,z.jsxs)(`div`,{className:`px-3 pt-2 pb-2.5 min-w-0`,children:[(0,z.jsxs)(`div`,{className:`flex gap-2 items-baseline mb-0.5`,children:[(0,z.jsx)(`span`,{className:`font-semibold text-[13px]`,children:e.from}),(0,z.jsxs)(`span`,{className:`font-mono text-[12px] text-ink3`,children:[rf(e.ts),` `,nf(e.ts)]}),ne&&e.from&&(0,z.jsx)(`button`,{className:`ml-auto font-mono text-[12px] text-ember-deep bg-transparent border-0 cursor-pointer`,onClick:()=>fd(e.from),title:`open the DM thread with this agent (Summon)`,children:`reply →`})]}),(0,z.jsxs)(`div`,{className:`whitespace-pre-wrap break-words text-[14px]`,children:[af(r)&&(0,z.jsx)(Oa,{prefix:r,fail:r===`VERDICT`&&/FAIL/.test(n)}),(0,z.jsx)(Zu,{text:of(n,r)})]})]})]},e.id??t)})]}):d===`status`?(0,z.jsxs)(H,{className:`min-w-0`,children:[(0,z.jsx)(U,{title:`Status stream`,icon:`health`,path:`~/agent-coord/status.jsonl · post_status`}),b.length===0&&(0,z.jsx)(`div`,{className:`px-3 py-3 text-[13px] text-umber`,children:`empty`}),b.slice().reverse().map((e,t)=>(0,z.jsxs)(`div`,{className:`grid grid-cols-[var(--spacing-gutter)_1fr] border-b border-sand last:border-b-0`,children:[(0,z.jsx)(`div`,{className:`py-2.5 flex justify-center font-mono text-[12px] text-tan border-r border-sand`,children:`◌`}),(0,z.jsxs)(`div`,{className:`px-3 pt-2 pb-2.5 min-w-0`,children:[(0,z.jsxs)(`div`,{className:`flex gap-2 items-baseline mb-0.5`,children:[(0,z.jsx)(`span`,{className:`font-semibold text-[13px]`,children:e.agentId??e.from}),(0,z.jsxs)(`span`,{className:`font-mono text-[12px] text-ink3`,children:[rf(e.ts),` `,nf(e.ts)]})]}),(0,z.jsxs)(`div`,{className:`text-[14px]`,children:[(0,z.jsx)(W,{tone:`outline`,children:e.status??`?`}),e.detail&&(0,z.jsx)(`span`,{className:`ml-2 text-umber`,children:e.detail})]})]})]},t))]}):(0,z.jsxs)(H,{className:`grid grid-rows-[auto_auto_1fr_auto] min-h-0 min-w-0`,children:[(0,z.jsx)(U,{title:`#${f}`,icon:`room`,path:v?`${v.total} messages`:``,children:(0,z.jsxs)(W,{tone:`outline`,children:[_?.members?.length??0,` members`]})}),pe>0&&(0,z.jsxs)(`button`,{onClick:()=>P({view:`inbox`,msg:null}),className:`mx-3 mb-1.5 text-left bg-ember-wash/60 border border-ember-line rounded-kit px-3 py-2 text-[13px] text-ember-deep cursor-pointer flex items-center gap-2`,children:[(0,z.jsxs)(`span`,{className:`font-semibold`,children:[pe,` unread DM`,pe===1?``:`s`,` to david`]}),(0,z.jsx)(`span`,{className:`text-umber`,children:`— open your inbox →`})]}),M.length>0&&(0,z.jsxs)(`div`,{className:`mx-3 mb-1.5 flex items-center gap-1.5 flex-wrap font-mono text-[11px] text-tan`,children:[(0,z.jsx)(`span`,{className:`uppercase tracking-[.08em]`,children:`members`}),M.map(e=>(0,z.jsxs)(`button`,{onClick:()=>fd(e.agentId),title:`${e.agentId} · DM`,className:`inline-flex items-center gap-1 border-0 bg-transparent p-0 cursor-pointer text-umber`,children:[(0,z.jsx)(Fu,{id:e.agentId,role:e.role,size:14,state:e.liveness,active:e.active}),(0,z.jsx)(`span`,{children:e.agentId})]},e.agentId)),(0,z.jsx)(`span`,{className:`ml-auto`,children:(0,z.jsx)(`button`,{onClick:()=>c(e=>!e),className:`border border-dust rounded-full w-5 h-5 text-[11px] bg-paper text-umber cursor-pointer`,title:`prefix key`,children:`?`})})]}),s&&(0,z.jsxs)(`div`,{className:`mx-3 mb-1.5 flex flex-wrap gap-1.5 items-center`,children:[(0,z.jsx)(`span`,{className:`font-mono text-[11px] text-tan mr-1`,children:`rooms need a prefix:`}),Ea.map(e=>(0,z.jsx)(Oa,{prefix:e},e))]}),(_?.topic||_?.motd)&&(0,z.jsxs)(`div`,{className:`mx-3 mb-1.5 bg-linen border-l-[3px] border-dust px-3 py-2 text-[13px] leading-[1.5] text-umber`,children:[_.topic&&(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`b`,{children:`Topic`}),` · `,_.topic]}),_.motd&&(0,z.jsxs)(`div`,{className:`mt-1 whitespace-pre-line line-clamp-4`,children:[(0,z.jsx)(`b`,{children:`MOTD`}),` · `,_.motd]})]}),(0,z.jsx)(`div`,{className:`overflow-auto max-h-[70vh] flex flex-col-reverse`,children:(0,z.jsxs)(`div`,{children:[F&&(0,z.jsx)(`div`,{className:`px-3 py-2 border-b border-sand text-center`,children:(0,z.jsx)(G,{size:`sm`,tone:`ghost`,onClick:j,disabled:D,children:D?`loading…`:`Load older (${v.total-k.length} more)`})}),y&&(0,z.jsxs)(`div`,{className:`px-3 py-3 text-[13px] text-brick`,children:[`API error: `,y]}),A.length===0&&!y&&(0,z.jsx)(`div`,{className:`px-3 py-3 text-[13px] text-umber`,children:`No messages yet.`}),A.slice().reverse().map((e,t)=>{let n=e.prefix===`DAVID_DECISION`&&!e.answered,r=n||e.kind===`decision`,i=typeof e.text==`string`?e.text:e.raw??``;return(0,z.jsxs)(`div`,{id:e.id?`msg-${e.id}`:void 0,className:`grid grid-cols-[var(--spacing-gutter)_1fr] border-b border-sand transition-shadow ${n?`bg-ember-wash/45`:r?`bg-linen/50`:``}`,children:[(0,z.jsx)(`div`,{className:`py-2.5 flex justify-center font-mono font-medium text-[12px] border-r border-sand select-none ${n?`text-ember`:r?`text-umber`:`text-tan`}`,children:n?`★`:r?`◆`:e.to?`@`:`#`}),(0,z.jsxs)(`div`,{className:`px-3 pt-2 pb-2.5 min-w-0`,children:[(0,z.jsxs)(`div`,{className:`flex gap-2 items-center mb-0.5`,children:[(0,z.jsx)(Fu,{id:e.from??`?`,role:l.find(t=>t.agentId===e.from)?.role,size:14,state:l.find(t=>t.agentId===e.from)?.liveness??`dead`}),(0,z.jsx)(`span`,{className:`font-semibold text-[13px]`,children:e.from}),(0,z.jsxs)(`span`,{className:`font-mono text-[12px] text-ink3`,title:new Date(e.ts??0).toLocaleString(),children:[rf(e.ts),` `,nf(e.ts)]}),n&&(0,z.jsx)(W,{tone:`david`,children:`needs David`}),e.kind&&e.kind!==`chatter`&&(0,z.jsx)(`span`,{className:`font-mono text-[11px] text-tan`,children:e.kind})]}),(0,z.jsxs)(`div`,{className:`whitespace-pre-wrap break-words text-[14px]`,children:[af(e.prefix)&&(0,z.jsx)(Oa,{prefix:e.prefix,fail:e.prefix===`VERDICT`&&/FAIL/.test(i)}),e.prefix===`DAVID_DECISION`&&e.answered&&(0,z.jsx)(W,{tone:`ok`,children:`answered`}),e.inReplyTo&&(0,z.jsx)(`button`,{onClick:()=>P({msg:e.inReplyTo}),className:`ml-1 font-mono text-[11px] text-ember-deep border-0 bg-transparent p-0 cursor-pointer`,title:`in reply to ${e.inReplyTo}`,children:`↩ reply`}),(0,z.jsx)(Zu,{text:of(i,e.prefix)})]})]})]},e.id??t)})]})}),(0,z.jsxs)(`div`,{className:`border-t border-sand px-3 py-2.5 grid gap-1.5`,children:[ce&&(0,z.jsxs)(`div`,{className:`text-[12px] text-umber flex gap-2 items-center`,children:[(0,z.jsxs)(`span`,{className:`font-mono`,children:[`replying to `,ce.from,` · `,nf(ce.ts)]}),(0,z.jsx)(`button`,{className:`border-0 bg-transparent text-ink3 cursor-pointer`,onClick:()=>{le(null),ae(``)},children:`✕`})]}),(0,z.jsxs)(`div`,{className:`grid grid-cols-[auto_auto_1fr_auto] gap-2 items-center`,children:[(0,z.jsxs)(`select`,{value:re,onChange:e=>ie(e.target.value),disabled:!ne,className:`text-[13px] px-2 py-2 border border-dust rounded-kit bg-paper text-walnut font-mono`,title:`send as`,children:[(0,z.jsx)(`option`,{value:`david`,children:`as david`}),(0,z.jsx)(`option`,{value:`groundwork-console`,children:`as groundwork-console`})]}),(0,z.jsxs)(`span`,{className:`font-mono text-[13px] px-2 py-2 border border-dust rounded-kit bg-cream text-umber`,title:`rooms post here; DMs go through Summon (bottom-right)`,children:[`#`,f]}),(0,z.jsx)(`input`,{value:I,onChange:e=>ae(e.target.value),onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&ne&&ue.hasContent(I)&&he()},onPaste:ue.onPaste,onDrop:ue.onDrop,onDragOver:ue.onDragOver,disabled:!ne,className:`text-[13px] px-2.5 py-2 border border-dust rounded-kit bg-paper text-walnut`,placeholder:ne?me.startsWith(`#`)?`FYI: … (rooms need a prefix)`:`message…`:`bus writes are off — enable in the header`}),(0,z.jsx)(G,{tone:`primary`,size:`sm`,onClick:he,disabled:!ne||L||ue.busy||!ue.hasContent(I),children:L?`Sending…`:`Send`})]}),(0,z.jsx)(Xu,{a:ue}),oe&&(0,z.jsx)(`div`,{className:`text-[12px] text-brick`,children:oe}),ne&&(0,z.jsxs)(`div`,{className:`text-[11px] font-mono text-tan`,children:[`every send is a Run · rooms require a prefix · `,(0,z.jsx)(`span`,{className:`text-ember-deep`,children:`DAVID_DECISION:`}),` replies are pinned (kind: decision)`]})]})]}),ee.length>0&&(0,z.jsx)(`aside`,{className:`grid gap-3.5 content-start min-w-0`,children:ee.slice(0,1).map(e=>(0,z.jsxs)(`div`,{className:`border border-ember border-l-4 rounded-kit bg-paper`,children:[(0,z.jsxs)(`div`,{className:`flex justify-between items-center px-3 py-2 border-b border-sand`,children:[(0,z.jsx)(Oa,{prefix:`DAVID_DECISION`}),(0,z.jsxs)(`span`,{className:`text-[13px] text-umber`,children:[nf(e.ts),` · `,e.from]})]}),(0,z.jsx)(`div`,{className:`px-3 py-2.5 text-[13px] whitespace-pre-wrap break-words line-clamp-6`,children:(0,z.jsx)(Zu,{text:of(e.text??``,e.prefix)})}),(0,z.jsxs)(`div`,{className:`flex gap-2 px-3 py-2 border-t border-sand`,children:[(0,z.jsx)(G,{tone:`primary`,size:`sm`,disabled:!ne,onClick:()=>{le(e),ie(`david`),ae(`DAVID_DECISION: `)},children:`Reply as David`}),!ne&&(0,z.jsx)(ja,{})]})]},e.id))})]})}function lf({root:e,min:t=4,deps:n=[]}){let[r,i]=(0,N.useState)([]),[a,o]=(0,N.useState)(null);if((0,N.useEffect)(()=>{let n=e();if(!n){i([]);return}let r=Array.from(n.querySelectorAll(`h2[id], h3[id]`)).map(e=>({id:e.id,text:e.textContent??``,level:e.tagName===`H2`?2:3}));if(i(r),r.length<t)return;let a=new IntersectionObserver(e=>{let t=e.filter(e=>e.isIntersecting).map(e=>e.target.id);if(t.length)o(r.find(e=>t.includes(e.id))?.id??t[0]);else{let e=r.filter(e=>(n.querySelector(`#${CSS.escape(e.id)}`)?.getBoundingClientRect().top??1)<80);e.length&&o(e[e.length-1].id)}},{rootMargin:`-72px 0px -70% 0px`,threshold:[0,1]});for(let e of r){let t=n.querySelector(`#${CSS.escape(e.id)}`);t&&a.observe(t)}return()=>a.disconnect()},[e,t,...n]),r.length<t)return null;let s=t=>{let n=e()?.querySelector(`#${CSS.escape(t)}`);if(n){let e=n.getBoundingClientRect().top+window.scrollY-64;window.scrollTo({top:e}),o(t)}};return(0,z.jsxs)(`nav`,{"aria-label":`document outline`,className:`grid gap-0.5`,children:[(0,z.jsxs)(`div`,{className:`font-semibold text-[13px] uppercase tracking-[.08em] text-umber px-1 pt-1.5 pb-1`,children:[`Outline · `,r.length]}),(0,z.jsx)(`div`,{className:`max-h-[50vh] overflow-auto overscroll-contain grid gap-0 border-l border-sand ml-1`,children:r.map(e=>(0,z.jsx)(`button`,{type:`button`,onClick:()=>s(e.id),className:`text-left border-0 bg-transparent cursor-pointer text-[12px] leading-[1.6] py-0.5 pr-1 -ml-px border-l-2 hover:text-ember-deep ${e.level===3?`pl-5`:`pl-2.5`} ${a===e.id?`border-ember text-walnut font-medium`:`border-transparent text-ink3`}`,title:e.text,"aria-current":a===e.id?`location`:void 0,children:(0,z.jsx)(`span`,{className:`block truncate`,children:e.text})},e.id))})]})}var uf=[[/^PRD\.md$/i,`PRD`,`docs`],[/^CONTEXT(-MAP)?\.md$/i,`Context`,`docs`],[/^TECH_STACK\.md$/i,`Tech stack`,`kit`],[/^STACK_MAP\.md$/i,`Stack map`,`kit`],[/^ARCHITECTURE_GUIDE\.md$/i,`Architecture guide`,`board`],[/^DECISIONS\.md$/i,`Decisions (ADRs)`,`decisions`],[/^PRODUCTION_ROADMAP\.md$/i,`Roadmap`,`phases`],[/^WORKSTREAMS\.md$/i,`Workstreams`,`streams`],[/^QUEUE\.md$/i,`Queue`,`queue`],[/^DONE\.md$/i,`Done`,`done`],[/^FACTS\.md$/i,`Facts`,`facts`],[/^DESIGN_SYSTEM\.md$/i,`Design system`,`skills`],[/^GROUNDWORK_METHODOLOGY\.md$/i,`Methodology`,`knowledge`],[/^COMMANDS\.md$/i,`Commands`,`gates`],[/^_INDEX\.md$/i,`Index`,`home`],[/^ARTIFACTS\.md$/i,`Artifacts`,`kit`]],df=/^(templates\/|phases\/templates\/|\.groundwork\/)/,ff=/^(QUEUE|DONE|WORKSTREAMS|FACTS)\.md$/i,pf=e=>uf.find(([t])=>t.test(e)),mf=({children:e})=>(0,z.jsx)(`div`,{className:`font-mono font-semibold text-[11px] uppercase tracking-[.1em] text-ink3 mt-4 mb-1.5 first:mt-0`,children:e}),hf=e=>{if(!e)return``;let t=Date.now()-Date.parse(e),n=Math.floor(t/864e5);return n>0?`${n} d ago`:`${Math.max(1,Math.floor(t/36e5))} h ago`};function gf(){let{current:e}=Ba(),{doc:t}=ur(),n=K(e?`/projects/${e}/docs`:null,2e4),r=n.data,i=r?.files??[],a=t?decodeURIComponent(t):i.find(e=>/^(README|_INDEX|DESIGN|PRD)\.md$/i.test(e))??i[0],o=!!a&&a.startsWith(`kb:`),s=K(`/knowledge`,6e4).data,c=K(a?o?`/knowledge/doc/${encodeURIComponent(a.slice(3))}`:e?`/projects/${e}/docs/${encodeURIComponent(a)}`:null:null,15e3),{data:l,error:u,loading:d}=c,f=!!a&&(ff.test(a)||o),p=K(`/admin/seam-writes`,1e4).data?.enabled??!1,[m,h]=(0,N.useState)(!1),[g,_]=(0,N.useState)(``),[v,y]=(0,N.useState)(``),[b,x]=(0,N.useState)(``),[S,C]=(0,N.useState)(null),w=m&&g!==v,[T,E]=(0,N.useState)(!0),[D,O]=(0,N.useState)(!0),[k]=Ii(),A=or(),j=e=>{let t=e.replace(/^#\/docs\//,``).split(`#`)[0];if(!t||/^(https?:|mailto:)/.test(e))return null;let n=(a??``).split(`/`).slice(0,-1).join(`/`),r=(t.startsWith(`/`)?t.slice(1):(n?n+`/`:``)+t).split(`/`).reduce((e,t)=>(t===`..`?e.pop():t&&t!==`.`&&e.push(t),e),[]).join(`/`),o=[r,`${r}.md`,decodeURIComponent(r),`${decodeURIComponent(r)}.md`];return i.find(e=>o.some(t=>e.toLowerCase()===t.toLowerCase()))??null},ee=e=>{let t=e.target.closest(`a`);if(!t)return;let n=t.getAttribute(`href`)??``;if(/^(https?:|mailto:)/.test(n))return;let r=j(n);if(e.preventDefault(),r){if(m&&w&&!window.confirm(`Discard unsaved edits?`))return;A(`/docs/${encodeURIComponent(r)}`)}else t.classList.add(`no-target`)},[M,te]=(0,N.useState)(k.get(`view`)??`rendered`),P=k.get(`line`)?Number(k.get(`line`)):null;(0,N.useEffect)(()=>{let e=k.get(`view`);(e===`source`||e===`split`||e===`rendered`)&&te(e)},[k]),(0,N.useEffect)(()=>{if(!P||!l)return;let e=setTimeout(()=>{document.getElementById(`L${P}`)?.scrollIntoView({block:`center`})},100);return()=>clearTimeout(e)},[P,l,M]),(0,N.useEffect)(()=>{h(!1),_(``),y(``),x(``),C(null)},[a,e]),(0,N.useEffect)(()=>{!m||w||!l||l.source===v||(_(l.source),y(l.source),x(l.sha))},[l,m,w,v]),(0,N.useEffect)(()=>{if(!w)return;let e=e=>{e.preventDefault(),e.returnValue=``};return window.addEventListener(`beforeunload`,e),()=>window.removeEventListener(`beforeunload`,e)},[w]);let F=()=>{!l||f||(_(l.source),y(l.source),x(l.sha),h(!0),te(`split`),C(null))},ne=()=>{h(!1),_(``),y(``),x(``),C(null)},re=(0,N.useCallback)(async()=>{if(!(!e||!a||!b)){C(`saving`);try{let t=await La(e,a,{content:g,ifMatch:b});x(t.sha),y(g),C(`saved`),c.refresh(),n.refresh()}catch(e){C(e.message)}}},[e,a,b,g,c,n]);(0,N.useEffect)(()=>{if(!m)return;let e=e=>{(e.metaKey||e.ctrlKey)&&e.key===`s`&&(e.preventDefault(),p&&w&&S!==`saving`&&re())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[m,p,w,S,re]);let ie=e=>{m&&w&&!window.confirm(`Discard unsaved edits?`)&&e.preventDefault()},I=m?g:l?.source??``,ae=(0,N.useRef)(null),L=(0,N.useCallback)(()=>M===`source`?null:ae.current?.querySelector(`.md`)??null,[M]),R=l?.git,oe=(0,N.useMemo)(()=>{let e=[];return R?.lastCommit&&D&&e.push({kind:`commit`,label:`${R.lastCommit.short} · ${R.lastCommit.subject} · ${R.lastCommit.author} · ${hf(R.lastCommit.date)}`,hunks:R.lastCommit.hunks}),R&&T&&R.uncommitted.length&&e.push({kind:`uncommitted`,label:`working tree vs HEAD`,hunks:R.uncommitted}),e},[R,D,T]),se=new Set(r?.lastCommit?.files??[]),ce=K(e?`/projects/${e}/agents`:null,3e4).data??{aide:null,coordinator:null};return(0,z.jsxs)(`div`,{className:`grid grid-cols-[260px_1fr_320px] min-h-full max-[1100px]:grid-cols-1`,children:[(0,z.jsxs)(`nav`,{className:`bg-cream border-r border-sand px-4 py-[18px] max-[1100px]:hidden overflow-auto max-h-[calc(100vh-48px)]`,children:[(0,z.jsx)(mf,{children:`${e||`project`} · docs/`}),i.length===0&&(0,z.jsx)(`div`,{className:`text-[12px] text-umber px-1.5`,children:`no docs/ found`}),(()=>{let e=i.filter(e=>!df.test(e)),t=uf.map(([t])=>e.find(e=>t.test(e))).filter(e=>!!e),n=e.filter(e=>/^phases\//.test(e)&&!t.includes(e)),o=e.filter(e=>!t.includes(e)&&!n.includes(e)),s=({f:e,label:t,icon:n})=>{let i=r?.status[e];return(0,z.jsxs)(B,{to:`/docs/${encodeURIComponent(e)}`,onClick:ie,className:`grid grid-cols-[16px_1fr_auto] gap-2 items-center text-[13px] leading-[1.75] px-1.5 py-0.5 rounded hover:no-underline ${e===a?`text-walnut bg-linen`:`text-ink3`}`,title:e,children:[(0,z.jsx)(`span`,{className:`${e===a?`text-umber`:`text-tan`}`,children:n?wa[n]({size:14}):wa.docs({size:14})}),(0,z.jsx)(`span`,{className:`truncate ${t?`font-sans`:`font-mono`}`,children:t??e.replace(/^phases\//,``)}),(0,z.jsxs)(`span`,{className:`flex gap-1 items-center`,children:[i===`??`?(0,z.jsx)(`span`,{className:`text-[10px] font-mono font-semibold text-tan`,children:`new`}):i?(0,z.jsx)(`span`,{className:`w-2 h-2 rounded-full bg-amber`,title:`uncommitted (${i})`}):null,se.has(e)&&(0,z.jsx)(`span`,{className:`w-2 h-2 rounded-full bg-leaf`,title:`in last commit ${r?.lastCommit?.short}`})]})]},e)};return(0,z.jsxs)(z.Fragment,{children:[t.length>0&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`div`,{className:`font-mono text-[10px] uppercase tracking-[.1em] text-tan mt-2 mb-1 px-1.5`,children:`Kit docs`}),t.map(e=>{let t=pf(e);return(0,z.jsx)(s,{f:e,label:t[1],icon:t[2]},e)})]}),n.length>0&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`div`,{className:`font-mono text-[10px] uppercase tracking-[.1em] text-tan mt-3 mb-1 px-1.5`,children:`Phases`}),n.map(e=>(0,z.jsx)(s,{f:e,icon:`phases`},e))]}),o.length>0&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`div`,{className:`font-mono text-[10px] uppercase tracking-[.1em] text-tan mt-3 mb-1 px-1.5`,children:[`Other docs · `,o.length]}),o.map(e=>(0,z.jsx)(s,{f:e},e))]}),i.length!==e.length&&(0,z.jsxs)(`div`,{className:`font-mono text-[10px] text-tan mt-2 px-1.5`,children:[i.length-e.length,` hidden (templates/, .groundwork/)`]})]})})(),r?.lastCommit&&(0,z.jsxs)(`div`,{className:`mt-3 px-1.5 text-[11px] font-mono text-ink3 leading-[1.5]`,children:[(0,z.jsx)(`span`,{className:`inline-block w-2 h-2 rounded-full bg-leaf mr-1`}),`last docs commit `,(0,z.jsx)(`b`,{className:`text-walnut`,children:r.lastCommit.short}),` · `,hf(r.lastCommit.date),(0,z.jsx)(`div`,{className:`truncate text-tan`,title:r.lastCommit.subject,children:r.lastCommit.subject})]}),(0,z.jsx)(mf,{children:`Knowledge · global${s?.exists?``:` · not configured`}`}),s&&!s.exists&&(0,z.jsxs)(`div`,{className:`text-[12px] text-umber px-1.5`,children:[`No knowledge repo — run `,(0,z.jsx)(`code`,{children:`groundwork knowledge init`}),` (or `,(0,z.jsx)(`code`,{children:`link <dir>`}),`).`]}),s?.exists&&(()=>{let e=({file:e,label:t,sub:n,icon:r=`knowledge`})=>{let i=`kb:${e}`;return(0,z.jsxs)(B,{to:`/docs/${encodeURIComponent(i)}`,onClick:ie,className:`grid grid-cols-[16px_1fr_auto] gap-2 items-center text-[13px] leading-[1.6] px-1.5 py-0.5 rounded hover:no-underline ${i===a?`text-walnut bg-linen`:`text-ink3`}`,title:e,children:[(0,z.jsx)(`span`,{className:i===a?`text-umber`:`text-tan`,children:wa[r]({size:14})}),(0,z.jsx)(`span`,{className:`truncate`,children:t}),n&&(0,z.jsx)(`span`,{className:`font-mono text-[10px] text-tan`,children:n})]},i)};return(0,z.jsxs)(z.Fragment,{children:[s.index&&(0,z.jsx)(e,{file:s.index,label:`ADR index`,icon:`board`}),s.sections.map(t=>{let n=s.adrs.filter(e=>e.section===t);return n.length?(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`div`,{className:`font-mono text-[10px] uppercase tracking-[.1em] text-tan mt-2 mb-0.5 px-1.5`,children:t}),n.map(t=>(0,z.jsx)(e,{file:t.file,label:`${t.id} · ${t.title}`,sub:t.enf??void 0},t.file))]},t):null}),s.adrs.some(e=>e.section===`(not in INDEX)`)&&(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`div`,{className:`font-mono text-[10px] uppercase tracking-[.1em] text-tan mt-2 mb-0.5 px-1.5`,children:`ADRs not in index`}),s.adrs.filter(e=>e.section===`(not in INDEX)`).map(t=>(0,z.jsx)(e,{file:t.file,label:`${t.id} · ${t.title}`},t.file))]}),s.notes.length>0&&(0,z.jsxs)(`div`,{children:[(0,z.jsxs)(`div`,{className:`font-mono text-[10px] uppercase tracking-[.1em] text-tan mt-2 mb-0.5 px-1.5`,children:[`Notes · `,s.notes.length]}),s.notes.map(t=>(0,z.jsx)(e,{file:t.file,label:t.title??t.file.replace(/^notes\//,``),icon:`docs`},t.file))]}),(0,z.jsx)(`div`,{className:`font-mono text-[10px] text-tan mt-2 px-1.5 truncate`,title:`${s.path} · ${s.source}`,children:s.path?.replace(/^\/Users\/[^/]+/,`~`)})]})})()]}),(0,z.jsxs)(`main`,{ref:ae,className:`px-10 py-7 pb-16 bg-paper min-w-0`,children:[(0,z.jsxs)(`div`,{className:`flex items-center justify-between gap-3 mb-2 flex-wrap`,children:[(0,z.jsxs)(`div`,{className:`font-mono text-[12px] text-ink3 truncate`,children:[l?.path??a??``,d&&` · loading…`,m&&w&&` · unsaved`]}),(0,z.jsxs)(`div`,{className:`flex gap-1.5 items-center flex-wrap`,children:[R&&!R.repo&&(0,z.jsx)(W,{tone:`outline`,children:`not a git repo`}),R?.repo&&R.untracked&&(0,z.jsx)(W,{tone:`warn`,children:`untracked file`}),R?.repo&&R.tracked&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`button`,{onClick:()=>E(e=>!e),"aria-pressed":T,className:`inline-flex items-center gap-1.5 font-mono text-[12px] px-2 py-1 rounded-full border cursor-pointer ${T&&R.uncommitted.length?`bg-amber-wash text-amber border-amber-line`:`bg-paper text-umber border-dust`}`,title:`working tree vs HEAD`,children:[(0,z.jsx)(`span`,{className:`w-2 h-2 rounded-full bg-amber`}),`uncommitted · `,R.uncommitted.length,` hunk`,R.uncommitted.length===1?``:`s`]}),R.lastCommit&&(0,z.jsxs)(`button`,{onClick:()=>O(e=>!e),"aria-pressed":D,className:`inline-flex items-center gap-1.5 font-mono text-[12px] px-2 py-1 rounded-full border cursor-pointer ${D?`bg-moss-wash text-moss border-moss-line`:`bg-paper text-umber border-dust`}`,title:`${R.lastCommit.subject} · ${R.lastCommit.author}`,children:[(0,z.jsx)(`span`,{className:`w-2 h-2 rounded-full bg-leaf`}),`last commit `,R.lastCommit.short,` · `,hf(R.lastCommit.date)]})]}),(0,z.jsx)(`span`,{className:`w-px h-5 bg-sand mx-1`}),(0,z.jsx)(G,{tone:`ghost`,size:`sm`,"aria-pressed":M===`rendered`,onClick:()=>te(`rendered`),children:`Rendered`}),(0,z.jsx)(G,{tone:`ghost`,size:`sm`,"aria-pressed":M===`source`,onClick:()=>te(`source`),children:`Source`}),(0,z.jsx)(G,{tone:`ghost`,size:`sm`,"aria-pressed":M===`split`,onClick:()=>te(`split`),children:`Split`}),(0,z.jsx)(`span`,{className:`w-px h-5 bg-sand mx-1`}),o?(0,z.jsxs)(`span`,{className:`font-mono text-[11px] text-tan`,title:s?.path??``,children:[`global knowledge · read-only here · edit in `,s?.path?.replace(/^\/Users\/[^/]+/,`~`)]}):f?(0,z.jsx)(`span`,{className:`font-mono text-[11px] text-tan`,title:`QUEUE/DONE/WORKSTREAMS/FACTS write through the Board (seam)`,children:`seam file · edit on Board`}):m?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(G,{size:`sm`,onClick:ne,children:`Discard`}),(0,z.jsx)(G,{size:`sm`,tone:`primary`,onClick:()=>void re(),disabled:!p||!w||S===`saving`||!b,title:p?`Save to docs/ (⌘S)`:`seam writes are off (header → seam)`,children:S===`saving`?`Saving…`:`Save`}),!p&&(0,z.jsx)(`span`,{className:`font-mono text-[11px] text-tan`,children:`seam writes are off (header → seam)`}),S===`saved`&&!w&&(0,z.jsx)(`span`,{className:`font-mono text-[11px] text-moss`,children:`saved`}),S&&S!==`saving`&&S!==`saved`&&(0,z.jsx)(`span`,{className:`font-mono text-[11px] text-brick max-w-[28ch] truncate`,title:S,children:S})]}):(0,z.jsx)(G,{size:`sm`,onClick:F,disabled:!l,title:`Edit this file in Split (source + preview). Save writes docs/ as a Run.`,children:`Edit`})]})]}),u&&(0,z.jsxs)(`div`,{className:`text-[13px] text-brick`,children:[`Could not load: `,u]}),l&&M===`rendered`&&(0,z.jsx)(`div`,{onClick:ee,children:(0,z.jsx)(Cu,{source:I,changes:m?[]:oe})}),l&&M===`source`&&(m?(0,z.jsx)(_f,{value:g,onChange:_,readOnly:!p}):(0,z.jsx)(vf,{src:l.source,g:R,showUncommitted:T,showCommit:D,jumpLine:P})),l&&M===`split`&&(0,z.jsxs)(`div`,{className:`grid grid-cols-2 gap-4 items-start`,children:[(0,z.jsx)(`div`,{className:`min-w-0`,onClick:ee,children:(0,z.jsx)(Cu,{source:I,changes:m?[]:oe})}),(0,z.jsx)(`div`,{className:`min-w-0 sticky top-2`,children:m?(0,z.jsx)(_f,{value:g,onChange:_,readOnly:!p}):(0,z.jsx)(vf,{src:l.source,g:R,showUncommitted:T,showCommit:D,jumpLine:P})})]}),l&&oe.length>0&&(0,z.jsxs)(`div`,{className:`mt-6 text-[12px] font-mono text-ink3`,children:[`Hover a highlighted block for its diff · `,(0,z.jsx)(`span`,{className:`text-amber`,children:`amber`}),` = uncommitted, `,(0,z.jsx)(`span`,{className:`text-leaf`,children:`green`}),` = last commit touching this file.`]})]}),(0,z.jsxs)(`aside`,{className:`bg-cream border-l border-sand p-3.5 max-[1100px]:hidden`,children:[M!==`source`&&(0,z.jsx)(`div`,{className:`mb-3`,children:(0,z.jsx)(lf,{root:L,deps:[I,M,a]})}),(0,z.jsx)(`div`,{className:`flex justify-between items-center px-1 pt-1.5 pb-2`,children:(0,z.jsx)(`span`,{className:`font-semibold text-[13px] uppercase tracking-[.08em] text-umber`,children:`Ask an agent`})}),(0,z.jsxs)(`div`,{className:`grid gap-2 px-1 text-[13px]`,children:[(0,z.jsxs)(`div`,{className:`text-[12px] text-umber`,children:[`Summon opens the DM thread with its context line set to `,(0,z.jsxs)(`code`,{className:`font-mono text-[11px]`,children:[o?`groundwork-knowledge/${a.slice(3)}`:`${e}/docs/${a}`,P?`:${P}`:``]}),P?``:` — select a line in Source view (or Show line) to cite it`,`.`]}),(0,z.jsxs)(`div`,{className:`flex gap-1.5 flex-wrap`,children:[(0,z.jsx)(G,{size:`sm`,tone:`primary`,onClick:()=>fd(ce.aide??``),disabled:!ce.aide,title:ce.aide?`DM ${ce.aide} about this doc`:`no live aide`,children:`Aide`}),(0,z.jsx)(G,{size:`sm`,onClick:()=>fd(ce.coordinator??``),disabled:!ce.coordinator,title:ce.coordinator?`DM ${ce.coordinator}`:`no live coordinator`,children:`Coordinator`}),(0,z.jsx)(G,{size:`sm`,tone:`ghost`,onClick:()=>fd(``),title:`pick from the radial`,children:`Other…`})]})]}),R?.lastCommit&&(0,z.jsxs)(`div`,{className:`mt-4 px-1 text-[12px] font-mono text-ink3 leading-[1.6]`,children:[(0,z.jsx)(`div`,{className:`text-umber font-sans font-semibold text-[13px] mb-1`,children:`Last change to this file`}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`b`,{className:`text-walnut`,children:R.lastCommit.short}),` · `,R.lastCommit.author]}),(0,z.jsx)(`div`,{children:new Date(R.lastCommit.date).toLocaleString()}),(0,z.jsx)(`div`,{className:`text-walnut mt-1 font-sans`,children:R.lastCommit.subject}),(0,z.jsxs)(`div`,{className:`mt-1 text-tan`,children:[R.lastCommit.hunks.length,` hunk`,R.lastCommit.hunks.length===1?``:`s`]})]})]})]})}function _f({value:e,onChange:t,readOnly:n}){return(0,z.jsx)(`textarea`,{value:e,onChange:e=>t(e.target.value),readOnly:n,spellCheck:!1,"aria-label":`Document source`,className:`w-full min-h-[70vh] font-mono text-[13px] leading-[1.6] whitespace-pre bg-linen border border-sand rounded-kit p-4 text-walnut resize-y ${n?`opacity-80`:``}`})}function vf({src:e,g:t,showUncommitted:n,showCommit:r,jumpLine:i}){let a=(e,t)=>!!e?.some(e=>yu(e).some(([e,n])=>t>=e&&t<n));return(0,z.jsx)(`pre`,{className:`font-mono text-[13px] leading-[1.6] whitespace-pre-wrap bg-linen border border-sand rounded-kit p-4 m-0 max-h-[80vh] overflow-auto`,children:e.split(`
35
+ `).map((e,o)=>{let s=o+1,c=n&&a(t?.uncommitted,s),l=r&&a(t?.lastCommit?.hunks,s),u=i===s;return(0,z.jsxs)(`div`,{id:`L${s}`,className:`grid grid-cols-[3.5ch_1fr] gap-3 rounded-[2px] ${u?`bg-ember-wash ring-1 ring-ember`:c?`bg-amber-wash/60`:l?`bg-moss-wash/50`:``}`,children:[(0,z.jsx)(`span`,{className:`text-right select-none ${u?`text-ember font-semibold`:`text-tan`}`,children:s}),(0,z.jsx)(`span`,{children:e||` `})]},o)})})}var yf=e=>/done|merged|deployed|complete|closed|✅/i.test(e),bf=e=>yf(e)?`ok`:/block/i.test(e)?`bad`:/queued|hold|wait/i.test(e)?`warn`:`neutral`;function xf({project:e}){let t=K(e?`/projects/${e}/board`:null,15e3).data,n=K(`/bus/agents`,2e4).data??[];if(!t)return null;let r=t.phases.find(e=>e.state===`ongoing`)??t.phases.find(e=>e.state===`planned`),i=t.workstreams.rows.filter(e=>!(`malformed`in e)).map(e=>e.schema===`workstreams.v1`?{name:e.stream,owner:e.owner,status:e.status,note:e.lastNote}:{name:e.lane,owner:e.owner,status:e.state,note:e.currentSlice}).filter(e=>!yf(e.status)),a=e=>n.find(t=>t.agentId===e||e.includes(t.agentId))?.agentId??null;return(0,z.jsxs)(`div`,{className:`border border-sand rounded-kit bg-paper px-3 py-2 grid gap-1.5`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,z.jsx)(`span`,{className:`font-mono text-[10px] uppercase tracking-[.1em] text-tan`,children:`now`}),r?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(B,{to:`/board`,className:`font-semibold text-[13px] hover:no-underline text-walnut hover:text-ember-deep`,children:r.title}),(0,z.jsx)(W,{tone:r.state===`ongoing`?`david`:`neutral`,children:r.state}),(0,z.jsxs)(`span`,{className:`font-mono text-[11px] text-ink3`,children:[r.done,`/`,r.total,` tasks`,r.streams?` · ${r.streams} streams`:``]})]}):(0,z.jsx)(`span`,{className:`text-[13px] text-umber`,children:`no phase in flight`}),(0,z.jsxs)(`span`,{className:`ml-auto font-mono text-[11px] text-ink3`,children:[i.length,` active stream`,i.length===1?``:`s`]})]}),i.length>0&&(0,z.jsx)(`div`,{className:`flex gap-1.5 flex-wrap`,children:i.slice(0,8).map(e=>{let t=a(e.owner);return(0,z.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 px-2 py-1 rounded-kit border border-sand bg-cream/60 max-w-[360px]`,title:`${e.name} · ${e.owner} · ${e.status}${e.note?` · ${e.note}`:``}`,children:[t?(0,z.jsx)(id,{id:t,bare:!0,size:`sm`}):(0,z.jsxs)(`span`,{className:`inline-flex items-center gap-1 font-mono text-[12px] text-umber`,children:[(0,z.jsx)(Fu,{id:e.owner,size:14,state:`dead`}),e.owner]}),(0,z.jsx)(`span`,{className:`text-[12px] truncate`,children:e.name}),(0,z.jsx)(W,{tone:bf(e.status),children:e.status.replace(/^[^\w]+/,``).slice(0,18)})]},e.name)})})]})}var Sf=`/api`,Cf=e=>{if(!e)return`—`;let t=Math.floor((Date.now()-e)/1e3);return t<60?`${t} s`:t<3600?`${Math.floor(t/60)} min`:`${Math.floor(t/3600)} h`};function wf(){let{current:e}=Ba(),{linkify:t}=ku(),[n,r]=(0,N.useState)(`project`),[i,a]=(0,N.useState)(40),[o,s]=(0,N.useState)(2),[c,l]=(0,N.useState)(()=>localStorage.getItem(`groundwork-console.monitor.layout`)??`grid`),[u,d]=(0,N.useState)(()=>Number(localStorage.getItem(`groundwork-console.monitor.tileW`)??520));(0,N.useEffect)(()=>{localStorage.setItem(`groundwork-console.monitor.layout`,c),localStorage.setItem(`groundwork-console.monitor.tileW`,String(u))},[c,u]);let[f,p]=(0,N.useState)([]),[m,h]=(0,N.useState)(null),[g,_]=(0,N.useState)(null),[v,y]=(0,N.useState)(!1),[b,x]=(0,N.useState)(!0),[S,C]=(0,N.useState)(0),w=K(n===`project`&&e?`/projects/${e}/board`:null,2e4).data,T=e=>(w?.workstreams.rows.filter(e=>!(`malformed`in e))??[]).map(e=>e.schema===`workstreams.v1`?{name:e.stream,owner:e.owner,status:e.status}:{name:e.lane,owner:e.owner,status:e.state}).filter(t=>(t.owner===e||t.owner.includes(e))&&!/done|merged|deployed|complete|closed|✅/i.test(t.status)),E=(0,N.useRef)({}),D=(0,N.useRef)([]),O=(()=>{let e=f.map(e=>e.agentId),t=D.current.filter(t=>e.includes(t)),n=f.filter(e=>!t.includes(e.agentId)).sort((e,t)=>!!/coordinator/i.test(t.role??``)-+!!/coordinator/i.test(e.role??``)||e.agentId.localeCompare(t.agentId)).map(e=>e.agentId);return D.current=[...t,...n],D.current.map(e=>f.find(t=>t.agentId===e)).filter(Boolean)})(),k=(0,N.useRef)({}),A=(0,N.useRef)({});(0,N.useLayoutEffect)(()=>{let e={};for(let[t,n]of Object.entries(k.current)){if(!n)continue;let r=n.getBoundingClientRect();e[t]=r;let i=A.current[t];if(i&&(i.left!==r.left||i.top!==r.top)){let e=i.left-r.left,t=i.top-r.top;n.style.transition=`none`,n.style.transform=`translate(${e}px,${t}px)`,requestAnimationFrame(()=>{n.style.transition=`transform 320ms cubic-bezier(.2,.7,.2,1)`,n.style.transform=``})}}A.current=e}),(0,N.useEffect)(()=>{let t=!0,r=async()=>{if(!v)try{let r=await fetch(`${Sf}/bus/panes?lines=${i}${b?`&colors=1`:``}${n===`project`&&e?`&project=${encodeURIComponent(e)}`:``}`),a=await r.json();if(!t)return;if(!r.ok)throw Error(String(a.error??r.status));p(a),h(null),C(e=>e+1)}catch(e){t&&h(e.message)}};r();let a=setInterval(r,3e3);return()=>{t=!1,clearInterval(a)}},[n,e,i,v,b]),(0,N.useEffect)(()=>{for(let e of Object.values(E.current))e&&(e.scrollTop=e.scrollHeight)},[S]);let j=f.filter(e=>e.active).length;return(0,z.jsxs)(`div`,{className:`p-4 grid gap-3.5 content-start`,children:[g&&(0,z.jsx)($u,{agentId:g,onClose:()=>_(null)}),(0,z.jsxs)(`div`,{className:`flex items-baseline justify-between flex-wrap gap-2`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`span`,{className:`font-display font-bold text-[34px] leading-[1.1] tracking-[-.015em] text-ember`,children:`Monitor`}),(0,z.jsxs)(`span`,{className:`ml-3 text-[13px] text-umber`,children:[n===`project`?e:`all projects`,` · `,f.length,` pane`,f.length===1?``:`s`,` · `,j,` active · read-only capture every 3 s`]})]}),(0,z.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,z.jsxs)(`span`,{className:`inline-flex border border-dust rounded-kit overflow-hidden`,children:[(0,z.jsx)(`button`,{onClick:()=>r(`project`),"aria-pressed":n===`project`,className:`px-2.5 py-[5px] text-[12px] font-medium border-0 cursor-pointer ${n===`project`?`bg-walnut text-paper`:`bg-paper text-umber`}`,children:e||`project`}),(0,z.jsx)(`button`,{onClick:()=>r(`all`),"aria-pressed":n===`all`,className:`px-2.5 py-[5px] text-[12px] font-medium border-0 cursor-pointer ${n===`all`?`bg-walnut text-paper`:`bg-paper text-umber`}`,children:`all`})]}),(0,z.jsxs)(`span`,{className:`inline-flex border border-dust rounded-kit overflow-hidden`,children:[(0,z.jsx)(`button`,{onClick:()=>l(`grid`),"aria-pressed":c===`grid`,className:`px-2.5 py-[5px] text-[12px] font-mono border-0 cursor-pointer ${c===`grid`?`bg-walnut text-paper`:`bg-paper text-umber`}`,title:`wrapping grid`,children:`grid`}),(0,z.jsx)(`button`,{onClick:()=>l(`row`),"aria-pressed":c===`row`,className:`px-2.5 py-[5px] text-[12px] font-mono border-0 cursor-pointer ${c===`row`?`bg-walnut text-paper`:`bg-paper text-umber`}`,title:`one row, scroll sideways`,children:`row`})]}),c===`grid`&&(0,z.jsx)(`span`,{className:`inline-flex border border-dust rounded-kit overflow-hidden`,children:[1,2,3].map(e=>(0,z.jsxs)(`button`,{onClick:()=>s(e),"aria-pressed":o===e,className:`px-2.5 py-[5px] text-[12px] font-mono border-0 cursor-pointer ${o===e?`bg-walnut text-paper`:`bg-paper text-umber`}`,children:[e,`×`]},e))}),c===`row`&&(0,z.jsx)(`select`,{value:u,onChange:e=>d(Number(e.target.value)),className:`font-mono text-[12px] px-2 py-[5px] border border-dust rounded-kit bg-paper text-umber`,title:`tile width`,children:[420,520,640,800].map(e=>(0,z.jsxs)(`option`,{value:e,children:[e,`px`]},e))}),(0,z.jsx)(`select`,{value:i,onChange:e=>a(Number(e.target.value)),className:`font-mono text-[12px] px-2 py-[5px] border border-dust rounded-kit bg-paper text-umber`,children:[20,40,80,150].map(e=>(0,z.jsxs)(`option`,{value:e,children:[e,` lines`]},e))}),(0,z.jsxs)(`label`,{className:`font-mono text-[11px] text-ink3 flex items-center gap-1`,children:[(0,z.jsx)(`input`,{type:`checkbox`,checked:b,onChange:e=>x(e.target.checked)}),`colors`]}),(0,z.jsx)(G,{size:`sm`,onClick:()=>y(e=>!e),"aria-pressed":v,children:v?`Resume`:`Pause`})]})]}),n===`project`&&e&&(0,z.jsx)(xf,{project:e}),m&&(0,z.jsx)(H,{className:`px-4 py-3 text-[13px] text-brick`,children:m}),f.length===0&&!m&&(0,z.jsxs)(H,{className:`px-4 py-4 text-[13px] text-umber`,children:[`No pane-attached agents`,n===`project`?` for ${e}`:``,`. Agents appear here when their transport is tmux-push (attach_agent) and the pane is alive.`,n===`project`&&(0,z.jsxs)(z.Fragment,{children:[` Try `,(0,z.jsx)(`button`,{className:`underline text-ember-deep bg-transparent border-0 p-0 cursor-pointer`,onClick:()=>r(`all`),children:`all projects`}),`.`]})]}),(0,z.jsx)(`div`,{className:c===`grid`?`grid gap-3.5`:`flex gap-3.5 overflow-x-auto pb-2 snap-x snap-mandatory [scrollbar-width:thin]`,style:c===`grid`?{gridTemplateColumns:`repeat(${o}, minmax(0, 1fr))`}:void 0,children:O.map(e=>(0,z.jsx)(`div`,{ref:t=>{k.current[e.agentId]=t},className:c===`row`?`shrink-0 snap-start`:`min-w-0`,style:c===`row`?{width:u}:void 0,children:(0,z.jsxs)(H,{className:`grid grid-rows-[auto_1fr_auto]`,children:[(0,z.jsx)(`div`,{style:{height:4,background:od(e.role)}}),(0,z.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2 border-b border-sand min-w-0`,children:[(0,z.jsx)(Fu,{id:e.agentId,role:e.role,size:20,state:e.liveness,active:e.active}),(0,z.jsxs)(`span`,{className:`min-w-0`,children:[(0,z.jsx)(`span`,{className:`block font-mono font-semibold text-[13px] truncate leading-tight`,children:e.agentId}),(0,z.jsxs)(`span`,{className:`block font-mono text-[10px] uppercase tracking-[.06em] leading-tight`,style:{color:od(e.role)},children:[sd(e.role),n===`project`&&T(e.agentId).length>0?(0,z.jsxs)(`span`,{className:`text-ink3 normal-case tracking-normal`,children:[` · `,T(e.agentId).map(e=>e.name).join(` · `)]}):``]})]}),n===`all`&&e.project&&(0,z.jsx)(`span`,{className:`font-mono text-[11px] text-tan truncate`,children:e.project}),(0,z.jsxs)(`span`,{className:`ml-auto flex items-center gap-1.5 shrink-0`,children:[(0,z.jsx)(`span`,{className:`font-mono text-[11px] text-ink3`,title:`last pane output`,children:e.active?(0,z.jsx)(W,{tone:`ok`,children:`active`}):(0,z.jsxs)(`span`,{className:`text-tan`,children:[`quiet `,Cf(e.paneActivity)]})}),(0,z.jsx)(`button`,{className:`font-mono text-[11px] text-ember-deep bg-transparent border-0 cursor-pointer`,onClick:()=>fd(e.agentId),title:`DM this agent (Summon)`,children:`DM`}),(0,z.jsx)(`button`,{className:`font-mono text-[11px] text-ember-deep bg-transparent border-0 cursor-pointer underline decoration-dotted`,onClick:()=>_(e.agentId),title:`open full pane`,children:e.pane})]})]}),(0,z.jsx)(`pre`,{ref:t=>{E.current[e.agentId]=t},className:`m-0 px-3 py-2 overflow-auto font-mono text-[11.5px] leading-[1.4] whitespace-pre-wrap break-words pane-dark`,style:{height:`${Math.min(i,80)*16+16}px`},children:e.capture?t(b&&e.capture.ansi?fo(e.capture.ansi):e.capture.text,e.project??void 0):`—`})]})},e.agentId))}),(0,z.jsxs)(`div`,{className:`font-mono text-[11px] text-tan`,children:[`pulsing dot = pane content changed in the last 60 s (status-bar/timer redraws don't count) · `,c===`row`?`row: scroll sideways (shift+wheel / trackpad), tiles snap`:`grid wraps; switch to row for 8+ agents`,` · tiles auto-scroll to the bottom · click a pane id for the full, follow-able view · the console never types into panes — DM opens the agent's thread (Summon)`]})]})}var Tf=[{to:`fleets`,label:`Fleets`,icon:`fleet`,hint:`presence · spawn · unregister · prune · decommission`},{to:`skills`,label:`Skills`,icon:`skills`,hint:`groundwork / playbook skills · updates`},{to:`release`,label:`Release`,icon:`release`,hint:`kit versions · PRs · gates`},{to:`runs`,label:`Runs`,icon:`health`,hint:`every action the console performed`},{to:`events`,label:`Events`,icon:`bus`,hint:`mechanical rules → coordinator (dry-run by default)`}];function Ef(){let{running:e}=Ua(),t=ir(),n=Tf.find(e=>t.pathname.startsWith(`/ops/${e.to}`));return(0,z.jsxs)(`div`,{className:`grid grid-rows-[auto_1fr] min-h-0`,children:[(0,z.jsxs)(`div`,{className:`px-4 pt-3 flex items-end gap-1 border-b border-sand bg-cream/60`,children:[(0,z.jsx)(`span`,{className:`font-mono text-[10px] uppercase tracking-[.1em] text-tan mr-2 pb-2.5`,children:`ops`}),Tf.map(t=>(0,z.jsxs)(Mi,{to:t.to,className:({isActive:e})=>`inline-flex items-center gap-1.5 px-3 py-2 -mb-px border-b-2 text-[13px] font-medium hover:no-underline ${e?`border-ember text-walnut`:`border-transparent text-ink3 hover:text-umber`}`,title:t.hint,children:[(0,z.jsx)(`span`,{className:`text-tan`,children:wa[t.icon]({size:14})}),t.label,t.to===`runs`&&e>0?(0,z.jsx)(`span`,{className:`ml-1 inline-flex items-center justify-center min-w-4 h-4 px-1 rounded-full bg-ember text-paper font-mono text-[10px]`,children:e}):null]},t.to)),n&&(0,z.jsx)(`span`,{className:`ml-auto pb-2.5 font-mono text-[11px] text-tan hidden lg:inline`,children:n.hint})]}),(0,z.jsx)(zr,{})]})}function Df(){return(0,z.jsx)(`div`,{className:`p-4`,children:(0,z.jsx)(jd,{})})}function Of({title:e,danger:t,body:n,confirmWord:r,action:i,payload:a,preview:o,onClose:s}){let[c,l]=(0,N.useState)(``),[u,d]=(0,N.useState)(!1),[f,p]=(0,N.useState)(null),[m,h]=(0,N.useState)(null),g=async()=>{d(!0);try{p(await Ia(i,{...a,confirm:c}))}finally{d(!1)}},_=async()=>{if(o){d(!0);try{h(await o())}finally{d(!1)}}},v=e=>(0,z.jsxs)(`div`,{className:`p-2 rounded-kit border ${e.status===`ok`?`border-moss-line bg-moss-wash/50`:`border-brick-line bg-brick-wash/50`}`,children:[(0,z.jsxs)(`div`,{className:`font-mono text-[12px]`,children:[(0,z.jsx)(W,{tone:e.status===`ok`?`ok`:`bad`,children:e.status}),` `,(0,z.jsx)(`b`,{children:e.label})]}),(0,z.jsxs)(`pre`,{className:`m-0 mt-1 font-mono text-[12px] whitespace-pre-wrap max-h-[30vh] overflow-auto`,children:[e.log.join(`
36
+ `),e.result===void 0?``:`
37
+ `+JSON.stringify(e.result,null,1).slice(0,2e3),e.error?`
38
+ `+e.error:``]})]});return(0,z.jsx)(`div`,{className:`fixed inset-0 z-[60] bg-walnut/30 flex items-start justify-center pt-[10vh]`,onMouseDown:e=>{e.target===e.currentTarget&&s()},children:(0,z.jsxs)(`div`,{className:`w-[600px] bg-paper border rounded-kit shadow-panel ${t?`border-brick`:`border-sand`}`,children:[(0,z.jsx)(`div`,{className:`px-4 py-3 border-b border-sand font-display font-bold text-[18px] ${t?`text-brick`:`text-umber`}`,children:e}),(0,z.jsxs)(`div`,{className:`p-4 grid gap-3 text-[13px] text-umber`,children:[n,o&&!m&&(0,z.jsx)(`div`,{children:(0,z.jsx)(G,{size:`sm`,onClick:_,disabled:u,children:u?`…`:`Preview (dry-run)`})}),m&&v(m),!f&&(0,z.jsxs)(`label`,{className:`grid gap-1`,children:[(0,z.jsxs)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:[`Type `,r,` to confirm`]}),(0,z.jsx)(`input`,{value:c,onChange:e=>l(e.target.value),className:`px-2.5 py-2 border border-dust rounded-kit bg-paper text-walnut font-mono`})]}),f&&v(f)]}),(0,z.jsxs)(`div`,{className:`px-4 py-3 border-t border-sand flex justify-end gap-2`,children:[(0,z.jsx)(G,{size:`sm`,onClick:s,children:f?`Close`:`Cancel`}),!f&&(0,z.jsx)(G,{size:`sm`,tone:`primary`,onClick:g,disabled:c!==r||u,children:u?(0,z.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,z.jsx)(Na,{}),` Running…`]}):`Run`})]})]})})}var kf=`18px 1.6fr 1fr 1fr 1fr 1.2fr auto`,Af=[[`automation`,`groundwork-console: reads + prefixed sends only; no record authority`],[`coordinator`,`routes work, noise sink, faces the fleet`],[`coord-worker`,`lane owner, own worktree, cites every DONE`],[`coord-qa`,`quality gate; PASS/FAIL @ head`],[`coord-ci`,`release operator; merges on cited PASS`],[`coord-aide`,`David’s comms point; owns QUEUE`],[`coord-audit`,`read-only architecture drift`],[`coord-fleet`,`stands up a fleet in tmux`],[`coord-handover`,`context-clear snapshot`]],jf=e=>e===null?`—`:e<6e4?`just now`:e<36e5?`${Math.round(e/6e4)} min`:e<864e5?`${Math.round(e/36e5)} h`:`${Math.round(e/864e5)} d`;function Mf(){let{current:e,projects:t}=Ba(),{data:n,error:r,loading:i}=K(`/bus/agents`,2e4),[a,o]=(0,N.useState)(`project`),{runs:s}=Ua(),c=K(`/kit`).data,[l,u]=(0,N.useState)(!1),d=s.find(e=>e.label===`bus doctor`&&e.status===`ok`),f=d?.result,p=async()=>{u(!0);try{await Ia(`/actions/bus-doctor`)}finally{u(!1)}},[m,h]=(0,N.useState)(!1),[g,_]=(0,N.useState)(null),[v,y]=(0,N.useState)(null),[b,x]=(0,N.useState)(!1),[S,C]=(0,N.useState)(!1),w=K(a===`project`&&e?`/projects/${e}/fleet`:null,2e4).data,T=K(`/admin/bus-writes`,1e4).data?.enabled??!1,E=or(),D=n??[],O=t.find(t=>t.name===e)?.room,k=D.filter(t=>t.project===e||O&&t.project===O),A=a===`project`?k:D,j=A.filter(e=>e.liveness===`dead`&&![`groundwork-console`,`david`].includes(e.agentId)).map(e=>e.agentId),ee=A.filter(e=>e.liveness===`live`).length,M=e=>t.find(t=>t.name===e.project||t.room&&t.room===e.project)?.name,te=e=>M(e)??`~${e.project??`—`}`,P=a===`all`?[...new Set(D.map(te))].sort((e,t)=>!!e.startsWith(`~`)-+!!t.startsWith(`~`)||e.localeCompare(t)):[e],F=e=>{if(e.startsWith(`~`))return{title:`#${e.slice(1)}`,path:`not registered as a project`,registered:!1};let n=t.find(t=>t.name===e);return{title:e,path:n?.room?`#${n.room}`:`no room linked`,registered:!0}};return(0,z.jsxs)(`div`,{className:`grid grid-cols-[1fr_340px] gap-4 p-4 max-[980px]:grid-cols-1`,children:[(0,z.jsxs)(`div`,{className:`grid gap-3.5 content-start min-w-0`,children:[(0,z.jsxs)(`div`,{className:`flex items-start justify-between gap-3 flex-wrap`,children:[(0,z.jsxs)(`div`,{className:`min-w-0`,children:[(0,z.jsx)(`span`,{className:`font-display font-bold text-[34px] leading-[1.1] tracking-[-.015em] text-ember`,children:`Fleets`}),(0,z.jsxs)(`span`,{className:`ml-3 text-[13px] text-umber whitespace-nowrap`,children:[a===`project`?`${e} · `:`all projects · `,A.length,` registered · `,ee,` live`]})]}),(0,z.jsxs)(`div`,{className:`flex items-center gap-1.5 flex-wrap justify-end`,children:[(0,z.jsxs)(`span`,{className:`inline-flex border border-dust rounded-kit overflow-hidden whitespace-nowrap`,children:[(0,z.jsxs)(`button`,{onClick:()=>o(`project`),"aria-pressed":a===`project`,className:`px-2.5 py-[5px] text-[12px] font-medium border-0 cursor-pointer ${a===`project`?`bg-walnut text-paper`:`bg-paper text-umber`}`,children:[e||`project`,` · `,k.length]}),(0,z.jsxs)(`button`,{onClick:()=>o(`all`),"aria-pressed":a===`all`,className:`px-2.5 py-[5px] text-[12px] font-medium border-0 cursor-pointer ${a===`all`?`bg-walnut text-paper`:`bg-paper text-umber`}`,children:[`all · `,D.length]})]}),(0,z.jsx)(G,{size:`sm`,onClick:()=>E(`/monitor`),children:`Monitor`}),(0,z.jsx)(G,{size:`sm`,tone:`primary`,onClick:()=>x(!0),title:`spawn an agent into tmux for this project`,children:`Spawn agent…`}),(0,z.jsxs)(`div`,{className:`relative`,children:[(0,z.jsx)(G,{size:`sm`,onClick:()=>C(e=>!e),"aria-expanded":S,children:`Admin ▾`}),S&&(0,z.jsxs)(`div`,{className:`absolute right-0 top-[calc(100%+6px)] z-40 w-[260px] bg-paper border border-sand rounded-kit shadow-panel whitespace-normal text-left`,onMouseLeave:()=>C(!1),children:[(0,z.jsxs)(`button`,{className:`w-full text-left px-3 py-2 text-[13px] border-0 bg-transparent cursor-pointer hover:bg-linen border-b border-sand`,onClick:()=>{C(!1),p()},disabled:l,children:[l?`Running doctor…`:`Run bus doctor`,(0,z.jsx)(`div`,{className:`font-mono text-[11px] text-tan`,children:`MCP doctor as groundwork-console · read-only`})]}),(0,z.jsxs)(`button`,{className:`w-full text-left px-3 py-2 text-[13px] border-0 bg-transparent cursor-pointer hover:bg-linen border-b border-sand`,onClick:()=>{C(!1),_({kind:`prune`})},children:[`Prune bus data…`,(0,z.jsx)(`div`,{className:`font-mono text-[11px] text-tan`,children:`old messages/status/inbox · dry-run first`})]}),(0,z.jsxs)(`button`,{className:`w-full text-left px-3 py-2 text-[13px] border-0 bg-transparent cursor-pointer hover:bg-linen border-b border-sand disabled:opacity-50`,onClick:()=>{C(!1),_({kind:`dead`})},disabled:j.length===0,children:[`Unregister dead (`,j.length,a===`project`?` in ${e}`:``,`)…`,(0,z.jsx)(`div`,{className:`font-mono text-[11px] text-tan`,children:`force_unregister agents inactive > 24 h`})]}),O&&(0,z.jsxs)(`button`,{className:`w-full text-left px-3 py-2 text-[13px] border-0 bg-transparent cursor-pointer hover:bg-linen text-brick`,onClick:()=>{C(!1),h(!0)},children:[`Decommission fleet + #`,O,`…`,(0,z.jsx)(`div`,{className:`font-mono text-[11px] text-tan`,children:`unregister members + delete room`})]}),!T&&(0,z.jsx)(`div`,{className:`px-3 py-2 font-mono text-[11px] text-tan border-t border-sand`,children:`bus writes are off — admin actions dry-run / refuse`})]})]})]})]}),b&&(0,z.jsx)(Ld,{project:e,canWrite:T,onClose:()=>{x(!1)}}),v&&(0,z.jsx)($u,{agentId:v,onClose:()=>y(null)}),g?.kind===`prune`&&(0,z.jsx)(Of,{title:`Prune bus data`,confirmWord:`PRUNE`,action:`/actions/prune`,payload:{dryRun:!1,olderThanDays:30,targets:[`rooms`,`status`,`inbox`,`receipts`,`members`],removeOrphanInboxes:!0},preview:()=>Ia(`/actions/prune`,{dryRun:!0,olderThanDays:30,targets:[`rooms`,`status`,`inbox`,`receipts`,`members`],removeOrphanInboxes:!0}),onClose:()=>_(null),body:(0,z.jsxs)(`div`,{children:[`MCP `,(0,z.jsx)(`code`,{children:`prune`}),`: removes room messages / status entries / inbox items / receipts older than `,(0,z.jsx)(`b`,{children:`30 days`}),` (decisions kept longer), orphan inboxes and stale memberships. Preview first — the tool has a native dry-run. Requires bus writes on.`]})}),g?.kind===`dead`&&(0,z.jsx)(Of,{danger:!0,title:`Unregister ${j.length} dead agent${j.length===1?``:`s`}`,confirmWord:`UNREGISTER`,action:`/actions/unregister-dead`,payload:{agentIds:j},onClose:()=>_(null),body:(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`code`,{children:`force_unregister`}),` for every agent in `,(0,z.jsx)(`b`,{children:a===`project`?e:`all projects`}),` whose last activity is over 24 h old: `,(0,z.jsx)(`span`,{className:`font-mono text-[12px] text-walnut break-words`,children:j.join(`, `)}),`. Registry entries, transports and inbox markers go; room history stays. Requires bus writes on.`]})}),g?.kind===`one`&&(0,z.jsx)(Of,{danger:!0,title:`Unregister ${g.id}`,confirmWord:g.id,action:`/actions/unregister`,payload:{agentId:g.id},onClose:()=>_(null),body:(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`code`,{children:`force_unregister`}),` `,(0,z.jsx)(`b`,{children:g.id}),`. Requires bus writes on.`]})}),m&&O&&(0,z.jsx)(Nf,{room:O,project:e,agents:k.map(e=>e.agentId),onClose:()=>h(!1)}),r&&(0,z.jsxs)(H,{className:`px-4 py-3 text-[13px] text-brick`,children:[`API error: `,r]}),a===`project`&&w?.state===`present`&&(0,z.jsxs)(H,{children:[(0,z.jsx)(U,{title:`Fleet`,icon:`fleet`,path:`${w.live.length} live · topology`}),(0,z.jsx)(`div`,{className:`px-3 py-3`,children:(0,z.jsx)(Rd,{project:e,fleet:w,canWrite:T,onOpenPane:e=>y(e)})})]}),a===`project`&&(0,z.jsx)(Vd,{project:e,canWrite:T}),A.length===0&&!i&&a===`all`&&(0,z.jsx)(H,{className:`px-4 py-3 text-[13px] text-umber`,children:`No agents registered on the bus.`}),P.filter(e=>a!==`all`||A.some(t=>te(t)===e)).map(e=>{let t=F(e),n=a===`all`?A.filter(t=>te(t)===e):A;return(0,z.jsxs)(H,{children:[a===`all`&&(0,z.jsx)(U,{title:t.title,icon:`fleet`,path:`${t.path} · ${n.length} agent${n.length===1?``:`s`}`,children:!t.registered&&(0,z.jsx)(W,{tone:`outline`,children:`not registered`})}),(0,z.jsxs)(Aa,{cols:kf,children:[(0,z.jsx)(`span`,{}),(0,z.jsx)(`span`,{children:`Agent`}),(0,z.jsx)(`span`,{children:`Role`}),(0,z.jsx)(`span`,{children:`Project`}),(0,z.jsx)(`span`,{children:`Transport`}),(0,z.jsx)(`span`,{children:`Pane · last seen`}),(0,z.jsx)(`span`,{})]}),n.map(e=>(0,z.jsxs)(`div`,{className:`grid gap-3 items-center px-3 min-h-10 border-b border-sand last:border-b-0 hover:bg-linen/60`,style:{gridTemplateColumns:kf},children:[(0,z.jsx)(Ma,{state:e.liveness,active:e.active}),(0,z.jsx)(`span`,{className:`font-mono font-medium text-[13px] truncate`,children:e.agentId}),(0,z.jsx)(`span`,{className:`text-umber text-[13px] truncate`,children:e.role??`—`}),(0,z.jsx)(`span`,{className:`font-mono text-[13px] truncate`,children:e.project??`—`}),(0,z.jsx)(`span`,{className:`justify-self-start`,children:e.transport?(0,z.jsx)(W,{tone:`outline`,children:e.transport}):e.liveness===`dead`?(0,z.jsx)(`span`,{className:`font-mono text-[12px] text-tan`,children:`—`}):(0,z.jsx)(W,{tone:`warn`,children:`not attached`})}),(0,z.jsxs)(`span`,{className:`font-mono text-[12px] text-ink3`,children:[e.pane?(0,z.jsx)(`button`,{className:`border-0 bg-transparent p-0 font-mono text-[12px] text-ember-deep cursor-pointer underline decoration-dotted`,onClick:()=>y(e.agentId),title:`view pane`,children:e.pane}):`—`,` · `,jf(e.heartbeatAgeMs),e.paneCommand?(0,z.jsxs)(`span`,{className:`text-tan`,children:[` · `,e.paneCommand]}):``]}),e.liveness===`dead`?(0,z.jsx)(G,{tone:`ghost`,size:`sm`,onClick:()=>_({kind:`one`,id:e.agentId}),children:`Unregister`}):(0,z.jsx)(G,{tone:`ghost`,size:`sm`,onClick:()=>fd(e.agentId),children:`DM`})]},e.agentId))]},e)})]}),(0,z.jsxs)(`aside`,{className:`grid gap-3.5 content-start min-w-0`,children:[(0,z.jsxs)(H,{children:[(0,z.jsx)(U,{title:`Liveness rule`,icon:`health`,path:`pane activity ∨ heartbeat`}),(0,z.jsxs)(`div`,{className:`px-3 py-2 text-[13px] text-umber`,children:[`last seen = freshest of tmux `,(0,z.jsx)(`code`,{children:`window_activity`}),`, heartbeat, transport/inbox mtimes · `,(0,z.jsx)(`b`,{className:`text-walnut`,children:`live`}),` < 15 min · idle < 24 h · dead beyond. Pulsing dot = pane content changed in the last 60 s (the bottom 3 lines — status/timer strip — are ignored, so an idle harness redrawing its clock does not pulse). Click a pane id to watch it (read-only).`]})]}),(0,z.jsxs)(H,{children:[(0,z.jsx)(U,{title:`Roles`,icon:`fleet`,path:`playbook ${c?.packages?.playbook?.version??`…`}`}),(0,z.jsx)(`div`,{className:`px-3 pt-1.5 pb-2.5 grid gap-1 text-[13px] text-umber`,children:Af.map(([e,t])=>(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`b`,{className:`text-walnut`,children:e}),` — `,t]},e))})]}),(0,z.jsxs)(H,{children:[(0,z.jsx)(U,{title:`Bus doctor`,icon:`doctor`,path:f?`mcp doctor · ${new Date(d.endedAt??d.startedAt).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`})}`:`mcp doctor as groundwork-console`,children:f&&(0,z.jsx)(W,{tone:f.healthy?`ok`:`warn`,children:f.healthy?`healthy`:`${f.summary.warn} warn · ${f.summary.error} error`})}),!f&&(0,z.jsxs)(`div`,{className:`px-3 py-2 text-[13px] text-umber`,children:[`Press `,(0,z.jsx)(`b`,{children:`Run doctor`}),` — calls the MCP `,(0,z.jsx)(`code`,{children:`doctor`}),` tool as `,(0,z.jsx)(`code`,{children:`groundwork-console`}),` (automation). Read-only; `,(0,z.jsx)(`code`,{children:`fix`}),` stays gated.`]}),f?.findings.filter(e=>e.level!==`ok`).map(e=>(0,z.jsxs)(`div`,{className:`grid grid-cols-[var(--spacing-gutter)_1fr] min-h-10 items-center border-b border-sand last:border-b-0`,children:[(0,z.jsx)(`div`,{className:`self-stretch flex items-center justify-center font-mono text-[12px] text-tan border-r border-sand`,children:`!`}),(0,z.jsxs)(`div`,{className:`px-3 py-2 min-w-0`,children:[(0,z.jsx)(W,{tone:e.level===`error`?`bad`:`warn`,children:e.check}),e.fixable&&(0,z.jsx)(`span`,{className:`ml-1.5 inline-flex`,children:(0,z.jsx)(W,{tone:`outline`,children:`fixable`})}),e.detail&&(0,z.jsx)(`div`,{className:`text-[13px] text-umber mt-1 break-words`,children:e.detail})]})]},e.check)),f&&(0,z.jsxs)(`div`,{className:`px-3 py-2 text-[12px] font-mono text-ink3`,children:[f.summary.ok,` ok · `,f.summary.warn,` warn · `,f.summary.error,` error`]})]})]})]})}function Nf({room:e,project:t,agents:n,onClose:r}){let[i,a]=(0,N.useState)(``),[o,s]=(0,N.useState)(!1),[c,l]=(0,N.useState)(!1),[u,d]=(0,N.useState)(null);return(0,z.jsx)(`div`,{className:`fixed inset-0 z-[60] bg-walnut/30 flex items-start justify-center pt-[12vh]`,onMouseDown:e=>{e.target===e.currentTarget&&r()},children:(0,z.jsxs)(`div`,{className:`w-[560px] bg-paper border border-brick rounded-kit shadow-panel`,children:[(0,z.jsxs)(`div`,{className:`px-4 py-3 border-b border-sand font-display font-bold text-[18px] text-brick`,children:[`Decommission fleet + channel #`,e]}),(0,z.jsxs)(`div`,{className:`p-4 grid gap-3 text-[13px]`,children:[(0,z.jsxs)(`div`,{className:`text-umber`,children:[`This will `,(0,z.jsxs)(`b`,{className:`text-walnut`,children:[`force_unregister `,n.length,` agent`,n.length===1?``:`s`]}),` (`,n.slice(0,6).join(`, `),n.length>6?`…`:``,`), then `,(0,z.jsxs)(`b`,{className:`text-walnut`,children:[`delete_room #`,e]}),` (message history is kept in `,(0,z.jsx)(`code`,{children:`~/agent-coord/history`}),`). Repo and seam files are never touched.`]}),(0,z.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,z.jsx)(`input`,{type:`checkbox`,checked:o,onChange:e=>s(e.target.checked)}),` also remove `,(0,z.jsx)(`b`,{children:t}),` from groundwork-console.config.json`]}),(0,z.jsxs)(`label`,{className:`grid gap-1`,children:[(0,z.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Type the room name to confirm`}),(0,z.jsx)(`input`,{value:i,onChange:e=>a(e.target.value),placeholder:e,className:`px-2.5 py-2 border border-dust rounded-kit bg-paper text-walnut font-mono`})]}),(0,z.jsxs)(`div`,{className:`text-[12px] text-umber`,children:[`Bus writes are gated: without `,(0,z.jsx)(`code`,{children:`GROUNDWORK_CONSOLE_BUS_WRITES=1`}),` on the API this runs as a `,(0,z.jsx)(`b`,{children:`dry-run`}),` and records what it would do (see Runs). With the switch on, it executes as `,(0,z.jsx)(`code`,{children:`groundwork-console`}),`.`]}),u&&(0,z.jsxs)(`div`,{className:`p-2 rounded-kit border ${u.status===`ok`?`border-moss-line bg-moss-wash/50`:`border-brick-line bg-brick-wash/50`}`,children:[(0,z.jsxs)(`div`,{className:`font-mono text-[12px]`,children:[(0,z.jsx)(W,{tone:u.status===`ok`?`ok`:`bad`,children:u.status}),` `,(0,z.jsx)(`b`,{children:u.label})]}),(0,z.jsx)(`pre`,{className:`m-0 mt-1 font-mono text-[12px] whitespace-pre-wrap`,children:u.log.join(`
39
+ `)})]})]}),(0,z.jsxs)(`div`,{className:`px-4 py-3 border-t border-sand flex justify-end gap-2`,children:[(0,z.jsx)(G,{size:`sm`,onClick:r,children:u?`Close`:`Cancel`}),!u&&(0,z.jsx)(G,{size:`sm`,tone:`primary`,onClick:async()=>{l(!0);try{d(await Ia(`/actions/decommission`,{room:e,confirm:i,removeProject:o}))}finally{l(!1)}},disabled:i!==e||c,children:c?`Running…`:`Decommission`})]})]})})}var Pf=`1.4fr .6fr .9fr .9fr 1.2fr 2fr`,Ff=({on:e,label:t})=>(0,z.jsx)(`span`,{className:`font-mono text-[11px] px-1.5 py-0.5 rounded ${e?`bg-linen text-umber`:`text-tan line-through opacity-60`}`,children:t});function If(){let{current:e}=Ba(),{data:t,error:n,refresh:r}=K(e?`/projects/${e}/skills`:null,6e4),[i,a]=(0,N.useState)(null);if(n)return(0,z.jsx)(`div`,{className:`p-4`,children:(0,z.jsxs)(H,{className:`px-4 py-3 text-[13px] text-brick`,children:[`API error: `,n]})});if(!t)return(0,z.jsx)(`div`,{className:`p-4 text-umber`,children:`Scanning skills…`});let o=t.groundwork,s=t.playbook,c=o.skills.filter(e=>e.installed&&e.inSync===!1).length+s.cards.filter(e=>e.installed&&(e.inSync===!1||e.legacyEssay)).length+ +!!o.driftedVersion+s.legacyDirs.length;return(0,z.jsxs)(`div`,{className:`grid grid-cols-[1fr_340px] gap-4 p-4 max-[980px]:grid-cols-1`,children:[i===`gwinit`&&(0,z.jsx)(Of,{title:`groundwork init · ${e}`,confirmWord:e,action:`/actions/groundwork-init/${e}`,payload:{},onClose:()=>{a(null),r()},body:(0,z.jsxs)(`div`,{children:[`Runs `,(0,z.jsx)(`code`,{children:`groundwork init <repo>`}),` — installs the skills, IDE mirrors and the `,(0,z.jsx)(`code`,{children:`docs/`}),` scaffold (WORKSTREAMS/QUEUE/DONE/FACTS, methodology, templates, phases/) into the working tree. Nothing is committed; review with `,(0,z.jsx)(`code`,{children:`git status`}),`. Only offered when `,(0,z.jsx)(`code`,{children:`docs/.groundwork/VERSION`}),` is missing.`]})}),i===`gw`&&(0,z.jsx)(Of,{title:`groundwork update · ${e}`,confirmWord:e,action:`/actions/groundwork-update/${e}`,payload:{all:!0,docs:!0},onClose:()=>{a(null),r()},body:(0,z.jsxs)(`div`,{children:[`Runs `,(0,z.jsxs)(`code`,{children:[`groundwork update `,`<repo>`,` --all --docs`]}),` from the kit (`,o.kitVersion,`): refreshes installed skills + IDE mirrors, adds skills added upstream, refreshes the generic reference docs (methodology, COMMANDS, _INDEX), bumps `,(0,z.jsx)(`code`,{children:`docs/.groundwork/VERSION`}),`. `,(0,z.jsx)(`b`,{className:`text-walnut`,children:`Writes into the repo working tree`}),` (uncommitted — review in Docs, which highlights the changes). Project docs (PRD, WORKSTREAMS…) are left alone.`]})}),i===`pb`&&(0,z.jsx)(Of,{title:`agent-coordination update (global)`,confirmWord:`UPDATE`,action:`/actions/playbook-update`,payload:{dryRun:!1},preview:()=>Ia(`/actions/playbook-update`,{dryRun:!0}),onClose:()=>{a(null),r()},body:(0,z.jsxs)(`div`,{children:[`Re-syncs the playbook field cards into `,(0,z.jsx)(`code`,{children:`~/.claude/skills`}),` (+ essay + slices, all harness mirrors) from the kit (`,s.kitVersion,`); removes legacy dirs. Machine-global. Preview shows the exact plan.`]})}),(0,z.jsxs)(`div`,{className:`grid gap-3.5 content-start min-w-0`,children:[(0,z.jsxs)(`div`,{className:`flex items-baseline justify-between`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`span`,{className:`font-display font-bold text-[34px] leading-[1.1] tracking-[-.015em] text-ember`,children:`Skills`}),(0,z.jsxs)(`span`,{className:`ml-3 text-[13px] text-umber`,children:[`what each harness can run — `,e,` and globally · byte-compared to the kit`]})]}),(0,z.jsxs)(`span`,{className:`text-[13px] text-umber`,children:[c,` need attention`]})]}),(0,z.jsxs)(H,{children:[(0,z.jsxs)(U,{title:`Groundwork · per repo`,icon:`skills`,eyebrow:`payload/skills · .claude/skills`,path:`marker ${o.versionMarker??`—`} · kit ${o.kitVersion}`,children:[o.driftedVersion&&(0,z.jsxs)(W,{tone:`warn`,children:[`behind `,o.kitVersion]}),!o.versionMarker&&(0,z.jsx)(G,{size:`sm`,tone:`primary`,onClick:()=>a(`gwinit`),title:`this repo has no docs/.groundwork/VERSION — install Groundwork`,children:`groundwork init…`}),o.versionMarker&&(0,z.jsx)(G,{size:`sm`,tone:o.driftedVersion?`primary`:`default`,onClick:()=>a(`gw`),children:`groundwork update…`})]}),(0,z.jsxs)(Aa,{cols:Pf,children:[(0,z.jsx)(`span`,{children:`Skill`}),(0,z.jsx)(`span`,{children:`Tier`}),(0,z.jsx)(`span`,{children:`Installed`}),(0,z.jsx)(`span`,{children:`In sync`}),(0,z.jsx)(`span`,{children:`Mirrors`}),(0,z.jsx)(`span`,{children:`Description`})]}),o.skills.map(e=>(0,z.jsxs)(`div`,{className:`grid gap-3 items-center px-3 min-h-10 border-b border-sand last:border-b-0 hover:bg-linen/60`,style:{gridTemplateColumns:Pf},children:[(0,z.jsxs)(`span`,{className:`font-mono font-medium text-[13px]`,children:[`/`,e.name]}),(0,z.jsx)(`span`,{children:(0,z.jsx)(W,{tone:e.tier===`min`?`neutral`:`outline`,children:e.tier===`min`?`core`:`optional`})}),(0,z.jsx)(`span`,{children:e.installed?(0,z.jsx)(W,{tone:`ok`,children:`installed`}):(0,z.jsx)(`span`,{className:`font-mono text-[12px] text-tan`,children:`—`})}),(0,z.jsx)(`span`,{children:e.installed?e.inSync?(0,z.jsx)(W,{tone:`ok`,children:`= kit`}):(0,z.jsx)(W,{tone:`warn`,children:`differs`}):(0,z.jsx)(`span`,{className:`font-mono text-[12px] text-tan`,children:`—`})}),(0,z.jsxs)(`span`,{className:`flex gap-1`,children:[(0,z.jsx)(Ff,{on:e.mirrors.cursor,label:`cursor`}),(0,z.jsx)(Ff,{on:e.mirrors.vscode,label:`vscode`})]}),(0,z.jsx)(`span`,{className:`text-[13px] text-umber truncate`,title:e.description,children:e.description})]},e.name))]}),(0,z.jsxs)(H,{children:[(0,z.jsx)(U,{title:`Playbook · machine-global`,icon:`skills`,eyebrow:`field cards`,path:`${(s.homes??[]).map(e=>`${e.harness}: ${e.dir.replace(/^\/Users\/[^/]+/,`~`)}`).join(` · `)||`~/.claude/skills`} · kit ${s.kitVersion}`,children:(0,z.jsx)(G,{size:`sm`,onClick:()=>a(`pb`),children:`agent-coordination update…`})}),(0,z.jsxs)(Aa,{cols:Pf,children:[(0,z.jsx)(`span`,{children:`Card`}),(0,z.jsx)(`span`,{children:`Slices`}),(0,z.jsx)(`span`,{children:`Installed`}),(0,z.jsx)(`span`,{children:`In sync`}),(0,z.jsx)(`span`,{children:`Mirrors`}),(0,z.jsx)(`span`,{children:`Description`})]}),s.cards.map(e=>(0,z.jsxs)(`div`,{className:`grid gap-3 items-center px-3 min-h-10 border-b border-sand last:border-b-0 hover:bg-linen/60`,style:{gridTemplateColumns:Pf},children:[(0,z.jsxs)(`span`,{className:`font-mono font-medium text-[13px]`,children:[`/`,e.name]}),(0,z.jsx)(`span`,{children:e.legacyEssay?(0,z.jsx)(W,{tone:`warn`,children:`775-line essay`}):(0,z.jsxs)(W,{tone:`outline`,children:[e.slices,` slice`,e.slices===1?``:`s`]})}),(0,z.jsx)(`span`,{children:e.installed?(0,z.jsx)(W,{tone:`ok`,children:`installed`}):(0,z.jsx)(`span`,{className:`font-mono text-[12px] text-tan`,children:`—`})}),(0,z.jsx)(`span`,{children:e.installed?e.inSync?(0,z.jsx)(W,{tone:`ok`,children:`= kit`}):(0,z.jsx)(W,{tone:`warn`,children:`differs`}):(0,z.jsx)(`span`,{className:`font-mono text-[12px] text-tan`,children:`—`})}),(0,z.jsxs)(`span`,{className:`flex gap-1 flex-wrap`,children:[(0,z.jsx)(Ff,{on:e.installed,label:`claude`}),(0,z.jsx)(Ff,{on:!!e.homes?.grok?.installed,label:`grok${e.homes?.grok?.installed&&e.homes.grok.inSync===!1?` ≠`:``}`}),(0,z.jsx)(Ff,{on:e.mirrors.cursor,label:`cursor`}),(0,z.jsx)(Ff,{on:e.mirrors.vscode,label:`vscode`}),(0,z.jsx)(Ff,{on:e.mirrors.opencode,label:`opencode`})]}),(0,z.jsx)(`span`,{className:`text-[13px] text-umber truncate`,title:e.description,children:e.description})]},e.name)),s.legacyDirs.length>0&&(0,z.jsxs)(`div`,{className:`px-3 py-2 border-t border-sand text-[13px]`,children:[(0,z.jsx)(W,{tone:`warn`,children:`legacy dirs`}),` `,(0,z.jsxs)(`span`,{className:`text-umber`,children:[s.legacyDirs.join(`, `),` still in `,s.globalDir,` — installer removes them`]})]})]})]}),(0,z.jsxs)(`aside`,{className:`grid gap-3.5 content-start min-w-0`,children:[(0,z.jsxs)(H,{children:[(0,z.jsx)(U,{title:`How this is measured`,icon:`doctor`}),(0,z.jsxs)(`div`,{className:`px-3 py-2 text-[13px] text-umber grid gap-1.5`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`b`,{className:`text-walnut`,children:`In sync`}),` — SHA-1 of the installed `,(0,z.jsx)(`code`,{children:`SKILL.md`}),` equals the kit source (installers copy verbatim).`]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`b`,{className:`text-walnut`,children:`Mirrors`}),` — presence of `,(0,z.jsx)(`code`,{children:`.cursor/commands/<n>.md`}),`, `,(0,z.jsx)(`code`,{children:`.vscode/prompts/<n>.prompt.md`}),`, `,(0,z.jsx)(`code`,{children:`~/.config/opencode/skills/<n>`}),`.`]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`b`,{className:`text-walnut`,children:`Marker`}),` — `,(0,z.jsx)(`code`,{children:`docs/.groundwork/VERSION`}),` vs the kit’s groundwork version.`]}),(0,z.jsxs)(`div`,{children:[`Asked grok for `,(0,z.jsx)(`code`,{children:`groundwork list --json`}),` / `,(0,z.jsx)(`code`,{children:`agent-coordination list --json`}),` to replace the scan.`]})]})]}),(0,z.jsxs)(H,{children:[(0,z.jsx)(U,{title:`Harness mirrors`,icon:`skills`,path:`seam skills-mirror`}),(0,z.jsxs)(`div`,{className:`px-3 py-2 grid gap-2 text-[13px] text-umber`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`b`,{className:`text-walnut`,children:`Claude Code`}),` — canonical `,(0,z.jsx)(`code`,{children:`SKILL.md`}),`; playbook global.`]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`b`,{className:`text-walnut`,children:`Cursor`}),` — `,(0,z.jsx)(`code`,{children:`.cursor/commands`}),`, GENERATED banner.`]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`b`,{className:`text-walnut`,children:`VS Code`}),` — `,(0,z.jsx)(`code`,{children:`.vscode/prompts`}),`, mode from allowed-tools.`]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`b`,{className:`text-walnut`,children:`OpenCode`}),` — auto-discovers `,(0,z.jsx)(`code`,{children:`~/.claude/skills`}),`; templated MCP tool names.`]})]})]})]})]})}var Lf=[[`Tier 0 · QA gate`,`typecheck · build · real tests · independent behaviour check → VERDICT PASS @ head`,`coord-qa`],[`Tier 1 · merge → qa`,`CI merges on cited PASS, squash-verify, auto-deploy to qa in < 10 min, smoke`,`coord-ci`],[`Tier 2 · async`,`long suites, perf, security — never blocking; results chased by ci`,`coord-ci`],[`Prod · promotion`,`David only. Fix-forward on qa.`,`david`]],Rf={"Open PRs":`prs`,"Cutover Gates":`gates`,"Needs David":`needsDavid`,Risks:`risks`,Rooms:`rooms`,"Decisions Recorded":`decisions`},zf=e=>/pass|merged|deployed|✅|green|done/i.test(e)?`ok`:/fail|red|blocked/i.test(e)?`bad`:/david/i.test(e)?`david`:/hold|risk|pending|open/i.test(e)?`warn`:`neutral`,Bf=e=>!!e&&Ea.includes(e),Vf=e=>e?new Date(e).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`}):``;function Hf({s:e}){let t=e.table?e.table.headers.map(()=>`1fr`).join(` `):``;return(0,z.jsxs)(H,{children:[(0,z.jsx)(U,{title:e.title,icon:Rf[e.title],eyebrow:`## ${e.title} · coordinator-only`,path:`docs/WORKSTREAMS.md`}),e.table&&e.table.rows.length>0&&(0,z.jsx)(Aa,{cols:t,children:e.table.headers.map(e=>(0,z.jsx)(`span`,{children:e},e))}),e.table&&e.table.rows.length===1&&Object.values(e.table.rows[0]).every(e=>/^(—|-|none|n\/a|)$/i.test(e.trim())||/none open/i.test(e))?(0,z.jsx)(`div`,{className:`px-3 py-3 text-[13px] text-umber`,children:`none open`}):e.table?.rows.map((n,r)=>(0,z.jsx)(ka,{glyph:`|`,raw:Object.values(n).join(` | `),children:(0,z.jsx)(`div`,{className:`grid gap-3 items-center py-1.5`,style:{gridTemplateColumns:t},children:e.table.headers.map((e,t)=>{let r=n[e]??``,i=/status|state|gate|verdict/i.test(e),a=r.length<=28&&!/[`(]/.test(r);return(0,z.jsx)(`span`,{className:`min-w-0 truncate ${t===0?`font-medium`:`text-[13px] text-umber`}`,title:r,children:i&&r&&a?(0,z.jsx)(W,{tone:zf(r),children:r}):r||(0,z.jsx)(`span`,{className:`text-tan`,children:`—`})},e)})})},r)),e.bullets?.map((e,t)=>(0,z.jsx)(ka,{glyph:`-`,children:(0,z.jsx)(`div`,{className:`py-2 text-[14px]`,children:e})},t)),!e.table?.rows.length&&!e.bullets?.length&&(0,z.jsx)(`div`,{className:`px-3 py-3 text-[13px] text-umber`,children:`empty`})]})}function Uf(){let{current:e}=Ba(),{data:t,error:n}=K(e?`/projects/${e}/release`:null,3e4),r=K(`/kit`).data;if(n)return(0,z.jsx)(`div`,{className:`p-4`,children:(0,z.jsxs)(H,{className:`px-4 py-3 text-[13px] text-brick`,children:[`API error: `,n]})});let i=t?.extensions??[],a=i.filter(e=>e.title!==`Rooms`);return(0,z.jsxs)(`div`,{className:`grid grid-cols-[1fr_340px] gap-4 p-4 max-[980px]:grid-cols-1`,children:[(0,z.jsxs)(`div`,{className:`grid gap-3.5 content-start min-w-0`,children:[(0,z.jsxs)(`div`,{className:`flex items-baseline justify-between`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`span`,{className:`font-display font-bold text-[34px] leading-[1.1] tracking-[-.015em] text-ember`,children:`Release`}),(0,z.jsxs)(`span`,{className:`ml-3 text-[13px] text-umber`,children:[e,` · coordinator-extension sections of docs/WORKSTREAMS.md + bus VERDICT/DONE`]})]}),(0,z.jsx)(`span`,{className:`text-[13px] text-umber`,children:`tier-1 ceiling 10 min · prod = David`})]}),(0,z.jsx)(`div`,{className:`grid grid-cols-4 border border-sand rounded-kit overflow-hidden max-[980px]:grid-cols-2`,children:Lf.map(([e,t,n],r)=>(0,z.jsxs)(`div`,{className:`px-3.5 py-3 border-r border-sand last:border-r-0 ${r===3?`bg-ember-wash`:`bg-paper`}`,children:[(0,z.jsx)(`b`,{className:`block font-bold text-[13px] mb-1 ${r===3?`text-ember-deep`:`text-umber`}`,children:e}),(0,z.jsx)(`span`,{className:`text-[12px] leading-[1.5]`,children:t}),(0,z.jsx)(`span`,{className:`block font-mono font-medium text-[11px] text-ink3 mt-1.5`,children:n})]},e))}),!t&&(0,z.jsx)(`div`,{className:`text-umber text-[13px]`,children:`Reading WORKSTREAMS…`}),t&&i.length===0&&(0,z.jsx)(H,{className:`px-4 py-3 text-[13px] text-umber`,children:`No coordinator-extension sections in this project’s WORKSTREAMS.md (solo project, or not adopted yet).`}),a.map(e=>(0,z.jsx)(Hf,{s:e},e.title))]}),(0,z.jsxs)(`aside`,{className:`grid gap-3.5 content-start min-w-0`,children:[(0,z.jsxs)(H,{children:[(0,z.jsx)(U,{title:`Dock telemetry`,icon:`bus`,path:`VERDICT / DONE from the room`}),(t?.telemetry??[]).length===0&&(0,z.jsx)(`div`,{className:`px-3 py-2 text-[13px] text-umber`,children:`no VERDICT/DONE messages yet`}),(t?.telemetry??[]).map((e,t)=>{let n=String(e.text??``),r=e.prefix??n.split(/[:\s]/)[0];return(0,z.jsxs)(`div`,{className:`grid grid-cols-[var(--spacing-gutter)_1fr] border-b border-sand last:border-b-0`,children:[(0,z.jsx)(`div`,{className:`py-2.5 flex justify-center font-mono text-[12px] text-tan border-r border-sand`,children:`#`}),(0,z.jsxs)(`div`,{className:`px-3 pt-2 pb-2.5 min-w-0`,children:[(0,z.jsxs)(`div`,{className:`flex gap-2 items-baseline mb-0.5`,children:[(0,z.jsx)(`span`,{className:`font-semibold text-[13px]`,children:e.from}),(0,z.jsx)(`span`,{className:`font-mono text-[12px] text-ink3`,children:Vf(e.ts)})]}),(0,z.jsxs)(`div`,{className:`text-[13px] break-words line-clamp-3`,children:[Bf(r)&&(0,z.jsx)(Oa,{prefix:r,fail:/FAIL/.test(n)}),n.replace(/^\w[\w ]*:?\s*/,``)]})]})]},e.id??t)})]}),i.find(e=>e.title===`Rooms`)&&(0,z.jsx)(Hf,{s:i.find(e=>e.title===`Rooms`)}),(0,z.jsxs)(H,{children:[(0,z.jsx)(U,{title:`Kit versions`,icon:`kit`,path:`kit.json`}),(0,z.jsx)(`div`,{className:`px-3 py-2 grid gap-1 font-mono text-[12px] text-umber`,children:r?.packages?Object.entries(r.packages).map(([e,t])=>(0,z.jsxs)(`div`,{className:`grid grid-cols-[1fr_auto] gap-2`,children:[(0,z.jsx)(`span`,{children:t.name}),(0,z.jsx)(`b`,{className:`text-walnut`,children:t.version})]},e)):`—`})]}),t&&(0,z.jsx)(`div`,{className:`text-[11px] font-mono text-tan px-1`,children:t.source})]})]})}var Wf={queued:`outline`,running:`warn`,ok:`ok`,failed:`bad`,cancelled:`neutral`},Gf={mcp:`MCP tool`,cli:`CLI`,bus:`bus send`,shell:`shell`,seam:`seam write`},Kf=e=>{let t=(e.endedAt??Date.now())-e.startedAt;return t<1e3?`${t} ms`:`${(t/1e3).toFixed(1)} s`},qf=e=>new Date(e).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`,second:`2-digit`});function Jf(){let{runs:e,running:t}=Ua(),[n]=Ii(),[r,i]=(0,N.useState)(n.get(`run`));(0,N.useEffect)(()=>{let e=n.get(`run`);e&&i(e)},[n]);let a=e.find(e=>e.id===r)??e[0];return(0,z.jsxs)(`div`,{className:`grid grid-cols-[1fr_480px] gap-4 p-4 max-[1100px]:grid-cols-1`,children:[(0,z.jsxs)(`div`,{className:`grid gap-3.5 content-start min-w-0`,children:[(0,z.jsxs)(`div`,{className:`flex items-baseline justify-between`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`span`,{className:`font-display font-bold text-[34px] leading-[1.1] tracking-[-.015em] text-ember`,children:`Runs`}),(0,z.jsxs)(`span`,{className:`ml-3 text-[13px] text-umber`,children:[`every action the console performs — MCP tools, CLIs, bus sends, shells · `,t,` running`]})]}),(0,z.jsxs)(`span`,{className:`text-[13px] text-umber`,children:[`last `,e.length]})]}),(0,z.jsxs)(H,{children:[e.length===0&&(0,z.jsxs)(`div`,{className:`px-3 py-3 text-[13px] text-umber`,children:[`Nothing has run yet. Try `,(0,z.jsx)(`b`,{children:`Run doctor`}),` on Fleets or `,(0,z.jsx)(`b`,{children:`Doctor`}),` on the Board.`]}),e.map(e=>(0,z.jsxs)(`button`,{onClick:()=>i(e.id),className:`w-full text-left grid grid-cols-[var(--spacing-gutter)_1fr_auto] items-center min-h-10 border-b border-sand last:border-b-0 border-0 bg-transparent cursor-pointer hover:bg-linen/60 ${a?.id===e.id?`bg-linen/70`:``}`,children:[(0,z.jsx)(`span`,{className:`self-stretch flex items-center justify-center font-mono text-[12px] border-r border-sand ${e.status===`running`?`text-amber animate-pulse`:e.status===`failed`?`text-brick`:`text-tan`}`,children:e.status===`running`?(0,z.jsx)(Na,{size:12}):e.status===`ok`?`✓`:e.status===`failed`?`✗`:`○`}),(0,z.jsx)(`span`,{className:`px-3 py-1.5 min-w-0`,children:(0,z.jsxs)(`span`,{className:`flex items-baseline gap-2`,children:[(0,z.jsx)(W,{tone:Wf[e.status],children:e.status}),(0,z.jsx)(`b`,{className:`text-[13px] truncate`,children:e.label}),(0,z.jsx)(`span`,{className:`font-mono text-[11px] text-tan`,children:Gf[e.kind]}),e.project&&(0,z.jsx)(`span`,{className:`font-mono text-[12px] text-ink3`,children:e.project}),e.sideEffects&&(0,z.jsx)(W,{tone:`david`,children:`side effects`})]})}),(0,z.jsxs)(`span`,{className:`px-3 font-mono text-[12px] text-ink3 whitespace-nowrap`,children:[qf(e.startedAt),` · `,Kf(e)]})]},e.id))]})]}),(0,z.jsxs)(`aside`,{className:`grid gap-3.5 content-start min-w-0`,children:[a?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(H,{children:[(0,z.jsx)(U,{title:a.label,icon:`health`,path:`${a.id} · ${Gf[a.kind]}`,children:(0,z.jsx)(W,{tone:Wf[a.status],children:a.status})}),a.args&&(0,z.jsx)(`div`,{className:`px-3 py-2 font-mono text-[12px] text-ink3 border-b border-sand break-all`,children:JSON.stringify(a.args)}),(0,z.jsx)(`pre`,{className:`m-0 px-3 py-2 font-mono text-[12px] leading-[1.6] text-umber whitespace-pre-wrap max-h-[40vh] overflow-auto`,children:a.log.join(`
40
+ `)||`—`}),a.error&&(0,z.jsx)(`div`,{className:`px-3 py-2 border-t border-sand text-[13px] text-brick`,children:a.error})]}),a.result!==void 0&&(0,z.jsxs)(H,{children:[(0,z.jsx)(U,{title:`Result`,icon:`docs`}),(0,z.jsx)(`pre`,{className:`m-0 px-3 py-2 font-mono text-[12px] leading-[1.55] text-walnut whitespace-pre-wrap max-h-[45vh] overflow-auto`,children:typeof a.result==`string`?a.result:JSON.stringify(a.result,null,2)})]})]}):(0,z.jsx)(H,{className:`px-4 py-3 text-[13px] text-umber`,children:`Select a run to see its log and result.`}),(0,z.jsxs)(H,{children:[(0,z.jsx)(U,{title:`What can run`,icon:`gates`}),(0,z.jsxs)(`div`,{className:`px-3 py-2 text-[13px] text-umber grid gap-1`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`b`,{className:`text-walnut`,children:`now`}),` — read-only MCP tools (doctor, list_*, status, read_messages…) as `,(0,z.jsx)(`code`,{children:`groundwork-console`}),` / automation; read-only CLIs (groundwork doctor/status/list).`]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`b`,{className:`text-walnut`,children:`gated`}),` — bus sends (rules engine, replies), prune / unregister, seam writes, shells. Each will appear here with a `,(0,z.jsx)(`span`,{className:`inline-flex`,children:(0,z.jsx)(W,{tone:`david`,children:`side effects`})}),` marker.`]}),(0,z.jsx)(`div`,{className:`text-tan`,children:`Last 200 runs are kept in ~/.groundwork-console/runs.json (survive API restarts; logs truncated to 60 lines on disk).`})]})]})]})]})}var Yf=ki([{path:`/`,Component:Td,children:[{index:!0,Component:Gd},{path:`board`,Component:$d},{path:`bus`,Component:cf},{path:`monitor`,Component:wf},{path:`ops`,Component:Ef,children:[{index:!0,element:(0,z.jsx)(Rr,{to:`/ops/fleets`,replace:!0})},{path:`fleets`,Component:Mf},{path:`skills`,Component:If},{path:`release`,Component:Uf},{path:`runs`,Component:Jf},{path:`events`,Component:Df}]},{path:`fleet`,element:(0,z.jsx)(Rr,{to:`/ops/fleets`,replace:!0})},{path:`release`,element:(0,z.jsx)(Rr,{to:`/ops/release`,replace:!0})},{path:`skills`,element:(0,z.jsx)(Rr,{to:`/ops/skills`,replace:!0})},{path:`runs`,element:(0,z.jsx)(Rr,{to:`/ops/runs`,replace:!0})},{path:`docs/:doc?`,Component:gf}]}]);try{for(let e of Object.keys(localStorage))for(let t of[`kit-console.`,`gwc.`])if(e.startsWith(t)){let n=`groundwork-console.`+e.slice(t.length);localStorage.getItem(n)===null&&localStorage.setItem(n,localStorage.getItem(e)),localStorage.removeItem(e)}}catch{}(0,ri.createRoot)(document.getElementById(`root`)).render((0,z.jsx)(N.StrictMode,{children:(0,z.jsx)(za,{children:(0,z.jsx)(Ha,{children:(0,z.jsx)(to,{children:(0,z.jsx)(Pr,{router:Yf})})})})}));export{o as n,l as r,si as t};