@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
@@ -0,0 +1,41 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mermaid.core-B20ztOv3.js","assets/chunk-Y2CYZVJY-DsF7k-Jl.js","assets/src-0sS7-ICb.js","assets/chunk-I66GZJ75-Dqby7D_F.js","assets/chunk-NSK5VX7P-DfB90W7I.js","assets/dist-pnrLfy84.js","assets/chunk-4I5QYGJK-BPNU3mTP.js","assets/chunk-WRU74C26-D-XSx_qA.js","assets/chunk-7BUUIJ7U-Bb538aSH.js","assets/chunk-UBXNYLIW-BhXlBYFb.js","assets/chunk-W5SLKNZC-LMuVsYgU.js","assets/chunk-QR6OTTB3-PD4VlBbj.js","assets/rough.esm-Dy-Kn_BL.js","assets/chunk-7Z6QIM7H-N6BW9e3u.js","assets/line-pHRnA6j_.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 ie(e){0>re||(e.current=ne[re],ne[re]=null,re--)}function R(e,t){re++,ne[re]=e.current,e.current=t}var z=L(null),ae=L(null),oe=L(null),se=L(null);function ce(e,t){switch(R(oe,t),R(ae,e),R(z,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}}ie(z),R(z,e)}function le(){ie(z),ie(ae),ie(oe)}function ue(e){e.memoizedState!==null&&R(se,e);var t=z.current,n=Hd(t,e.type);t!==n&&(R(ae,e),R(z,n))}function de(e){ae.current===e&&(ie(z),ie(ae)),se.current===e&&(ie(se),Qf._currentValue=te)}var fe,pe;function me(e){if(fe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);fe=t&&t[1]||``,pe=-1<e.stack.indexOf(`
3
+ at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
4
+ `+fe+e+pe}var he=!1;function ge(e,t){if(!e||he)return``;he=!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{he=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?me(n):``}function _e(e,t){switch(e.tag){case 26:case 27:case 5:return me(e.type);case 16:return me(`Lazy`);case 13:return e.child!==t&&t!==null?me(`Suspense Fallback`):me(`Suspense`);case 19:return me(`SuspenseList`);case 0:case 15:return ge(e.type,!1);case 11:return ge(e.type.render,!1);case 1:return ge(e.type,!0);case 31:return me(`Activity`);default:return``}}function ve(e){try{var t=``,n=null;do t+=_e(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
8
+ Error generating stack: `+e.message+`
9
+ `+e.stack}}var ye=Object.prototype.hasOwnProperty,be=t.unstable_scheduleCallback,xe=t.unstable_cancelCallback,Se=t.unstable_shouldYield,Ce=t.unstable_requestPaint,we=t.unstable_now,Te=t.unstable_getCurrentPriorityLevel,Ee=t.unstable_ImmediatePriority,De=t.unstable_UserBlockingPriority,Oe=t.unstable_NormalPriority,ke=t.unstable_LowPriority,Ae=t.unstable_IdlePriority,je=t.log,Me=t.unstable_setDisableYieldValue,Ne=null,Pe=null;function Fe(e){if(typeof je==`function`&&Me(e),Pe&&typeof Pe.setStrictMode==`function`)try{Pe.setStrictMode(Ne,e)}catch{}}var Ie=Math.clz32?Math.clz32:ze,Le=Math.log,Re=Math.LN2;function ze(e){return e>>>=0,e===0?32:31-(Le(e)/Re|0)|0}var Be=256,Ve=262144,He=4194304;function Ue(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 We(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=Ue(n))):i=Ue(o):i=Ue(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ue(n))):i=Ue(o)):i=Ue(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 Ge(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ke(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function qe(){var e=He;return He<<=1,!(He&62914560)&&(He=4194304),e}function Je(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ye(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Xe(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Ie(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&Ze(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Ze(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ie(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Qe(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ie(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function $e(e,t){var n=t&-t;return n=n&42?1:et(n),(n&(e.suspendedLanes|t))===0?n:0}function et(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function tt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function nt(){var e=I.p;return e===0?(e=window.event,e===void 0?32:mp(e.type)):e}function rt(e,t){var n=I.p;try{return I.p=e,t()}finally{I.p=n}}var it=Math.random().toString(36).slice(2),at=`__reactFiber$`+it,ot=`__reactProps$`+it,st=`__reactContainer$`+it,ct=`__reactEvents$`+it,lt=`__reactListeners$`+it,ut=`__reactHandles$`+it,dt=`__reactResources$`+it,ft=`__reactMarker$`+it;function pt(e){delete e[at],delete e[ot],delete e[ct],delete e[lt],delete e[ut]}function mt(e){var t=e[at];if(t)return t;for(var n=e.parentNode;n;){if(t=n[st]||n[at]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=df(e);e!==null;){if(n=e[at])return n;e=df(e)}return t}e=n,n=e.parentNode}return null}function ht(e){if(e=e[at]||e[st]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function gt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function _t(e){var t=e[dt];return t||=e[dt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function vt(e){e[ft]=!0}var yt=new Set,bt={};function xt(e,t){St(e,t),St(e+`Capture`,t)}function St(e,t){for(bt[e]=t,e=0;e<t.length;e++)yt.add(t[e])}var Ct=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]*$`),wt={},Tt={};function Et(e){return ye.call(Tt,e)?!0:ye.call(wt,e)?!1:Ct.test(e)?Tt[e]=!0:(wt[e]=!0,!1)}function Dt(e,t,n){if(Et(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 Ot(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 kt(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 At(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function jt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Mt(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 Nt(e){if(!e._valueTracker){var t=jt(e)?`checked`:`value`;e._valueTracker=Mt(e,t,``+e[t])}}function Pt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=jt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}function Ft(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 It=/[\n"\\]/g;function Lt(e){return e.replace(It,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Rt(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=``+At(t)):e.value!==``+At(t)&&(e.value=``+At(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Bt(e,o,At(n)):Bt(e,o,At(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=``+At(s):e.removeAttribute(`name`)}function zt(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)){Nt(e);return}n=n==null?``:``+At(n),t=t==null?n:``+At(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),Nt(e)}function Bt(e,t,n){t===`number`&&Ft(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Vt(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=``+At(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 Ht(e,t,n){if(t!=null&&(t=``+At(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+At(n)}function Ut(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=At(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Nt(e)}function Wt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Gt=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 Kt(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||Gt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function qt(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&&Kt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Kt(e,o,t[o])}function Jt(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 Yt=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`]]),Xt=/^[\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 Zt(e){return Xt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Qt(){}var $t=null;function en(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var tn=null,nn=null;function rn(e){var t=ht(e);if(t&&(e=t.stateNode)){var n=e[ot]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Rt(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="`+Lt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[ot]||null;if(!a)throw Error(i(90));Rt(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&&Pt(r)}break a;case`textarea`:Ht(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Vt(e,!!n.multiple,t,!1)}}}var an=!1;function on(e,t,n){if(an)return e(t,n);an=!0;try{return e(t)}finally{if(an=!1,(tn!==null||nn!==null)&&(vu(),tn&&(t=tn,e=nn,nn=tn=null,rn(t),e)))for(t=0;t<e.length;t++)rn(e[t])}}function sn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[ot]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var cn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),ln=!1;if(cn)try{var un={};Object.defineProperty(un,"passive",{get:function(){ln=!0}}),window.addEventListener(`test`,un,un),window.removeEventListener(`test`,un,un)}catch{ln=!1}var dn=null,fn=null,pn=null;function mn(){if(pn)return pn;var e,t=fn,n=t.length,r,i=`value`in dn?dn.value:dn.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 pn=i.slice(e,1<r?1-r:void 0)}function hn(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 gn(){return!0}function _n(){return!1}function vn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?gn:_n,this.isPropagationStopped=_n,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=gn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=gn)},persist:function(){},isPersistent:gn}),t}var yn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},bn=vn(yn),xn=f({},yn,{view:0,detail:0}),Sn=vn(xn),Cn,wn,Tn,En=f({},xn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ln,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!==Tn&&(Tn&&e.type===`mousemove`?(Cn=e.screenX-Tn.screenX,wn=e.screenY-Tn.screenY):wn=Cn=0,Tn=e),Cn)},movementY:function(e){return`movementY`in e?e.movementY:wn}}),Dn=vn(En),On=vn(f({},En,{dataTransfer:0})),kn=vn(f({},xn,{relatedTarget:0})),An=vn(f({},yn,{animationName:0,elapsedTime:0,pseudoElement:0})),jn=vn(f({},yn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Mn=vn(f({},yn,{data:0})),Nn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Pn={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`},Fn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function In(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Fn[e])?!!t[e]:!1}function Ln(){return In}var Rn=vn(f({},xn,{key:function(e){if(e.key){var t=Nn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=hn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Pn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ln,charCode:function(e){return e.type===`keypress`?hn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?hn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),zn=vn(f({},En,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Bn=vn(f({},xn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ln})),Vn=vn(f({},yn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Hn=vn(f({},En,{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})),Un=vn(f({},yn,{newState:0,oldState:0})),Wn=[9,13,27,32],Gn=cn&&`CompositionEvent`in window,Kn=null;cn&&`documentMode`in document&&(Kn=document.documentMode);var qn=cn&&`TextEvent`in window&&!Kn,Jn=cn&&(!Gn||Kn&&8<Kn&&11>=Kn),Yn=` `,Xn=!1;function Zn(e,t){switch(e){case`keyup`:return Wn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Qn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var $n=!1;function er(e,t){switch(e){case`compositionend`:return Qn(t);case`keypress`:return t.which===32?(Xn=!0,Yn):null;case`textInput`:return e=t.data,e===Yn&&Xn?null:e;default:return null}}function tr(e,t){if($n)return e===`compositionend`||!Gn&&Zn(e,t)?(e=mn(),pn=fn=dn=null,$n=!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 Jn&&t.locale!==`ko`?null:t.data;default:return null}}var nr={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 rr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!nr[e.type]:t===`textarea`}function ir(e,t,n,r){tn?nn?nn.push(r):nn=[r]:tn=r,t=Td(t,`onChange`),0<t.length&&(n=new bn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var ar=null,or=null;function sr(e){vd(e,0)}function cr(e){if(Pt(gt(e)))return e}function lr(e,t){if(e===`change`)return t}var ur=!1;if(cn){var dr;if(cn){var fr=`oninput`in document;if(!fr){var pr=document.createElement(`div`);pr.setAttribute(`oninput`,`return;`),fr=typeof pr.oninput==`function`}dr=fr}else dr=!1;ur=dr&&(!document.documentMode||9<document.documentMode)}function mr(){ar&&(ar.detachEvent(`onpropertychange`,hr),or=ar=null)}function hr(e){if(e.propertyName===`value`&&cr(or)){var t=[];ir(t,or,e,en(e)),on(sr,t)}}function gr(e,t,n){e===`focusin`?(mr(),ar=t,or=n,ar.attachEvent(`onpropertychange`,hr)):e===`focusout`&&mr()}function _r(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return cr(or)}function vr(e,t){if(e===`click`)return cr(t)}function yr(e,t){if(e===`input`||e===`change`)return cr(t)}function br(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var xr=typeof Object.is==`function`?Object.is:br;function Sr(e,t){if(xr(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(!ye.call(t,i)||!xr(e[i],t[i]))return!1}return!0}function Cr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function wr(e,t){var n=Cr(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=Cr(n)}}function Tr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Tr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Er(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ft(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=Ft(e.document)}return t}function Dr(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 Or=cn&&`documentMode`in document&&11>=document.documentMode,kr=null,Ar=null,jr=null,Mr=!1;function Nr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Mr||kr==null||kr!==Ft(r)||(r=kr,`selectionStart`in r&&Dr(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}),jr&&Sr(jr,r)||(jr=r,r=Td(Ar,`onSelect`),0<r.length&&(t=new bn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=kr)))}function Pr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Fr={animationend:Pr(`Animation`,`AnimationEnd`),animationiteration:Pr(`Animation`,`AnimationIteration`),animationstart:Pr(`Animation`,`AnimationStart`),transitionrun:Pr(`Transition`,`TransitionRun`),transitionstart:Pr(`Transition`,`TransitionStart`),transitioncancel:Pr(`Transition`,`TransitionCancel`),transitionend:Pr(`Transition`,`TransitionEnd`)},Ir={},Lr={};cn&&(Lr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Fr.animationend.animation,delete Fr.animationiteration.animation,delete Fr.animationstart.animation),`TransitionEvent`in window||delete Fr.transitionend.transition);function Rr(e){if(Ir[e])return Ir[e];if(!Fr[e])return e;var t=Fr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Lr)return Ir[e]=t[n];return e}var zr=Rr(`animationend`),Br=Rr(`animationiteration`),Vr=Rr(`animationstart`),Hr=Rr(`transitionrun`),Ur=Rr(`transitionstart`),Wr=Rr(`transitioncancel`),Gr=Rr(`transitionend`),Kr=new Map,qr=`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(` `);qr.push(`scrollEnd`);function Jr(e,t){Kr.set(e,t),xt(t,[e])}var Yr=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)},Xr=[],Zr=0,Qr=0;function $r(){for(var e=Zr,t=Qr=Zr=0;t<e;){var n=Xr[t];Xr[t++]=null;var r=Xr[t];Xr[t++]=null;var i=Xr[t];Xr[t++]=null;var a=Xr[t];if(Xr[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&&ni(n,i,a)}}function ei(e,t,n,r){Xr[Zr++]=e,Xr[Zr++]=t,Xr[Zr++]=n,Xr[Zr++]=r,Qr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ti(e,t,n,r){return ei(e,t,n,r),ri(e)}function B(e,t){return ei(e,null,null,t),ri(e)}function ni(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-Ie(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ri(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 ii={};function ai(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 oi(e,t,n,r){return new ai(e,t,n,r)}function si(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ci(e,t){var n=e.alternate;return n===null?(n=oi(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 li(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 ui(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)si(e)&&(s=1);else if(typeof e==`string`)s=Uf(e,n,z.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case k:return e=oi(31,n,t,a),e.elementType=k,e.lanes=o,e;case y:return di(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=oi(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=oi(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=oi(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=oi(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function di(e,t,n,r){return e=oi(7,e,r,t),e.lanes=n,e}function fi(e,t,n){return e=oi(6,e,null,t),e.lanes=n,e}function pi(e){var t=oi(18,null,null,0);return t.stateNode=e,t}function mi(e,t,n){return t=oi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var hi=new WeakMap;function gi(e,t){if(typeof e==`object`&&e){var n=hi.get(e);return n===void 0?(t={value:e,source:t,stack:ve(t)},hi.set(e,t),t):n}return{value:e,source:t,stack:ve(t)}}var _i=[],vi=0,yi=null,bi=0,xi=[],Si=0,Ci=null,wi=1,Ti=``;function Ei(e,t){_i[vi++]=bi,_i[vi++]=yi,yi=e,bi=t}function Di(e,t,n){xi[Si++]=wi,xi[Si++]=Ti,xi[Si++]=Ci,Ci=e;var r=wi;e=Ti;var i=32-Ie(r)-1;r&=~(1<<i),n+=1;var a=32-Ie(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,wi=1<<32-Ie(t)+i|n<<i|r,Ti=a+e}else wi=1<<a|n<<i|r,Ti=e}function Oi(e){e.return!==null&&(Ei(e,1),Di(e,1,0))}function ki(e){for(;e===yi;)yi=_i[--vi],_i[vi]=null,bi=_i[--vi],_i[vi]=null;for(;e===Ci;)Ci=xi[--Si],xi[Si]=null,Ti=xi[--Si],xi[Si]=null,wi=xi[--Si],xi[Si]=null}function Ai(e,t){xi[Si++]=wi,xi[Si++]=Ti,xi[Si++]=Ci,wi=t.id,Ti=t.overflow,Ci=e}var V=null,ji=null,H=!1,Mi=null,Ni=!1,Pi=Error(i(519));function Fi(e){throw Vi(gi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Pi}function Ii(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[at]=e,t[ot]=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),zt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:$(`invalid`,t);break;case`textarea`:$(`invalid`,t),Ut(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=Qt),t=!0):t=!1,t||Fi(e,!0)}function Li(e){for(V=e.return;V;)switch(V.tag){case 5:case 31:case 13:Ni=!1;return;case 27:case 3:Ni=!0;return;default:V=V.return}}function Ri(e){if(e!==V)return!1;if(!H)return Li(e),H=!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&&ji&&Fi(e),Li(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));ji=uf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));ji=uf(e)}else t===27?(t=ji,Zd(e.type)?(e=lf,lf=null,ji=e):ji=t):ji=V?cf(e.stateNode.nextSibling):null;return!0}function zi(){ji=V=null,H=!1}function Bi(){var e=Mi;return e!==null&&(Yl===null?Yl=e:Yl.push.apply(Yl,e),Mi=null),e}function Vi(e){Mi===null?Mi=[e]:Mi.push(e)}var Hi=L(null),Ui=null,Wi=null;function Gi(e,t,n){R(Hi,t._currentValue),t._currentValue=n}function Ki(e){e._currentValue=Hi.current,ie(Hi)}function qi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Ji(e,t,n,r){var 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),qi(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),qi(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 Yi(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;xr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===se.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&&Ji(t,e,n,r),t.flags|=262144}function Xi(e){for(e=e.firstContext;e!==null;){if(!xr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Zi(e){Ui=e,Wi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Qi(e){return ea(Ui,e)}function $i(e,t){return Ui===null&&Zi(e),ea(e,t)}function ea(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Wi===null){if(e===null)throw Error(i(308));Wi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Wi=Wi.next=t;return n}var ta=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},na=t.unstable_scheduleCallback,ra=t.unstable_NormalPriority,ia={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function aa(){return{controller:new ta,data:new Map,refCount:0}}function oa(e){e.refCount--,e.refCount===0&&na(ra,function(){e.controller.abort()})}var sa=null,ca=0,la=0,ua=null;function da(e,t){if(sa===null){var n=sa=[];ca=0,la=ud(),ua={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ca++,t.then(fa,fa),t}function fa(){if(--ca===0&&sa!==null){ua!==null&&(ua.status=`fulfilled`);var e=sa;sa=null,la=0,ua=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function pa(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var ma=F.S;F.S=function(e,t){Ql=we(),typeof t==`object`&&t&&typeof t.then==`function`&&da(e,t),ma!==null&&ma(e,t)};var ha=L(null);function ga(){var e=ha.current;return e===null?Fl.pooledCache:e}function _a(e,t){t===null?R(ha,ha.current):R(ha,t.pool)}function va(){var e=ga();return e===null?null:{parent:ia._currentValue,pool:e}}var ya=Error(i(460)),ba=Error(i(474)),xa=Error(i(542)),Sa={then:function(){}};function Ca(e){return e=e.status,e===`fulfilled`||e===`rejected`}function wa(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Qt,Qt),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,G(e),e;default:if(typeof t.status==`string`)t.then(Qt,Qt);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,G(e),e}throw W=t,ya}}function U(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(W=e,ya):e}}var W=null;function Ta(){if(W===null)throw Error(i(459));var e=W;return W=null,e}function G(e){if(e===ya||e===xa)throw Error(i(483))}var Ea=null,Da=0;function Oa(e){var t=Da;return Da+=1,Ea===null&&(Ea=[]),wa(Ea,e,t)}function ka(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Aa(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 K(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=ci(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=fi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===O&&U(i)===t.type)?(t=a(t,n.props),ka(t,n),t.return=e,t):(t=ui(n.type,n.key,n.props,null,e.mode,r),ka(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=mi(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=di(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=fi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case g:return n=ui(t.type,t.key,t.props,null,e.mode,n),ka(n,t),n.return=e,n;case v:return t=mi(t,e.mode,n),t.return=e,t;case O:return t=U(t),f(e,t,n)}if(P(t)||M(t))return t=di(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Oa(t),n);if(t.$$typeof===C)return f(e,$i(e,t),n);Aa(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case g:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case O:return n=U(n),p(e,t,n,r)}if(P(n)||M(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Oa(n),r);if(n.$$typeof===C)return p(e,t,$i(e,n),r);Aa(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case g:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case O:return r=U(r),m(e,t,n,r,i)}if(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,Oa(r),i);if(r.$$typeof===C)return m(e,t,n,$i(t,r),i);Aa(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),H&&Ei(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 H&&Ei(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)}),H&&Ei(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),H&&Ei(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 H&&Ei(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)}),H&&Ei(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case g:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===O&&U(l)===r.type){n(e,r.sibling),c=a(r,o.props),ka(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===y?(c=di(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=ui(o.type,o.key,o.props,null,e.mode,c),ka(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=mi(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=U(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,Oa(o),c);if(o.$$typeof===C)return b(e,r,$i(e,o),c);Aa(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=fi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Da=0;var i=b(e,t,n,r);return Ea=null,i}catch(t){if(t===ya||t===xa)throw t;var a=oi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var ja=K(!0),Ma=K(!1),Na=!1;function Pa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Fa(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 q(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ia(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,X&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ri(e),ni(e,null,n),t}return ei(e,r,t,n),ri(e)}function La(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Qe(e,n)}}function Ra(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 za=!1;function Ba(){if(za){var e=ua;if(e!==null)throw e}}function Va(e,t,n,r){za=!1;var i=e.updateQueue;Na=!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===la&&(za=!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:Na=!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 Ha(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Ua(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ha(n[e],t)}var Wa=L(null),Ga=L(0);function Ka(e,t){e=Vl,R(Ga,e),R(Wa,t),Vl=e|t.baseLanes}function qa(){R(Ga,Vl),R(Wa,Wa.current)}function Ja(){Vl=Ga.current,ie(Wa),ie(Ga)}var Ya=L(null),Xa=null;function Za(e){var t=e.alternate;R(no,no.current&1),R(Ya,e),Xa===null&&(t===null||Wa.current!==null||t.memoizedState!==null)&&(Xa=e)}function Qa(e){R(no,no.current),R(Ya,e),Xa===null&&(Xa=e)}function $a(e){e.tag===22?(R(no,no.current),R(Ya,e),Xa===null&&(Xa=e)):eo(e)}function eo(){R(no,no.current),R(Ya,Ya.current)}function to(e){ie(Ya),Xa===e&&(Xa=null),ie(no)}var no=L(0);function ro(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 io=0,J=null,ao=null,oo=null,so=!1,co=!1,lo=!1,uo=0,fo=0,po=null,mo=0;function ho(){throw Error(i(321))}function go(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!xr(e[n],t[n]))return!1;return!0}function _o(e,t,n,r,i,a){return io=a,J=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,F.H=e===null||e.memoizedState===null?Ps:Fs,lo=!1,a=n(r,i),lo=!1,co&&(a=yo(t,n,r,i)),vo(e),a}function vo(e){F.H=Ns;var t=ao!==null&&ao.next!==null;if(io=0,oo=ao=J=null,so=!1,fo=0,po=null,t)throw Error(i(300));e===null||Qs||(e=e.dependencies,e!==null&&Xi(e)&&(Qs=!0))}function yo(e,t,n,r){J=e;var a=0;do{if(co&&(po=null),fo=0,co=!1,25<=a)throw Error(i(301));if(a+=1,oo=ao=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=Is,o=t(n,r)}while(co);return o}function bo(){var e=F.H,t=e.useState()[0];return t=typeof t.then==`function`?Do(t):t,e=e.useState()[0],(ao===null?null:ao.memoizedState)!==e&&(J.flags|=1024),t}function xo(){var e=uo!==0;return uo=0,e}function So(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Co(e){if(so){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}so=!1}io=0,oo=ao=J=null,co=!1,fo=uo=0,po=null}function wo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return oo===null?J.memoizedState=oo=e:oo=oo.next=e,oo}function To(){if(ao===null){var e=J.alternate;e=e===null?null:e.memoizedState}else e=ao.next;var t=oo===null?J.memoizedState:oo.next;if(t!==null)oo=t,ao=e;else{if(e===null)throw J.alternate===null?Error(i(467)):Error(i(310));ao=e,e={memoizedState:ao.memoizedState,baseState:ao.baseState,baseQueue:ao.baseQueue,queue:ao.queue,next:null},oo===null?J.memoizedState=oo=e:oo=oo.next=e}return oo}function Eo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Do(e){var t=fo;return fo+=1,po===null&&(po=[]),e=wa(po,e,t),t=J,(oo===null?t.memoizedState:oo.next)===null&&(t=t.alternate,F.H=t===null||t.memoizedState===null?Ps:Fs),e}function Oo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Do(e);if(e.$$typeof===C)return Qi(e)}throw Error(i(438,String(e)))}function ko(e){var t=null,n=J.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=J.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=Eo(),J.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 Ao(e,t){return typeof t==`function`?t(e):t}function jo(e){return Mo(To(),ao,e)}function Mo(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?(io&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===la&&(d=!0);else if((io&p)===p){u=u.next,p===la&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,J.lanes|=p,Ul|=p;f=u.action,lo&&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,J.lanes|=f,Ul|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!xr(o,e.memoizedState)&&(Qs=!0,d&&(n=ua,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 No(e){var t=To(),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);xr(o,t.memoizedState)||(Qs=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Po(e,t,n){var r=J,a=To(),o=H;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!xr((ao||a).memoizedState,n);if(s&&(a.memoizedState=n,Qs=!0),a=a.queue,as(Lo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||oo!==null&&oo.memoizedState.tag&1){if(r.flags|=2048,es(9,{destroy:void 0},Io.bind(null,r,a,n,t),null),Fl===null)throw Error(i(349));o||io&127||Fo(r,t,n)}return n}function Fo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=J.updateQueue,t===null?(t=Eo(),J.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Io(e,t,n,r){t.value=n,t.getSnapshot=r,Ro(t)&&zo(e)}function Lo(e,t,n){return n(function(){Ro(t)&&zo(e)})}function Ro(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!xr(e,n)}catch{return!0}}function zo(e){var t=B(e,2);t!==null&&pu(t,e,2)}function Bo(e){var t=wo();if(typeof e==`function`){var n=e;if(e=n(),lo){Fe(!0);try{n()}finally{Fe(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ao,lastRenderedState:e},t}function Vo(e,t,n,r){return e.baseState=n,Mo(e,ao,typeof r==`function`?r:Ao)}function Ho(e,t,n,r,a){if(As(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,Uo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Uo(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),Wo(e,t,s)}catch(n){Ko(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),F.T=a}}else try{a=n(i,r),Wo(e,t,a)}catch(n){Ko(e,t,n)}}function Wo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Go(e,t,n)},function(n){return Ko(e,t,n)}):Go(e,t,n)}function Go(e,t,n){t.status=`fulfilled`,t.value=n,qo(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Uo(e,n)))}function Ko(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,qo(t),t=t.next;while(t!==r)}e.action=null}function qo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Jo(e,t){return t}function Yo(e,t){if(H){var n=Fl.formState;if(n!==null){a:{var r=J;if(H){if(ji){b:{for(var i=ji,a=Ni;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){ji=cf(i.nextSibling),r=i.data===`F!`;break a}}Fi(r)}r=!1}r&&(t=n[0])}}return n=wo(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jo,lastRenderedState:t},n.queue=r,n=Ds.bind(null,J,r),r.dispatch=n,r=Bo(!1),a=ks.bind(null,J,!1,r.queue),r=wo(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Ho.bind(null,J,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Xo(e){return Zo(To(),ao,e)}function Zo(e,t,n){if(t=Mo(e,t,Jo)[0],e=jo(Ao)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Do(t)}catch(e){throw e===ya?xa:e}else r=t;t=To();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(J.flags|=2048,es(9,{destroy:void 0},Qo.bind(null,i,n),null)),[r,a,e]}function Qo(e,t){e.action=t}function $o(e){var t=To(),n=ao;if(n!==null)return Zo(t,n,e);To(),t=t.memoizedState,n=To();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function es(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=J.updateQueue,t===null&&(t=Eo(),J.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 ts(){return To().memoizedState}function ns(e,t,n,r){var i=wo();J.flags|=e,i.memoizedState=es(1|t,{destroy:void 0},n,r===void 0?null:r)}function rs(e,t,n,r){var i=To();r=r===void 0?null:r;var a=i.memoizedState.inst;ao!==null&&r!==null&&go(r,ao.memoizedState.deps)?i.memoizedState=es(t,a,n,r):(J.flags|=e,i.memoizedState=es(1|t,a,n,r))}function is(e,t){ns(8390656,8,e,t)}function as(e,t){rs(2048,8,e,t)}function os(e){J.flags|=4;var t=J.updateQueue;if(t===null)t=Eo(),J.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ss(e){var t=To().memoizedState;return os({ref:t,nextImpl:e}),function(){if(X&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function cs(e,t){return rs(4,2,e,t)}function ls(e,t){return rs(4,4,e,t)}function us(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 ds(e,t,n){n=n==null?null:n.concat([e]),rs(4,4,us.bind(null,t,e),n)}function fs(){}function ps(e,t){var n=To();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&go(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ms(e,t){var n=To();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&go(t,r[1]))return r[0];if(r=e(),lo){Fe(!0);try{e()}finally{Fe(!1)}}return n.memoizedState=[r,t],r}function hs(e,t,n){return n===void 0||io&1073741824&&!(Q&261930)?e.memoizedState=t:(e.memoizedState=n,e=fu(),J.lanes|=e,Ul|=e,n)}function gs(e,t,n,r){return xr(n,t)?n:Wa.current===null?!(io&42)||io&1073741824&&!(Q&261930)?(Qs=!0,e.memoizedState=n):(e=fu(),J.lanes|=e,Ul|=e,t):(e=hs(e,n,r),xr(e,t)||(Qs=!0),e)}function _s(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,ks(e,!1,t,n);try{var c=i(),l=F.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Os(e,t,pa(c,r),du(e)):Os(e,t,r,du(e))}catch(n){Os(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 vs(){}function ys(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=bs(e).queue;_s(e,a,t,te,n===null?vs:function(){return xs(e),n(r)})}function bs(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:Ao,lastRenderedState:te},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ao,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function xs(e){var t=bs(e);t.next===null&&(t=e.alternate.memoizedState),Os(e,t.next.queue,{},du())}function Ss(){return Qi(Qf)}function Cs(){return To().memoizedState}function ws(){return To().memoizedState}function Ts(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=du();e=q(n);var r=Ia(t,e,n);r!==null&&(pu(r,t,n),La(r,t,n)),t={cache:aa()},e.payload=t;return}t=t.return}}function Es(e,t,n){var r=du();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},As(e)?js(t,n):(n=ti(e,t,n,r),n!==null&&(pu(n,e,r),Ms(n,t,r)))}function Ds(e,t,n){Os(e,t,n,du())}function Os(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(As(e))js(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,xr(s,o))return ei(e,t,i,0),Fl===null&&$r(),!1}catch{}if(n=ti(e,t,i,r),n!==null)return pu(n,e,r),Ms(n,t,r),!0}return!1}function ks(e,t,n,r){if(r={lane:2,revertLane:ud(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},As(e)){if(t)throw Error(i(479))}else t=ti(e,n,r,2),t!==null&&pu(t,e,2)}function As(e){var t=e.alternate;return e===J||t!==null&&t===J}function js(e,t){co=so=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ms(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Qe(e,n)}}var Ns={readContext:Qi,use:Oo,useCallback:ho,useContext:ho,useEffect:ho,useImperativeHandle:ho,useLayoutEffect:ho,useInsertionEffect:ho,useMemo:ho,useReducer:ho,useRef:ho,useState:ho,useDebugValue:ho,useDeferredValue:ho,useTransition:ho,useSyncExternalStore:ho,useId:ho,useHostTransitionStatus:ho,useFormState:ho,useActionState:ho,useOptimistic:ho,useMemoCache:ho,useCacheRefresh:ho};Ns.useEffectEvent=ho;var Ps={readContext:Qi,use:Oo,useCallback:function(e,t){return wo().memoizedState=[e,t===void 0?null:t],e},useContext:Qi,useEffect:is,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ns(4194308,4,us.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ns(4194308,4,e,t)},useInsertionEffect:function(e,t){ns(4,2,e,t)},useMemo:function(e,t){var n=wo();t=t===void 0?null:t;var r=e();if(lo){Fe(!0);try{e()}finally{Fe(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=wo();if(n!==void 0){var i=n(t);if(lo){Fe(!0);try{n(t)}finally{Fe(!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=Es.bind(null,J,e),[r.memoizedState,e]},useRef:function(e){var t=wo();return e={current:e},t.memoizedState=e},useState:function(e){e=Bo(e);var t=e.queue,n=Ds.bind(null,J,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:fs,useDeferredValue:function(e,t){return hs(wo(),e,t)},useTransition:function(){var e=Bo(!1);return e=_s.bind(null,J,e.queue,!0,!1),wo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=J,a=wo();if(H){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Fl===null)throw Error(i(349));Q&127||Fo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,is(Lo.bind(null,r,o,e),[e]),r.flags|=2048,es(9,{destroy:void 0},Io.bind(null,r,o,n,t),null),n},useId:function(){var e=wo(),t=Fl.identifierPrefix;if(H){var n=Ti,r=wi;n=(r&~(1<<32-Ie(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=uo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=mo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Ss,useFormState:Yo,useActionState:Yo,useOptimistic:function(e){var t=wo();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=ks.bind(null,J,!0,n),n.dispatch=t,[e,t]},useMemoCache:ko,useCacheRefresh:function(){return wo().memoizedState=Ts.bind(null,J)},useEffectEvent:function(e){var t=wo(),n={impl:e};return t.memoizedState=n,function(){if(X&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Fs={readContext:Qi,use:Oo,useCallback:ps,useContext:Qi,useEffect:as,useImperativeHandle:ds,useInsertionEffect:cs,useLayoutEffect:ls,useMemo:ms,useReducer:jo,useRef:ts,useState:function(){return jo(Ao)},useDebugValue:fs,useDeferredValue:function(e,t){return gs(To(),ao.memoizedState,e,t)},useTransition:function(){var e=jo(Ao)[0],t=To().memoizedState;return[typeof e==`boolean`?e:Do(e),t]},useSyncExternalStore:Po,useId:Cs,useHostTransitionStatus:Ss,useFormState:Xo,useActionState:Xo,useOptimistic:function(e,t){return Vo(To(),ao,e,t)},useMemoCache:ko,useCacheRefresh:ws};Fs.useEffectEvent=ss;var Is={readContext:Qi,use:Oo,useCallback:ps,useContext:Qi,useEffect:as,useImperativeHandle:ds,useInsertionEffect:cs,useLayoutEffect:ls,useMemo:ms,useReducer:No,useRef:ts,useState:function(){return No(Ao)},useDebugValue:fs,useDeferredValue:function(e,t){var n=To();return ao===null?hs(n,e,t):gs(n,ao.memoizedState,e,t)},useTransition:function(){var e=No(Ao)[0],t=To().memoizedState;return[typeof e==`boolean`?e:Do(e),t]},useSyncExternalStore:Po,useId:Cs,useHostTransitionStatus:Ss,useFormState:$o,useActionState:$o,useOptimistic:function(e,t){var n=To();return ao===null?(n.baseState=e,[e,n.queue.dispatch]):Vo(n,ao,e,t)},useMemoCache:ko,useCacheRefresh:ws};Is.useEffectEvent=ss;function Ls(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 Rs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=du(),i=q(r);i.payload=t,n!=null&&(i.callback=n),t=Ia(e,i,r),t!==null&&(pu(t,e,r),La(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=du(),i=q(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ia(e,i,r),t!==null&&(pu(t,e,r),La(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=du(),r=q(n);r.tag=2,t!=null&&(r.callback=t),t=Ia(e,r,n),t!==null&&(pu(t,e,n),La(t,e,n))}};function zs(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?!Sr(n,r)||!Sr(i,a):!0}function Bs(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&&Rs.enqueueReplaceState(t,t.state,null)}function Vs(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 Hs(e){Yr(e)}function Us(e){console.error(e)}function Ws(e){Yr(e)}function Gs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Ks(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 qs(e,t,n){return n=q(n),n.tag=3,n.payload={element:null},n.callback=function(){Gs(e,t)},n}function Js(e){return e=q(e),e.tag=3,e}function Ys(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(){Ks(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Ks(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 Xs(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Yi(t,n,a,!0),n=Ya.current,n!==null){switch(n.tag){case 31:case 13:return Xa===null?Tu():n.alternate===null&&Hl===0&&(Hl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Sa?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===Sa?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Wu(e,r,a)),!1}throw Error(i(435,n.tag))}return Wu(e,r,a),Tu(),!1}if(H)return t=Ya.current,t===null?(r!==Pi&&(t=Error(i(423),{cause:r}),Vi(gi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=gi(r,n),a=qs(e.stateNode,r,a),Ra(e,a),Hl!==4&&(Hl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Pi&&(e=Error(i(422),{cause:r}),Vi(gi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=gi(o,n),Jl===null?Jl=[o]:Jl.push(o),Hl!==4&&(Hl=2),t===null)return!0;r=gi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=qs(n.stateNode,r,e),Ra(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=Js(a),Ys(a,e,n,r),Ra(n,a),!1}n=n.return}while(n!==null);return!1}var Zs=Error(i(461)),Qs=!1;function $s(e,t,n,r){t.child=e===null?Ma(t,null,n,r):ja(t,e.child,n,r)}function ec(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Zi(t),r=_o(e,t,n,o,a,i),s=xo(),e!==null&&!Qs?(So(e,t,i),Y(e,t,i)):(H&&s&&Oi(t),t.flags|=1,$s(e,t,r,i),t.child)}function tc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!si(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,nc(e,t,a,r,i)):(e=ui(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!wc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Sr:n,n(o,r)&&e.ref===t.ref)return Y(e,t,i)}return t.flags|=1,e=ci(a,r),e.ref=t.ref,e.return=t,t.child=e}function nc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Sr(a,r)&&e.ref===t.ref){if(Qs=!1,t.pendingProps=r=a,wc(e,i))e.flags&131072&&(Qs=!0);else return t.lanes=e.lanes,Y(e,t,i)}}return uc(e,t,n,r,i)}function rc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return ac(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&_a(t,a===null?null:a.cachePool),a===null?qa():Ka(t,a),$a(t);else return r=t.lanes=536870912,ac(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&_a(t,null),qa(),eo(t)):(_a(t,a.cachePool),Ka(t,a),eo(t),t.memoizedState=null);return $s(e,t,i,n),t.child}function ic(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function ac(e,t,n,r,i){var a=ga();return a=a===null?null:{parent:ia._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&_a(t,null),qa(),$a(t),e!==null&&Yi(e,t,r,!0),t.childLanes=i,null}function oc(e,t){return t=yc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function sc(e,t,n){return ja(t,e.child,null,n),e=oc(t,t.pendingProps),e.flags|=2,to(t),t.memoizedState=null,e}function cc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(H){if(r.mode===`hidden`)return e=oc(t,r),t.lanes=536870912,ic(null,e);if(Qa(t),(e=ji)?(e=rf(e,Ni),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ci===null?null:{id:wi,overflow:Ti},retryLane:536870912,hydrationErrors:null},n=pi(e),n.return=t,t.child=n,V=t,ji=null)):e=null,e===null)throw Fi(t);return t.lanes=536870912,null}return oc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Qa(t),a){if(t.flags&256)t.flags&=-257,t=sc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(Qs||Yi(e,t,n,!1),a=(n&e.childLanes)!==0,Qs||a){if(r=Fl,r!==null&&(s=$e(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,B(e,s),pu(r,e,s),Zs;Tu(),t=sc(e,t,n)}else e=o.treeContext,ji=cf(s.nextSibling),V=t,H=!0,Mi=null,Ni=!1,e!==null&&Ai(t,e),t=oc(t,r),t.flags|=4096;return t}return e=ci(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function lc(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 uc(e,t,n,r,i){return Zi(t),n=_o(e,t,n,r,void 0,i),r=xo(),e!==null&&!Qs?(So(e,t,i),Y(e,t,i)):(H&&r&&Oi(t),t.flags|=1,$s(e,t,n,i),t.child)}function dc(e,t,n,r,i,a){return Zi(t),t.updateQueue=null,n=yo(t,r,n,i),vo(e),r=xo(),e!==null&&!Qs?(So(e,t,a),Y(e,t,a)):(H&&r&&Oi(t),t.flags|=1,$s(e,t,n,a),t.child)}function fc(e,t,n,r,i){if(Zi(t),t.stateNode===null){var a=ii,o=n.contextType;typeof o==`object`&&o&&(a=Qi(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Rs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Pa(t),o=n.contextType,a.context=typeof o==`object`&&o?Qi(o):ii,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Ls(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&&Rs.enqueueReplaceState(a,a.state,null),Va(t,r,a,i),Ba(),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=Vs(n,s);a.props=c;var l=a.context,u=n.contextType;o=ii,typeof u==`object`&&u&&(o=Qi(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Bs(t,a,r,o),Na=!1;var f=t.memoizedState;a.state=f,Va(t,r,a,i),Ba(),l=t.memoizedState,s||f!==l||Na?(typeof d==`function`&&(Ls(t,n,d,r),l=t.memoizedState),(c=Na||zs(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,Fa(e,t),o=t.memoizedProps,u=Vs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ii,typeof l==`object`&&l&&(c=Qi(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Bs(t,a,r,c),Na=!1,f=t.memoizedState,a.state=f,Va(t,r,a,i),Ba();var p=t.memoizedState;o!==d||f!==p||Na||e!==null&&e.dependencies!==null&&Xi(e.dependencies)?(typeof s==`function`&&(Ls(t,n,s,r),p=t.memoizedState),(u=Na||zs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Xi(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,lc(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=ja(t,e.child,null,i),t.child=ja(t,null,n,i)):$s(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Y(e,t,i),e}function pc(e,t,n,r){return zi(),t.flags|=256,$s(e,t,n,r),t.child}var mc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function hc(e){return{baseLanes:e,cachePool:va()}}function gc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Kl),e}function _c(e,t,n){var r=t.pendingProps,a=!1,o=!!(t.flags&128),s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:!!(no.current&2)),s&&(a=!0,t.flags&=-129),s=!!(t.flags&32),t.flags&=-33,e===null){if(H){if(a?Za(t):eo(t),(e=ji)?(e=rf(e,Ni),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ci===null?null:{id:wi,overflow:Ti},retryLane:536870912,hydrationErrors:null},n=pi(e),n.return=t,t.child=n,V=t,ji=null)):e=null,e===null)throw Fi(t);return of(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(eo(t),a=t.mode,c=yc({mode:`hidden`,children:c},a),r=di(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=hc(n),r.childLanes=gc(e,s,n),t.memoizedState=mc,ic(null,r)):(Za(t),vc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(Za(t),t.flags&=-257,t=bc(e,t,n)):t.memoizedState===null?(eo(t),c=r.fallback,a=t.mode,r=yc({mode:`visible`,children:r.children},a),c=di(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,ja(t,e.child,null,n),r=t.child,r.memoizedState=hc(n),r.childLanes=gc(e,s,n),t.memoizedState=mc,t=ic(null,r)):(eo(t),t.child=e.child,t.flags|=128,t=null);else if(Za(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,Vi({value:r,source:null,stack:null}),t=bc(e,t,n)}else if(Qs||Yi(e,t,n,!1),s=(n&e.childLanes)!==0,Qs||s){if(s=Fl,s!==null&&(r=$e(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,B(e,r),pu(s,e,r),Zs;af(c)||Tu(),t=bc(e,t,n)}else af(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,ji=cf(c.nextSibling),V=t,H=!0,Mi=null,Ni=!1,e!==null&&Ai(t,e),t=vc(t,r.children),t.flags|=4096);return t}return a?(eo(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=ci(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=di(c,a,n,null),c.flags|=2):c=ci(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,ic(null,r),r=t.child,c=e.child.memoizedState,c===null?c=hc(n):(a=c.cachePool,a===null?a=va():(l=ia._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=gc(e,s,n),t.memoizedState=mc,ic(e.child,r)):(Za(t),n=e.child,e=n.sibling,n=ci(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 vc(e,t){return t=yc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function yc(e,t){return e=oi(22,e,null,t),e.lanes=0,e}function bc(e,t,n){return ja(t,e.child,null,n),e=vc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function xc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),qi(e.return,t,n)}function Sc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Cc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=no.current,s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,R(no,o),$s(e,t,r,n),r=H?bi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&xc(e,n,t);else if(e.tag===19)xc(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&&ro(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Sc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&ro(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Sc(t,!0,n,null,a,r);break;case`together`:Sc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Y(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ul|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(Yi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=ci(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ci(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function wc(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&Xi(e)))}function Tc(e,t,n){switch(t.tag){case 3:ce(t,t.stateNode.containerInfo),Gi(t,ia,e.memoizedState.cache),zi();break;case 27:case 5:ue(t);break;case 4:ce(t,t.stateNode.containerInfo);break;case 10:Gi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Qa(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(Za(t),e=Y(e,t,n),e===null?null:e.sibling):_c(e,t,n):(Za(t),t.flags|=128,null);Za(t);break;case 19:var i=!!(e.flags&128);if(r=(n&t.childLanes)!==0,r||=(Yi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Cc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),R(no,no.current),r)break;return null;case 22:return t.lanes=0,rc(e,t,n,t.pendingProps);case 24:Gi(t,ia,e.memoizedState.cache)}return Y(e,t,n)}function Ec(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)Qs=!0;else{if(!wc(e,n)&&!(t.flags&128))return Qs=!1,Tc(e,t,n);Qs=!!(e.flags&131072)}}else Qs=!1,H&&t.flags&1048576&&Di(t,bi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=U(t.elementType),t.type=e,typeof e==`function`)si(e)?(r=Vs(e,r),t.tag=1,t=fc(null,t,e,r,n)):(t.tag=0,t=uc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=ec(null,t,e,r,n);break a}if(a===D){t.tag=14,t=tc(null,t,e,r,n);break a}}throw t=ee(e)||e,Error(i(306,t,``))}}return t;case 0:return uc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Vs(r,t.pendingProps),fc(e,t,r,a,n);case 3:a:{if(ce(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Fa(e,t),Va(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Gi(t,ia,r),r!==o.cache&&Ji(t,[ia],n,!0),Ba(),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=pc(e,t,r,n);break a}if(r!==a){a=gi(Error(i(424)),t),Vi(a),t=pc(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(ji=cf(e.firstChild),V=t,H=!0,Mi=null,Ni=!0,n=Ma(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(zi(),r===a){t=Y(e,t,n);break a}$s(e,t,r,n)}t=t.child}return t;case 26:return lc(e,t),e===null?(n=kf(t.type,null,t.pendingProps,null))?t.memoizedState=n:H||(n=t.type,e=t.pendingProps,r=Bd(oe.current).createElement(n),r[at]=t,r[ot]=e,Pd(r,n,e),vt(r),t.stateNode=r):t.memoizedState=kf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ue(t),e===null&&H&&(r=t.stateNode=ff(t.type,t.pendingProps,oe.current),V=t,Ni=!0,a=ji,Zd(t.type)?(lf=a,ji=cf(r.firstChild)):ji=a),$s(e,t,t.pendingProps.children,n),lc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&H&&((a=r=ji)&&(r=tf(r,t.type,t.pendingProps,Ni),r===null?a=!1:(t.stateNode=r,V=t,ji=cf(r.firstChild),Ni=!1,a=!0)),a||Fi(t)),ue(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=_o(e,t,bo,null,null,n),Qf._currentValue=a),lc(e,t),$s(e,t,r,n),t.child;case 6:return e===null&&H&&((e=n=ji)&&(n=nf(n,t.pendingProps,Ni),n===null?e=!1:(t.stateNode=n,V=t,ji=null,e=!0)),e||Fi(t)),null;case 13:return _c(e,t,n);case 4:return ce(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ja(t,null,r,n):$s(e,t,r,n),t.child;case 11:return ec(e,t,t.type,t.pendingProps,n);case 7:return $s(e,t,t.pendingProps,n),t.child;case 8:return $s(e,t,t.pendingProps.children,n),t.child;case 12:return $s(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Gi(t,t.type,r.value),$s(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,Zi(t),a=Qi(a),r=r(a),t.flags|=1,$s(e,t,r,n),t.child;case 14:return tc(e,t,t.type,t.pendingProps,n);case 15:return nc(e,t,t.type,t.pendingProps,n);case 19:return Cc(e,t,n);case 31:return cc(e,t,n);case 22:return rc(e,t,n,t.pendingProps);case 24:return Zi(t),r=Qi(ia),e===null?(a=ga(),a===null&&(a=Fl,o=aa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Pa(t),Gi(t,ia,a)):((e.lanes&n)!==0&&(Fa(e,t),Va(t,null,null,n),Ba()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Gi(t,ia,r),r!==a.cache&&Ji(t,[ia],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Gi(t,ia,r))),$s(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Dc(e){e.flags|=4}function Oc(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 W=Sa,ba}}else e.flags&=-16777217}function kc(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 W=Sa,ba}}function Ac(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:qe(),e.lanes|=t,ql|=t)}function jc(e,t){if(!H)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 Mc(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 Nc(e,t,n){var r=t.pendingProps;switch(ki(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Mc(t),null;case 1:return Mc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Ki(ia),le(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ri(t)?Dc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Bi())),Mc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Dc(t),o===null?(Mc(t),Oc(t,a,null,r,n)):(Mc(t),kc(t,o))):o?o===e.memoizedState?(Mc(t),t.flags&=-16777217):(Dc(t),Mc(t),kc(t,o)):(e=e.memoizedProps,e!==r&&Dc(t),Mc(t),Oc(t,a,e,r,n)),null;case 27:if(de(t),n=oe.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Dc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Mc(t),null}e=z.current,Ri(t)?Ii(t,e):(e=ff(a,r,n),t.stateNode=e,Dc(t))}return Mc(t),null;case 5:if(de(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Dc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Mc(t),null}if(o=z.current,Ri(t))Ii(t,o);else{var s=Bd(oe.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[at]=t,o[ot]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(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&&Dc(t)}}return Mc(t),Oc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Dc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=oe.current,Ri(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=V,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[at]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||jd(e.nodeValue,n)),e||Fi(t,!0)}else e=Bd(e).createTextNode(r),e[at]=t,t.stateNode=e}return Mc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ri(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[at]=t}else zi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Mc(t),e=!1}else n=Bi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(to(t),t):(to(t),null);if(t.flags&128)throw Error(i(558))}return Mc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Ri(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[at]=t}else zi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Mc(t),a=!1}else a=Bi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(to(t),t):(to(t),null)}return to(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),Ac(t,t.updateQueue),Mc(t),null);case 4:return le(),e===null&&xd(t.stateNode.containerInfo),Mc(t),null;case 10:return Ki(t.type),Mc(t),null;case 19:if(ie(no),r=t.memoizedState,r===null)return Mc(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)jc(r,!1);else{if(Hl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=ro(e),o!==null){for(t.flags|=128,jc(r,!1),e=o.updateQueue,t.updateQueue=e,Ac(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)li(n,e),n=n.sibling;return R(no,no.current&1|2),H&&Ei(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&we()>$l&&(t.flags|=128,a=!0,jc(r,!1),t.lanes=4194304)}}else{if(!a){if(e=ro(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Ac(t,e),jc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!H)return Mc(t),null}else 2*we()-r.renderingStartTime>$l&&n!==536870912&&(t.flags|=128,a=!0,jc(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?(Mc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=we(),e.sibling=null,n=no.current,R(no,a?n&1|2:n&1),H&&Ei(t,r.treeForkCount),e);case 22:case 23:return to(t),Ja(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Mc(t),t.subtreeFlags&6&&(t.flags|=8192)):Mc(t),n=t.updateQueue,n!==null&&Ac(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&&ie(ha),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ki(ia),Mc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Pc(e,t){switch(ki(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ki(ia),le(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return de(t),null;case 31:if(t.memoizedState!==null){if(to(t),t.alternate===null)throw Error(i(340));zi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(to(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));zi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ie(no),null;case 4:return le(),null;case 10:return Ki(t.type),null;case 22:case 23:return to(t),Ja(),e!==null&&ie(ha),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ki(ia),null;case 25:return null;default:return null}}function Fc(e,t){switch(ki(t),t.tag){case 3:Ki(ia),le();break;case 26:case 27:case 5:de(t);break;case 4:le();break;case 31:t.memoizedState!==null&&to(t);break;case 13:to(t);break;case 19:ie(no);break;case 10:Ki(t.type);break;case 22:case 23:to(t),Ja(),e!==null&&ie(ha);break;case 24:Ki(ia)}}function Ic(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 Lc(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 Rc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ua(t,n)}catch(t){Uu(e,e.return,t)}}}function zc(e,t,n){n.props=Vs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Uu(e,t,n)}}function Bc(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 Vc(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 Hc(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 Uc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[ot]=t}catch(t){Uu(e,e.return,t)}}function Wc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function Gc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Wc(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 Kc(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=Qt));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),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,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(qc(e,t,n),e=e.sibling;e!==null;)qc(e,t,n),e=e.sibling}function Jc(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[at]=e,t[ot]=n}catch(t){Uu(e,e.return,t)}}var Yc=!1,Xc=!1,Zc=!1,Qc=typeof WeakSet==`function`?WeakSet:Set,$c=null;function el(e,t){if(e=e.containerInfo,Rd=sp,e=Er(e),Dr(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,$c=t;$c!==null;)if(t=$c,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,$c=e;else for(;$c!==null;){switch(t=$c,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=Vs(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,$c=e;break}$c=t.return}}function tl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:gl(e,n),r&4&&Ic(5,n);break;case 1:if(gl(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Uu(n,n.return,e)}else{var i=Vs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Uu(n,n.return,e)}}}r&64&&Rc(n),r&512&&Bc(n,n.return);break;case 3:if(gl(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{Ua(e,t)}catch(e){Uu(n,n.return,e)}}break;case 27:t===null&&r&4&&Jc(n);case 26:case 5:gl(e,n),t===null&&r&4&&Hc(n),r&512&&Bc(n,n.return);break;case 12:gl(e,n);break;case 31:gl(e,n),r&4&&sl(e,n);break;case 13:gl(e,n),r&4&&cl(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||Yc,!r){t=t!==null&&t.memoizedState!==null||Xc,i=Yc;var a=Xc;Yc=r,(Xc=t)&&!a?vl(e,n,!!(n.subtreeFlags&8772)):gl(e,n),Yc=i,Xc=a}break;case 30:break;default:gl(e,n)}}function nl(e){var t=e.alternate;t!==null&&(e.alternate=null,nl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&pt(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 rl=null,il=!1;function al(e,t,n){for(n=n.child;n!==null;)ol(e,t,n),n=n.sibling}function ol(e,t,n){if(Pe&&typeof Pe.onCommitFiberUnmount==`function`)try{Pe.onCommitFiberUnmount(Ne,n)}catch{}switch(n.tag){case 26:Xc||Vc(n,t),al(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Xc||Vc(n,t);var r=rl,i=il;Zd(n.type)&&(rl=n.stateNode,il=!1),al(e,t,n),pf(n.stateNode),rl=r,il=i;break;case 5:Xc||Vc(n,t);case 6:if(r=rl,i=il,rl=null,al(e,t,n),rl=r,il=i,rl!==null){if(il)try{(rl.nodeType===9?rl.body:rl.nodeName===`HTML`?rl.ownerDocument.body:rl).removeChild(n.stateNode)}catch(e){Uu(n,t,e)}else try{rl.removeChild(n.stateNode)}catch(e){Uu(n,t,e)}}break;case 18:rl!==null&&(il?(e=rl,Qd(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):Qd(rl,n.stateNode));break;case 4:r=rl,i=il,rl=n.stateNode.containerInfo,il=!0,al(e,t,n),rl=r,il=i;break;case 0:case 11:case 14:case 15:Lc(2,n,t),Xc||Lc(4,n,t),al(e,t,n);break;case 1:Xc||(Vc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&zc(n,t,r)),al(e,t,n);break;case 21:al(e,t,n);break;case 22:Xc=(r=Xc)||n.memoizedState!==null,al(e,t,n),Xc=r;break;default:al(e,t,n)}}function sl(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 cl(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 ll(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Qc),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Qc),t;default:throw Error(i(435,e.tag))}}function ul(e,t){var n=ll(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Ju.bind(null,e,t);t.then(r,r)}})}function dl(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)){rl=c.stateNode,il=!1;break a}break;case 5:rl=c.stateNode,il=!1;break a;case 3:case 4:rl=c.stateNode.containerInfo,il=!0;break a}c=c.return}if(rl===null)throw Error(i(160));ol(o,s,a),rl=null,il=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)pl(t,e),t=t.sibling}var fl=null;function pl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:dl(t,e),ml(e),r&4&&(Lc(3,e,e.return),Ic(3,e),Lc(5,e,e.return));break;case 1:dl(t,e),ml(e),r&512&&(Xc||n===null||Vc(n,n.return)),r&64&&Yc&&(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=fl;if(dl(t,e),ml(e),r&512&&(Xc||n===null||Vc(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[ft]||o[at]||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[at]=e,vt(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[at]=e,vt(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&&Uc(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:dl(t,e),ml(e),r&512&&(Xc||n===null||Vc(n,n.return)),n!==null&&r&4&&Uc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(dl(t,e),ml(e),r&512&&(Xc||n===null||Vc(n,n.return)),e.flags&32){a=e.stateNode;try{Wt(a,``)}catch(t){Uu(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Uc(e,a,n===null?a:n.memoizedProps)),r&1024&&(Zc=!0);break;case 6:if(dl(t,e),ml(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=fl,fl=gf(t.containerInfo),dl(t,e),fl=a,ml(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){Uu(e,e.return,t)}Zc&&(Zc=!1,hl(e));break;case 4:r=fl,fl=gf(e.stateNode.containerInfo),dl(t,e),ml(e),fl=r;break;case 12:dl(t,e),ml(e);break;case 31:dl(t,e),ml(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ul(e,r)));break;case 13:dl(t,e),ml(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Zl=we()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ul(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=Yc,d=Xc;if(Yc=u||a,Xc=d||l,dl(t,e),Xc=d,Yc=u,ml(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||Yc||Xc||_l(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,ul(e,n))));break;case 19:dl(t,e),ml(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ul(e,r)));break;case 30:break;case 21:break;default:dl(t,e),ml(e)}}function ml(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Wc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;qc(e,Gc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Wt(o,``),n.flags&=-33),qc(e,Gc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Kc(e,Gc(e),s);break;default:throw Error(i(161))}}catch(t){Uu(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function hl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;hl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function gl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)tl(e,t.alternate,t),t=t.sibling}function _l(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Lc(4,t,t.return),_l(t);break;case 1:Vc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&zc(t,t.return,n),_l(t);break;case 27:pf(t.stateNode);case 26:case 5:Vc(t,t.return),_l(t);break;case 22:t.memoizedState===null&&_l(t);break;case 30:_l(t);break;default:_l(t)}e=e.sibling}}function vl(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:vl(i,a,n),Ic(4,a);break;case 1:if(vl(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++)Ha(c[i],s)}catch(e){Uu(r,r.return,e)}}n&&o&64&&Rc(a),Bc(a,a.return);break;case 27:Jc(a);case 26:case 5:vl(i,a,n),n&&r===null&&o&4&&Hc(a),Bc(a,a.return);break;case 12:vl(i,a,n);break;case 31:vl(i,a,n),n&&o&4&&sl(i,a);break;case 13:vl(i,a,n),n&&o&4&&cl(i,a);break;case 22:a.memoizedState===null&&vl(i,a,n),Bc(a,a.return);break;case 30:break;default:vl(i,a,n)}t=t.sibling}}function yl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&oa(n))}function bl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&oa(e))}function xl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Sl(e,t,n,r),t=t.sibling}function Sl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:xl(e,t,n,r),i&2048&&Ic(9,t);break;case 1:xl(e,t,n,r);break;case 3:xl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&oa(e)));break;case 12:if(i&2048){xl(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 xl(e,t,n,r);break;case 31:xl(e,t,n,r);break;case 13:xl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?xl(e,t,n,r):(a._visibility|=2,Cl(e,t,n,r,!!(t.subtreeFlags&10256)||!1)):a._visibility&2?xl(e,t,n,r):wl(e,t),i&2048&&yl(o,t);break;case 24:xl(e,t,n,r),i&2048&&bl(t.alternate,t);break;default:xl(e,t,n,r)}}function Cl(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:Cl(a,o,s,c,i),Ic(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Cl(a,o,s,c,i)):u._visibility&2?Cl(a,o,s,c,i):wl(a,o),i&&l&2048&&yl(o.alternate,o);break;case 24:Cl(a,o,s,c,i),i&&l&2048&&bl(o.alternate,o);break;default:Cl(a,o,s,c,i)}t=t.sibling}}function wl(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:wl(n,r),i&2048&&yl(r.alternate,r);break;case 24:wl(n,r),i&2048&&bl(r.alternate,r);break;default:wl(n,r)}t=t.sibling}}var Tl=8192;function El(e,t,n){if(e.subtreeFlags&Tl)for(e=e.child;e!==null;)Dl(e,t,n),e=e.sibling}function Dl(e,t,n){switch(e.tag){case 26:El(e,t,n),e.flags&Tl&&e.memoizedState!==null&&Gf(n,fl,e.memoizedState,e.memoizedProps);break;case 5:El(e,t,n);break;case 3:case 4:var r=fl;fl=gf(e.stateNode.containerInfo),El(e,t,n),fl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Tl,Tl=16777216,El(e,t,n),Tl=r):El(e,t,n));break;default:El(e,t,n)}}function Ol(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 kl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];$c=r,Ml(r,e)}Ol(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Al(e),e=e.sibling}function Al(e){switch(e.tag){case 0:case 11:case 15:kl(e),e.flags&2048&&Lc(9,e,e.return);break;case 3:kl(e);break;case 12:kl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,jl(e)):kl(e);break;default:kl(e)}}function jl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];$c=r,Ml(r,e)}Ol(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Lc(8,t,t.return),jl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,jl(t));break;default:jl(t)}e=e.sibling}}function Ml(e,t){for(;$c!==null;){var n=$c;switch(n.tag){case 0:case 11:case 15:Lc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:oa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,$c=r;else a:for(n=e;$c!==null;){r=$c;var i=r.sibling,a=r.return;if(nl(r),r===n){$c=null;break a}if(i!==null){i.return=a,$c=i;break a}$c=a}}}var Nl={getCacheForType:function(e){var t=Qi(ia),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Qi(ia).controller.signal}},Pl=typeof WeakMap==`function`?WeakMap:Map,X=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 X&2&&Q!==0?Q&-Q:F.T===null?nt():ud()}function fu(){if(Kl===0){if(!(Q&536870912)||H){var e=Ve;Ve<<=1,!(Ve&3932160)&&(Ve=262144),Kl=e}else Kl=536870912}return e=Ya.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)),Ye(e,n),(!(X&2)||e!==Fl)&&(e===Fl&&(!(X&2)&&(Wl|=n),Hl===4&&_u(e,Q,Kl,!1)),nd(e))}function mu(e,t,n){if(X&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||Ge(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-we(),10<a)){if(_u(r,t,Kl,!Rl),We(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:Qt},Dl(t,a,d);var m=(a&62914560)===a?Zl-we():(a&4194048)===a?Ql-we():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(!xr(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-Ie(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Ze(e,n,t)}function vu(){return X&6?!0:(rd(0,!1),!1)}function yu(){if(Z!==null){if(Il===0)var e=Z.return;else e=Z,Wi=Ui=null,Co(e),Ea=null,Da=0,e=Z;for(;e!==null;)Fc(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=ci(e.current,null),Q=t,Il=0,Ll=null,Rl=!1,zl=Ge(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-Ie(r),a=1<<i;t|=e[i],r&=~a}return Vl=t,$r(),n}function xu(e,t){J=null,F.H=Ns,t===ya||t===xa?(t=Ta(),Il=3):t===ba?(t=Ta(),Il=4):Il=t===Zs?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Ll=t,Z===null&&(Hl=1,Gs(e,gi(t,e.current)))}function Su(){var e=Ya.current;return e===null?!0:(Q&4194048)===Q?Xa===null:(Q&62914560)===Q||Q&536870912?e===Xa:!1}function Cu(){var e=F.H;return F.H=Ns,e===null?Ns:e}function wu(){var e=F.A;return F.A=Nl,e}function Tu(){Hl=4,Rl||(Q&4194048)!==Q&&Ya.current!==null||(zl=!0),!(Ul&134217727)&&!(Wl&134217727)||Fl===null||_u(Fl,Q,Kl,!1)}function Eu(e,t,n){var r=X;X|=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:Ya.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++,Wi=Ui=null,X=r,F.H=i,F.A=a,Z===null&&(Fl=null,Q=0,$r()),o}function Du(){for(;Z!==null;)Au(Z)}function Ou(e,t){var n=X;X|=2;var r=Cu(),a=wu();Fl!==e||Q!==t?(eu=null,$l=we()+500,bu(e,t)):zl=Ge(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(Ca(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:Ca(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 Wi=Ui=null,F.H=r,F.A=a,X=n,Z===null?(Fl=null,Q=0,$r(),Hl):0}function ku(){for(;Z!==null&&!Se();)Au(Z)}function Au(e){var t=Ec(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=dc(n,t,t.pendingProps,t.type,void 0,Q);break;case 11:t=dc(n,t,t.pendingProps,t.type.render,t.ref,Q);break;case 5:Co(t);default:Fc(n,t),t=Z=li(t,Vl),t=Ec(n,t,Vl)}e.memoizedProps=e.pendingProps,t===null?Nu(e):Z=t}function Mu(e,t,n,r){Wi=Ui=null,Co(t),Ea=null,Da=0;var i=t.return;try{if(Xs(e,i,t,n,Q)){Hl=1,Gs(e,gi(n,e.current)),Z=null;return}}catch(t){if(i!==null)throw Z=i,t;Hl=1,Gs(e,gi(n,e.current)),Z=null;return}t.flags&32768?(H||r===1?e=!0:zl||Q&536870912?e=!1:(Rl=e=!0,(r===2||r===9||r===3||r===6)&&(r=Ya.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=Nc(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=Pc(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(X&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=Qr,Xe(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(Oe,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=X,X|=4;try{el(e,t,n)}finally{X=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=X;X|=4;try{pl(t,e);var a=zd,o=Er(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Tr(s.ownerDocument.documentElement,s)){if(c!==null&&Dr(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 _=wr(s,h),v=wr(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{X=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=X;X|=4;try{tl(e,t.alternate,t)}finally{X=i,I.p=r,F.T=n}}nu=3}}function Ru(){if(nu===4||nu===3){nu=0,Ce();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),tt(n),t=t.stateNode,Pe&&typeof Pe.onCommitFiberRoot==`function`)try{Pe.onCommitFiberRoot(Ne,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,oa(t)))}function Bu(){return Iu(),Lu(),Ru(),Vu()}function Vu(){if(nu!==5)return!1;var e=ru,t=ou;ou=0;var n=tt(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,X&6)throw Error(i(331));var c=X;if(X|=4,Al(o.current),Sl(o,o.current,s,n),X=c,rd(0,!1),Pe&&typeof Pe.onPostCommitFiberRoot==`function`)try{Pe.onPostCommitFiberRoot(Ne,o)}catch{}return!0}finally{I.p=a,F.T=r,zu(e,t)}}function Hu(e,t,n){t=gi(n,t),t=qs(e.stateNode,t,2),e=Ia(e,t,2),e!==null&&(Ye(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=gi(n,e),n=Js(2),r=Ia(t,n,2),r!==null&&(Ys(n,r,t,e),Ye(r,2),nd(r));break}}t=t.return}}function Wu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Pl;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>we()-Zl?!(X&2)&&bu(e,0):Gl|=n,ql===Q&&(ql=0)),nd(e)}function Ku(e,t){t===0&&(t=qe()),e=B(e,t),e!==null&&(Ye(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 be(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-Ie(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=We(r,r===Fl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ge(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=we(),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-Ie(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Ke(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Fl,n=Q,n=We(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&&xe(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Ge(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&xe(r),tt(n)){case 2:case 8:n=De;break;case 32:n=Oe;break;case 268435456:n=Ae;break;default:n=Oe}return r=sd.bind(null,e),n=be(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&xe(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=We(e,e===Fl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(mu(e,r,t),od(e,we()),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(){X&6?be(Ee,id):ad()})}function ud(){if(td===0){var e=la;e===0&&(e=Be,Be<<=1,!(Be&261888)&&(Be=256)),td=e}return td}function dd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Zt(``+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[ot]||null).action),o=r.submitter;o&&(t=(t=o[ot]||null)?dd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new bn(`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);ys(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),ys(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var md=0;md<qr.length;md++){var hd=qr[md];Jr(hd.toLowerCase(),`on`+(hd[0].toUpperCase()+hd.slice(1)))}Jr(zr,`onAnimationEnd`),Jr(Br,`onAnimationIteration`),Jr(Vr,`onAnimationStart`),Jr(`dblclick`,`onDoubleClick`),Jr(`focusin`,`onFocus`),Jr(`focusout`,`onBlur`),Jr(Hr,`onTransitionRun`),Jr(Ur,`onTransitionStart`),Jr(Wr,`onTransitionCancel`),Jr(Gr,`onTransitionEnd`),St(`onMouseEnter`,[`mouseout`,`mouseover`]),St(`onMouseLeave`,[`mouseout`,`mouseover`]),St(`onPointerEnter`,[`pointerout`,`pointerover`]),St(`onPointerLeave`,[`pointerout`,`pointerover`]),xt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),xt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),xt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),xt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),xt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),xt(`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){Yr(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){Yr(e)}i.currentTarget=null,a=c}}}}function $(e,t){var n=t[ct];n===void 0&&(n=t[ct]=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,yt.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,!ln||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=mt(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}on(function(){var r=a,i=en(n),s=[];a:{var c=Kr.get(e);if(c!==void 0){var l=bn,u=e;switch(e){case`keypress`:if(hn(n)===0)break a;case`keydown`:case`keyup`:l=Rn;break;case`focusin`:u=`focus`,l=kn;break;case`focusout`:u=`blur`,l=kn;break;case`beforeblur`:case`afterblur`:l=kn;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=Dn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=On;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Bn;break;case zr:case Br:case Vr:l=An;break;case Gr:l=Vn;break;case`scroll`:case`scrollend`:l=Sn;break;case`wheel`:l=Hn;break;case`copy`:case`cut`:case`paste`:l=jn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=zn;break;case`toggle`:case`beforetoggle`:l=Un}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=sn(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!==$t&&(u=n.relatedTarget||n.fromElement)&&(mt(u)||u[st]))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?mt(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=Dn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=zn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:gt(l),h=u==null?c:gt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,mt(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?gt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=lr;else if(rr(c)){if(ur)v=yr;else{v=_r;var y=gr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Jt(r.elementType)&&(v=lr):v=vr;if(v&&=v(e,r)){ir(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Bt(c,`number`,c.value)}switch(y=r?gt(r):window,e){case`focusin`:(rr(y)||y.contentEditable===`true`)&&(kr=y,Ar=r,jr=null);break;case`focusout`:jr=Ar=kr=null;break;case`mousedown`:Mr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Mr=!1,Nr(s,n,i);break;case`selectionchange`:if(Or)break;case`keydown`:case`keyup`:Nr(s,n,i)}var b;if(Gn)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 $n?Zn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Jn&&n.locale!==`ko`&&($n||x!==`onCompositionStart`?x===`onCompositionEnd`&&$n&&(b=mn()):(dn=i,fn=`value`in dn?dn.value:dn.textContent,$n=!0)),y=Td(r,x),0<y.length&&(x=new Mn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=Qn(n),b!==null&&(x.data=b)))),(b=qn?er(e,n):tr(e,n))&&(x=Td(r,`onBeforeInput`),0<x.length&&(y=new Mn(`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=sn(e,n),i!=null&&r.unshift(wd(e,i,a)),i=sn(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=sn(n,a),l!=null&&o.unshift(wd(n,l,c))):i||(l=sn(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===``||Wt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Wt(e,``+r);break;case`className`:Ot(e,`class`,r);break;case`tabIndex`:Ot(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Ot(e,n,r);break;case`style`:qt(e,r,o);break;case`data`:if(t!==`object`){Ot(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=Zt(``+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=Zt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Qt);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=Zt(``+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),Dt(e,`popover`,r);break;case`xlinkActuate`:kt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:kt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:kt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:kt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:kt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:kt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:kt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:kt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:kt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Dt(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=Yt.get(n)||n,Dt(e,n,r))}}function Nd(e,t,n,r,a,o){switch(n){case`style`:qt(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`?Wt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Wt(e,``+r);break;case`onScroll`:r!=null&&$(`scroll`,e);break;case`onScrollEnd`:r!=null&&$(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Qt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!bt.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[ot]||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,``):Dt(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)}}zt(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&&Vt(e,!!r,n,!0):Vt(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)}Ut(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(Jt(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)}}Rt(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?Vt(e,!!n,n?[]:``,!1):Vt(e,!!n,t,!0)):Vt(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)}Ht(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(Jt(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[ft]||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),pt(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[ft])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]);pt(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=ht(e);t!==null&&t.tag===5&&t.type===`form`?xs(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=Lt(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),vt(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="`+Lt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Lt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Lt(n.imageSizes)+`"]`)):i+=`[href="`+Lt(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),vt(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="`+Lt(r)+`"][href="`+Lt(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),vt(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=_t(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`);vt(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=_t(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`),vt(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=_t(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`),vt(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=oe.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=_t(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=_t(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=_t(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="`+Lt(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),vt(t),e.head.appendChild(t))}function Pf(e){return`[src="`+Lt(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~="`+Lt(n.href)+`"]`);if(r)return t.instance=r,vt(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`),vt(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,vt(o),o;r=Mf(n),(a=mf.get(a))&&Rf(r,a),o=(e.ownerDocument||e).createElement(`link`),vt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),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,vt(a),a):(r=n,(a=mf.get(o))&&(r=f({},n),zf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),vt(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[ft]||a[at]||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,vt(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),vt(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=Je(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Je(0),this.hiddenUpdates=Je(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function 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=oi(3,null,null,t),e.current=a,a.stateNode=e,t=aa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Pa(a),e}function tp(e){return e?(e=ii,e):ii}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=q(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ia(e,r,t),n!==null&&(pu(n,e,t),La(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=B(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=et(t);var n=B(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=ht(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ue(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ie(o);s.entanglements[1]|=c,o&=~c}nd(a),!(X&6)&&($l=we()+500,rd(0,!1))}}break;case 31:case 13:s=B(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=en(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=mt(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(Te()){case Ee:return 2;case De:return 8;case Oe:case ke:return 32;case Ae: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=ht(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=mt(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,rt(e.priority,function(){op(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,rt(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);$t=r,n.target.dispatchEvent(r),$t=null}else return t=ht(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=ht(n);a!==null&&(e.splice(t,3),t-=3,ys(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[ot]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[ot]||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[st]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=nt();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{Ne=zp.inject(Rp),Pe=zp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Hs,s=Us,c=Ws;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[st]=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 ie(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 R(e,t=ie,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]=z(n,t(n)),n}{let n={...e,id:s,children:void 0};return r[s]=z(n,t(n)),e.children&&(n.children=R(e.children,t,o,r,i)),n}})}function z(e,t){return Object.assign(e,{...t,...typeof t.lazy==`object`&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function ae(e,t,n=`/`){return oe(e,t,n,!1)}function oe(e,t,n,r,i){let a=Oe((typeof t==`string`?M(t):t).pathname||`/`,n);if(a==null)return null;let o=i??ce(e),s=null,c=De(a);for(let e=0;s==null&&e<o.length;++e)s=Ce(o[e],c,r);return s}function se(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 ce(e){let t=le(e);return de(t),t}function le(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=Re([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}".`),le(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:xe(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=Ee(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 ue(e.path))a(e,t,!0,n)}),t}function ue(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=ue(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 de(e){e.sort((e,t)=>e.score===t.score?Se(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var fe=/^:[\w-]+$/,pe=/^:[\w-]+/,me=3.5,he=3,ge=2,_e=1,ve=10,ye=-2,be=e=>e===`*`;function xe(e,t){let n=e.split(`/`),r=n.length;return n.some(be)&&(r+=ye),t&&(r+=ge),n.filter(e=>!be(e)).reduce((e,t)=>e+(fe.test(t)?he:pe.test(t)?me:t===``?_e:ve),r)}function Se(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 Ce(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?Te(u,l,s.matcher,s.compiledParams):we(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=we({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:Re([a,d.pathname]),pathnameBase:Be(Re([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=Re([a,d.pathnameBase]))}return o}function we(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Ee(e.path,e.caseSensitive,e.end);return Te(e,t,n,r)}function Te(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 Ee(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 De(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 Oe(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 ke({basename:e,pathname:t}){return t===`/`?e:Re([e,t])}var Ae=e=>b.test(e);function je(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?M(e):e,a;return n?(n=Le(n),a=n.startsWith(`/`)?Me(n.substring(1),`/`):Me(n,t)):a=t,{pathname:a,search:Ve(r),hash:He(i)}}function Me(e,t){let n=ze(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function Ne(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 Pe(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Fe(e){let t=Pe(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Ie(e,t,n,r=!1){let i;typeof e==`string`?i=M(e):(i={...e},E(!i.pathname||!i.pathname.includes(`?`),Ne(`?`,`pathname`,`search`,i)),E(!i.pathname||!i.pathname.includes(`#`),Ne(`#`,`pathname`,`hash`,i)),E(!i.search||!i.search.includes(`#`),Ne(`#`,`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=je(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var Le=e=>e.replace(/[\\/]{2,}/g,`/`),Re=e=>Le(e.join(`/`)),ze=e=>e.replace(/\/+$/,``),Be=e=>ze(e).replace(/^\/*/,`/`),Ve=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,He=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Ue=[`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],We=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 Ge(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function Ke(e){return Re(e.map(e=>e.route.path).filter(Boolean))||`/`}function qe(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 Je=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Ye(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(Je)try{let e=new URL(window.location.href),r=x.test(n)?new URL(S(n,e.protocol)):new URL(n),a=Oe(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 Xe=Symbol(`Uninstrumented`),Ze=new WeakMap;function Qe(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)=>it(await at(n.lazy,void 0,()=>e(...t),ot))}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)=>it(await at(n[`lazy.middleware`],void 0,()=>t(...e),ot))})}if(typeof e.loader==`function`&&n[`lazy.loader`].length>0){let t=e.loader;r.lazy=Object.assign(r.lazy||{},{loader:async(...e)=>it(await at(n[`lazy.loader`],void 0,()=>t(...e),ot))})}if(typeof e.action==`function`&&n[`lazy.action`].length>0){let t=e.action;r.lazy=Object.assign(r.lazy||{},{action:async(...e)=>it(await at(n[`lazy.action`],void 0,()=>t(...e),ot))})}}if(typeof t.loader==`function`&&n.loader.length>0){let e=et(t.loader),i=async(...t)=>it(await at(n.loader,st(t[0]),()=>e(...t),ot));e.hydrate===!0&&(i.hydrate=!0),tt(i,e),r.loader=i}if(typeof t.action==`function`&&n.action.length>0){let e=et(t.action),i=async(...t)=>it(await at(n.action,st(t[0]),()=>e(...t),ot));tt(i,e),r.action=i}return t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map(e=>{let t=et(e),r=async(...e)=>it(await at(n.middleware,st(e[0]),()=>t(...e),ot));return tt(r,t),r})),r}function $e(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=et(e.navigate),r=async(...r)=>{let[i,a]=r,o,s={to:typeof i==`number`||typeof i==`string`?i:i?j(i):`.`,...ct(e,a??{})};return it(await at(n.navigate,s,async()=>{if(typeof i==`number`)return await t(...r);let n=nt(e,e=>{o=e});try{return await t(...r)}finally{n()}},e=>({...ot(e),meta:o})))};tt(r,t),e.navigate=r}if(n.fetch.length>0){let t=et(e.fetch),r=async(...r)=>{let[i,a,o,s]=r,c;return it(await at(n.fetch,{href:o??`.`,fetcherKey:i,...ct(e,s??{})},async()=>{let n=nt(e,e=>{c=e});try{return await t(...r)}finally{n()}},e=>({...ot(e),meta:c})))};tt(r,t),e.fetch=r}return e}function et(e){return e[Xe]??e}function tt(e,t){e[Xe]=t}function nt(e,t){return Ze.set(e,t),()=>{Ze.get(e)===t&&Ze.delete(e)}}function rt(e){let t=Ze.get(e);return Ze.delete(e),t}function it(e){if(e.type===`error`)throw e.value;return e.value}async function at(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=at(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 ot(e){return e.type===`error`&&e.value instanceof Error?{status:`error`,error:e.value}:{status:`success`,error:void 0}}function st(e){let{request:t,context:n,params:r}=e;return{...e,request:lt(t),params:{...r},context:ut(n)}}function ct(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 lt(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function ut(e){return{get:t=>e.get(t)}}var dt=[`POST`,`PUT`,`PATCH`,`DELETE`],ft=new Set(dt),pt=[`GET`,...dt],mt=new Set(pt),ht=new Set([301,302,303,307,308]),gt=new Set([307,308]),_t={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},vt={state:`idle`,data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},yt={state:`unblocked`,proceed:void 0,reset:void 0,location:void 0},bt=`remix-router-transitions`,xt=Symbol(`ResetLoaderData`),St=class{#e;#t;#n;#r;constructor(e){this.#e=e,this.#t=ce(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=ce(e)}setHmrRoutes(e){this.#n=e,this.#r=ce(e)}commitHmrRoutes(){this.#n&&(this.#e=this.#n,this.#t=this.#r,this.#n=void 0,this.#r=void 0)}};function Ct(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),...Qe(t.map(e=>e.route).filter(Boolean),e)})}let o={},s=new St(R(e.routes,a,void 0,o)),c=e.basename||`/`;c.startsWith(`/`)||(c=`/${c}`);let l=e.dataStrategy||Bt,u={...e.future},d=null,f=new Set,p=null,m=null,h=null,g=null,_=e.hydrationData!=null,v=oe(s.activeRoutes,e.history.location,c,!1,s.branches),y=!1,b=null,x,S;if(v==null&&!e.patchRoutesOnNavigation){let t=dn(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=un(s.activeRoutes);x=!0,S=!x,v=n,b={[r.id]:t}}else if(v&&!e.hydrationData&&at(v,s.activeRoutes,e.history.location.pathname).active&&(v=null),!v){x=!1,S=!x,v=[];let t=at(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=>Ot(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=kt(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:_t,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,ie=0,z=-1,ae=new Map,ce=new Set,le=new Map,ue=new Map,de=new Set,fe=new Map,pe,me=null;function he(){if(d=e.history.listen(({action:t,location:n,delta:r})=>{if(pe){pe(),pe=void 0;return}D(fe.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=Xe({currentLocation:w.location,nextLocation:n,historyAction:t});if(i&&r!=null){let t=new Promise(e=>{pe=e});e.history.go(r*-1),Ye(i,{state:`blocked`,location:n,proceed(){Ye(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,yt),ve({blockers:e})}}),O?.resolve(),O=null;return}return Se(t,n)}),n){In(t,P);let e=()=>Ln(t,P);t.addEventListener(`pagehide`,e),I=()=>t.removeEventListener(`pagehide`,e)}return w.initialized||Se(`POP`,w.location,{initialHydration:!0}),C}function ge(){d&&d(),I&&I(),f.clear(),j&&j.abort(),w.fetchers.forEach((e,t)=>Be(w.fetchers,t)),w.blockers.forEach((e,t)=>Je(t))}function _e(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 ve(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`&&(de.has(t)?n.push(t):r.push(t))}),de.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=>Be(w.fetchers,e)),r.forEach(e=>w.fetchers.delete(e))}function ye(t,n,{flushSync:r}={}){let i=w.actionData!=null&&w.navigation.formMethod!=null&&En(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?sn(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,yt)));let l=!te&&it(t,n.matches||w.matches),u=k===!0||w.navigation.formMethod!=null&&En(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}}ve({...n,actionData:a,loaderData:o,historyAction:T,location:t,initialized:!0,renderFallback:!1,navigation:_t,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,me?.resolve(),me=null}async function be(t,n){if(O?.resolve(),O=null,typeof t==`number`){O||=Rn();let n=O.promise;return e.history.go(t),n}let r=rt(C),{path:i,submission:a,error:o}=Et(!1,Tt(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&&En(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=Xe({currentLocation:l,nextLocation:u,historyAction:f});if(h){Ye(h,{state:`blocked`,location:u,proceed(){Ye(h,{state:`proceeding`,proceed:void 0,reset:void 0,location:u}),be(t,n)},reset(){let e=new Map(w.blockers);e.set(h,yt),ve({blockers:e})}});return}await Se(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 xe(){me||=Rn(),Fe(),ve({revalidation:`loading`});let e=me.promise;return w.navigation.state===`submitting`?e:w.navigation.state===`idle`?(Se(w.historyAction,w.location,{startUninterruptedRevalidation:!0}),e):(Se(T||w.historyAction,w.navigation.location,{overrideNavigation:w.navigation,enableViewTransition:N===!0}),e)}async function Se(t,n,r){j&&j.abort(),j=null,T=t,te=(r&&r.startUninterruptedRevalidation)===!0,nt(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:oe(i,n,c,!1,s.branches),o=(r&&r.flushSync)===!0;if(a&&w.initialized&&!ne&&mn(w.location,n)&&!(r&&r.submission&&En(r.submission.formMethod))){ye(n,{matches:a},{flushSync:o});return}let l=at(a,i,n.pathname);if(l.active&&l.matches&&(a=l.matches),r?.instrumentationNavigateMetaReceiver){let t=kn(e.history,n,a);r.instrumentationNavigateMetaReceiver(t)}if(!a){let{error:e,notFoundMatches:t,route:r}=Ze(n.pathname);ye(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=tn(e.history,n,j.signal,r&&r.submission),f=e.getContext?await e.getContext():new F,p;if(r&&r.pendingError)p=[ln(a).route.id,{type:`error`,error:r.pendingError}];else if(r&&r.submission&&En(r.submission.formMethod)){let i=await Ce(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(yn(t)&&Ge(t.error)&&t.error.status===404){j=null,ye(n,{matches:i.matches,loaderData:{},errors:{[e]:t.error}});return}}a=i.matches||a,p=i.pendingActionResult,u=jn(n,a,t,r.submission),o=!1,l.active=!1,d=tn(e.history,d.url,d.signal)}let{shortCircuited:m,matches:h,loaderData:g,errors:_,workingFetchers:v}=await we(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,ye(n,{matches:h||a,...cn(p),loaderData:g,errors:_,...v?{fetchers:v}:{}}))}async function Ce(t,n,i,l,u,d,f,p,m={}){if(Fe(),ve({navigation:Mn(n,l,u,i)},{flushSync:m.flushSync===!0}),f){let e=await ot(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}=un(s.activeRoutes);return{matches:t,pendingActionResult:[n.id,{type:`error`,error:e.error}]}}let t=ln(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}=Ze(n.pathname);return{matches:e,pendingActionResult:[r.id,{type:`error`,error:t}]}}}let h,g=On(l,n);if(!g.route.action&&!g.route.lazy)h={type:`error`,error:dn(405,{method:t.method,pathname:n.pathname,routeId:g.route.id})};else{let e=await Ne(t,n,Kt(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(bn(h)){let n;return n=m&&m.replace!=null?m.replace:en(h.response.headers.get(`Location`),new URL(t.url),c,e.history)===w.location.pathname+w.location.search,await Me(t,h,!0,{submission:i,replace:n}),{shortCircuited:!0}}if(yn(h)){let e=ln(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 we(t,n,i,l,u,d,f,p,m,h,g,_,v,y){let b=f||jn(n,i,l,p),x=p||m||An(b),S=!te&&!g;if(d){if(S){let e=Te(v);ve({navigation:b,...e===void 0?{}:{actionData:e}},{flushSync:_})}let e=await ot(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}=un(s.activeRoutes);return{matches:t,loaderData:{},errors:{[n.id]:e.error}}}let t=ln(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}=Ze(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}}let C=s.activeRoutes,{dsMatches:T,revalidatingFetchers:E}=Dt(t,u,a,o,e.history,w,i,x,n,g?[]:r,g===!0,ne,re,de,le,ce,C,c,e.patchRoutesOnNavigation!=null,s.branches,v,y);if(z=++ie,!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=We(e);return ye(n,{matches:i,loaderData:{},errors:v&&yn(v[1])?{[v[0]]:v[1].error}:null,...cn(v),...t?{fetchers:e}:{}},{flushSync:_}),{shortCircuited:!0}}if(S){let e={};if(!d){e.navigation=b;let t=Te(v);t!==void 0&&(e.actionData=t)}E.length>0&&(e.fetchers=Ee(E)),ve(e,{flushSync:_})}E.forEach(e=>{He(e.key),e.controller&&L.set(e.key,e.controller)});let D=()=>E.forEach(e=>He(e.key));j&&j.signal.addEventListener(`abort`,D);let{loaderResults:O,fetcherResults:k}=await Pe(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=fn(O);if(A)return await Me(t,A.result,!0,{replace:h}),{shortCircuited:!0};if(A=fn(k),A)return ce.add(A.key),await Me(t,A.result,!0,{replace:h}),{shortCircuited:!0};let M=new Map(w.fetchers),{loaderData:N,errors:ee}=on(w,i,O,v,E,k,M);g&&w.errors&&(ee={...w.errors,...ee});let P=We(M),F=Ke(z,M),I=P||F||E.length>0;return{matches:i,loaderData:N,errors:ee,...I?{workingFetchers:M}:{}}}function Te(e){if(e&&!yn(e[1]))return{[e[0]]:e[1].data};if(w.actionData)return Object.keys(w.actionData).length===0?null:w.actionData}function Ee(e){let t=new Map(w.fetchers);return e.forEach(e=>{let n=t.get(e.key),r=Nn(void 0,n?n.data:void 0);t.set(e.key,r)}),t}async function De(t,n,r,i){He(t);let a=(i&&i.flushSync)===!0,o=rt(C),l=s.activeRoutes,u=Tt(w.location,w.matches,c,r,n,i?.relative),d=oe(l,u,c,!1,s.branches),f=at(d,l,u);if(f.active&&f.matches&&(d=f.matches),o&&o(kn(e.history,u,d)),!d){Le(t,n,dn(404,{pathname:u}),{flushSync:a});return}let{path:p,submission:m,error:h}=Et(!0,u,i);if(h){Le(t,n,h,{flushSync:a});return}let g=e.getContext?await e.getContext():new F,_=(i&&i.preventScrollReset)===!0;if(m&&En(m.formMethod)){await ke(t,n,p,d,g,f.active,a,_,m,i&&i.defaultShouldRevalidate);return}le.set(t,{routeId:n,path:p}),await je(t,n,p,d,g,f.active,a,_,m)}async function ke(t,n,i,l,u,d,f,p,m,h){Fe(),le.delete(t),Ie(t,Pn(m,w.fetchers.get(t)),{flushSync:f});let g=new AbortController,_=tn(e.history,i,g.signal,m);if(d){let e=await ot(l,new URL(_.url).pathname,_.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){Le(t,n,e.error,{flushSync:f});return}if(e.matches)l=e.matches;else{Le(t,n,dn(404,{pathname:i}),{flushSync:f});return}}let v=On(l,i);if(!v.route.action&&!v.route.lazy){Le(t,n,dn(405,{method:m.formMethod,pathname:i,routeId:n}),{flushSync:f});return}L.set(t,g);let y=ie,b=Kt(a,o,_,i,l,v,r,u),x=await Ne(_,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(de.has(t)){if(bn(S)||yn(S)){Ie(t,Fn(void 0));return}}else{if(bn(S)){if(L.delete(t),z>y){Ie(t,Fn(void 0));return}return ce.add(t),Ie(t,Nn(m)),Me(_,S,!1,{fetcherSubmission:m,preventScrollReset:p})}if(yn(S)){Le(t,n,S.error);return}}let C=w.navigation.location||w.location,D=tn(e.history,C,g.signal),O=s.activeRoutes,k=w.navigation.state===`idle`?w.matches:oe(O,w.navigation.location,c,!1,s.branches);E(k,`Didn't find any matches after fetcher action`);let A=++ie;ae.set(t,A);let{dsMatches:M,revalidatingFetchers:N}=Dt(D,u,a,o,e.history,w,k,m,C,r,!1,ne,re,de,le,ce,O,c,e.patchRoutesOnNavigation!=null,s.branches,[v.route.id,S],h),ee=Nn(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=Nn(void 0,n?n.data:void 0);P.set(t,r),He(t),e.controller&&L.set(t,e.controller)}),ve({fetchers:P});let F=()=>N.forEach(e=>He(e.key));g.signal.addEventListener(`abort`,F);let{loaderResults:I,fetcherResults:te}=await Pe(M,N,D,C,u);if(g.signal.aborted)return;g.signal.removeEventListener(`abort`,F),ae.delete(t),L.delete(t),N.forEach(e=>L.delete(e.key));let R=w.fetchers.has(t),se=e=>{if(!R)return e;let n=new Map(e.fetchers);return n.set(t,Fn(S.data)),{...e,fetchers:n}},ue=fn(I);if(ue)return w=se(w),Me(D,ue.result,!1,{preventScrollReset:p});if(ue=fn(te),ue)return ce.add(ue.key),w=se(w),Me(D,ue.result,!1,{preventScrollReset:p});let fe=new Map(w.fetchers);R&&fe.set(t,Fn(S.data));let{loaderData:pe,errors:me}=on(w,k,I,void 0,N,te,fe);Ke(A,fe),w.navigation.state===`loading`&&A>z?(E(T,`Expected pending action`),j&&j.abort(),ye(w.navigation.location,{matches:k,loaderData:pe,errors:me,fetchers:fe})):(ve({errors:me,loaderData:sn(w.loaderData,pe,k,me),fetchers:fe}),ne=!1)}async function je(t,n,i,s,c,l,u,d,f){let p=w.fetchers.get(t);Ie(t,Nn(f,p?p.data:void 0),{flushSync:u});let m=new AbortController,h=tn(e.history,i,m.signal);if(l){let e=await ot(s,new URL(h.url).pathname,h.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){Le(t,n,e.error,{flushSync:u});return}if(e.matches)s=e.matches;else{Le(t,n,dn(404,{pathname:i}),{flushSync:u});return}}let g=On(s,i);L.set(t,m);let _=ie,v=await Ne(h,i,Kt(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(de.has(t)){Ie(t,Fn(void 0));return}if(bn(y)){if(z>_){Ie(t,Fn(void 0));return}ce.add(t),await Me(h,y,!1,{preventScrollReset:d});return}if(yn(y)){Le(t,n,y.error);return}Ie(t,Fn(y.data))}}async function Me(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=en(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(Ae(d)){let n=ee(t,d,!0);e=n.origin!==t.location.origin||Oe(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=An(w.navigation));let _=o||s;gt.has(i.response.status)&&_&&En(_.formMethod)?await Se(p,f,{submission:{..._,formAction:d},preventScrollReset:l||k,enableViewTransition:a?N:void 0}):await Se(p,f,{overrideNavigation:jn(f,[],p,o),fetcherSubmission:s,preventScrollReset:l||k,enableViewTransition:a?N:void 0})}async function Ne(e,t,n,r,i){let a,o={};try{a=await qt(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(!En(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(vn(r)){let i=r.result;o[t]={type:`redirect`,response:Zt(i,e,t,n,c)}}else o[t]=await Xt(r);return o}async function Pe(e,t,n,r,i){let a=Ne(n,r,e,i,null),o=Promise.all(t.map(async e=>{if(e.matches&&e.match&&e.request&&e.controller){let t=(await Ne(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:dn(404,{pathname:e.path})}})}));return{loaderResults:await a,fetcherResults:(await o).reduce((e,t)=>Object.assign(e,t),{})}}function Fe(){ne=!0,le.forEach((e,t)=>{L.has(t)&&re.add(t),He(t)})}function Ie(e,t,n={}){let r=new Map(w.fetchers);r.set(e,t),ve({fetchers:r},{flushSync:(n&&n.flushSync)===!0})}function Le(e,t,n,r={}){let i=ln(w.matches,t),a=new Map(w.fetchers);Be(a,e),ve({errors:{[i.route.id]:n},fetchers:a},{flushSync:(r&&r.flushSync)===!0})}function Re(e){return ue.set(e,(ue.get(e)||0)+1),de.has(e)&&de.delete(e),w.fetchers.get(e)||vt}function ze(e,t){He(e,t?.reason),Ie(e,Fn(null))}function Be(e,t){let n=w.fetchers.get(t);L.has(t)&&!(n&&n.state===`loading`&&ae.has(t))&&He(t),le.delete(t),ae.delete(t),ce.delete(t),de.delete(t),re.delete(t),e.delete(t)}function Ve(e){let t=(ue.get(e)||0)-1;t<=0?(ue.delete(e),de.add(e)):ue.set(e,t),ve({fetchers:new Map(w.fetchers)})}function He(e,t){let n=L.get(e);n&&(n.abort(t),L.delete(e))}function Ue(e,t){for(let n of e){let e=t.get(n);E(e,`Expected fetcher: ${n}`);let r=Fn(e.data);t.set(n,r)}}function We(e){let t=[],n=!1;for(let r of ce){let i=e.get(r);E(i,`Expected fetcher: ${r}`),i.state===`loading`&&(ce.delete(r),t.push(r),n=!0)}return Ue(t,e),n}function Ke(e,t){let n=[];for(let[r,i]of ae)if(i<e){let e=t.get(r);E(e,`Expected fetcher: ${r}`),e.state===`loading`&&(He(r),ae.delete(r),n.push(r))}return Ue(n,t),n.length>0}function qe(e,t){let n=w.blockers.get(e)||yt;return fe.get(e)!==t&&fe.set(e,t),n}function Je(e){w.blockers.delete(e),fe.delete(e)}function Ye(e,t){let n=w.blockers.get(e)||yt;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),ve({blockers:r})}function Xe({currentLocation:e,nextLocation:t,historyAction:n}){if(fe.size===0)return;fe.size>1&&D(!1,`A router only supports one blocker at a time`);let r=Array.from(fe.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 Ze(e){let t=dn(404,{pathname:e}),n=s.activeRoutes,{matches:r,route:i}=un(n);return{notFoundMatches:r,route:i,error:t}}function et(e,t,n){if(m=e,g=t,h=n||null,!_&&w.navigation===_t){_=!0;let e=it(w.location,w.matches);e!=null&&ve({restoreScrollPosition:e})}return()=>{m=null,g=null,h=null}}function tt(e,t){return h&&h(e,t.map(e=>se(e,w.loaderData)))||e.key}function nt(e,t){if(m&&g){let n=tt(e,t);m[n]=g()}}function it(e,t){if(m){let n=tt(e,t),r=m[n];if(typeof r==`number`)return r}return null}function at(t,n,r){if(e.patchRoutesOnNavigation){let e=s.branches;if(!t)return{active:!0,matches:oe(n,r,c,!0,e)||[]};if(Object.keys(t[0].params).length>0)return{active:!0,matches:oe(n,r,c,!0,e)}}return{active:!1,matches:null}}async function ot(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||Nt(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=oe(s.activeRoutes,n,c,!1,u),f=null;if(d&&(Object.keys(d[0].params).length===0||(f=oe(s.activeRoutes,n,c,!0,u),!(f&&l.length<f.length&&st(l,f.slice(0,l.length))))))return{type:`success`,matches:d};if(f||=oe(s.activeRoutes,n,c,!0,u),!f||st(l,f))return{type:`success`,matches:null};l=f}}function st(e,t){return e.length===t.length&&e.every((e,n)=>e.route.id===t[n].route.id)}function ct(e){o={},s.setHmrRoutes(R(e,a,void 0,o))}function lt(e,t,n=!1){Nt(e,t,s,o,a,n),s.hasHMRRoutes||ve({})}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:he,subscribe:_e,enableScrollRestoration:et,navigate:be,fetch:De,revalidate:xe,createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:Re,resetFetcher:ze,deleteFetcher:Ve,dispose:ge,getBlocker:qe,deleteBlocker:Je,patchRoutes:lt,_internalFetchControllers:L,_internalSetRoutes:ct,_internalSetStateDoNotUseOrYouWillBreakYourApp(e){ve(e)}},e.instrumentations&&(C=$e(C,e.instrumentations.map(e=>e.router).filter(Boolean))),C}function wt(e){return e!=null&&(`formData`in e&&e.formData!=null||`body`in e&&e.body!==void 0)}function Tt(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=Ie(r||`.`,Fe(o),Oe(e.pathname,n)||e.pathname,a===`path`);if(r??(c.search=e.search,c.hash=e.hash),(r==null||r===``||r===`.`)&&s){let e=Dn(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=ke({basename:n,pathname:c.pathname})),j(c)}function Et(e,t,n){if(!n||!wt(n))return{path:t};if(n.formMethod&&!Tn(n.formMethod))return{path:t,error:dn(405,{method:n.formMethod})};let r=()=>({path:t,error:dn(400,{type:`invalid-body`})}),i=(n.formMethod||`get`).toUpperCase(),a=pn(t);if(n.body!==void 0){if(n.formEncType===`text/plain`){if(!En(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(!En(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=nn(n.formData),s=n.formData;else if(n.body instanceof FormData)o=nn(n.body),s=n.body;else if(n.body instanceof URLSearchParams)o=n.body,s=rn(o);else if(n.body==null)o=new URLSearchParams,s=new FormData;else try{o=new URLSearchParams(n.body),s=rn(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(En(c.formMethod))return{path:t,submission:c};let l=M(t);return e&&l.search&&Dn(l.search)&&o.append(`index`,``),l.search=`?${o}`,{path:j(l),submission:c}}function Dt(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x){let S=b?yn(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&&yn(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=Ke(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(!Ot(s))f=!1;else if(u){let{shouldLoad:e}=kt(s,a.loaderData,a.errors);f=e}else At(a.loaderData,a.matches[o],i)&&(f=!0);if(f!==null)return Gt(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?jt(a.matches[o],i)&&(p=!0):p=!0;let m={...O,defaultShouldRevalidate:p};return Gt(n,r,e,c,k,i,l,t,Mt(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=oe(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=On(b,e.path),C=new AbortController,w=tn(i,e.path,C.signal),T=null;if(f.has(s))f.delete(s),T=Kt(n,r,w,e.path,b,S,l,t);else if(m)d&&(T=Kt(n,r,w,e.path,b,S,l,t));else{let i;i=typeof x==`boolean`?x:!D&&d;let a={...O,defaultShouldRevalidate:i};Mt(S,a)&&(T=Kt(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 Ot(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function kt(e,t,n){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!Ot(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 At(e,t,n){let r=!t||n.route.id!==t.route.id,i=!e.hasOwnProperty(n.route.id);return r||i}function jt(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith(`*`)&&e.params[`*`]!==t.params[`*`]}function Mt(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n==`boolean`)return n}return t.defaultShouldRevalidate}function Nt(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=>Pt(e,t));t?c.push({existingRoute:t,newRoute:e}):s.push(e)}),s.length>0){let t=R(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]=R([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 Pt(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=>Pt(e,t)))??!1}var Ft=new WeakMap,It=({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=Ft.get(i);o||(o={},Ft.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},Lt=new WeakMap;function Rt(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=Lt.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 Lt.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=It({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 zt(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 Bt(e){return e.matches.some(e=>e.route.middleware)?Vt(e,()=>zt(e)):zt(e)}function Vt(e,t){return Ht(e,t,e=>{if(wn(e))throw e;return e},gn,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{[ln(r,a).route.id]:{type:`error`,result:t}}}}}async function Ht(e,t,n,r,i){let{matches:a,...o}=e;return await Ut(o,a.flatMap(e=>e.route.middleware?e.route.middleware.map(t=>[e.route.id,t]):[]),t,n,r,i)}async function Ut(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 Ut(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 Wt(e,t,n,r,i){let a=It({key:`middleware`,route:r.route,manifest:t,mapRouteProperties:e}),o=Rt(r.route,En(n.method)?`action`:`loader`,t,e,i);return{middleware:a,route:o.lazyRoutePromise,handler:o.lazyHandlerPromise}}function Gt(e,t,n,r,i,a,o,s,c,l=null,u){let d=!1,f=Wt(e,t,n,a,o);return{...a,_lazyPromises:f,shouldLoad:c,shouldRevalidateArgs:l,shouldCallHandler(e){return d=!0,l?typeof u==`boolean`?Mt(a,{...l,defaultShouldRevalidate:u}):typeof e==`boolean`?Mt(a,{...l,defaultShouldRevalidate:e}):Mt(a,l):c},resolve(e){let{lazy:t,loader:o,middleware:l}=a.route,u=d||c||e&&!En(n.method)&&(t||o),p=l&&l.length>0&&!o&&!t;return u&&(En(n.method)||!p)?Jt({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 Kt(e,t,n,r,i,a,o,s,c=null){return i.map(l=>l.route.id===a.route.id?Gt(e,t,n,r,Ke(i),l,o,s,!0,c):{...l,shouldLoad:!1,shouldRevalidateArgs:c,shouldCallHandler:()=>!1,_lazyPromises:Wt(e,t,n,l,o),resolve:()=>Promise.resolve({type:`data`,result:void 0})})}async function qt(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:qe(t,n),pattern:Ke(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 Vt(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 Jt({request:e,path:t,pattern:n,match:r,lazyHandlerPromise:i,lazyRoutePromise:a,handlerOverride:o,scopedContext:s}){let c,l,u=En(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:qe(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 dn(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 dn(404,{pathname:t.pathname+t.search})}}catch(e){return{type:`error`,result:e}}finally{l&&e.signal.removeEventListener(`abort`,l)}return c}async function Yt(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 Xt(e){let{result:t,type:n}=e;if(Sn(t)){let e;try{e=await Yt(t)}catch(e){return{type:`error`,error:e}}return n===`error`?{type:`error`,error:new We(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:`data`,data:e,statusCode:t.status,headers:t.headers}}return n===`error`?xn(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:hn(t),statusCode:Ge(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:t,statusCode:Ge(t)?t.status:void 0}:xn(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 Zt(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`),!Ae(a)){let o=r.slice(0,r.findIndex(e=>e.route.id===n)+1);a=Tt(new URL(t.url),o,i,a),e.headers.set(`Location`,a)}return e}var Qt=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function $t(e){try{return Qt.includes(new URL(e).protocol)}catch{return!1}}function en(e,t,n,r){if(Ae(e)){let r=e,i=x.test(r)?new URL(S(r,t.protocol)):new URL(r);if($t(i.toString()))throw Error(`Invalid redirect location`);let a=Oe(i.pathname,n)!=null;if(i.origin===t.origin&&a)return Le(i.pathname)+i.search+i.hash}try{if($t(r.createURL(e).toString()))throw Error(`Invalid redirect location`)}catch{}return e}function tn(e,t,n,r){let i=e.createURL(pn(t)).toString(),a={signal:n};if(r&&En(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?nn(r.formData):r.formData}return new Request(i,a)}function nn(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r==`string`?r:r.name);return t}function rn(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function an(e,t,n,r=!1,i=!1){let a={},o=null,s,c=!1,l={},u=n&&yn(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(!bn(f),`Cannot handle redirect results in processLoaderData`),yn(f)){let t=f.error;if(u!==void 0&&(t=u,u=void 0),o||={},i)o[d]=t;else{let n=ln(e,d);o[n.route.id]??(o[n.route.id]=t)}r||(a[d]=xt),c||(c=!0,s=Ge(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 on(e,t,n,r,i,a,o){let{loaderData:s,errors:c}=an(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`),yn(s)){let t=ln(e.matches,r?.route.id);c&&c[t.route.id]||(c={...c,[t.route.id]:s.error}),o.delete(n)}else if(bn(s))E(!1,`Unhandled fetcher revalidation redirect`);else{let e=Fn(s.data);o.set(n,e)}}),{loaderData:s,errors:c}}function sn(e,t,n,r){let i=Object.entries(t).filter(([,e])=>e!==xt).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 cn(e){return e?yn(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function ln(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 un(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 dn(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 We(e||500,o,Error(s),!0)}function fn(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(bn(r))return{key:n,result:r}}}function pn(e){return j({...typeof e==`string`?M(e):e,hash:``})}function mn(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===``?t.hash!==``:e.hash===t.hash||t.hash!==``}function hn(e){return new We(e.init?.status??500,e.init?.statusText??`Internal Server Error`,e.data)}function gn(e){return typeof e==`object`&&!!e&&Object.entries(e).every(([e,t])=>typeof e==`string`&&_n(t))}function _n(e){return typeof e==`object`&&!!e&&`type`in e&&`result`in e&&(e.type===`data`||e.type===`error`)}function vn(e){return Sn(e.result)&&ht.has(e.result.status)}function yn(e){return e.type===`error`}function bn(e){return(e&&e.type)===`redirect`}function xn(e){return typeof e==`object`&&!!e&&`type`in e&&`data`in e&&`init`in e&&e.type===`DataWithResponseInit`}function Sn(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.headers==`object`&&e.body!==void 0}function Cn(e){return ht.has(e)}function wn(e){return Sn(e)&&Cn(e.status)&&e.headers.has(`Location`)}function Tn(e){return mt.has(e.toUpperCase())}function En(e){return ft.has(e.toUpperCase())}function Dn(e){return new URLSearchParams(e).getAll(`index`).some(e=>e===``)}function On(e,t){let n=typeof t==`string`?M(t).search:t.search;if(e[e.length-1].route.index&&Dn(n||``))return e[e.length-1];let r=Pe(e);return r[r.length-1]}function kn(e,t,n){return{url:qe(e.createURL(t),t),pattern:n?Ke(n):``,params:n?.[0]?.params?{...n[0].params}:{}}}function An(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 jn(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 Mn(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 Nn(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 Pn(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 Fn(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 In(e,t){try{let n=e.sessionStorage.getItem(bt);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 Ln(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(bt,JSON.stringify(n))}catch(e){D(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}}function Rn(){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 zn=P.createContext(null);zn.displayName=`DataRouter`;var Bn=P.createContext(null);Bn.displayName=`DataRouterState`;var Vn=P.createContext(!1);function Hn(){return P.useContext(Vn)}var Un=P.createContext({isTransitioning:!1});Un.displayName=`ViewTransition`;var Wn=P.createContext(new Map);Wn.displayName=`Fetchers`;var Gn=P.createContext(null);Gn.displayName=`Await`;var Kn=P.createContext(null);Kn.displayName=`Navigation`;var qn=P.createContext(null);qn.displayName=`Location`;var Jn=P.createContext({outlet:null,matches:[],isDataRoute:!1});Jn.displayName=`Route`;var Yn=P.createContext(null);Yn.displayName=`RouteError`;var Xn=`REACT_ROUTER_ERROR`,Zn=`REDIRECT`,Qn=`ROUTE_ERROR_RESPONSE`;function $n(e){if(e.startsWith(`${Xn}:${Zn}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function er(e){if(e.startsWith(`${Xn}:${Qn}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new We(t.status,t.statusText,t.data)}catch{}}function tr(e,{relative:t}={}){E(nr(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=P.useContext(Kn),{hash:i,pathname:a,search:o}=ur(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:Re([n,a])),r.createHref({pathname:s,search:o,hash:i})}function nr(){return P.useContext(qn)!=null}function rr(){return E(nr(),`useLocation() may be used only in the context of a <Router> component.`),P.useContext(qn).location}var ir=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function ar(){let{isDataRoute:e}=P.useContext(Jn);return e?Er():or()}function or(){E(nr(),`useNavigate() may be used only in the context of a <Router> component.`);let e=P.useContext(zn),{basename:t,navigator:n}=P.useContext(Kn),{matches:r}=P.useContext(Jn),{pathname:i}=rr(),a=JSON.stringify(Fe(r)),o=P.useRef(!1);return P.useLayoutEffect(()=>{o.current=!0}),P.useCallback((r,s={})=>{if(D(o.current,ir),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=Ie(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:Re([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var sr=P.createContext(null);function cr(e){let t=P.useContext(Jn).outlet;return P.useMemo(()=>t&&P.createElement(sr.Provider,{value:e},t),[t,e])}function lr(){let{matches:e}=P.useContext(Jn);return e[e.length-1]?.params??{}}function ur(e,{relative:t}={}){let{matches:n}=P.useContext(Jn),{pathname:r}=rr(),i=JSON.stringify(Fe(n));return P.useMemo(()=>Ie(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function dr(e,t,n){E(nr(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=P.useContext(Kn),{matches:i}=P.useContext(Jn),a=i[i.length-1],o=a?a.params:{};a&&a.pathname;let s=a?a.pathnameBase:`/`;a&&a.route;let c=rr(),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})):ae(e,{pathname:d}),p=vr(f&&f.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:Re([s,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?s:Re([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(qn.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...l},navigationType:`POP`}},p):p}function fr(){let e=Tr(),t=Ge(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 pr=P.createElement(fr,null),mr=class extends P.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static contextType=Vn;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=er(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:P.createElement(Jn.Provider,{value:this.props.routeContext},P.createElement(Yn.Provider,{value:e,children:this.props.component}));return this.context?P.createElement(gr,{error:e},t):t}},hr=new WeakMap;function gr({children:e,error:t}){let{basename:n}=P.useContext(Kn);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=$n(t.digest);if(e){let r=hr.get(t);if(r)throw r;let i=Ye(e.location,n),a=i.absoluteURL||i.to;if($t(a))throw Error(`Invalid redirect location`);if(Je&&!hr.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 hr.set(t,n),n}}return P.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${a}`})}}return e}function _r({routeContext:e,match:t,children:n}){let r=P.useContext(zn);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),P.createElement(Jn.Provider,{value:e},n)}function vr(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:Ke(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||pr,o&&(s<0&&c===0?(Or(`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(_r,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?P.createElement(mr,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function yr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function br(e){let t=P.useContext(zn);return E(t,yr(e)),t}function xr(e){let t=P.useContext(Bn);return E(t,yr(e)),t}function Sr(e){let t=P.useContext(Jn);return E(t,yr(e)),t}function Cr(e){let t=Sr(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 wr(){return Cr(`useRouteId`)}function Tr(){let e=P.useContext(Yn),t=xr(`useRouteError`),n=Cr(`useRouteError`);return e===void 0?t.errors?.[n]:e}function Er(){let{router:e}=br(`useNavigate`),t=Cr(`useNavigate`),n=P.useRef(!1);return P.useLayoutEffect(()=>{n.current=!0}),P.useCallback(async(r,i={})=>{D(n.current,ir),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var Dr={};function Or(e,t,n){!t&&!Dr[e]&&(Dr[e]=!0,D(!1,n))}var kr={};function Ar(e,t){!e&&!kr[t]&&(kr[t]=!0,console.warn(t))}var jr=[`HydrateFallback`,`hydrateFallbackElement`],Mr=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 Nr({router:e,flushSync:t,onError:n,useTransitions:r}){r=Hn()||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:Ke(i.matches)})),i.fetchers.forEach((e,t)=>{e.data!==void 0&&v.current.set(t,e.data)}),o.forEach(e=>v.current.delete(e)),Ar(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(Ar(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=>Pr(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 Mr)},[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=>Pr(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(zn.Provider,{value:S},P.createElement(Bn.Provider,{value:o},P.createElement(Wn.Provider,{value:v.current},P.createElement(Un.Provider,{value:u},P.createElement(zr,{basename:x,location:o.location,navigationType:o.historyAction,navigator:b,useTransitions:r},P.createElement(Fr,{routes:e.routes,manifest:e.manifest,future:e.future,state:o,isStatic:!1,onError:n})))))),null)}function Pr(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 Fr=P.memo(Ir);function Ir({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return dr(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function Lr({to:e,replace:t,state:n,relative:r}){E(nr(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i}=P.useContext(Kn);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(Jn),{pathname:o}=rr(),s=ar(),c=Ie(e,Fe(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 Rr(e){return cr(e.context)}function zr({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){E(!nr(),`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=Oe(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(Kn.Provider,{value:c},P.createElement(qn.Provider,{children:t,value:h}))}P.Component;var Br=`application/x-www-form-urlencoded`;function Vr(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Hr(e){return Vr(e)&&e.tagName.toLowerCase()===`button`}function Ur(e){return Vr(e)&&e.tagName.toLowerCase()===`form`}function Wr(e){return Vr(e)&&e.tagName.toLowerCase()===`input`}function Gr(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Kr(e,t){return e.button===0&&(!t||t===`_self`)&&!Gr(e)}function qr(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 Jr(e,t){let n=qr(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var Yr=null;function Xr(){if(Yr===null)try{new FormData(document.createElement(`form`),0),Yr=!1}catch{Yr=!0}return Yr}var Zr=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Qr(e){return e!=null&&!Zr.has(e)?(D(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Br}"`),null):e}function $r(e,t){let n,r,i,a,o;if(Ur(e)){let o=e.getAttribute(`action`);r=o?Oe(o,t):null,n=e.getAttribute(`method`)||`get`,i=Qr(e.getAttribute(`enctype`))||Br,a=new FormData(e)}else if(Hr(e)||Wr(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?Oe(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||`get`,i=Qr(e.getAttribute(`formenctype`))||Qr(o.getAttribute(`enctype`))||Br,a=new FormData(o,e),!Xr()){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(Vr(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=`get`,r=null,i=Br,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}function ei(e,t){if(e===!1||e==null)throw Error(t)}function ti(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 B=d(),ni=y(),ri=`modulepreload`,ii=function(e){return`/`+e},ai={},oi=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=ii(t,n),t=s(t),t in ai)return;ai[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`:ri,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 si(e,t){if(e.id in t)return t[e.id];try{let n=await oi(()=>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 ci(e){return e!=null&&typeof e.page==`string`}function li(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 ui(e,t,n){return hi((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await si(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(li).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function di(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 fi(e,t,{includeHydrateFallback:n}={}){return pi(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 pi(e){return[...new Set(e)]}function mi(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function hi(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!ci(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(mi(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function gi(){let e=P.useContext(zn);return ei(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function _i(){let e=P.useContext(Bn);return ei(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var vi=P.createContext(void 0);vi.displayName=`FrameworkContext`;function yi(){let e=P.useContext(vi);return ei(e,`You must render this element inside a <HydratedRouter> element`),e}function bi(e,t){let n=P.useContext(vi),[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:xi(s,p),onBlur:xi(c,m),onMouseEnter:xi(l,p),onMouseLeave:xi(u,m),onTouchStart:xi(d,p)}]:[a,f,{}]:[!1,f,{}]}function xi(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Si({page:e,...t}){let n=Hn(),{nonce:r}=yi(),{router:i}=gi(),a=P.useMemo(()=>ae(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?P.createElement(wi,{page:e,matches:a,...t}):P.createElement(Ti,{page:e,matches:a,...t})):null}function Ci(e){let{manifest:t,routeModules:n}=yi(),[r,i]=P.useState([]);return P.useEffect(()=>{let r=!1;return ui(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function wi({page:e,matches:t,...n}){let r=rr(),i=P.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=ti(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 Ti({page:e,matches:t,...n}){let r=rr(),{manifest:i,routeModules:a}=yi(),{loaderData:o,matches:s}=_i(),c=P.useMemo(()=>di(e,t,s,i,r,`data`),[e,t,s,i,r]),l=P.useMemo(()=>di(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=ti(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(()=>fi(l,i),[l,i]),f=Ci(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 Ei(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}var Di=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{Di&&(window.__reactRouterVersion=`8.3.0`)}catch{}function Oi(e,t){return Ct({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:T({window:t?.window}),hydrationData:t?.hydrationData||ki(),routes:e,mapRouteProperties:ie,hydrationRouteProperties:jr,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,instrumentations:t?.instrumentations}).initialize()}function ki(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:Ai(e.errors)}),e}function Ai(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 We(r.status,r.statusText,r.data,r.internal===!0);else if(r&&r.__type===`Error`){if(typeof r.__subType==`string`&&Ue.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 V=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(Kn),v=typeof l==`string`&&b.test(l),y=Ye(l,h);l=y.to;let x=tr(l,{relative:r}),S=rr(),C=null;if(o){let e=Ie(o,[],S.mask?S.mask.pathname:`/`,!0);h!==`/`&&(e.pathname=e.pathname===`/`?h:Re([h,e.pathname])),C=g.createHref(e)}let[w,T,E]=bi(n,p),D=Pi(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:Ei(m,T),target:c,"data-discover":!v&&t===`render`?`true`:void 0});return w&&!v?P.createElement(P.Fragment,null,A,P.createElement(Si,{page:x})):A});V.displayName=`Link`;var ji=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=ur(a,{relative:c.relative}),d=rr(),f=P.useContext(Bn),{navigator:p,basename:m}=P.useContext(Kn),h=f!=null&&Bi(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=Oe(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(V,{...c,"aria-current":C,className:w,ref:l,style:T,to:a,viewTransition:o},typeof s==`function`?s(S):s)});ji.displayName=`NavLink`;var H=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(Kn),g=Ri(),_=zi(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})});H.displayName=`Form`;function Mi(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ni(e){let t=P.useContext(zn);return E(t,Mi(e)),t}function Pi(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:l}={}){let u=ar(),d=rr(),f=ur(e,{relative:o});return P.useCallback(p=>{if(Kr(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 Fi(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(qr(e)),n=P.useRef(!1),r=rr(),i=P.useMemo(()=>Jr(r.search,n.current?null:t.current),[r.search]),a=ar();return[i,P.useCallback((e,t)=>{let r=qr(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var Ii=0,Li=()=>`__${String(++Ii)}__`;function Ri(){let{router:e}=Ni(`useSubmit`),{basename:t}=P.useContext(Kn),n=wr(),r=e.fetch,i=e.navigate;return P.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=$r(e,t);a.navigate===!1?await r(a.fetcherKey||Li(),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 zi(e,{relative:t}={}){let{basename:n}=P.useContext(Kn),r=P.useContext(Jn);E(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...ur(e||`.`,{relative:t})},o=rr();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:Re([n,a.pathname])),j(a)}function Bi(e,{relative:t}={}){let n=P.useContext(Un);E(n!=null,"`useViewTransitionState` must be used within `react-router/dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Ni(`useViewTransitionState`),i=ur(e,{relative:t});if(!n.isTransitioning)return!1;let a=Oe(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Oe(n.nextLocation.pathname,r)||n.nextLocation.pathname;return we(i.pathname,o)!=null||we(i.pathname,a)!=null}var Vi=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Hi=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),Ui=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),Wi=e=>{let t=Ui(e);return t.charAt(0).toUpperCase()+t.slice(1)},Gi={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`},Ki=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},qi=(0,P.createContext)({}),Ji=()=>(0,P.useContext)(qi),Yi=(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=``}=Ji()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,P.createElement)(`svg`,{ref:c,...Gi,width:t??l??Gi.width,height:t??l??Gi.height,stroke:e??f,strokeWidth:m,className:Vi(`lucide`,p,i),...!a&&!Ki(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,P.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),Xi=(e,t)=>{let n=(0,P.forwardRef)(({className:n,...r},i)=>(0,P.createElement)(Yi,{ref:i,iconNode:t,className:Vi(`lucide-${Hi(Wi(e))}`,`lucide-${e}`,n),...r}));return n.displayName=Wi(e),n},Zi=Xi(`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`}]]),Qi=Xi(`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`}]]),$i=Xi(`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`}]]),ea=Xi(`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`}]]),ta=Xi(`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`}]]),na=Xi(`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`}]]),ra=Xi(`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`}]]),ia=Xi(`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`}]]),aa=Xi(`git-pull-request`,[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M13 6h3a2 2 0 0 1 2 2v7`,key:`1yeb86`}],[`line`,{x1:`6`,x2:`6`,y1:`9`,y2:`21`,key:`rroup`}]]),oa=Xi(`hash`,[[`line`,{x1:`4`,x2:`20`,y1:`9`,y2:`9`,key:`4lhtct`}],[`line`,{x1:`4`,x2:`20`,y1:`15`,y2:`15`,key:`vyu0kd`}],[`line`,{x1:`10`,x2:`8`,y1:`3`,y2:`21`,key:`1ggp8o`}],[`line`,{x1:`16`,x2:`14`,y1:`3`,y2:`21`,key:`weycgp`}]]),sa=Xi(`key-round`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]),ca=Xi(`layers`,[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]]),la=Xi(`layout-grid`,[[`rect`,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`1g98yp`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`3`,rx:`1`,key:`6d4xhi`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`14`,rx:`1`,key:`nxv5o0`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`1bb6yr`}]]),ua=Xi(`list-todo`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`rect`,{x:`3`,y:`4`,width:`6`,height:`6`,rx:`1`,key:`cif1o7`}]]),da=Xi(`milestone`,[[`path`,{d:`M12 13v8`,key:`1l5pq0`}],[`path`,{d:`M12 3v3`,key:`1n5kay`}],[`path`,{d:`M18.172 6a2 2 0 0 1 1.414.586l2.06 2.06a1.207 1.207 0 0 1 0 1.708l-2.06 2.06a2 2 0 0 1-1.414.586H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1z`,key:`8gz4t4`}]]),fa=Xi(`monitor-dot`,[[`path`,{d:`M12 17v4`,key:`1riwvh`}],[`path`,{d:`M22 12.307V15a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h8.693`,key:`1dx6ho`}],[`path`,{d:`M8 21h8`,key:`1ev6f3`}],[`circle`,{cx:`19`,cy:`6`,r:`3`,key:`108a5v`}]]),pa=Xi(`package`,[[`path`,{d:`M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z`,key:`1a0edw`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`polyline`,{points:`3.29 7 12 12 20.71 7`,key:`ousv84`}],[`path`,{d:`m7.5 4.27 9 5.15`,key:`1c824w`}]]),ma=Xi(`radio`,[[`path`,{d:`M16.247 7.761a6 6 0 0 1 0 8.478`,key:`1fwjs5`}],[`path`,{d:`M19.075 4.933a10 10 0 0 1 0 14.134`,key:`ehdyv1`}],[`path`,{d:`M4.925 19.067a10 10 0 0 1 0-14.134`,key:`1q22gi`}],[`path`,{d:`M7.753 16.239a6 6 0 0 1 0-8.478`,key:`r2q7qm`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}]]),ha=Xi(`rocket`,[[`path`,{d:`M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5`,key:`qeys4`}],[`path`,{d:`M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09`,key:`u4xsad`}],[`path`,{d:`M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z`,key:`676m9`}],[`path`,{d:`M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05`,key:`92ym6u`}]]),ga=Xi(`scroll-text`,[[`path`,{d:`M15 12h-5`,key:`r7krc0`}],[`path`,{d:`M15 8h-5`,key:`1khuty`}],[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`,key:`zz82l3`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`,key:`1ph1d7`}]]),_a=Xi(`shield-check`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),va=Xi(`stethoscope`,[[`path`,{d:`M11 2v2`,key:`1539x4`}],[`path`,{d:`M5 2v2`,key:`1yf1q8`}],[`path`,{d:`M5 3H4a2 2 0 0 0-2 2v4a6 6 0 0 0 12 0V5a2 2 0 0 0-2-2h-1`,key:`rb5t3r`}],[`path`,{d:`M8 15a6 6 0 0 0 12 0v-3`,key:`x18d4x`}],[`circle`,{cx:`20`,cy:`10`,r:`2`,key:`ts1r5v`}]]),ya=Xi(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),ba=Xi(`users`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]),xa=Xi(`wand-sparkles`,[[`path`,{d:`m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72`,key:`ul74o6`}],[`path`,{d:`m14 7 3 3`,key:`1r5n42`}],[`path`,{d:`M5 6v4`,key:`ilb8ba`}],[`path`,{d:`M19 14v4`,key:`blhpug`}],[`path`,{d:`M10 2v2`,key:`7u0qdc`}],[`path`,{d:`M7 8H3`,key:`zfb6yr`}],[`path`,{d:`M21 16h-4`,key:`1cnmox`}],[`path`,{d:`M11 3H9`,key:`1obp7u`}]]),Sa=Xi(`waves-horizontal`,[[`path`,{d:`M2 12q2.5 2 5 0t5 0 5 0 5 0`,key:`8ddzzs`}],[`path`,{d:`M2 19q2.5 2 5 0t5 0 5 0 5 0`,key:`1wj4st`}],[`path`,{d:`M2 5q2.5 2 5 0t5 0 5 0 5 0`,key:`69x50u`}]]),Ca={size:18,strokeWidth:1.75,"aria-hidden":!0},wa={home:e=>(0,B.jsx)(la,{...Ca,...e}),board:e=>(0,B.jsx)(ca,{...Ca,...e}),streams:e=>(0,B.jsx)(Sa,{...Ca,...e}),queue:e=>(0,B.jsx)(ua,{...Ca,...e}),done:e=>(0,B.jsx)(ea,{...Ca,...e}),phases:e=>(0,B.jsx)(da,{...Ca,...e}),facts:e=>(0,B.jsx)($i,{...Ca,...e}),doctor:e=>(0,B.jsx)(va,{...Ca,...e}),bus:e=>(0,B.jsx)(ma,{...Ca,...e}),room:e=>(0,B.jsx)(oa,{...Ca,...e}),fleet:e=>(0,B.jsx)(ba,{...Ca,...e}),release:e=>(0,B.jsx)(ha,{...Ca,...e}),skills:e=>(0,B.jsx)(xa,{...Ca,...e}),docs:e=>(0,B.jsx)(na,{...Ca,...e}),needsDavid:e=>(0,B.jsx)(Qi,{...Ca,...e}),kit:e=>(0,B.jsx)(pa,{...Ca,...e}),health:e=>(0,B.jsx)(Zi,{...Ca,...e}),gates:e=>(0,B.jsx)(_a,{...Ca,...e}),tokens:e=>(0,B.jsx)(sa,{...Ca,...e}),knowledge:e=>(0,B.jsx)(ga,{...Ca,...e}),prs:e=>(0,B.jsx)(aa,{...Ca,...e}),git:e=>(0,B.jsx)(ia,{...Ca,...e}),rooms:e=>(0,B.jsx)(ta,{...Ca,...e}),risks:e=>(0,B.jsx)(ya,{...Ca,...e}),decisions:e=>(0,B.jsx)(ra,{...Ca,...e}),monitor:e=>(0,B.jsx)(fa,{...Ca,...e})};function U({children:e,className:t=``}){return(0,B.jsx)(`section`,{className:`bg-paper border border-sand rounded-kit shadow-panel min-w-0 overflow-hidden ${t}`,children:e})}function W({title:e,eyebrow:t,path:n,icon:r,children:i}){return(0,B.jsxs)(`div`,{className:`flex items-baseline justify-between gap-3 px-3 pt-2.5 pb-2 min-w-0`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0 shrink`,children:[r&&(0,B.jsx)(`span`,{className:`text-umber/80 shrink-0 translate-y-px`,children:wa[r]()}),(0,B.jsx)(`span`,{className:`font-display font-bold text-[20px] leading-tight text-umber truncate shrink-0 max-w-full`,children:e}),t&&(0,B.jsx)(`span`,{className:`ml-1 font-mono font-medium text-[12px] uppercase tracking-[.1em] text-ink3 whitespace-nowrap hidden md:inline`,children:t})]}),(0,B.jsxs)(`div`,{className:`flex items-center gap-1.5 min-w-0 shrink basis-0 grow justify-end`,children:[n&&(0,B.jsx)(`span`,{className:`font-mono text-[12px] text-ink3 truncate min-w-[4ch]`,title:n,children:n}),i]})]})}var Ta={neutral:`bg-slate-wash text-slate border-slate-line`,ok:`bg-moss-wash text-moss border-moss-line`,warn:`bg-amber-wash text-amber border-amber-line`,bad:`bg-brick-wash text-brick border-brick-line`,david:`bg-ember-wash text-ember-deep border-ember-line`,outline:`bg-transparent text-umber border-dust font-medium`,solid:`bg-brick text-white border-brick`};function G({tone:e=`neutral`,children:t}){return(0,B.jsx)(`span`,{className:`inline-flex items-center gap-1.5 h-[22px] px-[9px] rounded-full font-mono font-semibold text-[12px] tracking-[.03em] border whitespace-nowrap ${Ta[e]}`,children:t})}var Ea=[`BLOCKER`,`RISK`,`DONE`,`FYI`,`AGENT_ACTION`,`GO`,`SCOPE CHANGE`,`VERDICT`,`DAVID_DECISION`],Da={FYI:`bg-linen text-umber shadow-[inset_0_0_0_1px_var(--color-sand)]`,AGENT_ACTION:`bg-slate-wash text-slate`,DAVID_DECISION:`bg-ember-wash text-ember-deep`,BLOCKER:`bg-brick-wash text-brick`,RISK:`bg-amber-wash text-amber`,DONE:`bg-moss-wash text-moss`,GO:`bg-walnut text-paper`,"SCOPE CHANGE":`bg-amber-wash text-amber shadow-[inset_0_0_0_1px_var(--color-amber-line)]`,VERDICT:`bg-moss-wash text-moss shadow-[inset_0_0_0_1px_var(--color-moss-line)]`};function Oa({prefix:e,fail:t}){let n=t&&e===`VERDICT`?`bg-brick-wash text-brick shadow-[inset_0_0_0_1px_var(--color-brick-line)]`:Da[e];return(0,B.jsx)(`span`,{className:`font-mono font-bold text-[12px] tracking-[.04em] px-[7px] py-[3px] rounded-[4px] mr-1.5 align-[1px] ${n}`,children:e})}function ka({glyph:e,raw:t,showRaw:n=!1,malformed:r=!1,children:i,className:a=``}){return(0,B.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,B.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,B.jsx)(`pre`,{className:`m-0 px-3 py-2 font-mono text-[13px] leading-[1.5] text-walnut whitespace-pre-wrap`,children:t}):(0,B.jsx)(`div`,{className:`px-3 min-w-0`,children:i})]})}function Aa({cols:e,children:t}){return(0,B.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 K({tone:e=`default`,size:t=`md`,children:n,...r}){return(0,B.jsx)(`button`,{className:`font-medium leading-none rounded-kit border cursor-pointer whitespace-nowrap ${e===`primary`?`bg-ember border-ember text-white hover:bg-ember-deep hover:border-ember-deep`:e===`ghost`?`border-transparent bg-transparent text-umber hover:bg-linen hover:text-walnut`:`border-dust bg-paper text-walnut hover:bg-linen`} ${t===`sm`?`px-2 py-[5px] text-[12px]`:`px-3 py-2 text-[13px]`}`,...r,children:n})}function ja(){return(0,B.jsx)(`span`,{className:`font-mono font-medium text-[11px] tracking-[.06em] uppercase text-ink3 border border-dashed border-dust rounded-full px-[7px] py-[3px] ml-1.5 align-[1px]`,children:`proposed`})}function Ma({state:e,active:t,title:n}){return(0,B.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,B.jsx)(`span`,{className:`absolute inset-0 rounded-full bg-moss animate-ping opacity-60`})})}function Na({size:e=14,className:t=``}){return(0,B.jsx)(`span`,{className:`inline-block rounded-full border-2 border-current border-t-transparent animate-spin align-[-2px] ${t}`,style:{width:e,height:e},"aria-label":`working`})}function Pa({size:e=22}){return(0,B.jsxs)(`svg`,{width:e,height:e,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":`true`,className:`shrink-0`,children:[(0,B.jsx)(`path`,{d:`M3 19.5h18`,stroke:`var(--color-walnut)`,strokeWidth:`2`,strokeLinecap:`round`}),(0,B.jsx)(`path`,{d:`M12 19.5V10`,stroke:`var(--color-leaf)`,strokeWidth:`2`,strokeLinecap:`round`}),(0,B.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,B.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,B.jsx)(`circle`,{cx:`12`,cy:`21.5`,r:`1.4`,fill:`var(--color-ember)`})]})}var Fa=`/api`;function q(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(Fa+e).then(async e=>{if(e.status===401&&window.dispatchEvent(new Event(`groundwork-console:unauthorized`)),!e.ok)throw Error(`${e.status} ${e.statusText}`);return await e.json()}).then(e=>{n&&(r(e),a(null))}).catch(e=>{n&&a(e.message)}).finally(()=>{n&&s(!1)});let i=t>0?setInterval(()=>l(e=>e+1),t):void 0;return()=>{n=!1,i&&clearInterval(i)}},[e,c,t]),{data:n,error:i,loading:o,refresh:()=>l(e=>e+1)}}async function Ia(e,t){let n=await fetch(Fa+e,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t??{})});n.status===401&&window.dispatchEvent(new Event(`groundwork-console:unauthorized`));let r=await n.json();if(!n.ok&&!r.status)throw Error(r.error??`${n.status}`);return r}async function La(e,t,n){let r=await fetch(`${Fa}/projects/${encodeURIComponent(e)}/docs/${encodeURIComponent(t)}`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(n)}),i=await r.json();if(!r.ok)throw Error(i.error??`${r.status}`);if(!i.sha||!i.run)throw Error(`write response missing sha/run`);return{sha:i.sha,run:i.run}}var Ra=[`/clear`,`/compact`];function za(){return q(`/health`,6e4).data?.requires?.mcp?.capabilities?.sendCommand??Ra}var Ba=(0,P.createContext)({projects:[],current:``,setCurrent:()=>{},error:null,refresh:()=>{}});function Va({children:e}){let{data:t,error:n,refresh:r}=q(`/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,B.jsx)(Ba.Provider,{value:{projects:t??[],current:i,setCurrent:a,error:n,refresh:r},children:e})}var Ha=()=>(0,P.useContext)(Ba),Ua=(0,P.createContext)({runs:[],running:0,refresh:()=>{}});function Wa({children:e}){let{data:t,refresh:n}=q(`/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,B.jsx)(Ua.Provider,{value:{runs:r,running:a,refresh:n},children:e})}var Ga=()=>(0,P.useContext)(Ua),Ka=`groundwork-console.recent`,qa=()=>{try{return JSON.parse(localStorage.getItem(Ka)??`[]`)}catch{return[]}};function Ja(){let{projects:e,current:t,setCurrent:n,refresh:r}=Ha(),[i,a]=(0,P.useState)(!1),[o,s]=(0,P.useState)(!1),[c,l]=(0,P.useState)(``),[u,d]=(0,P.useState)(qa),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(Ka,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,B.jsxs)(`div`,{ref:f,className:`relative flex items-center gap-0.5 whitespace-nowrap`,children:[p.map(e=>(0,B.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,B.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,B.jsx)(`span`,{className:`text-tan`,children:`▾`})]}),i&&(0,B.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,B.jsx)(`div`,{className:`p-2 border-b border-sand`,children:(0,B.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,B.jsxs)(`div`,{className:`max-h-[50vh] overflow-auto`,children:[h.map(e=>(0,B.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,B.jsxs)(`span`,{className:`min-w-0`,children:[(0,B.jsx)(`span`,{className:`font-mono font-medium text-[13px]`,children:e.name}),e.room&&(0,B.jsxs)(`span`,{className:`ml-2 font-mono text-[12px] text-ink3`,children:[`#`,e.room]}),(0,B.jsx)(`div`,{className:`font-mono text-[11px] text-tan truncate`,children:e.path.replace(/^\/Users\/[^/]+/,`~`)})]}),(0,B.jsxs)(`span`,{className:`flex gap-1`,children:[e.behind&&(0,B.jsx)(G,{tone:`warn`,children:`behind`}),e.schema===`workstreams.v1`?(0,B.jsx)(G,{tone:`ok`,children:`v1`}):e.schema?(0,B.jsx)(G,{tone:`warn`,children:e.schema.replace(`workstreams.`,``)}):(0,B.jsx)(G,{tone:`outline`,children:`no seam`})]})]},e.name)),h.length===0&&(0,B.jsx)(`div`,{className:`px-3 py-3 text-[13px] text-umber`,children:`no match`})]}),(0,B.jsxs)(`div`,{className:`p-2 border-t border-sand flex justify-between items-center`,children:[(0,B.jsxs)(`span`,{className:`text-[12px] text-umber font-mono`,children:[e.length,` projects · groundwork-console.config.json`]}),(0,B.jsx)(K,{size:`sm`,tone:`primary`,onClick:()=>{s(!0),a(!1)},children:`+ Add project`})]})]}),o&&(0,B.jsx)(Xa,{onClose:()=>{s(!1),r()}})]})}var Ya=`/api`;function Xa({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 Ia(`/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(`${Ya}/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=q(`/bus/rooms`,6e4).data??[];return(0,P.useEffect)(()=>{!a&&t&&v.some(e=>e.room===t)&&o(t)},[t,v,a]),(0,B.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,B.jsxs)(`div`,{className:`w-[520px] bg-paper border border-sand rounded-kit shadow-panel`,children:[(0,B.jsxs)(`div`,{className:`px-4 py-3 border-b border-sand flex items-center gap-2 font-display font-bold text-[18px] text-umber`,children:[wa.home(),` Add project`]}),(0,B.jsxs)(`div`,{className:`p-4 grid gap-3 text-[13px]`,children:[(0,B.jsxs)(`label`,{className:`grid gap-1`,children:[(0,B.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Name`}),(0,B.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,B.jsxs)(`label`,{className:`grid gap-1`,children:[(0,B.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Repo path (must exist; ideally has docs/ with a seam)`}),(0,B.jsxs)(`div`,{className:`flex gap-2`,children:[(0,B.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,B.jsx)(K,{size:`sm`,onClick:p,children:`Check`})]}),(0,B.jsx)(`datalist`,{id:`gwc-dirs`,children:m.map(e=>(0,B.jsx)(`option`,{value:e.path,children:e.registered?`already registered`:e.hasDocs?`docs/ ✓`:e.isGit?`git`:``},e.path))})]}),s&&(s.ok?(0,B.jsxs)(`div`,{className:`flex gap-1.5 flex-wrap items-center`,children:[(0,B.jsx)(G,{tone:`ok`,children:`exists`}),s.isGit&&(0,B.jsx)(G,{tone:`ok`,children:`git`}),s.hasDocs?(0,B.jsx)(G,{tone:`ok`,children:`docs/`}):(0,B.jsx)(G,{tone:`warn`,children:`no docs/ — run groundwork init`}),(s.hasSeam??[]).map(e=>(0,B.jsx)(G,{tone:`ok`,children:e},e))]}):(0,B.jsx)(`div`,{className:`text-brick`,children:s.reason})),(0,B.jsxs)(`label`,{className:`grid gap-1`,children:[(0,B.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,B.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,B.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,B.jsx)(`code`,{children:`join_room`}),` once bus writes are on) — the console only records the link.`]}),(0,B.jsx)(`datalist`,{id:`gwc-rooms`,children:v.map(e=>(0,B.jsx)(`option`,{value:e.room},e.room))})]}),l&&(0,B.jsx)(`div`,{className:`text-brick`,children:l})]}),(0,B.jsxs)(`div`,{className:`px-4 py-3 border-t border-sand flex justify-end gap-2`,children:[(0,B.jsx)(K,{size:`sm`,onClick:e,children:`Cancel`}),(0,B.jsx)(K,{size:`sm`,tone:`primary`,onClick:async()=>{f(!0),u(null);try{let n=await Ia(`/projects`,{name:t,path:r,room:a||void 0});if(n.status!==`ok`)throw Error(n.error??`failed`);e()}catch(e){u(e.message)}finally{f(!1)}},disabled:!t||!r||d,children:d?`Adding…`:`Add to groundwork-console.config.json`})]})]})})}function Za(){let{data:e,refresh:t}=q(`/admin/seam-writes`,1e4),[n,r]=(0,P.useState)(!1),i=!!e?.enabled,a=async e=>{r(!0);try{await Ia(`/admin/seam-writes`,{enabled:e}),t()}finally{r(!1)}};return(0,B.jsx)(B.Fragment,{children:(0,B.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 Qa(){let{data:e,refresh:t}=q(`/admin/bus-writes`,1e4),[n,r]=(0,P.useState)(!1),i=!!e?.enabled,a=async e=>{r(!0);try{await Ia(`/admin/bus-writes`,{enabled:e}),t()}finally{r(!1)}};return(0,B.jsx)(B.Fragment,{children:(0,B.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 $a=[{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`}],eo=(0,P.createContext)({items:[],unseen:0,seenAt:0,markSeen:()=>{},muted:new Set,toggleMute:()=>{},toasts:[],dismissToast:()=>{},browserPerm:`default`,askBrowser:()=>{}}),to=`groundwork-console.notify.seenAt`,no=`groundwork-console.notify.muted`;function ro({children:e}){let{data:t}=q(`/notifications?limit=100`),[n,r]=(0,P.useState)([]),[i,a]=(0,P.useState)(()=>Number(localStorage.getItem(to)??0)),[o,s]=(0,P.useState)(()=>new Set(JSON.parse(localStorage.getItem(no)??`[]`))),[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,B.jsx)(eo.Provider,{value:{items:n,unseen:p,seenAt:i,markSeen:()=>{let e=Date.now();a(e),localStorage.setItem(to,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(no,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 io=()=>(0,P.useContext)(eo),J={decision:`david`,blocker:`bad`,dm:`neutral`,"run.failed":`bad`,"run.side-effect":`ok`,"rule.sent":`warn`},ao={decision:`needs David`,blocker:`BLOCKER`,dm:`DM`,"run.failed":`run failed`,"run.side-effect":`run done`,"rule.sent":`rule sent`},oo=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 so(){let{items:e,unseen:t,seenAt:n,markSeen:r,muted:i,toggleMute:a,browserPerm:o,askBrowser:s}=io(),[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}=Ga(),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,B.jsxs)(`div`,{ref:f,className:`relative ml-2 shrink-0`,children:[(0,B.jsxs)(`button`,{onClick:()=>{l(e=>!e),c||r()},className:`relative inline-flex items-center justify-center w-8 h-8 rounded-full border cursor-pointer ${c?`bg-paper border-dust`:`bg-transparent border-transparent hover:bg-linen`} text-umber`,title:`notifications`,"aria-label":`notifications`,children:[wa.needsDavid({size:16}),t>0&&(0,B.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,B.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,B.jsxs)(`div`,{className:`flex items-center justify-between px-3 py-2 border-b border-sand`,children:[(0,B.jsx)(`span`,{className:`font-semibold text-[13px] uppercase tracking-[.08em] text-umber`,children:`Notifications`}),(0,B.jsxs)(`div`,{className:`flex gap-1.5 items-center`,children:[(0,B.jsx)(K,{size:`sm`,tone:`ghost`,onClick:()=>d(e=>!e),"aria-pressed":u,children:`prefs`}),(0,B.jsx)(V,{to:`/ops/runs`,onClick:()=>l(!1),className:`font-mono text-[12px]`,children:`runs →`})]})]}),u&&(0,B.jsxs)(`div`,{className:`px-3 py-2 border-b border-sand grid gap-1 text-[12px]`,children:[$a.map(e=>(0,B.jsxs)(`label`,{className:`flex items-center gap-2 cursor-pointer`,children:[(0,B.jsx)(`input`,{type:`checkbox`,checked:!i.has(e.kind),onChange:()=>a(e.kind)}),(0,B.jsx)(G,{tone:J[e.kind],children:ao[e.kind]}),(0,B.jsx)(`span`,{className:`text-umber`,children:e.label})]},e.kind)),(0,B.jsxs)(`div`,{className:`mt-1 flex items-center gap-2 text-umber`,children:[`Browser notifications when the tab is hidden: `,o===`unsupported`?(0,B.jsx)(`span`,{className:`text-tan`,children:`unsupported`}):o===`granted`?(0,B.jsx)(G,{tone:`ok`,children:`on`}):o===`denied`?(0,B.jsx)(G,{tone:`bad`,children:`blocked in browser`}):(0,B.jsx)(K,{size:`sm`,onClick:s,children:`Enable`})]}),(0,B.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,B.jsxs)(`div`,{className:`border-b border-sand`,children:[(0,B.jsxs)(`div`,{className:`flex items-center justify-between px-3 pt-2 pb-1`,children:[(0,B.jsxs)(`span`,{className:`font-mono text-[10px] uppercase tracking-[.1em] text-tan`,children:[`runs · last `,h.length]}),(0,B.jsx)(V,{to:`/ops/runs`,onClick:()=>l(!1),className:`font-mono text-[11px] text-ember-deep`,children:`all runs →`})]}),h.map(e=>(0,B.jsxs)(V,{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,B.jsx)(G,{tone:g(e.status),children:e.status}),(0,B.jsxs)(`span`,{className:`min-w-0 truncate text-[12px]`,title:e.label,children:[e.label,e.project&&(0,B.jsxs)(`span`,{className:`font-mono text-[10px] text-tan`,children:[` · `,e.project]})]}),(0,B.jsx)(`span`,{className:`font-mono text-[11px] text-ink3 whitespace-nowrap`,children:oo(e.endedAt??e.startedAt)})]},e.id))]}),(0,B.jsxs)(`div`,{className:`max-h-[60vh] overflow-auto`,children:[p.length===0&&(0,B.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,B.jsxs)(V,{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,B.jsx)(`span`,{className:`pt-0.5`,children:(0,B.jsx)(G,{tone:J[e.kind],children:ao[e.kind]})}),(0,B.jsxs)(`span`,{className:`min-w-0`,children:[(0,B.jsx)(`span`,{className:`block text-[13px] font-semibold truncate`,children:e.title}),e.body&&(0,B.jsx)(`span`,{className:`block text-[12px] text-umber line-clamp-2`,children:e.body}),(e.project||e.from)&&(0,B.jsxs)(`span`,{className:`block font-mono text-[11px] text-tan`,children:[e.project??``,e.from?` · ${e.from}`:``]})]}),(0,B.jsx)(`span`,{className:`font-mono text-[11px] text-ink3 whitespace-nowrap`,children:oo(e.ts)})]},e.id))]})]})]})}function co(){let{toasts:e,dismissToast:t}=io();return e.length===0?null:(0,B.jsx)(`div`,{className:`fixed right-4 bottom-4 z-[70] grid gap-2 w-[380px] whitespace-normal text-left`,children:e.map(e=>(0,B.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,B.jsxs)(V,{to:e.link,onClick:()=>t(e.id),className:`min-w-0 hover:no-underline text-inherit`,children:[(0,B.jsxs)(`span`,{className:`block font-semibold text-[13px] truncate`,children:[(0,B.jsx)(G,{tone:J[e.kind],children:ao[e.kind]}),` `,(0,B.jsx)(`span`,{className:`ml-1`,children:e.title})]}),e.body&&(0,B.jsx)(`span`,{className:`block text-[12px] text-umber line-clamp-3 mt-0.5`,children:e.body})]}),(0,B.jsx)(`button`,{onClick:()=>t(e.id),className:`border-0 bg-transparent text-tan cursor-pointer self-start`,"aria-label":`dismiss`,children:`✕`})]},e.id))})}var lo={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`},uo={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`},fo=e=>{if(e<16)return lo[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)})`},po=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 mo(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&&po(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,B.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(lo[r])n.color=lo[r];else if(uo[r])n.bg=uo[r];else if(r===38||r===48){let i=r===38;if(t[e+1]===5){let r=fo(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 ho={};function go(e){let t=ho[e];if(t)return t;t=ho[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 _o(e,t){typeof t!=`string`&&(t=_o.defaultChars);let n=go(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})}_o.defaultChars=`;/?:@&=+$,#`,_o.componentChars=``;var vo={};function yo(e){let t=vo[e];if(t)return t;t=vo[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 bo(e,t,n){typeof t!=`string`&&(n=t,t=bo.defaultChars),n===void 0&&(n=!0);let r=yo(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}bo.defaultChars=`;/?:@&=+$,-_.!~*'()#`,bo.componentChars=`-_.!~*'()`;function xo(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 So(){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 Co=/^([a-z0-9.+-]+:)/i,wo=/:[0-9]*$/,To=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Eo=[`%`,`/`,`?`,`;`,`#`,`'`,`{`,`}`,`|`,`\\`,`^`,"`",`<`,`>`,`"`,"`",` `,`\r`,`
11
+ `,` `],Do=[`/`,`?`,`#`],Oo=255,ko=/^[+a-z0-9A-Z_-]{0,63}$/,Ao=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,jo={javascript:!0,"javascript:":!0},Mo={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function No(e,t){if(e&&e instanceof So)return e;let n=new So;return n.parse(e,t),n}So.prototype.parse=function(e,t){let n,r,i,a=e;if(a=a.trim(),!t&&e.split(`#`).length===1){let e=To.exec(a);if(e)return this.pathname=e[1],e[2]&&(this.search=e[2]),this}let o=Co.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&&jo[o])&&(a=a.substr(2),this.slashes=!0)),!jo[o]&&(i||o&&!Mo[o])){let e=-1;for(let t=0;t<Do.length;t++)r=a.indexOf(Do[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<Eo.length;t++)r=a.indexOf(Eo[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(ko)){let r=``;for(let e=0,t=n.length;e<t;e++)n.charCodeAt(e)>127?r+=`x`:r+=n[e];if(!r.match(ko)){let r=e.slice(0,t),i=e.slice(t+1),o=n.match(Ao);o&&(r.push(o[1]),i.unshift(o[2])),i.length&&(a=i.join(`.`)+a),this.hostname=r.join(`.`);break}}}}this.hostname.length>Oo&&(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),Mo[n]&&this.hostname&&!this.pathname&&(this.pathname=``),this},So.prototype.parseHost=function(e){let t=wo.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 Po=s({decode:()=>_o,encode:()=>bo,format:()=>xo,parse:()=>No}),Fo=s({Any:()=>Io,Cc:()=>Lo,Cf:()=>Ro,P:()=>zo,S:()=>Bo,Z:()=>Vo}),Io=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Lo=/[\0-\x1F\x7F-\x9F]/,Ro=/[\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]/,zo=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\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]/,Bo=/[\$\+<->\^`\|~\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]/,Vo=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,Ho=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 Uo(e){return e>=55296&&e<=57343||e>1114111?65533:Ho.get(e)??e}function Wo(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 Go=Wo(`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`),Ko;(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`})(Ko||={});var qo;(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`})(qo||={});var Jo=32;function Yo(e){return e>=qo.ZERO&&e<=qo.NINE}function Xo(e){return e>=qo.UPPER_A&&e<=qo.UPPER_F||e>=qo.LOWER_A&&e<=qo.LOWER_F}function Zo(e){return e>=qo.UPPER_A&&e<=qo.UPPER_Z||e>=qo.LOWER_A&&e<=qo.LOWER_Z||Yo(e)}function Qo(e){return e===qo.EQUALS||Zo(e)}var $o;(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`})($o||={});var es;(function(e){e[e.Legacy=0]=`Legacy`,e[e.Strict=1]=`Strict`,e[e.Attribute=2]=`Attribute`})(es||={});var ts=class{decodeTree;emitCodePoint;errors;constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n}state=$o.EntityStart;consumed=1;result=0;treeIndex=0;excess=1;decodeMode=es.Strict;runConsumed=0;startEntity(e){this.decodeMode=e,this.state=$o.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1,this.runConsumed=0}write(e,t){switch(this.state){case $o.EntityStart:return e.charCodeAt(t)===qo.NUM?(this.state=$o.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=$o.NamedEntity,this.stateNamedEntity(e,t));case $o.NumericStart:return this.stateNumericStart(e,t);case $o.NumericDecimal:return this.stateNumericDecimal(e,t);case $o.NumericHex:return this.stateNumericHex(e,t);case $o.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|Jo)===qo.LOWER_X?(this.state=$o.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=$o.NumericDecimal,this.stateNumericDecimal(e,t))}stateNumericHex(e,t){for(;t<e.length;){let n=e.charCodeAt(t);if(Yo(n)||Xo(n)){let e=n<=qo.NINE?n-qo.ZERO:(n|Jo)-qo.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(Yo(n))this.result=this.result*10+(n-qo.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===qo.SEMI)this.consumed+=1;else if(this.decodeMode===es.Strict)return 0;return this.emitCodePoint(Uo(this.result),this.consumed),this.errors&&(e!==qo.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){let{decodeTree:n}=this,r=n[this.treeIndex],i=(r&Ko.VALUE_LENGTH)>>14;for(;t<e.length;){if(i===0&&(r&Ko.FLAG13)!==0){let a=(r&Ko.BRANCH_LENGTH)>>7;if(this.runConsumed===0){let n=r&Ko.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&Ko.VALUE_LENGTH)>>14}if(t>=e.length)break;let a=e.charCodeAt(t);if(a===qo.SEMI&&i!==0&&(r&Ko.FLAG13)!==0)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);if(this.treeIndex=rs(n,r,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return this.result===0||this.decodeMode===es.Attribute&&(i===0||Qo(a))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],i=(r&Ko.VALUE_LENGTH)>>14,i!==0){if(a===qo.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==es.Strict&&(r&Ko.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]&Ko.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]&~(Ko.VALUE_LENGTH|Ko.FLAG13):r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){switch(this.state){case $o.NamedEntity:return this.result!==0&&(this.decodeMode!==es.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case $o.NumericDecimal:return this.emitNumericEntity(0,2);case $o.NumericHex:return this.emitNumericEntity(0,3);case $o.NumericStart:return this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case $o.EntityStart:return 0}}};function ns(e){let t=``,n=new ts(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 rs(e,t,n,r){let i=(t&Ko.BRANCH_LENGTH)>>7,a=t&Ko.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 is=ns(Go);function as(e){return is(e,es.Strict)}var os=class{src_Any=Io.source;src_Cc=Lo.source;src_Z=Vo.source;src_P=zo.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`)}},ss={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)},cs={"http:":ss,"https:":ss,"ftp:":ss,"//":{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)}},ls=`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`,us=`biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф`;function ds(){let e=us.split(`|`);return ls.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 fs={fuzzyLink:!1,fuzzyEmail:!0,fuzzyIP:!1,"---":!1,tlds:ds(),urlAuth:!1,maxLength:1e4},ps=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}},ms=class{__opts__;__schemas__;re;constructor(e={}){let{rebuilder:t,...n}=e;this.__opts__={...fs,...n},this.__schemas__={...cs},this.re=t||new os,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 ps(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 ps(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}`)}},hs=2147483647,gs=36,_s=1,vs=26,ys=38,bs=700,xs=72,Ss=128,Cs=`-`,ws=/^xn--/,Ts=/[^\0-\x7F]/,Es=/[\x2E\u3002\uFF0E\uFF61]/g,Ds={overflow:`Overflow: input needs wider integers to process`,"not-basic":`Illegal input >= 0x80 (not a basic code point)`,"invalid-input":`Invalid input`},Os=35,ks=Math.floor,As=String.fromCharCode;function js(e){throw RangeError(Ds[e])}function Ms(e,t){let n=[],r=e.length;for(;r--;)n[r]=t(e[r]);return n}function Ns(e,t){let n=e.split(`@`),r=``;n.length>1&&(r=n[0]+`@`,e=n[1]),e=e.replace(Es,`.`);let i=Ms(e.split(`.`),t).join(`.`);return r+i}function Ps(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 Fs=e=>String.fromCodePoint(...e),Is=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:gs},Ls=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},Rs=function(e,t,n){let r=0;for(e=n?ks(e/bs):e>>1,e+=ks(e/t);e>455;r+=gs)e=ks(e/Os);return ks(r+36*e/(e+ys))},zs=function(e){let t=[],n=e.length,r=0,i=Ss,a=xs,o=e.lastIndexOf(Cs);o<0&&(o=0);for(let n=0;n<o;++n)e.charCodeAt(n)>=128&&js(`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=gs;;i+=gs){s>=n&&js(`invalid-input`);let o=Is(e.charCodeAt(s++));o>=gs&&js(`invalid-input`),o>ks((hs-r)/t)&&js(`overflow`),r+=o*t;let c=i<=a?_s:i>=a+vs?vs:i-a;if(o<c)break;let l=gs-c;t>ks(hs/l)&&js(`overflow`),t*=l}let c=t.length+1;a=Rs(r-o,c,o==0),ks(r/c)>hs-i&&js(`overflow`),i+=ks(r/c),r%=c,t.splice(r++,0,i)}return String.fromCodePoint(...t)},Bs=function(e){let t=[];e=Ps(e);let n=e.length,r=Ss,i=0,a=xs;for(let n of e)n<128&&t.push(As(n));let o=t.length,s=o;for(o&&t.push(Cs);s<n;){let n=hs;for(let t of e)t>=r&&t<n&&(n=t);let c=s+1;n-r>ks((hs-i)/c)&&js(`overflow`),i+=(n-r)*c,r=n;for(let n of e)if(n<r&&++i>hs&&js(`overflow`),n===r){let e=i;for(let n=gs;;n+=gs){let r=n<=a?_s:n>=a+vs?vs:n-a;if(e<r)break;let i=e-r,o=gs-r;t.push(As(Ls(r+i%o,0))),e=ks(i/o)}t.push(As(Ls(e,0))),a=Rs(i,c,s===o),i=0,++s}++i,++r}return t.join(``)},Vs={version:`2.3.1`,ucs2:{decode:Ps,encode:Fs},decode:zs,encode:Bs,toASCII:function(e){return Ns(e,function(e){return Ts.test(e)?`xn--`+Bs(e):e})},toUnicode:function(e){return Ns(e,function(e){return ws.test(e)?zs(e.slice(4).toLowerCase()):e})}},Hs=Object.defineProperty,Us=(e,t)=>{let n={};for(var r in e)Hs(n,r,{get:e[r],enumerable:!0});return t||Hs(n,Symbol.toStringTag,{value:`Module`}),n},Ws=Us({arrayReplaceAt:()=>Ks,asciiTrim:()=>hc,callable:()=>Gs,escapeHtml:()=>ac,escapeRE:()=>sc,fromCodePoint:()=>Js,isMdAsciiPunct:()=>fc,isPunctChar:()=>uc,isPunctCharCode:()=>dc,isSpace:()=>cc,isValidEntityCode:()=>qs,isWhiteSpace:()=>lc,lib:()=>gc,normalizeReference:()=>pc,unescapeAll:()=>ec,unescapeMd:()=>$s});function Gs(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 Ks(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function qs(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 Js(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 Ys=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,Xs=RegExp(`${Ys.source}|&([a-z#][a-z0-9]{1,31});`,`gi`),Zs=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function Qs(e,t){if(t.charCodeAt(0)===35&&Zs.test(t)){let n=t[1].toLowerCase()===`x`?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return qs(n)?Js(n):e}let n=as(e);return n===e?e:n}function $s(e){return e.indexOf(`\\`)<0?e:e.replace(Ys,`$1`)}function ec(e){return e.indexOf(`\\`)<0&&e.indexOf(`&`)<0?e:e.replace(Xs,function(e,t,n){return t||Qs(e,n)})}var tc=/[&<>"]/,nc=/[&<>"]/g,rc={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`};function ic(e){return rc[e]}function ac(e){return tc.test(e)?e.replace(nc,ic):e}var oc=/[.?*+^$[\]\\(){}|-]/g;function sc(e){return e.replace(oc,`\\$&`)}function cc(e){switch(e){case 9:case 32:return!0}return!1}function lc(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 uc(e){return zo.test(e)||Bo.test(e)}function dc(e){return uc(Js(e))}function fc(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 pc(e){return e=e.trim().replace(/\s+/g,` `),e.toLowerCase().toUpperCase()}function mc(e){return e===32||e===9||e===10||e===13}function hc(e){let t=0;for(;t<e.length&&mc(e.charCodeAt(t));t++);let n=e.length-1;for(;n>=t&&mc(e.charCodeAt(n));n--);return e.slice(t,n+1)}var gc={mdurl:Po,ucmicro:Fo};function _c(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 vc(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=ec(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=ec(e.slice(t,i)),a.pos=i,a.ok=!0,a)}function yc(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+=ec(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+=ec(e.slice(t,a)),o}var bc=Us({parseLinkDestination:()=>vc,parseLinkLabel:()=>_c,parseLinkTitle:()=>yc});function xc(e){"@babel/helpers - typeof";return xc=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},xc(e)}function Sc(e,t){if(xc(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(xc(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Cc(e){var t=Sc(e,`string`);return xc(t)==`symbol`?t:t+``}function Y(e,t,n){return(t=Cc(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var wc=class{constructor(e,t,n){Y(this,`map`,null),Y(this,`level`,0),Y(this,`children`,null),Y(this,`content`,``),Y(this,`markup`,``),Y(this,`info`,``),Y(this,`block`,!1),Y(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}`}},Tc=class{constructor(){Y(this,`__rules__`,[]),Y(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]||[]}},Ec={};Ec.code_inline=function(e,t,n,r,i){let a=e[t];return`<code${i.renderAttrs(a)}>${ac(a.content)}</code>`},Ec.code_block=function(e,t,n,r,i){let a=e[t];return`<pre${i.renderAttrs(a)}><code>${ac(e[t].content)}</code></pre>\n`},Ec.fence=function(e,t,n,r,i){let a=e[t],o=a.info?ec(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)||ac(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`},Ec.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)},Ec.hardbreak=function(e,t,n){return n.xhtmlOut?`<br />
13
+ `:`<br>
14
+ `},Ec.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?`<br />
15
+ `:`<br>
16
+ `:`
17
+ `},Ec.text=function(e,t){return ac(e[t].content)},Ec.html_block=function(e,t){return e[t].content},Ec.html_inline=function(e,t){return e[t].content};var Dc=class{constructor(){Y(this,`rules`,Object.assign({},Ec))}renderAttrs(e){let t,n,r;if(!e.attrs)return``;for(r=``,t=0,n=e.attrs.length;t<n;t++)r+=` ${ac(e.attrs[t][0])}="${ac(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}},Oc=class{constructor(e,t,n){Y(this,`tokens`,[]),Y(this,`inlineMode`,!1),Y(this,`Token`,wc),this.src=e,this.env=n,this.md=t}},kc=/\r\n?|\n/g,Ac=/\0/g;function jc(e){let t;t=e.src.replace(kc,`
21
+ `),t=t.replace(Ac,`�`),e.src=t}function Mc(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 Nc(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 Pc(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 Fc(e){return/^<a[>\s]/i.test(e)}function Ic(e){return/^<\/a\s*>/i.test(e)}function Lc(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`&&(Fc(o.content)&&i>0&&i--,Ic(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=Ks(r,a,c)}}}}var Rc=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,zc=/\((c|tm|r)\)/i,Bc=/\((c|tm|r)\)/gi,Vc={c:`©`,r:`®`,tm:`™`};function Hc(e,t){return Vc[t.toLowerCase()]}function Uc(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(Bc,Hc)),r.type===`link_open`&&r.info===`auto`&&t--,r.type===`link_close`&&r.info===`auto`&&t++}}function Wc(e){let t=0;for(let n=e.length-1;n>=0;n--){let r=e[n];r.type===`text`&&!t&&Rc.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 Gc(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type===`inline`&&(zc.test(e.tokens[t].content)&&Uc(e.tokens[t].children),Rc.test(e.tokens[t].content)&&Wc(e.tokens[t].children))}var Kc=/['"]/,qc=/['"]/g,Jc=`’`;function Yc(e,t,n,r){e[t]||(e[t]=[]),e[t].push({pos:n,ch:r})}function Xc(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 Zc(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;){qc.lastIndex=l;let o=qc.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=fc(m)||dc(m),_=fc(h)||dc(h),v=lc(m),y=lc(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&&Yc(i,a,o.index,Jc);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]),Yc(i,a,o.index,c),Yc(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&&Yc(i,a,o.index,Jc)}}Object.keys(i).forEach(function(t){let n=Number(t);e[n].content=Xc(e[n].content,i[t])})}function Qc(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)e.tokens[t].type!==`inline`||!Kc.test(e.tokens[t].content)||Zc(e.tokens[t].children,e)}function $c(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 el(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&&$c(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 tl=[[`normalize`,jc],[`block`,Mc],[`strip_references`,Nc],[`inline`,Pc],[`linkify`,Lc],[`replacements`,Gc],[`smartquotes`,Qc],[`text_join`,el]],nl=class{constructor(){Y(this,`ruler`,new Tc),Y(this,`State`,Oc);for(let e=0;e<tl.length;e++)this.ruler.push(tl[e][0],tl[e][1])}process(e){let t=this.ruler.getRules(``);for(let n=0,r=t.length;n<r;n++)t[n](e)}},rl=class{constructor(e,t,n,r){Y(this,`bMarks`,[]),Y(this,`eMarks`,[]),Y(this,`tShift`,[]),Y(this,`sCount`,[]),Y(this,`bsCount`,[]),Y(this,`blkIndent`,0),Y(this,`line`,0),Y(this,`lineMax`,0),Y(this,`tight`,!1),Y(this,`listIndent`,-1),Y(this,`parentType`,`root`),Y(this,`level`,0),Y(this,`Token`,wc),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(cc(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 wc(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&&cc(this.src.charCodeAt(e));e++);return e}skipSpacesBack(e,t){if(e<=t)return e;for(;e>t;)if(!cc(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(cc(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(``)}},il=65536;function al(e,t){let n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function ol(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 sl(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&&!cc(s)||o===45&&cc(s))return!1;for(;a<e.eMarks[i];){let t=e.src.charCodeAt(a);if(t!==124&&t!==45&&t!==58&&!cc(t))return!1;a++}let c=al(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=al(e,t).trim(),c.indexOf(`|`)===-1||e.sCount[t]-e.blkIndent>=4)return!1;l=ol(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=al(e,i).trim(),!c)||e.sCount[i]-e.blkIndent>=4||(l=ol(c),l.length&&l[0]===``&&l.shift(),l.length&&l[l.length-1]===``&&l.pop(),y+=d-l.length,y>il))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 cl(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 ll(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 ul(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(cc(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 dl(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&&!cc(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 fl(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&&!cc(e.src.charCodeAt(r))?-1:r}function pl(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),!cc(a))?-1:i}function ml(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 hl(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=pl(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=fl(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=pl(e,c),p<0)break;o=e.bMarks[c]+e.tShift[c]}else if(p=fl(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&&ml(e,h),!0}function gl(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(!cc(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(!cc(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&&cc(c.charCodeAt(i));)i++;if(i<a&&c.charCodeAt(i)!==10&&g)for(g=``,i=f,o=p;i<a&&cc(c.charCodeAt(i));)i++;if(i<a&&c.charCodeAt(i)!==10)return!1;let _=pc(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 _l=`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(`.`),vl=`<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^"'=<>\`\\x00-\\x20]+|'[^']*'|"[^"]*"))?)*\\s*\\/?>`,yl=`<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>`,bl=RegExp(`^(?:${vl}|${yl}|<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->|<[?][\\s\\S]*?[?]>|<![A-Za-z][^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)`),xl=RegExp(`^(?:${vl}|${yl})`),Sl=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Za-z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[RegExp(`^</?(${_l.join(`|`)})(?=(\\s|/?>|$))`,`i`),/^$/,!0],[RegExp(`${xl.source}\\s*$`),/^$/,!1]];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||!e.md.options.html||e.src.charCodeAt(i)!==60)return!1;let o=e.src.slice(i,a),s=0;for(;s<Sl.length&&!Sl[s][0].test(o);s++);if(s===Sl.length)return!1;if(r)return Sl[s][2];let c=t+1,l=Sl[s][1].test(``);if(!Sl[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),Sl[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 wl(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&&!cc(o))return!1;if(r)return!0;a=e.skipSpacesBack(a,i);let c=e.skipCharsBack(a,35,i);c>i&&cc(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=hc(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 Tl(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=hc(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 El(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=hc(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 Dl=[[`table`,sl,[`paragraph`,`reference`]],[`code`,cl],[`fence`,ll,[`paragraph`,`reference`,`blockquote`,`list`]],[`blockquote`,ul,[`paragraph`,`reference`,`blockquote`,`list`]],[`hr`,dl,[`paragraph`,`reference`,`blockquote`,`list`]],[`list`,hl,[`paragraph`,`reference`,`blockquote`]],[`reference`,gl],[`html_block`,Cl,[`paragraph`,`reference`,`blockquote`]],[`heading`,wl,[`paragraph`,`reference`,`blockquote`]],[`lheading`,Tl],[`paragraph`,El]],Ol=class{constructor(){Y(this,`ruler`,new Tc),Y(this,`State`,rl);for(let e=0;e<Dl.length;e++)this.ruler.push(Dl[e][0],Dl[e][1],{alt:(Dl[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)}},kl=class{constructor(e,t,n,r){Y(this,`pos`,0),Y(this,`level`,0),Y(this,`pending`,``),Y(this,`pendingLevel`,0),Y(this,`cache`,{}),Y(this,`backticks`,{}),Y(this,`backticksScanned`,!1),Y(this,`linkLevel`,0),Y(this,`delimiters`,[]),Y(this,`_prev_delimiters`,[]),Y(this,`Token`,wc),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 wc(`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 wc(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=fc(i)||dc(i),l=fc(s)||dc(s),u=lc(i),d=lc(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 Al(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 jl(e,t){let n=e.pos;for(;n<e.posMax&&!Al(e.src.charCodeAt(n));)n++;return n!==e.pos&&(t||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}var Ml=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function Nl(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(Ml);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 Pl(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&&cc(e.src.charCodeAt(n));)n++;return e.pos=n,!0}var X=[];for(let e=0;e<256;e++)X.push(0);`\\!"#$%&'()*+,./:;<=>?@[]^_\`{|}~-`.split(``).forEach(function(e){X[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),cc(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&&X[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),!(!cc(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),!(!cc(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),!(!cc(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=pc(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),!(!cc(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),!(!cc(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),!(!cc(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=pc(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(bl);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=qs(t)?Js(t):Js(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=as(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`,jl],[`linkify`,Nl],[`newline`,Pl],[`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(){Y(this,`ruler`,new Tc),Y(this,`ruler2`,new Tc),Y(this,`State`,kl);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=No(e,!0);if(t.hostname&&(!t.protocol||uu.indexOf(t.protocol)>=0))try{t.hostname=Vs.toASCII(t.hostname)}catch{}return bo(xo(t))}normalizeLinkText(e){let t=No(e,!0);if(t.hostname&&(!t.protocol||uu.indexOf(t.protocol)>=0))try{t.hostname=Vs.toUnicode(t.hostname)}catch{}return _o(xo(t),_o.defaultChars+`%`)}constructor(...e){Y(this,`inline`,new ou),Y(this,`block`,new Ol),Y(this,`core`,new nl),Y(this,`renderer`,new Dc),Y(this,`linkify`,new ms),Y(this,`utils`,Ws),Y(this,`helpers`,Object.assign({},bc));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)}};Y(du,`Token`,wc),Y(du,`Ruler`,Tc),Y(du,`Renderer`,Dc),Y(du,`ParserCore`,nl),Y(du,`StateCore`,Oc),Y(du,`ParserBlock`,Ol),Y(du,`StateBlock`,rl),Y(du,`ParserInline`,ou),Y(du,`StateInline`,kl);var fu=new(Gs(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 oi(async()=>{let{default:e}=await import(`./mermaid.core-B20ztOv3.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,B.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,B.jsxs)(`div`,{className:`relative`,children:[(0,B.jsx)(wu,{html:o,className:n,onOver:c,onLeave:l}),i&&(0,B.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,B.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,B.jsx)(`b`,{children:i.change.kind===`uncommitted`?`uncommitted`:`last commit`}),(0,B.jsx)(`span`,{className:`text-ink3 truncate`,children:i.change.label}),(0,B.jsxs)(`span`,{className:`ml-auto text-tan`,children:[`@@ +`,i.hunk.newStart,`,`,i.hunk.newLines]})]}),(0,B.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,B.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,B.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}=Ha(),n=ar(),[r,i]=(0,P.useState)(null),a=q(t?`/projects/${t}/docs`:null,3e4).data?.files??[],o=q(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,B.jsxs)(Au.Provider,{value:{files:a,open:s,linkify:(e,n)=>Ou(e,a,e=>s(e,n||t))},children:[e,r&&(0,B.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,B.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,B.jsxs)(`div`,{className:`px-4 py-2.5 border-b border-sand flex items-center gap-2 min-w-0`,children:[(0,B.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,B.jsxs)(`span`,{className:`ml-auto flex items-center gap-1.5 shrink-0`,children:[(0,B.jsx)(K,{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,B.jsx)(K,{size:`sm`,onClick:()=>i(null),children:`Close (Esc)`})]})]}),(0,B.jsxs)(`div`,{className:`overflow-auto px-6 py-4`,children:[o.loading&&(0,B.jsx)(`div`,{className:`text-[13px] text-umber`,children:`loading…`}),o.error&&(0,B.jsxs)(`div`,{className:`text-[13px] text-brick`,children:[`Could not load — not in `,r.project,`’s docs/? `,o.error]}),o.data&&(0,B.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,B.jsx)(`circle`,{cx:n,cy:n,r});case`square`:return(0,B.jsx)(`rect`,{x:1.5,y:1.5,width:t-3,height:t-3,rx:2});case`diamond`:return(0,B.jsx)(`polygon`,{points:i(4)});case`hexagon`:return(0,B.jsx)(`polygon`,{points:i(6,0)});case`triangle`:return(0,B.jsx)(`polygon`,{points:i(3)});case`pentagon`:return(0,B.jsx)(`polygon`,{points:i(5)});case`shield`:return(0,B.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,B.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,B.jsxs)(`span`,{className:`relative inline-flex shrink-0 ${a}`,style:{width:n,height:n},title:`${e}${t?` · ${t}`:``}`,children:[(0,B.jsxs)(`svg`,{width:n,height:n,viewBox:`0 0 ${n} ${n}`,style:{opacity:c},"aria-hidden":!0,children:[(0,B.jsx)(`g`,{fill:o,stroke:o,strokeWidth:`1`,children:Iu(s,n)}),(0,B.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,B.jsx)(`span`,{className:`absolute -right-0.5 -bottom-0.5 w-2 h-2 rounded-full bg-moss ring-2 ring-paper`,children:(0,B.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,B.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,B.jsx)(`b`,{children:i[2].slice(2,-2)},a++)):i[3]?n.push((0,B.jsx)(`s`,{className:`text-tan`,children:i[3].slice(2,-2)},a++)):i[4]?n.push((0,B.jsx)(V,{to:`/docs/${encodeURIComponent(i[5])}`,onClick:e=>e.stopPropagation(),className:`text-ember-deep`,children:i[6]??i[5]},a++)):i[7]?n.push((0,B.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,B.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,B.jsx)(`i`,{children:i[12]},a++)):i[13]&&n.push((0,B.jsx)(`i`,{children:i[14]},a++)),r=i.index+i[0].length;return r<e.length&&n.push(e.slice(r)),t?(0,B.jsx)(`span`,{className:t,children:n}):(0,B.jsx)(B.Fragment,{children:n})}var Gu=({text:e})=>(0,B.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,B.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,B.jsx)(ld,{id:r,bare:!0,size:n}):(0,B.jsxs)(`span`,{className:`inline-flex items-center gap-1 font-mono text-[11px] text-umber`,children:[(0,B.jsx)(Lu,{id:e.owner,size:14,state:`dead`}),e.owner]}),(0,B.jsx)(G,{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}=q(`/projects/${e}/phases/${t.id}/tasks`,15e3),s=q(`/projects/${e}/board`,15e3).data,c=q(`/bus/agents`,2e4).data??[],l=zu(s),[u,d]=(0,P.useState)({}),f=q(`/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 Ia(`/actions/task/${e}/${t.id}/${n}`,{owner:r??void 0});if(i.status!==`ok`)throw Error(i.error??i.log?.slice(-1)[0]??`failed`);m(e=>({...e,[n]:{to:i.owner??r??`aide`,ts:Date.now()}}))}catch(e){m(t=>({...t,[n]:{err:e.message}}))}};return o?(0,B.jsx)(`div`,{className:`px-3 py-2 text-[13px] text-brick`,children:o}):a?a.sections.length===0?(0,B.jsxs)(`div`,{className:`px-3 py-3 text-[13px] text-umber`,children:[`No tasks yet — run `,(0,B.jsx)(`code`,{children:`/plan-phase`}),` (roadmap → Plan).`]}):(0,B.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,B.jsxs)(`div`,{className:`border-b border-sand last:border-b-0 min-w-0 ${m?`bg-ember/[.04]`:``}`,children:[(0,B.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,B.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[(0,B.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,B.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full bg-ember shrink-0`,title:`this agent's task`}),(0,B.jsx)(V,{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,B.jsxs)(`span`,{className:`font-mono text-[11px] shrink-0 ${o?`text-leaf`:`text-tan`}`,children:[r,`/`,e.tasks.length,o?` ✓`:``]}),!i&&(0,B.jsxs)(`span`,{className:`ml-auto flex items-center gap-2`,children:[(0,B.jsx)(Ku,{stream:s,agents:c}),(0,B.jsx)(`span`,{className:`h-1 w-24 rounded-full bg-linen overflow-hidden`,children:(0,B.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,B.jsx)(`div`,{className:`flex items-center gap-2 min-w-0 pl-5`,children:(0,B.jsx)(Ku,{stream:s,agents:c})})]}),!g&&e.tasks.map(e=>(0,B.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,B.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,B.jsxs)(V,{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,B.jsx)(Gu,{text:e.text}),p[e.line]&&`err`in p[e.line]&&(0,B.jsx)(`span`,{className:`ml-2 font-mono text-[10px] text-brick`,children:p[e.line].err})]}),(0,B.jsx)(`span`,{className:`pr-2 pt-1 shrink-0`,children:!e.done&&(p[e.line]&&!(`err`in p[e.line])?(0,B.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,B.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,B.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}=q(`/projects/${e}/phases/${t.id}/tasks`,15e3),i=r?.total?Math.round(r.done/r.total*100):0;return(0,B.jsxs)(`div`,{className:`mt-3 border border-sand rounded-kit bg-paper`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2 border-b border-sand`,children:[(0,B.jsx)(`b`,{className:`text-[13px]`,children:t.title}),(0,B.jsx)(G,{tone:r?.total&&r.done===r.total?`ok`:`neutral`,children:r?`${r.done}/${r.total} · ${i}%`:`…`}),(0,B.jsx)(`span`,{className:`font-mono text-[11px] text-ink3`,children:r?.file??`no tasks file`}),(0,B.jsxs)(`span`,{className:`ml-auto flex gap-1.5`,children:[r?.file&&(0,B.jsx)(V,{to:`/docs/${encodeURIComponent(r.file)}`,className:`hover:no-underline`,children:(0,B.jsx)(K,{size:`sm`,tone:`ghost`,children:`Open doc`})}),(0,B.jsx)(K,{size:`sm`,tone:`ghost`,onClick:n,children:`✕`})]})]}),(0,B.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,B.jsxs)(`div`,{className:`flex items-center gap-1.5 flex-wrap`,children:[e.items.map(t=>(0,B.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,B.jsx)(`img`,{src:Zu(t.name),alt:t.name,className:`h-10 w-auto max-w-[120px] rounded object-cover`}),(0,B.jsxs)(`span`,{className:`font-mono text-[10px] text-ink3 pr-1`,children:[Math.round(t.bytes/1024),` KB`]}),(0,B.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,B.jsx)(`span`,{className:`font-mono text-[11px] text-ink3`,children:`uploading…`}),e.err&&(0,B.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,B.jsx)(`div`,{className:`md md-bubble whitespace-normal min-w-0`,dangerouslySetInnerHTML:{__html:yu(e)}}):(0,B.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,B.jsx)(td,{text:e.slice(n,r.index)},`t${i++}`));let[,a,o]=r;t.push((0,B.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,B.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,B.jsx)(td,{text:e.slice(n)},`t${i++}`)),(0,B.jsx)(B.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:_}=Ha(),v=q(`/admin/bus-writes`,1e4).data?.enabled??!1,y=(q(`/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 Ia(`/actions/send`,{as:`david`,to:e,text:T.withRefs(x)});w(t.status===`ok`?`sent — lands in the pane via tmux-push`:t.error??t.log?.slice(-1)[0]??`failed`),t.status===`ok`&&(S(``),T.clear())}catch(e){w(e.message)}}},D=(0,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,B.jsx)(`div`,{className:`fixed inset-0 z-[60] bg-walnut/30 flex justify-end`,onMouseDown:e=>{e.target===e.currentTarget&&t()},children:(0,B.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,B.jsxs)(`div`,{className:`px-4 py-2.5 border-b border-sand flex items-center gap-2`,children:[(0,B.jsx)(Lu,{id:e,role:y?.role,size:22,state:y?.liveness,active:y?.active}),(0,B.jsx)(`span`,{className:`font-display font-bold text-[16px] text-umber`,children:e}),y?.role&&(0,B.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.06em]`,style:{color:dd(y.role)},children:y.role}),r&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(`span`,{className:`font-mono text-[12px] text-ink3`,children:[r.pane,` · `,r.command]}),r.active?(0,B.jsx)(G,{tone:`ok`,children:`active`}):(0,B.jsx)(G,{tone:`outline`,children:`quiet`}),(0,B.jsxs)(`span`,{className:`font-mono text-[11px] text-tan`,children:[r.lines,` lines · `,new Date(r.capturedAt).toLocaleTimeString()]})]}),(0,B.jsxs)(`span`,{className:`ml-auto flex items-center gap-1.5`,children:[(0,B.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,B.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,B.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,B.jsxs)(`option`,{value:e,children:[e,` lines`]},e))}),(0,B.jsx)(K,{size:`sm`,onClick:t,children:`Close (Esc)`})]})]}),(0,B.jsxs)(`div`,{className:`min-h-0 grid ${p?`grid-cols-[minmax(0,1fr)_minmax(300px,380px)]`:`grid-cols-1`}`,children:[(0,B.jsxs)(`div`,{className:`min-h-0 grid grid-rows-[minmax(0,1fr)_auto]`,children:[(0,B.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,B.jsx)(`span`,{className:`text-brick`,children:a}):r?n(d&&r.ansi?mo(r.ansi):r.text):`capturing…`}),(0,B.jsxs)(`div`,{className:`px-4 py-2 border-t border-sand grid gap-1.5`,children:[(0,B.jsxs)(`div`,{className:`grid grid-cols-[1fr_auto] gap-2 items-center`,children:[(0,B.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,B.jsx)(K,{size:`sm`,tone:`primary`,onClick:E,disabled:!v||!T.hasContent(x)||T.busy||C===`sending`,children:`Send DM`})]}),(0,B.jsx)($u,{a:T}),(0,B.jsxs)(`div`,{className:`font-mono text-[11px] text-tan`,children:[`read-only `,(0,B.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,B.jsxs)(`span`,{className:/^sent/.test(C)?` text-leaf`:` text-brick`,children:[` · `,C]}):null]})]})]}),p&&(0,B.jsx)(ad,{project:b,agentId:e})]})]})})}function ad({project:e,agentId:t}){let n=q(e?`/projects/${e}/board`:null,15e3).data,r=q(`/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,B.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,B.jsxs)(`div`,{className:`px-3 py-2 border-b border-sand flex items-center gap-2 flex-wrap`,children:[(0,B.jsx)(`span`,{className:`font-mono text-[10px] uppercase tracking-[.1em] text-tan`,children:`now`}),i?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(V,{to:`/board`,className:`font-semibold text-[13px] text-walnut hover:text-ember-deep hover:no-underline`,children:i.title}),(0,B.jsx)(G,{tone:i.state===`ongoing`?`david`:`neutral`,children:i.state}),(0,B.jsxs)(`span`,{className:`font-mono text-[11px] text-ink3`,children:[i.done,`/`,i.total]})]}):(0,B.jsx)(`span`,{className:`text-[13px] text-umber`,children:e?`no phase in flight`:`no project selected`})]}),(0,B.jsxs)(`div`,{className:`px-3 py-2 border-b border-sand grid gap-1`,children:[(0,B.jsxs)(`span`,{className:`font-mono text-[10px] uppercase tracking-[.1em] text-tan`,children:[t,` is on`]}),a.length===0&&(0,B.jsx)(`span`,{className:`text-[12px] text-umber`,children:`no active stream owned by this agent`}),a.map(e=>(0,B.jsxs)(`div`,{className:`flex items-center gap-2 text-[12px]`,children:[(0,B.jsx)(`span`,{className:`font-mono text-umber truncate`,title:e.note,children:e.name}),(0,B.jsx)(`span`,{className:`ml-auto`,children:(0,B.jsx)(Ku,{stream:e,agents:r})})]},e.name))]}),i&&e?(0,B.jsx)(qu,{project:e,phase:i,highlight:t,maxH:`100%`,compact:!0}):(0,B.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,B.jsxs)(B.Fragment,{children:[(0,B.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,B.jsxs)(`div`,{className:`flex items-center gap-1.5 px-2 py-[3px] bg-linen border-b border-sand`,children:[(0,B.jsx)(`span`,{className:`relative inline-block w-1.5 h-1.5 rounded-full ${i?.active?`bg-moss`:`bg-dust`}`,children:i?.active&&(0,B.jsx)(`span`,{className:`absolute inset-0 rounded-full bg-moss animate-ping opacity-60`})}),(0,B.jsx)(`span`,{className:`font-mono text-[10px] text-ink3 truncate`,children:r??e}),(0,B.jsx)(`span`,{className:`ml-auto font-mono text-[10px] text-tan`,children:i?i.active?`active`:`quiet ${sd(i.paneActivity)}`:`…`})]}),(0,B.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,B.jsx)(`span`,{className:`text-brick`,children:o}):i?i.ansi?mo(u(i.ansi)):u(i.text):`capturing…`})]}),c&&(0,B.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=(q(`/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,B.jsxs)(`span`,{className:`relative inline-flex ${r}`,onMouseEnter:f,onMouseLeave:p,children:[(0,B.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,B.jsx)(`span`,{className:`text-tan`,children:t}),!a&&(0,B.jsx)(Lu,{id:e,role:o?.role,size:n===`sm`?14:18,state:o?.liveness??`dead`,active:o?.active}),(0,B.jsx)(`span`,{className:`truncate max-w-[220px]`,children:e}),o&&!o.transport&&o.liveness!==`dead`&&(0,B.jsx)(`span`,{className:`text-amber`,title:`not attached — DMs won't reach its pane`,children:`⚠`})]}),s&&m&&(0,B.jsx)(`span`,{className:`absolute left-0 top-[calc(100%+6px)] z-50 w-[420px] whitespace-normal text-left`,onMouseEnter:f,onMouseLeave:p,children:(0,B.jsx)(cd,{agentId:e,lines:6,label:`${e} · ${o.role??``}`,className:`shadow-panel bg-paper`})}),l&&(0,B.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}=Ha(),n=q(`/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,B.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,B.jsxs)(`span`,{className:`font-mono text-[10px] uppercase tracking-[.1em] text-tan shrink-0`,children:[`online · `,t||`—`]}),s.length===0&&(0,B.jsx)(`span`,{className:`font-mono text-[12px] text-tan`,children:`no agents for this project`}),s.map(e=>(0,B.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,B.jsx)(Lu,{id:e.agentId,role:e.role,size:16,state:e.liveness,active:e.active}),(0,B.jsx)(ld,{id:e.agentId,bare:!0,noDot:!0,size:`sm`}),(0,B.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,B.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,B.jsx)(Lu,{id:e.agentId,role:e.role,size:16,state:e.liveness,active:e.active}),(0,B.jsx)(ld,{id:e.agentId,bare:!0,noDot:!0,size:`sm`}),(0,B.jsx)(`span`,{className:`font-mono text-[10px] text-tan`,children:e.project})]},e.agentId)),a.length>0&&(0,B.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,B.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,B.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[(0,B.jsx)(`span`,{className:`inline-block w-1.5 h-1.5 rounded-full`,style:{background:t}}),e]},e))})]})}function md(e){let[t,n]=(0,P.useState)(!1),r=(0,P.useRef)(e);return(0,P.useEffect)(()=>{let e=()=>{let e=document.getSelection();n(!!e&&!e.isCollapsed)};return document.addEventListener(`selectionchange`,e),()=>document.removeEventListener(`selectionchange`,e)},[]),t||(r.current=e),r.current}var hd={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`},gd=e=>e.map(e=>e.replace(/^\//,``)).map(e=>({name:e,description:hd[e]??`typed raw into the agent's CLI via send_command`,source:`built-in`}));function _d(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 vd(e){let t=q(e?`/projects/${e}/skills`:null,6e4).data,n=za();return(0,P.useMemo)(()=>[...gd(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 $({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,B.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,B.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,B.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,B.jsxs)(`span`,{className:`font-mono text-[12px] font-semibold text-walnut`,children:[`/`,e.name]}),(0,B.jsx)(`span`,{className:`text-[12px] text-umber truncate`,title:e.description,children:e.description}),(0,B.jsx)(G,{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,B.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 yd=(e,t)=>window.dispatchEvent(new CustomEvent(`groundwork-console:summon`,{detail:{agentId:e,answers:t?.answers}})),bd=e=>`groundwork-console.summon.${e}`,xd=e=>`groundwork-console.summon.seen.${e}`;function Sd(e){let t=rr(),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 Cd(){let{current:e}=Ha(),t=q(`/bus/agents`,2e4).data??[],n=q(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(bd(e)):null);(0,P.useEffect)(()=>{a(e?localStorage.getItem(bd(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(bd(e),t),d(!1),l(!0)},p=md(q(o?`/bus/dm/${encodeURIComponent(o)}?limit=80`:null,c?4e3:2e4).data),m=q(`/bus/inbox?limit=100`,2e4).data?.decisions??{},[h,g]=(0,P.useState)(0);(0,P.useEffect)(()=>{o&&g(Number(localStorage.getItem(xd(o))??0))},[o]),(0,P.useEffect)(()=>{c&&o&&p&&(localStorage.setItem(xd(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,B.jsxs)(B.Fragment,{children:[c&&(0,B.jsx)(Dd,{agentId:o,me:s,project:e,thread:p??void 0,answers:v,onAnswered:()=>y([]),onClose:()=>l(!1),onSwitch:()=>{d(!0)}}),(0,B.jsxs)(`div`,{className:`fixed right-5 bottom-5 z-[55]`,style:{width:52,height:52},children:[u&&(0,B.jsxs)(`div`,{className:`absolute inset-0`,"aria-label":`pick an agent`,children:[T.map((e,t)=>{let n=O(t);return(0,B.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,B.jsx)(Lu,{id:e.agentId,role:e.role,size:26,state:e.liveness,active:e.active}),m[e.agentId]?(0,B.jsx)(wd,{n:m[e.agentId],small:!0}):null]},e.agentId)}),T.length===0&&(0,B.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,B.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,B.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,B.jsxs)(`div`,{className:`max-h-[220px] overflow-auto overscroll-contain grid`,children:[E.slice(0,40).map((e,t)=>(0,B.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,B.jsx)(Lu,{id:e.agentId,role:e.role,size:16,state:e.liveness,active:e.active}),(0,B.jsxs)(`span`,{className:`min-w-0 truncate font-mono text-[12px] text-walnut`,children:[e.agentId,(0,B.jsxs)(`span`,{className:`text-tan`,children:[` · `,fd(e.role),e.project?` · ${e.project}`:``]})]}),m[e.agentId]?(0,B.jsxs)(`span`,{className:`font-mono text-[10px] text-ember`,children:[`★`,m[e.agentId]]}):null]},e.agentId)),E.length===0&&(0,B.jsx)(`span`,{className:`px-1.5 py-1 font-mono text-[11px] text-tan`,children:`no match`})]}),(0,B.jsxs)(`span`,{className:`font-mono text-[10px] text-tan px-1`,children:[`ring = aide + `,5,` most recent · Enter picks the first match`]})]})]}),(0,B.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,B.jsx)(Lu,{id:o,role:s?.role,size:40,state:s?.liveness??`dead`,active:s?.active}),m[o]?(0,B.jsx)(wd,{n:m[o]}):_&&(0,B.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,B.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,B.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 wd({n:e,small:t=!1}){return(0,B.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 Td=e=>{let t=Math.round(e/1e3);return t<60?`${t} s`:t<3600?`${Math.floor(t/60)} min`:`${Math.floor(t/3600)} h`},Ed=(0,P.memo)(function({m:e,mine:t,maxed:n}){let r=String(e.text??``),i=e.prefix?r.replace(RegExp(`^${e.prefix}:?\\s*`),``):r;return(0,B.jsxs)(`div`,{className:`${e.pending?`opacity-70`:``} ${n?`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 ${t?`justify-self-end bg-paper border-sand`:`justify-self-start bg-linen/70 border-sand/70`}`,children:[e.prefix&&(0,B.jsx)(Oa,{prefix:e.prefix}),(0,B.jsx)(nd,{text:i}),(0,B.jsx)(`div`,{className:`font-mono text-[10px] mt-0.5 ${t?`text-right`:``} ${e.failed?`text-brick`:`text-tan`}`,children:e.failed?`not sent · ${e.failed}`:e.pending?`sending…`:e.ts?new Date(e.ts).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`}):``})]})},(e,t)=>e.m===t.m&&e.mine===t.mine&&e.maxed===t.maxed);function Dd({agentId:e,me:t,project:n,thread:r,answers:i=[],onAnswered:a,onClose:o,onSwitch:s}){let c=q(`/admin/bus-writes`,1e4).data?.enabled??!1,l=Sd(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=vd(n),T=new Set(za()),E=(0,P.useRef)(null),[D,O]=(0,P.useState)(0),[k,A]=(0,P.useState)(!0),j=k?_d(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=_d(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=e=>ie.current.get(`${e.text??``}`)??null,ie=(0,P.useRef)(new Map),R=te.filter(e=>!re.some(t=>t.from===`david`&&Number(t.ts??0)>=Number(e.ts??0)-2e3&&(t.text??``)===(e.text??``))),z=[...re,...R],ae=new Set,oe=(e,t)=>{let n=e.pending?String(e.id):(e.from===`david`?L(e):null)??e.id??`${e.ts??`t`}-${t}`;return ae.has(n)&&(n=e.id??`${n}-${t}`),ae.add(n),n},[se,ce]=(0,P.useState)(0);(0,P.useEffect)(()=>{let e=setInterval(()=>ce(e=>e+1),1e3);return()=>clearInterval(e)},[]);let le=(q(`/bus/agents`,4e3).data??[]).find(t=>t.agentId===e)??t,ue=le?.paneActivity?Date.now()-le.paneActivity:1/0,de=ue<2e4,fe=([...z].reverse().find(e=>e.from===`david`)?.ts??0)>([...z].reverse().find(e=>e.from!==`david`)?.ts??0),[pe,me]=(0,P.useState)(!0),he=()=>{let e=I.current;if(!e)return;let t=e.scrollHeight-e.scrollTop-e.clientHeight<32;t!==pe&&me(t)};(0,P.useEffect)(()=>{pe&&I.current&&(I.current.scrollTop=I.current.scrollHeight)},[z.length,pe]);let ge=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};ie.current.set(String(c.text??``),String(c.id)),ie.current.size>50&&ie.current.delete(ie.current.keys().next().value),ne(e=>[...e,c]),_(``),C.clear();try{let n=await Ia(`/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))}},_e=(0,P.useMemo)(()=>z,[z]);return(0,B.jsxs)(B.Fragment,{children:[v&&(0,B.jsx)(id,{agentId:e,onClose:()=>y(!1)}),(0,B.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,B.jsxs)(`div`,{className:`px-3 py-2 border-b border-sand flex items-center gap-2 min-w-0`,children:[(0,B.jsx)(Lu,{id:e,role:t?.role,size:22,state:t?.liveness??`dead`,active:t?.active}),(0,B.jsx)(`span`,{className:`font-display font-bold text-[14px] text-umber truncate`,children:e}),(0,B.jsx)(`span`,{className:`font-mono text-[10px] uppercase tracking-[.06em]`,style:{color:dd(t?.role)},children:fd(t?.role)}),t?(0,B.jsx)(G,{tone:t.liveness===`live`?`ok`:t.liveness===`idle`?`warn`:`bad`,children:t.active?`active`:t.liveness}):(0,B.jsx)(G,{tone:`bad`,children:`offline`}),(0,B.jsxs)(`span`,{className:`ml-auto flex items-center gap-1`,children:[t?.pane&&(0,B.jsx)(K,{size:`sm`,tone:`ghost`,onClick:()=>y(!0),title:`open its pane`,children:`pane`}),(0,B.jsx)(K,{size:`sm`,tone:`ghost`,onClick:s,title:`summon another agent`,children:`switch`}),(0,B.jsx)(K,{size:`sm`,tone:`ghost`,onClick:S,title:b?`restore`:`maximize`,children:b?`⇲`:`⇱`}),(0,B.jsx)(K,{size:`sm`,tone:`ghost`,onClick:o,children:`✕`})]})]}),(0,B.jsxs)(`div`,{ref:I,onScroll:he,className:`min-h-0 overflow-auto overscroll-contain px-3 py-2 grid gap-1.5 content-start bg-cream/40`,children:[!r&&(0,B.jsx)(`span`,{className:`font-mono text-[11px] text-tan`,children:`loading thread…`}),r&&_e.length===0&&(0,B.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.`]}),_e.map((e,t)=>(0,B.jsx)(Ed,{m:e,mine:e.from===`david`,maxed:b},oe(e,t))),(de||fe)&&(0,B.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:le?.paneActivity?`last pane output ${Math.round(ue/1e3)} s ago`:`no pane activity`,children:de?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(`span`,{className:`summon-dots`,"aria-hidden":!0,children:[(0,B.jsx)(`i`,{}),(0,B.jsx)(`i`,{}),(0,B.jsx)(`i`,{})]}),(0,B.jsxs)(`span`,{children:[e.split(`-`)[0],` is working`]})]}):(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full bg-tan`}),(0,B.jsxs)(`span`,{children:[`delivered · quiet for `,ue===1/0?`a while`:Td(ue)]})]})})]}),(0,B.jsxs)(`div`,{className:`px-3 py-2 border-t border-sand grid gap-1.5`,children:[(0,B.jsxs)(`label`,{className:`flex items-center gap-1.5 font-mono text-[11px] text-ink3 min-w-0`,children:[(0,B.jsx)(`input`,{type:`checkbox`,checked:u,onChange:e=>d(e.target.checked)}),(0,B.jsx)(`span`,{className:`shrink-0`,children:`context:`}),(0,B.jsx)(`span`,{className:`truncate text-umber`,title:l.cite,children:l.label})]}),(0,B.jsxs)(`div`,{className:`relative grid grid-cols-[1fr_auto] gap-1.5 items-center`,children:[(0,B.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(),ge())},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,B.jsx)(K,{size:`sm`,tone:`primary`,onClick:ge,disabled:!c||!C.hasContent(p)||C.busy||h===`sending`,children:h===`sending`?`…`:`Send`}),j&&c&&(0,B.jsx)($,{skills:w,query:j.query,onPick:F,onClose:()=>A(!1),bind:N})]}),(0,B.jsx)($u,{a:C}),T.has(p.trim())?(0,B.jsxs)(`div`,{className:`font-mono text-[11px] text-ink3`,children:[(0,B.jsx)(`span`,{className:`text-umber`,children:p.trim()}),` is sent `,(0,B.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,B.jsxs)(`div`,{className:`font-mono text-[11px] text-ink3`,children:[`sends as `,(0,B.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,B.jsx)(`div`,{className:`font-mono text-[11px] ${/delivery confirmed/.test(h)?`text-leaf`:`text-brick`}`,children:h})]})]})]})}var Od={h:`/`,b:`/board`,m:`/monitor`,u:`/bus`,d:`/docs`,g:`/git`,o:`/ops`},kd=e=>{let t=e;return!!t&&(t.tagName===`INPUT`||t.tagName===`TEXTAREA`||t.tagName===`SELECT`||t.isContentEditable)};function Ad(){let e=ar(),[t,n]=(0,P.useState)(!1);return(0,P.useEffect)(()=>{let t=0,r=r=>{if(!(r.metaKey||r.ctrlKey||r.altKey||kd(r.target))){if(r.key===`Escape`){n(!1);return}if(r.key===`?`){n(e=>!e);return}if(r.key===`/`){r.preventDefault(),yd(``);return}if(r.key===`g`&&!(Date.now()-t<900)){t=Date.now();return}Date.now()-t<900&&Od[r.key]&&(r.preventDefault(),e(Od[r.key]),t=0)}};return window.addEventListener(`keydown`,r),()=>window.removeEventListener(`keydown`,r)},[e]),t?(0,B.jsx)(`div`,{className:`fixed inset-0 z-[70] bg-walnut/30 flex items-center justify-center`,onMouseDown:()=>n(!1),children:(0,B.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,B.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,B.jsxs)(`div`,{className:`grid grid-cols-[64px_1fr] gap-3 items-baseline text-[13px]`,children:[(0,B.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,B.jsx)(`span`,{className:`text-umber`,children:t})]},e)),(0,B.jsx)(`div`,{className:`font-mono text-[11px] text-tan mt-1`,children:`In the Summon drawer: Enter sends · ⇧Enter newline · paste images.`})]})}):null}var jd=`/api`;function Md({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(`${jd}/auth/status`)).json();n(e.authed?`in`:`out`)}catch{n(`offline`)}};(0,P.useEffect)(()=>{l()},[]),(0,P.useEffect)(()=>{t!==`in`&&fetch(`${jd}/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(`${jd}/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,B.jsx)(B.Fragment,{children:e}):t===`checking`?(0,B.jsx)(`div`,{className:`min-h-screen grid place-items-center font-mono text-[12px] text-tan`,children:`checking session…`}):(0,B.jsx)(`div`,{className:`min-h-screen grid place-items-center bg-cream p-6`,children:(0,B.jsxs)(`div`,{className:`w-[380px] bg-paper border border-sand rounded-kit shadow-panel`,children:[(0,B.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,B.jsx)(Pa,{}),` Groundwork Console`]}),(0,B.jsx)(`div`,{className:`p-5 grid gap-3 text-[13px]`,children:t===`offline`?(0,B.jsxs)(`div`,{className:`text-brick`,children:[`API unreachable — start it with `,(0,B.jsx)(`code`,{children:`pnpm dev:api`}),`, then `,(0,B.jsx)(`button`,{className:`underline border-0 bg-transparent p-0 cursor-pointer text-ember-deep`,onClick:l,children:`retry`}),`.`]}):(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(`div`,{className:`text-umber`,children:[`This console can write to your bus and docs. Enter the console token — it's in `,(0,B.jsx)(`code`,{className:`font-mono text-[12px]`,children:`~/.groundwork-console/token`}),` on the machine running the API (or `,(0,B.jsx)(`code`,{className:`font-mono text-[12px]`,children:`GROUNDWORK_CONSOLE_TOKEN`}),`).`]}),(0,B.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,B.jsx)(`div`,{className:`text-brick`,children:a}),(0,B.jsx)(K,{tone:`primary`,onClick:u,disabled:!r||s,children:s?`Signing in…`:`Sign in`}),(0,B.jsx)(`div`,{className:`font-mono text-[11px] text-tan`,children:`Cookie lasts 30 days on this browser. Single shared token — no accounts.`})]})})]})})}var Nd=[{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 Pd(){let{error:e}=Ha(),{running:t}=Ga(),n=q(`/bus/unread`,3e4).data?.inbox??0,r=q(`/kit`).data,i=q(`/health`,6e4).data,a=i?.hostname,o=!!i?.version&&i.version!==`0.1.9`,s=rr();(0,P.useEffect)(()=>{let e=s.pathname===`/`?``:s.pathname.split(`/`)[1],t=Nd.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,B.jsx)(Md,{children:(0,B.jsx)(Mu,{children:(0,B.jsxs)(`div`,{className:`grid grid-rows-[48px_auto_1fr] min-h-screen`,children:[(0,B.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,B.jsxs)(`div`,{className:`flex items-center gap-2 font-display font-bold text-[16px] text-ember whitespace-nowrap`,title:c,children:[(0,B.jsx)(Pa,{}),` Groundwork Console`]}),(0,B.jsx)(`nav`,{className:`flex gap-0.5 whitespace-nowrap`,children:Nd.map(e=>(0,B.jsxs)(ji,{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,B.jsx)(`span`,{className:`text-tan`,children:wa[e.icon]({size:16})}),(0,B.jsx)(`span`,{className:`hidden xl:inline`,children:e.label}),e.to===`/ops`&&t>0?(0,B.jsxs)(`span`,{className:`ml-1.5 inline-flex items-center gap-1 text-amber`,children:[(0,B.jsx)(Na,{size:12}),(0,B.jsx)(G,{tone:`warn`,children:t})]}):null,e.to===`/bus`&&n>0?(0,B.jsx)(`span`,{className:`ml-1.5 inline-flex`,title:`${n} unread DM(s) to david`,children:(0,B.jsx)(G,{tone:`david`,children:n})}):null,e.badge?(0,B.jsx)(`span`,{className:`ml-1.5 inline-flex`,children:(0,B.jsx)(G,{tone:`david`,children:e.badge})}):null]},e.to))}),(0,B.jsxs)(`div`,{className:`flex gap-0.5 items-center justify-end min-w-0 whitespace-nowrap`,children:[e&&(0,B.jsx)(`span`,{className:`font-mono text-[12px] text-brick mr-2`,title:e,children:`api offline`}),(0,B.jsx)(Ja,{}),(0,B.jsx)(Qa,{}),(0,B.jsx)(Za,{}),o&&(0,B.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.9, the API is ${i?.version} — reload to get the new UI`,children:[`new version `,i?.version,` — reload`]}),(0,B.jsx)(so,{}),(0,B.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,B.jsx)(pd,{}),(0,B.jsx)(Rr,{}),(0,B.jsx)(co,{}),(0,B.jsx)(Cd,{}),(0,B.jsx)(Ad,{})]})})})}function Fd(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 Id(e,t=Date.now()){let n=(t-e)/864e5;return n<1?`text-tan`:n<7?`text-amber`:`text-brick font-semibold`}var Ld=e=>new Date(e).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`,second:`2-digit`}),Rd=e=>!!e&&Ea.includes(e),zd={"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 Bd(){let{data:e,refresh:t}=q(`/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 Ia(`/events/config`,{rule:e,enabled:n}),t()}finally{s(!1)}},l=async e=>{s(!0);try{await Ia(`/events/config`,{dryRun:e,confirm:e?void 0:i}),t(),r(!1),a(``)}finally{s(!1)}},[u,d]=(0,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,B.jsxs)(U,{children:[(0,B.jsxs)(W,{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,B.jsx)(G,{tone:`bad`,children:`LIVE — sending`}):p.dryRun?(0,B.jsx)(G,{tone:`outline`,children:`dry-run`}):(0,B.jsx)(G,{tone:`warn`,children:`armed · bus writes off`})),p&&(p.dryRun?(0,B.jsx)(K,{size:`sm`,onClick:()=>r(!0),disabled:o,children:`Go live…`}):(0,B.jsx)(K,{size:`sm`,onClick:()=>l(!0),disabled:o,children:`Back to dry-run`}))]}),p&&(0,B.jsxs)(`div`,{className:`px-3 py-2 border-b border-sand grid gap-1`,children:[p.rules.map(e=>(0,B.jsxs)(`label`,{className:`grid grid-cols-[auto_1fr] gap-2 items-baseline font-mono text-[12px] text-ink3 cursor-pointer`,children:[(0,B.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,B.jsxs)(`span`,{children:[(0,B.jsx)(`span`,{className:`text-walnut`,children:e.on}),` → `,e.action.type===`none`?(0,B.jsx)(`span`,{className:`text-tan`,children:e.action.note}):(0,B.jsxs)(B.Fragment,{children:[e.action.to?e.action.to:`#${e.action.room}`,` · `,Rd(e.action.prefix)&&(0,B.jsx)(Oa,{prefix:e.action.prefix}),(0,B.jsx)(`span`,{className:`text-umber`,children:e.action.text})]})]})]},e.id)),(0,B.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,B.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,B.jsxs)(`div`,{className:`w-[520px] bg-paper border border-brick rounded-kit shadow-panel`,children:[(0,B.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,B.jsxs)(`div`,{className:`p-4 grid gap-3 text-[13px] text-umber`,children:[(0,B.jsxs)(`div`,{children:[`Enabled rules will really `,(0,B.jsx)(`code`,{children:`send_message`}),` as `,(0,B.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,B.jsx)(`code`,{children:`groundwork-console.rules.json`}),`.`]}),(0,B.jsxs)(`label`,{className:`grid gap-1`,children:[(0,B.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Type LIVE to confirm`}),(0,B.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,B.jsxs)(`div`,{className:`px-4 py-3 border-t border-sand flex justify-end gap-2`,children:[(0,B.jsx)(K,{size:`sm`,onClick:()=>r(!1),children:`Cancel`}),(0,B.jsx)(K,{size:`sm`,tone:`primary`,onClick:()=>l(!1),disabled:i!==`LIVE`||o,children:`Go live`})]})]})}),f.length===0&&(0,B.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,B.jsxs)(`div`,{className:`grid grid-cols-[var(--spacing-gutter)_1fr] border-b border-sand last:border-b-0`,children:[(0,B.jsx)(`div`,{className:`py-2.5 flex justify-center font-mono text-[12px] text-tan border-r border-sand`,children:`⚡`}),(0,B.jsxs)(`div`,{className:`px-3 pt-2 pb-2.5 min-w-0`,children:[(0,B.jsxs)(`div`,{className:`flex gap-2 items-baseline mb-0.5 flex-wrap`,children:[(0,B.jsx)(G,{tone:zd[e.type]??`neutral`,children:e.type}),e.data.baseline?(0,B.jsx)(`span`,{className:`font-mono text-[11px] text-tan`,children:`baseline · no action`}):null,(0,B.jsx)(`span`,{className:`font-mono text-[12px] text-umber`,children:e.project}),(0,B.jsx)(`span`,{className:`font-mono text-[12px] text-ink3`,children:Ld(e.ts)})]}),(0,B.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,B.jsxs)(`div`,{className:`mt-1 text-[13px] pl-2 border-l-2 ${e.sent?`border-leaf`:e.skipped?`border-amber`:`border-dust`}`,children:[(0,B.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`}),Rd(e.prefix)&&(0,B.jsx)(Oa,{prefix:e.prefix}),(0,B.jsx)(`span`,{className:`text-walnut`,children:e.text}),` `,(0,B.jsxs)(`span`,{className:`font-mono text-[12px] text-ink3`,children:[`→ `,e.to??`#${e.room}`]}),e.runId&&(0,B.jsx)(`span`,{className:`ml-2 font-mono text-[11px] text-tan`,children:e.runId})]},e.ruleId))]})]},e.id))]})}function Vd(){let{data:e}=q(`/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,B.jsxs)(`div`,{className:`flex items-center gap-2 font-mono text-[11px] text-ink3 px-1`,children:[(0,B.jsx)(`span`,{className:`uppercase tracking-[.1em] text-tan`,children:`events`}),t.live?(0,B.jsx)(G,{tone:`bad`,children:`live`}):t.dryRun?(0,B.jsx)(G,{tone:`outline`,children:`dry-run`}):(0,B.jsx)(G,{tone:`warn`,children:`armed · bus writes off`}),(0,B.jsxs)(`span`,{children:[n,`/`,t.rules.length,` rules on · `,i,` sent in 24 h`]}),(0,B.jsx)(V,{to:`/ops/events`,className:`ml-auto text-ember-deep`,children:`Ops → Events`})]})}var Hd={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 Ud({pct:e,cls:t,size:n=44}){let r=(n-6)/2,i=2*Math.PI*r;return(0,B.jsxs)(`svg`,{width:n,height:n,viewBox:`0 0 ${n} ${n}`,className:t,"aria-hidden":!0,children:[(0,B.jsx)(`circle`,{cx:n/2,cy:n/2,r,fill:`none`,stroke:`currentColor`,strokeOpacity:`.18`,strokeWidth:`4`}),(0,B.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 Wd({project:e,phases:t,canWrite:n,prd:r}){let i=q(`/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 Ia(`/actions/phase/${e}/${t.id}/${r}`),i=n.args?.to??``;n.status===`ok`&&m(t.id,r,i),c(n.status===`ok`?`sent → ${i}`:n.error??n.log?.slice(-1)[0]??`failed`)}catch(e){c(e.message)}finally{o(null)}},_=async t=>{if(!n){c(`bus writes are off — switch them on in the header, then retry`);return}o(t),c(null);try{let n=await Ia(`/actions/project/${e}/${t}`),r=n.args?.to??``;c(n.status===`ok`?`sent → ${r} — continue in its thread`:n.error??n.log?.slice(-1)[0]??`failed`),n.status===`ok`&&r&&yd(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,B.jsxs)(U,{children:[(0,B.jsx)(W,{title:`Roadmap`,icon:`phases`,eyebrow:`PRODUCTION_ROADMAP · phases/`,path:`${v}/${t.length} complete${y?` · next: ${y.title}`:``}`,children:(0,B.jsxs)(`span`,{className:`flex items-center gap-1.5 flex-wrap`,children:[i?.aide?(0,B.jsx)(ld,{id:i.aide,prefix:`aide`}):(0,B.jsx)(`span`,{className:`font-mono text-[11px] text-tan`,children:`no live aide`}),i?.coordinator?(0,B.jsx)(ld,{id:i.coordinator,prefix:`coord`}):(0,B.jsx)(`span`,{className:`font-mono text-[11px] text-tan`,children:`no live coordinator`})]})}),t.length===0&&(0,B.jsxs)(`div`,{className:`px-3 py-3 grid gap-2 text-[13px]`,children:[r==null?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(`div`,{className:`text-walnut`,children:[`No PRD yet. The roadmap starts from `,(0,B.jsx)(`code`,{children:`docs/PRD.md`}),` — write it with your aide (it runs `,(0,B.jsx)(`code`,{children:`/create-prd`}),` and asks you what it needs).`]}),(0,B.jsxs)(`div`,{className:`flex gap-2 items-center flex-wrap`,children:[(0,B.jsx)(K,{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,B.jsx)(Na,{size:12}):`Write the PRD with the aide`}),i?.aide&&(0,B.jsx)(K,{size:`sm`,tone:`ghost`,onClick:()=>yd(i.aide),children:`Open the aide's thread`}),!i?.aide&&(0,B.jsx)(V,{to:`/ops/fleets`,className:`hover:no-underline`,children:(0,B.jsx)(K,{size:`sm`,children:`Spawn aide`})})]})]}):(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(`div`,{className:`text-walnut`,children:[`PRD is `,(0,B.jsx)(`b`,{children:r.status??`present`}),r.roadmap?` and a roadmap exists`:``,` — no `,(0,B.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,B.jsx)(`code`,{children:`/plan-phase 1`}),`.`]}),(0,B.jsxs)(`div`,{className:`flex gap-2 items-center flex-wrap`,children:[(0,B.jsx)(K,{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,B.jsx)(Na,{size:12}):`Kickstart with the aide`}),i?.aide&&(0,B.jsx)(K,{size:`sm`,tone:`ghost`,onClick:()=>yd(i.aide),children:`Open the aide's thread`}),!i?.aide&&(0,B.jsx)(V,{to:`/ops/fleets`,className:`hover:no-underline`,children:(0,B.jsx)(K,{size:`sm`,children:`Spawn aide`})})]})]}),s&&(0,B.jsx)(`div`,{className:`font-mono text-[12px] ${/^sent/.test(s)?`text-leaf`:`text-brick`}`,children:s})]}),t.length>0&&(0,B.jsxs)(`div`,{className:`px-3 pt-3 pb-2 min-w-0`,children:[(0,B.jsx)(`div`,{className:`overflow-x-auto overscroll-x-contain [scrollbar-width:thin]`,children:(0,B.jsx)(`ol`,{className:`flex items-start gap-0 min-w-max`,children:t.map((e,n)=>{let r=Hd[e.state],i=e.total?Math.round(e.done/e.total*100):0,o=n===t.length-1;return(0,B.jsxs)(`li`,{className:`flex items-start`,children:[(0,B.jsxs)(`div`,{className:`w-[190px] grid gap-1.5 justify-items-center text-center`,children:[(0,B.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,B.jsx)(Ud,{pct:e.state===`complete`?100:i,cls:r.ring}),(0,B.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,B.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,B.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,B.jsx)(G,{tone:r.tone,children:r.label}),(0,B.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,B.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,B.jsx)(`span`,{className:`uppercase tracking-[.06em]`,children:f[e.id].verb===`kickoff`?`kicked off`:f[e.id].verb===`plan`?`plan requested`:`audit requested`}),(0,B.jsx)(`span`,{children:`→`}),(0,B.jsx)(ld,{id:f[e.id].to,bare:!0}),(0,B.jsx)(`span`,{className:`text-tan`,children:h(f[e.id].ts)})]}),(0,B.jsxs)(`div`,{className:`flex gap-1 flex-wrap justify-center`,children:[(e.tasks||e.readme)&&(0,B.jsx)(V,{to:`/docs/${encodeURIComponent(e.tasks??e.readme)}`,className:`hover:no-underline`,children:(0,B.jsx)(K,{size:`sm`,tone:`ghost`,children:`Open`})}),e.state===`pending`&&(0,B.jsx)(K,{size:`sm`,tone:`primary`,disabled:!!a,title:`DM the aide: run /plan-phase`,onClick:()=>g(e,`plan`),children:a===`${e.id}:plan`?(0,B.jsx)(Na,{size:12}):`Plan`}),e.state===`planned`&&(0,B.jsx)(K,{size:`sm`,tone:`primary`,disabled:!!a,title:`GO to the coordinator`,onClick:()=>g(e,`kickoff`),children:a===`${e.id}:kickoff`?(0,B.jsx)(Na,{size:12}):`Kick off`}),e.state===`ongoing`&&(0,B.jsx)(K,{size:`sm`,disabled:!!a,title:`ask the coordinator to run /coord-audit`,onClick:()=>g(e,`audit`),children:a===`${e.id}:audit`?(0,B.jsx)(Na,{size:12}):`Audit`})]})]}),!o&&(0,B.jsx)(`div`,{className:`mt-[21px] h-[3px] w-6 rounded ${e.state===`complete`?`bg-leaf`:`bg-sand`}`})]},e.id)})})}),l&&(0,B.jsx)(Ju,{project:e,phase:t.find(e=>e.id===l),onClose:()=>u(null)}),s&&(0,B.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,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`span`,{children:`sent →`}),(0,B.jsx)(ld,{id:s.replace(/^sent → /,``),bare:!0})]}):s}),(0,B.jsx)(`div`,{className:`mt-2 font-mono text-[11px] text-tan flex gap-3 flex-wrap`,children:Object.keys(Hd).map(e=>(0,B.jsxs)(`span`,{children:[(0,B.jsx)(`span`,{className:`inline-block w-2 h-2 rounded-full border mr-1 align-middle ${Hd[e].dot}`}),Hd[e].label,` — `,Hd[e].hint]},e))})]})]})}function Gd({phases:e}){return e?.length?(0,B.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,B.jsx)(`span`,{className:`inline-block w-2.5 h-2.5 rounded-full border ${Hd[e.state].dot}`},t)),(0,B.jsxs)(`span`,{className:`ml-1 font-mono text-[11px] text-ink3`,children:[e.filter(e=>e.state===`complete`).length,`/`,e.length]})]}):(0,B.jsx)(`span`,{className:`font-mono text-[11px] text-tan`,children:`no phases`})}function Kd({project:e,canWrite:t,onClose:n,initialRole:r}){let{data:i}=q(`/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=ar(),{runs:E}=Ga(),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 Ia(`/actions/spawn`,{project:e,role:a,harness:s,agentId:l,lane:d||void 0,model:p||void 0,note:h||void 0,waitSeconds:_});if(!t.status)throw Error(t.error??`failed`);S(t)}catch(e){w(e.message)}finally{b(!1)}},k=i?.roles.find(e=>e.id===a)?.skill??``;return(0,B.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,B.jsxs)(`div`,{className:`w-[640px] bg-paper border border-sand rounded-kit shadow-panel`,children:[(0,B.jsxs)(`div`,{className:`px-4 py-3 border-b border-sand font-display font-bold text-[18px] text-umber`,children:[`Spawn agent · `,e]}),(0,B.jsxs)(`div`,{className:`p-4 grid gap-3 text-[13px]`,children:[(0,B.jsxs)(`div`,{className:`flex gap-1.5 flex-wrap items-center text-umber`,children:[(0,B.jsx)(G,{tone:t?`warn`:`outline`,children:t?`bus writes on`:`bus writes OFF`}),(0,B.jsxs)(`span`,{children:[`tmux window `,(0,B.jsxs)(`code`,{children:[`fleet-`,e]}),` · cwd `,(0,B.jsx)(`code`,{children:i?.repoPath?.replace(/^\/Users\/[^/]+/,`~`)}),i?.room?(0,B.jsxs)(B.Fragment,{children:[` · room `,(0,B.jsxs)(`code`,{children:[`#`,i.room]})]}):` · no room linked`]})]}),!t&&(0,B.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,B.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,B.jsxs)(`label`,{className:`grid gap-1`,children:[(0,B.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Role · playbook card`}),(0,B.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,B.jsxs)(`option`,{value:e.id,children:[e.id,` · `,e.skill]},e.id))})]}),(0,B.jsxs)(`label`,{className:`grid gap-1`,children:[(0,B.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Harness`}),(0,B.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,B.jsxs)(`option`,{value:e.id,children:[e.id,` · `,e.cmd]},e.id))})]}),(0,B.jsxs)(`label`,{className:`grid gap-1`,children:[(0,B.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Agent id`}),(0,B.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,B.jsxs)(`label`,{className:`grid gap-1`,children:[(0,B.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Lane`}),(0,B.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,B.jsxs)(`label`,{className:`grid gap-1`,children:[(0,B.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Model (Claude only, optional)`}),(0,B.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,B.jsxs)(`label`,{className:`grid gap-1`,children:[(0,B.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Extra instruction (optional, injected after the skill)`}),(0,B.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,B.jsxs)(`div`,{className:`flex items-center gap-3 text-umber`,children:[(0,B.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Start wait`}),(0,B.jsx)(`input`,{type:`range`,min:3,max:30,value:_,onChange:e=>v(Number(e.target.value))}),(0,B.jsxs)(`span`,{className:`font-mono text-[12px]`,children:[_,` s`]}),(0,B.jsx)(`span`,{className:`text-[12px]`,children:`before injecting the skill`})]}),(0,B.jsxs)(`div`,{className:`font-mono text-[12px] text-ink3 bg-linen rounded px-2 py-1.5`,children:[`will type: `,(0,B.jsx)(`b`,{className:`text-walnut`,children:i?.harnesses.find(e=>e.id===s)?.cmd}),` → wait `,_,` s → `,s===`claude`?`/color · `:``,(0,B.jsxs)(`b`,{className:`text-walnut`,children:[k,` --id=`,l||`…`,d?` --lane=${d}`:``,i?.room?` --room=${i.room}`:``]}),` → wait for register (≤ 90 s)`]}),C&&(0,B.jsx)(`div`,{className:`text-brick`,children:C}),D&&(0,B.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,B.jsxs)(`div`,{className:`font-mono text-[12px]`,children:[D.status===`running`?(0,B.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-amber`,children:[(0,B.jsx)(Na,{}),` `,(0,B.jsx)(G,{tone:`warn`,children:`running`})]}):(0,B.jsx)(G,{tone:D.status===`ok`?`ok`:`bad`,children:D.status}),` `,(0,B.jsx)(`b`,{children:D.label}),D.status===`running`&&(0,B.jsx)(`span`,{className:`ml-2 text-tan`,children:`live — you can close this; it keeps running (see Runs)`})]}),(0,B.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,B.jsxs)(`div`,{className:`px-4 py-3 border-t border-sand flex justify-end gap-2`,children:[(0,B.jsx)(K,{size:`sm`,onClick:n,disabled:y,children:D?D.status===`running`?`Close (keeps running)`:`Close`:`Cancel`}),D&&(0,B.jsx)(K,{size:`sm`,onClick:()=>{n(),T(`/monitor`)},children:`Open Monitor`}),!D&&(0,B.jsx)(K,{size:`sm`,tone:`primary`,onClick:O,disabled:!t||y||!l,children:y?(0,B.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,B.jsx)(Na,{}),` Starting…`]}):`Spawn`})]})]})})}function qd({project:e,fleet:t,canWrite:n,compact:r=!1}){let i=q(`/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,B.jsxs)(`div`,{className:`px-2.5 py-1.5 rounded-kit border border-sand bg-paper ${n?``:`min-w-[170px]`}`,children:[(0,B.jsx)(ld,{id:t,size:`md`,bare:!0}),(0,B.jsxs)(`span`,{className:`block font-mono text-[10px] uppercase tracking-[.08em] text-tan mt-0.5`,children:[e,r?.pane?` · ${r.pane}`:``]})]}):(0,B.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,B.jsx)(`span`,{className:`inline-block w-2 h-2 rounded-full border border-dashed border-dust`}),(0,B.jsxs)(`span`,{className:`min-w-0`,children:[(0,B.jsx)(`span`,{className:`block font-mono text-[12px] text-tan`,children:`missing`}),(0,B.jsxs)(`span`,{className:`block font-mono text-[10px] uppercase tracking-[.08em] text-tan`,children:[e,` · spawn`]})]})]})},l=({v:e=!1})=>(0,B.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,B.jsxs)(`div`,{className:`grid gap-1 ${r?`text-[12px]`:``}`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,B.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,B.jsx)(l,{}),(0,B.jsx)(c,{role:`aide`,id:t.roles.aide}),(0,B.jsx)(l,{}),(0,B.jsx)(c,{role:`coordinator`,id:t.roles.coordinator}),(0,B.jsx)(l,{}),(0,B.jsxs)(`div`,{className:`grid gap-1`,children:[(0,B.jsxs)(`div`,{className:`flex gap-1 flex-wrap`,children:[(0,B.jsx)(c,{role:`qa`,id:t.roles.qa}),(0,B.jsx)(c,{role:`ci`,id:t.roles.ci})]}),(0,B.jsxs)(`div`,{className:`flex gap-1 flex-wrap`,children:[u.map(e=>(0,B.jsx)(c,{role:`worker`,id:e},e)),(0,B.jsx)(c,{role:`worker`,id:null})]})]})]}),!r&&(0,B.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,B.jsx)(Kd,{project:e,canWrite:n,initialRole:a,onClose:()=>o(null)})]})}var Jd={absent:`bad`,partial:`warn`,present:`ok`};function Yd({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,B.jsx)(G,{tone:Jd[e.state],children:t})}function Xd({project:e,canWrite:t}){let{data:n,refresh:r}=q(`/projects/${e}/fleet`,2e4),[i,a]=(0,P.useState)(!1);return!n||n.state===`present`?null:(0,B.jsxs)(B.Fragment,{children:[(0,B.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,B.jsxs)(`div`,{className:`flex items-center gap-3 flex-wrap`,children:[(0,B.jsx)(Yd,{fleet:n}),(0,B.jsx)(`span`,{className:`text-[13px] text-umber`,children:n.state===`absent`?(0,B.jsxs)(B.Fragment,{children:[`No agents are live for `,(0,B.jsx)(`b`,{className:`text-walnut`,children:e}),`. Boards and docs still read fine; Plan / Fix / Kick off need someone to talk to.`]}):(0,B.jsxs)(B.Fragment,{children:[`Missing `,(0,B.jsx)(`b`,{className:`text-walnut`,children:n.missing.join(`, `)}),`.`]})}),(0,B.jsxs)(`span`,{className:`ml-auto flex gap-1.5`,children:[(0,B.jsx)(K,{size:`sm`,tone:`primary`,onClick:()=>a(!0),children:`Spawn fleet…`}),(0,B.jsx)(V,{to:`/ops/fleets`,className:`hover:no-underline`,children:(0,B.jsx)(K,{size:`sm`,children:`Fleets`})})]})]}),(0,B.jsx)(qd,{project:e,fleet:n,canWrite:t,compact:!0})]}),i&&(0,B.jsx)(Zd,{project:e,templates:n.templates,missing:n.missing,canWrite:t,onClose:()=>{a(!1),r()}})]})}function Zd({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}=Ga(),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,B.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,B.jsxs)(`div`,{className:`w-[680px] bg-paper border border-sand rounded-kit shadow-panel`,children:[(0,B.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,B.jsxs)(`div`,{className:`p-4 grid gap-3 text-[13px]`,children:[(0,B.jsxs)(`div`,{className:`text-umber`,children:[`Shapes from the playbook layout. Agents are launched one after another in tmux window `,(0,B.jsxs)(`code`,{children:[`fleet-`,e]}),`, each injected with its role card and `,(0,B.jsx)(`code`,{children:`--id`}),`, and the console waits for each to register.`,n.length>0&&(0,B.jsxs)(B.Fragment,{children:[` Currently missing: `,(0,B.jsx)(`b`,{className:`text-walnut`,children:n.join(`, `)}),`.`]})]}),!r&&(0,B.jsx)(`div`,{className:`text-brick`,children:`Turn on bus writes (header toggle) first.`}),(0,B.jsx)(`div`,{className:`grid gap-1.5`,children:t.map(e=>(0,B.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,B.jsx)(`input`,{type:`radio`,name:`tpl`,checked:a===e.id,onChange:()=>{o(e.id),f(null)}}),(0,B.jsxs)(`span`,{children:[(0,B.jsx)(`b`,{children:e.label}),(0,B.jsx)(`span`,{className:`block text-[12px] text-umber`,children:e.hint}),(0,B.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,B.jsxs)(`div`,{className:`grid grid-cols-3 gap-3`,children:[(0,B.jsxs)(`label`,{className:`grid gap-1`,children:[(0,B.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Harness`}),(0,B.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,B.jsx)(`option`,{children:e},e))})]}),T?.roles.includes(`ci`)&&(0,B.jsxs)(`label`,{className:`grid gap-1`,children:[(0,B.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`CI harness (cheap)`}),(0,B.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,B.jsx)(`option`,{children:e},e))})]}),(0,B.jsxs)(`label`,{className:`grid gap-1`,children:[(0,B.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Workers`}),(0,B.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,B.jsxs)(`label`,{className:`grid gap-1`,children:[(0,B.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Lanes (comma-separated, optional)`}),(0,B.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,B.jsxs)(`div`,{className:`flex items-center gap-3 text-umber`,children:[(0,B.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Start wait`}),(0,B.jsx)(`input`,{type:`range`,min:3,max:30,value:h,onChange:e=>g(Number(e.target.value))}),(0,B.jsxs)(`span`,{className:`font-mono text-[12px]`,children:[h,` s per agent`]}),(0,B.jsxs)(`span`,{className:`text-[12px]`,children:[`· total ≈ `,(T?.roles.length??0)+E,` × (`,h,` s + register)`]})]}),x&&(0,B.jsx)(`div`,{className:`text-brick`,children:x}),w&&(0,B.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,B.jsxs)(`div`,{className:`font-mono text-[12px]`,children:[w.status===`running`?(0,B.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-amber`,children:[(0,B.jsx)(Na,{}),` `,(0,B.jsx)(G,{tone:`warn`,children:`running`})]}):(0,B.jsx)(G,{tone:w.status===`ok`?`ok`:`bad`,children:w.status}),` `,(0,B.jsx)(`b`,{children:w.label})]}),(0,B.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,B.jsxs)(`div`,{className:`px-4 py-3 border-t border-sand flex justify-end gap-2`,children:[(0,B.jsx)(K,{size:`sm`,onClick:i,disabled:_,children:w?`Close (keeps running)`:`Cancel`}),!w&&(0,B.jsx)(K,{size:`sm`,tone:`primary`,onClick:async()=>{v(!0),S(null);try{let t=await Ia(`/actions/spawn-fleet`,{project:e,template:a,harness:s,ciHarness:l,workers:E,lanes:p.split(`,`).map(e=>e.trim()).filter(Boolean),waitSeconds:h});if(!t.status)throw Error(t.error??`failed`);b(t)}catch(e){S(e.message)}finally{v(!1)}},disabled:!r||_||!T,children:_?(0,B.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,B.jsx)(Na,{}),` Starting…`]}):`Spawn ${(T?.roles.length??0)+E} agents`})]})]})})}var Qd=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`},$d=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 ef(){let{projects:e,setCurrent:t,error:n,refresh:r}=Ha(),i=q(`/kit`).data,a=q(`/bus/agents`,3e4).data??[],o=a.filter(e=>e.liveness===`live`).length,s=a.filter(e=>e.liveness===`dead`),c=q(`/needs-david`,3e4).data??[],[l,u]=(0,P.useState)(!1);return(0,B.jsxs)(`div`,{className:`p-4 pb-10 grid gap-[18px] content-start`,children:[l&&(0,B.jsx)(Xa,{onClose:()=>{u(!1),r()}}),(0,B.jsxs)(`div`,{className:`flex items-baseline justify-between`,children:[(0,B.jsxs)(`div`,{className:`flex items-baseline gap-3 flex-wrap`,children:[(0,B.jsx)(`span`,{className:`font-display font-bold text-[34px] leading-[1.1] tracking-[-.015em] text-ember`,children:`Projects`}),(0,B.jsx)(K,{size:`sm`,tone:`primary`,onClick:()=>u(!0),title:`register a repo path with the console`,children:`Add project`}),(0,B.jsxs)(`span`,{className:`ml-3 text-[13px] text-umber`,children:[`Groundwork-managed repos with a seam in `,(0,B.jsx)(`code`,{children:`docs/`}),` · from `,(0,B.jsx)(`code`,{children:`groundwork-console.config.json`})]})]}),(0,B.jsxs)(`div`,{className:`flex gap-2.5 items-center flex-wrap`,children:[i?.requires&&!i.requires.ok&&(0,B.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,B.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,B.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,B.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,B.jsx)(`b`,{className:`text-walnut`,children:t.version})]},e)):(0,B.jsx)(`span`,{className:`text-[13px] text-umber`,children:`kit.json unavailable`}),(0,B.jsx)(`span`,{className:`text-[13px] text-umber`,children:`· from kit.json`})]})]}),n&&(0,B.jsxs)(U,{className:`px-4 py-3 text-[13px] text-brick`,children:[`API unreachable (`,n,`) — start it with `,(0,B.jsx)(`code`,{children:`pnpm dev:api`}),`.`]}),(0,B.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]=$d(e.schema);return(0,B.jsx)(V,{to:`/board`,onClick:()=>t(e.name),className:`block hover:no-underline text-inherit h-full`,children:(0,B.jsxs)(U,{className:`px-4 py-3.5 hover:border-dust h-full flex flex-col`,children:[(0,B.jsx)(`div`,{className:`font-display font-bold text-[20px] text-ember break-words`,title:e.name,children:e.name}),(0,B.jsxs)(`div`,{className:`mt-1 flex gap-1.5 flex-wrap`,children:[(0,B.jsx)(Yd,{fleet:e.fleet}),e.versionMarker?e.behind?(0,B.jsxs)(G,{tone:`warn`,children:[`groundwork `,e.versionMarker,` → `,e.kitGroundwork]}):(0,B.jsxs)(G,{tone:`ok`,children:[`groundwork `,e.versionMarker]}):(0,B.jsx)(G,{tone:`outline`,children:`no groundwork marker`})]}),(0,B.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,B.jsxs)(`div`,{className:`font-mono text-[11px] text-tan -mt-2 mb-2 flex items-center justify-between gap-2`,children:[(0,B.jsx)(`span`,{children:e.lastActive?`active ${Qd(e.lastActive)} · ${e.lastActiveSource}`:`no activity recorded`}),(0,B.jsx)(Gd,{phases:e.phaseStrip??[]})]}),(0,B.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,B.jsxs)(`div`,{children:[(0,B.jsx)(`b`,{className:`block font-bold text-[20px] leading-none text-walnut`,children:t}),(0,B.jsx)(`span`,{className:`font-mono font-medium text-[11px] uppercase tracking-[.06em] text-ink3`,children:e})]},e))}),(0,B.jsxs)(`div`,{className:`flex gap-1.5 flex-wrap mt-auto pt-2.5`,children:[(0,B.jsx)(G,{tone:r,children:n}),e.files.queue?(0,B.jsx)(G,{tone:`ok`,children:`queue.v1`}):(0,B.jsx)(G,{tone:`outline`,children:`no QUEUE.md`}),e.files.done?(0,B.jsx)(G,{tone:`ok`,children:`done.v1`}):(0,B.jsx)(G,{tone:`outline`,children:`no DONE.md`}),e.files.facts?(0,B.jsxs)(G,{tone:e.counts.staleFacts?`warn`:`ok`,children:[`facts.v1`,e.counts.staleFacts?` · ${e.counts.staleFacts} stale`:``]}):(0,B.jsx)(G,{tone:`outline`,children:`no FACTS.md`}),e.counts.malformed?(0,B.jsxs)(G,{tone:`bad`,children:[e.counts.malformed,` malformed`]}):null]})]})},e.name)})}),(0,B.jsxs)(`div`,{className:`grid grid-cols-2 gap-4 max-[980px]:grid-cols-1`,children:[(0,B.jsxs)(U,{children:[(0,B.jsx)(W,{title:`Needs David`,icon:`needsDavid`,path:`${c.length} open · WORKSTREAMS ## Needs David + DAVID_DECISION`}),c.length===0&&(0,B.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,B.jsx)(ka,{glyph:`★`,children:(0,B.jsxs)(`div`,{className:`py-2 min-w-0`,children:[(0,B.jsxs)(`div`,{className:`flex gap-2 items-baseline`,children:[(0,B.jsx)(`b`,{className:`font-mono text-[13px]`,children:e.project}),(0,B.jsx)(`span`,{className:`font-mono text-[11px] text-tan truncate`,children:e.source}),e.ts?(0,B.jsx)(`span`,{className:`ml-auto shrink-0 font-mono text-[11px] ${Id(e.ts)}`,title:new Date(e.ts).toLocaleString(),children:Fd(e.ts)}):null]}),(0,B.jsx)(`div`,{className:`text-[14px] break-words line-clamp-2`,title:e.title,children:(0,B.jsx)(Wu,{text:e.title})}),e.detail&&(0,B.jsx)(`div`,{className:`text-[13px] text-umber break-words line-clamp-2`,children:(0,B.jsx)(Wu,{text:e.detail})}),e.msgId&&e.room?(0,B.jsx)(V,{className:`font-mono text-[12px]`,to:`/bus?room=${e.room}&msg=${e.msgId}`,children:`Open packet →`}):e.from?(0,B.jsx)(`button`,{className:`font-mono text-[12px] text-ember-deep border-0 bg-transparent p-0 cursor-pointer`,onClick:t=>{t.preventDefault(),yd(e.from,{answers:e.msgId?[e.msgId]:void 0})},children:`Reply →`}):null]})},t))]}),(0,B.jsxs)(U,{children:[(0,B.jsx)(W,{title:`Bus health`,icon:`health`,path:`agents.json · transports · status`}),(0,B.jsx)(ka,{glyph:`✓`,children:(0,B.jsxs)(`div`,{className:`py-2 flex items-center gap-2`,children:[(0,B.jsx)(G,{tone:a.length?`ok`:`warn`,children:a.length?`reachable`:`no store`}),(0,B.jsxs)(`span`,{className:`text-[13px] text-umber`,children:[a.length,` registered · `,o,` live · `,s.length,` dead`]})]})}),s.length>0&&(0,B.jsx)(ka,{glyph:`!`,children:(0,B.jsxs)(`div`,{className:`py-2 flex items-center gap-2 min-w-0`,children:[(0,B.jsxs)(G,{tone:`warn`,children:[s.length,` stale agents`]}),(0,B.jsxs)(`span`,{className:`text-[13px] text-umber truncate`,children:[s.slice(0,4).map(e=>e.agentId).join(`, `),s.length>4?`…`:``,` — `,(0,B.jsx)(V,{to:`/ops/fleets`,children:`fleet`})]})]})})]})]}),(0,B.jsx)(Vd,{})]})}function tf({scope:e}){return e?(0,B.jsxs)(`span`,{className:`inline-flex items-center gap-1 font-mono text-[12px] text-ink3`,title:e.note??``,children:[(0,B.jsx)(`span`,{className:`text-tan`,children:`✎`}),e.owner,(0,B.jsxs)(`span`,{className:`text-tan`,children:[`· `,e.mode]})]}):(0,B.jsx)(`span`,{className:`font-mono text-[12px] text-tan`,title:`no scope declared`,children:`unscoped`})}function nf({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 Ia(`/actions/queue-add/${e}`,{priority:a,text:s}):await Ia(`/actions/fact-reverify/${e}`,{id:t.id,method:l,claim:d||void 0});if(n.error&&!n.status)throw Error(n.error);g(n)}catch(e){v(e.message)}finally{m(!1)}},b=t.kind===`add`?`Add queue item · ${e}`:`Re-verify fact · ${t.id}`;return(0,B.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,B.jsxs)(`div`,{className:`w-[600px] bg-paper border border-sand rounded-kit shadow-panel`,children:[(0,B.jsx)(`div`,{className:`px-4 py-3 border-b border-sand font-display font-bold text-[18px] text-umber`,children:b}),(0,B.jsxs)(`div`,{className:`p-4 grid gap-3 text-[13px]`,children:[(0,B.jsxs)(`div`,{className:`flex gap-1.5 flex-wrap items-center text-umber`,children:[(0,B.jsx)(G,{tone:n?`warn`:`outline`,children:n?`seam writes on`:`seam writes OFF`}),(0,B.jsxs)(`span`,{children:[`scope: `,r?`${r.owner} · ${r.mode}`:`unscoped`]}),(0,B.jsx)(`span`,{children:`· round-trip guard · re-parse after write · a Run`})]}),!n&&(0,B.jsxs)(`div`,{className:`text-brick`,children:[`Enable seam writes in the header (`,(0,B.jsx)(`code`,{children:`seam`}),` badge, type SEAM) first.`]}),t.kind===`add`?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(`label`,{className:`grid gap-1`,children:[(0,B.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Priority`}),(0,B.jsx)(`span`,{className:`inline-flex border border-dust rounded-kit overflow-hidden w-max`,children:[`P1`,`P2`,`P3`].map(e=>(0,B.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,B.jsxs)(`label`,{className:`grid gap-1`,children:[(0,B.jsxs)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:[`Item (one line · queue.v1: `,(0,B.jsxs)(`code`,{children:[`- [ ] (`,a,`) …`]}),`)`]}),(0,B.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,B.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,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(`label`,{className:`grid gap-1`,children:[(0,B.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Claim (leave as is unless it changed)`}),(0,B.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,B.jsxs)(`label`,{className:`grid gap-1`,children:[(0,B.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Method — how you verified it just now`}),(0,B.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,B.jsxs)(`div`,{className:`font-mono text-[12px] text-ink3 bg-linen rounded px-2 py-1.5`,children:["- `",t.id,"` — ",d||`…`,(0,B.jsx)(`br`,{}),` verified: now · by: david · method: `,l||`…`]})]}),_&&(0,B.jsx)(`div`,{className:`text-brick`,children:_}),h&&(0,B.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,B.jsxs)(`div`,{className:`font-mono text-[12px]`,children:[(0,B.jsx)(G,{tone:h.status===`ok`?`ok`:`bad`,children:h.status}),` `,(0,B.jsx)(`b`,{children:h.label})]}),(0,B.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,B.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,B.jsxs)(`div`,{className:`px-4 py-3 border-t border-sand flex justify-end gap-2`,children:[(0,B.jsx)(K,{size:`sm`,onClick:i,children:h?`Close`:`Cancel`}),!h&&(0,B.jsx)(K,{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 rf=`1.6fr 1.1fr 1.4fr 1fr 1fr 2fr`,af=`1.4fr 1fr 1fr 1.6fr 1.6fr`,of=e=>/block/i.test(e)?`bad`:/done|merged|deployed|✅/i.test(e)||/watch|soak/i.test(e)?`ok`:`neutral`,sf=({k:e})=>(0,B.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 cf({r:e,raw:t,cols:n}){return`malformed`in e?(0,B.jsx)(ka,{glyph:`|`,malformed:!0,raw:e.raw,showRaw:t,children:(0,B.jsxs)(`div`,{className:`py-2 flex items-center gap-2 min-w-0`,children:[(0,B.jsx)(G,{tone:`solid`,children:`MalformedRow`}),(0,B.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,B.jsx)(V,{className:`text-[13px]`,to:`/docs/WORKSTREAMS.md?view=source&line=${e.line}`,children:`Show line`}):null]})}):e.schema===`workstreams.v1`?(0,B.jsx)(ka,{glyph:`|`,raw:e.raw,showRaw:t,children:(0,B.jsxs)(`div`,{className:`grid gap-3 items-center py-1.5`,style:{gridTemplateColumns:n},children:[(0,B.jsx)(`b`,{className:`truncate`,title:e.stream,children:(0,B.jsx)(Wu,{text:e.stream})}),(0,B.jsx)(`span`,{className:`font-mono font-medium text-[13px] text-umber truncate`,children:e.owner}),(0,B.jsx)(`span`,{className:`font-mono text-[13px] truncate`,children:e.branchWorktree}),(0,B.jsx)(`span`,{className:`min-w-0`,children:(0,B.jsx)(G,{tone:of(e.status),children:e.status})}),(0,B.jsx)(`span`,{className:`min-w-0 truncate`,children:/david/i.test(e.blocker)?(0,B.jsx)(G,{tone:`david`,children:e.blocker}):(0,B.jsx)(`span`,{className:e.blocker===`—`?`font-mono text-tan`:`text-[13px]`,children:(0,B.jsx)(Wu,{text:e.blocker})})}),(0,B.jsx)(`span`,{className:`text-[13px] text-umber truncate`,title:e.lastNote,children:(0,B.jsx)(Wu,{text:e.lastNote})})]})}):(0,B.jsx)(ka,{glyph:`|`,raw:e.raw,showRaw:t,children:(0,B.jsxs)(`div`,{className:`grid gap-3 items-center py-1.5`,style:{gridTemplateColumns:n},children:[(0,B.jsx)(`b`,{className:`truncate`,children:(0,B.jsx)(Wu,{text:e.lane})}),(0,B.jsx)(`span`,{className:`font-mono font-medium text-[13px] text-umber truncate`,children:e.owner}),(0,B.jsx)(`span`,{className:`min-w-0`,children:(0,B.jsx)(G,{tone:of(e.state),children:e.state})}),(0,B.jsx)(`span`,{className:`text-[13px] truncate`,children:(0,B.jsx)(Wu,{text:e.currentSlice})}),(0,B.jsx)(`span`,{className:`text-[13px] text-umber truncate`,children:(0,B.jsx)(Wu,{text:e.nextGo})})]})})}function lf(){let{current:e}=Ha(),[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}=q(e?`/projects/${e}/board`:null,15e3),o=q(e?`/projects/${e}/doctor`:null,6e4),s=o.data,c=q(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 Ia(`/actions/doctor-fix/${e}`,{check:t,items:n});f(e=>({...e,[t]:r.status===`ok`?`sent → ${r.args?.to}`:r.error??`failed`}))}catch(e){f(n=>({...n,[t]:e.message}))}finally{u(null)}},m=q(`/admin/bus-writes`,1e4).data?.enabled??!1,h=q(`/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 Ia(`/actions/project-doctor/${e}`),o.refresh()}finally{C(!1)}};if(!e)return(0,B.jsx)(`div`,{className:`p-4 text-umber`,children:`No project selected.`});if(i)return(0,B.jsx)(`div`,{className:`p-4`,children:(0,B.jsxs)(U,{className:`px-4 py-3 text-[13px] text-brick`,children:[`API error: `,i]})});if(!r)return(0,B.jsx)(`div`,{className:`p-4 text-umber`,children:a?`Reading seam…`:``});let T=r.workstreams.schema,E=T===`workstreams.v1`,D=E?rf:af,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,B.jsxs)(`div`,{className:`grid grid-cols-[1fr_340px] gap-4 p-4 max-[980px]:grid-cols-1`,children:[b&&(0,B.jsx)(nf,{project:e,req:b,seamOn:h,scope:b.kind===`add`?O(`docs/QUEUE.md`):O(`docs/FACTS.md`),onClose:()=>{x(null)}}),(0,B.jsxs)(`div`,{className:`grid gap-3.5 content-start min-w-0`,children:[(0,B.jsxs)(`div`,{className:`flex items-baseline justify-between`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`span`,{className:`font-display font-bold text-[34px] leading-[1.1] tracking-[-.015em] text-ember`,children:e}),k&&(0,B.jsxs)(`span`,{className:`ml-3 text-[13px] text-umber`,children:[k.title,` · `,k.done,`/`,k.total]})]}),(0,B.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,B.jsx)(`span`,{className:`text-[13px] text-umber`,children:a?`refreshing…`:`read from disk · 15 s`}),(0,B.jsx)(K,{size:`sm`,onClick:w,disabled:S,children:S?(0,B.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,B.jsx)(Na,{size:12}),` Doctor`]}):`Doctor`})]})]}),(0,B.jsx)(Xd,{project:e,canWrite:m}),(0,B.jsx)(Wd,{project:e,phases:r.phases,canWrite:m,prd:r.prd}),(0,B.jsxs)(U,{children:[(0,B.jsxs)(W,{title:`Active Streams`,icon:`streams`,eyebrow:T??`no WORKSTREAMS.md`,path:`docs/WORKSTREAMS.md`,children:[(0,B.jsx)(tf,{scope:O(`docs/WORKSTREAMS.md`)}),(0,B.jsxs)(K,{tone:`ghost`,size:`sm`,onClick:()=>n(e=>!e),"aria-pressed":t,children:[t?`Rendered`:`View source`,(0,B.jsx)(sf,{k:`s`})]})]}),T===`unknown`&&(0,B.jsxs)(`div`,{className:`px-3 py-3 text-[13px]`,children:[(0,B.jsx)(G,{tone:`bad`,children:`unknown workstreams grammar`}),(0,B.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,B.jsxs)(`div`,{className:`px-3 py-2 text-[13px]`,children:[(0,B.jsx)(G,{tone:`warn`,children:`lanes-v0 · legacy`}),(0,B.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,B.jsxs)(Aa,{cols:D,children:[(0,B.jsx)(`span`,{children:`Stream`}),(0,B.jsx)(`span`,{children:`Owner / Agent`}),(0,B.jsx)(`span`,{children:`Branch · Worktree`}),(0,B.jsx)(`span`,{children:`Status`}),(0,B.jsx)(`span`,{children:`Blocker`}),(0,B.jsx)(`span`,{children:`Last note`})]}):(0,B.jsxs)(Aa,{cols:D,children:[(0,B.jsx)(`span`,{children:`Lane`}),(0,B.jsx)(`span`,{children:`Owner`}),(0,B.jsx)(`span`,{children:`State`}),(0,B.jsx)(`span`,{children:`Current slice`}),(0,B.jsx)(`span`,{children:`Next GO`})]})),r.workstreams.rows.map((e,n)=>(0,B.jsx)(cf,{r:e,raw:t,cols:D},n)),r.workstreams.issues.length>0&&(0,B.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,B.jsxs)(U,{children:[(0,B.jsxs)(W,{title:`Queue`,icon:`queue`,eyebrow:`queue.v1`,path:`docs/QUEUE.md`,children:[(0,B.jsx)(tf,{scope:O(`docs/QUEUE.md`)}),(0,B.jsx)(K,{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,B.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,B.jsx)(`div`,{className:`px-3 py-3 text-[13px] text-umber`,children:`Queue empty.`}),r.queue.map(e=>(0,B.jsx)(ka,{glyph:e.done?`- [x]`:`- [ ]`,raw:e.raw,showRaw:t,children:(0,B.jsxs)(`div`,{className:`grid grid-cols-[44px_1fr] gap-2.5 items-baseline py-2`,children:[(0,B.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,B.jsx)(`span`,{className:e.done?`line-through text-tan`:``,children:(0,B.jsx)(Wu,{text:e.text})})]})},e.id))]}),(0,B.jsxs)(U,{children:[(0,B.jsxs)(W,{title:`Done`,icon:`done`,eyebrow:`done.v1 · append-only`,path:`docs/DONE.md · ${r.done.length}`,children:[(0,B.jsx)(tf,{scope:O(`docs/DONE.md`)}),(0,B.jsx)(uf,{k:`done`,open:g.done,onToggle:v})]}),g.done&&r.done.slice(-8).reverse().map(e=>(0,B.jsx)(ka,{glyph:`—`,raw:e.raw,showRaw:t,children:(0,B.jsxs)(`div`,{className:`grid grid-cols-[1fr_auto] gap-3 items-baseline py-2`,children:[(0,B.jsx)(`span`,{className:`truncate`,title:e.text,children:(0,B.jsx)(Wu,{text:e.text})}),(0,B.jsx)(`span`,{className:`font-mono text-[12px] text-ink3`,children:e.date??``})]})},e.id))]})]}),(0,B.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,B.jsxs)(U,{children:[(0,B.jsxs)(W,{title:`Facts`,icon:`facts`,path:`docs/FACTS.md · ${r.facts?.entries.length??0}${y?` · ${y} need attention`:``}`,children:[(0,B.jsx)(tf,{scope:O(`docs/FACTS.md`)}),(0,B.jsx)(uf,{k:`facts`,open:g.facts||y>0,onToggle:v})]}),(g.facts||y>0)&&!r.facts&&(0,B.jsxs)(`div`,{className:`px-3 py-3 text-[13px] text-umber`,children:[`No FACTS.md yet (run `,(0,B.jsx)(`code`,{children:`groundwork update --docs`}),`).`]}),(g.facts||y>0)&&r.facts?.entries.map(e=>(0,B.jsx)(ka,{glyph:`##`,raw:e.raw,showRaw:t,children:(0,B.jsxs)(`div`,{className:`py-2 grid grid-cols-[1fr_auto] gap-2 items-start min-w-0`,children:[(0,B.jsxs)(`div`,{className:`min-w-0`,children:[(0,B.jsxs)(`div`,{className:`font-mono font-medium text-[13px] truncate`,children:[e.id,e.stale&&(0,B.jsx)(`span`,{className:`ml-2 inline-flex`,children:(0,B.jsx)(G,{tone:`warn`,children:`stale`})})]}),e.value&&(0,B.jsx)(`div`,{className:`text-umber truncate`,title:e.value,children:(0,B.jsx)(Wu,{text:e.value})}),(0,B.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,B.jsx)(K,{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,B.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,B.jsxs)(U,{children:[(0,B.jsx)(W,{title:`Project doctor`,icon:`doctor`,path:s?`groundwork doctor --json · ${s.checks.filter(e=>e.level!==`ok`).length} flagged`:`groundwork doctor`}),!s&&(0,B.jsx)(`div`,{className:`px-3 py-3 text-[13px] text-umber`,children:`running…`}),s?.error&&(0,B.jsx)(`div`,{className:`px-3 py-3 text-[13px] text-brick`,children:s.error}),s?.checks.map(e=>(0,B.jsx)(ka,{glyph:e.level===`ok`?`✓`:`!`,children:(0,B.jsxs)(`div`,{className:`py-1.5 text-[13px] min-w-0`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,B.jsxs)(G,{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,B.jsx)(V,{to:`/ops/skills`,className:`ml-auto font-mono text-[11px]`,children:`Update via Skills →`}):c[e.check]?c[e.check].agent?(0,B.jsxs)(`span`,{className:`ml-auto inline-flex items-center gap-1`,children:[(0,B.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,B.jsx)(Na,{size:11}):`Fix →`}),(0,B.jsx)(ld,{id:c[e.check].agent})]}):(0,B.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,B.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,B.jsx)(`div`,{className:`truncate`,title:e,children:e},t)),e.level!==`ok`&&e.items.length>3&&(0,B.jsxs)(`div`,{className:`text-tan`,children:[`+`,e.items.length-3,` more`]})]}),d[e.check]&&(0,B.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,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`span`,{children:`sent →`}),(0,B.jsx)(ld,{id:d[e.check].replace(/^sent → /,``)})]}):d[e.check]})]})},e.check))]})]})]})}function uf({k:e,open:t,onToggle:n}){return(0,B.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 df=({children:e})=>(0,B.jsx)(`div`,{className:`font-mono font-semibold text-[11px] uppercase tracking-[.1em] text-ink3 mx-2 mt-3.5 mb-1.5`,children:e}),ff=e=>e?new Date(e).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`}):``,pf=e=>e?new Date(e).toLocaleDateString([],{month:`short`,day:`numeric`}):``,mf=e=>!!e&&Ea.includes(e),hf=(e,t)=>t&&e.startsWith(t)?e.slice(t.length).replace(/^:?\s*/,``):e,gf=`/api`;function _f(){let{projects:e,current:t}=Ha(),[n,r]=Fi(),i=q(`/bus/rooms`,2e4).data??[],[a,o]=(0,P.useState)(!1),[s,c]=(0,P.useState)(!1),l=q(`/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),v=q(d===`room`&&f?`/bus/rooms/${f}/messages?limit=80`:null,1e4),y=md(v.data),b=v.error,x=q(d===`status`?`/bus/status?limit=100`:null,15e3).data??[],S=q(d===`inbox`?`/bus/inbox?limit=200`:null,2e4),C={data:md(S.data),refresh:S.refresh,error:S.error},[w,T]=(0,P.useState)(!1),E=async()=>{T(!0);try{await Ia(`/bus/inbox/read`),C.refresh()}finally{T(!1)}},[D,O]=(0,P.useState)([]),[k,A]=(0,P.useState)(!1);(0,P.useEffect)(()=>{O([])},[f]);let j=(0,P.useMemo)(()=>{let e=new Set;return[...D,...y?.messages??[]].filter(t=>{let n=t.id??`${t.ts}-${t.from}`;return!e.has(n)&&(e.add(n),!0)})},[D,y]),M=j.filter(e=>!e.system).slice().reverse(),N=async()=>{let e=j[0]?.ts;if(e){A(!0);try{let t=await(await fetch(`${gf}/bus/rooms/${f}/messages?limit=80&before=${e}`)).json();O(e=>[...t.messages,...e])}finally{A(!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,M.length]);let ee=M.filter(e=>e.prefix===`DAVID_DECISION`&&!e.answered),F=(_?.members??[]).map(e=>l.find(t=>t.agentId===e)??{agentId:e,liveness:`dead`,pane:null,role:void 0,active:!1}),I=e=>Date.now()-e.lastTs<3e5,te=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})},ne=!!y&&j.length<y.total,re=!!q(`/admin/bus-writes`,1e4).data?.enabled,[L,ie]=(0,P.useState)(`david`),[R,z]=(0,P.useState)(``),[ae,oe]=(0,P.useState)(!1),[se,ce]=(0,P.useState)(null),[le,ue]=(0,P.useState)(null),de=Qu(),[fe,pe]=(0,P.useState)(null),me=q(`/bus/unread`,3e4).data?.inbox??0,he=`#${f}`,ge=async()=>{oe(!0),ce(null);try{let e=he.startsWith(`#`)?{room:he.slice(1)}:{to:he.replace(/^@/,``)},t=await Ia(`/actions/send`,{as:L,...e,text:de.withRefs(R),answers:le?.id?[le.id]:void 0,kind:/^DAVID_DECISION/.test(R)?`decision`:void 0});if(t.status!==`ok`)throw Error(t.error??t.log?.slice(-1)[0]??`failed`);z(``),ue(null),de.clear()}catch(e){ce(e.message)}finally{oe(!1)}};return(0,B.jsxs)(`div`,{className:`grid ${ee.length>0?`grid-cols-[240px_1fr_320px]`:`grid-cols-[240px_1fr]`} gap-4 p-4 max-[980px]:grid-cols-1`,children:[fe&&(0,B.jsx)(id,{agentId:fe,onClose:()=>pe(null)}),(0,B.jsxs)(`aside`,{className:`bg-cream -m-4 mr-0 px-2 py-4 border-r border-sand min-w-0 overflow-auto`,children:[(0,B.jsx)(df,{children:`Rooms · list_rooms`}),h.map(e=>(0,B.jsxs)(`button`,{onClick:()=>te({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,B.jsxs)(`span`,{className:`truncate flex items-center gap-1.5`,children:[I(e)&&(0,B.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,B.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,B.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,B.jsx)(df,{children:`Direct · inbox`}),(0,B.jsxs)(`button`,{onClick:()=>te({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,B.jsx)(`span`,{children:`@david · my DMs`}),me>0&&(0,B.jsxs)(`span`,{className:`font-semibold text-[11px] px-1.5 py-0.5 rounded-full bg-ember-wash text-ember-deep`,children:[me,` unread`]})]}),(0,B.jsx)(df,{children:`Status stream`}),(0,B.jsx)(`button`,{onClick:()=>te({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,B.jsxs)(U,{className:`min-w-0`,children:[(0,B.jsxs)(W,{title:`Inbox · david`,icon:`bus`,path:`read_messages source=inbox · unread = bus cursor`,children:[C.data&&(C.data.unread>0?(0,B.jsxs)(G,{tone:`david`,children:[C.data.unread,` unread`]}):(0,B.jsx)(G,{tone:`outline`,children:`all read`})),C.data&&C.data.unread>0&&(0,B.jsx)(K,{size:`sm`,onClick:E,disabled:w,children:w?`…`:`Mark all read`})]}),C.error&&(0,B.jsx)(`div`,{className:`px-3 py-3 text-[13px] text-brick`,children:C.error}),C.data&&C.data.messages.length===0&&(0,B.jsx)(`div`,{className:`px-3 py-3 text-[13px] text-umber`,children:`No DMs to david.`}),(C.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,B.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,B.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,B.jsxs)(`div`,{className:`px-3 pt-2 pb-2.5 min-w-0`,children:[(0,B.jsxs)(`div`,{className:`flex gap-2 items-baseline mb-0.5`,children:[(0,B.jsx)(`span`,{className:`font-semibold text-[13px]`,children:e.from}),(0,B.jsxs)(`span`,{className:`font-mono text-[12px] text-ink3`,children:[pf(e.ts),` `,ff(e.ts)]}),re&&e.from&&(0,B.jsx)(`button`,{className:`ml-auto font-mono text-[12px] text-ember-deep bg-transparent border-0 cursor-pointer`,onClick:()=>yd(e.from),title:`open the DM thread with this agent (Summon)`,children:`reply →`})]}),(0,B.jsxs)(`div`,{className:`whitespace-pre-wrap break-words text-[14px]`,children:[mf(r)&&(0,B.jsx)(Oa,{prefix:r,fail:r===`VERDICT`&&/FAIL/.test(n)}),(0,B.jsx)(nd,{text:hf(n,r)})]})]})]},e.id??t)})]}):d===`status`?(0,B.jsxs)(U,{className:`min-w-0`,children:[(0,B.jsx)(W,{title:`Status stream`,icon:`health`,path:`~/agent-coord/status.jsonl · post_status`}),x.length===0&&(0,B.jsx)(`div`,{className:`px-3 py-3 text-[13px] text-umber`,children:`empty`}),x.slice().reverse().map((e,t)=>(0,B.jsxs)(`div`,{className:`grid grid-cols-[var(--spacing-gutter)_1fr] border-b border-sand last:border-b-0`,children:[(0,B.jsx)(`div`,{className:`py-2.5 flex justify-center font-mono text-[12px] text-tan border-r border-sand`,children:`◌`}),(0,B.jsxs)(`div`,{className:`px-3 pt-2 pb-2.5 min-w-0`,children:[(0,B.jsxs)(`div`,{className:`flex gap-2 items-baseline mb-0.5`,children:[(0,B.jsx)(`span`,{className:`font-semibold text-[13px]`,children:e.agentId??e.from}),(0,B.jsxs)(`span`,{className:`font-mono text-[12px] text-ink3`,children:[pf(e.ts),` `,ff(e.ts)]})]}),(0,B.jsxs)(`div`,{className:`text-[14px]`,children:[(0,B.jsx)(G,{tone:`outline`,children:e.status??`?`}),e.detail&&(0,B.jsx)(`span`,{className:`ml-2 text-umber`,children:e.detail})]})]})]},t))]}):(0,B.jsxs)(U,{className:`grid grid-rows-[auto_auto_1fr_auto] min-h-0 min-w-0`,children:[(0,B.jsx)(W,{title:`#${f}`,icon:`room`,path:y?`${y.total} messages`:``,children:(0,B.jsxs)(G,{tone:`outline`,children:[_?.members?.length??0,` members`]})}),me>0&&(0,B.jsxs)(`button`,{onClick:()=>te({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,B.jsxs)(`span`,{className:`font-semibold`,children:[me,` unread DM`,me===1?``:`s`,` to david`]}),(0,B.jsx)(`span`,{className:`text-umber`,children:`— open your inbox →`})]}),F.length>0&&(0,B.jsxs)(`div`,{className:`mx-3 mb-1.5 flex items-center gap-1.5 flex-wrap font-mono text-[11px] text-tan`,children:[(0,B.jsx)(`span`,{className:`uppercase tracking-[.08em]`,children:`members`}),F.map(e=>(0,B.jsxs)(`button`,{onClick:()=>yd(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,B.jsx)(Lu,{id:e.agentId,role:e.role,size:14,state:e.liveness,active:e.active}),(0,B.jsx)(`span`,{children:e.agentId})]},e.agentId)),(0,B.jsx)(`span`,{className:`ml-auto`,children:(0,B.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,B.jsxs)(`div`,{className:`mx-3 mb-1.5 flex flex-wrap gap-1.5 items-center`,children:[(0,B.jsx)(`span`,{className:`font-mono text-[11px] text-tan mr-1`,children:`rooms need a prefix:`}),Ea.map(e=>(0,B.jsx)(Oa,{prefix:e},e))]}),(_?.topic||_?.motd)&&(0,B.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,B.jsxs)(`div`,{children:[(0,B.jsx)(`b`,{children:`Topic`}),` · `,_.topic]}),_.motd&&(0,B.jsxs)(`div`,{className:`mt-1 whitespace-pre-line line-clamp-4`,children:[(0,B.jsx)(`b`,{children:`MOTD`}),` · `,_.motd]})]}),(0,B.jsx)(`div`,{className:`overflow-auto max-h-[70vh] flex flex-col-reverse`,children:(0,B.jsxs)(`div`,{children:[ne&&(0,B.jsx)(`div`,{className:`px-3 py-2 border-b border-sand text-center`,children:(0,B.jsx)(K,{size:`sm`,tone:`ghost`,onClick:N,disabled:k,children:k?`loading…`:`Load older (${y.total-j.length} more)`})}),b&&(0,B.jsxs)(`div`,{className:`px-3 py-3 text-[13px] text-brick`,children:[`API error: `,b]}),M.length===0&&!b&&(0,B.jsx)(`div`,{className:`px-3 py-3 text-[13px] text-umber`,children:`No messages yet.`}),M.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,B.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,B.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,B.jsxs)(`div`,{className:`px-3 pt-2 pb-2.5 min-w-0`,children:[(0,B.jsxs)(`div`,{className:`flex gap-2 items-center mb-0.5`,children:[(0,B.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,B.jsx)(`span`,{className:`font-semibold text-[13px]`,children:e.from}),(0,B.jsxs)(`span`,{className:`font-mono text-[12px] text-ink3`,title:new Date(e.ts??0).toLocaleString(),children:[pf(e.ts),` `,ff(e.ts)]}),n&&(0,B.jsx)(G,{tone:`david`,children:`needs David`}),e.kind&&e.kind!==`chatter`&&(0,B.jsx)(`span`,{className:`font-mono text-[11px] text-tan`,children:e.kind})]}),(0,B.jsxs)(`div`,{className:`whitespace-pre-wrap break-words text-[14px]`,children:[mf(e.prefix)&&(0,B.jsx)(Oa,{prefix:e.prefix,fail:e.prefix===`VERDICT`&&/FAIL/.test(i)}),e.prefix===`DAVID_DECISION`&&e.answered&&(0,B.jsx)(G,{tone:`ok`,children:`answered`}),e.inReplyTo&&(0,B.jsx)(`button`,{onClick:()=>te({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,B.jsx)(nd,{text:hf(i,e.prefix)})]})]})]},e.id??t)})]})}),(0,B.jsxs)(`div`,{className:`border-t border-sand px-3 py-2.5 grid gap-1.5`,children:[le&&(0,B.jsxs)(`div`,{className:`text-[12px] text-umber flex gap-2 items-center`,children:[(0,B.jsxs)(`span`,{className:`font-mono`,children:[`replying to `,le.from,` · `,ff(le.ts)]}),(0,B.jsx)(`button`,{className:`border-0 bg-transparent text-ink3 cursor-pointer`,onClick:()=>{ue(null),z(``)},children:`✕`})]}),(0,B.jsxs)(`div`,{className:`grid grid-cols-[auto_auto_1fr_auto] gap-2 items-center`,children:[(0,B.jsxs)(`select`,{value:L,onChange:e=>ie(e.target.value),disabled:!re,className:`text-[13px] px-2 py-2 border border-dust rounded-kit bg-paper text-walnut font-mono`,title:`send as`,children:[(0,B.jsx)(`option`,{value:`david`,children:`as david`}),(0,B.jsx)(`option`,{value:`groundwork-console`,children:`as groundwork-console`})]}),(0,B.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,B.jsx)(`input`,{value:R,onChange:e=>z(e.target.value),onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&re&&de.hasContent(R)&&ge()},onPaste:de.onPaste,onDrop:de.onDrop,onDragOver:de.onDragOver,disabled:!re,className:`text-[13px] px-2.5 py-2 border border-dust rounded-kit bg-paper text-walnut`,placeholder:re?he.startsWith(`#`)?`FYI: … (rooms need a prefix)`:`message…`:`bus writes are off — enable in the header`}),(0,B.jsx)(K,{tone:`primary`,size:`sm`,onClick:ge,disabled:!re||ae||de.busy||!de.hasContent(R),children:ae?`Sending…`:`Send`})]}),(0,B.jsx)($u,{a:de}),se&&(0,B.jsx)(`div`,{className:`text-[12px] text-brick`,children:se}),re&&(0,B.jsxs)(`div`,{className:`text-[11px] font-mono text-tan`,children:[`every send is a Run · rooms require a prefix · `,(0,B.jsx)(`span`,{className:`text-ember-deep`,children:`DAVID_DECISION:`}),` replies are pinned (kind: decision)`]})]})]}),ee.length>0&&(0,B.jsx)(`aside`,{className:`grid gap-3.5 content-start min-w-0`,children:ee.slice(0,1).map(e=>(0,B.jsxs)(`div`,{className:`border border-ember border-l-4 rounded-kit bg-paper`,children:[(0,B.jsxs)(`div`,{className:`flex justify-between items-center px-3 py-2 border-b border-sand`,children:[(0,B.jsx)(Oa,{prefix:`DAVID_DECISION`}),(0,B.jsxs)(`span`,{className:`text-[13px] text-umber`,children:[ff(e.ts),` · `,e.from]})]}),(0,B.jsx)(`div`,{className:`px-3 py-2.5 text-[13px] whitespace-pre-wrap break-words line-clamp-6`,children:(0,B.jsx)(nd,{text:hf(e.text??``,e.prefix)})}),(0,B.jsxs)(`div`,{className:`flex gap-2 px-3 py-2 border-t border-sand`,children:[(0,B.jsx)(K,{tone:`primary`,size:`sm`,disabled:!re,onClick:()=>{ue(e),ie(`david`),z(`DAVID_DECISION: `)},children:`Reply as David`}),!re&&(0,B.jsx)(ja,{})]})]},e.id))})]})}function vf({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,B.jsxs)(`nav`,{"aria-label":`document outline`,className:`grid gap-0.5`,children:[(0,B.jsxs)(`div`,{className:`font-semibold text-[13px] uppercase tracking-[.08em] text-umber px-1 pt-1.5 pb-1`,children:[`Outline · `,r.length]}),(0,B.jsx)(`div`,{className:`max-h-[50vh] overflow-auto overscroll-contain grid gap-0 border-l border-sand ml-1`,children:r.map(e=>(0,B.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,B.jsx)(`span`,{className:`block truncate`,children:e.text})},e.id))})]})}var yf=[[/^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`]],bf=/^(templates\/|phases\/templates\/|\.groundwork\/)/,xf=/^(QUEUE|DONE|WORKSTREAMS|FACTS)\.md$/i,Sf=e=>yf.find(([t])=>t.test(e)),Cf=({children:e})=>(0,B.jsx)(`div`,{className:`font-mono font-semibold text-[11px] uppercase tracking-[.1em] text-ink3 mt-4 mb-1.5 first:mt-0`,children:e}),wf=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 Tf(){let{current:e}=Ha(),{doc:t}=lr(),n=q(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=q(`/knowledge`,6e4).data,c=q(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&&(xf.test(a)||o),p=q(`/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]=Fi(),A=ar(),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 La(e,a,{content:g,ifMatch:b});x(t.sha),y(g),C(`saved`),c.refresh(),n.refresh()}catch(e){C(e.message)}}},[e,a,b,g,c,n]);(0,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??``,ie=(0,P.useRef)(null),R=(0,P.useCallback)(()=>N===`source`?null:ie.current?.querySelector(`.md`)??null,[N]),z=l?.git,ae=(0,P.useMemo)(()=>{let e=[];return z?.lastCommit&&D&&e.push({kind:`commit`,label:`${z.lastCommit.short} · ${z.lastCommit.subject} · ${z.lastCommit.author} · ${wf(z.lastCommit.date)}`,hunks:z.lastCommit.hunks}),z&&T&&z.uncommitted.length&&e.push({kind:`uncommitted`,label:`working tree vs HEAD`,hunks:z.uncommitted}),e},[z,D,T]),oe=new Set(r?.lastCommit?.files??[]),se=q(e?`/projects/${e}/agents`:null,3e4).data??{aide:null,coordinator:null};return(0,B.jsxs)(`div`,{className:`grid grid-cols-[260px_1fr_320px] min-h-full max-[1100px]:grid-cols-1`,children:[(0,B.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,B.jsx)(Cf,{children:`${e||`project`} · docs/`}),i.length===0&&(0,B.jsx)(`div`,{className:`text-[12px] text-umber px-1.5`,children:`no docs/ found`}),(()=>{let e=i.filter(e=>!bf.test(e)),t=yf.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,B.jsxs)(V,{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,B.jsx)(`span`,{className:`${e===a?`text-umber`:`text-tan`}`,children:n?wa[n]({size:14}):wa.docs({size:14})}),(0,B.jsx)(`span`,{className:`truncate ${t?`font-sans`:`font-mono`}`,children:t??e.replace(/^phases\//,``)}),(0,B.jsxs)(`span`,{className:`flex gap-1 items-center`,children:[i===`??`?(0,B.jsx)(`span`,{className:`text-[10px] font-mono font-semibold text-tan`,children:`new`}):i?(0,B.jsx)(`span`,{className:`w-2 h-2 rounded-full bg-amber`,title:`uncommitted (${i})`}):null,oe.has(e)&&(0,B.jsx)(`span`,{className:`w-2 h-2 rounded-full bg-leaf`,title:`in last commit ${r?.lastCommit?.short}`})]})]},e)};return(0,B.jsxs)(B.Fragment,{children:[t.length>0&&(0,B.jsxs)(B.Fragment,{children:[(0,B.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=Sf(e);return(0,B.jsx)(s,{f:e,label:t[1],icon:t[2]},e)})]}),n.length>0&&(0,B.jsxs)(B.Fragment,{children:[(0,B.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,B.jsx)(s,{f:e,icon:`phases`},e))]}),o.length>0&&(0,B.jsxs)(B.Fragment,{children:[(0,B.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,B.jsx)(s,{f:e},e))]}),i.length!==e.length&&(0,B.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,B.jsxs)(`div`,{className:`mt-3 px-1.5 text-[11px] font-mono text-ink3 leading-[1.5]`,children:[(0,B.jsx)(`span`,{className:`inline-block w-2 h-2 rounded-full bg-leaf mr-1`}),`last docs commit `,(0,B.jsx)(`b`,{className:`text-walnut`,children:r.lastCommit.short}),` · `,wf(r.lastCommit.date),(0,B.jsx)(`div`,{className:`truncate text-tan`,title:r.lastCommit.subject,children:r.lastCommit.subject})]}),(0,B.jsx)(Cf,{children:`Knowledge · global${s?.exists?``:` · not configured`}`}),s&&!s.exists&&(0,B.jsxs)(`div`,{className:`text-[12px] text-umber px-1.5`,children:[`No knowledge repo — run `,(0,B.jsx)(`code`,{children:`groundwork knowledge init`}),` (or `,(0,B.jsx)(`code`,{children:`link <dir>`}),`).`]}),s?.exists&&(()=>{let e=({file:e,label:t,sub:n,icon:r=`knowledge`})=>{let i=`kb:${e}`;return(0,B.jsxs)(V,{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,B.jsx)(`span`,{className:i===a?`text-umber`:`text-tan`,children:wa[r]({size:14})}),(0,B.jsx)(`span`,{className:`truncate`,children:t}),n&&(0,B.jsx)(`span`,{className:`font-mono text-[10px] text-tan`,children:n})]},i)};return(0,B.jsxs)(B.Fragment,{children:[s.index&&(0,B.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,B.jsxs)(`div`,{children:[(0,B.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,B.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,B.jsxs)(`div`,{children:[(0,B.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,B.jsx)(e,{file:t.file,label:`${t.id} · ${t.title}`},t.file))]}),s.notes.length>0&&(0,B.jsxs)(`div`,{children:[(0,B.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,B.jsx)(e,{file:t.file,label:t.title??t.file.replace(/^notes\//,``),icon:`docs`},t.file))]}),(0,B.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,B.jsxs)(`main`,{ref:ie,className:`px-10 py-7 pb-16 bg-paper min-w-0`,children:[(0,B.jsxs)(`div`,{className:`flex items-center justify-between gap-3 mb-2 flex-wrap`,children:[(0,B.jsxs)(`div`,{className:`font-mono text-[12px] text-ink3 truncate`,children:[l?.path??a??``,d&&` · loading…`,m&&w&&` · unsaved`]}),(0,B.jsxs)(`div`,{className:`flex gap-1.5 items-center flex-wrap`,children:[z&&!z.repo&&(0,B.jsx)(G,{tone:`outline`,children:`not a git repo`}),z?.repo&&z.untracked&&(0,B.jsx)(G,{tone:`warn`,children:`untracked file`}),z?.repo&&z.tracked&&(0,B.jsxs)(B.Fragment,{children:[(0,B.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&&z.uncommitted.length?`bg-amber-wash text-amber border-amber-line`:`bg-paper text-umber border-dust`}`,title:`working tree vs HEAD`,children:[(0,B.jsx)(`span`,{className:`w-2 h-2 rounded-full bg-amber`}),`uncommitted · `,z.uncommitted.length,` hunk`,z.uncommitted.length===1?``:`s`]}),z.lastCommit&&(0,B.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:`${z.lastCommit.subject} · ${z.lastCommit.author}`,children:[(0,B.jsx)(`span`,{className:`w-2 h-2 rounded-full bg-leaf`}),`last commit `,z.lastCommit.short,` · `,wf(z.lastCommit.date)]})]}),(0,B.jsx)(`span`,{className:`w-px h-5 bg-sand mx-1`}),(0,B.jsx)(K,{tone:`ghost`,size:`sm`,"aria-pressed":N===`rendered`,onClick:()=>ee(`rendered`),children:`Rendered`}),(0,B.jsx)(K,{tone:`ghost`,size:`sm`,"aria-pressed":N===`source`,onClick:()=>ee(`source`),children:`Source`}),(0,B.jsx)(K,{tone:`ghost`,size:`sm`,"aria-pressed":N===`split`,onClick:()=>ee(`split`),children:`Split`}),(0,B.jsx)(`span`,{className:`w-px h-5 bg-sand mx-1`}),o?(0,B.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,B.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,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(K,{size:`sm`,onClick:te,children:`Discard`}),(0,B.jsx)(K,{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,B.jsx)(`span`,{className:`font-mono text-[11px] text-tan`,children:`seam writes are off (header → seam)`}),S===`saved`&&!w&&(0,B.jsx)(`span`,{className:`font-mono text-[11px] text-moss`,children:`saved`}),S&&S!==`saving`&&S!==`saved`&&(0,B.jsx)(`span`,{className:`font-mono text-[11px] text-brick max-w-[28ch] truncate`,title:S,children:S})]}):(0,B.jsx)(K,{size:`sm`,onClick:I,disabled:!l,title:`Edit this file in Split (source + preview). Save writes docs/ as a Run.`,children:`Edit`})]})]}),u&&(0,B.jsxs)(`div`,{className:`text-[13px] text-brick`,children:[`Could not load: `,u]}),l&&N===`rendered`&&(0,B.jsx)(`div`,{onClick:M,children:(0,B.jsx)(Tu,{source:L,changes:m?[]:ae})}),l&&N===`source`&&(m?(0,B.jsx)(Ef,{value:g,onChange:_,readOnly:!p}):(0,B.jsx)(Df,{src:l.source,g:z,showUncommitted:T,showCommit:D,jumpLine:F})),l&&N===`split`&&(0,B.jsxs)(`div`,{className:`grid grid-cols-2 gap-4 items-start`,children:[(0,B.jsx)(`div`,{className:`min-w-0`,onClick:M,children:(0,B.jsx)(Tu,{source:L,changes:m?[]:ae})}),(0,B.jsx)(`div`,{className:`min-w-0 sticky top-2`,children:m?(0,B.jsx)(Ef,{value:g,onChange:_,readOnly:!p}):(0,B.jsx)(Df,{src:l.source,g:z,showUncommitted:T,showCommit:D,jumpLine:F})})]}),l&&ae.length>0&&(0,B.jsxs)(`div`,{className:`mt-6 text-[12px] font-mono text-ink3`,children:[`Hover a highlighted block for its diff · `,(0,B.jsx)(`span`,{className:`text-amber`,children:`amber`}),` = uncommitted, `,(0,B.jsx)(`span`,{className:`text-leaf`,children:`green`}),` = last commit touching this file.`]})]}),(0,B.jsxs)(`aside`,{className:`bg-cream border-l border-sand p-3.5 max-[1100px]:hidden`,children:[N!==`source`&&(0,B.jsx)(`div`,{className:`mb-3`,children:(0,B.jsx)(vf,{root:R,deps:[L,N,a]})}),(0,B.jsx)(`div`,{className:`flex justify-between items-center px-1 pt-1.5 pb-2`,children:(0,B.jsx)(`span`,{className:`font-semibold text-[13px] uppercase tracking-[.08em] text-umber`,children:`Ask an agent`})}),(0,B.jsxs)(`div`,{className:`grid gap-2 px-1 text-[13px]`,children:[(0,B.jsxs)(`div`,{className:`text-[12px] text-umber`,children:[`Summon opens the DM thread with its context line set to `,(0,B.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,B.jsxs)(`div`,{className:`flex gap-1.5 flex-wrap`,children:[(0,B.jsx)(K,{size:`sm`,tone:`primary`,onClick:()=>yd(se.aide??``),disabled:!se.aide,title:se.aide?`DM ${se.aide} about this doc`:`no live aide`,children:`Aide`}),(0,B.jsx)(K,{size:`sm`,onClick:()=>yd(se.coordinator??``),disabled:!se.coordinator,title:se.coordinator?`DM ${se.coordinator}`:`no live coordinator`,children:`Coordinator`}),(0,B.jsx)(K,{size:`sm`,tone:`ghost`,onClick:()=>yd(``),title:`pick from the radial`,children:`Other…`})]})]}),z?.lastCommit&&(0,B.jsxs)(`div`,{className:`mt-4 px-1 text-[12px] font-mono text-ink3 leading-[1.6]`,children:[(0,B.jsx)(`div`,{className:`text-umber font-sans font-semibold text-[13px] mb-1`,children:`Last change to this file`}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`b`,{className:`text-walnut`,children:z.lastCommit.short}),` · `,z.lastCommit.author]}),(0,B.jsx)(`div`,{children:new Date(z.lastCommit.date).toLocaleString()}),(0,B.jsx)(`div`,{className:`text-walnut mt-1 font-sans`,children:z.lastCommit.subject}),(0,B.jsxs)(`div`,{className:`mt-1 text-tan`,children:[z.lastCommit.hunks.length,` hunk`,z.lastCommit.hunks.length===1?``:`s`]})]})]})]})}function Ef({value:e,onChange:t,readOnly:n}){return(0,B.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 Df({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,B.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,B.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,B.jsx)(`span`,{className:`text-right select-none ${u?`text-ember font-semibold`:`text-tan`}`,children:s}),(0,B.jsx)(`span`,{children:e||` `})]},o)})})}var Of=e=>/done|merged|deployed|complete|closed|✅/i.test(e),kf=e=>Of(e)?`ok`:/block/i.test(e)?`bad`:/queued|hold|wait/i.test(e)?`warn`:`neutral`;function Af({project:e}){let t=q(e?`/projects/${e}/board`:null,15e3).data,n=q(`/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=>!Of(e.status)),a=e=>n.find(t=>t.agentId===e||e.includes(t.agentId))?.agentId??null;return(0,B.jsxs)(`div`,{className:`border border-sand rounded-kit bg-paper px-3 py-2 grid gap-1.5`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,B.jsx)(`span`,{className:`font-mono text-[10px] uppercase tracking-[.1em] text-tan`,children:`now`}),r?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(V,{to:`/board`,className:`font-semibold text-[13px] hover:no-underline text-walnut hover:text-ember-deep`,children:r.title}),(0,B.jsx)(G,{tone:r.state===`ongoing`?`david`:`neutral`,children:r.state}),(0,B.jsxs)(`span`,{className:`font-mono text-[11px] text-ink3`,children:[r.done,`/`,r.total,` tasks`,r.streams?` · ${r.streams} streams`:``]})]}):(0,B.jsx)(`span`,{className:`text-[13px] text-umber`,children:`no phase in flight`}),(0,B.jsxs)(`span`,{className:`ml-auto font-mono text-[11px] text-ink3`,children:[i.length,` active stream`,i.length===1?``:`s`]})]}),i.length>0&&(0,B.jsx)(`div`,{className:`flex gap-1.5 flex-wrap`,children:i.slice(0,8).map(e=>{let t=a(e.owner);return(0,B.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,B.jsx)(ld,{id:t,bare:!0,size:`sm`}):(0,B.jsxs)(`span`,{className:`inline-flex items-center gap-1 font-mono text-[12px] text-umber`,children:[(0,B.jsx)(Lu,{id:e.owner,size:14,state:`dead`}),e.owner]}),(0,B.jsx)(`span`,{className:`text-[12px] truncate`,children:e.name}),(0,B.jsx)(G,{tone:kf(e.status),children:e.status.replace(/^[^\w]+/,``).slice(0,18)})]},e.name)})})]})}var jf=`/api`,Mf=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 Nf(){let{current:e}=Ha(),{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=q(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(`${jf}/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))if(t&&N(e)){let e=t.scrollHeight-t.clientHeight;Math.abs(t.scrollTop-e)>1&&(t.scrollTop=e)}},[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];if(t){let e=t.scrollHeight-t.clientHeight;Math.abs(t.scrollTop-e)>1&&(t.scrollTop=e)}},I=f.filter(e=>e.active).length;return(0,B.jsxs)(`div`,{className:`p-4 grid gap-3.5 content-start [overflow-anchor:none]`,children:[g&&(0,B.jsx)(id,{agentId:g,onClose:()=>_(null)}),(0,B.jsxs)(`div`,{className:`flex items-baseline justify-between flex-wrap gap-2`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`span`,{className:`font-display font-bold text-[34px] leading-[1.1] tracking-[-.015em] text-ember`,children:`Monitor`}),(0,B.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,B.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,B.jsxs)(`span`,{className:`inline-flex border border-dust rounded-kit overflow-hidden`,children:[(0,B.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,B.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,B.jsxs)(`span`,{className:`inline-flex border border-dust rounded-kit overflow-hidden`,children:[(0,B.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,B.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,B.jsx)(`span`,{className:`inline-flex border border-dust rounded-kit overflow-hidden`,children:[1,2,3].map(e=>(0,B.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,B.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,B.jsxs)(`option`,{value:e,children:[e,`px`]},e))}),(0,B.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,B.jsxs)(`option`,{value:e,children:[e,` lines`]},e))}),(0,B.jsxs)(`label`,{className:`font-mono text-[11px] text-ink3 flex items-center gap-1`,children:[(0,B.jsx)(`input`,{type:`checkbox`,checked:b,onChange:e=>x(e.target.checked)}),`colors`]}),(0,B.jsx)(K,{size:`sm`,onClick:()=>y(e=>!e),"aria-pressed":v,children:v?`Resume`:`Pause`})]})]}),n===`project`&&e&&(0,B.jsx)(Af,{project:e}),m&&(0,B.jsx)(U,{className:`px-4 py-3 text-[13px] text-brick`,children:m}),f.length===0&&!m&&(0,B.jsxs)(U,{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,B.jsxs)(B.Fragment,{children:[` Try `,(0,B.jsx)(`button`,{className:`underline text-ember-deep bg-transparent border-0 p-0 cursor-pointer`,onClick:()=>r(`all`),children:`all projects`}),`.`]})]}),(0,B.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,B.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,B.jsxs)(U,{className:`grid grid-rows-[auto_1fr_auto]`,children:[(0,B.jsx)(`div`,{style:{height:4,background:dd(e.role)}}),(0,B.jsxs)(`div`,{className:`flex items-center gap-2 px-3 border-b border-sand min-w-0 h-[46px]`,children:[(0,B.jsx)(Lu,{id:e.agentId,role:e.role,size:20,state:e.liveness,active:e.active}),(0,B.jsxs)(`span`,{className:`min-w-0`,children:[(0,B.jsx)(`span`,{className:`block font-mono font-semibold text-[13px] truncate leading-tight`,children:e.agentId}),(0,B.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,B.jsxs)(`span`,{className:`text-ink3 normal-case tracking-normal`,children:[` · `,T(e.agentId).map(e=>e.name).join(` · `)]}):``]})]}),n===`all`&&e.project&&(0,B.jsx)(`span`,{className:`font-mono text-[11px] text-tan truncate`,children:e.project}),(0,B.jsxs)(`span`,{className:`ml-auto flex items-center gap-1.5 shrink-0`,children:[(0,B.jsx)(`span`,{className:`font-mono text-[11px] text-ink3`,title:`last pane output`,children:e.active?(0,B.jsx)(G,{tone:`ok`,children:`active`}):(0,B.jsxs)(`span`,{className:`text-tan`,children:[`quiet `,Mf(e.paneActivity)]})}),!N(e.agentId)&&(0,B.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,B.jsx)(`button`,{className:`font-mono text-[11px] text-ember-deep bg-transparent border-0 cursor-pointer`,onClick:()=>yd(e.agentId),title:`DM this agent (Summon)`,children:`DM`}),(0,B.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,B.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?mo(e.capture.ansi):e.capture.text,e.project??void 0):`—`})]})},e.agentId))}),(0,B.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 Pf=[{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 Ff(){let{running:e}=Ga(),t=rr(),n=Pf.find(e=>t.pathname.startsWith(`/ops/${e.to}`));return(0,B.jsxs)(`div`,{className:`grid grid-rows-[auto_1fr] min-h-0`,children:[(0,B.jsxs)(`div`,{className:`px-4 pt-3 flex items-end gap-1 border-b border-sand bg-cream/60`,children:[(0,B.jsx)(`span`,{className:`font-mono text-[10px] uppercase tracking-[.1em] text-tan mr-2 pb-2.5`,children:`ops`}),Pf.map(t=>(0,B.jsxs)(ji,{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,B.jsx)(`span`,{className:`text-tan`,children:wa[t.icon]({size:14})}),t.label,t.to===`runs`&&e>0?(0,B.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,B.jsx)(`span`,{className:`ml-auto pb-2.5 font-mono text-[11px] text-tan hidden lg:inline`,children:n.hint})]}),(0,B.jsx)(Rr,{})]})}function If(){return(0,B.jsx)(`div`,{className:`p-4`,children:(0,B.jsx)(Bd,{})})}function Lf({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 Ia(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,B.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,B.jsxs)(`div`,{className:`font-mono text-[12px]`,children:[t===`preview`?(0,B.jsx)(G,{tone:`warn`,children:`preview · nothing written`}):(0,B.jsx)(G,{tone:e.status===`ok`?`ok`:`bad`,children:e.status}),` `,(0,B.jsx)(`b`,{children:e.label})]}),(0,B.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,B.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,B.jsxs)(`div`,{className:`w-[600px] bg-paper border rounded-kit shadow-panel ${t?`border-brick`:`border-sand`}`,children:[(0,B.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,B.jsxs)(`div`,{className:`p-4 grid gap-3 text-[13px] text-umber`,children:[n,o&&!h&&(0,B.jsx)(`div`,{children:(0,B.jsx)(K,{size:`sm`,onClick:v,disabled:d,children:d?`…`:`Preview (dry-run · writes nothing)`})}),h&&y(h,`preview`),!p&&(0,B.jsxs)(`label`,{className:`grid gap-1`,children:[(0,B.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,B.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,B.jsxs)(`div`,{className:`px-4 py-3 border-t border-sand flex justify-end gap-2`,children:[(0,B.jsx)(K,{size:`sm`,onClick:s,children:p?`Close`:`Cancel`}),!p&&(0,B.jsx)(K,{size:`sm`,tone:`primary`,onClick:_,disabled:l!==r||d,children:d?(0,B.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,B.jsx)(Na,{}),` Running…`]}):o?`Apply`:`Run`})]})]})})}var Rf=`18px 1.6fr 1fr 1fr 1fr 1.2fr auto`,zf=[[`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`]],Bf=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 Vf(){let{current:e,projects:t}=Ha(),{data:n,error:r,loading:i}=q(`/bus/agents`,2e4),[a,o]=(0,P.useState)(`project`),{runs:s}=Ga(),c=q(`/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=q(`/health`,6e4).data?.requires?.paths?.kitCheckout??null,h=d?.result,g=async()=>{u(!0);try{await Ia(`/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=q(a===`project`&&e?`/projects/${e}/fleet`:null,2e4).data,O=q(`/admin/bus-writes`,1e4).data?.enabled??!1,k=ar(),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,B.jsxs)(`div`,{className:`grid grid-cols-[1fr_340px] gap-4 p-4 max-[980px]:grid-cols-1`,children:[(0,B.jsxs)(`div`,{className:`grid gap-3.5 content-start min-w-0`,children:[(0,B.jsxs)(`div`,{className:`flex items-start justify-between gap-3 flex-wrap`,children:[(0,B.jsxs)(`div`,{className:`min-w-0`,children:[(0,B.jsx)(`span`,{className:`font-display font-bold text-[34px] leading-[1.1] tracking-[-.015em] text-ember`,children:`Fleets`}),(0,B.jsxs)(`span`,{className:`ml-3 text-[13px] text-umber whitespace-nowrap`,children:[a===`project`?`${e} · `:`all projects · `,N.length,` registered · `,I,` live`]})]}),(0,B.jsxs)(`div`,{className:`flex items-center gap-1.5 flex-wrap justify-end`,children:[(0,B.jsxs)(`span`,{className:`inline-flex border border-dust rounded-kit overflow-hidden whitespace-nowrap`,children:[(0,B.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,B.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,B.jsx)(K,{size:`sm`,onClick:()=>k(`/monitor`),children:`Monitor`}),(0,B.jsx)(K,{size:`sm`,tone:`primary`,onClick:()=>w(!0),title:`spawn an agent into tmux for this project`,children:`Spawn agent…`}),(0,B.jsxs)(`div`,{className:`relative`,children:[(0,B.jsx)(K,{size:`sm`,onClick:()=>E(e=>!e),"aria-expanded":T,children:`Admin ▾`}),T&&(0,B.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,B.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,B.jsx)(`div`,{className:`font-mono text-[11px] text-tan`,children:`MCP doctor as groundwork-console · read-only`})]}),(0,B.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,B.jsx)(`div`,{className:`font-mono text-[11px] text-tan`,children:`old messages/status/inbox · dry-run first`})]}),(0,B.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,B.jsx)(`div`,{className:`font-mono text-[11px] text-tan`,children:`force_unregister agents inactive > 24 h`})]}),j&&(0,B.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,B.jsx)(`div`,{className:`font-mono text-[11px] text-tan`,children:`unregister members + delete room`})]}),!O&&(0,B.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,B.jsx)(Kd,{project:e,canWrite:O,onClose:()=>{w(!1)}}),x&&(0,B.jsx)(id,{agentId:x,onClose:()=>S(null)}),y?.kind===`fix`&&(0,B.jsx)(Lf,{title:`Bus doctor · fix fixable (${f.length})`,confirmWord:`FIX`,action:`/actions/bus-doctor`,payload:{fix:!0},onClose:()=>{b(null),g()},body:(0,B.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,B.jsxs)(`div`,{children:[`Runs the MCP `,(0,B.jsx)(`code`,{children:`doctor`}),` with `,(0,B.jsx)(`code`,{children:`fix: true`}),` as `,(0,B.jsx)(`code`,{children:`groundwork-console`}),` — only its own fix path, only the findings it tags `,(0,B.jsx)(`b`,{children:`fixable`}),`. Before/after counts and the delta are shown in the result; nothing in `,(0,B.jsx)(`code`,{children:`~/agent-coord`}),` is edited by hand. Gated by bus writes.`]}),(0,B.jsx)(`ul`,{className:`m-0 pl-4 grid gap-0.5`,children:f.map(e=>(0,B.jsxs)(`li`,{children:[(0,B.jsx)(`code`,{children:e.check}),e.detail?(0,B.jsxs)(`span`,{className:`text-umber`,children:[` — `,e.detail.slice(0,120)]}):null]},e.check))}),!O&&(0,B.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,B.jsx)(Lf,{title:`Rebuild kit MCP`,confirmWord:`BUILD`,action:`/actions/rebuild-kit-mcp`,payload:{},onClose:()=>{b(null),g()},body:(0,B.jsxs)(`div`,{children:[`dist-behind-source is not doctor-fixable: the kit checkout's `,(0,B.jsx)(`code`,{children:`src/`}),` is newer than `,(0,B.jsx)(`code`,{children:`dist/`}),`. Runs `,(0,B.jsx)(`code`,{children:`pnpm --filter agent-coord-mcp build`}),` in `,(0,B.jsx)(`code`,{children:m}),` (the doctor's own advice: `,(0,B.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,B.jsx)(Lf,{title:`Prune bus data`,confirmWord:`PRUNE`,action:`/actions/prune`,payload:{dryRun:!1,olderThanDays:30,targets:[`rooms`,`status`,`inbox`,`receipts`,`members`],removeOrphanInboxes:!0},preview:()=>Ia(`/actions/prune`,{dryRun:!0,olderThanDays:30,targets:[`rooms`,`status`,`inbox`,`receipts`,`members`],removeOrphanInboxes:!0}),onClose:()=>b(null),body:(0,B.jsxs)(`div`,{children:[`MCP `,(0,B.jsx)(`code`,{children:`prune`}),`: removes room messages / status entries / inbox items / receipts older than `,(0,B.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,B.jsx)(Lf,{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,B.jsxs)(`div`,{children:[(0,B.jsx)(`code`,{children:`force_unregister`}),` for every agent in `,(0,B.jsx)(`b`,{children:a===`project`?e:`all projects`}),` whose last activity is over 24 h old: `,(0,B.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,B.jsx)(Lf,{danger:!0,title:`Unregister ${y.id}`,confirmWord:y.id,action:`/actions/unregister`,payload:{agentId:y.id},onClose:()=>b(null),body:(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`code`,{children:`force_unregister`}),` `,(0,B.jsx)(`b`,{children:y.id}),`. Requires bus writes on.`]})}),_&&j&&(0,B.jsx)(Hf,{room:j,project:e,agents:M.map(e=>e.agentId),onClose:()=>v(!1)}),r&&(0,B.jsxs)(U,{className:`px-4 py-3 text-[13px] text-brick`,children:[`API error: `,r]}),a===`project`&&D?.state===`present`&&(0,B.jsxs)(U,{children:[(0,B.jsx)(W,{title:`Fleet`,icon:`fleet`,path:`${D.live.length} live · topology`}),(0,B.jsx)(`div`,{className:`px-3 py-3`,children:(0,B.jsx)(qd,{project:e,fleet:D,canWrite:O,onOpenPane:e=>S(e)})})]}),a===`project`&&(0,B.jsx)(Xd,{project:e,canWrite:O}),N.length===0&&!i&&a===`all`&&(0,B.jsx)(U,{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,B.jsxs)(U,{children:[a===`all`&&(0,B.jsx)(W,{title:t.title,icon:`fleet`,path:`${t.path} · ${n.length} agent${n.length===1?``:`s`}`,children:!t.registered&&(0,B.jsx)(G,{tone:`outline`,children:`not registered`})}),(0,B.jsxs)(Aa,{cols:Rf,children:[(0,B.jsx)(`span`,{}),(0,B.jsx)(`span`,{children:`Agent`}),(0,B.jsx)(`span`,{children:`Role`}),(0,B.jsx)(`span`,{children:`Project`}),(0,B.jsx)(`span`,{children:`Transport`}),(0,B.jsx)(`span`,{children:`Pane · last seen`}),(0,B.jsx)(`span`,{})]}),n.map(e=>(0,B.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:Rf},children:[(0,B.jsx)(Ma,{state:e.liveness,active:e.active}),(0,B.jsx)(`span`,{className:`font-mono font-medium text-[13px] truncate`,children:e.agentId}),(0,B.jsx)(`span`,{className:`text-umber text-[13px] truncate`,children:e.role??`—`}),(0,B.jsx)(`span`,{className:`font-mono text-[13px] truncate`,children:e.project??`—`}),(0,B.jsx)(`span`,{className:`justify-self-start`,children:e.transport?(0,B.jsx)(G,{tone:`outline`,children:e.transport}):e.liveness===`dead`?(0,B.jsx)(`span`,{className:`font-mono text-[12px] text-tan`,children:`—`}):(0,B.jsx)(G,{tone:`warn`,children:`not attached`})}),(0,B.jsxs)(`span`,{className:`font-mono text-[12px] text-ink3`,children:[e.pane?(0,B.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}):`—`,` · `,Bf(e.heartbeatAgeMs),e.paneCommand?(0,B.jsxs)(`span`,{className:`text-tan`,children:[` · `,e.paneCommand]}):``]}),e.liveness===`dead`?(0,B.jsx)(K,{tone:`ghost`,size:`sm`,onClick:()=>b({kind:`one`,id:e.agentId}),children:`Unregister`}):(0,B.jsx)(K,{tone:`ghost`,size:`sm`,onClick:()=>yd(e.agentId),children:`DM`})]},e.agentId))]},e)})]}),(0,B.jsxs)(`aside`,{className:`grid gap-3.5 content-start min-w-0`,children:[(0,B.jsxs)(U,{children:[(0,B.jsx)(W,{title:`Liveness rule`,icon:`health`,path:`pane activity ∨ heartbeat`}),(0,B.jsxs)(`div`,{className:`px-3 py-2 text-[13px] text-umber`,children:[`last seen = freshest of tmux `,(0,B.jsx)(`code`,{children:`window_activity`}),`, heartbeat, transport/inbox mtimes · `,(0,B.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,B.jsxs)(U,{children:[(0,B.jsx)(W,{title:`Roles`,icon:`fleet`,path:`playbook ${c?.packages?.playbook?.version??`…`}`}),(0,B.jsx)(`div`,{className:`px-3 pt-1.5 pb-2.5 grid gap-1 text-[13px] text-umber`,children:zf.map(([e,t])=>(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`b`,{className:`text-walnut`,children:e}),` — `,t]},e))})]}),(0,B.jsxs)(U,{children:[(0,B.jsx)(W,{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,B.jsx)(G,{tone:h.healthy?`ok`:`warn`,children:h.healthy?`healthy`:`${h.summary.warn} warn · ${h.summary.error} error`})}),!h&&(0,B.jsxs)(`div`,{className:`px-3 py-2 text-[13px] text-umber`,children:[`Press `,(0,B.jsx)(`b`,{children:`Run doctor`}),` — calls the MCP `,(0,B.jsx)(`code`,{children:`doctor`}),` tool as `,(0,B.jsx)(`code`,{children:`groundwork-console`}),` (automation). Read-only; `,(0,B.jsx)(`code`,{children:`fix`}),` stays gated.`]}),h?.findings.filter(e=>e.level!==`ok`).map(e=>(0,B.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,B.jsx)(`div`,{className:`self-stretch flex items-center justify-center font-mono text-[12px] text-tan border-r border-sand`,children:`!`}),(0,B.jsxs)(`div`,{className:`px-3 py-2 min-w-0`,children:[(0,B.jsx)(G,{tone:e.level===`error`?`bad`:`warn`,children:e.check}),e.fixable&&(0,B.jsx)(`span`,{className:`ml-1.5 inline-flex`,children:(0,B.jsx)(G,{tone:`outline`,children:`fixable`})}),e.detail&&(0,B.jsx)(`div`,{className:`text-[13px] text-umber mt-1 break-words`,children:e.detail})]})]},e.check)),h&&(0,B.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,B.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,B.jsxs)(`span`,{className:`ml-auto flex gap-1.5`,children:[f.length>0&&(0,B.jsxs)(K,{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,B.jsx)(K,{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,B.jsx)(K,{size:`sm`,onClick:()=>yd(ee??``,{answers:void 0}),disabled:!ee,title:ee?`ask ${ee} to publish/rebuild the MCP`:`no live kit coordinator`,children:`Ask kit coordinator`}))]})]})]})]})]})}function Hf({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,B.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,B.jsxs)(`div`,{className:`w-[560px] bg-paper border border-brick rounded-kit shadow-panel`,children:[(0,B.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,B.jsxs)(`div`,{className:`p-4 grid gap-3 text-[13px]`,children:[(0,B.jsxs)(`div`,{className:`text-umber`,children:[`This will `,(0,B.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,B.jsxs)(`b`,{className:`text-walnut`,children:[`delete_room #`,e]}),` (message history is kept in `,(0,B.jsx)(`code`,{children:`~/agent-coord/history`}),`). Repo and seam files are never touched.`]}),(0,B.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,B.jsx)(`input`,{type:`checkbox`,checked:o,onChange:e=>s(e.target.checked)}),` also remove `,(0,B.jsx)(`b`,{children:t}),` from groundwork-console.config.json`]}),(0,B.jsxs)(`label`,{className:`grid gap-1`,children:[(0,B.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Type the room name to confirm`}),(0,B.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,B.jsxs)(`div`,{className:`text-[12px] text-umber`,children:[`Bus writes are gated: without `,(0,B.jsx)(`code`,{children:`GROUNDWORK_CONSOLE_BUS_WRITES=1`}),` on the API this runs as a `,(0,B.jsx)(`b`,{children:`dry-run`}),` and records what it would do (see Runs). With the switch on, it executes as `,(0,B.jsx)(`code`,{children:`groundwork-console`}),`.`]}),u&&(0,B.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,B.jsxs)(`div`,{className:`font-mono text-[12px]`,children:[(0,B.jsx)(G,{tone:u.status===`ok`?`ok`:`bad`,children:u.status}),` `,(0,B.jsx)(`b`,{children:u.label})]}),(0,B.jsx)(`pre`,{className:`m-0 mt-1 font-mono text-[12px] whitespace-pre-wrap`,children:u.log.join(`
40
+ `)})]})]}),(0,B.jsxs)(`div`,{className:`px-4 py-3 border-t border-sand flex justify-end gap-2`,children:[(0,B.jsx)(K,{size:`sm`,onClick:r,children:u?`Close`:`Cancel`}),!u&&(0,B.jsx)(K,{size:`sm`,tone:`primary`,onClick:async()=>{l(!0);try{d(await Ia(`/actions/decommission`,{room:e,confirm:i,removeProject:o}))}finally{l(!1)}},disabled:i!==e||c,children:c?`Running…`:`Decommission`})]})]})})}var Uf=`1.4fr .6fr .9fr .9fr 1.2fr 2fr`,Wf=({on:e,label:t})=>(0,B.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}),Gf=e=>e?e.replace(/^\/Users\/[^/]+/,`~`):null;function Kf(){let{current:e}=Ha(),{data:t,error:n,refresh:r}=q(e?`/projects/${e}/skills`:null,6e4),[i,a]=(0,P.useState)(null),[o,s]=(0,P.useState)(!1),c=q(i===`pb`||i===`reload`?`/actions/reload-skills`:null,3e4);if(n)return(0,B.jsx)(`div`,{className:`p-4`,children:(0,B.jsxs)(U,{className:`px-4 py-3 text-[13px] text-brick`,children:[`API error: `,n]})});if(!t)return(0,B.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,B.jsxs)(`div`,{className:`grid grid-cols-[1fr_340px] gap-4 p-4 max-[980px]:grid-cols-1`,children:[i===`gwinit`&&(0,B.jsx)(Lf,{title:`groundwork init · ${e}`,confirmWord:e,action:`/actions/groundwork-init/${e}`,payload:{},onClose:()=>{a(null),r()},body:(0,B.jsxs)(`div`,{children:[`Runs `,(0,B.jsx)(`code`,{children:`groundwork init <repo>`}),` — installs the skills, IDE mirrors and the `,(0,B.jsx)(`code`,{children:`docs/`}),` scaffold (WORKSTREAMS/QUEUE/DONE/FACTS, methodology, templates, phases/) into the working tree. Nothing is committed; review with `,(0,B.jsx)(`code`,{children:`git status`}),`. Only offered when `,(0,B.jsx)(`code`,{children:`docs/.groundwork/VERSION`}),` is missing.`]})}),i===`gw`&&(0,B.jsx)(Lf,{title:`groundwork update · ${e}`,confirmWord:e,action:`/actions/groundwork-update/${e}`,payload:{all:!0,docs:!0},onClose:()=>{a(null),r()},body:(0,B.jsxs)(`div`,{children:[`Runs `,(0,B.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,B.jsx)(`code`,{children:`docs/.groundwork/VERSION`}),`. `,(0,B.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,B.jsx)(Lf,{title:`agent-coordination update (global)`,confirmWord:`UPDATE`,action:`/actions/playbook-update`,payload:{dryRun:!1},preview:()=>Ia(`/actions/playbook-update`,{dryRun:!0}),onDone:()=>s(!0),onClose:()=>{r(),o?(s(!1),a(`reload`)):a(null)},body:(0,B.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,B.jsx)(`code`,{children:`--harness=`}),` all detected, so grok & co. mirrors refresh too) from `,(0,B.jsx)(`code`,{children:Gf(u.source)??`kit ${u.kitVersion}`}),`; removes legacy dirs. Machine-global. `,(0,B.jsx)(`b`,{className:`text-walnut`,children:`Preview = dry-run plan, writes nothing; Apply (type UPDATE) writes.`})]})}),i===`reload`&&(c.data?.supported?(0,B.jsx)(Lf,{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,B.jsxs)(`div`,{children:[`The playbook cards on disk changed. Type `,(0,B.jsx)(`code`,{children:`/reload-skills`}),` RAW into every live tmux-attached agent's CLI (MCP `,(0,B.jsx)(`code`,{children:`send_command`}),`, bus-writes gated) so running sessions pick the new cards up without a restart: `,(0,B.jsx)(`span`,{className:`font-mono text-[12px]`,children:c.data.agents.join(` · `)||`— none live —`}),`. Per-agent delivery (confirmed / pending) lands in the Run.`]})}):(0,B.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,B.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,B.jsx)(`div`,{className:`font-display font-bold text-[18px]`,children:`reload skills in live sessions`}),(0,B.jsx)(`div`,{children:c.data?(0,B.jsxs)(B.Fragment,{children:[`Not available: `,c.data.hint,` (connected allowlist: `,(0,B.jsx)(`code`,{children:c.data.allowlist?.join(` `)??`unknown`}),`). Ask agents to run `,(0,B.jsx)(`code`,{children:`/reload-skills`}),` themselves, or restart their sessions.`]}):c.error?`API error: ${c.error}`:`checking the connected agent-coord-mcp…`}),(0,B.jsx)(`div`,{className:`flex justify-end`,children:(0,B.jsx)(K,{size:`sm`,onClick:()=>a(null),children:`Close`})})]})})),(0,B.jsxs)(`div`,{className:`grid gap-3.5 content-start min-w-0`,children:[(0,B.jsxs)(`div`,{className:`flex items-baseline justify-between`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`span`,{className:`font-display font-bold text-[34px] leading-[1.1] tracking-[-.015em] text-ember`,children:`Skills`}),(0,B.jsxs)(`span`,{className:`ml-3 text-[13px] text-umber`,children:[`what each harness can run — `,e,` and globally · byte-compared to the kit`]})]}),(0,B.jsxs)(`span`,{className:`text-[13px] text-umber`,children:[d,` need attention`]})]}),(0,B.jsxs)(U,{children:[(0,B.jsxs)(W,{title:`Groundwork · per repo`,icon:`skills`,eyebrow:`payload/skills · .claude/skills`,path:`marker ${l.versionMarker??`—`} · kit ${l.kitVersion}`,children:[l.driftedVersion&&(0,B.jsxs)(G,{tone:`warn`,children:[`behind `,l.kitVersion]}),!l.versionMarker&&(0,B.jsx)(K,{size:`sm`,tone:`primary`,onClick:()=>a(`gwinit`),title:`this repo has no docs/.groundwork/VERSION — install Groundwork`,children:`groundwork init…`}),l.versionMarker&&(0,B.jsx)(K,{size:`sm`,tone:l.driftedVersion?`primary`:`default`,onClick:()=>a(`gw`),children:`groundwork update…`})]}),(0,B.jsxs)(Aa,{cols:Uf,children:[(0,B.jsx)(`span`,{children:`Skill`}),(0,B.jsx)(`span`,{children:`Tier`}),(0,B.jsx)(`span`,{children:`Installed`}),(0,B.jsx)(`span`,{children:`In sync`}),(0,B.jsx)(`span`,{children:`Mirrors`}),(0,B.jsx)(`span`,{children:`Description`})]}),l.skills.map(e=>(0,B.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:Uf},children:[(0,B.jsxs)(`span`,{className:`font-mono font-medium text-[13px]`,children:[`/`,e.name]}),(0,B.jsx)(`span`,{children:(0,B.jsx)(G,{tone:e.tier===`min`?`neutral`:`outline`,children:e.tier===`min`?`core`:`optional`})}),(0,B.jsx)(`span`,{children:e.installed?(0,B.jsx)(G,{tone:`ok`,children:`installed`}):(0,B.jsx)(`span`,{className:`font-mono text-[12px] text-tan`,children:`—`})}),(0,B.jsx)(`span`,{children:e.installed?e.inSync?(0,B.jsx)(G,{tone:`ok`,children:`= kit`}):(0,B.jsx)(G,{tone:`warn`,children:`differs`}):(0,B.jsx)(`span`,{className:`font-mono text-[12px] text-tan`,children:`—`})}),(0,B.jsxs)(`span`,{className:`flex gap-1`,children:[(0,B.jsx)(Wf,{on:e.mirrors.cursor,label:`cursor`}),(0,B.jsx)(Wf,{on:e.mirrors.vscode,label:`vscode`})]}),(0,B.jsx)(`span`,{className:`text-[13px] text-umber truncate`,title:e.description,children:e.description})]},e.name))]}),(0,B.jsxs)(U,{children:[(0,B.jsxs)(W,{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,B.jsx)(K,{size:`sm`,onClick:()=>a(`pb`),children:`agent-coordination update…`}),(0,B.jsx)(K,{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,B.jsxs)(Aa,{cols:Uf,children:[(0,B.jsx)(`span`,{children:`Card`}),(0,B.jsx)(`span`,{children:`Slices`}),(0,B.jsx)(`span`,{children:`Installed`}),(0,B.jsx)(`span`,{children:`In sync`}),(0,B.jsx)(`span`,{children:`Mirrors`}),(0,B.jsx)(`span`,{children:`Description`})]}),u.cards.map(e=>(0,B.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:Uf},children:[(0,B.jsxs)(`span`,{className:`font-mono font-medium text-[13px]`,children:[`/`,e.name]}),(0,B.jsx)(`span`,{children:e.legacyEssay?(0,B.jsx)(G,{tone:`warn`,children:`775-line essay`}):(0,B.jsxs)(G,{tone:`outline`,children:[e.slices,` slice`,e.slices===1?``:`s`]})}),(0,B.jsx)(`span`,{children:e.installed?(0,B.jsx)(G,{tone:`ok`,children:`installed`}):(0,B.jsx)(`span`,{className:`font-mono text-[12px] text-tan`,children:`—`})}),(0,B.jsx)(`span`,{children:e.installed?e.inSync?(0,B.jsx)(G,{tone:`ok`,children:`= kit`}):(0,B.jsx)(G,{tone:`warn`,children:`differs`}):(0,B.jsx)(`span`,{className:`font-mono text-[12px] text-tan`,children:`—`})}),(0,B.jsxs)(`span`,{className:`flex gap-1 flex-wrap`,children:[(0,B.jsx)(Wf,{on:e.installed,label:`claude`}),(0,B.jsx)(Wf,{on:!!e.homes?.grok?.installed,label:`grok${e.homes?.grok?.installed&&e.homes.grok.inSync===!1?` ≠`:``}`}),(0,B.jsx)(Wf,{on:e.mirrors.cursor,label:`cursor`}),(0,B.jsx)(Wf,{on:e.mirrors.vscode,label:`vscode`}),(0,B.jsx)(Wf,{on:e.mirrors.opencode,label:`opencode`})]}),(0,B.jsx)(`span`,{className:`text-[13px] text-umber truncate`,title:e.description,children:e.description})]},e.name)),u.legacyDirs.length>0&&(0,B.jsxs)(`div`,{className:`px-3 py-2 border-t border-sand text-[13px]`,children:[(0,B.jsx)(G,{tone:`warn`,children:`legacy dirs`}),` `,(0,B.jsxs)(`span`,{className:`text-umber`,children:[u.legacyDirs.join(`, `),` still in `,u.globalDir,` — installer removes them`]})]})]})]}),(0,B.jsxs)(`aside`,{className:`grid gap-3.5 content-start min-w-0`,children:[(0,B.jsxs)(U,{children:[(0,B.jsx)(W,{title:`How this is measured`,icon:`doctor`}),(0,B.jsxs)(`div`,{className:`px-3 py-2 text-[13px] text-umber grid gap-1.5`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`b`,{className:`text-walnut`,children:`In sync`}),` — SHA-1 of the installed `,(0,B.jsx)(`code`,{children:`SKILL.md`}),` equals what the installer writes: groundwork byte-copies (`,(0,B.jsx)(`code`,{children:Gf(l.source)??`?`}),`); the playbook installer rewrites `,(0,B.jsx)(`code`,{children:`{{tool:…}}`}),` placeholders per harness first, so the card is compared after that rewrite (`,u.rewrite??`kit rewrite`,`, source `,(0,B.jsx)(`code`,{children:Gf(u.source)??`?`}),`).`]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`b`,{className:`text-walnut`,children:`Mirrors`}),` — presence of `,(0,B.jsx)(`code`,{children:`.cursor/commands/<n>.md`}),`, `,(0,B.jsx)(`code`,{children:`.vscode/prompts/<n>.prompt.md`}),`, `,(0,B.jsx)(`code`,{children:`~/.config/opencode/skills/<n>`}),`.`]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`b`,{className:`text-walnut`,children:`Marker`}),` — `,(0,B.jsx)(`code`,{children:`docs/.groundwork/VERSION`}),` vs the kit’s groundwork version.`]}),(0,B.jsxs)(`div`,{children:[`Asked grok for `,(0,B.jsx)(`code`,{children:`groundwork list --json`}),` / `,(0,B.jsx)(`code`,{children:`agent-coordination list --json`}),` to replace the scan.`]})]})]}),(0,B.jsxs)(U,{children:[(0,B.jsx)(W,{title:`Harness mirrors`,icon:`skills`,path:`seam skills-mirror`}),(0,B.jsxs)(`div`,{className:`px-3 py-2 grid gap-2 text-[13px] text-umber`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`b`,{className:`text-walnut`,children:`Claude Code`}),` — canonical `,(0,B.jsx)(`code`,{children:`SKILL.md`}),`; playbook global.`]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`b`,{className:`text-walnut`,children:`Cursor`}),` — `,(0,B.jsx)(`code`,{children:`.cursor/commands`}),`, GENERATED banner.`]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`b`,{className:`text-walnut`,children:`VS Code`}),` — `,(0,B.jsx)(`code`,{children:`.vscode/prompts`}),`, mode from allowed-tools.`]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`b`,{className:`text-walnut`,children:`OpenCode`}),` — auto-discovers `,(0,B.jsx)(`code`,{children:`~/.claude/skills`}),`; templated MCP tool names.`]})]})]})]})]})}var qf=[[`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`]],Jf={"Open PRs":`prs`,"Cutover Gates":`gates`,"Needs David":`needsDavid`,Risks:`risks`,Rooms:`rooms`,"Decisions Recorded":`decisions`},Yf=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`,Xf=e=>!!e&&Ea.includes(e),Zf=e=>e?new Date(e).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`}):``;function Qf({s:e}){let t=e.table?e.table.headers.map(()=>`1fr`).join(` `):``;return(0,B.jsxs)(U,{children:[(0,B.jsx)(W,{title:e.title,icon:Jf[e.title],eyebrow:`## ${e.title} · coordinator-only`,path:`docs/WORKSTREAMS.md`}),e.table&&e.table.rows.length>0&&(0,B.jsx)(Aa,{cols:t,children:e.table.headers.map(e=>(0,B.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,B.jsx)(`div`,{className:`px-3 py-3 text-[13px] text-umber`,children:`none open`}):e.table?.rows.map((n,r)=>(0,B.jsx)(ka,{glyph:`|`,raw:Object.values(n).join(` | `),children:(0,B.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,B.jsx)(`span`,{className:`min-w-0 truncate ${t===0?`font-medium`:`text-[13px] text-umber`}`,title:r,children:i&&r&&a?(0,B.jsx)(G,{tone:Yf(r),children:r}):r||(0,B.jsx)(`span`,{className:`text-tan`,children:`—`})},e)})})},r)),e.bullets?.map((e,t)=>(0,B.jsx)(ka,{glyph:`-`,children:(0,B.jsx)(`div`,{className:`py-2 text-[14px]`,children:e})},t)),!e.table?.rows.length&&!e.bullets?.length&&(0,B.jsx)(`div`,{className:`px-3 py-3 text-[13px] text-umber`,children:`empty`})]})}function $f(){let{current:e}=Ha(),{data:t,error:n}=q(e?`/projects/${e}/release`:null,3e4),r=q(`/kit`).data;if(n)return(0,B.jsx)(`div`,{className:`p-4`,children:(0,B.jsxs)(U,{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,B.jsxs)(`div`,{className:`grid grid-cols-[1fr_340px] gap-4 p-4 max-[980px]:grid-cols-1`,children:[(0,B.jsxs)(`div`,{className:`grid gap-3.5 content-start min-w-0`,children:[(0,B.jsxs)(`div`,{className:`flex items-baseline justify-between`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`span`,{className:`font-display font-bold text-[34px] leading-[1.1] tracking-[-.015em] text-ember`,children:`Release`}),(0,B.jsxs)(`span`,{className:`ml-3 text-[13px] text-umber`,children:[e,` · coordinator-extension sections of docs/WORKSTREAMS.md + bus VERDICT/DONE`]})]}),(0,B.jsx)(`span`,{className:`text-[13px] text-umber`,children:`tier-1 ceiling 10 min · prod = David`})]}),(0,B.jsx)(`div`,{className:`grid grid-cols-4 border border-sand rounded-kit overflow-hidden max-[980px]:grid-cols-2`,children:qf.map(([e,t,n],r)=>(0,B.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,B.jsx)(`b`,{className:`block font-bold text-[13px] mb-1 ${r===3?`text-ember-deep`:`text-umber`}`,children:e}),(0,B.jsx)(`span`,{className:`text-[12px] leading-[1.5]`,children:t}),(0,B.jsx)(`span`,{className:`block font-mono font-medium text-[11px] text-ink3 mt-1.5`,children:n})]},e))}),!t&&(0,B.jsx)(`div`,{className:`text-umber text-[13px]`,children:`Reading WORKSTREAMS…`}),t&&i.length===0&&(0,B.jsx)(U,{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,B.jsx)(Qf,{s:e},e.title))]}),(0,B.jsxs)(`aside`,{className:`grid gap-3.5 content-start min-w-0`,children:[(0,B.jsxs)(U,{children:[(0,B.jsx)(W,{title:`Dock telemetry`,icon:`bus`,path:`VERDICT / DONE from the room`}),(t?.telemetry??[]).length===0&&(0,B.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,B.jsxs)(`div`,{className:`grid grid-cols-[var(--spacing-gutter)_1fr] border-b border-sand last:border-b-0`,children:[(0,B.jsx)(`div`,{className:`py-2.5 flex justify-center font-mono text-[12px] text-tan border-r border-sand`,children:`#`}),(0,B.jsxs)(`div`,{className:`px-3 pt-2 pb-2.5 min-w-0`,children:[(0,B.jsxs)(`div`,{className:`flex gap-2 items-baseline mb-0.5`,children:[(0,B.jsx)(`span`,{className:`font-semibold text-[13px]`,children:e.from}),(0,B.jsx)(`span`,{className:`font-mono text-[12px] text-ink3`,children:Zf(e.ts)})]}),(0,B.jsxs)(`div`,{className:`text-[13px] break-words line-clamp-3`,children:[Xf(r)&&(0,B.jsx)(Oa,{prefix:r,fail:/FAIL/.test(n)}),n.replace(/^\w[\w ]*:?\s*/,``)]})]})]},e.id??t)})]}),i.find(e=>e.title===`Rooms`)&&(0,B.jsx)(Qf,{s:i.find(e=>e.title===`Rooms`)}),(0,B.jsxs)(U,{children:[(0,B.jsx)(W,{title:`Kit versions`,icon:`kit`,path:`kit.json`}),(0,B.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,B.jsxs)(`div`,{className:`grid grid-cols-[1fr_auto] gap-2`,children:[(0,B.jsx)(`span`,{children:t.name}),(0,B.jsx)(`b`,{className:`text-walnut`,children:t.version})]},e)):`—`})]}),t&&(0,B.jsx)(`div`,{className:`text-[11px] font-mono text-tan px-1`,children:t.source})]})]})}var ep={queued:`outline`,running:`warn`,ok:`ok`,failed:`bad`,cancelled:`neutral`},tp={mcp:`MCP tool`,cli:`CLI`,bus:`bus send`,shell:`shell`,seam:`seam write`},np=e=>{let t=(e.endedAt??Date.now())-e.startedAt;return t<1e3?`${t} ms`:`${(t/1e3).toFixed(1)} s`},rp=e=>new Date(e).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`,second:`2-digit`});function ip(){let{runs:e,running:t}=Ga(),[n]=Fi(),[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,B.jsxs)(`div`,{className:`grid grid-cols-[1fr_480px] gap-4 p-4 max-[1100px]:grid-cols-1`,children:[(0,B.jsxs)(`div`,{className:`grid gap-3.5 content-start min-w-0`,children:[(0,B.jsxs)(`div`,{className:`flex items-baseline justify-between`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`span`,{className:`font-display font-bold text-[34px] leading-[1.1] tracking-[-.015em] text-ember`,children:`Runs`}),(0,B.jsxs)(`span`,{className:`ml-3 text-[13px] text-umber`,children:[`every action the console performs — MCP tools, CLIs, bus sends, shells · `,t,` running`]})]}),(0,B.jsxs)(`span`,{className:`text-[13px] text-umber`,children:[`last `,e.length]})]}),(0,B.jsxs)(U,{children:[e.length===0&&(0,B.jsxs)(`div`,{className:`px-3 py-3 text-[13px] text-umber`,children:[`Nothing has run yet. Try `,(0,B.jsx)(`b`,{children:`Run doctor`}),` on Fleets or `,(0,B.jsx)(`b`,{children:`Doctor`}),` on the Board.`]}),e.map(e=>(0,B.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,B.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,B.jsx)(Na,{size:12}):e.status===`ok`?`✓`:e.status===`failed`?`✗`:`○`}),(0,B.jsx)(`span`,{className:`px-3 py-1.5 min-w-0`,children:(0,B.jsxs)(`span`,{className:`flex items-baseline gap-2`,children:[(0,B.jsx)(G,{tone:ep[e.status],children:e.status}),(0,B.jsx)(`b`,{className:`text-[13px] truncate`,children:e.label}),(0,B.jsx)(`span`,{className:`font-mono text-[11px] text-tan`,children:tp[e.kind]}),e.project&&(0,B.jsx)(`span`,{className:`font-mono text-[12px] text-ink3`,children:e.project}),e.sideEffects&&(0,B.jsx)(G,{tone:`david`,children:`side effects`})]})}),(0,B.jsxs)(`span`,{className:`px-3 font-mono text-[12px] text-ink3 whitespace-nowrap`,children:[rp(e.startedAt),` · `,np(e)]})]},e.id))]})]}),(0,B.jsxs)(`aside`,{className:`grid gap-3.5 content-start min-w-0`,children:[a?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(U,{children:[(0,B.jsx)(W,{title:a.label,icon:`health`,path:`${a.id} · ${tp[a.kind]}`,children:(0,B.jsx)(G,{tone:ep[a.status],children:a.status})}),a.args&&(0,B.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,B.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,B.jsx)(`div`,{className:`px-3 py-2 border-t border-sand text-[13px] text-brick`,children:a.error})]}),a.result!==void 0&&(0,B.jsxs)(U,{children:[(0,B.jsx)(W,{title:`Result`,icon:`docs`}),(0,B.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,B.jsx)(U,{className:`px-4 py-3 text-[13px] text-umber`,children:`Select a run to see its log and result.`}),(0,B.jsxs)(U,{children:[(0,B.jsx)(W,{title:`What can run`,icon:`gates`}),(0,B.jsxs)(`div`,{className:`px-3 py-2 text-[13px] text-umber grid gap-1`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`b`,{className:`text-walnut`,children:`now`}),` — read-only MCP tools (doctor, list_*, status, read_messages…) as `,(0,B.jsx)(`code`,{children:`groundwork-console`}),` / automation; read-only CLIs (groundwork doctor/status/list).`]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`b`,{className:`text-walnut`,children:`gated`}),` — bus sends (rules engine, replies), prune / unregister, seam writes, shells. Each will appear here with a `,(0,B.jsx)(`span`,{className:`inline-flex`,children:(0,B.jsx)(G,{tone:`david`,children:`side effects`})}),` marker.`]}),(0,B.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 ap=22,op=14,sp=4,cp=10,lp=[`#C8782A`,`#4A6A2C`,`#5C7A96`,`#C4587A`,`#8A6A3C`,`#C88A1E`,`#6B5B95`,`#2E7D7B`,`#A0522D`,`#556B2F`];function up(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 dp=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`},fp=e=>e.startsWith(`HEAD`)?`head`:e.startsWith(`tag: `)?`tag`:e.includes(`/`)?`remote`:`branch`;function pp({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)(()=>up(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,B.jsx)(`div`,{className:`px-3 py-3 text-[13px] text-umber`,children:`No commits.`});let u=20+o.lanes*op,d=a.length*ap,f=e=>cp+e*op+op/2,p=e=>e*ap+ap/2,m=e=>{navigator.clipboard?.writeText(e.sha).then(()=>{c(e.sha),setTimeout(()=>c(null),1200)}).catch(()=>{}),i?.(e)};return(0,B.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,B.jsxs)(`div`,{className:`relative`,style:{height:d,minWidth:u+480},children:[(0,B.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=lp[e.color%lp.length],s=n===i?`M${n},${r} L${i},${a}`:`M${n},${r} C${n},${r+ap*.6} ${i},${a-ap*.6} ${i},${a}`;return(0,B.jsx)(`path`,{d:s,stroke:o,strokeWidth:2,fill:`none`,opacity:.9},t)}),o.stubs.map((e,t)=>(0,B.jsx)(`path`,{d:`M${f(e.lane)},${p(e.row)} L${f(e.lane)},${p(e.row)+ap*.7}`,stroke:lp[e.lane%lp.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,B.jsx)(`circle`,{cx:f(r),cy:p(n),r:i?5.5:a?5:sp,fill:a?`var(--color-paper)`:lp[r%lp.length],stroke:lp[r%lp.length],strokeWidth:i?3:2},e.sha)})]}),a.map((e,n)=>{let r=o.laneOfRow[n],i=e.sha===t;return(0,B.jsxs)(`button`,{type:`button`,role:`listitem`,onClick:()=>m(e),title:`${e.sha}\n${e.subject}\n${e.author} · ${dp(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*ap,height:ap,paddingLeft:u+4},children:[(0,B.jsx)(`span`,{className:`font-mono text-[11px] text-ink3 w-[62px]`,style:{color:lp[r%lp.length]},children:s===e.sha?`copied ✓`:e.short}),(0,B.jsxs)(`span`,{className:`min-w-0 truncate text-[12.5px] text-walnut`,children:[e.refs.map(e=>{let t=fp(e),n=e.replace(/^HEAD -> /,``).replace(/^tag: /,``),r=t===`tag`?void 0:l.get(n);return(0,B.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,B.jsxs)(`span`,{className:`text-leaf`,"aria-label":`checked out in a worktree`,children:[`⌂`,r.agent?` ${r.agent}`:``]})]},e)}),e.subject]}),(0,B.jsx)(`span`,{className:`font-mono text-[11px] text-ink3 truncate max-w-[120px]`,children:e.author}),(0,B.jsx)(`span`,{className:`font-mono text-[11px] text-tan w-[48px] text-right`,children:dp(e.date)})]},e.sha)})]})})}var mp=`minmax(220px,1.6fr) .5fr 1fr .8fr 1fr 1.1fr 1.4fr`,hp=`minmax(240px,1.8fr) 1.2fr .7fr .6fr 1fr .6fr`,gp=e=>e.replace(/^\/Users\/[^/]+/,`~`),_p=e=>{navigator.clipboard?.writeText(e)},vp=(e,t)=>{try{localStorage.setItem(`groundwork-console.summon.draft.${e}`,t)}catch{}yd(e)},yp=e=>e===`MERGED`?`ok`:e===`OPEN`?`david`:`neutral`;function bp(){let{current:e}=Ha(),t=e?`/projects/${e}/git`:null,n=q(t?`${t}/graph?limit=200`:null,15e3),r=q(t?`${t}/branches`:null,15e3),i=q(t?`${t}/worktrees`:null,15e3),[a,o]=(0,P.useState)(!0),[s,c]=(0,P.useState)(!1);if(!e)return(0,B.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,B.jsxs)(`div`,{className:`grid gap-3.5 p-4 content-start min-w-0`,children:[(0,B.jsxs)(`div`,{className:`flex items-baseline justify-between flex-wrap gap-2`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`span`,{className:`font-display font-bold text-[34px] leading-[1.1] tracking-[-.015em] text-ember`,children:`Git`}),(0,B.jsx)(`span`,{className:`ml-3 text-[13px] text-umber`,children:`branches · worktrees · who owns what — read-only, no git writes`})]}),(0,B.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,B.jsxs)(U,{className:`px-4 py-3 text-[13px] text-brick`,children:[`API error: `,l]}),(0,B.jsxs)(U,{children:[(0,B.jsx)(W,{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,B.jsx)(`div`,{className:`px-3 py-2`,children:n.data?(0,B.jsx)(pp,{commits:n.data.commits,head:n.data.head,worktrees:i.data?.worktrees??[],onSelect:e=>_p(e.sha)}):(0,B.jsx)(`div`,{className:`text-[13px] text-tan py-4 text-center`,children:n.error?`graph unavailable`:`loading graph…`})})]}),(0,B.jsxs)(U,{children:[(0,B.jsxs)(W,{title:`Branches`,icon:`git`,eyebrow:`local + remote · ahead/behind vs origin/main`,path:d>0?`${d} hidden by filters`:void 0,children:[(0,B.jsxs)(`label`,{className:`inline-flex items-center gap-1.5 text-[12px] text-umber cursor-pointer`,children:[(0,B.jsx)(`input`,{type:`checkbox`,checked:a,onChange:e=>o(e.target.checked)}),` remote`]}),(0,B.jsxs)(`label`,{className:`inline-flex items-center gap-1.5 text-[12px] text-umber cursor-pointer ml-2`,children:[(0,B.jsx)(`input`,{type:`checkbox`,checked:s,onChange:e=>c(e.target.checked)}),` merged`]})]}),(0,B.jsxs)(Aa,{cols:mp,children:[(0,B.jsx)(`span`,{children:`Branch`}),(0,B.jsx)(`span`,{children:`Where`}),(0,B.jsx)(`span`,{children:`HEAD`}),(0,B.jsx)(`span`,{children:`vs main`}),(0,B.jsx)(`span`,{children:`Flags`}),(0,B.jsx)(`span`,{children:`Owner`}),(0,B.jsx)(`span`,{children:`PR`})]}),r.loading&&!r.data&&(0,B.jsx)(`div`,{className:`px-3 py-3 text-[13px] text-tan`,children:`reading branches…`}),u.map(e=>(0,B.jsx)(xp,{b:e,defaultBranch:r.data?.defaultBranch??`main`},e.name+(e.remote?`@r`:``))),r.data&&!u.length&&(0,B.jsx)(`div`,{className:`px-3 py-3 text-[13px] text-tan`,children:`nothing to show with these filters`})]}),(0,B.jsxs)(U,{children:[(0,B.jsx)(W,{title:`Worktrees`,icon:`git`,eyebrow:`git worktree list · fleet siblings <repo>-<agent>`,path:i.data?`${i.data.worktrees.length} checkouts`:void 0}),(0,B.jsxs)(Aa,{cols:hp,children:[(0,B.jsx)(`span`,{children:`Path`}),(0,B.jsx)(`span`,{children:`Branch`}),(0,B.jsx)(`span`,{children:`HEAD`}),(0,B.jsx)(`span`,{children:`Dirty`}),(0,B.jsx)(`span`,{children:`Owner`}),(0,B.jsx)(`span`,{children:`State`})]}),(i.data?.worktrees??[]).map(e=>(0,B.jsx)(Sp,{w:e},e.path)),i.data&&!i.data.worktrees.length&&(0,B.jsx)(`div`,{className:`px-3 py-3 text-[13px] text-tan`,children:`no worktrees (not a git repo?)`})]})]})}function xp({b:e,defaultBranch:t}){let n=e.name===t||e.name.endsWith(`/${t}`),r=Date.parse(e.date);return(0,B.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:mp},children:[(0,B.jsxs)(`span`,{className:`min-w-0`,children:[(0,B.jsx)(`span`,{className:`font-mono font-medium truncate block ${n?`text-ember`:`text-walnut`}`,title:e.name,children:e.name}),(0,B.jsx)(`span`,{className:`block text-[12px] text-umber truncate`,title:e.subject,children:e.subject})]}),(0,B.jsx)(`span`,{children:e.remote?(0,B.jsx)(G,{tone:`outline`,children:`remote`}):(0,B.jsx)(G,{tone:`neutral`,children:`local`})}),(0,B.jsxs)(`span`,{className:`min-w-0`,children:[(0,B.jsx)(`button`,{className:`font-mono text-[12px] text-walnut hover:text-ember`,title:`copy ${e.sha}`,onClick:()=>_p(e.sha),children:e.short}),(0,B.jsx)(`span`,{className:`block text-[11px] text-tan`,title:e.date,children:Number.isFinite(r)?Fd(r):``})]}),(0,B.jsx)(`span`,{className:`flex gap-1 flex-wrap`,children:n&&!e.remote?(0,B.jsx)(G,{tone:`solid`,children:`default`}):e.ahead===null||e.behind===null?(0,B.jsx)(`span`,{className:`font-mono text-[12px] text-tan`,children:`—`}):(0,B.jsxs)(B.Fragment,{children:[e.ahead>0&&(0,B.jsxs)(G,{tone:`david`,children:[`+`,e.ahead]}),e.behind>0&&(0,B.jsxs)(G,{tone:e.behind>20?`warn`:`neutral`,children:[`−`,e.behind]}),e.ahead===0&&e.behind===0&&(0,B.jsx)(G,{tone:`ok`,children:`even`})]})}),(0,B.jsxs)(`span`,{className:`flex gap-1 flex-wrap`,children:[e.merged&&!n&&(0,B.jsx)(G,{tone:`ok`,children:`merged`}),e.stale&&(0,B.jsx)(G,{tone:`warn`,children:`stale`}),e.worktree&&(0,B.jsxs)(`span`,{className:`font-mono text-[11px] text-umber`,title:e.worktree,children:[`⌂ `,gp(e.worktree).split(`/`).pop()]})]}),(0,B.jsx)(`span`,{className:`min-w-0`,children:e.owner?(0,B.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[(0,B.jsx)(ld,{id:e.owner,size:`sm`}),(0,B.jsx)(K,{size:`sm`,tone:`ghost`,title:`DM ${e.owner} about ${e.name}`,onClick:()=>vp(e.owner,`re branch \`${e.name}\` @ ${e.short}${e.pr?` (PR #${e.pr.number} ${e.pr.state})`:``}: `),children:`DM`})]}):(0,B.jsx)(`span`,{className:`font-mono text-[12px] text-tan`,children:`—`})}),(0,B.jsx)(`span`,{className:`min-w-0`,children:e.pr?(0,B.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 min-w-0`,children:[(0,B.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,B.jsx)(G,{tone:yp(e.pr.state),children:e.pr.state.toLowerCase()}),e.pr.qa&&(0,B.jsx)(`span`,{className:`font-mono text-[11px] text-umber truncate`,title:`QA / gate: ${e.pr.qa}`,children:e.pr.qa})]}):(0,B.jsx)(`span`,{className:`font-mono text-[12px] text-tan`,children:`—`})})]})}function Sp({w:e}){return(0,B.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:hp},children:[(0,B.jsxs)(`span`,{className:`min-w-0 inline-flex items-center gap-1.5`,children:[(0,B.jsx)(`span`,{className:`font-mono text-[12px] text-walnut truncate`,title:e.path,children:gp(e.path)}),e.isMain&&(0,B.jsx)(G,{tone:`solid`,children:`main checkout`})]}),(0,B.jsx)(`span`,{className:`font-mono text-[12px] truncate`,title:e.branch??`detached HEAD`,children:e.branch??(0,B.jsx)(`span`,{className:`text-tan`,children:`detached`})}),(0,B.jsx)(`span`,{children:(0,B.jsx)(`button`,{className:`font-mono text-[12px] text-walnut hover:text-ember`,title:`copy ${e.sha}`,onClick:()=>_p(e.sha),children:e.short})}),(0,B.jsx)(`span`,{children:e.dirty?(0,B.jsx)(G,{tone:`warn`,children:`dirty`}):(0,B.jsx)(G,{tone:`ok`,children:`clean`})}),(0,B.jsx)(`span`,{children:e.agent?(0,B.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[(0,B.jsx)(ld,{id:e.agent,size:`sm`}),(0,B.jsx)(K,{size:`sm`,tone:`ghost`,title:`DM ${e.agent} about this worktree`,onClick:()=>vp(e.agent,`re worktree ${gp(e.path)} (${e.branch??`detached`} @ ${e.short}${e.dirty?`, dirty`:``}): `),children:`DM`})]}):(0,B.jsx)(`span`,{className:`font-mono text-[12px] text-tan`,children:`—`})}),(0,B.jsxs)(`span`,{className:`flex gap-1`,children:[e.prunable&&(0,B.jsx)(G,{tone:`bad`,children:`prunable`}),e.detached&&(0,B.jsx)(G,{tone:`outline`,children:`detached`})]})]})}var Cp=Oi([{path:`/`,Component:Pd,children:[{index:!0,Component:ef},{path:`board`,Component:lf},{path:`bus`,Component:_f},{path:`monitor`,Component:Nf},{path:`ops`,Component:Ff,children:[{index:!0,element:(0,B.jsx)(Lr,{to:`/ops/fleets`,replace:!0})},{path:`fleets`,Component:Vf},{path:`skills`,Component:Kf},{path:`release`,Component:$f},{path:`runs`,Component:ip},{path:`events`,Component:If}]},{path:`fleet`,element:(0,B.jsx)(Lr,{to:`/ops/fleets`,replace:!0})},{path:`release`,element:(0,B.jsx)(Lr,{to:`/ops/release`,replace:!0})},{path:`skills`,element:(0,B.jsx)(Lr,{to:`/ops/skills`,replace:!0})},{path:`runs`,element:(0,B.jsx)(Lr,{to:`/ops/runs`,replace:!0})},{path:`docs/:doc?`,Component:Tf},{path:`git`,Component:bp}]}]);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,ni.createRoot)(document.getElementById(`root`)).render((0,B.jsx)(P.StrictMode,{children:(0,B.jsx)(Va,{children:(0,B.jsx)(Wa,{children:(0,B.jsx)(ro,{children:(0,B.jsx)(Nr,{router:Cp})})})})}));export{o as n,l as r,oi as t};