@davidbalzan/groundwork-console 0.1.8 → 0.1.9

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 (95) hide show
  1. package/package.json +1 -1
  2. package/public/assets/{abnfDiagram-N423BO3Z-oco1yJr8.js → abnfDiagram-N423BO3Z-BGsikmsF.js} +1 -1
  3. package/public/assets/{arc-D-FYRBZ0.js → arc-B-4vSlyP.js} +1 -1
  4. package/public/assets/architecture-TIHT7OUA-CWSoiOz-.js +1 -0
  5. package/public/assets/{architectureDiagram-T3A2C74G-CIG6iOMV.js → architectureDiagram-T3A2C74G-BSzvyipw.js} +1 -1
  6. package/public/assets/{blockDiagram-VBNYF7ZC-B6dDKm7d.js → blockDiagram-VBNYF7ZC-C5oWbld9.js} +1 -1
  7. package/public/assets/{c4Diagram-5PPSVZJV-Y3UQgn94.js → c4Diagram-5PPSVZJV-DCrbq1t_.js} +1 -1
  8. package/public/assets/channel-DjKps-UC.js +1 -0
  9. package/public/assets/{chunk-2GRJ4B5K-BoWCLegZ.js → chunk-2GRJ4B5K-ne8hXJmp.js} +1 -1
  10. package/public/assets/{chunk-4I5QYGJK-DZTRMmZG.js → chunk-4I5QYGJK-BPNU3mTP.js} +1 -1
  11. package/public/assets/{chunk-5RXB4S5H-Dw1IdYaS.js → chunk-5RXB4S5H-CqBlGmXs.js} +1 -1
  12. package/public/assets/{chunk-6Q2QTUOP-nWUr6zuz.js → chunk-6Q2QTUOP-CbJEu2Tv.js} +1 -1
  13. package/public/assets/{chunk-7Z6QIM7H-DxXQZe2t.js → chunk-7Z6QIM7H-N6BW9e3u.js} +1 -1
  14. package/public/assets/{chunk-GF5L2VYU-DbHTRiGa.js → chunk-GF5L2VYU-BO3eIRiS.js} +1 -1
  15. package/public/assets/{chunk-I66GZJ75-C97VIOWu.js → chunk-I66GZJ75-Dqby7D_F.js} +1 -1
  16. package/public/assets/{chunk-JQJVKLGR-CeOq7ul_.js → chunk-JQJVKLGR-C-t0GbWv.js} +1 -1
  17. package/public/assets/{chunk-KBJHAD2P-D_xgFhfD.js → chunk-KBJHAD2P-DMPC8ktQ.js} +1 -1
  18. package/public/assets/{chunk-NSK5VX7P-DjNVQuCo.js → chunk-NSK5VX7P-DfB90W7I.js} +1 -1
  19. package/public/assets/{chunk-QR6OTTB3-CGPHl8Ev.js → chunk-QR6OTTB3-PD4VlBbj.js} +1 -1
  20. package/public/assets/{chunk-RYQCIY6F-Ca_NSSUq.js → chunk-RYQCIY6F-Cl0F6wPb.js} +1 -1
  21. package/public/assets/{chunk-UBXNYLIW-BH4KEg7B.js → chunk-UBXNYLIW-BhXlBYFb.js} +1 -1
  22. package/public/assets/{chunk-W5SLKNZC-CzSVKrQX.js → chunk-W5SLKNZC-LMuVsYgU.js} +1 -1
  23. package/public/assets/{chunk-WRU74C26--qTXNfid.js → chunk-WRU74C26-D-XSx_qA.js} +1 -1
  24. package/public/assets/{chunk-XXDRQBXY-0XJhmQM-.js → chunk-XXDRQBXY-y8l-lKuC.js} +1 -1
  25. package/public/assets/classDiagram-JCYQIIEL-DPUY4tj5.js +1 -0
  26. package/public/assets/classDiagram-v2-OCEON4UE-DPUY4tj5.js +1 -0
  27. package/public/assets/{cose-bilkent-JH36ORCC-CeMP2vk-.js → cose-bilkent-JH36ORCC-BjMU0NVP.js} +1 -1
  28. package/public/assets/{cynefin-VYW2F7L2-NtSbHkFO.js → cynefin-VYW2F7L2-B1PZgHyy.js} +1 -1
  29. package/public/assets/{cynefinDiagram-MW4NZA55-B4uWxM0-.js → cynefinDiagram-MW4NZA55-D73WYrdw.js} +1 -1
  30. package/public/assets/{dagre-VZM6K2ZE-C8wHGLeh.js → dagre-VZM6K2ZE-K8m4zmsy.js} +1 -1
  31. package/public/assets/{diagram-7IWD3JNH-DKe15FkE.js → diagram-7IWD3JNH-B33LU3jt.js} +1 -1
  32. package/public/assets/{diagram-B4RE2ZJO-B-pgDq0Z.js → diagram-B4RE2ZJO-BKi9Ghjh.js} +1 -1
  33. package/public/assets/{diagram-LBJQPF4R-16bhvJKB.js → diagram-LBJQPF4R-Ix7F1ppO.js} +1 -1
  34. package/public/assets/{diagram-Q27KOJAE-BuzXd81m.js → diagram-Q27KOJAE-B2p07Tka.js} +1 -1
  35. package/public/assets/{diagram-UB23O5K3-CZzMkkP7.js → diagram-UB23O5K3-D1XH1Bhp.js} +1 -1
  36. package/public/assets/{dist-DoiwlY9_.js → dist-pnrLfy84.js} +1 -1
  37. package/public/assets/{ebnfDiagram-BXEA7PRR-BGUXNic-.js → ebnfDiagram-BXEA7PRR-IkPfGSli.js} +1 -1
  38. package/public/assets/{erDiagram-JOGREHBK--mo3pLi7.js → erDiagram-JOGREHBK-CAWgqEgt.js} +1 -1
  39. package/public/assets/eventmodeling-45OFAUF4-CcctuRbb.js +1 -0
  40. package/public/assets/flowDiagram-UKHOOZJN-zDkWvqJc.js +1 -0
  41. package/public/assets/{ganttDiagram-PKOTCBZU-DbHv-Q1F.js → ganttDiagram-PKOTCBZU-COg5hBC2.js} +1 -1
  42. package/public/assets/{gitGraph-TEB2WS4Q-CU8msIuE.js → gitGraph-TEB2WS4Q-DYuiIPVx.js} +1 -1
  43. package/public/assets/{gitGraphDiagram-DS77QQ5N-CmVui6qG.js → gitGraphDiagram-DS77QQ5N-ZDuhxxyx.js} +1 -1
  44. package/public/assets/index-B0318bcJ.css +2 -0
  45. package/public/assets/index-j_HG7VFe.js +41 -0
  46. package/public/assets/{info-DKCQHKI2-CcA5kzgP.js → info-DKCQHKI2-ByhcH86q.js} +1 -1
  47. package/public/assets/{infoDiagram-6WML65LV-Drd9lSSV.js → infoDiagram-6WML65LV-DItOCnkC.js} +1 -1
  48. package/public/assets/{ishikawaDiagram-WSZJBQD7-CcnlbfwE.js → ishikawaDiagram-WSZJBQD7-DoJV_iGr.js} +1 -1
  49. package/public/assets/{journeyDiagram-NVQOT4AX-CYcWG8V9.js → journeyDiagram-NVQOT4AX-Dj2aplxz.js} +1 -1
  50. package/public/assets/{kanban-definition-27J2QSJJ-Ca5F0ySI.js → kanban-definition-27J2QSJJ-DXK1irL2.js} +1 -1
  51. package/public/assets/{line-BFnVTMoX.js → line-pHRnA6j_.js} +1 -1
  52. package/public/assets/{linear-BVUPf0HH.js → linear-iVFA7555.js} +1 -1
  53. package/public/assets/{mermaid-parser.core-BXY3JF8d.js → mermaid-parser.core-D7AXmMRA.js} +3 -3
  54. package/public/assets/{mermaid.core-DqjaFy6t.js → mermaid.core-B20ztOv3.js} +4 -4
  55. package/public/assets/{mindmap-definition-FAOFIHXS-m3-vScki.js → mindmap-definition-FAOFIHXS-Bsyn0uqK.js} +1 -1
  56. package/public/assets/{packet-7NZHBO7P-BTm7636C.js → packet-7NZHBO7P-CEQknT-e.js} +1 -1
  57. package/public/assets/{pegDiagram-VL7TDLO6-C3kirtKa.js → pegDiagram-VL7TDLO6-DOtsTyuR.js} +1 -1
  58. package/public/assets/{pie-RZYD4A2V-BsF__qFU.js → pie-RZYD4A2V-1iLUvJbV.js} +1 -1
  59. package/public/assets/{pieDiagram-7S7Q4E2Y-YEbSx31D.js → pieDiagram-7S7Q4E2Y-D4--2rpe.js} +1 -1
  60. package/public/assets/{quadrantDiagram-CIZ2JOQS-qY1c3Wr-.js → quadrantDiagram-CIZ2JOQS-Br8f1-Gt.js} +1 -1
  61. package/public/assets/{radar-I7S5WNFK-BaQRhfKS.js → radar-I7S5WNFK-Br-8Crms.js} +1 -1
  62. package/public/assets/{railroad-3IZDKUUU-C4riB9xs.js → railroad-3IZDKUUU-BEfff3Sh.js} +1 -1
  63. package/public/assets/railroad-abnf-AHOZXSZD-BqeIou7M.js +1 -0
  64. package/public/assets/railroad-ebnf-EBAXGLYW-D2cRF1np.js +1 -0
  65. package/public/assets/railroad-peg-LSFZ7HO6-DHsHFfwA.js +1 -0
  66. package/public/assets/{railroadDiagram-AXF67PYL-BDXHJJin.js → railroadDiagram-AXF67PYL-CVe-BvTz.js} +1 -1
  67. package/public/assets/{requirementDiagram-LRYGKXZP-5N_4nQH3.js → requirementDiagram-LRYGKXZP-CWTLQb40.js} +1 -1
  68. package/public/assets/{sankeyDiagram-W5VNT64P-C0zqsu_g.js → sankeyDiagram-W5VNT64P-BMG9HuBY.js} +1 -1
  69. package/public/assets/{sequenceDiagram-SI44F4Z6-DonYJ8_h.js → sequenceDiagram-SI44F4Z6-Bp040MgC.js} +1 -1
  70. package/public/assets/{src-D5IewQLB.js → src-0sS7-ICb.js} +1 -1
  71. package/public/assets/{stateDiagram-OKZ733FA-CEY8i14f.js → stateDiagram-OKZ733FA-DUQ9IHH3.js} +1 -1
  72. package/public/assets/stateDiagram-v2-UEYNNEHI-DZFTLoGK.js +1 -0
  73. package/public/assets/{swimlanes-SLNWSIFB-BBKzhZ8g.js → swimlanes-SLNWSIFB-BUlgj2-U.js} +1 -1
  74. package/public/assets/swimlanesDiagram-ULZ7WXOC-BkedTpdm.js +8 -0
  75. package/public/assets/{timeline-definition-Z64GVDOM-RI7P7P5y.js → timeline-definition-Z64GVDOM-Dr9p5Uap.js} +1 -1
  76. package/public/assets/{treeView-QDETBFTQ-Bpw_kGf5.js → treeView-QDETBFTQ-Cnle-Iuk.js} +1 -1
  77. package/public/assets/{treemap-6X3UGDF4-Deq82US6.js → treemap-6X3UGDF4-CE5Uf4v0.js} +1 -1
  78. package/public/assets/{vennDiagram-T6HMQDX7-DetRcU6h.js → vennDiagram-T6HMQDX7-HC8LLVRa.js} +1 -1
  79. package/public/assets/{wardley-OPB4EBWU-Iwt8nlFq.js → wardley-OPB4EBWU-Bv51cdvB.js} +1 -1
  80. package/public/assets/{wardleyDiagram-T6FBY63Y-iVT5tLSy.js → wardleyDiagram-T6FBY63Y-B-BXTw2T.js} +1 -1
  81. package/public/assets/{xychartDiagram-ELKLHX3M-B7_cZ8Wg.js → xychartDiagram-ELKLHX3M-BJbbcYRA.js} +1 -1
  82. package/public/index.html +2 -2
  83. package/public/assets/architecture-TIHT7OUA-bBJswTmy.js +0 -1
  84. package/public/assets/channel-BeJg4QSq.js +0 -1
  85. package/public/assets/classDiagram-JCYQIIEL-B6RcDz49.js +0 -1
  86. package/public/assets/classDiagram-v2-OCEON4UE-B6RcDz49.js +0 -1
  87. package/public/assets/eventmodeling-45OFAUF4-Bv0pQfuo.js +0 -1
  88. package/public/assets/flowDiagram-UKHOOZJN-cF6VTIV-.js +0 -1
  89. package/public/assets/index-BZBf_g4s.css +0 -2
  90. package/public/assets/index-CJ73bGme.js +0 -41
  91. package/public/assets/railroad-abnf-AHOZXSZD-CBcG7kXE.js +0 -1
  92. package/public/assets/railroad-ebnf-EBAXGLYW-EqgxHSrX.js +0 -1
  93. package/public/assets/railroad-peg-LSFZ7HO6-C5-qxTK4.js +0 -1
  94. package/public/assets/stateDiagram-v2-UEYNNEHI-C13FXtls.js +0 -1
  95. package/public/assets/swimlanesDiagram-ULZ7WXOC-D0VKK_TP.js +0 -8
@@ -1,41 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mermaid.core-DqjaFy6t.js","assets/chunk-Y2CYZVJY-DsF7k-Jl.js","assets/src-D5IewQLB.js","assets/chunk-I66GZJ75-C97VIOWu.js","assets/chunk-NSK5VX7P-DjNVQuCo.js","assets/dist-DoiwlY9_.js","assets/chunk-4I5QYGJK-DZTRMmZG.js","assets/chunk-WRU74C26--qTXNfid.js","assets/chunk-7BUUIJ7U-Bb538aSH.js","assets/chunk-UBXNYLIW-BH4KEg7B.js","assets/chunk-W5SLKNZC-CzSVKrQX.js","assets/chunk-QR6OTTB3-CGPHl8Ev.js","assets/rough.esm-Dy-Kn_BL.js","assets/chunk-7Z6QIM7H-DxXQZe2t.js","assets/line-BFnVTMoX.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 M(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 N(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,N(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,`$&/`)+`/`),N(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+=N(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+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(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 ee(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function P(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 F=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)},I={map:ee,forEach:function(e,t,n){ee(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ee(e,function(){t++}),t},toArray:function(e){return ee(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=I,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:P}},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,F)}catch(e){F(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 M(e){return typeof e!=`object`||!e?null:(e=j&&e[j]||e[`@@iterator`],typeof e==`function`?e:null)}var N=Symbol.for(`react.client.reference`);function ee(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===N?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?ee(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return ee(e(t))}catch{}}return null}var P=Array.isArray,F=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te={pending:!1,data:null,method:null,action:null},ne=[],re=-1;function L(e){return{current:e}}function R(e){0>re||(e.current=ne[re],ne[re]=null,re--)}function z(e,t){re++,ne[re]=e.current,e.current=t}var B=L(null),ie=L(null),ae=L(null),oe=L(null);function se(e,t){switch(z(ae,t),z(ie,e),z(B,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}}R(B),z(B,e)}function ce(){R(B),R(ie),R(ae)}function le(e){e.memoizedState!==null&&z(oe,e);var t=B.current,n=Hd(t,e.type);t!==n&&(z(ie,e),z(B,n))}function ue(e){ie.current===e&&(R(B),R(ie)),oe.current===e&&(R(oe),Qf._currentValue=te)}var de,fe;function pe(e){if(de===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);de=t&&t[1]||``,fe=-1<e.stack.indexOf(`
3
- at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
4
- `+de+e+fe}var me=!1;function he(e,t){if(!e||me)return``;me=!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{me=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?pe(n):``}function ge(e,t){switch(e.tag){case 26:case 27:case 5:return pe(e.type);case 16:return pe(`Lazy`);case 13:return e.child!==t&&t!==null?pe(`Suspense Fallback`):pe(`Suspense`);case 19:return pe(`SuspenseList`);case 0:case 15:return he(e.type,!1);case 11:return he(e.type.render,!1);case 1:return he(e.type,!0);case 31:return pe(`Activity`);default:return``}}function _e(e){try{var t=``,n=null;do t+=ge(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
8
- Error generating stack: `+e.message+`
9
- `+e.stack}}var ve=Object.prototype.hasOwnProperty,ye=t.unstable_scheduleCallback,be=t.unstable_cancelCallback,xe=t.unstable_shouldYield,Se=t.unstable_requestPaint,Ce=t.unstable_now,we=t.unstable_getCurrentPriorityLevel,Te=t.unstable_ImmediatePriority,Ee=t.unstable_UserBlockingPriority,De=t.unstable_NormalPriority,Oe=t.unstable_LowPriority,ke=t.unstable_IdlePriority,Ae=t.log,je=t.unstable_setDisableYieldValue,Me=null,Ne=null;function Pe(e){if(typeof Ae==`function`&&je(e),Ne&&typeof Ne.setStrictMode==`function`)try{Ne.setStrictMode(Me,e)}catch{}}var Fe=Math.clz32?Math.clz32:Re,Ie=Math.log,Le=Math.LN2;function Re(e){return e>>>=0,e===0?32:31-(Ie(e)/Le|0)|0}var ze=256,Be=262144,Ve=4194304;function He(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 Ue(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=He(n))):i=He(o):i=He(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=He(n))):i=He(o)):i=He(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 We(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ge(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 Ke(){var e=Ve;return Ve<<=1,!(Ve&62914560)&&(Ve=4194304),e}function qe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Je(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ye(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-Fe(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&&Xe(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Xe(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Fe(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Ze(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Fe(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function Qe(e,t){var n=t&-t;return n=n&42?1:$e(n),(n&(e.suspendedLanes|t))===0?n:0}function $e(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 et(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function tt(){var e=I.p;return e===0?(e=window.event,e===void 0?32:mp(e.type)):e}function nt(e,t){var n=I.p;try{return I.p=e,t()}finally{I.p=n}}var rt=Math.random().toString(36).slice(2),it=`__reactFiber$`+rt,at=`__reactProps$`+rt,ot=`__reactContainer$`+rt,st=`__reactEvents$`+rt,ct=`__reactListeners$`+rt,lt=`__reactHandles$`+rt,ut=`__reactResources$`+rt,dt=`__reactMarker$`+rt;function ft(e){delete e[it],delete e[at],delete e[st],delete e[ct],delete e[lt]}function pt(e){var t=e[it];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ot]||n[it]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=df(e);e!==null;){if(n=e[it])return n;e=df(e)}return t}e=n,n=e.parentNode}return null}function mt(e){if(e=e[it]||e[ot]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ht(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function gt(e){var t=e[ut];return t||=e[ut]={hoistableStyles:new Map,hoistableScripts:new Map},t}function _t(e){e[dt]=!0}var vt=new Set,yt={};function bt(e,t){xt(e,t),xt(e+`Capture`,t)}function xt(e,t){for(yt[e]=t,e=0;e<t.length;e++)vt.add(t[e])}var St=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]*$`),Ct={},wt={};function Tt(e){return ve.call(wt,e)?!0:ve.call(Ct,e)?!1:St.test(e)?wt[e]=!0:(Ct[e]=!0,!1)}function Et(e,t,n){if(Tt(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 Dt(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 Ot(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 kt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function At(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function jt(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 Mt(e){if(!e._valueTracker){var t=At(e)?`checked`:`value`;e._valueTracker=jt(e,t,``+e[t])}}function Nt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=At(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}function Pt(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 Ft=/[\n"\\]/g;function It(e){return e.replace(Ft,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Lt(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=``+kt(t)):e.value!==``+kt(t)&&(e.value=``+kt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):zt(e,o,kt(n)):zt(e,o,kt(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=``+kt(s):e.removeAttribute(`name`)}function Rt(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)){Mt(e);return}n=n==null?``:``+kt(n),t=t==null?n:``+kt(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),Mt(e)}function zt(e,t,n){t===`number`&&Pt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Bt(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=``+kt(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 Vt(e,t,n){if(t!=null&&(t=``+kt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+kt(n)}function Ht(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(P(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=kt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Mt(e)}function Ut(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Wt=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 Gt(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||Wt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Kt(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&&Gt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Gt(e,o,t[o])}function qt(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 Jt=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`]]),Yt=/^[\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 Xt(e){return Yt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Zt(){}var Qt=null;function $t(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var en=null,tn=null;function nn(e){var t=mt(e);if(t&&(e=t.stateNode)){var n=e[at]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Lt(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="`+It(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[at]||null;if(!a)throw Error(i(90));Lt(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&&Nt(r)}break a;case`textarea`:Vt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Bt(e,!!n.multiple,t,!1)}}}var rn=!1;function an(e,t,n){if(rn)return e(t,n);rn=!0;try{return e(t)}finally{if(rn=!1,(en!==null||tn!==null)&&(vu(),en&&(t=en,e=tn,tn=en=null,nn(t),e)))for(t=0;t<e.length;t++)nn(e[t])}}function on(e,t){var n=e.stateNode;if(n===null)return null;var r=n[at]||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 sn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),cn=!1;if(sn)try{var ln={};Object.defineProperty(ln,"passive",{get:function(){cn=!0}}),window.addEventListener(`test`,ln,ln),window.removeEventListener(`test`,ln,ln)}catch{cn=!1}var un=null,dn=null,fn=null;function pn(){if(fn)return fn;var e,t=dn,n=t.length,r,i=`value`in un?un.value:un.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 fn=i.slice(e,1<r?1-r:void 0)}function mn(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 hn(){return!0}function gn(){return!1}function _n(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)?hn:gn,this.isPropagationStopped=gn,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=hn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=hn)},persist:function(){},isPersistent:hn}),t}var vn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},yn=_n(vn),bn=f({},vn,{view:0,detail:0}),xn=_n(bn),Sn,Cn,wn,Tn=f({},bn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:In,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!==wn&&(wn&&e.type===`mousemove`?(Sn=e.screenX-wn.screenX,Cn=e.screenY-wn.screenY):Cn=Sn=0,wn=e),Sn)},movementY:function(e){return`movementY`in e?e.movementY:Cn}}),En=_n(Tn),Dn=_n(f({},Tn,{dataTransfer:0})),On=_n(f({},bn,{relatedTarget:0})),kn=_n(f({},vn,{animationName:0,elapsedTime:0,pseudoElement:0})),An=_n(f({},vn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),jn=_n(f({},vn,{data:0})),Mn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Nn={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`},Pn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Fn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Pn[e])?!!t[e]:!1}function In(){return Fn}var Ln=_n(f({},bn,{key:function(e){if(e.key){var t=Mn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=mn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Nn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:In,charCode:function(e){return e.type===`keypress`?mn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?mn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Rn=_n(f({},Tn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),zn=_n(f({},bn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:In})),Bn=_n(f({},vn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Vn=_n(f({},Tn,{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})),Hn=_n(f({},vn,{newState:0,oldState:0})),Un=[9,13,27,32],Wn=sn&&`CompositionEvent`in window,Gn=null;sn&&`documentMode`in document&&(Gn=document.documentMode);var Kn=sn&&`TextEvent`in window&&!Gn,qn=sn&&(!Wn||Gn&&8<Gn&&11>=Gn),Jn=` `,Yn=!1;function Xn(e,t){switch(e){case`keyup`:return Un.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Zn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Qn=!1;function $n(e,t){switch(e){case`compositionend`:return Zn(t);case`keypress`:return t.which===32?(Yn=!0,Jn):null;case`textInput`:return e=t.data,e===Jn&&Yn?null:e;default:return null}}function er(e,t){if(Qn)return e===`compositionend`||!Wn&&Xn(e,t)?(e=pn(),fn=dn=un=null,Qn=!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 qn&&t.locale!==`ko`?null:t.data;default:return null}}var tr={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 nr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!tr[e.type]:t===`textarea`}function rr(e,t,n,r){en?tn?tn.push(r):tn=[r]:en=r,t=Td(t,`onChange`),0<t.length&&(n=new yn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var ir=null,ar=null;function or(e){vd(e,0)}function sr(e){if(Nt(ht(e)))return e}function cr(e,t){if(e===`change`)return t}var lr=!1;if(sn){var ur;if(sn){var dr=`oninput`in document;if(!dr){var fr=document.createElement(`div`);fr.setAttribute(`oninput`,`return;`),dr=typeof fr.oninput==`function`}ur=dr}else ur=!1;lr=ur&&(!document.documentMode||9<document.documentMode)}function pr(){ir&&(ir.detachEvent(`onpropertychange`,mr),ar=ir=null)}function mr(e){if(e.propertyName===`value`&&sr(ar)){var t=[];rr(t,ar,e,$t(e)),an(or,t)}}function hr(e,t,n){e===`focusin`?(pr(),ir=t,ar=n,ir.attachEvent(`onpropertychange`,mr)):e===`focusout`&&pr()}function gr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return sr(ar)}function _r(e,t){if(e===`click`)return sr(t)}function vr(e,t){if(e===`input`||e===`change`)return sr(t)}function yr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var br=typeof Object.is==`function`?Object.is:yr;function xr(e,t){if(br(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(!ve.call(t,i)||!br(e[i],t[i]))return!1}return!0}function Sr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Cr(e,t){var n=Sr(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=Sr(n)}}function wr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?wr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Tr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Pt(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=Pt(e.document)}return t}function Er(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 Dr=sn&&`documentMode`in document&&11>=document.documentMode,Or=null,kr=null,Ar=null,jr=!1;function Mr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;jr||Or==null||Or!==Pt(r)||(r=Or,`selectionStart`in r&&Er(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}),Ar&&xr(Ar,r)||(Ar=r,r=Td(kr,`onSelect`),0<r.length&&(t=new yn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Or)))}function Nr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Pr={animationend:Nr(`Animation`,`AnimationEnd`),animationiteration:Nr(`Animation`,`AnimationIteration`),animationstart:Nr(`Animation`,`AnimationStart`),transitionrun:Nr(`Transition`,`TransitionRun`),transitionstart:Nr(`Transition`,`TransitionStart`),transitioncancel:Nr(`Transition`,`TransitionCancel`),transitionend:Nr(`Transition`,`TransitionEnd`)},Fr={},Ir={};sn&&(Ir=document.createElement(`div`).style,`AnimationEvent`in window||(delete Pr.animationend.animation,delete Pr.animationiteration.animation,delete Pr.animationstart.animation),`TransitionEvent`in window||delete Pr.transitionend.transition);function Lr(e){if(Fr[e])return Fr[e];if(!Pr[e])return e;var t=Pr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Ir)return Fr[e]=t[n];return e}var Rr=Lr(`animationend`),zr=Lr(`animationiteration`),Br=Lr(`animationstart`),Vr=Lr(`transitionrun`),Hr=Lr(`transitionstart`),Ur=Lr(`transitioncancel`),Wr=Lr(`transitionend`),Gr=new Map,Kr=`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(` `);Kr.push(`scrollEnd`);function qr(e,t){Gr.set(e,t),bt(t,[e])}var Jr=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)},Yr=[],Xr=0,Zr=0;function Qr(){for(var e=Xr,t=Zr=Xr=0;t<e;){var n=Yr[t];Yr[t++]=null;var r=Yr[t];Yr[t++]=null;var i=Yr[t];Yr[t++]=null;var a=Yr[t];if(Yr[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&ti(n,i,a)}}function $r(e,t,n,r){Yr[Xr++]=e,Yr[Xr++]=t,Yr[Xr++]=n,Yr[Xr++]=r,Zr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ei(e,t,n,r){return $r(e,t,n,r),ni(e)}function V(e,t){return $r(e,null,null,t),ni(e)}function ti(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Fe(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ni(e){if(50<lu)throw lu=0,uu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ri={};function ii(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ai(e,t,n,r){return new ii(e,t,n,r)}function oi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function si(e,t){var n=e.alternate;return n===null?(n=ai(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function ci(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function li(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)oi(e)&&(s=1);else if(typeof e==`string`)s=Uf(e,n,B.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case k:return e=ai(31,n,t,a),e.elementType=k,e.lanes=o,e;case y:return ui(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=ai(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=ai(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=ai(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=ai(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function ui(e,t,n,r){return e=ai(7,e,r,t),e.lanes=n,e}function di(e,t,n){return e=ai(6,e,null,t),e.lanes=n,e}function fi(e){var t=ai(18,null,null,0);return t.stateNode=e,t}function pi(e,t,n){return t=ai(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var mi=new WeakMap;function hi(e,t){if(typeof e==`object`&&e){var n=mi.get(e);return n===void 0?(t={value:e,source:t,stack:_e(t)},mi.set(e,t),t):n}return{value:e,source:t,stack:_e(t)}}var gi=[],_i=0,vi=null,yi=0,bi=[],xi=0,Si=null,Ci=1,wi=``;function Ti(e,t){gi[_i++]=yi,gi[_i++]=vi,vi=e,yi=t}function Ei(e,t,n){bi[xi++]=Ci,bi[xi++]=wi,bi[xi++]=Si,Si=e;var r=Ci;e=wi;var i=32-Fe(r)-1;r&=~(1<<i),n+=1;var a=32-Fe(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Ci=1<<32-Fe(t)+i|n<<i|r,wi=a+e}else Ci=1<<a|n<<i|r,wi=e}function Di(e){e.return!==null&&(Ti(e,1),Ei(e,1,0))}function Oi(e){for(;e===vi;)vi=gi[--_i],gi[_i]=null,yi=gi[--_i],gi[_i]=null;for(;e===Si;)Si=bi[--xi],bi[xi]=null,wi=bi[--xi],bi[xi]=null,Ci=bi[--xi],bi[xi]=null}function ki(e,t){bi[xi++]=Ci,bi[xi++]=wi,bi[xi++]=Si,Ci=t.id,wi=t.overflow,Si=e}var H=null,Ai=null,U=!1,ji=null,Mi=!1,Ni=Error(i(519));function Pi(e){throw Bi(hi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Ni}function Fi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[it]=e,t[at]=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),Rt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:$(`invalid`,t);break;case`textarea`:$(`invalid`,t),Ht(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=Zt),t=!0):t=!1,t||Pi(e,!0)}function Ii(e){for(H=e.return;H;)switch(H.tag){case 5:case 31:case 13:Mi=!1;return;case 27:case 3:Mi=!0;return;default:H=H.return}}function Li(e){if(e!==H)return!1;if(!U)return Ii(e),U=!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&&Ai&&Pi(e),Ii(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ai=uf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ai=uf(e)}else t===27?(t=Ai,Zd(e.type)?(e=lf,lf=null,Ai=e):Ai=t):Ai=H?cf(e.stateNode.nextSibling):null;return!0}function Ri(){Ai=H=null,U=!1}function zi(){var e=ji;return e!==null&&(Yl===null?Yl=e:Yl.push.apply(Yl,e),ji=null),e}function Bi(e){ji===null?ji=[e]:ji.push(e)}var Vi=L(null),Hi=null,Ui=null;function Wi(e,t,n){z(Vi,t._currentValue),t._currentValue=n}function Gi(e){e._currentValue=Vi.current,R(Vi)}function Ki(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 qi(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),Ki(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),Ki(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 Ji(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;br(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===oe.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[Qf]:e.push(Qf))}a=a.return}e!==null&&qi(t,e,n,r),t.flags|=262144}function Yi(e){for(e=e.firstContext;e!==null;){if(!br(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Xi(e){Hi=e,Ui=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Zi(e){return $i(Hi,e)}function Qi(e,t){return Hi===null&&Xi(e),$i(e,t)}function $i(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Ui===null){if(e===null)throw Error(i(308));Ui=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ui=Ui.next=t;return n}var ea=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()})}},ta=t.unstable_scheduleCallback,na=t.unstable_NormalPriority,ra={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ia(){return{controller:new ea,data:new Map,refCount:0}}function aa(e){e.refCount--,e.refCount===0&&ta(na,function(){e.controller.abort()})}var oa=null,sa=0,ca=0,la=null;function ua(e,t){if(oa===null){var n=oa=[];sa=0,ca=ud(),la={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return sa++,t.then(da,da),t}function da(){if(--sa===0&&oa!==null){la!==null&&(la.status=`fulfilled`);var e=oa;oa=null,ca=0,la=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function fa(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 pa=F.S;F.S=function(e,t){Ql=Ce(),typeof t==`object`&&t&&typeof t.then==`function`&&ua(e,t),pa!==null&&pa(e,t)};var ma=L(null);function ha(){var e=ma.current;return e===null?Fl.pooledCache:e}function ga(e,t){t===null?z(ma,ma.current):z(ma,t.pool)}function _a(){var e=ha();return e===null?null:{parent:ra._currentValue,pool:e}}var va=Error(i(460)),ya=Error(i(474)),ba=Error(i(542)),xa={then:function(){}};function Sa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Ca(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Zt,Zt),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,K(e),e;default:if(typeof t.status==`string`)t.then(Zt,Zt);else{if(e=Fl,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,K(e),e}throw G=t,va}}function W(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(G=e,va):e}}var G=null;function wa(){if(G===null)throw Error(i(459));var e=G;return G=null,e}function K(e){if(e===va||e===ba)throw Error(i(483))}var Ta=null,Ea=0;function Da(e){var t=Ea;return Ea+=1,Ta===null&&(Ta=[]),Ca(Ta,e,t)}function Oa(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function ka(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 q(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=si(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=di(n,e.mode,r),t.return=e,t):(t=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&&W(i)===t.type)?(t=a(t,n.props),Oa(t,n),t.return=e,t):(t=li(n.type,n.key,n.props,null,e.mode,r),Oa(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=pi(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=ui(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=di(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case g:return n=li(t.type,t.key,t.props,null,e.mode,n),Oa(n,t),n.return=e,n;case v:return t=pi(t,e.mode,n),t.return=e,t;case O:return t=W(t),f(e,t,n)}if(P(t)||M(t))return t=ui(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Da(t),n);if(t.$$typeof===C)return f(e,Qi(e,t),n);ka(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=W(n),p(e,t,n,r)}if(P(n)||M(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Da(n),r);if(n.$$typeof===C)return p(e,t,Qi(e,n),r);ka(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=W(r),m(e,t,n,r,i)}if(P(r)||M(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Da(r),i);if(r.$$typeof===C)return m(e,t,n,Qi(t,r),i);ka(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),U&&Ti(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 U&&Ti(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)}),U&&Ti(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),U&&Ti(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 U&&Ti(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)}),U&&Ti(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&&W(l)===r.type){n(e,r.sibling),c=a(r,o.props),Oa(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===y?(c=ui(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=li(o.type,o.key,o.props,null,e.mode,c),Oa(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=pi(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=W(o),b(e,r,o,c)}if(P(o))return h(e,r,o,c);if(M(o)){if(l=M(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,Da(o),c);if(o.$$typeof===C)return b(e,r,Qi(e,o),c);ka(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=di(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ea=0;var i=b(e,t,n,r);return Ta=null,i}catch(t){if(t===va||t===ba)throw t;var a=ai(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Aa=q(!0),ja=q(!1),Ma=!1;function Na(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Pa(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 J(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Fa(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Pl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ni(e),ti(e,null,n),t}return $r(e,r,t,n),ni(e)}function Ia(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,Ze(e,n)}}function La(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 Ra=!1;function za(){if(Ra){var e=la;if(e!==null)throw e}}function Ba(e,t,n,r){Ra=!1;var i=e.updateQueue;Ma=!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?(Q&p)===p:(r&p)===p){p!==0&&p===ca&&(Ra=!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:Ma=!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),Ul|=o,e.lanes=o,e.memoizedState=d}}function Va(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Ha(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Va(n[e],t)}var Ua=L(null),Wa=L(0);function Ga(e,t){e=Vl,z(Wa,e),z(Ua,t),Vl=e|t.baseLanes}function Ka(){z(Wa,Vl),z(Ua,Ua.current)}function qa(){Vl=Wa.current,R(Ua),R(Wa)}var Ja=L(null),Ya=null;function Xa(e){var t=e.alternate;z(to,to.current&1),z(Ja,e),Ya===null&&(t===null||Ua.current!==null||t.memoizedState!==null)&&(Ya=e)}function Za(e){z(to,to.current),z(Ja,e),Ya===null&&(Ya=e)}function Qa(e){e.tag===22?(z(to,to.current),z(Ja,e),Ya===null&&(Ya=e)):$a(e)}function $a(){z(to,to.current),z(Ja,Ja.current)}function eo(e){R(Ja),Ya===e&&(Ya=null),R(to)}var to=L(0);function no(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 ro=0,Y=null,io=null,ao=null,oo=!1,so=!1,co=!1,lo=0,uo=0,fo=null,po=0;function mo(){throw Error(i(321))}function ho(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!br(e[n],t[n]))return!1;return!0}function go(e,t,n,r,i,a){return ro=a,Y=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,F.H=e===null||e.memoizedState===null?Ns:Ps,co=!1,a=n(r,i),co=!1,so&&(a=vo(t,n,r,i)),_o(e),a}function _o(e){F.H=Ms;var t=io!==null&&io.next!==null;if(ro=0,ao=io=Y=null,oo=!1,uo=0,fo=null,t)throw Error(i(300));e===null||Zs||(e=e.dependencies,e!==null&&Yi(e)&&(Zs=!0))}function vo(e,t,n,r){Y=e;var a=0;do{if(so&&(fo=null),uo=0,so=!1,25<=a)throw Error(i(301));if(a+=1,ao=io=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}F.H=Fs,o=t(n,r)}while(so);return o}function yo(){var e=F.H,t=e.useState()[0];return t=typeof t.then==`function`?Eo(t):t,e=e.useState()[0],(io===null?null:io.memoizedState)!==e&&(Y.flags|=1024),t}function bo(){var e=lo!==0;return lo=0,e}function xo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function So(e){if(oo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}oo=!1}ro=0,ao=io=Y=null,so=!1,uo=lo=0,fo=null}function Co(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ao===null?Y.memoizedState=ao=e:ao=ao.next=e,ao}function wo(){if(io===null){var e=Y.alternate;e=e===null?null:e.memoizedState}else e=io.next;var t=ao===null?Y.memoizedState:ao.next;if(t!==null)ao=t,io=e;else{if(e===null)throw Y.alternate===null?Error(i(467)):Error(i(310));io=e,e={memoizedState:io.memoizedState,baseState:io.baseState,baseQueue:io.baseQueue,queue:io.queue,next:null},ao===null?Y.memoizedState=ao=e:ao=ao.next=e}return ao}function To(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Eo(e){var t=uo;return uo+=1,fo===null&&(fo=[]),e=Ca(fo,e,t),t=Y,(ao===null?t.memoizedState:ao.next)===null&&(t=t.alternate,F.H=t===null||t.memoizedState===null?Ns:Ps),e}function Do(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Eo(e);if(e.$$typeof===C)return Zi(e)}throw Error(i(438,String(e)))}function Oo(e){var t=null,n=Y.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=Y.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=To(),Y.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 ko(e,t){return typeof t==`function`?t(e):t}function Ao(e){return jo(wo(),io,e)}function jo(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?(ro&f)===f:(Q&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===ca&&(d=!0);else if((ro&p)===p){u=u.next,p===ca&&(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,Y.lanes|=p,Ul|=p;f=u.action,co&&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,Y.lanes|=f,Ul|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!br(o,e.memoizedState)&&(Zs=!0,d&&(n=la,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 Mo(e){var t=wo(),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);br(o,t.memoizedState)||(Zs=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function No(e,t,n){var r=Y,a=wo(),o=U;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!br((io||a).memoizedState,n);if(s&&(a.memoizedState=n,Zs=!0),a=a.queue,is(Io.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||ao!==null&&ao.memoizedState.tag&1){if(r.flags|=2048,$o(9,{destroy:void 0},Fo.bind(null,r,a,n,t),null),Fl===null)throw Error(i(349));o||ro&127||Po(r,t,n)}return n}function Po(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Y.updateQueue,t===null?(t=To(),Y.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Fo(e,t,n,r){t.value=n,t.getSnapshot=r,Lo(t)&&Ro(e)}function Io(e,t,n){return n(function(){Lo(t)&&Ro(e)})}function Lo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!br(e,n)}catch{return!0}}function Ro(e){var t=V(e,2);t!==null&&pu(t,e,2)}function zo(e){var t=Co();if(typeof e==`function`){var n=e;if(e=n(),co){Pe(!0);try{n()}finally{Pe(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ko,lastRenderedState:e},t}function Bo(e,t,n,r){return e.baseState=n,jo(e,io,typeof r==`function`?r:ko)}function Vo(e,t,n,r,a){if(ks(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)}};F.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Ho(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Ho(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=F.T,o={};F.T=o;try{var s=n(i,r),c=F.S;c!==null&&c(o,s),Uo(e,t,s)}catch(n){Go(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),F.T=a}}else try{a=n(i,r),Uo(e,t,a)}catch(n){Go(e,t,n)}}function Uo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Wo(e,t,n)},function(n){return Go(e,t,n)}):Wo(e,t,n)}function Wo(e,t,n){t.status=`fulfilled`,t.value=n,Ko(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Ho(e,n)))}function Go(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Ko(t),t=t.next;while(t!==r)}e.action=null}function Ko(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function qo(e,t){return t}function Jo(e,t){if(U){var n=Fl.formState;if(n!==null){a:{var r=Y;if(U){if(Ai){b:{for(var i=Ai,a=Mi;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){Ai=cf(i.nextSibling),r=i.data===`F!`;break a}}Pi(r)}r=!1}r&&(t=n[0])}}return n=Co(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:qo,lastRenderedState:t},n.queue=r,n=Es.bind(null,Y,r),r.dispatch=n,r=zo(!1),a=Os.bind(null,Y,!1,r.queue),r=Co(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Vo.bind(null,Y,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Yo(e){return Xo(wo(),io,e)}function Xo(e,t,n){if(t=jo(e,t,qo)[0],e=Ao(ko)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Eo(t)}catch(e){throw e===va?ba:e}else r=t;t=wo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(Y.flags|=2048,$o(9,{destroy:void 0},Zo.bind(null,i,n),null)),[r,a,e]}function Zo(e,t){e.action=t}function Qo(e){var t=wo(),n=io;if(n!==null)return Xo(t,n,e);wo(),t=t.memoizedState,n=wo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function $o(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=Y.updateQueue,t===null&&(t=To(),Y.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 es(){return wo().memoizedState}function ts(e,t,n,r){var i=Co();Y.flags|=e,i.memoizedState=$o(1|t,{destroy:void 0},n,r===void 0?null:r)}function ns(e,t,n,r){var i=wo();r=r===void 0?null:r;var a=i.memoizedState.inst;io!==null&&r!==null&&ho(r,io.memoizedState.deps)?i.memoizedState=$o(t,a,n,r):(Y.flags|=e,i.memoizedState=$o(1|t,a,n,r))}function rs(e,t){ts(8390656,8,e,t)}function is(e,t){ns(2048,8,e,t)}function as(e){Y.flags|=4;var t=Y.updateQueue;if(t===null)t=To(),Y.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function os(e){var t=wo().memoizedState;return as({ref:t,nextImpl:e}),function(){if(Pl&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function ss(e,t){return ns(4,2,e,t)}function cs(e,t){return ns(4,4,e,t)}function ls(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 us(e,t,n){n=n==null?null:n.concat([e]),ns(4,4,ls.bind(null,t,e),n)}function ds(){}function fs(e,t){var n=wo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&ho(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ps(e,t){var n=wo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&ho(t,r[1]))return r[0];if(r=e(),co){Pe(!0);try{e()}finally{Pe(!1)}}return n.memoizedState=[r,t],r}function ms(e,t,n){return n===void 0||ro&1073741824&&!(Q&261930)?e.memoizedState=t:(e.memoizedState=n,e=fu(),Y.lanes|=e,Ul|=e,n)}function hs(e,t,n,r){return br(n,t)?n:Ua.current===null?!(ro&42)||ro&1073741824&&!(Q&261930)?(Zs=!0,e.memoizedState=n):(e=fu(),Y.lanes|=e,Ul|=e,t):(e=ms(e,n,r),br(e,t)||(Zs=!0),e)}function gs(e,t,n,r,i){var a=I.p;I.p=a!==0&&8>a?a:8;var o=F.T,s={};F.T=s,Os(e,!1,t,n);try{var c=i(),l=F.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ds(e,t,fa(c,r),du(e)):Ds(e,t,r,du(e))}catch(n){Ds(e,t,{then:function(){},status:`rejected`,reason:n},du())}finally{I.p=a,o!==null&&s.types!==null&&(o.types=s.types),F.T=o}}function _s(){}function vs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=ys(e).queue;gs(e,a,t,te,n===null?_s:function(){return bs(e),n(r)})}function ys(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ko,lastRenderedState:te},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ko,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function bs(e){var t=ys(e);t.next===null&&(t=e.alternate.memoizedState),Ds(e,t.next.queue,{},du())}function xs(){return Zi(Qf)}function Ss(){return wo().memoizedState}function Cs(){return wo().memoizedState}function ws(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=du();e=J(n);var r=Fa(t,e,n);r!==null&&(pu(r,t,n),Ia(r,t,n)),t={cache:ia()},e.payload=t;return}t=t.return}}function Ts(e,t,n){var r=du();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},ks(e)?As(t,n):(n=ei(e,t,n,r),n!==null&&(pu(n,e,r),js(n,t,r)))}function Es(e,t,n){Ds(e,t,n,du())}function Ds(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(ks(e))As(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,br(s,o))return $r(e,t,i,0),Fl===null&&Qr(),!1}catch{}if(n=ei(e,t,i,r),n!==null)return pu(n,e,r),js(n,t,r),!0}return!1}function Os(e,t,n,r){if(r={lane:2,revertLane:ud(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},ks(e)){if(t)throw Error(i(479))}else t=ei(e,n,r,2),t!==null&&pu(t,e,2)}function ks(e){var t=e.alternate;return e===Y||t!==null&&t===Y}function As(e,t){so=oo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function js(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ze(e,n)}}var Ms={readContext:Zi,use:Do,useCallback:mo,useContext:mo,useEffect:mo,useImperativeHandle:mo,useLayoutEffect:mo,useInsertionEffect:mo,useMemo:mo,useReducer:mo,useRef:mo,useState:mo,useDebugValue:mo,useDeferredValue:mo,useTransition:mo,useSyncExternalStore:mo,useId:mo,useHostTransitionStatus:mo,useFormState:mo,useActionState:mo,useOptimistic:mo,useMemoCache:mo,useCacheRefresh:mo};Ms.useEffectEvent=mo;var Ns={readContext:Zi,use:Do,useCallback:function(e,t){return Co().memoizedState=[e,t===void 0?null:t],e},useContext:Zi,useEffect:rs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ts(4194308,4,ls.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ts(4194308,4,e,t)},useInsertionEffect:function(e,t){ts(4,2,e,t)},useMemo:function(e,t){var n=Co();t=t===void 0?null:t;var r=e();if(co){Pe(!0);try{e()}finally{Pe(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Co();if(n!==void 0){var i=n(t);if(co){Pe(!0);try{n(t)}finally{Pe(!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=Ts.bind(null,Y,e),[r.memoizedState,e]},useRef:function(e){var t=Co();return e={current:e},t.memoizedState=e},useState:function(e){e=zo(e);var t=e.queue,n=Es.bind(null,Y,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ds,useDeferredValue:function(e,t){return ms(Co(),e,t)},useTransition:function(){var e=zo(!1);return e=gs.bind(null,Y,e.queue,!0,!1),Co().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=Y,a=Co();if(U){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Fl===null)throw Error(i(349));Q&127||Po(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,rs(Io.bind(null,r,o,e),[e]),r.flags|=2048,$o(9,{destroy:void 0},Fo.bind(null,r,o,n,t),null),n},useId:function(){var e=Co(),t=Fl.identifierPrefix;if(U){var n=wi,r=Ci;n=(r&~(1<<32-Fe(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=lo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=po++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:xs,useFormState:Jo,useActionState:Jo,useOptimistic:function(e){var t=Co();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Os.bind(null,Y,!0,n),n.dispatch=t,[e,t]},useMemoCache:Oo,useCacheRefresh:function(){return Co().memoizedState=ws.bind(null,Y)},useEffectEvent:function(e){var t=Co(),n={impl:e};return t.memoizedState=n,function(){if(Pl&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Ps={readContext:Zi,use:Do,useCallback:fs,useContext:Zi,useEffect:is,useImperativeHandle:us,useInsertionEffect:ss,useLayoutEffect:cs,useMemo:ps,useReducer:Ao,useRef:es,useState:function(){return Ao(ko)},useDebugValue:ds,useDeferredValue:function(e,t){return hs(wo(),io.memoizedState,e,t)},useTransition:function(){var e=Ao(ko)[0],t=wo().memoizedState;return[typeof e==`boolean`?e:Eo(e),t]},useSyncExternalStore:No,useId:Ss,useHostTransitionStatus:xs,useFormState:Yo,useActionState:Yo,useOptimistic:function(e,t){return Bo(wo(),io,e,t)},useMemoCache:Oo,useCacheRefresh:Cs};Ps.useEffectEvent=os;var Fs={readContext:Zi,use:Do,useCallback:fs,useContext:Zi,useEffect:is,useImperativeHandle:us,useInsertionEffect:ss,useLayoutEffect:cs,useMemo:ps,useReducer:Mo,useRef:es,useState:function(){return Mo(ko)},useDebugValue:ds,useDeferredValue:function(e,t){var n=wo();return io===null?ms(n,e,t):hs(n,io.memoizedState,e,t)},useTransition:function(){var e=Mo(ko)[0],t=wo().memoizedState;return[typeof e==`boolean`?e:Eo(e),t]},useSyncExternalStore:No,useId:Ss,useHostTransitionStatus:xs,useFormState:Qo,useActionState:Qo,useOptimistic:function(e,t){var n=wo();return io===null?(n.baseState=e,[e,n.queue.dispatch]):Bo(n,io,e,t)},useMemoCache:Oo,useCacheRefresh:Cs};Fs.useEffectEvent=os;function Is(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 Ls={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=du(),i=J(r);i.payload=t,n!=null&&(i.callback=n),t=Fa(e,i,r),t!==null&&(pu(t,e,r),Ia(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=du(),i=J(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Fa(e,i,r),t!==null&&(pu(t,e,r),Ia(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=du(),r=J(n);r.tag=2,t!=null&&(r.callback=t),t=Fa(e,r,n),t!==null&&(pu(t,e,n),Ia(t,e,n))}};function Rs(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?!xr(n,r)||!xr(i,a):!0}function zs(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&&Ls.enqueueReplaceState(t,t.state,null)}function Bs(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 Vs(e){Jr(e)}function Hs(e){console.error(e)}function Us(e){Jr(e)}function Ws(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Gs(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 Ks(e,t,n){return n=J(n),n.tag=3,n.payload={element:null},n.callback=function(){Ws(e,t)},n}function qs(e){return e=J(e),e.tag=3,e}function Js(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(){Gs(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Gs(t,n,r),typeof i!=`function`&&(tu===null?tu=new Set([this]):tu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Ys(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Ji(t,n,a,!0),n=Ja.current,n!==null){switch(n.tag){case 31:case 13:return Ya===null?Tu():n.alternate===null&&Hl===0&&(Hl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===xa?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===xa?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),Tu(),!1}if(U)return t=Ja.current,t===null?(r!==Ni&&(t=Error(i(423),{cause:r}),Bi(hi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=hi(r,n),a=Ks(e.stateNode,r,a),La(e,a),Hl!==4&&(Hl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Ni&&(e=Error(i(422),{cause:r}),Bi(hi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=hi(o,n),Jl===null?Jl=[o]:Jl.push(o),Hl!==4&&(Hl=2),t===null)return!0;r=hi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Ks(n.stateNode,r,e),La(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`&&(tu===null||!tu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=qs(a),Js(a,e,n,r),La(n,a),!1}n=n.return}while(n!==null);return!1}var Xs=Error(i(461)),Zs=!1;function Qs(e,t,n,r){t.child=e===null?ja(t,null,n,r):Aa(t,e.child,n,r)}function $s(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 Xi(t),r=go(e,t,n,o,a,i),s=bo(),e!==null&&!Zs?(xo(e,t,i),X(e,t,i)):(U&&s&&Di(t),t.flags|=1,Qs(e,t,r,i),t.child)}function ec(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!oi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,tc(e,t,a,r,i)):(e=li(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Cc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?xr:n,n(o,r)&&e.ref===t.ref)return X(e,t,i)}return t.flags|=1,e=si(a,r),e.ref=t.ref,e.return=t,t.child=e}function tc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(xr(a,r)&&e.ref===t.ref){if(Zs=!1,t.pendingProps=r=a,Cc(e,i))e.flags&131072&&(Zs=!0);else return t.lanes=e.lanes,X(e,t,i)}}return lc(e,t,n,r,i)}function nc(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 ic(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ga(t,a===null?null:a.cachePool),a===null?Ka():Ga(t,a),Qa(t);else return r=t.lanes=536870912,ic(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&ga(t,null),Ka(),$a(t)):(ga(t,a.cachePool),Ga(t,a),$a(t),t.memoizedState=null);return Qs(e,t,i,n),t.child}function rc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function ic(e,t,n,r,i){var a=ha();return a=a===null?null:{parent:ra._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&ga(t,null),Ka(),Qa(t),e!==null&&Ji(e,t,r,!0),t.childLanes=i,null}function ac(e,t){return t=vc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function oc(e,t,n){return Aa(t,e.child,null,n),e=ac(t,t.pendingProps),e.flags|=2,eo(t),t.memoizedState=null,e}function sc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(U){if(r.mode===`hidden`)return e=ac(t,r),t.lanes=536870912,rc(null,e);if(Za(t),(e=Ai)?(e=rf(e,Mi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Si===null?null:{id:Ci,overflow:wi},retryLane:536870912,hydrationErrors:null},n=fi(e),n.return=t,t.child=n,H=t,Ai=null)):e=null,e===null)throw Pi(t);return t.lanes=536870912,null}return ac(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Za(t),a){if(t.flags&256)t.flags&=-257,t=oc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(Zs||Ji(e,t,n,!1),a=(n&e.childLanes)!==0,Zs||a){if(r=Fl,r!==null&&(s=Qe(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,V(e,s),pu(r,e,s),Xs;Tu(),t=oc(e,t,n)}else e=o.treeContext,Ai=cf(s.nextSibling),H=t,U=!0,ji=null,Mi=!1,e!==null&&ki(t,e),t=ac(t,r),t.flags|=4096;return t}return e=si(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function cc(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 lc(e,t,n,r,i){return Xi(t),n=go(e,t,n,r,void 0,i),r=bo(),e!==null&&!Zs?(xo(e,t,i),X(e,t,i)):(U&&r&&Di(t),t.flags|=1,Qs(e,t,n,i),t.child)}function uc(e,t,n,r,i,a){return Xi(t),t.updateQueue=null,n=vo(t,r,n,i),_o(e),r=bo(),e!==null&&!Zs?(xo(e,t,a),X(e,t,a)):(U&&r&&Di(t),t.flags|=1,Qs(e,t,n,a),t.child)}function dc(e,t,n,r,i){if(Xi(t),t.stateNode===null){var a=ri,o=n.contextType;typeof o==`object`&&o&&(a=Zi(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Ls,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Na(t),o=n.contextType,a.context=typeof o==`object`&&o?Zi(o):ri,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Is(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&&Ls.enqueueReplaceState(a,a.state,null),Ba(t,r,a,i),za(),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=Bs(n,s);a.props=c;var l=a.context,u=n.contextType;o=ri,typeof u==`object`&&u&&(o=Zi(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)&&zs(t,a,r,o),Ma=!1;var f=t.memoizedState;a.state=f,Ba(t,r,a,i),za(),l=t.memoizedState,s||f!==l||Ma?(typeof d==`function`&&(Is(t,n,d,r),l=t.memoizedState),(c=Ma||Rs(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,Pa(e,t),o=t.memoizedProps,u=Bs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ri,typeof l==`object`&&l&&(c=Zi(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)&&zs(t,a,r,c),Ma=!1,f=t.memoizedState,a.state=f,Ba(t,r,a,i),za();var p=t.memoizedState;o!==d||f!==p||Ma||e!==null&&e.dependencies!==null&&Yi(e.dependencies)?(typeof s==`function`&&(Is(t,n,s,r),p=t.memoizedState),(u=Ma||Rs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Yi(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,cc(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=Aa(t,e.child,null,i),t.child=Aa(t,null,n,i)):Qs(e,t,n,i),t.memoizedState=a.state,e=t.child):e=X(e,t,i),e}function fc(e,t,n,r){return Ri(),t.flags|=256,Qs(e,t,n,r),t.child}var pc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function mc(e){return{baseLanes:e,cachePool:_a()}}function hc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Kl),e}function gc(e,t,n){var r=t.pendingProps,a=!1,o=!!(t.flags&128),s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:!!(to.current&2)),s&&(a=!0,t.flags&=-129),s=!!(t.flags&32),t.flags&=-33,e===null){if(U){if(a?Xa(t):$a(t),(e=Ai)?(e=rf(e,Mi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Si===null?null:{id:Ci,overflow:wi},retryLane:536870912,hydrationErrors:null},n=fi(e),n.return=t,t.child=n,H=t,Ai=null)):e=null,e===null)throw Pi(t);return of(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?($a(t),a=t.mode,c=vc({mode:`hidden`,children:c},a),r=ui(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=mc(n),r.childLanes=hc(e,s,n),t.memoizedState=pc,rc(null,r)):(Xa(t),_c(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(Xa(t),t.flags&=-257,t=yc(e,t,n)):t.memoizedState===null?($a(t),c=r.fallback,a=t.mode,r=vc({mode:`visible`,children:r.children},a),c=ui(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Aa(t,e.child,null,n),r=t.child,r.memoizedState=mc(n),r.childLanes=hc(e,s,n),t.memoizedState=pc,t=rc(null,r)):($a(t),t.child=e.child,t.flags|=128,t=null);else if(Xa(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,Bi({value:r,source:null,stack:null}),t=yc(e,t,n)}else if(Zs||Ji(e,t,n,!1),s=(n&e.childLanes)!==0,Zs||s){if(s=Fl,s!==null&&(r=Qe(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,V(e,r),pu(s,e,r),Xs;af(c)||Tu(),t=yc(e,t,n)}else af(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Ai=cf(c.nextSibling),H=t,U=!0,ji=null,Mi=!1,e!==null&&ki(t,e),t=_c(t,r.children),t.flags|=4096);return t}return a?($a(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=si(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=ui(c,a,n,null),c.flags|=2):c=si(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,rc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=mc(n):(a=c.cachePool,a===null?a=_a():(l=ra._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=hc(e,s,n),t.memoizedState=pc,rc(e.child,r)):(Xa(t),n=e.child,e=n.sibling,n=si(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function _c(e,t){return t=vc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function vc(e,t){return e=ai(22,e,null,t),e.lanes=0,e}function yc(e,t,n){return Aa(t,e.child,null,n),e=_c(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function bc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ki(e.return,t,n)}function xc(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 Sc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=to.current,s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,z(to,o),Qs(e,t,r,n),r=U?yi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&bc(e,n,t);else if(e.tag===19)bc(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&&no(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),xc(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&&no(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}xc(t,!0,n,null,a,r);break;case`together`:xc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function X(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ul|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(Ji(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=si(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=si(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Cc(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&Yi(e)))}function wc(e,t,n){switch(t.tag){case 3:se(t,t.stateNode.containerInfo),Wi(t,ra,e.memoizedState.cache),Ri();break;case 27:case 5:le(t);break;case 4:se(t,t.stateNode.containerInfo);break;case 10:Wi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Za(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(Xa(t),e=X(e,t,n),e===null?null:e.sibling):gc(e,t,n):(Xa(t),t.flags|=128,null);Xa(t);break;case 19:var i=!!(e.flags&128);if(r=(n&t.childLanes)!==0,r||=(Ji(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Sc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),z(to,to.current),r)break;return null;case 22:return t.lanes=0,nc(e,t,n,t.pendingProps);case 24:Wi(t,ra,e.memoizedState.cache)}return X(e,t,n)}function Tc(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)Zs=!0;else{if(!Cc(e,n)&&!(t.flags&128))return Zs=!1,wc(e,t,n);Zs=!!(e.flags&131072)}}else Zs=!1,U&&t.flags&1048576&&Ei(t,yi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=W(t.elementType),t.type=e,typeof e==`function`)oi(e)?(r=Bs(e,r),t.tag=1,t=dc(null,t,e,r,n)):(t.tag=0,t=lc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=$s(null,t,e,r,n);break a}if(a===D){t.tag=14,t=ec(null,t,e,r,n);break a}}throw t=ee(e)||e,Error(i(306,t,``))}}return t;case 0:return lc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Bs(r,t.pendingProps),dc(e,t,r,a,n);case 3:a:{if(se(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Pa(e,t),Ba(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Wi(t,ra,r),r!==o.cache&&qi(t,[ra],n,!0),za(),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=fc(e,t,r,n);break a}if(r!==a){a=hi(Error(i(424)),t),Bi(a),t=fc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Ai=cf(e.firstChild),H=t,U=!0,ji=null,Mi=!0,n=ja(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Ri(),r===a){t=X(e,t,n);break a}Qs(e,t,r,n)}t=t.child}return t;case 26:return cc(e,t),e===null?(n=kf(t.type,null,t.pendingProps,null))?t.memoizedState=n:U||(n=t.type,e=t.pendingProps,r=Bd(ae.current).createElement(n),r[it]=t,r[at]=e,Pd(r,n,e),_t(r),t.stateNode=r):t.memoizedState=kf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return le(t),e===null&&U&&(r=t.stateNode=ff(t.type,t.pendingProps,ae.current),H=t,Mi=!0,a=Ai,Zd(t.type)?(lf=a,Ai=cf(r.firstChild)):Ai=a),Qs(e,t,t.pendingProps.children,n),cc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&U&&((a=r=Ai)&&(r=tf(r,t.type,t.pendingProps,Mi),r===null?a=!1:(t.stateNode=r,H=t,Ai=cf(r.firstChild),Mi=!1,a=!0)),a||Pi(t)),le(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=go(e,t,yo,null,null,n),Qf._currentValue=a),cc(e,t),Qs(e,t,r,n),t.child;case 6:return e===null&&U&&((e=n=Ai)&&(n=nf(n,t.pendingProps,Mi),n===null?e=!1:(t.stateNode=n,H=t,Ai=null,e=!0)),e||Pi(t)),null;case 13:return gc(e,t,n);case 4:return se(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Aa(t,null,r,n):Qs(e,t,r,n),t.child;case 11:return $s(e,t,t.type,t.pendingProps,n);case 7:return Qs(e,t,t.pendingProps,n),t.child;case 8:return Qs(e,t,t.pendingProps.children,n),t.child;case 12:return Qs(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Wi(t,t.type,r.value),Qs(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,Xi(t),a=Zi(a),r=r(a),t.flags|=1,Qs(e,t,r,n),t.child;case 14:return ec(e,t,t.type,t.pendingProps,n);case 15:return tc(e,t,t.type,t.pendingProps,n);case 19:return Sc(e,t,n);case 31:return sc(e,t,n);case 22:return nc(e,t,n,t.pendingProps);case 24:return Xi(t),r=Zi(ra),e===null?(a=ha(),a===null&&(a=Fl,o=ia(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Na(t),Wi(t,ra,a)):((e.lanes&n)!==0&&(Pa(e,t),Ba(t,null,null,n),za()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Wi(t,ra,r),r!==a.cache&&qi(t,[ra],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Wi(t,ra,r))),Qs(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Ec(e){e.flags|=4}function Dc(e,t,n,r,i){if((t=!!(e.mode&32))&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(Su())e.flags|=8192;else throw G=xa,ya}}else e.flags&=-16777217}function Oc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Wf(t)){if(Su())e.flags|=8192;else throw G=xa,ya}}function kc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Ke(),e.lanes|=t,ql|=t)}function Ac(e,t){if(!U)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function jc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Mc(e,t,n){var r=t.pendingProps;switch(Oi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return jc(t),null;case 1:return jc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Gi(ra),ce(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Li(t)?Ec(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,zi())),jc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Ec(t),o===null?(jc(t),Dc(t,a,null,r,n)):(jc(t),Oc(t,o))):o?o===e.memoizedState?(jc(t),t.flags&=-16777217):(Ec(t),jc(t),Oc(t,o)):(e=e.memoizedProps,e!==r&&Ec(t),jc(t),Dc(t,a,e,r,n)),null;case 27:if(ue(t),n=ae.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Ec(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return jc(t),null}e=B.current,Li(t)?Fi(t,e):(e=ff(a,r,n),t.stateNode=e,Ec(t))}return jc(t),null;case 5:if(ue(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Ec(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return jc(t),null}if(o=B.current,Li(t))Fi(t,o);else{var s=Bd(ae.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[it]=t,o[at]=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&&Ec(t)}}return jc(t),Dc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Ec(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=ae.current,Li(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=H,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[it]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||jd(e.nodeValue,n)),e||Pi(t,!0)}else e=Bd(e).createTextNode(r),e[it]=t,t.stateNode=e}return jc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Li(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[it]=t}else Ri(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;jc(t),e=!1}else n=zi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(eo(t),t):(eo(t),null);if(t.flags&128)throw Error(i(558))}return jc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Li(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[it]=t}else Ri(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;jc(t),a=!1}else a=zi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(eo(t),t):(eo(t),null)}return eo(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),kc(t,t.updateQueue),jc(t),null);case 4:return ce(),e===null&&xd(t.stateNode.containerInfo),jc(t),null;case 10:return Gi(t.type),jc(t),null;case 19:if(R(to),r=t.memoizedState,r===null)return jc(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)Ac(r,!1);else{if(Hl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=no(e),o!==null){for(t.flags|=128,Ac(r,!1),e=o.updateQueue,t.updateQueue=e,kc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ci(n,e),n=n.sibling;return z(to,to.current&1|2),U&&Ti(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ce()>$l&&(t.flags|=128,a=!0,Ac(r,!1),t.lanes=4194304)}}else{if(!a){if(e=no(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,kc(t,e),Ac(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!U)return jc(t),null}else 2*Ce()-r.renderingStartTime>$l&&n!==536870912&&(t.flags|=128,a=!0,Ac(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(jc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ce(),e.sibling=null,n=to.current,z(to,a?n&1|2:n&1),U&&Ti(t,r.treeForkCount),e);case 22:case 23:return eo(t),qa(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(jc(t),t.subtreeFlags&6&&(t.flags|=8192)):jc(t),n=t.updateQueue,n!==null&&kc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&R(ma),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Gi(ra),jc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Nc(e,t){switch(Oi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Gi(ra),ce(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ue(t),null;case 31:if(t.memoizedState!==null){if(eo(t),t.alternate===null)throw Error(i(340));Ri()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(eo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Ri()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return R(to),null;case 4:return ce(),null;case 10:return Gi(t.type),null;case 22:case 23:return eo(t),qa(),e!==null&&R(ma),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Gi(ra),null;case 25:return null;default:return null}}function Pc(e,t){switch(Oi(t),t.tag){case 3:Gi(ra),ce();break;case 26:case 27:case 5:ue(t);break;case 4:ce();break;case 31:t.memoizedState!==null&&eo(t);break;case 13:eo(t);break;case 19:R(to);break;case 10:Gi(t.type);break;case 22:case 23:eo(t),qa(),e!==null&&R(ma);break;case 24:Gi(ra)}}function Fc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Uu(t,t.return,e)}}function Ic(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Uu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Uu(t,t.return,e)}}function Lc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ha(t,n)}catch(t){Uu(e,e.return,t)}}}function Rc(e,t,n){n.props=Bs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Uu(e,t,n)}}function zc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Uu(e,t,n)}}function Bc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){Uu(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){Uu(e,t,n)}else n.current=null}}function Vc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Uu(e,e.return,t)}}function Hc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[at]=t}catch(t){Uu(e,e.return,t)}}function Uc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function Wc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Uc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&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 Gc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Zt));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Gc(e,t,n),e=e.sibling;e!==null;)Gc(e,t,n),e=e.sibling}function Kc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Kc(e,t,n),e=e.sibling;e!==null;)Kc(e,t,n),e=e.sibling}function qc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[it]=e,t[at]=n}catch(t){Uu(e,e.return,t)}}var Jc=!1,Yc=!1,Xc=!1,Zc=typeof WeakSet==`function`?WeakSet:Set,Qc=null;function $c(e,t){if(e=e.containerInfo,Rd=sp,e=Tr(e),Er(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,Qc=t;Qc!==null;)if(t=Qc,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,Qc=e;else for(;Qc!==null;){switch(t=Qc,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)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=Bs(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Uu(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,Qc=e;break}Qc=t.return}}function el(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:hl(e,n),r&4&&Fc(5,n);break;case 1:if(hl(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Uu(n,n.return,e)}else{var i=Bs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Uu(n,n.return,e)}}}r&64&&Lc(n),r&512&&zc(n,n.return);break;case 3:if(hl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Ha(e,t)}catch(e){Uu(n,n.return,e)}}break;case 27:t===null&&r&4&&qc(n);case 26:case 5:hl(e,n),t===null&&r&4&&Vc(n),r&512&&zc(n,n.return);break;case 12:hl(e,n);break;case 31:hl(e,n),r&4&&ol(e,n);break;case 13:hl(e,n),r&4&&sl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=qu.bind(null,n),sf(e,n))));break;case 22:if(r=n.memoizedState!==null||Jc,!r){t=t!==null&&t.memoizedState!==null||Yc,i=Jc;var a=Yc;Jc=r,(Yc=t)&&!a?_l(e,n,!!(n.subtreeFlags&8772)):hl(e,n),Jc=i,Yc=a}break;case 30:break;default:hl(e,n)}}function tl(e){var t=e.alternate;t!==null&&(e.alternate=null,tl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ft(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var nl=null,rl=!1;function il(e,t,n){for(n=n.child;n!==null;)al(e,t,n),n=n.sibling}function al(e,t,n){if(Ne&&typeof Ne.onCommitFiberUnmount==`function`)try{Ne.onCommitFiberUnmount(Me,n)}catch{}switch(n.tag){case 26:Yc||Bc(n,t),il(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Yc||Bc(n,t);var r=nl,i=rl;Zd(n.type)&&(nl=n.stateNode,rl=!1),il(e,t,n),pf(n.stateNode),nl=r,rl=i;break;case 5:Yc||Bc(n,t);case 6:if(r=nl,i=rl,nl=null,il(e,t,n),nl=r,rl=i,nl!==null){if(rl)try{(nl.nodeType===9?nl.body:nl.nodeName===`HTML`?nl.ownerDocument.body:nl).removeChild(n.stateNode)}catch(e){Uu(n,t,e)}else try{nl.removeChild(n.stateNode)}catch(e){Uu(n,t,e)}}break;case 18:nl!==null&&(rl?(e=nl,Qd(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):Qd(nl,n.stateNode));break;case 4:r=nl,i=rl,nl=n.stateNode.containerInfo,rl=!0,il(e,t,n),nl=r,rl=i;break;case 0:case 11:case 14:case 15:Ic(2,n,t),Yc||Ic(4,n,t),il(e,t,n);break;case 1:Yc||(Bc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Rc(n,t,r)),il(e,t,n);break;case 21:il(e,t,n);break;case 22:Yc=(r=Yc)||n.memoizedState!==null,il(e,t,n),Yc=r;break;default:il(e,t,n)}}function ol(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Np(e)}catch(e){Uu(t,t.return,e)}}}function sl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Np(e)}catch(e){Uu(t,t.return,e)}}function cl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Zc),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Zc),t;default:throw Error(i(435,e.tag))}}function ll(e,t){var n=cl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Ju.bind(null,e,t);t.then(r,r)}})}function ul(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(Zd(c.type)){nl=c.stateNode,rl=!1;break a}break;case 5:nl=c.stateNode,rl=!1;break a;case 3:case 4:nl=c.stateNode.containerInfo,rl=!0;break a}c=c.return}if(nl===null)throw Error(i(160));al(o,s,a),nl=null,rl=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)fl(t,e),t=t.sibling}var dl=null;function fl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ul(t,e),pl(e),r&4&&(Ic(3,e,e.return),Fc(3,e),Ic(5,e,e.return));break;case 1:ul(t,e),pl(e),r&512&&(Yc||n===null||Bc(n,n.return)),r&64&&Jc&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=dl;if(ul(t,e),pl(e),r&512&&(Yc||n===null||Bc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null){if(r===null){if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[dt]||o[it]||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[it]=e,_t(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[it]=e,_t(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&&Hc(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:ul(t,e),pl(e),r&512&&(Yc||n===null||Bc(n,n.return)),n!==null&&r&4&&Hc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(ul(t,e),pl(e),r&512&&(Yc||n===null||Bc(n,n.return)),e.flags&32){a=e.stateNode;try{Ut(a,``)}catch(t){Uu(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Hc(e,a,n===null?a:n.memoizedProps)),r&1024&&(Xc=!0);break;case 6:if(ul(t,e),pl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Uu(e,e.return,t)}}break;case 3:if(Bf=null,a=dl,dl=gf(t.containerInfo),ul(t,e),dl=a,pl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){Uu(e,e.return,t)}Xc&&(Xc=!1,ml(e));break;case 4:r=dl,dl=gf(e.stateNode.containerInfo),ul(t,e),pl(e),dl=r;break;case 12:ul(t,e),pl(e);break;case 31:ul(t,e),pl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ll(e,r)));break;case 13:ul(t,e),pl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Zl=Ce()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ll(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=Jc,d=Yc;if(Jc=u||a,Yc=d||l,ul(t,e),Yc=d,Jc=u,pl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||Jc||Yc||gl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,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){Uu(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Uu(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){Uu(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,ll(e,n))));break;case 19:ul(t,e),pl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ll(e,r)));break;case 30:break;case 21:break;default:ul(t,e),pl(e)}}function pl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Uc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;Kc(e,Wc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Ut(o,``),n.flags&=-33),Kc(e,Wc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Gc(e,Wc(e),s);break;default:throw Error(i(161))}}catch(t){Uu(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ml(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;ml(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function hl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)el(e,t.alternate,t),t=t.sibling}function gl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ic(4,t,t.return),gl(t);break;case 1:Bc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Rc(t,t.return,n),gl(t);break;case 27:pf(t.stateNode);case 26:case 5:Bc(t,t.return),gl(t);break;case 22:t.memoizedState===null&&gl(t);break;case 30:gl(t);break;default:gl(t)}e=e.sibling}}function _l(e,t,n){for(n&&=!!(t.subtreeFlags&8772),t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:_l(i,a,n),Fc(4,a);break;case 1:if(_l(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Uu(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++)Va(c[i],s)}catch(e){Uu(r,r.return,e)}}n&&o&64&&Lc(a),zc(a,a.return);break;case 27:qc(a);case 26:case 5:_l(i,a,n),n&&r===null&&o&4&&Vc(a),zc(a,a.return);break;case 12:_l(i,a,n);break;case 31:_l(i,a,n),n&&o&4&&ol(i,a);break;case 13:_l(i,a,n),n&&o&4&&sl(i,a);break;case 22:a.memoizedState===null&&_l(i,a,n),zc(a,a.return);break;case 30:break;default:_l(i,a,n)}t=t.sibling}}function vl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&aa(n))}function yl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&aa(e))}function bl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)xl(e,t,n,r),t=t.sibling}function xl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:bl(e,t,n,r),i&2048&&Fc(9,t);break;case 1:bl(e,t,n,r);break;case 3:bl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&aa(e)));break;case 12:if(i&2048){bl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Uu(t,t.return,e)}}else bl(e,t,n,r);break;case 31:bl(e,t,n,r);break;case 13:bl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?bl(e,t,n,r):(a._visibility|=2,Sl(e,t,n,r,!!(t.subtreeFlags&10256)||!1)):a._visibility&2?bl(e,t,n,r):Cl(e,t),i&2048&&vl(o,t);break;case 24:bl(e,t,n,r),i&2048&&yl(t.alternate,t);break;default:bl(e,t,n,r)}}function Sl(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Sl(a,o,s,c,i),Fc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Sl(a,o,s,c,i)):u._visibility&2?Sl(a,o,s,c,i):Cl(a,o),i&&l&2048&&vl(o.alternate,o);break;case 24:Sl(a,o,s,c,i),i&&l&2048&&yl(o.alternate,o);break;default:Sl(a,o,s,c,i)}t=t.sibling}}function Cl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Cl(n,r),i&2048&&vl(r.alternate,r);break;case 24:Cl(n,r),i&2048&&yl(r.alternate,r);break;default:Cl(n,r)}t=t.sibling}}var wl=8192;function Tl(e,t,n){if(e.subtreeFlags&wl)for(e=e.child;e!==null;)El(e,t,n),e=e.sibling}function El(e,t,n){switch(e.tag){case 26:Tl(e,t,n),e.flags&wl&&e.memoizedState!==null&&Gf(n,dl,e.memoizedState,e.memoizedProps);break;case 5:Tl(e,t,n);break;case 3:case 4:var r=dl;dl=gf(e.stateNode.containerInfo),Tl(e,t,n),dl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=wl,wl=16777216,Tl(e,t,n),wl=r):Tl(e,t,n));break;default:Tl(e,t,n)}}function Dl(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Ol(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];Qc=r,jl(r,e)}Dl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)kl(e),e=e.sibling}function kl(e){switch(e.tag){case 0:case 11:case 15:Ol(e),e.flags&2048&&Ic(9,e,e.return);break;case 3:Ol(e);break;case 12:Ol(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Al(e)):Ol(e);break;default:Ol(e)}}function Al(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];Qc=r,jl(r,e)}Dl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ic(8,t,t.return),Al(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Al(t));break;default:Al(t)}e=e.sibling}}function jl(e,t){for(;Qc!==null;){var n=Qc;switch(n.tag){case 0:case 11:case 15:Ic(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:aa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,Qc=r;else a:for(n=e;Qc!==null;){r=Qc;var i=r.sibling,a=r.return;if(tl(r),r===n){Qc=null;break a}if(i!==null){i.return=a,Qc=i;break a}Qc=a}}}var Ml={getCacheForType:function(e){var t=Zi(ra),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Zi(ra).controller.signal}},Nl=typeof WeakMap==`function`?WeakMap:Map,Pl=0,Fl=null,Z=null,Q=0,Il=0,Ll=null,Rl=!1,zl=!1,Bl=!1,Vl=0,Hl=0,Ul=0,Wl=0,Gl=0,Kl=0,ql=0,Jl=null,Yl=null,Xl=!1,Zl=0,Ql=0,$l=1/0,eu=null,tu=null,nu=0,ru=null,iu=null,au=0,ou=0,su=null,cu=null,lu=0,uu=null;function du(){return Pl&2&&Q!==0?Q&-Q:F.T===null?tt():ud()}function fu(){if(Kl===0){if(!(Q&536870912)||U){var e=Be;Be<<=1,!(Be&3932160)&&(Be=262144),Kl=e}else Kl=536870912}return e=Ja.current,e!==null&&(e.flags|=32),Kl}function pu(e,t,n){(e===Fl&&(Il===2||Il===9)||e.cancelPendingCommit!==null)&&(bu(e,0),_u(e,Q,Kl,!1)),Je(e,n),(!(Pl&2)||e!==Fl)&&(e===Fl&&(!(Pl&2)&&(Wl|=n),Hl===4&&_u(e,Q,Kl,!1)),nd(e))}function mu(e,t,n){if(Pl&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||We(e,t),a=r?Ou(e,t):Eu(e,t,!0),o=r;do{if(a===0){zl&&!r&&_u(e,t,0,!1);break}if(n=e.current.alternate,o&&!gu(n)){a=Eu(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=Jl;var l=c.current.memoizedState.isDehydrated;if(l&&(bu(c,s).flags|=256),s=Eu(c,s,!1),s!==2){if(Bl&&!l){c.errorRecoveryDisabledLanes|=o,Wl|=o,a=4;break a}o=Yl,Yl=a,o!==null&&(Yl===null?Yl=o:Yl.push.apply(Yl,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){bu(e,0),_u(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:_u(r,t,Kl,!Rl);break a;case 2:Yl=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=Zl+300-Ce(),10<a)){if(_u(r,t,Kl,!Rl),Ue(r,0,!0)!==0)break a;au=t,r.timeoutHandle=Kd(hu.bind(null,r,n,Yl,eu,Xl,t,Kl,Wl,ql,Rl,o,`Throttled`,-0,0),a);break a}hu(r,n,Yl,eu,Xl,t,Kl,Wl,ql,Rl,o,null,-0,0)}break}while(1);nd(e)}function hu(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:Zt},El(t,a,d);var m=(a&62914560)===a?Zl-Ce():(a&4194048)===a?Ql-Ce():0;if(m=qf(d,m),m!==null){au=a,e.cancelPendingCommit=m(Fu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),_u(e,a,o,!l);return}}Fu(e,t,a,n,r,i,o,s,c)}function gu(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(!br(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 _u(e,t,n,r){t&=~Gl,t&=~Wl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Fe(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Xe(e,n,t)}function vu(){return Pl&6?!0:(rd(0,!1),!1)}function yu(){if(Z!==null){if(Il===0)var e=Z.return;else e=Z,Ui=Hi=null,So(e),Ta=null,Ea=0,e=Z;for(;e!==null;)Pc(e.alternate,e),e=e.return;Z=null}}function bu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,qd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),au=0,yu(),Fl=e,Z=n=si(e.current,null),Q=t,Il=0,Ll=null,Rl=!1,zl=We(e,t),Bl=!1,ql=Kl=Gl=Wl=Ul=Hl=0,Yl=Jl=null,Xl=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Fe(r),a=1<<i;t|=e[i],r&=~a}return Vl=t,Qr(),n}function xu(e,t){Y=null,F.H=Ms,t===va||t===ba?(t=wa(),Il=3):t===ya?(t=wa(),Il=4):Il=t===Xs?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Ll=t,Z===null&&(Hl=1,Ws(e,hi(t,e.current)))}function Su(){var e=Ja.current;return e===null?!0:(Q&4194048)===Q?Ya===null:(Q&62914560)===Q||Q&536870912?e===Ya:!1}function Cu(){var e=F.H;return F.H=Ms,e===null?Ms:e}function wu(){var e=F.A;return F.A=Ml,e}function Tu(){Hl=4,Rl||(Q&4194048)!==Q&&Ja.current!==null||(zl=!0),!(Ul&134217727)&&!(Wl&134217727)||Fl===null||_u(Fl,Q,Kl,!1)}function Eu(e,t,n){var r=Pl;Pl|=2;var i=Cu(),a=wu();(Fl!==e||Q!==t)&&(eu=null,bu(e,t)),t=!1;var o=Hl;a:do try{if(Il!==0&&Z!==null){var s=Z,c=Ll;switch(Il){case 8:yu(),o=6;break a;case 3:case 2:case 9:case 6:Ja.current===null&&(t=!0);var l=Il;if(Il=0,Ll=null,Mu(e,s,c,l),n&&zl){o=0;break a}break;default:l=Il,Il=0,Ll=null,Mu(e,s,c,l)}}Du(),o=Hl;break}catch(t){xu(e,t)}while(1);return t&&e.shellSuspendCounter++,Ui=Hi=null,Pl=r,F.H=i,F.A=a,Z===null&&(Fl=null,Q=0,Qr()),o}function Du(){for(;Z!==null;)Au(Z)}function Ou(e,t){var n=Pl;Pl|=2;var r=Cu(),a=wu();Fl!==e||Q!==t?(eu=null,$l=Ce()+500,bu(e,t)):zl=We(e,t);a:do try{if(Il!==0&&Z!==null){t=Z;var o=Ll;b:switch(Il){case 1:Il=0,Ll=null,Mu(e,t,o,1);break;case 2:case 9:if(Sa(o)){Il=0,Ll=null,ju(t);break}t=function(){Il!==2&&Il!==9||Fl!==e||(Il=7),nd(e)},o.then(t,t);break a;case 3:Il=7;break a;case 4:Il=5;break a;case 7:Sa(o)?(Il=0,Ll=null,ju(t)):(Il=0,Ll=null,Mu(e,t,o,7));break;case 5:var s=null;switch(Z.tag){case 26:s=Z.memoizedState;case 5:case 27:var c=Z;if(s?Wf(s):c.stateNode.complete){Il=0,Ll=null;var l=c.sibling;if(l!==null)Z=l;else{var u=c.return;u===null?Z=null:(Z=u,Nu(u))}break b}}Il=0,Ll=null,Mu(e,t,o,5);break;case 6:Il=0,Ll=null,Mu(e,t,o,6);break;case 8:yu(),Hl=6;break a;default:throw Error(i(462))}}ku();break}catch(t){xu(e,t)}while(1);return Ui=Hi=null,F.H=r,F.A=a,Pl=n,Z===null?(Fl=null,Q=0,Qr(),Hl):0}function ku(){for(;Z!==null&&!xe();)Au(Z)}function Au(e){var t=Tc(e.alternate,e,Vl);e.memoizedProps=e.pendingProps,t===null?Nu(e):Z=t}function ju(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=uc(n,t,t.pendingProps,t.type,void 0,Q);break;case 11:t=uc(n,t,t.pendingProps,t.type.render,t.ref,Q);break;case 5:So(t);default:Pc(n,t),t=Z=ci(t,Vl),t=Tc(n,t,Vl)}e.memoizedProps=e.pendingProps,t===null?Nu(e):Z=t}function Mu(e,t,n,r){Ui=Hi=null,So(t),Ta=null,Ea=0;var i=t.return;try{if(Ys(e,i,t,n,Q)){Hl=1,Ws(e,hi(n,e.current)),Z=null;return}}catch(t){if(i!==null)throw Z=i,t;Hl=1,Ws(e,hi(n,e.current)),Z=null;return}t.flags&32768?(U||r===1?e=!0:zl||Q&536870912?e=!1:(Rl=e=!0,(r===2||r===9||r===3||r===6)&&(r=Ja.current,r!==null&&r.tag===13&&(r.flags|=16384))),Pu(t,e)):Nu(t)}function Nu(e){var t=e;do{if(t.flags&32768){Pu(t,Rl);return}e=t.return;var n=Mc(t.alternate,t,Vl);if(n!==null){Z=n;return}if(t=t.sibling,t!==null){Z=t;return}Z=t=e}while(t!==null);Hl===0&&(Hl=5)}function Pu(e,t){do{var n=Nc(e.alternate,e);if(n!==null){n.flags&=32767,Z=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Z=e;return}Z=e=n}while(e!==null);Hl=6,Z=null}function Fu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Bu();while(nu!==0);if(Pl&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=Zr,Ye(e,n,o,s,c,l),e===Fl&&(Z=Fl=null,Q=0),iu=t,ru=e,au=n,ou=o,su=a,cu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Yu(De,function(){return Vu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=F.T,F.T=null,a=I.p,I.p=2,s=Pl,Pl|=4;try{$c(e,t,n)}finally{Pl=s,I.p=a,F.T=r}}nu=1,Iu(),Lu(),Ru()}}function Iu(){if(nu===1){nu=0;var e=ru,t=iu,n=!!(t.flags&13878);if(t.subtreeFlags&13878||n){n=F.T,F.T=null;var r=I.p;I.p=2;var i=Pl;Pl|=4;try{fl(t,e);var a=zd,o=Tr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&wr(s.ownerDocument.documentElement,s)){if(c!==null&&Er(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 _=Cr(s,h),v=Cr(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{Pl=i,I.p=r,F.T=n}}e.current=t,nu=2}}function Lu(){if(nu===2){nu=0;var e=ru,t=iu,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=F.T,F.T=null;var r=I.p;I.p=2;var i=Pl;Pl|=4;try{el(e,t.alternate,t)}finally{Pl=i,I.p=r,F.T=n}}nu=3}}function Ru(){if(nu===4||nu===3){nu=0,Se();var e=ru,t=iu,n=au,r=cu;t.subtreeFlags&10256||t.flags&10256?nu=5:(nu=0,iu=ru=null,zu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(tu=null),et(n),t=t.stateNode,Ne&&typeof Ne.onCommitFiberRoot==`function`)try{Ne.onCommitFiberRoot(Me,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=F.T,i=I.p,I.p=2,F.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{F.T=t,I.p=i}}au&3&&Bu(),nd(e),i=e.pendingLanes,n&261930&&i&42?e===uu?lu++:(lu=0,uu=e):lu=0,rd(0,!1)}}function zu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,aa(t)))}function Bu(){return Iu(),Lu(),Ru(),Vu()}function Vu(){if(nu!==5)return!1;var e=ru,t=ou;ou=0;var n=et(au),r=F.T,a=I.p;try{I.p=32>n?32:n,F.T=null,n=su,su=null;var o=ru,s=au;if(nu=0,iu=ru=null,au=0,Pl&6)throw Error(i(331));var c=Pl;if(Pl|=4,kl(o.current),xl(o,o.current,s,n),Pl=c,rd(0,!1),Ne&&typeof Ne.onPostCommitFiberRoot==`function`)try{Ne.onPostCommitFiberRoot(Me,o)}catch{}return!0}finally{I.p=a,F.T=r,zu(e,t)}}function Hu(e,t,n){t=hi(n,t),t=Ks(e.stateNode,t,2),e=Fa(e,t,2),e!==null&&(Je(e,2),nd(e))}function Uu(e,t,n){if(e.tag===3)Hu(e,e,n);else for(;t!==null;){if(t.tag===3){Hu(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(tu===null||!tu.has(r))){e=hi(n,e),n=qs(2),r=Fa(t,n,2),r!==null&&(Js(n,r,t,e),Je(r,2),nd(r));break}}t=t.return}}function Wu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Nl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Bl=!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,Fl===e&&(Q&n)===n&&(Hl===4||Hl===3&&(Q&62914560)===Q&&300>Ce()-Zl?!(Pl&2)&&bu(e,0):Gl|=n,ql===Q&&(ql=0)),nd(e)}function Ku(e,t){t===0&&(t=Ke()),e=V(e,t),e!==null&&(Je(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 ye(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-Fe(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=Q,a=Ue(r,r===Fl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||We(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=Ce(),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}nu!==0&&nu!==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-Fe(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Ge(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Fl,n=Q,n=Ue(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Il===2||Il===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&be(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||We(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&be(r),et(n)){case 2:case 8:n=Ee;break;case 32:n=De;break;case 268435456:n=ke;break;default:n=De}return r=sd.bind(null,e),n=ye(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&be(r),e.callbackPriority=2,e.callbackNode=null,2}function sd(e,t){if(nu!==0&&nu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Bu()&&e.callbackNode!==n)return null;var r=Q;return r=Ue(e,e===Fl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(mu(e,r,t),od(e,Ce()),e.callbackNode!=null&&e.callbackNode===n?sd.bind(null,e):null)}function cd(e,t){if(Bu())return null;mu(e,t,!0)}function ld(){Yd(function(){Pl&6?ye(Te,id):ad()})}function ud(){if(td===0){var e=ca;e===0&&(e=ze,ze<<=1,!(ze&261888)&&(ze=256)),td=e}return td}function dd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Xt(``+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[at]||null).action),o=r.submitter;o&&(t=(t=o[at]||null)?dd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new yn(`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);vs(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),vs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var md=0;md<Kr.length;md++){var hd=Kr[md];qr(hd.toLowerCase(),`on`+(hd[0].toUpperCase()+hd.slice(1)))}qr(Rr,`onAnimationEnd`),qr(zr,`onAnimationIteration`),qr(Br,`onAnimationStart`),qr(`dblclick`,`onDoubleClick`),qr(`focusin`,`onFocus`),qr(`focusout`,`onBlur`),qr(Vr,`onTransitionRun`),qr(Hr,`onTransitionStart`),qr(Ur,`onTransitionCancel`),qr(Wr,`onTransitionEnd`),xt(`onMouseEnter`,[`mouseout`,`mouseover`]),xt(`onMouseLeave`,[`mouseout`,`mouseover`]),xt(`onPointerEnter`,[`pointerout`,`pointerover`]),xt(`onPointerLeave`,[`pointerout`,`pointerover`]),bt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),bt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),bt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),bt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),bt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),bt(`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){Jr(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){Jr(e)}i.currentTarget=null,a=c}}}}function $(e,t){var n=t[st];n===void 0&&(n=t[st]=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,vt.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,!cn||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=pt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}an(function(){var r=a,i=$t(n),s=[];a:{var c=Gr.get(e);if(c!==void 0){var l=yn,u=e;switch(e){case`keypress`:if(mn(n)===0)break a;case`keydown`:case`keyup`:l=Ln;break;case`focusin`:u=`focus`,l=On;break;case`focusout`:u=`blur`,l=On;break;case`beforeblur`:case`afterblur`:l=On;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=En;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Dn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=zn;break;case Rr:case zr:case Br:l=kn;break;case Wr:l=Bn;break;case`scroll`:case`scrollend`:l=xn;break;case`wheel`:l=Vn;break;case`copy`:case`cut`:case`paste`:l=An;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Rn;break;case`toggle`:case`beforetoggle`:l=Hn}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=on(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!==Qt&&(u=n.relatedTarget||n.fromElement)&&(pt(u)||u[ot]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?pt(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=En,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Rn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:ht(l),h=u==null?c:ht(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,pt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=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?ht(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=cr;else if(nr(c)){if(lr)v=vr;else{v=gr;var y=hr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&qt(r.elementType)&&(v=cr):v=_r;if(v&&=v(e,r)){rr(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&zt(c,`number`,c.value)}switch(y=r?ht(r):window,e){case`focusin`:(nr(y)||y.contentEditable===`true`)&&(Or=y,kr=r,Ar=null);break;case`focusout`:Ar=kr=Or=null;break;case`mousedown`:jr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:jr=!1,Mr(s,n,i);break;case`selectionchange`:if(Dr)break;case`keydown`:case`keyup`:Mr(s,n,i)}var b;if(Wn)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 Qn?Xn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(qn&&n.locale!==`ko`&&(Qn||x!==`onCompositionStart`?x===`onCompositionEnd`&&Qn&&(b=pn()):(un=i,dn=`value`in un?un.value:un.textContent,Qn=!0)),y=Td(r,x),0<y.length&&(x=new jn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=Zn(n),b!==null&&(x.data=b)))),(b=Kn?$n(e,n):er(e,n))&&(x=Td(r,`onBeforeInput`),0<x.length&&(y=new jn(`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=on(e,n),i!=null&&r.unshift(wd(e,i,a)),i=on(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=on(n,a),l!=null&&o.unshift(wd(n,l,c))):i||(l=on(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===``||Ut(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Ut(e,``+r);break;case`className`:Dt(e,`class`,r);break;case`tabIndex`:Dt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Dt(e,n,r);break;case`style`:Kt(e,r,o);break;case`data`:if(t!==`object`){Dt(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=Xt(``+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=Xt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Zt);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=Xt(``+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),Et(e,`popover`,r);break;case`xlinkActuate`:Ot(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Ot(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Ot(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Ot(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Ot(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Ot(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Ot(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Ot(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Ot(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Et(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=Jt.get(n)||n,Et(e,n,r))}}function Nd(e,t,n,r,a,o){switch(n){case`style`:Kt(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`?Ut(e,r):(typeof r==`number`||typeof r==`bigint`)&&Ut(e,``+r);break;case`onScroll`:r!=null&&$(`scroll`,e);break;case`onScrollEnd`:r!=null&&$(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Zt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!yt.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[at]||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,``):Et(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)}}Rt(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&&Bt(e,!!r,n,!0):Bt(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)}Ht(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(qt(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)}}Lt(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?Bt(e,!!n,n?[]:``,!1):Bt(e,!!n,t,!0)):Bt(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)}Vt(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(qt(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[dt]||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),ft(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[dt])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]);ft(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=I.d;I.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=vu();return e||t}function yf(e){var t=mt(e);t!==null&&t.tag===5&&t.type===`form`?bs(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=It(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),_t(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="`+It(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+It(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+It(n.imageSizes)+`"]`)):i+=`[href="`+It(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),_t(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="`+It(r)+`"][href="`+It(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),_t(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=gt(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`);_t(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=gt(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`),_t(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=gt(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`),_t(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=ae.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=gt(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=gt(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=gt(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="`+It(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),_t(t),e.head.appendChild(t))}function Pf(e){return`[src="`+It(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~="`+It(n.href)+`"]`);if(r)return t.instance=r,_t(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`),_t(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,_t(o),o;r=Mf(n),(a=mf.get(a))&&Rf(r,a),o=(e.ownerDocument||e).createElement(`link`),_t(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,_t(a),a):(r=n,(a=mf.get(o))&&(r=f({},n),zf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),_t(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[dt]||a[it]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function 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,_t(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),_t(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:te,_currentValue2:te,_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=qe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qe(0),this.hiddenUpdates=qe(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=ai(3,null,null,t),e.current=a,a.stateNode=e,t=ia(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Na(a),e}function tp(e){return e?(e=ri,e):ri}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=J(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Fa(e,r,t),n!==null&&(pu(n,e,t),Ia(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=V(e,67108864);t!==null&&pu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=du();t=$e(t);var n=V(e,t);n!==null&&pu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=F.T;F.T=null;var a=I.p;try{I.p=2,up(e,t,n,r)}finally{I.p=a,F.T=i}}function lp(e,t,n,r){var i=F.T;F.T=null;var a=I.p;try{I.p=8,up(e,t,n,r)}finally{I.p=a,F.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=mt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=He(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Fe(o);s.entanglements[1]|=c,o&=~c}nd(a),!(Pl&6)&&($l=Ce()+500,rd(0,!1))}}break;case 31:case 13:s=V(a,2),s!==null&&pu(s,a,2),vu(),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=$t(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=pt(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(we()){case Te:return 2;case Ee:return 8;case De:case Oe:return 32;case ke: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=mt(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=pt(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,nt(e.priority,function(){op(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,nt(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);Qt=r,n.target.dispatchEvent(r),Qt=null}else return t=mt(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=mt(n);a!==null&&(e.splice(t,3),t-=3,vs(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[at]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[at]||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,du(),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),vu(),t[ot]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=tt();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`));I.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:F,reconcilerVersion:`19.2.8`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{Me=zp.inject(Rp),Ne=zp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Vs,s=Hs,c=Us;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[ot]=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=``}=M(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 N(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`?M(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 M(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 N(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 ee(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 ee(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 P=l(p(),1),F=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)}},I=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`children`]);function te(e){return I.has(e)}var ne=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`middleware`,`children`]);function re(e){return ne.has(e)}function L(e){return e.index===!0}function R(e){let t={};return e.Component&&Object.assign(t,{element:P.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:P.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:P.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}function z(e,t=R,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`),L(e)){let n={...e,id:s};return r[s]=B(n,t(n)),n}{let n={...e,id:s,children:void 0};return r[s]=B(n,t(n)),e.children&&(n.children=z(e.children,t,o,r,i)),n}})}function B(e,t){return Object.assign(e,{...t,...typeof t.lazy==`object`&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function ie(e,t,n=`/`){return ae(e,t,n,!1)}function ae(e,t,n,r,i){let a=De((typeof t==`string`?M(t):t).pathname||`/`,n);if(a==null)return null;let o=i??se(e),s=null,c=Ee(a);for(let e=0;s==null&&e<o.length;++e)s=Se(o[e],c,r);return s}function oe(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 se(e){let t=ce(e);return ue(t),t}function ce(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=Le([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}".`),ce(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:be(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=Te(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 le(e.path))a(e,t,!0,n)}),t}function le(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=le(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 ue(e){e.sort((e,t)=>e.score===t.score?xe(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var de=/^:[\w-]+$/,fe=/^:[\w-]+/,pe=3.5,me=3,he=2,ge=1,_e=10,ve=-2,ye=e=>e===`*`;function be(e,t){let n=e.split(`/`),r=n.length;return n.some(ye)&&(r+=ve),t&&(r+=he),n.filter(e=>!ye(e)).reduce((e,t)=>e+(de.test(t)?me:fe.test(t)?pe:t===``?ge:_e),r)}function xe(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 Se(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?we(u,l,s.matcher,s.compiledParams):Ce(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=Ce({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:Le([a,d.pathname]),pathnameBase:ze(Le([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=Le([a,d.pathnameBase]))}return o}function Ce(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Te(e.path,e.caseSensitive,e.end);return we(e,t,n,r)}function we(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 Te(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 Ee(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 De(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 Oe({basename:e,pathname:t}){return t===`/`?e:Le([e,t])}var ke=e=>b.test(e);function Ae(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?M(e):e,a;return n?(n=Ie(n),a=n.startsWith(`/`)?je(n.substring(1),`/`):je(n,t)):a=t,{pathname:a,search:Be(r),hash:Ve(i)}}function je(e,t){let n=Re(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function Me(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 Ne(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Pe(e){let t=Ne(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Fe(e,t,n,r=!1){let i;typeof e==`string`?i=M(e):(i={...e},E(!i.pathname||!i.pathname.includes(`?`),Me(`?`,`pathname`,`search`,i)),E(!i.pathname||!i.pathname.includes(`#`),Me(`#`,`pathname`,`hash`,i)),E(!i.search||!i.search.includes(`#`),Me(`#`,`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=Ae(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var Ie=e=>e.replace(/[\\/]{2,}/g,`/`),Le=e=>Ie(e.join(`/`)),Re=e=>e.replace(/\/+$/,``),ze=e=>Re(e).replace(/^\/*/,`/`),Be=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,Ve=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,He=[`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],Ue=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 We(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function Ge(e){return Le(e.map(e=>e.route.path).filter(Boolean))||`/`}function Ke(e,t){let n=new URL(typeof e==`string`||e instanceof URL?e:e.url),r=typeof t==`string`?M(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 qe=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Je(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(qe)try{let e=new URL(window.location.href),r=x.test(n)?new URL(S(n,e.protocol)):new URL(n),a=De(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 Ye=Symbol(`Uninstrumented`),Xe=new WeakMap;function Ze(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)=>rt(await it(n.lazy,void 0,()=>e(...t),at))}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)=>rt(await it(n[`lazy.middleware`],void 0,()=>t(...e),at))})}if(typeof e.loader==`function`&&n[`lazy.loader`].length>0){let t=e.loader;r.lazy=Object.assign(r.lazy||{},{loader:async(...e)=>rt(await it(n[`lazy.loader`],void 0,()=>t(...e),at))})}if(typeof e.action==`function`&&n[`lazy.action`].length>0){let t=e.action;r.lazy=Object.assign(r.lazy||{},{action:async(...e)=>rt(await it(n[`lazy.action`],void 0,()=>t(...e),at))})}}if(typeof t.loader==`function`&&n.loader.length>0){let e=$e(t.loader),i=async(...t)=>rt(await it(n.loader,ot(t[0]),()=>e(...t),at));e.hydrate===!0&&(i.hydrate=!0),et(i,e),r.loader=i}if(typeof t.action==`function`&&n.action.length>0){let e=$e(t.action),i=async(...t)=>rt(await it(n.action,ot(t[0]),()=>e(...t),at));et(i,e),r.action=i}return t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map(e=>{let t=$e(e),r=async(...e)=>rt(await it(n.middleware,ot(e[0]),()=>t(...e),at));return et(r,t),r})),r}function Qe(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=$e(e.navigate),r=async(...r)=>{let[i,a]=r,o,s={to:typeof i==`number`||typeof i==`string`?i:i?j(i):`.`,...st(e,a??{})};return rt(await it(n.navigate,s,async()=>{if(typeof i==`number`)return await t(...r);let n=tt(e,e=>{o=e});try{return await t(...r)}finally{n()}},e=>({...at(e),meta:o})))};et(r,t),e.navigate=r}if(n.fetch.length>0){let t=$e(e.fetch),r=async(...r)=>{let[i,a,o,s]=r,c;return rt(await it(n.fetch,{href:o??`.`,fetcherKey:i,...st(e,s??{})},async()=>{let n=tt(e,e=>{c=e});try{return await t(...r)}finally{n()}},e=>({...at(e),meta:c})))};et(r,t),e.fetch=r}return e}function $e(e){return e[Ye]??e}function et(e,t){e[Ye]=t}function tt(e,t){return Xe.set(e,t),()=>{Xe.get(e)===t&&Xe.delete(e)}}function nt(e){let t=Xe.get(e);return Xe.delete(e),t}function rt(e){if(e.type===`error`)throw e.value;return e.value}async function it(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=it(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 at(e){return e.type===`error`&&e.value instanceof Error?{status:`error`,error:e.value}:{status:`success`,error:void 0}}function ot(e){let{request:t,context:n,params:r}=e;return{...e,request:ct(t),params:{...r},context:lt(n)}}function st(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 ct(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function lt(e){return{get:t=>e.get(t)}}var ut=[`POST`,`PUT`,`PATCH`,`DELETE`],dt=new Set(ut),ft=[`GET`,...ut],pt=new Set(ft),mt=new Set([301,302,303,307,308]),ht=new Set([307,308]),gt={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},_t={state:`idle`,data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},vt={state:`unblocked`,proceed:void 0,reset:void 0,location:void 0},yt=`remix-router-transitions`,bt=Symbol(`ResetLoaderData`),xt=class{#e;#t;#n;#r;constructor(e){this.#e=e,this.#t=se(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=se(e)}setHmrRoutes(e){this.#n=e,this.#r=se(e)}commitHmrRoutes(){this.#n&&(this.#e=this.#n,this.#t=this.#r,this.#n=void 0,this.#r=void 0)}};function St(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),...Ze(t.map(e=>e.route).filter(Boolean),e)})}let o={},s=new xt(z(e.routes,a,void 0,o)),c=e.basename||`/`;c.startsWith(`/`)||(c=`/${c}`);let l=e.dataStrategy||zt,u={...e.future},d=null,f=new Set,p=null,m=null,h=null,g=null,_=e.hydrationData!=null,v=ae(s.activeRoutes,e.history.location,c,!1,s.branches),y=!1,b=null,x,S;if(v==null&&!e.patchRoutesOnNavigation){let t=un(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=ln(s.activeRoutes);x=!0,S=!x,v=n,b={[r.id]:t}}else if(v&&!e.hydrationData&&it(v,s.activeRoutes,e.history.location.pathname).active&&(v=null),!v){x=!1,S=!x,v=[];let t=it(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=>Dt(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=Ot(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:gt,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,N=!1,P=new Map,I=null,te=!1,ne=!1,re=new Set,L=new Map,R=0,B=-1,ie=new Map,se=new Set,ce=new Map,le=new Map,ue=new Set,de=new Map,fe,pe=null;function me(){if(d=e.history.listen(({action:t,location:n,delta:r})=>{if(fe){fe(),fe=void 0;return}D(de.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=Ye({currentLocation:w.location,nextLocation:n,historyAction:t});if(i&&r!=null){let t=new Promise(e=>{fe=e});e.history.go(r*-1),Je(i,{state:`blocked`,location:n,proceed(){Je(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,vt),_e({blockers:e})}}),O?.resolve(),O=null;return}return xe(t,n)}),n){Fn(t,P);let e=()=>In(t,P);t.addEventListener(`pagehide`,e),I=()=>t.removeEventListener(`pagehide`,e)}return w.initialized||xe(`POP`,w.location,{initialHydration:!0}),C}function he(){d&&d(),I&&I(),f.clear(),j&&j.abort(),w.fetchers.forEach((e,t)=>ze(w.fetchers,t)),w.blockers.forEach((e,t)=>qe(t))}function ge(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 _e(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`&&(ue.has(t)?n.push(t):r.push(t))}),ue.forEach(e=>{!w.fetchers.has(e)&&!L.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=>ze(w.fetchers,e)),r.forEach(e=>w.fetchers.delete(e))}function ve(t,n,{flushSync:r}={}){let i=w.actionData!=null&&w.navigation.formMethod!=null&&Tn(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?on(w.loaderData,n.loaderData,n.matches||[],n.errors):w.loaderData,c=w.blockers;c.size>0&&!te&&(c=new Map(c),c.forEach((e,t)=>c.set(t,vt)));let l=!te&&rt(t,n.matches||w.matches),u=k===!0||w.navigation.formMethod!=null&&Tn(w.navigation.formMethod)&&t.state?._isRedirect!==!0;s.commitHmrRoutes(),te||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=P.get(w.location.pathname);e&&e.has(t.pathname)?d={currentLocation:w.location,nextLocation:t}:P.has(t.pathname)&&(d={currentLocation:t,nextLocation:w.location})}else if(N){let e=P.get(w.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),P.set(w.location.pathname,e)),d={currentLocation:w.location,nextLocation:t}}_e({...n,actionData:a,loaderData:o,historyAction:T,location:t,initialized:!0,renderFallback:!1,navigation:gt,revalidation:`idle`,restoreScrollPosition:l,preventScrollReset:u,blockers:c},{viewTransitionOpts:d,flushSync:r===!0}),T=`POP`,k=!1,N=!1,te=!1,ne=!1,O?.resolve(),O=null,pe?.resolve(),pe=null}async function ye(t,n){if(O?.resolve(),O=null,typeof t==`number`){O||=Ln();let n=O.promise;return e.history.go(t),n}let r=nt(C),{path:i,submission:a,error:o}=Tt(!1,wt(w.location,w.matches,c,t,n?.fromRouteId,n?.relative),n),s;n?.mask&&(s={pathname:``,search:``,hash:``,...typeof n.mask==`string`?M(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&&Tn(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=Ye({currentLocation:l,nextLocation:u,historyAction:f});if(h){Je(h,{state:`blocked`,location:u,proceed(){Je(h,{state:`proceeding`,proceed:void 0,reset:void 0,location:u}),ye(t,n)},reset(){let e=new Map(w.blockers);e.set(h,vt),_e({blockers:e})}});return}await xe(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 be(){pe||=Ln(),Pe(),_e({revalidation:`loading`});let e=pe.promise;return w.navigation.state===`submitting`?e:w.navigation.state===`idle`?(xe(w.historyAction,w.location,{startUninterruptedRevalidation:!0}),e):(xe(T||w.historyAction,w.navigation.location,{overrideNavigation:w.navigation,enableViewTransition:N===!0}),e)}async function xe(t,n,r){j&&j.abort(),j=null,T=t,te=(r&&r.startUninterruptedRevalidation)===!0,tt(w.location,w.matches),k=(r&&r.preventScrollReset)===!0,N=(r&&r.enableViewTransition)===!0;let i=s.activeRoutes,a=r?.initialHydration&&w.matches&&w.matches.length>0&&!y?w.matches:ae(i,n,c,!1,s.branches),o=(r&&r.flushSync)===!0;if(a&&w.initialized&&!ne&&pn(w.location,n)&&!(r&&r.submission&&Tn(r.submission.formMethod))){ve(n,{matches:a},{flushSync:o});return}let l=it(a,i,n.pathname);if(l.active&&l.matches&&(a=l.matches),r?.instrumentationNavigateMetaReceiver){let t=On(e.history,n,a);r.instrumentationNavigateMetaReceiver(t)}if(!a){let{error:e,notFoundMatches:t,route:r}=Xe(n.pathname);ve(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=en(e.history,n,j.signal,r&&r.submission),f=e.getContext?await e.getContext():new F,p;if(r&&r.pendingError)p=[cn(a).route.id,{type:`error`,error:r.pendingError}];else if(r&&r.submission&&Tn(r.submission.formMethod)){let i=await Se(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(vn(t)&&We(t.error)&&t.error.status===404){j=null,ve(n,{matches:i.matches,loaderData:{},errors:{[e]:t.error}});return}}a=i.matches||a,p=i.pendingActionResult,u=An(n,a,t,r.submission),o=!1,l.active=!1,d=en(e.history,d.url,d.signal)}let{shortCircuited:m,matches:h,loaderData:g,errors:_,workingFetchers:v}=await Ce(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,ve(n,{matches:h||a,...sn(p),loaderData:g,errors:_,...v?{fetchers:v}:{}}))}async function Se(t,n,i,l,u,d,f,p,m={}){if(Pe(),_e({navigation:jn(n,l,u,i)},{flushSync:m.flushSync===!0}),f){let e=await at(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}=ln(s.activeRoutes);return{matches:t,pendingActionResult:[n.id,{type:`error`,error:e.error}]}}let t=cn(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}=Xe(n.pathname);return{matches:e,pendingActionResult:[r.id,{type:`error`,error:t}]}}}let h,g=Dn(l,n);if(!g.route.action&&!g.route.lazy)h={type:`error`,error:un(405,{method:t.method,pathname:n.pathname,routeId:g.route.id})};else{let e=await Me(t,n,Gt(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(yn(h)){let n;return n=m&&m.replace!=null?m.replace:$t(h.response.headers.get(`Location`),new URL(t.url),c,e.history)===w.location.pathname+w.location.search,await je(t,h,!0,{submission:i,replace:n}),{shortCircuited:!0}}if(vn(h)){let e=cn(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 Ce(t,n,i,l,u,d,f,p,m,h,g,_,v,y){let b=f||An(n,i,l,p),x=p||m||kn(b),S=!te&&!g;if(d){if(S){let e=we(v);_e({navigation:b,...e===void 0?{}:{actionData:e}},{flushSync:_})}let e=await at(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}=ln(s.activeRoutes);return{matches:t,loaderData:{},errors:{[n.id]:e.error}}}let t=cn(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}=Xe(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}}let C=s.activeRoutes,{dsMatches:T,revalidatingFetchers:E}=Et(t,u,a,o,e.history,w,i,x,n,g?[]:r,g===!0,ne,re,ue,ce,se,C,c,e.patchRoutesOnNavigation!=null,s.branches,v,y);if(B=++R,!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=Ue(e);return ve(n,{matches:i,loaderData:{},errors:v&&vn(v[1])?{[v[0]]:v[1].error}:null,...sn(v),...t?{fetchers:e}:{}},{flushSync:_}),{shortCircuited:!0}}if(S){let e={};if(!d){e.navigation=b;let t=we(v);t!==void 0&&(e.actionData=t)}E.length>0&&(e.fetchers=Te(E)),_e(e,{flushSync:_})}E.forEach(e=>{Ve(e.key),e.controller&&L.set(e.key,e.controller)});let D=()=>E.forEach(e=>Ve(e.key));j&&j.signal.addEventListener(`abort`,D);let{loaderResults:O,fetcherResults:k}=await Ne(T,E,t,n,u);if(t.signal.aborted)return{shortCircuited:!0};j&&j.signal.removeEventListener(`abort`,D),E.forEach(e=>L.delete(e.key));let A=dn(O);if(A)return await je(t,A.result,!0,{replace:h}),{shortCircuited:!0};if(A=dn(k),A)return se.add(A.key),await je(t,A.result,!0,{replace:h}),{shortCircuited:!0};let M=new Map(w.fetchers),{loaderData:N,errors:ee}=an(w,i,O,v,E,k,M);g&&w.errors&&(ee={...w.errors,...ee});let P=Ue(M),F=Ge(B,M),I=P||F||E.length>0;return{matches:i,loaderData:N,errors:ee,...I?{workingFetchers:M}:{}}}function we(e){if(e&&!vn(e[1]))return{[e[0]]:e[1].data};if(w.actionData)return Object.keys(w.actionData).length===0?null:w.actionData}function Te(e){let t=new Map(w.fetchers);return e.forEach(e=>{let n=t.get(e.key),r=Mn(void 0,n?n.data:void 0);t.set(e.key,r)}),t}async function Ee(t,n,r,i){Ve(t);let a=(i&&i.flushSync)===!0,o=nt(C),l=s.activeRoutes,u=wt(w.location,w.matches,c,r,n,i?.relative),d=ae(l,u,c,!1,s.branches),f=it(d,l,u);if(f.active&&f.matches&&(d=f.matches),o&&o(On(e.history,u,d)),!d){Ie(t,n,un(404,{pathname:u}),{flushSync:a});return}let{path:p,submission:m,error:h}=Tt(!0,u,i);if(h){Ie(t,n,h,{flushSync:a});return}let g=e.getContext?await e.getContext():new F,_=(i&&i.preventScrollReset)===!0;if(m&&Tn(m.formMethod)){await Oe(t,n,p,d,g,f.active,a,_,m,i&&i.defaultShouldRevalidate);return}ce.set(t,{routeId:n,path:p}),await Ae(t,n,p,d,g,f.active,a,_,m)}async function Oe(t,n,i,l,u,d,f,p,m,h){Pe(),ce.delete(t),Fe(t,Nn(m,w.fetchers.get(t)),{flushSync:f});let g=new AbortController,_=en(e.history,i,g.signal,m);if(d){let e=await at(l,new URL(_.url).pathname,_.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){Ie(t,n,e.error,{flushSync:f});return}if(e.matches)l=e.matches;else{Ie(t,n,un(404,{pathname:i}),{flushSync:f});return}}let v=Dn(l,i);if(!v.route.action&&!v.route.lazy){Ie(t,n,un(405,{method:m.formMethod,pathname:i,routeId:n}),{flushSync:f});return}L.set(t,g);let y=R,b=Gt(a,o,_,i,l,v,r,u),x=await Me(_,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){L.get(t)===g&&L.delete(t);return}if(ue.has(t)){if(yn(S)||vn(S)){Fe(t,Pn(void 0));return}}else{if(yn(S)){if(L.delete(t),B>y){Fe(t,Pn(void 0));return}return se.add(t),Fe(t,Mn(m)),je(_,S,!1,{fetcherSubmission:m,preventScrollReset:p})}if(vn(S)){Ie(t,n,S.error);return}}let C=w.navigation.location||w.location,D=en(e.history,C,g.signal),O=s.activeRoutes,k=w.navigation.state===`idle`?w.matches:ae(O,w.navigation.location,c,!1,s.branches);E(k,`Didn't find any matches after fetcher action`);let A=++R;ie.set(t,A);let{dsMatches:M,revalidatingFetchers:N}=Et(D,u,a,o,e.history,w,k,m,C,r,!1,ne,re,ue,ce,se,O,c,e.patchRoutesOnNavigation!=null,s.branches,[v.route.id,S],h),ee=Mn(m,S.data),P=new Map(w.fetchers);P.set(t,ee),N.filter(e=>e.key!==t).forEach(e=>{let t=e.key,n=P.get(t),r=Mn(void 0,n?n.data:void 0);P.set(t,r),Ve(t),e.controller&&L.set(t,e.controller)}),_e({fetchers:P});let F=()=>N.forEach(e=>Ve(e.key));g.signal.addEventListener(`abort`,F);let{loaderResults:I,fetcherResults:te}=await Ne(M,N,D,C,u);if(g.signal.aborted)return;g.signal.removeEventListener(`abort`,F),ie.delete(t),L.delete(t),N.forEach(e=>L.delete(e.key));let z=w.fetchers.has(t),oe=e=>{if(!z)return e;let n=new Map(e.fetchers);return n.set(t,Pn(S.data)),{...e,fetchers:n}},le=dn(I);if(le)return w=oe(w),je(D,le.result,!1,{preventScrollReset:p});if(le=dn(te),le)return se.add(le.key),w=oe(w),je(D,le.result,!1,{preventScrollReset:p});let de=new Map(w.fetchers);z&&de.set(t,Pn(S.data));let{loaderData:fe,errors:pe}=an(w,k,I,void 0,N,te,de);Ge(A,de),w.navigation.state===`loading`&&A>B?(E(T,`Expected pending action`),j&&j.abort(),ve(w.navigation.location,{matches:k,loaderData:fe,errors:pe,fetchers:de})):(_e({errors:pe,loaderData:on(w.loaderData,fe,k,pe),fetchers:de}),ne=!1)}async function Ae(t,n,i,s,c,l,u,d,f){let p=w.fetchers.get(t);Fe(t,Mn(f,p?p.data:void 0),{flushSync:u});let m=new AbortController,h=en(e.history,i,m.signal);if(l){let e=await at(s,new URL(h.url).pathname,h.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){Ie(t,n,e.error,{flushSync:u});return}if(e.matches)s=e.matches;else{Ie(t,n,un(404,{pathname:i}),{flushSync:u});return}}let g=Dn(s,i);L.set(t,m);let _=R,v=await Me(h,i,Gt(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(L.get(t)===m&&L.delete(t),!h.signal.aborted){if(ue.has(t)){Fe(t,Pn(void 0));return}if(yn(y)){if(B>_){Fe(t,Pn(void 0));return}se.add(t),await je(h,y,!1,{preventScrollReset:d});return}if(vn(y)){Ie(t,n,y.error);return}Fe(t,Pn(y.data))}}async function je(r,i,a,{submission:o,fetcherSubmission:s,preventScrollReset:l,replace:u}={}){a||(O?.resolve(),O=null),i.response.headers.has(`X-Remix-Revalidate`)&&(ne=!0);let d=i.response.headers.get(`Location`);E(d,`Expected a Location header on the redirect Response`),d=$t(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(ke(d)){let n=ee(t,d,!0);e=n.origin!==t.location.origin||De(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=kn(w.navigation));let _=o||s;ht.has(i.response.status)&&_&&Tn(_.formMethod)?await xe(p,f,{submission:{..._,formAction:d},preventScrollReset:l||k,enableViewTransition:a?N:void 0}):await xe(p,f,{overrideNavigation:An(f,[],p,o),fetcherSubmission:s,preventScrollReset:l||k,enableViewTransition:a?N:void 0})}async function Me(e,t,n,r,i){let a,o={};try{a=await Kt(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(!Tn(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(_n(r)){let i=r.result;o[t]={type:`redirect`,response:Xt(i,e,t,n,c)}}else o[t]=await Yt(r);return o}async function Ne(e,t,n,r,i){let a=Me(n,r,e,i,null),o=Promise.all(t.map(async e=>{if(e.matches&&e.match&&e.request&&e.controller){let t=(await Me(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:un(404,{pathname:e.path})}})}));return{loaderResults:await a,fetcherResults:(await o).reduce((e,t)=>Object.assign(e,t),{})}}function Pe(){ne=!0,ce.forEach((e,t)=>{L.has(t)&&re.add(t),Ve(t)})}function Fe(e,t,n={}){let r=new Map(w.fetchers);r.set(e,t),_e({fetchers:r},{flushSync:(n&&n.flushSync)===!0})}function Ie(e,t,n,r={}){let i=cn(w.matches,t),a=new Map(w.fetchers);ze(a,e),_e({errors:{[i.route.id]:n},fetchers:a},{flushSync:(r&&r.flushSync)===!0})}function Le(e){return le.set(e,(le.get(e)||0)+1),ue.has(e)&&ue.delete(e),w.fetchers.get(e)||_t}function Re(e,t){Ve(e,t?.reason),Fe(e,Pn(null))}function ze(e,t){let n=w.fetchers.get(t);L.has(t)&&!(n&&n.state===`loading`&&ie.has(t))&&Ve(t),ce.delete(t),ie.delete(t),se.delete(t),ue.delete(t),re.delete(t),e.delete(t)}function Be(e){let t=(le.get(e)||0)-1;t<=0?(le.delete(e),ue.add(e)):le.set(e,t),_e({fetchers:new Map(w.fetchers)})}function Ve(e,t){let n=L.get(e);n&&(n.abort(t),L.delete(e))}function He(e,t){for(let n of e){let e=t.get(n);E(e,`Expected fetcher: ${n}`);let r=Pn(e.data);t.set(n,r)}}function Ue(e){let t=[],n=!1;for(let r of se){let i=e.get(r);E(i,`Expected fetcher: ${r}`),i.state===`loading`&&(se.delete(r),t.push(r),n=!0)}return He(t,e),n}function Ge(e,t){let n=[];for(let[r,i]of ie)if(i<e){let e=t.get(r);E(e,`Expected fetcher: ${r}`),e.state===`loading`&&(Ve(r),ie.delete(r),n.push(r))}return He(n,t),n.length>0}function Ke(e,t){let n=w.blockers.get(e)||vt;return de.get(e)!==t&&de.set(e,t),n}function qe(e){w.blockers.delete(e),de.delete(e)}function Je(e,t){let n=w.blockers.get(e)||vt;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),_e({blockers:r})}function Ye({currentLocation:e,nextLocation:t,historyAction:n}){if(de.size===0)return;de.size>1&&D(!1,`A router only supports one blocker at a time`);let r=Array.from(de.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 Xe(e){let t=un(404,{pathname:e}),n=s.activeRoutes,{matches:r,route:i}=ln(n);return{notFoundMatches:r,route:i,error:t}}function $e(e,t,n){if(m=e,g=t,h=n||null,!_&&w.navigation===gt){_=!0;let e=rt(w.location,w.matches);e!=null&&_e({restoreScrollPosition:e})}return()=>{m=null,g=null,h=null}}function et(e,t){return h&&h(e,t.map(e=>oe(e,w.loaderData)))||e.key}function tt(e,t){if(m&&g){let n=et(e,t);m[n]=g()}}function rt(e,t){if(m){let n=et(e,t),r=m[n];if(typeof r==`number`)return r}return null}function it(t,n,r){if(e.patchRoutesOnNavigation){let e=s.branches;if(!t)return{active:!0,matches:ae(n,r,c,!0,e)||[]};if(Object.keys(t[0].params).length>0)return{active:!0,matches:ae(n,r,c,!0,e)}}return{active:!1,matches:null}}async function at(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||Mt(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=ae(s.activeRoutes,n,c,!1,u),f=null;if(d&&(Object.keys(d[0].params).length===0||(f=ae(s.activeRoutes,n,c,!0,u),!(f&&l.length<f.length&&ot(l,f.slice(0,l.length))))))return{type:`success`,matches:d};if(f||=ae(s.activeRoutes,n,c,!0,u),!f||ot(l,f))return{type:`success`,matches:null};l=f}}function ot(e,t){return e.length===t.length&&e.every((e,n)=>e.route.id===t[n].route.id)}function st(e){o={},s.setHmrRoutes(z(e,a,void 0,o))}function ct(e,t,n=!1){Mt(e,t,s,o,a,n),s.hasHMRRoutes||_e({})}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:me,subscribe:ge,enableScrollRestoration:$e,navigate:ye,fetch:Ee,revalidate:be,createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:Le,resetFetcher:Re,deleteFetcher:Be,dispose:he,getBlocker:Ke,deleteBlocker:qe,patchRoutes:ct,_internalFetchControllers:L,_internalSetRoutes:st,_internalSetStateDoNotUseOrYouWillBreakYourApp(e){_e(e)}},e.instrumentations&&(C=Qe(C,e.instrumentations.map(e=>e.router).filter(Boolean))),C}function Ct(e){return e!=null&&(`formData`in e&&e.formData!=null||`body`in e&&e.body!==void 0)}function wt(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=Fe(r||`.`,Pe(o),De(e.pathname,n)||e.pathname,a===`path`);if(r??(c.search=e.search,c.hash=e.hash),(r==null||r===``||r===`.`)&&s){let e=En(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=Oe({basename:n,pathname:c.pathname})),j(c)}function Tt(e,t,n){if(!n||!Ct(n))return{path:t};if(n.formMethod&&!wn(n.formMethod))return{path:t,error:un(405,{method:n.formMethod})};let r=()=>({path:t,error:un(400,{type:`invalid-body`})}),i=(n.formMethod||`get`).toUpperCase(),a=fn(t);if(n.body!==void 0){if(n.formEncType===`text/plain`){if(!Tn(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(!Tn(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=tn(n.formData),s=n.formData;else if(n.body instanceof FormData)o=tn(n.body),s=n.body;else if(n.body instanceof URLSearchParams)o=n.body,s=nn(o);else if(n.body==null)o=new URLSearchParams,s=new FormData;else try{o=new URLSearchParams(n.body),s=nn(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(Tn(c.formMethod))return{path:t,submission:c};let l=M(t);return e&&l.search&&En(l.search)&&o.append(`index`,``),l.search=`?${o}`,{path:j(l),submission:c}}function Et(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x){let S=b?vn(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&&vn(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=Ge(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(!Dt(s))f=!1;else if(u){let{shouldLoad:e}=Ot(s,a.loaderData,a.errors);f=e}else kt(a.loaderData,a.matches[o],i)&&(f=!0);if(f!==null)return Wt(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?At(a.matches[o],i)&&(p=!0):p=!0;let m={...O,defaultShouldRevalidate:p};return Wt(n,r,e,c,k,i,l,t,jt(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=ae(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=Dn(b,e.path),C=new AbortController,w=en(i,e.path,C.signal),T=null;if(f.has(s))f.delete(s),T=Gt(n,r,w,e.path,b,S,l,t);else if(m)d&&(T=Gt(n,r,w,e.path,b,S,l,t));else{let i;i=typeof x==`boolean`?x:!D&&d;let a={...O,defaultShouldRevalidate:i};jt(S,a)&&(T=Gt(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 Dt(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function Ot(e,t,n){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!Dt(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 kt(e,t,n){let r=!t||n.route.id!==t.route.id,i=!e.hasOwnProperty(n.route.id);return r||i}function At(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith(`*`)&&e.params[`*`]!==t.params[`*`]}function jt(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n==`boolean`)return n}return t.defaultShouldRevalidate}function Mt(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=>Nt(e,t));t?c.push({existingRoute:t,newRoute:e}):s.push(e)}),s.length>0){let t=z(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]=z([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 Nt(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=>Nt(e,t)))??!1}var Pt=new WeakMap,Ft=({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=Pt.get(i);o||(o={},Pt.set(i,o));let s=o[e];if(s)return s;let c=(async()=>{let t=te(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},It=new WeakMap;function Lt(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=It.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=re(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 It.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=Ft({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 Rt(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 zt(e){return e.matches.some(e=>e.route.middleware)?Bt(e,()=>Rt(e)):Rt(e)}function Bt(e,t){return Vt(e,t,e=>{if(Cn(e))throw e;return e},hn,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{[cn(r,a).route.id]:{type:`error`,result:t}}}}}async function Vt(e,t,n,r,i){let{matches:a,...o}=e;return await Ht(o,a.flatMap(e=>e.route.middleware?e.route.middleware.map(t=>[e.route.id,t]):[]),t,n,r,i)}async function Ht(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 Ht(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 Ut(e,t,n,r,i){let a=Ft({key:`middleware`,route:r.route,manifest:t,mapRouteProperties:e}),o=Lt(r.route,Tn(n.method)?`action`:`loader`,t,e,i);return{middleware:a,route:o.lazyRoutePromise,handler:o.lazyHandlerPromise}}function Wt(e,t,n,r,i,a,o,s,c,l=null,u){let d=!1,f=Ut(e,t,n,a,o);return{...a,_lazyPromises:f,shouldLoad:c,shouldRevalidateArgs:l,shouldCallHandler(e){return d=!0,l?typeof u==`boolean`?jt(a,{...l,defaultShouldRevalidate:u}):typeof e==`boolean`?jt(a,{...l,defaultShouldRevalidate:e}):jt(a,l):c},resolve(e){let{lazy:t,loader:o,middleware:l}=a.route,u=d||c||e&&!Tn(n.method)&&(t||o),p=l&&l.length>0&&!o&&!t;return u&&(Tn(n.method)||!p)?qt({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 Gt(e,t,n,r,i,a,o,s,c=null){return i.map(l=>l.route.id===a.route.id?Wt(e,t,n,r,Ge(i),l,o,s,!0,c):{...l,shouldLoad:!1,shouldRevalidateArgs:c,shouldCallHandler:()=>!1,_lazyPromises:Ut(e,t,n,l,o),resolve:()=>Promise.resolve({type:`data`,result:void 0})})}async function Kt(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:Ke(t,n),pattern:Ge(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 Bt(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 qt({request:e,path:t,pattern:n,match:r,lazyHandlerPromise:i,lazyRoutePromise:a,handlerOverride:o,scopedContext:s}){let c,l,u=Tn(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:Ke(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 un(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 un(404,{pathname:t.pathname+t.search})}}catch(e){return{type:`error`,result:e}}finally{l&&e.signal.removeEventListener(`abort`,l)}return c}async function Jt(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 Yt(e){let{result:t,type:n}=e;if(xn(t)){let e;try{e=await Jt(t)}catch(e){return{type:`error`,error:e}}return n===`error`?{type:`error`,error:new Ue(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:`data`,data:e,statusCode:t.status,headers:t.headers}}return n===`error`?bn(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:mn(t),statusCode:We(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:t,statusCode:We(t)?t.status:void 0}:bn(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 Xt(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`),!ke(a)){let o=r.slice(0,r.findIndex(e=>e.route.id===n)+1);a=wt(new URL(t.url),o,i,a),e.headers.set(`Location`,a)}return e}var Zt=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function Qt(e){try{return Zt.includes(new URL(e).protocol)}catch{return!1}}function $t(e,t,n,r){if(ke(e)){let r=e,i=x.test(r)?new URL(S(r,t.protocol)):new URL(r);if(Qt(i.toString()))throw Error(`Invalid redirect location`);let a=De(i.pathname,n)!=null;if(i.origin===t.origin&&a)return Ie(i.pathname)+i.search+i.hash}try{if(Qt(r.createURL(e).toString()))throw Error(`Invalid redirect location`)}catch{}return e}function en(e,t,n,r){let i=e.createURL(fn(t)).toString(),a={signal:n};if(r&&Tn(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?tn(r.formData):r.formData}return new Request(i,a)}function tn(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r==`string`?r:r.name);return t}function nn(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function rn(e,t,n,r=!1,i=!1){let a={},o=null,s,c=!1,l={},u=n&&vn(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(!yn(f),`Cannot handle redirect results in processLoaderData`),vn(f)){let t=f.error;if(u!==void 0&&(t=u,u=void 0),o||={},i)o[d]=t;else{let n=cn(e,d);o[n.route.id]??(o[n.route.id]=t)}r||(a[d]=bt),c||(c=!0,s=We(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 an(e,t,n,r,i,a,o){let{loaderData:s,errors:c}=rn(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`),vn(s)){let t=cn(e.matches,r?.route.id);c&&c[t.route.id]||(c={...c,[t.route.id]:s.error}),o.delete(n)}else if(yn(s))E(!1,`Unhandled fetcher revalidation redirect`);else{let e=Pn(s.data);o.set(n,e)}}),{loaderData:s,errors:c}}function on(e,t,n,r){let i=Object.entries(t).filter(([,e])=>e!==bt).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 sn(e){return e?vn(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function cn(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 ln(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 un(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 Ue(e||500,o,Error(s),!0)}function dn(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(yn(r))return{key:n,result:r}}}function fn(e){return j({...typeof e==`string`?M(e):e,hash:``})}function pn(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===``?t.hash!==``:e.hash===t.hash||t.hash!==``}function mn(e){return new Ue(e.init?.status??500,e.init?.statusText??`Internal Server Error`,e.data)}function hn(e){return typeof e==`object`&&!!e&&Object.entries(e).every(([e,t])=>typeof e==`string`&&gn(t))}function gn(e){return typeof e==`object`&&!!e&&`type`in e&&`result`in e&&(e.type===`data`||e.type===`error`)}function _n(e){return xn(e.result)&&mt.has(e.result.status)}function vn(e){return e.type===`error`}function yn(e){return(e&&e.type)===`redirect`}function bn(e){return typeof e==`object`&&!!e&&`type`in e&&`data`in e&&`init`in e&&e.type===`DataWithResponseInit`}function xn(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.headers==`object`&&e.body!==void 0}function Sn(e){return mt.has(e)}function Cn(e){return xn(e)&&Sn(e.status)&&e.headers.has(`Location`)}function wn(e){return pt.has(e.toUpperCase())}function Tn(e){return dt.has(e.toUpperCase())}function En(e){return new URLSearchParams(e).getAll(`index`).some(e=>e===``)}function Dn(e,t){let n=typeof t==`string`?M(t).search:t.search;if(e[e.length-1].route.index&&En(n||``))return e[e.length-1];let r=Ne(e);return r[r.length-1]}function On(e,t,n){return{url:Ke(e.createURL(t),t),pattern:n?Ge(n):``,params:n?.[0]?.params?{...n[0].params}:{}}}function kn(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 An(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 jn(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 Mn(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 Nn(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 Pn(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 Fn(e,t){try{let n=e.sessionStorage.getItem(yt);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 In(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(yt,JSON.stringify(n))}catch(e){D(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}}function Ln(){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 Rn=P.createContext(null);Rn.displayName=`DataRouter`;var zn=P.createContext(null);zn.displayName=`DataRouterState`;var Bn=P.createContext(!1);function Vn(){return P.useContext(Bn)}var Hn=P.createContext({isTransitioning:!1});Hn.displayName=`ViewTransition`;var Un=P.createContext(new Map);Un.displayName=`Fetchers`;var Wn=P.createContext(null);Wn.displayName=`Await`;var Gn=P.createContext(null);Gn.displayName=`Navigation`;var Kn=P.createContext(null);Kn.displayName=`Location`;var qn=P.createContext({outlet:null,matches:[],isDataRoute:!1});qn.displayName=`Route`;var Jn=P.createContext(null);Jn.displayName=`RouteError`;var Yn=`REACT_ROUTER_ERROR`,Xn=`REDIRECT`,Zn=`ROUTE_ERROR_RESPONSE`;function Qn(e){if(e.startsWith(`${Yn}:${Xn}:{`))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 $n(e){if(e.startsWith(`${Yn}:${Zn}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new Ue(t.status,t.statusText,t.data)}catch{}}function er(e,{relative:t}={}){E(tr(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=P.useContext(Gn),{hash:i,pathname:a,search:o}=lr(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:Le([n,a])),r.createHref({pathname:s,search:o,hash:i})}function tr(){return P.useContext(Kn)!=null}function nr(){return E(tr(),`useLocation() may be used only in the context of a <Router> component.`),P.useContext(Kn).location}var rr=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function ir(){let{isDataRoute:e}=P.useContext(qn);return e?Tr():ar()}function ar(){E(tr(),`useNavigate() may be used only in the context of a <Router> component.`);let e=P.useContext(Rn),{basename:t,navigator:n}=P.useContext(Gn),{matches:r}=P.useContext(qn),{pathname:i}=nr(),a=JSON.stringify(Pe(r)),o=P.useRef(!1);return P.useLayoutEffect(()=>{o.current=!0}),P.useCallback((r,s={})=>{if(D(o.current,rr),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=Fe(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:Le([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var or=P.createContext(null);function sr(e){let t=P.useContext(qn).outlet;return P.useMemo(()=>t&&P.createElement(or.Provider,{value:e},t),[t,e])}function cr(){let{matches:e}=P.useContext(qn);return e[e.length-1]?.params??{}}function lr(e,{relative:t}={}){let{matches:n}=P.useContext(qn),{pathname:r}=nr(),i=JSON.stringify(Pe(n));return P.useMemo(()=>Fe(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function ur(e,t,n){E(tr(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=P.useContext(Gn),{matches:i}=P.useContext(qn),a=i[i.length-1],o=a?a.params:{};a&&a.pathname;let s=a?a.pathnameBase:`/`;a&&a.route;let c=nr(),l;if(t){let e=typeof t==`string`?M(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})):ie(e,{pathname:d}),p=_r(f&&f.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:Le([s,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?s:Le([s,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&p?P.createElement(Kn.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...l},navigationType:`POP`}},p):p}function dr(){let e=wr(),t=We(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null;return P.createElement(P.Fragment,null,P.createElement(`h2`,null,`Unexpected Application Error!`),P.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?P.createElement(`pre`,{style:{padding:`0.5rem`,backgroundColor:`rgba(200,200,200, 0.5)`}},n):null,null)}var fr=P.createElement(dr,null),pr=class extends P.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static contextType=Bn;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=$n(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:P.createElement(qn.Provider,{value:this.props.routeContext},P.createElement(Jn.Provider,{value:e,children:this.props.component}));return this.context?P.createElement(hr,{error:e},t):t}},mr=new WeakMap;function hr({children:e,error:t}){let{basename:n}=P.useContext(Gn);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=Qn(t.digest);if(e){let r=mr.get(t);if(r)throw r;let i=Je(e.location,n),a=i.absoluteURL||i.to;if(Qt(a))throw Error(`Invalid redirect location`);if(qe&&!mr.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 mr.set(t,n),n}}return P.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${a}`})}}return e}function gr({routeContext:e,match:t,children:n}){let r=P.useContext(Rn);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),P.createElement(qn.Provider,{value:e},n)}function _r(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:Ge(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||fr,o&&(s<0&&c===0?(Dr(`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?P.createElement(n.route.Component,null):n.route.element?n.route.element:e,P.createElement(gr,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?P.createElement(pr,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function vr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function yr(e){let t=P.useContext(Rn);return E(t,vr(e)),t}function br(e){let t=P.useContext(zn);return E(t,vr(e)),t}function xr(e){let t=P.useContext(qn);return E(t,vr(e)),t}function Sr(e){let t=xr(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 Cr(){return Sr(`useRouteId`)}function wr(){let e=P.useContext(Jn),t=br(`useRouteError`),n=Sr(`useRouteError`);return e===void 0?t.errors?.[n]:e}function Tr(){let{router:e}=yr(`useNavigate`),t=Sr(`useNavigate`),n=P.useRef(!1);return P.useLayoutEffect(()=>{n.current=!0}),P.useCallback(async(r,i={})=>{D(n.current,rr),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var Er={};function Dr(e,t,n){!t&&!Er[e]&&(Er[e]=!0,D(!1,n))}var Or={};function kr(e,t){!e&&!Or[t]&&(Or[t]=!0,console.warn(t))}var Ar=[`HydrateFallback`,`hydrateFallbackElement`],jr=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 Mr({router:e,flushSync:t,onError:n,useTransitions:r}){r=Vn()||r;let[i,a]=P.useState(e.state),[o,s]=(0,P.useOptimistic)(i),[c,l]=P.useState(),[u,d]=P.useState({isTransitioning:!1}),[f,p]=P.useState(),[m,h]=P.useState(),[g,_]=P.useState(),v=P.useRef(new Map),y=P.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:Ge(i.matches)})),i.fetchers.forEach((e,t)=>{e.data!==void 0&&v.current.set(t,e.data)}),o.forEach(e=>v.current.delete(e)),kr(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(kr(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):P.startTransition(()=>{r===!0&&s(e=>Nr(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]);P.useLayoutEffect(()=>e.subscribe(y),[e,y]),P.useEffect(()=>{u.isTransitioning&&!u.flushSync&&p(new jr)},[u]),P.useEffect(()=>{if(f&&c&&e.window){let t=c,n=f.promise,i=e.window.document.startViewTransition(async()=>{r===!1?a(t):P.startTransition(()=>{r===!0&&s(e=>Nr(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]),P.useEffect(()=>{f&&c&&o.location.key===c.location.key&&f.resolve()},[f,m,o.location,c]),P.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=P.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=P.useMemo(()=>({router:e,navigator:b,static:!1,basename:x,onError:n}),[e,b,x,n]);return P.createElement(P.Fragment,null,P.createElement(Rn.Provider,{value:S},P.createElement(zn.Provider,{value:o},P.createElement(Un.Provider,{value:v.current},P.createElement(Hn.Provider,{value:u},P.createElement(Rr,{basename:x,location:o.location,navigationType:o.historyAction,navigator:b,useTransitions:r},P.createElement(Pr,{routes:e.routes,manifest:e.manifest,future:e.future,state:o,isStatic:!1,onError:n})))))),null)}function Nr(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 Pr=P.memo(Fr);function Fr({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return ur(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function Ir({to:e,replace:t,state:n,relative:r}){E(tr(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i}=P.useContext(Gn);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}=P.useContext(qn),{pathname:o}=nr(),s=ir(),c=Fe(e,Pe(a),o,r===`path`),l=JSON.stringify(c);return P.useEffect(()=>{s(JSON.parse(l),{replace:t,state:n,relative:r})},[s,l,r,t,n]),null}function Lr(e){return sr(e.context)}function Rr({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){E(!tr(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=P.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=M(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,mask:m}=n,h=P.useMemo(()=>{let e=De(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:P.createElement(Gn.Provider,{value:c},P.createElement(Kn.Provider,{children:t,value:h}))}P.Component;var zr=`application/x-www-form-urlencoded`;function Br(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Vr(e){return Br(e)&&e.tagName.toLowerCase()===`button`}function Hr(e){return Br(e)&&e.tagName.toLowerCase()===`form`}function Ur(e){return Br(e)&&e.tagName.toLowerCase()===`input`}function Wr(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Gr(e,t){return e.button===0&&(!t||t===`_self`)&&!Wr(e)}function Kr(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 qr(e,t){let n=Kr(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var Jr=null;function Yr(){if(Jr===null)try{new FormData(document.createElement(`form`),0),Jr=!1}catch{Jr=!0}return Jr}var Xr=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Zr(e){return e!=null&&!Xr.has(e)?(D(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${zr}"`),null):e}function Qr(e,t){let n,r,i,a,o;if(Hr(e)){let o=e.getAttribute(`action`);r=o?De(o,t):null,n=e.getAttribute(`method`)||`get`,i=Zr(e.getAttribute(`enctype`))||zr,a=new FormData(e)}else if(Vr(e)||Ur(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?De(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||`get`,i=Zr(e.getAttribute(`formenctype`))||Zr(o.getAttribute(`enctype`))||zr,a=new FormData(o,e),!Yr()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(Br(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=`get`,r=null,i=zr,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}function $r(e,t){if(e===!1||e==null)throw Error(t)}function ei(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 V=d(),ti=y(),ni=`modulepreload`,ri=function(e){return`/`+e},ii={},ai=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=ri(t,n),t=s(t),t in ii)return;ii[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`:ni,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 oi(e,t){if(e.id in t)return t[e.id];try{let n=await ai(()=>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 si(e){return e!=null&&typeof e.page==`string`}function ci(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 li(e,t,n){return mi((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await oi(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(ci).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function ui(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 di(e,t,{includeHydrateFallback:n}={}){return fi(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 fi(e){return[...new Set(e)]}function pi(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function mi(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!si(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(pi(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function hi(){let e=P.useContext(Rn);return $r(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function gi(){let e=P.useContext(zn);return $r(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var _i=P.createContext(void 0);_i.displayName=`FrameworkContext`;function vi(){let e=P.useContext(_i);return $r(e,`You must render this element inside a <HydratedRouter> element`),e}function yi(e,t){let n=P.useContext(_i),[r,i]=P.useState(!1),[a,o]=P.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=P.useRef(null);P.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]),P.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:bi(s,p),onBlur:bi(c,m),onMouseEnter:bi(l,p),onMouseLeave:bi(u,m),onTouchStart:bi(d,p)}]:[a,f,{}]:[!1,f,{}]}function bi(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function xi({page:e,...t}){let n=Vn(),{nonce:r}=vi(),{router:i}=hi(),a=P.useMemo(()=>ie(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?P.createElement(Ci,{page:e,matches:a,...t}):P.createElement(wi,{page:e,matches:a,...t})):null}function Si(e){let{manifest:t,routeModules:n}=vi(),[r,i]=P.useState([]);return P.useEffect(()=>{let r=!1;return li(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function Ci({page:e,matches:t,...n}){let r=nr(),i=P.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=ei(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 P.createElement(P.Fragment,null,i.map(e=>P.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function wi({page:e,matches:t,...n}){let r=nr(),{manifest:i,routeModules:a}=vi(),{loaderData:o,matches:s}=gi(),c=P.useMemo(()=>ui(e,t,s,i,r,`data`),[e,t,s,i,r]),l=P.useMemo(()=>ui(e,t,s,i,r,`assets`),[e,t,s,i,r]),u=P.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=ei(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=P.useMemo(()=>di(l,i),[l,i]),f=Si(l);return P.createElement(P.Fragment,null,u.map(e=>P.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),d.map(e=>P.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),f.map(({key:e,link:t})=>P.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function Ti(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}var Ei=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{Ei&&(window.__reactRouterVersion=`8.3.0`)}catch{}function Di(e,t){return St({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:T({window:t?.window}),hydrationData:t?.hydrationData||Oi(),routes:e,mapRouteProperties:R,hydrationRouteProperties:Ar,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,instrumentations:t?.instrumentations}).initialize()}function Oi(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:ki(e.errors)}),e}function ki(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 Ue(r.status,r.statusText,r.data,r.internal===!0);else if(r&&r.__type===`Error`){if(typeof r.__subType==`string`&&He.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 H=P.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:_}=P.useContext(Gn),v=typeof l==`string`&&b.test(l),y=Je(l,h);l=y.to;let x=er(l,{relative:r}),S=nr(),C=null;if(o){let e=Fe(o,[],S.mask?S.mask.pathname:`/`,!0);h!==`/`&&(e.pathname=e.pathname===`/`?h:Le([h,e.pathname])),C=g.createHref(e)}let[w,T,E]=yi(n,p),D=Ni(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=P.createElement(`a`,{...p,...E,href:(k?C:void 0)||y.absoluteURL||x,onClick:k?O:e,ref:Ti(m,T),target:c,"data-discover":!v&&t===`render`?`true`:void 0});return w&&!v?P.createElement(P.Fragment,null,A,P.createElement(xi,{page:x})):A});H.displayName=`Link`;var Ai=P.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=lr(a,{relative:c.relative}),d=nr(),f=P.useContext(zn),{navigator:p,basename:m}=P.useContext(Gn),h=f!=null&&zi(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=De(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 P.createElement(H,{...c,"aria-current":C,className:w,ref:l,style:T,to:a,viewTransition:o},typeof s==`function`?s(S):s)});Ai.displayName=`NavLink`;var U=P.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}=P.useContext(Gn),g=Li(),_=Ri(s,{relative:l}),v=o.toLowerCase()===`get`?`get`:`post`,y=typeof s==`string`&&b.test(s);return P.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?P.startTransition(()=>p()):p()},...p,"data-discover":!y&&e===`render`?`true`:void 0})});U.displayName=`Form`;function ji(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Mi(e){let t=P.useContext(Rn);return E(t,ji(e)),t}function Ni(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:l}={}){let u=ir(),d=nr(),f=lr(e,{relative:o});return P.useCallback(p=>{if(Gr(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?P.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}function Pi(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=P.useRef(Kr(e)),n=P.useRef(!1),r=nr(),i=P.useMemo(()=>qr(r.search,n.current?null:t.current),[r.search]),a=ir();return[i,P.useCallback((e,t)=>{let r=Kr(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var Fi=0,Ii=()=>`__${String(++Fi)}__`;function Li(){let{router:e}=Mi(`useSubmit`),{basename:t}=P.useContext(Gn),n=Cr(),r=e.fetch,i=e.navigate;return P.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=Qr(e,t);a.navigate===!1?await r(a.fetcherKey||Ii(),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 Ri(e,{relative:t}={}){let{basename:n}=P.useContext(Gn),r=P.useContext(qn);E(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...lr(e||`.`,{relative:t})},o=nr();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:Le([n,a.pathname])),j(a)}function zi(e,{relative:t}={}){let n=P.useContext(Hn);E(n!=null,"`useViewTransitionState` must be used within `react-router/dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Mi(`useViewTransitionState`),i=lr(e,{relative:t});if(!n.isTransitioning)return!1;let a=De(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=De(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Ce(i.pathname,o)!=null||Ce(i.pathname,a)!=null}var Bi=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Vi=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),Hi=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),Ui=e=>{let t=Hi(e);return t.charAt(0).toUpperCase()+t.slice(1)},Wi={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`},Gi=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Ki=(0,P.createContext)({}),qi=()=>(0,P.useContext)(Ki),Ji=(0,P.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=``}=qi()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,P.createElement)(`svg`,{ref:c,...Wi,width:t??l??Wi.width,height:t??l??Wi.height,stroke:e??f,strokeWidth:m,className:Bi(`lucide`,p,i),...!a&&!Gi(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,P.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),Yi=(e,t)=>{let n=(0,P.forwardRef)(({className:n,...r},i)=>(0,P.createElement)(Ji,{ref:i,iconNode:t,className:Bi(`lucide-${Vi(Ui(e))}`,`lucide-${e}`,n),...r}));return n.displayName=Ui(e),n},Xi=Yi(`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`}]]),Zi=Yi(`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`}]]),Qi=Yi(`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`}]]),$i=Yi(`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`}]]),ea=Yi(`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`}]]),ta=Yi(`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`}]]),na=Yi(`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`}]]),ra=Yi(`git-branch`,[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]),ia=Yi(`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`}]]),aa=Yi(`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`}]]),oa=Yi(`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`}]]),sa=Yi(`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`}]]),ca=Yi(`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`}]]),la=Yi(`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`}]]),ua=Yi(`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`}]]),da=Yi(`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`}]]),fa=Yi(`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`}]]),pa=Yi(`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`}]]),ma=Yi(`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`}]]),ha=Yi(`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`}]]),ga=Yi(`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`}]]),_a=Yi(`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`}]]),va=Yi(`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`}]]),ya=Yi(`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`}]]),ba=Yi(`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`}]]),xa=Yi(`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`}]]),Sa={size:18,strokeWidth:1.75,"aria-hidden":!0},Ca={home:e=>(0,V.jsx)(ca,{...Sa,...e}),board:e=>(0,V.jsx)(sa,{...Sa,...e}),streams:e=>(0,V.jsx)(xa,{...Sa,...e}),queue:e=>(0,V.jsx)(la,{...Sa,...e}),done:e=>(0,V.jsx)($i,{...Sa,...e}),phases:e=>(0,V.jsx)(ua,{...Sa,...e}),facts:e=>(0,V.jsx)(Qi,{...Sa,...e}),doctor:e=>(0,V.jsx)(_a,{...Sa,...e}),bus:e=>(0,V.jsx)(pa,{...Sa,...e}),room:e=>(0,V.jsx)(aa,{...Sa,...e}),fleet:e=>(0,V.jsx)(ya,{...Sa,...e}),release:e=>(0,V.jsx)(ma,{...Sa,...e}),skills:e=>(0,V.jsx)(ba,{...Sa,...e}),docs:e=>(0,V.jsx)(ta,{...Sa,...e}),needsDavid:e=>(0,V.jsx)(Zi,{...Sa,...e}),kit:e=>(0,V.jsx)(fa,{...Sa,...e}),health:e=>(0,V.jsx)(Xi,{...Sa,...e}),gates:e=>(0,V.jsx)(ga,{...Sa,...e}),tokens:e=>(0,V.jsx)(oa,{...Sa,...e}),knowledge:e=>(0,V.jsx)(ha,{...Sa,...e}),prs:e=>(0,V.jsx)(ia,{...Sa,...e}),git:e=>(0,V.jsx)(ra,{...Sa,...e}),rooms:e=>(0,V.jsx)(ea,{...Sa,...e}),risks:e=>(0,V.jsx)(va,{...Sa,...e}),decisions:e=>(0,V.jsx)(na,{...Sa,...e}),monitor:e=>(0,V.jsx)(da,{...Sa,...e})};function W({children:e,className:t=``}){return(0,V.jsx)(`section`,{className:`bg-paper border border-sand rounded-kit shadow-panel min-w-0 overflow-hidden ${t}`,children:e})}function G({title:e,eyebrow:t,path:n,icon:r,children:i}){return(0,V.jsxs)(`div`,{className:`flex items-baseline justify-between gap-3 px-3 pt-2.5 pb-2 min-w-0`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0 shrink`,children:[r&&(0,V.jsx)(`span`,{className:`text-umber/80 shrink-0 translate-y-px`,children:Ca[r]()}),(0,V.jsx)(`span`,{className:`font-display font-bold text-[20px] leading-tight text-umber truncate shrink-0 max-w-full`,children:e}),t&&(0,V.jsx)(`span`,{className:`ml-1 font-mono font-medium text-[12px] uppercase tracking-[.1em] text-ink3 whitespace-nowrap hidden md:inline`,children:t})]}),(0,V.jsxs)(`div`,{className:`flex items-center gap-1.5 min-w-0 shrink basis-0 grow justify-end`,children:[n&&(0,V.jsx)(`span`,{className:`font-mono text-[12px] text-ink3 truncate min-w-[4ch]`,title:n,children:n}),i]})]})}var wa={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 K({tone:e=`neutral`,children:t}){return(0,V.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 ${wa[e]}`,children:t})}var Ta=[`BLOCKER`,`RISK`,`DONE`,`FYI`,`AGENT_ACTION`,`GO`,`SCOPE CHANGE`,`VERDICT`,`DAVID_DECISION`],Ea={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 Da({prefix:e,fail:t}){let n=t&&e===`VERDICT`?`bg-brick-wash text-brick shadow-[inset_0_0_0_1px_var(--color-brick-line)]`:Ea[e];return(0,V.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 Oa({glyph:e,raw:t,showRaw:n=!1,malformed:r=!1,children:i,className:a=``}){return(0,V.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,V.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,V.jsx)(`pre`,{className:`m-0 px-3 py-2 font-mono text-[13px] leading-[1.5] text-walnut whitespace-pre-wrap`,children:t}):(0,V.jsx)(`div`,{className:`px-3 min-w-0`,children:i})]})}function ka({cols:e,children:t}){return(0,V.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 q({tone:e=`default`,size:t=`md`,children:n,...r}){return(0,V.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 Aa(){return(0,V.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 ja({state:e,active:t,title:n}){return(0,V.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,V.jsx)(`span`,{className:`absolute inset-0 rounded-full bg-moss animate-ping opacity-60`})})}function Ma({size:e=14,className:t=``}){return(0,V.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 Na({size:e=22}){return(0,V.jsxs)(`svg`,{width:e,height:e,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":`true`,className:`shrink-0`,children:[(0,V.jsx)(`path`,{d:`M3 19.5h18`,stroke:`var(--color-walnut)`,strokeWidth:`2`,strokeLinecap:`round`}),(0,V.jsx)(`path`,{d:`M12 19.5V10`,stroke:`var(--color-leaf)`,strokeWidth:`2`,strokeLinecap:`round`}),(0,V.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,V.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,V.jsx)(`circle`,{cx:`12`,cy:`21.5`,r:`1.4`,fill:`var(--color-ember)`})]})}var Pa=`/api`;function J(e,t=0){let[n,r]=(0,P.useState)(null),[i,a]=(0,P.useState)(null),[o,s]=(0,P.useState)(!!e),[c,l]=(0,P.useState)(0);return(0,P.useEffect)(()=>{if(!e)return;let n=!0;s(!0),fetch(Pa+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 Fa(e,t){let n=await fetch(Pa+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 Ia(e,t,n){let r=await fetch(`${Pa}/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 La=[`/clear`,`/compact`];function Ra(){return J(`/health`,6e4).data?.requires?.mcp?.capabilities?.sendCommand??La}var za=(0,P.createContext)({projects:[],current:``,setCurrent:()=>{},error:null,refresh:()=>{}});function Ba({children:e}){let{data:t,error:n,refresh:r}=J(`/projects`,3e4),[i,a]=(0,P.useState)(()=>localStorage.getItem(`groundwork-console.project`)??``);return(0,P.useEffect)(()=>{t?.length&&!t.some(e=>e.name===i)&&a(t[0].name)},[t,i]),(0,P.useEffect)(()=>{i&&localStorage.setItem(`groundwork-console.project`,i)},[i]),(0,V.jsx)(za.Provider,{value:{projects:t??[],current:i,setCurrent:a,error:n,refresh:r},children:e})}var Va=()=>(0,P.useContext)(za),Ha=(0,P.createContext)({runs:[],running:0,refresh:()=>{}});function Ua({children:e}){let{data:t,refresh:n}=J(`/runs?limit=100`),[r,i]=(0,P.useState)([]);(0,P.useEffect)(()=>{t&&i(t.runs)},[t]),(0,P.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,V.jsx)(Ha.Provider,{value:{runs:r,running:a,refresh:n},children:e})}var Wa=()=>(0,P.useContext)(Ha),Ga=`groundwork-console.recent`,Ka=()=>{try{return JSON.parse(localStorage.getItem(Ga)??`[]`)}catch{return[]}};function qa(){let{projects:e,current:t,setCurrent:n,refresh:r}=Va(),[i,a]=(0,P.useState)(!1),[o,s]=(0,P.useState)(!1),[c,l]=(0,P.useState)(``),[u,d]=(0,P.useState)(Ka),f=(0,P.useRef)(null);(0,P.useEffect)(()=>{t&&d(e=>{let n=[t,...e.filter(e=>e!==t)].slice(0,3);return localStorage.setItem(Ga,JSON.stringify(n)),n})},[t]),(0,P.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,V.jsxs)(`div`,{ref:f,className:`relative flex items-center gap-0.5 whitespace-nowrap`,children:[p.map(e=>(0,V.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,V.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,V.jsx)(`span`,{className:`text-tan`,children:`▾`})]}),i&&(0,V.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,V.jsx)(`div`,{className:`p-2 border-b border-sand`,children:(0,V.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,V.jsxs)(`div`,{className:`max-h-[50vh] overflow-auto`,children:[h.map(e=>(0,V.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,V.jsxs)(`span`,{className:`min-w-0`,children:[(0,V.jsx)(`span`,{className:`font-mono font-medium text-[13px]`,children:e.name}),e.room&&(0,V.jsxs)(`span`,{className:`ml-2 font-mono text-[12px] text-ink3`,children:[`#`,e.room]}),(0,V.jsx)(`div`,{className:`font-mono text-[11px] text-tan truncate`,children:e.path.replace(/^\/Users\/[^/]+/,`~`)})]}),(0,V.jsxs)(`span`,{className:`flex gap-1`,children:[e.behind&&(0,V.jsx)(K,{tone:`warn`,children:`behind`}),e.schema===`workstreams.v1`?(0,V.jsx)(K,{tone:`ok`,children:`v1`}):e.schema?(0,V.jsx)(K,{tone:`warn`,children:e.schema.replace(`workstreams.`,``)}):(0,V.jsx)(K,{tone:`outline`,children:`no seam`})]})]},e.name)),h.length===0&&(0,V.jsx)(`div`,{className:`px-3 py-3 text-[13px] text-umber`,children:`no match`})]}),(0,V.jsxs)(`div`,{className:`p-2 border-t border-sand flex justify-between items-center`,children:[(0,V.jsxs)(`span`,{className:`text-[12px] text-umber font-mono`,children:[e.length,` projects · groundwork-console.config.json`]}),(0,V.jsx)(q,{size:`sm`,tone:`primary`,onClick:()=>{s(!0),a(!1)},children:`+ Add project`})]})]}),o&&(0,V.jsx)(Ya,{onClose:()=>{s(!1),r()}})]})}var Ja=`/api`;function Ya({onClose:e}){let[t,n]=(0,P.useState)(``),[r,i]=(0,P.useState)(`~/workspace/`),[a,o]=(0,P.useState)(``),[s,c]=(0,P.useState)(null),[l,u]=(0,P.useState)(null),[d,f]=(0,P.useState)(!1),p=async()=>{c(await Fa(`/projects/validate`,{path:r}))},[m,h]=(0,P.useState)([]),[g,_]=(0,P.useState)(!1);(0,P.useEffect)(()=>{let e=setTimeout(async()=>{try{let e=await fetch(`${Ja}/projects/browse?prefix=${encodeURIComponent(r)}`);h((await e.json()).dirs??[])}catch{h([])}},150);return()=>clearTimeout(e)},[r]),(0,P.useEffect)(()=>{if(!g){let e=r.replace(/\/+$/,``).split(`/`).pop()??``;e&&!e.startsWith(`~`)&&n(e.toLowerCase().replace(/[^a-z0-9-_]/g,`-`))}},[r,g]);let v=J(`/bus/rooms`,6e4).data??[];return(0,P.useEffect)(()=>{!a&&t&&v.some(e=>e.room===t)&&o(t)},[t,v,a]),(0,V.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,V.jsxs)(`div`,{className:`w-[520px] bg-paper border border-sand rounded-kit shadow-panel`,children:[(0,V.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:[Ca.home(),` Add project`]}),(0,V.jsxs)(`div`,{className:`p-4 grid gap-3 text-[13px]`,children:[(0,V.jsxs)(`label`,{className:`grid gap-1`,children:[(0,V.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Name`}),(0,V.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,V.jsxs)(`label`,{className:`grid gap-1`,children:[(0,V.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Repo path (must exist; ideally has docs/ with a seam)`}),(0,V.jsxs)(`div`,{className:`flex gap-2`,children:[(0,V.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,V.jsx)(q,{size:`sm`,onClick:p,children:`Check`})]}),(0,V.jsx)(`datalist`,{id:`gwc-dirs`,children:m.map(e=>(0,V.jsx)(`option`,{value:e.path,children:e.registered?`already registered`:e.hasDocs?`docs/ ✓`:e.isGit?`git`:``},e.path))})]}),s&&(s.ok?(0,V.jsxs)(`div`,{className:`flex gap-1.5 flex-wrap items-center`,children:[(0,V.jsx)(K,{tone:`ok`,children:`exists`}),s.isGit&&(0,V.jsx)(K,{tone:`ok`,children:`git`}),s.hasDocs?(0,V.jsx)(K,{tone:`ok`,children:`docs/`}):(0,V.jsx)(K,{tone:`warn`,children:`no docs/ — run groundwork init`}),(s.hasSeam??[]).map(e=>(0,V.jsx)(K,{tone:`ok`,children:e},e))]}):(0,V.jsx)(`div`,{className:`text-brick`,children:s.reason})),(0,V.jsxs)(`label`,{className:`grid gap-1`,children:[(0,V.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,V.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,V.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,V.jsx)(`code`,{children:`join_room`}),` once bus writes are on) — the console only records the link.`]}),(0,V.jsx)(`datalist`,{id:`gwc-rooms`,children:v.map(e=>(0,V.jsx)(`option`,{value:e.room},e.room))})]}),l&&(0,V.jsx)(`div`,{className:`text-brick`,children:l})]}),(0,V.jsxs)(`div`,{className:`px-4 py-3 border-t border-sand flex justify-end gap-2`,children:[(0,V.jsx)(q,{size:`sm`,onClick:e,children:`Cancel`}),(0,V.jsx)(q,{size:`sm`,tone:`primary`,onClick:async()=>{f(!0),u(null);try{let n=await Fa(`/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 Xa(){let{data:e,refresh:t}=J(`/admin/seam-writes`,1e4),[n,r]=(0,P.useState)(!1),i=!!e?.enabled,a=async e=>{r(!0);try{await Fa(`/admin/seam-writes`,{enabled:e}),t()}finally{r(!1)}};return(0,V.jsx)(V.Fragment,{children:(0,V.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 Za(){let{data:e,refresh:t}=J(`/admin/bus-writes`,1e4),[n,r]=(0,P.useState)(!1),i=!!e?.enabled,a=async e=>{r(!0);try{await Fa(`/admin/bus-writes`,{enabled:e}),t()}finally{r(!1)}};return(0,V.jsx)(V.Fragment,{children:(0,V.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 Qa=[{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`}],$a=(0,P.createContext)({items:[],unseen:0,seenAt:0,markSeen:()=>{},muted:new Set,toggleMute:()=>{},toasts:[],dismissToast:()=>{},browserPerm:`default`,askBrowser:()=>{}}),eo=`groundwork-console.notify.seenAt`,to=`groundwork-console.notify.muted`;function no({children:e}){let{data:t}=J(`/notifications?limit=100`),[n,r]=(0,P.useState)([]),[i,a]=(0,P.useState)(()=>Number(localStorage.getItem(eo)??0)),[o,s]=(0,P.useState)(()=>new Set(JSON.parse(localStorage.getItem(to)??`[]`))),[c,l]=(0,P.useState)([]),[u,d]=(0,P.useState)(typeof Notification>`u`?`unsupported`:Notification.permission),f=(0,P.useRef)(o);f.current=o,(0,P.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,P.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,V.jsx)($a.Provider,{value:{items:n,unseen:p,seenAt:i,markSeen:()=>{let e=Date.now();a(e),localStorage.setItem(eo,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(to,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 ro=()=>(0,P.useContext)($a),Y={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 oo(){let{items:e,unseen:t,seenAt:n,markSeen:r,muted:i,toggleMute:a,browserPerm:o,askBrowser:s}=ro(),[c,l]=(0,P.useState)(!1),[u,d]=(0,P.useState)(!1),f=(0,P.useRef)(null);(0,P.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}=Wa(),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,V.jsxs)(`div`,{ref:f,className:`relative ml-2 shrink-0`,children:[(0,V.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:[Ca.needsDavid({size:16}),t>0&&(0,V.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,V.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,V.jsxs)(`div`,{className:`flex items-center justify-between px-3 py-2 border-b border-sand`,children:[(0,V.jsx)(`span`,{className:`font-semibold text-[13px] uppercase tracking-[.08em] text-umber`,children:`Notifications`}),(0,V.jsxs)(`div`,{className:`flex gap-1.5 items-center`,children:[(0,V.jsx)(q,{size:`sm`,tone:`ghost`,onClick:()=>d(e=>!e),"aria-pressed":u,children:`prefs`}),(0,V.jsx)(H,{to:`/ops/runs`,onClick:()=>l(!1),className:`font-mono text-[12px]`,children:`runs →`})]})]}),u&&(0,V.jsxs)(`div`,{className:`px-3 py-2 border-b border-sand grid gap-1 text-[12px]`,children:[Qa.map(e=>(0,V.jsxs)(`label`,{className:`flex items-center gap-2 cursor-pointer`,children:[(0,V.jsx)(`input`,{type:`checkbox`,checked:!i.has(e.kind),onChange:()=>a(e.kind)}),(0,V.jsx)(K,{tone:Y[e.kind],children:io[e.kind]}),(0,V.jsx)(`span`,{className:`text-umber`,children:e.label})]},e.kind)),(0,V.jsxs)(`div`,{className:`mt-1 flex items-center gap-2 text-umber`,children:[`Browser notifications when the tab is hidden: `,o===`unsupported`?(0,V.jsx)(`span`,{className:`text-tan`,children:`unsupported`}):o===`granted`?(0,V.jsx)(K,{tone:`ok`,children:`on`}):o===`denied`?(0,V.jsx)(K,{tone:`bad`,children:`blocked in browser`}):(0,V.jsx)(q,{size:`sm`,onClick:s,children:`Enable`})]}),(0,V.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,V.jsxs)(`div`,{className:`border-b border-sand`,children:[(0,V.jsxs)(`div`,{className:`flex items-center justify-between px-3 pt-2 pb-1`,children:[(0,V.jsxs)(`span`,{className:`font-mono text-[10px] uppercase tracking-[.1em] text-tan`,children:[`runs · last `,h.length]}),(0,V.jsx)(H,{to:`/ops/runs`,onClick:()=>l(!1),className:`font-mono text-[11px] text-ember-deep`,children:`all runs →`})]}),h.map(e=>(0,V.jsxs)(H,{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,V.jsx)(K,{tone:g(e.status),children:e.status}),(0,V.jsxs)(`span`,{className:`min-w-0 truncate text-[12px]`,title:e.label,children:[e.label,e.project&&(0,V.jsxs)(`span`,{className:`font-mono text-[10px] text-tan`,children:[` · `,e.project]})]}),(0,V.jsx)(`span`,{className:`font-mono text-[11px] text-ink3 whitespace-nowrap`,children:ao(e.endedAt??e.startedAt)})]},e.id))]}),(0,V.jsxs)(`div`,{className:`max-h-[60vh] overflow-auto`,children:[p.length===0&&(0,V.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,V.jsxs)(H,{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,V.jsx)(`span`,{className:`pt-0.5`,children:(0,V.jsx)(K,{tone:Y[e.kind],children:io[e.kind]})}),(0,V.jsxs)(`span`,{className:`min-w-0`,children:[(0,V.jsx)(`span`,{className:`block text-[13px] font-semibold truncate`,children:e.title}),e.body&&(0,V.jsx)(`span`,{className:`block text-[12px] text-umber line-clamp-2`,children:e.body}),(e.project||e.from)&&(0,V.jsxs)(`span`,{className:`block font-mono text-[11px] text-tan`,children:[e.project??``,e.from?` · ${e.from}`:``]})]}),(0,V.jsx)(`span`,{className:`font-mono text-[11px] text-ink3 whitespace-nowrap`,children:ao(e.ts)})]},e.id))]})]})]})}function so(){let{toasts:e,dismissToast:t}=ro();return e.length===0?null:(0,V.jsx)(`div`,{className:`fixed right-4 bottom-4 z-[70] grid gap-2 w-[380px] whitespace-normal text-left`,children:e.map(e=>(0,V.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,V.jsxs)(H,{to:e.link,onClick:()=>t(e.id),className:`min-w-0 hover:no-underline text-inherit`,children:[(0,V.jsxs)(`span`,{className:`block font-semibold text-[13px] truncate`,children:[(0,V.jsx)(K,{tone:Y[e.kind],children:io[e.kind]}),` `,(0,V.jsx)(`span`,{className:`ml-1`,children:e.title})]}),e.body&&(0,V.jsx)(`span`,{className:`block text-[12px] text-umber line-clamp-3 mt-0.5`,children:e.body})]}),(0,V.jsx)(`button`,{onClick:()=>t(e.id),className:`border-0 bg-transparent text-tan cursor-pointer self-start`,"aria-label":`dismiss`,children:`✕`})]},e.id))})}var co={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`},lo={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`},uo=e=>{if(e<16)return co[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)})`},fo=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 po(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&&fo(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,V.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(co[r])n.color=co[r];else if(lo[r])n.bg=lo[r];else if(r===38||r===48){let i=r===38;if(t[e+1]===5){let r=uo(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 mo={};function ho(e){let t=mo[e];if(t)return t;t=mo[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 go(e,t){typeof t!=`string`&&(t=go.defaultChars);let n=ho(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})}go.defaultChars=`;/?:@&=+$,#`,go.componentChars=``;var _o={};function vo(e){let t=_o[e];if(t)return t;t=_o[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 yo(e,t,n){typeof t!=`string`&&(n=t,t=yo.defaultChars),n===void 0&&(n=!0);let r=vo(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}yo.defaultChars=`;/?:@&=+$,-_.!~*'()#`,yo.componentChars=`-_.!~*'()`;function bo(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 xo(){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 So=/^([a-z0-9.+-]+:)/i,Co=/:[0-9]*$/,wo=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,To=[`%`,`/`,`?`,`;`,`#`,`'`,`{`,`}`,`|`,`\\`,`^`,"`",`<`,`>`,`"`,"`",` `,`\r`,`
11
- `,` `],Eo=[`/`,`?`,`#`],Do=255,Oo=/^[+a-z0-9A-Z_-]{0,63}$/,ko=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Ao={javascript:!0,"javascript:":!0},jo={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Mo(e,t){if(e&&e instanceof xo)return e;let n=new xo;return n.parse(e,t),n}xo.prototype.parse=function(e,t){let n,r,i,a=e;if(a=a.trim(),!t&&e.split(`#`).length===1){let e=wo.exec(a);if(e)return this.pathname=e[1],e[2]&&(this.search=e[2]),this}let o=So.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&&Ao[o])&&(a=a.substr(2),this.slashes=!0)),!Ao[o]&&(i||o&&!jo[o])){let e=-1;for(let t=0;t<Eo.length;t++)r=a.indexOf(Eo[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<To.length;t++)r=a.indexOf(To[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(Oo)){let r=``;for(let e=0,t=n.length;e<t;e++)n.charCodeAt(e)>127?r+=`x`:r+=n[e];if(!r.match(Oo)){let r=e.slice(0,t),i=e.slice(t+1),o=n.match(ko);o&&(r.push(o[1]),i.unshift(o[2])),i.length&&(a=i.join(`.`)+a),this.hostname=r.join(`.`);break}}}}this.hostname.length>Do&&(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),jo[n]&&this.hostname&&!this.pathname&&(this.pathname=``),this},xo.prototype.parseHost=function(e){let t=Co.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 No=s({decode:()=>go,encode:()=>yo,format:()=>bo,parse:()=>Mo}),Po=s({Any:()=>Fo,Cc:()=>Io,Cf:()=>Lo,P:()=>Ro,S:()=>zo,Z:()=>Bo}),Fo=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Io=/[\0-\x1F\x7F-\x9F]/,Lo=/[\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]/,Ro=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\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]/,zo=/[\$\+<->\^`\|~\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]/,Bo=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,Vo=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 Ho(e){return e>=55296&&e<=57343||e>1114111?65533:Vo.get(e)??e}function Uo(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 Wo=Uo(`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`),Go;(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`})(Go||={});var Ko;(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`})(Ko||={});var qo=32;function Jo(e){return e>=Ko.ZERO&&e<=Ko.NINE}function Yo(e){return e>=Ko.UPPER_A&&e<=Ko.UPPER_F||e>=Ko.LOWER_A&&e<=Ko.LOWER_F}function Xo(e){return e>=Ko.UPPER_A&&e<=Ko.UPPER_Z||e>=Ko.LOWER_A&&e<=Ko.LOWER_Z||Jo(e)}function Zo(e){return e===Ko.EQUALS||Xo(e)}var Qo;(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`})(Qo||={});var $o;(function(e){e[e.Legacy=0]=`Legacy`,e[e.Strict=1]=`Strict`,e[e.Attribute=2]=`Attribute`})($o||={});var es=class{decodeTree;emitCodePoint;errors;constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n}state=Qo.EntityStart;consumed=1;result=0;treeIndex=0;excess=1;decodeMode=$o.Strict;runConsumed=0;startEntity(e){this.decodeMode=e,this.state=Qo.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1,this.runConsumed=0}write(e,t){switch(this.state){case Qo.EntityStart:return e.charCodeAt(t)===Ko.NUM?(this.state=Qo.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=Qo.NamedEntity,this.stateNamedEntity(e,t));case Qo.NumericStart:return this.stateNumericStart(e,t);case Qo.NumericDecimal:return this.stateNumericDecimal(e,t);case Qo.NumericHex:return this.stateNumericHex(e,t);case Qo.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|qo)===Ko.LOWER_X?(this.state=Qo.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=Qo.NumericDecimal,this.stateNumericDecimal(e,t))}stateNumericHex(e,t){for(;t<e.length;){let n=e.charCodeAt(t);if(Jo(n)||Yo(n)){let e=n<=Ko.NINE?n-Ko.ZERO:(n|qo)-Ko.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(Jo(n))this.result=this.result*10+(n-Ko.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===Ko.SEMI)this.consumed+=1;else if(this.decodeMode===$o.Strict)return 0;return this.emitCodePoint(Ho(this.result),this.consumed),this.errors&&(e!==Ko.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){let{decodeTree:n}=this,r=n[this.treeIndex],i=(r&Go.VALUE_LENGTH)>>14;for(;t<e.length;){if(i===0&&(r&Go.FLAG13)!==0){let a=(r&Go.BRANCH_LENGTH)>>7;if(this.runConsumed===0){let n=r&Go.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&Go.VALUE_LENGTH)>>14}if(t>=e.length)break;let a=e.charCodeAt(t);if(a===Ko.SEMI&&i!==0&&(r&Go.FLAG13)!==0)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);if(this.treeIndex=ns(n,r,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return this.result===0||this.decodeMode===$o.Attribute&&(i===0||Zo(a))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],i=(r&Go.VALUE_LENGTH)>>14,i!==0){if(a===Ko.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==$o.Strict&&(r&Go.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]&Go.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]&~(Go.VALUE_LENGTH|Go.FLAG13):r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){switch(this.state){case Qo.NamedEntity:return this.result!==0&&(this.decodeMode!==$o.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Qo.NumericDecimal:return this.emitNumericEntity(0,2);case Qo.NumericHex:return this.emitNumericEntity(0,3);case Qo.NumericStart:return this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Qo.EntityStart:return 0}}};function ts(e){let t=``,n=new es(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 ns(e,t,n,r){let i=(t&Go.BRANCH_LENGTH)>>7,a=t&Go.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 rs=ts(Wo);function is(e){return rs(e,$o.Strict)}var as=class{src_Any=Fo.source;src_Cc=Io.source;src_Z=Bo.source;src_P=Ro.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`)}},os={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)},ss={"http:":os,"https:":os,"ftp:":os,"//":{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)}},cs=`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`,ls=`biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф`;function us(){let e=ls.split(`|`);return cs.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 ds={fuzzyLink:!1,fuzzyEmail:!0,fuzzyIP:!1,"---":!1,tlds:us(),urlAuth:!1,maxLength:1e4},fs=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}},ps=class{__opts__;__schemas__;re;constructor(e={}){let{rebuilder:t,...n}=e;this.__opts__={...ds,...n},this.__schemas__={...ss},this.re=t||new as,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 fs(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 fs(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}`)}},ms=2147483647,hs=36,gs=1,_s=26,vs=38,ys=700,bs=72,xs=128,Ss=`-`,Cs=/^xn--/,ws=/[^\0-\x7F]/,Ts=/[\x2E\u3002\uFF0E\uFF61]/g,Es={overflow:`Overflow: input needs wider integers to process`,"not-basic":`Illegal input >= 0x80 (not a basic code point)`,"invalid-input":`Invalid input`},Ds=35,Os=Math.floor,ks=String.fromCharCode;function As(e){throw RangeError(Es[e])}function js(e,t){let n=[],r=e.length;for(;r--;)n[r]=t(e[r]);return n}function Ms(e,t){let n=e.split(`@`),r=``;n.length>1&&(r=n[0]+`@`,e=n[1]),e=e.replace(Ts,`.`);let i=js(e.split(`.`),t).join(`.`);return r+i}function Ns(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 Ps=e=>String.fromCodePoint(...e),Fs=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:hs},Is=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},Ls=function(e,t,n){let r=0;for(e=n?Os(e/ys):e>>1,e+=Os(e/t);e>455;r+=hs)e=Os(e/Ds);return Os(r+36*e/(e+vs))},Rs=function(e){let t=[],n=e.length,r=0,i=xs,a=bs,o=e.lastIndexOf(Ss);o<0&&(o=0);for(let n=0;n<o;++n)e.charCodeAt(n)>=128&&As(`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=hs;;i+=hs){s>=n&&As(`invalid-input`);let o=Fs(e.charCodeAt(s++));o>=hs&&As(`invalid-input`),o>Os((ms-r)/t)&&As(`overflow`),r+=o*t;let c=i<=a?gs:i>=a+_s?_s:i-a;if(o<c)break;let l=hs-c;t>Os(ms/l)&&As(`overflow`),t*=l}let c=t.length+1;a=Ls(r-o,c,o==0),Os(r/c)>ms-i&&As(`overflow`),i+=Os(r/c),r%=c,t.splice(r++,0,i)}return String.fromCodePoint(...t)},zs=function(e){let t=[];e=Ns(e);let n=e.length,r=xs,i=0,a=bs;for(let n of e)n<128&&t.push(ks(n));let o=t.length,s=o;for(o&&t.push(Ss);s<n;){let n=ms;for(let t of e)t>=r&&t<n&&(n=t);let c=s+1;n-r>Os((ms-i)/c)&&As(`overflow`),i+=(n-r)*c,r=n;for(let n of e)if(n<r&&++i>ms&&As(`overflow`),n===r){let e=i;for(let n=hs;;n+=hs){let r=n<=a?gs:n>=a+_s?_s:n-a;if(e<r)break;let i=e-r,o=hs-r;t.push(ks(Is(r+i%o,0))),e=Os(i/o)}t.push(ks(Is(e,0))),a=Ls(i,c,s===o),i=0,++s}++i,++r}return t.join(``)},Bs={version:`2.3.1`,ucs2:{decode:Ns,encode:Ps},decode:Rs,encode:zs,toASCII:function(e){return Ms(e,function(e){return ws.test(e)?`xn--`+zs(e):e})},toUnicode:function(e){return Ms(e,function(e){return Cs.test(e)?Rs(e.slice(4).toLowerCase()):e})}},Vs=Object.defineProperty,Hs=(e,t)=>{let n={};for(var r in e)Vs(n,r,{get:e[r],enumerable:!0});return t||Vs(n,Symbol.toStringTag,{value:`Module`}),n},Us=Hs({arrayReplaceAt:()=>Gs,asciiTrim:()=>mc,callable:()=>Ws,escapeHtml:()=>ic,escapeRE:()=>oc,fromCodePoint:()=>qs,isMdAsciiPunct:()=>dc,isPunctChar:()=>lc,isPunctCharCode:()=>uc,isSpace:()=>sc,isValidEntityCode:()=>Ks,isWhiteSpace:()=>cc,lib:()=>hc,normalizeReference:()=>fc,unescapeAll:()=>$s,unescapeMd:()=>Qs});function Ws(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 Gs(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function Ks(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 qs(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 Js=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,Ys=RegExp(`${Js.source}|&([a-z#][a-z0-9]{1,31});`,`gi`),Xs=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function Zs(e,t){if(t.charCodeAt(0)===35&&Xs.test(t)){let n=t[1].toLowerCase()===`x`?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return Ks(n)?qs(n):e}let n=is(e);return n===e?e:n}function Qs(e){return e.indexOf(`\\`)<0?e:e.replace(Js,`$1`)}function $s(e){return e.indexOf(`\\`)<0&&e.indexOf(`&`)<0?e:e.replace(Ys,function(e,t,n){return t||Zs(e,n)})}var ec=/[&<>"]/,tc=/[&<>"]/g,nc={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`};function rc(e){return nc[e]}function ic(e){return ec.test(e)?e.replace(tc,rc):e}var ac=/[.?*+^$[\]\\(){}|-]/g;function oc(e){return e.replace(ac,`\\$&`)}function sc(e){switch(e){case 9:case 32:return!0}return!1}function cc(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 lc(e){return Ro.test(e)||zo.test(e)}function uc(e){return lc(qs(e))}function dc(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 fc(e){return e=e.trim().replace(/\s+/g,` `),e.toLowerCase().toUpperCase()}function pc(e){return e===32||e===9||e===10||e===13}function mc(e){let t=0;for(;t<e.length&&pc(e.charCodeAt(t));t++);let n=e.length-1;for(;n>=t&&pc(e.charCodeAt(n));n--);return e.slice(t,n+1)}var hc={mdurl:No,ucmicro:Po};function gc(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 _c(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=$s(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=$s(e.slice(t,i)),a.pos=i,a.ok=!0,a)}function vc(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+=$s(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+=$s(e.slice(t,a)),o}var yc=Hs({parseLinkDestination:()=>_c,parseLinkLabel:()=>gc,parseLinkTitle:()=>vc});function bc(e){"@babel/helpers - typeof";return bc=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},bc(e)}function xc(e,t){if(bc(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(bc(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Sc(e){var t=xc(e,`string`);return bc(t)==`symbol`?t:t+``}function X(e,t,n){return(t=Sc(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Cc=class{constructor(e,t,n){X(this,`map`,null),X(this,`level`,0),X(this,`children`,null),X(this,`content`,``),X(this,`markup`,``),X(this,`info`,``),X(this,`block`,!1),X(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}`}},wc=class{constructor(){X(this,`__rules__`,[]),X(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]||[]}},Tc={};Tc.code_inline=function(e,t,n,r,i){let a=e[t];return`<code${i.renderAttrs(a)}>${ic(a.content)}</code>`},Tc.code_block=function(e,t,n,r,i){let a=e[t];return`<pre${i.renderAttrs(a)}><code>${ic(e[t].content)}</code></pre>\n`},Tc.fence=function(e,t,n,r,i){let a=e[t],o=a.info?$s(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)||ic(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`},Tc.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)},Tc.hardbreak=function(e,t,n){return n.xhtmlOut?`<br />
13
- `:`<br>
14
- `},Tc.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?`<br />
15
- `:`<br>
16
- `:`
17
- `},Tc.text=function(e,t){return ic(e[t].content)},Tc.html_block=function(e,t){return e[t].content},Tc.html_inline=function(e,t){return e[t].content};var Ec=class{constructor(){X(this,`rules`,Object.assign({},Tc))}renderAttrs(e){let t,n,r;if(!e.attrs)return``;for(r=``,t=0,n=e.attrs.length;t<n;t++)r+=` ${ic(e.attrs[t][0])}="${ic(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}},Dc=class{constructor(e,t,n){X(this,`tokens`,[]),X(this,`inlineMode`,!1),X(this,`Token`,Cc),this.src=e,this.env=n,this.md=t}},Oc=/\r\n?|\n/g,kc=/\0/g;function Ac(e){let t;t=e.src.replace(Oc,`
21
- `),t=t.replace(kc,`�`),e.src=t}function jc(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 Mc(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 Nc(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 Pc(e){return/^<a[>\s]/i.test(e)}function Fc(e){return/^<\/a\s*>/i.test(e)}function Ic(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`&&(Pc(o.content)&&i>0&&i--,Fc(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=Gs(r,a,c)}}}}var Lc=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,Rc=/\((c|tm|r)\)/i,zc=/\((c|tm|r)\)/gi,Bc={c:`©`,r:`®`,tm:`™`};function Vc(e,t){return Bc[t.toLowerCase()]}function Hc(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(zc,Vc)),r.type===`link_open`&&r.info===`auto`&&t--,r.type===`link_close`&&r.info===`auto`&&t++}}function Uc(e){let t=0;for(let n=e.length-1;n>=0;n--){let r=e[n];r.type===`text`&&!t&&Lc.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 Wc(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type===`inline`&&(Rc.test(e.tokens[t].content)&&Hc(e.tokens[t].children),Lc.test(e.tokens[t].content)&&Uc(e.tokens[t].children))}var Gc=/['"]/,Kc=/['"]/g,qc=`’`;function Jc(e,t,n,r){e[t]||(e[t]=[]),e[t].push({pos:n,ch:r})}function Yc(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 Xc(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;){Kc.lastIndex=l;let o=Kc.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=dc(m)||uc(m),_=dc(h)||uc(h),v=cc(m),y=cc(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&&Jc(i,a,o.index,qc);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]),Jc(i,a,o.index,c),Jc(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&&Jc(i,a,o.index,qc)}}Object.keys(i).forEach(function(t){let n=Number(t);e[n].content=Yc(e[n].content,i[t])})}function Zc(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)e.tokens[t].type!==`inline`||!Gc.test(e.tokens[t].content)||Xc(e.tokens[t].children,e)}function Qc(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 $c(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&&Qc(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 el=[[`normalize`,Ac],[`block`,jc],[`strip_references`,Mc],[`inline`,Nc],[`linkify`,Ic],[`replacements`,Wc],[`smartquotes`,Zc],[`text_join`,$c]],tl=class{constructor(){X(this,`ruler`,new wc),X(this,`State`,Dc);for(let e=0;e<el.length;e++)this.ruler.push(el[e][0],el[e][1])}process(e){let t=this.ruler.getRules(``);for(let n=0,r=t.length;n<r;n++)t[n](e)}},nl=class{constructor(e,t,n,r){X(this,`bMarks`,[]),X(this,`eMarks`,[]),X(this,`tShift`,[]),X(this,`sCount`,[]),X(this,`bsCount`,[]),X(this,`blkIndent`,0),X(this,`line`,0),X(this,`lineMax`,0),X(this,`tight`,!1),X(this,`listIndent`,-1),X(this,`parentType`,`root`),X(this,`level`,0),X(this,`Token`,Cc),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(sc(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 Cc(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&&sc(this.src.charCodeAt(e));e++);return e}skipSpacesBack(e,t){if(e<=t)return e;for(;e>t;)if(!sc(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(sc(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(``)}},rl=65536;function il(e,t){let n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function al(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 ol(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&&!sc(s)||o===45&&sc(s))return!1;for(;a<e.eMarks[i];){let t=e.src.charCodeAt(a);if(t!==124&&t!==45&&t!==58&&!sc(t))return!1;a++}let c=il(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=il(e,t).trim(),c.indexOf(`|`)===-1||e.sCount[t]-e.blkIndent>=4)return!1;l=al(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=il(e,i).trim(),!c)||e.sCount[i]-e.blkIndent>=4||(l=al(c),l.length&&l[0]===``&&l.shift(),l.length&&l[l.length-1]===``&&l.pop(),y+=d-l.length,y>rl))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 sl(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 cl(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 ll(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(sc(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 ul(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&&!sc(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 dl(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&&!sc(e.src.charCodeAt(r))?-1:r}function fl(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),!sc(a))?-1:i}function pl(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 ml(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=fl(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=dl(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=fl(e,c),p<0)break;o=e.bMarks[c]+e.tShift[c]}else if(p=dl(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&&pl(e,h),!0}function hl(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(!sc(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(!sc(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&&sc(c.charCodeAt(i));)i++;if(i<a&&c.charCodeAt(i)!==10&&g)for(g=``,i=f,o=p;i<a&&sc(c.charCodeAt(i));)i++;if(i<a&&c.charCodeAt(i)!==10)return!1;let _=fc(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 gl=`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(`.`),_l=`<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^"'=<>\`\\x00-\\x20]+|'[^']*'|"[^"]*"))?)*\\s*\\/?>`,vl=`<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>`,yl=RegExp(`^(?:${_l}|${vl}|<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->|<[?][\\s\\S]*?[?]>|<![A-Za-z][^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)`),bl=RegExp(`^(?:${_l}|${vl})`),xl=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Za-z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[RegExp(`^</?(${gl.join(`|`)})(?=(\\s|/?>|$))`,`i`),/^$/,!0],[RegExp(`${bl.source}\\s*$`),/^$/,!1]];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||!e.md.options.html||e.src.charCodeAt(i)!==60)return!1;let o=e.src.slice(i,a),s=0;for(;s<xl.length&&!xl[s][0].test(o);s++);if(s===xl.length)return!1;if(r)return xl[s][2];let c=t+1,l=xl[s][1].test(``);if(!xl[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),xl[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 Cl(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&&!sc(o))return!1;if(r)return!0;a=e.skipSpacesBack(a,i);let c=e.skipCharsBack(a,35,i);c>i&&sc(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=mc(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 wl(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=mc(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 Tl(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=mc(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 El=[[`table`,ol,[`paragraph`,`reference`]],[`code`,sl],[`fence`,cl,[`paragraph`,`reference`,`blockquote`,`list`]],[`blockquote`,ll,[`paragraph`,`reference`,`blockquote`,`list`]],[`hr`,ul,[`paragraph`,`reference`,`blockquote`,`list`]],[`list`,ml,[`paragraph`,`reference`,`blockquote`]],[`reference`,hl],[`html_block`,Sl,[`paragraph`,`reference`,`blockquote`]],[`heading`,Cl,[`paragraph`,`reference`,`blockquote`]],[`lheading`,wl],[`paragraph`,Tl]],Dl=class{constructor(){X(this,`ruler`,new wc),X(this,`State`,nl);for(let e=0;e<El.length;e++)this.ruler.push(El[e][0],El[e][1],{alt:(El[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)}},Ol=class{constructor(e,t,n,r){X(this,`pos`,0),X(this,`level`,0),X(this,`pending`,``),X(this,`pendingLevel`,0),X(this,`cache`,{}),X(this,`backticks`,{}),X(this,`backticksScanned`,!1),X(this,`linkLevel`,0),X(this,`delimiters`,[]),X(this,`_prev_delimiters`,[]),X(this,`Token`,Cc),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 Cc(`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 Cc(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=dc(i)||uc(i),l=dc(s)||uc(s),u=cc(i),d=cc(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 kl(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 Al(e,t){let n=e.pos;for(;n<e.posMax&&!kl(e.src.charCodeAt(n));)n++;return n!==e.pos&&(t||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}var jl=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function Ml(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(jl);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 Nl(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&&sc(e.src.charCodeAt(n));)n++;return e.pos=n,!0}var Pl=[];for(let e=0;e<256;e++)Pl.push(0);`\\!"#$%&'()*+,./:;<=>?@[]^_\`{|}~-`.split(``).forEach(function(e){Pl[e.charCodeAt(0)]=1});function Fl(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),sc(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&&Pl[i]!==0?a:o,t.markup=o,t.info=`escape`}return e.pos=n+1,!0}function Z(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 Q(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 Ll(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 Rl={tokenize:Q,postProcess:Ll};function zl(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 Bl(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 Vl(e){let t=e.tokens_meta,n=e.tokens_meta.length;Bl(e,e.delimiters);for(let r=0;r<n;r++){let n=t[r]?.delimiters;n&&Bl(e,n)}}var Hl={tokenize:zl,postProcess:Vl};function Ul(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),!(!sc(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),!(!sc(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),!(!sc(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=fc(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 Wl(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),!(!sc(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),!(!sc(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),!(!sc(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=fc(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 Gl=/^([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])?)*)$/,Kl=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function ql(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(Kl.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(Gl.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 Jl(e){return/^<a[>\s]/i.test(e)}function Yl(e){return/^<\/a\s*>/i.test(e)}function Xl(e){let t=e|32;return t>=97&&t<=122}function Zl(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&&!Xl(i))return!1;let a=e.src.slice(r).match(yl);if(!a)return!1;if(!t){let t=e.push(`html_inline`,``,0);t.content=a[0],Jl(t.content)&&e.linkLevel++,Yl(t.content)&&e.linkLevel--}return e.pos+=a[0].length,!0}var Ql=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,$l=/^&([a-z][a-z0-9]{1,31});/i;function eu(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(Ql);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=Ks(t)?qs(t):qs(65533),n.markup=r[0],n.info=`entity`}return e.pos+=r[0].length,!0}}else{let r=e.src.slice(n).match($l);if(r){let n=is(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 tu(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 nu(e){let t=e.tokens_meta,n=e.tokens_meta.length;tu(e.delimiters);for(let e=0;e<n;e++){let n=t[e]?.delimiters;n&&tu(n)}}function ru(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 iu=[[`text`,Al],[`linkify`,Ml],[`newline`,Nl],[`escape`,Fl],[`backticks`,Z],[`strikethrough`,Rl.tokenize],[`emphasis`,Hl.tokenize],[`link`,Ul],[`image`,Wl],[`autolink`,ql],[`html_inline`,Zl],[`entity`,eu]],au=[[`balance_pairs`,nu],[`strikethrough`,Rl.postProcess],[`emphasis`,Hl.postProcess],[`fragments_join`,ru]],ou=class{constructor(){X(this,`ruler`,new wc),X(this,`ruler2`,new wc),X(this,`State`,Ol);for(let e=0;e<iu.length;e++)this.ruler.push(iu[e][0],iu[e][1]);for(let e=0;e<au.length;e++)this.ruler2.push(au[e][0],au[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)}},su={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`]}}}},cu=/^(vbscript|javascript|file|data):/,lu=/^data:image\/(gif|png|jpeg|webp);/,uu=[`http:`,`https:`,`mailto:`],du=class{validateLink(e){let t=e.trim().toLowerCase();return!cu.test(t)||lu.test(t)}normalizeLink(e){let t=Mo(e,!0);if(t.hostname&&(!t.protocol||uu.indexOf(t.protocol)>=0))try{t.hostname=Bs.toASCII(t.hostname)}catch{}return yo(bo(t))}normalizeLinkText(e){let t=Mo(e,!0);if(t.hostname&&(!t.protocol||uu.indexOf(t.protocol)>=0))try{t.hostname=Bs.toUnicode(t.hostname)}catch{}return go(bo(t),go.defaultChars+`%`)}constructor(...e){X(this,`inline`,new ou),X(this,`block`,new Dl),X(this,`core`,new tl),X(this,`renderer`,new Ec),X(this,`linkify`,new ps),X(this,`utils`,Us),X(this,`helpers`,Object.assign({},yc));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=su[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)}};X(du,`Token`,Cc),X(du,`Ruler`,wc),X(du,`Renderer`,Ec),X(du,`ParserCore`,tl),X(du,`StateCore`,Dc),X(du,`ParserBlock`,Dl),X(du,`StateBlock`,nl),X(du,`ParserInline`,ou),X(du,`StateInline`,Ol);var fu=new(Ws(du))({html:!1,linkify:!0,typographer:!1}),pu=0;fu.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+pu)),t.attrSet(`data-line-end`,String(t.map[1]+1+pu)))});var mu=e=>e.toLowerCase().replace(/<[^>]+>/g,``).replace(/[`*_~]/g,``).replace(/[^\p{L}\p{N}\s-]/gu,``).trim().replace(/\s+/g,`-`).slice(0,80)||`section`,hu=new Map;fu.renderer.rules.heading_open=(e,t,n,r,i)=>{let a=e[t+1],o=mu(a?.type===`inline`?a.content:``),s=hu.get(o)??0;return hu.set(o,s+1),s&&(o=`${o}-${s+1}`),e[t].attrSet(`id`,o),i.renderToken(e,t,n)};var gu=fu.renderer.rules.fence;fu.renderer.rules.fence=(e,t,n,r,i)=>{let a=e[t],o=a.map?` data-line="${a.map[0]+1+pu}" data-line-end="${a.map[1]+1+pu}"`:``;return a.info.trim()===`mermaid`?`<div class="mermaid"${o}>${fu.utils.escapeHtml(a.content)}</div>`:gu(e,t,n,r,i).replace(/^<pre/,`<pre${o}`)};var _u=new Map;function vu(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 yu(e){let t=_u.get(e);if(t)return t;let{meta:n,body:r}=vu(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>${fu.utils.escapeHtml(e)}</th><td>${fu.utils.escapeHtml(t)}</td></tr>`).join(``)}</table></div>`:``;pu=i,hu=new Map;let o=a+fu.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 _u.size>200&&_u.clear(),_u.set(e,o),o}var bu={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 xu(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 Su(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=xu(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 Cu(e,t){if(t.length===0)return e;let n=document.createElement(`div`);return n.innerHTML=e,Su(n,t),n.innerHTML}var wu=(0,P.memo)(function({html:e,className:t,onOver:n,onLeave:r}){let i=(0,P.useRef)(null);return(0,P.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 ai(async()=>{let{default:e}=await import(`./mermaid.core-DqjaFy6t.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,...bu}),await e.run({nodes:t}))}),()=>{n=!0}},[e]),(0,V.jsx)(`div`,{ref:i,className:`md ${t}`,dangerouslySetInnerHTML:{__html:e},onMouseOver:n,onMouseLeave:r})});function Tu({source:e,changes:t=[],className:n=``}){let r=yu(e),[i,a]=(0,P.useState)(null),o=(0,P.useMemo)(()=>Cu(r,t),[r,t]),s=(0,P.useRef)(t);s.current=t;let c=(0,P.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,P.useCallback)(()=>a(null),[]);return(0,V.jsxs)(`div`,{className:`relative`,children:[(0,V.jsx)(wu,{html:o,className:n,onOver:c,onLeave:l}),i&&(0,V.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,V.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,V.jsx)(`b`,{children:i.change.kind===`uncommitted`?`uncommitted`:`last commit`}),(0,V.jsx)(`span`,{className:`text-ink3 truncate`,children:i.change.label}),(0,V.jsxs)(`span`,{className:`ml-auto text-tan`,children:[`@@ +`,i.hunk.newStart,`,`,i.hunk.newLines]})]}),(0,V.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,V.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 Eu(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 Du=/\[\[([^\]|]+)(?:\|[^\]]+)?\]\](?::\d+)?|(?:(?:~\/|\.{1,2}\/)?(?:[\w.-]+\/)+)?[\w.-]+\.md(?::\d+)?/g;function Ou(e,t,n){return e==null||typeof e==`boolean`||typeof e==`number`?e:typeof e==`string`?ku(e,t,n):Array.isArray(e)?e.map((e,r)=>{let i=Ou(e,t,n);return(0,P.isValidElement)(i)&&i.key==null?(0,P.cloneElement)(i,{key:r}):i}):(0,P.isValidElement)(e)&&e.props.children!=null?(0,P.cloneElement)(e,void 0,Ou(e.props.children,t,n)):e}function ku(e,t,n){if(Du.lastIndex=0,!Du.test(e))return e;Du.lastIndex=0;let r=[],i=0,a,o=0;for(;a=Du.exec(e);){a.index>i&&r.push(e.slice(i,a.index));let s=a[0],c=Eu(s,t);c?r.push((0,V.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 Au=(0,P.createContext)({files:[],open:()=>{},linkify:e=>e}),ju=()=>(0,P.useContext)(Au);function Mu({children:e}){let{current:t}=Va(),n=ir(),[r,i]=(0,P.useState)(null),a=J(t?`/projects/${t}/docs`:null,3e4).data?.files??[],o=J(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,P.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,P.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,V.jsxs)(Au.Provider,{value:{files:a,open:s,linkify:(e,n)=>Ou(e,a,e=>s(e,n||t))},children:[e,r&&(0,V.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,V.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,V.jsxs)(`div`,{className:`px-4 py-2.5 border-b border-sand flex items-center gap-2 min-w-0`,children:[(0,V.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,V.jsxs)(`span`,{className:`ml-auto flex items-center gap-1.5 shrink-0`,children:[(0,V.jsx)(q,{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,V.jsx)(q,{size:`sm`,onClick:()=>i(null),children:`Close (Esc)`})]})]}),(0,V.jsxs)(`div`,{className:`overflow-auto px-6 py-4`,children:[o.loading&&(0,V.jsx)(`div`,{className:`text-[13px] text-umber`,children:`loading…`}),o.error&&(0,V.jsxs)(`div`,{className:`text-[13px] text-brick`,children:[`Could not load — not in `,r.project,`’s docs/? `,o.error]}),o.data&&(0,V.jsx)(Tu,{source:o.data.source})]})]})})]})}var Nu=[`circle`,`square`,`diamond`,`hexagon`,`triangle`,`shield`,`leaf`,`pentagon`];function Pu(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 Fu=e=>Nu[Pu(e)%Nu.length];function Iu(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,V.jsx)(`circle`,{cx:n,cy:n,r});case`square`:return(0,V.jsx)(`rect`,{x:1.5,y:1.5,width:t-3,height:t-3,rx:2});case`diamond`:return(0,V.jsx)(`polygon`,{points:i(4)});case`hexagon`:return(0,V.jsx)(`polygon`,{points:i(6,0)});case`triangle`:return(0,V.jsx)(`polygon`,{points:i(3)});case`pentagon`:return(0,V.jsx)(`polygon`,{points:i(5)});case`shield`:return(0,V.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,V.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 Lu({id:e,role:t,size:n=18,state:r,active:i,className:a=``}){let o=dd(t),s=Fu(e),c=r===`dead`?.35:r===`idle`?.7:1,l=e.replace(/[^a-z0-9]/gi,``).slice(0,1).toUpperCase();return(0,V.jsxs)(`span`,{className:`relative inline-flex shrink-0 ${a}`,style:{width:n,height:n},title:`${e}${t?` · ${t}`:``}`,children:[(0,V.jsxs)(`svg`,{width:n,height:n,viewBox:`0 0 ${n} ${n}`,style:{opacity:c},"aria-hidden":!0,children:[(0,V.jsx)(`g`,{fill:o,stroke:o,strokeWidth:`1`,children:Iu(s,n)}),(0,V.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,V.jsx)(`span`,{className:`absolute -right-0.5 -bottom-0.5 w-2 h-2 rounded-full bg-moss ring-2 ring-paper`,children:(0,V.jsx)(`span`,{className:`absolute inset-0 rounded-full bg-moss animate-ping opacity-60`})})]})}var Ru=e=>/done|merged|deployed|complete|closed|✅/i.test(e);function zu(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:Ru(e.status)})):[]}var Bu=e=>e.match(/^Task\s+(\d+)\b/i)?.[1]??null;function Vu(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 Hu(e,t){let n=e.trim().toLowerCase();return t.find(e=>e.toLowerCase()===n)??t.find(e=>n.includes(e.toLowerCase()))??null}var Uu=/(`[^`\n]+`)|(\*\*[^*\n]+\*\*)|(~~[^~\n]+~~)|(\[\[([^\]|\n]+)(?:\|([^\]\n]+))?\]\])|(\[([^\]\n]+)\]\((https?:\/\/[^)\s]+)\))|(\bhttps?:\/\/[^\s<>()"']+[^\s<>()"'.,;:!?])|((?<![\w*])\*(?!\s)([^*\n]+?)(?<!\s)\*(?![\w*]))|((?<![\w_])_(?!\s)([^_\n]+?)(?<!\s)_(?![\w_]))/g;function Wu({text:e,className:t}){let n=[],r=0,i,a=0;for(Uu.lastIndex=0;i=Uu.exec(e);)i.index>r&&n.push(e.slice(r,i.index)),i[1]?n.push((0,V.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,V.jsx)(`b`,{children:i[2].slice(2,-2)},a++)):i[3]?n.push((0,V.jsx)(`s`,{className:`text-tan`,children:i[3].slice(2,-2)},a++)):i[4]?n.push((0,V.jsx)(H,{to:`/docs/${encodeURIComponent(i[5])}`,onClick:e=>e.stopPropagation(),className:`text-ember-deep`,children:i[6]??i[5]},a++)):i[7]?n.push((0,V.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,V.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,V.jsx)(`i`,{children:i[12]},a++)):i[13]&&n.push((0,V.jsx)(`i`,{children:i[14]},a++)),r=i.index+i[0].length;return r<e.length&&n.push(e.slice(r)),t?(0,V.jsx)(`span`,{className:t,children:n}):(0,V.jsx)(V.Fragment,{children:n})}var Gu=({text:e})=>(0,V.jsx)(Wu,{text:e});function Ku({stream:e,agents:t,size:n=`sm`}){if(!e)return null;let r=Hu(e.owner,t.map(e=>e.agentId));return(0,V.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,V.jsx)(ld,{id:r,bare:!0,size:n}):(0,V.jsxs)(`span`,{className:`inline-flex items-center gap-1 font-mono text-[11px] text-umber`,children:[(0,V.jsx)(Lu,{id:e.owner,size:14,state:`dead`}),e.owner]}),(0,V.jsx)(K,{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 qu({project:e,phase:t,highlight:n,maxH:r=`46vh`,compact:i=!1}){let{data:a,error:o}=J(`/projects/${e}/phases/${t.id}/tasks`,15e3),s=J(`/projects/${e}/board`,15e3).data,c=J(`/bus/agents`,2e4).data??[],l=zu(s),[u,d]=(0,P.useState)({}),f=J(`/admin/bus-writes`,1e4).data?.enabled??!1,[p,m]=(0,P.useState)({}),h=async(n,r)=>{m(e=>({...e,[n]:{to:r??`aide`,ts:Date.now()}}));try{let i=await Fa(`/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,V.jsx)(`div`,{className:`px-3 py-2 text-[13px] text-brick`,children:o}):a?a.sections.length===0?(0,V.jsxs)(`div`,{className:`px-3 py-3 text-[13px] text-umber`,children:[`No tasks yet — run `,(0,V.jsx)(`code`,{children:`/plan-phase`}),` (roadmap → Plan).`]}):(0,V.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=Vu(l,t.n,Bu(e.title)),m=!!n&&!!s&&Hu(s.owner,c.map(e=>e.agentId))===n,g=u[e.line]===void 0?o:!u[e.line];return(0,V.jsxs)(`div`,{className:`border-b border-sand last:border-b-0 min-w-0 ${m?`bg-ember/[.04]`:``}`,children:[(0,V.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,V.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[(0,V.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,V.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full bg-ember shrink-0`,title:`this agent's task`}),(0,V.jsx)(H,{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,V.jsxs)(`span`,{className:`font-mono text-[11px] shrink-0 ${o?`text-leaf`:`text-tan`}`,children:[r,`/`,e.tasks.length,o?` ✓`:``]}),!i&&(0,V.jsxs)(`span`,{className:`ml-auto flex items-center gap-2`,children:[(0,V.jsx)(Ku,{stream:s,agents:c}),(0,V.jsx)(`span`,{className:`h-1 w-24 rounded-full bg-linen overflow-hidden`,children:(0,V.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,V.jsx)(`div`,{className:`flex items-center gap-2 min-w-0 pl-5`,children:(0,V.jsx)(Ku,{stream:s,agents:c})})]}),!g&&e.tasks.map(e=>(0,V.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,V.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,V.jsxs)(H,{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,V.jsx)(Gu,{text:e.text}),p[e.line]&&`err`in p[e.line]&&(0,V.jsx)(`span`,{className:`ml-2 font-mono text-[10px] text-brick`,children:p[e.line].err})]}),(0,V.jsx)(`span`,{className:`pr-2 pt-1 shrink-0`,children:!e.done&&(p[e.line]&&!(`err`in p[e.line])?(0,V.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,V.jsx)(`button`,{type:`button`,disabled:!f,onClick:()=>h(e.line,s?Hu(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,V.jsx)(`div`,{className:`px-3 py-2 font-mono text-[12px] text-tan`,children:`…`})}function Ju({project:e,phase:t,onClose:n}){let{data:r}=J(`/projects/${e}/phases/${t.id}/tasks`,15e3),i=r?.total?Math.round(r.done/r.total*100):0;return(0,V.jsxs)(`div`,{className:`mt-3 border border-sand rounded-kit bg-paper`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2 border-b border-sand`,children:[(0,V.jsx)(`b`,{className:`text-[13px]`,children:t.title}),(0,V.jsx)(K,{tone:r?.total&&r.done===r.total?`ok`:`neutral`,children:r?`${r.done}/${r.total} · ${i}%`:`…`}),(0,V.jsx)(`span`,{className:`font-mono text-[11px] text-ink3`,children:r?.file??`no tasks file`}),(0,V.jsxs)(`span`,{className:`ml-auto flex gap-1.5`,children:[r?.file&&(0,V.jsx)(H,{to:`/docs/${encodeURIComponent(r.file)}`,className:`hover:no-underline`,children:(0,V.jsx)(q,{size:`sm`,tone:`ghost`,children:`Open doc`})}),(0,V.jsx)(q,{size:`sm`,tone:`ghost`,onClick:n,children:`✕`})]})]}),(0,V.jsx)(qu,{project:e,phase:t})]})}var Yu=`/api`,Xu=/\[image: (\S+) · (\S+)\]/g,Zu=e=>`${Yu}/uploads/${encodeURIComponent(e.split(`/`).pop()??``)}`;function Qu(e){let t=e?.persistKey,[n,r]=(0,P.useState)(()=>{if(!t)return[];try{return JSON.parse(localStorage.getItem(t)??`[]`)}catch{return[]}}),i=(0,P.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,P.useEffect)(()=>{if(t)try{r(JSON.parse(localStorage.getItem(t)??`[]`))}catch{r([])}},[t]);let[a,o]=(0,P.useState)(0),[s,c]=(0,P.useState)(null),l=(0,P.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(`${Yu}/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,P.useCallback)(e=>{let t=Array.from(e.clipboardData?.files??[]);t.length&&(e.preventDefault(),l(t))},[l]),d=(0,P.useCallback)(e=>{let t=Array.from(e.dataTransfer?.files??[]);t.length&&(e.preventDefault(),l(t))},[l]),f=(0,P.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 $u({a:e}){return!e.items.length&&!e.busy&&!e.err?null:(0,V.jsxs)(`div`,{className:`flex items-center gap-1.5 flex-wrap`,children:[e.items.map(t=>(0,V.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,V.jsx)(`img`,{src:Zu(t.name),alt:t.name,className:`h-10 w-auto max-w-[120px] rounded object-cover`}),(0,V.jsxs)(`span`,{className:`font-mono text-[10px] text-ink3 pr-1`,children:[Math.round(t.bytes/1024),` KB`]}),(0,V.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,V.jsx)(`span`,{className:`font-mono text-[11px] text-ink3`,children:`uploading…`}),e.err&&(0,V.jsx)(`span`,{className:`font-mono text-[11px] text-brick`,children:e.err})]})}var ed=/(^|\n)\s*(#{1,6}\s|[-*+]\s|\d+[.)]\s|\|.*\||```|~~~|>\s|(-{3,}|\*{3,})\s*$)/;function td({text:e}){return ed.test(e)?(0,V.jsx)(`div`,{className:`md md-bubble whitespace-normal min-w-0`,dangerouslySetInnerHTML:{__html:yu(e)}}):(0,V.jsx)(Wu,{text:e})}function nd({text:e}){let t=[],n=0,r,i=0;for(Xu.lastIndex=0;r=Xu.exec(e);){r.index>n&&t.push((0,V.jsx)(td,{text:e.slice(n,r.index)},`t${i++}`));let[,a,o]=r;t.push((0,V.jsx)(`a`,{href:Zu(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,V.jsx)(`img`,{src:Zu(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,V.jsx)(td,{text:e.slice(n)},`t${i++}`)),(0,V.jsx)(V.Fragment,{children:t})}var rd=`/api`;function id({agentId:e,onClose:t}){let{linkify:n}=ju(),[r,i]=(0,P.useState)(null),[a,o]=(0,P.useState)(null),[s,c]=(0,P.useState)(200),[l,u]=(0,P.useState)(!0),[d,f]=(0,P.useState)(!0),[p,m]=(0,P.useState)(()=>localStorage.getItem(`groundwork-console.pane.tasks`)!==`0`),h=e=>{m(e),localStorage.setItem(`groundwork-console.pane.tasks`,e?`1`:`0`)},{current:g,projects:_}=Va(),v=J(`/admin/bus-writes`,1e4).data?.enabled??!1,y=(J(`/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,P.useState)(``),[C,w]=(0,P.useState)(null),T=Qu(),E=async()=>{if(T.hasContent(x)){w(`sending`);try{let t=await Fa(`/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,P.useRef)(null);return(0,P.useEffect)(()=>{let t=!0,n=async()=>{try{let n=await fetch(`${rd}/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,P.useEffect)(()=>{l&&D.current&&(D.current.scrollTop=D.current.scrollHeight)},[r,l]),(0,P.useEffect)(()=>{let e=document.body.style.overflow;return document.body.style.overflow=`hidden`,()=>{document.body.style.overflow=e}},[]),(0,P.useEffect)(()=>{let e=e=>{e.key===`Escape`&&t()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[t]),(0,V.jsx)(`div`,{className:`fixed inset-0 z-[60] bg-walnut/30 flex justify-end`,onMouseDown:e=>{e.target===e.currentTarget&&t()},children:(0,V.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 ${dd(y?.role)}`},children:[(0,V.jsxs)(`div`,{className:`px-4 py-2.5 border-b border-sand flex items-center gap-2`,children:[(0,V.jsx)(Lu,{id:e,role:y?.role,size:22,state:y?.liveness,active:y?.active}),(0,V.jsx)(`span`,{className:`font-display font-bold text-[16px] text-umber`,children:e}),y?.role&&(0,V.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.06em]`,style:{color:dd(y.role)},children:y.role}),r&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`span`,{className:`font-mono text-[12px] text-ink3`,children:[r.pane,` · `,r.command]}),r.active?(0,V.jsx)(K,{tone:`ok`,children:`active`}):(0,V.jsx)(K,{tone:`outline`,children:`quiet`}),(0,V.jsxs)(`span`,{className:`font-mono text-[11px] text-tan`,children:[r.lines,` lines · `,new Date(r.capturedAt).toLocaleTimeString()]})]}),(0,V.jsxs)(`span`,{className:`ml-auto flex items-center gap-1.5`,children:[(0,V.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,V.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,V.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,V.jsxs)(`option`,{value:e,children:[e,` lines`]},e))}),(0,V.jsx)(q,{size:`sm`,onClick:t,children:`Close (Esc)`})]})]}),(0,V.jsxs)(`div`,{className:`min-h-0 grid ${p?`grid-cols-[minmax(0,1fr)_minmax(300px,380px)]`:`grid-cols-1`}`,children:[(0,V.jsxs)(`div`,{className:`min-h-0 grid grid-rows-[minmax(0,1fr)_auto]`,children:[(0,V.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,V.jsx)(`span`,{className:`text-brick`,children:a}):r?n(d&&r.ansi?po(r.ansi):r.text):`capturing…`}),(0,V.jsxs)(`div`,{className:`px-4 py-2 border-t border-sand grid gap-1.5`,children:[(0,V.jsxs)(`div`,{className:`grid grid-cols-[1fr_auto] gap-2 items-center`,children:[(0,V.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,V.jsx)(q,{size:`sm`,tone:`primary`,onClick:E,disabled:!v||!T.hasContent(x)||T.busy||C===`sending`,children:`Send DM`})]}),(0,V.jsx)($u,{a:T}),(0,V.jsxs)(`div`,{className:`font-mono text-[11px] text-tan`,children:[`read-only `,(0,V.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,V.jsxs)(`span`,{className:/^sent/.test(C)?` text-leaf`:` text-brick`,children:[` · `,C]}):null]})]})]}),p&&(0,V.jsx)(ad,{project:b,agentId:e})]})]})})}function ad({project:e,agentId:t}){let n=J(e?`/projects/${e}/board`:null,15e3).data,r=J(`/bus/agents`,2e4).data??[],i=n?.phases.find(e=>e.state===`ongoing`)??n?.phases.find(e=>e.state===`planned`),a=zu(n).filter(e=>!e.done&&Hu(e.owner,r.map(e=>e.agentId))===t);return(0,V.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,V.jsxs)(`div`,{className:`px-3 py-2 border-b border-sand flex items-center gap-2 flex-wrap`,children:[(0,V.jsx)(`span`,{className:`font-mono text-[10px] uppercase tracking-[.1em] text-tan`,children:`now`}),i?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(H,{to:`/board`,className:`font-semibold text-[13px] text-walnut hover:text-ember-deep hover:no-underline`,children:i.title}),(0,V.jsx)(K,{tone:i.state===`ongoing`?`david`:`neutral`,children:i.state}),(0,V.jsxs)(`span`,{className:`font-mono text-[11px] text-ink3`,children:[i.done,`/`,i.total]})]}):(0,V.jsx)(`span`,{className:`text-[13px] text-umber`,children:e?`no phase in flight`:`no project selected`})]}),(0,V.jsxs)(`div`,{className:`px-3 py-2 border-b border-sand grid gap-1`,children:[(0,V.jsxs)(`span`,{className:`font-mono text-[10px] uppercase tracking-[.1em] text-tan`,children:[t,` is on`]}),a.length===0&&(0,V.jsx)(`span`,{className:`text-[12px] text-umber`,children:`no active stream owned by this agent`}),a.map(e=>(0,V.jsxs)(`div`,{className:`flex items-center gap-2 text-[12px]`,children:[(0,V.jsx)(`span`,{className:`font-mono text-umber truncate`,title:e.note,children:e.name}),(0,V.jsx)(`span`,{className:`ml-auto`,children:(0,V.jsx)(Ku,{stream:e,agents:r})})]},e.name))]}),i&&e?(0,V.jsx)(qu,{project:e,phase:i,highlight:t,maxH:`100%`,compact:!0}):(0,V.jsx)(`div`,{className:`px-3 py-3 text-[12px] text-umber`,children:`Pick a project (header) to see its phase tasks.`})]})}var od=`/api`,sd=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 cd({agentId:e,lines:t=4,className:n=``,label:r}){let[i,a]=(0,P.useState)(null),[o,s]=(0,P.useState)(null),[c,l]=(0,P.useState)(!1);(0,P.useEffect)(()=>{let n=!0,r=async()=>{try{let r=await fetch(`${od}/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,V.jsxs)(V.Fragment,{children:[(0,V.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,V.jsxs)(`div`,{className:`flex items-center gap-1.5 px-2 py-[3px] bg-linen border-b border-sand`,children:[(0,V.jsx)(`span`,{className:`relative inline-block w-1.5 h-1.5 rounded-full ${i?.active?`bg-moss`:`bg-dust`}`,children:i?.active&&(0,V.jsx)(`span`,{className:`absolute inset-0 rounded-full bg-moss animate-ping opacity-60`})}),(0,V.jsx)(`span`,{className:`font-mono text-[10px] text-ink3 truncate`,children:r??e}),(0,V.jsx)(`span`,{className:`ml-auto font-mono text-[10px] text-tan`,children:i?i.active?`active`:`quiet ${sd(i.paneActivity)}`:`…`})]}),(0,V.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,V.jsx)(`span`,{className:`text-brick`,children:o}):i?i.ansi?po(u(i.ansi)):u(i.text):`capturing…`})]}),c&&(0,V.jsx)(id,{agentId:e,onClose:()=>l(!1)})]})}function ld({id:e,prefix:t,size:n=`sm`,className:r=``,bare:i=!1,noDot:a=!1}){let o=(J(`/bus/agents`,2e4).data??[]).find(t=>t.agentId===e),[s,c]=(0,P.useState)(!1),[l,u]=(0,P.useState)(!1),d=(0,P.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,P.useEffect)(()=>()=>{d.current&&window.clearTimeout(d.current)},[]);let m=!!o?.pane;return(0,V.jsxs)(`span`,{className:`relative inline-flex ${r}`,onMouseEnter:f,onMouseLeave:p,children:[(0,V.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,V.jsx)(`span`,{className:`text-tan`,children:t}),!a&&(0,V.jsx)(Lu,{id:e,role:o?.role,size:n===`sm`?14:18,state:o?.liveness??`dead`,active:o?.active}),(0,V.jsx)(`span`,{className:`truncate max-w-[220px]`,children:e}),o&&!o.transport&&o.liveness!==`dead`&&(0,V.jsx)(`span`,{className:`text-amber`,title:`not attached — DMs won't reach its pane`,children:`⚠`})]}),s&&m&&(0,V.jsx)(`span`,{className:`absolute left-0 top-[calc(100%+6px)] z-50 w-[420px] whitespace-normal text-left`,onMouseEnter:f,onMouseLeave:p,children:(0,V.jsx)(cd,{agentId:e,lines:6,label:`${e} · ${o.role??``}`,className:`shadow-panel bg-paper`})}),l&&(0,V.jsx)(id,{agentId:e,onClose:()=>u(!1)})]})}var ud=[{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`}],dd=e=>ud.find(t=>t.re.test(e??``))?.dot??`#5C7A96`,fd=e=>ud.find(t=>t.re.test(e??``))?.label??`worker`;function pd(){let{projects:e,current:t}=Va(),n=J(`/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(fd(e.role))+1||9,s=[...i].sort((e,t)=>o(e)-o(t)||e.agentId.localeCompare(t.agentId)),[c,l]=(0,P.useState)(!1);return(0,V.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,V.jsxs)(`span`,{className:`font-mono text-[10px] uppercase tracking-[.1em] text-tan shrink-0`,children:[`online · `,t||`—`]}),s.length===0&&(0,V.jsx)(`span`,{className:`font-mono text-[12px] text-tan`,children:`no agents for this project`}),s.map(e=>(0,V.jsxs)(`span`,{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded-full border border-sand bg-paper`,style:{borderColor:dd(e.role)+`66`},title:`${e.agentId} · ${fd(e.role)}${e.pane?` · ${e.pane}`:``}`,children:[(0,V.jsx)(Lu,{id:e.agentId,role:e.role,size:16,state:e.liveness,active:e.active}),(0,V.jsx)(ld,{id:e.agentId,bare:!0,noDot:!0,size:`sm`}),(0,V.jsx)(`span`,{className:`font-mono text-[10px] uppercase tracking-[.06em]`,style:{color:dd(e.role)},children:fd(e.role)})]},e.agentId)),c&&a.map(e=>(0,V.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} · ${fd(e.role)} · ${e.project??`?`}`,children:[(0,V.jsx)(Lu,{id:e.agentId,role:e.role,size:16,state:e.liveness,active:e.active}),(0,V.jsx)(ld,{id:e.agentId,bare:!0,noDot:!0,size:`sm`}),(0,V.jsx)(`span`,{className:`font-mono text-[10px] text-tan`,children:e.project})]},e.agentId)),a.length>0&&(0,V.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,V.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,V.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[(0,V.jsx)(`span`,{className:`inline-block w-1.5 h-1.5 rounded-full`,style:{background:t}}),e]},e))})]})}var md={clear:`reset the agent's context — typed raw into its CLI via send_command`,compact:`compact the agent's context — typed raw into its CLI via send_command`,"reload-skills":`reload the agent's skills after a playbook update — typed raw into its CLI via send_command`},hd=e=>e.map(e=>e.replace(/^\//,``)).map(e=>({name:e,description:md[e]??`typed raw into the agent's CLI via send_command`,source:`built-in`}));function gd(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 _d(e){let t=J(e?`/projects/${e}/skills`:null,6e4).data,n=Ra();return(0,P.useMemo)(()=>[...hd(n),...(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,n])}function vd({skills:e,query:t,onPick:n,onClose:r,bind:i}){let a=(0,P.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,P.useState)(0),c=(0,P.useRef)(null);return(0,P.useEffect)(()=>{s(0)},[t]),(0,P.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,P.useEffect)(()=>{c.current?.querySelector(`[data-i="${o}"]`)?.scrollIntoView({block:`nearest`})},[o]),a.length===0?(0,V.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,V.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,V.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,V.jsxs)(`span`,{className:`font-mono text-[12px] font-semibold text-walnut`,children:[`/`,e.name]}),(0,V.jsx)(`span`,{className:`text-[12px] text-umber truncate`,title:e.description,children:e.description}),(0,V.jsx)(K,{tone:e.source===`built-in`?`warn`:e.source===`playbook`?`neutral`:`outline`,children:e.source===`built-in`?`built-in · raw`:e.source})]},`${e.source}:${e.name}`)),(0,V.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 $=(e,t)=>window.dispatchEvent(new CustomEvent(`groundwork-console:summon`,{detail:{agentId:e,answers:t?.answers}})),yd=e=>`groundwork-console.summon.${e}`,bd=e=>`groundwork-console.summon.seen.${e}`;function xd(e){let t=nr(),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 Sd(){let{current:e}=Va(),t=J(`/bus/agents`,2e4).data??[],n=J(e?`/projects/${e}/agents`:null,3e4).data,r=t.filter(e=>e.liveness!==`dead`&&e.agentId!==`david`&&e.agentId!==`groundwork-console`),[i,a]=(0,P.useState)(()=>e?localStorage.getItem(yd(e)):null);(0,P.useEffect)(()=>{a(e?localStorage.getItem(yd(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,P.useState)(!1),[u,d]=(0,P.useState)(!1),f=t=>{a(t),e&&localStorage.setItem(yd(e),t),d(!1),l(!0)},p=J(o?`/bus/dm/${encodeURIComponent(o)}?limit=80`:null,c?4e3:2e4).data,m=J(`/bus/inbox?limit=100`,2e4).data?.decisions??{},[h,g]=(0,P.useState)(0);(0,P.useEffect)(()=>{o&&g(Number(localStorage.getItem(bd(o))??0))},[o]),(0,P.useEffect)(()=>{c&&o&&p&&(localStorage.setItem(bd(o),String(p.lastFromAgent)),g(p.lastFromAgent))},[c,o,p]);let _=!!p&&p.lastFromAgent>h;(0,P.useEffect)(()=>{let e=e=>{e.key===`Escape`&&(d(!1),l(!1))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]);let[v,y]=(0,P.useState)([]);(0,P.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,P.useState)(``);if((0,P.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,V.jsxs)(V.Fragment,{children:[c&&(0,V.jsx)(Td,{agentId:o,me:s,project:e,thread:p??void 0,answers:v,onAnswered:()=>y([]),onClose:()=>l(!1),onSwitch:()=>{d(!0)}}),(0,V.jsxs)(`div`,{className:`fixed right-5 bottom-5 z-[55]`,style:{width:52,height:52},children:[u&&(0,V.jsxs)(`div`,{className:`absolute inset-0`,"aria-label":`pick an agent`,children:[T.map((e,t)=>{let n=O(t);return(0,V.jsxs)(`button`,{onClick:()=>f(e.agentId),title:`${e.agentId} · ${fd(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:dd(e.role),width:34,height:34,animation:`summon-pop .18s ease-out ${t*30}ms both`},children:[(0,V.jsx)(Lu,{id:e.agentId,role:e.role,size:26,state:e.liveness,active:e.active}),m[e.agentId]?(0,V.jsx)(Cd,{n:m[e.agentId],small:!0}):null]},e.agentId)}),T.length===0&&(0,V.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,V.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,V.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,V.jsxs)(`div`,{className:`max-h-[220px] overflow-auto overscroll-contain grid`,children:[E.slice(0,40).map((e,t)=>(0,V.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} · ${fd(e.role)} · ${e.project??``}`,children:[(0,V.jsx)(Lu,{id:e.agentId,role:e.role,size:16,state:e.liveness,active:e.active}),(0,V.jsxs)(`span`,{className:`min-w-0 truncate font-mono text-[12px] text-walnut`,children:[e.agentId,(0,V.jsxs)(`span`,{className:`text-tan`,children:[` · `,fd(e.role),e.project?` · ${e.project}`:``]})]}),m[e.agentId]?(0,V.jsxs)(`span`,{className:`font-mono text-[10px] text-ember`,children:[`★`,m[e.agentId]]}):null]},e.agentId)),E.length===0&&(0,V.jsx)(`span`,{className:`px-1.5 py-1 font-mono text-[11px] text-tan`,children:`no match`})]}),(0,V.jsxs)(`span`,{className:`font-mono text-[10px] text-tan px-1`,children:[`ring = aide + `,5,` most recent · Enter picks the first match`]})]})]}),(0,V.jsxs)(`button`,{onClick:()=>u?d(!1):l(e=>!e),title:`${o} · ${fd(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:dd(s?.role)},children:[(0,V.jsx)(Lu,{id:o,role:s?.role,size:40,state:s?.liveness??`dead`,active:s?.active}),m[o]?(0,V.jsx)(Cd,{n:m[o]}):_&&(0,V.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,V.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,V.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 Cd({n:e,small:t=!1}){return(0,V.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 wd=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 Td({agentId:e,me:t,project:n,thread:r,answers:i=[],onAnswered:a,onClose:o,onSwitch:s}){let c=J(`/admin/bus-writes`,1e4).data?.enabled??!1,l=xd(n),[u,d]=(0,P.useState)(!0),f=`groundwork-console.summon.draft.${e}`,[p,m]=(0,P.useState)(()=>localStorage.getItem(f)??``),[h,g]=(0,P.useState)(null),_=e=>{m(e);try{e?localStorage.setItem(f,e):localStorage.removeItem(f)}catch{}};(0,P.useEffect)(()=>{m(localStorage.getItem(`groundwork-console.summon.draft.${e}`)??``)},[e]);let[v,y]=(0,P.useState)(!1),[b,x]=(0,P.useState)(()=>localStorage.getItem(`groundwork-console.summon.max`)===`1`),S=()=>x(e=>(localStorage.setItem(`groundwork-console.summon.max`,e?`0`:`1`),!e)),C=Qu({persistKey:`groundwork-console.summon.att.${e}`}),w=_d(n),T=new Set(Ra()),E=(0,P.useRef)(null),[D,O]=(0,P.useState)(0),[k,A]=(0,P.useState)(!0),j=k?gd(p,D):null,M=(0,P.useRef)(null),N=(0,P.useCallback)(e=>{M.current=e},[]),ee=(0,P.useRef)(null),F=(0,P.useCallback)(e=>{let t=gd(p,D);if(!t)return;let n=`${p.slice(0,t.start)}/${e} ${p.slice(D)}`,r=t.start+e.length+2;_(n),O(r),ee.current=r},[p,D]);(0,P.useEffect)(()=>{if(ee.current!==null&&E.current){let e=ee.current;ee.current=null,E.current.focus(),E.current.setSelectionRange(e,e)}},[p]);let I=(0,P.useRef)(null),[te,ne]=(0,P.useState)([]),re=r?.messages??[],L=te.filter(e=>!re.some(t=>t.from===`david`&&Number(t.ts??0)>=Number(e.ts??0)-2e3&&(t.text??``)===(e.text??``))),R=[...re,...L],[z,B]=(0,P.useState)(0);(0,P.useEffect)(()=>{let e=setInterval(()=>B(e=>e+1),1e3);return()=>clearInterval(e)},[]);let ie=(J(`/bus/agents`,4e3).data??[]).find(t=>t.agentId===e)??t,ae=ie?.paneActivity?Date.now()-ie.paneActivity:1/0,oe=ae<2e4,se=([...R].reverse().find(e=>e.from===`david`)?.ts??0)>([...R].reverse().find(e=>e.from!==`david`)?.ts??0);(0,P.useEffect)(()=>{I.current&&(I.current.scrollTop=I.current.scrollHeight)},[R.length,oe,se]);let ce=async()=>{if(!C.hasContent(p))return;g(`sending`);let t=p.trim(),n=T.has(t),r=n?t:t.startsWith(`/`)?`AGENT_ACTION: run ${t}`:t,o=n?t:C.withRefs(r),s=n?t:u?`${o}\n(context: ${l.cite})`:o,c={id:`local-${Date.now()}`,ts:Date.now(),from:`david`,to:e,text:s,prefix:null,pending:!0};ne(e=>[...e,c]),_(``),C.clear();try{let n=await Fa(`/actions/send`,{as:`david`,to:e,text:s,answers:i.length?i:void 0});if(n.status===`ok`)g(n.raw?n.delivery===`confirmed`?`${t} typed into the pane (delivery confirmed)`:n.warning??`${t}: delivery ${n.delivery??`unknown`}`:n.warning??null),a?.();else{let e=n.error??n.log?.slice(-1)[0]??`failed`;g(e),ne(t=>t.map(t=>t.id===c.id?{...t,failed:e}:t))}}catch(e){let t=e.message;g(t),ne(e=>e.map(e=>e.id===c.id?{...e,failed:t}:e))}},le=e=>e?new Date(e).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`}):``,ue=(0,P.useMemo)(()=>R,[R]);return(0,V.jsxs)(V.Fragment,{children:[v&&(0,V.jsx)(id,{agentId:e,onClose:()=>y(!1)}),(0,V.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 ${dd(t?.role)}`},children:[(0,V.jsxs)(`div`,{className:`px-3 py-2 border-b border-sand flex items-center gap-2 min-w-0`,children:[(0,V.jsx)(Lu,{id:e,role:t?.role,size:22,state:t?.liveness??`dead`,active:t?.active}),(0,V.jsx)(`span`,{className:`font-display font-bold text-[14px] text-umber truncate`,children:e}),(0,V.jsx)(`span`,{className:`font-mono text-[10px] uppercase tracking-[.06em]`,style:{color:dd(t?.role)},children:fd(t?.role)}),t?(0,V.jsx)(K,{tone:t.liveness===`live`?`ok`:t.liveness===`idle`?`warn`:`bad`,children:t.active?`active`:t.liveness}):(0,V.jsx)(K,{tone:`bad`,children:`offline`}),(0,V.jsxs)(`span`,{className:`ml-auto flex items-center gap-1`,children:[t?.pane&&(0,V.jsx)(q,{size:`sm`,tone:`ghost`,onClick:()=>y(!0),title:`open its pane`,children:`pane`}),(0,V.jsx)(q,{size:`sm`,tone:`ghost`,onClick:s,title:`summon another agent`,children:`switch`}),(0,V.jsx)(q,{size:`sm`,tone:`ghost`,onClick:S,title:b?`restore`:`maximize`,children:b?`⇲`:`⇱`}),(0,V.jsx)(q,{size:`sm`,tone:`ghost`,onClick:o,children:`✕`})]})]}),(0,V.jsxs)(`div`,{ref:I,className:`min-h-0 overflow-auto overscroll-contain px-3 py-2 grid gap-1.5 content-start bg-cream/40`,children:[!r&&(0,V.jsx)(`span`,{className:`font-mono text-[11px] text-tan`,children:`loading thread…`}),r&&ue.length===0&&(0,V.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.`]}),ue.map((e,t)=>{let n=e.from===`david`,r=String(e.text??``),i=e.prefix?r.replace(RegExp(`^${e.prefix}:?\\s*`),``):r;return(0,V.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,V.jsx)(Da,{prefix:e.prefix}),(0,V.jsx)(nd,{text:i}),(0,V.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…`:le(e.ts)})]},e.id??t)}),(oe||se)&&(0,V.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:ie?.paneActivity?`last pane output ${Math.round(ae/1e3)} s ago`:`no pane activity`,children:oe?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`span`,{className:`summon-dots`,"aria-hidden":!0,children:[(0,V.jsx)(`i`,{}),(0,V.jsx)(`i`,{}),(0,V.jsx)(`i`,{})]}),(0,V.jsxs)(`span`,{children:[e.split(`-`)[0],` is working`]})]}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full bg-tan`}),(0,V.jsxs)(`span`,{children:[`delivered · quiet for `,ae===1/0?`a while`:wd(ae)]})]})})]}),(0,V.jsxs)(`div`,{className:`px-3 py-2 border-t border-sand grid gap-1.5`,children:[(0,V.jsxs)(`label`,{className:`flex items-center gap-1.5 font-mono text-[11px] text-ink3 min-w-0`,children:[(0,V.jsx)(`input`,{type:`checkbox`,checked:u,onChange:e=>d(e.target.checked)}),(0,V.jsx)(`span`,{className:`shrink-0`,children:`context:`}),(0,V.jsx)(`span`,{className:`truncate text-umber`,title:l.cite,children:l.label})]}),(0,V.jsxs)(`div`,{className:`relative grid grid-cols-[1fr_auto] gap-1.5 items-center`,children:[(0,V.jsx)(`textarea`,{ref:E,value:p,onChange:e=>{_(e.target.value),O(e.target.selectionStart??e.target.value.length),A(!0)},onClick:e=>O(e.target.selectionStart??0),onKeyUp:e=>O(e.target.selectionStart??0),onKeyDown:e=>{if(j&&M.current&&M.current(e)){e.preventDefault();return}e.key===`Enter`&&!e.shiftKey&&c&&(e.preventDefault(),ce())},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,V.jsx)(q,{size:`sm`,tone:`primary`,onClick:ce,disabled:!c||!C.hasContent(p)||C.busy||h===`sending`,children:h===`sending`?`…`:`Send`}),j&&c&&(0,V.jsx)(vd,{skills:w,query:j.query,onPick:F,onClose:()=>A(!1),bind:N})]}),(0,V.jsx)($u,{a:C}),T.has(p.trim())?(0,V.jsxs)(`div`,{className:`font-mono text-[11px] text-ink3`,children:[(0,V.jsx)(`span`,{className:`text-umber`,children:p.trim()}),` is sent `,(0,V.jsx)(`b`,{children:`raw`}),` (no banner, no context) via the bus send_command — the agent's CLI runs it; delivery is confirmed by its pusher`]}):p.trim().startsWith(`/`)&&(0,V.jsxs)(`div`,{className:`font-mono text-[11px] text-ink3`,children:[`sends as `,(0,V.jsxs)(`span`,{className:`text-umber`,children:[`AGENT_ACTION: run `,p.trim().split(/\s/)[0],` …`]}),` — the bus pusher drops raw leading-slash DMs (only the MCP's allowlist — `,[...T].join(` `),` — goes raw); the agent runs the skill from the request`]}),h&&h!==`sending`&&(0,V.jsx)(`div`,{className:`font-mono text-[11px] ${/delivery confirmed/.test(h)?`text-leaf`:`text-brick`}`,children:h})]})]})]})}var Ed={h:`/`,b:`/board`,m:`/monitor`,u:`/bus`,d:`/docs`,g:`/git`,o:`/ops`},Dd=e=>{let t=e;return!!t&&(t.tagName===`INPUT`||t.tagName===`TEXTAREA`||t.tagName===`SELECT`||t.isContentEditable)};function Od(){let e=ir(),[t,n]=(0,P.useState)(!1);return(0,P.useEffect)(()=>{let t=0,r=r=>{if(!(r.metaKey||r.ctrlKey||r.altKey||Dd(r.target))){if(r.key===`Escape`){n(!1);return}if(r.key===`?`){n(e=>!e);return}if(r.key===`/`){r.preventDefault(),$(``);return}if(r.key===`g`&&!(Date.now()-t<900)){t=Date.now();return}Date.now()-t<900&&Ed[r.key]&&(r.preventDefault(),e(Ed[r.key]),t=0)}};return window.addEventListener(`keydown`,r),()=>window.removeEventListener(`keydown`,r)},[e]),t?(0,V.jsx)(`div`,{className:`fixed inset-0 z-[70] bg-walnut/30 flex items-center justify-center`,onMouseDown:()=>n(!1),children:(0,V.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,V.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 g`,`Git`],[`g o`,`Ops`],[`Esc`,`close drawer / picker / this`],[`?`,`toggle this list`]].map(([e,t])=>(0,V.jsxs)(`div`,{className:`grid grid-cols-[64px_1fr] gap-3 items-baseline text-[13px]`,children:[(0,V.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,V.jsx)(`span`,{className:`text-umber`,children:t})]},e)),(0,V.jsx)(`div`,{className:`font-mono text-[11px] text-tan mt-1`,children:`In the Summon drawer: Enter sends · ⇧Enter newline · paste images.`})]})}):null}var kd=`/api`;function Ad({children:e}){let[t,n]=(0,P.useState)(`checking`),[r,i]=(0,P.useState)(``),[a,o]=(0,P.useState)(null),[s,c]=(0,P.useState)(!1),l=async()=>{try{let e=await(await fetch(`${kd}/auth/status`)).json();n(e.authed?`in`:`out`)}catch{n(`offline`)}};(0,P.useEffect)(()=>{l()},[]),(0,P.useEffect)(()=>{t!==`in`&&fetch(`${kd}/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,P.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(`${kd}/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,V.jsx)(V.Fragment,{children:e}):t===`checking`?(0,V.jsx)(`div`,{className:`min-h-screen grid place-items-center font-mono text-[12px] text-tan`,children:`checking session…`}):(0,V.jsx)(`div`,{className:`min-h-screen grid place-items-center bg-cream p-6`,children:(0,V.jsxs)(`div`,{className:`w-[380px] bg-paper border border-sand rounded-kit shadow-panel`,children:[(0,V.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,V.jsx)(Na,{}),` Groundwork Console`]}),(0,V.jsx)(`div`,{className:`p-5 grid gap-3 text-[13px]`,children:t===`offline`?(0,V.jsxs)(`div`,{className:`text-brick`,children:[`API unreachable — start it with `,(0,V.jsx)(`code`,{children:`pnpm dev:api`}),`, then `,(0,V.jsx)(`button`,{className:`underline border-0 bg-transparent p-0 cursor-pointer text-ember-deep`,onClick:l,children:`retry`}),`.`]}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`div`,{className:`text-umber`,children:[`This console can write to your bus and docs. Enter the console token — it's in `,(0,V.jsx)(`code`,{className:`font-mono text-[12px]`,children:`~/.groundwork-console/token`}),` on the machine running the API (or `,(0,V.jsx)(`code`,{className:`font-mono text-[12px]`,children:`GROUNDWORK_CONSOLE_TOKEN`}),`).`]}),(0,V.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,V.jsx)(`div`,{className:`text-brick`,children:a}),(0,V.jsx)(q,{tone:`primary`,onClick:u,disabled:!r||s,children:s?`Signing in…`:`Sign in`}),(0,V.jsx)(`div`,{className:`font-mono text-[11px] text-tan`,children:`Cookie lasts 30 days on this browser. Single shared token — no accounts.`})]})})]})})}var jd=[{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:`/git`,label:`Git`,icon:`git`},{to:`/ops`,label:`Ops`,icon:`fleet`}];function Md(){let{error:e}=Va(),{running:t}=Wa(),n=J(`/bus/unread`,3e4).data?.inbox??0,r=J(`/kit`).data,i=J(`/health`,6e4).data,a=i?.hostname,o=!!i?.version&&i.version!==`0.1.8`,s=nr();(0,P.useEffect)(()=>{let e=s.pathname===`/`?``:s.pathname.split(`/`)[1],t=jd.find(t=>t.to===`/`?e===``:t.to===`/${e}`)?.label??(e?e[0].toUpperCase()+e.slice(1):`Home`);document.title=a?`${t} · ${a}`:t},[s.pathname,a]);let c=r?.packages?`${r.name} ${r.kitVersion} · seam ${r.packages.seam?.version} · mcp ${r.packages.mcp?.version}`:`kit · offline`;return(0,V.jsx)(Ad,{children:(0,V.jsx)(Mu,{children:(0,V.jsxs)(`div`,{className:`grid grid-rows-[48px_auto_1fr] min-h-screen`,children:[(0,V.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,V.jsxs)(`div`,{className:`flex items-center gap-2 font-display font-bold text-[16px] text-ember whitespace-nowrap`,title:c,children:[(0,V.jsx)(Na,{}),` Groundwork Console`]}),(0,V.jsx)(`nav`,{className:`flex gap-0.5 whitespace-nowrap`,children:jd.map(e=>(0,V.jsxs)(Ai,{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,V.jsx)(`span`,{className:`text-tan`,children:Ca[e.icon]({size:16})}),(0,V.jsx)(`span`,{className:`hidden xl:inline`,children:e.label}),e.to===`/ops`&&t>0?(0,V.jsxs)(`span`,{className:`ml-1.5 inline-flex items-center gap-1 text-amber`,children:[(0,V.jsx)(Ma,{size:12}),(0,V.jsx)(K,{tone:`warn`,children:t})]}):null,e.to===`/bus`&&n>0?(0,V.jsx)(`span`,{className:`ml-1.5 inline-flex`,title:`${n} unread DM(s) to david`,children:(0,V.jsx)(K,{tone:`david`,children:n})}):null,e.badge?(0,V.jsx)(`span`,{className:`ml-1.5 inline-flex`,children:(0,V.jsx)(K,{tone:`david`,children:e.badge})}):null]},e.to))}),(0,V.jsxs)(`div`,{className:`flex gap-0.5 items-center justify-end min-w-0 whitespace-nowrap`,children:[e&&(0,V.jsx)(`span`,{className:`font-mono text-[12px] text-brick mr-2`,title:e,children:`api offline`}),(0,V.jsx)(qa,{}),(0,V.jsx)(Za,{}),(0,V.jsx)(Xa,{}),o&&(0,V.jsxs)(`button`,{onClick:()=>location.reload(),className:`mr-1 font-mono text-[11px] px-2 py-1 rounded-full bg-amber-wash text-amber border border-amber-line cursor-pointer`,title:`this tab runs 0.1.8, the API is ${i?.version} — reload to get the new UI`,children:[`new version `,i?.version,` — reload`]}),(0,V.jsx)(oo,{}),(0,V.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,V.jsx)(pd,{}),(0,V.jsx)(Lr,{}),(0,V.jsx)(so,{}),(0,V.jsx)(Sd,{}),(0,V.jsx)(Od,{})]})})})}function Nd(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 Pd(e,t=Date.now()){let n=(t-e)/864e5;return n<1?`text-tan`:n<7?`text-amber`:`text-brick font-semibold`}var Fd=e=>new Date(e).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`,second:`2-digit`}),Id=e=>!!e&&Ta.includes(e),Ld={"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 Rd(){let{data:e,refresh:t}=J(`/events?limit=40`,15e3),[n,r]=(0,P.useState)(!1),[i,a]=(0,P.useState)(``),[o,s]=(0,P.useState)(!1),c=async(e,n)=>{s(!0);try{await Fa(`/events/config`,{rule:e,enabled:n}),t()}finally{s(!1)}},l=async e=>{s(!0);try{await Fa(`/events/config`,{dryRun:e,confirm:e?void 0:i}),t(),r(!1),a(``)}finally{s(!1)}},[u,d]=(0,P.useState)([]);(0,P.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,V.jsxs)(W,{children:[(0,V.jsxs)(G,{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,V.jsx)(K,{tone:`bad`,children:`LIVE — sending`}):p.dryRun?(0,V.jsx)(K,{tone:`outline`,children:`dry-run`}):(0,V.jsx)(K,{tone:`warn`,children:`armed · bus writes off`})),p&&(p.dryRun?(0,V.jsx)(q,{size:`sm`,onClick:()=>r(!0),disabled:o,children:`Go live…`}):(0,V.jsx)(q,{size:`sm`,onClick:()=>l(!0),disabled:o,children:`Back to dry-run`}))]}),p&&(0,V.jsxs)(`div`,{className:`px-3 py-2 border-b border-sand grid gap-1`,children:[p.rules.map(e=>(0,V.jsxs)(`label`,{className:`grid grid-cols-[auto_1fr] gap-2 items-baseline font-mono text-[12px] text-ink3 cursor-pointer`,children:[(0,V.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,V.jsxs)(`span`,{children:[(0,V.jsx)(`span`,{className:`text-walnut`,children:e.on}),` → `,e.action.type===`none`?(0,V.jsx)(`span`,{className:`text-tan`,children:e.action.note}):(0,V.jsxs)(V.Fragment,{children:[e.action.to?e.action.to:`#${e.action.room}`,` · `,Id(e.action.prefix)&&(0,V.jsx)(Da,{prefix:e.action.prefix}),(0,V.jsx)(`span`,{className:`text-umber`,children:e.action.text})]})]})]},e.id)),(0,V.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,V.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,V.jsxs)(`div`,{className:`w-[520px] bg-paper border border-brick rounded-kit shadow-panel`,children:[(0,V.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,V.jsxs)(`div`,{className:`p-4 grid gap-3 text-[13px] text-umber`,children:[(0,V.jsxs)(`div`,{children:[`Enabled rules will really `,(0,V.jsx)(`code`,{children:`send_message`}),` as `,(0,V.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,V.jsx)(`code`,{children:`groundwork-console.rules.json`}),`.`]}),(0,V.jsxs)(`label`,{className:`grid gap-1`,children:[(0,V.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Type LIVE to confirm`}),(0,V.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,V.jsxs)(`div`,{className:`px-4 py-3 border-t border-sand flex justify-end gap-2`,children:[(0,V.jsx)(q,{size:`sm`,onClick:()=>r(!1),children:`Cancel`}),(0,V.jsx)(q,{size:`sm`,tone:`primary`,onClick:()=>l(!1),disabled:i!==`LIVE`||o,children:`Go live`})]})]})}),f.length===0&&(0,V.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,V.jsxs)(`div`,{className:`grid grid-cols-[var(--spacing-gutter)_1fr] border-b border-sand last:border-b-0`,children:[(0,V.jsx)(`div`,{className:`py-2.5 flex justify-center font-mono text-[12px] text-tan border-r border-sand`,children:`⚡`}),(0,V.jsxs)(`div`,{className:`px-3 pt-2 pb-2.5 min-w-0`,children:[(0,V.jsxs)(`div`,{className:`flex gap-2 items-baseline mb-0.5 flex-wrap`,children:[(0,V.jsx)(K,{tone:Ld[e.type]??`neutral`,children:e.type}),e.data.baseline?(0,V.jsx)(`span`,{className:`font-mono text-[11px] text-tan`,children:`baseline · no action`}):null,(0,V.jsx)(`span`,{className:`font-mono text-[12px] text-umber`,children:e.project}),(0,V.jsx)(`span`,{className:`font-mono text-[12px] text-ink3`,children:Fd(e.ts)})]}),(0,V.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,V.jsxs)(`div`,{className:`mt-1 text-[13px] pl-2 border-l-2 ${e.sent?`border-leaf`:e.skipped?`border-amber`:`border-dust`}`,children:[(0,V.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`}),Id(e.prefix)&&(0,V.jsx)(Da,{prefix:e.prefix}),(0,V.jsx)(`span`,{className:`text-walnut`,children:e.text}),` `,(0,V.jsxs)(`span`,{className:`font-mono text-[12px] text-ink3`,children:[`→ `,e.to??`#${e.room}`]}),e.runId&&(0,V.jsx)(`span`,{className:`ml-2 font-mono text-[11px] text-tan`,children:e.runId})]},e.ruleId))]})]},e.id))]})}function zd(){let{data:e}=J(`/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,V.jsxs)(`div`,{className:`flex items-center gap-2 font-mono text-[11px] text-ink3 px-1`,children:[(0,V.jsx)(`span`,{className:`uppercase tracking-[.1em] text-tan`,children:`events`}),t.live?(0,V.jsx)(K,{tone:`bad`,children:`live`}):t.dryRun?(0,V.jsx)(K,{tone:`outline`,children:`dry-run`}):(0,V.jsx)(K,{tone:`warn`,children:`armed · bus writes off`}),(0,V.jsxs)(`span`,{children:[n,`/`,t.rules.length,` rules on · `,i,` sent in 24 h`]}),(0,V.jsx)(H,{to:`/ops/events`,className:`ml-auto text-ember-deep`,children:`Ops → Events`})]})}var Bd={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 Vd({pct:e,cls:t,size:n=44}){let r=(n-6)/2,i=2*Math.PI*r;return(0,V.jsxs)(`svg`,{width:n,height:n,viewBox:`0 0 ${n} ${n}`,className:t,"aria-hidden":!0,children:[(0,V.jsx)(`circle`,{cx:n/2,cy:n/2,r,fill:`none`,stroke:`currentColor`,strokeOpacity:`.18`,strokeWidth:`4`}),(0,V.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 Hd({project:e,phases:t,canWrite:n,prd:r}){let i=J(`/projects/${e}/agents`,3e4).data,[a,o]=(0,P.useState)(null),[s,c]=(0,P.useState)(null),[l,u]=(0,P.useState)(null),d=`groundwork-console.roadmap.last.${e}`,[f,p]=(0,P.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 Fa(`/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 Fa(`/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&&$(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,V.jsxs)(W,{children:[(0,V.jsx)(G,{title:`Roadmap`,icon:`phases`,eyebrow:`PRODUCTION_ROADMAP · phases/`,path:`${v}/${t.length} complete${y?` · next: ${y.title}`:``}`,children:(0,V.jsxs)(`span`,{className:`flex items-center gap-1.5 flex-wrap`,children:[i?.aide?(0,V.jsx)(ld,{id:i.aide,prefix:`aide`}):(0,V.jsx)(`span`,{className:`font-mono text-[11px] text-tan`,children:`no live aide`}),i?.coordinator?(0,V.jsx)(ld,{id:i.coordinator,prefix:`coord`}):(0,V.jsx)(`span`,{className:`font-mono text-[11px] text-tan`,children:`no live coordinator`})]})}),t.length===0&&(0,V.jsxs)(`div`,{className:`px-3 py-3 grid gap-2 text-[13px]`,children:[r==null?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`div`,{className:`text-walnut`,children:[`No PRD yet. The roadmap starts from `,(0,V.jsx)(`code`,{children:`docs/PRD.md`}),` — write it with your aide (it runs `,(0,V.jsx)(`code`,{children:`/create-prd`}),` and asks you what it needs).`]}),(0,V.jsxs)(`div`,{className:`flex gap-2 items-center flex-wrap`,children:[(0,V.jsx)(q,{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,V.jsx)(Ma,{size:12}):`Write the PRD with the aide`}),i?.aide&&(0,V.jsx)(q,{size:`sm`,tone:`ghost`,onClick:()=>$(i.aide),children:`Open the aide's thread`}),!i?.aide&&(0,V.jsx)(H,{to:`/ops/fleets`,className:`hover:no-underline`,children:(0,V.jsx)(q,{size:`sm`,children:`Spawn aide`})})]})]}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`div`,{className:`text-walnut`,children:[`PRD is `,(0,V.jsx)(`b`,{children:r.status??`present`}),r.roadmap?` and a roadmap exists`:``,` — no `,(0,V.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,V.jsx)(`code`,{children:`/plan-phase 1`}),`.`]}),(0,V.jsxs)(`div`,{className:`flex gap-2 items-center flex-wrap`,children:[(0,V.jsx)(q,{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,V.jsx)(Ma,{size:12}):`Kickstart with the aide`}),i?.aide&&(0,V.jsx)(q,{size:`sm`,tone:`ghost`,onClick:()=>$(i.aide),children:`Open the aide's thread`}),!i?.aide&&(0,V.jsx)(H,{to:`/ops/fleets`,className:`hover:no-underline`,children:(0,V.jsx)(q,{size:`sm`,children:`Spawn aide`})})]})]}),s&&(0,V.jsx)(`div`,{className:`font-mono text-[12px] ${/^sent/.test(s)?`text-leaf`:`text-brick`}`,children:s})]}),t.length>0&&(0,V.jsxs)(`div`,{className:`px-3 pt-3 pb-2 min-w-0`,children:[(0,V.jsx)(`div`,{className:`overflow-x-auto overscroll-x-contain [scrollbar-width:thin]`,children:(0,V.jsx)(`ol`,{className:`flex items-start gap-0 min-w-max`,children:t.map((e,n)=>{let r=Bd[e.state],i=e.total?Math.round(e.done/e.total*100):0,o=n===t.length-1;return(0,V.jsxs)(`li`,{className:`flex items-start`,children:[(0,V.jsxs)(`div`,{className:`w-[190px] grid gap-1.5 justify-items-center text-center`,children:[(0,V.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,V.jsx)(Vd,{pct:e.state===`complete`?100:i,cls:r.ring}),(0,V.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,V.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,V.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,V.jsx)(K,{tone:r.tone,children:r.label}),(0,V.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,V.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,V.jsx)(`span`,{className:`uppercase tracking-[.06em]`,children:f[e.id].verb===`kickoff`?`kicked off`:f[e.id].verb===`plan`?`plan requested`:`audit requested`}),(0,V.jsx)(`span`,{children:`→`}),(0,V.jsx)(ld,{id:f[e.id].to,bare:!0}),(0,V.jsx)(`span`,{className:`text-tan`,children:h(f[e.id].ts)})]}),(0,V.jsxs)(`div`,{className:`flex gap-1 flex-wrap justify-center`,children:[(e.tasks||e.readme)&&(0,V.jsx)(H,{to:`/docs/${encodeURIComponent(e.tasks??e.readme)}`,className:`hover:no-underline`,children:(0,V.jsx)(q,{size:`sm`,tone:`ghost`,children:`Open`})}),e.state===`pending`&&(0,V.jsx)(q,{size:`sm`,tone:`primary`,disabled:!!a,title:`DM the aide: run /plan-phase`,onClick:()=>g(e,`plan`),children:a===`${e.id}:plan`?(0,V.jsx)(Ma,{size:12}):`Plan`}),e.state===`planned`&&(0,V.jsx)(q,{size:`sm`,tone:`primary`,disabled:!!a,title:`GO to the coordinator`,onClick:()=>g(e,`kickoff`),children:a===`${e.id}:kickoff`?(0,V.jsx)(Ma,{size:12}):`Kick off`}),e.state===`ongoing`&&(0,V.jsx)(q,{size:`sm`,disabled:!!a,title:`ask the coordinator to run /coord-audit`,onClick:()=>g(e,`audit`),children:a===`${e.id}:audit`?(0,V.jsx)(Ma,{size:12}):`Audit`})]})]}),!o&&(0,V.jsx)(`div`,{className:`mt-[21px] h-[3px] w-6 rounded ${e.state===`complete`?`bg-leaf`:`bg-sand`}`})]},e.id)})})}),l&&(0,V.jsx)(Ju,{project:e,phase:t.find(e=>e.id===l),onClose:()=>u(null)}),s&&(0,V.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,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`span`,{children:`sent →`}),(0,V.jsx)(ld,{id:s.replace(/^sent → /,``),bare:!0})]}):s}),(0,V.jsx)(`div`,{className:`mt-2 font-mono text-[11px] text-tan flex gap-3 flex-wrap`,children:Object.keys(Bd).map(e=>(0,V.jsxs)(`span`,{children:[(0,V.jsx)(`span`,{className:`inline-block w-2 h-2 rounded-full border mr-1 align-middle ${Bd[e].dot}`}),Bd[e].label,` — `,Bd[e].hint]},e))})]})]})}function Ud({phases:e}){return e?.length?(0,V.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,V.jsx)(`span`,{className:`inline-block w-2.5 h-2.5 rounded-full border ${Bd[e.state].dot}`},t)),(0,V.jsxs)(`span`,{className:`ml-1 font-mono text-[11px] text-ink3`,children:[e.filter(e=>e.state===`complete`).length,`/`,e.length]})]}):(0,V.jsx)(`span`,{className:`font-mono text-[11px] text-tan`,children:`no phases`})}function Wd({project:e,canWrite:t,onClose:n,initialRole:r}){let{data:i}=J(`/actions/spawn/options?project=${encodeURIComponent(e)}`),[a,o]=(0,P.useState)(r??`worker`),[s,c]=(0,P.useState)(`claude`),[l,u]=(0,P.useState)(``),[d,f]=(0,P.useState)(``),[p,m]=(0,P.useState)(``),[h,g]=(0,P.useState)(``),[_,v]=(0,P.useState)(8),[y,b]=(0,P.useState)(!1),[x,S]=(0,P.useState)(null),[C,w]=(0,P.useState)(null),T=ir(),{runs:E}=Wa(),D=x?E.find(e=>e.id===x.id)??x:null;(0,P.useEffect)(()=>{i&&!l&&u(i.suggest[a]??``)},[i,a,l]),(0,P.useEffect)(()=>{i&&u(i.suggest[a]??``)},[a]);let O=async()=>{b(!0),w(null);try{let t=await Fa(`/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,V.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,V.jsxs)(`div`,{className:`w-[640px] bg-paper border border-sand rounded-kit shadow-panel`,children:[(0,V.jsxs)(`div`,{className:`px-4 py-3 border-b border-sand font-display font-bold text-[18px] text-umber`,children:[`Spawn agent · `,e]}),(0,V.jsxs)(`div`,{className:`p-4 grid gap-3 text-[13px]`,children:[(0,V.jsxs)(`div`,{className:`flex gap-1.5 flex-wrap items-center text-umber`,children:[(0,V.jsx)(K,{tone:t?`warn`:`outline`,children:t?`bus writes on`:`bus writes OFF`}),(0,V.jsxs)(`span`,{children:[`tmux window `,(0,V.jsxs)(`code`,{children:[`fleet-`,e]}),` · cwd `,(0,V.jsx)(`code`,{children:i?.repoPath?.replace(/^\/Users\/[^/]+/,`~`)}),i?.room?(0,V.jsxs)(V.Fragment,{children:[` · room `,(0,V.jsxs)(`code`,{children:[`#`,i.room]})]}):` · no room linked`]})]}),!t&&(0,V.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,V.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,V.jsxs)(`label`,{className:`grid gap-1`,children:[(0,V.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Role · playbook card`}),(0,V.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,V.jsxs)(`option`,{value:e.id,children:[e.id,` · `,e.skill]},e.id))})]}),(0,V.jsxs)(`label`,{className:`grid gap-1`,children:[(0,V.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Harness`}),(0,V.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,V.jsxs)(`option`,{value:e.id,children:[e.id,` · `,e.cmd]},e.id))})]}),(0,V.jsxs)(`label`,{className:`grid gap-1`,children:[(0,V.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Agent id`}),(0,V.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,V.jsxs)(`label`,{className:`grid gap-1`,children:[(0,V.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Lane`}),(0,V.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,V.jsxs)(`label`,{className:`grid gap-1`,children:[(0,V.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Model (Claude only, optional)`}),(0,V.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,V.jsxs)(`label`,{className:`grid gap-1`,children:[(0,V.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Extra instruction (optional, injected after the skill)`}),(0,V.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,V.jsxs)(`div`,{className:`flex items-center gap-3 text-umber`,children:[(0,V.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Start wait`}),(0,V.jsx)(`input`,{type:`range`,min:3,max:30,value:_,onChange:e=>v(Number(e.target.value))}),(0,V.jsxs)(`span`,{className:`font-mono text-[12px]`,children:[_,` s`]}),(0,V.jsx)(`span`,{className:`text-[12px]`,children:`before injecting the skill`})]}),(0,V.jsxs)(`div`,{className:`font-mono text-[12px] text-ink3 bg-linen rounded px-2 py-1.5`,children:[`will type: `,(0,V.jsx)(`b`,{className:`text-walnut`,children:i?.harnesses.find(e=>e.id===s)?.cmd}),` → wait `,_,` s → `,s===`claude`?`/color · `:``,(0,V.jsxs)(`b`,{className:`text-walnut`,children:[k,` --id=`,l||`…`,d?` --lane=${d}`:``,i?.room?` --room=${i.room}`:``]}),` → wait for register (≤ 90 s)`]}),C&&(0,V.jsx)(`div`,{className:`text-brick`,children:C}),D&&(0,V.jsxs)(`div`,{className:`p-2 rounded-kit border min-w-0 max-w-full ${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,V.jsxs)(`div`,{className:`font-mono text-[12px]`,children:[D.status===`running`?(0,V.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-amber`,children:[(0,V.jsx)(Ma,{}),` `,(0,V.jsx)(K,{tone:`warn`,children:`running`})]}):(0,V.jsx)(K,{tone:D.status===`ok`?`ok`:`bad`,children:D.status}),` `,(0,V.jsx)(`b`,{children:D.label}),D.status===`running`&&(0,V.jsx)(`span`,{className:`ml-2 text-tan`,children:`live — you can close this; it keeps running (see Runs)`})]}),(0,V.jsxs)(`pre`,{className:`m-0 mt-1 font-mono text-[12px] whitespace-pre-wrap max-h-[30vh] overflow-auto min-w-0 max-w-full break-words overscroll-contain`,children:[D.log.join(`
29
- `),D.error?`
30
- `+D.error:``]})]})]}),(0,V.jsxs)(`div`,{className:`px-4 py-3 border-t border-sand flex justify-end gap-2`,children:[(0,V.jsx)(q,{size:`sm`,onClick:n,disabled:y,children:D?D.status===`running`?`Close (keeps running)`:`Close`:`Cancel`}),D&&(0,V.jsx)(q,{size:`sm`,onClick:()=>{n(),T(`/monitor`)},children:`Open Monitor`}),!D&&(0,V.jsx)(q,{size:`sm`,tone:`primary`,onClick:O,disabled:!t||y||!l,children:y?(0,V.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,V.jsx)(Ma,{}),` Starting…`]}):`Spawn`})]})]})})}function Gd({project:e,fleet:t,canWrite:n,compact:r=!1}){let i=J(`/bus/agents`,2e4).data??[],[a,o]=(0,P.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,V.jsxs)(`div`,{className:`px-2.5 py-1.5 rounded-kit border border-sand bg-paper ${n?``:`min-w-[170px]`}`,children:[(0,V.jsx)(ld,{id:t,size:`md`,bare:!0}),(0,V.jsxs)(`span`,{className:`block font-mono text-[10px] uppercase tracking-[.08em] text-tan mt-0.5`,children:[e,r?.pane?` · ${r.pane}`:``]})]}):(0,V.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,V.jsx)(`span`,{className:`inline-block w-2 h-2 rounded-full border border-dashed border-dust`}),(0,V.jsxs)(`span`,{className:`min-w-0`,children:[(0,V.jsx)(`span`,{className:`block font-mono text-[12px] text-tan`,children:`missing`}),(0,V.jsxs)(`span`,{className:`block font-mono text-[10px] uppercase tracking-[.08em] text-tan`,children:[e,` · spawn`]})]})]})},l=({v:e=!1})=>(0,V.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,V.jsxs)(`div`,{className:`grid gap-1 ${r?`text-[12px]`:``}`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,V.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,V.jsx)(l,{}),(0,V.jsx)(c,{role:`aide`,id:t.roles.aide}),(0,V.jsx)(l,{}),(0,V.jsx)(c,{role:`coordinator`,id:t.roles.coordinator}),(0,V.jsx)(l,{}),(0,V.jsxs)(`div`,{className:`grid gap-1`,children:[(0,V.jsxs)(`div`,{className:`flex gap-1 flex-wrap`,children:[(0,V.jsx)(c,{role:`qa`,id:t.roles.qa}),(0,V.jsx)(c,{role:`ci`,id:t.roles.ci})]}),(0,V.jsxs)(`div`,{className:`flex gap-1 flex-wrap`,children:[u.map(e=>(0,V.jsx)(c,{role:`worker`,id:e},e)),(0,V.jsx)(c,{role:`worker`,id:null})]})]})]}),!r&&(0,V.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,V.jsx)(Wd,{project:e,canWrite:n,initialRole:a,onClose:()=>o(null)})]})}var Kd={absent:`bad`,partial:`warn`,present:`ok`};function qd({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,V.jsx)(K,{tone:Kd[e.state],children:t})}function Jd({project:e,canWrite:t}){let{data:n,refresh:r}=J(`/projects/${e}/fleet`,2e4),[i,a]=(0,P.useState)(!1);return!n||n.state===`present`?null:(0,V.jsxs)(V.Fragment,{children:[(0,V.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,V.jsxs)(`div`,{className:`flex items-center gap-3 flex-wrap`,children:[(0,V.jsx)(qd,{fleet:n}),(0,V.jsx)(`span`,{className:`text-[13px] text-umber`,children:n.state===`absent`?(0,V.jsxs)(V.Fragment,{children:[`No agents are live for `,(0,V.jsx)(`b`,{className:`text-walnut`,children:e}),`. Boards and docs still read fine; Plan / Fix / Kick off need someone to talk to.`]}):(0,V.jsxs)(V.Fragment,{children:[`Missing `,(0,V.jsx)(`b`,{className:`text-walnut`,children:n.missing.join(`, `)}),`.`]})}),(0,V.jsxs)(`span`,{className:`ml-auto flex gap-1.5`,children:[(0,V.jsx)(q,{size:`sm`,tone:`primary`,onClick:()=>a(!0),children:`Spawn fleet…`}),(0,V.jsx)(H,{to:`/ops/fleets`,className:`hover:no-underline`,children:(0,V.jsx)(q,{size:`sm`,children:`Fleets`})})]})]}),(0,V.jsx)(Gd,{project:e,fleet:n,canWrite:t,compact:!0})]}),i&&(0,V.jsx)(Yd,{project:e,templates:n.templates,missing:n.missing,canWrite:t,onClose:()=>{a(!1),r()}})]})}function Yd({project:e,templates:t,missing:n,canWrite:r,onClose:i}){let[a,o]=(0,P.useState)(t.find(e=>e.id===`standard`)?.id??t[0]?.id??`standard`),[s,c]=(0,P.useState)(`claude`),[l,u]=(0,P.useState)(`claude`),[d,f]=(0,P.useState)(null),[p,m]=(0,P.useState)(``),[h,g]=(0,P.useState)(8),[_,v]=(0,P.useState)(!1),[y,b]=(0,P.useState)(null),[x,S]=(0,P.useState)(null),{runs:C}=Wa(),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,V.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,V.jsxs)(`div`,{className:`w-[680px] bg-paper border border-sand rounded-kit shadow-panel`,children:[(0,V.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,V.jsxs)(`div`,{className:`p-4 grid gap-3 text-[13px]`,children:[(0,V.jsxs)(`div`,{className:`text-umber`,children:[`Shapes from the playbook layout. Agents are launched one after another in tmux window `,(0,V.jsxs)(`code`,{children:[`fleet-`,e]}),`, each injected with its role card and `,(0,V.jsx)(`code`,{children:`--id`}),`, and the console waits for each to register.`,n.length>0&&(0,V.jsxs)(V.Fragment,{children:[` Currently missing: `,(0,V.jsx)(`b`,{className:`text-walnut`,children:n.join(`, `)}),`.`]})]}),!r&&(0,V.jsx)(`div`,{className:`text-brick`,children:`Turn on bus writes (header toggle) first.`}),(0,V.jsx)(`div`,{className:`grid gap-1.5`,children:t.map(e=>(0,V.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,V.jsx)(`input`,{type:`radio`,name:`tpl`,checked:a===e.id,onChange:()=>{o(e.id),f(null)}}),(0,V.jsxs)(`span`,{children:[(0,V.jsx)(`b`,{children:e.label}),(0,V.jsx)(`span`,{className:`block text-[12px] text-umber`,children:e.hint}),(0,V.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,V.jsxs)(`div`,{className:`grid grid-cols-3 gap-3`,children:[(0,V.jsxs)(`label`,{className:`grid gap-1`,children:[(0,V.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Harness`}),(0,V.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,V.jsx)(`option`,{children:e},e))})]}),T?.roles.includes(`ci`)&&(0,V.jsxs)(`label`,{className:`grid gap-1`,children:[(0,V.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`CI harness (cheap)`}),(0,V.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,V.jsx)(`option`,{children:e},e))})]}),(0,V.jsxs)(`label`,{className:`grid gap-1`,children:[(0,V.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Workers`}),(0,V.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,V.jsxs)(`label`,{className:`grid gap-1`,children:[(0,V.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Lanes (comma-separated, optional)`}),(0,V.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,V.jsxs)(`div`,{className:`flex items-center gap-3 text-umber`,children:[(0,V.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Start wait`}),(0,V.jsx)(`input`,{type:`range`,min:3,max:30,value:h,onChange:e=>g(Number(e.target.value))}),(0,V.jsxs)(`span`,{className:`font-mono text-[12px]`,children:[h,` s per agent`]}),(0,V.jsxs)(`span`,{className:`text-[12px]`,children:[`· total ≈ `,(T?.roles.length??0)+E,` × (`,h,` s + register)`]})]}),x&&(0,V.jsx)(`div`,{className:`text-brick`,children:x}),w&&(0,V.jsxs)(`div`,{className:`p-2 rounded-kit border min-w-0 max-w-full ${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,V.jsxs)(`div`,{className:`font-mono text-[12px]`,children:[w.status===`running`?(0,V.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-amber`,children:[(0,V.jsx)(Ma,{}),` `,(0,V.jsx)(K,{tone:`warn`,children:`running`})]}):(0,V.jsx)(K,{tone:w.status===`ok`?`ok`:`bad`,children:w.status}),` `,(0,V.jsx)(`b`,{children:w.label})]}),(0,V.jsx)(`pre`,{className:`m-0 mt-1 font-mono text-[12px] whitespace-pre-wrap max-h-[30vh] overflow-auto min-w-0 max-w-full break-words overscroll-contain`,children:w.log.join(`
31
- `)})]})]}),(0,V.jsxs)(`div`,{className:`px-4 py-3 border-t border-sand flex justify-end gap-2`,children:[(0,V.jsx)(q,{size:`sm`,onClick:i,disabled:_,children:w?`Close (keeps running)`:`Cancel`}),!w&&(0,V.jsx)(q,{size:`sm`,tone:`primary`,onClick:async()=>{v(!0),S(null);try{let t=await Fa(`/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,V.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,V.jsx)(Ma,{}),` Starting…`]}):`Spawn ${(T?.roles.length??0)+E} agents`})]})]})})}var Xd=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`},Zd=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 Qd(){let{projects:e,setCurrent:t,error:n,refresh:r}=Va(),i=J(`/kit`).data,a=J(`/bus/agents`,3e4).data??[],o=a.filter(e=>e.liveness===`live`).length,s=a.filter(e=>e.liveness===`dead`),c=J(`/needs-david`,3e4).data??[],[l,u]=(0,P.useState)(!1);return(0,V.jsxs)(`div`,{className:`p-4 pb-10 grid gap-[18px] content-start`,children:[l&&(0,V.jsx)(Ya,{onClose:()=>{u(!1),r()}}),(0,V.jsxs)(`div`,{className:`flex items-baseline justify-between`,children:[(0,V.jsxs)(`div`,{className:`flex items-baseline gap-3 flex-wrap`,children:[(0,V.jsx)(`span`,{className:`font-display font-bold text-[34px] leading-[1.1] tracking-[-.015em] text-ember`,children:`Projects`}),(0,V.jsx)(q,{size:`sm`,tone:`primary`,onClick:()=>u(!0),title:`register a repo path with the console`,children:`Add project`}),(0,V.jsxs)(`span`,{className:`ml-3 text-[13px] text-umber`,children:[`Groundwork-managed repos with a seam in `,(0,V.jsx)(`code`,{children:`docs/`}),` · from `,(0,V.jsx)(`code`,{children:`groundwork-console.config.json`})]})]}),(0,V.jsxs)(`div`,{className:`flex gap-2.5 items-center flex-wrap`,children:[i?.requires&&!i.requires.ok&&(0,V.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?.requires?.mcp.warnings?.length??0)>0&&(0,V.jsx)(`span`,{className:`font-mono text-[11px] px-2 py-1 rounded-full bg-amber-wash text-amber border border-amber-line`,title:i.requires.mcp.warnings.join(`
33
- `),children:`mcp: inReplyTo missing`}),i?.source===`installed packages`&&(0,V.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,V.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,V.jsx)(`b`,{className:`text-walnut`,children:t.version})]},e)):(0,V.jsx)(`span`,{className:`text-[13px] text-umber`,children:`kit.json unavailable`}),(0,V.jsx)(`span`,{className:`text-[13px] text-umber`,children:`· from kit.json`})]})]}),n&&(0,V.jsxs)(W,{className:`px-4 py-3 text-[13px] text-brick`,children:[`API unreachable (`,n,`) — start it with `,(0,V.jsx)(`code`,{children:`pnpm dev:api`}),`.`]}),(0,V.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]=Zd(e.schema);return(0,V.jsx)(H,{to:`/board`,onClick:()=>t(e.name),className:`block hover:no-underline text-inherit h-full`,children:(0,V.jsxs)(W,{className:`px-4 py-3.5 hover:border-dust h-full flex flex-col`,children:[(0,V.jsx)(`div`,{className:`font-display font-bold text-[20px] text-ember break-words`,title:e.name,children:e.name}),(0,V.jsxs)(`div`,{className:`mt-1 flex gap-1.5 flex-wrap`,children:[(0,V.jsx)(qd,{fleet:e.fleet}),e.versionMarker?e.behind?(0,V.jsxs)(K,{tone:`warn`,children:[`groundwork `,e.versionMarker,` → `,e.kitGroundwork]}):(0,V.jsxs)(K,{tone:`ok`,children:[`groundwork `,e.versionMarker]}):(0,V.jsx)(K,{tone:`outline`,children:`no groundwork marker`})]}),(0,V.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,V.jsxs)(`div`,{className:`font-mono text-[11px] text-tan -mt-2 mb-2 flex items-center justify-between gap-2`,children:[(0,V.jsx)(`span`,{children:e.lastActive?`active ${Xd(e.lastActive)} · ${e.lastActiveSource}`:`no activity recorded`}),(0,V.jsx)(Ud,{phases:e.phaseStrip??[]})]}),(0,V.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,V.jsxs)(`div`,{children:[(0,V.jsx)(`b`,{className:`block font-bold text-[20px] leading-none text-walnut`,children:t}),(0,V.jsx)(`span`,{className:`font-mono font-medium text-[11px] uppercase tracking-[.06em] text-ink3`,children:e})]},e))}),(0,V.jsxs)(`div`,{className:`flex gap-1.5 flex-wrap mt-auto pt-2.5`,children:[(0,V.jsx)(K,{tone:r,children:n}),e.files.queue?(0,V.jsx)(K,{tone:`ok`,children:`queue.v1`}):(0,V.jsx)(K,{tone:`outline`,children:`no QUEUE.md`}),e.files.done?(0,V.jsx)(K,{tone:`ok`,children:`done.v1`}):(0,V.jsx)(K,{tone:`outline`,children:`no DONE.md`}),e.files.facts?(0,V.jsxs)(K,{tone:e.counts.staleFacts?`warn`:`ok`,children:[`facts.v1`,e.counts.staleFacts?` · ${e.counts.staleFacts} stale`:``]}):(0,V.jsx)(K,{tone:`outline`,children:`no FACTS.md`}),e.counts.malformed?(0,V.jsxs)(K,{tone:`bad`,children:[e.counts.malformed,` malformed`]}):null]})]})},e.name)})}),(0,V.jsxs)(`div`,{className:`grid grid-cols-2 gap-4 max-[980px]:grid-cols-1`,children:[(0,V.jsxs)(W,{children:[(0,V.jsx)(G,{title:`Needs David`,icon:`needsDavid`,path:`${c.length} open · WORKSTREAMS ## Needs David + DAVID_DECISION`}),c.length===0&&(0,V.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,V.jsx)(Oa,{glyph:`★`,children:(0,V.jsxs)(`div`,{className:`py-2 min-w-0`,children:[(0,V.jsxs)(`div`,{className:`flex gap-2 items-baseline`,children:[(0,V.jsx)(`b`,{className:`font-mono text-[13px]`,children:e.project}),(0,V.jsx)(`span`,{className:`font-mono text-[11px] text-tan truncate`,children:e.source}),e.ts?(0,V.jsx)(`span`,{className:`ml-auto shrink-0 font-mono text-[11px] ${Pd(e.ts)}`,title:new Date(e.ts).toLocaleString(),children:Nd(e.ts)}):null]}),(0,V.jsx)(`div`,{className:`text-[14px] break-words line-clamp-2`,title:e.title,children:(0,V.jsx)(Wu,{text:e.title})}),e.detail&&(0,V.jsx)(`div`,{className:`text-[13px] text-umber break-words line-clamp-2`,children:(0,V.jsx)(Wu,{text:e.detail})}),e.msgId&&e.room?(0,V.jsx)(H,{className:`font-mono text-[12px]`,to:`/bus?room=${e.room}&msg=${e.msgId}`,children:`Open packet →`}):e.from?(0,V.jsx)(`button`,{className:`font-mono text-[12px] text-ember-deep border-0 bg-transparent p-0 cursor-pointer`,onClick:t=>{t.preventDefault(),$(e.from,{answers:e.msgId?[e.msgId]:void 0})},children:`Reply →`}):null]})},t))]}),(0,V.jsxs)(W,{children:[(0,V.jsx)(G,{title:`Bus health`,icon:`health`,path:`agents.json · transports · status`}),(0,V.jsx)(Oa,{glyph:`✓`,children:(0,V.jsxs)(`div`,{className:`py-2 flex items-center gap-2`,children:[(0,V.jsx)(K,{tone:a.length?`ok`:`warn`,children:a.length?`reachable`:`no store`}),(0,V.jsxs)(`span`,{className:`text-[13px] text-umber`,children:[a.length,` registered · `,o,` live · `,s.length,` dead`]})]})}),s.length>0&&(0,V.jsx)(Oa,{glyph:`!`,children:(0,V.jsxs)(`div`,{className:`py-2 flex items-center gap-2 min-w-0`,children:[(0,V.jsxs)(K,{tone:`warn`,children:[s.length,` stale agents`]}),(0,V.jsxs)(`span`,{className:`text-[13px] text-umber truncate`,children:[s.slice(0,4).map(e=>e.agentId).join(`, `),s.length>4?`…`:``,` — `,(0,V.jsx)(H,{to:`/ops/fleets`,children:`fleet`})]})]})})]})]}),(0,V.jsx)(zd,{})]})}function $d({scope:e}){return e?(0,V.jsxs)(`span`,{className:`inline-flex items-center gap-1 font-mono text-[12px] text-ink3`,title:e.note??``,children:[(0,V.jsx)(`span`,{className:`text-tan`,children:`✎`}),e.owner,(0,V.jsxs)(`span`,{className:`text-tan`,children:[`· `,e.mode]})]}):(0,V.jsx)(`span`,{className:`font-mono text-[12px] text-tan`,title:`no scope declared`,children:`unscoped`})}function ef({project:e,req:t,seamOn:n,scope:r,onClose:i}){let[a,o]=(0,P.useState)(`P2`),[s,c]=(0,P.useState)(``),[l,u]=(0,P.useState)(``),[d,f]=(0,P.useState)(t.kind===`fact`?t.claim??``:``),[p,m]=(0,P.useState)(!1),[h,g]=(0,P.useState)(null),[_,v]=(0,P.useState)(null),y=async()=>{m(!0),v(null);try{let n=t.kind===`add`?await Fa(`/actions/queue-add/${e}`,{priority:a,text:s}):await Fa(`/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,V.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,V.jsxs)(`div`,{className:`w-[600px] bg-paper border border-sand rounded-kit shadow-panel`,children:[(0,V.jsx)(`div`,{className:`px-4 py-3 border-b border-sand font-display font-bold text-[18px] text-umber`,children:b}),(0,V.jsxs)(`div`,{className:`p-4 grid gap-3 text-[13px]`,children:[(0,V.jsxs)(`div`,{className:`flex gap-1.5 flex-wrap items-center text-umber`,children:[(0,V.jsx)(K,{tone:n?`warn`:`outline`,children:n?`seam writes on`:`seam writes OFF`}),(0,V.jsxs)(`span`,{children:[`scope: `,r?`${r.owner} · ${r.mode}`:`unscoped`]}),(0,V.jsx)(`span`,{children:`· round-trip guard · re-parse after write · a Run`})]}),!n&&(0,V.jsxs)(`div`,{className:`text-brick`,children:[`Enable seam writes in the header (`,(0,V.jsx)(`code`,{children:`seam`}),` badge, type SEAM) first.`]}),t.kind===`add`?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`label`,{className:`grid gap-1`,children:[(0,V.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Priority`}),(0,V.jsx)(`span`,{className:`inline-flex border border-dust rounded-kit overflow-hidden w-max`,children:[`P1`,`P2`,`P3`].map(e=>(0,V.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,V.jsxs)(`label`,{className:`grid gap-1`,children:[(0,V.jsxs)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:[`Item (one line · queue.v1: `,(0,V.jsxs)(`code`,{children:[`- [ ] (`,a,`) …`]}),`)`]}),(0,V.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,V.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,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`label`,{className:`grid gap-1`,children:[(0,V.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Claim (leave as is unless it changed)`}),(0,V.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,V.jsxs)(`label`,{className:`grid gap-1`,children:[(0,V.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Method — how you verified it just now`}),(0,V.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,V.jsxs)(`div`,{className:`font-mono text-[12px] text-ink3 bg-linen rounded px-2 py-1.5`,children:["- `",t.id,"` — ",d||`…`,(0,V.jsx)(`br`,{}),` verified: now · by: david · method: `,l||`…`]})]}),_&&(0,V.jsx)(`div`,{className:`text-brick`,children:_}),h&&(0,V.jsxs)(`div`,{className:`p-2 rounded-kit border min-w-0 max-w-full ${h.status===`ok`?`border-moss-line bg-moss-wash/50`:`border-brick-line bg-brick-wash/50`}`,children:[(0,V.jsxs)(`div`,{className:`font-mono text-[12px]`,children:[(0,V.jsx)(K,{tone:h.status===`ok`?`ok`:`bad`,children:h.status}),` `,(0,V.jsx)(`b`,{children:h.label})]}),(0,V.jsxs)(`pre`,{className:`m-0 mt-1 font-mono text-[12px] whitespace-pre-wrap min-w-0 max-w-full break-words overflow-auto overscroll-contain max-h-[30vh]`,children:[h.log.join(`
34
- `),h.error?`
35
- `+h.error:``]}),h.status===`ok`&&(0,V.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,V.jsxs)(`div`,{className:`px-4 py-3 border-t border-sand flex justify-end gap-2`,children:[(0,V.jsx)(q,{size:`sm`,onClick:i,children:h?`Close`:`Cancel`}),!h&&(0,V.jsx)(q,{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 tf=`1.6fr 1.1fr 1.4fr 1fr 1fr 2fr`,nf=`1.4fr 1fr 1fr 1.6fr 1.6fr`,rf=e=>/block/i.test(e)?`bad`:/done|merged|deployed|✅/i.test(e)||/watch|soak/i.test(e)?`ok`:`neutral`,af=({k:e})=>(0,V.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 of({r:e,raw:t,cols:n}){return`malformed`in e?(0,V.jsx)(Oa,{glyph:`|`,malformed:!0,raw:e.raw,showRaw:t,children:(0,V.jsxs)(`div`,{className:`py-2 flex items-center gap-2 min-w-0`,children:[(0,V.jsx)(K,{tone:`solid`,children:`MalformedRow`}),(0,V.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,V.jsx)(H,{className:`text-[13px]`,to:`/docs/WORKSTREAMS.md?view=source&line=${e.line}`,children:`Show line`}):null]})}):e.schema===`workstreams.v1`?(0,V.jsx)(Oa,{glyph:`|`,raw:e.raw,showRaw:t,children:(0,V.jsxs)(`div`,{className:`grid gap-3 items-center py-1.5`,style:{gridTemplateColumns:n},children:[(0,V.jsx)(`b`,{className:`truncate`,title:e.stream,children:(0,V.jsx)(Wu,{text:e.stream})}),(0,V.jsx)(`span`,{className:`font-mono font-medium text-[13px] text-umber truncate`,children:e.owner}),(0,V.jsx)(`span`,{className:`font-mono text-[13px] truncate`,children:e.branchWorktree}),(0,V.jsx)(`span`,{className:`min-w-0`,children:(0,V.jsx)(K,{tone:rf(e.status),children:e.status})}),(0,V.jsx)(`span`,{className:`min-w-0 truncate`,children:/david/i.test(e.blocker)?(0,V.jsx)(K,{tone:`david`,children:e.blocker}):(0,V.jsx)(`span`,{className:e.blocker===`—`?`font-mono text-tan`:`text-[13px]`,children:(0,V.jsx)(Wu,{text:e.blocker})})}),(0,V.jsx)(`span`,{className:`text-[13px] text-umber truncate`,title:e.lastNote,children:(0,V.jsx)(Wu,{text:e.lastNote})})]})}):(0,V.jsx)(Oa,{glyph:`|`,raw:e.raw,showRaw:t,children:(0,V.jsxs)(`div`,{className:`grid gap-3 items-center py-1.5`,style:{gridTemplateColumns:n},children:[(0,V.jsx)(`b`,{className:`truncate`,children:(0,V.jsx)(Wu,{text:e.lane})}),(0,V.jsx)(`span`,{className:`font-mono font-medium text-[13px] text-umber truncate`,children:e.owner}),(0,V.jsx)(`span`,{className:`min-w-0`,children:(0,V.jsx)(K,{tone:rf(e.state),children:e.state})}),(0,V.jsx)(`span`,{className:`text-[13px] truncate`,children:(0,V.jsx)(Wu,{text:e.currentSlice})}),(0,V.jsx)(`span`,{className:`text-[13px] text-umber truncate`,children:(0,V.jsx)(Wu,{text:e.nextGo})})]})})}function sf(){let{current:e}=Va(),[t,n]=(0,P.useState)(!1);(0,P.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}=J(e?`/projects/${e}/board`:null,15e3),o=J(e?`/projects/${e}/doctor`:null,6e4),s=o.data,c=J(e?`/projects/${e}/doctor/fixers`:null,3e4).data?.fixers??{},[l,u]=(0,P.useState)(null),[d,f]=(0,P.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 Fa(`/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=J(`/admin/bus-writes`,1e4).data?.enabled??!1,h=J(`/admin/seam-writes`,1e4).data?.enabled??!1,[g,_]=(0,P.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,P.useState)(null),[S,C]=(0,P.useState)(!1),w=async()=>{C(!0);try{await Fa(`/actions/project-doctor/${e}`),o.refresh()}finally{C(!1)}};if(!e)return(0,V.jsx)(`div`,{className:`p-4 text-umber`,children:`No project selected.`});if(i)return(0,V.jsx)(`div`,{className:`p-4`,children:(0,V.jsxs)(W,{className:`px-4 py-3 text-[13px] text-brick`,children:[`API error: `,i]})});if(!r)return(0,V.jsx)(`div`,{className:`p-4 text-umber`,children:a?`Reading seam…`:``});let T=r.workstreams.schema,E=T===`workstreams.v1`,D=E?tf:nf,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,V.jsxs)(`div`,{className:`grid grid-cols-[1fr_340px] gap-4 p-4 max-[980px]:grid-cols-1`,children:[b&&(0,V.jsx)(ef,{project:e,req:b,seamOn:h,scope:b.kind===`add`?O(`docs/QUEUE.md`):O(`docs/FACTS.md`),onClose:()=>{x(null)}}),(0,V.jsxs)(`div`,{className:`grid gap-3.5 content-start min-w-0`,children:[(0,V.jsxs)(`div`,{className:`flex items-baseline justify-between`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`span`,{className:`font-display font-bold text-[34px] leading-[1.1] tracking-[-.015em] text-ember`,children:e}),k&&(0,V.jsxs)(`span`,{className:`ml-3 text-[13px] text-umber`,children:[k.title,` · `,k.done,`/`,k.total]})]}),(0,V.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,V.jsx)(`span`,{className:`text-[13px] text-umber`,children:a?`refreshing…`:`read from disk · 15 s`}),(0,V.jsx)(q,{size:`sm`,onClick:w,disabled:S,children:S?(0,V.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,V.jsx)(Ma,{size:12}),` Doctor`]}):`Doctor`})]})]}),(0,V.jsx)(Jd,{project:e,canWrite:m}),(0,V.jsx)(Hd,{project:e,phases:r.phases,canWrite:m,prd:r.prd}),(0,V.jsxs)(W,{children:[(0,V.jsxs)(G,{title:`Active Streams`,icon:`streams`,eyebrow:T??`no WORKSTREAMS.md`,path:`docs/WORKSTREAMS.md`,children:[(0,V.jsx)($d,{scope:O(`docs/WORKSTREAMS.md`)}),(0,V.jsxs)(q,{tone:`ghost`,size:`sm`,onClick:()=>n(e=>!e),"aria-pressed":t,children:[t?`Rendered`:`View source`,(0,V.jsx)(af,{k:`s`})]})]}),T===`unknown`&&(0,V.jsxs)(`div`,{className:`px-3 py-3 text-[13px]`,children:[(0,V.jsx)(K,{tone:`bad`,children:`unknown workstreams grammar`}),(0,V.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,V.jsxs)(`div`,{className:`px-3 py-2 text-[13px]`,children:[(0,V.jsx)(K,{tone:`warn`,children:`lanes-v0 · legacy`}),(0,V.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,V.jsxs)(ka,{cols:D,children:[(0,V.jsx)(`span`,{children:`Stream`}),(0,V.jsx)(`span`,{children:`Owner / Agent`}),(0,V.jsx)(`span`,{children:`Branch · Worktree`}),(0,V.jsx)(`span`,{children:`Status`}),(0,V.jsx)(`span`,{children:`Blocker`}),(0,V.jsx)(`span`,{children:`Last note`})]}):(0,V.jsxs)(ka,{cols:D,children:[(0,V.jsx)(`span`,{children:`Lane`}),(0,V.jsx)(`span`,{children:`Owner`}),(0,V.jsx)(`span`,{children:`State`}),(0,V.jsx)(`span`,{children:`Current slice`}),(0,V.jsx)(`span`,{children:`Next GO`})]})),r.workstreams.rows.map((e,n)=>(0,V.jsx)(of,{r:e,raw:t,cols:D},n)),r.workstreams.issues.length>0&&(0,V.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,V.jsxs)(W,{children:[(0,V.jsxs)(G,{title:`Queue`,icon:`queue`,eyebrow:`queue.v1`,path:`docs/QUEUE.md`,children:[(0,V.jsx)($d,{scope:O(`docs/QUEUE.md`)}),(0,V.jsx)(q,{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,V.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,V.jsx)(`div`,{className:`px-3 py-3 text-[13px] text-umber`,children:`Queue empty.`}),r.queue.map(e=>(0,V.jsx)(Oa,{glyph:e.done?`- [x]`:`- [ ]`,raw:e.raw,showRaw:t,children:(0,V.jsxs)(`div`,{className:`grid grid-cols-[44px_1fr] gap-2.5 items-baseline py-2`,children:[(0,V.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,V.jsx)(`span`,{className:e.done?`line-through text-tan`:``,children:(0,V.jsx)(Wu,{text:e.text})})]})},e.id))]}),(0,V.jsxs)(W,{children:[(0,V.jsxs)(G,{title:`Done`,icon:`done`,eyebrow:`done.v1 · append-only`,path:`docs/DONE.md · ${r.done.length}`,children:[(0,V.jsx)($d,{scope:O(`docs/DONE.md`)}),(0,V.jsx)(cf,{k:`done`,open:g.done,onToggle:v})]}),g.done&&r.done.slice(-8).reverse().map(e=>(0,V.jsx)(Oa,{glyph:`—`,raw:e.raw,showRaw:t,children:(0,V.jsxs)(`div`,{className:`grid grid-cols-[1fr_auto] gap-3 items-baseline py-2`,children:[(0,V.jsx)(`span`,{className:`truncate`,title:e.text,children:(0,V.jsx)(Wu,{text:e.text})}),(0,V.jsx)(`span`,{className:`font-mono text-[12px] text-ink3`,children:e.date??``})]})},e.id))]})]}),(0,V.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,V.jsxs)(W,{children:[(0,V.jsxs)(G,{title:`Facts`,icon:`facts`,path:`docs/FACTS.md · ${r.facts?.entries.length??0}${y?` · ${y} need attention`:``}`,children:[(0,V.jsx)($d,{scope:O(`docs/FACTS.md`)}),(0,V.jsx)(cf,{k:`facts`,open:g.facts||y>0,onToggle:v})]}),(g.facts||y>0)&&!r.facts&&(0,V.jsxs)(`div`,{className:`px-3 py-3 text-[13px] text-umber`,children:[`No FACTS.md yet (run `,(0,V.jsx)(`code`,{children:`groundwork update --docs`}),`).`]}),(g.facts||y>0)&&r.facts?.entries.map(e=>(0,V.jsx)(Oa,{glyph:`##`,raw:e.raw,showRaw:t,children:(0,V.jsxs)(`div`,{className:`py-2 grid grid-cols-[1fr_auto] gap-2 items-start min-w-0`,children:[(0,V.jsxs)(`div`,{className:`min-w-0`,children:[(0,V.jsxs)(`div`,{className:`font-mono font-medium text-[13px] truncate`,children:[e.id,e.stale&&(0,V.jsx)(`span`,{className:`ml-2 inline-flex`,children:(0,V.jsx)(K,{tone:`warn`,children:`stale`})})]}),e.value&&(0,V.jsx)(`div`,{className:`text-umber truncate`,title:e.value,children:(0,V.jsx)(Wu,{text:e.value})}),(0,V.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,V.jsx)(q,{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,V.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,V.jsxs)(W,{children:[(0,V.jsx)(G,{title:`Project doctor`,icon:`doctor`,path:s?`groundwork doctor --json · ${s.checks.filter(e=>e.level!==`ok`).length} flagged`:`groundwork doctor`}),!s&&(0,V.jsx)(`div`,{className:`px-3 py-3 text-[13px] text-umber`,children:`running…`}),s?.error&&(0,V.jsx)(`div`,{className:`px-3 py-3 text-[13px] text-brick`,children:s.error}),s?.checks.map(e=>(0,V.jsx)(Oa,{glyph:e.level===`ok`?`✓`:`!`,children:(0,V.jsxs)(`div`,{className:`py-1.5 text-[13px] min-w-0`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,V.jsxs)(K,{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,V.jsx)(H,{to:`/ops/skills`,className:`ml-auto font-mono text-[11px]`,children:`Update via Skills →`}):c[e.check]?c[e.check].agent?(0,V.jsxs)(`span`,{className:`ml-auto inline-flex items-center gap-1`,children:[(0,V.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,V.jsx)(Ma,{size:11}):`Fix →`}),(0,V.jsx)(ld,{id:c[e.check].agent})]}):(0,V.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,V.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,V.jsx)(`div`,{className:`truncate`,title:e,children:e},t)),e.level!==`ok`&&e.items.length>3&&(0,V.jsxs)(`div`,{className:`text-tan`,children:[`+`,e.items.length-3,` more`]})]}),d[e.check]&&(0,V.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,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`span`,{children:`sent →`}),(0,V.jsx)(ld,{id:d[e.check].replace(/^sent → /,``)})]}):d[e.check]})]})},e.check))]})]})]})}function cf({k:e,open:t,onToggle:n}){return(0,V.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 lf=({children:e})=>(0,V.jsx)(`div`,{className:`font-mono font-semibold text-[11px] uppercase tracking-[.1em] text-ink3 mx-2 mt-3.5 mb-1.5`,children:e}),uf=e=>e?new Date(e).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`}):``,df=e=>e?new Date(e).toLocaleDateString([],{month:`short`,day:`numeric`}):``,ff=e=>!!e&&Ta.includes(e),pf=(e,t)=>t&&e.startsWith(t)?e.slice(t.length).replace(/^:?\s*/,``):e,mf=`/api`;function hf(){let{projects:e,current:t}=Va(),[n,r]=Pi(),i=J(`/bus/rooms`,2e4).data??[],[a,o]=(0,P.useState)(!1),[s,c]=(0,P.useState)(!1),l=J(`/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}=J(d===`room`&&f?`/bus/rooms/${f}/messages?limit=80`:null,1e4),b=J(d===`status`?`/bus/status?limit=100`:null,15e3).data??[],x=J(d===`inbox`?`/bus/inbox?limit=200`:null,2e4),[S,C]=(0,P.useState)(!1),w=async()=>{C(!0);try{await Fa(`/bus/inbox/read`),x.refresh()}finally{C(!1)}},[T,E]=(0,P.useState)([]),[D,O]=(0,P.useState)(!1);(0,P.useEffect)(()=>{E([])},[f]);let k=(0,P.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(`${mf}/bus/rooms/${f}/messages?limit=80&before=${e}`)).json();E(e=>[...t.messages,...e])}finally{O(!1)}}};(0,P.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 M=A.filter(e=>e.prefix===`DAVID_DECISION`&&!e.answered),N=(_?.members??[]).map(e=>l.find(t=>t.agentId===e)??{agentId:e,liveness:`dead`,pane:null,role:void 0,active:!1}),ee=e=>Date.now()-e.lastTs<3e5,F=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})},I=!!v&&k.length<v.total,te=!!J(`/admin/bus-writes`,1e4).data?.enabled,[ne,re]=(0,P.useState)(`david`),[L,R]=(0,P.useState)(``),[z,B]=(0,P.useState)(!1),[ie,ae]=(0,P.useState)(null),[oe,se]=(0,P.useState)(null),ce=Qu(),[le,ue]=(0,P.useState)(null),de=J(`/bus/unread`,3e4).data?.inbox??0,fe=`#${f}`,pe=async()=>{B(!0),ae(null);try{let e=fe.startsWith(`#`)?{room:fe.slice(1)}:{to:fe.replace(/^@/,``)},t=await Fa(`/actions/send`,{as:ne,...e,text:ce.withRefs(L),answers:oe?.id?[oe.id]:void 0,kind:/^DAVID_DECISION/.test(L)?`decision`:void 0});if(t.status!==`ok`)throw Error(t.error??t.log?.slice(-1)[0]??`failed`);R(``),se(null),ce.clear()}catch(e){ae(e.message)}finally{B(!1)}};return(0,V.jsxs)(`div`,{className:`grid ${M.length>0?`grid-cols-[240px_1fr_320px]`:`grid-cols-[240px_1fr]`} gap-4 p-4 max-[980px]:grid-cols-1`,children:[le&&(0,V.jsx)(id,{agentId:le,onClose:()=>ue(null)}),(0,V.jsxs)(`aside`,{className:`bg-cream -m-4 mr-0 px-2 py-4 border-r border-sand min-w-0 overflow-auto`,children:[(0,V.jsx)(lf,{children:`Rooms · list_rooms`}),h.map(e=>(0,V.jsxs)(`button`,{onClick:()=>F({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,V.jsxs)(`span`,{className:`truncate flex items-center gap-1.5`,children:[ee(e)&&(0,V.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,V.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,V.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,V.jsx)(lf,{children:`Direct · inbox`}),(0,V.jsxs)(`button`,{onClick:()=>F({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,V.jsx)(`span`,{children:`@david · my DMs`}),de>0&&(0,V.jsxs)(`span`,{className:`font-semibold text-[11px] px-1.5 py-0.5 rounded-full bg-ember-wash text-ember-deep`,children:[de,` unread`]})]}),(0,V.jsx)(lf,{children:`Status stream`}),(0,V.jsx)(`button`,{onClick:()=>F({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,V.jsxs)(W,{className:`min-w-0`,children:[(0,V.jsxs)(G,{title:`Inbox · david`,icon:`bus`,path:`read_messages source=inbox · unread = bus cursor`,children:[x.data&&(x.data.unread>0?(0,V.jsxs)(K,{tone:`david`,children:[x.data.unread,` unread`]}):(0,V.jsx)(K,{tone:`outline`,children:`all read`})),x.data&&x.data.unread>0&&(0,V.jsx)(q,{size:`sm`,onClick:w,disabled:S,children:S?`…`:`Mark all read`})]}),x.error&&(0,V.jsx)(`div`,{className:`px-3 py-3 text-[13px] text-brick`,children:x.error}),x.data&&x.data.messages.length===0&&(0,V.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,V.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,V.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,V.jsxs)(`div`,{className:`px-3 pt-2 pb-2.5 min-w-0`,children:[(0,V.jsxs)(`div`,{className:`flex gap-2 items-baseline mb-0.5`,children:[(0,V.jsx)(`span`,{className:`font-semibold text-[13px]`,children:e.from}),(0,V.jsxs)(`span`,{className:`font-mono text-[12px] text-ink3`,children:[df(e.ts),` `,uf(e.ts)]}),te&&e.from&&(0,V.jsx)(`button`,{className:`ml-auto font-mono text-[12px] text-ember-deep bg-transparent border-0 cursor-pointer`,onClick:()=>$(e.from),title:`open the DM thread with this agent (Summon)`,children:`reply →`})]}),(0,V.jsxs)(`div`,{className:`whitespace-pre-wrap break-words text-[14px]`,children:[ff(r)&&(0,V.jsx)(Da,{prefix:r,fail:r===`VERDICT`&&/FAIL/.test(n)}),(0,V.jsx)(nd,{text:pf(n,r)})]})]})]},e.id??t)})]}):d===`status`?(0,V.jsxs)(W,{className:`min-w-0`,children:[(0,V.jsx)(G,{title:`Status stream`,icon:`health`,path:`~/agent-coord/status.jsonl · post_status`}),b.length===0&&(0,V.jsx)(`div`,{className:`px-3 py-3 text-[13px] text-umber`,children:`empty`}),b.slice().reverse().map((e,t)=>(0,V.jsxs)(`div`,{className:`grid grid-cols-[var(--spacing-gutter)_1fr] border-b border-sand last:border-b-0`,children:[(0,V.jsx)(`div`,{className:`py-2.5 flex justify-center font-mono text-[12px] text-tan border-r border-sand`,children:`◌`}),(0,V.jsxs)(`div`,{className:`px-3 pt-2 pb-2.5 min-w-0`,children:[(0,V.jsxs)(`div`,{className:`flex gap-2 items-baseline mb-0.5`,children:[(0,V.jsx)(`span`,{className:`font-semibold text-[13px]`,children:e.agentId??e.from}),(0,V.jsxs)(`span`,{className:`font-mono text-[12px] text-ink3`,children:[df(e.ts),` `,uf(e.ts)]})]}),(0,V.jsxs)(`div`,{className:`text-[14px]`,children:[(0,V.jsx)(K,{tone:`outline`,children:e.status??`?`}),e.detail&&(0,V.jsx)(`span`,{className:`ml-2 text-umber`,children:e.detail})]})]})]},t))]}):(0,V.jsxs)(W,{className:`grid grid-rows-[auto_auto_1fr_auto] min-h-0 min-w-0`,children:[(0,V.jsx)(G,{title:`#${f}`,icon:`room`,path:v?`${v.total} messages`:``,children:(0,V.jsxs)(K,{tone:`outline`,children:[_?.members?.length??0,` members`]})}),de>0&&(0,V.jsxs)(`button`,{onClick:()=>F({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,V.jsxs)(`span`,{className:`font-semibold`,children:[de,` unread DM`,de===1?``:`s`,` to david`]}),(0,V.jsx)(`span`,{className:`text-umber`,children:`— open your inbox →`})]}),N.length>0&&(0,V.jsxs)(`div`,{className:`mx-3 mb-1.5 flex items-center gap-1.5 flex-wrap font-mono text-[11px] text-tan`,children:[(0,V.jsx)(`span`,{className:`uppercase tracking-[.08em]`,children:`members`}),N.map(e=>(0,V.jsxs)(`button`,{onClick:()=>$(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,V.jsx)(Lu,{id:e.agentId,role:e.role,size:14,state:e.liveness,active:e.active}),(0,V.jsx)(`span`,{children:e.agentId})]},e.agentId)),(0,V.jsx)(`span`,{className:`ml-auto`,children:(0,V.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,V.jsxs)(`div`,{className:`mx-3 mb-1.5 flex flex-wrap gap-1.5 items-center`,children:[(0,V.jsx)(`span`,{className:`font-mono text-[11px] text-tan mr-1`,children:`rooms need a prefix:`}),Ta.map(e=>(0,V.jsx)(Da,{prefix:e},e))]}),(_?.topic||_?.motd)&&(0,V.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,V.jsxs)(`div`,{children:[(0,V.jsx)(`b`,{children:`Topic`}),` · `,_.topic]}),_.motd&&(0,V.jsxs)(`div`,{className:`mt-1 whitespace-pre-line line-clamp-4`,children:[(0,V.jsx)(`b`,{children:`MOTD`}),` · `,_.motd]})]}),(0,V.jsx)(`div`,{className:`overflow-auto max-h-[70vh] flex flex-col-reverse`,children:(0,V.jsxs)(`div`,{children:[I&&(0,V.jsx)(`div`,{className:`px-3 py-2 border-b border-sand text-center`,children:(0,V.jsx)(q,{size:`sm`,tone:`ghost`,onClick:j,disabled:D,children:D?`loading…`:`Load older (${v.total-k.length} more)`})}),y&&(0,V.jsxs)(`div`,{className:`px-3 py-3 text-[13px] text-brick`,children:[`API error: `,y]}),A.length===0&&!y&&(0,V.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,V.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,V.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,V.jsxs)(`div`,{className:`px-3 pt-2 pb-2.5 min-w-0`,children:[(0,V.jsxs)(`div`,{className:`flex gap-2 items-center mb-0.5`,children:[(0,V.jsx)(Lu,{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,V.jsx)(`span`,{className:`font-semibold text-[13px]`,children:e.from}),(0,V.jsxs)(`span`,{className:`font-mono text-[12px] text-ink3`,title:new Date(e.ts??0).toLocaleString(),children:[df(e.ts),` `,uf(e.ts)]}),n&&(0,V.jsx)(K,{tone:`david`,children:`needs David`}),e.kind&&e.kind!==`chatter`&&(0,V.jsx)(`span`,{className:`font-mono text-[11px] text-tan`,children:e.kind})]}),(0,V.jsxs)(`div`,{className:`whitespace-pre-wrap break-words text-[14px]`,children:[ff(e.prefix)&&(0,V.jsx)(Da,{prefix:e.prefix,fail:e.prefix===`VERDICT`&&/FAIL/.test(i)}),e.prefix===`DAVID_DECISION`&&e.answered&&(0,V.jsx)(K,{tone:`ok`,children:`answered`}),e.inReplyTo&&(0,V.jsx)(`button`,{onClick:()=>F({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,V.jsx)(nd,{text:pf(i,e.prefix)})]})]})]},e.id??t)})]})}),(0,V.jsxs)(`div`,{className:`border-t border-sand px-3 py-2.5 grid gap-1.5`,children:[oe&&(0,V.jsxs)(`div`,{className:`text-[12px] text-umber flex gap-2 items-center`,children:[(0,V.jsxs)(`span`,{className:`font-mono`,children:[`replying to `,oe.from,` · `,uf(oe.ts)]}),(0,V.jsx)(`button`,{className:`border-0 bg-transparent text-ink3 cursor-pointer`,onClick:()=>{se(null),R(``)},children:`✕`})]}),(0,V.jsxs)(`div`,{className:`grid grid-cols-[auto_auto_1fr_auto] gap-2 items-center`,children:[(0,V.jsxs)(`select`,{value:ne,onChange:e=>re(e.target.value),disabled:!te,className:`text-[13px] px-2 py-2 border border-dust rounded-kit bg-paper text-walnut font-mono`,title:`send as`,children:[(0,V.jsx)(`option`,{value:`david`,children:`as david`}),(0,V.jsx)(`option`,{value:`groundwork-console`,children:`as groundwork-console`})]}),(0,V.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,V.jsx)(`input`,{value:L,onChange:e=>R(e.target.value),onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&te&&ce.hasContent(L)&&pe()},onPaste:ce.onPaste,onDrop:ce.onDrop,onDragOver:ce.onDragOver,disabled:!te,className:`text-[13px] px-2.5 py-2 border border-dust rounded-kit bg-paper text-walnut`,placeholder:te?fe.startsWith(`#`)?`FYI: … (rooms need a prefix)`:`message…`:`bus writes are off — enable in the header`}),(0,V.jsx)(q,{tone:`primary`,size:`sm`,onClick:pe,disabled:!te||z||ce.busy||!ce.hasContent(L),children:z?`Sending…`:`Send`})]}),(0,V.jsx)($u,{a:ce}),ie&&(0,V.jsx)(`div`,{className:`text-[12px] text-brick`,children:ie}),te&&(0,V.jsxs)(`div`,{className:`text-[11px] font-mono text-tan`,children:[`every send is a Run · rooms require a prefix · `,(0,V.jsx)(`span`,{className:`text-ember-deep`,children:`DAVID_DECISION:`}),` replies are pinned (kind: decision)`]})]})]}),M.length>0&&(0,V.jsx)(`aside`,{className:`grid gap-3.5 content-start min-w-0`,children:M.slice(0,1).map(e=>(0,V.jsxs)(`div`,{className:`border border-ember border-l-4 rounded-kit bg-paper`,children:[(0,V.jsxs)(`div`,{className:`flex justify-between items-center px-3 py-2 border-b border-sand`,children:[(0,V.jsx)(Da,{prefix:`DAVID_DECISION`}),(0,V.jsxs)(`span`,{className:`text-[13px] text-umber`,children:[uf(e.ts),` · `,e.from]})]}),(0,V.jsx)(`div`,{className:`px-3 py-2.5 text-[13px] whitespace-pre-wrap break-words line-clamp-6`,children:(0,V.jsx)(nd,{text:pf(e.text??``,e.prefix)})}),(0,V.jsxs)(`div`,{className:`flex gap-2 px-3 py-2 border-t border-sand`,children:[(0,V.jsx)(q,{tone:`primary`,size:`sm`,disabled:!te,onClick:()=>{se(e),re(`david`),R(`DAVID_DECISION: `)},children:`Reply as David`}),!te&&(0,V.jsx)(Aa,{})]})]},e.id))})]})}function gf({root:e,min:t=4,deps:n=[]}){let[r,i]=(0,P.useState)([]),[a,o]=(0,P.useState)(null);if((0,P.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,V.jsxs)(`nav`,{"aria-label":`document outline`,className:`grid gap-0.5`,children:[(0,V.jsxs)(`div`,{className:`font-semibold text-[13px] uppercase tracking-[.08em] text-umber px-1 pt-1.5 pb-1`,children:[`Outline · `,r.length]}),(0,V.jsx)(`div`,{className:`max-h-[50vh] overflow-auto overscroll-contain grid gap-0 border-l border-sand ml-1`,children:r.map(e=>(0,V.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,V.jsx)(`span`,{className:`block truncate`,children:e.text})},e.id))})]})}var _f=[[/^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`]],vf=/^(templates\/|phases\/templates\/|\.groundwork\/)/,yf=/^(QUEUE|DONE|WORKSTREAMS|FACTS)\.md$/i,bf=e=>_f.find(([t])=>t.test(e)),xf=({children:e})=>(0,V.jsx)(`div`,{className:`font-mono font-semibold text-[11px] uppercase tracking-[.1em] text-ink3 mt-4 mb-1.5 first:mt-0`,children:e}),Sf=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 Cf(){let{current:e}=Va(),{doc:t}=cr(),n=J(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=J(`/knowledge`,6e4).data,c=J(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&&(yf.test(a)||o),p=J(`/admin/seam-writes`,1e4).data?.enabled??!1,[m,h]=(0,P.useState)(!1),[g,_]=(0,P.useState)(``),[v,y]=(0,P.useState)(``),[b,x]=(0,P.useState)(``),[S,C]=(0,P.useState)(null),w=m&&g!==v,[T,E]=(0,P.useState)(!0),[D,O]=(0,P.useState)(!0),[k]=Pi(),A=ir(),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},M=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`)},[N,ee]=(0,P.useState)(k.get(`view`)??`rendered`),F=k.get(`line`)?Number(k.get(`line`)):null;(0,P.useEffect)(()=>{let e=k.get(`view`);(e===`source`||e===`split`||e===`rendered`)&&ee(e)},[k]),(0,P.useEffect)(()=>{if(!F||!l)return;let e=setTimeout(()=>{document.getElementById(`L${F}`)?.scrollIntoView({block:`center`})},100);return()=>clearTimeout(e)},[F,l,N]),(0,P.useEffect)(()=>{h(!1),_(``),y(``),x(``),C(null)},[a,e]),(0,P.useEffect)(()=>{!m||w||!l||l.source===v||(_(l.source),y(l.source),x(l.sha))},[l,m,w,v]),(0,P.useEffect)(()=>{if(!w)return;let e=e=>{e.preventDefault(),e.returnValue=``};return window.addEventListener(`beforeunload`,e),()=>window.removeEventListener(`beforeunload`,e)},[w]);let I=()=>{!l||f||(_(l.source),y(l.source),x(l.sha),h(!0),ee(`split`),C(null))},te=()=>{h(!1),_(``),y(``),x(``),C(null)},ne=(0,P.useCallback)(async()=>{if(!(!e||!a||!b)){C(`saving`);try{let t=await Ia(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,P.useEffect)(()=>{if(!m)return;let e=e=>{(e.metaKey||e.ctrlKey)&&e.key===`s`&&(e.preventDefault(),p&&w&&S!==`saving`&&ne())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[m,p,w,S,ne]);let re=e=>{m&&w&&!window.confirm(`Discard unsaved edits?`)&&e.preventDefault()},L=m?g:l?.source??``,R=(0,P.useRef)(null),z=(0,P.useCallback)(()=>N===`source`?null:R.current?.querySelector(`.md`)??null,[N]),B=l?.git,ie=(0,P.useMemo)(()=>{let e=[];return B?.lastCommit&&D&&e.push({kind:`commit`,label:`${B.lastCommit.short} · ${B.lastCommit.subject} · ${B.lastCommit.author} · ${Sf(B.lastCommit.date)}`,hunks:B.lastCommit.hunks}),B&&T&&B.uncommitted.length&&e.push({kind:`uncommitted`,label:`working tree vs HEAD`,hunks:B.uncommitted}),e},[B,D,T]),ae=new Set(r?.lastCommit?.files??[]),oe=J(e?`/projects/${e}/agents`:null,3e4).data??{aide:null,coordinator:null};return(0,V.jsxs)(`div`,{className:`grid grid-cols-[260px_1fr_320px] min-h-full max-[1100px]:grid-cols-1`,children:[(0,V.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,V.jsx)(xf,{children:`${e||`project`} · docs/`}),i.length===0&&(0,V.jsx)(`div`,{className:`text-[12px] text-umber px-1.5`,children:`no docs/ found`}),(()=>{let e=i.filter(e=>!vf.test(e)),t=_f.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,V.jsxs)(H,{to:`/docs/${encodeURIComponent(e)}`,onClick:re,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,V.jsx)(`span`,{className:`${e===a?`text-umber`:`text-tan`}`,children:n?Ca[n]({size:14}):Ca.docs({size:14})}),(0,V.jsx)(`span`,{className:`truncate ${t?`font-sans`:`font-mono`}`,children:t??e.replace(/^phases\//,``)}),(0,V.jsxs)(`span`,{className:`flex gap-1 items-center`,children:[i===`??`?(0,V.jsx)(`span`,{className:`text-[10px] font-mono font-semibold text-tan`,children:`new`}):i?(0,V.jsx)(`span`,{className:`w-2 h-2 rounded-full bg-amber`,title:`uncommitted (${i})`}):null,ae.has(e)&&(0,V.jsx)(`span`,{className:`w-2 h-2 rounded-full bg-leaf`,title:`in last commit ${r?.lastCommit?.short}`})]})]},e)};return(0,V.jsxs)(V.Fragment,{children:[t.length>0&&(0,V.jsxs)(V.Fragment,{children:[(0,V.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=bf(e);return(0,V.jsx)(s,{f:e,label:t[1],icon:t[2]},e)})]}),n.length>0&&(0,V.jsxs)(V.Fragment,{children:[(0,V.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,V.jsx)(s,{f:e,icon:`phases`},e))]}),o.length>0&&(0,V.jsxs)(V.Fragment,{children:[(0,V.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,V.jsx)(s,{f:e},e))]}),i.length!==e.length&&(0,V.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,V.jsxs)(`div`,{className:`mt-3 px-1.5 text-[11px] font-mono text-ink3 leading-[1.5]`,children:[(0,V.jsx)(`span`,{className:`inline-block w-2 h-2 rounded-full bg-leaf mr-1`}),`last docs commit `,(0,V.jsx)(`b`,{className:`text-walnut`,children:r.lastCommit.short}),` · `,Sf(r.lastCommit.date),(0,V.jsx)(`div`,{className:`truncate text-tan`,title:r.lastCommit.subject,children:r.lastCommit.subject})]}),(0,V.jsx)(xf,{children:`Knowledge · global${s?.exists?``:` · not configured`}`}),s&&!s.exists&&(0,V.jsxs)(`div`,{className:`text-[12px] text-umber px-1.5`,children:[`No knowledge repo — run `,(0,V.jsx)(`code`,{children:`groundwork knowledge init`}),` (or `,(0,V.jsx)(`code`,{children:`link <dir>`}),`).`]}),s?.exists&&(()=>{let e=({file:e,label:t,sub:n,icon:r=`knowledge`})=>{let i=`kb:${e}`;return(0,V.jsxs)(H,{to:`/docs/${encodeURIComponent(i)}`,onClick:re,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,V.jsx)(`span`,{className:i===a?`text-umber`:`text-tan`,children:Ca[r]({size:14})}),(0,V.jsx)(`span`,{className:`truncate`,children:t}),n&&(0,V.jsx)(`span`,{className:`font-mono text-[10px] text-tan`,children:n})]},i)};return(0,V.jsxs)(V.Fragment,{children:[s.index&&(0,V.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,V.jsxs)(`div`,{children:[(0,V.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,V.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,V.jsxs)(`div`,{children:[(0,V.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,V.jsx)(e,{file:t.file,label:`${t.id} · ${t.title}`},t.file))]}),s.notes.length>0&&(0,V.jsxs)(`div`,{children:[(0,V.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,V.jsx)(e,{file:t.file,label:t.title??t.file.replace(/^notes\//,``),icon:`docs`},t.file))]}),(0,V.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,V.jsxs)(`main`,{ref:R,className:`px-10 py-7 pb-16 bg-paper min-w-0`,children:[(0,V.jsxs)(`div`,{className:`flex items-center justify-between gap-3 mb-2 flex-wrap`,children:[(0,V.jsxs)(`div`,{className:`font-mono text-[12px] text-ink3 truncate`,children:[l?.path??a??``,d&&` · loading…`,m&&w&&` · unsaved`]}),(0,V.jsxs)(`div`,{className:`flex gap-1.5 items-center flex-wrap`,children:[B&&!B.repo&&(0,V.jsx)(K,{tone:`outline`,children:`not a git repo`}),B?.repo&&B.untracked&&(0,V.jsx)(K,{tone:`warn`,children:`untracked file`}),B?.repo&&B.tracked&&(0,V.jsxs)(V.Fragment,{children:[(0,V.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&&B.uncommitted.length?`bg-amber-wash text-amber border-amber-line`:`bg-paper text-umber border-dust`}`,title:`working tree vs HEAD`,children:[(0,V.jsx)(`span`,{className:`w-2 h-2 rounded-full bg-amber`}),`uncommitted · `,B.uncommitted.length,` hunk`,B.uncommitted.length===1?``:`s`]}),B.lastCommit&&(0,V.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:`${B.lastCommit.subject} · ${B.lastCommit.author}`,children:[(0,V.jsx)(`span`,{className:`w-2 h-2 rounded-full bg-leaf`}),`last commit `,B.lastCommit.short,` · `,Sf(B.lastCommit.date)]})]}),(0,V.jsx)(`span`,{className:`w-px h-5 bg-sand mx-1`}),(0,V.jsx)(q,{tone:`ghost`,size:`sm`,"aria-pressed":N===`rendered`,onClick:()=>ee(`rendered`),children:`Rendered`}),(0,V.jsx)(q,{tone:`ghost`,size:`sm`,"aria-pressed":N===`source`,onClick:()=>ee(`source`),children:`Source`}),(0,V.jsx)(q,{tone:`ghost`,size:`sm`,"aria-pressed":N===`split`,onClick:()=>ee(`split`),children:`Split`}),(0,V.jsx)(`span`,{className:`w-px h-5 bg-sand mx-1`}),o?(0,V.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,V.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,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(q,{size:`sm`,onClick:te,children:`Discard`}),(0,V.jsx)(q,{size:`sm`,tone:`primary`,onClick:()=>void ne(),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,V.jsx)(`span`,{className:`font-mono text-[11px] text-tan`,children:`seam writes are off (header → seam)`}),S===`saved`&&!w&&(0,V.jsx)(`span`,{className:`font-mono text-[11px] text-moss`,children:`saved`}),S&&S!==`saving`&&S!==`saved`&&(0,V.jsx)(`span`,{className:`font-mono text-[11px] text-brick max-w-[28ch] truncate`,title:S,children:S})]}):(0,V.jsx)(q,{size:`sm`,onClick:I,disabled:!l,title:`Edit this file in Split (source + preview). Save writes docs/ as a Run.`,children:`Edit`})]})]}),u&&(0,V.jsxs)(`div`,{className:`text-[13px] text-brick`,children:[`Could not load: `,u]}),l&&N===`rendered`&&(0,V.jsx)(`div`,{onClick:M,children:(0,V.jsx)(Tu,{source:L,changes:m?[]:ie})}),l&&N===`source`&&(m?(0,V.jsx)(wf,{value:g,onChange:_,readOnly:!p}):(0,V.jsx)(Tf,{src:l.source,g:B,showUncommitted:T,showCommit:D,jumpLine:F})),l&&N===`split`&&(0,V.jsxs)(`div`,{className:`grid grid-cols-2 gap-4 items-start`,children:[(0,V.jsx)(`div`,{className:`min-w-0`,onClick:M,children:(0,V.jsx)(Tu,{source:L,changes:m?[]:ie})}),(0,V.jsx)(`div`,{className:`min-w-0 sticky top-2`,children:m?(0,V.jsx)(wf,{value:g,onChange:_,readOnly:!p}):(0,V.jsx)(Tf,{src:l.source,g:B,showUncommitted:T,showCommit:D,jumpLine:F})})]}),l&&ie.length>0&&(0,V.jsxs)(`div`,{className:`mt-6 text-[12px] font-mono text-ink3`,children:[`Hover a highlighted block for its diff · `,(0,V.jsx)(`span`,{className:`text-amber`,children:`amber`}),` = uncommitted, `,(0,V.jsx)(`span`,{className:`text-leaf`,children:`green`}),` = last commit touching this file.`]})]}),(0,V.jsxs)(`aside`,{className:`bg-cream border-l border-sand p-3.5 max-[1100px]:hidden`,children:[N!==`source`&&(0,V.jsx)(`div`,{className:`mb-3`,children:(0,V.jsx)(gf,{root:z,deps:[L,N,a]})}),(0,V.jsx)(`div`,{className:`flex justify-between items-center px-1 pt-1.5 pb-2`,children:(0,V.jsx)(`span`,{className:`font-semibold text-[13px] uppercase tracking-[.08em] text-umber`,children:`Ask an agent`})}),(0,V.jsxs)(`div`,{className:`grid gap-2 px-1 text-[13px]`,children:[(0,V.jsxs)(`div`,{className:`text-[12px] text-umber`,children:[`Summon opens the DM thread with its context line set to `,(0,V.jsxs)(`code`,{className:`font-mono text-[11px]`,children:[o?`groundwork-knowledge/${a.slice(3)}`:`${e}/docs/${a}`,F?`:${F}`:``]}),F?``:` — select a line in Source view (or Show line) to cite it`,`.`]}),(0,V.jsxs)(`div`,{className:`flex gap-1.5 flex-wrap`,children:[(0,V.jsx)(q,{size:`sm`,tone:`primary`,onClick:()=>$(oe.aide??``),disabled:!oe.aide,title:oe.aide?`DM ${oe.aide} about this doc`:`no live aide`,children:`Aide`}),(0,V.jsx)(q,{size:`sm`,onClick:()=>$(oe.coordinator??``),disabled:!oe.coordinator,title:oe.coordinator?`DM ${oe.coordinator}`:`no live coordinator`,children:`Coordinator`}),(0,V.jsx)(q,{size:`sm`,tone:`ghost`,onClick:()=>$(``),title:`pick from the radial`,children:`Other…`})]})]}),B?.lastCommit&&(0,V.jsxs)(`div`,{className:`mt-4 px-1 text-[12px] font-mono text-ink3 leading-[1.6]`,children:[(0,V.jsx)(`div`,{className:`text-umber font-sans font-semibold text-[13px] mb-1`,children:`Last change to this file`}),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`b`,{className:`text-walnut`,children:B.lastCommit.short}),` · `,B.lastCommit.author]}),(0,V.jsx)(`div`,{children:new Date(B.lastCommit.date).toLocaleString()}),(0,V.jsx)(`div`,{className:`text-walnut mt-1 font-sans`,children:B.lastCommit.subject}),(0,V.jsxs)(`div`,{className:`mt-1 text-tan`,children:[B.lastCommit.hunks.length,` hunk`,B.lastCommit.hunks.length===1?``:`s`]})]})]})]})}function wf({value:e,onChange:t,readOnly:n}){return(0,V.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 Tf({src:e,g:t,showUncommitted:n,showCommit:r,jumpLine:i}){let a=(e,t)=>!!e?.some(e=>xu(e).some(([e,n])=>t>=e&&t<n));return(0,V.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(`
36
- `).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,V.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,V.jsx)(`span`,{className:`text-right select-none ${u?`text-ember font-semibold`:`text-tan`}`,children:s}),(0,V.jsx)(`span`,{children:e||` `})]},o)})})}var Ef=e=>/done|merged|deployed|complete|closed|✅/i.test(e),Df=e=>Ef(e)?`ok`:/block/i.test(e)?`bad`:/queued|hold|wait/i.test(e)?`warn`:`neutral`;function Of({project:e}){let t=J(e?`/projects/${e}/board`:null,15e3).data,n=J(`/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=>!Ef(e.status)),a=e=>n.find(t=>t.agentId===e||e.includes(t.agentId))?.agentId??null;return(0,V.jsxs)(`div`,{className:`border border-sand rounded-kit bg-paper px-3 py-2 grid gap-1.5`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,V.jsx)(`span`,{className:`font-mono text-[10px] uppercase tracking-[.1em] text-tan`,children:`now`}),r?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(H,{to:`/board`,className:`font-semibold text-[13px] hover:no-underline text-walnut hover:text-ember-deep`,children:r.title}),(0,V.jsx)(K,{tone:r.state===`ongoing`?`david`:`neutral`,children:r.state}),(0,V.jsxs)(`span`,{className:`font-mono text-[11px] text-ink3`,children:[r.done,`/`,r.total,` tasks`,r.streams?` · ${r.streams} streams`:``]})]}):(0,V.jsx)(`span`,{className:`text-[13px] text-umber`,children:`no phase in flight`}),(0,V.jsxs)(`span`,{className:`ml-auto font-mono text-[11px] text-ink3`,children:[i.length,` active stream`,i.length===1?``:`s`]})]}),i.length>0&&(0,V.jsx)(`div`,{className:`flex gap-1.5 flex-wrap`,children:i.slice(0,8).map(e=>{let t=a(e.owner);return(0,V.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,V.jsx)(ld,{id:t,bare:!0,size:`sm`}):(0,V.jsxs)(`span`,{className:`inline-flex items-center gap-1 font-mono text-[12px] text-umber`,children:[(0,V.jsx)(Lu,{id:e.owner,size:14,state:`dead`}),e.owner]}),(0,V.jsx)(`span`,{className:`text-[12px] truncate`,children:e.name}),(0,V.jsx)(K,{tone:Df(e.status),children:e.status.replace(/^[^\w]+/,``).slice(0,18)})]},e.name)})})]})}var kf=`/api`,Af=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 jf(){let{current:e}=Va(),{linkify:t}=ju(),[n,r]=(0,P.useState)(`project`),[i,a]=(0,P.useState)(40),[o,s]=(0,P.useState)(2),[c,l]=(0,P.useState)(()=>localStorage.getItem(`groundwork-console.monitor.layout`)??`grid`),[u,d]=(0,P.useState)(()=>Number(localStorage.getItem(`groundwork-console.monitor.tileW`)??520));(0,P.useEffect)(()=>{localStorage.setItem(`groundwork-console.monitor.layout`,c),localStorage.setItem(`groundwork-console.monitor.tileW`,String(u))},[c,u]);let[f,p]=(0,P.useState)([]),[m,h]=(0,P.useState)(null),[g,_]=(0,P.useState)(null),[v,y]=(0,P.useState)(!1),[b,x]=(0,P.useState)(!0),[S,C]=(0,P.useState)(0),w=J(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,P.useRef)({}),D=(0,P.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,P.useRef)({}),A=(0,P.useRef)({});(0,P.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,P.useEffect)(()=>{let t=!0,r=async()=>{if(!v)try{let r=await fetch(`${kf}/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]);let[j,M]=(0,P.useState)({}),N=e=>j[e]!==!1;(0,P.useEffect)(()=>{for(let[e,t]of Object.entries(E.current))t&&N(e)&&(t.scrollTop=t.scrollHeight)},[S]);let ee=e=>t=>{let n=t.currentTarget,r=n.scrollHeight-n.scrollTop-n.clientHeight<24;r!==N(e)&&M(t=>({...t,[e]:r}))},F=e=>{M(t=>({...t,[e]:!0}));let t=E.current[e];t&&(t.scrollTop=t.scrollHeight)},I=f.filter(e=>e.active).length;return(0,V.jsxs)(`div`,{className:`p-4 grid gap-3.5 content-start`,children:[g&&(0,V.jsx)(id,{agentId:g,onClose:()=>_(null)}),(0,V.jsxs)(`div`,{className:`flex items-baseline justify-between flex-wrap gap-2`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`span`,{className:`font-display font-bold text-[34px] leading-[1.1] tracking-[-.015em] text-ember`,children:`Monitor`}),(0,V.jsxs)(`span`,{className:`ml-3 text-[13px] text-umber`,children:[n===`project`?e:`all projects`,` · `,f.length,` pane`,f.length===1?``:`s`,` · `,I,` active · read-only capture every 3 s`]})]}),(0,V.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,V.jsxs)(`span`,{className:`inline-flex border border-dust rounded-kit overflow-hidden`,children:[(0,V.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,V.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,V.jsxs)(`span`,{className:`inline-flex border border-dust rounded-kit overflow-hidden`,children:[(0,V.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,V.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,V.jsx)(`span`,{className:`inline-flex border border-dust rounded-kit overflow-hidden`,children:[1,2,3].map(e=>(0,V.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,V.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,V.jsxs)(`option`,{value:e,children:[e,`px`]},e))}),(0,V.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,V.jsxs)(`option`,{value:e,children:[e,` lines`]},e))}),(0,V.jsxs)(`label`,{className:`font-mono text-[11px] text-ink3 flex items-center gap-1`,children:[(0,V.jsx)(`input`,{type:`checkbox`,checked:b,onChange:e=>x(e.target.checked)}),`colors`]}),(0,V.jsx)(q,{size:`sm`,onClick:()=>y(e=>!e),"aria-pressed":v,children:v?`Resume`:`Pause`})]})]}),n===`project`&&e&&(0,V.jsx)(Of,{project:e}),m&&(0,V.jsx)(W,{className:`px-4 py-3 text-[13px] text-brick`,children:m}),f.length===0&&!m&&(0,V.jsxs)(W,{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,V.jsxs)(V.Fragment,{children:[` Try `,(0,V.jsx)(`button`,{className:`underline text-ember-deep bg-transparent border-0 p-0 cursor-pointer`,onClick:()=>r(`all`),children:`all projects`}),`.`]})]}),(0,V.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,V.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,V.jsxs)(W,{className:`grid grid-rows-[auto_1fr_auto]`,children:[(0,V.jsx)(`div`,{style:{height:4,background:dd(e.role)}}),(0,V.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2 border-b border-sand min-w-0`,children:[(0,V.jsx)(Lu,{id:e.agentId,role:e.role,size:20,state:e.liveness,active:e.active}),(0,V.jsxs)(`span`,{className:`min-w-0`,children:[(0,V.jsx)(`span`,{className:`block font-mono font-semibold text-[13px] truncate leading-tight`,children:e.agentId}),(0,V.jsxs)(`span`,{className:`block font-mono text-[10px] uppercase tracking-[.06em] leading-tight`,style:{color:dd(e.role)},children:[fd(e.role),n===`project`&&T(e.agentId).length>0?(0,V.jsxs)(`span`,{className:`text-ink3 normal-case tracking-normal`,children:[` · `,T(e.agentId).map(e=>e.name).join(` · `)]}):``]})]}),n===`all`&&e.project&&(0,V.jsx)(`span`,{className:`font-mono text-[11px] text-tan truncate`,children:e.project}),(0,V.jsxs)(`span`,{className:`ml-auto flex items-center gap-1.5 shrink-0`,children:[(0,V.jsx)(`span`,{className:`font-mono text-[11px] text-ink3`,title:`last pane output`,children:e.active?(0,V.jsx)(K,{tone:`ok`,children:`active`}):(0,V.jsxs)(`span`,{className:`text-tan`,children:[`quiet `,Af(e.paneActivity)]})}),!N(e.agentId)&&(0,V.jsx)(`button`,{className:`font-mono text-[11px] px-1.5 py-0.5 rounded-full bg-amber-wash text-amber border border-amber-line cursor-pointer`,onClick:()=>F(e.agentId),title:`follow paused while you read — click to jump to the bottom and follow again`,children:`↓ follow`}),(0,V.jsx)(`button`,{className:`font-mono text-[11px] text-ember-deep bg-transparent border-0 cursor-pointer`,onClick:()=>$(e.agentId),title:`DM this agent (Summon)`,children:`DM`}),(0,V.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,V.jsx)(`pre`,{ref:t=>{E.current[e.agentId]=t},onScroll:ee(e.agentId),className:`m-0 px-3 py-2 overflow-auto overscroll-contain 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?po(e.capture.ansi):e.capture.text,e.project??void 0):`—`})]})},e.agentId))}),(0,V.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 Mf=[{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 Nf(){let{running:e}=Wa(),t=nr(),n=Mf.find(e=>t.pathname.startsWith(`/ops/${e.to}`));return(0,V.jsxs)(`div`,{className:`grid grid-rows-[auto_1fr] min-h-0`,children:[(0,V.jsxs)(`div`,{className:`px-4 pt-3 flex items-end gap-1 border-b border-sand bg-cream/60`,children:[(0,V.jsx)(`span`,{className:`font-mono text-[10px] uppercase tracking-[.1em] text-tan mr-2 pb-2.5`,children:`ops`}),Mf.map(t=>(0,V.jsxs)(Ai,{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,V.jsx)(`span`,{className:`text-tan`,children:Ca[t.icon]({size:14})}),t.label,t.to===`runs`&&e>0?(0,V.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,V.jsx)(`span`,{className:`ml-auto pb-2.5 font-mono text-[11px] text-tan hidden lg:inline`,children:n.hint})]}),(0,V.jsx)(Lr,{})]})}function Pf(){return(0,V.jsx)(`div`,{className:`p-4`,children:(0,V.jsx)(Rd,{})})}function Ff({title:e,danger:t,body:n,confirmWord:r,action:i,payload:a,preview:o,onClose:s,onDone:c}){let[l,u]=(0,P.useState)(``),[d,f]=(0,P.useState)(!1),[p,m]=(0,P.useState)(null),[h,g]=(0,P.useState)(null),_=async()=>{f(!0);try{let e=await Fa(i,{...a,confirm:l});m(e),e.status===`ok`&&c?.(e)}finally{f(!1)}},v=async()=>{if(o){f(!0);try{g(await o())}finally{f(!1)}}},y=(e,t)=>(0,V.jsxs)(`div`,{className:`p-2 rounded-kit border min-w-0 max-w-full ${t===`preview`?`border-dust bg-sand/40`:e.status===`ok`?`border-moss-line bg-moss-wash/50`:`border-brick-line bg-brick-wash/50`}`,children:[(0,V.jsxs)(`div`,{className:`font-mono text-[12px]`,children:[t===`preview`?(0,V.jsx)(K,{tone:`warn`,children:`preview · nothing written`}):(0,V.jsx)(K,{tone:e.status===`ok`?`ok`:`bad`,children:e.status}),` `,(0,V.jsx)(`b`,{children:e.label})]}),(0,V.jsxs)(`pre`,{className:`m-0 mt-1 font-mono text-[12px] whitespace-pre-wrap max-h-[30vh] overflow-auto min-w-0 max-w-full break-words overscroll-contain`,children:[e.log.join(`
37
- `),e.result===void 0?``:`
38
- `+JSON.stringify(e.result,null,1).slice(0,2e3),e.error?`
39
- `+e.error:``]})]});return(0,V.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,V.jsxs)(`div`,{className:`w-[600px] bg-paper border rounded-kit shadow-panel ${t?`border-brick`:`border-sand`}`,children:[(0,V.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,V.jsxs)(`div`,{className:`p-4 grid gap-3 text-[13px] text-umber`,children:[n,o&&!h&&(0,V.jsx)(`div`,{children:(0,V.jsx)(q,{size:`sm`,onClick:v,disabled:d,children:d?`…`:`Preview (dry-run · writes nothing)`})}),h&&y(h,`preview`),!p&&(0,V.jsxs)(`label`,{className:`grid gap-1`,children:[(0,V.jsxs)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:[`Type `,r,` to `,o?`apply — the preview above changed nothing`:`confirm`]}),(0,V.jsx)(`input`,{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`})]}),p&&y(p,`result`)]}),(0,V.jsxs)(`div`,{className:`px-4 py-3 border-t border-sand flex justify-end gap-2`,children:[(0,V.jsx)(q,{size:`sm`,onClick:s,children:p?`Close`:`Cancel`}),!p&&(0,V.jsx)(q,{size:`sm`,tone:`primary`,onClick:_,disabled:l!==r||d,children:d?(0,V.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,V.jsx)(Ma,{}),` Running…`]}):o?`Apply`:`Run`})]})]})})}var If=`18px 1.6fr 1fr 1fr 1fr 1.2fr auto`,Lf=[[`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`]],Rf=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 zf(){let{current:e,projects:t}=Va(),{data:n,error:r,loading:i}=J(`/bus/agents`,2e4),[a,o]=(0,P.useState)(`project`),{runs:s}=Wa(),c=J(`/kit`).data,[l,u]=(0,P.useState)(!1),d=s.find(e=>(e.label===`bus doctor`||e.label===`bus doctor · fix`)&&e.status===`ok`),f=(d?.result?.findings??[]).filter(e=>e.fixable&&e.level!==`ok`),p=(d?.result?.findings??[]).find(e=>e.check===`dist-behind-source`&&e.level!==`ok`),m=J(`/health`,6e4).data?.requires?.paths?.kitCheckout??null,h=d?.result,g=async()=>{u(!0);try{await Fa(`/actions/bus-doctor`)}finally{u(!1)}},[_,v]=(0,P.useState)(!1),[y,b]=(0,P.useState)(null),[x,S]=(0,P.useState)(null),[C,w]=(0,P.useState)(!1),[T,E]=(0,P.useState)(!1),D=J(a===`project`&&e?`/projects/${e}/fleet`:null,2e4).data,O=J(`/admin/bus-writes`,1e4).data?.enabled??!1,k=ir(),A=n??[],j=t.find(t=>t.name===e)?.room,M=A.filter(t=>t.project===e||j&&t.project===j),N=a===`project`?M:A,ee=A.find(e=>/coordinator/i.test(e.role??``)&&/kit|agent-workflow/i.test(e.project??``)&&e.liveness!==`dead`)?.agentId??null,F=N.filter(e=>e.liveness===`dead`&&![`groundwork-console`,`david`].includes(e.agentId)).map(e=>e.agentId),I=N.filter(e=>e.liveness===`live`).length,te=e=>t.find(t=>t.name===e.project||t.room&&t.room===e.project)?.name,ne=e=>te(e)??`~${e.project??`—`}`,re=a===`all`?[...new Set(A.map(ne))].sort((e,t)=>!!e.startsWith(`~`)-+!!t.startsWith(`~`)||e.localeCompare(t)):[e],L=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,V.jsxs)(`div`,{className:`grid grid-cols-[1fr_340px] gap-4 p-4 max-[980px]:grid-cols-1`,children:[(0,V.jsxs)(`div`,{className:`grid gap-3.5 content-start min-w-0`,children:[(0,V.jsxs)(`div`,{className:`flex items-start justify-between gap-3 flex-wrap`,children:[(0,V.jsxs)(`div`,{className:`min-w-0`,children:[(0,V.jsx)(`span`,{className:`font-display font-bold text-[34px] leading-[1.1] tracking-[-.015em] text-ember`,children:`Fleets`}),(0,V.jsxs)(`span`,{className:`ml-3 text-[13px] text-umber whitespace-nowrap`,children:[a===`project`?`${e} · `:`all projects · `,N.length,` registered · `,I,` live`]})]}),(0,V.jsxs)(`div`,{className:`flex items-center gap-1.5 flex-wrap justify-end`,children:[(0,V.jsxs)(`span`,{className:`inline-flex border border-dust rounded-kit overflow-hidden whitespace-nowrap`,children:[(0,V.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`,` · `,M.length]}),(0,V.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 · `,A.length]})]}),(0,V.jsx)(q,{size:`sm`,onClick:()=>k(`/monitor`),children:`Monitor`}),(0,V.jsx)(q,{size:`sm`,tone:`primary`,onClick:()=>w(!0),title:`spawn an agent into tmux for this project`,children:`Spawn agent…`}),(0,V.jsxs)(`div`,{className:`relative`,children:[(0,V.jsx)(q,{size:`sm`,onClick:()=>E(e=>!e),"aria-expanded":T,children:`Admin ▾`}),T&&(0,V.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:()=>E(!1),children:[(0,V.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:()=>{E(!1),g()},disabled:l,children:[l?`Running doctor…`:`Run bus doctor`,(0,V.jsx)(`div`,{className:`font-mono text-[11px] text-tan`,children:`MCP doctor as groundwork-console · read-only`})]}),(0,V.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:()=>{E(!1),b({kind:`prune`})},children:[`Prune bus data…`,(0,V.jsx)(`div`,{className:`font-mono text-[11px] text-tan`,children:`old messages/status/inbox · dry-run first`})]}),(0,V.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:()=>{E(!1),b({kind:`dead`})},disabled:F.length===0,children:[`Unregister dead (`,F.length,a===`project`?` in ${e}`:``,`)…`,(0,V.jsx)(`div`,{className:`font-mono text-[11px] text-tan`,children:`force_unregister agents inactive > 24 h`})]}),j&&(0,V.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:()=>{E(!1),v(!0)},children:[`Decommission fleet + #`,j,`…`,(0,V.jsx)(`div`,{className:`font-mono text-[11px] text-tan`,children:`unregister members + delete room`})]}),!O&&(0,V.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`})]})]})]})]}),C&&(0,V.jsx)(Wd,{project:e,canWrite:O,onClose:()=>{w(!1)}}),x&&(0,V.jsx)(id,{agentId:x,onClose:()=>S(null)}),y?.kind===`fix`&&(0,V.jsx)(Ff,{title:`Bus doctor · fix fixable (${f.length})`,confirmWord:`FIX`,action:`/actions/bus-doctor`,payload:{fix:!0},onClose:()=>{b(null),g()},body:(0,V.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,V.jsxs)(`div`,{children:[`Runs the MCP `,(0,V.jsx)(`code`,{children:`doctor`}),` with `,(0,V.jsx)(`code`,{children:`fix: true`}),` as `,(0,V.jsx)(`code`,{children:`groundwork-console`}),` — only its own fix path, only the findings it tags `,(0,V.jsx)(`b`,{children:`fixable`}),`. Before/after counts and the delta are shown in the result; nothing in `,(0,V.jsx)(`code`,{children:`~/agent-coord`}),` is edited by hand. Gated by bus writes.`]}),(0,V.jsx)(`ul`,{className:`m-0 pl-4 grid gap-0.5`,children:f.map(e=>(0,V.jsxs)(`li`,{children:[(0,V.jsx)(`code`,{children:e.check}),e.detail?(0,V.jsxs)(`span`,{className:`text-umber`,children:[` — `,e.detail.slice(0,120)]}):null]},e.check))}),!O&&(0,V.jsx)(`div`,{className:`text-brick`,children:`bus writes are off — the API will answer 403 until you switch them on in the header.`})]})}),y?.kind===`rebuild`&&(0,V.jsx)(Ff,{title:`Rebuild kit MCP`,confirmWord:`BUILD`,action:`/actions/rebuild-kit-mcp`,payload:{},onClose:()=>{b(null),g()},body:(0,V.jsxs)(`div`,{children:[`dist-behind-source is not doctor-fixable: the kit checkout's `,(0,V.jsx)(`code`,{children:`src/`}),` is newer than `,(0,V.jsx)(`code`,{children:`dist/`}),`. Runs `,(0,V.jsx)(`code`,{children:`pnpm --filter agent-coord-mcp build`}),` in `,(0,V.jsx)(`code`,{children:m}),` (the doctor's own advice: `,(0,V.jsx)(`code`,{children:`npm run build`}),`, then restart sessions). Live MCP sessions keep the old inode until agents restart / re-attach. Shell Run, bus-writes gated.`]})}),y?.kind===`prune`&&(0,V.jsx)(Ff,{title:`Prune bus data`,confirmWord:`PRUNE`,action:`/actions/prune`,payload:{dryRun:!1,olderThanDays:30,targets:[`rooms`,`status`,`inbox`,`receipts`,`members`],removeOrphanInboxes:!0},preview:()=>Fa(`/actions/prune`,{dryRun:!0,olderThanDays:30,targets:[`rooms`,`status`,`inbox`,`receipts`,`members`],removeOrphanInboxes:!0}),onClose:()=>b(null),body:(0,V.jsxs)(`div`,{children:[`MCP `,(0,V.jsx)(`code`,{children:`prune`}),`: removes room messages / status entries / inbox items / receipts older than `,(0,V.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.`]})}),y?.kind===`dead`&&(0,V.jsx)(Ff,{danger:!0,title:`Unregister ${F.length} dead agent${F.length===1?``:`s`}`,confirmWord:`UNREGISTER`,action:`/actions/unregister-dead`,payload:{agentIds:F},onClose:()=>b(null),body:(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`code`,{children:`force_unregister`}),` for every agent in `,(0,V.jsx)(`b`,{children:a===`project`?e:`all projects`}),` whose last activity is over 24 h old: `,(0,V.jsx)(`span`,{className:`font-mono text-[12px] text-walnut break-words`,children:F.join(`, `)}),`. Registry entries, transports and inbox markers go; room history stays. Requires bus writes on.`]})}),y?.kind===`one`&&(0,V.jsx)(Ff,{danger:!0,title:`Unregister ${y.id}`,confirmWord:y.id,action:`/actions/unregister`,payload:{agentId:y.id},onClose:()=>b(null),body:(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`code`,{children:`force_unregister`}),` `,(0,V.jsx)(`b`,{children:y.id}),`. Requires bus writes on.`]})}),_&&j&&(0,V.jsx)(Bf,{room:j,project:e,agents:M.map(e=>e.agentId),onClose:()=>v(!1)}),r&&(0,V.jsxs)(W,{className:`px-4 py-3 text-[13px] text-brick`,children:[`API error: `,r]}),a===`project`&&D?.state===`present`&&(0,V.jsxs)(W,{children:[(0,V.jsx)(G,{title:`Fleet`,icon:`fleet`,path:`${D.live.length} live · topology`}),(0,V.jsx)(`div`,{className:`px-3 py-3`,children:(0,V.jsx)(Gd,{project:e,fleet:D,canWrite:O,onOpenPane:e=>S(e)})})]}),a===`project`&&(0,V.jsx)(Jd,{project:e,canWrite:O}),N.length===0&&!i&&a===`all`&&(0,V.jsx)(W,{className:`px-4 py-3 text-[13px] text-umber`,children:`No agents registered on the bus.`}),re.filter(e=>a!==`all`||N.some(t=>ne(t)===e)).map(e=>{let t=L(e),n=a===`all`?N.filter(t=>ne(t)===e):N;return(0,V.jsxs)(W,{children:[a===`all`&&(0,V.jsx)(G,{title:t.title,icon:`fleet`,path:`${t.path} · ${n.length} agent${n.length===1?``:`s`}`,children:!t.registered&&(0,V.jsx)(K,{tone:`outline`,children:`not registered`})}),(0,V.jsxs)(ka,{cols:If,children:[(0,V.jsx)(`span`,{}),(0,V.jsx)(`span`,{children:`Agent`}),(0,V.jsx)(`span`,{children:`Role`}),(0,V.jsx)(`span`,{children:`Project`}),(0,V.jsx)(`span`,{children:`Transport`}),(0,V.jsx)(`span`,{children:`Pane · last seen`}),(0,V.jsx)(`span`,{})]}),n.map(e=>(0,V.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:If},children:[(0,V.jsx)(ja,{state:e.liveness,active:e.active}),(0,V.jsx)(`span`,{className:`font-mono font-medium text-[13px] truncate`,children:e.agentId}),(0,V.jsx)(`span`,{className:`text-umber text-[13px] truncate`,children:e.role??`—`}),(0,V.jsx)(`span`,{className:`font-mono text-[13px] truncate`,children:e.project??`—`}),(0,V.jsx)(`span`,{className:`justify-self-start`,children:e.transport?(0,V.jsx)(K,{tone:`outline`,children:e.transport}):e.liveness===`dead`?(0,V.jsx)(`span`,{className:`font-mono text-[12px] text-tan`,children:`—`}):(0,V.jsx)(K,{tone:`warn`,children:`not attached`})}),(0,V.jsxs)(`span`,{className:`font-mono text-[12px] text-ink3`,children:[e.pane?(0,V.jsx)(`button`,{className:`border-0 bg-transparent p-0 font-mono text-[12px] text-ember-deep cursor-pointer underline decoration-dotted`,onClick:()=>S(e.agentId),title:`view pane`,children:e.pane}):`—`,` · `,Rf(e.heartbeatAgeMs),e.paneCommand?(0,V.jsxs)(`span`,{className:`text-tan`,children:[` · `,e.paneCommand]}):``]}),e.liveness===`dead`?(0,V.jsx)(q,{tone:`ghost`,size:`sm`,onClick:()=>b({kind:`one`,id:e.agentId}),children:`Unregister`}):(0,V.jsx)(q,{tone:`ghost`,size:`sm`,onClick:()=>$(e.agentId),children:`DM`})]},e.agentId))]},e)})]}),(0,V.jsxs)(`aside`,{className:`grid gap-3.5 content-start min-w-0`,children:[(0,V.jsxs)(W,{children:[(0,V.jsx)(G,{title:`Liveness rule`,icon:`health`,path:`pane activity ∨ heartbeat`}),(0,V.jsxs)(`div`,{className:`px-3 py-2 text-[13px] text-umber`,children:[`last seen = freshest of tmux `,(0,V.jsx)(`code`,{children:`window_activity`}),`, heartbeat, transport/inbox mtimes · `,(0,V.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,V.jsxs)(W,{children:[(0,V.jsx)(G,{title:`Roles`,icon:`fleet`,path:`playbook ${c?.packages?.playbook?.version??`…`}`}),(0,V.jsx)(`div`,{className:`px-3 pt-1.5 pb-2.5 grid gap-1 text-[13px] text-umber`,children:Lf.map(([e,t])=>(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`b`,{className:`text-walnut`,children:e}),` — `,t]},e))})]}),(0,V.jsxs)(W,{children:[(0,V.jsx)(G,{title:`Bus doctor`,icon:`doctor`,path:h?`mcp doctor · ${new Date(d.endedAt??d.startedAt).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`})}`:`mcp doctor as groundwork-console`,children:h&&(0,V.jsx)(K,{tone:h.healthy?`ok`:`warn`,children:h.healthy?`healthy`:`${h.summary.warn} warn · ${h.summary.error} error`})}),!h&&(0,V.jsxs)(`div`,{className:`px-3 py-2 text-[13px] text-umber`,children:[`Press `,(0,V.jsx)(`b`,{children:`Run doctor`}),` — calls the MCP `,(0,V.jsx)(`code`,{children:`doctor`}),` tool as `,(0,V.jsx)(`code`,{children:`groundwork-console`}),` (automation). Read-only; `,(0,V.jsx)(`code`,{children:`fix`}),` stays gated.`]}),h?.findings.filter(e=>e.level!==`ok`).map(e=>(0,V.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,V.jsx)(`div`,{className:`self-stretch flex items-center justify-center font-mono text-[12px] text-tan border-r border-sand`,children:`!`}),(0,V.jsxs)(`div`,{className:`px-3 py-2 min-w-0`,children:[(0,V.jsx)(K,{tone:e.level===`error`?`bad`:`warn`,children:e.check}),e.fixable&&(0,V.jsx)(`span`,{className:`ml-1.5 inline-flex`,children:(0,V.jsx)(K,{tone:`outline`,children:`fixable`})}),e.detail&&(0,V.jsx)(`div`,{className:`text-[13px] text-umber mt-1 break-words`,children:e.detail})]})]},e.check)),h&&(0,V.jsxs)(`div`,{className:`px-3 py-2 text-[12px] font-mono text-ink3 flex items-center gap-2 flex-wrap`,children:[h.summary.ok,` ok · `,h.summary.warn,` warn · `,h.summary.error,` error`,d?.result?.delta&&(0,V.jsxs)(`span`,{className:d.result.delta.warn+d.result.delta.error<0?`text-leaf`:`text-tan`,children:[`· after fix: Δ warn `,d.result.delta.warn,` · error `,d.result.delta.error,d.result.fixed?.fixedFindings.length?` · fixed: ${d.result.fixed.fixedFindings.join(`, `)}`:` · nothing changed`]}),(0,V.jsxs)(`span`,{className:`ml-auto flex gap-1.5`,children:[f.length>0&&(0,V.jsxs)(q,{size:`sm`,tone:O?`primary`:`default`,onClick:()=>b({kind:`fix`}),title:O?`run the MCP doctor's own fix for the findings it tags fixable`:`bus writes are off — the fix is a bus write`,children:[`Fix fixable (`,f.length,`)`]}),p&&(m?(0,V.jsx)(q,{size:`sm`,onClick:()=>b({kind:`rebuild`}),title:`src/ newer than dist/ in the kit checkout — rebuild the MCP (pnpm --filter agent-coord-mcp build)`,children:`Rebuild kit MCP…`}):(0,V.jsx)(q,{size:`sm`,onClick:()=>$(ee??``,{answers:void 0}),disabled:!ee,title:ee?`ask ${ee} to publish/rebuild the MCP`:`no live kit coordinator`,children:`Ask kit coordinator`}))]})]})]})]})]})}function Bf({room:e,project:t,agents:n,onClose:r}){let[i,a]=(0,P.useState)(``),[o,s]=(0,P.useState)(!1),[c,l]=(0,P.useState)(!1),[u,d]=(0,P.useState)(null);return(0,V.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,V.jsxs)(`div`,{className:`w-[560px] bg-paper border border-brick rounded-kit shadow-panel`,children:[(0,V.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,V.jsxs)(`div`,{className:`p-4 grid gap-3 text-[13px]`,children:[(0,V.jsxs)(`div`,{className:`text-umber`,children:[`This will `,(0,V.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,V.jsxs)(`b`,{className:`text-walnut`,children:[`delete_room #`,e]}),` (message history is kept in `,(0,V.jsx)(`code`,{children:`~/agent-coord/history`}),`). Repo and seam files are never touched.`]}),(0,V.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,V.jsx)(`input`,{type:`checkbox`,checked:o,onChange:e=>s(e.target.checked)}),` also remove `,(0,V.jsx)(`b`,{children:t}),` from groundwork-console.config.json`]}),(0,V.jsxs)(`label`,{className:`grid gap-1`,children:[(0,V.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Type the room name to confirm`}),(0,V.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,V.jsxs)(`div`,{className:`text-[12px] text-umber`,children:[`Bus writes are gated: without `,(0,V.jsx)(`code`,{children:`GROUNDWORK_CONSOLE_BUS_WRITES=1`}),` on the API this runs as a `,(0,V.jsx)(`b`,{children:`dry-run`}),` and records what it would do (see Runs). With the switch on, it executes as `,(0,V.jsx)(`code`,{children:`groundwork-console`}),`.`]}),u&&(0,V.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,V.jsxs)(`div`,{className:`font-mono text-[12px]`,children:[(0,V.jsx)(K,{tone:u.status===`ok`?`ok`:`bad`,children:u.status}),` `,(0,V.jsx)(`b`,{children:u.label})]}),(0,V.jsx)(`pre`,{className:`m-0 mt-1 font-mono text-[12px] whitespace-pre-wrap`,children:u.log.join(`
40
- `)})]})]}),(0,V.jsxs)(`div`,{className:`px-4 py-3 border-t border-sand flex justify-end gap-2`,children:[(0,V.jsx)(q,{size:`sm`,onClick:r,children:u?`Close`:`Cancel`}),!u&&(0,V.jsx)(q,{size:`sm`,tone:`primary`,onClick:async()=>{l(!0);try{d(await Fa(`/actions/decommission`,{room:e,confirm:i,removeProject:o}))}finally{l(!1)}},disabled:i!==e||c,children:c?`Running…`:`Decommission`})]})]})})}var Vf=`1.4fr .6fr .9fr .9fr 1.2fr 2fr`,Hf=({on:e,label:t})=>(0,V.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}),Uf=e=>e?e.replace(/^\/Users\/[^/]+/,`~`):null;function Wf(){let{current:e}=Va(),{data:t,error:n,refresh:r}=J(e?`/projects/${e}/skills`:null,6e4),[i,a]=(0,P.useState)(null),[o,s]=(0,P.useState)(!1),c=J(i===`pb`||i===`reload`?`/actions/reload-skills`:null,3e4);if(n)return(0,V.jsx)(`div`,{className:`p-4`,children:(0,V.jsxs)(W,{className:`px-4 py-3 text-[13px] text-brick`,children:[`API error: `,n]})});if(!t)return(0,V.jsx)(`div`,{className:`p-4 text-umber`,children:`Scanning skills…`});let l=t.groundwork,u=t.playbook,d=l.skills.filter(e=>e.installed&&e.inSync===!1).length+u.cards.filter(e=>e.installed&&(e.inSync===!1||e.legacyEssay)).length+ +!!l.driftedVersion+u.legacyDirs.length;return(0,V.jsxs)(`div`,{className:`grid grid-cols-[1fr_340px] gap-4 p-4 max-[980px]:grid-cols-1`,children:[i===`gwinit`&&(0,V.jsx)(Ff,{title:`groundwork init · ${e}`,confirmWord:e,action:`/actions/groundwork-init/${e}`,payload:{},onClose:()=>{a(null),r()},body:(0,V.jsxs)(`div`,{children:[`Runs `,(0,V.jsx)(`code`,{children:`groundwork init <repo>`}),` — installs the skills, IDE mirrors and the `,(0,V.jsx)(`code`,{children:`docs/`}),` scaffold (WORKSTREAMS/QUEUE/DONE/FACTS, methodology, templates, phases/) into the working tree. Nothing is committed; review with `,(0,V.jsx)(`code`,{children:`git status`}),`. Only offered when `,(0,V.jsx)(`code`,{children:`docs/.groundwork/VERSION`}),` is missing.`]})}),i===`gw`&&(0,V.jsx)(Ff,{title:`groundwork update · ${e}`,confirmWord:e,action:`/actions/groundwork-update/${e}`,payload:{all:!0,docs:!0},onClose:()=>{a(null),r()},body:(0,V.jsxs)(`div`,{children:[`Runs `,(0,V.jsxs)(`code`,{children:[`groundwork update `,`<repo>`,` --all --docs`]}),` from the kit (`,l.kitVersion,`): refreshes installed skills + IDE mirrors, adds skills added upstream, refreshes the generic reference docs (methodology, COMMANDS, _INDEX), bumps `,(0,V.jsx)(`code`,{children:`docs/.groundwork/VERSION`}),`. `,(0,V.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,V.jsx)(Ff,{title:`agent-coordination update (global)`,confirmWord:`UPDATE`,action:`/actions/playbook-update`,payload:{dryRun:!1},preview:()=>Fa(`/actions/playbook-update`,{dryRun:!0}),onDone:()=>s(!0),onClose:()=>{r(),o?(s(!1),a(`reload`)):a(null)},body:(0,V.jsxs)(`div`,{children:[`Re-syncs the playbook field cards into every harness home found on this machine (`,(u.homes??[]).map(e=>e.harness).join(`, `)||`claude`,` → `,(0,V.jsx)(`code`,{children:`--harness=`}),` all detected, so grok & co. mirrors refresh too) from `,(0,V.jsx)(`code`,{children:Uf(u.source)??`kit ${u.kitVersion}`}),`; removes legacy dirs. Machine-global. `,(0,V.jsx)(`b`,{className:`text-walnut`,children:`Preview = dry-run plan, writes nothing; Apply (type UPDATE) writes.`})]})}),i===`reload`&&(c.data?.supported?(0,V.jsx)(Ff,{title:`reload skills · ${c.data.agents.length} live session${c.data.agents.length===1?``:`s`}`,confirmWord:`RELOAD`,action:`/actions/reload-skills`,payload:{},onClose:()=>a(null),body:(0,V.jsxs)(`div`,{children:[`The playbook cards on disk changed. Type `,(0,V.jsx)(`code`,{children:`/reload-skills`}),` RAW into every live tmux-attached agent's CLI (MCP `,(0,V.jsx)(`code`,{children:`send_command`}),`, bus-writes gated) so running sessions pick the new cards up without a restart: `,(0,V.jsx)(`span`,{className:`font-mono text-[12px]`,children:c.data.agents.join(` · `)||`— none live —`}),`. Per-agent delivery (confirmed / pending) lands in the Run.`]})}):(0,V.jsx)(`div`,{className:`fixed inset-0 z-[60] bg-walnut/30 flex items-start justify-center pt-[10vh]`,onMouseDown:e=>{e.target===e.currentTarget&&a(null)},children:(0,V.jsxs)(`div`,{className:`w-[560px] bg-paper border border-sand rounded-kit shadow-panel p-4 grid gap-2 text-[13px] text-umber`,children:[(0,V.jsx)(`div`,{className:`font-display font-bold text-[18px]`,children:`reload skills in live sessions`}),(0,V.jsx)(`div`,{children:c.data?(0,V.jsxs)(V.Fragment,{children:[`Not available: `,c.data.hint,` (connected allowlist: `,(0,V.jsx)(`code`,{children:c.data.allowlist?.join(` `)??`unknown`}),`). Ask agents to run `,(0,V.jsx)(`code`,{children:`/reload-skills`}),` themselves, or restart their sessions.`]}):c.error?`API error: ${c.error}`:`checking the connected agent-coord-mcp…`}),(0,V.jsx)(`div`,{className:`flex justify-end`,children:(0,V.jsx)(q,{size:`sm`,onClick:()=>a(null),children:`Close`})})]})})),(0,V.jsxs)(`div`,{className:`grid gap-3.5 content-start min-w-0`,children:[(0,V.jsxs)(`div`,{className:`flex items-baseline justify-between`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`span`,{className:`font-display font-bold text-[34px] leading-[1.1] tracking-[-.015em] text-ember`,children:`Skills`}),(0,V.jsxs)(`span`,{className:`ml-3 text-[13px] text-umber`,children:[`what each harness can run — `,e,` and globally · byte-compared to the kit`]})]}),(0,V.jsxs)(`span`,{className:`text-[13px] text-umber`,children:[d,` need attention`]})]}),(0,V.jsxs)(W,{children:[(0,V.jsxs)(G,{title:`Groundwork · per repo`,icon:`skills`,eyebrow:`payload/skills · .claude/skills`,path:`marker ${l.versionMarker??`—`} · kit ${l.kitVersion}`,children:[l.driftedVersion&&(0,V.jsxs)(K,{tone:`warn`,children:[`behind `,l.kitVersion]}),!l.versionMarker&&(0,V.jsx)(q,{size:`sm`,tone:`primary`,onClick:()=>a(`gwinit`),title:`this repo has no docs/.groundwork/VERSION — install Groundwork`,children:`groundwork init…`}),l.versionMarker&&(0,V.jsx)(q,{size:`sm`,tone:l.driftedVersion?`primary`:`default`,onClick:()=>a(`gw`),children:`groundwork update…`})]}),(0,V.jsxs)(ka,{cols:Vf,children:[(0,V.jsx)(`span`,{children:`Skill`}),(0,V.jsx)(`span`,{children:`Tier`}),(0,V.jsx)(`span`,{children:`Installed`}),(0,V.jsx)(`span`,{children:`In sync`}),(0,V.jsx)(`span`,{children:`Mirrors`}),(0,V.jsx)(`span`,{children:`Description`})]}),l.skills.map(e=>(0,V.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:Vf},children:[(0,V.jsxs)(`span`,{className:`font-mono font-medium text-[13px]`,children:[`/`,e.name]}),(0,V.jsx)(`span`,{children:(0,V.jsx)(K,{tone:e.tier===`min`?`neutral`:`outline`,children:e.tier===`min`?`core`:`optional`})}),(0,V.jsx)(`span`,{children:e.installed?(0,V.jsx)(K,{tone:`ok`,children:`installed`}):(0,V.jsx)(`span`,{className:`font-mono text-[12px] text-tan`,children:`—`})}),(0,V.jsx)(`span`,{children:e.installed?e.inSync?(0,V.jsx)(K,{tone:`ok`,children:`= kit`}):(0,V.jsx)(K,{tone:`warn`,children:`differs`}):(0,V.jsx)(`span`,{className:`font-mono text-[12px] text-tan`,children:`—`})}),(0,V.jsxs)(`span`,{className:`flex gap-1`,children:[(0,V.jsx)(Hf,{on:e.mirrors.cursor,label:`cursor`}),(0,V.jsx)(Hf,{on:e.mirrors.vscode,label:`vscode`})]}),(0,V.jsx)(`span`,{className:`text-[13px] text-umber truncate`,title:e.description,children:e.description})]},e.name))]}),(0,V.jsxs)(W,{children:[(0,V.jsxs)(G,{title:`Playbook · machine-global`,icon:`skills`,eyebrow:`field cards`,path:`${(u.homes??[]).map(e=>`${e.harness}: ${e.dir.replace(/^\/Users\/[^/]+/,`~`)}`).join(` · `)||`~/.claude/skills`} · kit ${u.kitVersion}`,children:[(0,V.jsx)(q,{size:`sm`,onClick:()=>a(`pb`),children:`agent-coordination update…`}),(0,V.jsx)(q,{size:`sm`,tone:`ghost`,title:`type /reload-skills raw into every live tmux-attached session (needs agent-coord-mcp ≥0.25.0)`,onClick:()=>a(`reload`),children:`reload skills…`})]}),(0,V.jsxs)(ka,{cols:Vf,children:[(0,V.jsx)(`span`,{children:`Card`}),(0,V.jsx)(`span`,{children:`Slices`}),(0,V.jsx)(`span`,{children:`Installed`}),(0,V.jsx)(`span`,{children:`In sync`}),(0,V.jsx)(`span`,{children:`Mirrors`}),(0,V.jsx)(`span`,{children:`Description`})]}),u.cards.map(e=>(0,V.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:Vf},children:[(0,V.jsxs)(`span`,{className:`font-mono font-medium text-[13px]`,children:[`/`,e.name]}),(0,V.jsx)(`span`,{children:e.legacyEssay?(0,V.jsx)(K,{tone:`warn`,children:`775-line essay`}):(0,V.jsxs)(K,{tone:`outline`,children:[e.slices,` slice`,e.slices===1?``:`s`]})}),(0,V.jsx)(`span`,{children:e.installed?(0,V.jsx)(K,{tone:`ok`,children:`installed`}):(0,V.jsx)(`span`,{className:`font-mono text-[12px] text-tan`,children:`—`})}),(0,V.jsx)(`span`,{children:e.installed?e.inSync?(0,V.jsx)(K,{tone:`ok`,children:`= kit`}):(0,V.jsx)(K,{tone:`warn`,children:`differs`}):(0,V.jsx)(`span`,{className:`font-mono text-[12px] text-tan`,children:`—`})}),(0,V.jsxs)(`span`,{className:`flex gap-1 flex-wrap`,children:[(0,V.jsx)(Hf,{on:e.installed,label:`claude`}),(0,V.jsx)(Hf,{on:!!e.homes?.grok?.installed,label:`grok${e.homes?.grok?.installed&&e.homes.grok.inSync===!1?` ≠`:``}`}),(0,V.jsx)(Hf,{on:e.mirrors.cursor,label:`cursor`}),(0,V.jsx)(Hf,{on:e.mirrors.vscode,label:`vscode`}),(0,V.jsx)(Hf,{on:e.mirrors.opencode,label:`opencode`})]}),(0,V.jsx)(`span`,{className:`text-[13px] text-umber truncate`,title:e.description,children:e.description})]},e.name)),u.legacyDirs.length>0&&(0,V.jsxs)(`div`,{className:`px-3 py-2 border-t border-sand text-[13px]`,children:[(0,V.jsx)(K,{tone:`warn`,children:`legacy dirs`}),` `,(0,V.jsxs)(`span`,{className:`text-umber`,children:[u.legacyDirs.join(`, `),` still in `,u.globalDir,` — installer removes them`]})]})]})]}),(0,V.jsxs)(`aside`,{className:`grid gap-3.5 content-start min-w-0`,children:[(0,V.jsxs)(W,{children:[(0,V.jsx)(G,{title:`How this is measured`,icon:`doctor`}),(0,V.jsxs)(`div`,{className:`px-3 py-2 text-[13px] text-umber grid gap-1.5`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`b`,{className:`text-walnut`,children:`In sync`}),` — SHA-1 of the installed `,(0,V.jsx)(`code`,{children:`SKILL.md`}),` equals what the installer writes: groundwork byte-copies (`,(0,V.jsx)(`code`,{children:Uf(l.source)??`?`}),`); the playbook installer rewrites `,(0,V.jsx)(`code`,{children:`{{tool:…}}`}),` placeholders per harness first, so the card is compared after that rewrite (`,u.rewrite??`kit rewrite`,`, source `,(0,V.jsx)(`code`,{children:Uf(u.source)??`?`}),`).`]}),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`b`,{className:`text-walnut`,children:`Mirrors`}),` — presence of `,(0,V.jsx)(`code`,{children:`.cursor/commands/<n>.md`}),`, `,(0,V.jsx)(`code`,{children:`.vscode/prompts/<n>.prompt.md`}),`, `,(0,V.jsx)(`code`,{children:`~/.config/opencode/skills/<n>`}),`.`]}),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`b`,{className:`text-walnut`,children:`Marker`}),` — `,(0,V.jsx)(`code`,{children:`docs/.groundwork/VERSION`}),` vs the kit’s groundwork version.`]}),(0,V.jsxs)(`div`,{children:[`Asked grok for `,(0,V.jsx)(`code`,{children:`groundwork list --json`}),` / `,(0,V.jsx)(`code`,{children:`agent-coordination list --json`}),` to replace the scan.`]})]})]}),(0,V.jsxs)(W,{children:[(0,V.jsx)(G,{title:`Harness mirrors`,icon:`skills`,path:`seam skills-mirror`}),(0,V.jsxs)(`div`,{className:`px-3 py-2 grid gap-2 text-[13px] text-umber`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`b`,{className:`text-walnut`,children:`Claude Code`}),` — canonical `,(0,V.jsx)(`code`,{children:`SKILL.md`}),`; playbook global.`]}),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`b`,{className:`text-walnut`,children:`Cursor`}),` — `,(0,V.jsx)(`code`,{children:`.cursor/commands`}),`, GENERATED banner.`]}),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`b`,{className:`text-walnut`,children:`VS Code`}),` — `,(0,V.jsx)(`code`,{children:`.vscode/prompts`}),`, mode from allowed-tools.`]}),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`b`,{className:`text-walnut`,children:`OpenCode`}),` — auto-discovers `,(0,V.jsx)(`code`,{children:`~/.claude/skills`}),`; templated MCP tool names.`]})]})]})]})]})}var Gf=[[`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`]],Kf={"Open PRs":`prs`,"Cutover Gates":`gates`,"Needs David":`needsDavid`,Risks:`risks`,Rooms:`rooms`,"Decisions Recorded":`decisions`},qf=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`,Jf=e=>!!e&&Ta.includes(e),Yf=e=>e?new Date(e).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`}):``;function Xf({s:e}){let t=e.table?e.table.headers.map(()=>`1fr`).join(` `):``;return(0,V.jsxs)(W,{children:[(0,V.jsx)(G,{title:e.title,icon:Kf[e.title],eyebrow:`## ${e.title} · coordinator-only`,path:`docs/WORKSTREAMS.md`}),e.table&&e.table.rows.length>0&&(0,V.jsx)(ka,{cols:t,children:e.table.headers.map(e=>(0,V.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,V.jsx)(`div`,{className:`px-3 py-3 text-[13px] text-umber`,children:`none open`}):e.table?.rows.map((n,r)=>(0,V.jsx)(Oa,{glyph:`|`,raw:Object.values(n).join(` | `),children:(0,V.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,V.jsx)(`span`,{className:`min-w-0 truncate ${t===0?`font-medium`:`text-[13px] text-umber`}`,title:r,children:i&&r&&a?(0,V.jsx)(K,{tone:qf(r),children:r}):r||(0,V.jsx)(`span`,{className:`text-tan`,children:`—`})},e)})})},r)),e.bullets?.map((e,t)=>(0,V.jsx)(Oa,{glyph:`-`,children:(0,V.jsx)(`div`,{className:`py-2 text-[14px]`,children:e})},t)),!e.table?.rows.length&&!e.bullets?.length&&(0,V.jsx)(`div`,{className:`px-3 py-3 text-[13px] text-umber`,children:`empty`})]})}function Zf(){let{current:e}=Va(),{data:t,error:n}=J(e?`/projects/${e}/release`:null,3e4),r=J(`/kit`).data;if(n)return(0,V.jsx)(`div`,{className:`p-4`,children:(0,V.jsxs)(W,{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,V.jsxs)(`div`,{className:`grid grid-cols-[1fr_340px] gap-4 p-4 max-[980px]:grid-cols-1`,children:[(0,V.jsxs)(`div`,{className:`grid gap-3.5 content-start min-w-0`,children:[(0,V.jsxs)(`div`,{className:`flex items-baseline justify-between`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`span`,{className:`font-display font-bold text-[34px] leading-[1.1] tracking-[-.015em] text-ember`,children:`Release`}),(0,V.jsxs)(`span`,{className:`ml-3 text-[13px] text-umber`,children:[e,` · coordinator-extension sections of docs/WORKSTREAMS.md + bus VERDICT/DONE`]})]}),(0,V.jsx)(`span`,{className:`text-[13px] text-umber`,children:`tier-1 ceiling 10 min · prod = David`})]}),(0,V.jsx)(`div`,{className:`grid grid-cols-4 border border-sand rounded-kit overflow-hidden max-[980px]:grid-cols-2`,children:Gf.map(([e,t,n],r)=>(0,V.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,V.jsx)(`b`,{className:`block font-bold text-[13px] mb-1 ${r===3?`text-ember-deep`:`text-umber`}`,children:e}),(0,V.jsx)(`span`,{className:`text-[12px] leading-[1.5]`,children:t}),(0,V.jsx)(`span`,{className:`block font-mono font-medium text-[11px] text-ink3 mt-1.5`,children:n})]},e))}),!t&&(0,V.jsx)(`div`,{className:`text-umber text-[13px]`,children:`Reading WORKSTREAMS…`}),t&&i.length===0&&(0,V.jsx)(W,{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,V.jsx)(Xf,{s:e},e.title))]}),(0,V.jsxs)(`aside`,{className:`grid gap-3.5 content-start min-w-0`,children:[(0,V.jsxs)(W,{children:[(0,V.jsx)(G,{title:`Dock telemetry`,icon:`bus`,path:`VERDICT / DONE from the room`}),(t?.telemetry??[]).length===0&&(0,V.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,V.jsxs)(`div`,{className:`grid grid-cols-[var(--spacing-gutter)_1fr] border-b border-sand last:border-b-0`,children:[(0,V.jsx)(`div`,{className:`py-2.5 flex justify-center font-mono text-[12px] text-tan border-r border-sand`,children:`#`}),(0,V.jsxs)(`div`,{className:`px-3 pt-2 pb-2.5 min-w-0`,children:[(0,V.jsxs)(`div`,{className:`flex gap-2 items-baseline mb-0.5`,children:[(0,V.jsx)(`span`,{className:`font-semibold text-[13px]`,children:e.from}),(0,V.jsx)(`span`,{className:`font-mono text-[12px] text-ink3`,children:Yf(e.ts)})]}),(0,V.jsxs)(`div`,{className:`text-[13px] break-words line-clamp-3`,children:[Jf(r)&&(0,V.jsx)(Da,{prefix:r,fail:/FAIL/.test(n)}),n.replace(/^\w[\w ]*:?\s*/,``)]})]})]},e.id??t)})]}),i.find(e=>e.title===`Rooms`)&&(0,V.jsx)(Xf,{s:i.find(e=>e.title===`Rooms`)}),(0,V.jsxs)(W,{children:[(0,V.jsx)(G,{title:`Kit versions`,icon:`kit`,path:`kit.json`}),(0,V.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,V.jsxs)(`div`,{className:`grid grid-cols-[1fr_auto] gap-2`,children:[(0,V.jsx)(`span`,{children:t.name}),(0,V.jsx)(`b`,{className:`text-walnut`,children:t.version})]},e)):`—`})]}),t&&(0,V.jsx)(`div`,{className:`text-[11px] font-mono text-tan px-1`,children:t.source})]})]})}var Qf={queued:`outline`,running:`warn`,ok:`ok`,failed:`bad`,cancelled:`neutral`},$f={mcp:`MCP tool`,cli:`CLI`,bus:`bus send`,shell:`shell`,seam:`seam write`},ep=e=>{let t=(e.endedAt??Date.now())-e.startedAt;return t<1e3?`${t} ms`:`${(t/1e3).toFixed(1)} s`},tp=e=>new Date(e).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`,second:`2-digit`});function np(){let{runs:e,running:t}=Wa(),[n]=Pi(),[r,i]=(0,P.useState)(n.get(`run`));(0,P.useEffect)(()=>{let e=n.get(`run`);e&&i(e)},[n]);let a=e.find(e=>e.id===r)??e[0];return(0,V.jsxs)(`div`,{className:`grid grid-cols-[1fr_480px] gap-4 p-4 max-[1100px]:grid-cols-1`,children:[(0,V.jsxs)(`div`,{className:`grid gap-3.5 content-start min-w-0`,children:[(0,V.jsxs)(`div`,{className:`flex items-baseline justify-between`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`span`,{className:`font-display font-bold text-[34px] leading-[1.1] tracking-[-.015em] text-ember`,children:`Runs`}),(0,V.jsxs)(`span`,{className:`ml-3 text-[13px] text-umber`,children:[`every action the console performs — MCP tools, CLIs, bus sends, shells · `,t,` running`]})]}),(0,V.jsxs)(`span`,{className:`text-[13px] text-umber`,children:[`last `,e.length]})]}),(0,V.jsxs)(W,{children:[e.length===0&&(0,V.jsxs)(`div`,{className:`px-3 py-3 text-[13px] text-umber`,children:[`Nothing has run yet. Try `,(0,V.jsx)(`b`,{children:`Run doctor`}),` on Fleets or `,(0,V.jsx)(`b`,{children:`Doctor`}),` on the Board.`]}),e.map(e=>(0,V.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,V.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,V.jsx)(Ma,{size:12}):e.status===`ok`?`✓`:e.status===`failed`?`✗`:`○`}),(0,V.jsx)(`span`,{className:`px-3 py-1.5 min-w-0`,children:(0,V.jsxs)(`span`,{className:`flex items-baseline gap-2`,children:[(0,V.jsx)(K,{tone:Qf[e.status],children:e.status}),(0,V.jsx)(`b`,{className:`text-[13px] truncate`,children:e.label}),(0,V.jsx)(`span`,{className:`font-mono text-[11px] text-tan`,children:$f[e.kind]}),e.project&&(0,V.jsx)(`span`,{className:`font-mono text-[12px] text-ink3`,children:e.project}),e.sideEffects&&(0,V.jsx)(K,{tone:`david`,children:`side effects`})]})}),(0,V.jsxs)(`span`,{className:`px-3 font-mono text-[12px] text-ink3 whitespace-nowrap`,children:[tp(e.startedAt),` · `,ep(e)]})]},e.id))]})]}),(0,V.jsxs)(`aside`,{className:`grid gap-3.5 content-start min-w-0`,children:[a?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(W,{children:[(0,V.jsx)(G,{title:a.label,icon:`health`,path:`${a.id} · ${$f[a.kind]}`,children:(0,V.jsx)(K,{tone:Qf[a.status],children:a.status})}),a.args&&(0,V.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,V.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 min-w-0 max-w-full break-words overscroll-contain`,children:a.log.join(`
41
- `)||`—`}),a.error&&(0,V.jsx)(`div`,{className:`px-3 py-2 border-t border-sand text-[13px] text-brick`,children:a.error})]}),a.result!==void 0&&(0,V.jsxs)(W,{children:[(0,V.jsx)(G,{title:`Result`,icon:`docs`}),(0,V.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 min-w-0 max-w-full break-words overscroll-contain`,children:typeof a.result==`string`?a.result:JSON.stringify(a.result,null,2)})]})]}):(0,V.jsx)(W,{className:`px-4 py-3 text-[13px] text-umber`,children:`Select a run to see its log and result.`}),(0,V.jsxs)(W,{children:[(0,V.jsx)(G,{title:`What can run`,icon:`gates`}),(0,V.jsxs)(`div`,{className:`px-3 py-2 text-[13px] text-umber grid gap-1`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`b`,{className:`text-walnut`,children:`now`}),` — read-only MCP tools (doctor, list_*, status, read_messages…) as `,(0,V.jsx)(`code`,{children:`groundwork-console`}),` / automation; read-only CLIs (groundwork doctor/status/list).`]}),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`b`,{className:`text-walnut`,children:`gated`}),` — bus sends (rules engine, replies), prune / unregister, seam writes, shells. Each will appear here with a `,(0,V.jsx)(`span`,{className:`inline-flex`,children:(0,V.jsx)(K,{tone:`david`,children:`side effects`})}),` marker.`]}),(0,V.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 rp=22,ip=14,ap=4,op=10,sp=[`#C8782A`,`#4A6A2C`,`#5C7A96`,`#C4587A`,`#8A6A3C`,`#C88A1E`,`#6B5B95`,`#2E7D7B`,`#A0522D`,`#556B2F`];function cp(e){let t=new Map;e.forEach((e,n)=>t.set(e.sha,n));let n=new Map,r=[],i=[];for(let t of e){let e=r.indexOf(t.sha);for(e<0&&(e=r.indexOf(null),e<0&&(e=r.length)),r[e]=null,n.set(t.sha,e),i.push(e),t.parents.forEach((t,i)=>{if(n.has(t))return;let a=r.indexOf(t);if(i===0&&a<0){r[e]=t;return}if(a>=0)return;let o=r.indexOf(null);o<0&&(o=r.length),r[o]=t});r.length&&r[r.length-1]===null;)r.pop()}let a=[];return e.forEach((e,n)=>{for(let r of e.parents){let o=t.get(r);o!==void 0&&a.push({from:n,fromLane:i[n],to:o,toLane:i[o],color:e.parents[0]===r?i[o]:i[n]})}}),{laneOfRow:i,edges:a,stubs:e.flatMap((e,n)=>e.parents.filter(e=>!t.has(e)).map(()=>({row:n,lane:i[n]}))),lanes:Math.max(1,...i.map(e=>e+1)),rowOf:t}}var lp=e=>{let t=Date.now()-new Date(e).getTime(),n=Math.floor(t/6e4);return n<1?`now`:n<60?`${n} min`:n<1440?`${Math.floor(n/60)} h`:n<43200?`${Math.floor(n/1440)} d`:`${Math.floor(n/43200)} mo`},up=e=>e.startsWith(`HEAD`)?`head`:e.startsWith(`tag: `)?`tag`:e.includes(`/`)?`remote`:`branch`;function dp({commits:e,head:t,worktrees:n=[],maxHeight:r=440,onSelect:i}){let a=(0,P.useMemo)(()=>e.slice(0,200),[e]),o=(0,P.useMemo)(()=>cp(a),[a]),[s,c]=(0,P.useState)(null),l=(0,P.useMemo)(()=>{let e=new Map;for(let t of n)t.branch&&e.set(t.branch.replace(/^refs\/heads\//,``),t);return e},[n]);if(a.length===0)return(0,V.jsx)(`div`,{className:`px-3 py-3 text-[13px] text-umber`,children:`No commits.`});let u=20+o.lanes*ip,d=a.length*rp,f=e=>op+e*ip+ip/2,p=e=>e*rp+rp/2,m=e=>{navigator.clipboard?.writeText(e.sha).then(()=>{c(e.sha),setTimeout(()=>c(null),1200)}).catch(()=>{}),i?.(e)};return(0,V.jsx)(`div`,{className:`relative overflow-auto overscroll-contain border border-sand rounded-kit bg-paper`,style:{maxHeight:r},role:`list`,"aria-label":`commit graph · ${a.length} commits · ${o.lanes} lanes`,children:(0,V.jsxs)(`div`,{className:`relative`,style:{height:d,minWidth:u+480},children:[(0,V.jsxs)(`svg`,{width:u,height:d,className:`absolute left-0 top-0`,"aria-hidden":!0,children:[o.edges.map((e,t)=>{let n=f(e.fromLane),r=p(e.from),i=f(e.toLane),a=p(e.to),o=sp[e.color%sp.length],s=n===i?`M${n},${r} L${i},${a}`:`M${n},${r} C${n},${r+rp*.6} ${i},${a-rp*.6} ${i},${a}`;return(0,V.jsx)(`path`,{d:s,stroke:o,strokeWidth:2,fill:`none`,opacity:.9},t)}),o.stubs.map((e,t)=>(0,V.jsx)(`path`,{d:`M${f(e.lane)},${p(e.row)} L${f(e.lane)},${p(e.row)+rp*.7}`,stroke:sp[e.lane%sp.length],strokeWidth:2,strokeDasharray:`2 3`,fill:`none`},`s${t}`)),a.map((e,n)=>{let r=o.laneOfRow[n],i=e.sha===t,a=e.parents.length>1;return(0,V.jsx)(`circle`,{cx:f(r),cy:p(n),r:i?5.5:a?5:ap,fill:a?`var(--color-paper)`:sp[r%sp.length],stroke:sp[r%sp.length],strokeWidth:i?3:2},e.sha)})]}),a.map((e,n)=>{let r=o.laneOfRow[n],i=e.sha===t;return(0,V.jsxs)(`button`,{type:`button`,role:`listitem`,onClick:()=>m(e),title:`${e.sha}\n${e.subject}\n${e.author} · ${lp(e.date)} ago · ${new Date(e.date).toLocaleString()}\nclick to copy sha`,className:`absolute left-0 right-0 grid grid-cols-[auto_1fr_auto_auto] items-center gap-2 pr-3 text-left border-0 cursor-pointer hover:bg-linen/70 ${i?`bg-cream/50`:`bg-transparent`}`,style:{top:n*rp,height:rp,paddingLeft:u+4},children:[(0,V.jsx)(`span`,{className:`font-mono text-[11px] text-ink3 w-[62px]`,style:{color:sp[r%sp.length]},children:s===e.sha?`copied ✓`:e.short}),(0,V.jsxs)(`span`,{className:`min-w-0 truncate text-[12.5px] text-walnut`,children:[e.refs.map(e=>{let t=up(e),n=e.replace(/^HEAD -> /,``).replace(/^tag: /,``),r=t===`tag`?void 0:l.get(n);return(0,V.jsxs)(`span`,{className:`inline-flex items-center gap-1 mr-1.5 px-1.5 rounded font-mono text-[10px] leading-[16px] border align-middle ${t===`head`?`bg-ember-wash text-ember-deep border-ember/40 font-semibold`:t===`tag`?`bg-amber-wash text-amber border-amber-line`:t===`remote`?`bg-cream text-ink3 border-sand`:`bg-linen text-umber border-dust`}`,title:r?`checked out in ${r.path}${r.agent?` by ${r.agent}`:``}`:e,children:[t===`head`&&e.startsWith(`HEAD ->`)?`HEAD → `:``,t===`tag`?`⌁ `:``,n,r&&(0,V.jsxs)(`span`,{className:`text-leaf`,"aria-label":`checked out in a worktree`,children:[`⌂`,r.agent?` ${r.agent}`:``]})]},e)}),e.subject]}),(0,V.jsx)(`span`,{className:`font-mono text-[11px] text-ink3 truncate max-w-[120px]`,children:e.author}),(0,V.jsx)(`span`,{className:`font-mono text-[11px] text-tan w-[48px] text-right`,children:lp(e.date)})]},e.sha)})]})})}var fp=`minmax(220px,1.6fr) .5fr 1fr .8fr 1fr 1.1fr 1.4fr`,pp=`minmax(240px,1.8fr) 1.2fr .7fr .6fr 1fr .6fr`,mp=e=>e.replace(/^\/Users\/[^/]+/,`~`),hp=e=>{navigator.clipboard?.writeText(e)},gp=(e,t)=>{try{localStorage.setItem(`groundwork-console.summon.draft.${e}`,t)}catch{}$(e)},_p=e=>e===`MERGED`?`ok`:e===`OPEN`?`david`:`neutral`;function vp(){let{current:e}=Va(),t=e?`/projects/${e}/git`:null,n=J(t?`${t}/graph?limit=200`:null,15e3),r=J(t?`${t}/branches`:null,15e3),i=J(t?`${t}/worktrees`:null,15e3),[a,o]=(0,P.useState)(!0),[s,c]=(0,P.useState)(!1);if(!e)return(0,V.jsx)(`div`,{className:`p-4 text-umber`,children:`Pick a project.`});let l=r.error??i.error??n.error,u=(r.data?.branches??[]).filter(e=>(a||!e.remote)&&(s||!e.merged||e.name===r.data?.defaultBranch||e.name===r.data?.base||!!e.worktree)),d=(r.data?.branches.length??0)-u.length;return(0,V.jsxs)(`div`,{className:`grid gap-3.5 p-4 content-start min-w-0`,children:[(0,V.jsxs)(`div`,{className:`flex items-baseline justify-between flex-wrap gap-2`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`span`,{className:`font-display font-bold text-[34px] leading-[1.1] tracking-[-.015em] text-ember`,children:`Git`}),(0,V.jsx)(`span`,{className:`ml-3 text-[13px] text-umber`,children:`branches · worktrees · who owns what — read-only, no git writes`})]}),(0,V.jsx)(`div`,{className:`font-mono text-[12px] text-tan`,children:r.data?`${r.data.branches.length} refs · vs ${r.data.base??`origin/${r.data.defaultBranch}`}${r.data.baseFound===!1?` (missing — no ahead/behind)`:``} · ${r.data.ghAvailable?`gh ✓`:`gh unavailable — PRs hidden`}`:r.loading?`reading git…`:``})]}),l&&(0,V.jsxs)(W,{className:`px-4 py-3 text-[13px] text-brick`,children:[`API error: `,l]}),(0,V.jsxs)(W,{children:[(0,V.jsx)(G,{title:`Commit graph`,icon:`git`,eyebrow:`git log --all · date order`,path:n.data?`${n.data.commits.length} commits · HEAD ${n.data.head.slice(0,7)}`:void 0}),(0,V.jsx)(`div`,{className:`px-3 py-2`,children:n.data?(0,V.jsx)(dp,{commits:n.data.commits,head:n.data.head,worktrees:i.data?.worktrees??[],onSelect:e=>hp(e.sha)}):(0,V.jsx)(`div`,{className:`text-[13px] text-tan py-4 text-center`,children:n.error?`graph unavailable`:`loading graph…`})})]}),(0,V.jsxs)(W,{children:[(0,V.jsxs)(G,{title:`Branches`,icon:`git`,eyebrow:`local + remote · ahead/behind vs origin/main`,path:d>0?`${d} hidden by filters`:void 0,children:[(0,V.jsxs)(`label`,{className:`inline-flex items-center gap-1.5 text-[12px] text-umber cursor-pointer`,children:[(0,V.jsx)(`input`,{type:`checkbox`,checked:a,onChange:e=>o(e.target.checked)}),` remote`]}),(0,V.jsxs)(`label`,{className:`inline-flex items-center gap-1.5 text-[12px] text-umber cursor-pointer ml-2`,children:[(0,V.jsx)(`input`,{type:`checkbox`,checked:s,onChange:e=>c(e.target.checked)}),` merged`]})]}),(0,V.jsxs)(ka,{cols:fp,children:[(0,V.jsx)(`span`,{children:`Branch`}),(0,V.jsx)(`span`,{children:`Where`}),(0,V.jsx)(`span`,{children:`HEAD`}),(0,V.jsx)(`span`,{children:`vs main`}),(0,V.jsx)(`span`,{children:`Flags`}),(0,V.jsx)(`span`,{children:`Owner`}),(0,V.jsx)(`span`,{children:`PR`})]}),r.loading&&!r.data&&(0,V.jsx)(`div`,{className:`px-3 py-3 text-[13px] text-tan`,children:`reading branches…`}),u.map(e=>(0,V.jsx)(yp,{b:e,defaultBranch:r.data?.defaultBranch??`main`},e.name+(e.remote?`@r`:``))),r.data&&!u.length&&(0,V.jsx)(`div`,{className:`px-3 py-3 text-[13px] text-tan`,children:`nothing to show with these filters`})]}),(0,V.jsxs)(W,{children:[(0,V.jsx)(G,{title:`Worktrees`,icon:`git`,eyebrow:`git worktree list · fleet siblings <repo>-<agent>`,path:i.data?`${i.data.worktrees.length} checkouts`:void 0}),(0,V.jsxs)(ka,{cols:pp,children:[(0,V.jsx)(`span`,{children:`Path`}),(0,V.jsx)(`span`,{children:`Branch`}),(0,V.jsx)(`span`,{children:`HEAD`}),(0,V.jsx)(`span`,{children:`Dirty`}),(0,V.jsx)(`span`,{children:`Owner`}),(0,V.jsx)(`span`,{children:`State`})]}),(i.data?.worktrees??[]).map(e=>(0,V.jsx)(bp,{w:e},e.path)),i.data&&!i.data.worktrees.length&&(0,V.jsx)(`div`,{className:`px-3 py-3 text-[13px] text-tan`,children:`no worktrees (not a git repo?)`})]})]})}function yp({b:e,defaultBranch:t}){let n=e.name===t||e.name.endsWith(`/${t}`),r=Date.parse(e.date);return(0,V.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 text-[13px]`,style:{gridTemplateColumns:fp},children:[(0,V.jsxs)(`span`,{className:`min-w-0`,children:[(0,V.jsx)(`span`,{className:`font-mono font-medium truncate block ${n?`text-ember`:`text-walnut`}`,title:e.name,children:e.name}),(0,V.jsx)(`span`,{className:`block text-[12px] text-umber truncate`,title:e.subject,children:e.subject})]}),(0,V.jsx)(`span`,{children:e.remote?(0,V.jsx)(K,{tone:`outline`,children:`remote`}):(0,V.jsx)(K,{tone:`neutral`,children:`local`})}),(0,V.jsxs)(`span`,{className:`min-w-0`,children:[(0,V.jsx)(`button`,{className:`font-mono text-[12px] text-walnut hover:text-ember`,title:`copy ${e.sha}`,onClick:()=>hp(e.sha),children:e.short}),(0,V.jsx)(`span`,{className:`block text-[11px] text-tan`,title:e.date,children:Number.isFinite(r)?Nd(r):``})]}),(0,V.jsx)(`span`,{className:`flex gap-1 flex-wrap`,children:n&&!e.remote?(0,V.jsx)(K,{tone:`solid`,children:`default`}):e.ahead===null||e.behind===null?(0,V.jsx)(`span`,{className:`font-mono text-[12px] text-tan`,children:`—`}):(0,V.jsxs)(V.Fragment,{children:[e.ahead>0&&(0,V.jsxs)(K,{tone:`david`,children:[`+`,e.ahead]}),e.behind>0&&(0,V.jsxs)(K,{tone:e.behind>20?`warn`:`neutral`,children:[`−`,e.behind]}),e.ahead===0&&e.behind===0&&(0,V.jsx)(K,{tone:`ok`,children:`even`})]})}),(0,V.jsxs)(`span`,{className:`flex gap-1 flex-wrap`,children:[e.merged&&!n&&(0,V.jsx)(K,{tone:`ok`,children:`merged`}),e.stale&&(0,V.jsx)(K,{tone:`warn`,children:`stale`}),e.worktree&&(0,V.jsxs)(`span`,{className:`font-mono text-[11px] text-umber`,title:e.worktree,children:[`⌂ `,mp(e.worktree).split(`/`).pop()]})]}),(0,V.jsx)(`span`,{className:`min-w-0`,children:e.owner?(0,V.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[(0,V.jsx)(ld,{id:e.owner,size:`sm`}),(0,V.jsx)(q,{size:`sm`,tone:`ghost`,title:`DM ${e.owner} about ${e.name}`,onClick:()=>gp(e.owner,`re branch \`${e.name}\` @ ${e.short}${e.pr?` (PR #${e.pr.number} ${e.pr.state})`:``}: `),children:`DM`})]}):(0,V.jsx)(`span`,{className:`font-mono text-[12px] text-tan`,children:`—`})}),(0,V.jsx)(`span`,{className:`min-w-0`,children:e.pr?(0,V.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 min-w-0`,children:[(0,V.jsxs)(`a`,{className:`font-mono text-[12px] text-walnut hover:text-ember underline decoration-dust`,href:e.pr.url,target:`_blank`,rel:`noreferrer`,title:e.pr.title,children:[`#`,e.pr.number]}),(0,V.jsx)(K,{tone:_p(e.pr.state),children:e.pr.state.toLowerCase()}),e.pr.qa&&(0,V.jsx)(`span`,{className:`font-mono text-[11px] text-umber truncate`,title:`QA / gate: ${e.pr.qa}`,children:e.pr.qa})]}):(0,V.jsx)(`span`,{className:`font-mono text-[12px] text-tan`,children:`—`})})]})}function bp({w:e}){return(0,V.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 text-[13px]`,style:{gridTemplateColumns:pp},children:[(0,V.jsxs)(`span`,{className:`min-w-0 inline-flex items-center gap-1.5`,children:[(0,V.jsx)(`span`,{className:`font-mono text-[12px] text-walnut truncate`,title:e.path,children:mp(e.path)}),e.isMain&&(0,V.jsx)(K,{tone:`solid`,children:`main checkout`})]}),(0,V.jsx)(`span`,{className:`font-mono text-[12px] truncate`,title:e.branch??`detached HEAD`,children:e.branch??(0,V.jsx)(`span`,{className:`text-tan`,children:`detached`})}),(0,V.jsx)(`span`,{children:(0,V.jsx)(`button`,{className:`font-mono text-[12px] text-walnut hover:text-ember`,title:`copy ${e.sha}`,onClick:()=>hp(e.sha),children:e.short})}),(0,V.jsx)(`span`,{children:e.dirty?(0,V.jsx)(K,{tone:`warn`,children:`dirty`}):(0,V.jsx)(K,{tone:`ok`,children:`clean`})}),(0,V.jsx)(`span`,{children:e.agent?(0,V.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[(0,V.jsx)(ld,{id:e.agent,size:`sm`}),(0,V.jsx)(q,{size:`sm`,tone:`ghost`,title:`DM ${e.agent} about this worktree`,onClick:()=>gp(e.agent,`re worktree ${mp(e.path)} (${e.branch??`detached`} @ ${e.short}${e.dirty?`, dirty`:``}): `),children:`DM`})]}):(0,V.jsx)(`span`,{className:`font-mono text-[12px] text-tan`,children:`—`})}),(0,V.jsxs)(`span`,{className:`flex gap-1`,children:[e.prunable&&(0,V.jsx)(K,{tone:`bad`,children:`prunable`}),e.detached&&(0,V.jsx)(K,{tone:`outline`,children:`detached`})]})]})}var xp=Di([{path:`/`,Component:Md,children:[{index:!0,Component:Qd},{path:`board`,Component:sf},{path:`bus`,Component:hf},{path:`monitor`,Component:jf},{path:`ops`,Component:Nf,children:[{index:!0,element:(0,V.jsx)(Ir,{to:`/ops/fleets`,replace:!0})},{path:`fleets`,Component:zf},{path:`skills`,Component:Wf},{path:`release`,Component:Zf},{path:`runs`,Component:np},{path:`events`,Component:Pf}]},{path:`fleet`,element:(0,V.jsx)(Ir,{to:`/ops/fleets`,replace:!0})},{path:`release`,element:(0,V.jsx)(Ir,{to:`/ops/release`,replace:!0})},{path:`skills`,element:(0,V.jsx)(Ir,{to:`/ops/skills`,replace:!0})},{path:`runs`,element:(0,V.jsx)(Ir,{to:`/ops/runs`,replace:!0})},{path:`docs/:doc?`,Component:Cf},{path:`git`,Component:vp}]}]);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,ti.createRoot)(document.getElementById(`root`)).render((0,V.jsx)(P.StrictMode,{children:(0,V.jsx)(Ba,{children:(0,V.jsx)(Ua,{children:(0,V.jsx)(no,{children:(0,V.jsx)(Mr,{router:xp})})})})}));export{o as n,l as r,ai as t};