@open-code-review/cli 1.10.4 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -5
- package/dist/dashboard/client/assets/{_basePickBy-DbLJVCA4.js → _basePickBy-B3ALyupE.js} +1 -1
- package/dist/dashboard/client/assets/{_baseUniq-IXEG0cJJ.js → _baseUniq-b2RALAWc.js} +1 -1
- package/dist/dashboard/client/assets/{arc-lsKxmOJY.js → arc-DcSVvhUd.js} +1 -1
- package/dist/dashboard/client/assets/{architectureDiagram-VXUJARFQ-DfMlzFJX.js → architectureDiagram-VXUJARFQ-BNUlmSCS.js} +1 -1
- package/dist/dashboard/client/assets/{blockDiagram-VD42YOAC-bSpnd26J.js → blockDiagram-VD42YOAC-BmhiQVwa.js} +1 -1
- package/dist/dashboard/client/assets/{c4Diagram-YG6GDRKO-DPYmVhCZ.js → c4Diagram-YG6GDRKO-jyJ3WOv5.js} +1 -1
- package/dist/dashboard/client/assets/channel-D3J8-GF_.js +1 -0
- package/dist/dashboard/client/assets/{chunk-4BX2VUAB-CI9zC4lV.js → chunk-4BX2VUAB-x1dQU_s3.js} +1 -1
- package/dist/dashboard/client/assets/{chunk-55IACEB6-BqUdJdx5.js → chunk-55IACEB6-CwbsE2XQ.js} +1 -1
- package/dist/dashboard/client/assets/{chunk-B4BG7PRW-DymQrTp-.js → chunk-B4BG7PRW-BaE7c-ti.js} +1 -1
- package/dist/dashboard/client/assets/{chunk-DI55MBZ5-lZ_9LKGJ.js → chunk-DI55MBZ5-Bw5PUaMK.js} +1 -1
- package/dist/dashboard/client/assets/{chunk-FMBD7UC4-DC5rgLNm.js → chunk-FMBD7UC4-B7cF6P3s.js} +1 -1
- package/dist/dashboard/client/assets/{chunk-QN33PNHL-BrygpHrX.js → chunk-QN33PNHL-OY4evNHd.js} +1 -1
- package/dist/dashboard/client/assets/{chunk-QZHKN3VN-CWJqBdNg.js → chunk-QZHKN3VN-BpjQwIWz.js} +1 -1
- package/dist/dashboard/client/assets/{chunk-TZMSLE5B-BACgM5pG.js → chunk-TZMSLE5B-D8b_Oq9B.js} +1 -1
- package/dist/dashboard/client/assets/classDiagram-2ON5EDUG-tkFUL-1Y.js +1 -0
- package/dist/dashboard/client/assets/classDiagram-v2-WZHVMYZB-tkFUL-1Y.js +1 -0
- package/dist/dashboard/client/assets/clone-CkY5ajLr.js +1 -0
- package/dist/dashboard/client/assets/{cose-bilkent-S5V4N54A-BYvGIfo0.js → cose-bilkent-S5V4N54A-C-sfP8PN.js} +1 -1
- package/dist/dashboard/client/assets/{dagre-6UL2VRFP-B1rZyiLJ.js → dagre-6UL2VRFP-Cqfo0NRg.js} +1 -1
- package/dist/dashboard/client/assets/{diagram-PSM6KHXK-Dvl5dQMd.js → diagram-PSM6KHXK-BR3ppxqI.js} +1 -1
- package/dist/dashboard/client/assets/{diagram-QEK2KX5R-Cmntmhht.js → diagram-QEK2KX5R-Dvcx6x3R.js} +1 -1
- package/dist/dashboard/client/assets/{diagram-S2PKOQOG-BqZcpG85.js → diagram-S2PKOQOG-DoyBLnVN.js} +1 -1
- package/dist/dashboard/client/assets/{erDiagram-Q2GNP2WA-Cw7BALso.js → erDiagram-Q2GNP2WA-hy77l1cL.js} +1 -1
- package/dist/dashboard/client/assets/{flowDiagram-NV44I4VS-B_amTHzQ.js → flowDiagram-NV44I4VS-Bz0B1rKM.js} +1 -1
- package/dist/dashboard/client/assets/{ganttDiagram-JELNMOA3-B1j2-sTo.js → ganttDiagram-JELNMOA3-CLgrZPoC.js} +1 -1
- package/dist/dashboard/client/assets/{gitGraphDiagram-V2S2FVAM-D5BkfAMt.js → gitGraphDiagram-V2S2FVAM-DwJ-1f-v.js} +1 -1
- package/dist/dashboard/client/assets/{graph-B_v15DHv.js → graph-DDBMM_t2.js} +1 -1
- package/dist/dashboard/client/assets/index-Cr9yEo_B.js +576 -0
- package/dist/dashboard/client/assets/index-Z1pPudAt.css +1 -0
- package/dist/dashboard/client/assets/{infoDiagram-HS3SLOUP-C4dtIkj3.js → infoDiagram-HS3SLOUP-Bhn1FmAk.js} +1 -1
- package/dist/dashboard/client/assets/{journeyDiagram-XKPGCS4Q-hha4Am8v.js → journeyDiagram-XKPGCS4Q-CzGbjX1y.js} +1 -1
- package/dist/dashboard/client/assets/{kanban-definition-3W4ZIXB7-1EY8l7Ng.js → kanban-definition-3W4ZIXB7-Da77-WYk.js} +1 -1
- package/dist/dashboard/client/assets/{layout-7SmAbjFT.js → layout-CVwSB-GS.js} +1 -1
- package/dist/dashboard/client/assets/{linear-BfjSBezh.js → linear-CTRAc5Jn.js} +1 -1
- package/dist/dashboard/client/assets/{mermaid-renderer-PPIt-kY4.js → mermaid-renderer-Bjo170ax.js} +4 -4
- package/dist/dashboard/client/assets/{mindmap-definition-VGOIOE7T-BFpjN9LY.js → mindmap-definition-VGOIOE7T-B55C2odl.js} +1 -1
- package/dist/dashboard/client/assets/{pieDiagram-ADFJNKIX-GBbQtDBQ.js → pieDiagram-ADFJNKIX-5lrQLrSz.js} +1 -1
- package/dist/dashboard/client/assets/{quadrantDiagram-AYHSOK5B-Dm0vOhOw.js → quadrantDiagram-AYHSOK5B-Bg55gC30.js} +1 -1
- package/dist/dashboard/client/assets/{requirementDiagram-UZGBJVZJ-BrKONIV8.js → requirementDiagram-UZGBJVZJ-CyR4YFJY.js} +1 -1
- package/dist/dashboard/client/assets/{sankeyDiagram-TZEHDZUN-IOobtmDc.js → sankeyDiagram-TZEHDZUN-BVWKr9_-.js} +1 -1
- package/dist/dashboard/client/assets/{sequenceDiagram-WL72ISMW-Dnb0bOW5.js → sequenceDiagram-WL72ISMW-D0AJg_tE.js} +1 -1
- package/dist/dashboard/client/assets/{stateDiagram-FKZM4ZOC-C9-bf7bn.js → stateDiagram-FKZM4ZOC-BuHpTgim.js} +1 -1
- package/dist/dashboard/client/assets/stateDiagram-v2-4FDKWEC3-DwAPhteN.js +1 -0
- package/dist/dashboard/client/assets/{timeline-definition-IT6M3QCI-tJogDEHB.js → timeline-definition-IT6M3QCI-LDhpAmDd.js} +1 -1
- package/dist/dashboard/client/assets/{treemap-GDKQZRPO-DQY6HADq.js → treemap-GDKQZRPO-Dd4gjvUl.js} +1 -1
- package/dist/dashboard/client/assets/{xychartDiagram-PRI3JC2R-DfxeQmTO.js → xychartDiagram-PRI3JC2R-B9RDod39.js} +1 -1
- package/dist/dashboard/client/index.html +2 -2
- package/dist/dashboard/server.js +10297 -878
- package/dist/index.js +10441 -913
- package/dist/lib/db/index.js +984 -58
- package/dist/lib/models.js +85 -0
- package/dist/lib/runtime-config.js +39 -0
- package/dist/lib/team-config.js +175 -0
- package/dist/lib/vendor-resume.js +31 -0
- package/package.json +29 -4
- package/dist/dashboard/client/assets/channel-C--wY_Wd.js +0 -1
- package/dist/dashboard/client/assets/classDiagram-2ON5EDUG-DoxmMlnf.js +0 -1
- package/dist/dashboard/client/assets/classDiagram-v2-WZHVMYZB-DoxmMlnf.js +0 -1
- package/dist/dashboard/client/assets/clone-BgvweD4v.js +0 -1
- package/dist/dashboard/client/assets/index-UkJZZdYD.js +0 -548
- package/dist/dashboard/client/assets/index-Zl---B_3.css +0 -1
- package/dist/dashboard/client/assets/stateDiagram-v2-4FDKWEC3-C8Gr4khP.js +0 -1
- package/dist/package.json +0 -61
|
@@ -0,0 +1,576 @@
|
|
|
1
|
+
function ZE(e,t){for(var r=0;r<t.length;r++){const a=t[r];if(typeof a!="string"&&!Array.isArray(a)){for(const l in a)if(l!=="default"&&!(l in e)){const o=Object.getOwnPropertyDescriptor(a,l);o&&Object.defineProperty(e,l,o.get?o:{enumerable:!0,get:()=>a[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))a(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&a(c)}).observe(document,{childList:!0,subtree:!0});function r(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?o.credentials="include":l.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function a(l){if(l.ep)return;l.ep=!0;const o=r(l);fetch(l.href,o)}})();function Bu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function nB(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=function a(){return this instanceof a?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(a){var l=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(r,a,l.get?l:{enumerable:!0,get:function(){return e[a]}})}),r}var rh={exports:{}},$l={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Yb;function WE(){if(Yb)return $l;Yb=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(a,l,o){var c=null;if(o!==void 0&&(c=""+o),l.key!==void 0&&(c=""+l.key),"key"in l){o={};for(var f in l)f!=="key"&&(o[f]=l[f])}else o=l;return l=o.ref,{$$typeof:e,type:a,key:c,ref:l!==void 0?l:null,props:o}}return $l.Fragment=t,$l.jsx=r,$l.jsxs=r,$l}var Qb;function JE(){return Qb||(Qb=1,rh.exports=WE()),rh.exports}var d=JE(),ih={exports:{}},et={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var Xb;function eN(){if(Xb)return et;Xb=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),y=Symbol.iterator;function v(j){return j===null||typeof j!="object"?null:(j=y&&j[y]||j["@@iterator"],typeof j=="function"?j:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,S={};function N(j,I,C){this.props=j,this.context=I,this.refs=S,this.updater=C||k}N.prototype.isReactComponent={},N.prototype.setState=function(j,I){if(typeof j!="object"&&typeof j!="function"&&j!=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,j,I,"setState")},N.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function O(){}O.prototype=N.prototype;function A(j,I,C){this.props=j,this.context=I,this.refs=S,this.updater=C||k}var P=A.prototype=new O;P.constructor=A,E(P,N.prototype),P.isPureReactComponent=!0;var $=Array.isArray;function M(){}var K={H:null,A:null,T:null,S:null},z=Object.prototype.hasOwnProperty;function W(j,I,C){var ue=C.ref;return{$$typeof:e,type:j,key:I,ref:ue!==void 0?ue:null,props:C}}function U(j,I){return W(j.type,I,j.props)}function ee(j){return typeof j=="object"&&j!==null&&j.$$typeof===e}function te(j){var I={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(C){return I[C]})}var _e=/\/+/g;function se(j,I){return typeof j=="object"&&j!==null&&j.key!=null?te(""+j.key):I.toString(36)}function X(j){switch(j.status){case"fulfilled":return j.value;case"rejected":throw j.reason;default:switch(typeof j.status=="string"?j.then(M,M):(j.status="pending",j.then(function(I){j.status==="pending"&&(j.status="fulfilled",j.value=I)},function(I){j.status==="pending"&&(j.status="rejected",j.reason=I)})),j.status){case"fulfilled":return j.value;case"rejected":throw j.reason}}throw j}function F(j,I,C,ue,be){var ye=typeof j;(ye==="undefined"||ye==="boolean")&&(j=null);var le=!1;if(j===null)le=!0;else switch(ye){case"bigint":case"string":case"number":le=!0;break;case"object":switch(j.$$typeof){case e:case t:le=!0;break;case g:return le=j._init,F(le(j._payload),I,C,ue,be)}}if(le)return be=be(j),le=ue===""?"."+se(j,0):ue,$(be)?(C="",le!=null&&(C=le.replace(_e,"$&/")+"/"),F(be,I,C,"",function(Ue){return Ue})):be!=null&&(ee(be)&&(be=U(be,C+(be.key==null||j&&j.key===be.key?"":(""+be.key).replace(_e,"$&/")+"/")+le)),I.push(be)),1;le=0;var xe=ue===""?".":ue+":";if($(j))for(var pe=0;pe<j.length;pe++)ue=j[pe],ye=xe+se(ue,pe),le+=F(ue,I,C,ye,be);else if(pe=v(j),typeof pe=="function")for(j=pe.call(j),pe=0;!(ue=j.next()).done;)ue=ue.value,ye=xe+se(ue,pe++),le+=F(ue,I,C,ye,be);else if(ye==="object"){if(typeof j.then=="function")return F(X(j),I,C,ue,be);throw I=String(j),Error("Objects are not valid as a React child (found: "+(I==="[object Object]"?"object with keys {"+Object.keys(j).join(", ")+"}":I)+"). If you meant to render a collection of children, use an array instead.")}return le}function ne(j,I,C){if(j==null)return j;var ue=[],be=0;return F(j,ue,"","",function(ye){return I.call(C,ye,be++)}),ue}function V(j){if(j._status===-1){var I=j._result;I=I(),I.then(function(C){(j._status===0||j._status===-1)&&(j._status=1,j._result=C)},function(C){(j._status===0||j._status===-1)&&(j._status=2,j._result=C)}),j._status===-1&&(j._status=0,j._result=I)}if(j._status===1)return j._result.default;throw j._result}var fe=typeof reportError=="function"?reportError:function(j){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var I=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof j=="object"&&j!==null&&typeof j.message=="string"?String(j.message):String(j),error:j});if(!window.dispatchEvent(I))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",j);return}console.error(j)},R={map:ne,forEach:function(j,I,C){ne(j,function(){I.apply(this,arguments)},C)},count:function(j){var I=0;return ne(j,function(){I++}),I},toArray:function(j){return ne(j,function(I){return I})||[]},only:function(j){if(!ee(j))throw Error("React.Children.only expected to receive a single React element child.");return j}};return et.Activity=x,et.Children=R,et.Component=N,et.Fragment=r,et.Profiler=l,et.PureComponent=A,et.StrictMode=a,et.Suspense=h,et.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=K,et.__COMPILER_RUNTIME={__proto__:null,c:function(j){return K.H.useMemoCache(j)}},et.cache=function(j){return function(){return j.apply(null,arguments)}},et.cacheSignal=function(){return null},et.cloneElement=function(j,I,C){if(j==null)throw Error("The argument must be a React element, but you passed "+j+".");var ue=E({},j.props),be=j.key;if(I!=null)for(ye in I.key!==void 0&&(be=""+I.key),I)!z.call(I,ye)||ye==="key"||ye==="__self"||ye==="__source"||ye==="ref"&&I.ref===void 0||(ue[ye]=I[ye]);var ye=arguments.length-2;if(ye===1)ue.children=C;else if(1<ye){for(var le=Array(ye),xe=0;xe<ye;xe++)le[xe]=arguments[xe+2];ue.children=le}return W(j.type,be,ue)},et.createContext=function(j){return j={$$typeof:c,_currentValue:j,_currentValue2:j,_threadCount:0,Provider:null,Consumer:null},j.Provider=j,j.Consumer={$$typeof:o,_context:j},j},et.createElement=function(j,I,C){var ue,be={},ye=null;if(I!=null)for(ue in I.key!==void 0&&(ye=""+I.key),I)z.call(I,ue)&&ue!=="key"&&ue!=="__self"&&ue!=="__source"&&(be[ue]=I[ue]);var le=arguments.length-2;if(le===1)be.children=C;else if(1<le){for(var xe=Array(le),pe=0;pe<le;pe++)xe[pe]=arguments[pe+2];be.children=xe}if(j&&j.defaultProps)for(ue in le=j.defaultProps,le)be[ue]===void 0&&(be[ue]=le[ue]);return W(j,ye,be)},et.createRef=function(){return{current:null}},et.forwardRef=function(j){return{$$typeof:f,render:j}},et.isValidElement=ee,et.lazy=function(j){return{$$typeof:g,_payload:{_status:-1,_result:j},_init:V}},et.memo=function(j,I){return{$$typeof:m,type:j,compare:I===void 0?null:I}},et.startTransition=function(j){var I=K.T,C={};K.T=C;try{var ue=j(),be=K.S;be!==null&&be(C,ue),typeof ue=="object"&&ue!==null&&typeof ue.then=="function"&&ue.then(M,fe)}catch(ye){fe(ye)}finally{I!==null&&C.types!==null&&(I.types=C.types),K.T=I}},et.unstable_useCacheRefresh=function(){return K.H.useCacheRefresh()},et.use=function(j){return K.H.use(j)},et.useActionState=function(j,I,C){return K.H.useActionState(j,I,C)},et.useCallback=function(j,I){return K.H.useCallback(j,I)},et.useContext=function(j){return K.H.useContext(j)},et.useDebugValue=function(){},et.useDeferredValue=function(j,I){return K.H.useDeferredValue(j,I)},et.useEffect=function(j,I){return K.H.useEffect(j,I)},et.useEffectEvent=function(j){return K.H.useEffectEvent(j)},et.useId=function(){return K.H.useId()},et.useImperativeHandle=function(j,I,C){return K.H.useImperativeHandle(j,I,C)},et.useInsertionEffect=function(j,I){return K.H.useInsertionEffect(j,I)},et.useLayoutEffect=function(j,I){return K.H.useLayoutEffect(j,I)},et.useMemo=function(j,I){return K.H.useMemo(j,I)},et.useOptimistic=function(j,I){return K.H.useOptimistic(j,I)},et.useReducer=function(j,I,C){return K.H.useReducer(j,I,C)},et.useRef=function(j){return K.H.useRef(j)},et.useState=function(j){return K.H.useState(j)},et.useSyncExternalStore=function(j,I,C){return K.H.useSyncExternalStore(j,I,C)},et.useTransition=function(){return K.H.useTransition()},et.version="19.2.4",et}var Zb;function wm(){return Zb||(Zb=1,ih.exports=eN()),ih.exports}var _=wm();const tN=Bu(_),nN=ZE({__proto__:null,default:tN},[_]);var ah={exports:{}},Gl={},sh={exports:{}},lh={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var Wb;function rN(){return Wb||(Wb=1,(function(e){function t(F,ne){var V=F.length;F.push(ne);e:for(;0<V;){var fe=V-1>>>1,R=F[fe];if(0<l(R,ne))F[fe]=ne,F[V]=R,V=fe;else break e}}function r(F){return F.length===0?null:F[0]}function a(F){if(F.length===0)return null;var ne=F[0],V=F.pop();if(V!==ne){F[0]=V;e:for(var fe=0,R=F.length,j=R>>>1;fe<j;){var I=2*(fe+1)-1,C=F[I],ue=I+1,be=F[ue];if(0>l(C,V))ue<R&&0>l(be,C)?(F[fe]=be,F[ue]=V,fe=ue):(F[fe]=C,F[I]=V,fe=I);else if(ue<R&&0>l(be,V))F[fe]=be,F[ue]=V,fe=ue;else break e}}return ne}function l(F,ne){var V=F.sortIndex-ne.sortIndex;return V!==0?V:F.id-ne.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var c=Date,f=c.now();e.unstable_now=function(){return c.now()-f}}var h=[],m=[],g=1,x=null,y=3,v=!1,k=!1,E=!1,S=!1,N=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;function P(F){for(var ne=r(m);ne!==null;){if(ne.callback===null)a(m);else if(ne.startTime<=F)a(m),ne.sortIndex=ne.expirationTime,t(h,ne);else break;ne=r(m)}}function $(F){if(E=!1,P(F),!k)if(r(h)!==null)k=!0,M||(M=!0,te());else{var ne=r(m);ne!==null&&X($,ne.startTime-F)}}var M=!1,K=-1,z=5,W=-1;function U(){return S?!0:!(e.unstable_now()-W<z)}function ee(){if(S=!1,M){var F=e.unstable_now();W=F;var ne=!0;try{e:{k=!1,E&&(E=!1,O(K),K=-1),v=!0;var V=y;try{t:{for(P(F),x=r(h);x!==null&&!(x.expirationTime>F&&U());){var fe=x.callback;if(typeof fe=="function"){x.callback=null,y=x.priorityLevel;var R=fe(x.expirationTime<=F);if(F=e.unstable_now(),typeof R=="function"){x.callback=R,P(F),ne=!0;break t}x===r(h)&&a(h),P(F)}else a(h);x=r(h)}if(x!==null)ne=!0;else{var j=r(m);j!==null&&X($,j.startTime-F),ne=!1}}break e}finally{x=null,y=V,v=!1}ne=void 0}}finally{ne?te():M=!1}}}var te;if(typeof A=="function")te=function(){A(ee)};else if(typeof MessageChannel<"u"){var _e=new MessageChannel,se=_e.port2;_e.port1.onmessage=ee,te=function(){se.postMessage(null)}}else te=function(){N(ee,0)};function X(F,ne){K=N(function(){F(e.unstable_now())},ne)}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(F){F.callback=null},e.unstable_forceFrameRate=function(F){0>F||125<F?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):z=0<F?Math.floor(1e3/F):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_next=function(F){switch(y){case 1:case 2:case 3:var ne=3;break;default:ne=y}var V=y;y=ne;try{return F()}finally{y=V}},e.unstable_requestPaint=function(){S=!0},e.unstable_runWithPriority=function(F,ne){switch(F){case 1:case 2:case 3:case 4:case 5:break;default:F=3}var V=y;y=F;try{return ne()}finally{y=V}},e.unstable_scheduleCallback=function(F,ne,V){var fe=e.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?fe+V:fe):V=fe,F){case 1:var R=-1;break;case 2:R=250;break;case 5:R=1073741823;break;case 4:R=1e4;break;default:R=5e3}return R=V+R,F={id:g++,callback:ne,priorityLevel:F,startTime:V,expirationTime:R,sortIndex:-1},V>fe?(F.sortIndex=V,t(m,F),r(h)===null&&F===r(m)&&(E?(O(K),K=-1):E=!0,X($,V-fe))):(F.sortIndex=R,t(h,F),k||v||(k=!0,M||(M=!0,te()))),F},e.unstable_shouldYield=U,e.unstable_wrapCallback=function(F){var ne=y;return function(){var V=y;y=ne;try{return F.apply(this,arguments)}finally{y=V}}}})(lh)),lh}var Jb;function iN(){return Jb||(Jb=1,sh.exports=rN()),sh.exports}var oh={exports:{}},Fn={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var ex;function aN(){if(ex)return Fn;ex=1;var e=wm();function t(h){var m="https://react.dev/errors/"+h;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)m+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+h+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var a={d:{f:r,r:function(){throw Error(t(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},l=Symbol.for("react.portal");function o(h,m,g){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:l,key:x==null?null:""+x,children:h,containerInfo:m,implementation:g}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(h,m){if(h==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return Fn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,Fn.createPortal=function(h,m){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(t(299));return o(h,m,null,g)},Fn.flushSync=function(h){var m=c.T,g=a.p;try{if(c.T=null,a.p=2,h)return h()}finally{c.T=m,a.p=g,a.d.f()}},Fn.preconnect=function(h,m){typeof h=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,a.d.C(h,m))},Fn.prefetchDNS=function(h){typeof h=="string"&&a.d.D(h)},Fn.preinit=function(h,m){if(typeof h=="string"&&m&&typeof m.as=="string"){var g=m.as,x=f(g,m.crossOrigin),y=typeof m.integrity=="string"?m.integrity:void 0,v=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;g==="style"?a.d.S(h,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:x,integrity:y,fetchPriority:v}):g==="script"&&a.d.X(h,{crossOrigin:x,integrity:y,fetchPriority:v,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Fn.preinitModule=function(h,m){if(typeof h=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var g=f(m.as,m.crossOrigin);a.d.M(h,{crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&a.d.M(h)},Fn.preload=function(h,m){if(typeof h=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var g=m.as,x=f(g,m.crossOrigin);a.d.L(h,g,{crossOrigin:x,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},Fn.preloadModule=function(h,m){if(typeof h=="string")if(m){var g=f(m.as,m.crossOrigin);a.d.m(h,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else a.d.m(h)},Fn.requestFormReset=function(h){a.d.r(h)},Fn.unstable_batchedUpdates=function(h,m){return h(m)},Fn.useFormState=function(h,m,g){return c.H.useFormState(h,m,g)},Fn.useFormStatus=function(){return c.H.useHostTransitionStatus()},Fn.version="19.2.4",Fn}var tx;function Nv(){if(tx)return oh.exports;tx=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),oh.exports=aN(),oh.exports}/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var nx;function sN(){if(nx)return Gl;nx=1;var e=iN(),t=wm(),r=Nv();function a(n){var i="https://react.dev/errors/"+n;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)i+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+n+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function o(n){var i=n,s=n;if(n.alternate)for(;i.return;)i=i.return;else{n=i;do i=n,(i.flags&4098)!==0&&(s=i.return),n=i.return;while(n)}return i.tag===3?s:null}function c(n){if(n.tag===13){var i=n.memoizedState;if(i===null&&(n=n.alternate,n!==null&&(i=n.memoizedState)),i!==null)return i.dehydrated}return null}function f(n){if(n.tag===31){var i=n.memoizedState;if(i===null&&(n=n.alternate,n!==null&&(i=n.memoizedState)),i!==null)return i.dehydrated}return null}function h(n){if(o(n)!==n)throw Error(a(188))}function m(n){var i=n.alternate;if(!i){if(i=o(n),i===null)throw Error(a(188));return i!==n?null:n}for(var s=n,u=i;;){var p=s.return;if(p===null)break;var b=p.alternate;if(b===null){if(u=p.return,u!==null){s=u;continue}break}if(p.child===b.child){for(b=p.child;b;){if(b===s)return h(p),n;if(b===u)return h(p),i;b=b.sibling}throw Error(a(188))}if(s.return!==u.return)s=p,u=b;else{for(var w=!1,T=p.child;T;){if(T===s){w=!0,s=p,u=b;break}if(T===u){w=!0,u=p,s=b;break}T=T.sibling}if(!w){for(T=b.child;T;){if(T===s){w=!0,s=b,u=p;break}if(T===u){w=!0,u=b,s=p;break}T=T.sibling}if(!w)throw Error(a(189))}}if(s.alternate!==u)throw Error(a(190))}if(s.tag!==3)throw Error(a(188));return s.stateNode.current===s?n:i}function g(n){var i=n.tag;if(i===5||i===26||i===27||i===6)return n;for(n=n.child;n!==null;){if(i=g(n),i!==null)return i;n=n.sibling}return null}var x=Object.assign,y=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),k=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),A=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),$=Symbol.for("react.suspense"),M=Symbol.for("react.suspense_list"),K=Symbol.for("react.memo"),z=Symbol.for("react.lazy"),W=Symbol.for("react.activity"),U=Symbol.for("react.memo_cache_sentinel"),ee=Symbol.iterator;function te(n){return n===null||typeof n!="object"?null:(n=ee&&n[ee]||n["@@iterator"],typeof n=="function"?n:null)}var _e=Symbol.for("react.client.reference");function se(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===_e?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case E:return"Fragment";case N:return"Profiler";case S:return"StrictMode";case $:return"Suspense";case M:return"SuspenseList";case W:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case k:return"Portal";case A:return n.displayName||"Context";case O:return(n._context.displayName||"Context")+".Consumer";case P:var i=n.render;return n=n.displayName,n||(n=i.displayName||i.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case K:return i=n.displayName||null,i!==null?i:se(n.type)||"Memo";case z:i=n._payload,n=n._init;try{return se(n(i))}catch{}}return null}var X=Array.isArray,F=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V={pending:!1,data:null,method:null,action:null},fe=[],R=-1;function j(n){return{current:n}}function I(n){0>R||(n.current=fe[R],fe[R]=null,R--)}function C(n,i){R++,fe[R]=n.current,n.current=i}var ue=j(null),be=j(null),ye=j(null),le=j(null);function xe(n,i){switch(C(ye,i),C(be,n),C(ue,null),i.nodeType){case 9:case 11:n=(n=i.documentElement)&&(n=n.namespaceURI)?bb(n):0;break;default:if(n=i.tagName,i=i.namespaceURI)i=bb(i),n=xb(i,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}I(ue),C(ue,n)}function pe(){I(ue),I(be),I(ye)}function Ue(n){n.memoizedState!==null&&C(le,n);var i=ue.current,s=xb(i,n.type);i!==s&&(C(be,n),C(ue,s))}function Re(n){be.current===n&&(I(ue),I(be)),le.current===n&&(I(le),Fl._currentValue=V)}var Tt,tt;function gt(n){if(Tt===void 0)try{throw Error()}catch(s){var i=s.stack.trim().match(/\n( *(at )?)/);Tt=i&&i[1]||"",tt=-1<s.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+Tt+n+tt}var _t=!1;function ot(n,i){if(!n||_t)return"";_t=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(i){var he=function(){throw Error()};if(Object.defineProperty(he.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(he,[])}catch(re){var J=re}Reflect.construct(n,[],he)}else{try{he.call()}catch(re){J=re}n.call(he.prototype)}}else{try{throw Error()}catch(re){J=re}(he=n())&&typeof he.catch=="function"&&he.catch(function(){})}}catch(re){if(re&&J&&typeof re.stack=="string")return[re.stack,J.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var b=u.DetermineComponentFrameRoot(),w=b[0],T=b[1];if(w&&T){var L=w.split(`
|
|
44
|
+
`),Q=T.split(`
|
|
45
|
+
`);for(p=u=0;u<L.length&&!L[u].includes("DetermineComponentFrameRoot");)u++;for(;p<Q.length&&!Q[p].includes("DetermineComponentFrameRoot");)p++;if(u===L.length||p===Q.length)for(u=L.length-1,p=Q.length-1;1<=u&&0<=p&&L[u]!==Q[p];)p--;for(;1<=u&&0<=p;u--,p--)if(L[u]!==Q[p]){if(u!==1||p!==1)do if(u--,p--,0>p||L[u]!==Q[p]){var oe=`
|
|
46
|
+
`+L[u].replace(" at new "," at ");return n.displayName&&oe.includes("<anonymous>")&&(oe=oe.replace("<anonymous>",n.displayName)),oe}while(1<=u&&0<=p);break}}}finally{_t=!1,Error.prepareStackTrace=s}return(s=n?n.displayName||n.name:"")?gt(s):""}function _n(n,i){switch(n.tag){case 26:case 27:case 5:return gt(n.type);case 16:return gt("Lazy");case 13:return n.child!==i&&i!==null?gt("Suspense Fallback"):gt("Suspense");case 19:return gt("SuspenseList");case 0:case 15:return ot(n.type,!1);case 11:return ot(n.type.render,!1);case 1:return ot(n.type,!0);case 31:return gt("Activity");default:return""}}function Yn(n){try{var i="",s=null;do i+=_n(n,s),s=n,n=n.return;while(n);return i}catch(u){return`
|
|
47
|
+
Error generating stack: `+u.message+`
|
|
48
|
+
`+u.stack}}var br=Object.prototype.hasOwnProperty,xr=e.unstable_scheduleCallback,oi=e.unstable_cancelCallback,wa=e.unstable_shouldYield,Li=e.unstable_requestPaint,Wt=e.unstable_now,Qn=e.unstable_getCurrentPriorityLevel,ie=e.unstable_ImmediatePriority,we=e.unstable_UserBlockingPriority,$e=e.unstable_NormalPriority,We=e.unstable_LowPriority,rt=e.unstable_IdlePriority,zn=e.log,ar=e.unstable_setDisableYieldValue,cn=null,rn=null;function Qt(n){if(typeof zn=="function"&&ar(n),rn&&typeof rn.setStrictMode=="function")try{rn.setStrictMode(cn,n)}catch{}}var At=Math.clz32?Math.clz32:es,sr=Math.log,Cn=Math.LN2;function es(n){return n>>>=0,n===0?32:31-(sr(n)/Cn|0)|0}var Kr=256,Lr=262144,Vr=4194304;function Tn(n){var i=n&42;if(i!==0)return i;switch(n&-n){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 n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function B(n,i,s){var u=n.pendingLanes;if(u===0)return 0;var p=0,b=n.suspendedLanes,w=n.pingedLanes;n=n.warmLanes;var T=u&134217727;return T!==0?(u=T&~b,u!==0?p=Tn(u):(w&=T,w!==0?p=Tn(w):s||(s=T&~n,s!==0&&(p=Tn(s))))):(T=u&~b,T!==0?p=Tn(T):w!==0?p=Tn(w):s||(s=u&~n,s!==0&&(p=Tn(s)))),p===0?0:i!==0&&i!==p&&(i&b)===0&&(b=p&-p,s=i&-i,b>=s||b===32&&(s&4194048)!==0)?i:p}function ce(n,i){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&i)===0}function ze(n,i){switch(n){case 1:case 2:case 4:case 8:case 64:return i+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 i+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 n=Vr;return Vr<<=1,(Vr&62914560)===0&&(Vr=4194304),n}function Lt(n){for(var i=[],s=0;31>s;s++)i.push(n);return i}function Rt(n,i){n.pendingLanes|=i,i!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function Me(n,i,s,u,p,b){var w=n.pendingLanes;n.pendingLanes=s,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=s,n.entangledLanes&=s,n.errorRecoveryDisabledLanes&=s,n.shellSuspendCounter=0;var T=n.entanglements,L=n.expirationTimes,Q=n.hiddenUpdates;for(s=w&~s;0<s;){var oe=31-At(s),he=1<<oe;T[oe]=0,L[oe]=-1;var J=Q[oe];if(J!==null)for(Q[oe]=null,oe=0;oe<J.length;oe++){var re=J[oe];re!==null&&(re.lane&=-536870913)}s&=~he}u!==0&&Te(n,u,0),b!==0&&p===0&&n.tag!==0&&(n.suspendedLanes|=b&~(w&~i))}function Te(n,i,s){n.pendingLanes|=i,n.suspendedLanes&=~i;var u=31-At(i);n.entangledLanes|=i,n.entanglements[u]=n.entanglements[u]|1073741824|s&261930}function Ve(n,i){var s=n.entangledLanes|=i;for(n=n.entanglements;s;){var u=31-At(s),p=1<<u;p&i|n[u]&i&&(n[u]|=i),s&=~p}}function D(n,i){var s=i&-i;return s=(s&42)!==0?1:H(s),(s&(n.suspendedLanes|i))!==0?0:s}function H(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=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:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function Z(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function me(){var n=ne.p;return n!==0?n:(n=window.event,n===void 0?32:Pb(n.type))}function ve(n,i){var s=ne.p;try{return ne.p=n,i()}finally{ne.p=s}}var Oe=Math.random().toString(36).slice(2),Ee="__reactFiber$"+Oe,Ce="__reactProps$"+Oe,Ae="__reactContainer$"+Oe,He="__reactEvents$"+Oe,qe="__reactListeners$"+Oe,Ie="__reactHandles$"+Oe,Et="__reactResources$"+Oe,lt="__reactMarker$"+Oe;function Bt(n){delete n[Ee],delete n[Ce],delete n[He],delete n[qe],delete n[Ie]}function Nt(n){var i=n[Ee];if(i)return i;for(var s=n.parentNode;s;){if(i=s[Ae]||s[Ee]){if(s=i.alternate,i.child!==null||s!==null&&s.child!==null)for(n=Nb(n);n!==null;){if(s=n[Ee])return s;n=Nb(n)}return i}n=s,s=n.parentNode}return null}function Jt(n){if(n=n[Ee]||n[Ae]){var i=n.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return n}return null}function ft(n){var i=n.tag;if(i===5||i===26||i===27||i===6)return n.stateNode;throw Error(a(33))}function un(n){var i=n[Et];return i||(i=n[Et]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function Ht(n){n[lt]=!0}var Yr=new Set,Un={};function mn(n,i){ge(n,i),ge(n+"Capture",i)}function ge(n,i){for(Un[n]=i,n=0;n<i.length;n++)Yr.add(i[n])}var Be=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]*$"),Je={},St={};function Xt(n){return br.call(St,n)?!0:br.call(Je,n)?!1:Be.test(n)?St[n]=!0:(Je[n]=!0,!1)}function Xe(n,i,s){if(Xt(i))if(s===null)n.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":n.removeAttribute(i);return;case"boolean":var u=i.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){n.removeAttribute(i);return}}n.setAttribute(i,""+s)}}function It(n,i,s){if(s===null)n.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(i);return}n.setAttribute(i,""+s)}}function dn(n,i,s,u){if(u===null)n.removeAttribute(s);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(s);return}n.setAttributeNS(i,s,""+u)}}function zt(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function bt(n){var i=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function ci(n,i,s){var u=Object.getOwnPropertyDescriptor(n.constructor.prototype,i);if(!n.hasOwnProperty(i)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var p=u.get,b=u.set;return Object.defineProperty(n,i,{configurable:!0,get:function(){return p.call(this)},set:function(w){s=""+w,b.call(this,w)}}),Object.defineProperty(n,i,{enumerable:u.enumerable}),{getValue:function(){return s},setValue:function(w){s=""+w},stopTracking:function(){n._valueTracker=null,delete n[i]}}}}function ui(n){if(!n._valueTracker){var i=bt(n)?"checked":"value";n._valueTracker=ci(n,i,""+n[i])}}function _a(n){if(!n)return!1;var i=n._valueTracker;if(!i)return!0;var s=i.getValue(),u="";return n&&(u=bt(n)?n.checked?"true":"false":n.value),n=u,n!==s?(i.setValue(n),!0):!1}function ts(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var td=/[\n"\\]/g;function Xn(n){return n.replace(td,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function el(n,i,s,u,p,b,w,T){n.name="",w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?n.type=w:n.removeAttribute("type"),i!=null?w==="number"?(i===0&&n.value===""||n.value!=i)&&(n.value=""+zt(i)):n.value!==""+zt(i)&&(n.value=""+zt(i)):w!=="submit"&&w!=="reset"||n.removeAttribute("value"),i!=null?ns(n,w,zt(i)):s!=null?ns(n,w,zt(s)):u!=null&&n.removeAttribute("value"),p==null&&b!=null&&(n.defaultChecked=!!b),p!=null&&(n.checked=p&&typeof p!="function"&&typeof p!="symbol"),T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?n.name=""+zt(T):n.removeAttribute("name")}function Ea(n,i,s,u,p,b,w,T){if(b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(n.type=b),i!=null||s!=null){if(!(b!=="submit"&&b!=="reset"||i!=null)){ui(n);return}s=s!=null?""+zt(s):"",i=i!=null?""+zt(i):s,T||i===n.value||(n.value=i),n.defaultValue=i}u=u??p,u=typeof u!="function"&&typeof u!="symbol"&&!!u,n.checked=T?n.checked:!!u,n.defaultChecked=!!u,w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(n.name=w),ui(n)}function ns(n,i,s){i==="number"&&ts(n.ownerDocument)===n||n.defaultValue===""+s||(n.defaultValue=""+s)}function On(n,i,s,u){if(n=n.options,i){i={};for(var p=0;p<s.length;p++)i["$"+s[p]]=!0;for(s=0;s<n.length;s++)p=i.hasOwnProperty("$"+n[s].value),n[s].selected!==p&&(n[s].selected=p),p&&u&&(n[s].defaultSelected=!0)}else{for(s=""+zt(s),i=null,p=0;p<n.length;p++){if(n[p].value===s){n[p].selected=!0,u&&(n[p].defaultSelected=!0);return}i!==null||n[p].disabled||(i=n[p])}i!==null&&(i.selected=!0)}}function Bo(n,i,s){if(i!=null&&(i=""+zt(i),i!==n.value&&(n.value=i),s==null)){n.defaultValue!==i&&(n.defaultValue=i);return}n.defaultValue=s!=null?""+zt(s):""}function rs(n,i,s,u){if(i==null){if(u!=null){if(s!=null)throw Error(a(92));if(X(u)){if(1<u.length)throw Error(a(93));u=u[0]}s=u}s==null&&(s=""),i=s}s=zt(i),n.defaultValue=s,u=n.textContent,u===s&&u!==""&&u!==null&&(n.value=u),ui(n)}function Ze(n,i){if(i){var s=n.firstChild;if(s&&s===n.lastChild&&s.nodeType===3){s.nodeValue=i;return}}n.textContent=i}var Uo=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 pn(n,i,s){var u=i.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?u?n.setProperty(i,""):i==="float"?n.cssFloat="":n[i]="":u?n.setProperty(i,s):typeof s!="number"||s===0||Uo.has(i)?i==="float"?n.cssFloat=s:n[i]=(""+s).trim():n[i]=s+"px"}function Ut(n,i,s){if(i!=null&&typeof i!="object")throw Error(a(62));if(n=n.style,s!=null){for(var u in s)!s.hasOwnProperty(u)||i!=null&&i.hasOwnProperty(u)||(u.indexOf("--")===0?n.setProperty(u,""):u==="float"?n.cssFloat="":n[u]="");for(var p in i)u=i[p],i.hasOwnProperty(p)&&s[p]!==u&&pn(n,p,u)}else for(var b in i)i.hasOwnProperty(b)&&pn(n,b,i[b])}function Ii(n){if(n.indexOf("-")===-1)return!1;switch(n){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 di=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"]]),tl=/^[\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 Bi(n){return tl.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function Se(){}var Fe=null;function nt(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var xt=null,sn=null;function yr(n){var i=Jt(n);if(i&&(n=i.stateNode)){var s=n[Ce]||null;e:switch(n=i.stateNode,i.type){case"input":if(el(n,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),i=s.name,s.type==="radio"&&i!=null){for(s=n;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+Xn(""+i)+'"][type="radio"]'),i=0;i<s.length;i++){var u=s[i];if(u!==n&&u.form===n.form){var p=u[Ce]||null;if(!p)throw Error(a(90));el(u,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(i=0;i<s.length;i++)u=s[i],u.form===n.form&&_a(u)}break e;case"textarea":Bo(n,s.value,s.defaultValue);break e;case"select":i=s.value,i!=null&&On(n,!!s.multiple,i,!1)}}}var nl=!1;function Fo(n,i,s){if(nl)return n(i,s);nl=!0;try{var u=n(i);return u}finally{if(nl=!1,(xt!==null||sn!==null)&&(zc(),xt&&(i=xt,n=sn,sn=xt=null,yr(i),n)))for(i=0;i<n.length;i++)yr(n[i])}}function rl(n,i){var s=n.stateNode;if(s===null)return null;var u=s[Ce]||null;if(u===null)return null;s=u[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(n=n.type,u=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!u;break e;default:n=!1}if(n)return null;if(s&&typeof s!="function")throw Error(a(231,i,typeof s));return s}var fi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),nd=!1;if(fi)try{var il={};Object.defineProperty(il,"passive",{get:function(){nd=!0}}),window.addEventListener("test",il,il),window.removeEventListener("test",il,il)}catch{nd=!1}var Ui=null,rd=null,Po=null;function xp(){if(Po)return Po;var n,i=rd,s=i.length,u,p="value"in Ui?Ui.value:Ui.textContent,b=p.length;for(n=0;n<s&&i[n]===p[n];n++);var w=s-n;for(u=1;u<=w&&i[s-u]===p[b-u];u++);return Po=p.slice(n,1<u?1-u:void 0)}function Ho(n){var i=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&i===13&&(n=13)):n=i,n===10&&(n=13),32<=n||n===13?n:0}function qo(){return!0}function yp(){return!1}function Zn(n){function i(s,u,p,b,w){this._reactName=s,this._targetInst=p,this.type=u,this.nativeEvent=b,this.target=w,this.currentTarget=null;for(var T in n)n.hasOwnProperty(T)&&(s=n[T],this[T]=s?s(b):b[T]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?qo:yp,this.isPropagationStopped=yp,this}return x(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=qo)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=qo)},persist:function(){},isPersistent:qo}),i}var Na={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},$o=Zn(Na),al=x({},Na,{view:0,detail:0}),Qw=Zn(al),id,ad,sl,Go=x({},al,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ld,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==sl&&(sl&&n.type==="mousemove"?(id=n.screenX-sl.screenX,ad=n.screenY-sl.screenY):ad=id=0,sl=n),id)},movementY:function(n){return"movementY"in n?n.movementY:ad}}),vp=Zn(Go),Xw=x({},Go,{dataTransfer:0}),Zw=Zn(Xw),Ww=x({},al,{relatedTarget:0}),sd=Zn(Ww),Jw=x({},Na,{animationName:0,elapsedTime:0,pseudoElement:0}),e_=Zn(Jw),t_=x({},Na,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),n_=Zn(t_),r_=x({},Na,{data:0}),kp=Zn(r_),i_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},a_={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"},s_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function l_(n){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(n):(n=s_[n])?!!i[n]:!1}function ld(){return l_}var o_=x({},al,{key:function(n){if(n.key){var i=i_[n.key]||n.key;if(i!=="Unidentified")return i}return n.type==="keypress"?(n=Ho(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?a_[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ld,charCode:function(n){return n.type==="keypress"?Ho(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?Ho(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),c_=Zn(o_),u_=x({},Go,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),wp=Zn(u_),d_=x({},al,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ld}),f_=Zn(d_),h_=x({},Na,{propertyName:0,elapsedTime:0,pseudoElement:0}),m_=Zn(h_),p_=x({},Go,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),g_=Zn(p_),b_=x({},Na,{newState:0,oldState:0}),x_=Zn(b_),y_=[9,13,27,32],od=fi&&"CompositionEvent"in window,ll=null;fi&&"documentMode"in document&&(ll=document.documentMode);var v_=fi&&"TextEvent"in window&&!ll,_p=fi&&(!od||ll&&8<ll&&11>=ll),Ep=" ",Np=!1;function Sp(n,i){switch(n){case"keyup":return y_.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zp(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var is=!1;function k_(n,i){switch(n){case"compositionend":return zp(i);case"keypress":return i.which!==32?null:(Np=!0,Ep);case"textInput":return n=i.data,n===Ep&&Np?null:n;default:return null}}function w_(n,i){if(is)return n==="compositionend"||!od&&Sp(n,i)?(n=xp(),Po=rd=Ui=null,is=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return _p&&i.locale!=="ko"?null:i.data;default:return null}}var __={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 Cp(n){var i=n&&n.nodeName&&n.nodeName.toLowerCase();return i==="input"?!!__[n.type]:i==="textarea"}function Tp(n,i,s,u){xt?sn?sn.push(u):sn=[u]:xt=u,i=jc(i,"onChange"),0<i.length&&(s=new $o("onChange","change",null,s,u),n.push({event:s,listeners:i}))}var ol=null,cl=null;function E_(n){db(n,0)}function Ko(n){var i=ft(n);if(_a(i))return n}function Ap(n,i){if(n==="change")return i}var Rp=!1;if(fi){var cd;if(fi){var ud="oninput"in document;if(!ud){var Op=document.createElement("div");Op.setAttribute("oninput","return;"),ud=typeof Op.oninput=="function"}cd=ud}else cd=!1;Rp=cd&&(!document.documentMode||9<document.documentMode)}function Mp(){ol&&(ol.detachEvent("onpropertychange",jp),cl=ol=null)}function jp(n){if(n.propertyName==="value"&&Ko(cl)){var i=[];Tp(i,cl,n,nt(n)),Fo(E_,i)}}function N_(n,i,s){n==="focusin"?(Mp(),ol=i,cl=s,ol.attachEvent("onpropertychange",jp)):n==="focusout"&&Mp()}function S_(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Ko(cl)}function z_(n,i){if(n==="click")return Ko(i)}function C_(n,i){if(n==="input"||n==="change")return Ko(i)}function T_(n,i){return n===i&&(n!==0||1/n===1/i)||n!==n&&i!==i}var lr=typeof Object.is=="function"?Object.is:T_;function ul(n,i){if(lr(n,i))return!0;if(typeof n!="object"||n===null||typeof i!="object"||i===null)return!1;var s=Object.keys(n),u=Object.keys(i);if(s.length!==u.length)return!1;for(u=0;u<s.length;u++){var p=s[u];if(!br.call(i,p)||!lr(n[p],i[p]))return!1}return!0}function Dp(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function Lp(n,i){var s=Dp(n);n=0;for(var u;s;){if(s.nodeType===3){if(u=n+s.textContent.length,n<=i&&u>=i)return{node:s,offset:i-n};n=u}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=Dp(s)}}function Ip(n,i){return n&&i?n===i?!0:n&&n.nodeType===3?!1:i&&i.nodeType===3?Ip(n,i.parentNode):"contains"in n?n.contains(i):n.compareDocumentPosition?!!(n.compareDocumentPosition(i)&16):!1:!1}function Bp(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var i=ts(n.document);i instanceof n.HTMLIFrameElement;){try{var s=typeof i.contentWindow.location.href=="string"}catch{s=!1}if(s)n=i.contentWindow;else break;i=ts(n.document)}return i}function dd(n){var i=n&&n.nodeName&&n.nodeName.toLowerCase();return i&&(i==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||i==="textarea"||n.contentEditable==="true")}var A_=fi&&"documentMode"in document&&11>=document.documentMode,as=null,fd=null,dl=null,hd=!1;function Up(n,i,s){var u=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;hd||as==null||as!==ts(u)||(u=as,"selectionStart"in u&&dd(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),dl&&ul(dl,u)||(dl=u,u=jc(fd,"onSelect"),0<u.length&&(i=new $o("onSelect","select",null,i,s),n.push({event:i,listeners:u}),i.target=as)))}function Sa(n,i){var s={};return s[n.toLowerCase()]=i.toLowerCase(),s["Webkit"+n]="webkit"+i,s["Moz"+n]="moz"+i,s}var ss={animationend:Sa("Animation","AnimationEnd"),animationiteration:Sa("Animation","AnimationIteration"),animationstart:Sa("Animation","AnimationStart"),transitionrun:Sa("Transition","TransitionRun"),transitionstart:Sa("Transition","TransitionStart"),transitioncancel:Sa("Transition","TransitionCancel"),transitionend:Sa("Transition","TransitionEnd")},md={},Fp={};fi&&(Fp=document.createElement("div").style,"AnimationEvent"in window||(delete ss.animationend.animation,delete ss.animationiteration.animation,delete ss.animationstart.animation),"TransitionEvent"in window||delete ss.transitionend.transition);function za(n){if(md[n])return md[n];if(!ss[n])return n;var i=ss[n],s;for(s in i)if(i.hasOwnProperty(s)&&s in Fp)return md[n]=i[s];return n}var Pp=za("animationend"),Hp=za("animationiteration"),qp=za("animationstart"),R_=za("transitionrun"),O_=za("transitionstart"),M_=za("transitioncancel"),$p=za("transitionend"),Gp=new Map,pd="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(" ");pd.push("scrollEnd");function Ir(n,i){Gp.set(n,i),mn(i,[n])}var Vo=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},vr=[],ls=0,gd=0;function Yo(){for(var n=ls,i=gd=ls=0;i<n;){var s=vr[i];vr[i++]=null;var u=vr[i];vr[i++]=null;var p=vr[i];vr[i++]=null;var b=vr[i];if(vr[i++]=null,u!==null&&p!==null){var w=u.pending;w===null?p.next=p:(p.next=w.next,w.next=p),u.pending=p}b!==0&&Kp(s,p,b)}}function Qo(n,i,s,u){vr[ls++]=n,vr[ls++]=i,vr[ls++]=s,vr[ls++]=u,gd|=u,n.lanes|=u,n=n.alternate,n!==null&&(n.lanes|=u)}function bd(n,i,s,u){return Qo(n,i,s,u),Xo(n)}function Ca(n,i){return Qo(n,null,null,i),Xo(n)}function Kp(n,i,s){n.lanes|=s;var u=n.alternate;u!==null&&(u.lanes|=s);for(var p=!1,b=n.return;b!==null;)b.childLanes|=s,u=b.alternate,u!==null&&(u.childLanes|=s),b.tag===22&&(n=b.stateNode,n===null||n._visibility&1||(p=!0)),n=b,b=b.return;return n.tag===3?(b=n.stateNode,p&&i!==null&&(p=31-At(s),n=b.hiddenUpdates,u=n[p],u===null?n[p]=[i]:u.push(i),i.lane=s|536870912),b):null}function Xo(n){if(50<Ml)throw Ml=0,zf=null,Error(a(185));for(var i=n.return;i!==null;)n=i,i=n.return;return n.tag===3?n.stateNode:null}var os={};function j_(n,i,s,u){this.tag=n,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function or(n,i,s,u){return new j_(n,i,s,u)}function xd(n){return n=n.prototype,!(!n||!n.isReactComponent)}function hi(n,i){var s=n.alternate;return s===null?(s=or(n.tag,i,n.key,n.mode),s.elementType=n.elementType,s.type=n.type,s.stateNode=n.stateNode,s.alternate=n,n.alternate=s):(s.pendingProps=i,s.type=n.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=n.flags&65011712,s.childLanes=n.childLanes,s.lanes=n.lanes,s.child=n.child,s.memoizedProps=n.memoizedProps,s.memoizedState=n.memoizedState,s.updateQueue=n.updateQueue,i=n.dependencies,s.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},s.sibling=n.sibling,s.index=n.index,s.ref=n.ref,s.refCleanup=n.refCleanup,s}function Vp(n,i){n.flags&=65011714;var s=n.alternate;return s===null?(n.childLanes=0,n.lanes=i,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=s.childLanes,n.lanes=s.lanes,n.child=s.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=s.memoizedProps,n.memoizedState=s.memoizedState,n.updateQueue=s.updateQueue,n.type=s.type,i=s.dependencies,n.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),n}function Zo(n,i,s,u,p,b){var w=0;if(u=n,typeof n=="function")xd(n)&&(w=1);else if(typeof n=="string")w=UE(n,s,ue.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case W:return n=or(31,s,i,p),n.elementType=W,n.lanes=b,n;case E:return Ta(s.children,p,b,i);case S:w=8,p|=24;break;case N:return n=or(12,s,i,p|2),n.elementType=N,n.lanes=b,n;case $:return n=or(13,s,i,p),n.elementType=$,n.lanes=b,n;case M:return n=or(19,s,i,p),n.elementType=M,n.lanes=b,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case A:w=10;break e;case O:w=9;break e;case P:w=11;break e;case K:w=14;break e;case z:w=16,u=null;break e}w=29,s=Error(a(130,n===null?"null":typeof n,"")),u=null}return i=or(w,s,i,p),i.elementType=n,i.type=u,i.lanes=b,i}function Ta(n,i,s,u){return n=or(7,n,u,i),n.lanes=s,n}function yd(n,i,s){return n=or(6,n,null,i),n.lanes=s,n}function Yp(n){var i=or(18,null,null,0);return i.stateNode=n,i}function vd(n,i,s){return i=or(4,n.children!==null?n.children:[],n.key,i),i.lanes=s,i.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},i}var Qp=new WeakMap;function kr(n,i){if(typeof n=="object"&&n!==null){var s=Qp.get(n);return s!==void 0?s:(i={value:n,source:i,stack:Yn(i)},Qp.set(n,i),i)}return{value:n,source:i,stack:Yn(i)}}var cs=[],us=0,Wo=null,fl=0,wr=[],_r=0,Fi=null,Qr=1,Xr="";function mi(n,i){cs[us++]=fl,cs[us++]=Wo,Wo=n,fl=i}function Xp(n,i,s){wr[_r++]=Qr,wr[_r++]=Xr,wr[_r++]=Fi,Fi=n;var u=Qr;n=Xr;var p=32-At(u)-1;u&=~(1<<p),s+=1;var b=32-At(i)+p;if(30<b){var w=p-p%5;b=(u&(1<<w)-1).toString(32),u>>=w,p-=w,Qr=1<<32-At(i)+p|s<<p|u,Xr=b+n}else Qr=1<<b|s<<p|u,Xr=n}function kd(n){n.return!==null&&(mi(n,1),Xp(n,1,0))}function wd(n){for(;n===Wo;)Wo=cs[--us],cs[us]=null,fl=cs[--us],cs[us]=null;for(;n===Fi;)Fi=wr[--_r],wr[_r]=null,Xr=wr[--_r],wr[_r]=null,Qr=wr[--_r],wr[_r]=null}function Zp(n,i){wr[_r++]=Qr,wr[_r++]=Xr,wr[_r++]=Fi,Qr=i.id,Xr=i.overflow,Fi=n}var Mn=null,en=null,kt=!1,Pi=null,Er=!1,_d=Error(a(519));function Hi(n){var i=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw hl(kr(i,n)),_d}function Wp(n){var i=n.stateNode,s=n.type,u=n.memoizedProps;switch(i[Ee]=n,i[Ce]=u,s){case"dialog":mt("cancel",i),mt("close",i);break;case"iframe":case"object":case"embed":mt("load",i);break;case"video":case"audio":for(s=0;s<Dl.length;s++)mt(Dl[s],i);break;case"source":mt("error",i);break;case"img":case"image":case"link":mt("error",i),mt("load",i);break;case"details":mt("toggle",i);break;case"input":mt("invalid",i),Ea(i,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":mt("invalid",i);break;case"textarea":mt("invalid",i),rs(i,u.value,u.defaultValue,u.children)}s=u.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||i.textContent===""+s||u.suppressHydrationWarning===!0||pb(i.textContent,s)?(u.popover!=null&&(mt("beforetoggle",i),mt("toggle",i)),u.onScroll!=null&&mt("scroll",i),u.onScrollEnd!=null&&mt("scrollend",i),u.onClick!=null&&(i.onclick=Se),i=!0):i=!1,i||Hi(n,!0)}function Jp(n){for(Mn=n.return;Mn;)switch(Mn.tag){case 5:case 31:case 13:Er=!1;return;case 27:case 3:Er=!0;return;default:Mn=Mn.return}}function ds(n){if(n!==Mn)return!1;if(!kt)return Jp(n),kt=!0,!1;var i=n.tag,s;if((s=i!==3&&i!==27)&&((s=i===5)&&(s=n.type,s=!(s!=="form"&&s!=="button")||Hf(n.type,n.memoizedProps)),s=!s),s&&en&&Hi(n),Jp(n),i===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));en=Eb(n)}else if(i===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));en=Eb(n)}else i===27?(i=en,na(n.type)?(n=Vf,Vf=null,en=n):en=i):en=Mn?Sr(n.stateNode.nextSibling):null;return!0}function Aa(){en=Mn=null,kt=!1}function Ed(){var n=Pi;return n!==null&&(tr===null?tr=n:tr.push.apply(tr,n),Pi=null),n}function hl(n){Pi===null?Pi=[n]:Pi.push(n)}var Nd=j(null),Ra=null,pi=null;function qi(n,i,s){C(Nd,i._currentValue),i._currentValue=s}function gi(n){n._currentValue=Nd.current,I(Nd)}function Sd(n,i,s){for(;n!==null;){var u=n.alternate;if((n.childLanes&i)!==i?(n.childLanes|=i,u!==null&&(u.childLanes|=i)):u!==null&&(u.childLanes&i)!==i&&(u.childLanes|=i),n===s)break;n=n.return}}function zd(n,i,s,u){var p=n.child;for(p!==null&&(p.return=n);p!==null;){var b=p.dependencies;if(b!==null){var w=p.child;b=b.firstContext;e:for(;b!==null;){var T=b;b=p;for(var L=0;L<i.length;L++)if(T.context===i[L]){b.lanes|=s,T=b.alternate,T!==null&&(T.lanes|=s),Sd(b.return,s,n),u||(w=null);break e}b=T.next}}else if(p.tag===18){if(w=p.return,w===null)throw Error(a(341));w.lanes|=s,b=w.alternate,b!==null&&(b.lanes|=s),Sd(w,s,n),w=null}else w=p.child;if(w!==null)w.return=p;else for(w=p;w!==null;){if(w===n){w=null;break}if(p=w.sibling,p!==null){p.return=w.return,w=p;break}w=w.return}p=w}}function fs(n,i,s,u){n=null;for(var p=i,b=!1;p!==null;){if(!b){if((p.flags&524288)!==0)b=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var w=p.alternate;if(w===null)throw Error(a(387));if(w=w.memoizedProps,w!==null){var T=p.type;lr(p.pendingProps.value,w.value)||(n!==null?n.push(T):n=[T])}}else if(p===le.current){if(w=p.alternate,w===null)throw Error(a(387));w.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(n!==null?n.push(Fl):n=[Fl])}p=p.return}n!==null&&zd(i,n,s,u),i.flags|=262144}function Jo(n){for(n=n.firstContext;n!==null;){if(!lr(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function Oa(n){Ra=n,pi=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function jn(n){return e0(Ra,n)}function ec(n,i){return Ra===null&&Oa(n),e0(n,i)}function e0(n,i){var s=i._currentValue;if(i={context:i,memoizedValue:s,next:null},pi===null){if(n===null)throw Error(a(308));pi=i,n.dependencies={lanes:0,firstContext:i},n.flags|=524288}else pi=pi.next=i;return s}var D_=typeof AbortController<"u"?AbortController:function(){var n=[],i=this.signal={aborted:!1,addEventListener:function(s,u){n.push(u)}};this.abort=function(){i.aborted=!0,n.forEach(function(s){return s()})}},L_=e.unstable_scheduleCallback,I_=e.unstable_NormalPriority,gn={$$typeof:A,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Cd(){return{controller:new D_,data:new Map,refCount:0}}function ml(n){n.refCount--,n.refCount===0&&L_(I_,function(){n.controller.abort()})}var pl=null,Td=0,hs=0,ms=null;function B_(n,i){if(pl===null){var s=pl=[];Td=0,hs=Mf(),ms={status:"pending",value:void 0,then:function(u){s.push(u)}}}return Td++,i.then(t0,t0),i}function t0(){if(--Td===0&&pl!==null){ms!==null&&(ms.status="fulfilled");var n=pl;pl=null,hs=0,ms=null;for(var i=0;i<n.length;i++)(0,n[i])()}}function U_(n,i){var s=[],u={status:"pending",value:null,reason:null,then:function(p){s.push(p)}};return n.then(function(){u.status="fulfilled",u.value=i;for(var p=0;p<s.length;p++)(0,s[p])(i)},function(p){for(u.status="rejected",u.reason=p,p=0;p<s.length;p++)(0,s[p])(void 0)}),u}var n0=F.S;F.S=function(n,i){Ug=Wt(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&B_(n,i),n0!==null&&n0(n,i)};var Ma=j(null);function Ad(){var n=Ma.current;return n!==null?n:Vt.pooledCache}function tc(n,i){i===null?C(Ma,Ma.current):C(Ma,i.pool)}function r0(){var n=Ad();return n===null?null:{parent:gn._currentValue,pool:n}}var ps=Error(a(460)),Rd=Error(a(474)),nc=Error(a(542)),rc={then:function(){}};function i0(n){return n=n.status,n==="fulfilled"||n==="rejected"}function a0(n,i,s){switch(s=n[s],s===void 0?n.push(i):s!==i&&(i.then(Se,Se),i=s),i.status){case"fulfilled":return i.value;case"rejected":throw n=i.reason,l0(n),n;default:if(typeof i.status=="string")i.then(Se,Se);else{if(n=Vt,n!==null&&100<n.shellSuspendCounter)throw Error(a(482));n=i,n.status="pending",n.then(function(u){if(i.status==="pending"){var p=i;p.status="fulfilled",p.value=u}},function(u){if(i.status==="pending"){var p=i;p.status="rejected",p.reason=u}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw n=i.reason,l0(n),n}throw Da=i,ps}}function ja(n){try{var i=n._init;return i(n._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(Da=s,ps):s}}var Da=null;function s0(){if(Da===null)throw Error(a(459));var n=Da;return Da=null,n}function l0(n){if(n===ps||n===nc)throw Error(a(483))}var gs=null,gl=0;function ic(n){var i=gl;return gl+=1,gs===null&&(gs=[]),a0(gs,n,i)}function bl(n,i){i=i.props.ref,n.ref=i!==void 0?i:null}function ac(n,i){throw i.$$typeof===y?Error(a(525)):(n=Object.prototype.toString.call(i),Error(a(31,n==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":n)))}function o0(n){function i(G,q){if(n){var Y=G.deletions;Y===null?(G.deletions=[q],G.flags|=16):Y.push(q)}}function s(G,q){if(!n)return null;for(;q!==null;)i(G,q),q=q.sibling;return null}function u(G){for(var q=new Map;G!==null;)G.key!==null?q.set(G.key,G):q.set(G.index,G),G=G.sibling;return q}function p(G,q){return G=hi(G,q),G.index=0,G.sibling=null,G}function b(G,q,Y){return G.index=Y,n?(Y=G.alternate,Y!==null?(Y=Y.index,Y<q?(G.flags|=67108866,q):Y):(G.flags|=67108866,q)):(G.flags|=1048576,q)}function w(G){return n&&G.alternate===null&&(G.flags|=67108866),G}function T(G,q,Y,de){return q===null||q.tag!==6?(q=yd(Y,G.mode,de),q.return=G,q):(q=p(q,Y),q.return=G,q)}function L(G,q,Y,de){var Ge=Y.type;return Ge===E?oe(G,q,Y.props.children,de,Y.key):q!==null&&(q.elementType===Ge||typeof Ge=="object"&&Ge!==null&&Ge.$$typeof===z&&ja(Ge)===q.type)?(q=p(q,Y.props),bl(q,Y),q.return=G,q):(q=Zo(Y.type,Y.key,Y.props,null,G.mode,de),bl(q,Y),q.return=G,q)}function Q(G,q,Y,de){return q===null||q.tag!==4||q.stateNode.containerInfo!==Y.containerInfo||q.stateNode.implementation!==Y.implementation?(q=vd(Y,G.mode,de),q.return=G,q):(q=p(q,Y.children||[]),q.return=G,q)}function oe(G,q,Y,de,Ge){return q===null||q.tag!==7?(q=Ta(Y,G.mode,de,Ge),q.return=G,q):(q=p(q,Y),q.return=G,q)}function he(G,q,Y){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return q=yd(""+q,G.mode,Y),q.return=G,q;if(typeof q=="object"&&q!==null){switch(q.$$typeof){case v:return Y=Zo(q.type,q.key,q.props,null,G.mode,Y),bl(Y,q),Y.return=G,Y;case k:return q=vd(q,G.mode,Y),q.return=G,q;case z:return q=ja(q),he(G,q,Y)}if(X(q)||te(q))return q=Ta(q,G.mode,Y,null),q.return=G,q;if(typeof q.then=="function")return he(G,ic(q),Y);if(q.$$typeof===A)return he(G,ec(G,q),Y);ac(G,q)}return null}function J(G,q,Y,de){var Ge=q!==null?q.key:null;if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return Ge!==null?null:T(G,q,""+Y,de);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case v:return Y.key===Ge?L(G,q,Y,de):null;case k:return Y.key===Ge?Q(G,q,Y,de):null;case z:return Y=ja(Y),J(G,q,Y,de)}if(X(Y)||te(Y))return Ge!==null?null:oe(G,q,Y,de,null);if(typeof Y.then=="function")return J(G,q,ic(Y),de);if(Y.$$typeof===A)return J(G,q,ec(G,Y),de);ac(G,Y)}return null}function re(G,q,Y,de,Ge){if(typeof de=="string"&&de!==""||typeof de=="number"||typeof de=="bigint")return G=G.get(Y)||null,T(q,G,""+de,Ge);if(typeof de=="object"&&de!==null){switch(de.$$typeof){case v:return G=G.get(de.key===null?Y:de.key)||null,L(q,G,de,Ge);case k:return G=G.get(de.key===null?Y:de.key)||null,Q(q,G,de,Ge);case z:return de=ja(de),re(G,q,Y,de,Ge)}if(X(de)||te(de))return G=G.get(Y)||null,oe(q,G,de,Ge,null);if(typeof de.then=="function")return re(G,q,Y,ic(de),Ge);if(de.$$typeof===A)return re(G,q,Y,ec(q,de),Ge);ac(q,de)}return null}function je(G,q,Y,de){for(var Ge=null,Ot=null,Pe=q,at=q=0,vt=null;Pe!==null&&at<Y.length;at++){Pe.index>at?(vt=Pe,Pe=null):vt=Pe.sibling;var Mt=J(G,Pe,Y[at],de);if(Mt===null){Pe===null&&(Pe=vt);break}n&&Pe&&Mt.alternate===null&&i(G,Pe),q=b(Mt,q,at),Ot===null?Ge=Mt:Ot.sibling=Mt,Ot=Mt,Pe=vt}if(at===Y.length)return s(G,Pe),kt&&mi(G,at),Ge;if(Pe===null){for(;at<Y.length;at++)Pe=he(G,Y[at],de),Pe!==null&&(q=b(Pe,q,at),Ot===null?Ge=Pe:Ot.sibling=Pe,Ot=Pe);return kt&&mi(G,at),Ge}for(Pe=u(Pe);at<Y.length;at++)vt=re(Pe,G,at,Y[at],de),vt!==null&&(n&&vt.alternate!==null&&Pe.delete(vt.key===null?at:vt.key),q=b(vt,q,at),Ot===null?Ge=vt:Ot.sibling=vt,Ot=vt);return n&&Pe.forEach(function(la){return i(G,la)}),kt&&mi(G,at),Ge}function Ye(G,q,Y,de){if(Y==null)throw Error(a(151));for(var Ge=null,Ot=null,Pe=q,at=q=0,vt=null,Mt=Y.next();Pe!==null&&!Mt.done;at++,Mt=Y.next()){Pe.index>at?(vt=Pe,Pe=null):vt=Pe.sibling;var la=J(G,Pe,Mt.value,de);if(la===null){Pe===null&&(Pe=vt);break}n&&Pe&&la.alternate===null&&i(G,Pe),q=b(la,q,at),Ot===null?Ge=la:Ot.sibling=la,Ot=la,Pe=vt}if(Mt.done)return s(G,Pe),kt&&mi(G,at),Ge;if(Pe===null){for(;!Mt.done;at++,Mt=Y.next())Mt=he(G,Mt.value,de),Mt!==null&&(q=b(Mt,q,at),Ot===null?Ge=Mt:Ot.sibling=Mt,Ot=Mt);return kt&&mi(G,at),Ge}for(Pe=u(Pe);!Mt.done;at++,Mt=Y.next())Mt=re(Pe,G,at,Mt.value,de),Mt!==null&&(n&&Mt.alternate!==null&&Pe.delete(Mt.key===null?at:Mt.key),q=b(Mt,q,at),Ot===null?Ge=Mt:Ot.sibling=Mt,Ot=Mt);return n&&Pe.forEach(function(XE){return i(G,XE)}),kt&&mi(G,at),Ge}function Gt(G,q,Y,de){if(typeof Y=="object"&&Y!==null&&Y.type===E&&Y.key===null&&(Y=Y.props.children),typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case v:e:{for(var Ge=Y.key;q!==null;){if(q.key===Ge){if(Ge=Y.type,Ge===E){if(q.tag===7){s(G,q.sibling),de=p(q,Y.props.children),de.return=G,G=de;break e}}else if(q.elementType===Ge||typeof Ge=="object"&&Ge!==null&&Ge.$$typeof===z&&ja(Ge)===q.type){s(G,q.sibling),de=p(q,Y.props),bl(de,Y),de.return=G,G=de;break e}s(G,q);break}else i(G,q);q=q.sibling}Y.type===E?(de=Ta(Y.props.children,G.mode,de,Y.key),de.return=G,G=de):(de=Zo(Y.type,Y.key,Y.props,null,G.mode,de),bl(de,Y),de.return=G,G=de)}return w(G);case k:e:{for(Ge=Y.key;q!==null;){if(q.key===Ge)if(q.tag===4&&q.stateNode.containerInfo===Y.containerInfo&&q.stateNode.implementation===Y.implementation){s(G,q.sibling),de=p(q,Y.children||[]),de.return=G,G=de;break e}else{s(G,q);break}else i(G,q);q=q.sibling}de=vd(Y,G.mode,de),de.return=G,G=de}return w(G);case z:return Y=ja(Y),Gt(G,q,Y,de)}if(X(Y))return je(G,q,Y,de);if(te(Y)){if(Ge=te(Y),typeof Ge!="function")throw Error(a(150));return Y=Ge.call(Y),Ye(G,q,Y,de)}if(typeof Y.then=="function")return Gt(G,q,ic(Y),de);if(Y.$$typeof===A)return Gt(G,q,ec(G,Y),de);ac(G,Y)}return typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint"?(Y=""+Y,q!==null&&q.tag===6?(s(G,q.sibling),de=p(q,Y),de.return=G,G=de):(s(G,q),de=yd(Y,G.mode,de),de.return=G,G=de),w(G)):s(G,q)}return function(G,q,Y,de){try{gl=0;var Ge=Gt(G,q,Y,de);return gs=null,Ge}catch(Pe){if(Pe===ps||Pe===nc)throw Pe;var Ot=or(29,Pe,null,G.mode);return Ot.lanes=de,Ot.return=G,Ot}finally{}}}var La=o0(!0),c0=o0(!1),$i=!1;function Od(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Md(n,i){n=n.updateQueue,i.updateQueue===n&&(i.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function Gi(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function Ki(n,i,s){var u=n.updateQueue;if(u===null)return null;if(u=u.shared,(jt&2)!==0){var p=u.pending;return p===null?i.next=i:(i.next=p.next,p.next=i),u.pending=i,i=Xo(n),Kp(n,null,s),i}return Qo(n,u,i,s),Xo(n)}function xl(n,i,s){if(i=i.updateQueue,i!==null&&(i=i.shared,(s&4194048)!==0)){var u=i.lanes;u&=n.pendingLanes,s|=u,i.lanes=s,Ve(n,s)}}function jd(n,i){var s=n.updateQueue,u=n.alternate;if(u!==null&&(u=u.updateQueue,s===u)){var p=null,b=null;if(s=s.firstBaseUpdate,s!==null){do{var w={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};b===null?p=b=w:b=b.next=w,s=s.next}while(s!==null);b===null?p=b=i:b=b.next=i}else p=b=i;s={baseState:u.baseState,firstBaseUpdate:p,lastBaseUpdate:b,shared:u.shared,callbacks:u.callbacks},n.updateQueue=s;return}n=s.lastBaseUpdate,n===null?s.firstBaseUpdate=i:n.next=i,s.lastBaseUpdate=i}var Dd=!1;function yl(){if(Dd){var n=ms;if(n!==null)throw n}}function vl(n,i,s,u){Dd=!1;var p=n.updateQueue;$i=!1;var b=p.firstBaseUpdate,w=p.lastBaseUpdate,T=p.shared.pending;if(T!==null){p.shared.pending=null;var L=T,Q=L.next;L.next=null,w===null?b=Q:w.next=Q,w=L;var oe=n.alternate;oe!==null&&(oe=oe.updateQueue,T=oe.lastBaseUpdate,T!==w&&(T===null?oe.firstBaseUpdate=Q:T.next=Q,oe.lastBaseUpdate=L))}if(b!==null){var he=p.baseState;w=0,oe=Q=L=null,T=b;do{var J=T.lane&-536870913,re=J!==T.lane;if(re?(yt&J)===J:(u&J)===J){J!==0&&J===hs&&(Dd=!0),oe!==null&&(oe=oe.next={lane:0,tag:T.tag,payload:T.payload,callback:null,next:null});e:{var je=n,Ye=T;J=i;var Gt=s;switch(Ye.tag){case 1:if(je=Ye.payload,typeof je=="function"){he=je.call(Gt,he,J);break e}he=je;break e;case 3:je.flags=je.flags&-65537|128;case 0:if(je=Ye.payload,J=typeof je=="function"?je.call(Gt,he,J):je,J==null)break e;he=x({},he,J);break e;case 2:$i=!0}}J=T.callback,J!==null&&(n.flags|=64,re&&(n.flags|=8192),re=p.callbacks,re===null?p.callbacks=[J]:re.push(J))}else re={lane:J,tag:T.tag,payload:T.payload,callback:T.callback,next:null},oe===null?(Q=oe=re,L=he):oe=oe.next=re,w|=J;if(T=T.next,T===null){if(T=p.shared.pending,T===null)break;re=T,T=re.next,re.next=null,p.lastBaseUpdate=re,p.shared.pending=null}}while(!0);oe===null&&(L=he),p.baseState=L,p.firstBaseUpdate=Q,p.lastBaseUpdate=oe,b===null&&(p.shared.lanes=0),Zi|=w,n.lanes=w,n.memoizedState=he}}function u0(n,i){if(typeof n!="function")throw Error(a(191,n));n.call(i)}function d0(n,i){var s=n.callbacks;if(s!==null)for(n.callbacks=null,n=0;n<s.length;n++)u0(s[n],i)}var bs=j(null),sc=j(0);function f0(n,i){n=Ni,C(sc,n),C(bs,i),Ni=n|i.baseLanes}function Ld(){C(sc,Ni),C(bs,bs.current)}function Id(){Ni=sc.current,I(bs),I(sc)}var cr=j(null),Nr=null;function Vi(n){var i=n.alternate;C(fn,fn.current&1),C(cr,n),Nr===null&&(i===null||bs.current!==null||i.memoizedState!==null)&&(Nr=n)}function Bd(n){C(fn,fn.current),C(cr,n),Nr===null&&(Nr=n)}function h0(n){n.tag===22?(C(fn,fn.current),C(cr,n),Nr===null&&(Nr=n)):Yi()}function Yi(){C(fn,fn.current),C(cr,cr.current)}function ur(n){I(cr),Nr===n&&(Nr=null),I(fn)}var fn=j(0);function lc(n){for(var i=n;i!==null;){if(i.tag===13){var s=i.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||Gf(s)||Kf(s)))return i}else if(i.tag===19&&(i.memoizedProps.revealOrder==="forwards"||i.memoizedProps.revealOrder==="backwards"||i.memoizedProps.revealOrder==="unstable_legacy-backwards"||i.memoizedProps.revealOrder==="together")){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===n)break;for(;i.sibling===null;){if(i.return===null||i.return===n)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var bi=0,it=null,qt=null,bn=null,oc=!1,xs=!1,Ia=!1,cc=0,kl=0,ys=null,F_=0;function ln(){throw Error(a(321))}function Ud(n,i){if(i===null)return!1;for(var s=0;s<i.length&&s<n.length;s++)if(!lr(n[s],i[s]))return!1;return!0}function Fd(n,i,s,u,p,b){return bi=b,it=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,F.H=n===null||n.memoizedState===null?X0:tf,Ia=!1,b=s(u,p),Ia=!1,xs&&(b=p0(i,s,u,p)),m0(n),b}function m0(n){F.H=El;var i=qt!==null&&qt.next!==null;if(bi=0,bn=qt=it=null,oc=!1,kl=0,ys=null,i)throw Error(a(300));n===null||xn||(n=n.dependencies,n!==null&&Jo(n)&&(xn=!0))}function p0(n,i,s,u){it=n;var p=0;do{if(xs&&(ys=null),kl=0,xs=!1,25<=p)throw Error(a(301));if(p+=1,bn=qt=null,n.updateQueue!=null){var b=n.updateQueue;b.lastEffect=null,b.events=null,b.stores=null,b.memoCache!=null&&(b.memoCache.index=0)}F.H=Z0,b=i(s,u)}while(xs);return b}function P_(){var n=F.H,i=n.useState()[0];return i=typeof i.then=="function"?wl(i):i,n=n.useState()[0],(qt!==null?qt.memoizedState:null)!==n&&(it.flags|=1024),i}function Pd(){var n=cc!==0;return cc=0,n}function Hd(n,i,s){i.updateQueue=n.updateQueue,i.flags&=-2053,n.lanes&=~s}function qd(n){if(oc){for(n=n.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}oc=!1}bi=0,bn=qt=it=null,xs=!1,kl=cc=0,ys=null}function $n(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return bn===null?it.memoizedState=bn=n:bn=bn.next=n,bn}function hn(){if(qt===null){var n=it.alternate;n=n!==null?n.memoizedState:null}else n=qt.next;var i=bn===null?it.memoizedState:bn.next;if(i!==null)bn=i,qt=n;else{if(n===null)throw it.alternate===null?Error(a(467)):Error(a(310));qt=n,n={memoizedState:qt.memoizedState,baseState:qt.baseState,baseQueue:qt.baseQueue,queue:qt.queue,next:null},bn===null?it.memoizedState=bn=n:bn=bn.next=n}return bn}function uc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function wl(n){var i=kl;return kl+=1,ys===null&&(ys=[]),n=a0(ys,n,i),i=it,(bn===null?i.memoizedState:bn.next)===null&&(i=i.alternate,F.H=i===null||i.memoizedState===null?X0:tf),n}function dc(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return wl(n);if(n.$$typeof===A)return jn(n)}throw Error(a(438,String(n)))}function $d(n){var i=null,s=it.updateQueue;if(s!==null&&(i=s.memoCache),i==null){var u=it.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(i={data:u.data.map(function(p){return p.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),s===null&&(s=uc(),it.updateQueue=s),s.memoCache=i,s=i.data[i.index],s===void 0)for(s=i.data[i.index]=Array(n),u=0;u<n;u++)s[u]=U;return i.index++,s}function xi(n,i){return typeof i=="function"?i(n):i}function fc(n){var i=hn();return Gd(i,qt,n)}function Gd(n,i,s){var u=n.queue;if(u===null)throw Error(a(311));u.lastRenderedReducer=s;var p=n.baseQueue,b=u.pending;if(b!==null){if(p!==null){var w=p.next;p.next=b.next,b.next=w}i.baseQueue=p=b,u.pending=null}if(b=n.baseState,p===null)n.memoizedState=b;else{i=p.next;var T=w=null,L=null,Q=i,oe=!1;do{var he=Q.lane&-536870913;if(he!==Q.lane?(yt&he)===he:(bi&he)===he){var J=Q.revertLane;if(J===0)L!==null&&(L=L.next={lane:0,revertLane:0,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null}),he===hs&&(oe=!0);else if((bi&J)===J){Q=Q.next,J===hs&&(oe=!0);continue}else he={lane:0,revertLane:Q.revertLane,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},L===null?(T=L=he,w=b):L=L.next=he,it.lanes|=J,Zi|=J;he=Q.action,Ia&&s(b,he),b=Q.hasEagerState?Q.eagerState:s(b,he)}else J={lane:he,revertLane:Q.revertLane,gesture:Q.gesture,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},L===null?(T=L=J,w=b):L=L.next=J,it.lanes|=he,Zi|=he;Q=Q.next}while(Q!==null&&Q!==i);if(L===null?w=b:L.next=T,!lr(b,n.memoizedState)&&(xn=!0,oe&&(s=ms,s!==null)))throw s;n.memoizedState=b,n.baseState=w,n.baseQueue=L,u.lastRenderedState=b}return p===null&&(u.lanes=0),[n.memoizedState,u.dispatch]}function Kd(n){var i=hn(),s=i.queue;if(s===null)throw Error(a(311));s.lastRenderedReducer=n;var u=s.dispatch,p=s.pending,b=i.memoizedState;if(p!==null){s.pending=null;var w=p=p.next;do b=n(b,w.action),w=w.next;while(w!==p);lr(b,i.memoizedState)||(xn=!0),i.memoizedState=b,i.baseQueue===null&&(i.baseState=b),s.lastRenderedState=b}return[b,u]}function g0(n,i,s){var u=it,p=hn(),b=kt;if(b){if(s===void 0)throw Error(a(407));s=s()}else s=i();var w=!lr((qt||p).memoizedState,s);if(w&&(p.memoizedState=s,xn=!0),p=p.queue,Qd(y0.bind(null,u,p,n),[n]),p.getSnapshot!==i||w||bn!==null&&bn.memoizedState.tag&1){if(u.flags|=2048,vs(9,{destroy:void 0},x0.bind(null,u,p,s,i),null),Vt===null)throw Error(a(349));b||(bi&127)!==0||b0(u,i,s)}return s}function b0(n,i,s){n.flags|=16384,n={getSnapshot:i,value:s},i=it.updateQueue,i===null?(i=uc(),it.updateQueue=i,i.stores=[n]):(s=i.stores,s===null?i.stores=[n]:s.push(n))}function x0(n,i,s,u){i.value=s,i.getSnapshot=u,v0(i)&&k0(n)}function y0(n,i,s){return s(function(){v0(i)&&k0(n)})}function v0(n){var i=n.getSnapshot;n=n.value;try{var s=i();return!lr(n,s)}catch{return!0}}function k0(n){var i=Ca(n,2);i!==null&&nr(i,n,2)}function Vd(n){var i=$n();if(typeof n=="function"){var s=n;if(n=s(),Ia){Qt(!0);try{s()}finally{Qt(!1)}}}return i.memoizedState=i.baseState=n,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:xi,lastRenderedState:n},i}function w0(n,i,s,u){return n.baseState=s,Gd(n,qt,typeof u=="function"?u:xi)}function H_(n,i,s,u,p){if(pc(n))throw Error(a(485));if(n=i.action,n!==null){var b={payload:p,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(w){b.listeners.push(w)}};F.T!==null?s(!0):b.isTransition=!1,u(b),s=i.pending,s===null?(b.next=i.pending=b,_0(i,b)):(b.next=s.next,i.pending=s.next=b)}}function _0(n,i){var s=i.action,u=i.payload,p=n.state;if(i.isTransition){var b=F.T,w={};F.T=w;try{var T=s(p,u),L=F.S;L!==null&&L(w,T),E0(n,i,T)}catch(Q){Yd(n,i,Q)}finally{b!==null&&w.types!==null&&(b.types=w.types),F.T=b}}else try{b=s(p,u),E0(n,i,b)}catch(Q){Yd(n,i,Q)}}function E0(n,i,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(u){N0(n,i,u)},function(u){return Yd(n,i,u)}):N0(n,i,s)}function N0(n,i,s){i.status="fulfilled",i.value=s,S0(i),n.state=s,i=n.pending,i!==null&&(s=i.next,s===i?n.pending=null:(s=s.next,i.next=s,_0(n,s)))}function Yd(n,i,s){var u=n.pending;if(n.pending=null,u!==null){u=u.next;do i.status="rejected",i.reason=s,S0(i),i=i.next;while(i!==u)}n.action=null}function S0(n){n=n.listeners;for(var i=0;i<n.length;i++)(0,n[i])()}function z0(n,i){return i}function C0(n,i){if(kt){var s=Vt.formState;if(s!==null){e:{var u=it;if(kt){if(en){t:{for(var p=en,b=Er;p.nodeType!==8;){if(!b){p=null;break t}if(p=Sr(p.nextSibling),p===null){p=null;break t}}b=p.data,p=b==="F!"||b==="F"?p:null}if(p){en=Sr(p.nextSibling),u=p.data==="F!";break e}}Hi(u)}u=!1}u&&(i=s[0])}}return s=$n(),s.memoizedState=s.baseState=i,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:z0,lastRenderedState:i},s.queue=u,s=V0.bind(null,it,u),u.dispatch=s,u=Vd(!1),b=ef.bind(null,it,!1,u.queue),u=$n(),p={state:i,dispatch:null,action:n,pending:null},u.queue=p,s=H_.bind(null,it,p,b,s),p.dispatch=s,u.memoizedState=n,[i,s,!1]}function T0(n){var i=hn();return A0(i,qt,n)}function A0(n,i,s){if(i=Gd(n,i,z0)[0],n=fc(xi)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var u=wl(i)}catch(w){throw w===ps?nc:w}else u=i;i=hn();var p=i.queue,b=p.dispatch;return s!==i.memoizedState&&(it.flags|=2048,vs(9,{destroy:void 0},q_.bind(null,p,s),null)),[u,b,n]}function q_(n,i){n.action=i}function R0(n){var i=hn(),s=qt;if(s!==null)return A0(i,s,n);hn(),i=i.memoizedState,s=hn();var u=s.queue.dispatch;return s.memoizedState=n,[i,u,!1]}function vs(n,i,s,u){return n={tag:n,create:s,deps:u,inst:i,next:null},i=it.updateQueue,i===null&&(i=uc(),it.updateQueue=i),s=i.lastEffect,s===null?i.lastEffect=n.next=n:(u=s.next,s.next=n,n.next=u,i.lastEffect=n),n}function O0(){return hn().memoizedState}function hc(n,i,s,u){var p=$n();it.flags|=n,p.memoizedState=vs(1|i,{destroy:void 0},s,u===void 0?null:u)}function mc(n,i,s,u){var p=hn();u=u===void 0?null:u;var b=p.memoizedState.inst;qt!==null&&u!==null&&Ud(u,qt.memoizedState.deps)?p.memoizedState=vs(i,b,s,u):(it.flags|=n,p.memoizedState=vs(1|i,b,s,u))}function M0(n,i){hc(8390656,8,n,i)}function Qd(n,i){mc(2048,8,n,i)}function $_(n){it.flags|=4;var i=it.updateQueue;if(i===null)i=uc(),it.updateQueue=i,i.events=[n];else{var s=i.events;s===null?i.events=[n]:s.push(n)}}function j0(n){var i=hn().memoizedState;return $_({ref:i,nextImpl:n}),function(){if((jt&2)!==0)throw Error(a(440));return i.impl.apply(void 0,arguments)}}function D0(n,i){return mc(4,2,n,i)}function L0(n,i){return mc(4,4,n,i)}function I0(n,i){if(typeof i=="function"){n=n();var s=i(n);return function(){typeof s=="function"?s():i(null)}}if(i!=null)return n=n(),i.current=n,function(){i.current=null}}function B0(n,i,s){s=s!=null?s.concat([n]):null,mc(4,4,I0.bind(null,i,n),s)}function Xd(){}function U0(n,i){var s=hn();i=i===void 0?null:i;var u=s.memoizedState;return i!==null&&Ud(i,u[1])?u[0]:(s.memoizedState=[n,i],n)}function F0(n,i){var s=hn();i=i===void 0?null:i;var u=s.memoizedState;if(i!==null&&Ud(i,u[1]))return u[0];if(u=n(),Ia){Qt(!0);try{n()}finally{Qt(!1)}}return s.memoizedState=[u,i],u}function Zd(n,i,s){return s===void 0||(bi&1073741824)!==0&&(yt&261930)===0?n.memoizedState=i:(n.memoizedState=s,n=Pg(),it.lanes|=n,Zi|=n,s)}function P0(n,i,s,u){return lr(s,i)?s:bs.current!==null?(n=Zd(n,s,u),lr(n,i)||(xn=!0),n):(bi&42)===0||(bi&1073741824)!==0&&(yt&261930)===0?(xn=!0,n.memoizedState=s):(n=Pg(),it.lanes|=n,Zi|=n,i)}function H0(n,i,s,u,p){var b=ne.p;ne.p=b!==0&&8>b?b:8;var w=F.T,T={};F.T=T,ef(n,!1,i,s);try{var L=p(),Q=F.S;if(Q!==null&&Q(T,L),L!==null&&typeof L=="object"&&typeof L.then=="function"){var oe=U_(L,u);_l(n,i,oe,hr(n))}else _l(n,i,u,hr(n))}catch(he){_l(n,i,{then:function(){},status:"rejected",reason:he},hr())}finally{ne.p=b,w!==null&&T.types!==null&&(w.types=T.types),F.T=w}}function G_(){}function Wd(n,i,s,u){if(n.tag!==5)throw Error(a(476));var p=q0(n).queue;H0(n,p,i,V,s===null?G_:function(){return $0(n),s(u)})}function q0(n){var i=n.memoizedState;if(i!==null)return i;i={memoizedState:V,baseState:V,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:xi,lastRenderedState:V},next:null};var s={};return i.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:xi,lastRenderedState:s},next:null},n.memoizedState=i,n=n.alternate,n!==null&&(n.memoizedState=i),i}function $0(n){var i=q0(n);i.next===null&&(i=n.alternate.memoizedState),_l(n,i.next.queue,{},hr())}function Jd(){return jn(Fl)}function G0(){return hn().memoizedState}function K0(){return hn().memoizedState}function K_(n){for(var i=n.return;i!==null;){switch(i.tag){case 24:case 3:var s=hr();n=Gi(s);var u=Ki(i,n,s);u!==null&&(nr(u,i,s),xl(u,i,s)),i={cache:Cd()},n.payload=i;return}i=i.return}}function V_(n,i,s){var u=hr();s={lane:u,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},pc(n)?Y0(i,s):(s=bd(n,i,s,u),s!==null&&(nr(s,n,u),Q0(s,i,u)))}function V0(n,i,s){var u=hr();_l(n,i,s,u)}function _l(n,i,s,u){var p={lane:u,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(pc(n))Y0(i,p);else{var b=n.alternate;if(n.lanes===0&&(b===null||b.lanes===0)&&(b=i.lastRenderedReducer,b!==null))try{var w=i.lastRenderedState,T=b(w,s);if(p.hasEagerState=!0,p.eagerState=T,lr(T,w))return Qo(n,i,p,0),Vt===null&&Yo(),!1}catch{}finally{}if(s=bd(n,i,p,u),s!==null)return nr(s,n,u),Q0(s,i,u),!0}return!1}function ef(n,i,s,u){if(u={lane:2,revertLane:Mf(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},pc(n)){if(i)throw Error(a(479))}else i=bd(n,s,u,2),i!==null&&nr(i,n,2)}function pc(n){var i=n.alternate;return n===it||i!==null&&i===it}function Y0(n,i){xs=oc=!0;var s=n.pending;s===null?i.next=i:(i.next=s.next,s.next=i),n.pending=i}function Q0(n,i,s){if((s&4194048)!==0){var u=i.lanes;u&=n.pendingLanes,s|=u,i.lanes=s,Ve(n,s)}}var El={readContext:jn,use:dc,useCallback:ln,useContext:ln,useEffect:ln,useImperativeHandle:ln,useLayoutEffect:ln,useInsertionEffect:ln,useMemo:ln,useReducer:ln,useRef:ln,useState:ln,useDebugValue:ln,useDeferredValue:ln,useTransition:ln,useSyncExternalStore:ln,useId:ln,useHostTransitionStatus:ln,useFormState:ln,useActionState:ln,useOptimistic:ln,useMemoCache:ln,useCacheRefresh:ln};El.useEffectEvent=ln;var X0={readContext:jn,use:dc,useCallback:function(n,i){return $n().memoizedState=[n,i===void 0?null:i],n},useContext:jn,useEffect:M0,useImperativeHandle:function(n,i,s){s=s!=null?s.concat([n]):null,hc(4194308,4,I0.bind(null,i,n),s)},useLayoutEffect:function(n,i){return hc(4194308,4,n,i)},useInsertionEffect:function(n,i){hc(4,2,n,i)},useMemo:function(n,i){var s=$n();i=i===void 0?null:i;var u=n();if(Ia){Qt(!0);try{n()}finally{Qt(!1)}}return s.memoizedState=[u,i],u},useReducer:function(n,i,s){var u=$n();if(s!==void 0){var p=s(i);if(Ia){Qt(!0);try{s(i)}finally{Qt(!1)}}}else p=i;return u.memoizedState=u.baseState=p,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:p},u.queue=n,n=n.dispatch=V_.bind(null,it,n),[u.memoizedState,n]},useRef:function(n){var i=$n();return n={current:n},i.memoizedState=n},useState:function(n){n=Vd(n);var i=n.queue,s=V0.bind(null,it,i);return i.dispatch=s,[n.memoizedState,s]},useDebugValue:Xd,useDeferredValue:function(n,i){var s=$n();return Zd(s,n,i)},useTransition:function(){var n=Vd(!1);return n=H0.bind(null,it,n.queue,!0,!1),$n().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,i,s){var u=it,p=$n();if(kt){if(s===void 0)throw Error(a(407));s=s()}else{if(s=i(),Vt===null)throw Error(a(349));(yt&127)!==0||b0(u,i,s)}p.memoizedState=s;var b={value:s,getSnapshot:i};return p.queue=b,M0(y0.bind(null,u,b,n),[n]),u.flags|=2048,vs(9,{destroy:void 0},x0.bind(null,u,b,s,i),null),s},useId:function(){var n=$n(),i=Vt.identifierPrefix;if(kt){var s=Xr,u=Qr;s=(u&~(1<<32-At(u)-1)).toString(32)+s,i="_"+i+"R_"+s,s=cc++,0<s&&(i+="H"+s.toString(32)),i+="_"}else s=F_++,i="_"+i+"r_"+s.toString(32)+"_";return n.memoizedState=i},useHostTransitionStatus:Jd,useFormState:C0,useActionState:C0,useOptimistic:function(n){var i=$n();i.memoizedState=i.baseState=n;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=s,i=ef.bind(null,it,!0,s),s.dispatch=i,[n,i]},useMemoCache:$d,useCacheRefresh:function(){return $n().memoizedState=K_.bind(null,it)},useEffectEvent:function(n){var i=$n(),s={impl:n};return i.memoizedState=s,function(){if((jt&2)!==0)throw Error(a(440));return s.impl.apply(void 0,arguments)}}},tf={readContext:jn,use:dc,useCallback:U0,useContext:jn,useEffect:Qd,useImperativeHandle:B0,useInsertionEffect:D0,useLayoutEffect:L0,useMemo:F0,useReducer:fc,useRef:O0,useState:function(){return fc(xi)},useDebugValue:Xd,useDeferredValue:function(n,i){var s=hn();return P0(s,qt.memoizedState,n,i)},useTransition:function(){var n=fc(xi)[0],i=hn().memoizedState;return[typeof n=="boolean"?n:wl(n),i]},useSyncExternalStore:g0,useId:G0,useHostTransitionStatus:Jd,useFormState:T0,useActionState:T0,useOptimistic:function(n,i){var s=hn();return w0(s,qt,n,i)},useMemoCache:$d,useCacheRefresh:K0};tf.useEffectEvent=j0;var Z0={readContext:jn,use:dc,useCallback:U0,useContext:jn,useEffect:Qd,useImperativeHandle:B0,useInsertionEffect:D0,useLayoutEffect:L0,useMemo:F0,useReducer:Kd,useRef:O0,useState:function(){return Kd(xi)},useDebugValue:Xd,useDeferredValue:function(n,i){var s=hn();return qt===null?Zd(s,n,i):P0(s,qt.memoizedState,n,i)},useTransition:function(){var n=Kd(xi)[0],i=hn().memoizedState;return[typeof n=="boolean"?n:wl(n),i]},useSyncExternalStore:g0,useId:G0,useHostTransitionStatus:Jd,useFormState:R0,useActionState:R0,useOptimistic:function(n,i){var s=hn();return qt!==null?w0(s,qt,n,i):(s.baseState=n,[n,s.queue.dispatch])},useMemoCache:$d,useCacheRefresh:K0};Z0.useEffectEvent=j0;function nf(n,i,s,u){i=n.memoizedState,s=s(u,i),s=s==null?i:x({},i,s),n.memoizedState=s,n.lanes===0&&(n.updateQueue.baseState=s)}var rf={enqueueSetState:function(n,i,s){n=n._reactInternals;var u=hr(),p=Gi(u);p.payload=i,s!=null&&(p.callback=s),i=Ki(n,p,u),i!==null&&(nr(i,n,u),xl(i,n,u))},enqueueReplaceState:function(n,i,s){n=n._reactInternals;var u=hr(),p=Gi(u);p.tag=1,p.payload=i,s!=null&&(p.callback=s),i=Ki(n,p,u),i!==null&&(nr(i,n,u),xl(i,n,u))},enqueueForceUpdate:function(n,i){n=n._reactInternals;var s=hr(),u=Gi(s);u.tag=2,i!=null&&(u.callback=i),i=Ki(n,u,s),i!==null&&(nr(i,n,s),xl(i,n,s))}};function W0(n,i,s,u,p,b,w){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(u,b,w):i.prototype&&i.prototype.isPureReactComponent?!ul(s,u)||!ul(p,b):!0}function J0(n,i,s,u){n=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(s,u),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(s,u),i.state!==n&&rf.enqueueReplaceState(i,i.state,null)}function Ba(n,i){var s=i;if("ref"in i){s={};for(var u in i)u!=="ref"&&(s[u]=i[u])}if(n=n.defaultProps){s===i&&(s=x({},s));for(var p in n)s[p]===void 0&&(s[p]=n[p])}return s}function eg(n){Vo(n)}function tg(n){console.error(n)}function ng(n){Vo(n)}function gc(n,i){try{var s=n.onUncaughtError;s(i.value,{componentStack:i.stack})}catch(u){setTimeout(function(){throw u})}}function rg(n,i,s){try{var u=n.onCaughtError;u(s.value,{componentStack:s.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function af(n,i,s){return s=Gi(s),s.tag=3,s.payload={element:null},s.callback=function(){gc(n,i)},s}function ig(n){return n=Gi(n),n.tag=3,n}function ag(n,i,s,u){var p=s.type.getDerivedStateFromError;if(typeof p=="function"){var b=u.value;n.payload=function(){return p(b)},n.callback=function(){rg(i,s,u)}}var w=s.stateNode;w!==null&&typeof w.componentDidCatch=="function"&&(n.callback=function(){rg(i,s,u),typeof p!="function"&&(Wi===null?Wi=new Set([this]):Wi.add(this));var T=u.stack;this.componentDidCatch(u.value,{componentStack:T!==null?T:""})})}function Y_(n,i,s,u,p){if(s.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(i=s.alternate,i!==null&&fs(i,s,p,!0),s=cr.current,s!==null){switch(s.tag){case 31:case 13:return Nr===null?Cc():s.alternate===null&&on===0&&(on=3),s.flags&=-257,s.flags|=65536,s.lanes=p,u===rc?s.flags|=16384:(i=s.updateQueue,i===null?s.updateQueue=new Set([u]):i.add(u),Af(n,u,p)),!1;case 22:return s.flags|=65536,u===rc?s.flags|=16384:(i=s.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([u])},s.updateQueue=i):(s=i.retryQueue,s===null?i.retryQueue=new Set([u]):s.add(u)),Af(n,u,p)),!1}throw Error(a(435,s.tag))}return Af(n,u,p),Cc(),!1}if(kt)return i=cr.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=p,u!==_d&&(n=Error(a(422),{cause:u}),hl(kr(n,s)))):(u!==_d&&(i=Error(a(423),{cause:u}),hl(kr(i,s))),n=n.current.alternate,n.flags|=65536,p&=-p,n.lanes|=p,u=kr(u,s),p=af(n.stateNode,u,p),jd(n,p),on!==4&&(on=2)),!1;var b=Error(a(520),{cause:u});if(b=kr(b,s),Ol===null?Ol=[b]:Ol.push(b),on!==4&&(on=2),i===null)return!0;u=kr(u,s),s=i;do{switch(s.tag){case 3:return s.flags|=65536,n=p&-p,s.lanes|=n,n=af(s.stateNode,u,n),jd(s,n),!1;case 1:if(i=s.type,b=s.stateNode,(s.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Wi===null||!Wi.has(b))))return s.flags|=65536,p&=-p,s.lanes|=p,p=ig(p),ag(p,n,s,u),jd(s,p),!1}s=s.return}while(s!==null);return!1}var sf=Error(a(461)),xn=!1;function Dn(n,i,s,u){i.child=n===null?c0(i,null,s,u):La(i,n.child,s,u)}function sg(n,i,s,u,p){s=s.render;var b=i.ref;if("ref"in u){var w={};for(var T in u)T!=="ref"&&(w[T]=u[T])}else w=u;return Oa(i),u=Fd(n,i,s,w,b,p),T=Pd(),n!==null&&!xn?(Hd(n,i,p),yi(n,i,p)):(kt&&T&&kd(i),i.flags|=1,Dn(n,i,u,p),i.child)}function lg(n,i,s,u,p){if(n===null){var b=s.type;return typeof b=="function"&&!xd(b)&&b.defaultProps===void 0&&s.compare===null?(i.tag=15,i.type=b,og(n,i,b,u,p)):(n=Zo(s.type,null,u,i,i.mode,p),n.ref=i.ref,n.return=i,i.child=n)}if(b=n.child,!mf(n,p)){var w=b.memoizedProps;if(s=s.compare,s=s!==null?s:ul,s(w,u)&&n.ref===i.ref)return yi(n,i,p)}return i.flags|=1,n=hi(b,u),n.ref=i.ref,n.return=i,i.child=n}function og(n,i,s,u,p){if(n!==null){var b=n.memoizedProps;if(ul(b,u)&&n.ref===i.ref)if(xn=!1,i.pendingProps=u=b,mf(n,p))(n.flags&131072)!==0&&(xn=!0);else return i.lanes=n.lanes,yi(n,i,p)}return lf(n,i,s,u,p)}function cg(n,i,s,u){var p=u.children,b=n!==null?n.memoizedState:null;if(n===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if((i.flags&128)!==0){if(b=b!==null?b.baseLanes|s:s,n!==null){for(u=i.child=n.child,p=0;u!==null;)p=p|u.lanes|u.childLanes,u=u.sibling;u=p&~b}else u=0,i.child=null;return ug(n,i,b,s,u)}if((s&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},n!==null&&tc(i,b!==null?b.cachePool:null),b!==null?f0(i,b):Ld(),h0(i);else return u=i.lanes=536870912,ug(n,i,b!==null?b.baseLanes|s:s,s,u)}else b!==null?(tc(i,b.cachePool),f0(i,b),Yi(),i.memoizedState=null):(n!==null&&tc(i,null),Ld(),Yi());return Dn(n,i,p,s),i.child}function Nl(n,i){return n!==null&&n.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function ug(n,i,s,u,p){var b=Ad();return b=b===null?null:{parent:gn._currentValue,pool:b},i.memoizedState={baseLanes:s,cachePool:b},n!==null&&tc(i,null),Ld(),h0(i),n!==null&&fs(n,i,u,!0),i.childLanes=p,null}function bc(n,i){return i=yc({mode:i.mode,children:i.children},n.mode),i.ref=n.ref,n.child=i,i.return=n,i}function dg(n,i,s){return La(i,n.child,null,s),n=bc(i,i.pendingProps),n.flags|=2,ur(i),i.memoizedState=null,n}function Q_(n,i,s){var u=i.pendingProps,p=(i.flags&128)!==0;if(i.flags&=-129,n===null){if(kt){if(u.mode==="hidden")return n=bc(i,u),i.lanes=536870912,Nl(null,n);if(Bd(i),(n=en)?(n=_b(n,Er),n=n!==null&&n.data==="&"?n:null,n!==null&&(i.memoizedState={dehydrated:n,treeContext:Fi!==null?{id:Qr,overflow:Xr}:null,retryLane:536870912,hydrationErrors:null},s=Yp(n),s.return=i,i.child=s,Mn=i,en=null)):n=null,n===null)throw Hi(i);return i.lanes=536870912,null}return bc(i,u)}var b=n.memoizedState;if(b!==null){var w=b.dehydrated;if(Bd(i),p)if(i.flags&256)i.flags&=-257,i=dg(n,i,s);else if(i.memoizedState!==null)i.child=n.child,i.flags|=128,i=null;else throw Error(a(558));else if(xn||fs(n,i,s,!1),p=(s&n.childLanes)!==0,xn||p){if(u=Vt,u!==null&&(w=D(u,s),w!==0&&w!==b.retryLane))throw b.retryLane=w,Ca(n,w),nr(u,n,w),sf;Cc(),i=dg(n,i,s)}else n=b.treeContext,en=Sr(w.nextSibling),Mn=i,kt=!0,Pi=null,Er=!1,n!==null&&Zp(i,n),i=bc(i,u),i.flags|=4096;return i}return n=hi(n.child,{mode:u.mode,children:u.children}),n.ref=i.ref,i.child=n,n.return=i,n}function xc(n,i){var s=i.ref;if(s===null)n!==null&&n.ref!==null&&(i.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(a(284));(n===null||n.ref!==s)&&(i.flags|=4194816)}}function lf(n,i,s,u,p){return Oa(i),s=Fd(n,i,s,u,void 0,p),u=Pd(),n!==null&&!xn?(Hd(n,i,p),yi(n,i,p)):(kt&&u&&kd(i),i.flags|=1,Dn(n,i,s,p),i.child)}function fg(n,i,s,u,p,b){return Oa(i),i.updateQueue=null,s=p0(i,u,s,p),m0(n),u=Pd(),n!==null&&!xn?(Hd(n,i,b),yi(n,i,b)):(kt&&u&&kd(i),i.flags|=1,Dn(n,i,s,b),i.child)}function hg(n,i,s,u,p){if(Oa(i),i.stateNode===null){var b=os,w=s.contextType;typeof w=="object"&&w!==null&&(b=jn(w)),b=new s(u,b),i.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,b.updater=rf,i.stateNode=b,b._reactInternals=i,b=i.stateNode,b.props=u,b.state=i.memoizedState,b.refs={},Od(i),w=s.contextType,b.context=typeof w=="object"&&w!==null?jn(w):os,b.state=i.memoizedState,w=s.getDerivedStateFromProps,typeof w=="function"&&(nf(i,s,w,u),b.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof b.getSnapshotBeforeUpdate=="function"||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(w=b.state,typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount(),w!==b.state&&rf.enqueueReplaceState(b,b.state,null),vl(i,u,b,p),yl(),b.state=i.memoizedState),typeof b.componentDidMount=="function"&&(i.flags|=4194308),u=!0}else if(n===null){b=i.stateNode;var T=i.memoizedProps,L=Ba(s,T);b.props=L;var Q=b.context,oe=s.contextType;w=os,typeof oe=="object"&&oe!==null&&(w=jn(oe));var he=s.getDerivedStateFromProps;oe=typeof he=="function"||typeof b.getSnapshotBeforeUpdate=="function",T=i.pendingProps!==T,oe||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(T||Q!==w)&&J0(i,b,u,w),$i=!1;var J=i.memoizedState;b.state=J,vl(i,u,b,p),yl(),Q=i.memoizedState,T||J!==Q||$i?(typeof he=="function"&&(nf(i,s,he,u),Q=i.memoizedState),(L=$i||W0(i,s,L,u,J,Q,w))?(oe||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount=="function"&&(i.flags|=4194308)):(typeof b.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=u,i.memoizedState=Q),b.props=u,b.state=Q,b.context=w,u=L):(typeof b.componentDidMount=="function"&&(i.flags|=4194308),u=!1)}else{b=i.stateNode,Md(n,i),w=i.memoizedProps,oe=Ba(s,w),b.props=oe,he=i.pendingProps,J=b.context,Q=s.contextType,L=os,typeof Q=="object"&&Q!==null&&(L=jn(Q)),T=s.getDerivedStateFromProps,(Q=typeof T=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(w!==he||J!==L)&&J0(i,b,u,L),$i=!1,J=i.memoizedState,b.state=J,vl(i,u,b,p),yl();var re=i.memoizedState;w!==he||J!==re||$i||n!==null&&n.dependencies!==null&&Jo(n.dependencies)?(typeof T=="function"&&(nf(i,s,T,u),re=i.memoizedState),(oe=$i||W0(i,s,oe,u,J,re,L)||n!==null&&n.dependencies!==null&&Jo(n.dependencies))?(Q||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(u,re,L),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(u,re,L)),typeof b.componentDidUpdate=="function"&&(i.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof b.componentDidUpdate!="function"||w===n.memoizedProps&&J===n.memoizedState||(i.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||w===n.memoizedProps&&J===n.memoizedState||(i.flags|=1024),i.memoizedProps=u,i.memoizedState=re),b.props=u,b.state=re,b.context=L,u=oe):(typeof b.componentDidUpdate!="function"||w===n.memoizedProps&&J===n.memoizedState||(i.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||w===n.memoizedProps&&J===n.memoizedState||(i.flags|=1024),u=!1)}return b=u,xc(n,i),u=(i.flags&128)!==0,b||u?(b=i.stateNode,s=u&&typeof s.getDerivedStateFromError!="function"?null:b.render(),i.flags|=1,n!==null&&u?(i.child=La(i,n.child,null,p),i.child=La(i,null,s,p)):Dn(n,i,s,p),i.memoizedState=b.state,n=i.child):n=yi(n,i,p),n}function mg(n,i,s,u){return Aa(),i.flags|=256,Dn(n,i,s,u),i.child}var of={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function cf(n){return{baseLanes:n,cachePool:r0()}}function uf(n,i,s){return n=n!==null?n.childLanes&~s:0,i&&(n|=fr),n}function pg(n,i,s){var u=i.pendingProps,p=!1,b=(i.flags&128)!==0,w;if((w=b)||(w=n!==null&&n.memoizedState===null?!1:(fn.current&2)!==0),w&&(p=!0,i.flags&=-129),w=(i.flags&32)!==0,i.flags&=-33,n===null){if(kt){if(p?Vi(i):Yi(),(n=en)?(n=_b(n,Er),n=n!==null&&n.data!=="&"?n:null,n!==null&&(i.memoizedState={dehydrated:n,treeContext:Fi!==null?{id:Qr,overflow:Xr}:null,retryLane:536870912,hydrationErrors:null},s=Yp(n),s.return=i,i.child=s,Mn=i,en=null)):n=null,n===null)throw Hi(i);return Kf(n)?i.lanes=32:i.lanes=536870912,null}var T=u.children;return u=u.fallback,p?(Yi(),p=i.mode,T=yc({mode:"hidden",children:T},p),u=Ta(u,p,s,null),T.return=i,u.return=i,T.sibling=u,i.child=T,u=i.child,u.memoizedState=cf(s),u.childLanes=uf(n,w,s),i.memoizedState=of,Nl(null,u)):(Vi(i),df(i,T))}var L=n.memoizedState;if(L!==null&&(T=L.dehydrated,T!==null)){if(b)i.flags&256?(Vi(i),i.flags&=-257,i=ff(n,i,s)):i.memoizedState!==null?(Yi(),i.child=n.child,i.flags|=128,i=null):(Yi(),T=u.fallback,p=i.mode,u=yc({mode:"visible",children:u.children},p),T=Ta(T,p,s,null),T.flags|=2,u.return=i,T.return=i,u.sibling=T,i.child=u,La(i,n.child,null,s),u=i.child,u.memoizedState=cf(s),u.childLanes=uf(n,w,s),i.memoizedState=of,i=Nl(null,u));else if(Vi(i),Kf(T)){if(w=T.nextSibling&&T.nextSibling.dataset,w)var Q=w.dgst;w=Q,u=Error(a(419)),u.stack="",u.digest=w,hl({value:u,source:null,stack:null}),i=ff(n,i,s)}else if(xn||fs(n,i,s,!1),w=(s&n.childLanes)!==0,xn||w){if(w=Vt,w!==null&&(u=D(w,s),u!==0&&u!==L.retryLane))throw L.retryLane=u,Ca(n,u),nr(w,n,u),sf;Gf(T)||Cc(),i=ff(n,i,s)}else Gf(T)?(i.flags|=192,i.child=n.child,i=null):(n=L.treeContext,en=Sr(T.nextSibling),Mn=i,kt=!0,Pi=null,Er=!1,n!==null&&Zp(i,n),i=df(i,u.children),i.flags|=4096);return i}return p?(Yi(),T=u.fallback,p=i.mode,L=n.child,Q=L.sibling,u=hi(L,{mode:"hidden",children:u.children}),u.subtreeFlags=L.subtreeFlags&65011712,Q!==null?T=hi(Q,T):(T=Ta(T,p,s,null),T.flags|=2),T.return=i,u.return=i,u.sibling=T,i.child=u,Nl(null,u),u=i.child,T=n.child.memoizedState,T===null?T=cf(s):(p=T.cachePool,p!==null?(L=gn._currentValue,p=p.parent!==L?{parent:L,pool:L}:p):p=r0(),T={baseLanes:T.baseLanes|s,cachePool:p}),u.memoizedState=T,u.childLanes=uf(n,w,s),i.memoizedState=of,Nl(n.child,u)):(Vi(i),s=n.child,n=s.sibling,s=hi(s,{mode:"visible",children:u.children}),s.return=i,s.sibling=null,n!==null&&(w=i.deletions,w===null?(i.deletions=[n],i.flags|=16):w.push(n)),i.child=s,i.memoizedState=null,s)}function df(n,i){return i=yc({mode:"visible",children:i},n.mode),i.return=n,n.child=i}function yc(n,i){return n=or(22,n,null,i),n.lanes=0,n}function ff(n,i,s){return La(i,n.child,null,s),n=df(i,i.pendingProps.children),n.flags|=2,i.memoizedState=null,n}function gg(n,i,s){n.lanes|=i;var u=n.alternate;u!==null&&(u.lanes|=i),Sd(n.return,i,s)}function hf(n,i,s,u,p,b){var w=n.memoizedState;w===null?n.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:u,tail:s,tailMode:p,treeForkCount:b}:(w.isBackwards=i,w.rendering=null,w.renderingStartTime=0,w.last=u,w.tail=s,w.tailMode=p,w.treeForkCount=b)}function bg(n,i,s){var u=i.pendingProps,p=u.revealOrder,b=u.tail;u=u.children;var w=fn.current,T=(w&2)!==0;if(T?(w=w&1|2,i.flags|=128):w&=1,C(fn,w),Dn(n,i,u,s),u=kt?fl:0,!T&&n!==null&&(n.flags&128)!==0)e:for(n=i.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&gg(n,s,i);else if(n.tag===19)gg(n,s,i);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===i)break e;for(;n.sibling===null;){if(n.return===null||n.return===i)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(p){case"forwards":for(s=i.child,p=null;s!==null;)n=s.alternate,n!==null&&lc(n)===null&&(p=s),s=s.sibling;s=p,s===null?(p=i.child,i.child=null):(p=s.sibling,s.sibling=null),hf(i,!1,p,s,b,u);break;case"backwards":case"unstable_legacy-backwards":for(s=null,p=i.child,i.child=null;p!==null;){if(n=p.alternate,n!==null&&lc(n)===null){i.child=p;break}n=p.sibling,p.sibling=s,s=p,p=n}hf(i,!0,s,null,b,u);break;case"together":hf(i,!1,null,null,void 0,u);break;default:i.memoizedState=null}return i.child}function yi(n,i,s){if(n!==null&&(i.dependencies=n.dependencies),Zi|=i.lanes,(s&i.childLanes)===0)if(n!==null){if(fs(n,i,s,!1),(s&i.childLanes)===0)return null}else return null;if(n!==null&&i.child!==n.child)throw Error(a(153));if(i.child!==null){for(n=i.child,s=hi(n,n.pendingProps),i.child=s,s.return=i;n.sibling!==null;)n=n.sibling,s=s.sibling=hi(n,n.pendingProps),s.return=i;s.sibling=null}return i.child}function mf(n,i){return(n.lanes&i)!==0?!0:(n=n.dependencies,!!(n!==null&&Jo(n)))}function X_(n,i,s){switch(i.tag){case 3:xe(i,i.stateNode.containerInfo),qi(i,gn,n.memoizedState.cache),Aa();break;case 27:case 5:Ue(i);break;case 4:xe(i,i.stateNode.containerInfo);break;case 10:qi(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,Bd(i),null;break;case 13:var u=i.memoizedState;if(u!==null)return u.dehydrated!==null?(Vi(i),i.flags|=128,null):(s&i.child.childLanes)!==0?pg(n,i,s):(Vi(i),n=yi(n,i,s),n!==null?n.sibling:null);Vi(i);break;case 19:var p=(n.flags&128)!==0;if(u=(s&i.childLanes)!==0,u||(fs(n,i,s,!1),u=(s&i.childLanes)!==0),p){if(u)return bg(n,i,s);i.flags|=128}if(p=i.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),C(fn,fn.current),u)break;return null;case 22:return i.lanes=0,cg(n,i,s,i.pendingProps);case 24:qi(i,gn,n.memoizedState.cache)}return yi(n,i,s)}function xg(n,i,s){if(n!==null)if(n.memoizedProps!==i.pendingProps)xn=!0;else{if(!mf(n,s)&&(i.flags&128)===0)return xn=!1,X_(n,i,s);xn=(n.flags&131072)!==0}else xn=!1,kt&&(i.flags&1048576)!==0&&Xp(i,fl,i.index);switch(i.lanes=0,i.tag){case 16:e:{var u=i.pendingProps;if(n=ja(i.elementType),i.type=n,typeof n=="function")xd(n)?(u=Ba(n,u),i.tag=1,i=hg(null,i,n,u,s)):(i.tag=0,i=lf(null,i,n,u,s));else{if(n!=null){var p=n.$$typeof;if(p===P){i.tag=11,i=sg(null,i,n,u,s);break e}else if(p===K){i.tag=14,i=lg(null,i,n,u,s);break e}}throw i=se(n)||n,Error(a(306,i,""))}}return i;case 0:return lf(n,i,i.type,i.pendingProps,s);case 1:return u=i.type,p=Ba(u,i.pendingProps),hg(n,i,u,p,s);case 3:e:{if(xe(i,i.stateNode.containerInfo),n===null)throw Error(a(387));u=i.pendingProps;var b=i.memoizedState;p=b.element,Md(n,i),vl(i,u,null,s);var w=i.memoizedState;if(u=w.cache,qi(i,gn,u),u!==b.cache&&zd(i,[gn],s,!0),yl(),u=w.element,b.isDehydrated)if(b={element:u,isDehydrated:!1,cache:w.cache},i.updateQueue.baseState=b,i.memoizedState=b,i.flags&256){i=mg(n,i,u,s);break e}else if(u!==p){p=kr(Error(a(424)),i),hl(p),i=mg(n,i,u,s);break e}else{switch(n=i.stateNode.containerInfo,n.nodeType){case 9:n=n.body;break;default:n=n.nodeName==="HTML"?n.ownerDocument.body:n}for(en=Sr(n.firstChild),Mn=i,kt=!0,Pi=null,Er=!0,s=c0(i,null,u,s),i.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling}else{if(Aa(),u===p){i=yi(n,i,s);break e}Dn(n,i,u,s)}i=i.child}return i;case 26:return xc(n,i),n===null?(s=Tb(i.type,null,i.pendingProps,null))?i.memoizedState=s:kt||(s=i.type,n=i.pendingProps,u=Dc(ye.current).createElement(s),u[Ee]=i,u[Ce]=n,Ln(u,s,n),Ht(u),i.stateNode=u):i.memoizedState=Tb(i.type,n.memoizedProps,i.pendingProps,n.memoizedState),null;case 27:return Ue(i),n===null&&kt&&(u=i.stateNode=Sb(i.type,i.pendingProps,ye.current),Mn=i,Er=!0,p=en,na(i.type)?(Vf=p,en=Sr(u.firstChild)):en=p),Dn(n,i,i.pendingProps.children,s),xc(n,i),n===null&&(i.flags|=4194304),i.child;case 5:return n===null&&kt&&((p=u=en)&&(u=SE(u,i.type,i.pendingProps,Er),u!==null?(i.stateNode=u,Mn=i,en=Sr(u.firstChild),Er=!1,p=!0):p=!1),p||Hi(i)),Ue(i),p=i.type,b=i.pendingProps,w=n!==null?n.memoizedProps:null,u=b.children,Hf(p,b)?u=null:w!==null&&Hf(p,w)&&(i.flags|=32),i.memoizedState!==null&&(p=Fd(n,i,P_,null,null,s),Fl._currentValue=p),xc(n,i),Dn(n,i,u,s),i.child;case 6:return n===null&&kt&&((n=s=en)&&(s=zE(s,i.pendingProps,Er),s!==null?(i.stateNode=s,Mn=i,en=null,n=!0):n=!1),n||Hi(i)),null;case 13:return pg(n,i,s);case 4:return xe(i,i.stateNode.containerInfo),u=i.pendingProps,n===null?i.child=La(i,null,u,s):Dn(n,i,u,s),i.child;case 11:return sg(n,i,i.type,i.pendingProps,s);case 7:return Dn(n,i,i.pendingProps,s),i.child;case 8:return Dn(n,i,i.pendingProps.children,s),i.child;case 12:return Dn(n,i,i.pendingProps.children,s),i.child;case 10:return u=i.pendingProps,qi(i,i.type,u.value),Dn(n,i,u.children,s),i.child;case 9:return p=i.type._context,u=i.pendingProps.children,Oa(i),p=jn(p),u=u(p),i.flags|=1,Dn(n,i,u,s),i.child;case 14:return lg(n,i,i.type,i.pendingProps,s);case 15:return og(n,i,i.type,i.pendingProps,s);case 19:return bg(n,i,s);case 31:return Q_(n,i,s);case 22:return cg(n,i,s,i.pendingProps);case 24:return Oa(i),u=jn(gn),n===null?(p=Ad(),p===null&&(p=Vt,b=Cd(),p.pooledCache=b,b.refCount++,b!==null&&(p.pooledCacheLanes|=s),p=b),i.memoizedState={parent:u,cache:p},Od(i),qi(i,gn,p)):((n.lanes&s)!==0&&(Md(n,i),vl(i,null,null,s),yl()),p=n.memoizedState,b=i.memoizedState,p.parent!==u?(p={parent:u,cache:u},i.memoizedState=p,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=p),qi(i,gn,u)):(u=b.cache,qi(i,gn,u),u!==p.cache&&zd(i,[gn],s,!0))),Dn(n,i,i.pendingProps.children,s),i.child;case 29:throw i.pendingProps}throw Error(a(156,i.tag))}function vi(n){n.flags|=4}function pf(n,i,s,u,p){if((i=(n.mode&32)!==0)&&(i=!1),i){if(n.flags|=16777216,(p&335544128)===p)if(n.stateNode.complete)n.flags|=8192;else if(Gg())n.flags|=8192;else throw Da=rc,Rd}else n.flags&=-16777217}function yg(n,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!jb(i))if(Gg())n.flags|=8192;else throw Da=rc,Rd}function vc(n,i){i!==null&&(n.flags|=4),n.flags&16384&&(i=n.tag!==22?Qe():536870912,n.lanes|=i,Es|=i)}function Sl(n,i){if(!kt)switch(n.tailMode){case"hidden":i=n.tail;for(var s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?n.tail=null:s.sibling=null;break;case"collapsed":s=n.tail;for(var u=null;s!==null;)s.alternate!==null&&(u=s),s=s.sibling;u===null?i||n.tail===null?n.tail=null:n.tail.sibling=null:u.sibling=null}}function tn(n){var i=n.alternate!==null&&n.alternate.child===n.child,s=0,u=0;if(i)for(var p=n.child;p!==null;)s|=p.lanes|p.childLanes,u|=p.subtreeFlags&65011712,u|=p.flags&65011712,p.return=n,p=p.sibling;else for(p=n.child;p!==null;)s|=p.lanes|p.childLanes,u|=p.subtreeFlags,u|=p.flags,p.return=n,p=p.sibling;return n.subtreeFlags|=u,n.childLanes=s,i}function Z_(n,i,s){var u=i.pendingProps;switch(wd(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return tn(i),null;case 1:return tn(i),null;case 3:return s=i.stateNode,u=null,n!==null&&(u=n.memoizedState.cache),i.memoizedState.cache!==u&&(i.flags|=2048),gi(gn),pe(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(n===null||n.child===null)&&(ds(i)?vi(i):n===null||n.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,Ed())),tn(i),null;case 26:var p=i.type,b=i.memoizedState;return n===null?(vi(i),b!==null?(tn(i),yg(i,b)):(tn(i),pf(i,p,null,u,s))):b?b!==n.memoizedState?(vi(i),tn(i),yg(i,b)):(tn(i),i.flags&=-16777217):(n=n.memoizedProps,n!==u&&vi(i),tn(i),pf(i,p,n,u,s)),null;case 27:if(Re(i),s=ye.current,p=i.type,n!==null&&i.stateNode!=null)n.memoizedProps!==u&&vi(i);else{if(!u){if(i.stateNode===null)throw Error(a(166));return tn(i),null}n=ue.current,ds(i)?Wp(i):(n=Sb(p,u,s),i.stateNode=n,vi(i))}return tn(i),null;case 5:if(Re(i),p=i.type,n!==null&&i.stateNode!=null)n.memoizedProps!==u&&vi(i);else{if(!u){if(i.stateNode===null)throw Error(a(166));return tn(i),null}if(b=ue.current,ds(i))Wp(i);else{var w=Dc(ye.current);switch(b){case 1:b=w.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:b=w.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":b=w.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":b=w.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;case"script":b=w.createElement("div"),b.innerHTML="<script><\/script>",b=b.removeChild(b.firstChild);break;case"select":b=typeof u.is=="string"?w.createElement("select",{is:u.is}):w.createElement("select"),u.multiple?b.multiple=!0:u.size&&(b.size=u.size);break;default:b=typeof u.is=="string"?w.createElement(p,{is:u.is}):w.createElement(p)}}b[Ee]=i,b[Ce]=u;e:for(w=i.child;w!==null;){if(w.tag===5||w.tag===6)b.appendChild(w.stateNode);else if(w.tag!==4&&w.tag!==27&&w.child!==null){w.child.return=w,w=w.child;continue}if(w===i)break e;for(;w.sibling===null;){if(w.return===null||w.return===i)break e;w=w.return}w.sibling.return=w.return,w=w.sibling}i.stateNode=b;e:switch(Ln(b,p,u),p){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&vi(i)}}return tn(i),pf(i,i.type,n===null?null:n.memoizedProps,i.pendingProps,s),null;case 6:if(n&&i.stateNode!=null)n.memoizedProps!==u&&vi(i);else{if(typeof u!="string"&&i.stateNode===null)throw Error(a(166));if(n=ye.current,ds(i)){if(n=i.stateNode,s=i.memoizedProps,u=null,p=Mn,p!==null)switch(p.tag){case 27:case 5:u=p.memoizedProps}n[Ee]=i,n=!!(n.nodeValue===s||u!==null&&u.suppressHydrationWarning===!0||pb(n.nodeValue,s)),n||Hi(i,!0)}else n=Dc(n).createTextNode(u),n[Ee]=i,i.stateNode=n}return tn(i),null;case 31:if(s=i.memoizedState,n===null||n.memoizedState!==null){if(u=ds(i),s!==null){if(n===null){if(!u)throw Error(a(318));if(n=i.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(557));n[Ee]=i}else Aa(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;tn(i),n=!1}else s=Ed(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=s),n=!0;if(!n)return i.flags&256?(ur(i),i):(ur(i),null);if((i.flags&128)!==0)throw Error(a(558))}return tn(i),null;case 13:if(u=i.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(p=ds(i),u!==null&&u.dehydrated!==null){if(n===null){if(!p)throw Error(a(318));if(p=i.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(a(317));p[Ee]=i}else Aa(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;tn(i),p=!1}else p=Ed(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=p),p=!0;if(!p)return i.flags&256?(ur(i),i):(ur(i),null)}return ur(i),(i.flags&128)!==0?(i.lanes=s,i):(s=u!==null,n=n!==null&&n.memoizedState!==null,s&&(u=i.child,p=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(p=u.alternate.memoizedState.cachePool.pool),b=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(b=u.memoizedState.cachePool.pool),b!==p&&(u.flags|=2048)),s!==n&&s&&(i.child.flags|=8192),vc(i,i.updateQueue),tn(i),null);case 4:return pe(),n===null&&If(i.stateNode.containerInfo),tn(i),null;case 10:return gi(i.type),tn(i),null;case 19:if(I(fn),u=i.memoizedState,u===null)return tn(i),null;if(p=(i.flags&128)!==0,b=u.rendering,b===null)if(p)Sl(u,!1);else{if(on!==0||n!==null&&(n.flags&128)!==0)for(n=i.child;n!==null;){if(b=lc(n),b!==null){for(i.flags|=128,Sl(u,!1),n=b.updateQueue,i.updateQueue=n,vc(i,n),i.subtreeFlags=0,n=s,s=i.child;s!==null;)Vp(s,n),s=s.sibling;return C(fn,fn.current&1|2),kt&&mi(i,u.treeForkCount),i.child}n=n.sibling}u.tail!==null&&Wt()>Nc&&(i.flags|=128,p=!0,Sl(u,!1),i.lanes=4194304)}else{if(!p)if(n=lc(b),n!==null){if(i.flags|=128,p=!0,n=n.updateQueue,i.updateQueue=n,vc(i,n),Sl(u,!0),u.tail===null&&u.tailMode==="hidden"&&!b.alternate&&!kt)return tn(i),null}else 2*Wt()-u.renderingStartTime>Nc&&s!==536870912&&(i.flags|=128,p=!0,Sl(u,!1),i.lanes=4194304);u.isBackwards?(b.sibling=i.child,i.child=b):(n=u.last,n!==null?n.sibling=b:i.child=b,u.last=b)}return u.tail!==null?(n=u.tail,u.rendering=n,u.tail=n.sibling,u.renderingStartTime=Wt(),n.sibling=null,s=fn.current,C(fn,p?s&1|2:s&1),kt&&mi(i,u.treeForkCount),n):(tn(i),null);case 22:case 23:return ur(i),Id(),u=i.memoizedState!==null,n!==null?n.memoizedState!==null!==u&&(i.flags|=8192):u&&(i.flags|=8192),u?(s&536870912)!==0&&(i.flags&128)===0&&(tn(i),i.subtreeFlags&6&&(i.flags|=8192)):tn(i),s=i.updateQueue,s!==null&&vc(i,s.retryQueue),s=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),u=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),u!==s&&(i.flags|=2048),n!==null&&I(Ma),null;case 24:return s=null,n!==null&&(s=n.memoizedState.cache),i.memoizedState.cache!==s&&(i.flags|=2048),gi(gn),tn(i),null;case 25:return null;case 30:return null}throw Error(a(156,i.tag))}function W_(n,i){switch(wd(i),i.tag){case 1:return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 3:return gi(gn),pe(),n=i.flags,(n&65536)!==0&&(n&128)===0?(i.flags=n&-65537|128,i):null;case 26:case 27:case 5:return Re(i),null;case 31:if(i.memoizedState!==null){if(ur(i),i.alternate===null)throw Error(a(340));Aa()}return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 13:if(ur(i),n=i.memoizedState,n!==null&&n.dehydrated!==null){if(i.alternate===null)throw Error(a(340));Aa()}return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 19:return I(fn),null;case 4:return pe(),null;case 10:return gi(i.type),null;case 22:case 23:return ur(i),Id(),n!==null&&I(Ma),n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 24:return gi(gn),null;case 25:return null;default:return null}}function vg(n,i){switch(wd(i),i.tag){case 3:gi(gn),pe();break;case 26:case 27:case 5:Re(i);break;case 4:pe();break;case 31:i.memoizedState!==null&&ur(i);break;case 13:ur(i);break;case 19:I(fn);break;case 10:gi(i.type);break;case 22:case 23:ur(i),Id(),n!==null&&I(Ma);break;case 24:gi(gn)}}function zl(n,i){try{var s=i.updateQueue,u=s!==null?s.lastEffect:null;if(u!==null){var p=u.next;s=p;do{if((s.tag&n)===n){u=void 0;var b=s.create,w=s.inst;u=b(),w.destroy=u}s=s.next}while(s!==p)}}catch(T){Pt(i,i.return,T)}}function Qi(n,i,s){try{var u=i.updateQueue,p=u!==null?u.lastEffect:null;if(p!==null){var b=p.next;u=b;do{if((u.tag&n)===n){var w=u.inst,T=w.destroy;if(T!==void 0){w.destroy=void 0,p=i;var L=s,Q=T;try{Q()}catch(oe){Pt(p,L,oe)}}}u=u.next}while(u!==b)}}catch(oe){Pt(i,i.return,oe)}}function kg(n){var i=n.updateQueue;if(i!==null){var s=n.stateNode;try{d0(i,s)}catch(u){Pt(n,n.return,u)}}}function wg(n,i,s){s.props=Ba(n.type,n.memoizedProps),s.state=n.memoizedState;try{s.componentWillUnmount()}catch(u){Pt(n,i,u)}}function Cl(n,i){try{var s=n.ref;if(s!==null){switch(n.tag){case 26:case 27:case 5:var u=n.stateNode;break;case 30:u=n.stateNode;break;default:u=n.stateNode}typeof s=="function"?n.refCleanup=s(u):s.current=u}}catch(p){Pt(n,i,p)}}function Zr(n,i){var s=n.ref,u=n.refCleanup;if(s!==null)if(typeof u=="function")try{u()}catch(p){Pt(n,i,p)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(p){Pt(n,i,p)}else s.current=null}function _g(n){var i=n.type,s=n.memoizedProps,u=n.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":s.autoFocus&&u.focus();break e;case"img":s.src?u.src=s.src:s.srcSet&&(u.srcset=s.srcSet)}}catch(p){Pt(n,n.return,p)}}function gf(n,i,s){try{var u=n.stateNode;vE(u,n.type,s,i),u[Ce]=i}catch(p){Pt(n,n.return,p)}}function Eg(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&na(n.type)||n.tag===4}function bf(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Eg(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&na(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function xf(n,i,s){var u=n.tag;if(u===5||u===6)n=n.stateNode,i?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(n,i):(i=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,i.appendChild(n),s=s._reactRootContainer,s!=null||i.onclick!==null||(i.onclick=Se));else if(u!==4&&(u===27&&na(n.type)&&(s=n.stateNode,i=null),n=n.child,n!==null))for(xf(n,i,s),n=n.sibling;n!==null;)xf(n,i,s),n=n.sibling}function kc(n,i,s){var u=n.tag;if(u===5||u===6)n=n.stateNode,i?s.insertBefore(n,i):s.appendChild(n);else if(u!==4&&(u===27&&na(n.type)&&(s=n.stateNode),n=n.child,n!==null))for(kc(n,i,s),n=n.sibling;n!==null;)kc(n,i,s),n=n.sibling}function Ng(n){var i=n.stateNode,s=n.memoizedProps;try{for(var u=n.type,p=i.attributes;p.length;)i.removeAttributeNode(p[0]);Ln(i,u,s),i[Ee]=n,i[Ce]=s}catch(b){Pt(n,n.return,b)}}var ki=!1,yn=!1,yf=!1,Sg=typeof WeakSet=="function"?WeakSet:Set,An=null;function J_(n,i){if(n=n.containerInfo,Ff=Hc,n=Bp(n),dd(n)){if("selectionStart"in n)var s={start:n.selectionStart,end:n.selectionEnd};else e:{s=(s=n.ownerDocument)&&s.defaultView||window;var u=s.getSelection&&s.getSelection();if(u&&u.rangeCount!==0){s=u.anchorNode;var p=u.anchorOffset,b=u.focusNode;u=u.focusOffset;try{s.nodeType,b.nodeType}catch{s=null;break e}var w=0,T=-1,L=-1,Q=0,oe=0,he=n,J=null;t:for(;;){for(var re;he!==s||p!==0&&he.nodeType!==3||(T=w+p),he!==b||u!==0&&he.nodeType!==3||(L=w+u),he.nodeType===3&&(w+=he.nodeValue.length),(re=he.firstChild)!==null;)J=he,he=re;for(;;){if(he===n)break t;if(J===s&&++Q===p&&(T=w),J===b&&++oe===u&&(L=w),(re=he.nextSibling)!==null)break;he=J,J=he.parentNode}he=re}s=T===-1||L===-1?null:{start:T,end:L}}else s=null}s=s||{start:0,end:0}}else s=null;for(Pf={focusedElem:n,selectionRange:s},Hc=!1,An=i;An!==null;)if(i=An,n=i.child,(i.subtreeFlags&1028)!==0&&n!==null)n.return=i,An=n;else for(;An!==null;){switch(i=An,b=i.alternate,n=i.flags,i.tag){case 0:if((n&4)!==0&&(n=i.updateQueue,n=n!==null?n.events:null,n!==null))for(s=0;s<n.length;s++)p=n[s],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&b!==null){n=void 0,s=i,p=b.memoizedProps,b=b.memoizedState,u=s.stateNode;try{var je=Ba(s.type,p);n=u.getSnapshotBeforeUpdate(je,b),u.__reactInternalSnapshotBeforeUpdate=n}catch(Ye){Pt(s,s.return,Ye)}}break;case 3:if((n&1024)!==0){if(n=i.stateNode.containerInfo,s=n.nodeType,s===9)$f(n);else if(s===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":$f(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(a(163))}if(n=i.sibling,n!==null){n.return=i.return,An=n;break}An=i.return}}function zg(n,i,s){var u=s.flags;switch(s.tag){case 0:case 11:case 15:_i(n,s),u&4&&zl(5,s);break;case 1:if(_i(n,s),u&4)if(n=s.stateNode,i===null)try{n.componentDidMount()}catch(w){Pt(s,s.return,w)}else{var p=Ba(s.type,i.memoizedProps);i=i.memoizedState;try{n.componentDidUpdate(p,i,n.__reactInternalSnapshotBeforeUpdate)}catch(w){Pt(s,s.return,w)}}u&64&&kg(s),u&512&&Cl(s,s.return);break;case 3:if(_i(n,s),u&64&&(n=s.updateQueue,n!==null)){if(i=null,s.child!==null)switch(s.child.tag){case 27:case 5:i=s.child.stateNode;break;case 1:i=s.child.stateNode}try{d0(n,i)}catch(w){Pt(s,s.return,w)}}break;case 27:i===null&&u&4&&Ng(s);case 26:case 5:_i(n,s),i===null&&u&4&&_g(s),u&512&&Cl(s,s.return);break;case 12:_i(n,s);break;case 31:_i(n,s),u&4&&Ag(n,s);break;case 13:_i(n,s),u&4&&Rg(n,s),u&64&&(n=s.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(s=oE.bind(null,s),CE(n,s))));break;case 22:if(u=s.memoizedState!==null||ki,!u){i=i!==null&&i.memoizedState!==null||yn,p=ki;var b=yn;ki=u,(yn=i)&&!b?Ei(n,s,(s.subtreeFlags&8772)!==0):_i(n,s),ki=p,yn=b}break;case 30:break;default:_i(n,s)}}function Cg(n){var i=n.alternate;i!==null&&(n.alternate=null,Cg(i)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(i=n.stateNode,i!==null&&Bt(i)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var an=null,Wn=!1;function wi(n,i,s){for(s=s.child;s!==null;)Tg(n,i,s),s=s.sibling}function Tg(n,i,s){if(rn&&typeof rn.onCommitFiberUnmount=="function")try{rn.onCommitFiberUnmount(cn,s)}catch{}switch(s.tag){case 26:yn||Zr(s,i),wi(n,i,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:yn||Zr(s,i);var u=an,p=Wn;na(s.type)&&(an=s.stateNode,Wn=!1),wi(n,i,s),Il(s.stateNode),an=u,Wn=p;break;case 5:yn||Zr(s,i);case 6:if(u=an,p=Wn,an=null,wi(n,i,s),an=u,Wn=p,an!==null)if(Wn)try{(an.nodeType===9?an.body:an.nodeName==="HTML"?an.ownerDocument.body:an).removeChild(s.stateNode)}catch(b){Pt(s,i,b)}else try{an.removeChild(s.stateNode)}catch(b){Pt(s,i,b)}break;case 18:an!==null&&(Wn?(n=an,kb(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,s.stateNode),Os(n)):kb(an,s.stateNode));break;case 4:u=an,p=Wn,an=s.stateNode.containerInfo,Wn=!0,wi(n,i,s),an=u,Wn=p;break;case 0:case 11:case 14:case 15:Qi(2,s,i),yn||Qi(4,s,i),wi(n,i,s);break;case 1:yn||(Zr(s,i),u=s.stateNode,typeof u.componentWillUnmount=="function"&&wg(s,i,u)),wi(n,i,s);break;case 21:wi(n,i,s);break;case 22:yn=(u=yn)||s.memoizedState!==null,wi(n,i,s),yn=u;break;default:wi(n,i,s)}}function Ag(n,i){if(i.memoizedState===null&&(n=i.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{Os(n)}catch(s){Pt(i,i.return,s)}}}function Rg(n,i){if(i.memoizedState===null&&(n=i.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{Os(n)}catch(s){Pt(i,i.return,s)}}function eE(n){switch(n.tag){case 31:case 13:case 19:var i=n.stateNode;return i===null&&(i=n.stateNode=new Sg),i;case 22:return n=n.stateNode,i=n._retryCache,i===null&&(i=n._retryCache=new Sg),i;default:throw Error(a(435,n.tag))}}function wc(n,i){var s=eE(n);i.forEach(function(u){if(!s.has(u)){s.add(u);var p=cE.bind(null,n,u);u.then(p,p)}})}function Jn(n,i){var s=i.deletions;if(s!==null)for(var u=0;u<s.length;u++){var p=s[u],b=n,w=i,T=w;e:for(;T!==null;){switch(T.tag){case 27:if(na(T.type)){an=T.stateNode,Wn=!1;break e}break;case 5:an=T.stateNode,Wn=!1;break e;case 3:case 4:an=T.stateNode.containerInfo,Wn=!0;break e}T=T.return}if(an===null)throw Error(a(160));Tg(b,w,p),an=null,Wn=!1,b=p.alternate,b!==null&&(b.return=null),p.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)Og(i,n),i=i.sibling}var Br=null;function Og(n,i){var s=n.alternate,u=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:Jn(i,n),er(n),u&4&&(Qi(3,n,n.return),zl(3,n),Qi(5,n,n.return));break;case 1:Jn(i,n),er(n),u&512&&(yn||s===null||Zr(s,s.return)),u&64&&ki&&(n=n.updateQueue,n!==null&&(u=n.callbacks,u!==null&&(s=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=s===null?u:s.concat(u))));break;case 26:var p=Br;if(Jn(i,n),er(n),u&512&&(yn||s===null||Zr(s,s.return)),u&4){var b=s!==null?s.memoizedState:null;if(u=n.memoizedState,s===null)if(u===null)if(n.stateNode===null){e:{u=n.type,s=n.memoizedProps,p=p.ownerDocument||p;t:switch(u){case"title":b=p.getElementsByTagName("title")[0],(!b||b[lt]||b[Ee]||b.namespaceURI==="http://www.w3.org/2000/svg"||b.hasAttribute("itemprop"))&&(b=p.createElement(u),p.head.insertBefore(b,p.querySelector("head > title"))),Ln(b,u,s),b[Ee]=n,Ht(b),u=b;break e;case"link":var w=Ob("link","href",p).get(u+(s.href||""));if(w){for(var T=0;T<w.length;T++)if(b=w[T],b.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&b.getAttribute("rel")===(s.rel==null?null:s.rel)&&b.getAttribute("title")===(s.title==null?null:s.title)&&b.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){w.splice(T,1);break t}}b=p.createElement(u),Ln(b,u,s),p.head.appendChild(b);break;case"meta":if(w=Ob("meta","content",p).get(u+(s.content||""))){for(T=0;T<w.length;T++)if(b=w[T],b.getAttribute("content")===(s.content==null?null:""+s.content)&&b.getAttribute("name")===(s.name==null?null:s.name)&&b.getAttribute("property")===(s.property==null?null:s.property)&&b.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&b.getAttribute("charset")===(s.charSet==null?null:s.charSet)){w.splice(T,1);break t}}b=p.createElement(u),Ln(b,u,s),p.head.appendChild(b);break;default:throw Error(a(468,u))}b[Ee]=n,Ht(b),u=b}n.stateNode=u}else Mb(p,n.type,n.stateNode);else n.stateNode=Rb(p,u,n.memoizedProps);else b!==u?(b===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):b.count--,u===null?Mb(p,n.type,n.stateNode):Rb(p,u,n.memoizedProps)):u===null&&n.stateNode!==null&&gf(n,n.memoizedProps,s.memoizedProps)}break;case 27:Jn(i,n),er(n),u&512&&(yn||s===null||Zr(s,s.return)),s!==null&&u&4&&gf(n,n.memoizedProps,s.memoizedProps);break;case 5:if(Jn(i,n),er(n),u&512&&(yn||s===null||Zr(s,s.return)),n.flags&32){p=n.stateNode;try{Ze(p,"")}catch(je){Pt(n,n.return,je)}}u&4&&n.stateNode!=null&&(p=n.memoizedProps,gf(n,p,s!==null?s.memoizedProps:p)),u&1024&&(yf=!0);break;case 6:if(Jn(i,n),er(n),u&4){if(n.stateNode===null)throw Error(a(162));u=n.memoizedProps,s=n.stateNode;try{s.nodeValue=u}catch(je){Pt(n,n.return,je)}}break;case 3:if(Bc=null,p=Br,Br=Lc(i.containerInfo),Jn(i,n),Br=p,er(n),u&4&&s!==null&&s.memoizedState.isDehydrated)try{Os(i.containerInfo)}catch(je){Pt(n,n.return,je)}yf&&(yf=!1,Mg(n));break;case 4:u=Br,Br=Lc(n.stateNode.containerInfo),Jn(i,n),er(n),Br=u;break;case 12:Jn(i,n),er(n);break;case 31:Jn(i,n),er(n),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,wc(n,u)));break;case 13:Jn(i,n),er(n),n.child.flags&8192&&n.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(Ec=Wt()),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,wc(n,u)));break;case 22:p=n.memoizedState!==null;var L=s!==null&&s.memoizedState!==null,Q=ki,oe=yn;if(ki=Q||p,yn=oe||L,Jn(i,n),yn=oe,ki=Q,er(n),u&8192)e:for(i=n.stateNode,i._visibility=p?i._visibility&-2:i._visibility|1,p&&(s===null||L||ki||yn||Ua(n)),s=null,i=n;;){if(i.tag===5||i.tag===26){if(s===null){L=s=i;try{if(b=L.stateNode,p)w=b.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none";else{T=L.stateNode;var he=L.memoizedProps.style,J=he!=null&&he.hasOwnProperty("display")?he.display:null;T.style.display=J==null||typeof J=="boolean"?"":(""+J).trim()}}catch(je){Pt(L,L.return,je)}}}else if(i.tag===6){if(s===null){L=i;try{L.stateNode.nodeValue=p?"":L.memoizedProps}catch(je){Pt(L,L.return,je)}}}else if(i.tag===18){if(s===null){L=i;try{var re=L.stateNode;p?wb(re,!0):wb(L.stateNode,!1)}catch(je){Pt(L,L.return,je)}}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===n)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===n)break e;for(;i.sibling===null;){if(i.return===null||i.return===n)break e;s===i&&(s=null),i=i.return}s===i&&(s=null),i.sibling.return=i.return,i=i.sibling}u&4&&(u=n.updateQueue,u!==null&&(s=u.retryQueue,s!==null&&(u.retryQueue=null,wc(n,s))));break;case 19:Jn(i,n),er(n),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,wc(n,u)));break;case 30:break;case 21:break;default:Jn(i,n),er(n)}}function er(n){var i=n.flags;if(i&2){try{for(var s,u=n.return;u!==null;){if(Eg(u)){s=u;break}u=u.return}if(s==null)throw Error(a(160));switch(s.tag){case 27:var p=s.stateNode,b=bf(n);kc(n,b,p);break;case 5:var w=s.stateNode;s.flags&32&&(Ze(w,""),s.flags&=-33);var T=bf(n);kc(n,T,w);break;case 3:case 4:var L=s.stateNode.containerInfo,Q=bf(n);xf(n,Q,L);break;default:throw Error(a(161))}}catch(oe){Pt(n,n.return,oe)}n.flags&=-3}i&4096&&(n.flags&=-4097)}function Mg(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var i=n;Mg(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),n=n.sibling}}function _i(n,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)zg(n,i.alternate,i),i=i.sibling}function Ua(n){for(n=n.child;n!==null;){var i=n;switch(i.tag){case 0:case 11:case 14:case 15:Qi(4,i,i.return),Ua(i);break;case 1:Zr(i,i.return);var s=i.stateNode;typeof s.componentWillUnmount=="function"&&wg(i,i.return,s),Ua(i);break;case 27:Il(i.stateNode);case 26:case 5:Zr(i,i.return),Ua(i);break;case 22:i.memoizedState===null&&Ua(i);break;case 30:Ua(i);break;default:Ua(i)}n=n.sibling}}function Ei(n,i,s){for(s=s&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var u=i.alternate,p=n,b=i,w=b.flags;switch(b.tag){case 0:case 11:case 15:Ei(p,b,s),zl(4,b);break;case 1:if(Ei(p,b,s),u=b,p=u.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(Q){Pt(u,u.return,Q)}if(u=b,p=u.updateQueue,p!==null){var T=u.stateNode;try{var L=p.shared.hiddenCallbacks;if(L!==null)for(p.shared.hiddenCallbacks=null,p=0;p<L.length;p++)u0(L[p],T)}catch(Q){Pt(u,u.return,Q)}}s&&w&64&&kg(b),Cl(b,b.return);break;case 27:Ng(b);case 26:case 5:Ei(p,b,s),s&&u===null&&w&4&&_g(b),Cl(b,b.return);break;case 12:Ei(p,b,s);break;case 31:Ei(p,b,s),s&&w&4&&Ag(p,b);break;case 13:Ei(p,b,s),s&&w&4&&Rg(p,b);break;case 22:b.memoizedState===null&&Ei(p,b,s),Cl(b,b.return);break;case 30:break;default:Ei(p,b,s)}i=i.sibling}}function vf(n,i){var s=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),n=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(n=i.memoizedState.cachePool.pool),n!==s&&(n!=null&&n.refCount++,s!=null&&ml(s))}function kf(n,i){n=null,i.alternate!==null&&(n=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==n&&(i.refCount++,n!=null&&ml(n))}function Ur(n,i,s,u){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)jg(n,i,s,u),i=i.sibling}function jg(n,i,s,u){var p=i.flags;switch(i.tag){case 0:case 11:case 15:Ur(n,i,s,u),p&2048&&zl(9,i);break;case 1:Ur(n,i,s,u);break;case 3:Ur(n,i,s,u),p&2048&&(n=null,i.alternate!==null&&(n=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==n&&(i.refCount++,n!=null&&ml(n)));break;case 12:if(p&2048){Ur(n,i,s,u),n=i.stateNode;try{var b=i.memoizedProps,w=b.id,T=b.onPostCommit;typeof T=="function"&&T(w,i.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(L){Pt(i,i.return,L)}}else Ur(n,i,s,u);break;case 31:Ur(n,i,s,u);break;case 13:Ur(n,i,s,u);break;case 23:break;case 22:b=i.stateNode,w=i.alternate,i.memoizedState!==null?b._visibility&2?Ur(n,i,s,u):Tl(n,i):b._visibility&2?Ur(n,i,s,u):(b._visibility|=2,ks(n,i,s,u,(i.subtreeFlags&10256)!==0||!1)),p&2048&&vf(w,i);break;case 24:Ur(n,i,s,u),p&2048&&kf(i.alternate,i);break;default:Ur(n,i,s,u)}}function ks(n,i,s,u,p){for(p=p&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var b=n,w=i,T=s,L=u,Q=w.flags;switch(w.tag){case 0:case 11:case 15:ks(b,w,T,L,p),zl(8,w);break;case 23:break;case 22:var oe=w.stateNode;w.memoizedState!==null?oe._visibility&2?ks(b,w,T,L,p):Tl(b,w):(oe._visibility|=2,ks(b,w,T,L,p)),p&&Q&2048&&vf(w.alternate,w);break;case 24:ks(b,w,T,L,p),p&&Q&2048&&kf(w.alternate,w);break;default:ks(b,w,T,L,p)}i=i.sibling}}function Tl(n,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var s=n,u=i,p=u.flags;switch(u.tag){case 22:Tl(s,u),p&2048&&vf(u.alternate,u);break;case 24:Tl(s,u),p&2048&&kf(u.alternate,u);break;default:Tl(s,u)}i=i.sibling}}var Al=8192;function ws(n,i,s){if(n.subtreeFlags&Al)for(n=n.child;n!==null;)Dg(n,i,s),n=n.sibling}function Dg(n,i,s){switch(n.tag){case 26:ws(n,i,s),n.flags&Al&&n.memoizedState!==null&&FE(s,Br,n.memoizedState,n.memoizedProps);break;case 5:ws(n,i,s);break;case 3:case 4:var u=Br;Br=Lc(n.stateNode.containerInfo),ws(n,i,s),Br=u;break;case 22:n.memoizedState===null&&(u=n.alternate,u!==null&&u.memoizedState!==null?(u=Al,Al=16777216,ws(n,i,s),Al=u):ws(n,i,s));break;default:ws(n,i,s)}}function Lg(n){var i=n.alternate;if(i!==null&&(n=i.child,n!==null)){i.child=null;do i=n.sibling,n.sibling=null,n=i;while(n!==null)}}function Rl(n){var i=n.deletions;if((n.flags&16)!==0){if(i!==null)for(var s=0;s<i.length;s++){var u=i[s];An=u,Bg(u,n)}Lg(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Ig(n),n=n.sibling}function Ig(n){switch(n.tag){case 0:case 11:case 15:Rl(n),n.flags&2048&&Qi(9,n,n.return);break;case 3:Rl(n);break;case 12:Rl(n);break;case 22:var i=n.stateNode;n.memoizedState!==null&&i._visibility&2&&(n.return===null||n.return.tag!==13)?(i._visibility&=-3,_c(n)):Rl(n);break;default:Rl(n)}}function _c(n){var i=n.deletions;if((n.flags&16)!==0){if(i!==null)for(var s=0;s<i.length;s++){var u=i[s];An=u,Bg(u,n)}Lg(n)}for(n=n.child;n!==null;){switch(i=n,i.tag){case 0:case 11:case 15:Qi(8,i,i.return),_c(i);break;case 22:s=i.stateNode,s._visibility&2&&(s._visibility&=-3,_c(i));break;default:_c(i)}n=n.sibling}}function Bg(n,i){for(;An!==null;){var s=An;switch(s.tag){case 0:case 11:case 15:Qi(8,s,i);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var u=s.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:ml(s.memoizedState.cache)}if(u=s.child,u!==null)u.return=s,An=u;else e:for(s=n;An!==null;){u=An;var p=u.sibling,b=u.return;if(Cg(u),u===s){An=null;break e}if(p!==null){p.return=b,An=p;break e}An=b}}}var tE={getCacheForType:function(n){var i=jn(gn),s=i.data.get(n);return s===void 0&&(s=n(),i.data.set(n,s)),s},cacheSignal:function(){return jn(gn).controller.signal}},nE=typeof WeakMap=="function"?WeakMap:Map,jt=0,Vt=null,ht=null,yt=0,Ft=0,dr=null,Xi=!1,_s=!1,wf=!1,Ni=0,on=0,Zi=0,Fa=0,_f=0,fr=0,Es=0,Ol=null,tr=null,Ef=!1,Ec=0,Ug=0,Nc=1/0,Sc=null,Wi=null,En=0,Ji=null,Ns=null,Si=0,Nf=0,Sf=null,Fg=null,Ml=0,zf=null;function hr(){return(jt&2)!==0&&yt!==0?yt&-yt:F.T!==null?Mf():me()}function Pg(){if(fr===0)if((yt&536870912)===0||kt){var n=Lr;Lr<<=1,(Lr&3932160)===0&&(Lr=262144),fr=n}else fr=536870912;return n=cr.current,n!==null&&(n.flags|=32),fr}function nr(n,i,s){(n===Vt&&(Ft===2||Ft===9)||n.cancelPendingCommit!==null)&&(Ss(n,0),ea(n,yt,fr,!1)),Rt(n,s),((jt&2)===0||n!==Vt)&&(n===Vt&&((jt&2)===0&&(Fa|=s),on===4&&ea(n,yt,fr,!1)),Wr(n))}function Hg(n,i,s){if((jt&6)!==0)throw Error(a(327));var u=!s&&(i&127)===0&&(i&n.expiredLanes)===0||ce(n,i),p=u?aE(n,i):Tf(n,i,!0),b=u;do{if(p===0){_s&&!u&&ea(n,i,0,!1);break}else{if(s=n.current.alternate,b&&!rE(s)){p=Tf(n,i,!1),b=!1;continue}if(p===2){if(b=i,n.errorRecoveryDisabledLanes&b)var w=0;else w=n.pendingLanes&-536870913,w=w!==0?w:w&536870912?536870912:0;if(w!==0){i=w;e:{var T=n;p=Ol;var L=T.current.memoizedState.isDehydrated;if(L&&(Ss(T,w).flags|=256),w=Tf(T,w,!1),w!==2){if(wf&&!L){T.errorRecoveryDisabledLanes|=b,Fa|=b,p=4;break e}b=tr,tr=p,b!==null&&(tr===null?tr=b:tr.push.apply(tr,b))}p=w}if(b=!1,p!==2)continue}}if(p===1){Ss(n,0),ea(n,i,0,!0);break}e:{switch(u=n,b=p,b){case 0:case 1:throw Error(a(345));case 4:if((i&4194048)!==i)break;case 6:ea(u,i,fr,!Xi);break e;case 2:tr=null;break;case 3:case 5:break;default:throw Error(a(329))}if((i&62914560)===i&&(p=Ec+300-Wt(),10<p)){if(ea(u,i,fr,!Xi),B(u,0,!0)!==0)break e;Si=i,u.timeoutHandle=yb(qg.bind(null,u,s,tr,Sc,Ef,i,fr,Fa,Es,Xi,b,"Throttled",-0,0),p);break e}qg(u,s,tr,Sc,Ef,i,fr,Fa,Es,Xi,b,null,-0,0)}}break}while(!0);Wr(n)}function qg(n,i,s,u,p,b,w,T,L,Q,oe,he,J,re){if(n.timeoutHandle=-1,he=i.subtreeFlags,he&8192||(he&16785408)===16785408){he={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Se},Dg(i,b,he);var je=(b&62914560)===b?Ec-Wt():(b&4194048)===b?Ug-Wt():0;if(je=PE(he,je),je!==null){Si=b,n.cancelPendingCommit=je(Zg.bind(null,n,i,b,s,u,p,w,T,L,oe,he,null,J,re)),ea(n,b,w,!Q);return}}Zg(n,i,b,s,u,p,w,T,L)}function rE(n){for(var i=n;;){var s=i.tag;if((s===0||s===11||s===15)&&i.flags&16384&&(s=i.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var u=0;u<s.length;u++){var p=s[u],b=p.getSnapshot;p=p.value;try{if(!lr(b(),p))return!1}catch{return!1}}if(s=i.child,i.subtreeFlags&16384&&s!==null)s.return=i,i=s;else{if(i===n)break;for(;i.sibling===null;){if(i.return===null||i.return===n)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function ea(n,i,s,u){i&=~_f,i&=~Fa,n.suspendedLanes|=i,n.pingedLanes&=~i,u&&(n.warmLanes|=i),u=n.expirationTimes;for(var p=i;0<p;){var b=31-At(p),w=1<<b;u[b]=-1,p&=~w}s!==0&&Te(n,s,i)}function zc(){return(jt&6)===0?(jl(0),!1):!0}function Cf(){if(ht!==null){if(Ft===0)var n=ht.return;else n=ht,pi=Ra=null,qd(n),gs=null,gl=0,n=ht;for(;n!==null;)vg(n.alternate,n),n=n.return;ht=null}}function Ss(n,i){var s=n.timeoutHandle;s!==-1&&(n.timeoutHandle=-1,_E(s)),s=n.cancelPendingCommit,s!==null&&(n.cancelPendingCommit=null,s()),Si=0,Cf(),Vt=n,ht=s=hi(n.current,null),yt=i,Ft=0,dr=null,Xi=!1,_s=ce(n,i),wf=!1,Es=fr=_f=Fa=Zi=on=0,tr=Ol=null,Ef=!1,(i&8)!==0&&(i|=i&32);var u=n.entangledLanes;if(u!==0)for(n=n.entanglements,u&=i;0<u;){var p=31-At(u),b=1<<p;i|=n[p],u&=~b}return Ni=i,Yo(),s}function $g(n,i){it=null,F.H=El,i===ps||i===nc?(i=s0(),Ft=3):i===Rd?(i=s0(),Ft=4):Ft=i===sf?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,dr=i,ht===null&&(on=1,gc(n,kr(i,n.current)))}function Gg(){var n=cr.current;return n===null?!0:(yt&4194048)===yt?Nr===null:(yt&62914560)===yt||(yt&536870912)!==0?n===Nr:!1}function Kg(){var n=F.H;return F.H=El,n===null?El:n}function Vg(){var n=F.A;return F.A=tE,n}function Cc(){on=4,Xi||(yt&4194048)!==yt&&cr.current!==null||(_s=!0),(Zi&134217727)===0&&(Fa&134217727)===0||Vt===null||ea(Vt,yt,fr,!1)}function Tf(n,i,s){var u=jt;jt|=2;var p=Kg(),b=Vg();(Vt!==n||yt!==i)&&(Sc=null,Ss(n,i)),i=!1;var w=on;e:do try{if(Ft!==0&&ht!==null){var T=ht,L=dr;switch(Ft){case 8:Cf(),w=6;break e;case 3:case 2:case 9:case 6:cr.current===null&&(i=!0);var Q=Ft;if(Ft=0,dr=null,zs(n,T,L,Q),s&&_s){w=0;break e}break;default:Q=Ft,Ft=0,dr=null,zs(n,T,L,Q)}}iE(),w=on;break}catch(oe){$g(n,oe)}while(!0);return i&&n.shellSuspendCounter++,pi=Ra=null,jt=u,F.H=p,F.A=b,ht===null&&(Vt=null,yt=0,Yo()),w}function iE(){for(;ht!==null;)Yg(ht)}function aE(n,i){var s=jt;jt|=2;var u=Kg(),p=Vg();Vt!==n||yt!==i?(Sc=null,Nc=Wt()+500,Ss(n,i)):_s=ce(n,i);e:do try{if(Ft!==0&&ht!==null){i=ht;var b=dr;t:switch(Ft){case 1:Ft=0,dr=null,zs(n,i,b,1);break;case 2:case 9:if(i0(b)){Ft=0,dr=null,Qg(i);break}i=function(){Ft!==2&&Ft!==9||Vt!==n||(Ft=7),Wr(n)},b.then(i,i);break e;case 3:Ft=7;break e;case 4:Ft=5;break e;case 7:i0(b)?(Ft=0,dr=null,Qg(i)):(Ft=0,dr=null,zs(n,i,b,7));break;case 5:var w=null;switch(ht.tag){case 26:w=ht.memoizedState;case 5:case 27:var T=ht;if(w?jb(w):T.stateNode.complete){Ft=0,dr=null;var L=T.sibling;if(L!==null)ht=L;else{var Q=T.return;Q!==null?(ht=Q,Tc(Q)):ht=null}break t}}Ft=0,dr=null,zs(n,i,b,5);break;case 6:Ft=0,dr=null,zs(n,i,b,6);break;case 8:Cf(),on=6;break e;default:throw Error(a(462))}}sE();break}catch(oe){$g(n,oe)}while(!0);return pi=Ra=null,F.H=u,F.A=p,jt=s,ht!==null?0:(Vt=null,yt=0,Yo(),on)}function sE(){for(;ht!==null&&!wa();)Yg(ht)}function Yg(n){var i=xg(n.alternate,n,Ni);n.memoizedProps=n.pendingProps,i===null?Tc(n):ht=i}function Qg(n){var i=n,s=i.alternate;switch(i.tag){case 15:case 0:i=fg(s,i,i.pendingProps,i.type,void 0,yt);break;case 11:i=fg(s,i,i.pendingProps,i.type.render,i.ref,yt);break;case 5:qd(i);default:vg(s,i),i=ht=Vp(i,Ni),i=xg(s,i,Ni)}n.memoizedProps=n.pendingProps,i===null?Tc(n):ht=i}function zs(n,i,s,u){pi=Ra=null,qd(i),gs=null,gl=0;var p=i.return;try{if(Y_(n,p,i,s,yt)){on=1,gc(n,kr(s,n.current)),ht=null;return}}catch(b){if(p!==null)throw ht=p,b;on=1,gc(n,kr(s,n.current)),ht=null;return}i.flags&32768?(kt||u===1?n=!0:_s||(yt&536870912)!==0?n=!1:(Xi=n=!0,(u===2||u===9||u===3||u===6)&&(u=cr.current,u!==null&&u.tag===13&&(u.flags|=16384))),Xg(i,n)):Tc(i)}function Tc(n){var i=n;do{if((i.flags&32768)!==0){Xg(i,Xi);return}n=i.return;var s=Z_(i.alternate,i,Ni);if(s!==null){ht=s;return}if(i=i.sibling,i!==null){ht=i;return}ht=i=n}while(i!==null);on===0&&(on=5)}function Xg(n,i){do{var s=W_(n.alternate,n);if(s!==null){s.flags&=32767,ht=s;return}if(s=n.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!i&&(n=n.sibling,n!==null)){ht=n;return}ht=n=s}while(n!==null);on=6,ht=null}function Zg(n,i,s,u,p,b,w,T,L){n.cancelPendingCommit=null;do Ac();while(En!==0);if((jt&6)!==0)throw Error(a(327));if(i!==null){if(i===n.current)throw Error(a(177));if(b=i.lanes|i.childLanes,b|=gd,Me(n,s,b,w,T,L),n===Vt&&(ht=Vt=null,yt=0),Ns=i,Ji=n,Si=s,Nf=b,Sf=p,Fg=u,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,uE($e,function(){return nb(),null})):(n.callbackNode=null,n.callbackPriority=0),u=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||u){u=F.T,F.T=null,p=ne.p,ne.p=2,w=jt,jt|=4;try{J_(n,i,s)}finally{jt=w,ne.p=p,F.T=u}}En=1,Wg(),Jg(),eb()}}function Wg(){if(En===1){En=0;var n=Ji,i=Ns,s=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||s){s=F.T,F.T=null;var u=ne.p;ne.p=2;var p=jt;jt|=4;try{Og(i,n);var b=Pf,w=Bp(n.containerInfo),T=b.focusedElem,L=b.selectionRange;if(w!==T&&T&&T.ownerDocument&&Ip(T.ownerDocument.documentElement,T)){if(L!==null&&dd(T)){var Q=L.start,oe=L.end;if(oe===void 0&&(oe=Q),"selectionStart"in T)T.selectionStart=Q,T.selectionEnd=Math.min(oe,T.value.length);else{var he=T.ownerDocument||document,J=he&&he.defaultView||window;if(J.getSelection){var re=J.getSelection(),je=T.textContent.length,Ye=Math.min(L.start,je),Gt=L.end===void 0?Ye:Math.min(L.end,je);!re.extend&&Ye>Gt&&(w=Gt,Gt=Ye,Ye=w);var G=Lp(T,Ye),q=Lp(T,Gt);if(G&&q&&(re.rangeCount!==1||re.anchorNode!==G.node||re.anchorOffset!==G.offset||re.focusNode!==q.node||re.focusOffset!==q.offset)){var Y=he.createRange();Y.setStart(G.node,G.offset),re.removeAllRanges(),Ye>Gt?(re.addRange(Y),re.extend(q.node,q.offset)):(Y.setEnd(q.node,q.offset),re.addRange(Y))}}}}for(he=[],re=T;re=re.parentNode;)re.nodeType===1&&he.push({element:re,left:re.scrollLeft,top:re.scrollTop});for(typeof T.focus=="function"&&T.focus(),T=0;T<he.length;T++){var de=he[T];de.element.scrollLeft=de.left,de.element.scrollTop=de.top}}Hc=!!Ff,Pf=Ff=null}finally{jt=p,ne.p=u,F.T=s}}n.current=i,En=2}}function Jg(){if(En===2){En=0;var n=Ji,i=Ns,s=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||s){s=F.T,F.T=null;var u=ne.p;ne.p=2;var p=jt;jt|=4;try{zg(n,i.alternate,i)}finally{jt=p,ne.p=u,F.T=s}}En=3}}function eb(){if(En===4||En===3){En=0,Li();var n=Ji,i=Ns,s=Si,u=Fg;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?En=5:(En=0,Ns=Ji=null,tb(n,n.pendingLanes));var p=n.pendingLanes;if(p===0&&(Wi=null),Z(s),i=i.stateNode,rn&&typeof rn.onCommitFiberRoot=="function")try{rn.onCommitFiberRoot(cn,i,void 0,(i.current.flags&128)===128)}catch{}if(u!==null){i=F.T,p=ne.p,ne.p=2,F.T=null;try{for(var b=n.onRecoverableError,w=0;w<u.length;w++){var T=u[w];b(T.value,{componentStack:T.stack})}}finally{F.T=i,ne.p=p}}(Si&3)!==0&&Ac(),Wr(n),p=n.pendingLanes,(s&261930)!==0&&(p&42)!==0?n===zf?Ml++:(Ml=0,zf=n):Ml=0,jl(0)}}function tb(n,i){(n.pooledCacheLanes&=i)===0&&(i=n.pooledCache,i!=null&&(n.pooledCache=null,ml(i)))}function Ac(){return Wg(),Jg(),eb(),nb()}function nb(){if(En!==5)return!1;var n=Ji,i=Nf;Nf=0;var s=Z(Si),u=F.T,p=ne.p;try{ne.p=32>s?32:s,F.T=null,s=Sf,Sf=null;var b=Ji,w=Si;if(En=0,Ns=Ji=null,Si=0,(jt&6)!==0)throw Error(a(331));var T=jt;if(jt|=4,Ig(b.current),jg(b,b.current,w,s),jt=T,jl(0,!1),rn&&typeof rn.onPostCommitFiberRoot=="function")try{rn.onPostCommitFiberRoot(cn,b)}catch{}return!0}finally{ne.p=p,F.T=u,tb(n,i)}}function rb(n,i,s){i=kr(s,i),i=af(n.stateNode,i,2),n=Ki(n,i,2),n!==null&&(Rt(n,2),Wr(n))}function Pt(n,i,s){if(n.tag===3)rb(n,n,s);else for(;i!==null;){if(i.tag===3){rb(i,n,s);break}else if(i.tag===1){var u=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Wi===null||!Wi.has(u))){n=kr(s,n),s=ig(2),u=Ki(i,s,2),u!==null&&(ag(s,u,i,n),Rt(u,2),Wr(u));break}}i=i.return}}function Af(n,i,s){var u=n.pingCache;if(u===null){u=n.pingCache=new nE;var p=new Set;u.set(i,p)}else p=u.get(i),p===void 0&&(p=new Set,u.set(i,p));p.has(s)||(wf=!0,p.add(s),n=lE.bind(null,n,i,s),i.then(n,n))}function lE(n,i,s){var u=n.pingCache;u!==null&&u.delete(i),n.pingedLanes|=n.suspendedLanes&s,n.warmLanes&=~s,Vt===n&&(yt&s)===s&&(on===4||on===3&&(yt&62914560)===yt&&300>Wt()-Ec?(jt&2)===0&&Ss(n,0):_f|=s,Es===yt&&(Es=0)),Wr(n)}function ib(n,i){i===0&&(i=Qe()),n=Ca(n,i),n!==null&&(Rt(n,i),Wr(n))}function oE(n){var i=n.memoizedState,s=0;i!==null&&(s=i.retryLane),ib(n,s)}function cE(n,i){var s=0;switch(n.tag){case 31:case 13:var u=n.stateNode,p=n.memoizedState;p!==null&&(s=p.retryLane);break;case 19:u=n.stateNode;break;case 22:u=n.stateNode._retryCache;break;default:throw Error(a(314))}u!==null&&u.delete(i),ib(n,s)}function uE(n,i){return xr(n,i)}var Rc=null,Cs=null,Rf=!1,Oc=!1,Of=!1,ta=0;function Wr(n){n!==Cs&&n.next===null&&(Cs===null?Rc=Cs=n:Cs=Cs.next=n),Oc=!0,Rf||(Rf=!0,fE())}function jl(n,i){if(!Of&&Oc){Of=!0;do for(var s=!1,u=Rc;u!==null;){if(n!==0){var p=u.pendingLanes;if(p===0)var b=0;else{var w=u.suspendedLanes,T=u.pingedLanes;b=(1<<31-At(42|n)+1)-1,b&=p&~(w&~T),b=b&201326741?b&201326741|1:b?b|2:0}b!==0&&(s=!0,ob(u,b))}else b=yt,b=B(u,u===Vt?b:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(b&3)===0||ce(u,b)||(s=!0,ob(u,b));u=u.next}while(s);Of=!1}}function dE(){ab()}function ab(){Oc=Rf=!1;var n=0;ta!==0&&wE()&&(n=ta);for(var i=Wt(),s=null,u=Rc;u!==null;){var p=u.next,b=sb(u,i);b===0?(u.next=null,s===null?Rc=p:s.next=p,p===null&&(Cs=s)):(s=u,(n!==0||(b&3)!==0)&&(Oc=!0)),u=p}En!==0&&En!==5||jl(n),ta!==0&&(ta=0)}function sb(n,i){for(var s=n.suspendedLanes,u=n.pingedLanes,p=n.expirationTimes,b=n.pendingLanes&-62914561;0<b;){var w=31-At(b),T=1<<w,L=p[w];L===-1?((T&s)===0||(T&u)!==0)&&(p[w]=ze(T,i)):L<=i&&(n.expiredLanes|=T),b&=~T}if(i=Vt,s=yt,s=B(n,n===i?s:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),u=n.callbackNode,s===0||n===i&&(Ft===2||Ft===9)||n.cancelPendingCommit!==null)return u!==null&&u!==null&&oi(u),n.callbackNode=null,n.callbackPriority=0;if((s&3)===0||ce(n,s)){if(i=s&-s,i===n.callbackPriority)return i;switch(u!==null&&oi(u),Z(s)){case 2:case 8:s=we;break;case 32:s=$e;break;case 268435456:s=rt;break;default:s=$e}return u=lb.bind(null,n),s=xr(s,u),n.callbackPriority=i,n.callbackNode=s,i}return u!==null&&u!==null&&oi(u),n.callbackPriority=2,n.callbackNode=null,2}function lb(n,i){if(En!==0&&En!==5)return n.callbackNode=null,n.callbackPriority=0,null;var s=n.callbackNode;if(Ac()&&n.callbackNode!==s)return null;var u=yt;return u=B(n,n===Vt?u:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),u===0?null:(Hg(n,u,i),sb(n,Wt()),n.callbackNode!=null&&n.callbackNode===s?lb.bind(null,n):null)}function ob(n,i){if(Ac())return null;Hg(n,i,!0)}function fE(){EE(function(){(jt&6)!==0?xr(ie,dE):ab()})}function Mf(){if(ta===0){var n=hs;n===0&&(n=Kr,Kr<<=1,(Kr&261888)===0&&(Kr=256)),ta=n}return ta}function cb(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:Bi(""+n)}function ub(n,i){var s=i.ownerDocument.createElement("input");return s.name=i.name,s.value=i.value,n.id&&s.setAttribute("form",n.id),i.parentNode.insertBefore(s,i),n=new FormData(n),s.parentNode.removeChild(s),n}function hE(n,i,s,u,p){if(i==="submit"&&s&&s.stateNode===p){var b=cb((p[Ce]||null).action),w=u.submitter;w&&(i=(i=w[Ce]||null)?cb(i.formAction):w.getAttribute("formAction"),i!==null&&(b=i,w=null));var T=new $o("action","action",null,u,p);n.push({event:T,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(ta!==0){var L=w?ub(p,w):new FormData(p);Wd(s,{pending:!0,data:L,method:p.method,action:b},null,L)}}else typeof b=="function"&&(T.preventDefault(),L=w?ub(p,w):new FormData(p),Wd(s,{pending:!0,data:L,method:p.method,action:b},b,L))},currentTarget:p}]})}}for(var jf=0;jf<pd.length;jf++){var Df=pd[jf],mE=Df.toLowerCase(),pE=Df[0].toUpperCase()+Df.slice(1);Ir(mE,"on"+pE)}Ir(Pp,"onAnimationEnd"),Ir(Hp,"onAnimationIteration"),Ir(qp,"onAnimationStart"),Ir("dblclick","onDoubleClick"),Ir("focusin","onFocus"),Ir("focusout","onBlur"),Ir(R_,"onTransitionRun"),Ir(O_,"onTransitionStart"),Ir(M_,"onTransitionCancel"),Ir($p,"onTransitionEnd"),ge("onMouseEnter",["mouseout","mouseover"]),ge("onMouseLeave",["mouseout","mouseover"]),ge("onPointerEnter",["pointerout","pointerover"]),ge("onPointerLeave",["pointerout","pointerover"]),mn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),mn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),mn("onBeforeInput",["compositionend","keypress","textInput","paste"]),mn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),mn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),mn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Dl="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(" "),gE=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Dl));function db(n,i){i=(i&4)!==0;for(var s=0;s<n.length;s++){var u=n[s],p=u.event;u=u.listeners;e:{var b=void 0;if(i)for(var w=u.length-1;0<=w;w--){var T=u[w],L=T.instance,Q=T.currentTarget;if(T=T.listener,L!==b&&p.isPropagationStopped())break e;b=T,p.currentTarget=Q;try{b(p)}catch(oe){Vo(oe)}p.currentTarget=null,b=L}else for(w=0;w<u.length;w++){if(T=u[w],L=T.instance,Q=T.currentTarget,T=T.listener,L!==b&&p.isPropagationStopped())break e;b=T,p.currentTarget=Q;try{b(p)}catch(oe){Vo(oe)}p.currentTarget=null,b=L}}}}function mt(n,i){var s=i[He];s===void 0&&(s=i[He]=new Set);var u=n+"__bubble";s.has(u)||(fb(i,n,2,!1),s.add(u))}function Lf(n,i,s){var u=0;i&&(u|=4),fb(s,n,u,i)}var Mc="_reactListening"+Math.random().toString(36).slice(2);function If(n){if(!n[Mc]){n[Mc]=!0,Yr.forEach(function(s){s!=="selectionchange"&&(gE.has(s)||Lf(s,!1,n),Lf(s,!0,n))});var i=n.nodeType===9?n:n.ownerDocument;i===null||i[Mc]||(i[Mc]=!0,Lf("selectionchange",!1,i))}}function fb(n,i,s,u){switch(Pb(i)){case 2:var p=$E;break;case 8:p=GE;break;default:p=Wf}s=p.bind(null,i,s,n),p=void 0,!nd||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(p=!0),u?p!==void 0?n.addEventListener(i,s,{capture:!0,passive:p}):n.addEventListener(i,s,!0):p!==void 0?n.addEventListener(i,s,{passive:p}):n.addEventListener(i,s,!1)}function Bf(n,i,s,u,p){var b=u;if((i&1)===0&&(i&2)===0&&u!==null)e:for(;;){if(u===null)return;var w=u.tag;if(w===3||w===4){var T=u.stateNode.containerInfo;if(T===p)break;if(w===4)for(w=u.return;w!==null;){var L=w.tag;if((L===3||L===4)&&w.stateNode.containerInfo===p)return;w=w.return}for(;T!==null;){if(w=Nt(T),w===null)return;if(L=w.tag,L===5||L===6||L===26||L===27){u=b=w;continue e}T=T.parentNode}}u=u.return}Fo(function(){var Q=b,oe=nt(s),he=[];e:{var J=Gp.get(n);if(J!==void 0){var re=$o,je=n;switch(n){case"keypress":if(Ho(s)===0)break e;case"keydown":case"keyup":re=c_;break;case"focusin":je="focus",re=sd;break;case"focusout":je="blur",re=sd;break;case"beforeblur":case"afterblur":re=sd;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":re=vp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":re=Zw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":re=f_;break;case Pp:case Hp:case qp:re=e_;break;case $p:re=m_;break;case"scroll":case"scrollend":re=Qw;break;case"wheel":re=g_;break;case"copy":case"cut":case"paste":re=n_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":re=wp;break;case"toggle":case"beforetoggle":re=x_}var Ye=(i&4)!==0,Gt=!Ye&&(n==="scroll"||n==="scrollend"),G=Ye?J!==null?J+"Capture":null:J;Ye=[];for(var q=Q,Y;q!==null;){var de=q;if(Y=de.stateNode,de=de.tag,de!==5&&de!==26&&de!==27||Y===null||G===null||(de=rl(q,G),de!=null&&Ye.push(Ll(q,de,Y))),Gt)break;q=q.return}0<Ye.length&&(J=new re(J,je,null,s,oe),he.push({event:J,listeners:Ye}))}}if((i&7)===0){e:{if(J=n==="mouseover"||n==="pointerover",re=n==="mouseout"||n==="pointerout",J&&s!==Fe&&(je=s.relatedTarget||s.fromElement)&&(Nt(je)||je[Ae]))break e;if((re||J)&&(J=oe.window===oe?oe:(J=oe.ownerDocument)?J.defaultView||J.parentWindow:window,re?(je=s.relatedTarget||s.toElement,re=Q,je=je?Nt(je):null,je!==null&&(Gt=o(je),Ye=je.tag,je!==Gt||Ye!==5&&Ye!==27&&Ye!==6)&&(je=null)):(re=null,je=Q),re!==je)){if(Ye=vp,de="onMouseLeave",G="onMouseEnter",q="mouse",(n==="pointerout"||n==="pointerover")&&(Ye=wp,de="onPointerLeave",G="onPointerEnter",q="pointer"),Gt=re==null?J:ft(re),Y=je==null?J:ft(je),J=new Ye(de,q+"leave",re,s,oe),J.target=Gt,J.relatedTarget=Y,de=null,Nt(oe)===Q&&(Ye=new Ye(G,q+"enter",je,s,oe),Ye.target=Y,Ye.relatedTarget=Gt,de=Ye),Gt=de,re&&je)t:{for(Ye=bE,G=re,q=je,Y=0,de=G;de;de=Ye(de))Y++;de=0;for(var Ge=q;Ge;Ge=Ye(Ge))de++;for(;0<Y-de;)G=Ye(G),Y--;for(;0<de-Y;)q=Ye(q),de--;for(;Y--;){if(G===q||q!==null&&G===q.alternate){Ye=G;break t}G=Ye(G),q=Ye(q)}Ye=null}else Ye=null;re!==null&&hb(he,J,re,Ye,!1),je!==null&&Gt!==null&&hb(he,Gt,je,Ye,!0)}}e:{if(J=Q?ft(Q):window,re=J.nodeName&&J.nodeName.toLowerCase(),re==="select"||re==="input"&&J.type==="file")var Ot=Ap;else if(Cp(J))if(Rp)Ot=C_;else{Ot=S_;var Pe=N_}else re=J.nodeName,!re||re.toLowerCase()!=="input"||J.type!=="checkbox"&&J.type!=="radio"?Q&&Ii(Q.elementType)&&(Ot=Ap):Ot=z_;if(Ot&&(Ot=Ot(n,Q))){Tp(he,Ot,s,oe);break e}Pe&&Pe(n,J,Q),n==="focusout"&&Q&&J.type==="number"&&Q.memoizedProps.value!=null&&ns(J,"number",J.value)}switch(Pe=Q?ft(Q):window,n){case"focusin":(Cp(Pe)||Pe.contentEditable==="true")&&(as=Pe,fd=Q,dl=null);break;case"focusout":dl=fd=as=null;break;case"mousedown":hd=!0;break;case"contextmenu":case"mouseup":case"dragend":hd=!1,Up(he,s,oe);break;case"selectionchange":if(A_)break;case"keydown":case"keyup":Up(he,s,oe)}var at;if(od)e:{switch(n){case"compositionstart":var vt="onCompositionStart";break e;case"compositionend":vt="onCompositionEnd";break e;case"compositionupdate":vt="onCompositionUpdate";break e}vt=void 0}else is?Sp(n,s)&&(vt="onCompositionEnd"):n==="keydown"&&s.keyCode===229&&(vt="onCompositionStart");vt&&(_p&&s.locale!=="ko"&&(is||vt!=="onCompositionStart"?vt==="onCompositionEnd"&&is&&(at=xp()):(Ui=oe,rd="value"in Ui?Ui.value:Ui.textContent,is=!0)),Pe=jc(Q,vt),0<Pe.length&&(vt=new kp(vt,n,null,s,oe),he.push({event:vt,listeners:Pe}),at?vt.data=at:(at=zp(s),at!==null&&(vt.data=at)))),(at=v_?k_(n,s):w_(n,s))&&(vt=jc(Q,"onBeforeInput"),0<vt.length&&(Pe=new kp("onBeforeInput","beforeinput",null,s,oe),he.push({event:Pe,listeners:vt}),Pe.data=at)),hE(he,n,Q,s,oe)}db(he,i)})}function Ll(n,i,s){return{instance:n,listener:i,currentTarget:s}}function jc(n,i){for(var s=i+"Capture",u=[];n!==null;){var p=n,b=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||b===null||(p=rl(n,s),p!=null&&u.unshift(Ll(n,p,b)),p=rl(n,i),p!=null&&u.push(Ll(n,p,b))),n.tag===3)return u;n=n.return}return[]}function bE(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function hb(n,i,s,u,p){for(var b=i._reactName,w=[];s!==null&&s!==u;){var T=s,L=T.alternate,Q=T.stateNode;if(T=T.tag,L!==null&&L===u)break;T!==5&&T!==26&&T!==27||Q===null||(L=Q,p?(Q=rl(s,b),Q!=null&&w.unshift(Ll(s,Q,L))):p||(Q=rl(s,b),Q!=null&&w.push(Ll(s,Q,L)))),s=s.return}w.length!==0&&n.push({event:i,listeners:w})}var xE=/\r\n?/g,yE=/\u0000|\uFFFD/g;function mb(n){return(typeof n=="string"?n:""+n).replace(xE,`
|
|
49
|
+
`).replace(yE,"")}function pb(n,i){return i=mb(i),mb(n)===i}function $t(n,i,s,u,p,b){switch(s){case"children":typeof u=="string"?i==="body"||i==="textarea"&&u===""||Ze(n,u):(typeof u=="number"||typeof u=="bigint")&&i!=="body"&&Ze(n,""+u);break;case"className":It(n,"class",u);break;case"tabIndex":It(n,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":It(n,s,u);break;case"style":Ut(n,u,b);break;case"data":if(i!=="object"){It(n,"data",u);break}case"src":case"href":if(u===""&&(i!=="a"||s!=="href")){n.removeAttribute(s);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){n.removeAttribute(s);break}u=Bi(""+u),n.setAttribute(s,u);break;case"action":case"formAction":if(typeof u=="function"){n.setAttribute(s,"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}else typeof b=="function"&&(s==="formAction"?(i!=="input"&&$t(n,i,"name",p.name,p,null),$t(n,i,"formEncType",p.formEncType,p,null),$t(n,i,"formMethod",p.formMethod,p,null),$t(n,i,"formTarget",p.formTarget,p,null)):($t(n,i,"encType",p.encType,p,null),$t(n,i,"method",p.method,p,null),$t(n,i,"target",p.target,p,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){n.removeAttribute(s);break}u=Bi(""+u),n.setAttribute(s,u);break;case"onClick":u!=null&&(n.onclick=Se);break;case"onScroll":u!=null&&mt("scroll",n);break;case"onScrollEnd":u!=null&&mt("scrollend",n);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(a(61));if(s=u.__html,s!=null){if(p.children!=null)throw Error(a(60));n.innerHTML=s}}break;case"multiple":n.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":n.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){n.removeAttribute("xlink:href");break}s=Bi(""+u),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(s,""+u):n.removeAttribute(s);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":u&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(s,""):n.removeAttribute(s);break;case"capture":case"download":u===!0?n.setAttribute(s,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(s,u):n.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?n.setAttribute(s,u):n.removeAttribute(s);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?n.removeAttribute(s):n.setAttribute(s,u);break;case"popover":mt("beforetoggle",n),mt("toggle",n),Xe(n,"popover",u);break;case"xlinkActuate":dn(n,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":dn(n,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":dn(n,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":dn(n,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":dn(n,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":dn(n,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":dn(n,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":dn(n,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":dn(n,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":Xe(n,"is",u);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=di.get(s)||s,Xe(n,s,u))}}function Uf(n,i,s,u,p,b){switch(s){case"style":Ut(n,u,b);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(a(61));if(s=u.__html,s!=null){if(p.children!=null)throw Error(a(60));n.innerHTML=s}}break;case"children":typeof u=="string"?Ze(n,u):(typeof u=="number"||typeof u=="bigint")&&Ze(n,""+u);break;case"onScroll":u!=null&&mt("scroll",n);break;case"onScrollEnd":u!=null&&mt("scrollend",n);break;case"onClick":u!=null&&(n.onclick=Se);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Un.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(p=s.endsWith("Capture"),i=s.slice(2,p?s.length-7:void 0),b=n[Ce]||null,b=b!=null?b[s]:null,typeof b=="function"&&n.removeEventListener(i,b,p),typeof u=="function")){typeof b!="function"&&b!==null&&(s in n?n[s]=null:n.hasAttribute(s)&&n.removeAttribute(s)),n.addEventListener(i,u,p);break e}s in n?n[s]=u:u===!0?n.setAttribute(s,""):Xe(n,s,u)}}}function Ln(n,i,s){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":mt("error",n),mt("load",n);var u=!1,p=!1,b;for(b in s)if(s.hasOwnProperty(b)){var w=s[b];if(w!=null)switch(b){case"src":u=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:$t(n,i,b,w,s,null)}}p&&$t(n,i,"srcSet",s.srcSet,s,null),u&&$t(n,i,"src",s.src,s,null);return;case"input":mt("invalid",n);var T=b=w=p=null,L=null,Q=null;for(u in s)if(s.hasOwnProperty(u)){var oe=s[u];if(oe!=null)switch(u){case"name":p=oe;break;case"type":w=oe;break;case"checked":L=oe;break;case"defaultChecked":Q=oe;break;case"value":b=oe;break;case"defaultValue":T=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(a(137,i));break;default:$t(n,i,u,oe,s,null)}}Ea(n,b,T,L,Q,w,p,!1);return;case"select":mt("invalid",n),u=w=b=null;for(p in s)if(s.hasOwnProperty(p)&&(T=s[p],T!=null))switch(p){case"value":b=T;break;case"defaultValue":w=T;break;case"multiple":u=T;default:$t(n,i,p,T,s,null)}i=b,s=w,n.multiple=!!u,i!=null?On(n,!!u,i,!1):s!=null&&On(n,!!u,s,!0);return;case"textarea":mt("invalid",n),b=p=u=null;for(w in s)if(s.hasOwnProperty(w)&&(T=s[w],T!=null))switch(w){case"value":u=T;break;case"defaultValue":p=T;break;case"children":b=T;break;case"dangerouslySetInnerHTML":if(T!=null)throw Error(a(91));break;default:$t(n,i,w,T,s,null)}rs(n,u,p,b);return;case"option":for(L in s)if(s.hasOwnProperty(L)&&(u=s[L],u!=null))switch(L){case"selected":n.selected=u&&typeof u!="function"&&typeof u!="symbol";break;default:$t(n,i,L,u,s,null)}return;case"dialog":mt("beforetoggle",n),mt("toggle",n),mt("cancel",n),mt("close",n);break;case"iframe":case"object":mt("load",n);break;case"video":case"audio":for(u=0;u<Dl.length;u++)mt(Dl[u],n);break;case"image":mt("error",n),mt("load",n);break;case"details":mt("toggle",n);break;case"embed":case"source":case"link":mt("error",n),mt("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Q in s)if(s.hasOwnProperty(Q)&&(u=s[Q],u!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:$t(n,i,Q,u,s,null)}return;default:if(Ii(i)){for(oe in s)s.hasOwnProperty(oe)&&(u=s[oe],u!==void 0&&Uf(n,i,oe,u,s,void 0));return}}for(T in s)s.hasOwnProperty(T)&&(u=s[T],u!=null&&$t(n,i,T,u,s,null))}function vE(n,i,s,u){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,b=null,w=null,T=null,L=null,Q=null,oe=null;for(re in s){var he=s[re];if(s.hasOwnProperty(re)&&he!=null)switch(re){case"checked":break;case"value":break;case"defaultValue":L=he;default:u.hasOwnProperty(re)||$t(n,i,re,null,u,he)}}for(var J in u){var re=u[J];if(he=s[J],u.hasOwnProperty(J)&&(re!=null||he!=null))switch(J){case"type":b=re;break;case"name":p=re;break;case"checked":Q=re;break;case"defaultChecked":oe=re;break;case"value":w=re;break;case"defaultValue":T=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(a(137,i));break;default:re!==he&&$t(n,i,J,re,u,he)}}el(n,w,T,L,Q,oe,b,p);return;case"select":re=w=T=J=null;for(b in s)if(L=s[b],s.hasOwnProperty(b)&&L!=null)switch(b){case"value":break;case"multiple":re=L;default:u.hasOwnProperty(b)||$t(n,i,b,null,u,L)}for(p in u)if(b=u[p],L=s[p],u.hasOwnProperty(p)&&(b!=null||L!=null))switch(p){case"value":J=b;break;case"defaultValue":T=b;break;case"multiple":w=b;default:b!==L&&$t(n,i,p,b,u,L)}i=T,s=w,u=re,J!=null?On(n,!!s,J,!1):!!u!=!!s&&(i!=null?On(n,!!s,i,!0):On(n,!!s,s?[]:"",!1));return;case"textarea":re=J=null;for(T in s)if(p=s[T],s.hasOwnProperty(T)&&p!=null&&!u.hasOwnProperty(T))switch(T){case"value":break;case"children":break;default:$t(n,i,T,null,u,p)}for(w in u)if(p=u[w],b=s[w],u.hasOwnProperty(w)&&(p!=null||b!=null))switch(w){case"value":J=p;break;case"defaultValue":re=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(a(91));break;default:p!==b&&$t(n,i,w,p,u,b)}Bo(n,J,re);return;case"option":for(var je in s)if(J=s[je],s.hasOwnProperty(je)&&J!=null&&!u.hasOwnProperty(je))switch(je){case"selected":n.selected=!1;break;default:$t(n,i,je,null,u,J)}for(L in u)if(J=u[L],re=s[L],u.hasOwnProperty(L)&&J!==re&&(J!=null||re!=null))switch(L){case"selected":n.selected=J&&typeof J!="function"&&typeof J!="symbol";break;default:$t(n,i,L,J,u,re)}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 Ye in s)J=s[Ye],s.hasOwnProperty(Ye)&&J!=null&&!u.hasOwnProperty(Ye)&&$t(n,i,Ye,null,u,J);for(Q in u)if(J=u[Q],re=s[Q],u.hasOwnProperty(Q)&&J!==re&&(J!=null||re!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(a(137,i));break;default:$t(n,i,Q,J,u,re)}return;default:if(Ii(i)){for(var Gt in s)J=s[Gt],s.hasOwnProperty(Gt)&&J!==void 0&&!u.hasOwnProperty(Gt)&&Uf(n,i,Gt,void 0,u,J);for(oe in u)J=u[oe],re=s[oe],!u.hasOwnProperty(oe)||J===re||J===void 0&&re===void 0||Uf(n,i,oe,J,u,re);return}}for(var G in s)J=s[G],s.hasOwnProperty(G)&&J!=null&&!u.hasOwnProperty(G)&&$t(n,i,G,null,u,J);for(he in u)J=u[he],re=s[he],!u.hasOwnProperty(he)||J===re||J==null&&re==null||$t(n,i,he,J,u,re)}function gb(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function kE(){if(typeof performance.getEntriesByType=="function"){for(var n=0,i=0,s=performance.getEntriesByType("resource"),u=0;u<s.length;u++){var p=s[u],b=p.transferSize,w=p.initiatorType,T=p.duration;if(b&&T&&gb(w)){for(w=0,T=p.responseEnd,u+=1;u<s.length;u++){var L=s[u],Q=L.startTime;if(Q>T)break;var oe=L.transferSize,he=L.initiatorType;oe&&gb(he)&&(L=L.responseEnd,w+=oe*(L<T?1:(T-Q)/(L-Q)))}if(--u,i+=8*(b+w)/(p.duration/1e3),n++,10<n)break}}if(0<n)return i/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?n:5}var Ff=null,Pf=null;function Dc(n){return n.nodeType===9?n:n.ownerDocument}function bb(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function xb(n,i){if(n===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&i==="foreignObject"?0:n}function Hf(n,i){return n==="textarea"||n==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var qf=null;function wE(){var n=window.event;return n&&n.type==="popstate"?n===qf?!1:(qf=n,!0):(qf=null,!1)}var yb=typeof setTimeout=="function"?setTimeout:void 0,_E=typeof clearTimeout=="function"?clearTimeout:void 0,vb=typeof Promise=="function"?Promise:void 0,EE=typeof queueMicrotask=="function"?queueMicrotask:typeof vb<"u"?function(n){return vb.resolve(null).then(n).catch(NE)}:yb;function NE(n){setTimeout(function(){throw n})}function na(n){return n==="head"}function kb(n,i){var s=i,u=0;do{var p=s.nextSibling;if(n.removeChild(s),p&&p.nodeType===8)if(s=p.data,s==="/$"||s==="/&"){if(u===0){n.removeChild(p),Os(i);return}u--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")u++;else if(s==="html")Il(n.ownerDocument.documentElement);else if(s==="head"){s=n.ownerDocument.head,Il(s);for(var b=s.firstChild;b;){var w=b.nextSibling,T=b.nodeName;b[lt]||T==="SCRIPT"||T==="STYLE"||T==="LINK"&&b.rel.toLowerCase()==="stylesheet"||s.removeChild(b),b=w}}else s==="body"&&Il(n.ownerDocument.body);s=p}while(s);Os(i)}function wb(n,i){var s=n;n=0;do{var u=s.nextSibling;if(s.nodeType===1?i?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(i?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),u&&u.nodeType===8)if(s=u.data,s==="/$"){if(n===0)break;n--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||n++;s=u}while(s)}function $f(n){var i=n.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var s=i;switch(i=i.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":$f(s),Bt(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}n.removeChild(s)}}function SE(n,i,s,u){for(;n.nodeType===1;){var p=s;if(n.nodeName.toLowerCase()!==i.toLowerCase()){if(!u&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(u){if(!n[lt])switch(i){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(b=n.getAttribute("rel"),b==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(b!==p.rel||n.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||n.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||n.getAttribute("title")!==(p.title==null?null:p.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(b=n.getAttribute("src"),(b!==(p.src==null?null:p.src)||n.getAttribute("type")!==(p.type==null?null:p.type)||n.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&b&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(i==="input"&&n.type==="hidden"){var b=p.name==null?null:""+p.name;if(p.type==="hidden"&&n.getAttribute("name")===b)return n}else return n;if(n=Sr(n.nextSibling),n===null)break}return null}function zE(n,i,s){if(i==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!s||(n=Sr(n.nextSibling),n===null))return null;return n}function _b(n,i){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!i||(n=Sr(n.nextSibling),n===null))return null;return n}function Gf(n){return n.data==="$?"||n.data==="$~"}function Kf(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function CE(n,i){var s=n.ownerDocument;if(n.data==="$~")n._reactRetry=i;else if(n.data!=="$?"||s.readyState!=="loading")i();else{var u=function(){i(),s.removeEventListener("DOMContentLoaded",u)};s.addEventListener("DOMContentLoaded",u),n._reactRetry=u}}function Sr(n){for(;n!=null;n=n.nextSibling){var i=n.nodeType;if(i===1||i===3)break;if(i===8){if(i=n.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return n}var Vf=null;function Eb(n){n=n.nextSibling;for(var i=0;n;){if(n.nodeType===8){var s=n.data;if(s==="/$"||s==="/&"){if(i===0)return Sr(n.nextSibling);i--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||i++}n=n.nextSibling}return null}function Nb(n){n=n.previousSibling;for(var i=0;n;){if(n.nodeType===8){var s=n.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(i===0)return n;i--}else s!=="/$"&&s!=="/&"||i++}n=n.previousSibling}return null}function Sb(n,i,s){switch(i=Dc(s),n){case"html":if(n=i.documentElement,!n)throw Error(a(452));return n;case"head":if(n=i.head,!n)throw Error(a(453));return n;case"body":if(n=i.body,!n)throw Error(a(454));return n;default:throw Error(a(451))}}function Il(n){for(var i=n.attributes;i.length;)n.removeAttributeNode(i[0]);Bt(n)}var zr=new Map,zb=new Set;function Lc(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var zi=ne.d;ne.d={f:TE,r:AE,D:RE,C:OE,L:ME,m:jE,X:LE,S:DE,M:IE};function TE(){var n=zi.f(),i=zc();return n||i}function AE(n){var i=Jt(n);i!==null&&i.tag===5&&i.type==="form"?$0(i):zi.r(n)}var Ts=typeof document>"u"?null:document;function Cb(n,i,s){var u=Ts;if(u&&typeof i=="string"&&i){var p=Xn(i);p='link[rel="'+n+'"][href="'+p+'"]',typeof s=="string"&&(p+='[crossorigin="'+s+'"]'),zb.has(p)||(zb.add(p),n={rel:n,crossOrigin:s,href:i},u.querySelector(p)===null&&(i=u.createElement("link"),Ln(i,"link",n),Ht(i),u.head.appendChild(i)))}}function RE(n){zi.D(n),Cb("dns-prefetch",n,null)}function OE(n,i){zi.C(n,i),Cb("preconnect",n,i)}function ME(n,i,s){zi.L(n,i,s);var u=Ts;if(u&&n&&i){var p='link[rel="preload"][as="'+Xn(i)+'"]';i==="image"&&s&&s.imageSrcSet?(p+='[imagesrcset="'+Xn(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(p+='[imagesizes="'+Xn(s.imageSizes)+'"]')):p+='[href="'+Xn(n)+'"]';var b=p;switch(i){case"style":b=As(n);break;case"script":b=Rs(n)}zr.has(b)||(n=x({rel:"preload",href:i==="image"&&s&&s.imageSrcSet?void 0:n,as:i},s),zr.set(b,n),u.querySelector(p)!==null||i==="style"&&u.querySelector(Bl(b))||i==="script"&&u.querySelector(Ul(b))||(i=u.createElement("link"),Ln(i,"link",n),Ht(i),u.head.appendChild(i)))}}function jE(n,i){zi.m(n,i);var s=Ts;if(s&&n){var u=i&&typeof i.as=="string"?i.as:"script",p='link[rel="modulepreload"][as="'+Xn(u)+'"][href="'+Xn(n)+'"]',b=p;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":b=Rs(n)}if(!zr.has(b)&&(n=x({rel:"modulepreload",href:n},i),zr.set(b,n),s.querySelector(p)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(Ul(b)))return}u=s.createElement("link"),Ln(u,"link",n),Ht(u),s.head.appendChild(u)}}}function DE(n,i,s){zi.S(n,i,s);var u=Ts;if(u&&n){var p=un(u).hoistableStyles,b=As(n);i=i||"default";var w=p.get(b);if(!w){var T={loading:0,preload:null};if(w=u.querySelector(Bl(b)))T.loading=5;else{n=x({rel:"stylesheet",href:n,"data-precedence":i},s),(s=zr.get(b))&&Yf(n,s);var L=w=u.createElement("link");Ht(L),Ln(L,"link",n),L._p=new Promise(function(Q,oe){L.onload=Q,L.onerror=oe}),L.addEventListener("load",function(){T.loading|=1}),L.addEventListener("error",function(){T.loading|=2}),T.loading|=4,Ic(w,i,u)}w={type:"stylesheet",instance:w,count:1,state:T},p.set(b,w)}}}function LE(n,i){zi.X(n,i);var s=Ts;if(s&&n){var u=un(s).hoistableScripts,p=Rs(n),b=u.get(p);b||(b=s.querySelector(Ul(p)),b||(n=x({src:n,async:!0},i),(i=zr.get(p))&&Qf(n,i),b=s.createElement("script"),Ht(b),Ln(b,"link",n),s.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},u.set(p,b))}}function IE(n,i){zi.M(n,i);var s=Ts;if(s&&n){var u=un(s).hoistableScripts,p=Rs(n),b=u.get(p);b||(b=s.querySelector(Ul(p)),b||(n=x({src:n,async:!0,type:"module"},i),(i=zr.get(p))&&Qf(n,i),b=s.createElement("script"),Ht(b),Ln(b,"link",n),s.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},u.set(p,b))}}function Tb(n,i,s,u){var p=(p=ye.current)?Lc(p):null;if(!p)throw Error(a(446));switch(n){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(i=As(s.href),s=un(p).hoistableStyles,u=s.get(i),u||(u={type:"style",instance:null,count:0,state:null},s.set(i,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){n=As(s.href);var b=un(p).hoistableStyles,w=b.get(n);if(w||(p=p.ownerDocument||p,w={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},b.set(n,w),(b=p.querySelector(Bl(n)))&&!b._p&&(w.instance=b,w.state.loading=5),zr.has(n)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},zr.set(n,s),b||BE(p,n,s,w.state))),i&&u===null)throw Error(a(528,""));return w}if(i&&u!==null)throw Error(a(529,""));return null;case"script":return i=s.async,s=s.src,typeof s=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=Rs(s),s=un(p).hoistableScripts,u=s.get(i),u||(u={type:"script",instance:null,count:0,state:null},s.set(i,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,n))}}function As(n){return'href="'+Xn(n)+'"'}function Bl(n){return'link[rel="stylesheet"]['+n+"]"}function Ab(n){return x({},n,{"data-precedence":n.precedence,precedence:null})}function BE(n,i,s,u){n.querySelector('link[rel="preload"][as="style"]['+i+"]")?u.loading=1:(i=n.createElement("link"),u.preload=i,i.addEventListener("load",function(){return u.loading|=1}),i.addEventListener("error",function(){return u.loading|=2}),Ln(i,"link",s),Ht(i),n.head.appendChild(i))}function Rs(n){return'[src="'+Xn(n)+'"]'}function Ul(n){return"script[async]"+n}function Rb(n,i,s){if(i.count++,i.instance===null)switch(i.type){case"style":var u=n.querySelector('style[data-href~="'+Xn(s.href)+'"]');if(u)return i.instance=u,Ht(u),u;var p=x({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return u=(n.ownerDocument||n).createElement("style"),Ht(u),Ln(u,"style",p),Ic(u,s.precedence,n),i.instance=u;case"stylesheet":p=As(s.href);var b=n.querySelector(Bl(p));if(b)return i.state.loading|=4,i.instance=b,Ht(b),b;u=Ab(s),(p=zr.get(p))&&Yf(u,p),b=(n.ownerDocument||n).createElement("link"),Ht(b);var w=b;return w._p=new Promise(function(T,L){w.onload=T,w.onerror=L}),Ln(b,"link",u),i.state.loading|=4,Ic(b,s.precedence,n),i.instance=b;case"script":return b=Rs(s.src),(p=n.querySelector(Ul(b)))?(i.instance=p,Ht(p),p):(u=s,(p=zr.get(b))&&(u=x({},s),Qf(u,p)),n=n.ownerDocument||n,p=n.createElement("script"),Ht(p),Ln(p,"link",u),n.head.appendChild(p),i.instance=p);case"void":return null;default:throw Error(a(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(u=i.instance,i.state.loading|=4,Ic(u,s.precedence,n));return i.instance}function Ic(n,i,s){for(var u=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=u.length?u[u.length-1]:null,b=p,w=0;w<u.length;w++){var T=u[w];if(T.dataset.precedence===i)b=T;else if(b!==p)break}b?b.parentNode.insertBefore(n,b.nextSibling):(i=s.nodeType===9?s.head:s,i.insertBefore(n,i.firstChild))}function Yf(n,i){n.crossOrigin==null&&(n.crossOrigin=i.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=i.referrerPolicy),n.title==null&&(n.title=i.title)}function Qf(n,i){n.crossOrigin==null&&(n.crossOrigin=i.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=i.referrerPolicy),n.integrity==null&&(n.integrity=i.integrity)}var Bc=null;function Ob(n,i,s){if(Bc===null){var u=new Map,p=Bc=new Map;p.set(s,u)}else p=Bc,u=p.get(s),u||(u=new Map,p.set(s,u));if(u.has(n))return u;for(u.set(n,null),s=s.getElementsByTagName(n),p=0;p<s.length;p++){var b=s[p];if(!(b[lt]||b[Ee]||n==="link"&&b.getAttribute("rel")==="stylesheet")&&b.namespaceURI!=="http://www.w3.org/2000/svg"){var w=b.getAttribute(i)||"";w=n+w;var T=u.get(w);T?T.push(b):u.set(w,[b])}}return u}function Mb(n,i,s){n=n.ownerDocument||n,n.head.insertBefore(s,i==="title"?n.querySelector("head > title"):null)}function UE(n,i,s){if(s===1||i.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;switch(i.rel){case"stylesheet":return n=i.disabled,typeof i.precedence=="string"&&n==null;default:return!0}case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function jb(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function FE(n,i,s,u){if(s.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var p=As(u.href),b=i.querySelector(Bl(p));if(b){i=b._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(n.count++,n=Uc.bind(n),i.then(n,n)),s.state.loading|=4,s.instance=b,Ht(b);return}b=i.ownerDocument||i,u=Ab(u),(p=zr.get(p))&&Yf(u,p),b=b.createElement("link"),Ht(b);var w=b;w._p=new Promise(function(T,L){w.onload=T,w.onerror=L}),Ln(b,"link",u),s.instance=b}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(s,i),(i=s.state.preload)&&(s.state.loading&3)===0&&(n.count++,s=Uc.bind(n),i.addEventListener("load",s),i.addEventListener("error",s))}}var Xf=0;function PE(n,i){return n.stylesheets&&n.count===0&&Pc(n,n.stylesheets),0<n.count||0<n.imgCount?function(s){var u=setTimeout(function(){if(n.stylesheets&&Pc(n,n.stylesheets),n.unsuspend){var b=n.unsuspend;n.unsuspend=null,b()}},6e4+i);0<n.imgBytes&&Xf===0&&(Xf=62500*kE());var p=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&Pc(n,n.stylesheets),n.unsuspend)){var b=n.unsuspend;n.unsuspend=null,b()}},(n.imgBytes>Xf?50:800)+i);return n.unsuspend=s,function(){n.unsuspend=null,clearTimeout(u),clearTimeout(p)}}:null}function Uc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Pc(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var Fc=null;function Pc(n,i){n.stylesheets=null,n.unsuspend!==null&&(n.count++,Fc=new Map,i.forEach(HE,n),Fc=null,Uc.call(n))}function HE(n,i){if(!(i.state.loading&4)){var s=Fc.get(n);if(s)var u=s.get(null);else{s=new Map,Fc.set(n,s);for(var p=n.querySelectorAll("link[data-precedence],style[data-precedence]"),b=0;b<p.length;b++){var w=p[b];(w.nodeName==="LINK"||w.getAttribute("media")!=="not all")&&(s.set(w.dataset.precedence,w),u=w)}u&&s.set(null,u)}p=i.instance,w=p.getAttribute("data-precedence"),b=s.get(w)||u,b===u&&s.set(null,p),s.set(w,p),this.count++,u=Uc.bind(this),p.addEventListener("load",u),p.addEventListener("error",u),b?b.parentNode.insertBefore(p,b.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(p,n.firstChild)),i.state.loading|=4}}var Fl={$$typeof:A,Provider:null,Consumer:null,_currentValue:V,_currentValue2:V,_threadCount:0};function qE(n,i,s,u,p,b,w,T,L){this.tag=1,this.containerInfo=n,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=Lt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Lt(0),this.hiddenUpdates=Lt(null),this.identifierPrefix=u,this.onUncaughtError=p,this.onCaughtError=b,this.onRecoverableError=w,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=L,this.incompleteTransitions=new Map}function Db(n,i,s,u,p,b,w,T,L,Q,oe,he){return n=new qE(n,i,s,w,L,Q,oe,he,T),i=1,b===!0&&(i|=24),b=or(3,null,null,i),n.current=b,b.stateNode=n,i=Cd(),i.refCount++,n.pooledCache=i,i.refCount++,b.memoizedState={element:u,isDehydrated:s,cache:i},Od(b),n}function Lb(n){return n?(n=os,n):os}function Ib(n,i,s,u,p,b){p=Lb(p),u.context===null?u.context=p:u.pendingContext=p,u=Gi(i),u.payload={element:s},b=b===void 0?null:b,b!==null&&(u.callback=b),s=Ki(n,u,i),s!==null&&(nr(s,n,i),xl(s,n,i))}function Bb(n,i){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var s=n.retryLane;n.retryLane=s!==0&&s<i?s:i}}function Zf(n,i){Bb(n,i),(n=n.alternate)&&Bb(n,i)}function Ub(n){if(n.tag===13||n.tag===31){var i=Ca(n,67108864);i!==null&&nr(i,n,67108864),Zf(n,67108864)}}function Fb(n){if(n.tag===13||n.tag===31){var i=hr();i=H(i);var s=Ca(n,i);s!==null&&nr(s,n,i),Zf(n,i)}}var Hc=!0;function $E(n,i,s,u){var p=F.T;F.T=null;var b=ne.p;try{ne.p=2,Wf(n,i,s,u)}finally{ne.p=b,F.T=p}}function GE(n,i,s,u){var p=F.T;F.T=null;var b=ne.p;try{ne.p=8,Wf(n,i,s,u)}finally{ne.p=b,F.T=p}}function Wf(n,i,s,u){if(Hc){var p=Jf(u);if(p===null)Bf(n,i,u,qc,s),Hb(n,u);else if(VE(p,n,i,s,u))u.stopPropagation();else if(Hb(n,u),i&4&&-1<KE.indexOf(n)){for(;p!==null;){var b=Jt(p);if(b!==null)switch(b.tag){case 3:if(b=b.stateNode,b.current.memoizedState.isDehydrated){var w=Tn(b.pendingLanes);if(w!==0){var T=b;for(T.pendingLanes|=2,T.entangledLanes|=2;w;){var L=1<<31-At(w);T.entanglements[1]|=L,w&=~L}Wr(b),(jt&6)===0&&(Nc=Wt()+500,jl(0))}}break;case 31:case 13:T=Ca(b,2),T!==null&&nr(T,b,2),zc(),Zf(b,2)}if(b=Jf(u),b===null&&Bf(n,i,u,qc,s),b===p)break;p=b}p!==null&&u.stopPropagation()}else Bf(n,i,u,null,s)}}function Jf(n){return n=nt(n),eh(n)}var qc=null;function eh(n){if(qc=null,n=Nt(n),n!==null){var i=o(n);if(i===null)n=null;else{var s=i.tag;if(s===13){if(n=c(i),n!==null)return n;n=null}else if(s===31){if(n=f(i),n!==null)return n;n=null}else if(s===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;n=null}else i!==n&&(n=null)}}return qc=n,null}function Pb(n){switch(n){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(Qn()){case ie:return 2;case we:return 8;case $e:case We:return 32;case rt:return 268435456;default:return 32}default:return 32}}var th=!1,ra=null,ia=null,aa=null,Pl=new Map,Hl=new Map,sa=[],KE="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 Hb(n,i){switch(n){case"focusin":case"focusout":ra=null;break;case"dragenter":case"dragleave":ia=null;break;case"mouseover":case"mouseout":aa=null;break;case"pointerover":case"pointerout":Pl.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Hl.delete(i.pointerId)}}function ql(n,i,s,u,p,b){return n===null||n.nativeEvent!==b?(n={blockedOn:i,domEventName:s,eventSystemFlags:u,nativeEvent:b,targetContainers:[p]},i!==null&&(i=Jt(i),i!==null&&Ub(i)),n):(n.eventSystemFlags|=u,i=n.targetContainers,p!==null&&i.indexOf(p)===-1&&i.push(p),n)}function VE(n,i,s,u,p){switch(i){case"focusin":return ra=ql(ra,n,i,s,u,p),!0;case"dragenter":return ia=ql(ia,n,i,s,u,p),!0;case"mouseover":return aa=ql(aa,n,i,s,u,p),!0;case"pointerover":var b=p.pointerId;return Pl.set(b,ql(Pl.get(b)||null,n,i,s,u,p)),!0;case"gotpointercapture":return b=p.pointerId,Hl.set(b,ql(Hl.get(b)||null,n,i,s,u,p)),!0}return!1}function qb(n){var i=Nt(n.target);if(i!==null){var s=o(i);if(s!==null){if(i=s.tag,i===13){if(i=c(s),i!==null){n.blockedOn=i,ve(n.priority,function(){Fb(s)});return}}else if(i===31){if(i=f(s),i!==null){n.blockedOn=i,ve(n.priority,function(){Fb(s)});return}}else if(i===3&&s.stateNode.current.memoizedState.isDehydrated){n.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}n.blockedOn=null}function $c(n){if(n.blockedOn!==null)return!1;for(var i=n.targetContainers;0<i.length;){var s=Jf(n.nativeEvent);if(s===null){s=n.nativeEvent;var u=new s.constructor(s.type,s);Fe=u,s.target.dispatchEvent(u),Fe=null}else return i=Jt(s),i!==null&&Ub(i),n.blockedOn=s,!1;i.shift()}return!0}function $b(n,i,s){$c(n)&&s.delete(i)}function YE(){th=!1,ra!==null&&$c(ra)&&(ra=null),ia!==null&&$c(ia)&&(ia=null),aa!==null&&$c(aa)&&(aa=null),Pl.forEach($b),Hl.forEach($b)}function Gc(n,i){n.blockedOn===i&&(n.blockedOn=null,th||(th=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,YE)))}var Kc=null;function Gb(n){Kc!==n&&(Kc=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Kc===n&&(Kc=null);for(var i=0;i<n.length;i+=3){var s=n[i],u=n[i+1],p=n[i+2];if(typeof u!="function"){if(eh(u||s)===null)continue;break}var b=Jt(s);b!==null&&(n.splice(i,3),i-=3,Wd(b,{pending:!0,data:p,method:s.method,action:u},u,p))}}))}function Os(n){function i(L){return Gc(L,n)}ra!==null&&Gc(ra,n),ia!==null&&Gc(ia,n),aa!==null&&Gc(aa,n),Pl.forEach(i),Hl.forEach(i);for(var s=0;s<sa.length;s++){var u=sa[s];u.blockedOn===n&&(u.blockedOn=null)}for(;0<sa.length&&(s=sa[0],s.blockedOn===null);)qb(s),s.blockedOn===null&&sa.shift();if(s=(n.ownerDocument||n).$$reactFormReplay,s!=null)for(u=0;u<s.length;u+=3){var p=s[u],b=s[u+1],w=p[Ce]||null;if(typeof b=="function")w||Gb(s);else if(w){var T=null;if(b&&b.hasAttribute("formAction")){if(p=b,w=b[Ce]||null)T=w.formAction;else if(eh(p)!==null)continue}else T=w.action;typeof T=="function"?s[u+1]=T:(s.splice(u,3),u-=3),Gb(s)}}}function Kb(){function n(b){b.canIntercept&&b.info==="react-transition"&&b.intercept({handler:function(){return new Promise(function(w){return p=w})},focusReset:"manual",scroll:"manual"})}function i(){p!==null&&(p(),p=null),u||setTimeout(s,20)}function s(){if(!u&&!navigation.transition){var b=navigation.currentEntry;b&&b.url!=null&&navigation.navigate(b.url,{state:b.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var u=!1,p=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(s,100),function(){u=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),p!==null&&(p(),p=null)}}}function nh(n){this._internalRoot=n}Vc.prototype.render=nh.prototype.render=function(n){var i=this._internalRoot;if(i===null)throw Error(a(409));var s=i.current,u=hr();Ib(s,u,n,i,null,null)},Vc.prototype.unmount=nh.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var i=n.containerInfo;Ib(n.current,2,null,n,null,null),zc(),i[Ae]=null}};function Vc(n){this._internalRoot=n}Vc.prototype.unstable_scheduleHydration=function(n){if(n){var i=me();n={blockedOn:null,target:n,priority:i};for(var s=0;s<sa.length&&i!==0&&i<sa[s].priority;s++);sa.splice(s,0,n),s===0&&qb(n)}};var Vb=t.version;if(Vb!=="19.2.4")throw Error(a(527,Vb,"19.2.4"));ne.findDOMNode=function(n){var i=n._reactInternals;if(i===void 0)throw typeof n.render=="function"?Error(a(188)):(n=Object.keys(n).join(","),Error(a(268,n)));return n=m(i),n=n!==null?g(n):null,n=n===null?null:n.stateNode,n};var QE={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:F,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Yc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Yc.isDisabled&&Yc.supportsFiber)try{cn=Yc.inject(QE),rn=Yc}catch{}}return Gl.createRoot=function(n,i){if(!l(n))throw Error(a(299));var s=!1,u="",p=eg,b=tg,w=ng;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(u=i.identifierPrefix),i.onUncaughtError!==void 0&&(p=i.onUncaughtError),i.onCaughtError!==void 0&&(b=i.onCaughtError),i.onRecoverableError!==void 0&&(w=i.onRecoverableError)),i=Db(n,1,!1,null,null,s,u,null,p,b,w,Kb),n[Ae]=i.current,If(n),new nh(i)},Gl.hydrateRoot=function(n,i,s){if(!l(n))throw Error(a(299));var u=!1,p="",b=eg,w=tg,T=ng,L=null;return s!=null&&(s.unstable_strictMode===!0&&(u=!0),s.identifierPrefix!==void 0&&(p=s.identifierPrefix),s.onUncaughtError!==void 0&&(b=s.onUncaughtError),s.onCaughtError!==void 0&&(w=s.onCaughtError),s.onRecoverableError!==void 0&&(T=s.onRecoverableError),s.formState!==void 0&&(L=s.formState)),i=Db(n,1,!0,i,s??null,u,p,L,b,w,T,Kb),i.context=Lb(null),s=i.current,u=hr(),u=H(u),p=Gi(u),p.callback=null,Ki(s,p,u),s=u,i.current.lanes=s,Rt(i,s),Wr(i),n[Ae]=i.current,If(n),new Vc(i)},Gl.version="19.2.4",Gl}var rx;function lN(){if(rx)return ah.exports;rx=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),ah.exports=sN(),ah.exports}var oN=lN();/**
|
|
50
|
+
* react-router v7.13.1
|
|
51
|
+
*
|
|
52
|
+
* Copyright (c) Remix Software Inc.
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the MIT license found in the
|
|
55
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
56
|
+
*
|
|
57
|
+
* @license MIT
|
|
58
|
+
*/var Sv=e=>{throw TypeError(e)},cN=(e,t,r)=>t.has(e)||Sv("Cannot "+r),ch=(e,t,r)=>(cN(e,t,"read from private field"),r?r.call(e):t.get(e)),uN=(e,t,r)=>t.has(e)?Sv("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),ix="popstate";function ax(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function dN(e={}){function t(a,l){let o=l.state?.masked,{pathname:c,search:f,hash:h}=o||a.location;return mo("",{pathname:c,search:f,hash:h},l.state&&l.state.usr||null,l.state&&l.state.key||"default",o?{pathname:a.location.pathname,search:a.location.search,hash:a.location.hash}:void 0)}function r(a,l){return typeof l=="string"?l:ti(l)}return hN(t,r,null,e)}function dt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function wn(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function fN(){return Math.random().toString(36).substring(2,10)}function sx(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function mo(e,t,r=null,a,l){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Mi(t):t,state:r,key:t&&t.key||a||fN(),unstable_mask:l}}function ti({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Mi(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let a=e.indexOf("?");a>=0&&(t.search=e.substring(a),e=e.substring(0,a)),e&&(t.pathname=e)}return t}function hN(e,t,r,a={}){let{window:l=document.defaultView,v5Compat:o=!1}=a,c=l.history,f="POP",h=null,m=g();m==null&&(m=0,c.replaceState({...c.state,idx:m},""));function g(){return(c.state||{idx:null}).idx}function x(){f="POP";let S=g(),N=S==null?null:S-m;m=S,h&&h({action:f,location:E.location,delta:N})}function y(S,N){f="PUSH";let O=ax(S)?S:mo(E.location,S,N);m=g()+1;let A=sx(O,m),P=E.createHref(O.unstable_mask||O);try{c.pushState(A,"",P)}catch($){if($ instanceof DOMException&&$.name==="DataCloneError")throw $;l.location.assign(P)}o&&h&&h({action:f,location:E.location,delta:1})}function v(S,N){f="REPLACE";let O=ax(S)?S:mo(E.location,S,N);m=g();let A=sx(O,m),P=E.createHref(O.unstable_mask||O);c.replaceState(A,"",P),o&&h&&h({action:f,location:E.location,delta:0})}function k(S){return zv(S)}let E={get action(){return f},get location(){return e(l,c)},listen(S){if(h)throw new Error("A history only accepts one active listener");return l.addEventListener(ix,x),h=S,()=>{l.removeEventListener(ix,x),h=null}},createHref(S){return t(l,S)},createURL:k,encodeLocation(S){let N=k(S);return{pathname:N.pathname,search:N.search,hash:N.hash}},push:y,replace:v,go(S){return c.go(S)}};return E}function zv(e,t=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),dt(r,"No window.location.(origin|href) available to create URL");let a=typeof e=="string"?e:ti(e);return a=a.replace(/ $/,"%20"),!t&&a.startsWith("//")&&(a=r+a),new URL(a,r)}var no,lx=class{constructor(e){if(uN(this,no,new Map),e)for(let[t,r]of e)this.set(t,r)}get(e){if(ch(this,no).has(e))return ch(this,no).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,t){ch(this,no).set(e,t)}};no=new WeakMap;var mN=new Set(["lazy","caseSensitive","path","id","index","children"]);function pN(e){return mN.has(e)}var gN=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function bN(e){return gN.has(e)}function xN(e){return e.index===!0}function po(e,t,r=[],a={},l=!1){return e.map((o,c)=>{let f=[...r,String(c)],h=typeof o.id=="string"?o.id:f.join("-");if(dt(o.index!==!0||!o.children,"Cannot specify children on an index route"),dt(l||!a[h],`Found a route id collision on id "${h}". Route id's must be globally unique within Data Router usages`),xN(o)){let m={...o,id:h};return a[h]=ox(m,t(m)),m}else{let m={...o,id:h,children:void 0};return a[h]=ox(m,t(m)),o.children&&(m.children=po(o.children,t,f,a,l)),m}})}function ox(e,t){return Object.assign(e,{...t,...typeof t.lazy=="object"&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function da(e,t,r="/"){return ro(e,t,r,!1)}function ro(e,t,r,a){let l=typeof t=="string"?Mi(t):t,o=Or(l.pathname||"/",r);if(o==null)return null;let c=Cv(e);vN(c);let f=null;for(let h=0;f==null&&h<c.length;++h){let m=RN(o);f=TN(c[h],m,a)}return f}function yN(e,t){let{route:r,pathname:a,params:l}=e;return{id:r.id,pathname:a,params:l,data:t[r.id],loaderData:t[r.id],handle:r.handle}}function Cv(e,t=[],r=[],a="",l=!1){let o=(c,f,h=l,m)=>{let g={relativePath:m===void 0?c.path||"":m,caseSensitive:c.caseSensitive===!0,childrenIndex:f,route:c};if(g.relativePath.startsWith("/")){if(!g.relativePath.startsWith(a)&&h)return;dt(g.relativePath.startsWith(a),`Absolute route path "${g.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),g.relativePath=g.relativePath.slice(a.length)}let x=Hr([a,g.relativePath]),y=r.concat(g);c.children&&c.children.length>0&&(dt(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${x}".`),Cv(c.children,t,y,x,h)),!(c.path==null&&!c.index)&&t.push({path:x,score:zN(x,c.index),routesMeta:y})};return e.forEach((c,f)=>{if(c.path===""||!c.path?.includes("?"))o(c,f);else for(let h of Tv(c.path))o(c,f,!0,h)}),t}function Tv(e){let t=e.split("/");if(t.length===0)return[];let[r,...a]=t,l=r.endsWith("?"),o=r.replace(/\?$/,"");if(a.length===0)return l?[o,""]:[o];let c=Tv(a.join("/")),f=[];return f.push(...c.map(h=>h===""?o:[o,h].join("/"))),l&&f.push(...c),f.map(h=>e.startsWith("/")&&h===""?"/":h)}function vN(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:CN(t.routesMeta.map(a=>a.childrenIndex),r.routesMeta.map(a=>a.childrenIndex)))}var kN=/^:[\w-]+$/,wN=3,_N=2,EN=1,NN=10,SN=-2,cx=e=>e==="*";function zN(e,t){let r=e.split("/"),a=r.length;return r.some(cx)&&(a+=SN),t&&(a+=_N),r.filter(l=>!cx(l)).reduce((l,o)=>l+(kN.test(o)?wN:o===""?EN:NN),a)}function CN(e,t){return e.length===t.length&&e.slice(0,-1).every((a,l)=>a===t[l])?e[e.length-1]-t[t.length-1]:0}function TN(e,t,r=!1){let{routesMeta:a}=e,l={},o="/",c=[];for(let f=0;f<a.length;++f){let h=a[f],m=f===a.length-1,g=o==="/"?t:t.slice(o.length)||"/",x=Nu({path:h.relativePath,caseSensitive:h.caseSensitive,end:m},g),y=h.route;if(!x&&m&&r&&!a[a.length-1].route.index&&(x=Nu({path:h.relativePath,caseSensitive:h.caseSensitive,end:!1},g)),!x)return null;Object.assign(l,x.params),c.push({params:l,pathname:Hr([o,x.pathname]),pathnameBase:jN(Hr([o,x.pathnameBase])),route:y}),x.pathnameBase!=="/"&&(o=Hr([o,x.pathnameBase]))}return c}function Nu(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,a]=AN(e.path,e.caseSensitive,e.end),l=t.match(r);if(!l)return null;let o=l[0],c=o.replace(/(.)\/+$/,"$1"),f=l.slice(1);return{params:a.reduce((m,{paramName:g,isOptional:x},y)=>{if(g==="*"){let k=f[y]||"";c=o.slice(0,o.length-k.length).replace(/(.)\/+$/,"$1")}const v=f[y];return x&&!v?m[g]=void 0:m[g]=(v||"").replace(/%2F/g,"/"),m},{}),pathname:o,pathnameBase:c,pattern:e}}function AN(e,t=!1,r=!0){wn(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 a=[],l="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,f,h,m,g)=>{if(a.push({paramName:f,isOptional:h!=null}),h){let x=g.charAt(m+c.length);return x&&x!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(a.push({paramName:"*"}),l+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?l+="\\/*$":e!==""&&e!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,t?void 0:"i"),a]}function RN(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return wn(!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 Or(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,a=e.charAt(r);return a&&a!=="/"?null:e.slice(r)||"/"}function ON({basename:e,pathname:t}){return t==="/"?e:Hr([e,t])}var Av=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,_m=e=>Av.test(e);function MN(e,t="/"){let{pathname:r,search:a="",hash:l=""}=typeof e=="string"?Mi(e):e,o;return r?(r=r.replace(/\/\/+/g,"/"),r.startsWith("/")?o=ux(r.substring(1),"/"):o=ux(r,t)):o=t,{pathname:o,search:DN(a),hash:LN(l)}}function ux(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(l=>{l===".."?r.length>1&&r.pop():l!=="."&&r.push(l)}),r.length>1?r.join("/"):"/"}function uh(e,t,r,a){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Rv(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Em(e){let t=Rv(e);return t.map((r,a)=>a===t.length-1?r.pathname:r.pathnameBase)}function Uu(e,t,r,a=!1){let l;typeof e=="string"?l=Mi(e):(l={...e},dt(!l.pathname||!l.pathname.includes("?"),uh("?","pathname","search",l)),dt(!l.pathname||!l.pathname.includes("#"),uh("#","pathname","hash",l)),dt(!l.search||!l.search.includes("#"),uh("#","search","hash",l)));let o=e===""||l.pathname==="",c=o?"/":l.pathname,f;if(c==null)f=r;else{let x=t.length-1;if(!a&&c.startsWith("..")){let y=c.split("/");for(;y[0]==="..";)y.shift(),x-=1;l.pathname=y.join("/")}f=x>=0?t[x]:"/"}let h=MN(l,f),m=c&&c!=="/"&&c.endsWith("/"),g=(o||c===".")&&r.endsWith("/");return!h.pathname.endsWith("/")&&(m||g)&&(h.pathname+="/"),h}var Hr=e=>e.join("/").replace(/\/\/+/g,"/"),jN=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),DN=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,LN=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,No=class{constructor(e,t,r,a=!1){this.status=e,this.statusText=t||"",this.internal=a,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function go(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function So(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Ov=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Mv(e,t){let r=e;if(typeof r!="string"||!Av.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let a=r,l=!1;if(Ov)try{let o=new URL(window.location.href),c=r.startsWith("//")?new URL(o.protocol+r):new URL(r),f=Or(c.pathname,t);c.origin===o.origin&&f!=null?r=f+c.search+c.hash:l=!0}catch{wn(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:a,isExternal:l,to:r}}var ma=Symbol("Uninstrumented");function IN(e,t){let r={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(l=>l({id:t.id,index:t.index,path:t.path,instrument(o){let c=Object.keys(r);for(let f of c)o[f]&&r[f].push(o[f])}}));let a={};if(typeof t.lazy=="function"&&r.lazy.length>0){let l=Fs(r.lazy,t.lazy,()=>{});l&&(a.lazy=l)}if(typeof t.lazy=="object"){let l=t.lazy;["middleware","loader","action"].forEach(o=>{let c=l[o],f=r[`lazy.${o}`];if(typeof c=="function"&&f.length>0){let h=Fs(f,c,()=>{});h&&(a.lazy=Object.assign(a.lazy||{},{[o]:h}))}})}return["loader","action"].forEach(l=>{let o=t[l];if(typeof o=="function"&&r[l].length>0){let c=o[ma]??o,f=Fs(r[l],c,(...h)=>dx(h[0]));f&&(l==="loader"&&c.hydrate===!0&&(f.hydrate=!0),f[ma]=c,a[l]=f)}}),t.middleware&&t.middleware.length>0&&r.middleware.length>0&&(a.middleware=t.middleware.map(l=>{let o=l[ma]??l,c=Fs(r.middleware,o,(...f)=>dx(f[0]));return c?(c[ma]=o,c):l})),a}function BN(e,t){let r={navigate:[],fetch:[]};if(t.forEach(a=>a({instrument(l){let o=Object.keys(l);for(let c of o)l[c]&&r[c].push(l[c])}})),r.navigate.length>0){let a=e.navigate[ma]??e.navigate,l=Fs(r.navigate,a,(...o)=>{let[c,f]=o;return{to:typeof c=="number"||typeof c=="string"?c:c?ti(c):".",...fx(e,f??{})}});l&&(l[ma]=a,e.navigate=l)}if(r.fetch.length>0){let a=e.fetch[ma]??e.fetch,l=Fs(r.fetch,a,(...o)=>{let[c,,f,h]=o;return{href:f??".",fetcherKey:c,...fx(e,h??{})}});l&&(l[ma]=a,e.fetch=l)}return e}function Fs(e,t,r){return e.length===0?null:async(...a)=>{let l=await jv(e,r(...a),()=>t(...a),e.length-1);if(l.type==="error")throw l.value;return l.value}}async function jv(e,t,r,a){let l=e[a],o;if(l){let c,f=async()=>(c?console.error("You cannot call instrumented handlers more than once"):c=jv(e,t,r,a-1),o=await c,dt(o,"Expected a result"),o.type==="error"&&o.value instanceof Error?{status:"error",error:o.value}:{status:"success",error:void 0});try{await l(f,t)}catch(h){console.error("An instrumentation function threw an error:",h)}c||await f(),await c}else try{o={type:"success",value:await r()}}catch(c){o={type:"error",value:c}}return o||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function dx(e){let{request:t,context:r,params:a,unstable_pattern:l}=e;return{request:UN(t),params:{...a},unstable_pattern:l,context:FN(r)}}function fx(e,t){return{currentUrl:ti(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 UN(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function FN(e){if(HN(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var PN=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function HN(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join("\0")===PN}var Dv=["POST","PUT","PATCH","DELETE"],qN=new Set(Dv),$N=["GET",...Dv],GN=new Set($N),Lv=new Set([301,302,303,307,308]),KN=new Set([307,308]),dh={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},VN={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Kl={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},YN=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Iv="remix-router-transitions",Bv=Symbol("ResetLoaderData");function QN(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u";dt(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let a=e.hydrationRouteProperties||[],l=e.mapRouteProperties||YN,o=l;if(e.unstable_instrumentations){let D=e.unstable_instrumentations;o=H=>({...l(H),...IN(D.map(Z=>Z.route).filter(Boolean),H)})}let c={},f=po(e.routes,o,void 0,c),h,m=e.basename||"/";m.startsWith("/")||(m=`/${m}`);let g=e.dataStrategy||eS,x={...e.future},y=null,v=new Set,k=null,E=null,S=null,N=e.hydrationData!=null,O=da(f,e.history.location,m),A=!1,P=null,$,M;if(O==null&&!e.patchRoutesOnNavigation){let D=Cr(404,{pathname:e.history.location.pathname}),{matches:H,route:Z}=Qc(f);$=!0,M=!$,O=H,P={[Z.id]:D}}else if(O&&!e.hydrationData&&Lt(O,f,e.history.location.pathname).active&&(O=null),O)if(O.some(D=>D.route.lazy))$=!1,M=!$;else if(!O.some(D=>Nm(D.route)))$=!0,M=!$;else{let D=e.hydrationData?e.hydrationData.loaderData:null,H=e.hydrationData?e.hydrationData.errors:null,Z=O;if(H){let me=O.findIndex(ve=>H[ve.route.id]!==void 0);Z=Z.slice(0,me+1)}M=!1,$=Z.every(me=>{let ve=Uv(me.route,D,H);return M=M||ve.renderFallback,!ve.shouldLoad})}else{$=!1,M=!$,O=[];let D=Lt(null,f,e.history.location.pathname);D.active&&D.matches&&(A=!0,O=D.matches)}let K,z={historyAction:e.history.action,location:e.history.location,matches:O,initialized:$,renderFallback:M,navigation:dh,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||P,fetchers:new Map,blockers:new Map},W="POP",U=null,ee=!1,te,_e=!1,se=new Map,X=null,F=!1,ne=!1,V=new Set,fe=new Map,R=0,j=-1,I=new Map,C=new Set,ue=new Map,be=new Map,ye=new Set,le=new Map,xe,pe=null;function Ue(){if(y=e.history.listen(({action:D,location:H,delta:Z})=>{if(xe){xe(),xe=void 0;return}wn(le.size===0||Z!=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 me=Vr({currentLocation:z.location,nextLocation:H,historyAction:D});if(me&&Z!=null){let ve=new Promise(Oe=>{xe=Oe});e.history.go(Z*-1),Lr(me,{state:"blocked",location:H,proceed(){Lr(me,{state:"proceeding",proceed:void 0,reset:void 0,location:H}),ve.then(()=>e.history.go(Z))},reset(){let Oe=new Map(z.blockers);Oe.set(me,Kl),tt({blockers:Oe})}}),U?.resolve(),U=null;return}return _n(D,H)}),r){xS(t,se);let D=()=>yS(t,se);t.addEventListener("pagehide",D),X=()=>t.removeEventListener("pagehide",D)}return z.initialized||_n("POP",z.location,{initialHydration:!0}),K}function Re(){y&&y(),X&&X(),v.clear(),te&&te.abort(),z.fetchers.forEach((D,H)=>cn(H)),z.blockers.forEach((D,H)=>Kr(H))}function Tt(D){return v.add(D),()=>v.delete(D)}function tt(D,H={}){D.matches&&(D.matches=D.matches.map(ve=>{let Oe=c[ve.route.id],Ee=ve.route;return Ee.element!==Oe.element||Ee.errorElement!==Oe.errorElement||Ee.hydrateFallbackElement!==Oe.hydrateFallbackElement?{...ve,route:Oe}:ve})),z={...z,...D};let Z=[],me=[];z.fetchers.forEach((ve,Oe)=>{ve.state==="idle"&&(ye.has(Oe)?Z.push(Oe):me.push(Oe))}),ye.forEach(ve=>{!z.fetchers.has(ve)&&!fe.has(ve)&&Z.push(ve)}),[...v].forEach(ve=>ve(z,{deletedFetchers:Z,newErrors:D.errors??null,viewTransitionOpts:H.viewTransitionOpts,flushSync:H.flushSync===!0})),Z.forEach(ve=>cn(ve)),me.forEach(ve=>z.fetchers.delete(ve))}function gt(D,H,{flushSync:Z}={}){let me=z.actionData!=null&&z.navigation.formMethod!=null&&Pn(z.navigation.formMethod)&&z.navigation.state==="loading"&&D.state?._isRedirect!==!0,ve;H.actionData?Object.keys(H.actionData).length>0?ve=H.actionData:ve=null:me?ve=z.actionData:ve=null;let Oe=H.loaderData?wx(z.loaderData,H.loaderData,H.matches||[],H.errors):z.loaderData,Ee=z.blockers;Ee.size>0&&(Ee=new Map(Ee),Ee.forEach((qe,Ie)=>Ee.set(Ie,Kl)));let Ce=F?!1:Qe(D,H.matches||z.matches),Ae=ee===!0||z.navigation.formMethod!=null&&Pn(z.navigation.formMethod)&&D.state?._isRedirect!==!0;h&&(f=h,h=void 0),F||W==="POP"||(W==="PUSH"?e.history.push(D,D.state):W==="REPLACE"&&e.history.replace(D,D.state));let He;if(W==="POP"){let qe=se.get(z.location.pathname);qe&&qe.has(D.pathname)?He={currentLocation:z.location,nextLocation:D}:se.has(D.pathname)&&(He={currentLocation:D,nextLocation:z.location})}else if(_e){let qe=se.get(z.location.pathname);qe?qe.add(D.pathname):(qe=new Set([D.pathname]),se.set(z.location.pathname,qe)),He={currentLocation:z.location,nextLocation:D}}tt({...H,actionData:ve,loaderData:Oe,historyAction:W,location:D,initialized:!0,renderFallback:!1,navigation:dh,revalidation:"idle",restoreScrollPosition:Ce,preventScrollReset:Ae,blockers:Ee},{viewTransitionOpts:He,flushSync:Z===!0}),W="POP",ee=!1,_e=!1,F=!1,ne=!1,U?.resolve(),U=null,pe?.resolve(),pe=null}async function _t(D,H){if(U?.resolve(),U=null,typeof D=="number"){U||(U=Sx());let Bt=U.promise;return e.history.go(D),Bt}let Z=Vh(z.location,z.matches,m,D,H?.fromRouteId,H?.relative),{path:me,submission:ve,error:Oe}=hx(!1,Z,H),Ee;H?.unstable_mask&&(Ee={pathname:"",search:"",hash:"",...typeof H.unstable_mask=="string"?Mi(H.unstable_mask):{...z.location.unstable_mask,...H.unstable_mask}});let Ce=z.location,Ae=mo(Ce,me,H&&H.state,void 0,Ee);Ae={...Ae,...e.history.encodeLocation(Ae)};let He=H&&H.replace!=null?H.replace:void 0,qe="PUSH";He===!0?qe="REPLACE":He===!1||ve!=null&&Pn(ve.formMethod)&&ve.formAction===z.location.pathname+z.location.search&&(qe="REPLACE");let Ie=H&&"preventScrollReset"in H?H.preventScrollReset===!0:void 0,Et=(H&&H.flushSync)===!0,lt=Vr({currentLocation:Ce,nextLocation:Ae,historyAction:qe});if(lt){Lr(lt,{state:"blocked",location:Ae,proceed(){Lr(lt,{state:"proceeding",proceed:void 0,reset:void 0,location:Ae}),_t(D,H)},reset(){let Bt=new Map(z.blockers);Bt.set(lt,Kl),tt({blockers:Bt})}});return}await _n(qe,Ae,{submission:ve,pendingError:Oe,preventScrollReset:Ie,replace:H&&H.replace,enableViewTransition:H&&H.viewTransition,flushSync:Et,callSiteDefaultShouldRevalidate:H&&H.unstable_defaultShouldRevalidate})}function ot(){pe||(pe=Sx()),$e(),tt({revalidation:"loading"});let D=pe.promise;return z.navigation.state==="submitting"?D:z.navigation.state==="idle"?(_n(z.historyAction,z.location,{startUninterruptedRevalidation:!0}),D):(_n(W||z.historyAction,z.navigation.location,{overrideNavigation:z.navigation,enableViewTransition:_e===!0}),D)}async function _n(D,H,Z){te&&te.abort(),te=null,W=D,F=(Z&&Z.startUninterruptedRevalidation)===!0,ze(z.location,z.matches),ee=(Z&&Z.preventScrollReset)===!0,_e=(Z&&Z.enableViewTransition)===!0;let me=h||f,ve=Z&&Z.overrideNavigation,Oe=Z?.initialHydration&&z.matches&&z.matches.length>0&&!A?z.matches:da(me,H,m),Ee=(Z&&Z.flushSync)===!0;if(Oe&&z.initialized&&!ne&&oS(z.location,H)&&!(Z&&Z.submission&&Pn(Z.submission.formMethod))){gt(H,{matches:Oe},{flushSync:Ee});return}let Ce=Lt(Oe,me,H.pathname);if(Ce.active&&Ce.matches&&(Oe=Ce.matches),!Oe){let{error:Nt,notFoundMatches:Jt,route:ft}=Tn(H.pathname);gt(H,{matches:Jt,loaderData:{},errors:{[ft.id]:Nt}},{flushSync:Ee});return}te=new AbortController;let Ae=Ls(e.history,H,te.signal,Z&&Z.submission),He=e.getContext?await e.getContext():new lx,qe;if(Z&&Z.pendingError)qe=[fa(Oe).route.id,{type:"error",error:Z.pendingError}];else if(Z&&Z.submission&&Pn(Z.submission.formMethod)){let Nt=await Yn(Ae,H,Z.submission,Oe,He,Ce.active,Z&&Z.initialHydration===!0,{replace:Z.replace,flushSync:Ee});if(Nt.shortCircuited)return;if(Nt.pendingActionResult){let[Jt,ft]=Nt.pendingActionResult;if(pr(ft)&&go(ft.error)&&ft.error.status===404){te=null,gt(H,{matches:Nt.matches,loaderData:{},errors:{[Jt]:ft.error}});return}}Oe=Nt.matches||Oe,qe=Nt.pendingActionResult,ve=fh(H,Z.submission),Ee=!1,Ce.active=!1,Ae=Ls(e.history,Ae.url,Ae.signal)}let{shortCircuited:Ie,matches:Et,loaderData:lt,errors:Bt}=await br(Ae,H,Oe,He,Ce.active,ve,Z&&Z.submission,Z&&Z.fetcherSubmission,Z&&Z.replace,Z&&Z.initialHydration===!0,Ee,qe,Z&&Z.callSiteDefaultShouldRevalidate);Ie||(te=null,gt(H,{matches:Et||Oe,..._x(qe),loaderData:lt,errors:Bt}))}async function Yn(D,H,Z,me,ve,Oe,Ee,Ce={}){$e();let Ae=gS(H,Z);if(tt({navigation:Ae},{flushSync:Ce.flushSync===!0}),Oe){let Ie=await Rt(me,H.pathname,D.signal);if(Ie.type==="aborted")return{shortCircuited:!0};if(Ie.type==="error"){if(Ie.partialMatches.length===0){let{matches:lt,route:Bt}=Qc(f);return{matches:lt,pendingActionResult:[Bt.id,{type:"error",error:Ie.error}]}}let Et=fa(Ie.partialMatches).route.id;return{matches:Ie.partialMatches,pendingActionResult:[Et,{type:"error",error:Ie.error}]}}else if(Ie.matches)me=Ie.matches;else{let{notFoundMatches:Et,error:lt,route:Bt}=Tn(H.pathname);return{matches:Et,pendingActionResult:[Bt.id,{type:"error",error:lt}]}}}let He,qe=hu(me,H);if(!qe.route.action&&!qe.route.lazy)He={type:"error",error:Cr(405,{method:D.method,pathname:H.pathname,routeId:qe.route.id})};else{let Ie=Ps(o,c,D,me,qe,Ee?[]:a,ve),Et=await ie(D,Ie,ve,null);if(He=Et[qe.route.id],!He){for(let lt of me)if(Et[lt.route.id]){He=Et[lt.route.id];break}}if(D.signal.aborted)return{shortCircuited:!0}}if(qa(He)){let Ie;return Ce&&Ce.replace!=null?Ie=Ce.replace:Ie=yx(He.response.headers.get("Location"),new URL(D.url),m,e.history)===z.location.pathname+z.location.search,await Qn(D,He,!0,{submission:Z,replace:Ie}),{shortCircuited:!0}}if(pr(He)){let Ie=fa(me,qe.route.id);return(Ce&&Ce.replace)!==!0&&(W="PUSH"),{matches:me,pendingActionResult:[Ie.route.id,He,qe.route.id]}}return{matches:me,pendingActionResult:[qe.route.id,He]}}async function br(D,H,Z,me,ve,Oe,Ee,Ce,Ae,He,qe,Ie,Et){let lt=Oe||fh(H,Ee),Bt=Ee||Ce||Nx(lt),Nt=!F&&!He;if(ve){if(Nt){let It=xr(Ie);tt({navigation:lt,...It!==void 0?{actionData:It}:{}},{flushSync:qe})}let Xe=await Rt(Z,H.pathname,D.signal);if(Xe.type==="aborted")return{shortCircuited:!0};if(Xe.type==="error"){if(Xe.partialMatches.length===0){let{matches:dn,route:zt}=Qc(f);return{matches:dn,loaderData:{},errors:{[zt.id]:Xe.error}}}let It=fa(Xe.partialMatches).route.id;return{matches:Xe.partialMatches,loaderData:{},errors:{[It]:Xe.error}}}else if(Xe.matches)Z=Xe.matches;else{let{error:It,notFoundMatches:dn,route:zt}=Tn(H.pathname);return{matches:dn,loaderData:{},errors:{[zt.id]:It}}}}let Jt=h||f,{dsMatches:ft,revalidatingFetchers:un}=mx(D,me,o,c,e.history,z,Z,Bt,H,He?[]:a,He===!0,ne,V,ye,ue,C,Jt,m,e.patchRoutesOnNavigation!=null,Ie,Et);if(j=++R,!e.dataStrategy&&!ft.some(Xe=>Xe.shouldLoad)&&!ft.some(Xe=>Xe.route.middleware&&Xe.route.middleware.length>0)&&un.length===0){let Xe=sr();return gt(H,{matches:Z,loaderData:{},errors:Ie&&pr(Ie[1])?{[Ie[0]]:Ie[1].error}:null,..._x(Ie),...Xe?{fetchers:new Map(z.fetchers)}:{}},{flushSync:qe}),{shortCircuited:!0}}if(Nt){let Xe={};if(!ve){Xe.navigation=lt;let It=xr(Ie);It!==void 0&&(Xe.actionData=It)}un.length>0&&(Xe.fetchers=oi(un)),tt(Xe,{flushSync:qe})}un.forEach(Xe=>{Qt(Xe.key),Xe.controller&&fe.set(Xe.key,Xe.controller)});let Ht=()=>un.forEach(Xe=>Qt(Xe.key));te&&te.signal.addEventListener("abort",Ht);let{loaderResults:Yr,fetcherResults:Un}=await we(ft,un,D,me);if(D.signal.aborted)return{shortCircuited:!0};te&&te.signal.removeEventListener("abort",Ht),un.forEach(Xe=>fe.delete(Xe.key));let mn=Xc(Yr);if(mn)return await Qn(D,mn.result,!0,{replace:Ae}),{shortCircuited:!0};if(mn=Xc(Un),mn)return C.add(mn.key),await Qn(D,mn.result,!0,{replace:Ae}),{shortCircuited:!0};let{loaderData:ge,errors:Be}=kx(z,Z,Yr,Ie,un,Un);He&&z.errors&&(Be={...z.errors,...Be});let Je=sr(),St=Cn(j),Xt=Je||St||un.length>0;return{matches:Z,loaderData:ge,errors:Be,...Xt?{fetchers:new Map(z.fetchers)}:{}}}function xr(D){if(D&&!pr(D[1]))return{[D[0]]:D[1].data};if(z.actionData)return Object.keys(z.actionData).length===0?null:z.actionData}function oi(D){return D.forEach(H=>{let Z=z.fetchers.get(H.key),me=Vl(void 0,Z?Z.data:void 0);z.fetchers.set(H.key,me)}),new Map(z.fetchers)}async function wa(D,H,Z,me){Qt(D);let ve=(me&&me.flushSync)===!0,Oe=h||f,Ee=Vh(z.location,z.matches,m,Z,H,me?.relative),Ce=da(Oe,Ee,m),Ae=Lt(Ce,Oe,Ee);if(Ae.active&&Ae.matches&&(Ce=Ae.matches),!Ce){rt(D,H,Cr(404,{pathname:Ee}),{flushSync:ve});return}let{path:He,submission:qe,error:Ie}=hx(!0,Ee,me);if(Ie){rt(D,H,Ie,{flushSync:ve});return}let Et=e.getContext?await e.getContext():new lx,lt=(me&&me.preventScrollReset)===!0;if(qe&&Pn(qe.formMethod)){await Li(D,H,He,Ce,Et,Ae.active,ve,lt,qe,me&&me.unstable_defaultShouldRevalidate);return}ue.set(D,{routeId:H,path:He}),await Wt(D,H,He,Ce,Et,Ae.active,ve,lt,qe)}async function Li(D,H,Z,me,ve,Oe,Ee,Ce,Ae,He){$e(),ue.delete(D);let qe=z.fetchers.get(D);We(D,bS(Ae,qe),{flushSync:Ee});let Ie=new AbortController,Et=Ls(e.history,Z,Ie.signal,Ae);if(Oe){let bt=await Rt(me,new URL(Et.url).pathname,Et.signal,D);if(bt.type==="aborted")return;if(bt.type==="error"){rt(D,H,bt.error,{flushSync:Ee});return}else if(bt.matches)me=bt.matches;else{rt(D,H,Cr(404,{pathname:Z}),{flushSync:Ee});return}}let lt=hu(me,Z);if(!lt.route.action&&!lt.route.lazy){let bt=Cr(405,{method:Ae.formMethod,pathname:Z,routeId:H});rt(D,H,bt,{flushSync:Ee});return}fe.set(D,Ie);let Bt=R,Nt=Ps(o,c,Et,me,lt,a,ve),Jt=await ie(Et,Nt,ve,D),ft=Jt[lt.route.id];if(!ft){for(let bt of Nt)if(Jt[bt.route.id]){ft=Jt[bt.route.id];break}}if(Et.signal.aborted){fe.get(D)===Ie&&fe.delete(D);return}if(ye.has(D)){if(qa(ft)||pr(ft)){We(D,Ri(void 0));return}}else{if(qa(ft))if(fe.delete(D),j>Bt){We(D,Ri(void 0));return}else return C.add(D),We(D,Vl(Ae)),Qn(Et,ft,!1,{fetcherSubmission:Ae,preventScrollReset:Ce});if(pr(ft)){rt(D,H,ft.error);return}}let un=z.navigation.location||z.location,Ht=Ls(e.history,un,Ie.signal),Yr=h||f,Un=z.navigation.state!=="idle"?da(Yr,z.navigation.location,m):z.matches;dt(Un,"Didn't find any matches after fetcher action");let mn=++R;I.set(D,mn);let ge=Vl(Ae,ft.data);z.fetchers.set(D,ge);let{dsMatches:Be,revalidatingFetchers:Je}=mx(Ht,ve,o,c,e.history,z,Un,Ae,un,a,!1,ne,V,ye,ue,C,Yr,m,e.patchRoutesOnNavigation!=null,[lt.route.id,ft],He);Je.filter(bt=>bt.key!==D).forEach(bt=>{let ci=bt.key,ui=z.fetchers.get(ci),_a=Vl(void 0,ui?ui.data:void 0);z.fetchers.set(ci,_a),Qt(ci),bt.controller&&fe.set(ci,bt.controller)}),tt({fetchers:new Map(z.fetchers)});let St=()=>Je.forEach(bt=>Qt(bt.key));Ie.signal.addEventListener("abort",St);let{loaderResults:Xt,fetcherResults:Xe}=await we(Be,Je,Ht,ve);if(Ie.signal.aborted)return;if(Ie.signal.removeEventListener("abort",St),I.delete(D),fe.delete(D),Je.forEach(bt=>fe.delete(bt.key)),z.fetchers.has(D)){let bt=Ri(ft.data);z.fetchers.set(D,bt)}let It=Xc(Xt);if(It)return Qn(Ht,It.result,!1,{preventScrollReset:Ce});if(It=Xc(Xe),It)return C.add(It.key),Qn(Ht,It.result,!1,{preventScrollReset:Ce});let{loaderData:dn,errors:zt}=kx(z,Un,Xt,void 0,Je,Xe);Cn(mn),z.navigation.state==="loading"&&mn>j?(dt(W,"Expected pending action"),te&&te.abort(),gt(z.navigation.location,{matches:Un,loaderData:dn,errors:zt,fetchers:new Map(z.fetchers)})):(tt({errors:zt,loaderData:wx(z.loaderData,dn,Un,zt),fetchers:new Map(z.fetchers)}),ne=!1)}async function Wt(D,H,Z,me,ve,Oe,Ee,Ce,Ae){let He=z.fetchers.get(D);We(D,Vl(Ae,He?He.data:void 0),{flushSync:Ee});let qe=new AbortController,Ie=Ls(e.history,Z,qe.signal);if(Oe){let ft=await Rt(me,new URL(Ie.url).pathname,Ie.signal,D);if(ft.type==="aborted")return;if(ft.type==="error"){rt(D,H,ft.error,{flushSync:Ee});return}else if(ft.matches)me=ft.matches;else{rt(D,H,Cr(404,{pathname:Z}),{flushSync:Ee});return}}let Et=hu(me,Z);fe.set(D,qe);let lt=R,Bt=Ps(o,c,Ie,me,Et,a,ve),Jt=(await ie(Ie,Bt,ve,D))[Et.route.id];if(fe.get(D)===qe&&fe.delete(D),!Ie.signal.aborted){if(ye.has(D)){We(D,Ri(void 0));return}if(qa(Jt))if(j>lt){We(D,Ri(void 0));return}else{C.add(D),await Qn(Ie,Jt,!1,{preventScrollReset:Ce});return}if(pr(Jt)){rt(D,H,Jt.error);return}We(D,Ri(Jt.data))}}async function Qn(D,H,Z,{submission:me,fetcherSubmission:ve,preventScrollReset:Oe,replace:Ee}={}){Z||(U?.resolve(),U=null),H.response.headers.has("X-Remix-Revalidate")&&(ne=!0);let Ce=H.response.headers.get("Location");dt(Ce,"Expected a Location header on the redirect Response"),Ce=yx(Ce,new URL(D.url),m,e.history);let Ae=mo(z.location,Ce,{_isRedirect:!0});if(r){let Bt=!1;if(H.response.headers.has("X-Remix-Reload-Document"))Bt=!0;else if(_m(Ce)){const Nt=zv(Ce,!0);Bt=Nt.origin!==t.location.origin||Or(Nt.pathname,m)==null}if(Bt){Ee?t.location.replace(Ce):t.location.assign(Ce);return}}te=null;let He=Ee===!0||H.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:qe,formAction:Ie,formEncType:Et}=z.navigation;!me&&!ve&&qe&&Ie&&Et&&(me=Nx(z.navigation));let lt=me||ve;if(KN.has(H.response.status)&<&&Pn(lt.formMethod))await _n(He,Ae,{submission:{...lt,formAction:Ce},preventScrollReset:Oe||ee,enableViewTransition:Z?_e:void 0});else{let Bt=fh(Ae,me);await _n(He,Ae,{overrideNavigation:Bt,fetcherSubmission:ve,preventScrollReset:Oe||ee,enableViewTransition:Z?_e:void 0})}}async function ie(D,H,Z,me){let ve,Oe={};try{ve=await nS(g,D,H,me,Z,!1)}catch(Ee){return H.filter(Ce=>Ce.shouldLoad).forEach(Ce=>{Oe[Ce.route.id]={type:"error",error:Ee}}),Oe}if(D.signal.aborted)return Oe;if(!Pn(D.method))for(let Ee of H){if(ve[Ee.route.id]?.type==="error")break;!ve.hasOwnProperty(Ee.route.id)&&!z.loaderData.hasOwnProperty(Ee.route.id)&&(!z.errors||!z.errors.hasOwnProperty(Ee.route.id))&&Ee.shouldCallHandler()&&(ve[Ee.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${Ee.route.id}`)})}for(let[Ee,Ce]of Object.entries(ve))if(fS(Ce)){let Ae=Ce.result;Oe[Ee]={type:"redirect",response:sS(Ae,D,Ee,H,m)}}else Oe[Ee]=await aS(Ce);return Oe}async function we(D,H,Z,me){let ve=ie(Z,D,me,null),Oe=Promise.all(H.map(async Ae=>{if(Ae.matches&&Ae.match&&Ae.request&&Ae.controller){let qe=(await ie(Ae.request,Ae.matches,me,Ae.key))[Ae.match.route.id];return{[Ae.key]:qe}}else return Promise.resolve({[Ae.key]:{type:"error",error:Cr(404,{pathname:Ae.path})}})})),Ee=await ve,Ce=(await Oe).reduce((Ae,He)=>Object.assign(Ae,He),{});return{loaderResults:Ee,fetcherResults:Ce}}function $e(){ne=!0,ue.forEach((D,H)=>{fe.has(H)&&V.add(H),Qt(H)})}function We(D,H,Z={}){z.fetchers.set(D,H),tt({fetchers:new Map(z.fetchers)},{flushSync:(Z&&Z.flushSync)===!0})}function rt(D,H,Z,me={}){let ve=fa(z.matches,H);cn(D),tt({errors:{[ve.route.id]:Z},fetchers:new Map(z.fetchers)},{flushSync:(me&&me.flushSync)===!0})}function zn(D){return be.set(D,(be.get(D)||0)+1),ye.has(D)&&ye.delete(D),z.fetchers.get(D)||VN}function ar(D,H){Qt(D,H?.reason),We(D,Ri(null))}function cn(D){let H=z.fetchers.get(D);fe.has(D)&&!(H&&H.state==="loading"&&I.has(D))&&Qt(D),ue.delete(D),I.delete(D),C.delete(D),ye.delete(D),V.delete(D),z.fetchers.delete(D)}function rn(D){let H=(be.get(D)||0)-1;H<=0?(be.delete(D),ye.add(D)):be.set(D,H),tt({fetchers:new Map(z.fetchers)})}function Qt(D,H){let Z=fe.get(D);Z&&(Z.abort(H),fe.delete(D))}function At(D){for(let H of D){let Z=zn(H),me=Ri(Z.data);z.fetchers.set(H,me)}}function sr(){let D=[],H=!1;for(let Z of C){let me=z.fetchers.get(Z);dt(me,`Expected fetcher: ${Z}`),me.state==="loading"&&(C.delete(Z),D.push(Z),H=!0)}return At(D),H}function Cn(D){let H=[];for(let[Z,me]of I)if(me<D){let ve=z.fetchers.get(Z);dt(ve,`Expected fetcher: ${Z}`),ve.state==="loading"&&(Qt(Z),I.delete(Z),H.push(Z))}return At(H),H.length>0}function es(D,H){let Z=z.blockers.get(D)||Kl;return le.get(D)!==H&&le.set(D,H),Z}function Kr(D){z.blockers.delete(D),le.delete(D)}function Lr(D,H){let Z=z.blockers.get(D)||Kl;dt(Z.state==="unblocked"&&H.state==="blocked"||Z.state==="blocked"&&H.state==="blocked"||Z.state==="blocked"&&H.state==="proceeding"||Z.state==="blocked"&&H.state==="unblocked"||Z.state==="proceeding"&&H.state==="unblocked",`Invalid blocker state transition: ${Z.state} -> ${H.state}`);let me=new Map(z.blockers);me.set(D,H),tt({blockers:me})}function Vr({currentLocation:D,nextLocation:H,historyAction:Z}){if(le.size===0)return;le.size>1&&wn(!1,"A router only supports one blocker at a time");let me=Array.from(le.entries()),[ve,Oe]=me[me.length-1],Ee=z.blockers.get(ve);if(!(Ee&&Ee.state==="proceeding")&&Oe({currentLocation:D,nextLocation:H,historyAction:Z}))return ve}function Tn(D){let H=Cr(404,{pathname:D}),Z=h||f,{matches:me,route:ve}=Qc(Z);return{notFoundMatches:me,route:ve,error:H}}function B(D,H,Z){if(k=D,S=H,E=Z||null,!N&&z.navigation===dh){N=!0;let me=Qe(z.location,z.matches);me!=null&&tt({restoreScrollPosition:me})}return()=>{k=null,S=null,E=null}}function ce(D,H){return E&&E(D,H.map(me=>yN(me,z.loaderData)))||D.key}function ze(D,H){if(k&&S){let Z=ce(D,H);k[Z]=S()}}function Qe(D,H){if(k){let Z=ce(D,H),me=k[Z];if(typeof me=="number")return me}return null}function Lt(D,H,Z){if(e.patchRoutesOnNavigation)if(D){if(Object.keys(D[0].params).length>0)return{active:!0,matches:ro(H,Z,m,!0)}}else return{active:!0,matches:ro(H,Z,m,!0)||[]};return{active:!1,matches:null}}async function Rt(D,H,Z,me){if(!e.patchRoutesOnNavigation)return{type:"success",matches:D};let ve=D;for(;;){let Oe=h==null,Ee=h||f,Ce=c;try{await e.patchRoutesOnNavigation({signal:Z,path:H,matches:ve,fetcherKey:me,patch:(qe,Ie)=>{Z.aborted||px(qe,Ie,Ee,Ce,o,!1)}})}catch(qe){return{type:"error",error:qe,partialMatches:ve}}finally{Oe&&!Z.aborted&&(f=[...f])}if(Z.aborted)return{type:"aborted"};let Ae=da(Ee,H,m),He=null;if(Ae){if(Object.keys(Ae[0].params).length===0)return{type:"success",matches:Ae};if(He=ro(Ee,H,m,!0),!(He&&ve.length<He.length&&Me(ve,He.slice(0,ve.length))))return{type:"success",matches:Ae}}if(He||(He=ro(Ee,H,m,!0)),!He||Me(ve,He))return{type:"success",matches:null};ve=He}}function Me(D,H){return D.length===H.length&&D.every((Z,me)=>Z.route.id===H[me].route.id)}function Te(D){c={},h=po(D,o,void 0,c)}function Ve(D,H,Z=!1){let me=h==null;px(D,H,h||f,c,o,Z),me&&(f=[...f],tt({}))}return K={get basename(){return m},get future(){return x},get state(){return z},get routes(){return f},get window(){return t},initialize:Ue,subscribe:Tt,enableScrollRestoration:B,navigate:_t,fetch:wa,revalidate:ot,createHref:D=>e.history.createHref(D),encodeLocation:D=>e.history.encodeLocation(D),getFetcher:zn,resetFetcher:ar,deleteFetcher:rn,dispose:Re,getBlocker:es,deleteBlocker:Kr,patchRoutes:Ve,_internalFetchControllers:fe,_internalSetRoutes:Te,_internalSetStateDoNotUseOrYouWillBreakYourApp(D){tt(D)}},e.unstable_instrumentations&&(K=BN(K,e.unstable_instrumentations.map(D=>D.router).filter(Boolean))),K}function XN(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Vh(e,t,r,a,l,o){let c,f;if(l){c=[];for(let m of t)if(c.push(m),m.route.id===l){f=m;break}}else c=t,f=t[t.length-1];let h=Uu(a||".",Em(c),Or(e.pathname,r)||e.pathname,o==="path");if(a==null&&(h.search=e.search,h.hash=e.hash),(a==null||a===""||a===".")&&f){let m=zm(h.search);if(f.route.index&&!m)h.search=h.search?h.search.replace(/^\?/,"?index&"):"?index";else if(!f.route.index&&m){let g=new URLSearchParams(h.search),x=g.getAll("index");g.delete("index"),x.filter(v=>v).forEach(v=>g.append("index",v));let y=g.toString();h.search=y?`?${y}`:""}}return r!=="/"&&(h.pathname=ON({basename:r,pathname:h.pathname})),ti(h)}function hx(e,t,r){if(!r||!XN(r))return{path:t};if(r.formMethod&&!pS(r.formMethod))return{path:t,error:Cr(405,{method:r.formMethod})};let a=()=>({path:t,error:Cr(400,{type:"invalid-body"})}),o=(r.formMethod||"get").toUpperCase(),c=Gv(t);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Pn(o))return a();let x=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((y,[v,k])=>`${y}${v}=${k}
|
|
59
|
+
`,""):String(r.body);return{path:t,submission:{formMethod:o,formAction:c,formEncType:r.formEncType,formData:void 0,json:void 0,text:x}}}else if(r.formEncType==="application/json"){if(!Pn(o))return a();try{let x=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:t,submission:{formMethod:o,formAction:c,formEncType:r.formEncType,formData:void 0,json:x,text:void 0}}}catch{return a()}}}dt(typeof FormData=="function","FormData is not available in this environment");let f,h;if(r.formData)f=Qh(r.formData),h=r.formData;else if(r.body instanceof FormData)f=Qh(r.body),h=r.body;else if(r.body instanceof URLSearchParams)f=r.body,h=vx(f);else if(r.body==null)f=new URLSearchParams,h=new FormData;else try{f=new URLSearchParams(r.body),h=vx(f)}catch{return a()}let m={formMethod:o,formAction:c,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:h,json:void 0,text:void 0};if(Pn(m.formMethod))return{path:t,submission:m};let g=Mi(t);return e&&g.search&&zm(g.search)&&f.append("index",""),g.search=`?${f}`,{path:ti(g),submission:m}}function mx(e,t,r,a,l,o,c,f,h,m,g,x,y,v,k,E,S,N,O,A,P){let $=A?pr(A[1])?A[1].error:A[1].data:void 0,M=l.createURL(o.location),K=l.createURL(h),z;if(g&&o.errors){let X=Object.keys(o.errors)[0];z=c.findIndex(F=>F.route.id===X)}else if(A&&pr(A[1])){let X=A[0];z=c.findIndex(F=>F.route.id===X)-1}let W=A?A[1].statusCode:void 0,U=W&&W>=400,ee={currentUrl:M,currentParams:o.matches[0]?.params||{},nextUrl:K,nextParams:c[0].params,...f,actionResult:$,actionStatus:W},te=So(c),_e=c.map((X,F)=>{let{route:ne}=X,V=null;if(z!=null&&F>z)V=!1;else if(ne.lazy)V=!0;else if(!Nm(ne))V=!1;else if(g){let{shouldLoad:I}=Uv(ne,o.loaderData,o.errors);V=I}else ZN(o.loaderData,o.matches[F],X)&&(V=!0);if(V!==null)return Yh(r,a,e,te,X,m,t,V);let fe=!1;typeof P=="boolean"?fe=P:U?fe=!1:(x||M.pathname+M.search===K.pathname+K.search||M.search!==K.search||WN(o.matches[F],X))&&(fe=!0);let R={...ee,defaultShouldRevalidate:fe},j=oo(X,R);return Yh(r,a,e,te,X,m,t,j,R,P)}),se=[];return k.forEach((X,F)=>{if(g||!c.some(ue=>ue.route.id===X.routeId)||v.has(F))return;let ne=o.fetchers.get(F),V=ne&&ne.state!=="idle"&&ne.data===void 0,fe=da(S,X.path,N);if(!fe){if(O&&V)return;se.push({key:F,routeId:X.routeId,path:X.path,matches:null,match:null,request:null,controller:null});return}if(E.has(F))return;let R=hu(fe,X.path),j=new AbortController,I=Ls(l,X.path,j.signal),C=null;if(y.has(F))y.delete(F),C=Ps(r,a,I,fe,R,m,t);else if(V)x&&(C=Ps(r,a,I,fe,R,m,t));else{let ue;typeof P=="boolean"?ue=P:U?ue=!1:ue=x;let be={...ee,defaultShouldRevalidate:ue};oo(R,be)&&(C=Ps(r,a,I,fe,R,m,t,be))}C&&se.push({key:F,routeId:X.routeId,path:X.path,matches:C,match:R,request:I,controller:j})}),{dsMatches:_e,revalidatingFetchers:se}}function Nm(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function Uv(e,t,r){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!Nm(e))return{shouldLoad:!1,renderFallback:!1};let a=t!=null&&e.id in t,l=r!=null&&r[e.id]!==void 0;if(!a&&l)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader=="function"&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!a};let o=!a&&!l;return{shouldLoad:o,renderFallback:o}}function ZN(e,t,r){let a=!t||r.route.id!==t.route.id,l=!e.hasOwnProperty(r.route.id);return a||l}function WN(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function oo(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}function px(e,t,r,a,l,o){let c;if(e){let m=a[e];dt(m,`No route found to patch children into: routeId = ${e}`),m.children||(m.children=[]),c=m.children}else c=r;let f=[],h=[];if(t.forEach(m=>{let g=c.find(x=>Fv(m,x));g?h.push({existingRoute:g,newRoute:m}):f.push(m)}),f.length>0){let m=po(f,l,[e||"_","patch",String(c?.length||"0")],a);c.push(...m)}if(o&&h.length>0)for(let m=0;m<h.length;m++){let{existingRoute:g,newRoute:x}=h[m],y=g,[v]=po([x],l,[],{},!0);Object.assign(y,{element:v.element?v.element:y.element,errorElement:v.errorElement?v.errorElement:y.errorElement,hydrateFallbackElement:v.hydrateFallbackElement?v.hydrateFallbackElement:y.hydrateFallbackElement})}}function Fv(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?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children?.every((r,a)=>t.children?.some(l=>Fv(r,l)))??!1:!1}var gx=new WeakMap,Pv=({key:e,route:t,manifest:r,mapRouteProperties:a})=>{let l=r[t.id];if(dt(l,"No route found in manifest"),!l.lazy||typeof l.lazy!="object")return;let o=l.lazy[e];if(!o)return;let c=gx.get(l);c||(c={},gx.set(l,c));let f=c[e];if(f)return f;let h=(async()=>{let m=pN(e),x=l[e]!==void 0&&e!=="hasErrorBoundary";if(m)wn(!m,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),c[e]=Promise.resolve();else if(x)wn(!1,`Route "${l.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let y=await o();y!=null&&(Object.assign(l,{[e]:y}),Object.assign(l,a(l)))}typeof l.lazy=="object"&&(l.lazy[e]=void 0,Object.values(l.lazy).every(y=>y===void 0)&&(l.lazy=void 0))})();return c[e]=h,h},bx=new WeakMap;function JN(e,t,r,a,l){let o=r[e.id];if(dt(o,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let g=bx.get(o);if(g)return{lazyRoutePromise:g,lazyHandlerPromise:g};let x=(async()=>{dt(typeof e.lazy=="function","No lazy route function found");let y=await e.lazy(),v={};for(let k in y){let E=y[k];if(E===void 0)continue;let S=bN(k),O=o[k]!==void 0&&k!=="hasErrorBoundary";S?wn(!S,"Route property "+k+" is not a supported property to be returned from a lazy route function. This property will be ignored."):O?wn(!O,`Route "${o.id}" has a static property "${k}" defined but its lazy function is also returning a value for this property. The lazy route property "${k}" will be ignored.`):v[k]=E}Object.assign(o,v),Object.assign(o,{...a(o),lazy:void 0})})();return bx.set(o,x),x.catch(()=>{}),{lazyRoutePromise:x,lazyHandlerPromise:x}}let c=Object.keys(e.lazy),f=[],h;for(let g of c){if(l&&l.includes(g))continue;let x=Pv({key:g,route:e,manifest:r,mapRouteProperties:a});x&&(f.push(x),g===t&&(h=x))}let m=f.length>0?Promise.all(f).then(()=>{}):void 0;return m?.catch(()=>{}),h?.catch(()=>{}),{lazyRoutePromise:m,lazyHandlerPromise:h}}async function xx(e){let t=e.matches.filter(l=>l.shouldLoad),r={};return(await Promise.all(t.map(l=>l.resolve()))).forEach((l,o)=>{r[t[o].route.id]=l}),r}async function eS(e){return e.matches.some(t=>t.route.middleware)?Hv(e,()=>xx(e)):xx(e)}function Hv(e,t){return tS(e,t,a=>{if(mS(a))throw a;return a},uS,r);function r(a,l,o){if(o)return Promise.resolve(Object.assign(o.value,{[l]:{type:"error",result:a}}));{let{matches:c}=e,f=Math.min(Math.max(c.findIndex(m=>m.route.id===l),0),Math.max(c.findIndex(m=>m.shouldCallHandler()),0)),h=fa(c,c[f].route.id).route.id;return Promise.resolve({[h]:{type:"error",result:a}})}}}async function tS(e,t,r,a,l){let{matches:o,request:c,params:f,context:h,unstable_pattern:m}=e,g=o.flatMap(y=>y.route.middleware?y.route.middleware.map(v=>[y.route.id,v]):[]);return await qv({request:c,params:f,context:h,unstable_pattern:m},g,t,r,a,l)}async function qv(e,t,r,a,l,o,c=0){let{request:f}=e;if(f.signal.aborted)throw f.signal.reason??new Error(`Request aborted: ${f.method} ${f.url}`);let h=t[c];if(!h)return await r();let[m,g]=h,x,y=async()=>{if(x)throw new Error("You may only call `next()` once per middleware");try{return x={value:await qv(e,t,r,a,l,o,c+1)},x.value}catch(v){return x={value:await o(v,m,x)},x.value}};try{let v=await g(e,y),k=v!=null?a(v):void 0;return l(k)?k:x?k??x.value:(x={value:await y()},x.value)}catch(v){return await o(v,m,x)}}function $v(e,t,r,a,l){let o=Pv({key:"middleware",route:a.route,manifest:t,mapRouteProperties:e}),c=JN(a.route,Pn(r.method)?"action":"loader",t,e,l);return{middleware:o,route:c.lazyRoutePromise,handler:c.lazyHandlerPromise}}function Yh(e,t,r,a,l,o,c,f,h=null,m){let g=!1,x=$v(e,t,r,l,o);return{...l,_lazyPromises:x,shouldLoad:f,shouldRevalidateArgs:h,shouldCallHandler(y){return g=!0,h?typeof m=="boolean"?oo(l,{...h,defaultShouldRevalidate:m}):typeof y=="boolean"?oo(l,{...h,defaultShouldRevalidate:y}):oo(l,h):f},resolve(y){let{lazy:v,loader:k,middleware:E}=l.route,S=g||f||y&&!Pn(r.method)&&(v||k),N=E&&E.length>0&&!k&&!v;return S&&(Pn(r.method)||!N)?rS({request:r,unstable_pattern:a,match:l,lazyHandlerPromise:x?.handler,lazyRoutePromise:x?.route,handlerOverride:y,scopedContext:c}):Promise.resolve({type:"data",result:void 0})}}}function Ps(e,t,r,a,l,o,c,f=null){return a.map(h=>h.route.id!==l.route.id?{...h,shouldLoad:!1,shouldRevalidateArgs:f,shouldCallHandler:()=>!1,_lazyPromises:$v(e,t,r,h,o),resolve:()=>Promise.resolve({type:"data",result:void 0})}:Yh(e,t,r,So(a),h,o,c,!0,f))}async function nS(e,t,r,a,l,o){r.some(m=>m._lazyPromises?.middleware)&&await Promise.all(r.map(m=>m._lazyPromises?.middleware));let c={request:t,unstable_pattern:So(r),params:r[0].params,context:l,matches:r},h=await e({...c,fetcherKey:a,runClientMiddleware:m=>{let g=c;return Hv(g,()=>m({...g,fetcherKey:a,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(r.flatMap(m=>[m._lazyPromises?.handler,m._lazyPromises?.route]))}catch{}return h}async function rS({request:e,unstable_pattern:t,match:r,lazyHandlerPromise:a,lazyRoutePromise:l,handlerOverride:o,scopedContext:c}){let f,h,m=Pn(e.method),g=m?"action":"loader",x=y=>{let v,k=new Promise((N,O)=>v=O);h=()=>v(),e.signal.addEventListener("abort",h);let E=N=>typeof y!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${g}" [routeId: ${r.route.id}]`)):y({request:e,unstable_pattern:t,params:r.params,context:c},...N!==void 0?[N]:[]),S=(async()=>{try{return{type:"data",result:await(o?o(O=>E(O)):E())}}catch(N){return{type:"error",result:N}}})();return Promise.race([S,k])};try{let y=m?r.route.action:r.route.loader;if(a||l)if(y){let v,[k]=await Promise.all([x(y).catch(E=>{v=E}),a,l]);if(v!==void 0)throw v;f=k}else{await a;let v=m?r.route.action:r.route.loader;if(v)[f]=await Promise.all([x(v),l]);else if(g==="action"){let k=new URL(e.url),E=k.pathname+k.search;throw Cr(405,{method:e.method,pathname:E,routeId:r.route.id})}else return{type:"data",result:void 0}}else if(y)f=await x(y);else{let v=new URL(e.url),k=v.pathname+v.search;throw Cr(404,{pathname:k})}}catch(y){return{type:"error",result:y}}finally{h&&e.signal.removeEventListener("abort",h)}return f}async function iS(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 aS(e){let{result:t,type:r}=e;if(Sm(t)){let a;try{a=await iS(t)}catch(l){return{type:"error",error:l}}return r==="error"?{type:"error",error:new No(t.status,t.statusText,a),statusCode:t.status,headers:t.headers}:{type:"data",data:a,statusCode:t.status,headers:t.headers}}return r==="error"?Ex(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:cS(t),statusCode:go(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:go(t)?t.status:void 0}:Ex(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 sS(e,t,r,a,l){let o=e.headers.get("Location");if(dt(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!_m(o)){let c=a.slice(0,a.findIndex(f=>f.route.id===r)+1);o=Vh(new URL(t.url),c,l,o),e.headers.set("Location",o)}return e}function yx(e,t,r,a){let l=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(_m(e)){let o=e,c=o.startsWith("//")?new URL(t.protocol+o):new URL(o);if(l.includes(c.protocol))throw new Error("Invalid redirect location");let f=Or(c.pathname,r)!=null;if(c.origin===t.origin&&f)return c.pathname+c.search+c.hash}try{let o=a.createURL(e);if(l.includes(o.protocol))throw new Error("Invalid redirect location")}catch{}return e}function Ls(e,t,r,a){let l=e.createURL(Gv(t)).toString(),o={signal:r};if(a&&Pn(a.formMethod)){let{formMethod:c,formEncType:f}=a;o.method=c.toUpperCase(),f==="application/json"?(o.headers=new Headers({"Content-Type":f}),o.body=JSON.stringify(a.json)):f==="text/plain"?o.body=a.text:f==="application/x-www-form-urlencoded"&&a.formData?o.body=Qh(a.formData):o.body=a.formData}return new Request(l,o)}function Qh(e){let t=new URLSearchParams;for(let[r,a]of e.entries())t.append(r,typeof a=="string"?a:a.name);return t}function vx(e){let t=new FormData;for(let[r,a]of e.entries())t.append(r,a);return t}function lS(e,t,r,a=!1,l=!1){let o={},c=null,f,h=!1,m={},g=r&&pr(r[1])?r[1].error:void 0;return e.forEach(x=>{if(!(x.route.id in t))return;let y=x.route.id,v=t[y];if(dt(!qa(v),"Cannot handle redirect results in processLoaderData"),pr(v)){let k=v.error;if(g!==void 0&&(k=g,g=void 0),c=c||{},l)c[y]=k;else{let E=fa(e,y);c[E.route.id]==null&&(c[E.route.id]=k)}a||(o[y]=Bv),h||(h=!0,f=go(v.error)?v.error.status:500),v.headers&&(m[y]=v.headers)}else o[y]=v.data,v.statusCode&&v.statusCode!==200&&!h&&(f=v.statusCode),v.headers&&(m[y]=v.headers)}),g!==void 0&&r&&(c={[r[0]]:g},r[2]&&(o[r[2]]=void 0)),{loaderData:o,errors:c,statusCode:f||200,loaderHeaders:m}}function kx(e,t,r,a,l,o){let{loaderData:c,errors:f}=lS(t,r,a);return l.filter(h=>!h.matches||h.matches.some(m=>m.shouldLoad)).forEach(h=>{let{key:m,match:g,controller:x}=h;if(x&&x.signal.aborted)return;let y=o[m];if(dt(y,"Did not find corresponding fetcher result"),pr(y)){let v=fa(e.matches,g?.route.id);f&&f[v.route.id]||(f={...f,[v.route.id]:y.error}),e.fetchers.delete(m)}else if(qa(y))dt(!1,"Unhandled fetcher revalidation redirect");else{let v=Ri(y.data);e.fetchers.set(m,v)}}),{loaderData:c,errors:f}}function wx(e,t,r,a){let l=Object.entries(t).filter(([,o])=>o!==Bv).reduce((o,[c,f])=>(o[c]=f,o),{});for(let o of r){let c=o.route.id;if(!t.hasOwnProperty(c)&&e.hasOwnProperty(c)&&o.route.loader&&(l[c]=e[c]),a&&a.hasOwnProperty(c))break}return l}function _x(e){return e?pr(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function fa(e,t){return(t?e.slice(0,e.findIndex(a=>a.route.id===t)+1):[...e]).reverse().find(a=>a.route.hasErrorBoundary===!0)||e[0]}function Qc(e){let t=e.length===1?e[0]:e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Cr(e,{pathname:t,routeId:r,method:a,type:l,message:o}={}){let c="Unknown Server Error",f="Unknown @remix-run/router error";return e===400?(c="Bad Request",a&&t&&r?f=`You made a ${a} request to "${t}" but did not provide a \`loader\` for route "${r}", so there is no way to handle the request.`:l==="invalid-body"&&(f="Unable to encode submission body")):e===403?(c="Forbidden",f=`Route "${r}" does not match URL "${t}"`):e===404?(c="Not Found",f=`No route matches URL "${t}"`):e===405&&(c="Method Not Allowed",a&&t&&r?f=`You made a ${a.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${r}", so there is no way to handle the request.`:a&&(f=`Invalid request method "${a.toUpperCase()}"`)),new No(e||500,c,new Error(f),!0)}function Xc(e){let t=Object.entries(e);for(let r=t.length-1;r>=0;r--){let[a,l]=t[r];if(qa(l))return{key:a,result:l}}}function Gv(e){let t=typeof e=="string"?Mi(e):e;return ti({...t,hash:""})}function oS(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function cS(e){return new No(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function uS(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([t,r])=>typeof t=="string"&&dS(r))}function dS(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function fS(e){return Sm(e.result)&&Lv.has(e.result.status)}function pr(e){return e.type==="error"}function qa(e){return(e&&e.type)==="redirect"}function Ex(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Sm(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function hS(e){return Lv.has(e)}function mS(e){return Sm(e)&&hS(e.status)&&e.headers.has("Location")}function pS(e){return GN.has(e.toUpperCase())}function Pn(e){return qN.has(e.toUpperCase())}function zm(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function hu(e,t){let r=typeof t=="string"?Mi(t).search:t.search;if(e[e.length-1].route.index&&zm(r||""))return e[e.length-1];let a=Rv(e);return a[a.length-1]}function Nx(e){let{formMethod:t,formAction:r,formEncType:a,text:l,formData:o,json:c}=e;if(!(!t||!r||!a)){if(l!=null)return{formMethod:t,formAction:r,formEncType:a,formData:void 0,json:void 0,text:l};if(o!=null)return{formMethod:t,formAction:r,formEncType:a,formData:o,json:void 0,text:void 0};if(c!==void 0)return{formMethod:t,formAction:r,formEncType:a,formData:void 0,json:c,text:void 0}}}function fh(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function gS(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Vl(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 bS(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 Ri(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 xS(e,t){try{let r=e.sessionStorage.getItem(Iv);if(r){let a=JSON.parse(r);for(let[l,o]of Object.entries(a||{}))o&&Array.isArray(o)&&t.set(l,new Set(o||[]))}}catch{}}function yS(e,t){if(t.size>0){let r={};for(let[a,l]of t)r[a]=[...l];try{e.sessionStorage.setItem(Iv,JSON.stringify(r))}catch(a){wn(!1,`Failed to save applied view transitions in sessionStorage (${a}).`)}}}function Sx(){let e,t,r=new Promise((a,l)=>{e=async o=>{a(o);try{await r}catch{}},t=async o=>{l(o);try{await r}catch{}}});return{promise:r,resolve:e,reject:t}}var Qa=_.createContext(null);Qa.displayName="DataRouter";var zo=_.createContext(null);zo.displayName="DataRouterState";var Kv=_.createContext(!1);function vS(){return _.useContext(Kv)}var Cm=_.createContext({isTransitioning:!1});Cm.displayName="ViewTransition";var Vv=_.createContext(new Map);Vv.displayName="Fetchers";var kS=_.createContext(null);kS.displayName="Await";var Dr=_.createContext(null);Dr.displayName="Navigation";var Fu=_.createContext(null);Fu.displayName="Location";var Gr=_.createContext({outlet:null,matches:[],isDataRoute:!1});Gr.displayName="Route";var Tm=_.createContext(null);Tm.displayName="RouteError";var Yv="REACT_ROUTER_ERROR",wS="REDIRECT",_S="ROUTE_ERROR_RESPONSE";function ES(e){if(e.startsWith(`${Yv}:${wS}:{`))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 NS(e){if(e.startsWith(`${Yv}:${_S}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new No(t.status,t.statusText,t.data)}catch{}}function SS(e,{relative:t}={}){dt(Co(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:a}=_.useContext(Dr),{hash:l,pathname:o,search:c}=To(e,{relative:t}),f=o;return r!=="/"&&(f=o==="/"?r:Hr([r,o])),a.createHref({pathname:f,search:c,hash:l})}function Co(){return _.useContext(Fu)!=null}function ai(){return dt(Co(),"useLocation() may be used only in the context of a <Router> component."),_.useContext(Fu).location}var Qv="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Xv(e){_.useContext(Dr).static||_.useLayoutEffect(e)}function Pu(){let{isDataRoute:e}=_.useContext(Gr);return e?PS():zS()}function zS(){dt(Co(),"useNavigate() may be used only in the context of a <Router> component.");let e=_.useContext(Qa),{basename:t,navigator:r}=_.useContext(Dr),{matches:a}=_.useContext(Gr),{pathname:l}=ai(),o=JSON.stringify(Em(a)),c=_.useRef(!1);return Xv(()=>{c.current=!0}),_.useCallback((h,m={})=>{if(wn(c.current,Qv),!c.current)return;if(typeof h=="number"){r.go(h);return}let g=Uu(h,JSON.parse(o),l,m.relative==="path");e==null&&t!=="/"&&(g.pathname=g.pathname==="/"?t:Hr([t,g.pathname])),(m.replace?r.replace:r.push)(g,m.state,m)},[t,r,o,l,e])}var CS=_.createContext(null);function TS(e){let t=_.useContext(Gr).outlet;return _.useMemo(()=>t&&_.createElement(CS.Provider,{value:e},t),[t,e])}function Hu(){let{matches:e}=_.useContext(Gr),t=e[e.length-1];return t?t.params:{}}function To(e,{relative:t}={}){let{matches:r}=_.useContext(Gr),{pathname:a}=ai(),l=JSON.stringify(Em(r));return _.useMemo(()=>Uu(e,JSON.parse(l),a,t==="path"),[e,l,a,t])}function AS(e,t,r){dt(Co(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=_.useContext(Dr),{matches:l}=_.useContext(Gr),o=l[l.length-1],c=o?o.params:{},f=o?o.pathname:"/",h=o?o.pathnameBase:"/",m=o&&o.route;{let S=m&&m.path||"";Wv(f,!m||S.endsWith("*")||S.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${f}" (under <Route path="${S}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
60
|
+
|
|
61
|
+
Please change the parent <Route path="${S}"> to <Route path="${S==="/"?"*":`${S}/*`}">.`)}let g=ai(),x;x=g;let y=x.pathname||"/",v=y;if(h!=="/"){let S=h.replace(/^\//,"").split("/");v="/"+y.replace(/^\//,"").split("/").slice(S.length).join("/")}let k=da(e,{pathname:v});return wn(m||k!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),wn(k==null||k[k.length-1].route.element!==void 0||k[k.length-1].route.Component!==void 0||k[k.length-1].route.lazy!==void 0,`Matched leaf route at location "${x.pathname}${x.search}${x.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),DS(k&&k.map(S=>Object.assign({},S,{params:Object.assign({},c,S.params),pathname:Hr([h,a.encodeLocation?a.encodeLocation(S.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:S.pathname]),pathnameBase:S.pathnameBase==="/"?h:Hr([h,a.encodeLocation?a.encodeLocation(S.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:S.pathnameBase])})),l,r)}function RS(){let e=FS(),t=go(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",l={padding:"0.5rem",backgroundColor:a},o={padding:"2px 4px",backgroundColor:a},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=_.createElement(_.Fragment,null,_.createElement("p",null,"💿 Hey developer 👋"),_.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",_.createElement("code",{style:o},"ErrorBoundary")," or"," ",_.createElement("code",{style:o},"errorElement")," prop on your route.")),_.createElement(_.Fragment,null,_.createElement("h2",null,"Unexpected Application Error!"),_.createElement("h3",{style:{fontStyle:"italic"}},t),r?_.createElement("pre",{style:l},r):null,c)}var OS=_.createElement(RS,null),Zv=class extends _.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}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?e.error:t.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"){const r=NS(e.digest);r&&(e=r)}let t=e!==void 0?_.createElement(Gr.Provider,{value:this.props.routeContext},_.createElement(Tm.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?_.createElement(MS,{error:e},t):t}};Zv.contextType=Kv;var hh=new WeakMap;function MS({children:e,error:t}){let{basename:r}=_.useContext(Dr);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let a=ES(t.digest);if(a){let l=hh.get(t);if(l)throw l;let o=Mv(a.location,r);if(Ov&&!hh.get(t))if(o.isExternal||a.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:a.replace}));throw hh.set(t,c),c}return _.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function jS({routeContext:e,match:t,children:r}){let a=_.useContext(Qa);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),_.createElement(Gr.Provider,{value:e},r)}function DS(e,t=[],r){let a=r?.state;if(e==null){if(!a)return null;if(a.errors)e=a.matches;else if(t.length===0&&!a.initialized&&a.matches.length>0)e=a.matches;else return null}let l=e,o=a?.errors;if(o!=null){let g=l.findIndex(x=>x.route.id&&o?.[x.route.id]!==void 0);dt(g>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),l=l.slice(0,Math.min(l.length,g+1))}let c=!1,f=-1;if(r&&a){c=a.renderFallback;for(let g=0;g<l.length;g++){let x=l[g];if((x.route.HydrateFallback||x.route.hydrateFallbackElement)&&(f=g),x.route.id){let{loaderData:y,errors:v}=a,k=x.route.loader&&!y.hasOwnProperty(x.route.id)&&(!v||v[x.route.id]===void 0);if(x.route.lazy||k){r.isStatic&&(c=!0),f>=0?l=l.slice(0,f+1):l=[l[0]];break}}}}let h=r?.onError,m=a&&h?(g,x)=>{h(g,{location:a.location,params:a.matches?.[0]?.params??{},unstable_pattern:So(a.matches),errorInfo:x})}:void 0;return l.reduceRight((g,x,y)=>{let v,k=!1,E=null,S=null;a&&(v=o&&x.route.id?o[x.route.id]:void 0,E=x.route.errorElement||OS,c&&(f<0&&y===0?(Wv("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),k=!0,S=null):f===y&&(k=!0,S=x.route.hydrateFallbackElement||null)));let N=t.concat(l.slice(0,y+1)),O=()=>{let A;return v?A=E:k?A=S:x.route.Component?A=_.createElement(x.route.Component,null):x.route.element?A=x.route.element:A=g,_.createElement(jS,{match:x,routeContext:{outlet:g,matches:N,isDataRoute:a!=null},children:A})};return a&&(x.route.ErrorBoundary||x.route.errorElement||y===0)?_.createElement(Zv,{location:a.location,revalidation:a.revalidation,component:E,error:v,children:O(),routeContext:{outlet:null,matches:N,isDataRoute:!0},onError:m}):O()},null)}function Am(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function LS(e){let t=_.useContext(Qa);return dt(t,Am(e)),t}function IS(e){let t=_.useContext(zo);return dt(t,Am(e)),t}function BS(e){let t=_.useContext(Gr);return dt(t,Am(e)),t}function Rm(e){let t=BS(e),r=t.matches[t.matches.length-1];return dt(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function US(){return Rm("useRouteId")}function FS(){let e=_.useContext(Tm),t=IS("useRouteError"),r=Rm("useRouteError");return e!==void 0?e:t.errors?.[r]}function PS(){let{router:e}=LS("useNavigate"),t=Rm("useNavigate"),r=_.useRef(!1);return Xv(()=>{r.current=!0}),_.useCallback(async(l,o={})=>{wn(r.current,Qv),r.current&&(typeof l=="number"?await e.navigate(l):await e.navigate(l,{fromRouteId:t,...o}))},[e,t])}var zx={};function Wv(e,t,r){!t&&!zx[e]&&(zx[e]=!0,wn(!1,r))}var Cx={};function Tx(e,t){!e&&!Cx[t]&&(Cx[t]=!0,console.warn(t))}var HS="useOptimistic",Ax=nN[HS],qS=()=>{};function $S(e){return Ax?Ax(e):[e,qS]}function GS(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&wn(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:_.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&wn(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:_.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&wn(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:_.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var KS=["HydrateFallback","hydrateFallbackElement"],VS=class{constructor(){this.status="pending",this.promise=new Promise((e,t)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",e(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",t(r))}})}};function YS({router:e,flushSync:t,onError:r,unstable_useTransitions:a}){a=vS()||a;let[o,c]=_.useState(e.state),[f,h]=$S(o),[m,g]=_.useState(),[x,y]=_.useState({isTransitioning:!1}),[v,k]=_.useState(),[E,S]=_.useState(),[N,O]=_.useState(),A=_.useRef(new Map),P=_.useCallback((z,{deletedFetchers:W,newErrors:U,flushSync:ee,viewTransitionOpts:te})=>{U&&r&&Object.values(U).forEach(se=>r(se,{location:z.location,params:z.matches[0]?.params??{},unstable_pattern:So(z.matches)})),z.fetchers.forEach((se,X)=>{se.data!==void 0&&A.current.set(X,se.data)}),W.forEach(se=>A.current.delete(se)),Tx(ee===!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 _e=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(Tx(te==null||_e,"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."),!te||!_e){t&&ee?t(()=>c(z)):a===!1?c(z):_.startTransition(()=>{a===!0&&h(se=>Rx(se,z)),c(z)});return}if(t&&ee){t(()=>{E&&(v?.resolve(),E.skipTransition()),y({isTransitioning:!0,flushSync:!0,currentLocation:te.currentLocation,nextLocation:te.nextLocation})});let se=e.window.document.startViewTransition(()=>{t(()=>c(z))});se.finished.finally(()=>{t(()=>{k(void 0),S(void 0),g(void 0),y({isTransitioning:!1})})}),t(()=>S(se));return}E?(v?.resolve(),E.skipTransition(),O({state:z,currentLocation:te.currentLocation,nextLocation:te.nextLocation})):(g(z),y({isTransitioning:!0,flushSync:!1,currentLocation:te.currentLocation,nextLocation:te.nextLocation}))},[e.window,t,E,v,a,h,r]);_.useLayoutEffect(()=>e.subscribe(P),[e,P]),_.useEffect(()=>{x.isTransitioning&&!x.flushSync&&k(new VS)},[x]),_.useEffect(()=>{if(v&&m&&e.window){let z=m,W=v.promise,U=e.window.document.startViewTransition(async()=>{a===!1?c(z):_.startTransition(()=>{a===!0&&h(ee=>Rx(ee,z)),c(z)}),await W});U.finished.finally(()=>{k(void 0),S(void 0),g(void 0),y({isTransitioning:!1})}),S(U)}},[m,v,e.window,a,h]),_.useEffect(()=>{v&&m&&f.location.key===m.location.key&&v.resolve()},[v,E,f.location,m]),_.useEffect(()=>{!x.isTransitioning&&N&&(g(N.state),y({isTransitioning:!0,flushSync:!1,currentLocation:N.currentLocation,nextLocation:N.nextLocation}),O(void 0))},[x.isTransitioning,N]);let $=_.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:z=>e.navigate(z),push:(z,W,U)=>e.navigate(z,{state:W,preventScrollReset:U?.preventScrollReset}),replace:(z,W,U)=>e.navigate(z,{replace:!0,state:W,preventScrollReset:U?.preventScrollReset})}),[e]),M=e.basename||"/",K=_.useMemo(()=>({router:e,navigator:$,static:!1,basename:M,onError:r}),[e,$,M,r]);return _.createElement(_.Fragment,null,_.createElement(Qa.Provider,{value:K},_.createElement(zo.Provider,{value:f},_.createElement(Vv.Provider,{value:A.current},_.createElement(Cm.Provider,{value:x},_.createElement(WS,{basename:M,location:f.location,navigationType:f.historyAction,navigator:$,unstable_useTransitions:a},_.createElement(QS,{routes:e.routes,future:e.future,state:f,isStatic:!1,onError:r})))))),null)}function Rx(e,t){return{...e,navigation:t.navigation.state!=="idle"?t.navigation:e.navigation,revalidation:t.revalidation!=="idle"?t.revalidation:e.revalidation,actionData:t.navigation.state!=="submitting"?t.actionData:e.actionData,fetchers:t.fetchers}}var QS=_.memo(XS);function XS({routes:e,future:t,state:r,isStatic:a,onError:l}){return AS(e,void 0,{state:r,isStatic:a,onError:l})}function ZS(e){return TS(e.context)}function WS({basename:e="/",children:t=null,location:r,navigationType:a="POP",navigator:l,static:o=!1,unstable_useTransitions:c}){dt(!Co(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let f=e.replace(/^\/*/,"/"),h=_.useMemo(()=>({basename:f,navigator:l,static:o,unstable_useTransitions:c,future:{}}),[f,l,o,c]);typeof r=="string"&&(r=Mi(r));let{pathname:m="/",search:g="",hash:x="",state:y=null,key:v="default",unstable_mask:k}=r,E=_.useMemo(()=>{let S=Or(m,f);return S==null?null:{location:{pathname:S,search:g,hash:x,state:y,key:v,unstable_mask:k},navigationType:a}},[f,m,g,x,y,v,a,k]);return wn(E!=null,`<Router basename="${f}"> is not able to match the URL "${m}${g}${x}" because it does not start with the basename, so the <Router> won't render anything.`),E==null?null:_.createElement(Dr.Provider,{value:h},_.createElement(Fu.Provider,{children:t,value:E}))}var mu="get",pu="application/x-www-form-urlencoded";function qu(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function JS(e){return qu(e)&&e.tagName.toLowerCase()==="button"}function ez(e){return qu(e)&&e.tagName.toLowerCase()==="form"}function tz(e){return qu(e)&&e.tagName.toLowerCase()==="input"}function nz(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function rz(e,t){return e.button===0&&(!t||t==="_self")&&!nz(e)}var Zc=null;function iz(){if(Zc===null)try{new FormData(document.createElement("form"),0),Zc=!1}catch{Zc=!0}return Zc}var az=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function mh(e){return e!=null&&!az.has(e)?(wn(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${pu}"`),null):e}function sz(e,t){let r,a,l,o,c;if(ez(e)){let f=e.getAttribute("action");a=f?Or(f,t):null,r=e.getAttribute("method")||mu,l=mh(e.getAttribute("enctype"))||pu,o=new FormData(e)}else if(JS(e)||tz(e)&&(e.type==="submit"||e.type==="image")){let f=e.form;if(f==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let h=e.getAttribute("formaction")||f.getAttribute("action");if(a=h?Or(h,t):null,r=e.getAttribute("formmethod")||f.getAttribute("method")||mu,l=mh(e.getAttribute("formenctype"))||mh(f.getAttribute("enctype"))||pu,o=new FormData(f,e),!iz()){let{name:m,type:g,value:x}=e;if(g==="image"){let y=m?`${m}.`:"";o.append(`${y}x`,"0"),o.append(`${y}y`,"0")}else m&&o.append(m,x)}}else{if(qu(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=mu,a=null,l=pu,c=e}return o&&l==="text/plain"&&(c=o,o=void 0),{action:a,method:r.toLowerCase(),encType:l,formData:o,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Om(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function lz(e,t,r,a){let l=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r?l.pathname.endsWith("/")?l.pathname=`${l.pathname}_.${a}`:l.pathname=`${l.pathname}.${a}`:l.pathname==="/"?l.pathname=`_root.${a}`:t&&Or(l.pathname,t)==="/"?l.pathname=`${t.replace(/\/$/,"")}/_root.${a}`:l.pathname=`${l.pathname.replace(/\/$/,"")}.${a}`,l}async function oz(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function cz(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 uz(e,t,r){let a=await Promise.all(e.map(async l=>{let o=t.routes[l.route.id];if(o){let c=await oz(o,r);return c.links?c.links():[]}return[]}));return mz(a.flat(1).filter(cz).filter(l=>l.rel==="stylesheet"||l.rel==="preload").map(l=>l.rel==="stylesheet"?{...l,rel:"prefetch",as:"style"}:{...l,rel:"prefetch"}))}function Ox(e,t,r,a,l,o){let c=(h,m)=>r[m]?h.route.id!==r[m].route.id:!0,f=(h,m)=>r[m].pathname!==h.pathname||r[m].route.path?.endsWith("*")&&r[m].params["*"]!==h.params["*"];return o==="assets"?t.filter((h,m)=>c(h,m)||f(h,m)):o==="data"?t.filter((h,m)=>{let g=a.routes[h.route.id];if(!g||!g.hasLoader)return!1;if(c(h,m)||f(h,m))return!0;if(h.route.shouldRevalidate){let x=h.route.shouldRevalidate({currentUrl:new URL(l.pathname+l.search+l.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:h.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function dz(e,t,{includeHydrateFallback:r}={}){return fz(e.map(a=>{let l=t.routes[a.route.id];if(!l)return[];let o=[l.module];return l.clientActionModule&&(o=o.concat(l.clientActionModule)),l.clientLoaderModule&&(o=o.concat(l.clientLoaderModule)),r&&l.hydrateFallbackModule&&(o=o.concat(l.hydrateFallbackModule)),l.imports&&(o=o.concat(l.imports)),o}).flat(1))}function fz(e){return[...new Set(e)]}function hz(e){let t={},r=Object.keys(e).sort();for(let a of r)t[a]=e[a];return t}function mz(e,t){let r=new Set;return new Set(t),e.reduce((a,l)=>{let o=JSON.stringify(hz(l));return r.has(o)||(r.add(o),a.push({key:o,link:l})),a},[])}function Jv(){let e=_.useContext(Qa);return Om(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function pz(){let e=_.useContext(zo);return Om(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Mm=_.createContext(void 0);Mm.displayName="FrameworkContext";function e1(){let e=_.useContext(Mm);return Om(e,"You must render this element inside a <HydratedRouter> element"),e}function gz(e,t){let r=_.useContext(Mm),[a,l]=_.useState(!1),[o,c]=_.useState(!1),{onFocus:f,onBlur:h,onMouseEnter:m,onMouseLeave:g,onTouchStart:x}=t,y=_.useRef(null);_.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let E=N=>{N.forEach(O=>{c(O.isIntersecting)})},S=new IntersectionObserver(E,{threshold:.5});return y.current&&S.observe(y.current),()=>{S.disconnect()}}},[e]),_.useEffect(()=>{if(a){let E=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(E)}}},[a]);let v=()=>{l(!0)},k=()=>{l(!1),c(!1)};return r?e!=="intent"?[o,y,{}]:[o,y,{onFocus:Yl(f,v),onBlur:Yl(h,k),onMouseEnter:Yl(m,v),onMouseLeave:Yl(g,k),onTouchStart:Yl(x,v)}]:[!1,y,{}]}function Yl(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function bz({page:e,...t}){let{router:r}=Jv(),a=_.useMemo(()=>da(r.routes,e,r.basename),[r.routes,e,r.basename]);return a?_.createElement(yz,{page:e,matches:a,...t}):null}function xz(e){let{manifest:t,routeModules:r}=e1(),[a,l]=_.useState([]);return _.useEffect(()=>{let o=!1;return uz(e,t,r).then(c=>{o||l(c)}),()=>{o=!0}},[e,t,r]),a}function yz({page:e,matches:t,...r}){let a=ai(),{future:l,manifest:o,routeModules:c}=e1(),{basename:f}=Jv(),{loaderData:h,matches:m}=pz(),g=_.useMemo(()=>Ox(e,t,m,o,a,"data"),[e,t,m,o,a]),x=_.useMemo(()=>Ox(e,t,m,o,a,"assets"),[e,t,m,o,a]),y=_.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let E=new Set,S=!1;if(t.forEach(O=>{let A=o.routes[O.route.id];!A||!A.hasLoader||(!g.some(P=>P.route.id===O.route.id)&&O.route.id in h&&c[O.route.id]?.shouldRevalidate||A.hasClientLoader?S=!0:E.add(O.route.id))}),E.size===0)return[];let N=lz(e,f,l.unstable_trailingSlashAwareDataRequests,"data");return S&&E.size>0&&N.searchParams.set("_routes",t.filter(O=>E.has(O.route.id)).map(O=>O.route.id).join(",")),[N.pathname+N.search]},[f,l.unstable_trailingSlashAwareDataRequests,h,a,o,g,t,e,c]),v=_.useMemo(()=>dz(x,o),[x,o]),k=xz(x);return _.createElement(_.Fragment,null,y.map(E=>_.createElement("link",{key:E,rel:"prefetch",as:"fetch",href:E,...r})),v.map(E=>_.createElement("link",{key:E,rel:"modulepreload",href:E,...r})),k.map(({key:E,link:S})=>_.createElement("link",{key:E,nonce:r.nonce,...S,crossOrigin:S.crossOrigin??r.crossOrigin})))}function vz(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var kz=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{kz&&(window.__reactRouterVersion="7.13.1")}catch{}function wz(e,t){return QN({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:dN({window:t?.window}),hydrationData:_z(),routes:e,mapRouteProperties:GS,hydrationRouteProperties:KS,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,unstable_instrumentations:t?.unstable_instrumentations}).initialize()}function _z(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:Ez(e.errors)}),e}function Ez(e){if(!e)return null;let t=Object.entries(e),r={};for(let[a,l]of t)if(l&&l.__type==="RouteErrorResponse")r[a]=new No(l.status,l.statusText,l.data,l.internal===!0);else if(l&&l.__type==="Error"){if(l.__subType){let o=window[l.__subType];if(typeof o=="function")try{let c=new o(l.message);c.stack="",r[a]=c}catch{}}if(r[a]==null){let o=new Error(l.message);o.stack="",r[a]=o}}else r[a]=l;return r}var t1=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,In=_.forwardRef(function({onClick:t,discover:r="render",prefetch:a="none",relative:l,reloadDocument:o,replace:c,unstable_mask:f,state:h,target:m,to:g,preventScrollReset:x,viewTransition:y,unstable_defaultShouldRevalidate:v,...k},E){let{basename:S,navigator:N,unstable_useTransitions:O}=_.useContext(Dr),A=typeof g=="string"&&t1.test(g),P=Mv(g,S);g=P.to;let $=SS(g,{relative:l}),M=ai(),K=null;if(f){let X=Uu(f,[],M.unstable_mask?M.unstable_mask.pathname:"/",!0);S!=="/"&&(X.pathname=X.pathname==="/"?S:Hr([S,X.pathname])),K=N.createHref(X)}let[z,W,U]=gz(a,k),ee=Cz(g,{replace:c,unstable_mask:f,state:h,target:m,preventScrollReset:x,relative:l,viewTransition:y,unstable_defaultShouldRevalidate:v,unstable_useTransitions:O});function te(X){t&&t(X),X.defaultPrevented||ee(X)}let _e=!(P.isExternal||o),se=_.createElement("a",{...k,...U,href:(_e?K:void 0)||P.absoluteURL||$,onClick:_e?te:t,ref:vz(E,W),target:m,"data-discover":!A&&r==="render"?"true":void 0});return z&&!A?_.createElement(_.Fragment,null,se,_.createElement(bz,{page:$})):se});In.displayName="Link";var Nz=_.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:a="",end:l=!1,style:o,to:c,viewTransition:f,children:h,...m},g){let x=To(c,{relative:m.relative}),y=ai(),v=_.useContext(zo),{navigator:k,basename:E}=_.useContext(Dr),S=v!=null&&Mz(x)&&f===!0,N=k.encodeLocation?k.encodeLocation(x).pathname:x.pathname,O=y.pathname,A=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;r||(O=O.toLowerCase(),A=A?A.toLowerCase():null,N=N.toLowerCase()),A&&E&&(A=Or(A,E)||A);const P=N!=="/"&&N.endsWith("/")?N.length-1:N.length;let $=O===N||!l&&O.startsWith(N)&&O.charAt(P)==="/",M=A!=null&&(A===N||!l&&A.startsWith(N)&&A.charAt(N.length)==="/"),K={isActive:$,isPending:M,isTransitioning:S},z=$?t:void 0,W;typeof a=="function"?W=a(K):W=[a,$?"active":null,M?"pending":null,S?"transitioning":null].filter(Boolean).join(" ");let U=typeof o=="function"?o(K):o;return _.createElement(In,{...m,"aria-current":z,className:W,ref:g,style:U,to:c,viewTransition:f},typeof h=="function"?h(K):h)});Nz.displayName="NavLink";var Sz=_.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:a,replace:l,state:o,method:c=mu,action:f,onSubmit:h,relative:m,preventScrollReset:g,viewTransition:x,unstable_defaultShouldRevalidate:y,...v},k)=>{let{unstable_useTransitions:E}=_.useContext(Dr),S=Rz(),N=Oz(f,{relative:m}),O=c.toLowerCase()==="get"?"get":"post",A=typeof f=="string"&&t1.test(f),P=$=>{if(h&&h($),$.defaultPrevented)return;$.preventDefault();let M=$.nativeEvent.submitter,K=M?.getAttribute("formmethod")||c,z=()=>S(M||$.currentTarget,{fetcherKey:t,method:K,navigate:r,replace:l,state:o,relative:m,preventScrollReset:g,viewTransition:x,unstable_defaultShouldRevalidate:y});E&&r!==!1?_.startTransition(()=>z()):z()};return _.createElement("form",{ref:k,method:O,action:N,onSubmit:a?h:P,...v,"data-discover":!A&&e==="render"?"true":void 0})});Sz.displayName="Form";function zz(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function n1(e){let t=_.useContext(Qa);return dt(t,zz(e)),t}function Cz(e,{target:t,replace:r,unstable_mask:a,state:l,preventScrollReset:o,relative:c,viewTransition:f,unstable_defaultShouldRevalidate:h,unstable_useTransitions:m}={}){let g=Pu(),x=ai(),y=To(e,{relative:c});return _.useCallback(v=>{if(rz(v,t)){v.preventDefault();let k=r!==void 0?r:ti(x)===ti(y),E=()=>g(e,{replace:k,unstable_mask:a,state:l,preventScrollReset:o,relative:c,viewTransition:f,unstable_defaultShouldRevalidate:h});m?_.startTransition(()=>E()):E()}},[x,g,y,r,a,l,t,e,o,c,f,h,m])}var Tz=0,Az=()=>`__${String(++Tz)}__`;function Rz(){let{router:e}=n1("useSubmit"),{basename:t}=_.useContext(Dr),r=US(),a=e.fetch,l=e.navigate;return _.useCallback(async(o,c={})=>{let{action:f,method:h,encType:m,formData:g,body:x}=sz(o,t);if(c.navigate===!1){let y=c.fetcherKey||Az();await a(y,r,c.action||f,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:g,body:x,formMethod:c.method||h,formEncType:c.encType||m,flushSync:c.flushSync})}else await l(c.action||f,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:g,body:x,formMethod:c.method||h,formEncType:c.encType||m,replace:c.replace,state:c.state,fromRouteId:r,flushSync:c.flushSync,viewTransition:c.viewTransition})},[a,l,t,r])}function Oz(e,{relative:t}={}){let{basename:r}=_.useContext(Dr),a=_.useContext(Gr);dt(a,"useFormAction must be used inside a RouteContext");let[l]=a.matches.slice(-1),o={...To(e||".",{relative:t})},c=ai();if(e==null){o.search=c.search;let f=new URLSearchParams(o.search),h=f.getAll("index");if(h.some(g=>g==="")){f.delete("index"),h.filter(x=>x).forEach(x=>f.append("index",x));let g=f.toString();o.search=g?`?${g}`:""}}return(!e||e===".")&&l.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(o.pathname=o.pathname==="/"?r:Hr([r,o.pathname])),ti(o)}function Mz(e,{relative:t}={}){let r=_.useContext(Cm);dt(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=n1("useViewTransitionState"),l=To(e,{relative:t});if(!r.isTransitioning)return!1;let o=Or(r.currentLocation.pathname,a)||r.currentLocation.pathname,c=Or(r.nextLocation.pathname,a)||r.nextLocation.pathname;return Nu(l.pathname,c)!=null||Nu(l.pathname,o)!=null}var r1=Nv();function jz(e){return _.createElement(YS,{flushSync:r1.flushSync,...e})}const i1=_.createContext(null),a1="ocr-dashboard-theme",ph=["system","light","dark"];function Dz(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Lz(){try{const e=localStorage.getItem(a1);if(e==="light"||e==="dark"||e==="system")return e}catch{}return"system"}function Iz({children:e}){const[t,r]=_.useState(Lz),[a,l]=_.useState(Dz);_.useEffect(()=>{const h=window.matchMedia("(prefers-color-scheme: dark)"),m=g=>{l(g.matches?"dark":"light")};return h.addEventListener("change",m),()=>h.removeEventListener("change",m)},[]);const o=t==="system"?a:t;_.useEffect(()=>{const h=document.documentElement;h.classList.remove("light","dark"),h.classList.add(o);const m=o==="dark"?"/favicon-light.ico":"/favicon-dark.ico",g=document.querySelector("link#favicon");g&&(g.href=m)},[o]),_.useEffect(()=>{try{localStorage.setItem(a1,t)}catch{}},[t]);const c=_.useCallback(()=>{r(h=>{const m=ph.indexOf(h);return ph[(m+1)%ph.length]})},[]),f=_.useMemo(()=>({mode:t,resolved:o,cycle:c,theme:t,toggleTheme:c}),[t,o,c]);return d.jsx(i1,{value:f,children:e})}function s1(){const e=_.useContext(i1);if(!e)throw new Error("useTheme must be used within ThemeProvider");return e}const ni=Object.create(null);ni.open="0";ni.close="1";ni.ping="2";ni.pong="3";ni.message="4";ni.upgrade="5";ni.noop="6";const gu=Object.create(null);Object.keys(ni).forEach(e=>{gu[ni[e]]=e});const Xh={type:"error",data:"parser error"},l1=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",o1=typeof ArrayBuffer=="function",c1=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,jm=({type:e,data:t},r,a)=>l1&&t instanceof Blob?r?a(t):Mx(t,a):o1&&(t instanceof ArrayBuffer||c1(t))?r?a(t):Mx(new Blob([t]),a):a(ni[e]+(t||"")),Mx=(e,t)=>{const r=new FileReader;return r.onload=function(){const a=r.result.split(",")[1];t("b"+(a||""))},r.readAsDataURL(e)};function jx(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let gh;function Bz(e,t){if(l1&&e.data instanceof Blob)return e.data.arrayBuffer().then(jx).then(t);if(o1&&(e.data instanceof ArrayBuffer||c1(e.data)))return t(jx(e.data));jm(e,!1,r=>{gh||(gh=new TextEncoder),t(gh.encode(r))})}const Dx="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",io=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<Dx.length;e++)io[Dx.charCodeAt(e)]=e;const Uz=e=>{let t=e.length*.75,r=e.length,a,l=0,o,c,f,h;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const m=new ArrayBuffer(t),g=new Uint8Array(m);for(a=0;a<r;a+=4)o=io[e.charCodeAt(a)],c=io[e.charCodeAt(a+1)],f=io[e.charCodeAt(a+2)],h=io[e.charCodeAt(a+3)],g[l++]=o<<2|c>>4,g[l++]=(c&15)<<4|f>>2,g[l++]=(f&3)<<6|h&63;return m},Fz=typeof ArrayBuffer=="function",Dm=(e,t)=>{if(typeof e!="string")return{type:"message",data:u1(e,t)};const r=e.charAt(0);return r==="b"?{type:"message",data:Pz(e.substring(1),t)}:gu[r]?e.length>1?{type:gu[r],data:e.substring(1)}:{type:gu[r]}:Xh},Pz=(e,t)=>{if(Fz){const r=Uz(e);return u1(r,t)}else return{base64:!0,data:e}},u1=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},d1="",Hz=(e,t)=>{const r=e.length,a=new Array(r);let l=0;e.forEach((o,c)=>{jm(o,!1,f=>{a[c]=f,++l===r&&t(a.join(d1))})})},qz=(e,t)=>{const r=e.split(d1),a=[];for(let l=0;l<r.length;l++){const o=Dm(r[l],t);if(a.push(o),o.type==="error")break}return a};function $z(){return new TransformStream({transform(e,t){Bz(e,r=>{const a=r.length;let l;if(a<126)l=new Uint8Array(1),new DataView(l.buffer).setUint8(0,a);else if(a<65536){l=new Uint8Array(3);const o=new DataView(l.buffer);o.setUint8(0,126),o.setUint16(1,a)}else{l=new Uint8Array(9);const o=new DataView(l.buffer);o.setUint8(0,127),o.setBigUint64(1,BigInt(a))}e.data&&typeof e.data!="string"&&(l[0]|=128),t.enqueue(l),t.enqueue(r)})}})}let bh;function Wc(e){return e.reduce((t,r)=>t+r.length,0)}function Jc(e,t){if(e[0].length===t)return e.shift();const r=new Uint8Array(t);let a=0;for(let l=0;l<t;l++)r[l]=e[0][a++],a===e[0].length&&(e.shift(),a=0);return e.length&&a<e[0].length&&(e[0]=e[0].slice(a)),r}function Gz(e,t){bh||(bh=new TextDecoder);const r=[];let a=0,l=-1,o=!1;return new TransformStream({transform(c,f){for(r.push(c);;){if(a===0){if(Wc(r)<1)break;const h=Jc(r,1);o=(h[0]&128)===128,l=h[0]&127,l<126?a=3:l===126?a=1:a=2}else if(a===1){if(Wc(r)<2)break;const h=Jc(r,2);l=new DataView(h.buffer,h.byteOffset,h.length).getUint16(0),a=3}else if(a===2){if(Wc(r)<8)break;const h=Jc(r,8),m=new DataView(h.buffer,h.byteOffset,h.length),g=m.getUint32(0);if(g>Math.pow(2,21)-1){f.enqueue(Xh);break}l=g*Math.pow(2,32)+m.getUint32(4),a=3}else{if(Wc(r)<l)break;const h=Jc(r,l);f.enqueue(Dm(o?h:bh.decode(h),t)),a=0}if(l===0||l>e){f.enqueue(Xh);break}}}})}const f1=4;function kn(e){if(e)return Kz(e)}function Kz(e){for(var t in kn.prototype)e[t]=kn.prototype[t];return e}kn.prototype.on=kn.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};kn.prototype.once=function(e,t){function r(){this.off(e,r),t.apply(this,arguments)}return r.fn=t,this.on(e,r),this};kn.prototype.off=kn.prototype.removeListener=kn.prototype.removeAllListeners=kn.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+e];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var a,l=0;l<r.length;l++)if(a=r[l],a===t||a.fn===t){r.splice(l,1);break}return r.length===0&&delete this._callbacks["$"+e],this};kn.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),r=this._callbacks["$"+e],a=1;a<arguments.length;a++)t[a-1]=arguments[a];if(r){r=r.slice(0);for(var a=0,l=r.length;a<l;++a)r[a].apply(this,t)}return this};kn.prototype.emitReserved=kn.prototype.emit;kn.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};kn.prototype.hasListeners=function(e){return!!this.listeners(e).length};const $u=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,r)=>r(t,0),Ar=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Vz="arraybuffer";function h1(e,...t){return t.reduce((r,a)=>(e.hasOwnProperty(a)&&(r[a]=e[a]),r),{})}const Yz=Ar.setTimeout,Qz=Ar.clearTimeout;function Gu(e,t){t.useNativeTimers?(e.setTimeoutFn=Yz.bind(Ar),e.clearTimeoutFn=Qz.bind(Ar)):(e.setTimeoutFn=Ar.setTimeout.bind(Ar),e.clearTimeoutFn=Ar.clearTimeout.bind(Ar))}const Xz=1.33;function Zz(e){return typeof e=="string"?Wz(e):Math.ceil((e.byteLength||e.size)*Xz)}function Wz(e){let t=0,r=0;for(let a=0,l=e.length;a<l;a++)t=e.charCodeAt(a),t<128?r+=1:t<2048?r+=2:t<55296||t>=57344?r+=3:(a++,r+=4);return r}function m1(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Jz(e){let t="";for(let r in e)e.hasOwnProperty(r)&&(t.length&&(t+="&"),t+=encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t}function eC(e){let t={},r=e.split("&");for(let a=0,l=r.length;a<l;a++){let o=r[a].split("=");t[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return t}class tC extends Error{constructor(t,r,a){super(t),this.description=r,this.context=a,this.type="TransportError"}}class Lm extends kn{constructor(t){super(),this.writable=!1,Gu(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,r,a){return super.emitReserved("error",new tC(t,r,a)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const r=Dm(t,this.socket.binaryType);this.onPacket(r)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,r={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(r)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const r=Jz(t);return r.length?"?"+r:""}}class nC extends Lm{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const r=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let a=0;this._polling&&(a++,this.once("pollComplete",function(){--a||r()})),this.writable||(a++,this.once("drain",function(){--a||r()}))}else r()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const r=a=>{if(this.readyState==="opening"&&a.type==="open"&&this.onOpen(),a.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(a)};qz(t,this.socket.binaryType).forEach(r),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,Hz(t,r=>{this.doWrite(r,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",r=this.query||{};return this.opts.timestampRequests!==!1&&(r[this.opts.timestampParam]=m1()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(t,r)}}let p1=!1;try{p1=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const rC=p1;function iC(){}class aC extends nC{constructor(t){if(super(t),typeof location<"u"){const r=location.protocol==="https:";let a=location.port;a||(a=r?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||a!==t.port}}doWrite(t,r){const a=this.request({method:"POST",data:t});a.on("success",r),a.on("error",(l,o)=>{this.onError("xhr post error",l,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(r,a)=>{this.onError("xhr poll error",r,a)}),this.pollXhr=t}}let Hs=class bu extends kn{constructor(t,r,a){super(),this.createRequest=t,Gu(this,a),this._opts=a,this._method=a.method||"GET",this._uri=r,this._data=a.data!==void 0?a.data:null,this._create()}_create(){var t;const r=h1(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this._opts.xd;const a=this._xhr=this.createRequest(r);try{a.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){a.setDisableHeaderCheck&&a.setDisableHeaderCheck(!0);for(let l in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(l)&&a.setRequestHeader(l,this._opts.extraHeaders[l])}}catch{}if(this._method==="POST")try{a.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{a.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(a),"withCredentials"in a&&(a.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(a.timeout=this._opts.requestTimeout),a.onreadystatechange=()=>{var l;a.readyState===3&&((l=this._opts.cookieJar)===null||l===void 0||l.parseCookies(a.getResponseHeader("set-cookie"))),a.readyState===4&&(a.status===200||a.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof a.status=="number"?a.status:0)},0))},a.send(this._data)}catch(l){this.setTimeoutFn(()=>{this._onError(l)},0);return}typeof document<"u"&&(this._index=bu.requestsCount++,bu.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=iC,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete bu.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};Hs.requestsCount=0;Hs.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Lx);else if(typeof addEventListener=="function"){const e="onpagehide"in Ar?"pagehide":"unload";addEventListener(e,Lx,!1)}}function Lx(){for(let e in Hs.requests)Hs.requests.hasOwnProperty(e)&&Hs.requests[e].abort()}const sC=(function(){const e=g1({xdomain:!1});return e&&e.responseType!==null})();class lC extends aC{constructor(t){super(t);const r=t&&t.forceBase64;this.supportsBinary=sC&&!r}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Hs(g1,this.uri(),t)}}function g1(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||rC))return new XMLHttpRequest}catch{}if(!t)try{return new Ar[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const b1=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class oC extends Lm{get name(){return"websocket"}doOpen(){const t=this.uri(),r=this.opts.protocols,a=b1?{}:h1(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(a.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,r,a)}catch(l){return this.emitReserved("error",l)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let r=0;r<t.length;r++){const a=t[r],l=r===t.length-1;jm(a,this.supportsBinary,o=>{try{this.doWrite(a,o)}catch{}l&&$u(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",r=this.query||{};return this.opts.timestampRequests&&(r[this.opts.timestampParam]=m1()),this.supportsBinary||(r.b64=1),this.createUri(t,r)}}const xh=Ar.WebSocket||Ar.MozWebSocket;class cC extends oC{createSocket(t,r,a){return b1?new xh(t,r,a):r?new xh(t,r):new xh(t)}doWrite(t,r){this.ws.send(r)}}class uC extends Lm{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const r=Gz(Number.MAX_SAFE_INTEGER,this.socket.binaryType),a=t.readable.pipeThrough(r).getReader(),l=$z();l.readable.pipeTo(t.writable),this._writer=l.writable.getWriter();const o=()=>{a.read().then(({done:f,value:h})=>{f||(this.onPacket(h),o())}).catch(f=>{})};o();const c={type:"open"};this.query.sid&&(c.data=`{"sid":"${this.query.sid}"}`),this._writer.write(c).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let r=0;r<t.length;r++){const a=t[r],l=r===t.length-1;this._writer.write(a).then(()=>{l&&$u(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const dC={websocket:cC,webtransport:uC,polling:lC},fC=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,hC=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Zh(e){if(e.length>8e3)throw"URI too long";const t=e,r=e.indexOf("["),a=e.indexOf("]");r!=-1&&a!=-1&&(e=e.substring(0,r)+e.substring(r,a).replace(/:/g,";")+e.substring(a,e.length));let l=fC.exec(e||""),o={},c=14;for(;c--;)o[hC[c]]=l[c]||"";return r!=-1&&a!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=mC(o,o.path),o.queryKey=pC(o,o.query),o}function mC(e,t){const r=/\/{2,9}/g,a=t.replace(r,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&a.splice(0,1),t.slice(-1)=="/"&&a.splice(a.length-1,1),a}function pC(e,t){const r={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(a,l,o){l&&(r[l]=o)}),r}const Wh=typeof addEventListener=="function"&&typeof removeEventListener=="function",xu=[];Wh&&addEventListener("offline",()=>{xu.forEach(e=>e())},!1);class ga extends kn{constructor(t,r){if(super(),this.binaryType=Vz,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(r=t,t=null),t){const a=Zh(t);r.hostname=a.host,r.secure=a.protocol==="https"||a.protocol==="wss",r.port=a.port,a.query&&(r.query=a.query)}else r.host&&(r.hostname=Zh(r.host).host);Gu(this,r),this.secure=r.secure!=null?r.secure:typeof location<"u"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=r.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},r.transports.forEach(a=>{const l=a.prototype.name;this.transports.push(l),this._transportsByName[l]=a}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},r),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=eC(this.opts.query)),Wh&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},xu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const r=Object.assign({},this.opts.query);r.EIO=f1,r.transport=t,this.id&&(r.sid=this.id);const a=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](a)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&ga.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const r=this.createTransport(t);r.open(),this.setTransport(r)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",r=>this._onClose("transport close",r))}onOpen(){this.readyState="open",ga.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const r=new Error("server error");r.code=t.data,this._onError(r);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let r=1;for(let a=0;a<this.writeBuffer.length;a++){const l=this.writeBuffer[a].data;if(l&&(r+=Zz(l)),a>0&&r>this._maxPayload)return this.writeBuffer.slice(0,a);r+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,$u(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,r,a){return this._sendPacket("message",t,r,a),this}send(t,r,a){return this._sendPacket("message",t,r,a),this}_sendPacket(t,r,a,l){if(typeof r=="function"&&(l=r,r=void 0),typeof a=="function"&&(l=a,a=null),this.readyState==="closing"||this.readyState==="closed")return;a=a||{},a.compress=a.compress!==!1;const o={type:t,data:r,options:a};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),l&&this.once("flush",l),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),t()},a=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?a():t()}):this.upgrading?a():t()),this}_onError(t){if(ga.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Wh&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const a=xu.indexOf(this._offlineEventListener);a!==-1&&xu.splice(a,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,r),this.writeBuffer=[],this._prevBufferLen=0}}}ga.protocol=f1;class gC extends ga{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let r=this.createTransport(t),a=!1;ga.priorWebsocketSuccess=!1;const l=()=>{a||(r.send([{type:"ping",data:"probe"}]),r.once("packet",x=>{if(!a)if(x.type==="pong"&&x.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;ga.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{a||this.readyState!=="closed"&&(g(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{const y=new Error("probe error");y.transport=r.name,this.emitReserved("upgradeError",y)}}))};function o(){a||(a=!0,g(),r.close(),r=null)}const c=x=>{const y=new Error("probe error: "+x);y.transport=r.name,o(),this.emitReserved("upgradeError",y)};function f(){c("transport closed")}function h(){c("socket closed")}function m(x){r&&x.name!==r.name&&o()}const g=()=>{r.removeListener("open",l),r.removeListener("error",c),r.removeListener("close",f),this.off("close",h),this.off("upgrading",m)};r.once("open",l),r.once("error",c),r.once("close",f),this.once("close",h),this.once("upgrading",m),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{a||r.open()},200):r.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const r=[];for(let a=0;a<t.length;a++)~this.transports.indexOf(t[a])&&r.push(t[a]);return r}}let bC=class extends gC{constructor(t,r={}){const a=typeof t=="object"?t:r;(!a.transports||a.transports&&typeof a.transports[0]=="string")&&(a.transports=(a.transports||["polling","websocket","webtransport"]).map(l=>dC[l]).filter(l=>!!l)),super(t,a)}};function xC(e,t="",r){let a=e;r=r||typeof location<"u"&&location,e==null&&(e=r.protocol+"//"+r.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=r.protocol+e:e=r.host+e),/^(https?|wss?):\/\//.test(e)||(typeof r<"u"?e=r.protocol+"//"+e:e="https://"+e),a=Zh(e)),a.port||(/^(http|ws)$/.test(a.protocol)?a.port="80":/^(http|ws)s$/.test(a.protocol)&&(a.port="443")),a.path=a.path||"/";const o=a.host.indexOf(":")!==-1?"["+a.host+"]":a.host;return a.id=a.protocol+"://"+o+":"+a.port+t,a.href=a.protocol+"://"+o+(r&&r.port===a.port?"":":"+a.port),a}const yC=typeof ArrayBuffer=="function",vC=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,x1=Object.prototype.toString,kC=typeof Blob=="function"||typeof Blob<"u"&&x1.call(Blob)==="[object BlobConstructor]",wC=typeof File=="function"||typeof File<"u"&&x1.call(File)==="[object FileConstructor]";function Im(e){return yC&&(e instanceof ArrayBuffer||vC(e))||kC&&e instanceof Blob||wC&&e instanceof File}function yu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let r=0,a=e.length;r<a;r++)if(yu(e[r]))return!0;return!1}if(Im(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return yu(e.toJSON(),!0);for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&yu(e[r]))return!0;return!1}function _C(e){const t=[],r=e.data,a=e;return a.data=Jh(r,t),a.attachments=t.length,{packet:a,buffers:t}}function Jh(e,t){if(!e)return e;if(Im(e)){const r={_placeholder:!0,num:t.length};return t.push(e),r}else if(Array.isArray(e)){const r=new Array(e.length);for(let a=0;a<e.length;a++)r[a]=Jh(e[a],t);return r}else if(typeof e=="object"&&!(e instanceof Date)){const r={};for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=Jh(e[a],t));return r}return e}function EC(e,t){return e.data=em(e.data,t),delete e.attachments,e}function em(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let r=0;r<e.length;r++)e[r]=em(e[r],t);else if(typeof e=="object")for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(e[r]=em(e[r],t));return e}const NC=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var wt;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(wt||(wt={}));class SC{constructor(t){this.replacer=t}encode(t){return(t.type===wt.EVENT||t.type===wt.ACK)&&yu(t)?this.encodeAsBinary({type:t.type===wt.EVENT?wt.BINARY_EVENT:wt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let r=""+t.type;return(t.type===wt.BINARY_EVENT||t.type===wt.BINARY_ACK)&&(r+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(r+=t.nsp+","),t.id!=null&&(r+=t.id),t.data!=null&&(r+=JSON.stringify(t.data,this.replacer)),r}encodeAsBinary(t){const r=_C(t),a=this.encodeAsString(r.packet),l=r.buffers;return l.unshift(a),l}}class Bm extends kn{constructor(t){super(),this.reviver=t}add(t){let r;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");r=this.decodeString(t);const a=r.type===wt.BINARY_EVENT;a||r.type===wt.BINARY_ACK?(r.type=a?wt.EVENT:wt.ACK,this.reconstructor=new zC(r),r.attachments===0&&super.emitReserved("decoded",r)):super.emitReserved("decoded",r)}else if(Im(t)||t.base64)if(this.reconstructor)r=this.reconstructor.takeBinaryData(t),r&&(this.reconstructor=null,super.emitReserved("decoded",r));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let r=0;const a={type:Number(t.charAt(0))};if(wt[a.type]===void 0)throw new Error("unknown packet type "+a.type);if(a.type===wt.BINARY_EVENT||a.type===wt.BINARY_ACK){const o=r+1;for(;t.charAt(++r)!=="-"&&r!=t.length;);const c=t.substring(o,r);if(c!=Number(c)||t.charAt(r)!=="-")throw new Error("Illegal attachments");a.attachments=Number(c)}if(t.charAt(r+1)==="/"){const o=r+1;for(;++r&&!(t.charAt(r)===","||r===t.length););a.nsp=t.substring(o,r)}else a.nsp="/";const l=t.charAt(r+1);if(l!==""&&Number(l)==l){const o=r+1;for(;++r;){const c=t.charAt(r);if(c==null||Number(c)!=c){--r;break}if(r===t.length)break}a.id=Number(t.substring(o,r+1))}if(t.charAt(++r)){const o=this.tryParse(t.substr(r));if(Bm.isPayloadValid(a.type,o))a.data=o;else throw new Error("invalid payload")}return a}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,r){switch(t){case wt.CONNECT:return Ix(r);case wt.DISCONNECT:return r===void 0;case wt.CONNECT_ERROR:return typeof r=="string"||Ix(r);case wt.EVENT:case wt.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&NC.indexOf(r[0])===-1);case wt.ACK:case wt.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class zC{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const r=EC(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function Ix(e){return Object.prototype.toString.call(e)==="[object Object]"}const CC=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Bm,Encoder:SC,get PacketType(){return wt}},Symbol.toStringTag,{value:"Module"}));function Pr(e,t,r){return e.on(t,r),function(){e.off(t,r)}}const TC=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class y1 extends kn{constructor(t,r,a){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=r,a&&a.auth&&(this.auth=a.auth),this._opts=Object.assign({},a),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Pr(t,"open",this.onopen.bind(this)),Pr(t,"packet",this.onpacket.bind(this)),Pr(t,"error",this.onerror.bind(this)),Pr(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...r){var a,l,o;if(TC.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(r.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(r),this;const c={type:wt.EVENT,data:r};if(c.options={},c.options.compress=this.flags.compress!==!1,typeof r[r.length-1]=="function"){const g=this.ids++,x=r.pop();this._registerAckCallback(g,x),c.id=g}const f=(l=(a=this.io.engine)===null||a===void 0?void 0:a.transport)===null||l===void 0?void 0:l.writable,h=this.connected&&!(!((o=this.io.engine)===null||o===void 0)&&o._hasPingExpired());return this.flags.volatile&&!f||(h?(this.notifyOutgoingListeners(c),this.packet(c)):this.sendBuffer.push(c)),this.flags={},this}_registerAckCallback(t,r){var a;const l=(a=this.flags.timeout)!==null&&a!==void 0?a:this._opts.ackTimeout;if(l===void 0){this.acks[t]=r;return}const o=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let f=0;f<this.sendBuffer.length;f++)this.sendBuffer[f].id===t&&this.sendBuffer.splice(f,1);r.call(this,new Error("operation has timed out"))},l),c=(...f)=>{this.io.clearTimeoutFn(o),r.apply(this,f)};c.withError=!0,this.acks[t]=c}emitWithAck(t,...r){return new Promise((a,l)=>{const o=(c,f)=>c?l(c):a(f);o.withError=!0,r.push(o),this.emit(t,...r)})}_addToQueue(t){let r;typeof t[t.length-1]=="function"&&(r=t.pop());const a={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((l,...o)=>(this._queue[0],l!==null?a.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(l)):(this._queue.shift(),r&&r(null,...o)),a.pending=!1,this._drainQueue())),this._queue.push(a),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const r=this._queue[0];r.pending&&!t||(r.pending=!0,r.tryCount++,this.flags=r.flags,this.emit.apply(this,r.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:wt.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,r){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,r),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(a=>String(a.id)===t)){const a=this.acks[t];delete this.acks[t],a.withError&&a.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case wt.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case wt.EVENT:case wt.BINARY_EVENT:this.onevent(t);break;case wt.ACK:case wt.BINARY_ACK:this.onack(t);break;case wt.DISCONNECT:this.ondisconnect();break;case wt.CONNECT_ERROR:this.destroy();const a=new Error(t.data.message);a.data=t.data.data,this.emitReserved("connect_error",a);break}}onevent(t){const r=t.data||[];t.id!=null&&r.push(this.ack(t.id)),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const r=this._anyListeners.slice();for(const a of r)a.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const r=this;let a=!1;return function(...l){a||(a=!0,r.packet({type:wt.ACK,id:t,data:l}))}}onack(t){const r=this.acks[t.id];typeof r=="function"&&(delete this.acks[t.id],r.withError&&t.data.unshift(null),r.apply(this,t.data))}onconnect(t,r){this.id=t,this.recovered=r&&this._pid===r,this._pid=r,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:wt.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const r=this._anyListeners;for(let a=0;a<r.length;a++)if(t===r[a])return r.splice(a,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const r=this._anyOutgoingListeners;for(let a=0;a<r.length;a++)if(t===r[a])return r.splice(a,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const r=this._anyOutgoingListeners.slice();for(const a of r)a.apply(this,t.data)}}}function Ks(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Ks.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),r=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-r:e+r}return Math.min(e,this.max)|0};Ks.prototype.reset=function(){this.attempts=0};Ks.prototype.setMin=function(e){this.ms=e};Ks.prototype.setMax=function(e){this.max=e};Ks.prototype.setJitter=function(e){this.jitter=e};class tm extends kn{constructor(t,r){var a;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(r=t,t=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,Gu(this,r),this.reconnection(r.reconnection!==!1),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor((a=r.randomizationFactor)!==null&&a!==void 0?a:.5),this.backoff=new Ks({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=t;const l=r.parser||CC;this.encoder=new l.Encoder,this.decoder=new l.Decoder,this._autoConnect=r.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var r;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(r=this.backoff)===null||r===void 0||r.setMin(t),this)}randomizationFactor(t){var r;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(r=this.backoff)===null||r===void 0||r.setJitter(t),this)}reconnectionDelayMax(t){var r;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(r=this.backoff)===null||r===void 0||r.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new bC(this.uri,this.opts);const r=this.engine,a=this;this._readyState="opening",this.skipReconnect=!1;const l=Pr(r,"open",function(){a.onopen(),t&&t()}),o=f=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",f),t?t(f):this.maybeReconnectOnOpen()},c=Pr(r,"error",o);if(this._timeout!==!1){const f=this._timeout,h=this.setTimeoutFn(()=>{l(),o(new Error("timeout")),r.close()},f);this.opts.autoUnref&&h.unref(),this.subs.push(()=>{this.clearTimeoutFn(h)})}return this.subs.push(l),this.subs.push(c),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Pr(t,"ping",this.onping.bind(this)),Pr(t,"data",this.ondata.bind(this)),Pr(t,"error",this.onerror.bind(this)),Pr(t,"close",this.onclose.bind(this)),Pr(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(r){this.onclose("parse error",r)}}ondecoded(t){$u(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,r){let a=this.nsps[t];return a?this._autoConnect&&!a.active&&a.connect():(a=new y1(this,t,r),this.nsps[t]=a),a}_destroy(t){const r=Object.keys(this.nsps);for(const a of r)if(this.nsps[a].active)return;this._close()}_packet(t){const r=this.encoder.encode(t);for(let a=0;a<r.length;a++)this.engine.write(r[a],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,r){var a;this.cleanup(),(a=this.engine)===null||a===void 0||a.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,r),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const r=this.backoff.duration();this._reconnecting=!0;const a=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(l=>{l?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",l)):t.onreconnect()}))},r);this.opts.autoUnref&&a.unref(),this.subs.push(()=>{this.clearTimeoutFn(a)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Ql={};function vu(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const r=xC(e,t.path||"/socket.io"),a=r.source,l=r.id,o=r.path,c=Ql[l]&&o in Ql[l].nsps,f=t.forceNew||t["force new connection"]||t.multiplex===!1||c;let h;return f?h=new tm(a,t):(Ql[l]||(Ql[l]=new tm(a,t)),h=Ql[l]),r.query&&!t.query&&(t.query=r.queryKey),h.socket(r.path,t)}Object.assign(vu,{Manager:tm,Socket:y1,io:vu,connect:vu});let ao=null,yh=null;function v1(){return ao||(window.__OCR_TOKEN__?(ao=window.__OCR_TOKEN__,ao):null)}async function k1(){const e=v1();return e||(yh||(yh=fetch("/auth/token").then(t=>{if(!t.ok)throw new Error(`Failed to fetch auth token: ${t.status}`);return t.json()}).then(t=>(ao=t.token,window.__OCR_TOKEN__=t.token,t.token))),yh)}function w1(){const e=v1();return e?{Authorization:`Bearer ${e}`}:{}}const _1=_.createContext(null);function AC({children:e}){const[t,r]=_.useState("connecting"),a=_.useRef(null),l=_.useRef(new Set);_.useEffect(()=>{let h=!1;return k1().then(m=>{if(h)return;const g=vu({autoConnect:!0,reconnection:!0,reconnectionAttempts:1/0,reconnectionDelay:1e3,reconnectionDelayMax:5e3,auth:{token:m}});a.current=g,g.on("connect",()=>{r("connected");for(const x of l.current)g.emit("join:session",x)}),g.on("disconnect",()=>{r("disconnected")}),g.io.on("reconnect_attempt",()=>{r("reconnecting")})}),()=>{h=!0,a.current?.disconnect(),a.current=null}},[]);const o=_.useCallback(h=>{l.current.add(h),a.current?.emit("join:session",h)},[]),c=_.useCallback(h=>{l.current.delete(h),a.current?.emit("leave:session",h)},[]),f=_.useMemo(()=>({socket:a.current,status:t,isConnected:t==="connected",joinRoom:o,leaveRoom:c}),[t,o,c]);return d.jsx(_1,{value:f,children:e})}function si(){const e=_.useContext(_1);if(!e)throw new Error("useSocket must be used within SocketProvider");return e}function ut(e,t){const{socket:r}=si(),a=_.useRef(t);a.current=t,_.useEffect(()=>{if(!r)return;const l=o=>a.current(o);return r.on(e,l),()=>{r.off(e,l)}},[r,e])}var Vs=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},RC={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},OC=class{#e=RC;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},$a=new OC;function MC(e){setTimeout(e,0)}var Ga=typeof window>"u"||"Deno"in globalThis;function Kn(){}function jC(e,t){return typeof e=="function"?e(t):e}function nm(e){return typeof e=="number"&&e>=0&&e!==1/0}function E1(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ba(e,t){return typeof e=="function"?e(t):e}function Tr(e,t){return typeof e=="function"?e(t):e}function Bx(e,t){const{type:r="all",exact:a,fetchStatus:l,predicate:o,queryKey:c,stale:f}=e;if(c){if(a){if(t.queryHash!==Um(c,t.options))return!1}else if(!bo(t.queryKey,c))return!1}if(r!=="all"){const h=t.isActive();if(r==="active"&&!h||r==="inactive"&&h)return!1}return!(typeof f=="boolean"&&t.isStale()!==f||l&&l!==t.state.fetchStatus||o&&!o(t))}function Ux(e,t){const{exact:r,status:a,predicate:l,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(Ka(t.options.mutationKey)!==Ka(o))return!1}else if(!bo(t.options.mutationKey,o))return!1}return!(a&&t.state.status!==a||l&&!l(t))}function Um(e,t){return(t?.queryKeyHashFn||Ka)(e)}function Ka(e){return JSON.stringify(e,(t,r)=>rm(r)?Object.keys(r).sort().reduce((a,l)=>(a[l]=r[l],a),{}):r)}function bo(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>bo(e[r],t[r])):!1}var DC=Object.prototype.hasOwnProperty;function N1(e,t,r=0){if(e===t)return e;if(r>500)return t;const a=Fx(e)&&Fx(t);if(!a&&!(rm(e)&&rm(t)))return t;const o=(a?e:Object.keys(e)).length,c=a?t:Object.keys(t),f=c.length,h=a?new Array(f):{};let m=0;for(let g=0;g<f;g++){const x=a?g:c[g],y=e[x],v=t[x];if(y===v){h[x]=y,(a?g<o:DC.call(e,x))&&m++;continue}if(y===null||v===null||typeof y!="object"||typeof v!="object"){h[x]=v;continue}const k=N1(y,v,r+1);h[x]=k,k===y&&m++}return o===f&&m===o?e:h}function Su(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function Fx(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function rm(e){if(!Px(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!Px(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Px(e){return Object.prototype.toString.call(e)==="[object Object]"}function LC(e){return new Promise(t=>{$a.setTimeout(t,e)})}function im(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?N1(e,t):t}function IC(e,t,r=0){const a=[...e,t];return r&&a.length>r?a.slice(1):a}function BC(e,t,r=0){const a=[t,...e];return r&&a.length>r?a.slice(0,-1):a}var Fm=Symbol();function S1(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Fm?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Pm(e,t){return typeof e=="function"?e(...t):!!e}function UC(e,t,r){let a=!1,l;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(l??=t(),a||(a=!0,l.aborted?r():l.addEventListener("abort",r,{once:!0})),l)}),e}var FC=class extends Vs{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!Ga&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},Hm=new FC;function am(){let e,t;const r=new Promise((l,o)=>{e=l,t=o});r.status="pending",r.catch(()=>{});function a(l){Object.assign(r,l),delete r.resolve,delete r.reject}return r.resolve=l=>{a({status:"fulfilled",value:l}),e(l)},r.reject=l=>{a({status:"rejected",reason:l}),t(l)},r}var PC=MC;function HC(){let e=[],t=0,r=f=>{f()},a=f=>{f()},l=PC;const o=f=>{t?e.push(f):l(()=>{r(f)})},c=()=>{const f=e;e=[],f.length&&l(()=>{a(()=>{f.forEach(h=>{r(h)})})})};return{batch:f=>{let h;t++;try{h=f()}finally{t--,t||c()}return h},batchCalls:f=>(...h)=>{o(()=>{f(...h)})},schedule:o,setNotifyFunction:f=>{r=f},setBatchNotifyFunction:f=>{a=f},setScheduler:f=>{l=f}}}var Sn=HC(),qC=class extends Vs{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!Ga&&window.addEventListener){const t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(r=>{r(e)}))}isOnline(){return this.#e}},zu=new qC;function $C(e){return Math.min(1e3*2**e,3e4)}function z1(e){return(e??"online")==="online"?zu.isOnline():!0}var sm=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function C1(e){let t=!1,r=0,a;const l=am(),o=()=>l.status!=="pending",c=E=>{if(!o()){const S=new sm(E);y(S),e.onCancel?.(S)}},f=()=>{t=!0},h=()=>{t=!1},m=()=>Hm.isFocused()&&(e.networkMode==="always"||zu.isOnline())&&e.canRun(),g=()=>z1(e.networkMode)&&e.canRun(),x=E=>{o()||(a?.(),l.resolve(E))},y=E=>{o()||(a?.(),l.reject(E))},v=()=>new Promise(E=>{a=S=>{(o()||m())&&E(S)},e.onPause?.()}).then(()=>{a=void 0,o()||e.onContinue?.()}),k=()=>{if(o())return;let E;const S=r===0?e.initialPromise:void 0;try{E=S??e.fn()}catch(N){E=Promise.reject(N)}Promise.resolve(E).then(x).catch(N=>{if(o())return;const O=e.retry??(Ga?0:3),A=e.retryDelay??$C,P=typeof A=="function"?A(r,N):A,$=O===!0||typeof O=="number"&&r<O||typeof O=="function"&&O(r,N);if(t||!$){y(N);return}r++,e.onFail?.(r,N),LC(P).then(()=>m()?void 0:v()).then(()=>{t?y(N):k()})})};return{promise:l,status:()=>l.status,cancel:c,continue:()=>(a?.(),l),cancelRetry:f,continueRetry:h,canStart:g,start:()=>(g()?k():v().then(k),l)}}var T1=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),nm(this.gcTime)&&(this.#e=$a.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ga?1/0:300*1e3))}clearGcTimeout(){this.#e&&($a.clearTimeout(this.#e),this.#e=void 0)}},GC=class extends T1{#e;#t;#n;#i;#r;#s;#l;constructor(e){super(),this.#l=!1,this.#s=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#n=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=qx(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#s,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=qx(this.options);t.data!==void 0&&(this.setState(Hx(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const r=im(this.state.data,e,this.options);return this.#a({data:r,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),r}setState(e,t){this.#a({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(Kn).catch(Kn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>Tr(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Fm||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>ba(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!E1(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#l?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#a({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const f=this.observers.find(h=>h.options.queryFn);f&&this.setOptions(f.options)}const r=new AbortController,a=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(this.#l=!0,r.signal)})},l=()=>{const f=S1(this.options,t),m=(()=>{const g={client:this.#i,queryKey:this.queryKey,meta:this.meta};return a(g),g})();return this.#l=!1,this.options.persister?this.options.persister(f,m,this):f(m)},c=(()=>{const f={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:l};return a(f),f})();this.options.behavior?.onFetch(c,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==c.fetchOptions?.meta)&&this.#a({type:"fetch",meta:c.fetchOptions?.meta}),this.#r=C1({initialPromise:t?.initialPromise,fn:c.fetchFn,onCancel:f=>{f instanceof sm&&f.revert&&this.setState({...this.#t,fetchStatus:"idle"}),r.abort()},onFail:(f,h)=>{this.#a({type:"failed",failureCount:f,error:h})},onPause:()=>{this.#a({type:"pause"})},onContinue:()=>{this.#a({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0});try{const f=await this.#r.start();if(f===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(f),this.#n.config.onSuccess?.(f,this),this.#n.config.onSettled?.(f,this.state.error,this),f}catch(f){if(f instanceof sm){if(f.silent)return this.#r.promise;if(f.revert){if(this.state.data===void 0)throw f;return this.state.data}}throw this.#a({type:"error",error:f}),this.#n.config.onError?.(f,this),this.#n.config.onSettled?.(this.state.data,f,this),f}finally{this.scheduleGc()}}#a(e){const t=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...A1(r.data,this.options),fetchMeta:e.meta??null};case"success":const a={...r,...Hx(e.data,e.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?a:void 0,a;case"error":const l=e.error;return{...r,error:l,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:l,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=t(this.state),Sn.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function A1(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:z1(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Hx(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function qx(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,a=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var KC=class extends Vs{constructor(e,t){super(),this.options=t,this.#e=e,this.#a=null,this.#l=am(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#i=void 0;#r;#s;#l;#a;#p;#f;#h;#c;#u;#o;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),$x(this.#t,this.options)?this.#d():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return lm(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return lm(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#v(),this.#k(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,r=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Tr(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#t.setOptions(this.options),t._defaulted&&!Su(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const a=this.hasListeners();a&&Gx(this.#t,r,this.options,t)&&this.#d(),this.updateResult(),a&&(this.#t!==r||Tr(this.options.enabled,this.#t)!==Tr(t.enabled,this.#t)||ba(this.options.staleTime,this.#t)!==ba(t.staleTime,this.#t))&&this.#g();const l=this.#b();a&&(this.#t!==r||Tr(this.options.enabled,this.#t)!==Tr(t.enabled,this.#t)||l!==this.#o)&&this.#x(l)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),r=this.createResult(t,e);return YC(this,r)&&(this.#i=r,this.#s=this.options,this.#r=this.#t.state),r}getCurrentResult(){return this.#i}trackResult(e,t){return new Proxy(e,{get:(r,a)=>(this.trackProp(a),t?.(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#l.status==="pending"&&this.#l.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,a))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),r=this.#e.getQueryCache().build(this.#e,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#d({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#i))}#d(e){this.#w();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Kn)),t}#g(){this.#v();const e=ba(this.options.staleTime,this.#t);if(Ga||this.#i.isStale||!nm(e))return;const r=E1(this.#i.dataUpdatedAt,e)+1;this.#c=$a.setTimeout(()=>{this.#i.isStale||this.updateResult()},r)}#b(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#x(e){this.#k(),this.#o=e,!(Ga||Tr(this.options.enabled,this.#t)===!1||!nm(this.#o)||this.#o===0)&&(this.#u=$a.setInterval(()=>{(this.options.refetchIntervalInBackground||Hm.isFocused())&&this.#d()},this.#o))}#y(){this.#g(),this.#x(this.#b())}#v(){this.#c&&($a.clearTimeout(this.#c),this.#c=void 0)}#k(){this.#u&&($a.clearInterval(this.#u),this.#u=void 0)}createResult(e,t){const r=this.#t,a=this.options,l=this.#i,o=this.#r,c=this.#s,h=e!==r?e.state:this.#n,{state:m}=e;let g={...m},x=!1,y;if(t._optimisticResults){const z=this.hasListeners(),W=!z&&$x(e,t),U=z&&Gx(e,r,t,a);(W||U)&&(g={...g,...A1(m.data,e.options)}),t._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:v,errorUpdatedAt:k,status:E}=g;y=g.data;let S=!1;if(t.placeholderData!==void 0&&y===void 0&&E==="pending"){let z;l?.isPlaceholderData&&t.placeholderData===c?.placeholderData?(z=l.data,S=!0):z=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,z!==void 0&&(E="success",y=im(l?.data,z,t),x=!0)}if(t.select&&y!==void 0&&!S)if(l&&y===o?.data&&t.select===this.#p)y=this.#f;else try{this.#p=t.select,y=t.select(y),y=im(l?.data,y,t),this.#f=y,this.#a=null}catch(z){this.#a=z}this.#a&&(v=this.#a,y=this.#f,k=Date.now(),E="error");const N=g.fetchStatus==="fetching",O=E==="pending",A=E==="error",P=O&&N,$=y!==void 0,K={status:E,fetchStatus:g.fetchStatus,isPending:O,isSuccess:E==="success",isError:A,isInitialLoading:P,isLoading:P,data:y,dataUpdatedAt:g.dataUpdatedAt,error:v,errorUpdatedAt:k,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>h.dataUpdateCount||g.errorUpdateCount>h.errorUpdateCount,isFetching:N,isRefetching:N&&!O,isLoadingError:A&&!$,isPaused:g.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:A&&$,isStale:qm(e,t),refetch:this.refetch,promise:this.#l,isEnabled:Tr(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const z=K.data!==void 0,W=K.status==="error"&&!z,U=_e=>{W?_e.reject(K.error):z&&_e.resolve(K.data)},ee=()=>{const _e=this.#l=K.promise=am();U(_e)},te=this.#l;switch(te.status){case"pending":e.queryHash===r.queryHash&&U(te);break;case"fulfilled":(W||K.data!==te.value)&&ee();break;case"rejected":(!W||K.error!==te.reason)&&ee();break}}return K}updateResult(){const e=this.#i,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#s=this.options,this.#r.data!==void 0&&(this.#h=this.#t),Su(t,e))return;this.#i=t;const r=()=>{if(!e)return!0;const{notifyOnChangeProps:a}=this.options,l=typeof a=="function"?a():a;if(l==="all"||!l&&!this.#m.size)return!0;const o=new Set(l??this.#m);return this.options.throwOnError&&o.add("error"),Object.keys(this.#i).some(c=>{const f=c;return this.#i[f]!==e[f]&&o.has(f)})};this.#_({listeners:r()})}#w(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#_(e){Sn.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#i)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function VC(e,t){return Tr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function $x(e,t){return VC(e,t)||e.state.data!==void 0&&lm(e,t,t.refetchOnMount)}function lm(e,t,r){if(Tr(t.enabled,e)!==!1&&ba(t.staleTime,e)!=="static"){const a=typeof r=="function"?r(e):r;return a==="always"||a!==!1&&qm(e,t)}return!1}function Gx(e,t,r,a){return(e!==t||Tr(a.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&qm(e,r)}function qm(e,t){return Tr(t.enabled,e)!==!1&&e.isStaleByTime(ba(t.staleTime,e))}function YC(e,t){return!Su(e.getCurrentResult(),t)}function Kx(e){return{onFetch:(t,r)=>{const a=t.options,l=t.fetchOptions?.meta?.fetchMore?.direction,o=t.state.data?.pages||[],c=t.state.data?.pageParams||[];let f={pages:[],pageParams:[]},h=0;const m=async()=>{let g=!1;const x=k=>{UC(k,()=>t.signal,()=>g=!0)},y=S1(t.options,t.fetchOptions),v=async(k,E,S)=>{if(g)return Promise.reject();if(E==null&&k.pages.length)return Promise.resolve(k);const O=(()=>{const M={client:t.client,queryKey:t.queryKey,pageParam:E,direction:S?"backward":"forward",meta:t.options.meta};return x(M),M})(),A=await y(O),{maxPages:P}=t.options,$=S?BC:IC;return{pages:$(k.pages,A,P),pageParams:$(k.pageParams,E,P)}};if(l&&o.length){const k=l==="backward",E=k?QC:Vx,S={pages:o,pageParams:c},N=E(a,S);f=await v(S,N,k)}else{const k=e??o.length;do{const E=h===0?c[0]??a.initialPageParam:Vx(a,f);if(h>0&&E==null)break;f=await v(f,E),h++}while(h<k)}return f};t.options.persister?t.fetchFn=()=>t.options.persister?.(m,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r):t.fetchFn=m}}}function Vx(e,{pages:t,pageParams:r}){const a=t.length-1;return t.length>0?e.getNextPageParam(t[a],t,r[a],r):void 0}function QC(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}var XC=class extends T1{#e;#t;#n;#i;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||R1(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=C1({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(new Error("No mutationFn found")),onFail:(o,c)=>{this.#r({type:"failed",failureCount:o,error:c})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const a=this.state.status==="pending",l=!this.#i.canStart();try{if(a)t();else{this.#r({type:"pending",variables:e,isPaused:l}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,r);const c=await this.options.onMutate?.(e,r);c!==this.state.context&&this.#r({type:"pending",context:c,variables:e,isPaused:l})}const o=await this.#i.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,r),await this.options.onSuccess?.(o,e,this.state.context,r),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(o,null,e,this.state.context,r),this.#r({type:"success",data:o}),o}catch(o){try{await this.#n.config.onError?.(o,e,this.state.context,this,r)}catch(c){Promise.reject(c)}try{await this.options.onError?.(o,e,this.state.context,r)}catch(c){Promise.reject(c)}try{await this.#n.config.onSettled?.(void 0,o,this.state.variables,this.state.context,this,r)}catch(c){Promise.reject(c)}try{await this.options.onSettled?.(void 0,o,e,this.state.context,r)}catch(c){Promise.reject(c)}throw this.#r({type:"error",error:o}),o}finally{this.#n.runNext(this)}}#r(e){const t=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Sn.batch(()=>{this.#t.forEach(r=>{r.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function R1(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ZC=class extends Vs{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,r){const a=new XC({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:r});return this.add(a),a}add(e){this.#e.add(e);const t=eu(e);if(typeof t=="string"){const r=this.#t.get(t);r?r.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=eu(e);if(typeof t=="string"){const r=this.#t.get(t);if(r)if(r.length>1){const a=r.indexOf(e);a!==-1&&r.splice(a,1)}else r[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=eu(e);if(typeof t=="string"){const a=this.#t.get(t)?.find(l=>l.state.status==="pending");return!a||a===e}else return!0}runNext(e){const t=eu(e);return typeof t=="string"?this.#t.get(t)?.find(a=>a!==e&&a.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Sn.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(r=>Ux(t,r))}findAll(e={}){return this.getAll().filter(t=>Ux(e,t))}notify(e){Sn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Sn.batch(()=>Promise.all(e.map(t=>t.continue().catch(Kn))))}};function eu(e){return e.options.scope?.id}var WC=class extends Vs{#e;#t=void 0;#n;#i;constructor(t,r){super(),this.#e=t,this.setOptions(r),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const r=this.options;this.options=this.#e.defaultMutationOptions(t),Su(this.options,r)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),r?.mutationKey&&this.options.mutationKey&&Ka(r.mutationKey)!==Ka(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#s(t)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#s()}mutate(t,r){return this.#i=r,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(t)}#r(){const t=this.#n?.state??R1();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#s(t){Sn.batch(()=>{if(this.#i&&this.hasListeners()){const r=this.#t.variables,a=this.#t.context,l={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#i.onSuccess?.(t.data,r,a,l)}catch(o){Promise.reject(o)}try{this.#i.onSettled?.(t.data,null,r,a,l)}catch(o){Promise.reject(o)}}else if(t?.type==="error"){try{this.#i.onError?.(t.error,r,a,l)}catch(o){Promise.reject(o)}try{this.#i.onSettled?.(void 0,t.error,r,a,l)}catch(o){Promise.reject(o)}}}this.listeners.forEach(r=>{r(this.#t)})})}},JC=class extends Vs{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,r){const a=t.queryKey,l=t.queryHash??Um(a,t);let o=this.get(l);return o||(o=new GC({client:e,queryKey:a,queryHash:l,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(a)}),this.add(o)),o}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Sn.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(r=>Bx(t,r))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(r=>Bx(e,r)):t}notify(e){Sn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Sn.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Sn.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},e2=class{#e;#t;#n;#i;#r;#s;#l;#a;constructor(e={}){this.#e=e.queryCache||new JC,this.#t=e.mutationCache||new ZC,this.#n=e.defaultOptions||{},this.#i=new Map,this.#r=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#l=Hm.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#a=zu.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#s--,this.#s===0&&(this.#l?.(),this.#l=void 0,this.#a?.(),this.#a=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=this.#e.build(this,t),a=r.state.data;return a===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(ba(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(a))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:r})=>{const a=r.data;return[t,a]})}setQueryData(e,t,r){const a=this.defaultQueryOptions({queryKey:e}),o=this.#e.get(a.queryHash)?.state.data,c=jC(t,o);if(c!==void 0)return this.#e.build(this,a).setData(c,{...r,manual:!0})}setQueriesData(e,t,r){return Sn.batch(()=>this.#e.findAll(e).map(({queryKey:a})=>[a,this.setQueryData(a,t,r)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;Sn.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=this.#e;return Sn.batch(()=>(r.findAll(e).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},a=Sn.batch(()=>this.#e.findAll(e).map(l=>l.cancel(r)));return Promise.all(a).then(Kn).catch(Kn)}invalidateQueries(e,t={}){return Sn.batch(()=>(this.#e.findAll(e).forEach(r=>{r.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},a=Sn.batch(()=>this.#e.findAll(e).filter(l=>!l.isDisabled()&&!l.isStatic()).map(l=>{let o=l.fetch(void 0,r);return r.throwOnError||(o=o.catch(Kn)),l.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(a).then(Kn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=this.#e.build(this,t);return r.isStaleByTime(ba(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Kn).catch(Kn)}fetchInfiniteQuery(e){return e.behavior=Kx(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Kn).catch(Kn)}ensureInfiniteQueryData(e){return e.behavior=Kx(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return zu.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#i.set(Ka(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#i.values()],r={};return t.forEach(a=>{bo(e,a.queryKey)&&Object.assign(r,a.defaultOptions)}),r}setMutationDefaults(e,t){this.#r.set(Ka(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],r={};return t.forEach(a=>{bo(e,a.mutationKey)&&Object.assign(r,a.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Um(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Fm&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},O1=_.createContext(void 0),Rn=e=>{const t=_.useContext(O1);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},t2=({client:e,children:t})=>(_.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),d.jsx(O1.Provider,{value:e,children:t})),M1=_.createContext(!1),n2=()=>_.useContext(M1);M1.Provider;function r2(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var i2=_.createContext(r2()),a2=()=>_.useContext(i2),s2=(e,t,r)=>{const a=r?.state.error&&typeof e.throwOnError=="function"?Pm(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||a)&&(t.isReset()||(e.retryOnMount=!1))},l2=e=>{_.useEffect(()=>{e.clearReset()},[e])},o2=({result:e,errorResetBoundary:t,throwOnError:r,query:a,suspense:l})=>e.isError&&!t.isReset()&&!e.isFetching&&a&&(l&&e.data===void 0||Pm(r,[e.error,a])),c2=e=>{if(e.suspense){const r=l=>l==="static"?l:Math.max(l??1e3,1e3),a=e.staleTime;e.staleTime=typeof a=="function"?(...l)=>r(a(...l)):r(a),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},u2=(e,t)=>e.isLoading&&e.isFetching&&!t,d2=(e,t)=>e?.suspense&&t.isPending,Yx=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function f2(e,t,r){const a=n2(),l=a2(),o=Rn(),c=o.defaultQueryOptions(e);o.getDefaultOptions().queries?._experimental_beforeQuery?.(c);const f=o.getQueryCache().get(c.queryHash);c._optimisticResults=a?"isRestoring":"optimistic",c2(c),s2(c,l,f),l2(l);const h=!o.getQueryCache().get(c.queryHash),[m]=_.useState(()=>new t(o,c)),g=m.getOptimisticResult(c),x=!a&&e.subscribed!==!1;if(_.useSyncExternalStore(_.useCallback(y=>{const v=x?m.subscribe(Sn.batchCalls(y)):Kn;return m.updateResult(),v},[m,x]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),_.useEffect(()=>{m.setOptions(c)},[c,m]),d2(c,g))throw Yx(c,m,l);if(o2({result:g,errorResetBoundary:l,throwOnError:c.throwOnError,query:f,suspense:c.suspense}))throw g.error;return o.getDefaultOptions().queries?._experimental_afterQuery?.(c,g),c.experimental_prefetchInRender&&!Ga&&u2(g,a)&&(h?Yx(c,m,l):f?.promise)?.catch(Kn).finally(()=>{m.updateResult()}),c.notifyOnChangeProps?g:m.trackResult(g)}function nn(e,t){return f2(e,KC)}function Ao(e,t){const r=Rn(),[a]=_.useState(()=>new WC(r,e));_.useEffect(()=>{a.setOptions(e)},[a,e]);const l=_.useSyncExternalStore(_.useCallback(c=>a.subscribe(Sn.batchCalls(c)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),o=_.useCallback((c,f)=>{a.mutate(c,f).catch(Kn)},[a]);if(l.error&&Pm(a.options.throwOnError,[l.error]))throw l.error;return{...l,mutate:o,mutateAsync:l.mutate}}function h2({children:e}){const[t]=_.useState(()=>new e2({defaultOptions:{queries:{staleTime:3e4,retry:1,refetchOnWindowFocus:!1}}}));return d.jsx(t2,{client:t,children:e})}function j1(e){var t,r,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var l=e.length;for(t=0;t<l;t++)e[t]&&(r=j1(e[t]))&&(a&&(a+=" "),a+=r)}else for(r in e)e[r]&&(a&&(a+=" "),a+=r);return a}function m2(){for(var e,t,r=0,a="",l=arguments.length;r<l;r++)(e=arguments[r])&&(t=j1(e))&&(a&&(a+=" "),a+=t);return a}const p2=(e,t)=>{const r=new Array(e.length+t.length);for(let a=0;a<e.length;a++)r[a]=e[a];for(let a=0;a<t.length;a++)r[e.length+a]=t[a];return r},g2=(e,t)=>({classGroupId:e,validator:t}),D1=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Cu="-",Qx=[],b2="arbitrary..",x2=e=>{const t=v2(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return y2(c);const f=c.split(Cu),h=f[0]===""&&f.length>1?1:0;return L1(f,h,t)},getConflictingClassGroupIds:(c,f)=>{if(f){const h=a[c],m=r[c];return h?m?p2(m,h):h:m||Qx}return r[c]||Qx}}},L1=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const l=e[t],o=r.nextPart.get(l);if(o){const m=L1(e,t+1,o);if(m)return m}const c=r.validators;if(c===null)return;const f=t===0?e.join(Cu):e.slice(t).join(Cu),h=c.length;for(let m=0;m<h;m++){const g=c[m];if(g.validator(f))return g.classGroupId}},y2=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),a=t.slice(0,r);return a?b2+a:void 0})(),v2=e=>{const{theme:t,classGroups:r}=e;return k2(r,t)},k2=(e,t)=>{const r=D1();for(const a in e){const l=e[a];$m(l,r,a,t)}return r},$m=(e,t,r,a)=>{const l=e.length;for(let o=0;o<l;o++){const c=e[o];w2(c,t,r,a)}},w2=(e,t,r,a)=>{if(typeof e=="string"){_2(e,t,r);return}if(typeof e=="function"){E2(e,t,r,a);return}N2(e,t,r,a)},_2=(e,t,r)=>{const a=e===""?t:I1(t,e);a.classGroupId=r},E2=(e,t,r,a)=>{if(S2(e)){$m(e(a),t,r,a);return}t.validators===null&&(t.validators=[]),t.validators.push(g2(r,e))},N2=(e,t,r,a)=>{const l=Object.entries(e),o=l.length;for(let c=0;c<o;c++){const[f,h]=l[c];$m(h,I1(t,f),r,a)}},I1=(e,t)=>{let r=e;const a=t.split(Cu),l=a.length;for(let o=0;o<l;o++){const c=a[o];let f=r.nextPart.get(c);f||(f=D1(),r.nextPart.set(c,f)),r=f}return r},S2=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,z2=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),a=Object.create(null);const l=(o,c)=>{r[o]=c,t++,t>e&&(t=0,a=r,r=Object.create(null))};return{get(o){let c=r[o];if(c!==void 0)return c;if((c=a[o])!==void 0)return l(o,c),c},set(o,c){o in r?r[o]=c:l(o,c)}}},om="!",Xx=":",C2=[],Zx=(e,t,r,a,l)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:a,isExternal:l}),T2=e=>{const{prefix:t,experimentalParseClassName:r}=e;let a=l=>{const o=[];let c=0,f=0,h=0,m;const g=l.length;for(let E=0;E<g;E++){const S=l[E];if(c===0&&f===0){if(S===Xx){o.push(l.slice(h,E)),h=E+1;continue}if(S==="/"){m=E;continue}}S==="["?c++:S==="]"?c--:S==="("?f++:S===")"&&f--}const x=o.length===0?l:l.slice(h);let y=x,v=!1;x.endsWith(om)?(y=x.slice(0,-1),v=!0):x.startsWith(om)&&(y=x.slice(1),v=!0);const k=m&&m>h?m-h:void 0;return Zx(o,v,y,k)};if(t){const l=t+Xx,o=a;a=c=>c.startsWith(l)?o(c.slice(l.length)):Zx(C2,!1,c,void 0,!0)}if(r){const l=a;a=o=>r({className:o,parseClassName:l})}return a},A2=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,a)=>{t.set(r,1e6+a)}),r=>{const a=[];let l=[];for(let o=0;o<r.length;o++){const c=r[o],f=c[0]==="[",h=t.has(c);f||h?(l.length>0&&(l.sort(),a.push(...l),l=[]),a.push(c)):l.push(c)}return l.length>0&&(l.sort(),a.push(...l)),a}},R2=e=>({cache:z2(e.cacheSize),parseClassName:T2(e),sortModifiers:A2(e),...x2(e)}),O2=/\s+/,M2=(e,t)=>{const{parseClassName:r,getClassGroupId:a,getConflictingClassGroupIds:l,sortModifiers:o}=t,c=[],f=e.trim().split(O2);let h="";for(let m=f.length-1;m>=0;m-=1){const g=f[m],{isExternal:x,modifiers:y,hasImportantModifier:v,baseClassName:k,maybePostfixModifierPosition:E}=r(g);if(x){h=g+(h.length>0?" "+h:h);continue}let S=!!E,N=a(S?k.substring(0,E):k);if(!N){if(!S){h=g+(h.length>0?" "+h:h);continue}if(N=a(k),!N){h=g+(h.length>0?" "+h:h);continue}S=!1}const O=y.length===0?"":y.length===1?y[0]:o(y).join(":"),A=v?O+om:O,P=A+N;if(c.indexOf(P)>-1)continue;c.push(P);const $=l(N,S);for(let M=0;M<$.length;++M){const K=$[M];c.push(A+K)}h=g+(h.length>0?" "+h:h)}return h},j2=(...e)=>{let t=0,r,a,l="";for(;t<e.length;)(r=e[t++])&&(a=B1(r))&&(l&&(l+=" "),l+=a);return l},B1=e=>{if(typeof e=="string")return e;let t,r="";for(let a=0;a<e.length;a++)e[a]&&(t=B1(e[a]))&&(r&&(r+=" "),r+=t);return r},D2=(e,...t)=>{let r,a,l,o;const c=h=>{const m=t.reduce((g,x)=>x(g),e());return r=R2(m),a=r.cache.get,l=r.cache.set,o=f,f(h)},f=h=>{const m=a(h);if(m)return m;const g=M2(h,r);return l(h,g),g};return o=c,(...h)=>o(j2(...h))},L2=[],Nn=e=>{const t=r=>r[e]||L2;return t.isThemeGetter=!0,t},U1=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,F1=/^\((?:(\w[\w-]*):)?(.+)\)$/i,I2=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,B2=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,U2=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,F2=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,P2=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,H2=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,oa=e=>I2.test(e),ct=e=>!!e&&!Number.isNaN(Number(e)),ca=e=>!!e&&Number.isInteger(Number(e)),vh=e=>e.endsWith("%")&&ct(e.slice(0,-1)),Ci=e=>B2.test(e),P1=()=>!0,q2=e=>U2.test(e)&&!F2.test(e),Gm=()=>!1,$2=e=>P2.test(e),G2=e=>H2.test(e),K2=e=>!De(e)&&!Le(e),V2=e=>va(e,$1,Gm),De=e=>U1.test(e),Pa=e=>va(e,G1,q2),Wx=e=>va(e,tT,ct),Y2=e=>va(e,V1,P1),Q2=e=>va(e,K1,Gm),Jx=e=>va(e,H1,Gm),X2=e=>va(e,q1,G2),tu=e=>va(e,Y1,$2),Le=e=>F1.test(e),Xl=e=>Xa(e,G1),Z2=e=>Xa(e,K1),ey=e=>Xa(e,H1),W2=e=>Xa(e,$1),J2=e=>Xa(e,q1),nu=e=>Xa(e,Y1,!0),eT=e=>Xa(e,V1,!0),va=(e,t,r)=>{const a=U1.exec(e);return a?a[1]?t(a[1]):r(a[2]):!1},Xa=(e,t,r=!1)=>{const a=F1.exec(e);return a?a[1]?t(a[1]):r:!1},H1=e=>e==="position"||e==="percentage",q1=e=>e==="image"||e==="url",$1=e=>e==="length"||e==="size"||e==="bg-size",G1=e=>e==="length",tT=e=>e==="number",K1=e=>e==="family-name",V1=e=>e==="number"||e==="weight",Y1=e=>e==="shadow",nT=()=>{const e=Nn("color"),t=Nn("font"),r=Nn("text"),a=Nn("font-weight"),l=Nn("tracking"),o=Nn("leading"),c=Nn("breakpoint"),f=Nn("container"),h=Nn("spacing"),m=Nn("radius"),g=Nn("shadow"),x=Nn("inset-shadow"),y=Nn("text-shadow"),v=Nn("drop-shadow"),k=Nn("blur"),E=Nn("perspective"),S=Nn("aspect"),N=Nn("ease"),O=Nn("animate"),A=()=>["auto","avoid","all","avoid-page","page","left","right","column"],P=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],$=()=>[...P(),Le,De],M=()=>["auto","hidden","clip","visible","scroll"],K=()=>["auto","contain","none"],z=()=>[Le,De,h],W=()=>[oa,"full","auto",...z()],U=()=>[ca,"none","subgrid",Le,De],ee=()=>["auto",{span:["full",ca,Le,De]},ca,Le,De],te=()=>[ca,"auto",Le,De],_e=()=>["auto","min","max","fr",Le,De],se=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],X=()=>["start","end","center","stretch","center-safe","end-safe"],F=()=>["auto",...z()],ne=()=>[oa,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...z()],V=()=>[oa,"screen","full","dvw","lvw","svw","min","max","fit",...z()],fe=()=>[oa,"screen","full","lh","dvh","lvh","svh","min","max","fit",...z()],R=()=>[e,Le,De],j=()=>[...P(),ey,Jx,{position:[Le,De]}],I=()=>["no-repeat",{repeat:["","x","y","space","round"]}],C=()=>["auto","cover","contain",W2,V2,{size:[Le,De]}],ue=()=>[vh,Xl,Pa],be=()=>["","none","full",m,Le,De],ye=()=>["",ct,Xl,Pa],le=()=>["solid","dashed","dotted","double"],xe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],pe=()=>[ct,vh,ey,Jx],Ue=()=>["","none",k,Le,De],Re=()=>["none",ct,Le,De],Tt=()=>["none",ct,Le,De],tt=()=>[ct,Le,De],gt=()=>[oa,"full",...z()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ci],breakpoint:[Ci],color:[P1],container:[Ci],"drop-shadow":[Ci],ease:["in","out","in-out"],font:[K2],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ci],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ci],shadow:[Ci],spacing:["px",ct],text:[Ci],"text-shadow":[Ci],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",oa,De,Le,S]}],container:["container"],columns:[{columns:[ct,De,Le,f]}],"break-after":[{"break-after":A()}],"break-before":[{"break-before":A()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:$()}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:K()}],"overscroll-x":[{"overscroll-x":K()}],"overscroll-y":[{"overscroll-y":K()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:W()}],"inset-x":[{"inset-x":W()}],"inset-y":[{"inset-y":W()}],start:[{"inset-s":W(),start:W()}],end:[{"inset-e":W(),end:W()}],"inset-bs":[{"inset-bs":W()}],"inset-be":[{"inset-be":W()}],top:[{top:W()}],right:[{right:W()}],bottom:[{bottom:W()}],left:[{left:W()}],visibility:["visible","invisible","collapse"],z:[{z:[ca,"auto",Le,De]}],basis:[{basis:[oa,"full","auto",f,...z()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ct,oa,"auto","initial","none",De]}],grow:[{grow:["",ct,Le,De]}],shrink:[{shrink:["",ct,Le,De]}],order:[{order:[ca,"first","last","none",Le,De]}],"grid-cols":[{"grid-cols":U()}],"col-start-end":[{col:ee()}],"col-start":[{"col-start":te()}],"col-end":[{"col-end":te()}],"grid-rows":[{"grid-rows":U()}],"row-start-end":[{row:ee()}],"row-start":[{"row-start":te()}],"row-end":[{"row-end":te()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":_e()}],"auto-rows":[{"auto-rows":_e()}],gap:[{gap:z()}],"gap-x":[{"gap-x":z()}],"gap-y":[{"gap-y":z()}],"justify-content":[{justify:[...se(),"normal"]}],"justify-items":[{"justify-items":[...X(),"normal"]}],"justify-self":[{"justify-self":["auto",...X()]}],"align-content":[{content:["normal",...se()]}],"align-items":[{items:[...X(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...X(),{baseline:["","last"]}]}],"place-content":[{"place-content":se()}],"place-items":[{"place-items":[...X(),"baseline"]}],"place-self":[{"place-self":["auto",...X()]}],p:[{p:z()}],px:[{px:z()}],py:[{py:z()}],ps:[{ps:z()}],pe:[{pe:z()}],pbs:[{pbs:z()}],pbe:[{pbe:z()}],pt:[{pt:z()}],pr:[{pr:z()}],pb:[{pb:z()}],pl:[{pl:z()}],m:[{m:F()}],mx:[{mx:F()}],my:[{my:F()}],ms:[{ms:F()}],me:[{me:F()}],mbs:[{mbs:F()}],mbe:[{mbe:F()}],mt:[{mt:F()}],mr:[{mr:F()}],mb:[{mb:F()}],ml:[{ml:F()}],"space-x":[{"space-x":z()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":z()}],"space-y-reverse":["space-y-reverse"],size:[{size:ne()}],"inline-size":[{inline:["auto",...V()]}],"min-inline-size":[{"min-inline":["auto",...V()]}],"max-inline-size":[{"max-inline":["none",...V()]}],"block-size":[{block:["auto",...fe()]}],"min-block-size":[{"min-block":["auto",...fe()]}],"max-block-size":[{"max-block":["none",...fe()]}],w:[{w:[f,"screen",...ne()]}],"min-w":[{"min-w":[f,"screen","none",...ne()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[c]},...ne()]}],h:[{h:["screen","lh",...ne()]}],"min-h":[{"min-h":["screen","lh","none",...ne()]}],"max-h":[{"max-h":["screen","lh",...ne()]}],"font-size":[{text:["base",r,Xl,Pa]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,eT,Y2]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",vh,De]}],"font-family":[{font:[Z2,Q2,t]}],"font-features":[{"font-features":[De]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[l,Le,De]}],"line-clamp":[{"line-clamp":[ct,"none",Le,Wx]}],leading:[{leading:[o,...z()]}],"list-image":[{"list-image":["none",Le,De]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Le,De]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:R()}],"text-color":[{text:R()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...le(),"wavy"]}],"text-decoration-thickness":[{decoration:[ct,"from-font","auto",Le,Pa]}],"text-decoration-color":[{decoration:R()}],"underline-offset":[{"underline-offset":[ct,"auto",Le,De]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Le,De]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Le,De]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:j()}],"bg-repeat":[{bg:I()}],"bg-size":[{bg:C()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ca,Le,De],radial:["",Le,De],conic:[ca,Le,De]},J2,X2]}],"bg-color":[{bg:R()}],"gradient-from-pos":[{from:ue()}],"gradient-via-pos":[{via:ue()}],"gradient-to-pos":[{to:ue()}],"gradient-from":[{from:R()}],"gradient-via":[{via:R()}],"gradient-to":[{to:R()}],rounded:[{rounded:be()}],"rounded-s":[{"rounded-s":be()}],"rounded-e":[{"rounded-e":be()}],"rounded-t":[{"rounded-t":be()}],"rounded-r":[{"rounded-r":be()}],"rounded-b":[{"rounded-b":be()}],"rounded-l":[{"rounded-l":be()}],"rounded-ss":[{"rounded-ss":be()}],"rounded-se":[{"rounded-se":be()}],"rounded-ee":[{"rounded-ee":be()}],"rounded-es":[{"rounded-es":be()}],"rounded-tl":[{"rounded-tl":be()}],"rounded-tr":[{"rounded-tr":be()}],"rounded-br":[{"rounded-br":be()}],"rounded-bl":[{"rounded-bl":be()}],"border-w":[{border:ye()}],"border-w-x":[{"border-x":ye()}],"border-w-y":[{"border-y":ye()}],"border-w-s":[{"border-s":ye()}],"border-w-e":[{"border-e":ye()}],"border-w-bs":[{"border-bs":ye()}],"border-w-be":[{"border-be":ye()}],"border-w-t":[{"border-t":ye()}],"border-w-r":[{"border-r":ye()}],"border-w-b":[{"border-b":ye()}],"border-w-l":[{"border-l":ye()}],"divide-x":[{"divide-x":ye()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ye()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...le(),"hidden","none"]}],"divide-style":[{divide:[...le(),"hidden","none"]}],"border-color":[{border:R()}],"border-color-x":[{"border-x":R()}],"border-color-y":[{"border-y":R()}],"border-color-s":[{"border-s":R()}],"border-color-e":[{"border-e":R()}],"border-color-bs":[{"border-bs":R()}],"border-color-be":[{"border-be":R()}],"border-color-t":[{"border-t":R()}],"border-color-r":[{"border-r":R()}],"border-color-b":[{"border-b":R()}],"border-color-l":[{"border-l":R()}],"divide-color":[{divide:R()}],"outline-style":[{outline:[...le(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ct,Le,De]}],"outline-w":[{outline:["",ct,Xl,Pa]}],"outline-color":[{outline:R()}],shadow:[{shadow:["","none",g,nu,tu]}],"shadow-color":[{shadow:R()}],"inset-shadow":[{"inset-shadow":["none",x,nu,tu]}],"inset-shadow-color":[{"inset-shadow":R()}],"ring-w":[{ring:ye()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:R()}],"ring-offset-w":[{"ring-offset":[ct,Pa]}],"ring-offset-color":[{"ring-offset":R()}],"inset-ring-w":[{"inset-ring":ye()}],"inset-ring-color":[{"inset-ring":R()}],"text-shadow":[{"text-shadow":["none",y,nu,tu]}],"text-shadow-color":[{"text-shadow":R()}],opacity:[{opacity:[ct,Le,De]}],"mix-blend":[{"mix-blend":[...xe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":xe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ct]}],"mask-image-linear-from-pos":[{"mask-linear-from":pe()}],"mask-image-linear-to-pos":[{"mask-linear-to":pe()}],"mask-image-linear-from-color":[{"mask-linear-from":R()}],"mask-image-linear-to-color":[{"mask-linear-to":R()}],"mask-image-t-from-pos":[{"mask-t-from":pe()}],"mask-image-t-to-pos":[{"mask-t-to":pe()}],"mask-image-t-from-color":[{"mask-t-from":R()}],"mask-image-t-to-color":[{"mask-t-to":R()}],"mask-image-r-from-pos":[{"mask-r-from":pe()}],"mask-image-r-to-pos":[{"mask-r-to":pe()}],"mask-image-r-from-color":[{"mask-r-from":R()}],"mask-image-r-to-color":[{"mask-r-to":R()}],"mask-image-b-from-pos":[{"mask-b-from":pe()}],"mask-image-b-to-pos":[{"mask-b-to":pe()}],"mask-image-b-from-color":[{"mask-b-from":R()}],"mask-image-b-to-color":[{"mask-b-to":R()}],"mask-image-l-from-pos":[{"mask-l-from":pe()}],"mask-image-l-to-pos":[{"mask-l-to":pe()}],"mask-image-l-from-color":[{"mask-l-from":R()}],"mask-image-l-to-color":[{"mask-l-to":R()}],"mask-image-x-from-pos":[{"mask-x-from":pe()}],"mask-image-x-to-pos":[{"mask-x-to":pe()}],"mask-image-x-from-color":[{"mask-x-from":R()}],"mask-image-x-to-color":[{"mask-x-to":R()}],"mask-image-y-from-pos":[{"mask-y-from":pe()}],"mask-image-y-to-pos":[{"mask-y-to":pe()}],"mask-image-y-from-color":[{"mask-y-from":R()}],"mask-image-y-to-color":[{"mask-y-to":R()}],"mask-image-radial":[{"mask-radial":[Le,De]}],"mask-image-radial-from-pos":[{"mask-radial-from":pe()}],"mask-image-radial-to-pos":[{"mask-radial-to":pe()}],"mask-image-radial-from-color":[{"mask-radial-from":R()}],"mask-image-radial-to-color":[{"mask-radial-to":R()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":P()}],"mask-image-conic-pos":[{"mask-conic":[ct]}],"mask-image-conic-from-pos":[{"mask-conic-from":pe()}],"mask-image-conic-to-pos":[{"mask-conic-to":pe()}],"mask-image-conic-from-color":[{"mask-conic-from":R()}],"mask-image-conic-to-color":[{"mask-conic-to":R()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:j()}],"mask-repeat":[{mask:I()}],"mask-size":[{mask:C()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Le,De]}],filter:[{filter:["","none",Le,De]}],blur:[{blur:Ue()}],brightness:[{brightness:[ct,Le,De]}],contrast:[{contrast:[ct,Le,De]}],"drop-shadow":[{"drop-shadow":["","none",v,nu,tu]}],"drop-shadow-color":[{"drop-shadow":R()}],grayscale:[{grayscale:["",ct,Le,De]}],"hue-rotate":[{"hue-rotate":[ct,Le,De]}],invert:[{invert:["",ct,Le,De]}],saturate:[{saturate:[ct,Le,De]}],sepia:[{sepia:["",ct,Le,De]}],"backdrop-filter":[{"backdrop-filter":["","none",Le,De]}],"backdrop-blur":[{"backdrop-blur":Ue()}],"backdrop-brightness":[{"backdrop-brightness":[ct,Le,De]}],"backdrop-contrast":[{"backdrop-contrast":[ct,Le,De]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ct,Le,De]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ct,Le,De]}],"backdrop-invert":[{"backdrop-invert":["",ct,Le,De]}],"backdrop-opacity":[{"backdrop-opacity":[ct,Le,De]}],"backdrop-saturate":[{"backdrop-saturate":[ct,Le,De]}],"backdrop-sepia":[{"backdrop-sepia":["",ct,Le,De]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":z()}],"border-spacing-x":[{"border-spacing-x":z()}],"border-spacing-y":[{"border-spacing-y":z()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Le,De]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ct,"initial",Le,De]}],ease:[{ease:["linear","initial",N,Le,De]}],delay:[{delay:[ct,Le,De]}],animate:[{animate:["none",O,Le,De]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[E,Le,De]}],"perspective-origin":[{"perspective-origin":$()}],rotate:[{rotate:Re()}],"rotate-x":[{"rotate-x":Re()}],"rotate-y":[{"rotate-y":Re()}],"rotate-z":[{"rotate-z":Re()}],scale:[{scale:Tt()}],"scale-x":[{"scale-x":Tt()}],"scale-y":[{"scale-y":Tt()}],"scale-z":[{"scale-z":Tt()}],"scale-3d":["scale-3d"],skew:[{skew:tt()}],"skew-x":[{"skew-x":tt()}],"skew-y":[{"skew-y":tt()}],transform:[{transform:[Le,De,"","none","gpu","cpu"]}],"transform-origin":[{origin:$()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:gt()}],"translate-x":[{"translate-x":gt()}],"translate-y":[{"translate-y":gt()}],"translate-z":[{"translate-z":gt()}],"translate-none":["translate-none"],accent:[{accent:R()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:R()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Le,De]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mbs":[{"scroll-mbs":z()}],"scroll-mbe":[{"scroll-mbe":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pbs":[{"scroll-pbs":z()}],"scroll-pbe":[{"scroll-pbe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Le,De]}],fill:[{fill:["none",...R()]}],"stroke-w":[{stroke:[ct,Xl,Pa,Wx]}],stroke:[{stroke:["none",...R()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},rT=D2(nT);function ae(...e){return rT(m2(e))}async function Dt(e,t){const r=await fetch(e,{...t,headers:{...w1(),...t?.headers}});if(!r.ok){const a=await r.text().catch(()=>"");throw new Error(`${r.status}: ${a||r.statusText}`)}return r.json()}function ri(e){return/[Zz]$/.test(e)||/[+-]\d{2}:\d{2}$/.test(e)?new Date(e):new Date(e.replace(" ","T")+"Z")}function Tu(e,t,r,a,l){const o=r.startsWith("/")?r:`${t}/${r}`,c=o.replace(/^\//,""),f=a??1,h=1;switch(e){case"vscode":return`vscode://file/${c}:${f}:${h}`;case"cursor":return`cursor://file/${c}:${f}:${h}`;case"windsurf":return`windsurf://file/${c}:${f}:${h}`;case"jetbrains":return`jetbrains://open?file=${encodeURIComponent(o)}&line=${f}`;case"sublime":return`subl://open?url=file://${encodeURIComponent(o)}&line=${f}`}}function iT(e){return e==="success"?"complete":e==="incomplete"?"incomplete":e==="failed"?"failed":e==="cancelled"?"cancelled":"running"}const Q1=_.createContext(null);function aT({children:e}){const[t,r]=_.useState(new Map),[a,l]=_.useState(null),o=_.useRef(!1),{socket:c}=si(),f=_.useMemo(()=>Array.from(t.values()),[t]),h=_.useMemo(()=>f.filter(v=>v.status==="running").length,[f]),m=_.useMemo(()=>h>0,[h]);_.useEffect(()=>{o.current||(o.current=!0,Dt("/api/commands/active").then(v=>{if(v.commands.length>0){const k=new Map;let E=null;for(const S of v.commands)k.set(S.execution_id,{executionId:S.execution_id,command:S.command,output:S.output??"",events:[],status:"running",exitCode:null,startedAt:S.started_at}),E=S.execution_id;r(k),l(E);for(const S of v.commands)Dt(`/api/commands/${S.execution_id}/events`).then(N=>{!N.events||N.events.length===0||r(O=>{const A=O.get(S.execution_id);if(!A)return O;const P=new Set(A.events.map(K=>K.seq)),$=[...A.events];for(const K of N.events)P.has(K.seq)||$.push(K);$.sort((K,z)=>K.seq-z.seq);const M=new Map(O);return M.set(S.execution_id,{...A,events:$}),M})}).catch(()=>{})}}).catch(()=>{}))},[]),ut("command:started",v=>{const k={executionId:v.execution_id,command:v.command,output:"",events:[],status:"running",exitCode:null,startedAt:v.started_at};r(E=>{const S=new Map(E);return S.set(v.execution_id,k),S}),l(v.execution_id)}),ut("command:output",v=>{r(k=>{const E=k.get(v.execution_id);if(!E)return k;const S=new Map(k);return S.set(v.execution_id,{...E,output:E.output+v.content}),S})}),ut("command:event",v=>{r(k=>{const E=k.get(v.executionId);if(!E||E.events.some(N=>N.seq===v.seq))return k;const S=new Map(k);return S.set(v.executionId,{...E,events:[...E.events,v]}),S})}),ut("command:finished",v=>{r(k=>{const E=k.get(v.execution_id);if(!E)return k;const S=new Map(k),N=v.outcome?iT(v.outcome):v.exitCode===-2?"cancelled":v.exitCode===0?"complete":"failed";return S.set(v.execution_id,{...E,status:N,exitCode:v.exitCode}),S})});const g=_.useCallback(v=>{r(k=>{const E=new Map(k);return E.delete(v),l(S=>{if(S!==v)return S;const N=Array.from(E.keys());return N.length>0?N[N.length-1]:null}),E})},[]),x=_.useCallback(v=>{c?.emit("command:cancel",{execution_id:v})},[c]),y=_.useMemo(()=>({tabs:f,activeTabId:a,runningCount:h,isRunning:m,setActiveTabId:l,dismissTab:g,cancelCommand:x}),[f,a,h,m,g,x]);return d.jsx(Q1,{value:y,children:e})}function Km(){const e=_.useContext(Q1);if(!e)throw new Error("useCommandState must be used within CommandStateProvider");return e}/**
|
|
62
|
+
* @license lucide-react v0.577.0 - ISC
|
|
63
|
+
*
|
|
64
|
+
* This source code is licensed under the ISC license.
|
|
65
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
+
*/const X1=(...e)=>e.filter((t,r,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===r).join(" ").trim();/**
|
|
67
|
+
* @license lucide-react v0.577.0 - ISC
|
|
68
|
+
*
|
|
69
|
+
* This source code is licensed under the ISC license.
|
|
70
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
+
*/const sT=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
72
|
+
* @license lucide-react v0.577.0 - ISC
|
|
73
|
+
*
|
|
74
|
+
* This source code is licensed under the ISC license.
|
|
75
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
+
*/const lT=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,a)=>a?a.toUpperCase():r.toLowerCase());/**
|
|
77
|
+
* @license lucide-react v0.577.0 - ISC
|
|
78
|
+
*
|
|
79
|
+
* This source code is licensed under the ISC license.
|
|
80
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
+
*/const ty=e=>{const t=lT(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
|
|
82
|
+
* @license lucide-react v0.577.0 - ISC
|
|
83
|
+
*
|
|
84
|
+
* This source code is licensed under the ISC license.
|
|
85
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
+
*/var oT={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"};/**
|
|
87
|
+
* @license lucide-react v0.577.0 - ISC
|
|
88
|
+
*
|
|
89
|
+
* This source code is licensed under the ISC license.
|
|
90
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
+
*/const cT=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};/**
|
|
92
|
+
* @license lucide-react v0.577.0 - ISC
|
|
93
|
+
*
|
|
94
|
+
* This source code is licensed under the ISC license.
|
|
95
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
+
*/const uT=_.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:a,className:l="",children:o,iconNode:c,...f},h)=>_.createElement("svg",{ref:h,...oT,width:t,height:t,stroke:e,strokeWidth:a?Number(r)*24/Number(t):r,className:X1("lucide",l),...!o&&!cT(f)&&{"aria-hidden":"true"},...f},[...c.map(([m,g])=>_.createElement(m,g)),...Array.isArray(o)?o:[o]]));/**
|
|
97
|
+
* @license lucide-react v0.577.0 - ISC
|
|
98
|
+
*
|
|
99
|
+
* This source code is licensed under the ISC license.
|
|
100
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
+
*/const Ne=(e,t)=>{const r=_.forwardRef(({className:a,...l},o)=>_.createElement(uT,{ref:o,iconNode:t,className:X1(`lucide-${sT(ty(e))}`,`lucide-${e}`,a),...l}));return r.displayName=ty(e),r};/**
|
|
102
|
+
* @license lucide-react v0.577.0 - ISC
|
|
103
|
+
*
|
|
104
|
+
* This source code is licensed under the ISC license.
|
|
105
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
+
*/const dT=[["circle",{cx:"16",cy:"4",r:"1",key:"1grugj"}],["path",{d:"m18 19 1-7-6 1",key:"r0i19z"}],["path",{d:"m5 8 3-3 5.5 3-2.36 3.5",key:"9ptxx2"}],["path",{d:"M4.24 14.5a5 5 0 0 0 6.88 6",key:"10kmtu"}],["path",{d:"M13.76 17.5a5 5 0 0 0-6.88-6",key:"2qq6rc"}]],fT=Ne("accessibility",dT);/**
|
|
107
|
+
* @license lucide-react v0.577.0 - ISC
|
|
108
|
+
*
|
|
109
|
+
* This source code is licensed under the ISC license.
|
|
110
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
+
*/const hT=[["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"}]],Vm=Ne("activity",hT);/**
|
|
112
|
+
* @license lucide-react v0.577.0 - ISC
|
|
113
|
+
*
|
|
114
|
+
* This source code is licensed under the ISC license.
|
|
115
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
+
*/const mT=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Z1=Ne("arrow-down",mT);/**
|
|
117
|
+
* @license lucide-react v0.577.0 - ISC
|
|
118
|
+
*
|
|
119
|
+
* This source code is licensed under the ISC license.
|
|
120
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
+
*/const pT=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],xa=Ne("arrow-left",pT);/**
|
|
122
|
+
* @license lucide-react v0.577.0 - ISC
|
|
123
|
+
*
|
|
124
|
+
* This source code is licensed under the ISC license.
|
|
125
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
+
*/const gT=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],W1=Ne("arrow-up-down",gT);/**
|
|
127
|
+
* @license lucide-react v0.577.0 - ISC
|
|
128
|
+
*
|
|
129
|
+
* This source code is licensed under the ISC license.
|
|
130
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
+
*/const bT=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],xT=Ne("arrow-up",bT);/**
|
|
132
|
+
* @license lucide-react v0.577.0 - ISC
|
|
133
|
+
*
|
|
134
|
+
* This source code is licensed under the ISC license.
|
|
135
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
136
|
+
*/const yT=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}]],vT=Ne("ban",yT);/**
|
|
137
|
+
* @license lucide-react v0.577.0 - ISC
|
|
138
|
+
*
|
|
139
|
+
* This source code is licensed under the ISC license.
|
|
140
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
141
|
+
*/const kT=[["path",{d:"M10 22V7a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5a1 1 0 0 0-1-1H2",key:"1ah6g2"}],["rect",{x:"14",y:"2",width:"8",height:"8",rx:"1",key:"88lufb"}]],wT=Ne("blocks",kT);/**
|
|
142
|
+
* @license lucide-react v0.577.0 - ISC
|
|
143
|
+
*
|
|
144
|
+
* This source code is licensed under the ISC license.
|
|
145
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
+
*/const _T=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],ET=Ne("book-open",_T);/**
|
|
147
|
+
* @license lucide-react v0.577.0 - ISC
|
|
148
|
+
*
|
|
149
|
+
* This source code is licensed under the ISC license.
|
|
150
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
151
|
+
*/const NT=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],ST=Ne("bot",NT);/**
|
|
152
|
+
* @license lucide-react v0.577.0 - ISC
|
|
153
|
+
*
|
|
154
|
+
* This source code is licensed under the ISC license.
|
|
155
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
156
|
+
*/const zT=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],J1=Ne("brain",zT);/**
|
|
157
|
+
* @license lucide-react v0.577.0 - ISC
|
|
158
|
+
*
|
|
159
|
+
* This source code is licensed under the ISC license.
|
|
160
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
+
*/const CT=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Mr=Ne("check",CT);/**
|
|
162
|
+
* @license lucide-react v0.577.0 - ISC
|
|
163
|
+
*
|
|
164
|
+
* This source code is licensed under the ISC license.
|
|
165
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
166
|
+
*/const TT=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Za=Ne("chevron-down",TT);/**
|
|
167
|
+
* @license lucide-react v0.577.0 - ISC
|
|
168
|
+
*
|
|
169
|
+
* This source code is licensed under the ISC license.
|
|
170
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
171
|
+
*/const AT=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],ji=Ne("chevron-right",AT);/**
|
|
172
|
+
* @license lucide-react v0.577.0 - ISC
|
|
173
|
+
*
|
|
174
|
+
* This source code is licensed under the ISC license.
|
|
175
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
176
|
+
*/const RT=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Ku=Ne("circle-alert",RT);/**
|
|
177
|
+
* @license lucide-react v0.577.0 - ISC
|
|
178
|
+
*
|
|
179
|
+
* This source code is licensed under the ISC license.
|
|
180
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
181
|
+
*/const OT=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],co=Ne("circle-check",OT);/**
|
|
182
|
+
* @license lucide-react v0.577.0 - ISC
|
|
183
|
+
*
|
|
184
|
+
* This source code is licensed under the ISC license.
|
|
185
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
186
|
+
*/const MT=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],ek=Ne("circle-question-mark",MT);/**
|
|
187
|
+
* @license lucide-react v0.577.0 - ISC
|
|
188
|
+
*
|
|
189
|
+
* This source code is licensed under the ISC license.
|
|
190
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
191
|
+
*/const jT=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"9",x2:"15",y1:"15",y2:"9",key:"1dfufj"}]],DT=Ne("circle-slash",jT);/**
|
|
192
|
+
* @license lucide-react v0.577.0 - ISC
|
|
193
|
+
*
|
|
194
|
+
* This source code is licensed under the ISC license.
|
|
195
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
196
|
+
*/const LT=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],cm=Ne("circle-x",LT);/**
|
|
197
|
+
* @license lucide-react v0.577.0 - ISC
|
|
198
|
+
*
|
|
199
|
+
* This source code is licensed under the ISC license.
|
|
200
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
201
|
+
*/const IT=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],BT=Ne("circle",IT);/**
|
|
202
|
+
* @license lucide-react v0.577.0 - ISC
|
|
203
|
+
*
|
|
204
|
+
* This source code is licensed under the ISC license.
|
|
205
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
206
|
+
*/const UT=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2",key:"4jdomd"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v4",key:"3hqy98"}],["path",{d:"M21 14H11",key:"1bme5i"}],["path",{d:"m15 10-4 4 4 4",key:"5dvupr"}]],tk=Ne("clipboard-copy",UT);/**
|
|
207
|
+
* @license lucide-react v0.577.0 - ISC
|
|
208
|
+
*
|
|
209
|
+
* This source code is licensed under the ISC license.
|
|
210
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
211
|
+
*/const FT=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],nk=Ne("clock",FT);/**
|
|
212
|
+
* @license lucide-react v0.577.0 - ISC
|
|
213
|
+
*
|
|
214
|
+
* This source code is licensed under the ISC license.
|
|
215
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
216
|
+
*/const PT=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],HT=Ne("cloud",PT);/**
|
|
217
|
+
* @license lucide-react v0.577.0 - ISC
|
|
218
|
+
*
|
|
219
|
+
* This source code is licensed under the ISC license.
|
|
220
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
221
|
+
*/const qT=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}]],$T=Ne("compass",qT);/**
|
|
222
|
+
* @license lucide-react v0.577.0 - ISC
|
|
223
|
+
*
|
|
224
|
+
* This source code is licensed under the ISC license.
|
|
225
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
226
|
+
*/const GT=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Vu=Ne("copy",GT);/**
|
|
227
|
+
* @license lucide-react v0.577.0 - ISC
|
|
228
|
+
*
|
|
229
|
+
* This source code is licensed under the ISC license.
|
|
230
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
231
|
+
*/const KT=[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]],VT=Ne("crown",KT);/**
|
|
232
|
+
* @license lucide-react v0.577.0 - ISC
|
|
233
|
+
*
|
|
234
|
+
* This source code is licensed under the ISC license.
|
|
235
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
236
|
+
*/const YT=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],QT=Ne("database",YT);/**
|
|
237
|
+
* @license lucide-react v0.577.0 - ISC
|
|
238
|
+
*
|
|
239
|
+
* This source code is licensed under the ISC license.
|
|
240
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
241
|
+
*/const XT=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],ZT=Ne("ellipsis",XT);/**
|
|
242
|
+
* @license lucide-react v0.577.0 - ISC
|
|
243
|
+
*
|
|
244
|
+
* This source code is licensed under the ISC license.
|
|
245
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
246
|
+
*/const WT=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Ym=Ne("external-link",WT);/**
|
|
247
|
+
* @license lucide-react v0.577.0 - ISC
|
|
248
|
+
*
|
|
249
|
+
* This source code is licensed under the ISC license.
|
|
250
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
251
|
+
*/const JT=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],eA=Ne("eye",JT);/**
|
|
252
|
+
* @license lucide-react v0.577.0 - ISC
|
|
253
|
+
*
|
|
254
|
+
* This source code is licensed under the ISC license.
|
|
255
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
256
|
+
*/const tA=[["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 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]],nA=Ne("file-code",tA);/**
|
|
257
|
+
* @license lucide-react v0.577.0 - ISC
|
|
258
|
+
*
|
|
259
|
+
* This source code is licensed under the ISC license.
|
|
260
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
261
|
+
*/const rA=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["circle",{cx:"11.5",cy:"14.5",r:"2.5",key:"1bq0ko"}],["path",{d:"M13.3 16.3 15 18",key:"2quom7"}]],ii=Ne("file-search",rA);/**
|
|
262
|
+
* @license lucide-react v0.577.0 - ISC
|
|
263
|
+
*
|
|
264
|
+
* This source code is licensed under the ISC license.
|
|
265
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
266
|
+
*/const iA=[["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"}]],Yu=Ne("file-text",iA);/**
|
|
267
|
+
* @license lucide-react v0.577.0 - ISC
|
|
268
|
+
*
|
|
269
|
+
* This source code is licensed under the ISC license.
|
|
270
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
271
|
+
*/const aA=[["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"}]],sA=Ne("file",aA);/**
|
|
272
|
+
* @license lucide-react v0.577.0 - ISC
|
|
273
|
+
*
|
|
274
|
+
* This source code is licensed under the ISC license.
|
|
275
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
276
|
+
*/const lA=[["path",{d:"m6 14 1.45-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.55 6a2 2 0 0 1-1.94 1.5H4a2 2 0 0 1-2-2V5c0-1.1.9-2 2-2h3.93a2 2 0 0 1 1.66.9l.82 1.2a2 2 0 0 0 1.66.9H18a2 2 0 0 1 2 2v2",key:"1nmvlm"}],["circle",{cx:"14",cy:"15",r:"1",key:"1gm4qj"}]],oA=Ne("folder-open-dot",lA);/**
|
|
277
|
+
* @license lucide-react v0.577.0 - ISC
|
|
278
|
+
*
|
|
279
|
+
* This source code is licensed under the ISC license.
|
|
280
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
281
|
+
*/const cA=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],uA=Ne("folder-open",cA);/**
|
|
282
|
+
* @license lucide-react v0.577.0 - ISC
|
|
283
|
+
*
|
|
284
|
+
* This source code is licensed under the ISC license.
|
|
285
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
286
|
+
*/const dA=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],rk=Ne("funnel",dA);/**
|
|
287
|
+
* @license lucide-react v0.577.0 - ISC
|
|
288
|
+
*
|
|
289
|
+
* This source code is licensed under the ISC license.
|
|
290
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
291
|
+
*/const fA=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],hA=Ne("gauge",fA);/**
|
|
292
|
+
* @license lucide-react v0.577.0 - ISC
|
|
293
|
+
*
|
|
294
|
+
* This source code is licensed under the ISC license.
|
|
295
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
296
|
+
*/const mA=[["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"}]],Ys=Ne("git-branch",mA);/**
|
|
297
|
+
* @license lucide-react v0.577.0 - ISC
|
|
298
|
+
*
|
|
299
|
+
* This source code is licensed under the ISC license.
|
|
300
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
301
|
+
*/const pA=[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]],ik=Ne("github",pA);/**
|
|
302
|
+
* @license lucide-react v0.577.0 - ISC
|
|
303
|
+
*
|
|
304
|
+
* This source code is licensed under the ISC license.
|
|
305
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
306
|
+
*/const gA=[["path",{d:"m11 17 2 2a1 1 0 1 0 3-3",key:"efffak"}],["path",{d:"m14 14 2.5 2.5a1 1 0 1 0 3-3l-3.88-3.88a3 3 0 0 0-4.24 0l-.88.88a1 1 0 1 1-3-3l2.81-2.81a5.79 5.79 0 0 1 7.06-.87l.47.28a2 2 0 0 0 1.42.25L21 4",key:"9pr0kb"}],["path",{d:"m21 3 1 11h-2",key:"1tisrp"}],["path",{d:"M3 3 2 14l6.5 6.5a1 1 0 1 0 3-3",key:"1uvwmv"}],["path",{d:"M3 4h8",key:"1ep09j"}]],bA=Ne("handshake",gA);/**
|
|
307
|
+
* @license lucide-react v0.577.0 - ISC
|
|
308
|
+
*
|
|
309
|
+
* This source code is licensed under the ISC license.
|
|
310
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
311
|
+
*/const xA=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],ny=Ne("history",xA);/**
|
|
312
|
+
* @license lucide-react v0.577.0 - ISC
|
|
313
|
+
*
|
|
314
|
+
* This source code is licensed under the ISC license.
|
|
315
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
316
|
+
*/const yA=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],vA=Ne("house",yA);/**
|
|
317
|
+
* @license lucide-react v0.577.0 - ISC
|
|
318
|
+
*
|
|
319
|
+
* This source code is licensed under the ISC license.
|
|
320
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
321
|
+
*/const kA=[["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"}]],wA=Ne("layers",kA);/**
|
|
322
|
+
* @license lucide-react v0.577.0 - ISC
|
|
323
|
+
*
|
|
324
|
+
* This source code is licensed under the ISC license.
|
|
325
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
326
|
+
*/const _A=[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]],EA=Ne("lightbulb",_A);/**
|
|
327
|
+
* @license lucide-react v0.577.0 - ISC
|
|
328
|
+
*
|
|
329
|
+
* This source code is licensed under the ISC license.
|
|
330
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
331
|
+
*/const NA=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],SA=Ne("link-2",NA);/**
|
|
332
|
+
* @license lucide-react v0.577.0 - ISC
|
|
333
|
+
*
|
|
334
|
+
* This source code is licensed under the ISC license.
|
|
335
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
336
|
+
*/const zA=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],qr=Ne("loader-circle",zA);/**
|
|
337
|
+
* @license lucide-react v0.577.0 - ISC
|
|
338
|
+
*
|
|
339
|
+
* This source code is licensed under the ISC license.
|
|
340
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
341
|
+
*/const CA=[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]],ya=Ne("map",CA);/**
|
|
342
|
+
* @license lucide-react v0.577.0 - ISC
|
|
343
|
+
*
|
|
344
|
+
* This source code is licensed under the ISC license.
|
|
345
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
346
|
+
*/const TA=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],ry=Ne("message-circle",TA);/**
|
|
347
|
+
* @license lucide-react v0.577.0 - ISC
|
|
348
|
+
*
|
|
349
|
+
* This source code is licensed under the ISC license.
|
|
350
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
351
|
+
*/const AA=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],Au=Ne("message-square",AA);/**
|
|
352
|
+
* @license lucide-react v0.577.0 - ISC
|
|
353
|
+
*
|
|
354
|
+
* This source code is licensed under the ISC license.
|
|
355
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
356
|
+
*/const RA=[["path",{d:"M5 12h14",key:"1ays0h"}]],xo=Ne("minus",RA);/**
|
|
357
|
+
* @license lucide-react v0.577.0 - ISC
|
|
358
|
+
*
|
|
359
|
+
* This source code is licensed under the ISC license.
|
|
360
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
361
|
+
*/const OA=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],MA=Ne("monitor",OA);/**
|
|
362
|
+
* @license lucide-react v0.577.0 - ISC
|
|
363
|
+
*
|
|
364
|
+
* This source code is licensed under the ISC license.
|
|
365
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
366
|
+
*/const jA=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],DA=Ne("moon",jA);/**
|
|
367
|
+
* @license lucide-react v0.577.0 - ISC
|
|
368
|
+
*
|
|
369
|
+
* This source code is licensed under the ISC license.
|
|
370
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
371
|
+
*/const LA=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M9 21V9",key:"1oto5p"}]],IA=Ne("panels-top-left",LA);/**
|
|
372
|
+
* @license lucide-react v0.577.0 - ISC
|
|
373
|
+
*
|
|
374
|
+
* This source code is licensed under the ISC license.
|
|
375
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
376
|
+
*/const BA=[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],yo=Ne("pen-line",BA);/**
|
|
377
|
+
* @license lucide-react v0.577.0 - ISC
|
|
378
|
+
*
|
|
379
|
+
* This source code is licensed under the ISC license.
|
|
380
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
381
|
+
*/const UA=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],$s=Ne("play",UA);/**
|
|
382
|
+
* @license lucide-react v0.577.0 - ISC
|
|
383
|
+
*
|
|
384
|
+
* This source code is licensed under the ISC license.
|
|
385
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
386
|
+
*/const FA=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],pa=Ne("plus",FA);/**
|
|
387
|
+
* @license lucide-react v0.577.0 - ISC
|
|
388
|
+
*
|
|
389
|
+
* This source code is licensed under the ISC license.
|
|
390
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
391
|
+
*/const PA=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],vo=Ne("refresh-cw",PA);/**
|
|
392
|
+
* @license lucide-react v0.577.0 - ISC
|
|
393
|
+
*
|
|
394
|
+
* This source code is licensed under the ISC license.
|
|
395
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
396
|
+
*/const HA=[["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"}]],qA=Ne("rocket",HA);/**
|
|
397
|
+
* @license lucide-react v0.577.0 - ISC
|
|
398
|
+
*
|
|
399
|
+
* This source code is licensed under the ISC license.
|
|
400
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
401
|
+
*/const $A=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],ak=Ne("rotate-ccw",$A);/**
|
|
402
|
+
* @license lucide-react v0.577.0 - ISC
|
|
403
|
+
*
|
|
404
|
+
* This source code is licensed under the ISC license.
|
|
405
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
406
|
+
*/const GA=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],iy=Ne("save",GA);/**
|
|
407
|
+
* @license lucide-react v0.577.0 - ISC
|
|
408
|
+
*
|
|
409
|
+
* This source code is licensed under the ISC license.
|
|
410
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
411
|
+
*/const KA=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Qu=Ne("search",KA);/**
|
|
412
|
+
* @license lucide-react v0.577.0 - ISC
|
|
413
|
+
*
|
|
414
|
+
* This source code is licensed under the ISC license.
|
|
415
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
416
|
+
*/const VA=[["path",{d:"M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z",key:"117uat"}],["path",{d:"M6 12h16",key:"s4cdu5"}]],YA=Ne("send-horizontal",VA);/**
|
|
417
|
+
* @license lucide-react v0.577.0 - ISC
|
|
418
|
+
*
|
|
419
|
+
* This source code is licensed under the ISC license.
|
|
420
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
421
|
+
*/const QA=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],ay=Ne("send",QA);/**
|
|
422
|
+
* @license lucide-react v0.577.0 - ISC
|
|
423
|
+
*
|
|
424
|
+
* This source code is licensed under the ISC license.
|
|
425
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
426
|
+
*/const XA=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],ZA=Ne("server",XA);/**
|
|
427
|
+
* @license lucide-react v0.577.0 - ISC
|
|
428
|
+
*
|
|
429
|
+
* This source code is licensed under the ISC license.
|
|
430
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
431
|
+
*/const WA=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],sk=Ne("settings-2",WA);/**
|
|
432
|
+
* @license lucide-react v0.577.0 - ISC
|
|
433
|
+
*
|
|
434
|
+
* This source code is licensed under the ISC license.
|
|
435
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
436
|
+
*/const JA=[["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:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],Qm=Ne("shield-alert",JA);/**
|
|
437
|
+
* @license lucide-react v0.577.0 - ISC
|
|
438
|
+
*
|
|
439
|
+
* This source code is licensed under the ISC license.
|
|
440
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
441
|
+
*/const eR=[["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"}]],tR=Ne("shield-check",eR);/**
|
|
442
|
+
* @license lucide-react v0.577.0 - ISC
|
|
443
|
+
*
|
|
444
|
+
* This source code is licensed under the ISC license.
|
|
445
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
446
|
+
*/const nR=[["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"}]],rR=Ne("shield",nR);/**
|
|
447
|
+
* @license lucide-react v0.577.0 - ISC
|
|
448
|
+
*
|
|
449
|
+
* This source code is licensed under the ISC license.
|
|
450
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
451
|
+
*/const iR=[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]],aR=Ne("smartphone",iR);/**
|
|
452
|
+
* @license lucide-react v0.577.0 - ISC
|
|
453
|
+
*
|
|
454
|
+
* This source code is licensed under the ISC license.
|
|
455
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
456
|
+
*/const sR=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],Ro=Ne("sparkles",sR);/**
|
|
457
|
+
* @license lucide-react v0.577.0 - ISC
|
|
458
|
+
*
|
|
459
|
+
* This source code is licensed under the ISC license.
|
|
460
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
461
|
+
*/const lR=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],oR=Ne("square",lR);/**
|
|
462
|
+
* @license lucide-react v0.577.0 - ISC
|
|
463
|
+
*
|
|
464
|
+
* This source code is licensed under the ISC license.
|
|
465
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
466
|
+
*/const cR=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],uR=Ne("sun",cR);/**
|
|
467
|
+
* @license lucide-react v0.577.0 - ISC
|
|
468
|
+
*
|
|
469
|
+
* This source code is licensed under the ISC license.
|
|
470
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
471
|
+
*/const dR=[["polyline",{points:"14.5 17.5 3 6 3 3 6 3 17.5 14.5",key:"1hfsw2"}],["line",{x1:"13",x2:"19",y1:"19",y2:"13",key:"1vrmhu"}],["line",{x1:"16",x2:"20",y1:"16",y2:"20",key:"1bron3"}],["line",{x1:"19",x2:"21",y1:"21",y2:"19",key:"13pww6"}],["polyline",{points:"14.5 6.5 18 3 21 3 21 6 17.5 9.5",key:"hbey2j"}],["line",{x1:"5",x2:"9",y1:"14",y2:"18",key:"1hf58s"}],["line",{x1:"7",x2:"4",y1:"17",y2:"20",key:"pidxm4"}],["line",{x1:"3",x2:"5",y1:"19",y2:"21",key:"1pehsh"}]],fR=Ne("swords",dR);/**
|
|
472
|
+
* @license lucide-react v0.577.0 - ISC
|
|
473
|
+
*
|
|
474
|
+
* This source code is licensed under the ISC license.
|
|
475
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
476
|
+
*/const hR=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Oi=Ne("terminal",hR);/**
|
|
477
|
+
* @license lucide-react v0.577.0 - ISC
|
|
478
|
+
*
|
|
479
|
+
* This source code is licensed under the ISC license.
|
|
480
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
481
|
+
*/const mR=[["path",{d:"M14.5 2v17.5c0 1.4-1.1 2.5-2.5 2.5c-1.4 0-2.5-1.1-2.5-2.5V2",key:"125lnx"}],["path",{d:"M8.5 2h7",key:"csnxdl"}],["path",{d:"M14.5 16h-5",key:"1ox875"}]],pR=Ne("test-tube",mR);/**
|
|
482
|
+
* @license lucide-react v0.577.0 - ISC
|
|
483
|
+
*
|
|
484
|
+
* This source code is licensed under the ISC license.
|
|
485
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
486
|
+
*/const gR=[["path",{d:"M9 2v17.5A2.5 2.5 0 0 1 6.5 22A2.5 2.5 0 0 1 4 19.5V2",key:"1hjrqt"}],["path",{d:"M20 2v17.5a2.5 2.5 0 0 1-2.5 2.5a2.5 2.5 0 0 1-2.5-2.5V2",key:"16lc8n"}],["path",{d:"M3 2h7",key:"7s29d5"}],["path",{d:"M14 2h7",key:"7sicin"}],["path",{d:"M9 16H4",key:"1bfye3"}],["path",{d:"M20 16h-5",key:"ddnjpe"}]],bR=Ne("test-tubes",gR);/**
|
|
487
|
+
* @license lucide-react v0.577.0 - ISC
|
|
488
|
+
*
|
|
489
|
+
* This source code is licensed under the ISC license.
|
|
490
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
491
|
+
*/const xR=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],yR=Ne("trash-2",xR);/**
|
|
492
|
+
* @license lucide-react v0.577.0 - ISC
|
|
493
|
+
*
|
|
494
|
+
* This source code is licensed under the ISC license.
|
|
495
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
496
|
+
*/const vR=[["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"}]],Oo=Ne("triangle-alert",vR);/**
|
|
497
|
+
* @license lucide-react v0.577.0 - ISC
|
|
498
|
+
*
|
|
499
|
+
* This source code is licensed under the ISC license.
|
|
500
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
501
|
+
*/const kR=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]],wR=Ne("user-plus",kR);/**
|
|
502
|
+
* @license lucide-react v0.577.0 - ISC
|
|
503
|
+
*
|
|
504
|
+
* This source code is licensed under the ISC license.
|
|
505
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
506
|
+
*/const _R=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Va=Ne("user",_R);/**
|
|
507
|
+
* @license lucide-react v0.577.0 - ISC
|
|
508
|
+
*
|
|
509
|
+
* This source code is licensed under the ISC license.
|
|
510
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
511
|
+
*/const ER=[["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"}]],Xm=Ne("users",ER);/**
|
|
512
|
+
* @license lucide-react v0.577.0 - ISC
|
|
513
|
+
*
|
|
514
|
+
* This source code is licensed under the ISC license.
|
|
515
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
516
|
+
*/const NR=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],lk=Ne("wrench",NR);/**
|
|
517
|
+
* @license lucide-react v0.577.0 - ISC
|
|
518
|
+
*
|
|
519
|
+
* This source code is licensed under the ISC license.
|
|
520
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
521
|
+
*/const SR=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Bn=Ne("x",SR);function Qs(){return nn({queryKey:["config"],queryFn:()=>Dt("/api/config"),staleTime:1/0})}const zR=[{to:"/",label:"Home",icon:vA},{to:"/commands",label:"Commands",icon:Oi},{to:"/reviewers",label:"Team",icon:Xm},{to:"/sessions",label:"Sessions",icon:Ys},{to:"/reviews",label:"Reviews",icon:ii}],CR={connected:"bg-emerald-500",connecting:"bg-amber-500 animate-pulse",reconnecting:"bg-amber-500 animate-pulse",disconnected:"bg-red-500"};function TR(){const e=ai(),{status:t}=si(),{runningCount:r}=Km(),{data:a}=Qs();return _.useEffect(()=>{if(a?.workspaceName){const l=a.gitBranch?` (${a.gitBranch})`:"";document.title=`${a.workspaceName}${l} — OCR Dashboard`}else document.title="OCR Dashboard"},[a?.workspaceName,a?.gitBranch]),d.jsxs("aside",{className:"flex h-full w-56 flex-col border-r border-zinc-200 bg-zinc-50 dark:border-zinc-800 dark:bg-zinc-950",children:[d.jsxs("div",{className:"group/brand relative flex h-14 items-center gap-2 border-b border-zinc-200 px-4 dark:border-zinc-800",children:[d.jsx(ii,{className:"h-5 w-5 shrink-0 text-zinc-700 dark:text-zinc-300"}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsx("span",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:"OCR Dashboard"}),a?.workspaceName&&d.jsxs("span",{className:"block truncate text-[11px] text-zinc-500 dark:text-zinc-400",children:[a.workspaceName,a.gitBranch&&d.jsxs("span",{className:"ml-1 text-zinc-400 dark:text-zinc-500",children:["(",a.gitBranch,")"]})]})]}),a?.workspaceName&&d.jsxs("div",{className:"pointer-events-none absolute left-full top-2 z-50 ml-2 min-w-[280px] max-w-sm opacity-0 transition-opacity delay-300 group-hover/brand:opacity-100",children:[d.jsx("div",{className:"absolute -left-1 top-3 h-2 w-2 rotate-45 bg-zinc-900 dark:bg-zinc-700"}),d.jsxs("div",{className:"relative rounded-lg bg-zinc-900 px-3 py-2 text-xs shadow-lg dark:bg-zinc-700",children:[d.jsx("div",{className:"font-medium text-white",children:a.workspaceName}),a.gitBranch&&d.jsx("div",{className:"mt-0.5 font-mono text-emerald-400",children:a.gitBranch}),d.jsx("div",{className:"mt-1.5 break-words border-t border-zinc-700 pt-1.5 font-mono text-[10px] text-zinc-400 dark:border-zinc-600",children:a.projectRoot})]})]})]}),d.jsx("nav",{className:"flex-1 space-y-1 p-2",children:zR.map(({to:l,label:o,icon:c})=>{const f=l==="/"?e.pathname==="/":e.pathname.startsWith(l);return d.jsxs(In,{to:l,className:ae("flex items-center gap-2 rounded-md px-3 py-2 text-sm transition-colors",f?"bg-zinc-200 font-medium text-zinc-900 dark:bg-zinc-800 dark:text-zinc-100":"text-zinc-600 hover:bg-zinc-100 hover:text-zinc-900 dark:text-zinc-400 dark:hover:bg-zinc-900 dark:hover:text-zinc-100"),children:[d.jsx(c,{className:"h-4 w-4"}),o,l==="/commands"&&r>0&&d.jsx("span",{className:"ml-auto inline-flex h-5 min-w-[20px] items-center justify-center rounded-full bg-indigo-500 px-1.5 text-[10px] font-semibold text-white",children:r})]},l)})}),d.jsx("div",{className:"border-t border-zinc-200 p-3 dark:border-zinc-800",children:d.jsxs("div",{role:"status","aria-label":`Connection status: ${t}`,className:"flex items-center gap-2 text-xs text-zinc-500 dark:text-zinc-400",children:[d.jsx("div",{className:ae("h-2 w-2 rounded-full",CR[t]),"aria-hidden":"true"}),d.jsx("span",{className:"capitalize",children:t})]})})]})}const AR={system:MA,light:uR,dark:DA};function RR(e){if(e==="/")return[{label:"Home",path:"/"}];const t=e.split("/").filter(Boolean),r=[{label:"Home",path:"/"}];let a="";for(const l of t){a+=`/${l}`;const o=l.charAt(0).toUpperCase()+l.slice(1).replace(/-/g," ");r.push({label:o,path:a})}return r}function OR(){const{mode:e,cycle:t}=s1(),r=ai(),a=RR(r.pathname),l=AR[e];return d.jsxs("header",{className:"flex h-14 items-center justify-between border-b border-zinc-200 px-6 dark:border-zinc-800",children:[d.jsx("nav",{className:"flex items-center gap-1 text-sm","aria-label":"Breadcrumb",children:a.map((o,c)=>d.jsxs("span",{className:"flex items-center gap-1",children:[c>0&&d.jsx("span",{className:"text-zinc-400 dark:text-zinc-600",children:"/"}),c<a.length-1?d.jsx(In,{to:o.path,className:ae("text-zinc-500 dark:text-zinc-400","hover:text-zinc-700 dark:hover:text-zinc-200"),children:o.label}):d.jsx("span",{className:"font-medium text-zinc-900 dark:text-zinc-100",children:o.label})]},o.path))}),d.jsxs("div",{className:"flex items-center gap-1",children:[d.jsx("a",{href:"https://github.com/spencermarx/open-code-review",target:"_blank",rel:"noopener noreferrer",className:"flex h-8 w-8 items-center justify-center rounded-md text-zinc-600 transition-colors hover:bg-zinc-100 hover:text-zinc-900 dark:text-zinc-400 dark:hover:bg-zinc-800 dark:hover:text-zinc-100","aria-label":"Documentation on GitHub",title:"Docs",children:d.jsx(ik,{className:"h-4 w-4"})}),d.jsx("button",{onClick:t,className:"flex h-8 w-8 items-center justify-center rounded-md text-zinc-600 transition-colors hover:bg-zinc-100 hover:text-zinc-900 dark:text-zinc-400 dark:hover:bg-zinc-800 dark:hover:text-zinc-100","aria-label":`Theme: ${e}. Click to cycle.`,title:`Theme: ${e}`,children:d.jsx(l,{className:"h-4 w-4"})})]})]})}function MR(){return d.jsxs("div",{className:"flex h-screen bg-white text-zinc-900 dark:bg-zinc-950 dark:text-zinc-100",children:[d.jsx(TR,{}),d.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[d.jsx(OR,{}),d.jsx("main",{className:"flex-1 overflow-y-auto p-6",children:d.jsx(ZS,{})})]})]})}class jR extends _.Component{constructor(t){super(t),this.state={hasError:!1,error:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}render(){return this.state.hasError?this.props.fallback?this.props.fallback:d.jsx("div",{className:"flex min-h-[200px] items-center justify-center",children:d.jsxs("div",{className:"max-w-md rounded-lg border border-red-200 bg-red-50 p-6 text-center dark:border-red-900/50 dark:bg-red-950/30",children:[d.jsx(Oo,{className:"mx-auto h-8 w-8 text-red-500"}),d.jsx("h2",{className:"mt-3 text-lg font-semibold text-zinc-900 dark:text-zinc-100",children:"Something went wrong"}),d.jsx("p",{className:"mt-1 text-sm text-zinc-600 dark:text-zinc-400",children:this.state.error?.message??"An unexpected error occurred."}),d.jsxs("button",{onClick:()=>this.setState({hasError:!1,error:null}),className:"mt-4 inline-flex items-center gap-2 rounded-md bg-zinc-900 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-zinc-800 dark:bg-zinc-100 dark:text-zinc-900 dark:hover:bg-zinc-200",children:[d.jsx(vo,{className:"h-4 w-4"}),"Try again"]})]})}):this.props.children}}function Ti(){return d.jsx("div",{className:"flex min-h-[400px] items-center justify-center",children:d.jsxs("div",{className:"max-w-md rounded-lg border border-red-200 bg-red-50 p-8 text-center dark:border-red-900/50 dark:bg-red-950/30",children:[d.jsx(Oo,{className:"mx-auto h-10 w-10 text-red-500"}),d.jsx("h1",{className:"mt-4 text-xl font-semibold text-zinc-900 dark:text-zinc-100",children:"Page Error"}),d.jsx("p",{className:"mt-2 text-sm text-zinc-600 dark:text-zinc-400",children:"This page encountered an error. Try navigating back or refreshing."}),d.jsxs("div",{className:"mt-6 flex justify-center gap-3",children:[d.jsx("button",{onClick:()=>window.history.back(),className:"rounded-md border border-zinc-300 bg-white px-4 py-2 text-sm font-medium text-zinc-700 transition-colors hover:bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-900 dark:text-zinc-300 dark:hover:bg-zinc-800",children:"Go back"}),d.jsxs("button",{onClick:()=>window.location.reload(),className:"inline-flex items-center gap-2 rounded-md bg-zinc-900 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-zinc-800 dark:bg-zinc-100 dark:text-zinc-900 dark:hover:bg-zinc-200",children:[d.jsx(vo,{className:"h-4 w-4"}),"Reload"]})]})]})})}function Ms({title:e,value:t,icon:r,trend:a}){return d.jsxs("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:e}),d.jsx(r,{className:"h-4 w-4 text-zinc-400 dark:text-zinc-500"})]}),d.jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[d.jsx("span",{className:"text-2xl font-semibold text-zinc-900 dark:text-zinc-100",children:t}),a&&d.jsx("span",{className:ae("text-xs font-medium",a==="up"?"text-emerald-600 dark:text-emerald-400":"text-red-600 dark:text-red-400"),children:a==="up"?"↑":"↓"})]})]})}const sy={active:"bg-emerald-500/15 text-emerald-700 dark:text-emerald-400 border-emerald-500/25",closed:"bg-zinc-500/15 text-zinc-600 dark:text-zinc-400 border-zinc-500/25",unread:"bg-blue-500/15 text-blue-700 dark:text-blue-400 border-blue-500/25",read:"bg-zinc-500/15 text-zinc-600 dark:text-zinc-400 border-zinc-500/25",acknowledged:"bg-amber-500/15 text-amber-700 dark:text-amber-400 border-amber-500/25",fixed:"bg-emerald-500/15 text-emerald-700 dark:text-emerald-400 border-emerald-500/25",wont_fix:"bg-zinc-500/15 text-zinc-600 dark:text-zinc-400 border-zinc-500/25",needs_review:"bg-blue-500/15 text-blue-700 dark:text-blue-400 border-blue-500/25",in_progress:"bg-violet-500/15 text-violet-700 dark:text-violet-400 border-violet-500/25",changes_made:"bg-emerald-500/15 text-emerald-700 dark:text-emerald-400 border-emerald-500/25",dismissed:"bg-zinc-500/15 text-zinc-600 dark:text-zinc-400 border-zinc-500/25",critical:"bg-red-500/15 text-red-700 dark:text-red-400 border-red-500/25",high:"bg-orange-500/15 text-orange-700 dark:text-orange-400 border-orange-500/25",medium:"bg-amber-500/15 text-amber-700 dark:text-amber-400 border-amber-500/25",low:"bg-blue-500/15 text-blue-700 dark:text-blue-400 border-blue-500/25",info:"bg-zinc-500/15 text-zinc-600 dark:text-zinc-400 border-zinc-500/25",default:"bg-zinc-500/15 text-zinc-600 dark:text-zinc-400 border-zinc-500/25"},DR={wont_fix:"Won't Fix",needs_review:"Needs Review",in_progress:"In Progress",changes_made:"Changes Made"};function Xs({variant:e,label:t,className:r}){const a=t??DR[e]??e.charAt(0).toUpperCase()+e.slice(1);return d.jsx("span",{className:ae("inline-flex items-center rounded-md border px-2 py-0.5 text-xs font-medium",sy[e]??sy.default,r),children:a})}function LR(e){return ri(e).toLocaleString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"})}function IR(e){return ri(e).toLocaleDateString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function BR(e){return ri(e).toLocaleString()}function UR(e){const t=Math.floor((Date.now()-ri(e).getTime())/1e3);if(t<60)return"just now";const r=Math.floor(t/60);if(r<60)return`${r}m ago`;const a=Math.floor(r/60);return a<24?`${a}h ago`:`${Math.floor(a/24)}d ago`}function ku(e){const t=Date.now()-ri(e).getTime(),r=Math.floor(t/1e3);if(r<60)return`${r}s`;const a=Math.floor(r/60);if(a<60)return`${a}m`;const l=Math.floor(a/60);return l<24?`${l}h`:`${Math.floor(l/24)}d`}function FR(e){return e==null||Number.isNaN(e)?"-":e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}function PR({sessions:e}){return e.length===0?d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"No sessions yet. Run a code review or map to get started."}):d.jsx("div",{className:"space-y-1",children:e.map(t=>{const r=t.workflow_type==="map"?ya:ii;return d.jsxs(In,{to:`/sessions/${t.id}`,className:"flex items-center gap-3 rounded-md px-3 py-2 text-sm transition-colors hover:bg-zinc-100 dark:hover:bg-zinc-800/50",children:[d.jsx(Ys,{className:"h-4 w-4 shrink-0 text-zinc-400"}),d.jsx("span",{className:"min-w-0 flex-1 truncate text-zinc-900 dark:text-zinc-100",children:t.branch}),d.jsx(r,{className:"h-3.5 w-3.5 shrink-0 text-zinc-400"}),d.jsx(Xs,{variant:t.status}),d.jsx("span",{className:"shrink-0 text-xs text-zinc-400 dark:text-zinc-500",children:UR(t.updated_at)})]},t.id)})})}function HR(){const e=nn({queryKey:["stats"],queryFn:()=>Dt("/api/stats")}),t=nn({queryKey:["sessions","recent"],queryFn:()=>Dt("/api/sessions?limit=10")}),r=e.data;return d.jsxs("div",{className:"space-y-8",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-semibold",children:"Dashboard"}),d.jsx("p",{className:"mt-1 text-sm text-zinc-500 dark:text-zinc-400",children:"Overview of your code review activity."})]}),(e.isError||t.isError)&&d.jsx("div",{className:"rounded-lg border border-red-500/25 bg-red-500/5 p-4 text-sm text-red-600 dark:text-red-400",children:"Failed to load dashboard data. Check that the server is running."}),d.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:[d.jsx(Ms,{title:"Total Sessions",value:r?.totalSessions??0,icon:Ys}),d.jsx(Ms,{title:"Active Sessions",value:r?.activeSessions??0,icon:Vm}),d.jsx(Ms,{title:"Completed Reviews",value:r?.completedReviews??0,icon:ii}),d.jsx(Ms,{title:"Completed Maps",value:r?.completedMaps??0,icon:ya}),d.jsx(Ms,{title:"Files Tracked",value:r?.filesTracked??0,icon:sA}),d.jsx(Ms,{title:"Unresolved Blockers",value:r?.unresolvedBlockers??0,icon:Oo})]}),d.jsxs("div",{children:[d.jsx("h2",{className:"mb-4 text-lg font-medium text-zinc-900 dark:text-zinc-100",children:"Recent Sessions"}),d.jsx("div",{className:"rounded-lg border border-zinc-200 bg-white p-4 dark:border-zinc-800 dark:bg-zinc-900",children:t.isLoading?d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Loading..."}):d.jsx(PR,{sessions:t.data??[]})})]})]})}function qR(){const e=Rn(),t=nn({queryKey:["sessions"],queryFn:()=>Dt("/api/sessions")});return ut("session:created",()=>{e.invalidateQueries({queryKey:["sessions"]})}),ut("session:updated",()=>{e.invalidateQueries({queryKey:["sessions"]})}),t}function $R(e){const t=Rn(),r=nn({queryKey:["sessions",e],queryFn:()=>Dt(`/api/sessions/${e}`),enabled:!!e});return ut("session:updated",()=>{t.invalidateQueries({queryKey:["sessions",e]})}),r}const GR=[{value:"all",label:"All"},{value:"active",label:"Active"},{value:"closed",label:"Closed"}],KR=[{value:"all",label:"All"},{value:"review",label:"Review"},{value:"map",label:"Map"}];function ly({options:e,value:t,onChange:r,label:a}){return d.jsx("div",{role:"group","aria-label":a,className:"inline-flex rounded-md border border-zinc-200 dark:border-zinc-700",children:e.map((l,o)=>d.jsx("button",{onClick:()=>r(l.value),"aria-pressed":t===l.value,className:ae("px-3 py-1.5 text-xs font-medium transition-colors",o>0&&"border-l border-zinc-200 dark:border-zinc-700",o===0&&"rounded-l-md",o===e.length-1&&"rounded-r-md",t===l.value?"bg-zinc-900 text-white dark:bg-zinc-100 dark:text-zinc-900":"bg-white text-zinc-600 hover:bg-zinc-50 dark:bg-zinc-900 dark:text-zinc-400 dark:hover:bg-zinc-800"),children:l.label},l.value))})}function VR({statusFilter:e,workflowFilter:t,onStatusChange:r,onWorkflowChange:a}){return d.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[d.jsx("span",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:"Status:"}),d.jsx(ly,{label:"Filter by status",options:GR,value:e,onChange:r}),d.jsx("span",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:"Workflow:"}),d.jsx(ly,{label:"Filter by workflow",options:KR,value:t,onChange:a})]})}const wu={APPROVED:"bg-emerald-500/15 text-emerald-700 dark:text-emerald-400",APPROVE:"bg-emerald-500/15 text-emerald-700 dark:text-emerald-400",LGTM:"bg-emerald-500/15 text-emerald-700 dark:text-emerald-400","REQUEST CHANGES":"bg-red-500/15 text-red-700 dark:text-red-400","CHANGES REQUESTED":"bg-red-500/15 text-red-700 dark:text-red-400","NEEDS DISCUSSION":"bg-amber-500/15 text-amber-700 dark:text-amber-400","NEEDS WORK":"bg-amber-500/15 text-amber-700 dark:text-amber-400"};function YR(e){const t=e.trim().toUpperCase(),r=Object.keys(wu).sort((a,l)=>l.length-a.length);for(const a of r)if(t.startsWith(a))return a;return t.length>30?`${t.slice(0,30).trim()}…`:t}function QR(e){const t=e.trim().toUpperCase();if(wu[t])return wu[t];for(const[r,a]of Object.entries(wu))if(t.startsWith(r))return a;return"bg-amber-500/15 text-amber-700 dark:text-amber-400"}const XR=new Set(["changes_made","acknowledged","dismissed"]),ZR={changes_made:"Changes Made",acknowledged:"Acknowledged",dismissed:"Dismissed"};function WR({session:e}){const r=e.has_review&&e.has_map?"Review + Map":e.has_map?"Map":"Review",l=(e.has_review?e.review_phase:e.map_phase).split("-").map(f=>f.charAt(0).toUpperCase()+f.slice(1)).join(" "),o=e.latest_round_status,c=o!=null&&XR.has(o);return d.jsxs(In,{to:`/sessions/${e.id}`,className:"group block rounded-lg border border-zinc-200 bg-white p-4 transition-colors hover:border-zinc-300 hover:bg-zinc-50 dark:border-zinc-800 dark:bg-zinc-900 dark:hover:border-zinc-700 dark:hover:bg-zinc-800/50",children:[d.jsxs("div",{className:"flex items-start justify-between gap-2",children:[d.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[d.jsx(Ys,{className:"h-4 w-4 shrink-0 text-zinc-400"}),d.jsx("span",{className:"truncate text-sm font-medium text-zinc-900 dark:text-zinc-100",children:e.branch})]}),d.jsx(Xs,{variant:e.status})]}),d.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-2 text-xs text-zinc-500 dark:text-zinc-400",children:[d.jsxs("span",{className:"flex items-center gap-1",children:[e.has_review&&d.jsx(ii,{className:"h-3.5 w-3.5"}),e.has_map&&d.jsx(ya,{className:"h-3.5 w-3.5"}),d.jsx("span",{children:r})]}),d.jsx("span",{className:"text-zinc-300 dark:text-zinc-700",children:"|"}),e.latest_verdict?d.jsx("span",{className:"flex items-center gap-1.5",children:c?d.jsx("span",{className:"inline-flex items-center rounded bg-zinc-500/10 px-1.5 py-0.5 text-[10px] font-semibold uppercase text-zinc-500 dark:text-zinc-400",children:ZR[o]??o}):d.jsxs(d.Fragment,{children:[d.jsx("span",{className:ae("inline-flex items-center rounded px-1.5 py-0.5 text-[10px] font-semibold uppercase",QR(e.latest_verdict)),children:YR(e.latest_verdict)}),e.latest_blocker_count>0&&d.jsxs("span",{className:"inline-flex items-center rounded bg-red-500/15 px-1.5 py-0.5 text-[10px] font-semibold text-red-700 dark:text-red-400",children:[e.latest_blocker_count," blocker",e.latest_blocker_count!==1?"s":""]})]})}):d.jsxs("span",{children:["Phase: ",l]})]}),d.jsxs("div",{className:"mt-2 flex items-center gap-3 text-xs text-zinc-400 dark:text-zinc-500",children:[d.jsx("span",{children:IR(e.started_at)}),d.jsxs("span",{className:"flex items-center gap-1",children:[d.jsx(nk,{className:"h-3 w-3"}),ku(e.updated_at)]})]})]})}function JR({sessions:e}){return e.length===0?d.jsx("p",{className:"py-8 text-center text-sm text-zinc-500 dark:text-zinc-400",children:"No sessions match your filters."}):d.jsx("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:e.map(t=>d.jsx(WR,{session:t},t.id))})}function e5(){const{data:e,isLoading:t}=qR(),[r,a]=_.useState("all"),[l,o]=_.useState("all"),c=_.useMemo(()=>e?e.filter(f=>!(r!=="all"&&f.status!==r||l!=="all"&&f.workflow_type!==l)):[],[e,r,l]);return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-semibold",children:"Sessions"}),d.jsx("p",{className:"mt-1 text-sm text-zinc-500 dark:text-zinc-400",children:"All code review and map sessions."})]}),d.jsx(VR,{statusFilter:r,workflowFilter:l,onStatusChange:a,onWorkflowChange:o}),t?d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Loading sessions..."}):d.jsx(JR,{sessions:c})]})}function ok(e){const t=Rn(),r=nn({queryKey:["agent-sessions",e],queryFn:()=>Dt(`/api/agent-sessions?workflow=${encodeURIComponent(e??"")}`),enabled:!!e,refetchInterval:15e3});return ut("agent_session:updated",a=>{e&&(!a?.workflow_ids||a.workflow_ids.includes(e))&&t.invalidateQueries({queryKey:["agent-sessions",e]})}),r}function ck(e){return nn({queryKey:["handoff",e],queryFn:()=>Dt(`/api/sessions/${encodeURIComponent(e??"")}/handoff`),enabled:!!e,staleTime:5e3})}const t5=15*6e4;function uk(e){if(e.length===0)return{status:"idle",newestHeartbeat:null,liveRow:null,orphanedRow:null};const t=Date.now();let r=null,a=-1/0,l=null,o=-1/0,c=null,f=-1/0;for(const h of e){const m=n5(h.last_heartbeat_at);m>f&&(f=m,c=h.last_heartbeat_at),h.status==="running"&&m>a&&(a=m,r=h),h.status==="orphaned"&&m>o&&(o=m,l=h)}return r?{status:t-a<=t5?"running":"stalled",newestHeartbeat:c,liveRow:r,orphanedRow:null}:l?{status:"orphaned",newestHeartbeat:c,liveRow:null,orphanedRow:l}:{status:"idle",newestHeartbeat:c,liveRow:null,orphanedRow:null}}function n5(e){return/[Zz]$/.test(e)||/[+-]\d{2}:\d{2}$/.test(e)?new Date(e).getTime():new Date(e.replace(" ","T")+"Z").getTime()}function kh({phases:e,className:t}){return d.jsx("div",{role:"list","aria-label":"Phase timeline",className:ae("flex items-center gap-1",t),children:e.map((r,a)=>d.jsxs("div",{className:"flex items-center gap-1",children:[d.jsx(r5,{phase:r}),a<e.length-1&&d.jsx("div",{className:ae("h-px w-6",r.status==="complete"&&e[a+1]?.status!=="skipped"?"bg-emerald-500":"bg-zinc-300 dark:bg-zinc-700")})]},r.name))})}function r5({phase:e}){return d.jsxs("div",{className:"group relative flex flex-col items-center",children:[d.jsxs("div",{tabIndex:0,role:"listitem","aria-label":`${e.name}: ${e.status}${e.timestamp?`, ${e.timestamp}`:""}`,className:ae("flex h-6 w-6 items-center justify-center rounded-full border",e.status==="complete"&&"border-emerald-500 bg-emerald-500 text-white",e.status==="active"&&"border-blue-500 bg-blue-500/10 text-blue-600 dark:text-blue-400",e.status==="pending"&&"border-zinc-300 bg-zinc-100 text-zinc-400 dark:border-zinc-600 dark:bg-zinc-800 dark:text-zinc-500",e.status==="skipped"&&"border-zinc-200 bg-zinc-50 text-zinc-300 dark:border-zinc-700 dark:bg-zinc-800/50 dark:text-zinc-600"),children:[e.status==="complete"&&d.jsx(Mr,{className:"h-3.5 w-3.5"}),e.status==="active"&&d.jsx(qr,{className:"h-3.5 w-3.5 animate-spin"}),e.status==="pending"&&d.jsx(BT,{className:"h-2.5 w-2.5"}),e.status==="skipped"&&d.jsx(xo,{className:"h-3 w-3"})]}),d.jsxs("div",{className:"pointer-events-none absolute top-8 hidden whitespace-nowrap rounded bg-zinc-900 px-2 py-1 text-xs text-white shadow-lg group-hover:block group-focus-within:block dark:bg-zinc-100 dark:text-zinc-900",children:[d.jsx("span",{className:"font-medium",children:e.name}),e.timestamp&&d.jsx("span",{className:"ml-1 text-zinc-400 dark:text-zinc-500",children:e.timestamp})]})]})}function i5({session:e}){const t=e.has_review,r=e.has_map,a=t?"review":"map",[l,o]=_.useState(a),f=[{id:"review",label:"Review",icon:ii,visible:t},{id:"map",label:"Map",icon:ya,visible:r}].filter(h=>h.visible);return f.length===0?d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"No review or map data yet."}):d.jsxs("div",{children:[d.jsx("div",{className:"flex border-b border-zinc-200 dark:border-zinc-800",children:f.map(h=>d.jsxs("button",{onClick:()=>o(h.id),className:ae("flex items-center gap-1.5 border-b-2 px-4 py-2 text-sm font-medium transition-colors",l===h.id?"border-zinc-900 text-zinc-900 dark:border-zinc-100 dark:text-zinc-100":"border-transparent text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-300"),children:[d.jsx(h.icon,{className:"h-4 w-4"}),h.label]},h.id))}),d.jsxs("div",{className:"mt-4",children:[l==="review"&&d.jsx(a5,{sessionId:e.id,status:e.status}),l==="map"&&d.jsx(s5,{sessionId:e.id,status:e.status})]})]})}function a5({sessionId:e,status:t}){const r=Rn();ut("artifact:created",()=>{r.invalidateQueries({queryKey:["sessions",e,"rounds"]})}),ut("artifact:updated",()=>{r.invalidateQueries({queryKey:["sessions",e,"rounds"]})});const{data:a,isLoading:l}=nn({queryKey:["sessions",e,"rounds"],queryFn:()=>Dt(`/api/sessions/${e}/rounds`),enabled:!!e});return l?d.jsxs("p",{className:"flex items-center gap-2 text-sm text-zinc-500 dark:text-zinc-400",children:[d.jsx(qr,{className:"h-4 w-4 animate-spin"}),"Loading rounds..."]}):!a||a.length===0?d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:t==="closed"?"This session was closed without completing any review rounds.":"Review in progress — no completed rounds yet."}):d.jsx("div",{className:"space-y-2",children:a.map(o=>d.jsxs(In,{to:`/sessions/${e}/reviews/${o.round_number}`,className:"flex items-center gap-2 rounded-md px-3 py-2 text-sm transition-colors hover:bg-zinc-100 dark:hover:bg-zinc-800/50",children:[d.jsx(ii,{className:"h-4 w-4 text-zinc-400"}),d.jsxs("span",{className:"text-zinc-900 dark:text-zinc-100",children:["Round ",o.round_number]}),d.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[o.progress&&d.jsx(Xs,{variant:o.progress.status}),o.verdict&&d.jsx("span",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:o.verdict})]})]},o.round_number))})}function s5({sessionId:e,status:t}){const r=Rn();ut("artifact:created",()=>{r.invalidateQueries({queryKey:["sessions",e,"runs"]})}),ut("artifact:updated",()=>{r.invalidateQueries({queryKey:["sessions",e,"runs"]})});const{data:a,isLoading:l}=nn({queryKey:["sessions",e,"runs"],queryFn:()=>Dt(`/api/sessions/${e}/runs`),enabled:!!e});return l?d.jsxs("p",{className:"flex items-center gap-2 text-sm text-zinc-500 dark:text-zinc-400",children:[d.jsx(qr,{className:"h-4 w-4 animate-spin"}),"Loading runs..."]}):!a||a.length===0?d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:t==="closed"?"This session was closed without completing any map runs.":"Map in progress — no completed runs yet."}):d.jsx("div",{className:"space-y-2",children:a.map(o=>d.jsxs(In,{to:`/sessions/${e}/maps/${o.run_number}`,className:"flex items-center gap-2 rounded-md px-3 py-2 text-sm transition-colors hover:bg-zinc-100 dark:hover:bg-zinc-800/50",children:[d.jsx(ya,{className:"h-4 w-4 text-zinc-400"}),d.jsxs("span",{className:"text-zinc-900 dark:text-zinc-100",children:["Run ",o.run_number]})]},o.run_number))})}const l5={running:{label:"Running",icon:Vm,iconClass:"text-emerald-600 dark:text-emerald-400",border:"border-emerald-500/30",bg:"bg-emerald-500/5 dark:bg-emerald-500/10",descriptor:e=>e?`Last activity ${ku(e)} ago`:"Active agent session"},stalled:{label:"Stalled",icon:Oo,iconClass:"text-amber-600 dark:text-amber-400",border:"border-amber-500/30",bg:"bg-amber-500/5 dark:bg-amber-500/10",descriptor:e=>e?`Last activity ${ku(e)} ago — your AI may have crashed`:"No recent heartbeat"},orphaned:{label:"Orphaned",icon:DT,iconClass:"text-zinc-500 dark:text-zinc-400",border:"border-zinc-300 dark:border-zinc-700",bg:"bg-zinc-100/50 dark:bg-zinc-800/30",descriptor:e=>e?`Auto-marked after ${ku(e)} of inactivity`:"Reclassified by sweep"},idle:{label:"Idle",icon:co,iconClass:"text-zinc-400 dark:text-zinc-500",border:"border-zinc-200 dark:border-zinc-800",bg:"bg-white dark:bg-zinc-900",descriptor:()=>"No active agent sessions"}};function o5({workflowId:e}){const{data:t,isLoading:r}=ok(e);if(r||!t)return null;const a=t.agent_sessions;if(a.length===0)return null;const{status:l,newestHeartbeat:o}=uk(a);if(l==="idle")return null;const c=l5[l],f=c.icon;return d.jsxs("div",{role:"status","aria-live":"polite",className:ae("flex items-start gap-3 rounded-lg border px-4 py-3",c.border,c.bg),children:[d.jsx(f,{className:ae("mt-0.5 h-5 w-5 shrink-0",c.iconClass),"aria-hidden":!0}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:c.label}),o&&d.jsx("span",{className:"text-xs tabular-nums text-zinc-500 dark:text-zinc-400",title:ri(o).toLocaleString(),children:ri(o).toLocaleTimeString()})]}),d.jsx("p",{className:"text-xs text-zinc-600 dark:text-zinc-400",children:c.descriptor(o)}),d.jsx(c5,{rows:a})]})]})}function c5({rows:e}){if(e.length===0)return null;const t={};for(const l of e)t[l.status]=(t[l.status]??0)+1;const a=["running","done","orphaned","crashed","cancelled","spawning"].filter(l=>t[l]).map(l=>`${t[l]} ${l}`).join(" · ");return a?d.jsx("p",{className:"mt-1 text-[11px] uppercase tracking-wide text-zinc-500 dark:text-zinc-500",children:a}):null}const u5={claude:"Claude Code",opencode:"OpenCode",gemini:"Gemini CLI"};function dk(e){return e?u5[e]??e:"—"}function Zm({workflowId:e,onClose:t}){const{data:r,isLoading:a,error:l}=ck(e??void 0),o=_.useRef(null);if(_.useEffect(()=>{if(!e)return;const m=g=>{g.key==="Escape"&&t()};return window.addEventListener("keydown",m),o.current?.focus(),()=>window.removeEventListener("keydown",m)},[e,t]),!e)return null;const c=r?.outcome,f=c?.kind==="resumable"?c.vendor:c?.kind==="unresumable"?c.diagnostics.vendor:null,h=r?.projectDir??null;return r1.createPortal(d.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-6 backdrop-blur-sm",onClick:t,children:d.jsxs("div",{ref:o,role:"dialog","aria-modal":"true","aria-labelledby":"handoff-title",tabIndex:-1,onClick:m=>m.stopPropagation(),className:"flex max-h-[90vh] w-full max-w-xl flex-col overflow-hidden rounded-xl border border-zinc-200 bg-white shadow-2xl outline-none dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsxs("div",{className:"flex items-center gap-3 border-b border-zinc-200 px-5 py-3.5 dark:border-zinc-800",children:[d.jsx(Oi,{className:"h-5 w-5 shrink-0 text-zinc-500 dark:text-zinc-400"}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsx("h2",{id:"handoff-title",className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:"Pick up this review in your terminal"}),d.jsx("p",{className:"truncate text-xs text-zinc-500 dark:text-zinc-400",children:c?d.jsxs(d.Fragment,{children:["AI CLI: ",d.jsx("span",{className:"font-medium",children:dk(f)}),h&&d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"mx-1",children:"·"}),"Project: ",d.jsx("span",{className:"font-mono",children:h})]})]}):"Loading…"})]}),d.jsx("button",{type:"button",onClick:t,"aria-label":"Close",className:"rounded-md p-1 text-zinc-400 hover:bg-zinc-100 hover:text-zinc-600 dark:text-zinc-500 dark:hover:bg-zinc-800 dark:hover:text-zinc-300",children:d.jsx(Bn,{className:"h-4 w-4"})})]}),d.jsxs("div",{className:"flex-1 overflow-y-auto px-5 py-4",children:[a&&d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Loading handoff details…"}),l&&d.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-red-200 bg-red-50 p-3 text-sm text-red-700 dark:border-red-900/50 dark:bg-red-950/40 dark:text-red-300",children:[d.jsx(Ku,{className:"mt-0.5 h-4 w-4 shrink-0"}),d.jsxs("span",{children:["Couldn't load handoff details. ",l.message]})]}),c?.kind==="resumable"&&d.jsx(d5,{outcome:c,projectDir:r?.projectDir??""}),c?.kind==="unresumable"&&d.jsx(f5,{outcome:c})]})]})}),document.body)}function d5({outcome:e,projectDir:t}){const r=dk(e.vendor),a=`cd ${t}`,l=e.vendorCommand,o=`Resume directly in ${r}`;return d.jsxs("div",{className:"space-y-4",children:[d.jsx(oy,{index:1,label:"Open the project directory",command:a,copyAriaLabel:"Copy cd command"}),d.jsx(oy,{index:2,label:o,command:l,copyAriaLabel:"Copy resume command"}),d.jsx("div",{className:"border-t border-zinc-200 pt-3 text-xs text-zinc-500 dark:border-zinc-800 dark:text-zinc-400",children:d.jsxs("p",{children:["Requires ",d.jsx("span",{className:"font-medium",children:r})," on your"," ",d.jsx("span",{className:"font-mono",children:"$PATH"}),!e.hostBinaryAvailable&&d.jsxs(d.Fragment,{children:[" ","— we couldn't see it from the dashboard. Install it to resume in your terminal."]}),"."]})}),d.jsx("div",{className:"flex justify-end",children:d.jsx(p5,{commands:[a,l]})})]})}function f5({outcome:e}){const{microcopy:t}=e.diagnostics;return d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{className:"rounded-md border border-amber-300/40 bg-amber-50 px-4 py-3 text-sm text-amber-900 dark:border-amber-700/40 dark:bg-amber-950/30 dark:text-amber-200",children:d.jsxs("div",{className:"flex items-start gap-2",children:[d.jsx(Oo,{"aria-hidden":!0,className:"mt-0.5 h-4 w-4 shrink-0"}),d.jsxs("div",{className:"space-y-1",children:[d.jsx("p",{className:"font-medium",children:t.headline}),d.jsxs("p",{className:"text-xs opacity-90",children:[d.jsx("span",{className:"font-medium",children:"Why: "}),t.cause]}),d.jsxs("p",{className:"text-xs opacity-90",children:[d.jsx("span",{className:"font-medium",children:"Try: "}),t.remediation]})]})]})}),d.jsx(h5,{diagnostics:e.diagnostics,reason:e.reason})]})}function h5({diagnostics:e,reason:t}){const[r,a]=_.useState(!1),l=[`reason: ${t}`,`vendor: ${e.vendor??"unknown"}`,`vendorBinaryAvailable: ${e.vendorBinaryAvailable}`,`invocationsForWorkflow: ${e.invocationsForWorkflow}`,`sessionIdEventsObserved: ${e.sessionIdEventsObserved}`].join(`
|
|
522
|
+
`),o=()=>{navigator.clipboard.writeText(l).then(()=>{a(!0),setTimeout(()=>a(!1),1500)}).catch(()=>{})};return d.jsxs("div",{className:"rounded-md border border-zinc-200 bg-zinc-50 px-4 py-3 dark:border-zinc-800 dark:bg-zinc-900/50",children:[d.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[d.jsx("p",{className:"text-[11px] font-medium uppercase tracking-wider text-zinc-500 dark:text-zinc-500",children:"Diagnostic data"}),d.jsx("button",{type:"button",onClick:o,className:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[11px] text-zinc-600 transition-colors hover:bg-zinc-100 dark:text-zinc-400 dark:hover:bg-zinc-800",children:r?d.jsxs(d.Fragment,{children:[d.jsx(Mr,{className:"h-3 w-3"}),"Copied"]}):d.jsxs(d.Fragment,{children:[d.jsx(Vu,{className:"h-3 w-3"}),"Copy for issue report"]})})]}),d.jsx("pre",{className:"whitespace-pre-wrap font-mono text-[11px] leading-relaxed text-zinc-700 dark:text-zinc-300",children:l})]})}function oy({index:e,label:t,command:r,copyAriaLabel:a}){return d.jsxs("div",{children:[d.jsxs("div",{className:"mb-1 flex items-center gap-2 text-xs uppercase tracking-wide text-zinc-500 dark:text-zinc-500",children:[d.jsx("span",{className:"inline-flex h-4 w-4 items-center justify-center rounded-full bg-zinc-200 text-[10px] font-semibold text-zinc-700 dark:bg-zinc-800 dark:text-zinc-300",children:e}),d.jsx("span",{children:t})]}),d.jsxs("div",{className:"flex items-stretch gap-2",children:[d.jsx("pre",{className:"min-w-0 flex-1 overflow-x-auto rounded-md border border-zinc-200 bg-zinc-50 px-3 py-2 font-mono text-xs text-zinc-800 dark:border-zinc-800 dark:bg-zinc-900 dark:text-zinc-200",children:r}),d.jsx(m5,{text:r,ariaLabel:a})]})]})}function m5({text:e,ariaLabel:t}){const[r,a]=_.useState(!1);return d.jsx("button",{type:"button","aria-label":t,onClick:()=>{navigator.clipboard.writeText(e).then(()=>{a(!0),setTimeout(()=>a(!1),1500)}).catch(()=>{a(!1)})},className:ae("inline-flex shrink-0 items-center gap-1 rounded-md border px-2.5 py-2 text-xs font-medium transition",r?"border-emerald-500/40 bg-emerald-500/10 text-emerald-700 dark:text-emerald-400":"border-zinc-200 bg-white text-zinc-600 hover:border-zinc-300 hover:bg-zinc-50 dark:border-zinc-800 dark:bg-zinc-900 dark:text-zinc-400 dark:hover:border-zinc-700"),children:r?d.jsxs(d.Fragment,{children:[d.jsx(Mr,{className:"h-3.5 w-3.5"}),d.jsx("span",{"aria-live":"polite",children:"Copied"})]}):d.jsxs(d.Fragment,{children:[d.jsx(Vu,{className:"h-3.5 w-3.5"}),d.jsx("span",{children:"Copy"})]})})}function p5({commands:e}){const[t,r]=_.useState(!1);return d.jsx("button",{type:"button",onClick:()=>{navigator.clipboard.writeText(e.join(`
|
|
523
|
+
`)).then(()=>{r(!0),setTimeout(()=>r(!1),1500)}).catch(()=>r(!1))},className:ae("inline-flex items-center gap-1.5 rounded-md border px-3 py-1.5 text-xs font-medium transition",t?"border-emerald-500/40 bg-emerald-500/10 text-emerald-700 dark:text-emerald-400":"border-zinc-200 bg-white text-zinc-700 hover:bg-zinc-50 dark:border-zinc-800 dark:bg-zinc-900 dark:text-zinc-300 dark:hover:bg-zinc-800/50"),children:t?d.jsxs(d.Fragment,{children:[d.jsx(Mr,{className:"h-3.5 w-3.5"}),d.jsx("span",{"aria-live":"polite",children:"Copied both"})]}):d.jsxs(d.Fragment,{children:[d.jsx(Vu,{className:"h-3.5 w-3.5"}),d.jsx("span",{children:"Copy both"})]})})}function g5({workflowId:e,variant:t="paused"}){const{socket:r}=si(),a=Pu(),[l,o]=_.useState(!1),c=ck(l?e:void 0),f=!r,h=_.useCallback(()=>{r&&(r.emit("command:run",{command:`review --resume ${e}`}),a("/"))},[r,e,a]),m=t==="paused",g=m?"This review is paused.":"Continue this review in your terminal.",x=m?"Bring the AI back where it left off, or hand off the resume command to your terminal.":"Copy the resume command and pick up the AI conversation in your own terminal.";return d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:ae("flex flex-col gap-3 rounded-lg border px-4 py-3 sm:flex-row sm:items-center sm:justify-between","border-zinc-200 bg-white dark:border-zinc-800 dark:bg-zinc-900"),children:[d.jsxs("div",{className:"min-w-0",children:[d.jsx("p",{className:"text-sm font-medium text-zinc-900 dark:text-zinc-100",children:g}),d.jsx("p",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:x})]}),d.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[m&&d.jsxs("button",{type:"button",onClick:h,disabled:f,className:ae("inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-sm font-medium transition","bg-zinc-900 text-white hover:bg-zinc-800","dark:bg-zinc-100 dark:text-zinc-900 dark:hover:bg-zinc-200",f&&"cursor-not-allowed opacity-50"),children:[d.jsx($s,{className:"h-3.5 w-3.5","aria-hidden":!0}),d.jsx("span",{children:"Continue from where you left off"})]}),d.jsxs("button",{type:"button",onClick:()=>o(!0),className:ae("inline-flex items-center gap-1.5 rounded-md border px-3 py-1.5 text-sm font-medium transition",m?"border-zinc-200 bg-white text-zinc-700 hover:bg-zinc-50 dark:border-zinc-800 dark:bg-zinc-900 dark:text-zinc-300 dark:hover:bg-zinc-800/50":"border-zinc-900 bg-zinc-900 text-white hover:bg-zinc-800 dark:border-zinc-100 dark:bg-zinc-100 dark:text-zinc-900 dark:hover:bg-zinc-200"),children:[d.jsx(Oi,{className:"h-3.5 w-3.5","aria-hidden":!0}),d.jsx("span",{children:"Resume in terminal"})]})]})]}),l&&d.jsx(Zm,{workflowId:e,onClose:()=>o(!1)}),d.jsx("span",{className:"sr-only",children:c.data?"handoff ready":""})]})}const b5=["context","change-context","analysis","reviews","aggregation","discourse","synthesis","complete"],x5=["map-context","topology","flow-analysis","requirements-mapping","synthesis","complete"];function wh(e){return e.split("-").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}function _h(e,t,r,a){const l=e==="map"?x5:b5,o=l.length;return r>=o?l.map(c=>({name:wh(c),status:"complete"})):a==="closed"?l.map((c,f)=>({name:wh(c),status:f+1<=r?"complete":"skipped"})):l.map((c,f)=>({name:wh(c),status:f+1<r?"complete":f+1===r?"active":"pending"}))}function y5(){const{id:e}=Hu(),t=Rn(),{data:r,isLoading:a}=$R(e??""),l=nn({queryKey:["sessions",e,"events"],queryFn:()=>Dt(`/api/sessions/${e}/events`),enabled:!!e}),o=ok(e??void 0),c=o.data?uk(o.data.agent_sessions):null,f=o.data?.agent_sessions.some(y=>y.vendor_session_id!=null)??!1,h=c?.status==="stalled"||c?.status==="orphaned",m=h||f;if(ut("session:events",()=>{t.invalidateQueries({queryKey:["sessions",e,"events"]})}),a)return d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Loading session..."});if(!r)return d.jsxs("div",{children:[d.jsxs(In,{to:"/sessions",className:"mb-4 inline-flex items-center gap-1 text-sm text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-300",children:[d.jsx(xa,{className:"h-4 w-4"}),"Back to sessions"]}),d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Session not found."})]});const g=r.has_review&&r.has_map,x=g?"Review + Map":r.has_map?"Map":"Review";return d.jsxs("div",{className:"space-y-6",children:[d.jsxs(In,{to:"/sessions",className:"inline-flex items-center gap-1 text-sm text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-300",children:[d.jsx(xa,{className:"h-4 w-4"}),"Back to sessions"]}),e&&d.jsx(o5,{workflowId:e}),e&&m&&d.jsx(g5,{workflowId:e,variant:h?"paused":"completed"}),d.jsxs("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[d.jsxs("div",{className:"space-y-1",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(Ys,{className:"h-5 w-5 text-zinc-400"}),d.jsx("h1",{className:"text-xl font-semibold text-zinc-900 dark:text-zinc-100",children:r.branch})]}),d.jsxs("div",{className:"flex items-center gap-3 text-sm text-zinc-500 dark:text-zinc-400",children:[d.jsxs("span",{className:"flex items-center gap-1",children:[r.has_review&&d.jsx(ii,{className:"h-4 w-4"}),r.has_map&&d.jsx(ya,{className:"h-4 w-4"}),d.jsx("span",{children:x})]}),d.jsxs("span",{className:"flex items-center gap-1",children:[d.jsx(nk,{className:"h-4 w-4"}),LR(r.started_at)]})]})]}),d.jsx(Xs,{variant:r.status})]}),d.jsxs("div",{className:"mt-6",children:[d.jsx("h3",{className:"mb-2 text-xs font-medium uppercase tracking-wide text-zinc-500 dark:text-zinc-400",children:"Progress"}),g?d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{children:[d.jsxs("div",{className:"mb-1 flex items-center gap-1.5 text-xs text-zinc-500 dark:text-zinc-400",children:[d.jsx(ii,{className:"h-3.5 w-3.5"}),d.jsx("span",{children:"Review"})]}),d.jsx(kh,{phases:_h("review",r.review_phase,r.review_phase_number,r.status)})]}),d.jsxs("div",{children:[d.jsxs("div",{className:"mb-1 flex items-center gap-1.5 text-xs text-zinc-500 dark:text-zinc-400",children:[d.jsx(ya,{className:"h-3.5 w-3.5"}),d.jsx("span",{children:"Map"})]}),d.jsx(kh,{phases:_h("map",r.map_phase,r.map_phase_number,r.status)})]})]}):d.jsx(kh,{phases:_h(r.has_map?"map":"review",r.has_map?r.map_phase:r.review_phase,r.has_map?r.map_phase_number:r.review_phase_number,r.status)})]})]}),d.jsx("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:d.jsx(i5,{session:r})}),d.jsxs("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsx("h2",{className:"mb-4 text-sm font-medium text-zinc-900 dark:text-zinc-100",children:"Event Log"}),l.isLoading?d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Loading events..."}):(l.data??[]).length===0?d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"No events recorded."}):d.jsx("div",{className:"space-y-2",children:(l.data??[]).map(y=>d.jsxs("div",{className:"flex items-start gap-3 rounded-md px-3 py-2 text-sm hover:bg-zinc-50 dark:hover:bg-zinc-800/50",children:[d.jsx("span",{className:"shrink-0 text-xs tabular-nums text-zinc-400 dark:text-zinc-500",children:ri(y.created_at).toLocaleTimeString()}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsx("span",{className:"font-medium text-zinc-900 dark:text-zinc-100",children:y.event_type}),y.phase&&d.jsxs("span",{className:"ml-2 text-zinc-500 dark:text-zinc-400",children:["Phase: ",y.phase]}),y.round!=null&&d.jsxs("span",{className:"ml-2 text-zinc-500 dark:text-zinc-400",children:["Round: ",y.round]})]})]},y.id))})]})]})}function Mo(){const{data:e}=Qs(),t=e?.aiCli?.active??null,r=e?.aiCli?.available??[],a=e?.aiCli?.preferred??"auto";return{isAvailable:t!=null,activeCli:t,availableClis:r,isDisabledByConfig:a==="off"&&r.length>0}}function Wm(){const e=Rn(),{data:t,isLoading:r}=nn({queryKey:["reviewers"],queryFn:()=>Dt("/api/reviewers")});return ut("reviewers:updated",a=>{e.setQueryData(["reviewers"],a)}),{reviewers:t?.reviewers??[],defaults:t?.defaults??[],isLoaded:!r}}const v5={activity:Vm,blocks:wT,bot:ST,layers:wA,"shield-check":tR,compass:$T,layout:IA,server:ZA,cloud:HT,gauge:hA,accessibility:fT,database:QT,rocket:qA,terminal:Oi,smartphone:aR,crown:VT,sparkles:Ro,"shield-alert":Qm,"test-tubes":bR,brain:J1,user:Va};function Zs({icon:e,className:t="h-4 w-4"}){const r=v5[e]??Va;return d.jsx(r,{className:t})}function k5({reviewers:e,selection:t,isLoaded:r,disabled:a,onRemove:l,onCustomize:o}){if(!r)return d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("label",{className:"w-28 shrink-0 text-right text-xs font-medium text-zinc-500 dark:text-zinc-400",children:"Reviewers"}),d.jsx("div",{className:"flex h-8 items-center text-xs text-zinc-400 dark:text-zinc-500",children:"Loading..."})]});if(e.length===0)return d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("label",{className:"w-28 shrink-0 text-right text-xs font-medium text-zinc-500 dark:text-zinc-400",children:"Reviewers"}),d.jsxs("p",{className:"text-xs text-zinc-400 dark:text-zinc-500",children:["Run ",d.jsx("code",{className:"rounded bg-zinc-100 px-1 py-0.5 dark:bg-zinc-800",children:"/ocr:sync-reviewers"})," to customize your review team"]})]});const c=t.filter(m=>!m.description),f=t.filter(m=>m.description),h=c.map(m=>{const g=e.find(x=>x.id===m.id);return g?{...g,count:m.count}:null}).filter(Boolean);return d.jsxs("div",{className:"flex items-start gap-3",children:[d.jsx("label",{className:"w-28 shrink-0 pt-1.5 text-right text-xs font-medium text-zinc-500 dark:text-zinc-400",children:"Reviewers"}),d.jsxs("div",{className:"flex flex-1 flex-wrap items-center gap-1.5",children:[h.map(m=>d.jsxs("span",{className:ae("inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-xs","border-zinc-200 bg-zinc-50 text-zinc-700","dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-300"),children:[d.jsx(Zs,{icon:m.icon,className:"h-3 w-3 text-zinc-400 dark:text-zinc-500"}),d.jsx("span",{className:"max-w-[120px] truncate",children:m.name}),m.count>1&&d.jsxs("span",{className:"text-[10px] text-zinc-400 dark:text-zinc-500",children:["x",m.count]}),!a&&d.jsx("button",{type:"button",onClick:()=>l(m.id),className:"ml-0.5 rounded-full p-0.5 text-zinc-400 hover:bg-zinc-200 hover:text-zinc-600 dark:text-zinc-500 dark:hover:bg-zinc-700 dark:hover:text-zinc-300","aria-label":`Remove ${m.name}`,children:d.jsx(Bn,{className:"h-2.5 w-2.5"})})]},m.id)),f.map(m=>d.jsxs("span",{title:m.description,className:ae("inline-flex items-center gap-1 rounded-full border border-dashed px-2 py-0.5 text-xs italic","border-amber-300 bg-amber-50 text-amber-700","dark:border-amber-700 dark:bg-amber-950/30 dark:text-amber-300"),children:[d.jsx(yo,{className:"h-3 w-3 shrink-0"}),d.jsx("span",{className:"max-w-[160px] truncate",children:m.description}),m.count>1&&d.jsxs("span",{className:"text-[10px] text-amber-400 dark:text-amber-500",children:["x",m.count]}),!a&&d.jsx("button",{type:"button",onClick:()=>l(m.id),className:"ml-0.5 rounded-full p-0.5 text-amber-400 hover:bg-amber-200 hover:text-amber-600 dark:text-amber-500 dark:hover:bg-amber-800 dark:hover:text-amber-300","aria-label":"Remove ephemeral reviewer",children:d.jsx(Bn,{className:"h-2.5 w-2.5"})})]},m.id)),d.jsxs("button",{type:"button",disabled:a,onClick:o,className:ae("inline-flex items-center gap-1 rounded-full border border-dashed px-2.5 py-0.5 text-xs transition-colors","border-zinc-300 text-zinc-500 hover:border-indigo-400 hover:text-indigo-600","dark:border-zinc-600 dark:text-zinc-400 dark:hover:border-indigo-400 dark:hover:text-indigo-400","disabled:cursor-not-allowed disabled:opacity-50"),children:[d.jsx(sk,{className:"h-3 w-3"}),"Customize..."]})]})]})}const Ru={holistic:{label:"Generalists",order:0},specialist:{label:"Specialists",order:1},persona:{label:"Famous Engineers",order:2},custom:{label:"Custom",order:3}};function fk(e,t){if(!t.trim())return e;const r=t.toLowerCase();return e.filter(a=>a.name.toLowerCase().includes(r)||a.description.toLowerCase().includes(r)||a.focus_areas.some(l=>l.toLowerCase().includes(r))||a.known_for?.toLowerCase().includes(r))}function hk(e){const t=new Map;for(const r of e){const a=t.get(r.tier)??[];a.push(r),t.set(r.tier,a)}return[...t.entries()].sort((r,a)=>Ru[r[0]].order-Ru[a[0]].order)}function w5(e){return e.toLowerCase().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}function mk(e){return nn({queryKey:["team","resolved","disk"],queryFn:()=>Dt("/api/team/resolved"),staleTime:5e3})}function pk(e){return nn({queryKey:["models",e??"auto"],queryFn:()=>Dt(e?`/api/team/models?vendor=${encodeURIComponent(e)}`:"/api/team/models"),staleTime:6e4})}function _5(){const e=Rn();return Ao({mutationFn:async t=>{const r=await fetch("/api/team/default",{method:"POST",headers:{"Content-Type":"application/json",...w1()},body:JSON.stringify({team:t})});if(!r.ok){const a=await r.text().catch(()=>"");throw new Error(`${r.status}: ${a||r.statusText}`)}return r.json()},onSuccess:()=>{e.invalidateQueries({queryKey:["team"]}),e.invalidateQueries({queryKey:["reviewers"]})}})}function ko({value:e,options:t,onChange:r,freeText:a=!1,freeTextPlaceholder:l="Type model id…",disabled:o=!1,className:c,ariaLabel:f,defaultOpen:h=!1,onOpenChange:m}){if(a)return d.jsx("input",{type:"text",value:e,placeholder:l,disabled:o,onChange:z=>r(z.target.value),"aria-label":f,className:ae("w-full rounded-md border bg-white px-2.5 py-1.5 font-mono text-xs","border-zinc-200 text-zinc-700 placeholder:text-zinc-400","focus:border-indigo-400 focus:outline-none focus:ring-1 focus:ring-indigo-400/50","dark:border-zinc-700 dark:bg-zinc-900 dark:text-zinc-300 dark:placeholder:text-zinc-500","disabled:cursor-not-allowed disabled:opacity-50",c)});const[g,x]=_.useState(h),y=z=>{x(W=>{const U=typeof z=="function"?z(W):z;return U!==W&&m?.(U),U})},[v,k]=_.useState(-1),E=_.useRef(null),S=_.useRef(null),N=_.useId(),O=t.find(z=>z.id===e)??t[0]??null,A=O?t.findIndex(z=>z.id===O.id):-1;_.useEffect(()=>{if(!g)return;const z=W=>{E.current&&(E.current.contains(W.target)||y(!1))};return document.addEventListener("mousedown",z),()=>document.removeEventListener("mousedown",z)},[g]),_.useEffect(()=>{if(!g)return;const z=W=>{W.key==="Escape"&&(W.preventDefault(),y(!1),S.current?.focus())};return window.addEventListener("keydown",z),()=>window.removeEventListener("keydown",z)},[g]),_.useEffect(()=>{g&&k(A>=0?A:0)},[g,A]);function P(z){(z.key==="ArrowDown"||z.key==="ArrowUp"||z.key==="Enter"||z.key===" ")&&(z.preventDefault(),y(!0))}function $(z){if(z.key==="ArrowDown")z.preventDefault(),k(W=>Math.min(t.length-1,(W<0?-1:W)+1));else if(z.key==="ArrowUp")z.preventDefault(),k(W=>Math.max(0,(W<0?t.length:W)-1));else if(z.key==="Home")z.preventDefault(),k(0);else if(z.key==="End")z.preventDefault(),k(t.length-1);else if(z.key==="Enter"||z.key===" "){if(z.preventDefault(),v>=0&&v<t.length){const W=t[v];W&&(r(W.id),y(!1),S.current?.focus())}}else z.key==="Tab"&&y(!1)}const M=O?.label??l,K=O?.detail;return d.jsxs("div",{ref:E,className:ae("relative",c),children:[d.jsxs("button",{ref:S,type:"button",role:"combobox","aria-haspopup":"listbox","aria-expanded":g,"aria-controls":g?N:void 0,"aria-label":f,disabled:o,onClick:()=>y(z=>!z),onKeyDown:P,className:ae("flex w-full items-center gap-2 rounded-md border bg-white px-2.5 py-1.5 text-left","border-zinc-200 hover:border-zinc-300","focus:border-indigo-400 focus:outline-none focus:ring-1 focus:ring-indigo-400/50","dark:border-zinc-700 dark:bg-zinc-900 dark:hover:border-zinc-600","disabled:cursor-not-allowed disabled:opacity-50"),children:[d.jsx("span",{className:"min-w-0 flex-1 truncate text-xs text-zinc-700 dark:text-zinc-300",children:M}),K&&d.jsx("span",{className:"hidden shrink-0 truncate font-mono text-[10px] text-zinc-400 dark:text-zinc-500 sm:block",children:K}),d.jsx(Za,{className:ae("h-3.5 w-3.5 shrink-0 text-zinc-400 transition-transform dark:text-zinc-500",g&&"rotate-180"),"aria-hidden":!0})]}),g&&d.jsx("div",{id:N,role:"listbox",tabIndex:-1,onKeyDown:$,"aria-activedescendant":v>=0?`${N}-opt-${v}`:void 0,ref:z=>{z?.focus()},className:ae("absolute left-0 right-0 z-30 mt-1 max-h-64 overflow-auto rounded-md border bg-white py-1 shadow-lg outline-none","border-zinc-200 dark:border-zinc-700 dark:bg-zinc-900 dark:shadow-black/30"),children:t.length===0?d.jsx("div",{className:"px-3 py-2 text-xs text-zinc-500 dark:text-zinc-400",children:"No models available."}):t.map((z,W)=>{const U=z.id===e,ee=W===v;return d.jsxs("button",{id:`${N}-opt-${W}`,type:"button",role:"option","aria-selected":U,onClick:()=>{r(z.id),y(!1),S.current?.focus()},onMouseEnter:()=>k(W),className:ae("flex w-full items-start gap-2 px-3 py-1.5 text-left transition-colors",ee?"bg-zinc-100 dark:bg-zinc-800":"bg-transparent",U&&"bg-indigo-50/60 dark:bg-indigo-950/40"),children:[d.jsx(Mr,{className:ae("mt-0.5 h-3.5 w-3.5 shrink-0",U?"text-indigo-600 dark:text-indigo-400":"text-transparent"),"aria-hidden":!0}),d.jsxs("span",{className:"min-w-0 flex-1",children:[d.jsx("span",{className:"block truncate text-xs font-medium text-zinc-900 dark:text-zinc-100",children:z.label}),z.detail&&d.jsx("span",{className:"block truncate font-mono text-[10px] text-zinc-500 dark:text-zinc-500",children:z.detail})]})]},z.id||`__default-${W}`)})})]})}const E5="(default model)",N5="Use the host CLI's default";function S5({open:e,reviewers:t,initialSelection:r,onApply:a,onClose:l}){const[o,c]=_.useState(""),[f,h]=_.useState(new Map),[m,g]=_.useState(new Set),[x,y]=_.useState(null),v=_.useRef(null),[k,E]=_.useState([]),[S,N]=_.useState(!1),[O,A]=_.useState(""),P=_.useRef(null),[$,M]=_.useState(new Map),[K,z]=_.useState(new Set),{activeCli:W}=Mo(),{data:U,isLoading:ee}=pk(W??void 0),te=_.useMemo(()=>{const le=[{id:"",label:E5,detail:N5}];if(U?.models)for(const xe of U.models)le.push({id:xe.id,label:xe.displayName??xe.id,detail:xe.displayName?xe.id:void 0});return le},[U]),_e=!ee&&(U?.models?.length??0)===0;_.useEffect(()=>{if(e){const le=new Map,xe=new Map,pe=[];for(const Ue of r)Ue.description?pe.push({description:Ue.description,count:Ue.count}):(le.set(Ue.id,Ue.count),Ue.models&&Ue.models.length===Ue.count&&xe.set(Ue.id,Ue.models));h(le),M(xe),z(new Set),E(pe),c(""),y(null),N(!1),A(""),setTimeout(()=>v.current?.focus(),50)}},[e,r]),_.useEffect(()=>{if(!e)return;const le=xe=>{xe.key==="Escape"&&l()};return window.addEventListener("keydown",le),()=>window.removeEventListener("keydown",le)},[e,l]);const se=_.useMemo(()=>fk(t,o),[t,o]),X=_.useMemo(()=>hk(se),[se]);function F(le){h(xe=>{const pe=new Map(xe);return pe.has(le)?pe.delete(le):pe.set(le,1),pe}),M(xe=>{if(!xe.has(le))return xe;const pe=new Map(xe);return pe.delete(le),pe}),z(xe=>{if(!xe.has(le))return xe;const pe=new Set(xe);return pe.delete(le),pe})}function ne(le,xe){const pe=Math.max(1,Math.min(3,xe));h(Ue=>{const Re=new Map(Ue);return Re.set(le,pe),Re}),M(Ue=>{const Re=Ue.get(le);if(!Re)return Ue;const Tt=new Map(Ue),tt=[];for(let gt=0;gt<pe;gt++)tt.push(Re[gt]??null);return Tt.set(le,tt),Tt})}function V(le){z(xe=>{const pe=new Set(xe);return pe.has(le)?pe.delete(le):pe.add(le),pe}),M(xe=>{if(xe.has(le))return xe;const pe=f.get(le)??1,Ue=new Map(xe);return Ue.set(le,Array(pe).fill(null)),Ue})}function fe(le,xe){M(pe=>{const Ue=new Map(pe),Re=f.get(le)??1;return Ue.set(le,Array(Re).fill(xe)),Ue})}function R(le,xe,pe){M(Ue=>{const Re=Ue.get(le),Tt=f.get(le)??1,tt=Re?[...Re]:Array(Tt).fill(null);tt[xe]=pe;const gt=new Map(Ue);return gt.set(le,tt),gt})}function j(le){g(xe=>{const pe=new Set(xe);return pe.has(le)?pe.delete(le):pe.add(le),pe})}function I(){const le=O.trim();le&&(E(xe=>[...xe,{description:le,count:1}]),A(""),N(!1))}function C(le){E(xe=>xe.filter((pe,Ue)=>Ue!==le))}function ue(le,xe){const pe=Math.max(1,Math.min(3,xe));E(Ue=>Ue.map((Re,Tt)=>Tt===le?{...Re,count:pe}:Re))}function be(){const le=[];for(const[xe,pe]of f){const Ue=$.get(xe),Re=Ue&&Ue.length===pe&&Ue.some(Tt=>Tt!==null);le.push(Re?{id:xe,count:pe,models:Ue}:{id:xe,count:pe})}k.forEach((xe,pe)=>{le.push({id:`ephemeral-${pe+1}`,count:xe.count,description:xe.description})}),a(le)}if(!e)return null;const ye=f.size+k.length;return d.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center px-4 bg-black/50 backdrop-blur-sm",children:d.jsxs("div",{role:"dialog","aria-modal":"true",className:"flex max-h-[80vh] w-full max-w-2xl flex-col overflow-hidden rounded-xl border border-zinc-200 bg-white shadow-2xl dark:border-zinc-700 dark:bg-zinc-900",children:[d.jsxs("div",{className:"flex items-center justify-between border-b border-zinc-200 px-5 py-3.5 dark:border-zinc-700",children:[d.jsx("h2",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:"Select Reviewers"}),d.jsx("button",{type:"button",onClick:l,className:"rounded-md p-1 text-zinc-400 hover:bg-zinc-100 hover:text-zinc-600 dark:text-zinc-500 dark:hover:bg-zinc-800 dark:hover:text-zinc-300",children:d.jsx(Bn,{className:"h-4 w-4"})})]}),d.jsx("div",{className:"border-b border-zinc-200 px-5 py-2.5 dark:border-zinc-700",children:d.jsxs("div",{className:"relative",children:[d.jsx(Qu,{className:"absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-zinc-400"}),d.jsx("input",{ref:v,type:"text",value:o,onChange:le=>c(le.target.value),placeholder:"Search reviewers...",className:ae("w-full rounded-md border py-1.5 pl-8 pr-3 text-sm","border-zinc-200 bg-zinc-50 placeholder:text-zinc-400","dark:border-zinc-700 dark:bg-zinc-800 dark:placeholder:text-zinc-500","focus:border-indigo-400 focus:outline-none focus:ring-1 focus:ring-indigo-400/50")})]})}),d.jsxs("div",{className:"min-w-0 flex-1 overflow-y-auto overflow-x-hidden px-5 py-3",children:[X.length===0&&k.length===0&&d.jsx("p",{className:"py-8 text-center text-sm text-zinc-400 dark:text-zinc-500",children:"No reviewers match your search."}),X.map(([le,xe])=>{const pe=m.has(le),Ue=Ru[le];return d.jsxs("div",{className:"mb-4 last:mb-0",children:[d.jsxs("button",{type:"button",onClick:()=>j(le),className:"mb-2 flex w-full items-center gap-1.5 text-left text-xs font-semibold uppercase tracking-wider text-zinc-400 hover:text-zinc-600 dark:text-zinc-500 dark:hover:text-zinc-300",children:[pe?d.jsx(ji,{className:"h-3 w-3"}):d.jsx(Za,{className:"h-3 w-3"}),Ue.label,d.jsxs("span",{className:"font-normal text-zinc-300 dark:text-zinc-600",children:["(",xe.length,")"]})]}),!pe&&d.jsx("div",{className:"flex flex-col gap-1.5",children:xe.map(Re=>{const Tt=f.has(Re.id),tt=f.get(Re.id)??1,gt=x===Re.id;return d.jsxs("div",{children:[d.jsxs("div",{role:"button",tabIndex:0,onClick:()=>F(Re.id),onKeyDown:_t=>{(_t.key==="Enter"||_t.key===" ")&&(_t.preventDefault(),F(Re.id))},className:ae("flex min-w-0 items-center gap-3 rounded-lg border px-3 py-2 transition-colors cursor-pointer",Tt?"border-indigo-200 bg-indigo-50/50 dark:border-indigo-800 dark:bg-indigo-950/30":"border-zinc-100 bg-white hover:border-zinc-200 dark:border-zinc-800 dark:bg-zinc-900 dark:hover:border-zinc-700"),children:[d.jsx("input",{type:"checkbox",checked:Tt,onChange:()=>F(Re.id),onClick:_t=>_t.stopPropagation(),className:"h-3.5 w-3.5 shrink-0 rounded border-zinc-300 text-indigo-500 focus:ring-indigo-400 dark:border-zinc-600"}),d.jsx(Zs,{icon:Re.icon,className:ae("h-4 w-4 shrink-0",Tt?"text-indigo-500 dark:text-indigo-400":"text-zinc-400 dark:text-zinc-500")}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-sm font-medium text-zinc-900 dark:text-zinc-100",children:Re.name}),Re.tier==="persona"&&d.jsx("span",{className:"rounded-full bg-violet-100 px-1.5 py-0.5 text-[10px] font-medium text-violet-700 dark:bg-violet-900/50 dark:text-violet-300",children:"Persona"})]}),d.jsx("p",{className:"truncate text-xs text-zinc-500 dark:text-zinc-400",children:Re.description})]}),Tt&&d.jsxs("div",{className:"flex shrink-0 items-center gap-1",onClick:_t=>_t.stopPropagation(),children:[d.jsx("button",{type:"button",onClick:()=>ne(Re.id,tt-1),disabled:tt<=1,className:"rounded p-0.5 text-zinc-400 hover:bg-zinc-100 disabled:opacity-30 dark:hover:bg-zinc-800",children:d.jsx(xo,{className:"h-3 w-3"})}),d.jsx("span",{className:"w-4 text-center text-xs font-medium text-zinc-600 dark:text-zinc-300",children:tt}),d.jsx("button",{type:"button",onClick:()=>ne(Re.id,tt+1),disabled:tt>=3,className:"rounded p-0.5 text-zinc-400 hover:bg-zinc-100 disabled:opacity-30 dark:hover:bg-zinc-800",children:d.jsx(pa,{className:"h-3 w-3"})})]}),Tt&&d.jsx("button",{type:"button",onClick:_t=>{_t.stopPropagation(),V(Re.id)},"aria-expanded":K.has(Re.id),"aria-label":"Advanced model overrides",title:"Advanced — model overrides for this run",className:ae("shrink-0 rounded p-1 transition-colors",K.has(Re.id)?"bg-indigo-100 text-indigo-600 dark:bg-indigo-900/50 dark:text-indigo-400":$.get(Re.id)?.some(_t=>_t!==null)?"text-indigo-500 dark:text-indigo-400":"text-zinc-300 hover:text-zinc-500 dark:text-zinc-600 dark:hover:text-zinc-400"),children:d.jsx(sk,{className:"h-3.5 w-3.5"})}),d.jsx("button",{type:"button",onClick:_t=>{_t.stopPropagation(),y(gt?null:Re.id)},className:ae("shrink-0 rounded p-1 transition-colors",gt?"bg-indigo-100 text-indigo-600 dark:bg-indigo-900/50 dark:text-indigo-400":"text-zinc-300 hover:text-zinc-500 dark:text-zinc-600 dark:hover:text-zinc-400"),children:d.jsx(ek,{className:"h-3.5 w-3.5"})})]}),Tt&&K.has(Re.id)&&d.jsx(z5,{count:tt,models:$.get(Re.id)??Array(tt).fill(null),modelOptions:te,freeText:_e,personaName:Re.id,onUniformChange:_t=>fe(Re.id,_t),onInstanceChange:(_t,ot)=>R(Re.id,_t,ot)}),gt&&d.jsxs("div",{className:"ml-10 mt-1 rounded-lg border border-zinc-100 bg-zinc-50 p-3 text-xs dark:border-zinc-800 dark:bg-zinc-800/50",children:[Re.description&&d.jsx("p",{className:"mb-2 text-zinc-600 dark:text-zinc-300",children:Re.description}),Re.known_for&&d.jsxs("p",{className:"mb-1.5",children:[d.jsxs("span",{className:"font-semibold text-zinc-600 dark:text-zinc-300",children:["Known for:"," "]}),d.jsx("span",{className:"text-zinc-500 dark:text-zinc-400",children:Re.known_for})]}),Re.philosophy&&d.jsxs("p",{className:"mb-2 italic text-zinc-500 dark:text-zinc-400",children:["“",Re.philosophy,"”"]}),Re.focus_areas.length>0&&d.jsx("div",{className:"flex flex-wrap gap-1",children:Re.focus_areas.map(_t=>d.jsx("span",{className:"rounded-full bg-zinc-200 px-2 py-0.5 text-[10px] text-zinc-600 dark:bg-zinc-700 dark:text-zinc-300",children:_t},_t))})]})]},Re.id)})})]},le)}),d.jsxs("div",{className:"mb-2 mt-2",children:[k.length>0&&d.jsxs("div",{className:"mb-2 flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wider text-amber-500 dark:text-amber-400",children:[d.jsx(yo,{className:"h-3 w-3"}),"One-off Reviewers",d.jsxs("span",{className:"font-normal text-amber-400 dark:text-amber-600",children:["(",k.length,")"]})]}),d.jsx("div",{className:"flex flex-col gap-1.5",children:k.map((le,xe)=>d.jsxs("div",{className:ae("flex min-w-0 items-center gap-3 rounded-lg border border-dashed px-3 py-2","border-amber-300 bg-amber-50/50","dark:border-amber-700 dark:bg-amber-950/20"),children:[d.jsx(yo,{className:"h-4 w-4 shrink-0 text-amber-500 dark:text-amber-400"}),d.jsx("p",{className:"min-w-0 flex-1 text-xs text-amber-700 dark:text-amber-300",children:le.description}),d.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[d.jsx("button",{type:"button",onClick:()=>ue(xe,le.count-1),disabled:le.count<=1,className:"rounded p-0.5 text-amber-400 hover:bg-amber-100 disabled:opacity-30 dark:text-amber-500 dark:hover:bg-amber-900",children:d.jsx(xo,{className:"h-3 w-3"})}),d.jsx("span",{className:"w-4 text-center text-xs font-medium text-amber-600 dark:text-amber-300",children:le.count}),d.jsx("button",{type:"button",onClick:()=>ue(xe,le.count+1),disabled:le.count>=3,className:"rounded p-0.5 text-amber-400 hover:bg-amber-100 disabled:opacity-30 dark:text-amber-500 dark:hover:bg-amber-900",children:d.jsx(pa,{className:"h-3 w-3"})})]}),d.jsx("button",{type:"button",onClick:()=>C(xe),className:"shrink-0 rounded p-1 text-amber-400 hover:bg-amber-100 hover:text-amber-600 dark:text-amber-500 dark:hover:bg-amber-900 dark:hover:text-amber-300",children:d.jsx(Bn,{className:"h-3.5 w-3.5"})})]},xe))}),S?d.jsxs("div",{className:ae("mt-1.5 rounded-lg border border-dashed p-3","border-amber-400 bg-amber-50/30","dark:border-amber-600 dark:bg-amber-950/20"),children:[d.jsx("label",{className:"mb-1.5 block text-xs font-medium text-zinc-700 dark:text-zinc-300",children:"What should this reviewer focus on?"}),d.jsx("textarea",{ref:P,value:O,onChange:le=>A(le.target.value),onKeyDown:le=>{le.key==="Enter"&&!le.shiftKey&&(le.preventDefault(),I()),le.key==="Escape"&&(le.stopPropagation(),N(!1),A(""))},placeholder:"e.g. Error handling in the auth flow, accessibility compliance, review as a junior developer",rows:2,className:ae("w-full resize-none rounded-md border px-3 py-2 text-sm","border-zinc-200 bg-white placeholder:text-zinc-400","dark:border-zinc-700 dark:bg-zinc-800 dark:placeholder:text-zinc-500","focus:border-amber-400 focus:outline-none focus:ring-1 focus:ring-amber-400/50")}),d.jsxs("div",{className:"mt-2 flex items-center justify-between",children:[d.jsx("p",{className:"text-[10px] text-zinc-400 dark:text-zinc-500",children:"For this review only — won't be saved to your library."}),d.jsxs("div",{className:"flex gap-1.5",children:[d.jsx("button",{type:"button",onClick:()=>{N(!1),A("")},className:"rounded-md px-3 py-1 text-xs text-zinc-500 hover:bg-zinc-100 dark:hover:bg-zinc-800",children:"Cancel"}),d.jsxs("button",{type:"button",onClick:I,disabled:!O.trim(),className:"flex items-center gap-1 rounded-md bg-amber-500 px-3 py-1 text-xs font-medium text-white hover:bg-amber-600 disabled:opacity-50",children:[d.jsx(pa,{className:"h-3 w-3"}),"Add to Team"]})]})]})]}):d.jsxs("button",{type:"button",onClick:()=>{N(!0),setTimeout(()=>P.current?.focus(),50)},className:ae("mt-1.5 flex w-full items-center gap-3 rounded-lg border border-dashed px-3 py-2.5 text-left transition-colors","border-zinc-300 text-zinc-400 hover:border-amber-400 hover:bg-amber-50/50 hover:text-amber-600","dark:border-zinc-700 dark:text-zinc-500 dark:hover:border-amber-600 dark:hover:bg-amber-950/20 dark:hover:text-amber-400"),children:[d.jsx(pa,{className:"h-4 w-4 shrink-0"}),d.jsx("span",{className:"text-sm",children:"Describe a one-off reviewer for this review..."})]})]})]}),d.jsxs("div",{className:"flex items-center justify-between border-t border-zinc-200 px-5 py-3 dark:border-zinc-700",children:[d.jsxs("span",{className:"text-xs text-zinc-400 dark:text-zinc-500",children:[ye," reviewer",ye!==1?"s":""," selected"]}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx("button",{type:"button",onClick:l,className:"rounded-md border border-zinc-300 px-4 py-1.5 text-xs font-medium transition-colors hover:bg-zinc-100 dark:border-zinc-700 dark:hover:bg-zinc-800",children:"Cancel"}),d.jsx("button",{type:"button",onClick:be,className:"rounded-md bg-indigo-600 px-4 py-1.5 text-xs font-medium text-white transition-colors hover:bg-indigo-700",children:"Apply"})]})]})]})})}function z5({count:e,models:t,modelOptions:r,freeText:a,personaName:l,onUniformChange:o,onInstanceChange:c}){const h=new Set(t).size<=1,[m,g]=_.useState(h?"uniform":"per-instance");_.useEffect(()=>{!h&&m==="uniform"&&g("per-instance")},[h,m]);const x=t[0]??null;return d.jsxs("div",{onClick:y=>y.stopPropagation(),className:"ml-10 mt-1 space-y-2 rounded-lg border border-zinc-100 bg-zinc-50/50 p-3 dark:border-zinc-800 dark:bg-zinc-800/30",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"text-[11px] font-medium uppercase tracking-wider text-zinc-500 dark:text-zinc-400",children:"Model override (this run)"}),e>1&&d.jsxs("div",{className:"inline-flex items-center gap-0.5 rounded-md border border-zinc-200 p-0.5 dark:border-zinc-700",children:[d.jsx("button",{type:"button",onClick:()=>{g("uniform"),h||o(x)},"aria-pressed":m==="uniform"&&h,className:ae("rounded px-2 py-0.5 text-[10px] font-medium transition",m==="uniform"&&h?"bg-zinc-900 text-white dark:bg-zinc-100 dark:text-zinc-900":"text-zinc-500 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-zinc-200"),children:"Same model"}),d.jsx("button",{type:"button",onClick:()=>g("per-instance"),"aria-pressed":m==="per-instance"||!h,className:ae("rounded px-2 py-0.5 text-[10px] font-medium transition",m==="per-instance"||!h?"bg-zinc-900 text-white dark:bg-zinc-100 dark:text-zinc-900":"text-zinc-500 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-zinc-200"),children:"Per reviewer"})]})]}),m==="uniform"&&h||e===1?d.jsx(ko,{value:x??"",options:r,freeText:a,ariaLabel:`Model for ${l}`,onChange:y=>o(y||null)}):d.jsx("div",{className:"space-y-1",children:Array.from({length:e},(y,v)=>d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsxs("span",{className:"w-28 shrink-0 truncate text-[11px] text-zinc-500",children:[l,"-",v+1]}),d.jsx(ko,{value:t[v]??"",options:r,freeText:a,ariaLabel:`Model for ${l}-${v+1}`,onChange:k=>c(v,k||null)})]},v))}),a&&d.jsx("p",{className:"text-[10px] text-zinc-500 dark:text-zinc-500",children:"Your AI CLI didn't return a model list. Type any model id it accepts."})]})}const so=[{id:"review",command:"ocr review",label:"Review",description:"Run multi-agent AI code review",params:[{name:"target",type:"text",label:"Target",placeholder:"staged (default)"},{name:"requirements",type:"text",label:"Requirements",placeholder:"spec.md or describe what to focus on..."},{name:"fresh",type:"toggle",label:"Fresh start"}]},{id:"map",command:"ocr map",label:"Map",description:"Generate a Code Review Map for large changesets",params:[{name:"target",type:"text",label:"Target",placeholder:"staged (default)"},{name:"requirements",type:"text",label:"Requirements",placeholder:"spec.md or describe what to focus on..."},{name:"fresh",type:"toggle",label:"Fresh start"}]}];function C5(e){const t=[];return{cleaned:e.replace(/--reviewer\s+(?:(\d+):)?(?:"([^"]*?)"|'([^']*?)')/g,(a,l,o,c)=>(t.push({description:o??c??"",count:parseInt(l??"1",10)||1}),"")).replace(/\s{2,}/g," ").trim(),entries:t}}function T5(e){const{cleaned:t,entries:r}=C5(e),l=t.replace(/^ocr\s+/,"").split(/\s+/),o=l[0]??"";if(!so.find(m=>m.id===o))return null;const c={};let f,h=1;for(;h<l.length;){const m=l[h]??"";if(m==="--fresh")c.fresh=!0,h++;else if(m==="--team"&&h+1<l.length){const g=l[h+1]??"";f=cy(g),h+=2}else if(m==="--requirements"&&h+1<l.length){const g=l.slice(h+1),x=g.indexOf("--team");if(x>=0){c.requirements=g.slice(0,x).join(" ");const y=g[x+1]??"";f=cy(y)}else c.requirements=g.join(" ");break}else m.startsWith("--")||(c.target=m),h++}return r.length>0&&(f||(f=[]),r.forEach((m,g)=>{f.push({id:`ephemeral-${g+1}`,count:m.count,description:m.description})})),{commandId:o,params:c,team:f}}function cy(e){const t=e.trim();if(t.startsWith("["))try{const r=JSON.parse(t),a=new Map;for(const l of r){if(typeof l.persona!="string")continue;const o=typeof l.instance_index=="number"?l.instance_index:1,c=typeof l.model=="string"?l.model:null,f=a.get(l.persona)??{count:0,models:[]};f.count=Math.max(f.count,o),f.models[o-1]=c,a.set(l.persona,f)}return Array.from(a,([l,{count:o,models:c}])=>{const f=[];for(let h=0;h<o;h++)f.push(c[h]??null);return f.some(h=>h!==null)?{id:l,count:o,models:f}:{id:l,count:o}})}catch{}return t.split(",").map(r=>{const[a="",l]=r.split(":");return{id:a,count:parseInt(l??"1",10)||1}}).filter(r=>r.id.length>0)}function A5(e){const t=e.filter(l=>!l.description);if(!t.some(l=>l.models&&l.models.length===l.count&&l.models.some(o=>o!==null)))return t.map(l=>`${l.id}:${l.count}`).join(",");const a=[];for(const l of t)for(let o=0;o<l.count;o++)a.push({persona:l.id,instance_index:o+1,name:`${l.id}-${o+1}`,model:l.models?.[o]??null});return JSON.stringify(a)}function R5(e,t){if(e.some(a=>a.description)||t.some(a=>a.description)||e.some(a=>a.models?.some(l=>l!==null))||t.some(a=>a.models?.some(l=>l!==null))||e.length!==t.length)return!1;const r=new Map(e.map(a=>[a.id,a.count]));for(const a of t)if(r.get(a.id)!==a.count)return!1;return!0}function O5({isRunning:e,runningCount:t,onRunCommand:r,prefill:a,onPrefillConsumed:l}){const[o,c]=_.useState(so[0]?.id??""),[f,h]=_.useState({}),[m,g]=_.useState(!1),[x,y]=_.useState(!1),v=_.useRef(void 0),{reviewers:k,defaults:E,isLoaded:S}=Wm(),[N,O]=_.useState(null),[A,P]=_.useState(!1),$=so.find(V=>V.id===o)??so[0],M=$.id==="review",K=S?E.map(V=>({id:V,count:1})).reduce((V,fe)=>{const R=V.find(j=>j.id===fe.id);return R?R.count+=fe.count:V.push({...fe}),V},[]):[],z=N??K,[W,U]=_.useState(null);a!==W&&(U(a),a&&(c(a.commandId),h(a.params),O(a.team??null),g(!1),y(!0),l())),_.useEffect(()=>{if(x)return v.current=setTimeout(()=>y(!1),1200),()=>clearTimeout(v.current)},[x]);function ee(V){V!==o&&(c(V),h({}),O(null),g(!1))}function te(V,fe){h(R=>({...R,[V]:fe}))}function _e(V){const R=(N??K).filter(j=>j.id!==V);O(R)}const se=_.useCallback(V=>{R5(V,K)?O(null):O(V),P(!1)},[K]);function X(){const V=[$.command],fe=f.target;if(typeof fe=="string"&&fe.trim()&&V.push(fe.trim()),f.fresh===!0&&V.push("--fresh"),M&&N!==null){const j=A5(N);j&&V.push("--team",j);for(const I of N)if(I.description){const C=I.description.replace(/"/g,'\\"');I.count>1?V.push("--reviewer",`${I.count}:"${C}"`):V.push("--reviewer",`"${C}"`)}}const R=f.requirements;return typeof R=="string"&&R.trim()&&V.push("--requirements",R.trim()),V.join(" ")}function F(){e||g(!0)}function ne(){const V=X();g(!1),h({}),O(null),r(V)}return d.jsxs("div",{className:ae("relative overflow-hidden rounded-lg border border-zinc-200 border-l-[3px] border-l-indigo-500 transition-shadow duration-500 dark:border-zinc-800 dark:border-l-indigo-400",x&&"ring-2 ring-indigo-400/60 shadow-md shadow-indigo-500/10"),children:[d.jsxs("div",{className:"flex items-center gap-1 border-b border-zinc-200 bg-zinc-50 px-4 py-2.5 dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsx(Ro,{className:"mr-1.5 h-4 w-4 text-indigo-500 dark:text-indigo-400"}),so.map(V=>d.jsx("button",{type:"button",onClick:()=>ee(V.id),className:ae("rounded-full px-3.5 py-1 text-xs font-medium transition-colors",V.id===o?"bg-indigo-600 text-white shadow-sm":"text-zinc-600 hover:bg-zinc-200 dark:text-zinc-400 dark:hover:bg-zinc-800"),children:V.label},V.id))]}),d.jsxs("div",{className:"flex items-start gap-2 border-b border-amber-200 bg-amber-50 px-4 py-2.5 text-xs text-amber-800 dark:border-amber-900/50 dark:bg-amber-950/30 dark:text-amber-300",children:[d.jsx(Qm,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),d.jsx("span",{children:"Commands run an AI agent with full read/write and shell access to your project. Only run in trusted environments."})]}),d.jsxs("div",{className:"space-y-4 bg-white px-5 py-4 dark:bg-zinc-900/50",children:[d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:$.description}),d.jsxs("div",{className:"space-y-3",children:[$.params.map(V=>V.type==="text"?d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("label",{className:"w-28 shrink-0 text-right text-xs font-medium text-zinc-500 dark:text-zinc-400",children:V.label}),d.jsx("input",{type:"text",placeholder:V.placeholder,disabled:e,value:f[V.name]??"",onChange:fe=>te(V.name,fe.target.value),className:ae("w-full rounded-md border px-3 py-1.5 text-sm","border-zinc-200 bg-zinc-50 placeholder:text-zinc-400","dark:border-zinc-700 dark:bg-zinc-800 dark:placeholder:text-zinc-500","focus:border-indigo-400 focus:outline-none focus:ring-1 focus:ring-indigo-400/50","disabled:cursor-not-allowed disabled:opacity-50")})]},V.name):d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("span",{className:"w-28 shrink-0"}),d.jsxs("label",{className:"flex items-center gap-2 text-xs text-zinc-500 dark:text-zinc-400",children:[d.jsx("input",{type:"checkbox",disabled:e,checked:f[V.name]===!0,onChange:fe=>te(V.name,fe.target.checked),className:"h-3.5 w-3.5 rounded border-zinc-300 text-indigo-500 focus:ring-indigo-400 dark:border-zinc-600"}),V.label]})]},V.name)),M&&d.jsx(k5,{reviewers:k,selection:z,isLoaded:S,disabled:e,onRemove:_e,onCustomize:()=>P(!0)})]}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("span",{className:"w-28 shrink-0"}),d.jsxs("button",{type:"button",disabled:e,onClick:F,className:ae("flex w-full items-center justify-center gap-1.5 rounded-md px-4 py-2 text-sm font-medium transition-colors","bg-indigo-600 text-white hover:bg-indigo-700","disabled:cursor-not-allowed disabled:opacity-50"),children:[d.jsx($s,{className:"h-3.5 w-3.5"}),"Run ",$.label,t!=null&&t>0&&d.jsxs("span",{className:"ml-1.5 rounded-full bg-indigo-500/20 px-1.5 text-[10px] font-normal text-indigo-300",children:[t," running"]})]})]})]}),m&&d.jsx("div",{className:"absolute inset-0 z-10 flex items-center justify-center bg-white/95 backdrop-blur-sm dark:bg-zinc-900/95",children:d.jsxs("div",{className:"flex flex-col items-center gap-3 px-4",children:[d.jsxs("p",{className:"text-sm font-medium",children:["Run ",$.label,"?"]}),d.jsx("p",{className:"max-w-[260px] text-center text-xs text-zinc-500 dark:text-zinc-400",children:"This will spawn a Claude Code session that may take several minutes."}),d.jsx("code",{className:"max-w-[320px] truncate rounded bg-zinc-100 px-2 py-1 text-xs text-zinc-600 dark:bg-zinc-800 dark:text-zinc-400",children:X()}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx("button",{type:"button",onClick:()=>g(!1),className:"rounded-md border border-zinc-300 px-4 py-1.5 text-xs font-medium transition-colors hover:bg-zinc-100 dark:border-zinc-700 dark:hover:bg-zinc-800",children:"Cancel"}),d.jsxs("button",{type:"button",onClick:ne,className:"flex items-center gap-1 rounded-md bg-indigo-600 px-4 py-1.5 text-xs font-medium text-white transition-colors hover:bg-indigo-700",children:[d.jsx($s,{className:"h-3 w-3"}),"Start"]})]})]})}),M&&d.jsx(S5,{open:A,reviewers:k,initialSelection:z,onApply:se,onClose:()=>P(!1)})]})}const uy=[{border:"border-l-indigo-400 dark:border-l-indigo-500",bg:"bg-indigo-50/30 dark:bg-indigo-950/15",text:"text-indigo-700 dark:text-indigo-300",dot:"bg-indigo-500"},{border:"border-l-emerald-400 dark:border-l-emerald-500",bg:"bg-emerald-50/30 dark:bg-emerald-950/15",text:"text-emerald-700 dark:text-emerald-300",dot:"bg-emerald-500"},{border:"border-l-amber-400 dark:border-l-amber-500",bg:"bg-amber-50/30 dark:bg-amber-950/15",text:"text-amber-700 dark:text-amber-300",dot:"bg-amber-500"},{border:"border-l-sky-400 dark:border-l-sky-500",bg:"bg-sky-50/30 dark:bg-sky-950/15",text:"text-sky-700 dark:text-sky-300",dot:"bg-sky-500"},{border:"border-l-rose-400 dark:border-l-rose-500",bg:"bg-rose-50/30 dark:bg-rose-950/15",text:"text-rose-700 dark:text-rose-300",dot:"bg-rose-500"},{border:"border-l-violet-400 dark:border-l-violet-500",bg:"bg-violet-50/30 dark:bg-violet-950/15",text:"text-violet-700 dark:text-violet-300",dot:"bg-violet-500"}],M5={border:"border-l-zinc-300 dark:border-l-zinc-700",bg:"bg-transparent",text:"text-zinc-600 dark:text-zinc-400",dot:"bg-zinc-400 dark:bg-zinc-500"};function j5(e){let t=0;for(let r=0;r<e.length;r++)t=t*31+e.charCodeAt(r)|0;return Math.abs(t)}function D5(e){return e==="orchestrator"?M5:uy[j5(e)%uy.length]}function L5(e){return e==="orchestrator"?"Orchestrator":e}function I5({agentId:e,showName:t,displayName:r,children:a}){const l=D5(e),o=r??L5(e);return d.jsxs("div",{className:ae("relative pl-4",l.bg),children:[d.jsx("span",{"aria-hidden":!0,className:ae("pointer-events-none absolute inset-y-0 left-0 w-[2px]",l.border.replace("border-l-","bg-"))}),t&&d.jsxs("div",{className:ae("mb-1 flex items-center gap-1.5 text-[11px] font-medium",l.text),children:[d.jsx("span",{"aria-hidden":!0,className:ae("inline-block h-1.5 w-1.5 rounded-full",l.dot)}),o]}),d.jsx("div",{children:a})]})}function B5(e,t){const r={};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const U5=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,F5=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,P5={};function dy(e,t){return(P5.jsx?F5:U5).test(e)}const H5=/[ \t\n\f\r]/g;function q5(e){return typeof e=="object"?e.type==="text"?fy(e.value):!1:fy(e)}function fy(e){return e.replace(H5,"")===""}class jo{constructor(t,r,a){this.normal=r,this.property=t,a&&(this.space=a)}}jo.prototype.normal={};jo.prototype.property={};jo.prototype.space=void 0;function gk(e,t){const r={},a={};for(const l of e)Object.assign(r,l.property),Object.assign(a,l.normal);return new jo(r,a,t)}function um(e){return e.toLowerCase()}class ir{constructor(t,r){this.attribute=r,this.property=t}}ir.prototype.attribute="";ir.prototype.booleanish=!1;ir.prototype.boolean=!1;ir.prototype.commaOrSpaceSeparated=!1;ir.prototype.commaSeparated=!1;ir.prototype.defined=!1;ir.prototype.mustUseProperty=!1;ir.prototype.number=!1;ir.prototype.overloadedBoolean=!1;ir.prototype.property="";ir.prototype.spaceSeparated=!1;ir.prototype.space=void 0;let $5=0;const st=Wa(),vn=Wa(),dm=Wa(),ke=Wa(),Zt=Wa(),qs=Wa(),mr=Wa();function Wa(){return 2**++$5}const fm=Object.freeze(Object.defineProperty({__proto__:null,boolean:st,booleanish:vn,commaOrSpaceSeparated:mr,commaSeparated:qs,number:ke,overloadedBoolean:dm,spaceSeparated:Zt},Symbol.toStringTag,{value:"Module"})),Eh=Object.keys(fm);class Jm extends ir{constructor(t,r,a,l){let o=-1;if(super(t,r),hy(this,"space",l),typeof a=="number")for(;++o<Eh.length;){const c=Eh[o];hy(this,Eh[o],(a&fm[c])===fm[c])}}}Jm.prototype.defined=!0;function hy(e,t,r){r&&(e[t]=r)}function Ws(e){const t={},r={};for(const[a,l]of Object.entries(e.properties)){const o=new Jm(a,e.transform(e.attributes||{},a),l,e.space);e.mustUseProperty&&e.mustUseProperty.includes(a)&&(o.mustUseProperty=!0),t[a]=o,r[um(a)]=a,r[um(o.attribute)]=a}return new jo(t,r,e.space)}const bk=Ws({properties:{ariaActiveDescendant:null,ariaAtomic:vn,ariaAutoComplete:null,ariaBusy:vn,ariaChecked:vn,ariaColCount:ke,ariaColIndex:ke,ariaColSpan:ke,ariaControls:Zt,ariaCurrent:null,ariaDescribedBy:Zt,ariaDetails:null,ariaDisabled:vn,ariaDropEffect:Zt,ariaErrorMessage:null,ariaExpanded:vn,ariaFlowTo:Zt,ariaGrabbed:vn,ariaHasPopup:null,ariaHidden:vn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Zt,ariaLevel:ke,ariaLive:null,ariaModal:vn,ariaMultiLine:vn,ariaMultiSelectable:vn,ariaOrientation:null,ariaOwns:Zt,ariaPlaceholder:null,ariaPosInSet:ke,ariaPressed:vn,ariaReadOnly:vn,ariaRelevant:null,ariaRequired:vn,ariaRoleDescription:Zt,ariaRowCount:ke,ariaRowIndex:ke,ariaRowSpan:ke,ariaSelected:vn,ariaSetSize:ke,ariaSort:null,ariaValueMax:ke,ariaValueMin:ke,ariaValueNow:ke,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function xk(e,t){return t in e?e[t]:t}function yk(e,t){return xk(e,t.toLowerCase())}const G5=Ws({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:qs,acceptCharset:Zt,accessKey:Zt,action:null,allow:null,allowFullScreen:st,allowPaymentRequest:st,allowUserMedia:st,alt:null,as:null,async:st,autoCapitalize:null,autoComplete:Zt,autoFocus:st,autoPlay:st,blocking:Zt,capture:null,charSet:null,checked:st,cite:null,className:Zt,cols:ke,colSpan:null,content:null,contentEditable:vn,controls:st,controlsList:Zt,coords:ke|qs,crossOrigin:null,data:null,dateTime:null,decoding:null,default:st,defer:st,dir:null,dirName:null,disabled:st,download:dm,draggable:vn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:st,formTarget:null,headers:Zt,height:ke,hidden:dm,high:ke,href:null,hrefLang:null,htmlFor:Zt,httpEquiv:Zt,id:null,imageSizes:null,imageSrcSet:null,inert:st,inputMode:null,integrity:null,is:null,isMap:st,itemId:null,itemProp:Zt,itemRef:Zt,itemScope:st,itemType:Zt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:st,low:ke,manifest:null,max:null,maxLength:ke,media:null,method:null,min:null,minLength:ke,multiple:st,muted:st,name:null,nonce:null,noModule:st,noValidate:st,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:st,optimum:ke,pattern:null,ping:Zt,placeholder:null,playsInline:st,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:st,referrerPolicy:null,rel:Zt,required:st,reversed:st,rows:ke,rowSpan:ke,sandbox:Zt,scope:null,scoped:st,seamless:st,selected:st,shadowRootClonable:st,shadowRootDelegatesFocus:st,shadowRootMode:null,shape:null,size:ke,sizes:null,slot:null,span:ke,spellCheck:vn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ke,step:null,style:null,tabIndex:ke,target:null,title:null,translate:null,type:null,typeMustMatch:st,useMap:null,value:vn,width:ke,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Zt,axis:null,background:null,bgColor:null,border:ke,borderColor:null,bottomMargin:ke,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:st,declare:st,event:null,face:null,frame:null,frameBorder:null,hSpace:ke,leftMargin:ke,link:null,longDesc:null,lowSrc:null,marginHeight:ke,marginWidth:ke,noResize:st,noHref:st,noShade:st,noWrap:st,object:null,profile:null,prompt:null,rev:null,rightMargin:ke,rules:null,scheme:null,scrolling:vn,standby:null,summary:null,text:null,topMargin:ke,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ke,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:st,disableRemotePlayback:st,prefix:null,property:null,results:ke,security:null,unselectable:null},space:"html",transform:yk}),K5=Ws({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:mr,accentHeight:ke,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ke,amplitude:ke,arabicForm:null,ascent:ke,attributeName:null,attributeType:null,azimuth:ke,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ke,by:null,calcMode:null,capHeight:ke,className:Zt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ke,diffuseConstant:ke,direction:null,display:null,dur:null,divisor:ke,dominantBaseline:null,download:st,dx:null,dy:null,edgeMode:null,editable:null,elevation:ke,enableBackground:null,end:null,event:null,exponent:ke,externalResourcesRequired:null,fill:null,fillOpacity:ke,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:qs,g2:qs,glyphName:qs,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ke,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ke,horizOriginX:ke,horizOriginY:ke,id:null,ideographic:ke,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ke,k:ke,k1:ke,k2:ke,k3:ke,k4:ke,kernelMatrix:mr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ke,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ke,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ke,overlineThickness:ke,paintOrder:null,panose1:null,path:null,pathLength:ke,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Zt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ke,pointsAtY:ke,pointsAtZ:ke,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:mr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:mr,rev:mr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:mr,requiredFeatures:mr,requiredFonts:mr,requiredFormats:mr,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ke,specularExponent:ke,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ke,strikethroughThickness:ke,string:null,stroke:null,strokeDashArray:mr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ke,strokeOpacity:ke,strokeWidth:null,style:null,surfaceScale:ke,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:mr,tabIndex:ke,tableValues:null,target:null,targetX:ke,targetY:ke,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:mr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ke,underlineThickness:ke,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ke,values:null,vAlphabetic:ke,vMathematical:ke,vectorEffect:null,vHanging:ke,vIdeographic:ke,version:null,vertAdvY:ke,vertOriginX:ke,vertOriginY:ke,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ke,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:xk}),vk=Ws({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),kk=Ws({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:yk}),wk=Ws({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),V5={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Y5=/[A-Z]/g,my=/-[a-z]/g,Q5=/^data[-\w.:]+$/i;function X5(e,t){const r=um(t);let a=t,l=ir;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&Q5.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(my,W5);a="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!my.test(o)){let c=o.replace(Y5,Z5);c.charAt(0)!=="-"&&(c="-"+c),t="data"+c}}l=Jm}return new l(a,t)}function Z5(e){return"-"+e.toLowerCase()}function W5(e){return e.charAt(1).toUpperCase()}const J5=gk([bk,G5,vk,kk,wk],"html"),ep=gk([bk,K5,vk,kk,wk],"svg");function eO(e){return e.join(" ").trim()}var js={},Nh,py;function tO(){if(py)return Nh;py=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,r=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,l=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,f=/^\s+|\s+$/g,h=`
|
|
524
|
+
`,m="/",g="*",x="",y="comment",v="declaration";function k(S,N){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];N=N||{};var O=1,A=1;function P(se){var X=se.match(t);X&&(O+=X.length);var F=se.lastIndexOf(h);A=~F?se.length-F:A+se.length}function $(){var se={line:O,column:A};return function(X){return X.position=new M(se),W(),X}}function M(se){this.start=se,this.end={line:O,column:A},this.source=N.source}M.prototype.content=S;function K(se){var X=new Error(N.source+":"+O+":"+A+": "+se);if(X.reason=se,X.filename=N.source,X.line=O,X.column=A,X.source=S,!N.silent)throw X}function z(se){var X=se.exec(S);if(X){var F=X[0];return P(F),S=S.slice(F.length),X}}function W(){z(r)}function U(se){var X;for(se=se||[];X=ee();)X!==!1&&se.push(X);return se}function ee(){var se=$();if(!(m!=S.charAt(0)||g!=S.charAt(1))){for(var X=2;x!=S.charAt(X)&&(g!=S.charAt(X)||m!=S.charAt(X+1));)++X;if(X+=2,x===S.charAt(X-1))return K("End of comment missing");var F=S.slice(2,X-2);return A+=2,P(F),S=S.slice(X),A+=2,se({type:y,comment:F})}}function te(){var se=$(),X=z(a);if(X){if(ee(),!z(l))return K("property missing ':'");var F=z(o),ne=se({type:v,property:E(X[0].replace(e,x)),value:F?E(F[0].replace(e,x)):x});return z(c),ne}}function _e(){var se=[];U(se);for(var X;X=te();)X!==!1&&(se.push(X),U(se));return se}return W(),_e()}function E(S){return S?S.replace(f,x):x}return Nh=k,Nh}var gy;function nO(){if(gy)return js;gy=1;var e=js&&js.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(js,"__esModule",{value:!0}),js.default=r;const t=e(tO());function r(a,l){let o=null;if(!a||typeof a!="string")return o;const c=(0,t.default)(a),f=typeof l=="function";return c.forEach(h=>{if(h.type!=="declaration")return;const{property:m,value:g}=h;f?l(m,g,h):g&&(o=o||{},o[m]=g)}),o}return js}var Zl={},by;function rO(){if(by)return Zl;by=1,Object.defineProperty(Zl,"__esModule",{value:!0}),Zl.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,r=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,l=/^-(ms)-/,o=function(m){return!m||r.test(m)||e.test(m)},c=function(m,g){return g.toUpperCase()},f=function(m,g){return"".concat(g,"-")},h=function(m,g){return g===void 0&&(g={}),o(m)?m:(m=m.toLowerCase(),g.reactCompat?m=m.replace(l,f):m=m.replace(a,f),m.replace(t,c))};return Zl.camelCase=h,Zl}var Wl,xy;function iO(){if(xy)return Wl;xy=1;var e=Wl&&Wl.__importDefault||function(l){return l&&l.__esModule?l:{default:l}},t=e(nO()),r=rO();function a(l,o){var c={};return!l||typeof l!="string"||(0,t.default)(l,function(f,h){f&&h&&(c[(0,r.camelCase)(f,o)]=h)}),c}return a.default=a,Wl=a,Wl}var aO=iO();const sO=Bu(aO),_k=Ek("end"),tp=Ek("start");function Ek(e){return t;function t(r){const a=r&&r.position&&r.position[e]||{};if(typeof a.line=="number"&&a.line>0&&typeof a.column=="number"&&a.column>0)return{line:a.line,column:a.column,offset:typeof a.offset=="number"&&a.offset>-1?a.offset:void 0}}}function lO(e){const t=tp(e),r=_k(e);if(t&&r)return{start:t,end:r}}function uo(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?yy(e.position):"start"in e||"end"in e?yy(e):"line"in e||"column"in e?hm(e):""}function hm(e){return vy(e&&e.line)+":"+vy(e&&e.column)}function yy(e){return hm(e&&e.start)+"-"+hm(e&&e.end)}function vy(e){return e&&typeof e=="number"?e:1}class qn extends Error{constructor(t,r,a){super(),typeof r=="string"&&(a=r,r=void 0);let l="",o={},c=!1;if(r&&("line"in r&&"column"in r?o={place:r}:"start"in r&&"end"in r?o={place:r}:"type"in r?o={ancestors:[r],place:r.position}:o={...r}),typeof t=="string"?l=t:!o.cause&&t&&(c=!0,l=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof a=="string"){const h=a.indexOf(":");h===-1?o.ruleId=a:(o.source=a.slice(0,h),o.ruleId=a.slice(h+1))}if(!o.place&&o.ancestors&&o.ancestors){const h=o.ancestors[o.ancestors.length-1];h&&(o.place=h.position)}const f=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=l,this.line=f?f.line:void 0,this.name=uo(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=c&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}qn.prototype.file="";qn.prototype.name="";qn.prototype.reason="";qn.prototype.message="";qn.prototype.stack="";qn.prototype.column=void 0;qn.prototype.line=void 0;qn.prototype.ancestors=void 0;qn.prototype.cause=void 0;qn.prototype.fatal=void 0;qn.prototype.place=void 0;qn.prototype.ruleId=void 0;qn.prototype.source=void 0;const np={}.hasOwnProperty,oO=new Map,cO=/[A-Z]/g,uO=new Set(["table","tbody","thead","tfoot","tr"]),dO=new Set(["td","th"]),Nk="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function fO(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=t.filePath||void 0;let a;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");a=vO(r,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");a=yO(r,t.jsx,t.jsxs)}const l={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:a,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?ep:J5,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=Sk(l,e,void 0);return o&&typeof o!="string"?o:l.create(e,l.Fragment,{children:o||void 0},void 0)}function Sk(e,t,r){if(t.type==="element")return hO(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return mO(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return gO(e,t,r);if(t.type==="mdxjsEsm")return pO(e,t);if(t.type==="root")return bO(e,t,r);if(t.type==="text")return xO(e,t)}function hO(e,t,r){const a=e.schema;let l=a;t.tagName.toLowerCase()==="svg"&&a.space==="html"&&(l=ep,e.schema=l),e.ancestors.push(t);const o=Ck(e,t.tagName,!1),c=kO(e,t);let f=ip(e,t);return uO.has(t.tagName)&&(f=f.filter(function(h){return typeof h=="string"?!q5(h):!0})),zk(e,c,o,t),rp(c,f),e.ancestors.pop(),e.schema=a,e.create(t,o,c,r)}function mO(e,t){if(t.data&&t.data.estree&&e.evaluater){const a=t.data.estree.body[0];return a.type,e.evaluater.evaluateExpression(a.expression)}wo(e,t.position)}function pO(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);wo(e,t.position)}function gO(e,t,r){const a=e.schema;let l=a;t.name==="svg"&&a.space==="html"&&(l=ep,e.schema=l),e.ancestors.push(t);const o=t.name===null?e.Fragment:Ck(e,t.name,!0),c=wO(e,t),f=ip(e,t);return zk(e,c,o,t),rp(c,f),e.ancestors.pop(),e.schema=a,e.create(t,o,c,r)}function bO(e,t,r){const a={};return rp(a,ip(e,t)),e.create(t,e.Fragment,a,r)}function xO(e,t){return t.value}function zk(e,t,r,a){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=a)}function rp(e,t){if(t.length>0){const r=t.length>1?t:t[0];r&&(e.children=r)}}function yO(e,t,r){return a;function a(l,o,c,f){const m=Array.isArray(c.children)?r:t;return f?m(o,c,f):m(o,c)}}function vO(e,t){return r;function r(a,l,o,c){const f=Array.isArray(o.children),h=tp(a);return t(l,o,c,f,{columnNumber:h?h.column-1:void 0,fileName:e,lineNumber:h?h.line:void 0},void 0)}}function kO(e,t){const r={};let a,l;for(l in t.properties)if(l!=="children"&&np.call(t.properties,l)){const o=_O(e,l,t.properties[l]);if(o){const[c,f]=o;e.tableCellAlignToStyle&&c==="align"&&typeof f=="string"&&dO.has(t.tagName)?a=f:r[c]=f}}if(a){const o=r.style||(r.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=a}return r}function wO(e,t){const r={};for(const a of t.attributes)if(a.type==="mdxJsxExpressionAttribute")if(a.data&&a.data.estree&&e.evaluater){const o=a.data.estree.body[0];o.type;const c=o.expression;c.type;const f=c.properties[0];f.type,Object.assign(r,e.evaluater.evaluateExpression(f.argument))}else wo(e,t.position);else{const l=a.name;let o;if(a.value&&typeof a.value=="object")if(a.value.data&&a.value.data.estree&&e.evaluater){const f=a.value.data.estree.body[0];f.type,o=e.evaluater.evaluateExpression(f.expression)}else wo(e,t.position);else o=a.value===null?!0:a.value;r[l]=o}return r}function ip(e,t){const r=[];let a=-1;const l=e.passKeys?new Map:oO;for(;++a<t.children.length;){const o=t.children[a];let c;if(e.passKeys){const h=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(h){const m=l.get(h)||0;c=h+"-"+m,l.set(h,m+1)}}const f=Sk(e,o,c);f!==void 0&&r.push(f)}return r}function _O(e,t,r){const a=X5(e.schema,t);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=a.commaSeparated?B5(r):eO(r)),a.property==="style"){let l=typeof r=="object"?r:EO(e,String(r));return e.stylePropertyNameCase==="css"&&(l=NO(l)),["style",l]}return[e.elementAttributeNameCase==="react"&&a.space?V5[a.property]||a.property:a.attribute,r]}}function EO(e,t){try{return sO(t,{reactCompat:!0})}catch(r){if(e.ignoreInvalidStyle)return{};const a=r,l=new qn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw l.file=e.filePath||void 0,l.url=Nk+"#cannot-parse-style-attribute",l}}function Ck(e,t,r){let a;if(!r)a={type:"Literal",value:t};else if(t.includes(".")){const l=t.split(".");let o=-1,c;for(;++o<l.length;){const f=dy(l[o])?{type:"Identifier",name:l[o]}:{type:"Literal",value:l[o]};c=c?{type:"MemberExpression",object:c,property:f,computed:!!(o&&f.type==="Literal"),optional:!1}:f}a=c}else a=dy(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(a.type==="Literal"){const l=a.value;return np.call(e.components,l)?e.components[l]:l}if(e.evaluater)return e.evaluater.evaluateExpression(a);wo(e)}function wo(e,t){const r=new qn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=Nk+"#cannot-handle-mdx-estrees-without-createevaluater",r}function NO(e){const t={};let r;for(r in e)np.call(e,r)&&(t[SO(r)]=e[r]);return t}function SO(e){let t=e.replace(cO,zO);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function zO(e){return"-"+e.toLowerCase()}const Sh={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},CO={};function ap(e,t){const r=CO,a=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,l=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return Tk(e,a,l)}function Tk(e,t,r){if(TO(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return ky(e.children,t,r)}return Array.isArray(e)?ky(e,t,r):""}function ky(e,t,r){const a=[];let l=-1;for(;++l<e.length;)a[l]=Tk(e[l],t,r);return a.join("")}function TO(e){return!!(e&&typeof e=="object")}const wy=document.createElement("i");function sp(e){const t="&"+e+";";wy.innerHTML=t;const r=wy.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===t?!1:r}function gr(e,t,r,a){const l=e.length;let o=0,c;if(t<0?t=-t>l?0:l+t:t=t>l?l:t,r=r>0?r:0,a.length<1e4)c=Array.from(a),c.unshift(t,r),e.splice(...c);else for(r&&e.splice(t,r);o<a.length;)c=a.slice(o,o+1e4),c.unshift(t,0),e.splice(...c),o+=1e4,t+=1e4}function Rr(e,t){return e.length>0?(gr(e,e.length,0,t),e):t}const _y={}.hasOwnProperty;function Ak(e){const t={};let r=-1;for(;++r<e.length;)AO(t,e[r]);return t}function AO(e,t){let r;for(r in t){const l=(_y.call(e,r)?e[r]:void 0)||(e[r]={}),o=t[r];let c;if(o)for(c in o){_y.call(l,c)||(l[c]=[]);const f=o[c];RO(l[c],Array.isArray(f)?f:f?[f]:[])}}}function RO(e,t){let r=-1;const a=[];for(;++r<t.length;)(t[r].add==="after"?e:a).push(t[r]);gr(e,0,0,a)}function Rk(e,t){const r=Number.parseInt(e,t);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function $r(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Vn=ka(/[A-Za-z]/),Hn=ka(/[\dA-Za-z]/),OO=ka(/[#-'*+\--9=?A-Z^-~]/);function Ou(e){return e!==null&&(e<32||e===127)}const mm=ka(/\d/),MO=ka(/[\dA-Fa-f]/),jO=ka(/[!-/:-@[-`{-~]/);function Ke(e){return e!==null&&e<-2}function Yt(e){return e!==null&&(e<0||e===32)}function pt(e){return e===-2||e===-1||e===32}const Xu=ka(/\p{P}|\p{S}/u),Ya=ka(/\s/);function ka(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function Js(e){const t=[];let r=-1,a=0,l=0;for(;++r<e.length;){const o=e.charCodeAt(r);let c="";if(o===37&&Hn(e.charCodeAt(r+1))&&Hn(e.charCodeAt(r+2)))l=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(c=String.fromCharCode(o));else if(o>55295&&o<57344){const f=e.charCodeAt(r+1);o<56320&&f>56319&&f<57344?(c=String.fromCharCode(o,f),l=1):c="�"}else c=String.fromCharCode(o);c&&(t.push(e.slice(a,r),encodeURIComponent(c)),a=r+l+1,c=""),l&&(r+=l,l=0)}return t.join("")+e.slice(a)}function Ct(e,t,r,a){const l=a?a-1:Number.POSITIVE_INFINITY;let o=0;return c;function c(h){return pt(h)?(e.enter(r),f(h)):t(h)}function f(h){return pt(h)&&o++<l?(e.consume(h),f):(e.exit(r),t(h))}}const DO={tokenize:LO};function LO(e){const t=e.attempt(this.parser.constructs.contentInitial,a,l);let r;return t;function a(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Ct(e,t,"linePrefix")}function l(f){return e.enter("paragraph"),o(f)}function o(f){const h=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=h),r=h,c(f)}function c(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return Ke(f)?(e.consume(f),e.exit("chunkText"),o):(e.consume(f),c)}}const IO={tokenize:BO},Ey={tokenize:UO};function BO(e){const t=this,r=[];let a=0,l,o,c;return f;function f(A){if(a<r.length){const P=r[a];return t.containerState=P[1],e.attempt(P[0].continuation,h,m)(A)}return m(A)}function h(A){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,l&&O();const P=t.events.length;let $=P,M;for(;$--;)if(t.events[$][0]==="exit"&&t.events[$][1].type==="chunkFlow"){M=t.events[$][1].end;break}N(a);let K=P;for(;K<t.events.length;)t.events[K][1].end={...M},K++;return gr(t.events,$+1,0,t.events.slice(P)),t.events.length=K,m(A)}return f(A)}function m(A){if(a===r.length){if(!l)return y(A);if(l.currentConstruct&&l.currentConstruct.concrete)return k(A);t.interrupt=!!(l.currentConstruct&&!l._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Ey,g,x)(A)}function g(A){return l&&O(),N(a),y(A)}function x(A){return t.parser.lazy[t.now().line]=a!==r.length,c=t.now().offset,k(A)}function y(A){return t.containerState={},e.attempt(Ey,v,k)(A)}function v(A){return a++,r.push([t.currentConstruct,t.containerState]),y(A)}function k(A){if(A===null){l&&O(),N(0),e.consume(A);return}return l=l||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:l,contentType:"flow",previous:o}),E(A)}function E(A){if(A===null){S(e.exit("chunkFlow"),!0),N(0),e.consume(A);return}return Ke(A)?(e.consume(A),S(e.exit("chunkFlow")),a=0,t.interrupt=void 0,f):(e.consume(A),E)}function S(A,P){const $=t.sliceStream(A);if(P&&$.push(null),A.previous=o,o&&(o.next=A),o=A,l.defineSkip(A.start),l.write($),t.parser.lazy[A.start.line]){let M=l.events.length;for(;M--;)if(l.events[M][1].start.offset<c&&(!l.events[M][1].end||l.events[M][1].end.offset>c))return;const K=t.events.length;let z=K,W,U;for(;z--;)if(t.events[z][0]==="exit"&&t.events[z][1].type==="chunkFlow"){if(W){U=t.events[z][1].end;break}W=!0}for(N(a),M=K;M<t.events.length;)t.events[M][1].end={...U},M++;gr(t.events,z+1,0,t.events.slice(K)),t.events.length=M}}function N(A){let P=r.length;for(;P-- >A;){const $=r[P];t.containerState=$[1],$[0].exit.call(t,e)}r.length=A}function O(){l.write([null]),o=void 0,l=void 0,t.containerState._closeFlow=void 0}}function UO(e,t,r){return Ct(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Gs(e){if(e===null||Yt(e)||Ya(e))return 1;if(Xu(e))return 2}function Zu(e,t,r){const a=[];let l=-1;for(;++l<e.length;){const o=e[l].resolveAll;o&&!a.includes(o)&&(t=o(t,r),a.push(o))}return t}const pm={name:"attention",resolveAll:FO,tokenize:PO};function FO(e,t){let r=-1,a,l,o,c,f,h,m,g;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(a=r;a--;)if(e[a][0]==="exit"&&e[a][1].type==="attentionSequence"&&e[a][1]._open&&t.sliceSerialize(e[a][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[a][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[a][1].end.offset-e[a][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;h=e[a][1].end.offset-e[a][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;const x={...e[a][1].end},y={...e[r][1].start};Ny(x,-h),Ny(y,h),c={type:h>1?"strongSequence":"emphasisSequence",start:x,end:{...e[a][1].end}},f={type:h>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:y},o={type:h>1?"strongText":"emphasisText",start:{...e[a][1].end},end:{...e[r][1].start}},l={type:h>1?"strong":"emphasis",start:{...c.start},end:{...f.end}},e[a][1].end={...c.start},e[r][1].start={...f.end},m=[],e[a][1].end.offset-e[a][1].start.offset&&(m=Rr(m,[["enter",e[a][1],t],["exit",e[a][1],t]])),m=Rr(m,[["enter",l,t],["enter",c,t],["exit",c,t],["enter",o,t]]),m=Rr(m,Zu(t.parser.constructs.insideSpan.null,e.slice(a+1,r),t)),m=Rr(m,[["exit",o,t],["enter",f,t],["exit",f,t],["exit",l,t]]),e[r][1].end.offset-e[r][1].start.offset?(g=2,m=Rr(m,[["enter",e[r][1],t],["exit",e[r][1],t]])):g=0,gr(e,a-1,r-a+3,m),r=a+m.length-g-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function PO(e,t){const r=this.parser.constructs.attentionMarkers.null,a=this.previous,l=Gs(a);let o;return c;function c(h){return o=h,e.enter("attentionSequence"),f(h)}function f(h){if(h===o)return e.consume(h),f;const m=e.exit("attentionSequence"),g=Gs(h),x=!g||g===2&&l||r.includes(h),y=!l||l===2&&g||r.includes(a);return m._open=!!(o===42?x:x&&(l||!y)),m._close=!!(o===42?y:y&&(g||!x)),t(h)}}function Ny(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const HO={name:"autolink",tokenize:qO};function qO(e,t,r){let a=0;return l;function l(v){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(v){return Vn(v)?(e.consume(v),c):v===64?r(v):m(v)}function c(v){return v===43||v===45||v===46||Hn(v)?(a=1,f(v)):m(v)}function f(v){return v===58?(e.consume(v),a=0,h):(v===43||v===45||v===46||Hn(v))&&a++<32?(e.consume(v),f):(a=0,m(v))}function h(v){return v===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):v===null||v===32||v===60||Ou(v)?r(v):(e.consume(v),h)}function m(v){return v===64?(e.consume(v),g):OO(v)?(e.consume(v),m):r(v)}function g(v){return Hn(v)?x(v):r(v)}function x(v){return v===46?(e.consume(v),a=0,g):v===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):y(v)}function y(v){if((v===45||Hn(v))&&a++<63){const k=v===45?y:x;return e.consume(v),k}return r(v)}}const Do={partial:!0,tokenize:$O};function $O(e,t,r){return a;function a(o){return pt(o)?Ct(e,l,"linePrefix")(o):l(o)}function l(o){return o===null||Ke(o)?t(o):r(o)}}const Ok={continuation:{tokenize:KO},exit:VO,name:"blockQuote",tokenize:GO};function GO(e,t,r){const a=this;return l;function l(c){if(c===62){const f=a.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),o}return r(c)}function o(c){return pt(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(c))}}function KO(e,t,r){const a=this;return l;function l(c){return pt(c)?Ct(e,o,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):o(c)}function o(c){return e.attempt(Ok,t,r)(c)}}function VO(e){e.exit("blockQuote")}const Mk={name:"characterEscape",tokenize:YO};function YO(e,t,r){return a;function a(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),l}function l(o){return jO(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(o)}}const jk={name:"characterReference",tokenize:QO};function QO(e,t,r){const a=this;let l=0,o,c;return f;function f(x){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(x),e.exit("characterReferenceMarker"),h}function h(x){return x===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(x),e.exit("characterReferenceMarkerNumeric"),m):(e.enter("characterReferenceValue"),o=31,c=Hn,g(x))}function m(x){return x===88||x===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(x),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,c=MO,g):(e.enter("characterReferenceValue"),o=7,c=mm,g(x))}function g(x){if(x===59&&l){const y=e.exit("characterReferenceValue");return c===Hn&&!sp(a.sliceSerialize(y))?r(x):(e.enter("characterReferenceMarker"),e.consume(x),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return c(x)&&l++<o?(e.consume(x),g):r(x)}}const Sy={partial:!0,tokenize:ZO},zy={concrete:!0,name:"codeFenced",tokenize:XO};function XO(e,t,r){const a=this,l={partial:!0,tokenize:$};let o=0,c=0,f;return h;function h(M){return m(M)}function m(M){const K=a.events[a.events.length-1];return o=K&&K[1].type==="linePrefix"?K[2].sliceSerialize(K[1],!0).length:0,f=M,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),g(M)}function g(M){return M===f?(c++,e.consume(M),g):c<3?r(M):(e.exit("codeFencedFenceSequence"),pt(M)?Ct(e,x,"whitespace")(M):x(M))}function x(M){return M===null||Ke(M)?(e.exit("codeFencedFence"),a.interrupt?t(M):e.check(Sy,E,P)(M)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),y(M))}function y(M){return M===null||Ke(M)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),x(M)):pt(M)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ct(e,v,"whitespace")(M)):M===96&&M===f?r(M):(e.consume(M),y)}function v(M){return M===null||Ke(M)?x(M):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),k(M))}function k(M){return M===null||Ke(M)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),x(M)):M===96&&M===f?r(M):(e.consume(M),k)}function E(M){return e.attempt(l,P,S)(M)}function S(M){return e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),N}function N(M){return o>0&&pt(M)?Ct(e,O,"linePrefix",o+1)(M):O(M)}function O(M){return M===null||Ke(M)?e.check(Sy,E,P)(M):(e.enter("codeFlowValue"),A(M))}function A(M){return M===null||Ke(M)?(e.exit("codeFlowValue"),O(M)):(e.consume(M),A)}function P(M){return e.exit("codeFenced"),t(M)}function $(M,K,z){let W=0;return U;function U(X){return M.enter("lineEnding"),M.consume(X),M.exit("lineEnding"),ee}function ee(X){return M.enter("codeFencedFence"),pt(X)?Ct(M,te,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(X):te(X)}function te(X){return X===f?(M.enter("codeFencedFenceSequence"),_e(X)):z(X)}function _e(X){return X===f?(W++,M.consume(X),_e):W>=c?(M.exit("codeFencedFenceSequence"),pt(X)?Ct(M,se,"whitespace")(X):se(X)):z(X)}function se(X){return X===null||Ke(X)?(M.exit("codeFencedFence"),K(X)):z(X)}}}function ZO(e,t,r){const a=this;return l;function l(c){return c===null?r(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o)}function o(c){return a.parser.lazy[a.now().line]?r(c):t(c)}}const zh={name:"codeIndented",tokenize:JO},WO={partial:!0,tokenize:eM};function JO(e,t,r){const a=this;return l;function l(m){return e.enter("codeIndented"),Ct(e,o,"linePrefix",5)(m)}function o(m){const g=a.events[a.events.length-1];return g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4?c(m):r(m)}function c(m){return m===null?h(m):Ke(m)?e.attempt(WO,c,h)(m):(e.enter("codeFlowValue"),f(m))}function f(m){return m===null||Ke(m)?(e.exit("codeFlowValue"),c(m)):(e.consume(m),f)}function h(m){return e.exit("codeIndented"),t(m)}}function eM(e,t,r){const a=this;return l;function l(c){return a.parser.lazy[a.now().line]?r(c):Ke(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),l):Ct(e,o,"linePrefix",5)(c)}function o(c){const f=a.events[a.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(c):Ke(c)?l(c):r(c)}}const tM={name:"codeText",previous:rM,resolve:nM,tokenize:iM};function nM(e){let t=e.length-4,r=3,a,l;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(a=r;++a<t;)if(e[a][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[t][1].type="codeTextPadding",r+=2,t-=2;break}}for(a=r-1,t++;++a<=t;)l===void 0?a!==t&&e[a][1].type!=="lineEnding"&&(l=a):(a===t||e[a][1].type==="lineEnding")&&(e[l][1].type="codeTextData",a!==l+2&&(e[l][1].end=e[a-1][1].end,e.splice(l+2,a-l-2),t-=a-l-2,a=l+2),l=void 0);return e}function rM(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function iM(e,t,r){let a=0,l,o;return c;function c(x){return e.enter("codeText"),e.enter("codeTextSequence"),f(x)}function f(x){return x===96?(e.consume(x),a++,f):(e.exit("codeTextSequence"),h(x))}function h(x){return x===null?r(x):x===32?(e.enter("space"),e.consume(x),e.exit("space"),h):x===96?(o=e.enter("codeTextSequence"),l=0,g(x)):Ke(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),h):(e.enter("codeTextData"),m(x))}function m(x){return x===null||x===32||x===96||Ke(x)?(e.exit("codeTextData"),h(x)):(e.consume(x),m)}function g(x){return x===96?(e.consume(x),l++,g):l===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(x)):(o.type="codeTextData",m(x))}}class aM{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,r){const a=r??Number.POSITIVE_INFINITY;return a<this.left.length?this.left.slice(t,a):t>this.left.length?this.right.slice(this.right.length-a+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-a+this.left.length).reverse())}splice(t,r,a){const l=r||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-l,Number.POSITIVE_INFINITY);return a&&Jl(this.left,a),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Jl(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Jl(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const r=this.left.splice(t,Number.POSITIVE_INFINITY);Jl(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Jl(this.left,r.reverse())}}}function Jl(e,t){let r=0;if(t.length<1e4)e.push(...t);else for(;r<t.length;)e.push(...t.slice(r,r+1e4)),r+=1e4}function Dk(e){const t={};let r=-1,a,l,o,c,f,h,m;const g=new aM(e);for(;++r<g.length;){for(;r in t;)r=t[r];if(a=g.get(r),r&&a[1].type==="chunkFlow"&&g.get(r-1)[1].type==="listItemPrefix"&&(h=a[1]._tokenizer.events,o=0,o<h.length&&h[o][1].type==="lineEndingBlank"&&(o+=2),o<h.length&&h[o][1].type==="content"))for(;++o<h.length&&h[o][1].type!=="content";)h[o][1].type==="chunkText"&&(h[o][1]._isInFirstContentOfListItem=!0,o++);if(a[0]==="enter")a[1].contentType&&(Object.assign(t,sM(g,r)),r=t[r],m=!0);else if(a[1]._container){for(o=r,l=void 0;o--;)if(c=g.get(o),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(l&&(g.get(l)[1].type="lineEndingBlank"),c[1].type="lineEnding",l=o);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;l&&(a[1].end={...g.get(l)[1].start},f=g.slice(l,r),f.unshift(a),g.splice(l,r-l+1,f))}}return gr(e,0,Number.POSITIVE_INFINITY,g.slice(0)),!m}function sM(e,t){const r=e.get(t)[1],a=e.get(t)[2];let l=t-1;const o=[];let c=r._tokenizer;c||(c=a.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const f=c.events,h=[],m={};let g,x,y=-1,v=r,k=0,E=0;const S=[E];for(;v;){for(;e.get(++l)[1]!==v;);o.push(l),v._tokenizer||(g=a.sliceStream(v),v.next||g.push(null),x&&c.defineSkip(v.start),v._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(g),v._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),x=v,v=v.next}for(v=r;++y<f.length;)f[y][0]==="exit"&&f[y-1][0]==="enter"&&f[y][1].type===f[y-1][1].type&&f[y][1].start.line!==f[y][1].end.line&&(E=y+1,S.push(E),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(c.events=[],v?(v._tokenizer=void 0,v.previous=void 0):S.pop(),y=S.length;y--;){const N=f.slice(S[y],S[y+1]),O=o.pop();h.push([O,O+N.length-1]),e.splice(O,2,N)}for(h.reverse(),y=-1;++y<h.length;)m[k+h[y][0]]=k+h[y][1],k+=h[y][1]-h[y][0]-1;return m}const lM={resolve:cM,tokenize:uM},oM={partial:!0,tokenize:dM};function cM(e){return Dk(e),e}function uM(e,t){let r;return a;function a(f){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),l(f)}function l(f){return f===null?o(f):Ke(f)?e.check(oM,c,o)(f):(e.consume(f),l)}function o(f){return e.exit("chunkContent"),e.exit("content"),t(f)}function c(f){return e.consume(f),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,l}}function dM(e,t,r){const a=this;return l;function l(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Ct(e,o,"linePrefix")}function o(c){if(c===null||Ke(c))return r(c);const f=a.events[a.events.length-1];return!a.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(c):e.interrupt(a.parser.constructs.flow,r,t)(c)}}function Lk(e,t,r,a,l,o,c,f,h){const m=h||Number.POSITIVE_INFINITY;let g=0;return x;function x(N){return N===60?(e.enter(a),e.enter(l),e.enter(o),e.consume(N),e.exit(o),y):N===null||N===32||N===41||Ou(N)?r(N):(e.enter(a),e.enter(c),e.enter(f),e.enter("chunkString",{contentType:"string"}),E(N))}function y(N){return N===62?(e.enter(o),e.consume(N),e.exit(o),e.exit(l),e.exit(a),t):(e.enter(f),e.enter("chunkString",{contentType:"string"}),v(N))}function v(N){return N===62?(e.exit("chunkString"),e.exit(f),y(N)):N===null||N===60||Ke(N)?r(N):(e.consume(N),N===92?k:v)}function k(N){return N===60||N===62||N===92?(e.consume(N),v):v(N)}function E(N){return!g&&(N===null||N===41||Yt(N))?(e.exit("chunkString"),e.exit(f),e.exit(c),e.exit(a),t(N)):g<m&&N===40?(e.consume(N),g++,E):N===41?(e.consume(N),g--,E):N===null||N===32||N===40||Ou(N)?r(N):(e.consume(N),N===92?S:E)}function S(N){return N===40||N===41||N===92?(e.consume(N),E):E(N)}}function Ik(e,t,r,a,l,o){const c=this;let f=0,h;return m;function m(v){return e.enter(a),e.enter(l),e.consume(v),e.exit(l),e.enter(o),g}function g(v){return f>999||v===null||v===91||v===93&&!h||v===94&&!f&&"_hiddenFootnoteSupport"in c.parser.constructs?r(v):v===93?(e.exit(o),e.enter(l),e.consume(v),e.exit(l),e.exit(a),t):Ke(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),g):(e.enter("chunkString",{contentType:"string"}),x(v))}function x(v){return v===null||v===91||v===93||Ke(v)||f++>999?(e.exit("chunkString"),g(v)):(e.consume(v),h||(h=!pt(v)),v===92?y:x)}function y(v){return v===91||v===92||v===93?(e.consume(v),f++,x):x(v)}}function Bk(e,t,r,a,l,o){let c;return f;function f(y){return y===34||y===39||y===40?(e.enter(a),e.enter(l),e.consume(y),e.exit(l),c=y===40?41:y,h):r(y)}function h(y){return y===c?(e.enter(l),e.consume(y),e.exit(l),e.exit(a),t):(e.enter(o),m(y))}function m(y){return y===c?(e.exit(o),h(c)):y===null?r(y):Ke(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),Ct(e,m,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),g(y))}function g(y){return y===c||y===null||Ke(y)?(e.exit("chunkString"),m(y)):(e.consume(y),y===92?x:g)}function x(y){return y===c||y===92?(e.consume(y),g):g(y)}}function fo(e,t){let r;return a;function a(l){return Ke(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),r=!0,a):pt(l)?Ct(e,a,r?"linePrefix":"lineSuffix")(l):t(l)}}const fM={name:"definition",tokenize:mM},hM={partial:!0,tokenize:pM};function mM(e,t,r){const a=this;let l;return o;function o(v){return e.enter("definition"),c(v)}function c(v){return Ik.call(a,e,f,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function f(v){return l=$r(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),h):r(v)}function h(v){return Yt(v)?fo(e,m)(v):m(v)}function m(v){return Lk(e,g,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function g(v){return e.attempt(hM,x,x)(v)}function x(v){return pt(v)?Ct(e,y,"whitespace")(v):y(v)}function y(v){return v===null||Ke(v)?(e.exit("definition"),a.parser.defined.push(l),t(v)):r(v)}}function pM(e,t,r){return a;function a(f){return Yt(f)?fo(e,l)(f):r(f)}function l(f){return Bk(e,o,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function o(f){return pt(f)?Ct(e,c,"whitespace")(f):c(f)}function c(f){return f===null||Ke(f)?t(f):r(f)}}const gM={name:"hardBreakEscape",tokenize:bM};function bM(e,t,r){return a;function a(o){return e.enter("hardBreakEscape"),e.consume(o),l}function l(o){return Ke(o)?(e.exit("hardBreakEscape"),t(o)):r(o)}}const xM={name:"headingAtx",resolve:yM,tokenize:vM};function yM(e,t){let r=e.length-2,a=3,l,o;return e[a][1].type==="whitespace"&&(a+=2),r-2>a&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(a===r-1||r-4>a&&e[r-2][1].type==="whitespace")&&(r-=a+1===r?2:4),r>a&&(l={type:"atxHeadingText",start:e[a][1].start,end:e[r][1].end},o={type:"chunkText",start:e[a][1].start,end:e[r][1].end,contentType:"text"},gr(e,a,r-a+1,[["enter",l,t],["enter",o,t],["exit",o,t],["exit",l,t]])),e}function vM(e,t,r){let a=0;return l;function l(g){return e.enter("atxHeading"),o(g)}function o(g){return e.enter("atxHeadingSequence"),c(g)}function c(g){return g===35&&a++<6?(e.consume(g),c):g===null||Yt(g)?(e.exit("atxHeadingSequence"),f(g)):r(g)}function f(g){return g===35?(e.enter("atxHeadingSequence"),h(g)):g===null||Ke(g)?(e.exit("atxHeading"),t(g)):pt(g)?Ct(e,f,"whitespace")(g):(e.enter("atxHeadingText"),m(g))}function h(g){return g===35?(e.consume(g),h):(e.exit("atxHeadingSequence"),f(g))}function m(g){return g===null||g===35||Yt(g)?(e.exit("atxHeadingText"),f(g)):(e.consume(g),m)}}const kM=["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"],Cy=["pre","script","style","textarea"],wM={concrete:!0,name:"htmlFlow",resolveTo:NM,tokenize:SM},_M={partial:!0,tokenize:CM},EM={partial:!0,tokenize:zM};function NM(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function SM(e,t,r){const a=this;let l,o,c,f,h;return m;function m(C){return g(C)}function g(C){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(C),x}function x(C){return C===33?(e.consume(C),y):C===47?(e.consume(C),o=!0,E):C===63?(e.consume(C),l=3,a.interrupt?t:R):Vn(C)?(e.consume(C),c=String.fromCharCode(C),S):r(C)}function y(C){return C===45?(e.consume(C),l=2,v):C===91?(e.consume(C),l=5,f=0,k):Vn(C)?(e.consume(C),l=4,a.interrupt?t:R):r(C)}function v(C){return C===45?(e.consume(C),a.interrupt?t:R):r(C)}function k(C){const ue="CDATA[";return C===ue.charCodeAt(f++)?(e.consume(C),f===ue.length?a.interrupt?t:te:k):r(C)}function E(C){return Vn(C)?(e.consume(C),c=String.fromCharCode(C),S):r(C)}function S(C){if(C===null||C===47||C===62||Yt(C)){const ue=C===47,be=c.toLowerCase();return!ue&&!o&&Cy.includes(be)?(l=1,a.interrupt?t(C):te(C)):kM.includes(c.toLowerCase())?(l=6,ue?(e.consume(C),N):a.interrupt?t(C):te(C)):(l=7,a.interrupt&&!a.parser.lazy[a.now().line]?r(C):o?O(C):A(C))}return C===45||Hn(C)?(e.consume(C),c+=String.fromCharCode(C),S):r(C)}function N(C){return C===62?(e.consume(C),a.interrupt?t:te):r(C)}function O(C){return pt(C)?(e.consume(C),O):U(C)}function A(C){return C===47?(e.consume(C),U):C===58||C===95||Vn(C)?(e.consume(C),P):pt(C)?(e.consume(C),A):U(C)}function P(C){return C===45||C===46||C===58||C===95||Hn(C)?(e.consume(C),P):$(C)}function $(C){return C===61?(e.consume(C),M):pt(C)?(e.consume(C),$):A(C)}function M(C){return C===null||C===60||C===61||C===62||C===96?r(C):C===34||C===39?(e.consume(C),h=C,K):pt(C)?(e.consume(C),M):z(C)}function K(C){return C===h?(e.consume(C),h=null,W):C===null||Ke(C)?r(C):(e.consume(C),K)}function z(C){return C===null||C===34||C===39||C===47||C===60||C===61||C===62||C===96||Yt(C)?$(C):(e.consume(C),z)}function W(C){return C===47||C===62||pt(C)?A(C):r(C)}function U(C){return C===62?(e.consume(C),ee):r(C)}function ee(C){return C===null||Ke(C)?te(C):pt(C)?(e.consume(C),ee):r(C)}function te(C){return C===45&&l===2?(e.consume(C),F):C===60&&l===1?(e.consume(C),ne):C===62&&l===4?(e.consume(C),j):C===63&&l===3?(e.consume(C),R):C===93&&l===5?(e.consume(C),fe):Ke(C)&&(l===6||l===7)?(e.exit("htmlFlowData"),e.check(_M,I,_e)(C)):C===null||Ke(C)?(e.exit("htmlFlowData"),_e(C)):(e.consume(C),te)}function _e(C){return e.check(EM,se,I)(C)}function se(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),X}function X(C){return C===null||Ke(C)?_e(C):(e.enter("htmlFlowData"),te(C))}function F(C){return C===45?(e.consume(C),R):te(C)}function ne(C){return C===47?(e.consume(C),c="",V):te(C)}function V(C){if(C===62){const ue=c.toLowerCase();return Cy.includes(ue)?(e.consume(C),j):te(C)}return Vn(C)&&c.length<8?(e.consume(C),c+=String.fromCharCode(C),V):te(C)}function fe(C){return C===93?(e.consume(C),R):te(C)}function R(C){return C===62?(e.consume(C),j):C===45&&l===2?(e.consume(C),R):te(C)}function j(C){return C===null||Ke(C)?(e.exit("htmlFlowData"),I(C)):(e.consume(C),j)}function I(C){return e.exit("htmlFlow"),t(C)}}function zM(e,t,r){const a=this;return l;function l(c){return Ke(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o):r(c)}function o(c){return a.parser.lazy[a.now().line]?r(c):t(c)}}function CM(e,t,r){return a;function a(l){return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),e.attempt(Do,t,r)}}const TM={name:"htmlText",tokenize:AM};function AM(e,t,r){const a=this;let l,o,c;return f;function f(R){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(R),h}function h(R){return R===33?(e.consume(R),m):R===47?(e.consume(R),$):R===63?(e.consume(R),A):Vn(R)?(e.consume(R),z):r(R)}function m(R){return R===45?(e.consume(R),g):R===91?(e.consume(R),o=0,k):Vn(R)?(e.consume(R),O):r(R)}function g(R){return R===45?(e.consume(R),v):r(R)}function x(R){return R===null?r(R):R===45?(e.consume(R),y):Ke(R)?(c=x,ne(R)):(e.consume(R),x)}function y(R){return R===45?(e.consume(R),v):x(R)}function v(R){return R===62?F(R):R===45?y(R):x(R)}function k(R){const j="CDATA[";return R===j.charCodeAt(o++)?(e.consume(R),o===j.length?E:k):r(R)}function E(R){return R===null?r(R):R===93?(e.consume(R),S):Ke(R)?(c=E,ne(R)):(e.consume(R),E)}function S(R){return R===93?(e.consume(R),N):E(R)}function N(R){return R===62?F(R):R===93?(e.consume(R),N):E(R)}function O(R){return R===null||R===62?F(R):Ke(R)?(c=O,ne(R)):(e.consume(R),O)}function A(R){return R===null?r(R):R===63?(e.consume(R),P):Ke(R)?(c=A,ne(R)):(e.consume(R),A)}function P(R){return R===62?F(R):A(R)}function $(R){return Vn(R)?(e.consume(R),M):r(R)}function M(R){return R===45||Hn(R)?(e.consume(R),M):K(R)}function K(R){return Ke(R)?(c=K,ne(R)):pt(R)?(e.consume(R),K):F(R)}function z(R){return R===45||Hn(R)?(e.consume(R),z):R===47||R===62||Yt(R)?W(R):r(R)}function W(R){return R===47?(e.consume(R),F):R===58||R===95||Vn(R)?(e.consume(R),U):Ke(R)?(c=W,ne(R)):pt(R)?(e.consume(R),W):F(R)}function U(R){return R===45||R===46||R===58||R===95||Hn(R)?(e.consume(R),U):ee(R)}function ee(R){return R===61?(e.consume(R),te):Ke(R)?(c=ee,ne(R)):pt(R)?(e.consume(R),ee):W(R)}function te(R){return R===null||R===60||R===61||R===62||R===96?r(R):R===34||R===39?(e.consume(R),l=R,_e):Ke(R)?(c=te,ne(R)):pt(R)?(e.consume(R),te):(e.consume(R),se)}function _e(R){return R===l?(e.consume(R),l=void 0,X):R===null?r(R):Ke(R)?(c=_e,ne(R)):(e.consume(R),_e)}function se(R){return R===null||R===34||R===39||R===60||R===61||R===96?r(R):R===47||R===62||Yt(R)?W(R):(e.consume(R),se)}function X(R){return R===47||R===62||Yt(R)?W(R):r(R)}function F(R){return R===62?(e.consume(R),e.exit("htmlTextData"),e.exit("htmlText"),t):r(R)}function ne(R){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),V}function V(R){return pt(R)?Ct(e,fe,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):fe(R)}function fe(R){return e.enter("htmlTextData"),c(R)}}const lp={name:"labelEnd",resolveAll:jM,resolveTo:DM,tokenize:LM},RM={tokenize:IM},OM={tokenize:BM},MM={tokenize:UM};function jM(e){let t=-1;const r=[];for(;++t<e.length;){const a=e[t][1];if(r.push(e[t]),a.type==="labelImage"||a.type==="labelLink"||a.type==="labelEnd"){const l=a.type==="labelImage"?4:2;a.type="data",t+=l}}return e.length!==r.length&&gr(e,0,e.length,r),e}function DM(e,t){let r=e.length,a=0,l,o,c,f;for(;r--;)if(l=e[r][1],o){if(l.type==="link"||l.type==="labelLink"&&l._inactive)break;e[r][0]==="enter"&&l.type==="labelLink"&&(l._inactive=!0)}else if(c){if(e[r][0]==="enter"&&(l.type==="labelImage"||l.type==="labelLink")&&!l._balanced&&(o=r,l.type!=="labelLink")){a=2;break}}else l.type==="labelEnd"&&(c=r);const h={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},m={type:"label",start:{...e[o][1].start},end:{...e[c][1].end}},g={type:"labelText",start:{...e[o+a+2][1].end},end:{...e[c-2][1].start}};return f=[["enter",h,t],["enter",m,t]],f=Rr(f,e.slice(o+1,o+a+3)),f=Rr(f,[["enter",g,t]]),f=Rr(f,Zu(t.parser.constructs.insideSpan.null,e.slice(o+a+4,c-3),t)),f=Rr(f,[["exit",g,t],e[c-2],e[c-1],["exit",m,t]]),f=Rr(f,e.slice(c+1)),f=Rr(f,[["exit",h,t]]),gr(e,o,e.length,f),e}function LM(e,t,r){const a=this;let l=a.events.length,o,c;for(;l--;)if((a.events[l][1].type==="labelImage"||a.events[l][1].type==="labelLink")&&!a.events[l][1]._balanced){o=a.events[l][1];break}return f;function f(y){return o?o._inactive?x(y):(c=a.parser.defined.includes($r(a.sliceSerialize({start:o.end,end:a.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(y),e.exit("labelMarker"),e.exit("labelEnd"),h):r(y)}function h(y){return y===40?e.attempt(RM,g,c?g:x)(y):y===91?e.attempt(OM,g,c?m:x)(y):c?g(y):x(y)}function m(y){return e.attempt(MM,g,x)(y)}function g(y){return t(y)}function x(y){return o._balanced=!0,r(y)}}function IM(e,t,r){return a;function a(x){return e.enter("resource"),e.enter("resourceMarker"),e.consume(x),e.exit("resourceMarker"),l}function l(x){return Yt(x)?fo(e,o)(x):o(x)}function o(x){return x===41?g(x):Lk(e,c,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(x)}function c(x){return Yt(x)?fo(e,h)(x):g(x)}function f(x){return r(x)}function h(x){return x===34||x===39||x===40?Bk(e,m,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(x):g(x)}function m(x){return Yt(x)?fo(e,g)(x):g(x)}function g(x){return x===41?(e.enter("resourceMarker"),e.consume(x),e.exit("resourceMarker"),e.exit("resource"),t):r(x)}}function BM(e,t,r){const a=this;return l;function l(f){return Ik.call(a,e,o,c,"reference","referenceMarker","referenceString")(f)}function o(f){return a.parser.defined.includes($r(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)))?t(f):r(f)}function c(f){return r(f)}}function UM(e,t,r){return a;function a(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),l}function l(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):r(o)}}const FM={name:"labelStartImage",resolveAll:lp.resolveAll,tokenize:PM};function PM(e,t,r){const a=this;return l;function l(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),o}function o(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),c):r(f)}function c(f){return f===94&&"_hiddenFootnoteSupport"in a.parser.constructs?r(f):t(f)}}const HM={name:"labelStartLink",resolveAll:lp.resolveAll,tokenize:qM};function qM(e,t,r){const a=this;return l;function l(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelLink"),o}function o(c){return c===94&&"_hiddenFootnoteSupport"in a.parser.constructs?r(c):t(c)}}const Ch={name:"lineEnding",tokenize:$M};function $M(e,t){return r;function r(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Ct(e,t,"linePrefix")}}const _u={name:"thematicBreak",tokenize:GM};function GM(e,t,r){let a=0,l;return o;function o(m){return e.enter("thematicBreak"),c(m)}function c(m){return l=m,f(m)}function f(m){return m===l?(e.enter("thematicBreakSequence"),h(m)):a>=3&&(m===null||Ke(m))?(e.exit("thematicBreak"),t(m)):r(m)}function h(m){return m===l?(e.consume(m),a++,h):(e.exit("thematicBreakSequence"),pt(m)?Ct(e,f,"whitespace")(m):f(m))}}const rr={continuation:{tokenize:QM},exit:ZM,name:"list",tokenize:YM},KM={partial:!0,tokenize:WM},VM={partial:!0,tokenize:XM};function YM(e,t,r){const a=this,l=a.events[a.events.length-1];let o=l&&l[1].type==="linePrefix"?l[2].sliceSerialize(l[1],!0).length:0,c=0;return f;function f(v){const k=a.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(k==="listUnordered"?!a.containerState.marker||v===a.containerState.marker:mm(v)){if(a.containerState.type||(a.containerState.type=k,e.enter(k,{_container:!0})),k==="listUnordered")return e.enter("listItemPrefix"),v===42||v===45?e.check(_u,r,m)(v):m(v);if(!a.interrupt||v===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),h(v)}return r(v)}function h(v){return mm(v)&&++c<10?(e.consume(v),h):(!a.interrupt||c<2)&&(a.containerState.marker?v===a.containerState.marker:v===41||v===46)?(e.exit("listItemValue"),m(v)):r(v)}function m(v){return e.enter("listItemMarker"),e.consume(v),e.exit("listItemMarker"),a.containerState.marker=a.containerState.marker||v,e.check(Do,a.interrupt?r:g,e.attempt(KM,y,x))}function g(v){return a.containerState.initialBlankLine=!0,o++,y(v)}function x(v){return pt(v)?(e.enter("listItemPrefixWhitespace"),e.consume(v),e.exit("listItemPrefixWhitespace"),y):r(v)}function y(v){return a.containerState.size=o+a.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(v)}}function QM(e,t,r){const a=this;return a.containerState._closeFlow=void 0,e.check(Do,l,o);function l(f){return a.containerState.furtherBlankLines=a.containerState.furtherBlankLines||a.containerState.initialBlankLine,Ct(e,t,"listItemIndent",a.containerState.size+1)(f)}function o(f){return a.containerState.furtherBlankLines||!pt(f)?(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,c(f)):(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,e.attempt(VM,t,c)(f))}function c(f){return a.containerState._closeFlow=!0,a.interrupt=void 0,Ct(e,e.attempt(rr,t,r),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function XM(e,t,r){const a=this;return Ct(e,l,"listItemIndent",a.containerState.size+1);function l(o){const c=a.events[a.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===a.containerState.size?t(o):r(o)}}function ZM(e){e.exit(this.containerState.type)}function WM(e,t,r){const a=this;return Ct(e,l,"listItemPrefixWhitespace",a.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function l(o){const c=a.events[a.events.length-1];return!pt(o)&&c&&c[1].type==="listItemPrefixWhitespace"?t(o):r(o)}}const Ty={name:"setextUnderline",resolveTo:JM,tokenize:e4};function JM(e,t){let r=e.length,a,l,o;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){a=r;break}e[r][1].type==="paragraph"&&(l=r)}else e[r][1].type==="content"&&e.splice(r,1),!o&&e[r][1].type==="definition"&&(o=r);const c={type:"setextHeading",start:{...e[a][1].start},end:{...e[e.length-1][1].end}};return e[l][1].type="setextHeadingText",o?(e.splice(l,0,["enter",c,t]),e.splice(o+1,0,["exit",e[a][1],t]),e[a][1].end={...e[o][1].end}):e[a][1]=c,e.push(["exit",c,t]),e}function e4(e,t,r){const a=this;let l;return o;function o(m){let g=a.events.length,x;for(;g--;)if(a.events[g][1].type!=="lineEnding"&&a.events[g][1].type!=="linePrefix"&&a.events[g][1].type!=="content"){x=a.events[g][1].type==="paragraph";break}return!a.parser.lazy[a.now().line]&&(a.interrupt||x)?(e.enter("setextHeadingLine"),l=m,c(m)):r(m)}function c(m){return e.enter("setextHeadingLineSequence"),f(m)}function f(m){return m===l?(e.consume(m),f):(e.exit("setextHeadingLineSequence"),pt(m)?Ct(e,h,"lineSuffix")(m):h(m))}function h(m){return m===null||Ke(m)?(e.exit("setextHeadingLine"),t(m)):r(m)}}const t4={tokenize:n4};function n4(e){const t=this,r=e.attempt(Do,a,e.attempt(this.parser.constructs.flowInitial,l,Ct(e,e.attempt(this.parser.constructs.flow,l,e.attempt(lM,l)),"linePrefix")));return r;function a(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function l(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,r}}const r4={resolveAll:Fk()},i4=Uk("string"),a4=Uk("text");function Uk(e){return{resolveAll:Fk(e==="text"?s4:void 0),tokenize:t};function t(r){const a=this,l=this.parser.constructs[e],o=r.attempt(l,c,f);return c;function c(g){return m(g)?o(g):f(g)}function f(g){if(g===null){r.consume(g);return}return r.enter("data"),r.consume(g),h}function h(g){return m(g)?(r.exit("data"),o(g)):(r.consume(g),h)}function m(g){if(g===null)return!0;const x=l[g];let y=-1;if(x)for(;++y<x.length;){const v=x[y];if(!v.previous||v.previous.call(a,a.previous))return!0}return!1}}}function Fk(e){return t;function t(r,a){let l=-1,o;for(;++l<=r.length;)o===void 0?r[l]&&r[l][1].type==="data"&&(o=l,l++):(!r[l]||r[l][1].type!=="data")&&(l!==o+2&&(r[o][1].end=r[l-1][1].end,r.splice(o+2,l-o-2),l=o+2),o=void 0);return e?e(r,a):r}}function s4(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const a=e[r-1][1],l=t.sliceStream(a);let o=l.length,c=-1,f=0,h;for(;o--;){const m=l[o];if(typeof m=="string"){for(c=m.length;m.charCodeAt(c-1)===32;)f++,c--;if(c)break;c=-1}else if(m===-2)h=!0,f++;else if(m!==-1){o++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(f=0),f){const m={type:r===e.length||h||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?c:a.start._bufferIndex+c,_index:a.start._index+o,line:a.end.line,column:a.end.column-f,offset:a.end.offset-f},end:{...a.end}};a.end={...m.start},a.start.offset===a.end.offset?Object.assign(a,m):(e.splice(r,0,["enter",m,t],["exit",m,t]),r+=2)}r++}return e}const l4={42:rr,43:rr,45:rr,48:rr,49:rr,50:rr,51:rr,52:rr,53:rr,54:rr,55:rr,56:rr,57:rr,62:Ok},o4={91:fM},c4={[-2]:zh,[-1]:zh,32:zh},u4={35:xM,42:_u,45:[Ty,_u],60:wM,61:Ty,95:_u,96:zy,126:zy},d4={38:jk,92:Mk},f4={[-5]:Ch,[-4]:Ch,[-3]:Ch,33:FM,38:jk,42:pm,60:[HO,TM],91:HM,92:[gM,Mk],93:lp,95:pm,96:tM},h4={null:[pm,r4]},m4={null:[42,95]},p4={null:[]},g4=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:m4,contentInitial:o4,disable:p4,document:l4,flow:u4,flowInitial:c4,insideSpan:h4,string:d4,text:f4},Symbol.toStringTag,{value:"Module"}));function b4(e,t,r){let a={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const l={},o=[];let c=[],f=[];const h={attempt:K($),check:K(M),consume:O,enter:A,exit:P,interrupt:K(M,{interrupt:!0})},m={code:null,containerState:{},defineSkip:E,events:[],now:k,parser:e,previous:null,sliceSerialize:y,sliceStream:v,write:x};let g=t.tokenize.call(m,h);return t.resolveAll&&o.push(t),m;function x(ee){return c=Rr(c,ee),S(),c[c.length-1]!==null?[]:(z(t,0),m.events=Zu(o,m.events,m),m.events)}function y(ee,te){return y4(v(ee),te)}function v(ee){return x4(c,ee)}function k(){const{_bufferIndex:ee,_index:te,line:_e,column:se,offset:X}=a;return{_bufferIndex:ee,_index:te,line:_e,column:se,offset:X}}function E(ee){l[ee.line]=ee.column,U()}function S(){let ee;for(;a._index<c.length;){const te=c[a._index];if(typeof te=="string")for(ee=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===ee&&a._bufferIndex<te.length;)N(te.charCodeAt(a._bufferIndex));else N(te)}}function N(ee){g=g(ee)}function O(ee){Ke(ee)?(a.line++,a.column=1,a.offset+=ee===-3?2:1,U()):ee!==-1&&(a.column++,a.offset++),a._bufferIndex<0?a._index++:(a._bufferIndex++,a._bufferIndex===c[a._index].length&&(a._bufferIndex=-1,a._index++)),m.previous=ee}function A(ee,te){const _e=te||{};return _e.type=ee,_e.start=k(),m.events.push(["enter",_e,m]),f.push(_e),_e}function P(ee){const te=f.pop();return te.end=k(),m.events.push(["exit",te,m]),te}function $(ee,te){z(ee,te.from)}function M(ee,te){te.restore()}function K(ee,te){return _e;function _e(se,X,F){let ne,V,fe,R;return Array.isArray(se)?I(se):"tokenize"in se?I([se]):j(se);function j(ye){return le;function le(xe){const pe=xe!==null&&ye[xe],Ue=xe!==null&&ye.null,Re=[...Array.isArray(pe)?pe:pe?[pe]:[],...Array.isArray(Ue)?Ue:Ue?[Ue]:[]];return I(Re)(xe)}}function I(ye){return ne=ye,V=0,ye.length===0?F:C(ye[V])}function C(ye){return le;function le(xe){return R=W(),fe=ye,ye.partial||(m.currentConstruct=ye),ye.name&&m.parser.constructs.disable.null.includes(ye.name)?be():ye.tokenize.call(te?Object.assign(Object.create(m),te):m,h,ue,be)(xe)}}function ue(ye){return ee(fe,R),X}function be(ye){return R.restore(),++V<ne.length?C(ne[V]):F}}}function z(ee,te){ee.resolveAll&&!o.includes(ee)&&o.push(ee),ee.resolve&&gr(m.events,te,m.events.length-te,ee.resolve(m.events.slice(te),m)),ee.resolveTo&&(m.events=ee.resolveTo(m.events,m))}function W(){const ee=k(),te=m.previous,_e=m.currentConstruct,se=m.events.length,X=Array.from(f);return{from:se,restore:F};function F(){a=ee,m.previous=te,m.currentConstruct=_e,m.events.length=se,f=X,U()}}function U(){a.line in l&&a.column<2&&(a.column=l[a.line],a.offset+=l[a.line]-1)}}function x4(e,t){const r=t.start._index,a=t.start._bufferIndex,l=t.end._index,o=t.end._bufferIndex;let c;if(r===l)c=[e[r].slice(a,o)];else{if(c=e.slice(r,l),a>-1){const f=c[0];typeof f=="string"?c[0]=f.slice(a):c.shift()}o>0&&c.push(e[l].slice(0,o))}return c}function y4(e,t){let r=-1;const a=[];let l;for(;++r<e.length;){const o=e[r];let c;if(typeof o=="string")c=o;else switch(o){case-5:{c="\r";break}case-4:{c=`
|
|
525
|
+
`;break}case-3:{c=`\r
|
|
526
|
+
`;break}case-2:{c=t?" ":" ";break}case-1:{if(!t&&l)continue;c=" ";break}default:c=String.fromCharCode(o)}l=o===-2,a.push(c)}return a.join("")}function v4(e){const a={constructs:Ak([g4,...(e||{}).extensions||[]]),content:l(DO),defined:[],document:l(IO),flow:l(t4),lazy:{},string:l(i4),text:l(a4)};return a;function l(o){return c;function c(f){return b4(a,o,f)}}}function k4(e){for(;!Dk(e););return e}const Ay=/[\0\t\n\r]/g;function w4(){let e=1,t="",r=!0,a;return l;function l(o,c,f){const h=[];let m,g,x,y,v;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(c||void 0).decode(o)),x=0,t="",r&&(o.charCodeAt(0)===65279&&x++,r=void 0);x<o.length;){if(Ay.lastIndex=x,m=Ay.exec(o),y=m&&m.index!==void 0?m.index:o.length,v=o.charCodeAt(y),!m){t=o.slice(x);break}if(v===10&&x===y&&a)h.push(-3),a=void 0;else switch(a&&(h.push(-5),a=void 0),x<y&&(h.push(o.slice(x,y)),e+=y-x),v){case 0:{h.push(65533),e++;break}case 9:{for(g=Math.ceil(e/4)*4,h.push(-2);e++<g;)h.push(-1);break}case 10:{h.push(-4),e=1;break}default:a=!0,e=1}x=y+1}return f&&(a&&h.push(-5),t&&h.push(t),h.push(null)),h}}const _4=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function E4(e){return e.replace(_4,N4)}function N4(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){const l=r.charCodeAt(1),o=l===120||l===88;return Rk(r.slice(o?2:1),o?16:10)}return sp(r)||e}const Pk={}.hasOwnProperty;function S4(e,t,r){return t&&typeof t=="object"&&(r=t,t=void 0),z4(r)(k4(v4(r).document().write(w4()(e,t,!0))))}function z4(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(br),autolinkProtocol:W,autolinkEmail:W,atxHeading:o(_t),blockQuote:o(Ue),characterEscape:W,characterReference:W,codeFenced:o(Re),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:o(Re,c),codeText:o(Tt,c),codeTextData:W,data:W,codeFlowValue:W,definition:o(tt),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:o(gt),hardBreakEscape:o(ot),hardBreakTrailing:o(ot),htmlFlow:o(_n,c),htmlFlowData:W,htmlText:o(_n,c),htmlTextData:W,image:o(Yn),label:c,link:o(br),listItem:o(oi),listItemValue:y,listOrdered:o(xr,x),listUnordered:o(xr),paragraph:o(wa),reference:C,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:o(_t),strong:o(Li),thematicBreak:o(Qn)},exit:{atxHeading:h(),atxHeadingSequence:$,autolink:h(),autolinkEmail:pe,autolinkProtocol:xe,blockQuote:h(),characterEscapeValue:U,characterReferenceMarkerHexadecimal:be,characterReferenceMarkerNumeric:be,characterReferenceValue:ye,characterReference:le,codeFenced:h(S),codeFencedFence:E,codeFencedFenceInfo:v,codeFencedFenceMeta:k,codeFlowValue:U,codeIndented:h(N),codeText:h(X),codeTextData:U,data:U,definition:h(),definitionDestinationString:P,definitionLabelString:O,definitionTitleString:A,emphasis:h(),hardBreakEscape:h(te),hardBreakTrailing:h(te),htmlFlow:h(_e),htmlFlowData:U,htmlText:h(se),htmlTextData:U,image:h(ne),label:fe,labelText:V,lineEnding:ee,link:h(F),listItem:h(),listOrdered:h(),listUnordered:h(),paragraph:h(),referenceString:ue,resourceDestinationString:R,resourceTitleString:j,resource:I,setextHeading:h(z),setextHeadingLineSequence:K,setextHeadingText:M,strong:h(),thematicBreak:h()}};Hk(t,(e||{}).mdastExtensions||[]);const r={};return a;function a(ie){let we={type:"root",children:[]};const $e={stack:[we],tokenStack:[],config:t,enter:f,exit:m,buffer:c,resume:g,data:r},We=[];let rt=-1;for(;++rt<ie.length;)if(ie[rt][1].type==="listOrdered"||ie[rt][1].type==="listUnordered")if(ie[rt][0]==="enter")We.push(rt);else{const zn=We.pop();rt=l(ie,zn,rt)}for(rt=-1;++rt<ie.length;){const zn=t[ie[rt][0]];Pk.call(zn,ie[rt][1].type)&&zn[ie[rt][1].type].call(Object.assign({sliceSerialize:ie[rt][2].sliceSerialize},$e),ie[rt][1])}if($e.tokenStack.length>0){const zn=$e.tokenStack[$e.tokenStack.length-1];(zn[1]||Ry).call($e,void 0,zn[0])}for(we.position={start:ua(ie.length>0?ie[0][1].start:{line:1,column:1,offset:0}),end:ua(ie.length>0?ie[ie.length-2][1].end:{line:1,column:1,offset:0})},rt=-1;++rt<t.transforms.length;)we=t.transforms[rt](we)||we;return we}function l(ie,we,$e){let We=we-1,rt=-1,zn=!1,ar,cn,rn,Qt;for(;++We<=$e;){const At=ie[We];switch(At[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{At[0]==="enter"?rt++:rt--,Qt=void 0;break}case"lineEndingBlank":{At[0]==="enter"&&(ar&&!Qt&&!rt&&!rn&&(rn=We),Qt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Qt=void 0}if(!rt&&At[0]==="enter"&&At[1].type==="listItemPrefix"||rt===-1&&At[0]==="exit"&&(At[1].type==="listUnordered"||At[1].type==="listOrdered")){if(ar){let sr=We;for(cn=void 0;sr--;){const Cn=ie[sr];if(Cn[1].type==="lineEnding"||Cn[1].type==="lineEndingBlank"){if(Cn[0]==="exit")continue;cn&&(ie[cn][1].type="lineEndingBlank",zn=!0),Cn[1].type="lineEnding",cn=sr}else if(!(Cn[1].type==="linePrefix"||Cn[1].type==="blockQuotePrefix"||Cn[1].type==="blockQuotePrefixWhitespace"||Cn[1].type==="blockQuoteMarker"||Cn[1].type==="listItemIndent"))break}rn&&(!cn||rn<cn)&&(ar._spread=!0),ar.end=Object.assign({},cn?ie[cn][1].start:At[1].end),ie.splice(cn||We,0,["exit",ar,At[2]]),We++,$e++}if(At[1].type==="listItemPrefix"){const sr={type:"listItem",_spread:!1,start:Object.assign({},At[1].start),end:void 0};ar=sr,ie.splice(We,0,["enter",sr,At[2]]),We++,$e++,rn=void 0,Qt=!0}}}return ie[we][1]._spread=zn,$e}function o(ie,we){return $e;function $e(We){f.call(this,ie(We),We),we&&we.call(this,We)}}function c(){this.stack.push({type:"fragment",children:[]})}function f(ie,we,$e){this.stack[this.stack.length-1].children.push(ie),this.stack.push(ie),this.tokenStack.push([we,$e||void 0]),ie.position={start:ua(we.start),end:void 0}}function h(ie){return we;function we($e){ie&&ie.call(this,$e),m.call(this,$e)}}function m(ie,we){const $e=this.stack.pop(),We=this.tokenStack.pop();if(We)We[0].type!==ie.type&&(we?we.call(this,ie,We[0]):(We[1]||Ry).call(this,ie,We[0]));else throw new Error("Cannot close `"+ie.type+"` ("+uo({start:ie.start,end:ie.end})+"): it’s not open");$e.position.end=ua(ie.end)}function g(){return ap(this.stack.pop())}function x(){this.data.expectingFirstListItemValue=!0}function y(ie){if(this.data.expectingFirstListItemValue){const we=this.stack[this.stack.length-2];we.start=Number.parseInt(this.sliceSerialize(ie),10),this.data.expectingFirstListItemValue=void 0}}function v(){const ie=this.resume(),we=this.stack[this.stack.length-1];we.lang=ie}function k(){const ie=this.resume(),we=this.stack[this.stack.length-1];we.meta=ie}function E(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){const ie=this.resume(),we=this.stack[this.stack.length-1];we.value=ie.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function N(){const ie=this.resume(),we=this.stack[this.stack.length-1];we.value=ie.replace(/(\r?\n|\r)$/g,"")}function O(ie){const we=this.resume(),$e=this.stack[this.stack.length-1];$e.label=we,$e.identifier=$r(this.sliceSerialize(ie)).toLowerCase()}function A(){const ie=this.resume(),we=this.stack[this.stack.length-1];we.title=ie}function P(){const ie=this.resume(),we=this.stack[this.stack.length-1];we.url=ie}function $(ie){const we=this.stack[this.stack.length-1];if(!we.depth){const $e=this.sliceSerialize(ie).length;we.depth=$e}}function M(){this.data.setextHeadingSlurpLineEnding=!0}function K(ie){const we=this.stack[this.stack.length-1];we.depth=this.sliceSerialize(ie).codePointAt(0)===61?1:2}function z(){this.data.setextHeadingSlurpLineEnding=void 0}function W(ie){const $e=this.stack[this.stack.length-1].children;let We=$e[$e.length-1];(!We||We.type!=="text")&&(We=Wt(),We.position={start:ua(ie.start),end:void 0},$e.push(We)),this.stack.push(We)}function U(ie){const we=this.stack.pop();we.value+=this.sliceSerialize(ie),we.position.end=ua(ie.end)}function ee(ie){const we=this.stack[this.stack.length-1];if(this.data.atHardBreak){const $e=we.children[we.children.length-1];$e.position.end=ua(ie.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(we.type)&&(W.call(this,ie),U.call(this,ie))}function te(){this.data.atHardBreak=!0}function _e(){const ie=this.resume(),we=this.stack[this.stack.length-1];we.value=ie}function se(){const ie=this.resume(),we=this.stack[this.stack.length-1];we.value=ie}function X(){const ie=this.resume(),we=this.stack[this.stack.length-1];we.value=ie}function F(){const ie=this.stack[this.stack.length-1];if(this.data.inReference){const we=this.data.referenceType||"shortcut";ie.type+="Reference",ie.referenceType=we,delete ie.url,delete ie.title}else delete ie.identifier,delete ie.label;this.data.referenceType=void 0}function ne(){const ie=this.stack[this.stack.length-1];if(this.data.inReference){const we=this.data.referenceType||"shortcut";ie.type+="Reference",ie.referenceType=we,delete ie.url,delete ie.title}else delete ie.identifier,delete ie.label;this.data.referenceType=void 0}function V(ie){const we=this.sliceSerialize(ie),$e=this.stack[this.stack.length-2];$e.label=E4(we),$e.identifier=$r(we).toLowerCase()}function fe(){const ie=this.stack[this.stack.length-1],we=this.resume(),$e=this.stack[this.stack.length-1];if(this.data.inReference=!0,$e.type==="link"){const We=ie.children;$e.children=We}else $e.alt=we}function R(){const ie=this.resume(),we=this.stack[this.stack.length-1];we.url=ie}function j(){const ie=this.resume(),we=this.stack[this.stack.length-1];we.title=ie}function I(){this.data.inReference=void 0}function C(){this.data.referenceType="collapsed"}function ue(ie){const we=this.resume(),$e=this.stack[this.stack.length-1];$e.label=we,$e.identifier=$r(this.sliceSerialize(ie)).toLowerCase(),this.data.referenceType="full"}function be(ie){this.data.characterReferenceType=ie.type}function ye(ie){const we=this.sliceSerialize(ie),$e=this.data.characterReferenceType;let We;$e?(We=Rk(we,$e==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):We=sp(we);const rt=this.stack[this.stack.length-1];rt.value+=We}function le(ie){const we=this.stack.pop();we.position.end=ua(ie.end)}function xe(ie){U.call(this,ie);const we=this.stack[this.stack.length-1];we.url=this.sliceSerialize(ie)}function pe(ie){U.call(this,ie);const we=this.stack[this.stack.length-1];we.url="mailto:"+this.sliceSerialize(ie)}function Ue(){return{type:"blockquote",children:[]}}function Re(){return{type:"code",lang:null,meta:null,value:""}}function Tt(){return{type:"inlineCode",value:""}}function tt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function gt(){return{type:"emphasis",children:[]}}function _t(){return{type:"heading",depth:0,children:[]}}function ot(){return{type:"break"}}function _n(){return{type:"html",value:""}}function Yn(){return{type:"image",title:null,url:"",alt:null}}function br(){return{type:"link",title:null,url:"",children:[]}}function xr(ie){return{type:"list",ordered:ie.type==="listOrdered",start:null,spread:ie._spread,children:[]}}function oi(ie){return{type:"listItem",spread:ie._spread,checked:null,children:[]}}function wa(){return{type:"paragraph",children:[]}}function Li(){return{type:"strong",children:[]}}function Wt(){return{type:"text",value:""}}function Qn(){return{type:"thematicBreak"}}}function ua(e){return{line:e.line,column:e.column,offset:e.offset}}function Hk(e,t){let r=-1;for(;++r<t.length;){const a=t[r];Array.isArray(a)?Hk(e,a):C4(e,a)}}function C4(e,t){let r;for(r in t)if(Pk.call(t,r))switch(r){case"canContainEols":{const a=t[r];a&&e[r].push(...a);break}case"transforms":{const a=t[r];a&&e[r].push(...a);break}case"enter":case"exit":{const a=t[r];a&&Object.assign(e[r],a);break}}}function Ry(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+uo({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+uo({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+uo({start:t.start,end:t.end})+") is still open")}function T4(e){const t=this;t.parser=r;function r(a){return S4(a,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function A4(e,t){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)}function R4(e,t){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:`
|
|
527
|
+
`}]}function O4(e,t){const r=t.value?t.value+`
|
|
528
|
+
`:"",a={},l=t.lang?t.lang.split(/\s+/):[];l.length>0&&(a.className=["language-"+l[0]]);let o={type:"element",tagName:"code",properties:a,children:[{type:"text",value:r}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function M4(e,t){const r={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function j4(e,t){const r={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function D4(e,t){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=String(t.identifier).toUpperCase(),l=Js(a.toLowerCase()),o=e.footnoteOrder.indexOf(a);let c,f=e.footnoteCounts.get(a);f===void 0?(f=0,e.footnoteOrder.push(a),c=e.footnoteOrder.length):c=o+1,f+=1,e.footnoteCounts.set(a,f);const h={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+l,id:r+"fnref-"+l+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(t,h);const m={type:"element",tagName:"sup",properties:{},children:[h]};return e.patch(t,m),e.applyData(t,m)}function L4(e,t){const r={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function I4(e,t){if(e.options.allowDangerousHtml){const r={type:"raw",value:t.value};return e.patch(t,r),e.applyData(t,r)}}function qk(e,t){const r=t.referenceType;let a="]";if(r==="collapsed"?a+="[]":r==="full"&&(a+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+a}];const l=e.all(t),o=l[0];o&&o.type==="text"?o.value="["+o.value:l.unshift({type:"text",value:"["});const c=l[l.length-1];return c&&c.type==="text"?c.value+=a:l.push({type:"text",value:a}),l}function B4(e,t){const r=String(t.identifier).toUpperCase(),a=e.definitionById.get(r);if(!a)return qk(e,t);const l={src:Js(a.url||""),alt:t.alt};a.title!==null&&a.title!==void 0&&(l.title=a.title);const o={type:"element",tagName:"img",properties:l,children:[]};return e.patch(t,o),e.applyData(t,o)}function U4(e,t){const r={src:Js(t.url)};t.alt!==null&&t.alt!==void 0&&(r.alt=t.alt),t.title!==null&&t.title!==void 0&&(r.title=t.title);const a={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,a),e.applyData(t,a)}function F4(e,t){const r={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,r);const a={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(t,a),e.applyData(t,a)}function P4(e,t){const r=String(t.identifier).toUpperCase(),a=e.definitionById.get(r);if(!a)return qk(e,t);const l={href:Js(a.url||"")};a.title!==null&&a.title!==void 0&&(l.title=a.title);const o={type:"element",tagName:"a",properties:l,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function H4(e,t){const r={href:Js(t.url)};t.title!==null&&t.title!==void 0&&(r.title=t.title);const a={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function q4(e,t,r){const a=e.all(t),l=r?$4(r):$k(t),o={},c=[];if(typeof t.checked=="boolean"){const g=a[0];let x;g&&g.type==="element"&&g.tagName==="p"?x=g:(x={type:"element",tagName:"p",properties:{},children:[]},a.unshift(x)),x.children.length>0&&x.children.unshift({type:"text",value:" "}),x.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let f=-1;for(;++f<a.length;){const g=a[f];(l||f!==0||g.type!=="element"||g.tagName!=="p")&&c.push({type:"text",value:`
|
|
529
|
+
`}),g.type==="element"&&g.tagName==="p"&&!l?c.push(...g.children):c.push(g)}const h=a[a.length-1];h&&(l||h.type!=="element"||h.tagName!=="p")&&c.push({type:"text",value:`
|
|
530
|
+
`});const m={type:"element",tagName:"li",properties:o,children:c};return e.patch(t,m),e.applyData(t,m)}function $4(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const r=e.children;let a=-1;for(;!t&&++a<r.length;)t=$k(r[a])}return t}function $k(e){const t=e.spread;return t??e.children.length>1}function G4(e,t){const r={},a=e.all(t);let l=-1;for(typeof t.start=="number"&&t.start!==1&&(r.start=t.start);++l<a.length;){const c=a[l];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:r,children:e.wrap(a,!0)};return e.patch(t,o),e.applyData(t,o)}function K4(e,t){const r={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function V4(e,t){const r={type:"root",children:e.wrap(e.all(t))};return e.patch(t,r),e.applyData(t,r)}function Y4(e,t){const r={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Q4(e,t){const r=e.all(t),a=r.shift(),l=[];if(a){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([a],!0)};e.patch(t.children[0],c),l.push(c)}if(r.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},f=tp(t.children[1]),h=_k(t.children[t.children.length-1]);f&&h&&(c.position={start:f,end:h}),l.push(c)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(l,!0)};return e.patch(t,o),e.applyData(t,o)}function X4(e,t,r){const a=r?r.children:void 0,o=(a?a.indexOf(t):1)===0?"th":"td",c=r&&r.type==="table"?r.align:void 0,f=c?c.length:t.children.length;let h=-1;const m=[];for(;++h<f;){const x=t.children[h],y={},v=c?c[h]:void 0;v&&(y.align=v);let k={type:"element",tagName:o,properties:y,children:[]};x&&(k.children=e.all(x),e.patch(x,k),k=e.applyData(x,k)),m.push(k)}const g={type:"element",tagName:"tr",properties:{},children:e.wrap(m,!0)};return e.patch(t,g),e.applyData(t,g)}function Z4(e,t){const r={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}const Oy=9,My=32;function W4(e){const t=String(e),r=/\r?\n|\r/g;let a=r.exec(t),l=0;const o=[];for(;a;)o.push(jy(t.slice(l,a.index),l>0,!0),a[0]),l=a.index+a[0].length,a=r.exec(t);return o.push(jy(t.slice(l),l>0,!1)),o.join("")}function jy(e,t,r){let a=0,l=e.length;if(t){let o=e.codePointAt(a);for(;o===Oy||o===My;)a++,o=e.codePointAt(a)}if(r){let o=e.codePointAt(l-1);for(;o===Oy||o===My;)l--,o=e.codePointAt(l-1)}return l>a?e.slice(a,l):""}function J4(e,t){const r={type:"text",value:W4(String(t.value))};return e.patch(t,r),e.applyData(t,r)}function ej(e,t){const r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,r),e.applyData(t,r)}const tj={blockquote:A4,break:R4,code:O4,delete:M4,emphasis:j4,footnoteReference:D4,heading:L4,html:I4,imageReference:B4,image:U4,inlineCode:F4,linkReference:P4,link:H4,listItem:q4,list:G4,paragraph:K4,root:V4,strong:Y4,table:Q4,tableCell:Z4,tableRow:X4,text:J4,thematicBreak:ej,toml:ru,yaml:ru,definition:ru,footnoteDefinition:ru};function ru(){}const Gk=-1,Wu=0,ho=1,Mu=2,op=3,cp=4,up=5,dp=6,Kk=7,Vk=8,Dy=typeof self=="object"?self:globalThis,nj=(e,t)=>{const r=(l,o)=>(e.set(o,l),l),a=l=>{if(e.has(l))return e.get(l);const[o,c]=t[l];switch(o){case Wu:case Gk:return r(c,l);case ho:{const f=r([],l);for(const h of c)f.push(a(h));return f}case Mu:{const f=r({},l);for(const[h,m]of c)f[a(h)]=a(m);return f}case op:return r(new Date(c),l);case cp:{const{source:f,flags:h}=c;return r(new RegExp(f,h),l)}case up:{const f=r(new Map,l);for(const[h,m]of c)f.set(a(h),a(m));return f}case dp:{const f=r(new Set,l);for(const h of c)f.add(a(h));return f}case Kk:{const{name:f,message:h}=c;return r(new Dy[f](h),l)}case Vk:return r(BigInt(c),l);case"BigInt":return r(Object(BigInt(c)),l);case"ArrayBuffer":return r(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:f}=new Uint8Array(c);return r(new DataView(f),c)}}return r(new Dy[o](c),l)};return a},Ly=e=>nj(new Map,e)(0),Ds="",{toString:rj}={},{keys:ij}=Object,eo=e=>{const t=typeof e;if(t!=="object"||!e)return[Wu,t];const r=rj.call(e).slice(8,-1);switch(r){case"Array":return[ho,Ds];case"Object":return[Mu,Ds];case"Date":return[op,Ds];case"RegExp":return[cp,Ds];case"Map":return[up,Ds];case"Set":return[dp,Ds];case"DataView":return[ho,r]}return r.includes("Array")?[ho,r]:r.includes("Error")?[Kk,r]:[Mu,r]},iu=([e,t])=>e===Wu&&(t==="function"||t==="symbol"),aj=(e,t,r,a)=>{const l=(c,f)=>{const h=a.push(c)-1;return r.set(f,h),h},o=c=>{if(r.has(c))return r.get(c);let[f,h]=eo(c);switch(f){case Wu:{let g=c;switch(h){case"bigint":f=Vk,g=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+h);g=null;break;case"undefined":return l([Gk],c)}return l([f,g],c)}case ho:{if(h){let y=c;return h==="DataView"?y=new Uint8Array(c.buffer):h==="ArrayBuffer"&&(y=new Uint8Array(c)),l([h,[...y]],c)}const g=[],x=l([f,g],c);for(const y of c)g.push(o(y));return x}case Mu:{if(h)switch(h){case"BigInt":return l([h,c.toString()],c);case"Boolean":case"Number":case"String":return l([h,c.valueOf()],c)}if(t&&"toJSON"in c)return o(c.toJSON());const g=[],x=l([f,g],c);for(const y of ij(c))(e||!iu(eo(c[y])))&&g.push([o(y),o(c[y])]);return x}case op:return l([f,c.toISOString()],c);case cp:{const{source:g,flags:x}=c;return l([f,{source:g,flags:x}],c)}case up:{const g=[],x=l([f,g],c);for(const[y,v]of c)(e||!(iu(eo(y))||iu(eo(v))))&&g.push([o(y),o(v)]);return x}case dp:{const g=[],x=l([f,g],c);for(const y of c)(e||!iu(eo(y)))&&g.push(o(y));return x}}const{message:m}=c;return l([f,{name:h,message:m}],c)};return o},Iy=(e,{json:t,lossy:r}={})=>{const a=[];return aj(!(t||r),!!t,new Map,a)(e),a},ju=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Ly(Iy(e,t)):structuredClone(e):(e,t)=>Ly(Iy(e,t));function sj(e,t){const r=[{type:"text",value:"↩"}];return t>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),r}function lj(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function oj(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=e.options.footnoteBackContent||sj,a=e.options.footnoteBackLabel||lj,l=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let h=-1;for(;++h<e.footnoteOrder.length;){const m=e.footnoteById.get(e.footnoteOrder[h]);if(!m)continue;const g=e.all(m),x=String(m.identifier).toUpperCase(),y=Js(x.toLowerCase());let v=0;const k=[],E=e.footnoteCounts.get(x);for(;E!==void 0&&++v<=E;){k.length>0&&k.push({type:"text",value:" "});let O=typeof r=="string"?r:r(h,v);typeof O=="string"&&(O={type:"text",value:O}),k.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+y+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof a=="string"?a:a(h,v),className:["data-footnote-backref"]},children:Array.isArray(O)?O:[O]})}const S=g[g.length-1];if(S&&S.type==="element"&&S.tagName==="p"){const O=S.children[S.children.length-1];O&&O.type==="text"?O.value+=" ":S.children.push({type:"text",value:" "}),S.children.push(...k)}else g.push(...k);const N={type:"element",tagName:"li",properties:{id:t+"fn-"+y},children:e.wrap(g,!0)};e.patch(m,N),f.push(N)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...ju(c),id:"footnote-label"},children:[{type:"text",value:l}]},{type:"text",value:`
|
|
531
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
|
|
532
|
+
`}]}}const Lo=(function(e){if(e==null)return fj;if(typeof e=="function")return Ju(e);if(typeof e=="object")return Array.isArray(e)?cj(e):uj(e);if(typeof e=="string")return dj(e);throw new Error("Expected function, string, or object as test")});function cj(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=Lo(e[r]);return Ju(a);function a(...l){let o=-1;for(;++o<t.length;)if(t[o].apply(this,l))return!0;return!1}}function uj(e){const t=e;return Ju(r);function r(a){const l=a;let o;for(o in e)if(l[o]!==t[o])return!1;return!0}}function dj(e){return Ju(t);function t(r){return r&&r.type===e}}function Ju(e){return t;function t(r,a,l){return!!(hj(r)&&e.call(this,r,typeof a=="number"?a:void 0,l||void 0))}}function fj(){return!0}function hj(e){return e!==null&&typeof e=="object"&&"type"in e}const Yk=[],mj=!0,gm=!1,pj="skip";function Qk(e,t,r,a){let l;typeof t=="function"&&typeof r!="function"?(a=r,r=t):l=t;const o=Lo(l),c=a?-1:1;f(e,void 0,[])();function f(h,m,g){const x=h&&typeof h=="object"?h:{};if(typeof x.type=="string"){const v=typeof x.tagName=="string"?x.tagName:typeof x.name=="string"?x.name:void 0;Object.defineProperty(y,"name",{value:"node ("+(h.type+(v?"<"+v+">":""))+")"})}return y;function y(){let v=Yk,k,E,S;if((!t||o(h,m,g[g.length-1]||void 0))&&(v=gj(r(h,g)),v[0]===gm))return v;if("children"in h&&h.children){const N=h;if(N.children&&v[0]!==pj)for(E=(a?N.children.length:-1)+c,S=g.concat(N);E>-1&&E<N.children.length;){const O=N.children[E];if(k=f(O,E,S)(),k[0]===gm)return k;E=typeof k[1]=="number"?k[1]:E+c}}return v}}}function gj(e){return Array.isArray(e)?e:typeof e=="number"?[mj,e]:e==null?Yk:[e]}function ed(e,t,r,a){let l,o,c;typeof t=="function"&&typeof r!="function"?(o=void 0,c=t,l=r):(o=t,c=r,l=a),Qk(e,o,f,l);function f(h,m){const g=m[m.length-1],x=g?g.children.indexOf(h):void 0;return c(h,x,g)}}const bm={}.hasOwnProperty,bj={};function xj(e,t){const r=t||bj,a=new Map,l=new Map,o=new Map,c={...tj,...r.handlers},f={all:m,applyData:vj,definitionById:a,footnoteById:l,footnoteCounts:o,footnoteOrder:[],handlers:c,one:h,options:r,patch:yj,wrap:wj};return ed(e,function(g){if(g.type==="definition"||g.type==="footnoteDefinition"){const x=g.type==="definition"?a:l,y=String(g.identifier).toUpperCase();x.has(y)||x.set(y,g)}}),f;function h(g,x){const y=g.type,v=f.handlers[y];if(bm.call(f.handlers,y)&&v)return v(f,g,x);if(f.options.passThrough&&f.options.passThrough.includes(y)){if("children"in g){const{children:E,...S}=g,N=ju(S);return N.children=f.all(g),N}return ju(g)}return(f.options.unknownHandler||kj)(f,g,x)}function m(g){const x=[];if("children"in g){const y=g.children;let v=-1;for(;++v<y.length;){const k=f.one(y[v],g);if(k){if(v&&y[v-1].type==="break"&&(!Array.isArray(k)&&k.type==="text"&&(k.value=By(k.value)),!Array.isArray(k)&&k.type==="element")){const E=k.children[0];E&&E.type==="text"&&(E.value=By(E.value))}Array.isArray(k)?x.push(...k):x.push(k)}}}return x}}function yj(e,t){e.position&&(t.position=lO(e))}function vj(e,t){let r=t;if(e&&e.data){const a=e.data.hName,l=e.data.hChildren,o=e.data.hProperties;if(typeof a=="string")if(r.type==="element")r.tagName=a;else{const c="children"in r?r.children:[r];r={type:"element",tagName:a,properties:{},children:c}}r.type==="element"&&o&&Object.assign(r.properties,ju(o)),"children"in r&&r.children&&l!==null&&l!==void 0&&(r.children=l)}return r}function kj(e,t){const r=t.data||{},a="value"in t&&!(bm.call(r,"hProperties")||bm.call(r,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function wj(e,t){const r=[];let a=-1;for(t&&r.push({type:"text",value:`
|
|
533
|
+
`});++a<e.length;)a&&r.push({type:"text",value:`
|
|
534
|
+
`}),r.push(e[a]);return t&&e.length>0&&r.push({type:"text",value:`
|
|
535
|
+
`}),r}function By(e){let t=0,r=e.charCodeAt(t);for(;r===9||r===32;)t++,r=e.charCodeAt(t);return e.slice(t)}function Uy(e,t){const r=xj(e,t),a=r.one(e,void 0),l=oj(r),o=Array.isArray(a)?{type:"root",children:a}:a||{type:"root",children:[]};return l&&o.children.push({type:"text",value:`
|
|
536
|
+
`},l),o}function _j(e,t){return e&&"run"in e?async function(r,a){const l=Uy(r,{file:a,...t});await e.run(l,a)}:function(r,a){return Uy(r,{file:a,...e||t})}}function Fy(e){if(e)throw e}var Th,Py;function Ej(){if(Py)return Th;Py=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r=Object.defineProperty,a=Object.getOwnPropertyDescriptor,l=function(m){return typeof Array.isArray=="function"?Array.isArray(m):t.call(m)==="[object Array]"},o=function(m){if(!m||t.call(m)!=="[object Object]")return!1;var g=e.call(m,"constructor"),x=m.constructor&&m.constructor.prototype&&e.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!g&&!x)return!1;var y;for(y in m);return typeof y>"u"||e.call(m,y)},c=function(m,g){r&&g.name==="__proto__"?r(m,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):m[g.name]=g.newValue},f=function(m,g){if(g==="__proto__")if(e.call(m,g)){if(a)return a(m,g).value}else return;return m[g]};return Th=function h(){var m,g,x,y,v,k,E=arguments[0],S=1,N=arguments.length,O=!1;for(typeof E=="boolean"&&(O=E,E=arguments[1]||{},S=2),(E==null||typeof E!="object"&&typeof E!="function")&&(E={});S<N;++S)if(m=arguments[S],m!=null)for(g in m)x=f(E,g),y=f(m,g),E!==y&&(O&&y&&(o(y)||(v=l(y)))?(v?(v=!1,k=x&&l(x)?x:[]):k=x&&o(x)?x:{},c(E,{name:g,newValue:h(O,k,y)})):typeof y<"u"&&c(E,{name:g,newValue:y}));return E},Th}var Nj=Ej();const Ah=Bu(Nj);function xm(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Sj(){const e=[],t={run:r,use:a};return t;function r(...l){let o=-1;const c=l.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);f(null,...l);function f(h,...m){const g=e[++o];let x=-1;if(h){c(h);return}for(;++x<l.length;)(m[x]===null||m[x]===void 0)&&(m[x]=l[x]);l=m,g?zj(g,f)(...m):c(null,...m)}}function a(l){if(typeof l!="function")throw new TypeError("Expected `middelware` to be a function, not "+l);return e.push(l),t}}function zj(e,t){let r;return a;function a(...c){const f=e.length>c.length;let h;f&&c.push(l);try{h=e.apply(this,c)}catch(m){const g=m;if(f&&r)throw g;return l(g)}f||(h&&h.then&&typeof h.then=="function"?h.then(o,l):h instanceof Error?l(h):o(h))}function l(c,...f){r||(r=!0,t(c,...f))}function o(c){l(null,c)}}const ei={basename:Cj,dirname:Tj,extname:Aj,join:Rj,sep:"/"};function Cj(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Io(e);let r=0,a=-1,l=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;l--;)if(e.codePointAt(l)===47){if(o){r=l+1;break}}else a<0&&(o=!0,a=l+1);return a<0?"":e.slice(r,a)}if(t===e)return"";let c=-1,f=t.length-1;for(;l--;)if(e.codePointAt(l)===47){if(o){r=l+1;break}}else c<0&&(o=!0,c=l+1),f>-1&&(e.codePointAt(l)===t.codePointAt(f--)?f<0&&(a=l):(f=-1,a=c));return r===a?a=c:a<0&&(a=e.length),e.slice(r,a)}function Tj(e){if(Io(e),e.length===0)return".";let t=-1,r=e.length,a;for(;--r;)if(e.codePointAt(r)===47){if(a){t=r;break}}else a||(a=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Aj(e){Io(e);let t=e.length,r=-1,a=0,l=-1,o=0,c;for(;t--;){const f=e.codePointAt(t);if(f===47){if(c){a=t+1;break}continue}r<0&&(c=!0,r=t+1),f===46?l<0?l=t:o!==1&&(o=1):l>-1&&(o=-1)}return l<0||r<0||o===0||o===1&&l===r-1&&l===a+1?"":e.slice(l,r)}function Rj(...e){let t=-1,r;for(;++t<e.length;)Io(e[t]),e[t]&&(r=r===void 0?e[t]:r+"/"+e[t]);return r===void 0?".":Oj(r)}function Oj(e){Io(e);const t=e.codePointAt(0)===47;let r=Mj(e,!t);return r.length===0&&!t&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),t?"/"+r:r}function Mj(e,t){let r="",a=0,l=-1,o=0,c=-1,f,h;for(;++c<=e.length;){if(c<e.length)f=e.codePointAt(c);else{if(f===47)break;f=47}if(f===47){if(!(l===c-1||o===1))if(l!==c-1&&o===2){if(r.length<2||a!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(h=r.lastIndexOf("/"),h!==r.length-1){h<0?(r="",a=0):(r=r.slice(0,h),a=r.length-1-r.lastIndexOf("/")),l=c,o=0;continue}}else if(r.length>0){r="",a=0,l=c,o=0;continue}}t&&(r=r.length>0?r+"/..":"..",a=2)}else r.length>0?r+="/"+e.slice(l+1,c):r=e.slice(l+1,c),a=c-l-1;l=c,o=0}else f===46&&o>-1?o++:o=-1}return r}function Io(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const jj={cwd:Dj};function Dj(){return"/"}function ym(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Lj(e){if(typeof e=="string")e=new URL(e);else if(!ym(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Ij(e)}function Ij(e){if(e.hostname!==""){const a=new TypeError('File URL host must be "localhost" or empty on darwin');throw a.code="ERR_INVALID_FILE_URL_HOST",a}const t=e.pathname;let r=-1;for(;++r<t.length;)if(t.codePointAt(r)===37&&t.codePointAt(r+1)===50){const a=t.codePointAt(r+2);if(a===70||a===102){const l=new TypeError("File URL path must not include encoded / characters");throw l.code="ERR_INVALID_FILE_URL_PATH",l}}return decodeURIComponent(t)}const Rh=["history","path","basename","stem","extname","dirname"];class Xk{constructor(t){let r;t?ym(t)?r={path:t}:typeof t=="string"||Bj(t)?r={value:t}:r=t:r={},this.cwd="cwd"in r?"":jj.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let a=-1;for(;++a<Rh.length;){const o=Rh[a];o in r&&r[o]!==void 0&&r[o]!==null&&(this[o]=o==="history"?[...r[o]]:r[o])}let l;for(l in r)Rh.includes(l)||(this[l]=r[l])}get basename(){return typeof this.path=="string"?ei.basename(this.path):void 0}set basename(t){Mh(t,"basename"),Oh(t,"basename"),this.path=ei.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?ei.dirname(this.path):void 0}set dirname(t){Hy(this.basename,"dirname"),this.path=ei.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?ei.extname(this.path):void 0}set extname(t){if(Oh(t,"extname"),Hy(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ei.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){ym(t)&&(t=Lj(t)),Mh(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?ei.basename(this.path,this.extname):void 0}set stem(t){Mh(t,"stem"),Oh(t,"stem"),this.path=ei.join(this.dirname||"",t+(this.extname||""))}fail(t,r,a){const l=this.message(t,r,a);throw l.fatal=!0,l}info(t,r,a){const l=this.message(t,r,a);return l.fatal=void 0,l}message(t,r,a){const l=new qn(t,r,a);return this.path&&(l.name=this.path+":"+l.name,l.file=this.path),l.fatal=!1,this.messages.push(l),l}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Oh(e,t){if(e&&e.includes(ei.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+ei.sep+"`")}function Mh(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Hy(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Bj(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Uj=(function(e){const a=this.constructor.prototype,l=a[e],o=function(){return l.apply(o,arguments)};return Object.setPrototypeOf(o,a),o}),Fj={}.hasOwnProperty;class fp extends Uj{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Sj()}copy(){const t=new fp;let r=-1;for(;++r<this.attachers.length;){const a=this.attachers[r];t.use(...a)}return t.data(Ah(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(Lh("data",this.frozen),this.namespace[t]=r,this):Fj.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Lh("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...a]=this.attachers[this.freezeIndex];if(a[0]===!1)continue;a[0]===!0&&(a[0]=void 0);const l=r.call(t,...a);typeof l=="function"&&this.transformers.use(l)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const r=au(t),a=this.parser||this.Parser;return jh("parse",a),a(String(r),r)}process(t,r){const a=this;return this.freeze(),jh("process",this.parser||this.Parser),Dh("process",this.compiler||this.Compiler),r?l(void 0,r):new Promise(l);function l(o,c){const f=au(t),h=a.parse(f);a.run(h,f,function(g,x,y){if(g||!x||!y)return m(g);const v=x,k=a.stringify(v,y);qj(k)?y.value=k:y.result=k,m(g,y)});function m(g,x){g||!x?c(g):o?o(x):r(void 0,x)}}}processSync(t){let r=!1,a;return this.freeze(),jh("processSync",this.parser||this.Parser),Dh("processSync",this.compiler||this.Compiler),this.process(t,l),$y("processSync","process",r),a;function l(o,c){r=!0,Fy(o),a=c}}run(t,r,a){qy(t),this.freeze();const l=this.transformers;return!a&&typeof r=="function"&&(a=r,r=void 0),a?o(void 0,a):new Promise(o);function o(c,f){const h=au(r);l.run(t,h,m);function m(g,x,y){const v=x||t;g?f(g):c?c(v):a(void 0,v,y)}}}runSync(t,r){let a=!1,l;return this.run(t,r,o),$y("runSync","run",a),l;function o(c,f){Fy(c),l=f,a=!0}}stringify(t,r){this.freeze();const a=au(r),l=this.compiler||this.Compiler;return Dh("stringify",l),qy(t),l(t,a)}use(t,...r){const a=this.attachers,l=this.namespace;if(Lh("use",this.frozen),t!=null)if(typeof t=="function")h(t,r);else if(typeof t=="object")Array.isArray(t)?f(t):c(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(m){if(typeof m=="function")h(m,[]);else if(typeof m=="object")if(Array.isArray(m)){const[g,...x]=m;h(g,x)}else c(m);else throw new TypeError("Expected usable value, not `"+m+"`")}function c(m){if(!("plugins"in m)&&!("settings"in m))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");f(m.plugins),m.settings&&(l.settings=Ah(!0,l.settings,m.settings))}function f(m){let g=-1;if(m!=null)if(Array.isArray(m))for(;++g<m.length;){const x=m[g];o(x)}else throw new TypeError("Expected a list of plugins, not `"+m+"`")}function h(m,g){let x=-1,y=-1;for(;++x<a.length;)if(a[x][0]===m){y=x;break}if(y===-1)a.push([m,...g]);else if(g.length>0){let[v,...k]=g;const E=a[y][1];xm(E)&&xm(v)&&(v=Ah(!0,E,v)),a[y]=[m,v,...k]}}}}const Pj=new fp().freeze();function jh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Dh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Lh(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function qy(e){if(!xm(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function $y(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function au(e){return Hj(e)?e:new Xk(e)}function Hj(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function qj(e){return typeof e=="string"||$j(e)}function $j(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Gj="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Gy=[],Ky={allowDangerousHtml:!0},Kj=/^(https?|ircs?|mailto|xmpp)$/i,Vj=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Yj(e){const t=Qj(e),r=Xj(e);return Zj(t.runSync(t.parse(r),r),e)}function Qj(e){const t=e.rehypePlugins||Gy,r=e.remarkPlugins||Gy,a=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Ky}:Ky;return Pj().use(T4).use(r).use(_j,a).use(t)}function Xj(e){const t=e.children||"",r=new Xk;return typeof t=="string"&&(r.value=t),r}function Zj(e,t){const r=t.allowedElements,a=t.allowElement,l=t.components,o=t.disallowedElements,c=t.skipHtml,f=t.unwrapDisallowed,h=t.urlTransform||Wj;for(const g of Vj)Object.hasOwn(t,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+Gj+g.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),ed(e,m),fO(e,{Fragment:d.Fragment,components:l,ignoreInvalidStyle:!0,jsx:d.jsx,jsxs:d.jsxs,passKeys:!0,passNode:!0});function m(g,x,y){if(g.type==="raw"&&y&&typeof x=="number")return c?y.children.splice(x,1):y.children[x]={type:"text",value:g.value},x;if(g.type==="element"){let v;for(v in Sh)if(Object.hasOwn(Sh,v)&&Object.hasOwn(g.properties,v)){const k=g.properties[v],E=Sh[v];(E===null||E.includes(g.tagName))&&(g.properties[v]=h(String(k||""),v,g))}}if(g.type==="element"){let v=r?!r.includes(g.tagName):o?o.includes(g.tagName):!1;if(!v&&a&&typeof x=="number"&&(v=!a(g,x,y)),v&&y&&typeof x=="number")return f&&g.children?y.children.splice(x,1,...g.children):y.children.splice(x,1),x}}}function Wj(e){const t=e.indexOf(":"),r=e.indexOf("?"),a=e.indexOf("#"),l=e.indexOf("/");return t===-1||l!==-1&&t>l||r!==-1&&t>r||a!==-1&&t>a||Kj.test(e.slice(0,t))?e:""}function Vy(e,t){const r=String(e);if(typeof t!="string")throw new TypeError("Expected character");let a=0,l=r.indexOf(t);for(;l!==-1;)a++,l=r.indexOf(t,l+t.length);return a}function Jj(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function e3(e,t,r){const l=Lo((r||{}).ignore||[]),o=t3(t);let c=-1;for(;++c<o.length;)Qk(e,"text",f);function f(m,g){let x=-1,y;for(;++x<g.length;){const v=g[x],k=y?y.children:void 0;if(l(v,k?k.indexOf(v):void 0,y))return;y=v}if(y)return h(m,g)}function h(m,g){const x=g[g.length-1],y=o[c][0],v=o[c][1];let k=0;const S=x.children.indexOf(m);let N=!1,O=[];y.lastIndex=0;let A=y.exec(m.value);for(;A;){const P=A.index,$={index:A.index,input:A.input,stack:[...g,m]};let M=v(...A,$);if(typeof M=="string"&&(M=M.length>0?{type:"text",value:M}:void 0),M===!1?y.lastIndex=P+1:(k!==P&&O.push({type:"text",value:m.value.slice(k,P)}),Array.isArray(M)?O.push(...M):M&&O.push(M),k=P+A[0].length,N=!0),!y.global)break;A=y.exec(m.value)}return N?(k<m.value.length&&O.push({type:"text",value:m.value.slice(k)}),x.children.splice(S,1,...O)):O=[m],S+O.length}}function t3(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const r=!e[0]||Array.isArray(e[0])?e:[e];let a=-1;for(;++a<r.length;){const l=r[a];t.push([n3(l[0]),r3(l[1])])}return t}function n3(e){return typeof e=="string"?new RegExp(Jj(e),"g"):e}function r3(e){return typeof e=="function"?e:function(){return e}}const Ih="phrasing",Bh=["autolink","link","image","label"];function i3(){return{transforms:[d3],enter:{literalAutolink:s3,literalAutolinkEmail:Uh,literalAutolinkHttp:Uh,literalAutolinkWww:Uh},exit:{literalAutolink:u3,literalAutolinkEmail:c3,literalAutolinkHttp:l3,literalAutolinkWww:o3}}}function a3(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ih,notInConstruct:Bh},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ih,notInConstruct:Bh},{character:":",before:"[ps]",after:"\\/",inConstruct:Ih,notInConstruct:Bh}]}}function s3(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Uh(e){this.config.enter.autolinkProtocol.call(this,e)}function l3(e){this.config.exit.autolinkProtocol.call(this,e)}function o3(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function c3(e){this.config.exit.autolinkEmail.call(this,e)}function u3(e){this.exit(e)}function d3(e){e3(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,f3],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,h3]],{ignore:["link","linkReference"]})}function f3(e,t,r,a,l){let o="";if(!Zk(l)||(/^w/i.test(t)&&(r=t+r,t="",o="http://"),!m3(r)))return!1;const c=p3(r+a);if(!c[0])return!1;const f={type:"link",title:null,url:o+t+c[0],children:[{type:"text",value:t+c[0]}]};return c[1]?[f,{type:"text",value:c[1]}]:f}function h3(e,t,r,a){return!Zk(a,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function m3(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function p3(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let r=t[0],a=r.indexOf(")");const l=Vy(e,"(");let o=Vy(e,")");for(;a!==-1&&l>o;)e+=r.slice(0,a+1),r=r.slice(a+1),a=r.indexOf(")"),o++;return[e,r]}function Zk(e,t){const r=e.input.charCodeAt(e.index-1);return(e.index===0||Ya(r)||Xu(r))&&(!t||r!==47)}Wk.peek=E3;function g3(){this.buffer()}function b3(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function x3(){this.buffer()}function y3(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function v3(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=$r(this.sliceSerialize(e)).toLowerCase(),r.label=t}function k3(e){this.exit(e)}function w3(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=$r(this.sliceSerialize(e)).toLowerCase(),r.label=t}function _3(e){this.exit(e)}function E3(){return"["}function Wk(e,t,r,a){const l=r.createTracker(a);let o=l.move("[^");const c=r.enter("footnoteReference"),f=r.enter("reference");return o+=l.move(r.safe(r.associationId(e),{after:"]",before:o})),f(),c(),o+=l.move("]"),o}function N3(){return{enter:{gfmFootnoteCallString:g3,gfmFootnoteCall:b3,gfmFootnoteDefinitionLabelString:x3,gfmFootnoteDefinition:y3},exit:{gfmFootnoteCallString:v3,gfmFootnoteCall:k3,gfmFootnoteDefinitionLabelString:w3,gfmFootnoteDefinition:_3}}}function S3(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:r,footnoteReference:Wk},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(a,l,o,c){const f=o.createTracker(c);let h=f.move("[^");const m=o.enter("footnoteDefinition"),g=o.enter("label");return h+=f.move(o.safe(o.associationId(a),{before:h,after:"]"})),g(),h+=f.move("]:"),a.children&&a.children.length>0&&(f.shift(4),h+=f.move((t?`
|
|
537
|
+
`:" ")+o.indentLines(o.containerFlow(a,f.current()),t?Jk:z3))),m(),h}}function z3(e,t,r){return t===0?e:Jk(e,t,r)}function Jk(e,t,r){return(r?"":" ")+e}const C3=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];ew.peek=M3;function T3(){return{canContainEols:["delete"],enter:{strikethrough:R3},exit:{strikethrough:O3}}}function A3(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:C3}],handlers:{delete:ew}}}function R3(e){this.enter({type:"delete",children:[]},e)}function O3(e){this.exit(e)}function ew(e,t,r,a){const l=r.createTracker(a),o=r.enter("strikethrough");let c=l.move("~~");return c+=r.containerPhrasing(e,{...l.current(),before:c,after:"~"}),c+=l.move("~~"),o(),c}function M3(){return"~"}function j3(e){return e.length}function D3(e,t){const r=t||{},a=(r.align||[]).concat(),l=r.stringLength||j3,o=[],c=[],f=[],h=[];let m=0,g=-1;for(;++g<e.length;){const E=[],S=[];let N=-1;for(e[g].length>m&&(m=e[g].length);++N<e[g].length;){const O=L3(e[g][N]);if(r.alignDelimiters!==!1){const A=l(O);S[N]=A,(h[N]===void 0||A>h[N])&&(h[N]=A)}E.push(O)}c[g]=E,f[g]=S}let x=-1;if(typeof a=="object"&&"length"in a)for(;++x<m;)o[x]=Yy(a[x]);else{const E=Yy(a);for(;++x<m;)o[x]=E}x=-1;const y=[],v=[];for(;++x<m;){const E=o[x];let S="",N="";E===99?(S=":",N=":"):E===108?S=":":E===114&&(N=":");let O=r.alignDelimiters===!1?1:Math.max(1,h[x]-S.length-N.length);const A=S+"-".repeat(O)+N;r.alignDelimiters!==!1&&(O=S.length+O+N.length,O>h[x]&&(h[x]=O),v[x]=O),y[x]=A}c.splice(1,0,y),f.splice(1,0,v),g=-1;const k=[];for(;++g<c.length;){const E=c[g],S=f[g];x=-1;const N=[];for(;++x<m;){const O=E[x]||"";let A="",P="";if(r.alignDelimiters!==!1){const $=h[x]-(S[x]||0),M=o[x];M===114?A=" ".repeat($):M===99?$%2?(A=" ".repeat($/2+.5),P=" ".repeat($/2-.5)):(A=" ".repeat($/2),P=A):P=" ".repeat($)}r.delimiterStart!==!1&&!x&&N.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&O==="")&&(r.delimiterStart!==!1||x)&&N.push(" "),r.alignDelimiters!==!1&&N.push(A),N.push(O),r.alignDelimiters!==!1&&N.push(P),r.padding!==!1&&N.push(" "),(r.delimiterEnd!==!1||x!==m-1)&&N.push("|")}k.push(r.delimiterEnd===!1?N.join("").replace(/ +$/,""):N.join(""))}return k.join(`
|
|
538
|
+
`)}function L3(e){return e==null?"":String(e)}function Yy(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function I3(e,t,r,a){const l=r.enter("blockquote"),o=r.createTracker(a);o.move("> "),o.shift(2);const c=r.indentLines(r.containerFlow(e,o.current()),B3);return l(),c}function B3(e,t,r){return">"+(r?"":" ")+e}function U3(e,t){return Qy(e,t.inConstruct,!0)&&!Qy(e,t.notInConstruct,!1)}function Qy(e,t,r){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return r;let a=-1;for(;++a<t.length;)if(e.includes(t[a]))return!0;return!1}function Xy(e,t,r,a){let l=-1;for(;++l<r.unsafe.length;)if(r.unsafe[l].character===`
|
|
539
|
+
`&&U3(r.stack,r.unsafe[l]))return/[ \t]/.test(a.before)?"":" ";return`\\
|
|
540
|
+
`}function F3(e,t){const r=String(e);let a=r.indexOf(t),l=a,o=0,c=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;a!==-1;)a===l?++o>c&&(c=o):o=1,l=a+t.length,a=r.indexOf(t,l);return c}function P3(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function H3(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function q3(e,t,r,a){const l=H3(r),o=e.value||"",c=l==="`"?"GraveAccent":"Tilde";if(P3(e,r)){const x=r.enter("codeIndented"),y=r.indentLines(o,$3);return x(),y}const f=r.createTracker(a),h=l.repeat(Math.max(F3(o,l)+1,3)),m=r.enter("codeFenced");let g=f.move(h);if(e.lang){const x=r.enter(`codeFencedLang${c}`);g+=f.move(r.safe(e.lang,{before:g,after:" ",encode:["`"],...f.current()})),x()}if(e.lang&&e.meta){const x=r.enter(`codeFencedMeta${c}`);g+=f.move(" "),g+=f.move(r.safe(e.meta,{before:g,after:`
|
|
541
|
+
`,encode:["`"],...f.current()})),x()}return g+=f.move(`
|
|
542
|
+
`),o&&(g+=f.move(o+`
|
|
543
|
+
`)),g+=f.move(h),m(),g}function $3(e,t,r){return(r?"":" ")+e}function hp(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function G3(e,t,r,a){const l=hp(r),o=l==='"'?"Quote":"Apostrophe",c=r.enter("definition");let f=r.enter("label");const h=r.createTracker(a);let m=h.move("[");return m+=h.move(r.safe(r.associationId(e),{before:m,after:"]",...h.current()})),m+=h.move("]: "),f(),!e.url||/[\0- \u007F]/.test(e.url)?(f=r.enter("destinationLiteral"),m+=h.move("<"),m+=h.move(r.safe(e.url,{before:m,after:">",...h.current()})),m+=h.move(">")):(f=r.enter("destinationRaw"),m+=h.move(r.safe(e.url,{before:m,after:e.title?" ":`
|
|
544
|
+
`,...h.current()}))),f(),e.title&&(f=r.enter(`title${o}`),m+=h.move(" "+l),m+=h.move(r.safe(e.title,{before:m,after:l,...h.current()})),m+=h.move(l),f()),c(),m}function K3(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function _o(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Du(e,t,r){const a=Gs(e),l=Gs(t);return a===void 0?l===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:l===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:a===1?l===void 0?{inside:!1,outside:!1}:l===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:l===void 0?{inside:!1,outside:!1}:l===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}tw.peek=V3;function tw(e,t,r,a){const l=K3(r),o=r.enter("emphasis"),c=r.createTracker(a),f=c.move(l);let h=c.move(r.containerPhrasing(e,{after:l,before:f,...c.current()}));const m=h.charCodeAt(0),g=Du(a.before.charCodeAt(a.before.length-1),m,l);g.inside&&(h=_o(m)+h.slice(1));const x=h.charCodeAt(h.length-1),y=Du(a.after.charCodeAt(0),x,l);y.inside&&(h=h.slice(0,-1)+_o(x));const v=c.move(l);return o(),r.attentionEncodeSurroundingInfo={after:y.outside,before:g.outside},f+h+v}function V3(e,t,r){return r.options.emphasis||"*"}function Y3(e,t){let r=!1;return ed(e,function(a){if("value"in a&&/\r?\n|\r/.test(a.value)||a.type==="break")return r=!0,gm}),!!((!e.depth||e.depth<3)&&ap(e)&&(t.options.setext||r))}function Q3(e,t,r,a){const l=Math.max(Math.min(6,e.depth||1),1),o=r.createTracker(a);if(Y3(e,r)){const g=r.enter("headingSetext"),x=r.enter("phrasing"),y=r.containerPhrasing(e,{...o.current(),before:`
|
|
545
|
+
`,after:`
|
|
546
|
+
`});return x(),g(),y+`
|
|
547
|
+
`+(l===1?"=":"-").repeat(y.length-(Math.max(y.lastIndexOf("\r"),y.lastIndexOf(`
|
|
548
|
+
`))+1))}const c="#".repeat(l),f=r.enter("headingAtx"),h=r.enter("phrasing");o.move(c+" ");let m=r.containerPhrasing(e,{before:"# ",after:`
|
|
549
|
+
`,...o.current()});return/^[\t ]/.test(m)&&(m=_o(m.charCodeAt(0))+m.slice(1)),m=m?c+" "+m:c,r.options.closeAtx&&(m+=" "+c),h(),f(),m}nw.peek=X3;function nw(e){return e.value||""}function X3(){return"<"}rw.peek=Z3;function rw(e,t,r,a){const l=hp(r),o=l==='"'?"Quote":"Apostrophe",c=r.enter("image");let f=r.enter("label");const h=r.createTracker(a);let m=h.move("![");return m+=h.move(r.safe(e.alt,{before:m,after:"]",...h.current()})),m+=h.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=r.enter("destinationLiteral"),m+=h.move("<"),m+=h.move(r.safe(e.url,{before:m,after:">",...h.current()})),m+=h.move(">")):(f=r.enter("destinationRaw"),m+=h.move(r.safe(e.url,{before:m,after:e.title?" ":")",...h.current()}))),f(),e.title&&(f=r.enter(`title${o}`),m+=h.move(" "+l),m+=h.move(r.safe(e.title,{before:m,after:l,...h.current()})),m+=h.move(l),f()),m+=h.move(")"),c(),m}function Z3(){return"!"}iw.peek=W3;function iw(e,t,r,a){const l=e.referenceType,o=r.enter("imageReference");let c=r.enter("label");const f=r.createTracker(a);let h=f.move("![");const m=r.safe(e.alt,{before:h,after:"]",...f.current()});h+=f.move(m+"]["),c();const g=r.stack;r.stack=[],c=r.enter("reference");const x=r.safe(r.associationId(e),{before:h,after:"]",...f.current()});return c(),r.stack=g,o(),l==="full"||!m||m!==x?h+=f.move(x+"]"):l==="shortcut"?h=h.slice(0,-1):h+=f.move("]"),h}function W3(){return"!"}aw.peek=J3;function aw(e,t,r){let a=e.value||"",l="`",o=-1;for(;new RegExp("(^|[^`])"+l+"([^`]|$)").test(a);)l+="`";for(/[^ \r\n]/.test(a)&&(/^[ \r\n]/.test(a)&&/[ \r\n]$/.test(a)||/^`|`$/.test(a))&&(a=" "+a+" ");++o<r.unsafe.length;){const c=r.unsafe[o],f=r.compilePattern(c);let h;if(c.atBreak)for(;h=f.exec(a);){let m=h.index;a.charCodeAt(m)===10&&a.charCodeAt(m-1)===13&&m--,a=a.slice(0,m)+" "+a.slice(h.index+1)}}return l+a+l}function J3(){return"`"}function sw(e,t){const r=ap(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(r===e.url||"mailto:"+r===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}lw.peek=eD;function lw(e,t,r,a){const l=hp(r),o=l==='"'?"Quote":"Apostrophe",c=r.createTracker(a);let f,h;if(sw(e,r)){const g=r.stack;r.stack=[],f=r.enter("autolink");let x=c.move("<");return x+=c.move(r.containerPhrasing(e,{before:x,after:">",...c.current()})),x+=c.move(">"),f(),r.stack=g,x}f=r.enter("link"),h=r.enter("label");let m=c.move("[");return m+=c.move(r.containerPhrasing(e,{before:m,after:"](",...c.current()})),m+=c.move("]("),h(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(h=r.enter("destinationLiteral"),m+=c.move("<"),m+=c.move(r.safe(e.url,{before:m,after:">",...c.current()})),m+=c.move(">")):(h=r.enter("destinationRaw"),m+=c.move(r.safe(e.url,{before:m,after:e.title?" ":")",...c.current()}))),h(),e.title&&(h=r.enter(`title${o}`),m+=c.move(" "+l),m+=c.move(r.safe(e.title,{before:m,after:l,...c.current()})),m+=c.move(l),h()),m+=c.move(")"),f(),m}function eD(e,t,r){return sw(e,r)?"<":"["}ow.peek=tD;function ow(e,t,r,a){const l=e.referenceType,o=r.enter("linkReference");let c=r.enter("label");const f=r.createTracker(a);let h=f.move("[");const m=r.containerPhrasing(e,{before:h,after:"]",...f.current()});h+=f.move(m+"]["),c();const g=r.stack;r.stack=[],c=r.enter("reference");const x=r.safe(r.associationId(e),{before:h,after:"]",...f.current()});return c(),r.stack=g,o(),l==="full"||!m||m!==x?h+=f.move(x+"]"):l==="shortcut"?h=h.slice(0,-1):h+=f.move("]"),h}function tD(){return"["}function mp(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function nD(e){const t=mp(e),r=e.options.bulletOther;if(!r)return t==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+r+"`) to be different");return r}function rD(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function cw(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function iD(e,t,r,a){const l=r.enter("list"),o=r.bulletCurrent;let c=e.ordered?rD(r):mp(r);const f=e.ordered?c==="."?")":".":nD(r);let h=t&&r.bulletLastUsed?c===r.bulletLastUsed:!1;if(!e.ordered){const g=e.children?e.children[0]:void 0;if((c==="*"||c==="-")&&g&&(!g.children||!g.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(h=!0),cw(r)===c&&g){let x=-1;for(;++x<e.children.length;){const y=e.children[x];if(y&&y.type==="listItem"&&y.children&&y.children[0]&&y.children[0].type==="thematicBreak"){h=!0;break}}}}h&&(c=f),r.bulletCurrent=c;const m=r.containerFlow(e,a);return r.bulletLastUsed=c,r.bulletCurrent=o,l(),m}function aD(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function sD(e,t,r,a){const l=aD(r);let o=r.bulletCurrent||mp(r);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(r.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let c=o.length+1;(l==="tab"||l==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(c=Math.ceil(c/4)*4);const f=r.createTracker(a);f.move(o+" ".repeat(c-o.length)),f.shift(c);const h=r.enter("listItem"),m=r.indentLines(r.containerFlow(e,f.current()),g);return h(),m;function g(x,y,v){return y?(v?"":" ".repeat(c))+x:(v?o:o+" ".repeat(c-o.length))+x}}function lD(e,t,r,a){const l=r.enter("paragraph"),o=r.enter("phrasing"),c=r.containerPhrasing(e,a);return o(),l(),c}const oD=Lo(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function cD(e,t,r,a){return(e.children.some(function(c){return oD(c)})?r.containerPhrasing:r.containerFlow).call(r,e,a)}function uD(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}uw.peek=dD;function uw(e,t,r,a){const l=uD(r),o=r.enter("strong"),c=r.createTracker(a),f=c.move(l+l);let h=c.move(r.containerPhrasing(e,{after:l,before:f,...c.current()}));const m=h.charCodeAt(0),g=Du(a.before.charCodeAt(a.before.length-1),m,l);g.inside&&(h=_o(m)+h.slice(1));const x=h.charCodeAt(h.length-1),y=Du(a.after.charCodeAt(0),x,l);y.inside&&(h=h.slice(0,-1)+_o(x));const v=c.move(l+l);return o(),r.attentionEncodeSurroundingInfo={after:y.outside,before:g.outside},f+h+v}function dD(e,t,r){return r.options.strong||"*"}function fD(e,t,r,a){return r.safe(e.value,a)}function hD(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function mD(e,t,r){const a=(cw(r)+(r.options.ruleSpaces?" ":"")).repeat(hD(r));return r.options.ruleSpaces?a.slice(0,-1):a}const dw={blockquote:I3,break:Xy,code:q3,definition:G3,emphasis:tw,hardBreak:Xy,heading:Q3,html:nw,image:rw,imageReference:iw,inlineCode:aw,link:lw,linkReference:ow,list:iD,listItem:sD,paragraph:lD,root:cD,strong:uw,text:fD,thematicBreak:mD};function pD(){return{enter:{table:gD,tableData:Zy,tableHeader:Zy,tableRow:xD},exit:{codeText:yD,table:bD,tableData:Fh,tableHeader:Fh,tableRow:Fh}}}function gD(e){const t=e._align;this.enter({type:"table",align:t.map(function(r){return r==="none"?null:r}),children:[]},e),this.data.inTable=!0}function bD(e){this.exit(e),this.data.inTable=void 0}function xD(e){this.enter({type:"tableRow",children:[]},e)}function Fh(e){this.exit(e)}function Zy(e){this.enter({type:"tableCell",children:[]},e)}function yD(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,vD));const r=this.stack[this.stack.length-1];r.type,r.value=t,this.exit(e)}function vD(e,t){return t==="|"?t:e}function kD(e){const t=e||{},r=t.tableCellPadding,a=t.tablePipeAlign,l=t.stringLength,o=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
550
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:y,table:c,tableCell:h,tableRow:f}};function c(v,k,E,S){return m(g(v,E,S),v.align)}function f(v,k,E,S){const N=x(v,E,S),O=m([N]);return O.slice(0,O.indexOf(`
|
|
551
|
+
`))}function h(v,k,E,S){const N=E.enter("tableCell"),O=E.enter("phrasing"),A=E.containerPhrasing(v,{...S,before:o,after:o});return O(),N(),A}function m(v,k){return D3(v,{align:k,alignDelimiters:a,padding:r,stringLength:l})}function g(v,k,E){const S=v.children;let N=-1;const O=[],A=k.enter("table");for(;++N<S.length;)O[N]=x(S[N],k,E);return A(),O}function x(v,k,E){const S=v.children;let N=-1;const O=[],A=k.enter("tableRow");for(;++N<S.length;)O[N]=h(S[N],v,k,E);return A(),O}function y(v,k,E){let S=dw.inlineCode(v,k,E);return E.stack.includes("tableCell")&&(S=S.replace(/\|/g,"\\$&")),S}}function wD(){return{exit:{taskListCheckValueChecked:Wy,taskListCheckValueUnchecked:Wy,paragraph:ED}}}function _D(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:ND}}}function Wy(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function ED(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const a=r.children[0];if(a&&a.type==="text"){const l=t.children;let o=-1,c;for(;++o<l.length;){const f=l[o];if(f.type==="paragraph"){c=f;break}}c===r&&(a.value=a.value.slice(1),a.value.length===0?r.children.shift():r.position&&a.position&&typeof a.position.start.offset=="number"&&(a.position.start.column++,a.position.start.offset++,r.position.start=Object.assign({},a.position.start)))}}this.exit(e)}function ND(e,t,r,a){const l=e.children[0],o=typeof e.checked=="boolean"&&l&&l.type==="paragraph",c="["+(e.checked?"x":" ")+"] ",f=r.createTracker(a);o&&f.move(c);let h=dw.listItem(e,t,r,{...a,...f.current()});return o&&(h=h.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,m)),h;function m(g){return g+c}}function SD(){return[i3(),N3(),T3(),pD(),wD()]}function zD(e){return{extensions:[a3(),S3(e),A3(),kD(e),_D()]}}const CD={tokenize:jD,partial:!0},fw={tokenize:DD,partial:!0},hw={tokenize:LD,partial:!0},mw={tokenize:ID,partial:!0},TD={tokenize:BD,partial:!0},pw={name:"wwwAutolink",tokenize:OD,previous:bw},gw={name:"protocolAutolink",tokenize:MD,previous:xw},Di={name:"emailAutolink",tokenize:RD,previous:yw},li={};function AD(){return{text:li}}let Ha=48;for(;Ha<123;)li[Ha]=Di,Ha++,Ha===58?Ha=65:Ha===91&&(Ha=97);li[43]=Di;li[45]=Di;li[46]=Di;li[95]=Di;li[72]=[Di,gw];li[104]=[Di,gw];li[87]=[Di,pw];li[119]=[Di,pw];function RD(e,t,r){const a=this;let l,o;return c;function c(x){return!vm(x)||!yw.call(a,a.previous)||pp(a.events)?r(x):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(x))}function f(x){return vm(x)?(e.consume(x),f):x===64?(e.consume(x),h):r(x)}function h(x){return x===46?e.check(TD,g,m)(x):x===45||x===95||Hn(x)?(o=!0,e.consume(x),h):g(x)}function m(x){return e.consume(x),l=!0,h}function g(x){return o&&l&&Vn(a.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(x)):r(x)}}function OD(e,t,r){const a=this;return l;function l(c){return c!==87&&c!==119||!bw.call(a,a.previous)||pp(a.events)?r(c):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(CD,e.attempt(fw,e.attempt(hw,o),r),r)(c))}function o(c){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(c)}}function MD(e,t,r){const a=this;let l="",o=!1;return c;function c(x){return(x===72||x===104)&&xw.call(a,a.previous)&&!pp(a.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),l+=String.fromCodePoint(x),e.consume(x),f):r(x)}function f(x){if(Vn(x)&&l.length<5)return l+=String.fromCodePoint(x),e.consume(x),f;if(x===58){const y=l.toLowerCase();if(y==="http"||y==="https")return e.consume(x),h}return r(x)}function h(x){return x===47?(e.consume(x),o?m:(o=!0,h)):r(x)}function m(x){return x===null||Ou(x)||Yt(x)||Ya(x)||Xu(x)?r(x):e.attempt(fw,e.attempt(hw,g),r)(x)}function g(x){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(x)}}function jD(e,t,r){let a=0;return l;function l(c){return(c===87||c===119)&&a<3?(a++,e.consume(c),l):c===46&&a===3?(e.consume(c),o):r(c)}function o(c){return c===null?r(c):t(c)}}function DD(e,t,r){let a,l,o;return c;function c(m){return m===46||m===95?e.check(mw,h,f)(m):m===null||Yt(m)||Ya(m)||m!==45&&Xu(m)?h(m):(o=!0,e.consume(m),c)}function f(m){return m===95?a=!0:(l=a,a=void 0),e.consume(m),c}function h(m){return l||a||!o?r(m):t(m)}}function LD(e,t){let r=0,a=0;return l;function l(c){return c===40?(r++,e.consume(c),l):c===41&&a<r?o(c):c===33||c===34||c===38||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===60||c===63||c===93||c===95||c===126?e.check(mw,t,o)(c):c===null||Yt(c)||Ya(c)?t(c):(e.consume(c),l)}function o(c){return c===41&&a++,e.consume(c),l}}function ID(e,t,r){return a;function a(f){return f===33||f===34||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===63||f===95||f===126?(e.consume(f),a):f===38?(e.consume(f),o):f===93?(e.consume(f),l):f===60||f===null||Yt(f)||Ya(f)?t(f):r(f)}function l(f){return f===null||f===40||f===91||Yt(f)||Ya(f)?t(f):a(f)}function o(f){return Vn(f)?c(f):r(f)}function c(f){return f===59?(e.consume(f),a):Vn(f)?(e.consume(f),c):r(f)}}function BD(e,t,r){return a;function a(o){return e.consume(o),l}function l(o){return Hn(o)?r(o):t(o)}}function bw(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Yt(e)}function xw(e){return!Vn(e)}function yw(e){return!(e===47||vm(e))}function vm(e){return e===43||e===45||e===46||e===95||Hn(e)}function pp(e){let t=e.length,r=!1;for(;t--;){const a=e[t][1];if((a.type==="labelLink"||a.type==="labelImage")&&!a._balanced){r=!0;break}if(a._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}const UD={tokenize:VD,partial:!0};function FD(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:$D,continuation:{tokenize:GD},exit:KD}},text:{91:{name:"gfmFootnoteCall",tokenize:qD},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:PD,resolveTo:HD}}}}function PD(e,t,r){const a=this;let l=a.events.length;const o=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let c;for(;l--;){const h=a.events[l][1];if(h.type==="labelImage"){c=h;break}if(h.type==="gfmFootnoteCall"||h.type==="labelLink"||h.type==="label"||h.type==="image"||h.type==="link")break}return f;function f(h){if(!c||!c._balanced)return r(h);const m=$r(a.sliceSerialize({start:c.end,end:a.now()}));return m.codePointAt(0)!==94||!o.includes(m.slice(1))?r(h):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),t(h))}}function HD(e,t){let r=e.length;for(;r--;)if(e[r][1].type==="labelImage"&&e[r][0]==="enter"){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const a={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},l={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};l.end.column++,l.end.offset++,l.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},l.end),end:Object.assign({},e[e.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},f=[e[r+1],e[r+2],["enter",a,t],e[r+3],e[r+4],["enter",l,t],["exit",l,t],["enter",o,t],["enter",c,t],["exit",c,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",a,t]];return e.splice(r,e.length-r+1,...f),e}function qD(e,t,r){const a=this,l=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let o=0,c;return f;function f(x){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(x),e.exit("gfmFootnoteCallLabelMarker"),h}function h(x){return x!==94?r(x):(e.enter("gfmFootnoteCallMarker"),e.consume(x),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",m)}function m(x){if(o>999||x===93&&!c||x===null||x===91||Yt(x))return r(x);if(x===93){e.exit("chunkString");const y=e.exit("gfmFootnoteCallString");return l.includes($r(a.sliceSerialize(y)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(x),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(x)}return Yt(x)||(c=!0),o++,e.consume(x),x===92?g:m}function g(x){return x===91||x===92||x===93?(e.consume(x),o++,m):m(x)}}function $D(e,t,r){const a=this,l=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let o,c=0,f;return h;function h(k){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),m}function m(k){return k===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",g):r(k)}function g(k){if(c>999||k===93&&!f||k===null||k===91||Yt(k))return r(k);if(k===93){e.exit("chunkString");const E=e.exit("gfmFootnoteDefinitionLabelString");return o=$r(a.sliceSerialize(E)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),y}return Yt(k)||(f=!0),c++,e.consume(k),k===92?x:g}function x(k){return k===91||k===92||k===93?(e.consume(k),c++,g):g(k)}function y(k){return k===58?(e.enter("definitionMarker"),e.consume(k),e.exit("definitionMarker"),l.includes(o)||l.push(o),Ct(e,v,"gfmFootnoteDefinitionWhitespace")):r(k)}function v(k){return t(k)}}function GD(e,t,r){return e.check(Do,t,e.attempt(UD,t,r))}function KD(e){e.exit("gfmFootnoteDefinition")}function VD(e,t,r){const a=this;return Ct(e,l,"gfmFootnoteDefinitionIndent",5);function l(o){const c=a.events[a.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?t(o):r(o)}}function YD(e){let r=(e||{}).singleTilde;const a={name:"strikethrough",tokenize:o,resolveAll:l};return r==null&&(r=!0),{text:{126:a},insideSpan:{null:[a]},attentionMarkers:{null:[126]}};function l(c,f){let h=-1;for(;++h<c.length;)if(c[h][0]==="enter"&&c[h][1].type==="strikethroughSequenceTemporary"&&c[h][1]._close){let m=h;for(;m--;)if(c[m][0]==="exit"&&c[m][1].type==="strikethroughSequenceTemporary"&&c[m][1]._open&&c[h][1].end.offset-c[h][1].start.offset===c[m][1].end.offset-c[m][1].start.offset){c[h][1].type="strikethroughSequence",c[m][1].type="strikethroughSequence";const g={type:"strikethrough",start:Object.assign({},c[m][1].start),end:Object.assign({},c[h][1].end)},x={type:"strikethroughText",start:Object.assign({},c[m][1].end),end:Object.assign({},c[h][1].start)},y=[["enter",g,f],["enter",c[m][1],f],["exit",c[m][1],f],["enter",x,f]],v=f.parser.constructs.insideSpan.null;v&&gr(y,y.length,0,Zu(v,c.slice(m+1,h),f)),gr(y,y.length,0,[["exit",x,f],["enter",c[h][1],f],["exit",c[h][1],f],["exit",g,f]]),gr(c,m-1,h-m+3,y),h=m+y.length-2;break}}for(h=-1;++h<c.length;)c[h][1].type==="strikethroughSequenceTemporary"&&(c[h][1].type="data");return c}function o(c,f,h){const m=this.previous,g=this.events;let x=0;return y;function y(k){return m===126&&g[g.length-1][1].type!=="characterEscape"?h(k):(c.enter("strikethroughSequenceTemporary"),v(k))}function v(k){const E=Gs(m);if(k===126)return x>1?h(k):(c.consume(k),x++,v);if(x<2&&!r)return h(k);const S=c.exit("strikethroughSequenceTemporary"),N=Gs(k);return S._open=!N||N===2&&!!E,S._close=!E||E===2&&!!N,f(k)}}}class QD{constructor(){this.map=[]}add(t,r,a){XD(this,t,r,a)}consume(t){if(this.map.sort(function(o,c){return o[0]-c[0]}),this.map.length===0)return;let r=this.map.length;const a=[];for(;r>0;)r-=1,a.push(t.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),t.length=this.map[r][0];a.push(t.slice()),t.length=0;let l=a.pop();for(;l;){for(const o of l)t.push(o);l=a.pop()}this.map.length=0}}function XD(e,t,r,a){let l=0;if(!(r===0&&a.length===0)){for(;l<e.map.length;){if(e.map[l][0]===t){e.map[l][1]+=r,e.map[l][2].push(...a);return}l+=1}e.map.push([t,r,a])}}function ZD(e,t){let r=!1;const a=[];for(;t<e.length;){const l=e[t];if(r){if(l[0]==="enter")l[1].type==="tableContent"&&a.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(l[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=a.length-1;a[o]=a[o]==="left"?"center":"right"}}else if(l[1].type==="tableDelimiterRow")break}else l[0]==="enter"&&l[1].type==="tableDelimiterRow"&&(r=!0);t+=1}return a}function WD(){return{flow:{null:{name:"table",tokenize:JD,resolveAll:eL}}}}function JD(e,t,r){const a=this;let l=0,o=0,c;return f;function f(U){let ee=a.events.length-1;for(;ee>-1;){const se=a.events[ee][1].type;if(se==="lineEnding"||se==="linePrefix")ee--;else break}const te=ee>-1?a.events[ee][1].type:null,_e=te==="tableHead"||te==="tableRow"?M:h;return _e===M&&a.parser.lazy[a.now().line]?r(U):_e(U)}function h(U){return e.enter("tableHead"),e.enter("tableRow"),m(U)}function m(U){return U===124||(c=!0,o+=1),g(U)}function g(U){return U===null?r(U):Ke(U)?o>1?(o=0,a.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(U),e.exit("lineEnding"),v):r(U):pt(U)?Ct(e,g,"whitespace")(U):(o+=1,c&&(c=!1,l+=1),U===124?(e.enter("tableCellDivider"),e.consume(U),e.exit("tableCellDivider"),c=!0,g):(e.enter("data"),x(U)))}function x(U){return U===null||U===124||Yt(U)?(e.exit("data"),g(U)):(e.consume(U),U===92?y:x)}function y(U){return U===92||U===124?(e.consume(U),x):x(U)}function v(U){return a.interrupt=!1,a.parser.lazy[a.now().line]?r(U):(e.enter("tableDelimiterRow"),c=!1,pt(U)?Ct(e,k,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):k(U))}function k(U){return U===45||U===58?S(U):U===124?(c=!0,e.enter("tableCellDivider"),e.consume(U),e.exit("tableCellDivider"),E):$(U)}function E(U){return pt(U)?Ct(e,S,"whitespace")(U):S(U)}function S(U){return U===58?(o+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(U),e.exit("tableDelimiterMarker"),N):U===45?(o+=1,N(U)):U===null||Ke(U)?P(U):$(U)}function N(U){return U===45?(e.enter("tableDelimiterFiller"),O(U)):$(U)}function O(U){return U===45?(e.consume(U),O):U===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(U),e.exit("tableDelimiterMarker"),A):(e.exit("tableDelimiterFiller"),A(U))}function A(U){return pt(U)?Ct(e,P,"whitespace")(U):P(U)}function P(U){return U===124?k(U):U===null||Ke(U)?!c||l!==o?$(U):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(U)):$(U)}function $(U){return r(U)}function M(U){return e.enter("tableRow"),K(U)}function K(U){return U===124?(e.enter("tableCellDivider"),e.consume(U),e.exit("tableCellDivider"),K):U===null||Ke(U)?(e.exit("tableRow"),t(U)):pt(U)?Ct(e,K,"whitespace")(U):(e.enter("data"),z(U))}function z(U){return U===null||U===124||Yt(U)?(e.exit("data"),K(U)):(e.consume(U),U===92?W:z)}function W(U){return U===92||U===124?(e.consume(U),z):z(U)}}function eL(e,t){let r=-1,a=!0,l=0,o=[0,0,0,0],c=[0,0,0,0],f=!1,h=0,m,g,x;const y=new QD;for(;++r<e.length;){const v=e[r],k=v[1];v[0]==="enter"?k.type==="tableHead"?(f=!1,h!==0&&(Jy(y,t,h,m,g),g=void 0,h=0),m={type:"table",start:Object.assign({},k.start),end:Object.assign({},k.end)},y.add(r,0,[["enter",m,t]])):k.type==="tableRow"||k.type==="tableDelimiterRow"?(a=!0,x=void 0,o=[0,0,0,0],c=[0,r+1,0,0],f&&(f=!1,g={type:"tableBody",start:Object.assign({},k.start),end:Object.assign({},k.end)},y.add(r,0,[["enter",g,t]])),l=k.type==="tableDelimiterRow"?2:g?3:1):l&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")?(a=!1,c[2]===0&&(o[1]!==0&&(c[0]=c[1],x=su(y,t,o,l,void 0,x),o=[0,0,0,0]),c[2]=r)):k.type==="tableCellDivider"&&(a?a=!1:(o[1]!==0&&(c[0]=c[1],x=su(y,t,o,l,void 0,x)),o=c,c=[o[1],r,0,0])):k.type==="tableHead"?(f=!0,h=r):k.type==="tableRow"||k.type==="tableDelimiterRow"?(h=r,o[1]!==0?(c[0]=c[1],x=su(y,t,o,l,r,x)):c[1]!==0&&(x=su(y,t,c,l,r,x)),l=0):l&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")&&(c[3]=r)}for(h!==0&&Jy(y,t,h,m,g),y.consume(t.events),r=-1;++r<t.events.length;){const v=t.events[r];v[0]==="enter"&&v[1].type==="table"&&(v[1]._align=ZD(t.events,r))}return e}function su(e,t,r,a,l,o){const c=a===1?"tableHeader":a===2?"tableDelimiter":"tableData",f="tableContent";r[0]!==0&&(o.end=Object.assign({},Is(t.events,r[0])),e.add(r[0],0,[["exit",o,t]]));const h=Is(t.events,r[1]);if(o={type:c,start:Object.assign({},h),end:Object.assign({},h)},e.add(r[1],0,[["enter",o,t]]),r[2]!==0){const m=Is(t.events,r[2]),g=Is(t.events,r[3]),x={type:f,start:Object.assign({},m),end:Object.assign({},g)};if(e.add(r[2],0,[["enter",x,t]]),a!==2){const y=t.events[r[2]],v=t.events[r[3]];if(y[1].end=Object.assign({},v[1].end),y[1].type="chunkText",y[1].contentType="text",r[3]>r[2]+1){const k=r[2]+1,E=r[3]-r[2]-1;e.add(k,E,[])}}e.add(r[3]+1,0,[["exit",x,t]])}return l!==void 0&&(o.end=Object.assign({},Is(t.events,l)),e.add(l,0,[["exit",o,t]]),o=void 0),o}function Jy(e,t,r,a,l){const o=[],c=Is(t.events,r);l&&(l.end=Object.assign({},c),o.push(["exit",l,t])),a.end=Object.assign({},c),o.push(["exit",a,t]),e.add(r+1,0,o)}function Is(e,t){const r=e[t],a=r[0]==="enter"?"start":"end";return r[1][a]}const tL={name:"tasklistCheck",tokenize:rL};function nL(){return{text:{91:tL}}}function rL(e,t,r){const a=this;return l;function l(h){return a.previous!==null||!a._gfmTasklistFirstContentOfListItem?r(h):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(h),e.exit("taskListCheckMarker"),o)}function o(h){return Yt(h)?(e.enter("taskListCheckValueUnchecked"),e.consume(h),e.exit("taskListCheckValueUnchecked"),c):h===88||h===120?(e.enter("taskListCheckValueChecked"),e.consume(h),e.exit("taskListCheckValueChecked"),c):r(h)}function c(h){return h===93?(e.enter("taskListCheckMarker"),e.consume(h),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),f):r(h)}function f(h){return Ke(h)?t(h):pt(h)?e.check({tokenize:iL},t,r)(h):r(h)}}function iL(e,t,r){return Ct(e,a,"whitespace");function a(l){return l===null?r(l):t(l)}}function aL(e){return Ak([AD(),FD(),YD(e),WD(),nL()])}const sL={};function lL(e){const t=this,r=e||sL,a=t.data(),l=a.micromarkExtensions||(a.micromarkExtensions=[]),o=a.fromMarkdownExtensions||(a.fromMarkdownExtensions=[]),c=a.toMarkdownExtensions||(a.toMarkdownExtensions=[]);l.push(aL(r)),o.push(SD()),c.push(zD(r))}const ev=(function(e,t,r){const a=Lo(r);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if(typeof t=="number"){if(t<0||t===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(t=e.children.indexOf(t),t<0)throw new Error("Expected child node or index");for(;++t<e.children.length;)if(a(e.children[t],t,e))return e.children[t]}),Ja=(function(e){if(e==null)return uL;if(typeof e=="string")return cL(e);if(typeof e=="object")return oL(e);if(typeof e=="function")return gp(e);throw new Error("Expected function, string, or array as `test`")});function oL(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=Ja(e[r]);return gp(a);function a(...l){let o=-1;for(;++o<t.length;)if(t[o].apply(this,l))return!0;return!1}}function cL(e){return gp(t);function t(r){return r.tagName===e}}function gp(e){return t;function t(r,a,l){return!!(dL(r)&&e.call(this,r,typeof a=="number"?a:void 0,l||void 0))}}function uL(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function dL(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const tv=/\n/g,nv=/[\t ]+/g,km=Ja("br"),rv=Ja(yL),fL=Ja("p"),iv=Ja("tr"),hL=Ja(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",xL,vL]),vw=Ja(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function mL(e,t){const r=t||{},a="children"in e?e.children:[],l=vw(e),o=_w(e,{whitespace:r.whitespace||"normal"}),c=[];(e.type==="text"||e.type==="comment")&&c.push(...ww(e,{breakBefore:!0,breakAfter:!0}));let f=-1;for(;++f<a.length;)c.push(...kw(a[f],e,{whitespace:o,breakBefore:f?void 0:l,breakAfter:f<a.length-1?km(a[f+1]):l}));const h=[];let m;for(f=-1;++f<c.length;){const g=c[f];typeof g=="number"?m!==void 0&&g>m&&(m=g):g&&(m!==void 0&&m>-1&&h.push(`
|
|
552
|
+
`.repeat(m)||" "),m=-1,h.push(g))}return h.join("")}function kw(e,t,r){return e.type==="element"?pL(e,t,r):e.type==="text"?r.whitespace==="normal"?ww(e,r):gL(e):[]}function pL(e,t,r){const a=_w(e,r),l=e.children||[];let o=-1,c=[];if(hL(e))return c;let f,h;for(km(e)||iv(e)&&ev(t,e,iv)?h=`
|
|
553
|
+
`:fL(e)?(f=2,h=2):vw(e)&&(f=1,h=1);++o<l.length;)c=c.concat(kw(l[o],e,{whitespace:a,breakBefore:o?void 0:f,breakAfter:o<l.length-1?km(l[o+1]):h}));return rv(e)&&ev(t,e,rv)&&c.push(" "),f&&c.unshift(f),h&&c.push(h),c}function ww(e,t){const r=String(e.value),a=[],l=[];let o=0;for(;o<=r.length;){tv.lastIndex=o;const h=tv.exec(r),m=h&&"index"in h?h.index:r.length;a.push(bL(r.slice(o,m).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),o===0?t.breakBefore:!0,m===r.length?t.breakAfter:!0)),o=m+1}let c=-1,f;for(;++c<a.length;)a[c].charCodeAt(a[c].length-1)===8203||c<a.length-1&&a[c+1].charCodeAt(0)===8203?(l.push(a[c]),f=void 0):a[c]?(typeof f=="number"&&l.push(f),l.push(a[c]),f=0):(c===0||c===a.length-1)&&l.push(0);return l}function gL(e){return[String(e.value)]}function bL(e,t,r){const a=[];let l=0,o;for(;l<e.length;){nv.lastIndex=l;const c=nv.exec(e);o=c?c.index:e.length,!l&&!o&&c&&!t&&a.push(""),l!==o&&a.push(e.slice(l,o)),l=c?o+c[0].length:o}return l!==o&&!r&&a.push(""),a.join(" ")}function _w(e,t){if(e.type==="element"){const r=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return r.wrap?"pre-wrap":"pre";case"td":case"th":return r.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}}return t.whitespace}function xL(e){return!!(e.properties||{}).hidden}function yL(e){return e.tagName==="td"||e.tagName==="th"}function vL(e){return e.tagName==="dialog"&&!(e.properties||{}).open}function kL(e){const t=e.regex,r=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),a="decltype\\(auto\\)",l="[a-zA-Z_]\\w*::",c="(?!struct)("+a+"|"+t.optional(l)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",f={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},m={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},g={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},x={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(m,{className:"string"}),{className:"string",begin:/<.*?>/},r,e.C_BLOCK_COMMENT_MODE]},y={className:"title",begin:t.optional(l)+e.IDENT_RE,relevance:0},v=t.optional(l)+e.IDENT_RE+"\\s*\\(",k=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],E=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],S=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],N=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],P={type:E,keyword:k,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:S},$={className:"function.dispatch",relevance:0,keywords:{_hint:N},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},M=[$,x,f,r,e.C_BLOCK_COMMENT_MODE,g,m],K={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:P,contains:M.concat([{begin:/\(/,end:/\)/,keywords:P,contains:M.concat(["self"]),relevance:0}]),relevance:0},z={className:"function",begin:"("+c+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:P,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:P,relevance:0},{begin:v,returnBegin:!0,contains:[y],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[m,g]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:P,relevance:0,contains:[r,e.C_BLOCK_COMMENT_MODE,m,g,f,{begin:/\(/,end:/\)/,keywords:P,relevance:0,contains:["self",r,e.C_BLOCK_COMMENT_MODE,m,g,f]}]},f,r,e.C_BLOCK_COMMENT_MODE,x]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:P,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(K,z,$,M,[x,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:P,contains:["self",f]},{begin:e.IDENT_RE+"::",keywords:P},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function wL(e){const t={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},r=kL(e),a=r.keywords;return a.type=[...a.type,...t.type],a.literal=[...a.literal,...t.literal],a.built_in=[...a.built_in,...t.built_in],a._hints=t._hints,r.name="Arduino",r.aliases=["ino"],r.supersetOf="cpp",r}function _L(e){const t=e.regex,r={},a={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[r]}]};Object.assign(r,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},a]});const l={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},o=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),c={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},f={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,r,l]};l.contains.push(f);const h={match:/\\"/},m={className:"string",begin:/'/,end:/'/},g={match:/\\'/},x={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,r]},y=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],v=e.SHEBANG({binary:`(${y.join("|")})`,relevance:10}),k={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},E=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],S=["true","false"],N={match:/(\/[a-z._-]+)+/},O=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],A=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],P=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],$=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:E,literal:S,built_in:[...O,...A,"set","shopt",...P,...$]},contains:[v,e.SHEBANG(),k,x,o,c,N,f,h,m,g,r]}}function EL(e){const t=e.regex,r=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),a="decltype\\(auto\\)",l="[a-zA-Z_]\\w*::",c="("+a+"|"+t.optional(l)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",f={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},m={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},g={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},x={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(m,{className:"string"}),{className:"string",begin:/<.*?>/},r,e.C_BLOCK_COMMENT_MODE]},y={className:"title",begin:t.optional(l)+e.IDENT_RE,relevance:0},v=t.optional(l)+e.IDENT_RE+"\\s*\\(",S={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},N=[x,f,r,e.C_BLOCK_COMMENT_MODE,g,m],O={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:S,contains:N.concat([{begin:/\(/,end:/\)/,keywords:S,contains:N.concat(["self"]),relevance:0}]),relevance:0},A={begin:"("+c+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:S,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:S,relevance:0},{begin:v,returnBegin:!0,contains:[e.inherit(y,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:S,relevance:0,contains:[r,e.C_BLOCK_COMMENT_MODE,m,g,f,{begin:/\(/,end:/\)/,keywords:S,relevance:0,contains:["self",r,e.C_BLOCK_COMMENT_MODE,m,g,f]}]},f,r,e.C_BLOCK_COMMENT_MODE,x]};return{name:"C",aliases:["h"],keywords:S,disableAutodetect:!0,illegal:"</",contains:[].concat(O,A,N,[x,{begin:e.IDENT_RE+"::",keywords:S},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:x,strings:m,keywords:S}}}function NL(e){const t=e.regex,r=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),a="decltype\\(auto\\)",l="[a-zA-Z_]\\w*::",c="(?!struct)("+a+"|"+t.optional(l)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",f={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},m={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},g={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},x={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(m,{className:"string"}),{className:"string",begin:/<.*?>/},r,e.C_BLOCK_COMMENT_MODE]},y={className:"title",begin:t.optional(l)+e.IDENT_RE,relevance:0},v=t.optional(l)+e.IDENT_RE+"\\s*\\(",k=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],E=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],S=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],N=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],P={type:E,keyword:k,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:S},$={className:"function.dispatch",relevance:0,keywords:{_hint:N},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},M=[$,x,f,r,e.C_BLOCK_COMMENT_MODE,g,m],K={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:P,contains:M.concat([{begin:/\(/,end:/\)/,keywords:P,contains:M.concat(["self"]),relevance:0}]),relevance:0},z={className:"function",begin:"("+c+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:P,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:P,relevance:0},{begin:v,returnBegin:!0,contains:[y],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[m,g]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:P,relevance:0,contains:[r,e.C_BLOCK_COMMENT_MODE,m,g,f,{begin:/\(/,end:/\)/,keywords:P,relevance:0,contains:["self",r,e.C_BLOCK_COMMENT_MODE,m,g,f]}]},f,r,e.C_BLOCK_COMMENT_MODE,x]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:P,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(K,z,$,M,[x,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:P,contains:["self",f]},{begin:e.IDENT_RE+"::",keywords:P},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function SL(e){const t=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],r=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],a=["default","false","null","true"],l=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],o=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],c={keyword:l.concat(o),built_in:t,literal:a},f=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),h={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},m={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},g={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},x=e.inherit(g,{illegal:/\n/}),y={className:"subst",begin:/\{/,end:/\}/,keywords:c},v=e.inherit(y,{illegal:/\n/}),k={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,v]},E={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},y]},S=e.inherit(E,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},v]});y.contains=[E,k,g,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,h,e.C_BLOCK_COMMENT_MODE],v.contains=[S,k,x,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,h,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const N={variants:[m,E,k,g,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},O={begin:"<",end:">",contains:[{beginKeywords:"in out"},f]},A=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",P={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:c,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},N,h,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},f,O,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[f,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[f,O,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+A+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:c,contains:[{beginKeywords:r.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,O],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,relevance:0,contains:[N,h,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},P]}}const zL=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),CL=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],TL=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],AL=[...CL,...TL],RL=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),OL=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),ML=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),jL=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function DL(e){const t=e.regex,r=zL(e),a={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},l="and or not only",o=/@-?\w[\w]*(-\w+)*/,c="[a-zA-Z-][a-zA-Z0-9_-]*",f=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[r.BLOCK_COMMENT,a,r.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+c,relevance:0},r.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+OL.join("|")+")"},{begin:":(:)?("+ML.join("|")+")"}]},r.CSS_VARIABLE,{className:"attribute",begin:"\\b("+jL.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[r.BLOCK_COMMENT,r.HEXCOLOR,r.IMPORTANT,r.CSS_NUMBER_MODE,...f,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...f,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},r.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:o},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:l,attribute:RL.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...f,r.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+AL.join("|")+")\\b"}]}}function LL(e){const t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function IL(e){const o={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:o,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:o,illegal:/["']/}]}]}}function BL(e){const t=e.regex,r=/[_A-Za-z][_0-9A-Za-z]*/;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:t.concat(r,t.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}function UL(e){const t=e.regex,r={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},a=e.COMMENT();a.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const l={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},o={className:"literal",begin:/\bon|off|true|false|yes|no\b/},c={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},f={begin:/\[/,end:/\]/,contains:[a,o,l,c,r,"self"],relevance:0},h=/[A-Za-z0-9_-]+/,m=/"(\\"|[^"])*"/,g=/'[^']*'/,x=t.either(h,m,g),y=t.concat(x,"(\\s*\\.\\s*",x,")*",t.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[a,{className:"section",begin:/\[+/,end:/\]+/},{begin:y,className:"attr",starts:{end:/$/,contains:[a,f,o,l,c,r]}}]}}var Bs="[0-9](_*[0-9])*",lu=`\\.(${Bs})`,ou="[0-9a-fA-F](_*[0-9a-fA-F])*",av={className:"number",variants:[{begin:`(\\b(${Bs})((${lu})|\\.)?|(${lu}))[eE][+-]?(${Bs})[fFdD]?\\b`},{begin:`\\b(${Bs})((${lu})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${lu})[fFdD]?\\b`},{begin:`\\b(${Bs})[fFdD]\\b`},{begin:`\\b0[xX]((${ou})\\.?|(${ou})?\\.(${ou}))[pP][+-]?(${Bs})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${ou})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function Ew(e,t,r){return r===-1?"":e.replace(t,a=>Ew(e,t,r-1))}function FL(e){const t=e.regex,r="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",a=r+Ew("(?:<"+r+"~~~(?:\\s*,\\s*"+r+"~~~)*>)?",/~~~/g,2),h={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},m={className:"meta",begin:"@"+r,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},g={className:"params",begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:h,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,r),/\s+/,r,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,r],className:{1:"keyword",3:"title.class"},contains:[g,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+a+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:h,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:[m,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,av,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},av,m]}}const sv="[A-Za-z$_][0-9A-Za-z$_]*",PL=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],HL=["true","false","null","undefined","NaN","Infinity"],Nw=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],Sw=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],zw=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],qL=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],$L=[].concat(zw,Nw,Sw);function GL(e){const t=e.regex,r=(V,{after:fe})=>{const R="</"+V[0].slice(1);return V.input.indexOf(R,fe)!==-1},a=sv,l={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,c={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(V,fe)=>{const R=V[0].length+V.index,j=V.input[R];if(j==="<"||j===","){fe.ignoreMatch();return}j===">"&&(r(V,{after:R})||fe.ignoreMatch());let I;const C=V.input.substring(R);if(I=C.match(/^\s*=/)){fe.ignoreMatch();return}if((I=C.match(/^\s+extends\s+/))&&I.index===0){fe.ignoreMatch();return}}},f={$pattern:sv,keyword:PL,literal:HL,built_in:$L,"variable.language":qL},h="[0-9](_?[0-9])*",m=`\\.(${h})`,g="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",x={className:"number",variants:[{begin:`(\\b(${g})((${m})|\\.)?|(${m}))[eE][+-]?(${h})\\b`},{begin:`\\b(${g})\\b((${m})\\b|\\.)?|(${m})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},y={className:"subst",begin:"\\$\\{",end:"\\}",keywords:f,contains:[]},v={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"xml"}},k={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"css"}},E={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"graphql"}},S={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,y]},O={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:a+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},A=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,k,E,S,{match:/\$\d+/},x];y.contains=A.concat({begin:/\{/,end:/\}/,keywords:f,contains:["self"].concat(A)});const P=[].concat(O,y.contains),$=P.concat([{begin:/(\s*)\(/,end:/\)/,keywords:f,contains:["self"].concat(P)}]),M={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:$},K={variants:[{match:[/class/,/\s+/,a,/\s+/,/extends/,/\s+/,t.concat(a,"(",t.concat(/\./,a),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,a],scope:{1:"keyword",3:"title.class"}}]},z={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Nw,...Sw]}},W={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},U={variants:[{match:[/function/,/\s+/,a,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[M],illegal:/%/},ee={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function te(V){return t.concat("(?!",V.join("|"),")")}const _e={match:t.concat(/\b/,te([...zw,"super","import"].map(V=>`${V}\\s*\\(`)),a,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},se={begin:t.concat(/\./,t.lookahead(t.concat(a,/(?![0-9A-Za-z$_(])/))),end:a,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},X={match:[/get|set/,/\s+/,a,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},M]},F="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",ne={match:[/const|var|let/,/\s+/,a,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(F)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[M]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:f,exports:{PARAMS_CONTAINS:$,CLASS_REFERENCE:z},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),W,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,k,E,S,O,{match:/\$\d+/},x,z,{scope:"attr",match:a+t.lookahead(":"),relevance:0},ne,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[O,e.REGEXP_MODE,{className:"function",begin:F,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:$}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:l.begin,end:l.end},{match:o},{begin:c.begin,"on:begin":c.isTrulyOpeningTag,end:c.end}],subLanguage:"xml",contains:[{begin:c.begin,end:c.end,skip:!0,contains:["self"]}]}]},U,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[M,e.inherit(e.TITLE_MODE,{begin:a,className:"title.function"})]},{match:/\.\.\./,relevance:0},se,{match:"\\$"+a,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[M]},_e,ee,K,X,{match:/\$[(.]/}]}}function KL(e){const t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},r={match:/[{}[\],:]/,className:"punctuation",relevance:0},a=["true","false","null"],l={scope:"literal",beginKeywords:a.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:a},contains:[t,r,e.QUOTE_STRING_MODE,l,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var Us="[0-9](_*[0-9])*",cu=`\\.(${Us})`,uu="[0-9a-fA-F](_*[0-9a-fA-F])*",VL={className:"number",variants:[{begin:`(\\b(${Us})((${cu})|\\.)?|(${cu}))[eE][+-]?(${Us})[fFdD]?\\b`},{begin:`\\b(${Us})((${cu})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${cu})[fFdD]?\\b`},{begin:`\\b(${Us})[fFdD]\\b`},{begin:`\\b0[xX]((${uu})\\.?|(${uu})?\\.(${uu}))[pP][+-]?(${Us})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${uu})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function YL(e){const t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},r={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},a={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},l={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},o={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},c={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[o,l]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,o,l]}]};l.contains.push(c);const f={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},h={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(c,{className:"string"}),"self"]}]},m=VL,g=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),x={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},y=x;return y.variants[1].contains=[x],x.variants[1].contains=[y],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,g,r,a,f,h,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[x,e.C_LINE_COMMENT_MODE,g],relevance:0},e.C_LINE_COMMENT_MODE,g,f,h,c,e.C_NUMBER_MODE]},g]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},f,h]},c,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
|
|
554
|
+
`},m]}}const QL=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),XL=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],ZL=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],WL=[...XL,...ZL],JL=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),Cw=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),Tw=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),eI=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),tI=Cw.concat(Tw).sort().reverse();function nI(e){const t=QL(e),r=tI,a="and or not only",l="[\\w-]+",o="("+l+"|@\\{"+l+"\\})",c=[],f=[],h=function(A){return{className:"string",begin:"~?"+A+".*?"+A}},m=function(A,P,$){return{className:A,begin:P,relevance:$}},g={$pattern:/[a-z-]+/,keyword:a,attribute:JL.join(" ")},x={begin:"\\(",end:"\\)",contains:f,keywords:g,relevance:0};f.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,h("'"),h('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,x,m("variable","@@?"+l,10),m("variable","@\\{"+l+"\\}"),m("built_in","~?`[^`]*?`"),{className:"attribute",begin:l+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const y=f.concat({begin:/\{/,end:/\}/,contains:c}),v={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(f)},k={begin:o+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+eI.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:f}}]},E={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:g,returnEnd:!0,contains:f,relevance:0}},S={className:"variable",variants:[{begin:"@"+l+"\\s*:",relevance:15},{begin:"@"+l}],starts:{end:"[;}]",returnEnd:!0,contains:y}},N={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:o,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,v,m("keyword","all\\b"),m("variable","@\\{"+l+"\\}"),{begin:"\\b("+WL.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,m("selector-tag",o,0),m("selector-id","#"+o),m("selector-class","\\."+o,0),m("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+Cw.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+Tw.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:y},{begin:"!important"},t.FUNCTION_DISPATCH]},O={begin:l+`:(:)?(${r.join("|")})`,returnBegin:!0,contains:[N]};return c.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,E,S,O,k,N,v,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:c}}function rI(e){const t="\\[=*\\[",r="\\]=*\\]",a={begin:t,end:r,contains:["self"]},l=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,r,{contains:[a],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:l.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:l}].concat(l)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:r,contains:[a],relevance:5}])}}function iI(e){const t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},r={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t]},a={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[t,r]},l={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},o={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},c={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[t]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[e.HASH_COMMENT_MODE,t,r,a,l,o,c]}}function aI(e){const t=e.regex,r={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},a={begin:"^[-\\*]{3,}",end:"$"},l={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},o={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},c={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},f=/[A-Za-z][A-Za-z0-9+.-]*/,h={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,f,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},m={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},g={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},x=e.inherit(m,{contains:[]}),y=e.inherit(g,{contains:[]});m.contains.push(y),g.contains.push(x);let v=[r,h];return[m,g,x,y].forEach(N=>{N.contains=N.contains.concat(v)}),v=v.concat(m,g),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:v},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:v}]}]},r,o,m,g,{className:"quote",begin:"^>\\s+",contains:v,end:"$"},l,a,h,c,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function sI(e){const t={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},r=/[a-zA-Z@][a-zA-Z0-9_]*/,f={"variable.language":["this","super"],$pattern:r,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},h={$pattern:r,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:f,illegal:"</",contains:[t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+h.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:h,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function lI(e){const t=e.regex,r=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],a=/[dualxmsipngr]{0,12}/,l={$pattern:/[\w.]+/,keyword:r.join(" ")},o={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:l},c={begin:/->\{/,end:/\}/},f={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},h={scope:"variable",variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[f]},m={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},g=[e.BACKSLASH_ESCAPE,o,h],x=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],y=(E,S,N="\\1")=>{const O=N==="\\1"?N:t.concat(N,S);return t.concat(t.concat("(?:",E,")"),S,/(?:\\.|[^\\\/])*?/,O,/(?:\\.|[^\\\/])*?/,N,a)},v=(E,S,N)=>t.concat(t.concat("(?:",E,")"),S,/(?:\\.|[^\\\/])*?/,N,a),k=[h,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),c,{className:"string",contains:g,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},m,{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:y("s|tr|y",t.either(...x,{capture:!0}))},{begin:y("s|tr|y","\\(","\\)")},{begin:y("s|tr|y","\\[","\\]")},{begin:y("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:v("(?:m|qr)?",/\//,/\//)},{begin:v("m|qr",t.either(...x,{capture:!0}),/\1/)},{begin:v("m|qr",/\(/,/\)/)},{begin:v("m|qr",/\[/,/\]/)},{begin:v("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,f]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,f,m]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return o.contains=k,c.contains=k,{name:"Perl",aliases:["pl","pm"],keywords:l,contains:k}}function oI(e){const t=e.regex,r=/(?![A-Za-z0-9])(?![$])/,a=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,r),l=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,r),o=t.concat(/[A-Z]+/,r),c={scope:"variable",match:"\\$+"+a},f={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},h={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},m=e.inherit(e.APOS_STRING_MODE,{illegal:null}),g=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(h)}),x={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(h),"on:begin":(se,X)=>{X.data._beginMatch=se[1]||se[2]},"on:end":(se,X)=>{X.data._beginMatch!==se[1]&&X.ignoreMatch()}},y=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),v=`[
|
|
555
|
+
]`,k={scope:"string",variants:[g,m,x,y]},E={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},S=["false","null","true"],N=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],O=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],P={keyword:N,literal:(se=>{const X=[];return se.forEach(F=>{X.push(F),F.toLowerCase()===F?X.push(F.toUpperCase()):X.push(F.toLowerCase())}),X})(S),built_in:O},$=se=>se.map(X=>X.replace(/\|\d+$/,"")),M={variants:[{match:[/new/,t.concat(v,"+"),t.concat("(?!",$(O).join("\\b|"),"\\b)"),l],scope:{1:"keyword",4:"title.class"}}]},K=t.concat(a,"\\b(?!\\()"),z={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),K],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[l,t.concat(/::/,t.lookahead(/(?!class\b)/)),K],scope:{1:"title.class",3:"variable.constant"}},{match:[l,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[l,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},W={scope:"attr",match:t.concat(a,t.lookahead(":"),t.lookahead(/(?!::)/))},U={relevance:0,begin:/\(/,end:/\)/,keywords:P,contains:[W,c,z,e.C_BLOCK_COMMENT_MODE,k,E,M]},ee={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",$(N).join("\\b|"),"|",$(O).join("\\b|"),"\\b)"),a,t.concat(v,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[U]};U.contains.push(ee);const te=[W,z,e.C_BLOCK_COMMENT_MODE,k,E,M],_e={begin:t.concat(/#\[\s*\\?/,t.either(l,o)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:S,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:S,keyword:["new","array"]},contains:["self",...te]},...te,{scope:"meta",variants:[{match:l},{match:o}]}]};return{case_insensitive:!1,keywords:P,contains:[_e,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},f,{scope:"variable.language",match:/\$this\b/},c,ee,z,{match:[/const/,/\s/,a],scope:{1:"keyword",3:"variable.constant"}},M,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:P,contains:["self",_e,c,z,e.C_BLOCK_COMMENT_MODE,k,E]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},k,E]}}function cI(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function uI(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function dI(e){const t=e.regex,r=/[\p{XID_Start}_]\p{XID_Continue}*/u,a=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],f={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:a,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},h={className:"meta",begin:/^(>>>|\.\.\.) /},m={className:"subst",begin:/\{/,end:/\}/,keywords:f,illegal:/#/},g={begin:/\{\{/,relevance:0},x={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,h],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,h],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,h,g,m]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,h,g,m]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,g,m]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,g,m]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},y="[0-9](_?[0-9])*",v=`(\\b(${y}))?\\.(${y})|\\b(${y})\\.`,k=`\\b|${a.join("|")}`,E={className:"number",relevance:0,variants:[{begin:`(\\b(${y})|(${v}))[eE][+-]?(${y})[jJ]?(?=${k})`},{begin:`(${v})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${k})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${k})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${k})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${k})`},{begin:`\\b(${y})[jJ](?=${k})`}]},S={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:f,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},N={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:["self",h,E,x,e.HASH_COMMENT_MODE]}]};return m.contains=[x,E,h],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:f,illegal:/(<\/|\?)|=>/,contains:[h,E,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},x,S,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,r],scope:{1:"keyword",3:"title.function"},contains:[N]},{variants:[{match:[/\bclass/,/\s+/,r,/\s*/,/\(\s*/,r,/\s*\)/]},{match:[/\bclass/,/\s+/,r]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[E,N,x]}]}}function fI(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function hI(e){const t=e.regex,r=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,a=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),l=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,o=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:r,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:r},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[l,a]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,a]},{scope:{1:"punctuation",2:"number"},match:[o,a]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,a]}]},{scope:{3:"operator"},match:[r,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:l},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:o},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function mI(e){const t=e.regex,r="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",a=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),l=t.concat(a,/(::\w+)*/),c={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},f={className:"doctag",begin:"@[A-Za-z]+"},h={begin:"#<",end:">"},m=[e.COMMENT("#","$",{contains:[f]}),e.COMMENT("^=begin","^=end",{contains:[f],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],g={className:"subst",begin:/#\{/,end:/\}/,keywords:c},x={className:"string",contains:[e.BACKSLASH_ESCAPE,g],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,g]})]}]},y="[1-9](_?[0-9])*|0",v="[0-9](_?[0-9])*",k={className:"number",relevance:0,variants:[{begin:`\\b(${y})(\\.(${v}))?([eE][+-]?(${v})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},E={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:c}]},M=[x,{variants:[{match:[/class\s+/,l,/\s+<\s+/,l]},{match:[/\b(class|module)\s+/,l]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:c},{match:[/(include|extend)\s+/,l],scope:{2:"title.class"},keywords:c},{relevance:0,match:[l,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:a,scope:"title.class"},{match:[/def/,/\s+/,r],scope:{1:"keyword",3:"title.function"},contains:[E]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[x,{begin:r}],relevance:0},k,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:c},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,g],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(h,m),relevance:0}].concat(h,m);g.contains=M,E.contains=M;const U=[{begin:/^\s*=>/,starts:{end:"$",contains:M}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:c,contains:M}}];return m.unshift(h),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:c,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(U).concat(m).concat(M)}}function pI(e){const t=e.regex,r=/(r#)?/,a=t.concat(r,e.UNDERSCORE_IDENT_RE),l=t.concat(r,e.IDENT_RE),o={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,l,t.lookahead(/\s*\(/))},c="([ui](8|16|32|64|128|size)|f(32|64))?",f=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],h=["true","false","Some","None","Ok","Err"],m=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],g=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:g,keyword:f,literal:h,built_in:m},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+c},{begin:"\\b0o([0-7_]+)"+c},{begin:"\\b0x([A-Fa-f0-9_]+)"+c},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+c}],relevance:0},{begin:[/fn/,/\s+/,a],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,a],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,a,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,a],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,a],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:m,type:g}},{className:"punctuation",begin:"->"},o]}}const gI=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),bI=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],xI=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],yI=[...bI,...xI],vI=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),kI=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),wI=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),_I=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function EI(e){const t=gI(e),r=wI,a=kI,l="@[a-z-]+",o="and or not only",f={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+yI.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+a.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+r.join("|")+")"},f,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+_I.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,f,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:l,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:o,attribute:vI.join(" ")},contains:[{begin:l,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},f,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function NI(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function SI(e){const t=e.regex,r=e.COMMENT("--","$"),a={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},l={begin:/"/,end:/"/,contains:[{match:/""/}]},o=["true","false","unknown"],c=["double precision","large object","with timezone","without timezone"],f=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],h=["add","asc","collation","desc","final","first","last","view"],m=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],g=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],x=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],y=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],v=g,k=[...m,...h].filter($=>!g.includes($)),E={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},S={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},N={match:t.concat(/\b/,t.either(...v),/\s*\(/),relevance:0,keywords:{built_in:v}};function O($){return t.concat(/\b/,t.either(...$.map(M=>M.replace(/\s+/,"\\s+"))),/\b/)}const A={scope:"keyword",match:O(y),relevance:0};function P($,{exceptions:M,when:K}={}){const z=K;return M=M||[],$.map(W=>W.match(/\|\d+$/)||M.includes(W)?W:z(W)?`${W}|0`:W)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:P(k,{when:$=>$.length<3}),literal:o,type:f,built_in:x},contains:[{scope:"type",match:O(c)},A,N,E,a,l,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,r,S]}}function Aw(e){return e?typeof e=="string"?e:e.source:null}function to(e){return Kt("(?=",e,")")}function Kt(...e){return e.map(r=>Aw(r)).join("")}function zI(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function Gn(...e){return"("+(zI(e).capture?"":"?:")+e.map(a=>Aw(a)).join("|")+")"}const bp=e=>Kt(/\b/,e,/\w$/.test(e)?/\b/:/\B/),CI=["Protocol","Type"].map(bp),lv=["init","self"].map(bp),TI=["Any","Self"],Ph=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],ov=["false","nil","true"],AI=["assignment","associativity","higherThan","left","lowerThan","none","right"],RI=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],cv=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],Rw=Gn(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),Ow=Gn(Rw,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),Hh=Kt(Rw,Ow,"*"),Mw=Gn(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),Lu=Gn(Mw,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),Jr=Kt(Mw,Lu,"*"),du=Kt(/[A-Z]/,Lu,"*"),OI=["attached","autoclosure",Kt(/convention\(/,Gn("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",Kt(/objc\(/,Jr,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],MI=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function jI(e){const t={match:/\s+/,relevance:0},r=e.COMMENT("/\\*","\\*/",{contains:["self"]}),a=[e.C_LINE_COMMENT_MODE,r],l={match:[/\./,Gn(...CI,...lv)],className:{2:"keyword"}},o={match:Kt(/\./,Gn(...Ph)),relevance:0},c=Ph.filter(ot=>typeof ot=="string").concat(["_|0"]),f=Ph.filter(ot=>typeof ot!="string").concat(TI).map(bp),h={variants:[{className:"keyword",match:Gn(...f,...lv)}]},m={$pattern:Gn(/\b\w+/,/#\w+/),keyword:c.concat(RI),literal:ov},g=[l,o,h],x={match:Kt(/\./,Gn(...cv)),relevance:0},y={className:"built_in",match:Kt(/\b/,Gn(...cv),/(?=\()/)},v=[x,y],k={match:/->/,relevance:0},E={className:"operator",relevance:0,variants:[{match:Hh},{match:`\\.(\\.|${Ow})+`}]},S=[k,E],N="([0-9]_*)+",O="([0-9a-fA-F]_*)+",A={className:"number",relevance:0,variants:[{match:`\\b(${N})(\\.(${N}))?([eE][+-]?(${N}))?\\b`},{match:`\\b0x(${O})(\\.(${O}))?([pP][+-]?(${N}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},P=(ot="")=>({className:"subst",variants:[{match:Kt(/\\/,ot,/[0\\tnr"']/)},{match:Kt(/\\/,ot,/u\{[0-9a-fA-F]{1,8}\}/)}]}),$=(ot="")=>({className:"subst",match:Kt(/\\/,ot,/[\t ]*(?:[\r\n]|\r\n)/)}),M=(ot="")=>({className:"subst",label:"interpol",begin:Kt(/\\/,ot,/\(/),end:/\)/}),K=(ot="")=>({begin:Kt(ot,/"""/),end:Kt(/"""/,ot),contains:[P(ot),$(ot),M(ot)]}),z=(ot="")=>({begin:Kt(ot,/"/),end:Kt(/"/,ot),contains:[P(ot),M(ot)]}),W={className:"string",variants:[K(),K("#"),K("##"),K("###"),z(),z("#"),z("##"),z("###")]},U=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],ee={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:U},te=ot=>{const _n=Kt(ot,/\//),Yn=Kt(/\//,ot);return{begin:_n,end:Yn,contains:[...U,{scope:"comment",begin:`#(?!.*${Yn})`,end:/$/}]}},_e={scope:"regexp",variants:[te("###"),te("##"),te("#"),ee]},se={match:Kt(/`/,Jr,/`/)},X={className:"variable",match:/\$\d+/},F={className:"variable",match:`\\$${Lu}+`},ne=[se,X,F],V={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:MI,contains:[...S,A,W]}]}},fe={scope:"keyword",match:Kt(/@/,Gn(...OI),to(Gn(/\(/,/\s+/)))},R={scope:"meta",match:Kt(/@/,Jr)},j=[V,fe,R],I={match:to(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:Kt(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,Lu,"+")},{className:"type",match:du,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:Kt(/\s+&\s+/,to(du)),relevance:0}]},C={begin:/</,end:/>/,keywords:m,contains:[...a,...g,...j,k,I]};I.contains.push(C);const ue={match:Kt(Jr,/\s*:/),keywords:"_|0",relevance:0},be={begin:/\(/,end:/\)/,relevance:0,keywords:m,contains:["self",ue,...a,_e,...g,...v,...S,A,W,...ne,...j,I]},ye={begin:/</,end:/>/,keywords:"repeat each",contains:[...a,I]},le={begin:Gn(to(Kt(Jr,/\s*:/)),to(Kt(Jr,/\s+/,Jr,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:Jr}]},xe={begin:/\(/,end:/\)/,keywords:m,contains:[le,...a,...g,...S,A,W,...j,I,be],endsParent:!0,illegal:/["']/},pe={match:[/(func|macro)/,/\s+/,Gn(se.match,Jr,Hh)],className:{1:"keyword",3:"title.function"},contains:[ye,xe,t],illegal:[/\[/,/%/]},Ue={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[ye,xe,t],illegal:/\[|%/},Re={match:[/operator/,/\s+/,Hh],className:{1:"keyword",3:"title"}},Tt={begin:[/precedencegroup/,/\s+/,du],className:{1:"keyword",3:"title"},contains:[I],keywords:[...AI,...ov],end:/}/},tt={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},gt={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},_t={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,Jr,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:m,contains:[ye,...g,{begin:/:/,end:/\{/,keywords:m,contains:[{scope:"title.class.inherited",match:du},...g],relevance:0}]};for(const ot of W.variants){const _n=ot.contains.find(br=>br.label==="interpol");_n.keywords=m;const Yn=[...g,...v,...S,A,W,...ne];_n.contains=[...Yn,{begin:/\(/,end:/\)/,contains:["self",...Yn]}]}return{name:"Swift",keywords:m,contains:[...a,pe,Ue,tt,gt,_t,Re,Tt,{beginKeywords:"import",end:/$/,contains:[...a],relevance:0},_e,...g,...v,...S,A,W,...ne,...j,I,be]}}const Iu="[A-Za-z$_][0-9A-Za-z$_]*",jw=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],Dw=["true","false","null","undefined","NaN","Infinity"],Lw=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],Iw=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Bw=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Uw=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Fw=[].concat(Bw,Lw,Iw);function DI(e){const t=e.regex,r=(V,{after:fe})=>{const R="</"+V[0].slice(1);return V.input.indexOf(R,fe)!==-1},a=Iu,l={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,c={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(V,fe)=>{const R=V[0].length+V.index,j=V.input[R];if(j==="<"||j===","){fe.ignoreMatch();return}j===">"&&(r(V,{after:R})||fe.ignoreMatch());let I;const C=V.input.substring(R);if(I=C.match(/^\s*=/)){fe.ignoreMatch();return}if((I=C.match(/^\s+extends\s+/))&&I.index===0){fe.ignoreMatch();return}}},f={$pattern:Iu,keyword:jw,literal:Dw,built_in:Fw,"variable.language":Uw},h="[0-9](_?[0-9])*",m=`\\.(${h})`,g="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",x={className:"number",variants:[{begin:`(\\b(${g})((${m})|\\.)?|(${m}))[eE][+-]?(${h})\\b`},{begin:`\\b(${g})\\b((${m})\\b|\\.)?|(${m})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},y={className:"subst",begin:"\\$\\{",end:"\\}",keywords:f,contains:[]},v={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"xml"}},k={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"css"}},E={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"graphql"}},S={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,y]},O={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:a+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},A=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,k,E,S,{match:/\$\d+/},x];y.contains=A.concat({begin:/\{/,end:/\}/,keywords:f,contains:["self"].concat(A)});const P=[].concat(O,y.contains),$=P.concat([{begin:/(\s*)\(/,end:/\)/,keywords:f,contains:["self"].concat(P)}]),M={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:$},K={variants:[{match:[/class/,/\s+/,a,/\s+/,/extends/,/\s+/,t.concat(a,"(",t.concat(/\./,a),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,a],scope:{1:"keyword",3:"title.class"}}]},z={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Lw,...Iw]}},W={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},U={variants:[{match:[/function/,/\s+/,a,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[M],illegal:/%/},ee={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function te(V){return t.concat("(?!",V.join("|"),")")}const _e={match:t.concat(/\b/,te([...Bw,"super","import"].map(V=>`${V}\\s*\\(`)),a,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},se={begin:t.concat(/\./,t.lookahead(t.concat(a,/(?![0-9A-Za-z$_(])/))),end:a,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},X={match:[/get|set/,/\s+/,a,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},M]},F="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",ne={match:[/const|var|let/,/\s+/,a,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(F)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[M]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:f,exports:{PARAMS_CONTAINS:$,CLASS_REFERENCE:z},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),W,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,k,E,S,O,{match:/\$\d+/},x,z,{scope:"attr",match:a+t.lookahead(":"),relevance:0},ne,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[O,e.REGEXP_MODE,{className:"function",begin:F,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:$}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:l.begin,end:l.end},{match:o},{begin:c.begin,"on:begin":c.isTrulyOpeningTag,end:c.end}],subLanguage:"xml",contains:[{begin:c.begin,end:c.end,skip:!0,contains:["self"]}]}]},U,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[M,e.inherit(e.TITLE_MODE,{begin:a,className:"title.function"})]},{match:/\.\.\./,relevance:0},se,{match:"\\$"+a,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[M]},_e,ee,K,X,{match:/\$[(.]/}]}}function LI(e){const t=e.regex,r=DI(e),a=Iu,l=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],o={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},c={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:l},contains:[r.exports.CLASS_REFERENCE]},f={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},h=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],m={$pattern:Iu,keyword:jw.concat(h),literal:Dw,built_in:Fw.concat(l),"variable.language":Uw},g={className:"meta",begin:"@"+a},x=(E,S,N)=>{const O=E.contains.findIndex(A=>A.label===S);if(O===-1)throw new Error("can not find mode to replace");E.contains.splice(O,1,N)};Object.assign(r.keywords,m),r.exports.PARAMS_CONTAINS.push(g);const y=r.contains.find(E=>E.scope==="attr"),v=Object.assign({},y,{match:t.concat(a,t.lookahead(/\s*\?:/))});r.exports.PARAMS_CONTAINS.push([r.exports.CLASS_REFERENCE,y,v]),r.contains=r.contains.concat([g,o,c,v]),x(r,"shebang",e.SHEBANG()),x(r,"use_strict",f);const k=r.contains.find(E=>E.label==="func.def");return k.relevance=0,Object.assign(r,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),r}function II(e){const t=e.regex,r={className:"string",begin:/"(""|[^/n])"C\b/},a={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},l=/\d{1,2}\/\d{1,2}\/\d{4}/,o=/\d{4}-\d{1,2}-\d{1,2}/,c=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,f=/\d{1,2}(:\d{1,2}){1,2}/,h={className:"literal",variants:[{begin:t.concat(/# */,t.either(o,l),/ *#/)},{begin:t.concat(/# */,f,/ *#/)},{begin:t.concat(/# */,c,/ *#/)},{begin:t.concat(/# */,t.either(o,l),/ +/,t.either(c,f),/ *#/)}]},m={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},g={className:"label",begin:/^\w+:/},x=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),y=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[r,a,h,m,g,x,y,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[y]}]}}function BI(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");const r=e.COMMENT(/;;/,/$/),a=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],l={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},o={className:"variable",begin:/\$[\w_]+/},c={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},f={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},h={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},m={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:a},contains:[r,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},o,c,l,e.QUOTE_STRING_MODE,h,m,f]}}function UI(e){const t=e.regex,r=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),a=/[\p{L}0-9._:-]+/u,l={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},o={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},c=e.inherit(o,{begin:/\(/,end:/\)/}),f=e.inherit(e.APOS_STRING_MODE,{className:"string"}),h=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),m={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:a,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[l]},{begin:/'/,end:/'/,contains:[l]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[o,h,f,c,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[o,c,h,f]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},l,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[h]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[m],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[m],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(r,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:r,relevance:0,starts:m}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(r,/>/))),contains:[{className:"name",begin:r,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function FI(e){const t="true false yes no null",r="[\\w#;/?:@&=+$,.~*'()[\\]]+",a={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},l={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},o={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},c={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,l]},f=e.inherit(c,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),y={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},v={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},k={begin:/\{/,end:/\}/,contains:[v],illegal:"\\n",relevance:0},E={begin:"\\[",end:"\\]",contains:[v],illegal:"\\n",relevance:0},S=[a,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+r},{className:"type",begin:"!<"+r+">"},{className:"type",begin:"!"+r},{className:"type",begin:"!!"+r},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},y,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},k,E,o,c],N=[...S];return N.pop(),N.push(f),v.contains=N,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:S}}const PI={arduino:wL,bash:_L,c:EL,cpp:NL,csharp:SL,css:DL,diff:LL,go:IL,graphql:BL,ini:UL,java:FL,javascript:GL,json:KL,kotlin:YL,less:nI,lua:rI,makefile:iI,markdown:aI,objectivec:sI,perl:lI,php:oI,"php-template":cI,plaintext:uI,python:dI,"python-repl":fI,r:hI,ruby:mI,rust:pI,scss:EI,shell:NI,sql:SI,swift:jI,typescript:LI,vbnet:II,wasm:BI,xml:UI,yaml:FI};var qh,uv;function HI(){if(uv)return qh;uv=1;function e(B){return B instanceof Map?B.clear=B.delete=B.set=function(){throw new Error("map is read-only")}:B instanceof Set&&(B.add=B.clear=B.delete=function(){throw new Error("set is read-only")}),Object.freeze(B),Object.getOwnPropertyNames(B).forEach(ce=>{const ze=B[ce],Qe=typeof ze;(Qe==="object"||Qe==="function")&&!Object.isFrozen(ze)&&e(ze)}),B}class t{constructor(ce){ce.data===void 0&&(ce.data={}),this.data=ce.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function r(B){return B.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function a(B,...ce){const ze=Object.create(null);for(const Qe in B)ze[Qe]=B[Qe];return ce.forEach(function(Qe){for(const Lt in Qe)ze[Lt]=Qe[Lt]}),ze}const l="</span>",o=B=>!!B.scope,c=(B,{prefix:ce})=>{if(B.startsWith("language:"))return B.replace("language:","language-");if(B.includes(".")){const ze=B.split(".");return[`${ce}${ze.shift()}`,...ze.map((Qe,Lt)=>`${Qe}${"_".repeat(Lt+1)}`)].join(" ")}return`${ce}${B}`};class f{constructor(ce,ze){this.buffer="",this.classPrefix=ze.classPrefix,ce.walk(this)}addText(ce){this.buffer+=r(ce)}openNode(ce){if(!o(ce))return;const ze=c(ce.scope,{prefix:this.classPrefix});this.span(ze)}closeNode(ce){o(ce)&&(this.buffer+=l)}value(){return this.buffer}span(ce){this.buffer+=`<span class="${ce}">`}}const h=(B={})=>{const ce={children:[]};return Object.assign(ce,B),ce};class m{constructor(){this.rootNode=h(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(ce){this.top.children.push(ce)}openNode(ce){const ze=h({scope:ce});this.add(ze),this.stack.push(ze)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(ce){return this.constructor._walk(ce,this.rootNode)}static _walk(ce,ze){return typeof ze=="string"?ce.addText(ze):ze.children&&(ce.openNode(ze),ze.children.forEach(Qe=>this._walk(ce,Qe)),ce.closeNode(ze)),ce}static _collapse(ce){typeof ce!="string"&&ce.children&&(ce.children.every(ze=>typeof ze=="string")?ce.children=[ce.children.join("")]:ce.children.forEach(ze=>{m._collapse(ze)}))}}class g extends m{constructor(ce){super(),this.options=ce}addText(ce){ce!==""&&this.add(ce)}startScope(ce){this.openNode(ce)}endScope(){this.closeNode()}__addSublanguage(ce,ze){const Qe=ce.root;ze&&(Qe.scope=`language:${ze}`),this.add(Qe)}toHTML(){return new f(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function x(B){return B?typeof B=="string"?B:B.source:null}function y(B){return E("(?=",B,")")}function v(B){return E("(?:",B,")*")}function k(B){return E("(?:",B,")?")}function E(...B){return B.map(ze=>x(ze)).join("")}function S(B){const ce=B[B.length-1];return typeof ce=="object"&&ce.constructor===Object?(B.splice(B.length-1,1),ce):{}}function N(...B){return"("+(S(B).capture?"":"?:")+B.map(Qe=>x(Qe)).join("|")+")"}function O(B){return new RegExp(B.toString()+"|").exec("").length-1}function A(B,ce){const ze=B&&B.exec(ce);return ze&&ze.index===0}const P=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function $(B,{joinWith:ce}){let ze=0;return B.map(Qe=>{ze+=1;const Lt=ze;let Rt=x(Qe),Me="";for(;Rt.length>0;){const Te=P.exec(Rt);if(!Te){Me+=Rt;break}Me+=Rt.substring(0,Te.index),Rt=Rt.substring(Te.index+Te[0].length),Te[0][0]==="\\"&&Te[1]?Me+="\\"+String(Number(Te[1])+Lt):(Me+=Te[0],Te[0]==="("&&ze++)}return Me}).map(Qe=>`(${Qe})`).join(ce)}const M=/\b\B/,K="[a-zA-Z]\\w*",z="[a-zA-Z_]\\w*",W="\\b\\d+(\\.\\d+)?",U="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",ee="\\b(0b[01]+)",te="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",_e=(B={})=>{const ce=/^#![ ]*\//;return B.binary&&(B.begin=E(ce,/.*\b/,B.binary,/\b.*/)),a({scope:"meta",begin:ce,end:/$/,relevance:0,"on:begin":(ze,Qe)=>{ze.index!==0&&Qe.ignoreMatch()}},B)},se={begin:"\\\\[\\s\\S]",relevance:0},X={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[se]},F={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[se]},ne={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},V=function(B,ce,ze={}){const Qe=a({scope:"comment",begin:B,end:ce,contains:[]},ze);Qe.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const Lt=N("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return Qe.contains.push({begin:E(/[ ]+/,"(",Lt,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),Qe},fe=V("//","$"),R=V("/\\*","\\*/"),j=V("#","$"),I={scope:"number",begin:W,relevance:0},C={scope:"number",begin:U,relevance:0},ue={scope:"number",begin:ee,relevance:0},be={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[se,{begin:/\[/,end:/\]/,relevance:0,contains:[se]}]},ye={scope:"title",begin:K,relevance:0},le={scope:"title",begin:z,relevance:0},xe={begin:"\\.\\s*"+z,relevance:0};var Ue=Object.freeze({__proto__:null,APOS_STRING_MODE:X,BACKSLASH_ESCAPE:se,BINARY_NUMBER_MODE:ue,BINARY_NUMBER_RE:ee,COMMENT:V,C_BLOCK_COMMENT_MODE:R,C_LINE_COMMENT_MODE:fe,C_NUMBER_MODE:C,C_NUMBER_RE:U,END_SAME_AS_BEGIN:function(B){return Object.assign(B,{"on:begin":(ce,ze)=>{ze.data._beginMatch=ce[1]},"on:end":(ce,ze)=>{ze.data._beginMatch!==ce[1]&&ze.ignoreMatch()}})},HASH_COMMENT_MODE:j,IDENT_RE:K,MATCH_NOTHING_RE:M,METHOD_GUARD:xe,NUMBER_MODE:I,NUMBER_RE:W,PHRASAL_WORDS_MODE:ne,QUOTE_STRING_MODE:F,REGEXP_MODE:be,RE_STARTERS_RE:te,SHEBANG:_e,TITLE_MODE:ye,UNDERSCORE_IDENT_RE:z,UNDERSCORE_TITLE_MODE:le});function Re(B,ce){B.input[B.index-1]==="."&&ce.ignoreMatch()}function Tt(B,ce){B.className!==void 0&&(B.scope=B.className,delete B.className)}function tt(B,ce){ce&&B.beginKeywords&&(B.begin="\\b("+B.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",B.__beforeBegin=Re,B.keywords=B.keywords||B.beginKeywords,delete B.beginKeywords,B.relevance===void 0&&(B.relevance=0))}function gt(B,ce){Array.isArray(B.illegal)&&(B.illegal=N(...B.illegal))}function _t(B,ce){if(B.match){if(B.begin||B.end)throw new Error("begin & end are not supported with match");B.begin=B.match,delete B.match}}function ot(B,ce){B.relevance===void 0&&(B.relevance=1)}const _n=(B,ce)=>{if(!B.beforeMatch)return;if(B.starts)throw new Error("beforeMatch cannot be used with starts");const ze=Object.assign({},B);Object.keys(B).forEach(Qe=>{delete B[Qe]}),B.keywords=ze.keywords,B.begin=E(ze.beforeMatch,y(ze.begin)),B.starts={relevance:0,contains:[Object.assign(ze,{endsParent:!0})]},B.relevance=0,delete ze.beforeMatch},Yn=["of","and","for","in","not","or","if","then","parent","list","value"],br="keyword";function xr(B,ce,ze=br){const Qe=Object.create(null);return typeof B=="string"?Lt(ze,B.split(" ")):Array.isArray(B)?Lt(ze,B):Object.keys(B).forEach(function(Rt){Object.assign(Qe,xr(B[Rt],ce,Rt))}),Qe;function Lt(Rt,Me){ce&&(Me=Me.map(Te=>Te.toLowerCase())),Me.forEach(function(Te){const Ve=Te.split("|");Qe[Ve[0]]=[Rt,oi(Ve[0],Ve[1])]})}}function oi(B,ce){return ce?Number(ce):wa(B)?0:1}function wa(B){return Yn.includes(B.toLowerCase())}const Li={},Wt=B=>{console.error(B)},Qn=(B,...ce)=>{console.log(`WARN: ${B}`,...ce)},ie=(B,ce)=>{Li[`${B}/${ce}`]||(console.log(`Deprecated as of ${B}. ${ce}`),Li[`${B}/${ce}`]=!0)},we=new Error;function $e(B,ce,{key:ze}){let Qe=0;const Lt=B[ze],Rt={},Me={};for(let Te=1;Te<=ce.length;Te++)Me[Te+Qe]=Lt[Te],Rt[Te+Qe]=!0,Qe+=O(ce[Te-1]);B[ze]=Me,B[ze]._emit=Rt,B[ze]._multi=!0}function We(B){if(Array.isArray(B.begin)){if(B.skip||B.excludeBegin||B.returnBegin)throw Wt("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),we;if(typeof B.beginScope!="object"||B.beginScope===null)throw Wt("beginScope must be object"),we;$e(B,B.begin,{key:"beginScope"}),B.begin=$(B.begin,{joinWith:""})}}function rt(B){if(Array.isArray(B.end)){if(B.skip||B.excludeEnd||B.returnEnd)throw Wt("skip, excludeEnd, returnEnd not compatible with endScope: {}"),we;if(typeof B.endScope!="object"||B.endScope===null)throw Wt("endScope must be object"),we;$e(B,B.end,{key:"endScope"}),B.end=$(B.end,{joinWith:""})}}function zn(B){B.scope&&typeof B.scope=="object"&&B.scope!==null&&(B.beginScope=B.scope,delete B.scope)}function ar(B){zn(B),typeof B.beginScope=="string"&&(B.beginScope={_wrap:B.beginScope}),typeof B.endScope=="string"&&(B.endScope={_wrap:B.endScope}),We(B),rt(B)}function cn(B){function ce(Me,Te){return new RegExp(x(Me),"m"+(B.case_insensitive?"i":"")+(B.unicodeRegex?"u":"")+(Te?"g":""))}class ze{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(Te,Ve){Ve.position=this.position++,this.matchIndexes[this.matchAt]=Ve,this.regexes.push([Ve,Te]),this.matchAt+=O(Te)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const Te=this.regexes.map(Ve=>Ve[1]);this.matcherRe=ce($(Te,{joinWith:"|"}),!0),this.lastIndex=0}exec(Te){this.matcherRe.lastIndex=this.lastIndex;const Ve=this.matcherRe.exec(Te);if(!Ve)return null;const D=Ve.findIndex((Z,me)=>me>0&&Z!==void 0),H=this.matchIndexes[D];return Ve.splice(0,D),Object.assign(Ve,H)}}class Qe{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(Te){if(this.multiRegexes[Te])return this.multiRegexes[Te];const Ve=new ze;return this.rules.slice(Te).forEach(([D,H])=>Ve.addRule(D,H)),Ve.compile(),this.multiRegexes[Te]=Ve,Ve}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(Te,Ve){this.rules.push([Te,Ve]),Ve.type==="begin"&&this.count++}exec(Te){const Ve=this.getMatcher(this.regexIndex);Ve.lastIndex=this.lastIndex;let D=Ve.exec(Te);if(this.resumingScanAtSamePosition()&&!(D&&D.index===this.lastIndex)){const H=this.getMatcher(0);H.lastIndex=this.lastIndex+1,D=H.exec(Te)}return D&&(this.regexIndex+=D.position+1,this.regexIndex===this.count&&this.considerAll()),D}}function Lt(Me){const Te=new Qe;return Me.contains.forEach(Ve=>Te.addRule(Ve.begin,{rule:Ve,type:"begin"})),Me.terminatorEnd&&Te.addRule(Me.terminatorEnd,{type:"end"}),Me.illegal&&Te.addRule(Me.illegal,{type:"illegal"}),Te}function Rt(Me,Te){const Ve=Me;if(Me.isCompiled)return Ve;[Tt,_t,ar,_n].forEach(H=>H(Me,Te)),B.compilerExtensions.forEach(H=>H(Me,Te)),Me.__beforeBegin=null,[tt,gt,ot].forEach(H=>H(Me,Te)),Me.isCompiled=!0;let D=null;return typeof Me.keywords=="object"&&Me.keywords.$pattern&&(Me.keywords=Object.assign({},Me.keywords),D=Me.keywords.$pattern,delete Me.keywords.$pattern),D=D||/\w+/,Me.keywords&&(Me.keywords=xr(Me.keywords,B.case_insensitive)),Ve.keywordPatternRe=ce(D,!0),Te&&(Me.begin||(Me.begin=/\B|\b/),Ve.beginRe=ce(Ve.begin),!Me.end&&!Me.endsWithParent&&(Me.end=/\B|\b/),Me.end&&(Ve.endRe=ce(Ve.end)),Ve.terminatorEnd=x(Ve.end)||"",Me.endsWithParent&&Te.terminatorEnd&&(Ve.terminatorEnd+=(Me.end?"|":"")+Te.terminatorEnd)),Me.illegal&&(Ve.illegalRe=ce(Me.illegal)),Me.contains||(Me.contains=[]),Me.contains=[].concat(...Me.contains.map(function(H){return Qt(H==="self"?Me:H)})),Me.contains.forEach(function(H){Rt(H,Ve)}),Me.starts&&Rt(Me.starts,Te),Ve.matcher=Lt(Ve),Ve}if(B.compilerExtensions||(B.compilerExtensions=[]),B.contains&&B.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return B.classNameAliases=a(B.classNameAliases||{}),Rt(B)}function rn(B){return B?B.endsWithParent||rn(B.starts):!1}function Qt(B){return B.variants&&!B.cachedVariants&&(B.cachedVariants=B.variants.map(function(ce){return a(B,{variants:null},ce)})),B.cachedVariants?B.cachedVariants:rn(B)?a(B,{starts:B.starts?a(B.starts):null}):Object.isFrozen(B)?a(B):B}var At="11.11.1";class sr extends Error{constructor(ce,ze){super(ce),this.name="HTMLInjectionError",this.html=ze}}const Cn=r,es=a,Kr=Symbol("nomatch"),Lr=7,Vr=function(B){const ce=Object.create(null),ze=Object.create(null),Qe=[];let Lt=!0;const Rt="Could not find the language '{}', did you forget to load/include a language module?",Me={disableAutodetect:!0,name:"Plain text",contains:[]};let Te={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:g};function Ve(ge){return Te.noHighlightRe.test(ge)}function D(ge){let Be=ge.className+" ";Be+=ge.parentNode?ge.parentNode.className:"";const Je=Te.languageDetectRe.exec(Be);if(Je){const St=Nt(Je[1]);return St||(Qn(Rt.replace("{}",Je[1])),Qn("Falling back to no-highlight mode for this block.",ge)),St?Je[1]:"no-highlight"}return Be.split(/\s+/).find(St=>Ve(St)||Nt(St))}function H(ge,Be,Je){let St="",Xt="";typeof Be=="object"?(St=ge,Je=Be.ignoreIllegals,Xt=Be.language):(ie("10.7.0","highlight(lang, code, ...args) has been deprecated."),ie("10.7.0",`Please use highlight(code, options) instead.
|
|
556
|
+
https://github.com/highlightjs/highlight.js/issues/2277`),Xt=ge,St=Be),Je===void 0&&(Je=!0);const Xe={code:St,language:Xt};Un("before:highlight",Xe);const It=Xe.result?Xe.result:Z(Xe.language,Xe.code,Je);return It.code=Xe.code,Un("after:highlight",It),It}function Z(ge,Be,Je,St){const Xt=Object.create(null);function Xe(Se,Fe){return Se.keywords[Fe]}function It(){if(!Ze.keywords){pn.addText(Ut);return}let Se=0;Ze.keywordPatternRe.lastIndex=0;let Fe=Ze.keywordPatternRe.exec(Ut),nt="";for(;Fe;){nt+=Ut.substring(Se,Fe.index);const xt=On.case_insensitive?Fe[0].toLowerCase():Fe[0],sn=Xe(Ze,xt);if(sn){const[yr,nl]=sn;if(pn.addText(nt),nt="",Xt[xt]=(Xt[xt]||0)+1,Xt[xt]<=Lr&&(Ii+=nl),yr.startsWith("_"))nt+=Fe[0];else{const Fo=On.classNameAliases[yr]||yr;bt(Fe[0],Fo)}}else nt+=Fe[0];Se=Ze.keywordPatternRe.lastIndex,Fe=Ze.keywordPatternRe.exec(Ut)}nt+=Ut.substring(Se),pn.addText(nt)}function dn(){if(Ut==="")return;let Se=null;if(typeof Ze.subLanguage=="string"){if(!ce[Ze.subLanguage]){pn.addText(Ut);return}Se=Z(Ze.subLanguage,Ut,!0,Uo[Ze.subLanguage]),Uo[Ze.subLanguage]=Se._top}else Se=ve(Ut,Ze.subLanguage.length?Ze.subLanguage:null);Ze.relevance>0&&(Ii+=Se.relevance),pn.__addSublanguage(Se._emitter,Se.language)}function zt(){Ze.subLanguage!=null?dn():It(),Ut=""}function bt(Se,Fe){Se!==""&&(pn.startScope(Fe),pn.addText(Se),pn.endScope())}function ci(Se,Fe){let nt=1;const xt=Fe.length-1;for(;nt<=xt;){if(!Se._emit[nt]){nt++;continue}const sn=On.classNameAliases[Se[nt]]||Se[nt],yr=Fe[nt];sn?bt(yr,sn):(Ut=yr,It(),Ut=""),nt++}}function ui(Se,Fe){return Se.scope&&typeof Se.scope=="string"&&pn.openNode(On.classNameAliases[Se.scope]||Se.scope),Se.beginScope&&(Se.beginScope._wrap?(bt(Ut,On.classNameAliases[Se.beginScope._wrap]||Se.beginScope._wrap),Ut=""):Se.beginScope._multi&&(ci(Se.beginScope,Fe),Ut="")),Ze=Object.create(Se,{parent:{value:Ze}}),Ze}function _a(Se,Fe,nt){let xt=A(Se.endRe,nt);if(xt){if(Se["on:end"]){const sn=new t(Se);Se["on:end"](Fe,sn),sn.isMatchIgnored&&(xt=!1)}if(xt){for(;Se.endsParent&&Se.parent;)Se=Se.parent;return Se}}if(Se.endsWithParent)return _a(Se.parent,Fe,nt)}function ts(Se){return Ze.matcher.regexIndex===0?(Ut+=Se[0],1):(Bi=!0,0)}function td(Se){const Fe=Se[0],nt=Se.rule,xt=new t(nt),sn=[nt.__beforeBegin,nt["on:begin"]];for(const yr of sn)if(yr&&(yr(Se,xt),xt.isMatchIgnored))return ts(Fe);return nt.skip?Ut+=Fe:(nt.excludeBegin&&(Ut+=Fe),zt(),!nt.returnBegin&&!nt.excludeBegin&&(Ut=Fe)),ui(nt,Se),nt.returnBegin?0:Fe.length}function Xn(Se){const Fe=Se[0],nt=Be.substring(Se.index),xt=_a(Ze,Se,nt);if(!xt)return Kr;const sn=Ze;Ze.endScope&&Ze.endScope._wrap?(zt(),bt(Fe,Ze.endScope._wrap)):Ze.endScope&&Ze.endScope._multi?(zt(),ci(Ze.endScope,Se)):sn.skip?Ut+=Fe:(sn.returnEnd||sn.excludeEnd||(Ut+=Fe),zt(),sn.excludeEnd&&(Ut=Fe));do Ze.scope&&pn.closeNode(),!Ze.skip&&!Ze.subLanguage&&(Ii+=Ze.relevance),Ze=Ze.parent;while(Ze!==xt.parent);return xt.starts&&ui(xt.starts,Se),sn.returnEnd?0:Fe.length}function el(){const Se=[];for(let Fe=Ze;Fe!==On;Fe=Fe.parent)Fe.scope&&Se.unshift(Fe.scope);Se.forEach(Fe=>pn.openNode(Fe))}let Ea={};function ns(Se,Fe){const nt=Fe&&Fe[0];if(Ut+=Se,nt==null)return zt(),0;if(Ea.type==="begin"&&Fe.type==="end"&&Ea.index===Fe.index&&nt===""){if(Ut+=Be.slice(Fe.index,Fe.index+1),!Lt){const xt=new Error(`0 width match regex (${ge})`);throw xt.languageName=ge,xt.badRule=Ea.rule,xt}return 1}if(Ea=Fe,Fe.type==="begin")return td(Fe);if(Fe.type==="illegal"&&!Je){const xt=new Error('Illegal lexeme "'+nt+'" for mode "'+(Ze.scope||"<unnamed>")+'"');throw xt.mode=Ze,xt}else if(Fe.type==="end"){const xt=Xn(Fe);if(xt!==Kr)return xt}if(Fe.type==="illegal"&&nt==="")return Ut+=`
|
|
557
|
+
`,1;if(tl>1e5&&tl>Fe.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Ut+=nt,nt.length}const On=Nt(ge);if(!On)throw Wt(Rt.replace("{}",ge)),new Error('Unknown language: "'+ge+'"');const Bo=cn(On);let rs="",Ze=St||Bo;const Uo={},pn=new Te.__emitter(Te);el();let Ut="",Ii=0,di=0,tl=0,Bi=!1;try{if(On.__emitTokens)On.__emitTokens(Be,pn);else{for(Ze.matcher.considerAll();;){tl++,Bi?Bi=!1:Ze.matcher.considerAll(),Ze.matcher.lastIndex=di;const Se=Ze.matcher.exec(Be);if(!Se)break;const Fe=Be.substring(di,Se.index),nt=ns(Fe,Se);di=Se.index+nt}ns(Be.substring(di))}return pn.finalize(),rs=pn.toHTML(),{language:ge,value:rs,relevance:Ii,illegal:!1,_emitter:pn,_top:Ze}}catch(Se){if(Se.message&&Se.message.includes("Illegal"))return{language:ge,value:Cn(Be),illegal:!0,relevance:0,_illegalBy:{message:Se.message,index:di,context:Be.slice(di-100,di+100),mode:Se.mode,resultSoFar:rs},_emitter:pn};if(Lt)return{language:ge,value:Cn(Be),illegal:!1,relevance:0,errorRaised:Se,_emitter:pn,_top:Ze};throw Se}}function me(ge){const Be={value:Cn(ge),illegal:!1,relevance:0,_top:Me,_emitter:new Te.__emitter(Te)};return Be._emitter.addText(ge),Be}function ve(ge,Be){Be=Be||Te.languages||Object.keys(ce);const Je=me(ge),St=Be.filter(Nt).filter(ft).map(zt=>Z(zt,ge,!1));St.unshift(Je);const Xt=St.sort((zt,bt)=>{if(zt.relevance!==bt.relevance)return bt.relevance-zt.relevance;if(zt.language&&bt.language){if(Nt(zt.language).supersetOf===bt.language)return 1;if(Nt(bt.language).supersetOf===zt.language)return-1}return 0}),[Xe,It]=Xt,dn=Xe;return dn.secondBest=It,dn}function Oe(ge,Be,Je){const St=Be&&ze[Be]||Je;ge.classList.add("hljs"),ge.classList.add(`language-${St}`)}function Ee(ge){let Be=null;const Je=D(ge);if(Ve(Je))return;if(Un("before:highlightElement",{el:ge,language:Je}),ge.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",ge);return}if(ge.children.length>0&&(Te.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(ge)),Te.throwUnescapedHTML))throw new sr("One of your code blocks includes unescaped HTML.",ge.innerHTML);Be=ge;const St=Be.textContent,Xt=Je?H(St,{language:Je,ignoreIllegals:!0}):ve(St);ge.innerHTML=Xt.value,ge.dataset.highlighted="yes",Oe(ge,Je,Xt.language),ge.result={language:Xt.language,re:Xt.relevance,relevance:Xt.relevance},Xt.secondBest&&(ge.secondBest={language:Xt.secondBest.language,relevance:Xt.secondBest.relevance}),Un("after:highlightElement",{el:ge,result:Xt,text:St})}function Ce(ge){Te=es(Te,ge)}const Ae=()=>{Ie(),ie("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function He(){Ie(),ie("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let qe=!1;function Ie(){function ge(){Ie()}if(document.readyState==="loading"){qe||window.addEventListener("DOMContentLoaded",ge,!1),qe=!0;return}document.querySelectorAll(Te.cssSelector).forEach(Ee)}function Et(ge,Be){let Je=null;try{Je=Be(B)}catch(St){if(Wt("Language definition for '{}' could not be registered.".replace("{}",ge)),Lt)Wt(St);else throw St;Je=Me}Je.name||(Je.name=ge),ce[ge]=Je,Je.rawDefinition=Be.bind(null,B),Je.aliases&&Jt(Je.aliases,{languageName:ge})}function lt(ge){delete ce[ge];for(const Be of Object.keys(ze))ze[Be]===ge&&delete ze[Be]}function Bt(){return Object.keys(ce)}function Nt(ge){return ge=(ge||"").toLowerCase(),ce[ge]||ce[ze[ge]]}function Jt(ge,{languageName:Be}){typeof ge=="string"&&(ge=[ge]),ge.forEach(Je=>{ze[Je.toLowerCase()]=Be})}function ft(ge){const Be=Nt(ge);return Be&&!Be.disableAutodetect}function un(ge){ge["before:highlightBlock"]&&!ge["before:highlightElement"]&&(ge["before:highlightElement"]=Be=>{ge["before:highlightBlock"](Object.assign({block:Be.el},Be))}),ge["after:highlightBlock"]&&!ge["after:highlightElement"]&&(ge["after:highlightElement"]=Be=>{ge["after:highlightBlock"](Object.assign({block:Be.el},Be))})}function Ht(ge){un(ge),Qe.push(ge)}function Yr(ge){const Be=Qe.indexOf(ge);Be!==-1&&Qe.splice(Be,1)}function Un(ge,Be){const Je=ge;Qe.forEach(function(St){St[Je]&&St[Je](Be)})}function mn(ge){return ie("10.7.0","highlightBlock will be removed entirely in v12.0"),ie("10.7.0","Please use highlightElement now."),Ee(ge)}Object.assign(B,{highlight:H,highlightAuto:ve,highlightAll:Ie,highlightElement:Ee,highlightBlock:mn,configure:Ce,initHighlighting:Ae,initHighlightingOnLoad:He,registerLanguage:Et,unregisterLanguage:lt,listLanguages:Bt,getLanguage:Nt,registerAliases:Jt,autoDetection:ft,inherit:es,addPlugin:Ht,removePlugin:Yr}),B.debugMode=function(){Lt=!1},B.safeMode=function(){Lt=!0},B.versionString=At,B.regex={concat:E,lookahead:y,either:N,optional:k,anyNumberOfTimes:v};for(const ge in Ue)typeof Ue[ge]=="object"&&e(Ue[ge]);return Object.assign(B,Ue),B},Tn=Vr({});return Tn.newInstance=()=>Vr({}),qh=Tn,Tn.HighlightJS=Tn,Tn.default=Tn,qh}var qI=HI();const $I=Bu(qI),dv={},GI="hljs-";function KI(e){const t=$I.newInstance();return e&&o(e),{highlight:r,highlightAuto:a,listLanguages:l,register:o,registerAlias:c,registered:f};function r(h,m,g){const x=g||dv,y=typeof x.prefix=="string"?x.prefix:GI;if(!t.getLanguage(h))throw new Error("Unknown language: `"+h+"` is not registered");t.configure({__emitter:VI,classPrefix:y});const v=t.highlight(m,{ignoreIllegals:!0,language:h});if(v.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:v.errorRaised});const k=v._emitter.root,E=k.data;return E.language=v.language,E.relevance=v.relevance,k}function a(h,m){const x=(m||dv).subset||l();let y=-1,v=0,k;for(;++y<x.length;){const E=x[y];if(!t.getLanguage(E))continue;const S=r(E,h,m);S.data&&S.data.relevance!==void 0&&S.data.relevance>v&&(v=S.data.relevance,k=S)}return k||{type:"root",children:[],data:{language:void 0,relevance:v}}}function l(){return t.listLanguages()}function o(h,m){if(typeof h=="string")t.registerLanguage(h,m);else{let g;for(g in h)Object.hasOwn(h,g)&&t.registerLanguage(g,h[g])}}function c(h,m){if(typeof h=="string")t.registerAliases(typeof m=="string"?m:[...m],{languageName:h});else{let g;for(g in h)if(Object.hasOwn(h,g)){const x=h[g];t.registerAliases(typeof x=="string"?x:[...x],{languageName:g})}}}function f(h){return!!t.getLanguage(h)}}class VI{constructor(t){this.options=t,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(t){if(t==="")return;const r=this.stack[this.stack.length-1],a=r.children[r.children.length-1];a&&a.type==="text"?a.value+=t:r.children.push({type:"text",value:t})}startScope(t){this.openNode(String(t))}endScope(){this.closeNode()}__addSublanguage(t,r){const a=this.stack[this.stack.length-1],l=t.root.children;r?a.children.push({type:"element",tagName:"span",properties:{className:[r]},children:l}):a.children.push(...l)}openNode(t){const r=this,a=t.split(".").map(function(c,f){return f?c+"_".repeat(f):r.options.classPrefix+c}),l=this.stack[this.stack.length-1],o={type:"element",tagName:"span",properties:{className:a},children:[]};l.children.push(o),this.stack.push(o)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const YI={};function QI(e){const t=e||YI,r=t.aliases,a=t.detect||!1,l=t.languages||PI,o=t.plainText,c=t.prefix,f=t.subset;let h="hljs";const m=KI(l);if(r&&m.registerAlias(r),c){const g=c.indexOf("-");h=g===-1?c:c.slice(0,g)}return function(g,x){ed(g,"element",function(y,v,k){if(y.tagName!=="code"||!k||k.type!=="element"||k.tagName!=="pre")return;const E=XI(y);if(E===!1||!E&&!a||E&&o&&o.includes(E))return;Array.isArray(y.properties.className)||(y.properties.className=[]),y.properties.className.includes(h)||y.properties.className.unshift(h);const S=mL(y,{whitespace:"pre"});let N;try{N=E?m.highlight(E,S,{prefix:c}):m.highlightAuto(S,{prefix:c,subset:f})}catch(O){const A=O;if(E&&/Unknown language/.test(A.message)){x.message("Cannot highlight as `"+E+"`, it’s not registered",{ancestors:[k,y],cause:A,place:y.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw A}!E&&N.data&&N.data.language&&y.properties.className.push("language-"+N.data.language),N.children.length>0&&(y.children=N.children)})}}function XI(e){const t=e.properties.className;let r=-1;if(!Array.isArray(t))return;let a;for(;++r<t.length;){const l=String(t[r]);if(l==="no-highlight"||l==="nohighlight")return!1;!a&&l.slice(0,5)==="lang-"&&(a=l.slice(5)),!a&&l.slice(0,9)==="language-"&&(a=l.slice(9))}return a}const ZI={h1({node:e,className:t,...r}){return d.jsx("h1",{className:ae("mt-8 mb-4 text-2xl font-semibold tracking-tight text-zinc-900 dark:text-zinc-100 first:mt-0",t),...r})},h2({node:e,className:t,...r}){return d.jsx("h2",{className:ae("mt-8 mb-3 text-xl font-semibold tracking-tight text-zinc-900 dark:text-zinc-100",t),...r})},h3({node:e,className:t,...r}){return d.jsx("h3",{className:ae("mt-6 mb-2 text-lg font-semibold text-zinc-900 dark:text-zinc-100",t),...r})},h4({node:e,className:t,...r}){return d.jsx("h4",{className:ae("mt-4 mb-2 text-base font-semibold text-zinc-900 dark:text-zinc-100",t),...r})},p({node:e,className:t,...r}){return d.jsx("p",{className:ae("mb-4 leading-7 text-zinc-700 dark:text-zinc-300 last:mb-0",t),...r})},a({node:e,className:t,...r}){return d.jsx("a",{className:ae("font-medium text-blue-600 underline underline-offset-4 hover:text-blue-500 dark:text-blue-400 dark:hover:text-blue-300",t),target:"_blank",rel:"noopener noreferrer",...r})},ul({node:e,className:t,...r}){return d.jsx("ul",{className:ae("mb-4 ml-6 list-disc space-y-1 text-zinc-700 dark:text-zinc-300",t),...r})},ol({node:e,className:t,...r}){return d.jsx("ol",{className:ae("mb-4 ml-6 list-decimal space-y-1 text-zinc-700 dark:text-zinc-300",t),...r})},li({node:e,className:t,...r}){return d.jsx("li",{className:ae("leading-7",t),...r})},blockquote({node:e,className:t,...r}){return d.jsx("blockquote",{className:ae("mb-4 border-l-4 border-zinc-300 pl-4 italic text-zinc-600 dark:border-zinc-700 dark:text-zinc-400",t),...r})},hr({node:e,...t}){return d.jsx("hr",{className:"my-6 border-zinc-200 dark:border-zinc-800",...t})},strong({node:e,className:t,...r}){return d.jsx("strong",{className:ae("font-semibold text-zinc-900 dark:text-zinc-100",t),...r})},code({node:e,className:t,children:r,...a}){return t?.includes("hljs")?d.jsx("code",{className:ae("text-sm",t),...a,children:r}):d.jsx("code",{className:ae("rounded-md bg-zinc-100 px-1.5 py-0.5 text-sm font-mono text-zinc-800 dark:bg-zinc-800 dark:text-zinc-200",t),...a,children:r})},pre({node:e,className:t,...r}){return d.jsx("pre",{className:ae("mb-4 overflow-x-auto rounded-lg border border-zinc-200 bg-zinc-50 p-4 text-sm dark:border-zinc-800 dark:bg-zinc-900",t),...r})},table({node:e,className:t,...r}){return d.jsx("div",{className:"mb-4 overflow-x-auto rounded-lg border border-zinc-200 dark:border-zinc-800",children:d.jsx("table",{className:ae("w-full text-sm",t),...r})})},thead({node:e,className:t,...r}){return d.jsx("thead",{className:ae("bg-zinc-50 dark:bg-zinc-900",t),...r})},th({node:e,className:t,...r}){return d.jsx("th",{className:ae("border-b border-zinc-200 px-4 py-2 text-left font-medium text-zinc-900 dark:border-zinc-800 dark:text-zinc-100",t),...r})},td({node:e,className:t,...r}){return d.jsx("td",{className:ae("border-b border-zinc-200 px-4 py-2 text-zinc-700 dark:border-zinc-800 dark:text-zinc-300",t),...r})},img({node:e,className:t,...r}){return d.jsx("img",{className:ae("mb-4 max-w-full rounded-lg",t),...r})}};function jr({content:e,className:t}){return d.jsx("div",{className:ae("ocr-markdown",t),children:d.jsx(Yj,{remarkPlugins:[lL],rehypePlugins:[QI],components:ZI,children:e})})}function WI({text:e}){return d.jsx("div",{className:"py-1 text-sm leading-relaxed text-zinc-800 dark:text-zinc-200",children:d.jsx(jr,{content:e})})}function JI(e){for(const t of e.split(`
|
|
558
|
+
`)){const r=t.trim();if(r)return r}return e.trim()}function e6({text:e}){const[t,r]=_.useState(!1),a=JI(e);return d.jsx("div",{className:"py-1",children:d.jsxs("button",{type:"button",onClick:()=>r(l=>!l),"aria-expanded":t,className:ae("group flex w-full items-start gap-1.5 text-left text-[13px] italic","text-zinc-500 hover:text-zinc-700 dark:text-zinc-500 dark:hover:text-zinc-300","transition-colors"),children:[d.jsx(ji,{"aria-hidden":!0,className:ae("mt-1 h-3 w-3 shrink-0 transition-transform",t&&"rotate-90")}),d.jsx("span",{className:"min-w-0 flex-1",children:t?d.jsx("span",{className:"block whitespace-pre-wrap leading-relaxed text-zinc-600 dark:text-zinc-400",children:e}):d.jsxs("span",{className:"line-clamp-1 not-italic text-[12px] tracking-wide text-zinc-400 dark:text-zinc-500",children:[d.jsx("span",{className:"italic",children:"Thinking · "}),d.jsx("span",{className:"italic",children:a})]})})]})})}const Pw=80,t6=60;function Eu(e,t=Pw){return e.length<=t?e:e.slice(0,t-1)+"…"}function Fr(e,t){const r=e[t];return typeof r=="string"?r:null}function n6(e,t){switch(e){case"Read":case"Edit":case"Write":case"NotebookEdit":return Fr(t,"file_path")??Fr(t,"path")??null;case"Bash":{const r=Fr(t,"command");if(!r)return null;const a=r.replace(/^cd\s+\S+\s*&&\s*/,"");return Eu(a)}case"Grep":{const r=Fr(t,"pattern"),a=Fr(t,"glob");return r?a?`${r} · ${a}`:r:null}case"Glob":return Fr(t,"pattern");case"WebFetch":return Fr(t,"url");case"WebSearch":{const r=Fr(t,"query");return r?Eu(r):null}case"Task":{const r=Fr(t,"subagent_type"),a=Fr(t,"prompt")??Fr(t,"description"),l=a?Eu(a,t6):null;return r&&l?`${r} · ${l}`:r??l??null}case"TodoWrite":{const r=t.todos;return Array.isArray(r)?`${r.length} todos`:null}default:return null}}function r6(e){try{const t=JSON.stringify(e);return Eu(t,Pw)}catch{return""}}function i6({name:e,input:t,inputPartial:r,output:a,status:l}){const[o,c]=_.useState(!1),f=n6(e,t)??r6(t);return d.jsxs("div",{className:"py-1",children:[d.jsxs("button",{type:"button",onClick:()=>c(h=>!h),"aria-expanded":o,className:ae("group flex w-full items-center gap-2 rounded-md px-1.5 py-1 text-left","transition-colors hover:bg-zinc-50 dark:hover:bg-zinc-800/50"),children:[d.jsx(ji,{"aria-hidden":!0,className:ae("h-3 w-3 shrink-0 text-zinc-400 transition-transform dark:text-zinc-500",o&&"rotate-90")}),d.jsx(lk,{"aria-hidden":!0,className:"h-3.5 w-3.5 shrink-0 text-zinc-500 dark:text-zinc-400"}),d.jsx("span",{className:"text-[13px] font-medium text-zinc-700 dark:text-zinc-200",children:e}),f&&d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"text-zinc-400 dark:text-zinc-600",children:"·"}),d.jsx("span",{className:"min-w-0 flex-1 truncate font-mono text-[12px] text-zinc-600 dark:text-zinc-400",children:f})]}),!f&&d.jsx("span",{className:"flex-1"}),d.jsx(a6,{status:l})]}),o&&d.jsxs("div",{className:"ml-7 mt-1 space-y-2",children:[d.jsx(fv,{label:"Input",children:d.jsx("pre",{className:"overflow-x-auto whitespace-pre-wrap break-all rounded-md bg-zinc-100 px-3 py-2 font-mono text-[11px] leading-relaxed text-zinc-700 dark:bg-zinc-900 dark:text-zinc-300",children:s6(t,r)})}),a!==void 0&&d.jsx(fv,{label:l==="error"?"Error output":"Output",children:d.jsx("pre",{className:ae("overflow-x-auto whitespace-pre-wrap break-words rounded-md px-3 py-2 font-mono text-[11px] leading-relaxed",l==="error"?"bg-red-50 text-red-800 dark:bg-red-950/40 dark:text-red-200":"bg-zinc-100 text-zinc-700 dark:bg-zinc-900 dark:text-zinc-300"),children:a||"(empty)"})})]})]})}function a6({status:e}){return e==="running"?d.jsx(qr,{"aria-label":"Running",className:"h-3.5 w-3.5 shrink-0 animate-spin text-indigo-500 dark:text-indigo-400"}):e==="done"?d.jsx(Mr,{"aria-label":"Done",className:"h-3.5 w-3.5 shrink-0 text-emerald-600 dark:text-emerald-400"}):e==="error"?d.jsx(Bn,{"aria-label":"Error",className:"h-3.5 w-3.5 shrink-0 text-red-500 dark:text-red-400"}):d.jsx(Ku,{"aria-label":"Pending",className:"h-3.5 w-3.5 shrink-0 text-zinc-400 dark:text-zinc-500"})}function fv({label:e,children:t}){return d.jsxs("div",{children:[d.jsx("div",{className:"mb-1 text-[10px] font-medium uppercase tracking-wider text-zinc-500 dark:text-zinc-500",children:e}),t]})}function s6(e,t){let r;try{r=JSON.stringify(e,null,2)}catch{r="{}"}return t?`${r}
|
|
559
|
+
|
|
560
|
+
// streaming…
|
|
561
|
+
${t}`:r}function l6({source:e,message:t,detail:r}){const[a,l]=_.useState(!1),o=r?`${t}
|
|
562
|
+
|
|
563
|
+
${r}`:t,c=()=>{navigator.clipboard.writeText(o).then(()=>{l(!0),setTimeout(()=>l(!1),1500)},()=>{})};return d.jsx("div",{className:ae("my-1 rounded-md border px-3 py-2","border-red-300 bg-red-50 dark:border-red-800/60 dark:bg-red-950/30"),children:d.jsxs("div",{className:"flex items-start gap-2",children:[d.jsx(Ku,{"aria-hidden":!0,className:"mt-0.5 h-4 w-4 shrink-0 text-red-600 dark:text-red-400"}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-[10px] font-medium uppercase tracking-wider text-red-700 dark:text-red-400",children:e==="agent"?"Agent error":"Process error"}),d.jsxs("button",{type:"button",onClick:c,className:"ml-auto inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] text-red-700 transition-colors hover:bg-red-100 dark:text-red-400 dark:hover:bg-red-900/30",children:[d.jsx(Vu,{"aria-hidden":!0,className:"h-3 w-3"}),a?"Copied":"Copy"]})]}),d.jsx("p",{className:"mt-1 text-[13px] font-medium text-red-800 dark:text-red-200",children:t}),r&&d.jsx("pre",{className:"mt-2 overflow-x-auto whitespace-pre-wrap break-words font-mono text-[11px] leading-relaxed text-red-700/80 dark:text-red-300/80",children:r})]})]})})}const o6=24;function c6(e){const t=_.useRef(null),[r,a]=_.useState(!0),l=_.useRef(!0);l.current=r,_.useEffect(()=>{const c=t.current;if(!c)return;const f=()=>{const m=c.scrollHeight-c.scrollTop-c.clientHeight<=o6;m!==l.current&&a(m)};return c.addEventListener("scroll",f,{passive:!0}),()=>c.removeEventListener("scroll",f)},[]),_.useEffect(()=>{if(!l.current)return;const c=t.current;c&&requestAnimationFrame(()=>{l.current&&(c.scrollTop=c.scrollHeight)})},e);const o=_.useCallback(()=>{const c=t.current;c&&(c.scrollTop=c.scrollHeight,a(!0))},[]);return{scrollRef:t,isAtBottom:r,jumpToBottom:o}}function u6(e){const t=[],r=new Map;let a=null,l=null;for(const o of e)switch(o.type!=="text_delta"&&o.type!=="message"&&o.type!=="session_id"&&(a=null),o.type!=="thinking_delta"&&o.type!=="session_id"&&(l=null),o.type){case"text_delta":{if(a!==null){const c=t[a];c&&c.kind==="message"&&(c.text+=o.text)}else t.push({kind:"message",key:`msg-${o.seq}`,agentId:o.agentId,text:o.text}),a=t.length-1;break}case"message":{if(a!==null){const c=t[a];c&&c.kind==="message"&&(c.text=o.text)}else t.push({kind:"message",key:`msg-${o.seq}`,agentId:o.agentId,text:o.text});break}case"thinking_delta":{if(l!==null){const c=t[l];c&&c.kind==="thinking"&&(c.text+=o.text)}else t.push({kind:"thinking",key:`think-${o.seq}`,agentId:o.agentId,text:o.text}),l=t.length-1;break}case"tool_call":{const c={kind:"tool",key:`tool-${o.toolId}-${o.seq}`,agentId:o.agentId,toolId:o.toolId,name:o.name,input:o.input,inputPartial:"",status:"running"};t.push(c),r.set(o.toolId,t.length-1);break}case"tool_input_delta":{const c=r.get(o.toolId);if(c===void 0)break;const f=t[c];f&&f.kind==="tool"&&(f.inputPartial+=o.deltaJson);break}case"tool_result":{const c=r.get(o.toolId);if(c===void 0)break;const f=t[c];f&&f.kind==="tool"&&(f.status=o.isError?"error":"done",f.output=o.output,f.inputPartial="");break}case"error":{const c={kind:"error",key:`err-${o.seq}`,agentId:o.agentId,source:o.source,message:o.message};o.detail&&(c.detail=o.detail),t.push(c);break}}return t}function Hw({events:e,isRunning:t,className:r}){const a=_.useMemo(()=>u6(e),[e]),{scrollRef:l,isAtBottom:o,jumpToBottom:c}=c6([a.length,a[a.length-1]?.kind==="message"?a[a.length-1].text.length:0]);return d.jsxs("div",{className:ae("relative flex flex-col overflow-hidden",r),children:[d.jsxs("div",{ref:l,className:ae("min-h-0 flex-1 overflow-y-auto",a.length===0?"flex items-center justify-center px-6 py-10":"px-4 py-3"),role:"log","aria-live":"polite","aria-relevant":"additions",children:[a.length===0?d.jsx(d6,{isRunning:t}):d.jsx(f6,{blocks:a}),t&&a.length>0&&d.jsx("span",{"aria-hidden":!0,className:"ml-1 inline-block h-3 w-[2px] animate-pulse bg-indigo-400 align-middle dark:bg-indigo-500"})]}),!o&&d.jsxs("button",{type:"button",onClick:c,className:ae("absolute bottom-3 left-1/2 -translate-x-1/2","inline-flex items-center gap-1.5 rounded-full px-3 py-1.5 text-[11px] font-medium","bg-zinc-900/90 text-white shadow-lg backdrop-blur transition-colors","hover:bg-zinc-900 dark:bg-zinc-100 dark:text-zinc-900 dark:hover:bg-white"),children:[d.jsx(Z1,{"aria-hidden":!0,className:"h-3 w-3"}),"Jump to live"]})]})}function d6({isRunning:e}){return e?d.jsxs("div",{className:"flex max-w-sm flex-col items-center gap-3 text-center",children:[d.jsxs("span",{className:"relative flex h-10 w-10 items-center justify-center",children:[d.jsx("span",{"aria-hidden":!0,className:"absolute inset-0 animate-ping rounded-full bg-indigo-400/30 dark:bg-indigo-500/20"}),d.jsx("span",{className:"relative flex h-10 w-10 items-center justify-center rounded-full bg-indigo-500/10 dark:bg-indigo-500/15",children:d.jsx(Ro,{className:"h-4 w-4 text-indigo-500 dark:text-indigo-400","aria-hidden":!0})})]}),d.jsxs("div",{className:"space-y-1",children:[d.jsx("p",{className:"text-sm font-medium text-zinc-700 dark:text-zinc-200",children:"Spinning up the orchestrator"}),d.jsx("p",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:"Tool calls and reviewer output will appear here as the workflow progresses. The first response usually arrives within a few seconds."})]})]}):d.jsxs("div",{className:"flex max-w-sm flex-col items-center gap-3 text-center",children:[d.jsx("span",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-zinc-100 dark:bg-zinc-800",children:d.jsx(ii,{className:"h-4 w-4 text-zinc-400 dark:text-zinc-500","aria-hidden":!0})}),d.jsxs("div",{className:"space-y-1",children:[d.jsx("p",{className:"text-sm font-medium text-zinc-600 dark:text-zinc-300",children:"No structured events captured"}),d.jsx("p",{className:"text-xs text-zinc-500 dark:text-zinc-500",children:"This run completed without emitting timeline events. The legacy raw output may still contain its result."})]})]})}function f6({blocks:e}){return _.useMemo(()=>{const a=new Set;for(const l of e)a.add(l.agentId);return a},[e]).size>1?d.jsx(d.Fragment,{children:e.map((a,l)=>{const o=l>0?e[l-1]:null,c=!o||o.agentId!==a.agentId;return d.jsx(_.Fragment,{children:d.jsx(I5,{agentId:a.agentId,showName:c,children:d.jsx(hv,{block:a})})},a.key)})}):d.jsx(d.Fragment,{children:e.map(a=>d.jsx(_.Fragment,{children:d.jsx(hv,{block:a})},a.key))})}function hv({block:e}){switch(e.kind){case"message":return d.jsx(WI,{text:e.text});case"thinking":return d.jsx(e6,{text:e.text});case"tool":{const t={name:e.name,toolId:e.toolId,input:e.input,status:e.status};return e.inputPartial&&(t.inputPartial=e.inputPartial),e.output!==void 0&&(t.output=e.output),d.jsx(i6,{...t})}case"error":{const t={source:e.source,message:e.message};return e.detail&&(t.detail=e.detail),d.jsx(l6,{...t})}}}function h6(e,t){return e==="complete"?"Complete":e==="incomplete"?"Incomplete":e==="cancelled"?"Cancelled":e==="failed"?`Exit: ${t}`:t===0?"Complete":t===-2?"Cancelled":`Exit: ${t}`}function m6(e,t){const r=e??(t===0?"complete":t===-2?"cancelled":"failed");return r==="complete"?"border-emerald-500/25 bg-emerald-500/15 text-emerald-700 dark:text-emerald-400":r==="incomplete"||r==="cancelled"?"border-amber-500/25 bg-amber-500/15 text-amber-700 dark:text-amber-400":"border-red-500/25 bg-red-500/15 text-red-700 dark:text-red-400"}function p6(e){if(!e)return{verb:"workflow",reviewerCount:null};const t=e.replace(/^ocr\s+/,""),r=t.split(/\s+/)[0]??"workflow",a=t.match(/--team\s+(\[[\s\S]*?\])(?=\s+--|\s*$)/);let l=null;if(a?.[1])try{const o=JSON.parse(a[1]);Array.isArray(o)&&(l=o.length)}catch{}return{verb:r,reviewerCount:l}}function g6({output:e,events:t,isRunning:r,exitCode:a,status:l,commandName:o,onCancel:c,bare:f}){const h=_.useRef(null),[m,g]=_.useState(!1);_.useEffect(()=>{h.current&&(h.current.scrollTop=h.current.scrollHeight)},[e]);const x=_.useMemo(()=>b6(e),[e]),y=e.length>0||t&&t.length>0||r,v=!!t&&t.length>0,k=_.useMemo(()=>p6(o),[o]);return y?d.jsxs("div",{className:ae(!f&&"overflow-hidden rounded-lg border border-zinc-200 dark:border-zinc-800"),children:[d.jsxs("div",{className:"flex items-center justify-between border-b border-zinc-200 bg-zinc-50 px-4 py-2.5 dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[r?d.jsxs(d.Fragment,{children:[d.jsxs("span",{className:"relative flex h-2 w-2 shrink-0",children:[d.jsx("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-indigo-400 opacity-75"}),d.jsx("span",{className:"relative inline-flex h-2 w-2 rounded-full bg-indigo-500"})]}),d.jsxs("span",{className:"truncate text-xs font-medium text-zinc-600 dark:text-zinc-300",children:["Running ",d.jsx("span",{className:"capitalize",children:k.verb})]})]}):d.jsxs(d.Fragment,{children:[d.jsx(Ro,{className:"h-3.5 w-3.5 shrink-0 text-zinc-400"}),d.jsxs("span",{className:"text-xs font-medium text-zinc-500 dark:text-zinc-400",children:[d.jsx("span",{className:"capitalize",children:k.verb})," output"]})]}),k.reviewerCount!=null&&k.reviewerCount>0&&d.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded-full border border-zinc-200 bg-white px-1.5 py-0.5 text-[10px] font-medium text-zinc-600 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-400",children:[d.jsx(Xm,{className:"h-2.5 w-2.5","aria-hidden":!0}),k.reviewerCount," reviewer",k.reviewerCount===1?"":"s"]})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[r&&d.jsxs("button",{type:"button",onClick:c,className:ae("flex items-center gap-1 rounded-md border px-2 py-0.5 text-xs font-medium transition-colors","border-zinc-300 text-zinc-600 hover:bg-zinc-100","dark:border-zinc-700 dark:text-zinc-400 dark:hover:bg-zinc-800"),children:[d.jsx(oR,{className:"h-2.5 w-2.5"}),"Cancel"]}),a!==null&&d.jsx("span",{className:ae("inline-flex items-center rounded-md border px-2 py-0.5 text-xs font-medium",m6(l,a)),title:l==="incomplete"?"Process exited 0 but the workflow never reached its terminal phase. Likely cause: the parent process was interrupted (e.g. macOS sleep dropped the streaming connection). Use 'Resume in terminal' to pick up where it left off.":void 0,children:h6(l,a)}),v&&d.jsxs("button",{type:"button",onClick:()=>g(E=>!E),className:ae("flex items-center gap-1 rounded-md border px-2 py-0.5 text-[11px] font-medium transition-colors","border-zinc-300 text-zinc-500 hover:bg-zinc-100","dark:border-zinc-700 dark:text-zinc-400 dark:hover:bg-zinc-800"),title:m?"Show timeline":"Show raw output",children:[d.jsx(ZT,{"aria-hidden":!0,className:"h-3 w-3"}),m?"Timeline":"Raw"]})]})]}),v&&!m?d.jsx("div",{className:"flex max-h-[600px] min-h-[120px] flex-col bg-white dark:bg-zinc-950",children:d.jsx(Hw,{events:t,isRunning:r,className:"min-h-0 flex-1"})}):d.jsxs("div",{ref:h,className:"max-h-[600px] min-h-[120px] overflow-y-auto bg-white px-5 py-4 dark:bg-zinc-950",children:[x.length===0&&r?d.jsxs("div",{className:"flex items-center gap-2 text-sm text-zinc-400",children:[d.jsx("span",{className:"h-1 w-1 animate-pulse rounded-full bg-zinc-400"}),"Waiting for output..."]}):x.map((E,S)=>{if(E.type==="tool")return d.jsxs("div",{className:"my-1 flex items-center gap-1.5 border-l-2 border-indigo-400/40 py-0.5 pl-2.5 font-mono text-xs text-zinc-400 dark:text-zinc-500",children:[d.jsx("span",{className:"shrink-0 text-indigo-400/70",children:"▸"}),d.jsx("span",{className:"truncate",children:E.text})]},S);if(E.type==="empty")return d.jsx("div",{className:"h-3"},S);const N=E.text.match(/^(#{1,6})\s+(.+)/);if(N){const O=N[1].length,A=N[2],P=O<=2?"text-base font-semibold":O<=4?"text-sm font-semibold":"text-sm font-medium";return d.jsx("div",{className:ae(P,"mt-3 mb-1 text-zinc-800 dark:text-zinc-200"),children:A},S)}return/^[-*+]\s/.test(E.text)||/^\d+\.\s/.test(E.text)?d.jsx("div",{className:"ml-4 text-sm leading-relaxed text-zinc-700 dark:text-zinc-300",children:E.text},S):d.jsx("div",{className:"text-sm leading-relaxed text-zinc-700 dark:text-zinc-300",children:E.text},S)}),r&&x.length>0&&d.jsx("span",{className:"inline-block h-4 w-0.5 animate-pulse bg-indigo-500"})]})]}):null}function b6(e){if(!e)return[];const t=e.split(`
|
|
564
|
+
`),r=[];for(const a of t){const l=a.trim();if(l===""){r.length>0&&r[r.length-1]?.type!=="empty"&&r.push({type:"empty",text:""});continue}if(l.startsWith("▸")){r.push({type:"tool",text:l.replace(/^▸\s*/,"")});continue}if(/^(#{1,6}\s|[-*+]\s|\d+\.\s|```|>\s|---|\*\*\*|___)/.test(l))r.push({type:"text",text:l});else{const c=r[r.length-1];c&&c.type==="text"?c.text+=" "+l:r.push({type:"text",text:l})}}return r.length>0&&r[r.length-1]?.type==="empty"&&r.pop(),r}function x6(){return nn({queryKey:["command-history"],queryFn:()=>Dt("/api/commands/history")})}function y6(e,t){return nn({queryKey:["command-events",e],queryFn:async()=>e===null?[]:(await Dt(`/api/commands/${e}/events`)).events??[],enabled:t&&e!==null,staleTime:1/0})}const v6=6e4,k6=-2,w6=-3;function _6(e,t){const r=e.toLowerCase(),a=t.toLowerCase();let l=0;for(let o=0;o<a.length;o++){const c=r.indexOf(a[o],l);if(c<0)return!1;l=c+1}return!0}function Eo(e){return e.exit_code===null?e.last_heartbeat_at&&Date.now()-ri(e.last_heartbeat_at).getTime()>v6?"stalled":"running":e.outcome==="success"?"success":e.outcome==="incomplete"?"incomplete":e.outcome==="cancelled"?"cancelled":e.outcome==="failed"?"fail":e.exit_code===0?"success":e.exit_code===k6||e.cancellation_reason==="cascade"?"cancelled":e.exit_code===w6?"orphaned":"fail"}function E6(e){switch(e){case"success":return"Success";case"fail":return"Fail";case"cancelled":return"Cancelled";case"incomplete":return"Incomplete";case"running":return"Running";case"stalled":return"Stalled";case"orphaned":return"Orphaned";default:return"All"}}function N6(e,t){return t==="cancelled"&&e.cancellation_reason==="cascade"?"Superseded":E6(t)}function S6(e,t){if(t==="cancelled"&&e.cancellation_reason==="cascade")return"Stopped because its parent workflow was closed"}function z6(e){switch(e){case"success":return"border-emerald-500/25 bg-emerald-500/15 text-emerald-700 dark:text-emerald-400";case"cancelled":return"border-amber-500/25 bg-amber-500/15 text-amber-700 dark:text-amber-400";case"incomplete":return"border-amber-500/25 bg-amber-500/15 text-amber-700 dark:text-amber-400";case"stalled":return"border-amber-500/30 bg-amber-500/10 text-amber-700 dark:text-amber-400";case"orphaned":return"border-zinc-300 bg-zinc-100/50 text-zinc-600 dark:border-zinc-700 dark:bg-zinc-800/30 dark:text-zinc-400";case"fail":return"border-red-500/25 bg-red-500/15 text-red-700 dark:text-red-400";case"running":return"border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-400";default:return"border-zinc-500/25 bg-zinc-500/15 text-zinc-600 dark:text-zinc-400"}}function C6(e,t,r,a){let l=0;switch(r){case"date":l=new Date(e.started_at).getTime()-new Date(t.started_at).getTime();break;case"command":l=e.command.localeCompare(t.command);break;case"duration":l=(e.duration_ms??-1)-(t.duration_ms??-1);break;case"status":{const o={running:0,stalled:1,incomplete:2,orphaned:3,success:4,cancelled:5,fail:6,all:-1};l=(o[Eo(e)]??0)-(o[Eo(t)]??0);break}}return a==="asc"?l:-l}const T6=[{value:"all",label:"All"},{value:"running",label:"Running"},{value:"stalled",label:"Stalled"},{value:"orphaned",label:"Orphaned"},{value:"success",label:"Success"},{value:"incomplete",label:"Incomplete"},{value:"fail",label:"Fail"},{value:"cancelled",label:"Cancelled"}];function fu({label:e,field:t,activeField:r,dir:a,onToggle:l}){const o=t===r;return d.jsxs("button",{type:"button",onClick:()=>l(t),className:ae("inline-flex items-center gap-1 text-xs transition-colors",o?"font-medium text-zinc-900 dark:text-zinc-100":"text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-300"),children:[e,o?a==="desc"?d.jsx(Z1,{className:"h-3 w-3"}):d.jsx(xT,{className:"h-3 w-3"}):d.jsx(W1,{className:"h-3 w-3 opacity-40"})]})}const A6=new Set(["map","review"]);function R6(e){const t=e.replace(/^ocr\s+/,"").split(/\s+/)[0]??"";return A6.has(t)}function O6(e){const t=parseInt(e,10);return Number.isFinite(t)&&t>0?t:null}function mv({active:e,onClick:t,children:r}){return d.jsx("button",{type:"button",onClick:t,"aria-pressed":e,className:ae("rounded px-2 py-0.5 text-[11px] font-medium transition",e?"bg-zinc-900 text-white dark:bg-zinc-100 dark:text-zinc-900":"text-zinc-500 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-zinc-200"),children:r})}function M6({entry:e,isRunning:t,onRerun:r,onHandoff:a}){const[l,o]=_.useState(!1),[c,f]=_.useState(!1),h=Eo(e),g=e.exit_code!==null&&R6(e.command),x=!!e.workflow_id&&!!e.vendor_session_id,y=O6(e.id),v=!!e.vendor&&l,k=y6(y,v&&c);return d.jsxs("div",{className:"border-b border-zinc-200 last:border-b-0 dark:border-zinc-800",children:[d.jsxs("div",{className:"flex w-full items-center gap-3 px-4 py-3 min-w-0",children:[d.jsxs("button",{type:"button",onClick:()=>o(!l),className:"flex min-w-0 flex-1 items-center gap-3 text-left transition-colors hover:text-zinc-900 dark:hover:text-zinc-100",children:[l?d.jsx(Za,{className:"h-4 w-4 shrink-0 text-zinc-400"}):d.jsx(ji,{className:"h-4 w-4 shrink-0 text-zinc-400"}),d.jsx("span",{className:"min-w-0 flex-1 truncate font-mono text-sm",children:e.command})]}),d.jsx("span",{className:"shrink-0 text-xs text-zinc-500 dark:text-zinc-400",children:BR(e.started_at)}),d.jsx("span",{className:"shrink-0 text-xs tabular-nums text-zinc-500 dark:text-zinc-400",children:FR(e.duration_ms)}),d.jsx("span",{title:S6(e,h),className:ae("inline-flex shrink-0 items-center rounded-md border px-2 py-0.5 text-xs font-medium",z6(h)),children:N6(e,h)}),x&&d.jsx("button",{type:"button",onClick:()=>a(e),title:"Pick up in terminal","aria-label":"Pick up in terminal",className:ae("shrink-0 rounded-md p-1.5 text-zinc-400 transition-colors","hover:bg-zinc-100 hover:text-zinc-700","dark:hover:bg-zinc-800 dark:hover:text-zinc-200"),children:d.jsx(Oi,{className:"h-3.5 w-3.5"})}),g&&d.jsx("button",{type:"button",disabled:t,onClick:()=>r(e.command),title:"Re-run this command",className:ae("shrink-0 rounded-md p-1.5 text-zinc-400 transition-colors","hover:bg-indigo-50 hover:text-indigo-600","dark:hover:bg-indigo-500/10 dark:hover:text-indigo-400",t&&"cursor-not-allowed opacity-30"),children:d.jsx(ak,{className:"h-3.5 w-3.5"})})]}),l&&d.jsxs("div",{children:[(e.vendor||e.resolved_model)&&d.jsxs("dl",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-1 border-b border-zinc-100 bg-zinc-50 px-4 py-2 text-[11px] dark:border-zinc-800 dark:bg-zinc-900/50",children:[e.vendor&&d.jsxs(d.Fragment,{children:[d.jsx("dt",{className:"text-zinc-500 dark:text-zinc-500",children:"Vendor"}),d.jsx("dd",{className:"font-mono text-zinc-700 dark:text-zinc-300",children:e.vendor})]}),e.resolved_model&&d.jsxs(d.Fragment,{children:[d.jsx("dt",{className:"text-zinc-500 dark:text-zinc-500",children:"Model"}),d.jsx("dd",{className:"font-mono text-zinc-700 dark:text-zinc-300",children:e.resolved_model})]}),e.workflow_id&&d.jsxs(d.Fragment,{children:[d.jsx("dt",{className:"text-zinc-500 dark:text-zinc-500",children:"Workflow"}),d.jsx("dd",{className:"font-mono text-zinc-700 dark:text-zinc-300",children:e.workflow_id})]})]}),x&&d.jsx("div",{className:"border-b border-zinc-100 bg-zinc-50/50 px-4 py-2 dark:border-zinc-800 dark:bg-zinc-900/30",children:d.jsxs("button",{type:"button",onClick:()=>a(e),title:"Copy a resume command to continue this AI session in your terminal",className:"inline-flex items-center gap-1.5 rounded-md border border-zinc-200 bg-white px-3 py-1.5 text-xs font-medium text-zinc-700 transition-colors hover:bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-300 dark:hover:bg-zinc-700",children:[d.jsx(Oi,{className:"h-3.5 w-3.5"}),"Resume in terminal"]})}),v&&d.jsxs("div",{className:"flex items-center gap-2 border-b border-zinc-100 bg-zinc-50/50 px-4 py-2 dark:border-zinc-800 dark:bg-zinc-900/30",children:[d.jsx("span",{className:"text-[11px] text-zinc-500 dark:text-zinc-500",children:"View:"}),d.jsx(mv,{active:!c,onClick:()=>f(!1),children:"Raw output"}),d.jsx(mv,{active:c,onClick:()=>f(!0),children:"Timeline"}),c&&k.isLoading&&d.jsx("span",{className:"ml-auto text-[11px] text-zinc-500 dark:text-zinc-500",children:"Loading…"}),c&&!k.isLoading&&k.data?.length===0&&d.jsx("span",{className:"ml-auto text-[11px] text-zinc-500 dark:text-zinc-500",children:"No timeline data captured for this run."})]}),v&&c?k.data&&k.data.length>0?d.jsx("div",{className:"flex max-h-[400px] flex-col bg-white dark:bg-zinc-950",children:d.jsx(Hw,{events:k.data,isRunning:!1,className:"min-h-0 flex-1"})}):d.jsx("pre",{className:"max-h-[300px] overflow-y-auto bg-zinc-950 px-4 py-3 font-mono text-sm leading-relaxed text-zinc-300",children:e.output||"No output recorded."}):d.jsx("pre",{className:"max-h-[300px] overflow-y-auto bg-zinc-950 px-4 py-3 font-mono text-sm leading-relaxed text-zinc-300",children:e.output||"No output recorded."})]})]})}function j6({isRunning:e,onRerun:t}){const{data:r,isLoading:a}=x6(),[l,o]=_.useState(""),[c,f]=_.useState("all"),[h,m]=_.useState("date"),[g,x]=_.useState("desc"),[y,v]=_.useState(null),k=O=>{O===h?x(A=>A==="desc"?"asc":"desc"):(m(O),x(O==="date"?"desc":"asc"))},E=_.useMemo(()=>{if(!r)return[];let O=r;if(c!=="all"&&(O=O.filter(A=>Eo(A)===c)),l.trim()){const A=l.trim();O=O.filter(P=>{const $=P.command+(P.args?" "+P.args:"");return _6($,A)})}return[...O].sort((A,P)=>C6(A,P,h,g))},[r,c,l,h,g]),S=_.useMemo(()=>{if(!r)return{};const O={all:r.length,success:0,fail:0,cancelled:0,incomplete:0,running:0,stalled:0,orphaned:0};for(const A of r)O[Eo(A)]++;return O},[r]);if(a)return d.jsxs("div",{className:"rounded-lg border border-zinc-200 dark:border-zinc-800",children:[d.jsxs("div",{className:"flex items-center gap-2 border-b border-zinc-200 px-4 py-3 dark:border-zinc-800",children:[d.jsx(ny,{className:"h-4 w-4 text-zinc-500 dark:text-zinc-400"}),d.jsx("span",{className:"text-sm font-medium",children:"Command History"})]}),d.jsx("div",{className:"p-4 text-center text-sm text-zinc-500 dark:text-zinc-400",children:"Loading..."})]});const N=r&&r.length>0;return d.jsxs("div",{className:"overflow-hidden rounded-lg border border-zinc-200 dark:border-zinc-800",children:[d.jsxs("div",{className:"flex items-center gap-2 border-b border-zinc-200 bg-zinc-50 px-4 py-3 dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsx(ny,{className:"h-4 w-4 text-zinc-500 dark:text-zinc-400"}),d.jsx("span",{className:"text-sm font-medium",children:"Command History"}),N&&d.jsx("span",{className:"text-xs text-zinc-400 dark:text-zinc-500",children:E.length===r.length?`${r.length}`:`${E.length} / ${r.length}`})]}),N&&d.jsxs("div",{className:"space-y-2 border-b border-zinc-200 bg-zinc-50/50 px-4 py-2.5 dark:border-zinc-800 dark:bg-zinc-900/50",children:[d.jsxs("div",{className:"relative",children:[d.jsx(Qu,{className:"pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-zinc-400"}),d.jsx("input",{type:"text",value:l,onChange:O=>o(O.target.value),placeholder:"Search commands...",className:"w-full rounded-md border border-zinc-200 bg-white py-1.5 pl-8 pr-8 text-sm text-zinc-900 placeholder:text-zinc-400 focus:border-blue-400 focus:outline-none focus:ring-1 focus:ring-blue-400 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-100 dark:placeholder:text-zinc-500"}),l&&d.jsx("button",{type:"button",onClick:()=>o(""),className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-zinc-400 hover:text-zinc-600 dark:hover:text-zinc-300",children:d.jsx(Bn,{className:"h-3.5 w-3.5"})})]}),d.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[d.jsx("div",{className:"flex flex-wrap items-center gap-1",children:T6.map(O=>{const A=S[O.value]??0;return O.value!=="all"&&A===0?null:d.jsxs("button",{type:"button",onClick:()=>f(O.value),className:ae("inline-flex items-center gap-1 rounded-full px-2.5 py-1 text-xs font-medium transition-colors",c===O.value?"bg-zinc-900 text-white dark:bg-zinc-100 dark:text-zinc-900":"bg-zinc-100 text-zinc-600 hover:bg-zinc-200 dark:bg-zinc-800 dark:text-zinc-400 dark:hover:bg-zinc-700"),children:[O.label,d.jsx("span",{className:ae("tabular-nums",c===O.value?"text-zinc-300 dark:text-zinc-400":"text-zinc-400 dark:text-zinc-500"),children:A})]},O.value)})}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("span",{className:"text-[10px] uppercase tracking-wider text-zinc-400 dark:text-zinc-500",children:"Sort"}),d.jsx(fu,{label:"Date",field:"date",activeField:h,dir:g,onToggle:k}),d.jsx(fu,{label:"Command",field:"command",activeField:h,dir:g,onToggle:k}),d.jsx(fu,{label:"Duration",field:"duration",activeField:h,dir:g,onToggle:k}),d.jsx(fu,{label:"Status",field:"status",activeField:h,dir:g,onToggle:k})]})]})]}),N?E.length===0?d.jsx("div",{className:"p-6 text-center text-sm text-zinc-500 dark:text-zinc-400",children:"No commands match your filters."}):E.map(O=>d.jsx(M6,{entry:O,isRunning:e,onRerun:t,onHandoff:A=>{A.workflow_id&&v(A.workflow_id)}},O.id)):d.jsx("div",{className:"p-6 text-center text-sm text-zinc-500 dark:text-zinc-400",children:"No commands have been run yet."}),y&&d.jsx(Zm,{workflowId:y,onClose:()=>v(null)})]})}function D6({tabs:e,activeTabId:t,onSelectTab:r,onDismissTab:a}){return e.length===0?null:d.jsx("div",{className:"flex items-center gap-0.5 overflow-x-auto border-b border-zinc-200 bg-zinc-50 px-2 dark:border-zinc-800 dark:bg-zinc-900",children:e.map(l=>{const o=l.executionId===t,c=l.command.replace(/^ocr\s+/,"").split(/\s+/)[0]??"command";return d.jsxs("button",{type:"button",onClick:()=>r(l.executionId),className:ae("group relative flex items-center gap-1.5 whitespace-nowrap px-3 py-2 text-xs font-medium transition-colors",o?"border-b-2 border-indigo-500 text-zinc-900 dark:text-zinc-100":"text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-200"),children:[l.status==="running"?d.jsxs("span",{className:"relative flex h-2 w-2",children:[d.jsx("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-indigo-400 opacity-75"}),d.jsx("span",{className:"relative inline-flex h-2 w-2 rounded-full bg-indigo-500"})]}):l.status==="complete"?d.jsx(co,{className:"h-3 w-3 text-emerald-500"}):l.status==="cancelled"?d.jsx(vT,{className:"h-3 w-3 text-amber-500"}):d.jsx(cm,{className:"h-3 w-3 text-red-500"}),d.jsx("span",{className:"capitalize",children:c}),d.jsxs("span",{className:"text-[10px] text-zinc-400 dark:text-zinc-500",children:["#",l.executionId]}),l.status!=="running"&&d.jsx("span",{role:"button",tabIndex:0,onClick:f=>{f.stopPropagation(),a(l.executionId)},onKeyDown:f=>{(f.key==="Enter"||f.key===" ")&&(f.stopPropagation(),a(l.executionId))},className:"ml-1 rounded p-0.5 opacity-0 transition-opacity hover:bg-zinc-200 group-hover:opacity-100 dark:hover:bg-zinc-700",children:d.jsx(Bn,{className:"h-3 w-3"})})]},l.executionId)})})}const L6={claude:"Claude Code",opencode:"OpenCode"};function I6(){const{socket:e}=si(),t=Rn(),{isAvailable:r,activeCli:a,isDisabledByConfig:l}=Mo(),{tabs:o,activeTabId:c,runningCount:f,setActiveTabId:h,dismissTab:m,cancelCommand:g}=Km(),x=o.find(A=>A.executionId===c)??null,[y,v]=_.useState(null),k=_.useRef(null);ut("command:finished",()=>{t.invalidateQueries({queryKey:["command-history"]})});const E=_.useCallback(A=>{e&&e.emit("command:run",{command:A})},[e]),S=_.useCallback(()=>{x&&x.status==="running"&&g(x.executionId)},[x,g]),N=_.useCallback(A=>{const P=T5(A);P&&(v(P),k.current?.scrollIntoView({behavior:"smooth",block:"start"}))},[]),O=_.useCallback(()=>{v(null)},[]);return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-semibold",children:"Command Center"}),d.jsxs("p",{className:"mt-1 text-sm text-zinc-500 dark:text-zinc-400",children:["Launch AI-powered code review workflows.",a&&d.jsxs("span",{className:"ml-2 inline-flex items-center gap-1 rounded-full bg-zinc-100 px-2.5 py-0.5 text-[10px] font-medium text-zinc-600 dark:bg-zinc-800 dark:text-zinc-400",children:["Using ",L6[a]??a]})]})]}),r?d.jsx("div",{ref:k,children:d.jsx(O5,{isRunning:!1,runningCount:f,onRunCommand:E,prefill:y,onPrefillConsumed:O})}):d.jsx("div",{className:"rounded-lg border border-zinc-200 bg-zinc-50 p-6 dark:border-zinc-800 dark:bg-zinc-900/50",children:d.jsxs("div",{className:"flex items-start gap-3",children:[d.jsx(Oi,{className:"mt-0.5 h-5 w-5 shrink-0 text-zinc-400"}),d.jsxs("div",{children:[d.jsx("h3",{className:"text-sm font-medium text-zinc-900 dark:text-zinc-100",children:l?"AI Commands Disabled":"AI CLI Required"}),d.jsx("p",{className:"mt-1 text-sm text-zinc-500 dark:text-zinc-400",children:l?d.jsxs(d.Fragment,{children:["AI commands are turned off in your project config. Set ",d.jsx("code",{className:"rounded bg-zinc-200 px-1 py-0.5 text-xs dark:bg-zinc-800",children:"ai_cli"})," to"," ",d.jsx("code",{className:"rounded bg-zinc-200 px-1 py-0.5 text-xs dark:bg-zinc-800",children:"auto"}),","," ",d.jsx("code",{className:"rounded bg-zinc-200 px-1 py-0.5 text-xs dark:bg-zinc-800",children:"claude"}),", or"," ",d.jsx("code",{className:"rounded bg-zinc-200 px-1 py-0.5 text-xs dark:bg-zinc-800",children:"opencode"})," ","in ",d.jsx("code",{className:"rounded bg-zinc-200 px-1 py-0.5 text-xs dark:bg-zinc-800",children:".ocr/config.yaml"})," to enable them."]}):d.jsxs(d.Fragment,{children:["Install"," ",d.jsx("a",{href:"https://docs.anthropic.com/en/docs/claude-code/getting-started",target:"_blank",rel:"noopener noreferrer",className:"font-medium text-indigo-600 hover:text-indigo-500 dark:text-indigo-400",children:"Claude Code"})," ","or"," ",d.jsx("a",{href:"https://opencode.ai",target:"_blank",rel:"noopener noreferrer",className:"font-medium text-indigo-600 hover:text-indigo-500 dark:text-indigo-400",children:"OpenCode"})," ","to run AI-powered review commands from the dashboard."]})}),d.jsx("p",{className:"mt-2 text-xs text-zinc-400 dark:text-zinc-500",children:"You can still use OCR slash commands directly from your IDE, and browse existing sessions, reviews, and maps below."})]})]})}),o.length>0&&d.jsxs("div",{className:"overflow-hidden rounded-lg border border-zinc-200 dark:border-zinc-800",children:[d.jsx(D6,{tabs:o,activeTabId:c,onSelectTab:h,onDismissTab:m}),x&&d.jsx(g6,{bare:!0,output:x.output,events:x.events,isRunning:x.status==="running",exitCode:x.exitCode,status:x.status,commandName:x.command,onCancel:S})]}),d.jsx(j6,{isRunning:!1,onRerun:N})]})}const pv={holistic:{label:"Generalist",className:"bg-blue-100 text-blue-700 dark:bg-blue-900/50 dark:text-blue-300"},specialist:{label:"Specialist",className:"bg-emerald-100 text-emerald-700 dark:bg-emerald-900/50 dark:text-emerald-300"},persona:{label:"Persona",className:"bg-violet-100 text-violet-700 dark:bg-violet-900/50 dark:text-violet-300"},custom:{label:"Custom",className:"bg-amber-100 text-amber-700 dark:bg-amber-900/50 dark:text-amber-300"}};function B6({reviewer:e,onViewPrompt:t,inDefaultTeamCount:r}){const a=pv[e.tier]??pv.custom,l=r??(e.is_default?1:0);return d.jsxs("div",{className:"group flex flex-col rounded-lg border border-zinc-200 bg-white p-4 transition-colors hover:border-zinc-300 dark:border-zinc-800 dark:bg-zinc-900 dark:hover:border-zinc-700",children:[d.jsxs("div",{className:"mb-2 flex items-start gap-3",children:[d.jsx(Zs,{icon:e.icon,className:"mt-0.5 h-5 w-5 shrink-0 text-zinc-500 dark:text-zinc-400"}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("h3",{className:"truncate text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:e.name}),l>0&&d.jsx("span",{className:"shrink-0 rounded-full bg-indigo-100 px-1.5 py-0.5 text-[10px] font-medium text-indigo-700 dark:bg-indigo-900/50 dark:text-indigo-300",title:"Reviewer is part of the workspace's default team",children:l>1?`In default team ×${l}`:"In default team"})]}),d.jsx("span",{className:ae("mt-0.5 inline-block rounded-full px-1.5 py-0.5 text-[10px] font-medium",a.className),children:a.label})]})]}),d.jsx("p",{className:"mb-2 line-clamp-2 text-xs leading-relaxed text-zinc-500 dark:text-zinc-400",children:e.description}),e.known_for&&d.jsxs("p",{className:"mb-2 text-[11px] italic text-zinc-400 dark:text-zinc-500",children:["Known for: ",e.known_for]}),e.focus_areas.length>0&&d.jsxs("div",{className:"mb-3 flex flex-wrap gap-1",children:[e.focus_areas.slice(0,4).map(o=>d.jsx("span",{className:"rounded-full bg-zinc-100 px-2 py-0.5 text-[10px] text-zinc-600 dark:bg-zinc-800 dark:text-zinc-400",children:o},o)),e.focus_areas.length>4&&d.jsxs("span",{className:"rounded-full bg-zinc-100 px-2 py-0.5 text-[10px] text-zinc-400 dark:bg-zinc-800 dark:text-zinc-500",children:["+",e.focus_areas.length-4]})]}),d.jsx("div",{className:"mt-auto pt-1",children:d.jsxs("button",{type:"button",onClick:()=>t(e.id),className:"flex items-center gap-1.5 rounded-md px-2 py-1 text-xs font-medium text-zinc-500 transition-colors hover:bg-zinc-100 hover:text-zinc-700 dark:text-zinc-400 dark:hover:bg-zinc-800 dark:hover:text-zinc-200",children:[d.jsx(Yu,{className:"h-3 w-3"}),"View Prompt"]})})]})}const U6="(default model)",F6="Use the host CLI's default";function P6({className:e}){const{activeCli:t}=Mo(),{data:r,isLoading:a}=mk(),{data:l,isLoading:o}=pk(t??void 0),{reviewers:c,isLoaded:f}=Wm(),h=_5(),[m,g]=_.useState(null),[x,y]=_.useState(new Set),v=m??r?.team??[],[k,E]=_.useState("idle"),S=_.useRef(null),N=_.useMemo(()=>Y6(v),[v]),O=new Set(N.map(I=>I.persona)),A=c.filter(I=>!O.has(I.id)),P=_.useMemo(()=>new Set((r?.team??[]).map(I=>I.persona)),[r]),$=_.useMemo(()=>{const I=new Map;for(const C of r?.team??[]){const ue=I.get(C.persona)??[];ue.push(C),I.set(C.persona,ue)}for(const C of I.values())C.sort((ue,be)=>ue.instance_index-be.instance_index);return I},[r]),M=a||!f,K=_.useMemo(()=>r?!!(x.size>0||m&&!bv(m,r.team)):!1,[m,r,x]);_.useEffect(()=>{!m||!r||x.size>0||bv(m,r.team)&&g(null)},[m,r,x]);const z=_.useMemo(()=>{const I=[{id:"",label:U6,detail:F6}];if(l?.models)for(const C of l.models)I.push({id:C.id,label:C.displayName??C.id,detail:C.displayName?C.id:void 0});return I},[l]),W=!o&&(l?.models?.length??0)===0,[U,ee]=_.useState(null),[te,_e]=_.useState(!1),se=I=>{const C=m??r?.team??[];g(I(C))},X=I=>{y(C=>{const ue=new Set(C);return ue.add(I),ue})},F=I=>{y(C=>{const ue=new Set(C);return ue.delete(I),ue})},ne=I=>{g(C=>(C??r?.team??[]).filter(be=>be.persona!==I))},V=()=>{const C=(m??r?.team??[]).filter(ue=>!x.has(ue.persona));S.current&&clearTimeout(S.current),E("saving"),h.mutate(C,{onSuccess:()=>{g(C),y(new Set),E("saved"),S.current=setTimeout(()=>E("idle"),2e3)},onError:()=>E("error")})},fe=()=>{g(null),y(new Set),E("idle"),S.current&&clearTimeout(S.current)};_.useEffect(()=>{if(!K)return;const I=C=>{(C.metaKey||C.ctrlKey)&&C.key.toLowerCase()==="s"&&(C.preventDefault(),k!=="saving"&&V())};return window.addEventListener("keydown",I),()=>window.removeEventListener("keydown",I)},[K,k]),_.useEffect(()=>{if(!K)return;const I=C=>{C.preventDefault(),C.returnValue=""};return window.addEventListener("beforeunload",I),()=>window.removeEventListener("beforeunload",I)},[K]);const R=U?N.find(I=>I.persona===U)??null:null,j=U?c.find(I=>I.id===U)??null:null;return d.jsxs("section",{className:ae("space-y-4 rounded-lg border border-zinc-200 bg-white p-5 dark:border-zinc-800 dark:bg-zinc-900",e),children:[d.jsxs("header",{className:"flex items-start justify-between gap-3",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsx("h2",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:"Default team"}),d.jsx("p",{className:"mt-0.5 text-xs text-zinc-500 dark:text-zinc-400",children:"The reviewers and models used for new reviews in this workspace. Click a card to customize."})]}),d.jsx("div",{className:"shrink-0",children:K?d.jsx($6,{saving:k==="saving",onSave:V,onDiscard:fe}):d.jsx(G6,{state:k})})]}),M?d.jsx("p",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:"Loading team…"}):N.length===0&&A.length===0?d.jsxs("p",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:["No reviewers available. Run ",d.jsx("code",{className:"rounded bg-zinc-100 px-1.5 py-0.5 dark:bg-zinc-800",children:"/ocr:sync-reviewers"})," from your IDE to populate the library below."]}):d.jsxs("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:[N.map(I=>{const C=c.find(xe=>xe.id===I.persona)??null,ue=x.has(I.persona),be=!P.has(I.persona),ye=$.get(I.persona),le=!be&&!ue&&ye!=null&&!Z6(I.instances,ye);return d.jsx(H6,{group:I,meta:C,markedForRemoval:ue,isNewlyAdded:be,isModified:le,onEdit:()=>{ue||ee(I.persona)},onRemove:()=>{be?ne(I.persona):X(I.persona)},onUndoRemoval:()=>F(I.persona)},I.persona)}),d.jsx(q6,{disabled:A.length===0,picking:te,addable:A,onStart:()=>_e(!0),onCancel:()=>_e(!1),onSelect:I=>{_e(!1),se(C=>[...C,{persona:I,instance_index:1,name:`${I}-1`,model:null}]),ee(I)}})]}),R&&d.jsx(K6,{group:R,meta:j,modelOptions:z,modelListEmpty:W,onClose:()=>ee(null),onCountChange:I=>se(C=>Q6(C,R.persona,I)),onUniformModelChange:I=>se(C=>X6(C,R.persona,I)),onInstanceModelChange:(I,C)=>se(ue=>ue.map(be=>be.persona===R.persona&&be.instance_index===I?{...be,model:C}:be))})]})}function H6({group:e,meta:t,markedForRemoval:r,isNewlyAdded:a,isModified:l,onEdit:o,onRemove:c,onUndoRemoval:f}){const h=e.instances.length,m=e.instances.map(k=>k.model),g=Array.from(new Set(m)),x=g.length===1&&g[0]===null,y=x?"(default model)":g.length===1?V6(g[0]):`Mixed · ${g.length} models`,v=t?.name??e.persona;return d.jsxs("div",{role:"button",tabIndex:r?-1:0,"aria-disabled":r,onClick:r?void 0:o,onKeyDown:k=>{r||(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),o())},className:ae("group relative flex flex-col gap-2 rounded-lg border p-3 transition-colors",r?"cursor-default border-dashed border-amber-300 bg-amber-50/40 dark:border-amber-800/60 dark:bg-amber-950/20":a?"cursor-pointer border-dashed border-indigo-300/70 bg-indigo-50/30 hover:border-indigo-400 hover:bg-indigo-50/50 dark:border-indigo-700/70 dark:bg-indigo-950/20 dark:hover:border-indigo-600 dark:hover:bg-indigo-950/30":"cursor-pointer border-zinc-200 bg-white hover:border-zinc-300 hover:bg-zinc-50 dark:border-zinc-800 dark:bg-zinc-900 dark:hover:border-zinc-700 dark:hover:bg-zinc-800/50"),children:[d.jsxs("div",{className:"flex items-start gap-2",children:[t?.icon&&d.jsx(Zs,{icon:t.icon,className:ae("mt-0.5 h-4 w-4 shrink-0",r?"text-amber-600/70 dark:text-amber-500/70":"text-zinc-500 dark:text-zinc-400")}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("div",{className:"flex items-center gap-1.5",children:[d.jsx("h3",{className:ae("truncate text-sm font-medium",r?"text-amber-700/80 line-through decoration-amber-500/70 dark:text-amber-300/80":"text-zinc-900 dark:text-zinc-100"),children:v}),l&&d.jsx("span",{className:"inline-block h-1.5 w-1.5 shrink-0 rounded-full bg-amber-500",role:"status","aria-label":"Modified — unsaved",title:"Modified — unsaved"}),h>1&&d.jsxs("span",{className:ae("shrink-0 rounded-full px-1.5 py-0.5 text-[10px] font-medium tabular-nums",r?"bg-amber-100 text-amber-700 dark:bg-amber-950/50 dark:text-amber-300":"bg-zinc-100 text-zinc-700 dark:bg-zinc-800 dark:text-zinc-300"),children:["×",h]}),!r&&a&&d.jsx("span",{className:"shrink-0 rounded-full bg-indigo-100 px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wide text-indigo-700 dark:bg-indigo-950/50 dark:text-indigo-300",children:"New"})]}),r?d.jsx("p",{className:"mt-0.5 text-[11px] font-medium text-amber-700/80 dark:text-amber-400/80",children:"Will remove on save"}):t?.description&&d.jsx("p",{className:"mt-0.5 line-clamp-1 text-[11px] text-zinc-500 dark:text-zinc-500",children:t.description})]}),r?d.jsx("button",{type:"button",onClick:k=>{k.stopPropagation(),f()},"aria-label":`Undo removal of ${v}`,className:"shrink-0 rounded p-1 text-amber-700 transition-colors hover:bg-amber-100 dark:text-amber-400 dark:hover:bg-amber-950/40",children:d.jsx(ak,{className:"h-3.5 w-3.5"})}):d.jsx("button",{type:"button",onClick:k=>{k.stopPropagation(),c()},"aria-label":`Remove ${v} from default team`,className:ae("shrink-0 rounded p-1 opacity-0 transition-opacity","text-zinc-400 hover:bg-zinc-100 hover:text-zinc-600","group-hover:opacity-100 group-focus-within:opacity-100","dark:hover:bg-zinc-800 dark:hover:text-zinc-300"),children:d.jsx(Bn,{className:"h-3.5 w-3.5"})})]}),!r&&d.jsx("div",{className:"flex items-center gap-1.5 text-[11px]",children:d.jsx("span",{className:ae("truncate font-mono",x?"text-zinc-400 dark:text-zinc-600":"text-zinc-700 dark:text-zinc-300"),title:g.length===1&&g[0]?g[0]:g.length>1?g.filter(Boolean).join(" · "):void 0,children:y})})]})}function q6({disabled:e,picking:t,addable:r,onStart:a,onCancel:l,onSelect:o}){if(t){const c=r.map(f=>({id:f.id,label:f.name,detail:f.tier.charAt(0).toUpperCase()+f.tier.slice(1)}));return d.jsxs("div",{className:"flex flex-col gap-2 rounded-lg border border-dashed border-indigo-300 bg-indigo-50/30 p-3 dark:border-indigo-700 dark:bg-indigo-950/20",children:[d.jsx("span",{className:"text-[11px] font-medium uppercase tracking-wide text-indigo-700 dark:text-indigo-300",children:"Add reviewer"}),d.jsx(ko,{value:"",options:c,defaultOpen:!0,ariaLabel:"Choose a reviewer to add",freeTextPlaceholder:"Choose a reviewer…",onChange:f=>{f&&o(f)},onOpenChange:f=>{f||l()}})]})}return d.jsxs("button",{type:"button",onClick:a,disabled:e,className:ae("flex flex-col items-center justify-center gap-1.5 rounded-lg border border-dashed p-3 transition-colors","min-h-[88px]",e?"cursor-not-allowed border-zinc-200 text-zinc-300 dark:border-zinc-800 dark:text-zinc-700":"border-zinc-300 text-zinc-500 hover:border-zinc-400 hover:bg-zinc-50 hover:text-zinc-700 dark:border-zinc-700 dark:text-zinc-400 dark:hover:border-zinc-600 dark:hover:bg-zinc-800/50 dark:hover:text-zinc-200"),children:[d.jsx(wR,{className:"h-4 w-4"}),d.jsx("span",{className:"text-xs font-medium",children:"Add reviewer"})]})}function $6({saving:e,onSave:t,onDiscard:r}){return d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsxs("span",{className:"hidden items-center gap-1.5 text-[11px] text-amber-700 dark:text-amber-400 sm:inline-flex",children:[d.jsx("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-amber-500","aria-hidden":!0}),"Unsaved changes"]}),d.jsx("button",{type:"button",onClick:r,disabled:e,className:"rounded-md px-2.5 py-1.5 text-xs font-medium text-zinc-600 transition-colors hover:bg-zinc-100 hover:text-zinc-900 disabled:cursor-not-allowed disabled:opacity-50 dark:text-zinc-400 dark:hover:bg-zinc-800 dark:hover:text-zinc-100",children:"Discard"}),d.jsx("button",{type:"button",onClick:t,disabled:e,className:"inline-flex items-center gap-1.5 rounded-md bg-indigo-600 px-3 py-1.5 text-xs font-semibold text-white transition-colors hover:bg-indigo-500 disabled:cursor-not-allowed disabled:opacity-60 dark:bg-indigo-500 dark:hover:bg-indigo-400",children:e?d.jsxs(d.Fragment,{children:[d.jsx(qr,{className:"h-3 w-3 animate-spin"}),"Saving…"]}):d.jsx(d.Fragment,{children:"Save changes"})})]})}function G6({state:e}){return e==="idle"?null:e==="saving"?d.jsxs("span",{className:"inline-flex items-center gap-1.5 text-[11px] text-zinc-500 dark:text-zinc-400",children:[d.jsx(qr,{className:"h-3 w-3 animate-spin"}),"Saving…"]}):e==="saved"?d.jsxs("span",{className:"inline-flex items-center gap-1.5 text-[11px] text-emerald-600 dark:text-emerald-400",children:[d.jsx(Mr,{className:"h-3 w-3"}),"Saved"]}):d.jsx("span",{className:"text-[11px] text-red-600 dark:text-red-400",children:"Couldn't save"})}function K6({group:e,meta:t,modelOptions:r,modelListEmpty:a,onClose:l,onCountChange:o,onUniformModelChange:c,onInstanceModelChange:f}){const h=e.instances.length,m=e.instances.map(N=>N.model),x=new Set(m).size<=1,[y,v]=_.useState(x?"uniform":"per-instance");_.useEffect(()=>{!x&&y==="uniform"&&v("per-instance")},[x,y]);const k=_.useRef(null);_.useEffect(()=>{const N=O=>{O.key==="Escape"&&l()};return window.addEventListener("keydown",N),k.current?.focus(),()=>window.removeEventListener("keydown",N)},[l]);const E=e.instances[0]?.model??null,S=t?.name??e.persona;return d.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4 backdrop-blur-sm",onClick:l,children:d.jsxs("div",{ref:k,role:"dialog","aria-modal":"true","aria-labelledby":"edit-team-reviewer-title",tabIndex:-1,onClick:N=>N.stopPropagation(),className:"flex max-h-[85vh] w-full max-w-md flex-col overflow-hidden rounded-xl border border-zinc-200 bg-white shadow-2xl outline-none dark:border-zinc-700 dark:bg-zinc-900",children:[d.jsxs("div",{className:"flex items-start gap-3 border-b border-zinc-200 px-5 py-3.5 dark:border-zinc-700",children:[t?.icon&&d.jsx(Zs,{icon:t.icon,className:"mt-0.5 h-5 w-5 shrink-0 text-zinc-500 dark:text-zinc-400"}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsx("h2",{id:"edit-team-reviewer-title",className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:S}),t?.description&&d.jsx("p",{className:"mt-0.5 line-clamp-2 text-xs text-zinc-500 dark:text-zinc-400",children:t.description})]}),d.jsx("button",{type:"button",onClick:l,"aria-label":"Close",className:"shrink-0 rounded-md p-1 text-zinc-400 hover:bg-zinc-100 hover:text-zinc-600 dark:text-zinc-500 dark:hover:bg-zinc-800 dark:hover:text-zinc-300",children:d.jsx(Bn,{className:"h-4 w-4"})})]}),d.jsxs("div",{className:"flex-1 overflow-y-auto px-5 py-4 space-y-5",children:[d.jsxs("div",{children:[d.jsx("label",{className:"block text-xs font-medium uppercase tracking-wider text-zinc-500 dark:text-zinc-500",children:"Reviewer count"}),d.jsx("p",{className:"mt-0.5 text-[11px] text-zinc-500 dark:text-zinc-500",children:"How many independent reviews this persona produces per round."}),d.jsxs("div",{className:"mt-2 inline-flex items-center gap-0.5 rounded-md border border-zinc-200 dark:border-zinc-700",children:[d.jsx("button",{type:"button",onClick:()=>o(Math.max(1,h-1)),disabled:h<=1,"aria-label":"Decrease count",className:"px-2 py-1 text-zinc-500 hover:bg-zinc-100 hover:text-zinc-700 disabled:opacity-30 dark:text-zinc-400 dark:hover:bg-zinc-800 dark:hover:text-zinc-200",children:d.jsx(xo,{className:"h-3.5 w-3.5"})}),d.jsx("span",{className:"min-w-[2rem] px-2 text-center text-sm font-medium tabular-nums text-zinc-700 dark:text-zinc-300",children:h}),d.jsx("button",{type:"button",onClick:()=>o(h+1),"aria-label":"Increase count",className:"px-2 py-1 text-zinc-500 hover:bg-zinc-100 hover:text-zinc-700 dark:text-zinc-400 dark:hover:bg-zinc-800 dark:hover:text-zinc-200",children:d.jsx(pa,{className:"h-3.5 w-3.5"})})]})]}),d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("label",{className:"block text-xs font-medium uppercase tracking-wider text-zinc-500 dark:text-zinc-500",children:"Model"}),h>1&&d.jsxs("div",{className:"inline-flex items-center gap-0.5 rounded-md border border-zinc-200 p-0.5 dark:border-zinc-700",children:[d.jsx(gv,{active:y==="uniform"&&x,onClick:()=>{v("uniform"),x||c(E)},label:"Same model"}),d.jsx(gv,{active:y==="per-instance"||!x,onClick:()=>v("per-instance"),label:"Per reviewer"})]})]}),d.jsx("div",{className:"mt-2 space-y-2",children:y==="uniform"&&x||h===1?d.jsx(ko,{value:E??"",options:r,freeText:a,ariaLabel:"Model",onChange:N=>c(N||null)}):e.instances.map(N=>d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"w-28 shrink-0 truncate font-mono text-[11px] text-zinc-500 dark:text-zinc-500",children:N.name}),d.jsx(ko,{value:N.model??"",options:r,freeText:a,ariaLabel:`Model for ${N.name}`,onChange:O=>f(N.instance_index,O||null)})]},`${N.persona}-${N.instance_index}`))}),a&&d.jsx("p",{className:"mt-2 text-[11px] text-zinc-500 dark:text-zinc-500",children:"Your AI CLI didn't return a model list. Type any model id it accepts."})]}),d.jsxs("p",{className:"rounded-md border border-zinc-200 bg-zinc-50 px-3 py-2 text-[11px] text-zinc-600 dark:border-zinc-800 dark:bg-zinc-900/50 dark:text-zinc-400",children:["Edits stay in draft until you click ",d.jsx("span",{className:"font-medium text-zinc-800 dark:text-zinc-200",children:"Save changes"})," at the top of the section. Close to keep editing."]})]}),d.jsx("div",{className:"flex justify-end gap-2 border-t border-zinc-200 px-5 py-3 dark:border-zinc-700",children:d.jsx("button",{type:"button",onClick:l,className:"rounded-md bg-zinc-900 px-4 py-1.5 text-xs font-medium text-white transition-colors hover:bg-zinc-800 dark:bg-zinc-100 dark:text-zinc-900 dark:hover:bg-zinc-200",children:"Done"})})]})})}function gv({active:e,onClick:t,label:r}){return d.jsx("button",{type:"button",onClick:t,"aria-pressed":e,className:ae("rounded px-2 py-0.5 text-[11px] font-medium transition",e?"bg-zinc-900 text-white dark:bg-zinc-100 dark:text-zinc-900":"text-zinc-500 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-zinc-200"),children:r})}function V6(e){return(e.includes("/")?e.split("/").slice(-1)[0]:e).replace(/-\d{8,}$/,"")}function Y6(e){const t=new Map;for(const r of e){const a=t.get(r.persona)??[];a.push(r),t.set(r.persona,a)}for(const[r,a]of t)a.sort((l,o)=>l.instance_index-o.instance_index),t.set(r,a);return Array.from(t,([r,a])=>({persona:r,instances:a}))}function Q6(e,t,r){const a=e.filter(c=>c.persona!==t);if(r<=0)return a;const l=e.filter(c=>c.persona===t),o=[];for(let c=1;c<=r;c++){const f=l[c-1];o.push({persona:t,instance_index:c,name:f?.name??`${t}-${c}`,model:f?.model??l[0]?.model??null})}return[...a,...o].sort((c,f)=>c.persona===f.persona?c.instance_index-f.instance_index:0)}function X6(e,t,r){return e.map(a=>a.persona===t?{...a,model:r}:a)}function Z6(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){const a=e[r],l=t[r];if(a.persona!==l.persona||a.instance_index!==l.instance_index||a.name!==l.name||a.model!==l.model)return!1}return!0}function bv(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){const a=e[r],l=t[r];if(a.persona!==l.persona||a.instance_index!==l.instance_index||a.name!==l.name||a.model!==l.model)return!1}return!0}const W6={AGREE:{icon:bA,borderColor:"border-l-emerald-500",bgColor:"bg-emerald-500/5",label:"Agree"},CHALLENGE:{icon:fR,borderColor:"border-l-red-500",bgColor:"bg-red-500/5",label:"Challenge"},CONNECT:{icon:SA,borderColor:"border-l-blue-500",bgColor:"bg-blue-500/5",label:"Connect"},SURFACE:{icon:EA,borderColor:"border-l-amber-500",bgColor:"bg-amber-500/5",label:"Surface"}};function J6({type:e,content:t,reviewer:r,className:a}){const l=W6[e],o=l.icon;return d.jsxs("div",{className:ae("rounded-r-lg border-l-4 p-4",l.borderColor,l.bgColor,a),children:[d.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[d.jsx(o,{className:"h-4 w-4 text-zinc-600 dark:text-zinc-400"}),d.jsx("span",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:l.label}),r&&d.jsxs("span",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:["— ",r]})]}),d.jsx(jr,{content:t})]})}function e9(e){const t=[],r=/^###?\s+(AGREE|CHALLENGE|CONNECT|SURFACE)(?:\s*[-—]\s*(.+))?$/gm;let a,l=0,o=null;for(;(a=r.exec(e))!==null;)o&&(o.content=e.slice(l,a.index).trim(),t.push(o)),o={type:a[1],reviewer:a[2]?.trim(),content:""},l=a.index+a[0].length;return o&&(o.content=e.slice(l).trim(),t.push(o)),t}const $h={APPROVE:{icon:co,bg:"bg-emerald-500/10",border:"border-emerald-500/30",text:"text-emerald-700 dark:text-emerald-400",label:"Approved"},APPROVED:{icon:co,bg:"bg-emerald-500/10",border:"border-emerald-500/30",text:"text-emerald-700 dark:text-emerald-400",label:"Approved"},LGTM:{icon:co,bg:"bg-emerald-500/10",border:"border-emerald-500/30",text:"text-emerald-700 dark:text-emerald-400",label:"LGTM"},"REQUEST CHANGES":{icon:cm,bg:"bg-red-500/10",border:"border-red-500/30",text:"text-red-700 dark:text-red-400",label:"Changes Requested"},"CHANGES REQUESTED":{icon:cm,bg:"bg-red-500/10",border:"border-red-500/30",text:"text-red-700 dark:text-red-400",label:"Changes Requested"},"NEEDS DISCUSSION":{icon:ry,bg:"bg-amber-500/10",border:"border-amber-500/30",text:"text-amber-700 dark:text-amber-400",label:"Needs Discussion"},"NEEDS WORK":{icon:ry,bg:"bg-amber-500/10",border:"border-amber-500/30",text:"text-amber-700 dark:text-amber-400",label:"Needs Work"}},t9={icon:ek,bg:"bg-zinc-500/10",border:"border-zinc-500/30",text:"text-zinc-700 dark:text-zinc-300",label:"Verdict"};function n9(e){const t=e.trim(),r=t.toUpperCase();if($h[r])return $h[r];for(const[l,o]of Object.entries($h))if(r.startsWith(l))return o;const a=t.length>60?`${t.slice(0,60).trim()}…`:t;return{...t9,label:a||"Verdict"}}function r9({verdict:e,blockerCount:t,suggestionCount:r,shouldFixCount:a,className:l}){const o=n9(e),c=o.icon;return d.jsxs("div",{className:ae("flex items-center justify-between rounded-lg border p-4",o.bg,o.border,l),children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(c,{className:ae("h-6 w-6",o.text)}),d.jsx("span",{className:ae("text-lg font-semibold",o.text),children:o.label})]}),d.jsxs("div",{className:"flex items-center gap-4 text-sm",children:[t!=null&&d.jsx(Gh,{label:"Blockers",value:t,className:t>0?"text-red-600 dark:text-red-400":void 0}),a!=null&&d.jsx(Gh,{label:"Should Fix",value:a,className:a>0?"text-amber-600 dark:text-amber-400":void 0}),r!=null&&d.jsx(Gh,{label:"Suggestions",value:r})]})]})}function Gh({label:e,value:t,className:r}){return d.jsxs("div",{className:"flex items-center gap-1.5",children:[d.jsx("span",{className:ae("font-semibold tabular-nums",r??"text-zinc-700 dark:text-zinc-300"),children:t}),d.jsx("span",{className:"text-zinc-500 dark:text-zinc-400",children:e})]})}function i9({reviewer:e,onClose:t}){const{data:r,isLoading:a,error:l}=nn({queryKey:["reviewer-prompt",e?.id],queryFn:()=>Dt(`/api/reviewers/${e.id}/prompt`),enabled:e!=null});return _.useEffect(()=>{if(!e)return;const o=c=>{c.key==="Escape"&&t()};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[e,t]),e?d.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",onClick:t,children:d.jsxs("div",{role:"dialog","aria-modal":"true",className:"flex max-h-[85vh] w-full max-w-2xl flex-col overflow-hidden rounded-xl border border-zinc-200 bg-white shadow-2xl dark:border-zinc-700 dark:bg-zinc-900",onClick:o=>o.stopPropagation(),children:[d.jsxs("div",{className:"flex items-center gap-3 border-b border-zinc-200 px-5 py-3.5 dark:border-zinc-700",children:[d.jsx(Zs,{icon:e.icon,className:"h-5 w-5 shrink-0 text-zinc-500 dark:text-zinc-400"}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsx("h2",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:e.name}),d.jsx("p",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:e.description})]}),d.jsx("button",{type:"button",onClick:t,className:"rounded-md p-1 text-zinc-400 hover:bg-zinc-100 hover:text-zinc-600 dark:text-zinc-500 dark:hover:bg-zinc-800 dark:hover:text-zinc-300",children:d.jsx(Bn,{className:"h-4 w-4"})})]}),(e.known_for||e.philosophy||e.focus_areas.length>0)&&d.jsxs("div",{className:"border-b border-zinc-200 px-5 py-3 dark:border-zinc-700",children:[e.known_for&&d.jsxs("p",{className:"mb-1.5 text-xs",children:[d.jsx("span",{className:"font-semibold text-zinc-600 dark:text-zinc-300",children:"Known for: "}),d.jsx("span",{className:"text-zinc-500 dark:text-zinc-400",children:e.known_for})]}),e.philosophy&&d.jsxs("p",{className:"mb-2 text-xs italic text-zinc-500 dark:text-zinc-400",children:["“",e.philosophy,"”"]}),e.focus_areas.length>0&&d.jsx("div",{className:"flex flex-wrap gap-1",children:e.focus_areas.map(o=>d.jsx("span",{className:"rounded-full bg-zinc-100 px-2 py-0.5 text-[10px] text-zinc-600 dark:bg-zinc-800 dark:text-zinc-400",children:o},o))})]}),d.jsxs("div",{className:"flex-1 overflow-y-auto px-6 py-5",children:[a&&d.jsx("p",{className:"text-sm text-zinc-400 dark:text-zinc-500",children:"Loading prompt..."}),l&&d.jsx("div",{className:"rounded-lg border border-red-200 bg-red-50 p-4 text-sm text-red-600 dark:border-red-800 dark:bg-red-950/30 dark:text-red-400",children:"Prompt file not found. The reviewer may have been removed from disk."}),r?.content&&d.jsx(jr,{content:r.content})]})]})}):null}function a9({open:e,onClose:t}){const{socket:r}=si(),[a,l]=_.useState(""),[o,c]=_.useState(""),[f,h]=_.useState(""),[m,g]=_.useState(null),[x,y]=_.useState(!1),v=_.useRef(null),k=_.useRef(null),E=w5(a),S=E.length>0&&o.trim().length>0&&m===null;_.useEffect(()=>{e&&(l(""),c(""),h(""),g(null),y(!1),setTimeout(()=>v.current?.focus(),50))},[e]),_.useEffect(()=>{if(!e)return;const O=A=>{A.key==="Escape"&&m===null&&t()};return window.addEventListener("keydown",O),()=>window.removeEventListener("keydown",O)},[e,t,m]),ut("command:started",O=>{O.command.startsWith("create-reviewer")&&g(O.execution_id)}),ut("command:output",O=>{O.execution_id===m&&(h(A=>A+O.content),setTimeout(()=>{k.current&&(k.current.scrollTop=k.current.scrollHeight)},0))}),ut("command:finished",O=>{O.execution_id===m&&(g(null),y(!0))});const N=_.useCallback(()=>{if(!S||!r)return;h(""),y(!1);const O=`create-reviewer ${E} --focus "${o.replace(/"/g,'\\"')}"`;r.emit("command:run",{command:O})},[S,r,E,o]);return e?d.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",children:d.jsxs("div",{role:"dialog","aria-modal":"true",className:"flex w-full max-w-lg flex-col overflow-hidden rounded-xl border border-zinc-200 bg-white shadow-2xl dark:border-zinc-700 dark:bg-zinc-900",children:[d.jsxs("div",{className:"flex items-center justify-between border-b border-zinc-200 px-5 py-3.5 dark:border-zinc-700",children:[d.jsx("h2",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:"Create Reviewer"}),d.jsx("button",{type:"button",onClick:t,disabled:m!==null,className:"rounded-md p-1 text-zinc-400 hover:bg-zinc-100 hover:text-zinc-600 disabled:opacity-30 dark:text-zinc-500 dark:hover:bg-zinc-800 dark:hover:text-zinc-300",children:d.jsx(Bn,{className:"h-4 w-4"})})]}),d.jsxs("div",{className:"space-y-4 px-5 py-4",children:[d.jsxs("div",{children:[d.jsx("label",{className:"mb-1 block text-xs font-medium text-zinc-700 dark:text-zinc-300",children:"Reviewer Name"}),d.jsx("input",{ref:v,type:"text",value:a,onChange:O=>l(O.target.value),placeholder:"e.g. API Design, Rust Safety, GraphQL",disabled:m!==null,className:ae("w-full rounded-md border py-2 px-3 text-sm","border-zinc-200 bg-zinc-50 placeholder:text-zinc-400","dark:border-zinc-700 dark:bg-zinc-800 dark:placeholder:text-zinc-500","focus:border-indigo-400 focus:outline-none focus:ring-1 focus:ring-indigo-400/50","disabled:opacity-50")}),E&&d.jsxs("p",{className:"mt-1 text-[11px] text-zinc-400 dark:text-zinc-500",children:["Slug: ",d.jsx("code",{className:"rounded bg-zinc-100 px-1 py-0.5 dark:bg-zinc-800",children:E})]})]}),d.jsxs("div",{children:[d.jsx("label",{className:"mb-1 block text-xs font-medium text-zinc-700 dark:text-zinc-300",children:"What should this reviewer focus on?"}),d.jsx("textarea",{value:o,onChange:O=>c(O.target.value),placeholder:"e.g. REST API design, backwards compatibility, versioning, error response consistency, pagination patterns",rows:3,disabled:m!==null,className:ae("w-full resize-none rounded-md border py-2 px-3 text-sm","border-zinc-200 bg-zinc-50 placeholder:text-zinc-400","dark:border-zinc-700 dark:bg-zinc-800 dark:placeholder:text-zinc-500","focus:border-indigo-400 focus:outline-none focus:ring-1 focus:ring-indigo-400/50","disabled:opacity-50")})]})]}),f&&d.jsx("div",{ref:k,className:"mx-5 mb-4 max-h-48 overflow-y-auto rounded-lg border border-zinc-200 bg-zinc-50 p-3 font-mono text-[11px] leading-relaxed text-zinc-600 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-400",children:d.jsx("pre",{className:"whitespace-pre-wrap",children:f})}),d.jsx("div",{className:"flex items-center justify-end gap-2 border-t border-zinc-200 px-5 py-3 dark:border-zinc-700",children:x?d.jsx("button",{type:"button",onClick:t,className:"rounded-md bg-indigo-600 px-4 py-1.5 text-xs font-medium text-white transition-colors hover:bg-indigo-700",children:"Done"}):d.jsxs(d.Fragment,{children:[d.jsx("button",{type:"button",onClick:t,disabled:m!==null,className:"rounded-md border border-zinc-300 px-4 py-1.5 text-xs font-medium transition-colors hover:bg-zinc-100 disabled:opacity-30 dark:border-zinc-700 dark:hover:bg-zinc-800",children:"Cancel"}),d.jsx("button",{type:"button",onClick:N,disabled:!S,className:"flex items-center gap-1.5 rounded-md bg-indigo-600 px-4 py-1.5 text-xs font-medium text-white transition-colors hover:bg-indigo-700 disabled:opacity-50",children:m!==null?d.jsxs(d.Fragment,{children:[d.jsx(qr,{className:"h-3 w-3 animate-spin"}),"Creating..."]}):d.jsxs(d.Fragment,{children:[d.jsx(pa,{className:"h-3 w-3"}),"Create"]})})]})})]})}):null}function s9(){const{reviewers:e,isLoaded:t}=Wm(),{isAvailable:r}=Mo(),{socket:a}=si(),{data:l}=mk(),o=_.useMemo(()=>{const M={};for(const K of l?.team??[])M[K.persona]=(M[K.persona]??0)+1;return M},[l]),[c,f]=_.useState(""),[h,m]=_.useState(new Set),[g,x]=_.useState(null),[y,v]=_.useState(!1),[k,E]=_.useState(null),S=_.useMemo(()=>fk(e,c),[e,c]),N=_.useMemo(()=>hk(S),[S]),O=g?e.find(M=>M.id===g)??null:null;function A(M){m(K=>{const z=new Set(K);return z.has(M)?z.delete(M):z.add(M),z})}const P=k!==null;ut("command:started",M=>{M.command.startsWith("sync-reviewers")&&E(M.execution_id)}),ut("command:finished",M=>{M.execution_id===k&&E(null)});const $=_.useCallback(()=>{!a||P||a.emit("command:run",{command:"sync-reviewers"})},[a,P]);return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("h1",{className:"text-2xl font-semibold",children:"Review Team"}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsxs("button",{type:"button",onClick:$,disabled:!r||P,title:r?"Sync reviewer metadata":"AI CLI required",className:ae("flex items-center gap-1.5 rounded-md border px-3 py-1.5 text-xs font-medium transition-colors","border-zinc-300 text-zinc-600 hover:bg-zinc-100","dark:border-zinc-700 dark:text-zinc-400 dark:hover:bg-zinc-800","disabled:opacity-40 disabled:cursor-not-allowed"),children:[P?d.jsx(qr,{className:"h-3.5 w-3.5 animate-spin"}):d.jsx(vo,{className:"h-3.5 w-3.5"}),"Sync"]}),d.jsxs("button",{type:"button",onClick:()=>v(!0),disabled:!r,title:r?"Create a new reviewer":"AI CLI required to create reviewers",className:ae("flex items-center gap-1.5 rounded-md bg-indigo-600 px-3 py-1.5 text-xs font-medium text-white transition-colors","hover:bg-indigo-700","disabled:opacity-40 disabled:cursor-not-allowed"),children:[d.jsx(pa,{className:"h-3.5 w-3.5"}),"Create Reviewer"]})]})]}),d.jsx("p",{className:"mt-1 text-sm text-zinc-500 dark:text-zinc-400",children:"Manage your AI reviewer personas."})]}),d.jsx(P6,{}),d.jsxs("div",{className:"relative",children:[d.jsx(Qu,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-zinc-400"}),d.jsx("input",{type:"text",value:c,onChange:M=>f(M.target.value),placeholder:"Search reviewers...",className:ae("w-full rounded-lg border py-2.5 pl-9 pr-4 text-sm","border-zinc-200 bg-zinc-50 placeholder:text-zinc-400","dark:border-zinc-800 dark:bg-zinc-900 dark:placeholder:text-zinc-500","focus:border-indigo-400 focus:outline-none focus:ring-1 focus:ring-indigo-400/50")})]}),t?e.length===0?d.jsxs("div",{className:"rounded-lg border border-zinc-200 bg-zinc-50 p-8 text-center dark:border-zinc-800 dark:bg-zinc-900/50",children:[d.jsx(Xm,{className:"mx-auto mb-3 h-8 w-8 text-zinc-300 dark:text-zinc-600"}),d.jsx("h3",{className:"text-sm font-medium text-zinc-900 dark:text-zinc-100",children:"No reviewers found"}),d.jsxs("p",{className:"mt-1 text-sm text-zinc-500 dark:text-zinc-400",children:["Click ",d.jsx("strong",{children:"Sync"})," above or run"," ",d.jsx("code",{className:"rounded bg-zinc-200 px-1.5 py-0.5 text-xs dark:bg-zinc-800",children:"/ocr:sync-reviewers"})," ","from your IDE to populate your reviewer team."]})]}):N.length===0?d.jsx("p",{className:"py-8 text-center text-sm text-zinc-400 dark:text-zinc-500",children:"No reviewers match your search."}):d.jsx("div",{className:"space-y-6",children:N.map(([M,K])=>{const z=h.has(M),W=Ru[M];return d.jsxs("div",{children:[d.jsxs("button",{type:"button",onClick:()=>A(M),className:"mb-3 flex w-full items-center gap-2 text-left text-xs font-semibold uppercase tracking-wider text-zinc-400 hover:text-zinc-600 dark:text-zinc-500 dark:hover:text-zinc-300",children:[z?d.jsx(ji,{className:"h-3.5 w-3.5"}):d.jsx(Za,{className:"h-3.5 w-3.5"}),W.label,d.jsxs("span",{className:"font-normal text-zinc-300 dark:text-zinc-600",children:["(",K.length,")"]})]}),!z&&d.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:K.map(U=>d.jsx(B6,{reviewer:U,onViewPrompt:x,inDefaultTeamCount:o[U.id]??0},U.id))})]},M)})}):d.jsx("p",{className:"text-sm text-zinc-400 dark:text-zinc-500",children:"Loading reviewers..."}),d.jsx(i9,{reviewer:O,onClose:()=>x(null)}),d.jsx(a9,{open:y,onClose:()=>v(!1)})]})}function qw({value:e,max:t,className:r,showLabel:a=!1,size:l="md"}){const o=t>0?Math.round(e/t*100):0,c=Math.min(100,Math.max(0,o));return d.jsxs("div",{className:ae("flex items-center gap-2",r),children:[d.jsx("div",{className:ae("flex-1 overflow-hidden rounded-full bg-zinc-200 dark:bg-zinc-800",l==="sm"?"h-1.5":"h-2.5"),role:"progressbar","aria-valuenow":e,"aria-valuemin":0,"aria-valuemax":t,"aria-label":`${e} of ${t} (${c}%)`,children:d.jsx("div",{className:ae("h-full rounded-full transition-all duration-300",c===100?"bg-emerald-500":c>50?"bg-blue-500":"bg-amber-500"),style:{width:`${c}%`}})}),a&&d.jsxs("span",{className:"text-xs tabular-nums text-zinc-500 dark:text-zinc-400",children:[e,"/",t]})]})}function l9({file:e,onToggle:t,highlighted:r}){const{data:a}=Qs();return d.jsxs("label",{"data-file-id":e.id,className:ae("group flex cursor-pointer items-center gap-3 px-4 py-2.5 pl-11 transition-colors hover:bg-zinc-50 dark:hover:bg-zinc-800/50",r&&"bg-indigo-50 ring-1 ring-inset ring-indigo-200 dark:bg-indigo-950/30 dark:ring-indigo-800"),children:[d.jsx("input",{type:"checkbox",checked:e.is_reviewed,onChange:l=>t(l.target.checked),className:"h-4 w-4 rounded border-zinc-300 text-emerald-600 focus:ring-emerald-500 dark:border-zinc-600 dark:bg-zinc-800"}),d.jsx(Yu,{className:"h-4 w-4 shrink-0 text-zinc-400"}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("span",{className:"flex items-center gap-1.5",children:[a?d.jsx("a",{href:Tu(a.ide,a.projectRoot,e.file_path),onClick:l=>l.stopPropagation(),className:ae("truncate text-sm font-mono hover:underline",e.is_reviewed?"text-zinc-400 line-through dark:text-zinc-500":"text-zinc-900 dark:text-zinc-100"),title:`Open in ${a.ide}`,children:e.file_path}):d.jsx("span",{className:ae("truncate text-sm font-mono",e.is_reviewed?"text-zinc-400 line-through dark:text-zinc-500":"text-zinc-900 dark:text-zinc-100"),children:e.file_path}),a&&d.jsx(Ym,{className:"h-3 w-3 shrink-0 text-zinc-400 opacity-0 transition-opacity group-hover:opacity-100"})]}),e.role&&d.jsx("span",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:e.role})]}),d.jsxs("div",{className:"flex items-center gap-2 text-xs tabular-nums",children:[e.lines_added>0&&d.jsxs("span",{className:"flex items-center gap-0.5 text-emerald-600 dark:text-emerald-400",children:[d.jsx(pa,{className:"h-3 w-3"}),e.lines_added]}),e.lines_deleted>0&&d.jsxs("span",{className:"flex items-center gap-0.5 text-red-600 dark:text-red-400",children:[d.jsx(xo,{className:"h-3 w-3"}),e.lines_deleted]})]})]})}function o9({section:e,onToggleFile:t}){const[r,a]=_.useState(!1),[l,o]=_.useState(null),c=_.useRef(null),{data:f}=Qs();_.useEffect(()=>{!r||l==null||!c.current||requestAnimationFrame(()=>{c.current?.querySelector(`[data-file-id="${l}"]`)?.scrollIntoView({behavior:"smooth",block:"nearest"})})},[r,l]);const h=_.useCallback(m=>{if(m.stopPropagation(),!f||e.files.length===0)return;a(!0);const g=e.files.find(E=>!E.is_reviewed);o(g?.id??e.files[0]?.id??null);const x=e.files.filter(E=>!E.is_reviewed),v=(x.length>0?x:e.files).map(E=>Tu(f.ide,f.projectRoot,E.file_path));function k(E){if(E>=v.length)return;const S=document.createElement("iframe");S.style.display="none",S.src=v[E],document.body.appendChild(S),setTimeout(()=>{S.remove(),k(E+1)},500)}k(0)},[f,e.files]);return d.jsxs("div",{className:"rounded-lg border border-zinc-200 bg-white dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsxs("button",{onClick:()=>a(!r),"aria-expanded":r,className:"flex w-full items-start gap-3 p-4 text-left transition-colors hover:bg-zinc-50 dark:hover:bg-zinc-800/50",children:[d.jsx("div",{className:"mt-0.5 text-zinc-400",children:r?d.jsx(Za,{className:"h-4 w-4"}):d.jsx(ji,{className:"h-4 w-4"})}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(uA,{className:"h-4 w-4 text-zinc-400"}),d.jsxs("span",{className:"text-sm font-medium text-zinc-900 dark:text-zinc-100",children:[e.section_number,". ",e.title]}),d.jsxs("span",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:[e.file_count," ",e.file_count===1?"file":"files"]}),f&&e.files.length>0&&d.jsxs("button",{onClick:h,title:`Open all ${e.file_count} files in ${f.ide}`,className:"inline-flex items-center gap-1 rounded-md border border-zinc-200 bg-white px-2 py-0.5 text-xs text-zinc-600 transition-colors hover:border-zinc-300 hover:bg-zinc-50 hover:text-zinc-900 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-400 dark:hover:border-zinc-600 dark:hover:bg-zinc-700 dark:hover:text-zinc-200",children:[d.jsx(oA,{className:"h-3 w-3"}),"Open all"]})]}),e.description&&d.jsx("p",{className:"mt-1 text-xs text-zinc-500 dark:text-zinc-400",children:e.description}),d.jsx("div",{className:"mt-2",children:d.jsx(qw,{value:e.reviewed_count,max:e.file_count,showLabel:!0,size:"sm"})})]})]}),r&&d.jsx("div",{ref:c,className:ae("border-t border-zinc-200 dark:border-zinc-800",e.files.length>0&&"divide-y divide-zinc-100 dark:divide-zinc-800"),children:e.files.length===0?d.jsx("p",{className:"px-4 py-3 text-sm text-zinc-500 dark:text-zinc-400",children:"No files in this section."}):e.files.map(m=>d.jsx(l9,{file:m,highlighted:m.id===l,onToggle:g=>{if(t(m.id,g),g&&m.id===l){const x=e.files.find(y=>y.id!==m.id&&!y.is_reviewed);o(x?.id??null)}}},m.id))})]})}function c9({onConfirm:e,isPending:t}){const[r,a]=_.useState(!1),l=_.useRef(null),o=_.useCallback(()=>a(!1),[]);return _.useEffect(()=>{if(!r)return;const c=f=>{f.key==="Escape"&&o()};return document.addEventListener("keydown",c),l.current?.focus(),()=>document.removeEventListener("keydown",c)},[r,o]),d.jsxs(d.Fragment,{children:[d.jsxs("button",{onClick:()=>a(!0),className:"inline-flex items-center gap-1.5 rounded-md border border-zinc-200 px-3 py-1.5 text-xs font-medium text-zinc-600 transition-colors hover:bg-zinc-100 hover:text-zinc-900 dark:border-zinc-700 dark:text-zinc-400 dark:hover:bg-zinc-800 dark:hover:text-zinc-100",children:[d.jsx(yR,{className:"h-3.5 w-3.5"}),"Clear Progress"]}),r&&d.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[d.jsx("div",{className:"fixed inset-0 bg-black/50",onClick:o}),d.jsxs("div",{ref:l,role:"dialog","aria-modal":"true","aria-labelledby":"clear-progress-title",tabIndex:-1,className:"relative z-10 w-full max-w-sm rounded-lg border border-zinc-200 bg-white p-6 shadow-lg dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsx("button",{onClick:o,className:"absolute right-4 top-4 text-zinc-400 hover:text-zinc-600 dark:hover:text-zinc-300","aria-label":"Close dialog",children:d.jsx(Bn,{className:"h-4 w-4"})}),d.jsx("h3",{id:"clear-progress-title",className:"text-lg font-semibold text-zinc-900 dark:text-zinc-100",children:"Clear all progress?"}),d.jsx("p",{className:"mt-2 text-sm text-zinc-600 dark:text-zinc-400",children:"This will uncheck all reviewed files for this map run. This action cannot be undone."}),d.jsxs("div",{className:"mt-6 flex justify-end gap-3",children:[d.jsx("button",{onClick:()=>a(!1),className:"rounded-md border border-zinc-200 px-3 py-1.5 text-sm font-medium text-zinc-700 transition-colors hover:bg-zinc-100 dark:border-zinc-700 dark:text-zinc-300 dark:hover:bg-zinc-800",children:"Cancel"}),d.jsx("button",{onClick:()=>{e(),a(!1)},disabled:t,className:ae("rounded-md bg-red-600 px-3 py-1.5 text-sm font-medium text-white transition-colors hover:bg-red-700",t&&"cursor-not-allowed opacity-50"),children:t?"Clearing...":"Clear Progress"})]})]})]})]})}function u9(e,t){const r=Rn(),a=["sessions",e,"runs",t],l=nn({queryKey:a,queryFn:()=>Dt(`/api/sessions/${e}/runs/${t}`),enabled:!!e&&t>0});return ut("artifact:updated",()=>{r.invalidateQueries({queryKey:a})}),l}function d9(e){return nn({queryKey:["sessions",e,"artifacts","map"],queryFn:()=>Dt(`/api/sessions/${e}/artifacts/map`),enabled:!!e})}function f9(e,t){const r=Rn(),a=["sessions",e,"runs",t];return Ao({mutationFn:async({fileId:l,isReviewed:o})=>Dt(`/api/map-files/${l}/progress`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({is_reviewed:o})}),onMutate:async({fileId:l,isReviewed:o})=>{await r.cancelQueries({queryKey:a});const c=r.getQueryData(a);return c&&r.setQueryData(a,{...c,sections:c.sections.map(f=>({...f,reviewed_count:f.files.some(h=>h.id===l)?f.reviewed_count+(o?1:-1):f.reviewed_count,files:f.files.map(h=>h.id===l?{...h,is_reviewed:o,reviewed_at:o?new Date().toISOString():null}:h)}))}),{previous:c}},onError:(l,o,c)=>{c?.previous&&r.setQueryData(a,c.previous)},onSettled:()=>{r.invalidateQueries({queryKey:a})}})}function h9(e,t){const r=Rn();return Ao({mutationFn:async a=>Dt(`/api/map-runs/${a}/progress`,{method:"DELETE"}),onSuccess:()=>{r.invalidateQueries({queryKey:["sessions",e,"runs",t]})}})}function m9({sessionId:e}){const[t,r]=_.useState(!1),{data:a,isLoading:l}=d9(e),o=_.useRef(null),c=_.useCallback(()=>r(!1),[]);return _.useEffect(()=>{if(!t)return;const f=h=>{h.key==="Escape"&&c()};return document.addEventListener("keydown",f),o.current?.focus(),()=>document.removeEventListener("keydown",f)},[t,c]),d.jsxs(d.Fragment,{children:[d.jsxs("button",{onClick:()=>r(!0),className:"inline-flex items-center gap-1.5 rounded-md border border-zinc-200 px-3 py-1.5 text-xs font-medium text-zinc-600 transition-colors hover:bg-zinc-100 hover:text-zinc-900 dark:border-zinc-700 dark:text-zinc-400 dark:hover:bg-zinc-800 dark:hover:text-zinc-100",children:[d.jsx(nA,{className:"h-3.5 w-3.5"}),"View Raw Map"]}),t&&d.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[d.jsx("div",{className:"fixed inset-0 bg-black/50",onClick:c}),d.jsxs("div",{ref:o,role:"dialog","aria-modal":"true","aria-labelledby":"raw-map-title",tabIndex:-1,className:"relative z-10 flex max-h-[85vh] w-full max-w-4xl flex-col rounded-lg border border-zinc-200 bg-white shadow-lg dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsxs("div",{className:"flex items-center justify-between border-b border-zinc-200 px-6 py-4 dark:border-zinc-800",children:[d.jsx("h3",{id:"raw-map-title",className:"text-lg font-semibold text-zinc-900 dark:text-zinc-100",children:"Raw Map Output"}),d.jsx("button",{onClick:c,className:"text-zinc-400 hover:text-zinc-600 dark:hover:text-zinc-300","aria-label":"Close",children:d.jsx(Bn,{className:"h-5 w-5"})})]}),d.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-4",children:l?d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Loading map content..."}):a?.content?d.jsx(jr,{content:a.content}):d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"No map content available."})})]})]})]})}const p9="modulepreload",g9=function(e){return"/"+e},xv={},b9=function(t,r,a){let l=Promise.resolve();if(r&&r.length>0){let c=function(m){return Promise.all(m.map(g=>Promise.resolve(g).then(x=>({status:"fulfilled",value:x}),x=>({status:"rejected",reason:x}))))};document.getElementsByTagName("link");const f=document.querySelector("meta[property=csp-nonce]"),h=f?.nonce||f?.getAttribute("nonce");l=c(r.map(m=>{if(m=g9(m),m in xv)return;xv[m]=!0;const g=m.endsWith(".css"),x=g?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${m}"]${x}`))return;const y=document.createElement("link");if(y.rel=g?"stylesheet":p9,g||(y.as="script"),y.crossOrigin="",y.href=m,h&&y.setAttribute("nonce",h),document.head.appendChild(y),g)return new Promise((v,k)=>{y.addEventListener("load",v),y.addEventListener("error",()=>k(new Error(`Unable to preload CSS for ${m}`)))})}))}function o(c){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=c,window.dispatchEvent(f),!f.defaultPrevented)throw c}return l.then(c=>{for(const f of c||[])f.status==="rejected"&&o(f.reason);return t().catch(o)})},x9=_.lazy(()=>b9(()=>import("./mermaid-renderer-Bjo170ax.js").then(e=>e.bC),[]));function y9({sessionId:e,runNumber:t,sections:r,onSectionClick:a}){const{resolved:l}=s1(),{data:o,isLoading:c}=nn({queryKey:["sessions",e,"runs",t,"graph"],queryFn:async()=>{try{return await Dt(`/api/sessions/${e}/runs/${t}/graph`)}catch(m){if(m instanceof Error&&m.message.startsWith("404:"))return null;throw m}},enabled:!!e&&t>0,retry:!1}),f=_.useMemo(()=>o?.dependencies?v9(o.dependencies,r,l):null,[o?.dependencies,r,l]),h=_.useCallback(m=>{const g=r.find(x=>lo(x.title)===m);g&&a&&a(g.id)},[r,a]);return c||!f?null:d.jsxs("div",{className:"overflow-hidden rounded-lg border border-zinc-200 dark:border-zinc-800",children:[d.jsxs("div",{className:"flex items-center gap-2 border-b border-zinc-200 bg-zinc-50 px-4 py-3 dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsx(Ys,{className:"h-4 w-4 text-zinc-500 dark:text-zinc-400"}),d.jsx("span",{className:"text-sm font-medium",children:"Section Dependencies"})]}),d.jsx("div",{className:"p-4",children:d.jsx(_.Suspense,{fallback:d.jsx("div",{className:"h-64 animate-pulse rounded-lg bg-zinc-100 dark:bg-zinc-800"}),children:d.jsx(x9,{definition:f,onNodeClick:h})})})]})}function v9(e,t,r){if(t.length===0)return null;const a=r==="dark",l=["graph TD"];for(const o of t){const c=lo(o.title),f=o.reviewed_count,h=o.file_count,m=`${o.title}<br/>${f}/${h} files`;l.push(` ${c}["${m}"]`)}for(const o of e){const c=lo(o.fromTitle),f=lo(o.toTitle),h=o.relationship.replace(/"/g,"'");l.push(` ${c} -->|"${h}"| ${f}`)}a?(l.push(""),l.push(" classDef notStarted fill:#27272a,stroke:#71717a,color:#d4d4d8"),l.push(" classDef inProgress fill:#422006,stroke:#f59e0b,color:#fef3c7"),l.push(" classDef complete fill:#052e16,stroke:#22c55e,color:#dcfce7")):(l.push(""),l.push(" classDef notStarted fill:#f4f4f5,stroke:#a1a1aa,color:#3f3f46"),l.push(" classDef inProgress fill:#fef9c3,stroke:#f59e0b,color:#78350f"),l.push(" classDef complete fill:#dcfce7,stroke:#22c55e,color:#166534"));for(const o of t){const c=lo(o.title),f=o.file_count>0?o.reviewed_count/o.file_count:0;f>=1?l.push(` class ${c} complete`):f>0?l.push(` class ${c} inProgress`):l.push(` class ${c} notStarted`)}return l.join(`
|
|
565
|
+
`)}function lo(e){return e.replace(/[^a-zA-Z0-9]/g,"_").replace(/_+/g,"_").replace(/^_|_$/g,"")}function k9(e,t,r){const{socket:a}=si(),l=`chat-${e}-${t}-${r}`,[o,c]=_.useState([]),[f,h]=_.useState(!1),[m,g]=_.useState(""),[x,y]=_.useState(null),[v,k]=_.useState([]),[E,S]=_.useState(null),N=_.useRef("");_.useEffect(()=>{a&&a.emit("chat:history",{conversationId:l})},[a,l]),ut("chat:history:result",_.useCallback(A=>{A.conversationId===l&&c(A.messages)},[l])),ut("chat:token",_.useCallback(A=>{A.conversationId===l&&(N.current+=A.token,g(N.current))},[l])),ut("chat:status",_.useCallback(A=>{if(A.conversationId!==l)return;const P={tool:A.tool,detail:A.detail,timestamp:Date.now()};y(P),k($=>[...$,P])},[l])),ut("chat:done",_.useCallback(A=>{if(A.conversationId!==l)return;const P={id:Date.now(),conversation_id:l,role:"assistant",content:N.current,created_at:new Date().toISOString()};c($=>[...$,P]),h(!1),g(""),y(null),k([]),N.current=""},[l])),ut("chat:error",_.useCallback(A=>{A.conversationId===l&&(S(A.error),h(!1),g(""),y(null),k([]),N.current="")},[l]));const O=_.useCallback(A=>{if(!a||!A.trim()||f)return;const P={id:Date.now(),conversation_id:l,role:"user",content:A.trim(),created_at:new Date().toISOString()};c($=>[...$,P]),h(!0),S(null),y(null),k([]),N.current="",a.emit("chat:send",{conversationId:l,sessionId:e,targetType:t,targetId:r,message:A.trim()})},[a,l,e,t,r,f]);return{messages:o,sendMessage:O,isStreaming:f,streamingContent:m,toolStatus:x,toolHistory:v,error:E}}const yv=3;function vv({currentStatus:e,history:t}){const[r,a]=_.useState(!1),l=e?t.filter(h=>h.timestamp!==e.timestamp):t,o=l.length>yv,c=r?l:l.slice(-yv),f=l.length-c.length;return!e&&l.length===0?null:d.jsxs("div",{className:"space-y-1",children:[l.length>0&&d.jsxs("div",{className:"space-y-0.5",children:[o&&f>0&&d.jsxs("button",{type:"button",onClick:()=>a(h=>!h),className:"flex items-center gap-1 text-[11px] text-zinc-400 transition-colors hover:text-zinc-600 dark:text-zinc-500 dark:hover:text-zinc-400",children:[r?d.jsx(Za,{className:"h-3 w-3"}):d.jsx(ji,{className:"h-3 w-3"}),r?"Collapse":`${f} more step${f!==1?"s":""}`]}),c.map((h,m)=>d.jsxs("div",{className:"flex items-center gap-1.5 text-[11px] text-zinc-400 dark:text-zinc-500",children:[d.jsx(Mr,{className:"h-3 w-3 flex-shrink-0 text-emerald-500"}),d.jsx("span",{className:"truncate",children:h.detail})]},h.timestamp+m))]}),e&&d.jsxs("div",{className:ae("flex items-center gap-1.5 text-[11px] font-medium","text-indigo-600 dark:text-indigo-400"),children:[d.jsxs("span",{className:"relative flex h-2 w-2 flex-shrink-0",children:[d.jsx("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-indigo-400 opacity-75"}),d.jsx("span",{className:"relative inline-flex h-2 w-2 rounded-full bg-indigo-500"})]}),d.jsx("span",{className:"truncate",children:e.detail})]})]})}function w9({message:e}){const t=e.role==="user",r=ri(e.created_at).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"});return d.jsxs("div",{className:ae("flex flex-col",t?"items-end":"items-start"),children:[d.jsx("div",{className:ae("max-w-[85%] rounded-lg px-3 py-2 text-sm",t?"bg-indigo-600 text-white":"bg-zinc-100 text-zinc-900 dark:bg-zinc-800 dark:text-zinc-100"),children:t?d.jsx("p",{className:"whitespace-pre-wrap",children:e.content}):d.jsx(jr,{content:e.content})}),d.jsx("span",{className:"mt-1 text-[10px] text-zinc-400 dark:text-zinc-500",children:r})]})}const kv=["Reading the code review artifacts...","Analyzing the changeset structure...","Examining file relationships...","Reviewing the findings...","Connecting the patterns...","Preparing a thoughtful response..."];function _9({content:e,toolStatus:t,toolHistory:r}){const[a,l]=_.useState(0),o=t!==null||r.length>0;return _.useEffect(()=>{if(e||o)return;const c=setInterval(()=>{l(f=>(f+1)%kv.length)},2500);return()=>clearInterval(c)},[e,o]),d.jsx("div",{className:"flex flex-col items-start",children:d.jsxs("div",{className:"max-w-[85%] rounded-lg bg-zinc-100 px-3 py-2 text-sm text-zinc-900 dark:bg-zinc-800 dark:text-zinc-100",children:[e?d.jsxs(d.Fragment,{children:[d.jsx(jr,{content:e}),d.jsx("span",{className:"ml-0.5 inline-block h-4 w-0.5 animate-pulse bg-zinc-400 dark:bg-zinc-500"})]}):o?d.jsx(vv,{currentStatus:t,history:r}):d.jsx(E9,{phrase:kv[a]}),e&&o&&d.jsx("div",{className:"mt-2 border-t border-zinc-200 pt-2 dark:border-zinc-700",children:d.jsx(vv,{currentStatus:t,history:r})})]})})}function E9({phrase:e}){return d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsxs("div",{className:"flex gap-1",children:[d.jsx("span",{className:"h-1.5 w-1.5 animate-bounce rounded-full bg-indigo-400 [animation-delay:0ms]"}),d.jsx("span",{className:"h-1.5 w-1.5 animate-bounce rounded-full bg-indigo-400 [animation-delay:150ms]"}),d.jsx("span",{className:"h-1.5 w-1.5 animate-bounce rounded-full bg-indigo-400 [animation-delay:300ms]"})]}),d.jsx("span",{className:"animate-pulse text-xs text-zinc-400 dark:text-zinc-500",children:e})]})}const N9={map_run:"Ask about this map...",review_round:"Ask about this review..."};function S9({onSend:e,isStreaming:t,disabled:r,targetType:a}){const[l,o]=_.useState(""),c=_.useRef(null),f=_.useCallback(()=>{const g=c.current;g&&(g.style.height="auto",g.style.height=`${Math.min(g.scrollHeight,80)}px`)},[]),h=_.useCallback(()=>{!l.trim()||t||r||(e(l),o(""),c.current&&(c.current.style.height="auto"))},[l,t,e]),m=_.useCallback(g=>{g.key==="Enter"&&!g.shiftKey&&(g.preventDefault(),h())},[h]);return d.jsxs("div",{className:"flex items-end gap-2 border-t border-zinc-200 bg-white p-3 dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsx("textarea",{ref:c,value:l,onChange:g=>{o(g.target.value),f()},onKeyDown:m,placeholder:N9[a],rows:1,className:ae("flex-1 resize-none rounded-md border border-zinc-300 bg-white px-3 py-2 text-sm","placeholder:text-zinc-400 focus:border-indigo-500 focus:outline-none focus:ring-1 focus:ring-indigo-500","dark:border-zinc-700 dark:bg-zinc-800 dark:placeholder:text-zinc-500")}),d.jsx("button",{type:"button",onClick:h,disabled:t||!l.trim(),className:ae("flex-shrink-0 rounded-md p-2 transition-colors","bg-indigo-600 text-white hover:bg-indigo-700","disabled:cursor-not-allowed disabled:opacity-50"),children:d.jsx(YA,{className:"h-4 w-4"})})]})}function $w({sessionId:e,targetType:t,targetId:r,onClose:a}){const{isAvailable:l,isDisabledByConfig:o}=Mo(),{messages:c,sendMessage:f,isStreaming:h,streamingContent:m,toolStatus:g,toolHistory:x,error:y}=k9(e,t,r),v=_.useRef(null);return _.useEffect(()=>{function k(E){E.key==="Escape"&&a()}return document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)},[a]),_.useEffect(()=>{const k=v.current;k&&(k.scrollTop=k.scrollHeight)},[c,m,g]),d.jsxs("div",{className:ae("fixed right-0 top-0 z-50 flex h-full w-[400px] flex-col","border-l border-zinc-200 bg-white shadow-xl","dark:border-zinc-800 dark:bg-zinc-950"),children:[d.jsxs("div",{className:"flex items-center justify-between border-b border-zinc-200 px-4 py-3 dark:border-zinc-800",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(Au,{className:"h-4 w-4 text-indigo-500"}),d.jsx("h2",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:"Ask the Team"})]}),d.jsx("button",{type:"button",onClick:a,className:"rounded-md p-1 text-zinc-400 transition-colors hover:bg-zinc-100 hover:text-zinc-600 dark:hover:bg-zinc-800 dark:hover:text-zinc-300",children:d.jsx(Bn,{className:"h-4 w-4"})})]}),d.jsxs("div",{ref:v,className:"flex-1 space-y-4 overflow-y-auto p-4",children:[!l&&c.length===0&&d.jsxs("div",{className:"flex items-start gap-2.5 rounded-md border border-zinc-200 bg-zinc-50 p-3 dark:border-zinc-800 dark:bg-zinc-900/50",children:[d.jsx(Oi,{className:"mt-0.5 h-4 w-4 shrink-0 text-zinc-400"}),d.jsx("p",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:o?d.jsxs(d.Fragment,{children:["AI commands are turned off in your project config. Set ",d.jsx("code",{className:"rounded bg-zinc-200 px-1 py-0.5 text-[10px] dark:bg-zinc-800",children:"ai_cli"})," to ",d.jsx("code",{className:"rounded bg-zinc-200 px-1 py-0.5 text-[10px] dark:bg-zinc-800",children:"auto"}),", ",d.jsx("code",{className:"rounded bg-zinc-200 px-1 py-0.5 text-[10px] dark:bg-zinc-800",children:"claude"}),", or ",d.jsx("code",{className:"rounded bg-zinc-200 px-1 py-0.5 text-[10px] dark:bg-zinc-800",children:"opencode"})," in ",d.jsx("code",{className:"rounded bg-zinc-200 px-1 py-0.5 text-[10px] dark:bg-zinc-800",children:".ocr/config.yaml"})," to enable Ask the Team."]}):"Install Claude Code or OpenCode to use Ask the Team."})]}),l&&c.length===0&&!h&&d.jsxs("p",{className:"text-center text-sm text-zinc-400 dark:text-zinc-500",children:["Ask a question about this ",t==="map_run"?"map":"review"," to get started."]}),c.map(k=>d.jsx(w9,{message:k},k.id)),h&&d.jsx(_9,{content:m,toolStatus:g,toolHistory:x}),y&&d.jsx("div",{className:"rounded-md bg-red-50 px-3 py-2 text-sm text-red-700 dark:bg-red-900/20 dark:text-red-400",children:y})]}),d.jsx(S9,{onSend:f,isStreaming:h,disabled:!l,targetType:t})]})}function z9(){const{id:e,run:t}=Hu(),r=parseInt(t??"0",10),{data:a,isLoading:l}=u9(e??"",r),o=f9(e??"",r),c=h9(e??"",r),[f,h]=_.useState(!1),m=_.useCallback(y=>{document.getElementById(`section-${y}`)?.scrollIntoView({behavior:"smooth",block:"start"})},[]);if(l)return d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Loading map run..."});if(!a)return d.jsxs("div",{children:[d.jsxs(In,{to:`/sessions/${e}`,className:"mb-4 inline-flex items-center gap-1 text-sm text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-300",children:[d.jsx(xa,{className:"h-4 w-4"}),"Back to session"]}),d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Map run not found."})]});const g=a.sections.reduce((y,v)=>y+v.file_count,0),x=a.sections.reduce((y,v)=>y+v.reviewed_count,0);return d.jsxs("div",{className:"space-y-6",children:[d.jsxs(In,{to:`/sessions/${e}`,className:"inline-flex items-center gap-1 text-sm text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-300",children:[d.jsx(xa,{className:"h-4 w-4"}),"Back to session"]}),d.jsxs("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[d.jsxs("div",{className:"space-y-1",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(ya,{className:"h-5 w-5 text-zinc-400"}),d.jsxs("h1",{className:"text-xl font-semibold text-zinc-900 dark:text-zinc-100",children:["Map Run ",a.run_number]})]}),d.jsxs("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:[x," / ",g," files reviewed"]})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsxs("button",{type:"button",onClick:()=>h(!0),className:"inline-flex items-center gap-1.5 rounded-md border border-zinc-200 bg-white px-3 py-1.5 text-xs font-medium text-zinc-700 transition-colors hover:bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-300 dark:hover:bg-zinc-700",children:[d.jsx(Au,{className:"h-3.5 w-3.5"}),"Ask the Team"]}),d.jsx(m9,{sessionId:e??""}),d.jsx(c9,{onConfirm:()=>c.mutate(a.id),isPending:c.isPending})]})]}),d.jsx("div",{className:"mt-4",children:d.jsx(qw,{value:x,max:g,showLabel:!0})})]}),d.jsx(y9,{sessionId:e??"",runNumber:r,sections:a.sections,onSectionClick:m}),a.sections.length===0?d.jsx("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"No sections found in this map run."})}):d.jsx("div",{className:"space-y-3",children:a.sections.map(y=>d.jsx("div",{id:`section-${y.id}`,children:d.jsx(o9,{section:y,onToggleFile:(v,k)=>o.mutate({fileId:v,isReviewed:k})})},y.id))}),f&&d.jsx($w,{sessionId:e??"",targetType:"map_run",targetId:a.run_number,onClose:()=>h(!1)})]})}function C9(){const e=Rn();return ut("artifact:created",()=>{e.invalidateQueries({queryKey:["reviews"]})}),ut("artifact:updated",()=>{e.invalidateQueries({queryKey:["reviews"]})}),nn({queryKey:["reviews"],queryFn:()=>Dt("/api/reviews")})}function T9(e,t){const r=Rn(),a=["sessions",e,"rounds",t],l=nn({queryKey:a,queryFn:()=>Dt(`/api/sessions/${e}/rounds/${t}`),enabled:!!e&&t>0});return ut("artifact:created",()=>{r.invalidateQueries({queryKey:a})}),ut("artifact:updated",()=>{r.invalidateQueries({queryKey:a})}),l}function A9(e,t){return nn({queryKey:["sessions",e,"rounds",t,"findings"],queryFn:()=>Dt(`/api/sessions/${e}/rounds/${t}/findings`),enabled:!!e&&t>0})}function R9(e,t,r){return nn({queryKey:["sessions",e,"rounds",t,"reviewers",r],queryFn:()=>Dt(`/api/sessions/${e}/rounds/${t}/reviewers/${r}`),enabled:!!e&&t>0&&r>0})}function Kh(e,t){return nn({queryKey:["sessions",e,"artifacts",t],queryFn:()=>Dt(`/api/sessions/${e}/artifacts/${t}`),enabled:!!e&&!!t,retry:!1})}function O9(){const e=Rn();return Ao({mutationFn:({findingId:t,status:r})=>Dt(`/api/findings/${t}/progress`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:r})}),onSuccess:()=>{e.invalidateQueries({queryKey:["sessions"]})}})}function Gw(){const e=Rn();return Ao({mutationFn:({roundId:t,status:r})=>Dt(`/api/rounds/${t}/progress`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:r})}),onSuccess:()=>{e.invalidateQueries({queryKey:["reviews"]}),e.invalidateQueries({queryKey:["sessions"]})}})}const Kw={principal:Ro,quality:Va,security:rR,testing:pR},M9={principal:"text-violet-600 dark:text-violet-400 bg-violet-500/10 border-violet-500/25",quality:"text-blue-600 dark:text-blue-400 bg-blue-500/10 border-blue-500/25",security:"text-amber-600 dark:text-amber-400 bg-amber-500/10 border-amber-500/25",testing:"text-emerald-600 dark:text-emerald-400 bg-emerald-500/10 border-emerald-500/25"};function j9({sessionId:e,roundNumber:t,reviewer:r}){const a=Kw[r.reviewer_type]??Va,l=M9[r.reviewer_type]??"text-zinc-600 dark:text-zinc-400 bg-zinc-500/10 border-zinc-500/25";return d.jsx(In,{to:`/sessions/${e}/reviews/${t}/reviewers/${r.id}`,className:"group block rounded-lg border border-zinc-200 bg-white p-4 transition-colors hover:border-zinc-300 hover:bg-zinc-50 dark:border-zinc-800 dark:bg-zinc-900 dark:hover:border-zinc-700 dark:hover:bg-zinc-800/50",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:`flex h-10 w-10 items-center justify-center rounded-lg border ${l}`,children:d.jsx(a,{className:"h-5 w-5"})}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("div",{className:"text-sm font-medium capitalize text-zinc-900 dark:text-zinc-100",children:[r.reviewer_type,r.instance_number>1&&d.jsxs("span",{className:"ml-1 text-zinc-500 dark:text-zinc-400",children:["#",r.instance_number]})]}),d.jsxs("div",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:[r.finding_count," finding",r.finding_count!==1?"s":""]})]})]})})}const D9=[{value:"unread",label:"Unread"},{value:"read",label:"Read"},{value:"acknowledged",label:"Acknowledged"},{value:"fixed",label:"Fixed"},{value:"wont_fix",label:"Won't Fix"}];function L9({finding:e,onTriageChange:t}){const[r,a]=_.useState(!1),{data:l}=Qs(),o=_.useCallback(()=>a(h=>!h),[]),c=_.useCallback(h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),o())},[o]),f=e.line_start!=null?e.line_end!=null&&e.line_end!==e.line_start?`${e.line_start}-${e.line_end}`:String(e.line_start):"-";return d.jsxs(d.Fragment,{children:[d.jsxs("tr",{tabIndex:0,role:"row","aria-expanded":r,className:"cursor-pointer transition-colors hover:bg-zinc-50 dark:hover:bg-zinc-800/50",onClick:o,onKeyDown:c,children:[d.jsx("td",{className:"border-b border-zinc-200 px-4 py-2 dark:border-zinc-800",children:d.jsxs("div",{className:"flex items-center gap-1",children:[d.jsx(ji,{className:ae("h-3.5 w-3.5 shrink-0 text-zinc-400 transition-transform",r&&"rotate-90")}),d.jsx(Xs,{variant:e.severity})]})}),d.jsx("td",{className:"border-b border-zinc-200 px-4 py-2 text-zinc-900 dark:border-zinc-800 dark:text-zinc-100",children:e.title}),d.jsx("td",{className:"border-b border-zinc-200 px-4 py-2 font-mono text-xs text-zinc-600 dark:border-zinc-800 dark:text-zinc-400",children:e.file_path&&l?d.jsxs("a",{href:Tu(l.ide,l.projectRoot,e.file_path,e.line_start),onClick:h=>h.stopPropagation(),className:"hover:text-zinc-900 hover:underline dark:hover:text-zinc-200",title:`Open in ${l.ide}`,children:[e.file_path,d.jsx(Ym,{className:"ml-1 inline h-3 w-3"})]}):e.file_path??"-"}),d.jsx("td",{className:"border-b border-zinc-200 px-4 py-2 tabular-nums text-zinc-600 dark:border-zinc-800 dark:text-zinc-400",children:e.file_path&&l&&e.line_start!=null?d.jsx("a",{href:Tu(l.ide,l.projectRoot,e.file_path,e.line_start),onClick:h=>h.stopPropagation(),className:"hover:text-zinc-900 hover:underline dark:hover:text-zinc-200",children:f}):f}),d.jsx("td",{className:"border-b border-zinc-200 px-4 py-2 dark:border-zinc-800",children:e.is_blocker?d.jsx("span",{className:"text-xs font-medium text-red-600 dark:text-red-400",children:"Yes"}):d.jsx("span",{className:"text-xs text-zinc-400",children:"No"})}),d.jsx("td",{className:"border-b border-zinc-200 px-4 py-2 dark:border-zinc-800",onClick:h=>h.stopPropagation(),children:d.jsx("select",{value:e.progress?.status??"unread",onChange:h=>t(e.id,h.target.value),"aria-label":`Triage status for ${e.title}`,className:"rounded-md border border-zinc-300 bg-white px-2 py-1 text-xs dark:border-zinc-700 dark:bg-zinc-900",children:D9.map(h=>d.jsx("option",{value:h.value,children:h.label},h.value))})})]}),r&&e.summary&&d.jsx("tr",{children:d.jsx("td",{colSpan:6,className:"border-b border-zinc-200 bg-zinc-50 px-4 py-3 dark:border-zinc-800 dark:bg-zinc-900/50",children:d.jsx(jr,{content:e.summary,className:"text-sm"})})})]})}function ha({label:e,field:t,activeField:r,direction:a,onSort:l}){return d.jsx("th",{className:"border-b border-zinc-200 px-4 py-2 text-left dark:border-zinc-800",children:d.jsxs("button",{onClick:()=>l(t),className:ae("flex items-center gap-1 text-sm font-medium transition-colors",r===t?"text-zinc-900 dark:text-zinc-100":"text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-zinc-100"),children:[e,d.jsx(W1,{className:ae("h-3 w-3",r===t?"opacity-100":"opacity-40",r===t&&a==="desc"&&"rotate-180")})]})})}const wv={critical:0,high:1,medium:2,low:3,info:4},I9=[{value:"all",label:"All"},{value:"critical",label:"Critical"},{value:"high",label:"High"},{value:"medium",label:"Medium"},{value:"low",label:"Low"},{value:"info",label:"Info"}],B9=[{value:"all",label:"All"},{value:"unread",label:"Unread"},{value:"read",label:"Read"},{value:"acknowledged",label:"Acknowledged"},{value:"fixed",label:"Fixed"},{value:"wont_fix",label:"Won't Fix"}];function Vw({findings:e}){const[t,r]=_.useState("severity"),[a,l]=_.useState("asc"),[o,c]=_.useState("all"),[f,h]=_.useState("all"),m=O9();function g(k){t===k?l(E=>E==="asc"?"desc":"asc"):(r(k),l("asc"))}const x=_.useMemo(()=>{let k=e;return o!=="all"&&(k=k.filter(E=>E.severity===o)),f!=="all"&&(k=k.filter(E=>(E.progress?.status??"unread")===f)),k},[e,o,f]),y=_.useMemo(()=>{const k=a==="asc"?1:-1;return[...x].sort((E,S)=>t==="severity"?(wv[E.severity]-wv[S.severity])*k:t==="title"?E.title.localeCompare(S.title)*k:t==="file_path"?(E.file_path??"").localeCompare(S.file_path??"")*k:0)},[x,t,a]);function v(k,E){m.mutate({findingId:k,status:E})}return d.jsxs("div",{children:[d.jsxs("div",{className:"mb-4 flex flex-wrap items-center gap-3",children:[d.jsx(rk,{className:"h-4 w-4 text-zinc-400"}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:"Severity:"}),d.jsx("select",{value:o,onChange:k=>c(k.target.value),className:"rounded-md border border-zinc-300 bg-white px-2 py-1 text-xs dark:border-zinc-700 dark:bg-zinc-900",children:I9.map(k=>d.jsx("option",{value:k.value,children:k.label},k.value))})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:"Status:"}),d.jsx("select",{value:f,onChange:k=>h(k.target.value),className:"rounded-md border border-zinc-300 bg-white px-2 py-1 text-xs dark:border-zinc-700 dark:bg-zinc-900",children:B9.map(k=>d.jsx("option",{value:k.value,children:k.label},k.value))})]}),d.jsxs("span",{className:"text-xs text-zinc-400 dark:text-zinc-500",children:[y.length," of ",e.length," findings"]})]}),y.length===0?d.jsx("p",{className:"py-8 text-center text-sm text-zinc-500 dark:text-zinc-400",children:"No findings match your filters."}):d.jsx("div",{className:"overflow-x-auto rounded-lg border border-zinc-200 dark:border-zinc-800",children:d.jsxs("table",{className:"w-full text-sm",children:[d.jsx("thead",{className:"bg-zinc-50 dark:bg-zinc-900",children:d.jsxs("tr",{children:[d.jsx(ha,{label:"Severity",field:"severity",activeField:t,direction:a,onSort:g}),d.jsx(ha,{label:"Title",field:"title",activeField:t,direction:a,onSort:g}),d.jsx(ha,{label:"File",field:"file_path",activeField:t,direction:a,onSort:g}),d.jsx("th",{className:"border-b border-zinc-200 px-4 py-2 text-left font-medium text-zinc-900 dark:border-zinc-800 dark:text-zinc-100",children:"Lines"}),d.jsx("th",{className:"border-b border-zinc-200 px-4 py-2 text-left font-medium text-zinc-900 dark:border-zinc-800 dark:text-zinc-100",children:"Blocker"}),d.jsx("th",{className:"border-b border-zinc-200 px-4 py-2 text-left font-medium text-zinc-900 dark:border-zinc-800 dark:text-zinc-100",children:"Status"})]})}),d.jsx("tbody",{children:y.map(k=>d.jsx(L9,{finding:k,onTriageChange:v},k.id))})]})})]})}function U9(){const{socket:e}=si(),[t,r]=_.useState("idle"),[a,l]=_.useState(null),[o,c]=_.useState(""),[f,h]=_.useState(""),[m,g]=_.useState(null),[x,y]=_.useState([]),[v,k]=_.useState(null),[E,S]=_.useState(null),N=_.useRef(""),[O,A]=_.useState(0),P=_.useRef(null);_.useEffect(()=>(t==="generating"?(A(0),P.current=setInterval(()=>A(ee=>ee+1),1e3)):P.current&&(clearInterval(P.current),P.current=null),()=>{P.current&&clearInterval(P.current)}),[t]),ut("post:gh-result",_.useCallback(ee=>{l(ee),ee.authenticated&&ee.prNumber?r("ready"):(S(ee.error??"GitHub check failed"),r("error"))},[])),ut("post:token",_.useCallback(ee=>{N.current+=ee.token,c(N.current)},[])),ut("post:clear-stream",_.useCallback(()=>{N.current="",c("")},[])),ut("post:status",_.useCallback(ee=>{const te={tool:ee.tool,detail:ee.detail,timestamp:Date.now()};g(te),y(_e=>[..._e,te])},[])),ut("post:done",_.useCallback(ee=>{h(ee.content),c(""),g(null),N.current="",r("preview")},[])),ut("post:cancelled",_.useCallback(()=>{c(""),g(null),N.current="",r("ready")},[])),ut("post:error",_.useCallback(ee=>{S(ee.error),c(""),g(null),N.current="",r("error")},[])),ut("post:save-result",_.useCallback(ee=>{ee.success||S(ee.error??"Failed to save draft")},[])),ut("post:submit-result",_.useCallback(ee=>{k(ee),ee.success?r("posted"):(S(ee.error??"Failed to post to GitHub"),r("error"))},[]));const $=_.useCallback(ee=>{e&&(r("checking"),S(null),l(null),e.emit("post:check-gh",{sessionId:ee}))},[e]),M=_.useCallback((ee,te)=>{e&&(r("generating"),S(null),c(""),h(""),g(null),y([]),N.current="",e.emit("post:generate",{sessionId:ee,roundNumber:te}))},[e]),K=_.useCallback((ee,te)=>{e&&e.emit("post:cancel",{sessionId:ee,roundNumber:te})},[e]),z=_.useCallback((ee,te,_e)=>{e&&e.emit("post:save",{sessionId:ee,roundNumber:te,content:_e})},[e]),W=_.useCallback((ee,te)=>{e&&(r("posting"),S(null),e.emit("post:submit",{prNumber:ee,content:te}))},[e]),U=_.useCallback(()=>{r("idle"),l(null),c(""),h(""),g(null),y([]),k(null),S(null),N.current=""},[]);return{step:t,checkResult:a,streamingContent:o,generatedContent:f,toolStatus:m,activityLog:x,elapsedSeconds:O,postResult:v,error:E,checkGitHub:$,generate:M,cancelGeneration:K,saveDraft:z,submitToGitHub:W,reset:U,setStep:r}}function F9(e){const t=Math.floor(e/60),r=e%60;return`${t}:${String(r).padStart(2,"0")}`}function P9(e,t,r){return r==="Write"?"Rewriting as your voice":t?"Writing review":e?"Analyzing source material":"Starting up"}function H9({tool:e}){switch(e){case"Read":return d.jsx(ET,{className:"h-3 w-3 shrink-0"});case"Glob":case"Grep":return d.jsx(Qu,{className:"h-3 w-3 shrink-0"});case"thinking":return d.jsx(J1,{className:"h-3 w-3 shrink-0"});default:return d.jsx(lk,{className:"h-3 w-3 shrink-0"})}}function q9({sessionId:e,roundNumber:t,finalContent:r,savedHumanReview:a}){const[l,o]=_.useState(!1),[c,f]=_.useState(!1),[h,m]=_.useState(""),g=_.useRef(null),x=_.useRef(null),{step:y,checkResult:v,streamingContent:k,generatedContent:E,toolStatus:S,activityLog:N,elapsedSeconds:O,postResult:A,error:P,checkGitHub:$,generate:M,cancelGeneration:K,saveDraft:z,submitToGitHub:W,reset:U,setStep:ee}=U9(),[te,_e]=_.useState(!0),se=_.useRef(!1),[X,F]=_.useState(!1),ne=_.useCallback(()=>{o(!1),f(!1),m(""),U()},[U]),V=_.useCallback(()=>{o(!0),$(e)},[e,$]);_.useEffect(()=>{if(!l)return;const j=I=>{I.key==="Escape"&&y!=="generating"&&ne()};return document.addEventListener("keydown",j),g.current?.focus(),()=>document.removeEventListener("keydown",j)},[l,ne,y]),_.useEffect(()=>{y==="generating"&&k&&!se.current&&(se.current=!0,_e(!1))},[y,k]),_.useEffect(()=>{y==="generating"&&(se.current=!1,_e(!0))},[y]),_.useEffect(()=>{y==="generating"&&x.current?.scrollIntoView({behavior:"smooth"})},[k,y]);const fe=()=>c&&h?h:E||a||r,R=v?.prNumber??0;return d.jsxs(d.Fragment,{children:[d.jsxs("button",{type:"button",onClick:V,className:"inline-flex items-center gap-1.5 rounded-md border border-zinc-200 bg-white px-3 py-1.5 text-xs font-medium text-zinc-700 transition-colors hover:bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-300 dark:hover:bg-zinc-700",children:[d.jsx(ay,{className:"h-3.5 w-3.5"}),"Post to GitHub"]}),l&&d.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[d.jsx("div",{className:"fixed inset-0 bg-black/50",onClick:y!=="generating"?ne:void 0}),d.jsxs("div",{ref:g,role:"dialog","aria-modal":"true","aria-labelledby":"post-review-title",tabIndex:-1,className:"relative z-10 flex w-full max-w-4xl flex-col rounded-lg border border-zinc-200 bg-white shadow-xl dark:border-zinc-800 dark:bg-zinc-900",style:{maxHeight:"85vh"},children:[d.jsxs("div",{className:"flex items-center justify-between border-b border-zinc-200 px-6 py-4 dark:border-zinc-800",children:[d.jsx("h3",{id:"post-review-title",className:"text-lg font-semibold text-zinc-900 dark:text-zinc-100",children:y==="posted"?"Review Posted":"Post Review to GitHub"}),d.jsx("button",{onClick:ne,className:"text-zinc-400 hover:text-zinc-600 dark:hover:text-zinc-300","aria-label":"Close dialog",children:d.jsx(Bn,{className:"h-5 w-5"})})]}),d.jsxs("div",{className:"flex-1 overflow-y-auto px-6 py-4",children:[y==="checking"&&d.jsxs("div",{className:"flex items-center justify-center gap-3 py-12",children:[d.jsx(qr,{className:"h-5 w-5 animate-spin text-zinc-500"}),d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Checking GitHub CLI..."})]}),y==="ready"&&v&&d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{className:"rounded-md border border-zinc-200 bg-zinc-50 p-3 dark:border-zinc-700 dark:bg-zinc-800",children:d.jsxs("p",{className:"text-sm text-zinc-700 dark:text-zinc-300",children:[d.jsx(ik,{className:"mr-1.5 inline h-4 w-4"}),"PR #",v.prNumber," on branch"," ",d.jsx("code",{className:"rounded bg-zinc-200 px-1.5 py-0.5 text-xs dark:bg-zinc-700",children:v.branch})]})}),d.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[d.jsxs("button",{onClick:()=>W(R,r),className:"group rounded-lg border border-zinc-200 p-4 text-left transition-colors hover:border-blue-300 hover:bg-blue-50/50 dark:border-zinc-700 dark:hover:border-blue-700 dark:hover:bg-blue-950/20",children:[d.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[d.jsx(Yu,{className:"h-5 w-5 text-zinc-500 group-hover:text-blue-600 dark:group-hover:text-blue-400"}),d.jsx("span",{className:"font-medium text-zinc-900 dark:text-zinc-100",children:"Post Team Review"})]}),d.jsx("p",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:"Post the original multi-reviewer synthesis as-is."})]}),d.jsxs("button",{onClick:()=>M(e,t),className:"group rounded-lg border border-zinc-200 p-4 text-left transition-colors hover:border-emerald-300 hover:bg-emerald-50/50 dark:border-zinc-700 dark:hover:border-emerald-700 dark:hover:bg-emerald-950/20",children:[d.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[d.jsx(Va,{className:"h-5 w-5 text-zinc-500 group-hover:text-emerald-600 dark:group-hover:text-emerald-400"}),d.jsx("span",{className:"font-medium text-zinc-900 dark:text-zinc-100",children:"Generate Human Review"})]}),d.jsx("p",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:"Rewrite as a single human voice — sounds like you wrote it."})]})]}),a&&d.jsxs("button",{onClick:()=>{m(a),ee("preview")},className:"w-full rounded-lg border border-dashed border-zinc-300 p-3 text-left text-sm text-zinc-600 transition-colors hover:border-zinc-400 hover:text-zinc-800 dark:border-zinc-600 dark:text-zinc-400 dark:hover:border-zinc-500 dark:hover:text-zinc-300",children:[d.jsx(iy,{className:"mr-1.5 inline h-3.5 w-3.5"}),"Use previously saved human review"]})]}),y==="generating"&&d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{className:"flex items-center gap-2.5",children:[d.jsxs("div",{className:"relative flex h-8 w-8 items-center justify-center",children:[d.jsx("div",{className:"absolute inset-0 animate-ping rounded-full bg-emerald-400/20"}),d.jsx(Va,{className:"h-4 w-4 text-emerald-500 dark:text-emerald-400"})]}),d.jsxs("div",{children:[d.jsx("p",{className:"text-sm font-medium text-zinc-800 dark:text-zinc-200",children:P9(N.length>0,!!k,S?.tool)}),d.jsx("p",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:"All findings preserved — just the tone changes"})]})]}),d.jsx("span",{className:"tabular-nums text-xs font-medium text-zinc-400 dark:text-zinc-500",children:F9(O)})]}),d.jsxs("div",{className:"rounded-md border border-zinc-200 bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-800",children:[d.jsxs("button",{type:"button",onClick:()=>_e(j=>!j),className:"flex w-full items-center gap-2 px-3 py-2 text-xs text-zinc-600 dark:text-zinc-400",children:[d.jsx(qr,{className:"h-3 w-3 animate-spin shrink-0 text-emerald-500"}),d.jsx("span",{className:"flex-1 truncate text-left font-medium",children:S?.detail??"Reading review files..."}),N.length>0&&d.jsxs("span",{className:"flex items-center gap-1 text-zinc-400 dark:text-zinc-500",children:[d.jsx("span",{className:"tabular-nums",children:N.length}),te?d.jsx(Za,{className:"h-3 w-3"}):d.jsx(ji,{className:"h-3 w-3"})]})]}),te&&N.length>0&&d.jsx("div",{className:"border-t border-zinc-200 px-3 py-2 dark:border-zinc-700",children:d.jsx("div",{className:"max-h-32 space-y-1 overflow-y-auto",children:N.map((j,I)=>d.jsxs("div",{className:"flex items-center gap-2 text-[11px] text-zinc-500 dark:text-zinc-500",children:[d.jsx(H9,{tool:j.tool}),d.jsx("span",{className:"truncate",children:j.detail})]},I))})})]}),k&&d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"flex items-center gap-2 text-xs text-zinc-500 dark:text-zinc-400",children:[d.jsx(yo,{className:"h-3 w-3"}),d.jsx("span",{className:"font-medium",children:"Generated Review"})]}),d.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none",children:d.jsx(jr,{content:k})})]}),d.jsx("div",{ref:x})]}),y==="preview"&&d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{className:"flex items-center gap-1 border-b border-zinc-200 dark:border-zinc-700",children:[d.jsxs("button",{onClick:()=>f(!1),className:ae("inline-flex items-center gap-1.5 border-b-2 px-3 py-2 text-xs font-medium transition-colors",c?"border-transparent text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-300":"border-blue-500 text-blue-600 dark:text-blue-400"),children:[d.jsx(eA,{className:"h-3.5 w-3.5"}),"Preview"]}),d.jsxs("button",{onClick:()=>{f(!0),h||m(E||a||r)},className:ae("inline-flex items-center gap-1.5 border-b-2 px-3 py-2 text-xs font-medium transition-colors",c?"border-blue-500 text-blue-600 dark:text-blue-400":"border-transparent text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-300"),children:[d.jsx(yo,{className:"h-3.5 w-3.5"}),"Edit"]})]}),c?d.jsx("textarea",{value:h||E||a||r,onChange:j=>m(j.target.value),className:"h-96 w-full rounded-md border border-zinc-200 bg-zinc-50 p-3 font-mono text-sm text-zinc-900 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-100"}):d.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none",children:d.jsx(jr,{content:fe()})})]}),y==="posting"&&d.jsxs("div",{className:"flex items-center justify-center gap-3 py-12",children:[d.jsx(qr,{className:"h-5 w-5 animate-spin text-zinc-500"}),d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Posting to GitHub..."})]}),y==="posted"&&d.jsxs("div",{className:"flex flex-col items-center gap-3 py-12",children:[d.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-emerald-100 dark:bg-emerald-900/30",children:d.jsx(Mr,{className:"h-6 w-6 text-emerald-600 dark:text-emerald-400"})}),d.jsx("p",{className:"text-sm font-medium text-zinc-900 dark:text-zinc-100",children:"Review posted to GitHub"}),A?.commentUrl&&d.jsxs("a",{href:A.commentUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-sm text-blue-600 hover:underline dark:text-blue-400",children:["View comment",d.jsx(Ym,{className:"h-3.5 w-3.5"})]})]}),y==="error"&&d.jsx("div",{className:"space-y-4 py-4",children:d.jsxs("div",{className:"flex items-start gap-3 rounded-md border border-red-200 bg-red-50 p-4 dark:border-red-800 dark:bg-red-950/30",children:[d.jsx(Ku,{className:"mt-0.5 h-5 w-5 shrink-0 text-red-600 dark:text-red-400"}),d.jsx("p",{className:"text-sm text-red-700 dark:text-red-300",children:P})]})})]}),d.jsxs("div",{className:"flex items-center justify-end gap-3 border-t border-zinc-200 px-6 py-4 dark:border-zinc-800",children:[y==="generating"&&d.jsx("button",{onClick:()=>K(e,t),className:"rounded-md border border-zinc-200 px-3 py-1.5 text-sm font-medium text-zinc-700 transition-colors hover:bg-zinc-100 dark:border-zinc-700 dark:text-zinc-300 dark:hover:bg-zinc-800",children:"Cancel"}),y==="preview"&&d.jsxs(d.Fragment,{children:[d.jsxs("button",{onClick:()=>M(e,t),className:"inline-flex items-center gap-1.5 rounded-md border border-zinc-200 px-3 py-1.5 text-sm font-medium text-zinc-700 transition-colors hover:bg-zinc-100 dark:border-zinc-700 dark:text-zinc-300 dark:hover:bg-zinc-800",children:[d.jsx(vo,{className:"h-3.5 w-3.5"}),"Regenerate"]}),d.jsxs("button",{onClick:()=>{z(e,t,fe()),F(!0),setTimeout(()=>F(!1),2e3)},className:ae("inline-flex items-center gap-1.5 rounded-md border px-3 py-1.5 text-sm font-medium transition-colors",X?"border-emerald-300 text-emerald-700 dark:border-emerald-700 dark:text-emerald-400":"border-zinc-200 text-zinc-700 hover:bg-zinc-100 dark:border-zinc-700 dark:text-zinc-300 dark:hover:bg-zinc-800"),children:[X?d.jsx(Mr,{className:"h-3.5 w-3.5"}):d.jsx(iy,{className:"h-3.5 w-3.5"}),X?"Saved!":"Save Draft"]}),d.jsxs("button",{onClick:()=>{const j=fe();z(e,t,j),W(R,j)},className:"inline-flex items-center gap-1.5 rounded-md bg-blue-600 px-3 py-1.5 text-sm font-medium text-white transition-colors hover:bg-blue-700",children:[d.jsx(ay,{className:"h-3.5 w-3.5"}),"Post to GitHub"]})]}),y==="error"&&d.jsxs(d.Fragment,{children:[d.jsxs("button",{onClick:()=>$(e),className:"inline-flex items-center gap-1.5 rounded-md border border-zinc-200 px-3 py-1.5 text-sm font-medium text-zinc-700 transition-colors hover:bg-zinc-100 dark:border-zinc-700 dark:text-zinc-300 dark:hover:bg-zinc-800",children:[d.jsx(vo,{className:"h-3.5 w-3.5"}),"Retry"]}),d.jsx("button",{onClick:ne,className:"rounded-md border border-zinc-200 px-3 py-1.5 text-sm font-medium text-zinc-700 transition-colors hover:bg-zinc-100 dark:border-zinc-700 dark:text-zinc-300 dark:hover:bg-zinc-800",children:"Close"})]}),y==="posted"&&d.jsx("button",{onClick:ne,className:"rounded-md bg-zinc-900 px-3 py-1.5 text-sm font-medium text-white transition-colors hover:bg-zinc-800 dark:bg-zinc-100 dark:text-zinc-900 dark:hover:bg-zinc-200",children:"Done"})]})]})]})]})}function $9(e,t){return`.ocr/sessions/${e}/rounds/round-${t}/final.md`}const _v=e=>`Review the feedback in \`${e}\` and address it following these steps:
|
|
566
|
+
|
|
567
|
+
1. Read the review in its entirety and parse all feedback into discrete items
|
|
568
|
+
2. For each item, read the actual code at the referenced location to corroborate
|
|
569
|
+
3. Classify each as: Valid (will address) | Valid (alternative approach) | Invalid (decline with evidence) | Needs Clarification
|
|
570
|
+
4. Present a numbered summary of all items with classification before implementing
|
|
571
|
+
5. For valid items, implement changes — use sub-agents in parallel where items are independent
|
|
572
|
+
6. Report: total items, items addressed, items declined with reasoning
|
|
573
|
+
|
|
574
|
+
GUARDRAILS: Do NOT blindly accept every piece of feedback. Corroborate against actual code first. If feedback is incorrect, decline with evidence. If the suggested fix is suboptimal, propose a better alternative.`;function G9({sessionId:e,roundNumber:t}){const[r,a]=_.useState(!1),l=_.useRef(null),{data:o}=Qs(),c=!!o?.aiCli?.active,f=_.useCallback(()=>a(!1),[]);_.useEffect(()=>{if(!r)return;const m=g=>{g.key==="Escape"&&f()};return document.addEventListener("keydown",m),l.current?.focus(),()=>document.removeEventListener("keydown",m)},[r,f]);const h=$9(e,t);return d.jsxs(d.Fragment,{children:[d.jsxs("button",{type:"button",onClick:()=>a(!0),className:"inline-flex items-center gap-1.5 rounded-md border border-zinc-200 bg-white px-3 py-1.5 text-xs font-medium text-zinc-700 transition-colors hover:bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-300 dark:hover:bg-zinc-700",children:[d.jsx($s,{className:"h-3.5 w-3.5"}),"Address Feedback"]}),r&&d.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[d.jsx("div",{className:"fixed inset-0 bg-black/50",onClick:f}),d.jsxs("div",{ref:l,role:"dialog","aria-modal":"true","aria-labelledby":"address-feedback-title",tabIndex:-1,className:"relative z-10 mx-4 w-full max-w-md rounded-lg border border-zinc-200 bg-white shadow-lg sm:max-w-lg dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsx("button",{onClick:f,className:"absolute right-4 top-4 text-zinc-400 hover:text-zinc-600 dark:hover:text-zinc-300","aria-label":"Close dialog",children:d.jsx(Bn,{className:"h-4 w-4"})}),c?d.jsx(K9,{finalPath:h,onClose:f}):d.jsx(V9,{finalPath:h,onClose:f})]})]})]})}function K9({finalPath:e,onClose:t}){const[r,a]=_.useState(""),[l,o]=_.useState(!1),[c,f]=_.useState(!1),{socket:h}=si(),{isRunning:m}=Km(),g=Pu();function x(){const E=["ocr address",e];return r.trim()&&E.push("--requirements",r.trim()),E.join(" ")}function y(){const E=["/ocr:address",e];return r.trim()&&E.push(`
|
|
575
|
+
|
|
576
|
+
NOTES:`,r.trim()),E.join(" ")}function v(){const E=x();h?.emit("command:run",{command:E}),t(),g("/commands")}async function k(){await navigator.clipboard.writeText(y()),f(!0),setTimeout(()=>f(!1),2e3)}return d.jsxs("div",{children:[d.jsxs("div",{className:"p-6 pb-0",children:[d.jsx("h3",{id:"address-feedback-title",className:"text-lg font-semibold text-zinc-900 dark:text-zinc-100",children:"Address Feedback"}),d.jsx("p",{className:"mt-2 text-sm text-zinc-500 dark:text-zinc-400",children:"Run an AI agent to corroborate, validate, and implement changes from this review — in the dashboard or your own terminal."})]}),d.jsxs("div",{className:"mx-6 mt-4 flex items-start gap-2 rounded-md border border-amber-200 bg-amber-50 px-3 py-2.5 text-xs text-amber-800 dark:border-amber-900/50 dark:bg-amber-950/30 dark:text-amber-300",children:[d.jsx(Qm,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),d.jsx("span",{children:"This runs an AI agent with full read/write and shell access to your project."})]}),d.jsxs("div",{className:"space-y-4 p-6",children:[d.jsxs("div",{children:[d.jsx("label",{className:"text-xs font-medium text-zinc-500 dark:text-zinc-400",children:"Review"}),d.jsx("code",{className:"mt-1 block w-full break-all rounded-md border border-zinc-200 bg-zinc-50 px-3 py-2 text-xs text-zinc-700 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-300",children:e})]}),d.jsxs("div",{children:[d.jsxs("label",{className:"text-xs font-medium text-zinc-500 dark:text-zinc-400",children:["Additional notes ",d.jsx("span",{className:"font-normal text-zinc-400 dark:text-zinc-500",children:"(optional)"})]}),d.jsx("textarea",{value:r,onChange:E=>a(E.target.value),placeholder:"e.g. Focus on the blockers first, skip style nits...",rows:3,className:ae("mt-1 w-full rounded-md border px-3 py-2 text-sm","border-zinc-200 bg-zinc-50 placeholder:text-zinc-400","dark:border-zinc-700 dark:bg-zinc-800 dark:placeholder:text-zinc-500","focus:border-indigo-400 focus:outline-none focus:ring-1 focus:ring-indigo-400/50","resize-none")})]}),d.jsx("code",{className:"block w-full whitespace-pre-wrap break-all rounded-md bg-zinc-100 px-2.5 py-1.5 text-xs text-zinc-600 dark:bg-zinc-800 dark:text-zinc-400",children:y()}),d.jsxs("div",{className:"space-y-2 pt-2",children:[d.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row-reverse",children:[l?d.jsxs("button",{onClick:v,className:"flex flex-1 items-center justify-center gap-2 rounded-md bg-indigo-600 px-3 py-2 text-sm font-medium text-white transition-colors hover:bg-indigo-700",children:[d.jsx($s,{className:"h-3.5 w-3.5"}),"Confirm"]}):d.jsxs("button",{onClick:()=>o(!0),disabled:m,className:ae("flex flex-1 items-center justify-center gap-2 rounded-md bg-indigo-600 px-3 py-2 text-sm font-medium text-white transition-colors hover:bg-indigo-700",m&&"cursor-not-allowed opacity-50"),children:[d.jsx($s,{className:"h-3.5 w-3.5"}),"Run in Dashboard"]}),d.jsx("button",{onClick:k,className:"flex flex-1 items-center justify-center gap-2 rounded-md border border-zinc-200 px-3 py-2 text-sm font-medium text-zinc-700 transition-colors hover:bg-zinc-100 dark:border-zinc-700 dark:text-zinc-300 dark:hover:bg-zinc-800",children:c?d.jsxs(d.Fragment,{children:[d.jsx(Mr,{className:"h-3.5 w-3.5"}),"Copied!"]}):d.jsxs(d.Fragment,{children:[d.jsx(tk,{className:"h-3.5 w-3.5"}),"Copy to Terminal"]})})]}),d.jsx("button",{onClick:t,className:"w-full py-1 text-sm text-zinc-500 transition-colors hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-200",children:"Cancel"})]})]})]})}function V9({finalPath:e,onClose:t}){const[r,a]=_.useState(!0),[l,o]=_.useState(!1);async function c(){const f=r?_v(e):e;await navigator.clipboard.writeText(f),o(!0),setTimeout(()=>o(!1),2e3)}return d.jsxs("div",{className:"p-6",children:[d.jsx("h3",{id:"address-feedback-title",className:"text-lg font-semibold text-zinc-900 dark:text-zinc-100",children:"Address Feedback"}),d.jsx("p",{className:"mt-2 text-sm text-zinc-500 dark:text-zinc-400",children:"Copy the review path and AI prompt to paste into any AI coding tool (Claude Code, Cursor, Windsurf, Copilot, etc.)."}),d.jsxs("div",{className:"mt-4",children:[d.jsx("label",{className:"text-xs font-medium text-zinc-500 dark:text-zinc-400",children:"Review path"}),d.jsx("code",{className:"mt-1 block w-full break-all rounded-md border border-zinc-200 bg-zinc-50 px-3 py-2 text-xs text-zinc-700 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-300",children:e})]}),d.jsxs("label",{className:"mt-4 flex items-center gap-2 text-sm text-zinc-600 dark:text-zinc-400",children:[d.jsx("input",{type:"checkbox",checked:r,onChange:f=>a(f.target.checked),className:"h-3.5 w-3.5 rounded border-zinc-300 text-indigo-500 focus:ring-indigo-400 dark:border-zinc-600"}),"Include AI prompt"]}),r&&d.jsx("div",{className:"mt-3 max-h-40 overflow-y-auto rounded-md border border-zinc-200 bg-zinc-50 p-3 text-xs text-zinc-600 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-400",children:d.jsx("pre",{className:"whitespace-pre-wrap font-mono leading-relaxed",children:_v(e)})}),d.jsxs("div",{className:"mt-6 flex justify-end gap-3",children:[d.jsx("button",{onClick:t,className:"rounded-md border border-zinc-200 px-3 py-1.5 text-sm font-medium text-zinc-700 transition-colors hover:bg-zinc-100 dark:border-zinc-700 dark:text-zinc-300 dark:hover:bg-zinc-800",children:"Cancel"}),d.jsx("button",{onClick:c,className:"inline-flex items-center gap-1.5 rounded-md bg-indigo-600 px-3 py-1.5 text-sm font-medium text-white transition-colors hover:bg-indigo-700",children:l?d.jsxs(d.Fragment,{children:[d.jsx(Mr,{className:"h-3.5 w-3.5"}),"Copied!"]}):d.jsxs(d.Fragment,{children:[d.jsx(tk,{className:"h-3.5 w-3.5"}),"Copy"]})})]})]})}const Y9=[{value:"needs_review",label:"Needs Review"},{value:"in_progress",label:"In Progress"},{value:"changes_made",label:"Changes Made"},{value:"acknowledged",label:"Acknowledged"},{value:"dismissed",label:"Dismissed"}];function Q9(){const{id:e,round:t}=Hu(),r=parseInt(t??"0",10),{data:a,isLoading:l}=T9(e??"",r),{data:o}=A9(e??"",r),{data:c}=Kh(e??"","final"),{data:f}=Kh(e??"","final-human"),{data:h}=Kh(e??"","discourse"),m=Gw(),[g,x]=_.useState(!1),[y,v]=_.useState(!1),[k,E]=_.useState(!1);if(l)return d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Loading round..."});if(!a)return d.jsxs("div",{children:[d.jsxs(In,{to:`/sessions/${e}`,className:"mb-4 inline-flex items-center gap-1 text-sm text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-300",children:[d.jsx(xa,{className:"h-4 w-4"}),"Back to session"]}),d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Round not found."})]});const S=h?e9(h.content):[];return d.jsxs("div",{className:"space-y-6",children:[d.jsxs(In,{to:`/sessions/${e}`,className:"inline-flex items-center gap-1 text-sm text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-300",children:[d.jsx(xa,{className:"h-4 w-4"}),"Back to session"]}),d.jsxs("div",{className:"flex items-start justify-between gap-4",children:[d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsxs("h1",{className:"text-2xl font-semibold",children:["Round ",a.round_number]}),d.jsx("select",{value:a.progress?.status??"needs_review",onChange:N=>m.mutate({roundId:a.id,status:N.target.value}),className:"rounded-md border border-zinc-300 bg-white px-2 py-1 text-xs dark:border-zinc-700 dark:bg-zinc-900",children:Y9.map(N=>d.jsx("option",{value:N.value,children:N.label},N.value))})]}),d.jsxs("p",{className:"mt-1 text-sm text-zinc-500 dark:text-zinc-400",children:[(a.reviewer_outputs??[]).length," reviewer",(a.reviewer_outputs??[]).length!==1?"s":""]})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[c&&d.jsx(q9,{sessionId:e??"",roundNumber:r,finalContent:c.content,savedHumanReview:f?.content}),c&&d.jsx(G9,{sessionId:e??"",roundNumber:r}),d.jsxs("button",{type:"button",onClick:()=>v(!0),className:"inline-flex items-center gap-1.5 rounded-md border border-zinc-200 bg-white px-3 py-1.5 text-xs font-medium text-zinc-700 transition-colors hover:bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-300 dark:hover:bg-zinc-700",children:[d.jsx(Au,{className:"h-3.5 w-3.5"}),"Ask the Team"]}),d.jsxs("button",{type:"button",onClick:()=>E(!0),title:"Copy a resume command to continue this review's AI conversation in your terminal",className:"inline-flex items-center gap-1.5 rounded-md border border-zinc-200 bg-white px-3 py-1.5 text-xs font-medium text-zinc-700 transition-colors hover:bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-300 dark:hover:bg-zinc-700",children:[d.jsx(Oi,{className:"h-3.5 w-3.5"}),"Resume in terminal"]})]})]}),k&&e&&d.jsx(Zm,{workflowId:e,onClose:()=>E(!1)}),a.verdict&&d.jsx(r9,{verdict:a.verdict,blockerCount:a.blocker_count,suggestionCount:a.suggestion_count,shouldFixCount:a.should_fix_count}),d.jsxs("div",{children:[d.jsx("h2",{className:"mb-3 text-sm font-medium text-zinc-900 dark:text-zinc-100",children:"Reviewers"}),d.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-4",children:(a.reviewer_outputs??[]).map(N=>d.jsx(j9,{sessionId:e??"",roundNumber:r,reviewer:N},N.id))})]}),o&&o.length>0&&d.jsxs("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsxs("h2",{className:"mb-4 text-sm font-medium text-zinc-900 dark:text-zinc-100",children:["Findings (",o.length,")"]}),d.jsx(Vw,{findings:o})]}),h&&d.jsxs("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsxs("button",{onClick:()=>x(N=>!N),className:"flex items-center gap-2 text-sm font-medium text-zinc-900 transition-colors hover:text-zinc-700 dark:text-zinc-100 dark:hover:text-zinc-300",children:[d.jsx(Au,{className:"h-4 w-4"}),g?"Hide Discourse":"View Discourse"]}),g&&d.jsx("div",{className:"mt-4 space-y-4",children:S.length>0?S.map((N,O)=>d.jsx(J6,{type:N.type,content:N.content,reviewer:N.reviewer},O)):d.jsx(jr,{content:h.content})})]}),c&&d.jsxs("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsx("h2",{className:"mb-4 text-sm font-medium text-zinc-900 dark:text-zinc-100",children:"Final Review"}),d.jsx(jr,{content:c.content})]}),y&&a&&d.jsx($w,{sessionId:e??"",targetType:"review_round",targetId:a.round_number,onClose:()=>v(!1)})]})}function X9(){const{id:e,round:t,reviewerId:r}=Hu(),a=parseInt(t??"0",10),l=parseInt(r??"0",10),{data:o,isLoading:c}=R9(e??"",a,l),f=nn({queryKey:["reviewer-content",e,a,l],queryFn:async()=>{if(!o?.file_path)return"";try{return(await Dt(`/api/sessions/${e}/rounds/${a}/reviewers/${l}/content`)).content??""}catch{return""}},enabled:!!o?.file_path});if(c)return d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Loading reviewer..."});if(!o)return d.jsxs("div",{children:[d.jsxs(In,{to:`/sessions/${e}/reviews/${a}`,className:"mb-4 inline-flex items-center gap-1 text-sm text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-300",children:[d.jsx(xa,{className:"h-4 w-4"}),"Back to round"]}),d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Reviewer not found."})]});const h=Kw[o.reviewer_type]??Va;return d.jsxs("div",{className:"space-y-6",children:[d.jsxs(In,{to:`/sessions/${e}/reviews/${a}`,className:"inline-flex items-center gap-1 text-sm text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-300",children:[d.jsx(xa,{className:"h-4 w-4"}),"Back to round ",a]}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(h,{className:"h-6 w-6 text-zinc-500"}),d.jsxs("div",{children:[d.jsxs("h1",{className:"text-2xl font-semibold capitalize",children:[o.reviewer_type,o.instance_number>1&&d.jsxs("span",{className:"ml-1 text-zinc-500 dark:text-zinc-400",children:["#",o.instance_number]})]}),d.jsxs("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:[o.finding_count," finding",o.finding_count!==1?"s":""]})]})]}),f.data&&d.jsxs("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsx("h2",{className:"mb-4 text-sm font-medium text-zinc-900 dark:text-zinc-100",children:"Reviewer Output"}),d.jsx(jr,{content:f.data})]}),o.findings.length>0&&d.jsxs("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsxs("h2",{className:"mb-4 text-sm font-medium text-zinc-900 dark:text-zinc-100",children:["Findings (",o.findings.length,")"]}),d.jsx(Vw,{findings:o.findings})]})]})}const Ev={needs_review:0,in_progress:1,changes_made:2,acknowledged:3,dismissed:4},Yw=[{value:"needs_review",label:"Needs Review"},{value:"in_progress",label:"In Progress"},{value:"changes_made",label:"Changes Made"},{value:"acknowledged",label:"Acknowledged"},{value:"dismissed",label:"Dismissed"}],Z9=[{value:"all",label:"All Statuses"},...Yw];function W9(){const{data:e,isLoading:t}=C9(),r=Gw(),a=Pu(),[l,o]=_.useState(!1),[c,f]=_.useState("all"),[h,m]=_.useState("all"),[g,x]=_.useState("status"),[y,v]=_.useState("asc"),k=_.useMemo(()=>{const A=new Set,P=[{value:"all",label:"All Verdicts"}];for(const $ of e??[])$.verdict&&!A.has($.verdict)&&(A.add($.verdict),P.push({value:$.verdict,label:$.verdict}));return P},[e]),E=_.useMemo(()=>{let A=e??[];return l||(A=A.filter(P=>{const $=P.progress?.status??"needs_review";return $==="needs_review"||$==="in_progress"})),c!=="all"&&(A=A.filter(P=>(P.progress?.status??"needs_review")===c)),h!=="all"&&(A=A.filter(P=>P.verdict===h)),A},[e,l,c,h]),S=_.useMemo(()=>{const A=y==="asc"?1:-1;return[...E].sort((P,$)=>{switch(g){case"session_id":return P.session_id.localeCompare($.session_id)*A;case"round_number":return(P.round_number-$.round_number)*A;case"verdict":return(P.verdict??"").localeCompare($.verdict??"")*A;case"blocker_count":return(P.blocker_count-$.blocker_count)*A;case"status":{const M=Ev[P.progress?.status??"needs_review"],K=Ev[$.progress?.status??"needs_review"];return(M-K)*A}default:return 0}})},[E,g,y]);function N(A){g===A?v(P=>P==="asc"?"desc":"asc"):(x(A),v("asc"))}function O(A,P){r.mutate({roundId:A,status:P})}return d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("h1",{className:"text-2xl font-semibold",children:"Reviews"}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("button",{onClick:()=>o(!1),className:ae("rounded-md px-3 py-1.5 text-xs font-medium transition-colors",l?"text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-zinc-100":"bg-zinc-900 text-white dark:bg-zinc-100 dark:text-zinc-900"),children:"Actionable"}),d.jsx("button",{onClick:()=>o(!0),className:ae("rounded-md px-3 py-1.5 text-xs font-medium transition-colors",l?"bg-zinc-900 text-white dark:bg-zinc-100 dark:text-zinc-900":"text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-zinc-100"),children:"All"})]})]}),t?d.jsx("p",{className:"mt-6 text-sm text-zinc-500 dark:text-zinc-400",children:"Loading reviews..."}):!e||e.length===0?d.jsxs("p",{className:"mt-6 text-sm text-zinc-500 dark:text-zinc-400",children:["No review rounds found. Run ",d.jsx("code",{className:"rounded bg-zinc-100 px-1.5 py-0.5 text-xs dark:bg-zinc-800",children:"ocr review"})," to create one."]}):d.jsxs("div",{className:"mt-6",children:[d.jsxs("div",{className:"mb-4 flex flex-wrap items-center gap-3",children:[d.jsx(rk,{className:"h-4 w-4 text-zinc-400"}),l&&d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:"Status:"}),d.jsx("select",{value:c,onChange:A=>f(A.target.value),className:"rounded-md border border-zinc-300 bg-white px-2 py-1 text-xs dark:border-zinc-700 dark:bg-zinc-900",children:Z9.map(A=>d.jsx("option",{value:A.value,children:A.label},A.value))})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:"Verdict:"}),d.jsx("select",{value:h,onChange:A=>m(A.target.value),className:"rounded-md border border-zinc-300 bg-white px-2 py-1 text-xs dark:border-zinc-700 dark:bg-zinc-900",children:k.map(A=>d.jsx("option",{value:A.value,children:A.label},A.value))})]}),d.jsxs("span",{className:"text-xs text-zinc-400 dark:text-zinc-500",children:[S.length," of ",(e??[]).length," reviews"]})]}),S.length===0?d.jsx("p",{className:"py-8 text-center text-sm text-zinc-500 dark:text-zinc-400",children:"No reviews match your filters."}):d.jsx("div",{className:"overflow-x-auto rounded-lg border border-zinc-200 dark:border-zinc-800",children:d.jsxs("table",{className:"w-full text-sm",children:[d.jsx("thead",{className:"bg-zinc-50 dark:bg-zinc-900",children:d.jsxs("tr",{children:[d.jsx(ha,{label:"Branch",field:"session_id",activeField:g,direction:y,onSort:N}),d.jsx(ha,{label:"Round",field:"round_number",activeField:g,direction:y,onSort:N}),d.jsx(ha,{label:"Verdict",field:"verdict",activeField:g,direction:y,onSort:N}),d.jsx(ha,{label:"Blockers",field:"blocker_count",activeField:g,direction:y,onSort:N}),d.jsx("th",{className:"border-b border-zinc-200 px-4 py-2 text-left font-medium text-zinc-900 dark:border-zinc-800 dark:text-zinc-100",children:"Reviewers"}),d.jsx(ha,{label:"Status",field:"status",activeField:g,direction:y,onSort:N})]})}),d.jsx("tbody",{children:S.map(A=>{const P=A.session_id.replace(/^\d{4}-\d{2}-\d{2}-/,""),$=(A.reviewer_outputs??[]).length;return d.jsxs("tr",{className:"cursor-pointer transition-colors hover:bg-zinc-50 dark:hover:bg-zinc-800/50",onClick:()=>a(`/sessions/${A.session_id}/reviews/${A.round_number}`),children:[d.jsx("td",{className:"border-b border-zinc-200 px-4 py-2 dark:border-zinc-800",children:d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(Yu,{className:"h-4 w-4 shrink-0 text-zinc-400"}),d.jsx("span",{className:"truncate text-zinc-900 dark:text-zinc-100",title:A.session_id,children:P})]})}),d.jsxs("td",{className:"border-b border-zinc-200 px-4 py-2 text-zinc-600 dark:border-zinc-800 dark:text-zinc-400",children:["Round ",A.round_number]}),d.jsx("td",{className:"border-b border-zinc-200 px-4 py-2 dark:border-zinc-800",children:A.verdict?d.jsx(Xs,{variant:A.verdict==="APPROVE"?"info":A.verdict==="REQUEST CHANGES"?"high":"medium",label:A.verdict}):d.jsx("span",{className:"text-xs text-zinc-400",children:"Pending"})}),d.jsx("td",{className:"border-b border-zinc-200 px-4 py-2 dark:border-zinc-800",children:A.blocker_count>0?d.jsx("span",{className:"inline-flex items-center rounded-md border border-red-500/25 bg-red-500/15 px-2 py-0.5 text-xs font-medium text-red-700 dark:text-red-400",children:A.blocker_count}):d.jsx("span",{className:"text-xs text-zinc-400",children:"0"})}),d.jsx("td",{className:"border-b border-zinc-200 px-4 py-2 text-zinc-600 dark:border-zinc-800 dark:text-zinc-400",children:$}),d.jsx("td",{className:"border-b border-zinc-200 px-4 py-2 dark:border-zinc-800",onClick:M=>M.stopPropagation(),children:d.jsx("select",{value:A.progress?.status??"needs_review",onChange:M=>O(A.id,M.target.value),className:"rounded-md border border-zinc-300 bg-white px-2 py-1 text-xs dark:border-zinc-700 dark:bg-zinc-900",children:Yw.map(M=>d.jsx("option",{value:M.value,children:M.label},M.value))})})]},`${A.session_id}-${A.round_number}`)})})]})})]})]})}function J9(){return d.jsx("div",{className:"flex min-h-[400px] items-center justify-center",children:d.jsxs("div",{className:"text-center",children:[d.jsx("h1",{className:"text-4xl font-semibold text-zinc-900 dark:text-zinc-100",children:"404"}),d.jsx("p",{className:"mt-2 text-zinc-500 dark:text-zinc-400",children:"Page not found."})]})})}function Ai(e){return d.jsx(jR,{children:e})}const eB=wz([{element:d.jsx(MR,{}),errorElement:d.jsx(Ti,{}),children:[{index:!0,element:Ai(d.jsx(HR,{}))},{path:"sessions",element:Ai(d.jsx(e5,{})),errorElement:d.jsx(Ti,{})},{path:"sessions/:id",element:Ai(d.jsx(y5,{})),errorElement:d.jsx(Ti,{})},{path:"sessions/:id/reviews/:round",element:Ai(d.jsx(Q9,{})),errorElement:d.jsx(Ti,{})},{path:"sessions/:id/reviews/:round/reviewers/:reviewerId",element:Ai(d.jsx(X9,{})),errorElement:d.jsx(Ti,{})},{path:"sessions/:id/maps/:run",element:Ai(d.jsx(z9,{})),errorElement:d.jsx(Ti,{})},{path:"reviews",element:Ai(d.jsx(W9,{})),errorElement:d.jsx(Ti,{})},{path:"commands",element:Ai(d.jsx(I6,{})),errorElement:d.jsx(Ti,{})},{path:"reviewers",element:Ai(d.jsx(s9,{})),errorElement:d.jsx(Ti,{})},{path:"*",element:d.jsx(J9,{})}]}]);function tB(){return d.jsx(Iz,{children:d.jsx(h2,{children:d.jsx(AC,{children:d.jsx(aT,{children:d.jsx(jz,{router:eB})})})})})}k1().then(()=>{oN.createRoot(document.getElementById("root")).render(d.jsx(_.StrictMode,{children:d.jsx(tB,{})}))});export{b9 as _,nB as a,Bu as g,d as j,_ as r,s1 as u};
|