@seele00/seele-work 0.1.166 → 0.1.168
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/libexec/seele-server +0 -0
- package/libexec/seele-worker +0 -0
- package/libexec/seele-workspace-observe +0 -0
- package/package.json +1 -1
- package/release-manifest.json +130 -130
- package/web/dist/assets/{abnfDiagram-VRR7QNED-Cmb4B9XM.js → abnfDiagram-VRR7QNED-eFD9feFU.js} +1 -1
- package/web/dist/assets/{arc-CX4xNit8.js → arc-7ymhnU9p.js} +1 -1
- package/web/dist/assets/{architectureDiagram-ZJ3FMSHR-Ch8xUTWk.js → architectureDiagram-ZJ3FMSHR-DkPCAe8v.js} +1 -1
- package/web/dist/assets/{blockDiagram-677ZJIJ3-C9giuvqR.js → blockDiagram-677ZJIJ3-BnyTlfu2.js} +1 -1
- package/web/dist/assets/{c4Diagram-LMCZKHZV-Ah3zGnYY.js → c4Diagram-LMCZKHZV-CKzKAMBe.js} +1 -1
- package/web/dist/assets/channel-BOPhgq2o.js +1 -0
- package/web/dist/assets/{chunk-2Q5K7J3B-CaY5vtHW.js → chunk-2Q5K7J3B-sMFpPAt_.js} +1 -1
- package/web/dist/assets/{chunk-32BRIVSS-LFncVjWu.js → chunk-32BRIVSS-C2i_qq0Z.js} +1 -1
- package/web/dist/assets/{chunk-5VM5RSS4-BQIYcKzt.js → chunk-5VM5RSS4-Cf2g_b6G.js} +1 -1
- package/web/dist/assets/{chunk-EX3LRPZG-PNtB9BhO.js → chunk-EX3LRPZG-CrL4_ibc.js} +1 -1
- package/web/dist/assets/{chunk-JWPE2WC7-CtbYmEYB.js → chunk-JWPE2WC7-CPnBGPZb.js} +1 -1
- package/web/dist/assets/{chunk-MOJQB5TN-Bb_iaYOj.js → chunk-MOJQB5TN-BGN_YYq0.js} +1 -1
- package/web/dist/assets/{chunk-RYQCIY6F-BxzBspZN.js → chunk-RYQCIY6F-Dy6Mwcrt.js} +1 -1
- package/web/dist/assets/{chunk-V7JOEXUC-C8sGpXkh.js → chunk-V7JOEXUC-CI9rQOHa.js} +1 -1
- package/web/dist/assets/{chunk-VR4S4FIN-BW4T48Cc.js → chunk-VR4S4FIN-CD3DBYun.js} +1 -1
- package/web/dist/assets/{chunk-XXDRQBXY-CF046tfg.js → chunk-XXDRQBXY-BgEuzmu_.js} +1 -1
- package/web/dist/assets/classDiagram-OUVF2IWQ-uz0uif4O.js +1 -0
- package/web/dist/assets/classDiagram-v2-EOCWNBFH-uz0uif4O.js +1 -0
- package/web/dist/assets/{core-zwIxNY4N.js → core-DXYBVpp4.js} +1 -1
- package/web/dist/assets/{cose-bilkent-JH36ORCC-bNBFqYO-.js → cose-bilkent-JH36ORCC-hwqp70PB.js} +1 -1
- package/web/dist/assets/{cynefin-VYW2F7L2-Je9U-0Xr.js → cynefin-VYW2F7L2-DHJNSBH6.js} +1 -1
- package/web/dist/assets/{cynefinDiagram-TSTJHNR4-DJ646RvV.js → cynefinDiagram-TSTJHNR4-Co0YidCg.js} +1 -1
- package/web/dist/assets/{dagre-VKFMJZFB-Eaq98ad4.js → dagre-VKFMJZFB-DbMlxqk1.js} +1 -1
- package/web/dist/assets/{diagram-FQU43EPY-C9B_Vbee.js → diagram-FQU43EPY-G4RadY8m.js} +1 -1
- package/web/dist/assets/{diagram-G47NLZAW-C4VB7u3F.js → diagram-G47NLZAW-D3bvSVat.js} +1 -1
- package/web/dist/assets/{diagram-NH7WQ7WH-aIXsPpJ4.js → diagram-NH7WQ7WH-BnjdutW1.js} +1 -1
- package/web/dist/assets/{diagram-OA4YK3LP-1d_J6Ztj.js → diagram-OA4YK3LP-CSIvmsWm.js} +1 -1
- package/web/dist/assets/{diagram-WEI45ONY-B_V_uv2r.js → diagram-WEI45ONY-VUrcStAO.js} +1 -1
- package/web/dist/assets/{ebnfDiagram-CCIWWBDH-DcwesF92.js → ebnfDiagram-CCIWWBDH-y4zjwZuo.js} +1 -1
- package/web/dist/assets/{elk.bundled-BP0w9QVX.js → elk.bundled-DEYlVYnR.js} +1 -1
- package/web/dist/assets/{erDiagram-Q63AITRT-BisCdcsq.js → erDiagram-Q63AITRT-sfIoz3mU.js} +1 -1
- package/web/dist/assets/{flowDiagram-23GEKE2U-BAw_EBuS.js → flowDiagram-23GEKE2U-wZIDEe6j.js} +1 -1
- package/web/dist/assets/{ganttDiagram-NO4QXBWP-SegQ7tyG.js → ganttDiagram-NO4QXBWP-CVTvF5Yl.js} +1 -1
- package/web/dist/assets/{gitGraphDiagram-IHSO6WYX-BsWRzjP-.js → gitGraphDiagram-IHSO6WYX-CALPC772.js} +1 -1
- package/web/dist/assets/index-Dl9i7G_U.css +1 -0
- package/web/dist/assets/index-Dzth2jvp.js +403 -0
- package/web/dist/assets/{infoDiagram-FWYZ7A6U-CS-Qraov.js → infoDiagram-FWYZ7A6U-CFkvAMaK.js} +1 -1
- package/web/dist/assets/{ishikawaDiagram-FXEZZL3T-7fkMczyw.js → ishikawaDiagram-FXEZZL3T-CrscxuUV.js} +1 -1
- package/web/dist/assets/{journeyDiagram-5HDEW3XC-D1r2GqsF.js → journeyDiagram-5HDEW3XC-BzFtOhRE.js} +1 -1
- package/web/dist/assets/{kanban-definition-HUTT4EX6-C9fjNYHs.js → kanban-definition-HUTT4EX6-BUFNtG5q.js} +1 -1
- package/web/dist/assets/{linear-ZeLYF1qT.js → linear-M_vOlmET.js} +1 -1
- package/web/dist/assets/{mermaid.core-u6kdiNZf.js → mermaid.core-C9jcJYa1.js} +5 -5
- package/web/dist/assets/{mindmap-definition-LN4V7U3C-BA7esxDQ.js → mindmap-definition-LN4V7U3C-DnZbSlnV.js} +1 -1
- package/web/dist/assets/{pegDiagram-2B236MQR-Db3493r_.js → pegDiagram-2B236MQR-CY9iP8yu.js} +1 -1
- package/web/dist/assets/{pieDiagram-ENE6RG2P-sdFTqxRz.js → pieDiagram-ENE6RG2P-CuzgJ33d.js} +1 -1
- package/web/dist/assets/{quadrantDiagram-ABIIQ3AL-DY-jB_ym.js → quadrantDiagram-ABIIQ3AL-DgMh5qT0.js} +1 -1
- package/web/dist/assets/{railroadDiagram-RFXS5EU6-DrgRQiui.js → railroadDiagram-RFXS5EU6-_9iv144r.js} +1 -1
- package/web/dist/assets/{requirementDiagram-TGXJPOKE-BbIwBt6f.js → requirementDiagram-TGXJPOKE-BHDt6Fbr.js} +1 -1
- package/web/dist/assets/{sankeyDiagram-HTMAVEWB-CNlUs5qI.js → sankeyDiagram-HTMAVEWB-BKLapEsU.js} +1 -1
- package/web/dist/assets/{sequenceDiagram-DBY2YBRQ-r0ipNvRQ.js → sequenceDiagram-DBY2YBRQ-Bm7wTNGr.js} +1 -1
- package/web/dist/assets/{sizeCapture-X5ZJPWSS-DbakTPrf.js → sizeCapture-X5ZJPWSS-Ca4GbWES.js} +1 -1
- package/web/dist/assets/{stateDiagram-2N3HPSRC-DvOZm-1l.js → stateDiagram-2N3HPSRC-C16G3kZO.js} +1 -1
- package/web/dist/assets/stateDiagram-v2-6OUMAXLB-Ds3At7Vi.js +1 -0
- package/web/dist/assets/{swimlanes-5IMT3BWC-DMayo9Yu.js → swimlanes-5IMT3BWC-CcgbUeia.js} +2 -2
- package/web/dist/assets/swimlanesDiagram-G3AALYLV-DXHz8Cwf.js +8 -0
- package/web/dist/assets/{timeline-definition-FHXFAJF6-DRrIdo8E.js → timeline-definition-FHXFAJF6-B7hvYY7E.js} +1 -1
- package/web/dist/assets/{vennDiagram-L72KCM5P-B4q7wqgw.js → vennDiagram-L72KCM5P-CJCdRpuR.js} +1 -1
- package/web/dist/assets/{wardleyDiagram-EHGQE667-e8k1wEUp.js → wardleyDiagram-EHGQE667-DdKpjiuH.js} +1 -1
- package/web/dist/assets/{xychartDiagram-FW5EYKEG-HcPBslW6.js → xychartDiagram-FW5EYKEG-B3-ITo34.js} +1 -1
- package/web/dist/index.html +2 -2
- package/web/dist/assets/channel-B191Oxtt.js +0 -1
- package/web/dist/assets/classDiagram-OUVF2IWQ-CKLa38O2.js +0 -1
- package/web/dist/assets/classDiagram-v2-EOCWNBFH-CKLa38O2.js +0 -1
- package/web/dist/assets/index-BT0AwQxX.js +0 -403
- package/web/dist/assets/index-HPBlKZ1R.css +0 -1
- package/web/dist/assets/stateDiagram-v2-6OUMAXLB-CZI9uOPV.js +0 -1
- package/web/dist/assets/swimlanesDiagram-G3AALYLV-Czpxy_Ud.js +0 -8
|
@@ -1,403 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./html-pp8916En.js","./javascript-wDzz0qaB.js","./css-CLj8gQPS.js","./xml-sdJ4AIDG.js","./java-CylS5w8V.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
var E7=Object.defineProperty;var N7=(e,t,n)=>t in e?E7(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var jd=(e,t,n)=>N7(e,typeof t!="symbol"?t+"":t,n);(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 u of l)if(u.type==="childList")for(const c of u.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&a(c)}).observe(document,{childList:!0,subtree:!0});function n(l){const u={};return l.integrity&&(u.integrity=l.integrity),l.referrerPolicy&&(u.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?u.credentials="include":l.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function a(l){if(l.ep)return;l.ep=!0;const u=n(l);fetch(l.href,u)}})();const M7="modulepreload",D7=function(e,t){return new URL(e,t).href},Vy={},ln=function(t,n,a){let l=Promise.resolve();if(n&&n.length>0){let c=function(p){return Promise.all(p.map(y=>Promise.resolve(y).then(k=>({status:"fulfilled",value:k}),k=>({status:"rejected",reason:k}))))};const f=document.getElementsByTagName("link"),h=document.querySelector("meta[property=csp-nonce]"),m=(h==null?void 0:h.nonce)||(h==null?void 0:h.getAttribute("nonce"));l=c(n.map(p=>{if(p=D7(p,a),p in Vy)return;Vy[p]=!0;const y=p.endsWith(".css"),k=y?'[rel="stylesheet"]':"";if(!!a)for(let M=f.length-1;M>=0;M--){const I=f[M];if(I.href===p&&(!y||I.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${p}"]${k}`))return;const C=document.createElement("link");if(C.rel=y?"stylesheet":M7,y||(C.as="script"),C.crossOrigin="",C.href=p,m&&C.setAttribute("nonce",m),document.head.appendChild(C),y)return new Promise((M,I)=>{C.addEventListener("load",M),C.addEventListener("error",()=>I(new Error(`Unable to preload CSS for ${p}`)))})}))}function u(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"&&u(f.reason);return t().catch(u)})};var gR=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function V3(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var bm={exports:{}},Ac={};/**
|
|
3
|
-
* @license React
|
|
4
|
-
* react-jsx-runtime.production.js
|
|
5
|
-
*
|
|
6
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
7
|
-
*
|
|
8
|
-
* This source code is licensed under the MIT license found in the
|
|
9
|
-
* LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/var Yy;function z7(){if(Yy)return Ac;Yy=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(a,l,u){var c=null;if(u!==void 0&&(c=""+u),l.key!==void 0&&(c=""+l.key),"key"in l){u={};for(var f in l)f!=="key"&&(u[f]=l[f])}else u=l;return l=u.ref,{$$typeof:e,type:a,key:c,ref:l!==void 0?l:null,props:u}}return Ac.Fragment=t,Ac.jsx=n,Ac.jsxs=n,Ac}var Wy;function R7(){return Wy||(Wy=1,bm.exports=z7()),bm.exports}var s=R7(),wm={exports:{}},pt={};/**
|
|
11
|
-
* @license React
|
|
12
|
-
* react.production.js
|
|
13
|
-
*
|
|
14
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
15
|
-
*
|
|
16
|
-
* This source code is licensed under the MIT license found in the
|
|
17
|
-
* LICENSE file in the root directory of this source tree.
|
|
18
|
-
*/var Ky;function O7(){if(Ky)return pt;Ky=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),u=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"),p=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),k=Symbol.iterator;function x(E){return E===null||typeof E!="object"?null:(E=k&&E[k]||E["@@iterator"],typeof E=="function"?E:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},M=Object.assign,I={};function _(E,Y,O){this.props=E,this.context=Y,this.refs=I,this.updater=O||C}_.prototype.isReactComponent={},_.prototype.setState=function(E,Y){if(typeof E!="object"&&typeof E!="function"&&E!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,E,Y,"setState")},_.prototype.forceUpdate=function(E){this.updater.enqueueForceUpdate(this,E,"forceUpdate")};function N(){}N.prototype=_.prototype;function q(E,Y,O){this.props=E,this.context=Y,this.refs=I,this.updater=O||C}var R=q.prototype=new N;R.constructor=q,M(R,_.prototype),R.isPureReactComponent=!0;var X=Array.isArray;function P(){}var H={H:null,A:null,T:null,S:null},J=Object.prototype.hasOwnProperty;function ne(E,Y,O){var ee=O.ref;return{$$typeof:e,type:E,key:Y,ref:ee!==void 0?ee:null,props:O}}function F(E,Y){return ne(E.type,Y,E.props)}function te(E){return typeof E=="object"&&E!==null&&E.$$typeof===e}function se(E){var Y={"=":"=0",":":"=2"};return"$"+E.replace(/[=:]/g,function(O){return Y[O]})}var ve=/\/+/g;function be(E,Y){return typeof E=="object"&&E!==null&&E.key!=null?se(""+E.key):Y.toString(36)}function he(E){switch(E.status){case"fulfilled":return E.value;case"rejected":throw E.reason;default:switch(typeof E.status=="string"?E.then(P,P):(E.status="pending",E.then(function(Y){E.status==="pending"&&(E.status="fulfilled",E.value=Y)},function(Y){E.status==="pending"&&(E.status="rejected",E.reason=Y)})),E.status){case"fulfilled":return E.value;case"rejected":throw E.reason}}throw E}function Z(E,Y,O,ee,ke){var Ae=typeof E;(Ae==="undefined"||Ae==="boolean")&&(E=null);var He=!1;if(E===null)He=!0;else switch(Ae){case"bigint":case"string":case"number":He=!0;break;case"object":switch(E.$$typeof){case e:case t:He=!0;break;case p:return He=E._init,Z(He(E._payload),Y,O,ee,ke)}}if(He)return ke=ke(E),He=ee===""?"."+be(E,0):ee,X(ke)?(O="",He!=null&&(O=He.replace(ve,"$&/")+"/"),Z(ke,Y,O,"",function(Pe){return Pe})):ke!=null&&(te(ke)&&(ke=F(ke,O+(ke.key==null||E&&E.key===ke.key?"":(""+ke.key).replace(ve,"$&/")+"/")+He)),Y.push(ke)),1;He=0;var it=ee===""?".":ee+":";if(X(E))for(var pe=0;pe<E.length;pe++)ee=E[pe],Ae=it+be(ee,pe),He+=Z(ee,Y,O,Ae,ke);else if(pe=x(E),typeof pe=="function")for(E=pe.call(E),pe=0;!(ee=E.next()).done;)ee=ee.value,Ae=it+be(ee,pe++),He+=Z(ee,Y,O,Ae,ke);else if(Ae==="object"){if(typeof E.then=="function")return Z(he(E),Y,O,ee,ke);throw Y=String(E),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(E).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.")}return He}function me(E,Y,O){if(E==null)return E;var ee=[],ke=0;return Z(E,ee,"","",function(Ae){return Y.call(O,Ae,ke++)}),ee}function V(E){if(E._status===-1){var Y=E._result;Y=Y(),Y.then(function(O){(E._status===0||E._status===-1)&&(E._status=1,E._result=O)},function(O){(E._status===0||E._status===-1)&&(E._status=2,E._result=O)}),E._status===-1&&(E._status=0,E._result=Y)}if(E._status===1)return E._result.default;throw E._result}var Ce=typeof reportError=="function"?reportError:function(E){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Y=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof E=="object"&&E!==null&&typeof E.message=="string"?String(E.message):String(E),error:E});if(!window.dispatchEvent(Y))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",E);return}console.error(E)},U={map:me,forEach:function(E,Y,O){me(E,function(){Y.apply(this,arguments)},O)},count:function(E){var Y=0;return me(E,function(){Y++}),Y},toArray:function(E){return me(E,function(Y){return Y})||[]},only:function(E){if(!te(E))throw Error("React.Children.only expected to receive a single React element child.");return E}};return pt.Activity=y,pt.Children=U,pt.Component=_,pt.Fragment=n,pt.Profiler=l,pt.PureComponent=q,pt.StrictMode=a,pt.Suspense=h,pt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=H,pt.__COMPILER_RUNTIME={__proto__:null,c:function(E){return H.H.useMemoCache(E)}},pt.cache=function(E){return function(){return E.apply(null,arguments)}},pt.cacheSignal=function(){return null},pt.cloneElement=function(E,Y,O){if(E==null)throw Error("The argument must be a React element, but you passed "+E+".");var ee=M({},E.props),ke=E.key;if(Y!=null)for(Ae in Y.key!==void 0&&(ke=""+Y.key),Y)!J.call(Y,Ae)||Ae==="key"||Ae==="__self"||Ae==="__source"||Ae==="ref"&&Y.ref===void 0||(ee[Ae]=Y[Ae]);var Ae=arguments.length-2;if(Ae===1)ee.children=O;else if(1<Ae){for(var He=Array(Ae),it=0;it<Ae;it++)He[it]=arguments[it+2];ee.children=He}return ne(E.type,ke,ee)},pt.createContext=function(E){return E={$$typeof:c,_currentValue:E,_currentValue2:E,_threadCount:0,Provider:null,Consumer:null},E.Provider=E,E.Consumer={$$typeof:u,_context:E},E},pt.createElement=function(E,Y,O){var ee,ke={},Ae=null;if(Y!=null)for(ee in Y.key!==void 0&&(Ae=""+Y.key),Y)J.call(Y,ee)&&ee!=="key"&&ee!=="__self"&&ee!=="__source"&&(ke[ee]=Y[ee]);var He=arguments.length-2;if(He===1)ke.children=O;else if(1<He){for(var it=Array(He),pe=0;pe<He;pe++)it[pe]=arguments[pe+2];ke.children=it}if(E&&E.defaultProps)for(ee in He=E.defaultProps,He)ke[ee]===void 0&&(ke[ee]=He[ee]);return ne(E,Ae,ke)},pt.createRef=function(){return{current:null}},pt.forwardRef=function(E){return{$$typeof:f,render:E}},pt.isValidElement=te,pt.lazy=function(E){return{$$typeof:p,_payload:{_status:-1,_result:E},_init:V}},pt.memo=function(E,Y){return{$$typeof:m,type:E,compare:Y===void 0?null:Y}},pt.startTransition=function(E){var Y=H.T,O={};H.T=O;try{var ee=E(),ke=H.S;ke!==null&&ke(O,ee),typeof ee=="object"&&ee!==null&&typeof ee.then=="function"&&ee.then(P,Ce)}catch(Ae){Ce(Ae)}finally{Y!==null&&O.types!==null&&(Y.types=O.types),H.T=Y}},pt.unstable_useCacheRefresh=function(){return H.H.useCacheRefresh()},pt.use=function(E){return H.H.use(E)},pt.useActionState=function(E,Y,O){return H.H.useActionState(E,Y,O)},pt.useCallback=function(E,Y){return H.H.useCallback(E,Y)},pt.useContext=function(E){return H.H.useContext(E)},pt.useDebugValue=function(){},pt.useDeferredValue=function(E,Y){return H.H.useDeferredValue(E,Y)},pt.useEffect=function(E,Y){return H.H.useEffect(E,Y)},pt.useEffectEvent=function(E){return H.H.useEffectEvent(E)},pt.useId=function(){return H.H.useId()},pt.useImperativeHandle=function(E,Y,O){return H.H.useImperativeHandle(E,Y,O)},pt.useInsertionEffect=function(E,Y){return H.H.useInsertionEffect(E,Y)},pt.useLayoutEffect=function(E,Y){return H.H.useLayoutEffect(E,Y)},pt.useMemo=function(E,Y){return H.H.useMemo(E,Y)},pt.useOptimistic=function(E,Y){return H.H.useOptimistic(E,Y)},pt.useReducer=function(E,Y,O){return H.H.useReducer(E,Y,O)},pt.useRef=function(E){return H.H.useRef(E)},pt.useState=function(E){return H.H.useState(E)},pt.useSyncExternalStore=function(E,Y,O){return H.H.useSyncExternalStore(E,Y,O)},pt.useTransition=function(){return H.H.useTransition()},pt.version="19.2.7",pt}var Xy;function h1(){return Xy||(Xy=1,wm.exports=O7()),wm.exports}var A=h1(),km={exports:{}},Wn={};/**
|
|
19
|
-
* @license React
|
|
20
|
-
* react-dom.production.js
|
|
21
|
-
*
|
|
22
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
23
|
-
*
|
|
24
|
-
* This source code is licensed under the MIT license found in the
|
|
25
|
-
* LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/var Zy;function I7(){if(Zy)return Wn;Zy=1;var e=h1();function t(h){var m="https://react.dev/errors/"+h;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)m+="&args[]="+encodeURIComponent(arguments[p])}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 n(){}var a={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},l=Symbol.for("react.portal");function u(h,m,p){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:l,key:y==null?null:""+y,children:h,containerInfo:m,implementation:p}}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 Wn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,Wn.createPortal=function(h,m){var p=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 u(h,m,null,p)},Wn.flushSync=function(h){var m=c.T,p=a.p;try{if(c.T=null,a.p=2,h)return h()}finally{c.T=m,a.p=p,a.d.f()}},Wn.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))},Wn.prefetchDNS=function(h){typeof h=="string"&&a.d.D(h)},Wn.preinit=function(h,m){if(typeof h=="string"&&m&&typeof m.as=="string"){var p=m.as,y=f(p,m.crossOrigin),k=typeof m.integrity=="string"?m.integrity:void 0,x=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;p==="style"?a.d.S(h,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:y,integrity:k,fetchPriority:x}):p==="script"&&a.d.X(h,{crossOrigin:y,integrity:k,fetchPriority:x,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Wn.preinitModule=function(h,m){if(typeof h=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var p=f(m.as,m.crossOrigin);a.d.M(h,{crossOrigin:p,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)},Wn.preload=function(h,m){if(typeof h=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var p=m.as,y=f(p,m.crossOrigin);a.d.L(h,p,{crossOrigin:y,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})}},Wn.preloadModule=function(h,m){if(typeof h=="string")if(m){var p=f(m.as,m.crossOrigin);a.d.m(h,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:p,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else a.d.m(h)},Wn.requestFormReset=function(h){a.d.r(h)},Wn.unstable_batchedUpdates=function(h,m){return h(m)},Wn.useFormState=function(h,m,p){return c.H.useFormState(h,m,p)},Wn.useFormStatus=function(){return c.H.useHostTransitionStatus()},Wn.version="19.2.7",Wn}var Qy;function Y3(){if(Qy)return km.exports;Qy=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(),km.exports=I7(),km.exports}var sf=Y3();const _7={queued:"Queued",running:"Running",cancelling:"Cancelling",succeeded:"Succeeded",failed:"Failed",cancelled:"Cancelled"};function Jy(e){if(!Number.isFinite(e))return"—";if(e<1024)return`${e} B`;const t=["KiB","MiB","GiB","TiB"];let n=e/1024,a=0;for(;n>=1024&&a<t.length-1;)n/=1024,a++;return`${n.toFixed(n>=100?0:1)} ${t[a]}`}async function eu(e,t="GET",n){const a=await fetch(e,{method:t,credentials:"same-origin",headers:{"content-type":"application/json"},...n===void 0?{}:{body:JSON.stringify(n)}}),l=await a.json().catch(()=>null);if(!a.ok)throw new Error((l==null?void 0:l.detail)??(l==null?void 0:l.error)??`Request failed (${a.status})`);return l}function L7({apiUrl:e,formatDate:t}){var F;const[n,a]=A.useState(null),[l,u]=A.useState(""),[c,f]=A.useState(0),[h,m]=A.useState(null),[p,y]=A.useState(!1),[k,x]=A.useState(""),[C,M]=A.useState(null),[I,_]=A.useState([]),[N,q]=A.useState(""),R=A.useRef(null),X=A.useRef(null),[P,H]=A.useState(!1);A.useEffect(()=>{let te=!1,se;const ve=async()=>{try{const be=await eu(e("admin/build"));te||(a(be),u(""))}catch(be){te||u(String(be))}finally{te||(se=setTimeout(ve,5e3))}};return ve(),()=>{te=!0,clearTimeout(se)}},[e,c]),A.useEffect(()=>{if(!C)return;let te=!1,se;_([]),q(""),H(!0);const ve=async()=>{try{const be=await eu(e(`admin/build?${new URLSearchParams({repository:C,limit:"5"})}`));te||(_(be.jobs),q(""),H(!1))}catch(be){te||(q(String(be)),H(!1))}finally{te||(se=setTimeout(ve,5e3))}};return ve(),()=>{te=!0,clearTimeout(se)}},[e,C]),A.useEffect(()=>{var be;if(!h&&!C)return;const te=document.activeElement,se=h?R.current:X.current;(be=se==null?void 0:se.querySelector("input,button"))==null||be.focus();const ve=he=>{if(he.key==="Escape"&&(he.stopPropagation(),p||(m(null),M(null))),he.key==="Tab"){const Z=[...(se==null?void 0:se.querySelectorAll("input:not(:disabled),button:not(:disabled)"))??[]],me=Z[0],V=Z.at(-1);he.shiftKey&&document.activeElement===me?(he.preventDefault(),V==null||V.focus()):!he.shiftKey&&document.activeElement===V&&(he.preventDefault(),me==null||me.focus())}};return document.addEventListener("keydown",ve,!0),()=>{document.removeEventListener("keydown",ve,!0),te==null||te.focus()}},[!!h,!!C,p]);function J(te){var ve,be;let se="";try{se=new URL((te==null?void 0:te.address)??"").hostname}catch{}x(""),m({original:te,name:(te==null?void 0:te.name)??"",address:(te==null?void 0:te.address)??"",username:((be=(ve=n==null?void 0:n.credentials)==null?void 0:ve.find(he=>he.host===se))==null?void 0:be.username)??"",token:""})}async function ne(){var te;if(!(!h||p)){y(!0),x("");try{const se=new URL(h.address);if(se.protocol!=="https:")throw new Error("Use an HTTPS Git URL.");const ve=(te=n==null?void 0:n.credentials)==null?void 0:te.find(be=>be.host===se.hostname);if(h.token)await eu(e("admin/build/credentials"),"PUT",{host:se.hostname,username:h.username,token:h.token});else if(ve){if(h.username!==ve.username)throw new Error("Enter a token when changing the HTTPS username.")}else throw new Error("Enter the HTTPS username and access token for this Git host.");h.original?await eu(e("admin/build/repositories"),"PUT",{address:h.original.address,name:h.name,timeoutSeconds:h.original.timeoutSeconds,maintenanceDays:h.original.maintenanceDays,maintenanceBytes:h.original.maintenanceBytes}):await eu(e("admin/build/repositories"),"POST",{name:h.name,address:h.address}),h.original&&(h.token||!h.original.ready)&&await eu(e("admin/build/repositories/action"),"POST",{address:h.original.address,action:"initialize"}),m(null),f(be=>be+1)}catch(se){x(String(se))}finally{y(!1)}}}return s.jsxs("section",{className:"build-service",children:[s.jsxs("header",{className:"settings-section-header",children:[s.jsxs("div",{children:[s.jsx("h3",{children:"Builds"}),s.jsx("p",{children:"Repositories available to this instance."})]}),s.jsx("button",{className:"system-information-refresh",type:"button",onClick:()=>J(null),children:"Add repository"})]}),l&&s.jsx("p",{className:"build-error",role:"alert",children:l}),n?n.repositories.length===0?s.jsx("p",{children:"No repositories configured."}):s.jsx("ul",{className:"build-repositories",children:n.repositories.map(te=>{var se,ve;return s.jsx("li",{children:s.jsxs("div",{className:"build-repository-row",children:[s.jsxs("div",{className:"build-repository-identity",children:[s.jsx("strong",{children:te.name}),s.jsx("code",{children:te.address})]}),s.jsxs("div",{className:"build-usage-pair",children:[s.jsxs("div",{className:"build-usage",children:[s.jsx("strong",{children:Jy(te.cacheBytes)}),s.jsx("small",{children:"Cache"})]}),s.jsxs("div",{className:"build-usage",children:[s.jsx("strong",{children:Jy(te.artifactBytes)}),s.jsx("small",{children:"Artifacts"})]})]}),s.jsxs("span",{className:`build-status ${(((se=n.activeJobs)==null?void 0:se[te.address])??0)>0?"running":te.ready?"succeeded":"queued"}`,children:[s.jsx("i",{}),(((ve=n.activeJobs)==null?void 0:ve[te.address])??0)>0?"In progress":te.ready?"Ready":"Not initialized"]}),s.jsxs("div",{className:"build-actions",children:[s.jsx("button",{type:"button","aria-haspopup":"dialog",onClick:()=>M(te.address),children:"Recent tasks"}),s.jsx("button",{className:"build-edit",type:"button","aria-label":`Edit ${te.name}`,title:"Edit repository",onClick:()=>J(te),children:s.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",children:s.jsx("path",{d:"m15 5 4 4M4 20l5-1L20 8a2.8 2.8 0 0 0-4-4L5 15z"})})})]})]})},te.address)})}):s.jsx("p",{children:"Loading repositories…"}),C&&sf.createPortal(s.jsx("div",{className:"build-dialog-overlay",role:"presentation",onClick:()=>M(null),children:s.jsxs("div",{ref:X,className:"build-dialog build-tasks-dialog",role:"dialog","aria-modal":"true","aria-label":"Recent tasks",onClick:te=>te.stopPropagation(),children:[s.jsxs("header",{children:[s.jsxs("div",{children:[s.jsx("h3",{children:"Recent tasks"}),s.jsxs("p",{children:[(F=n==null?void 0:n.repositories.find(te=>te.address===C))==null?void 0:F.name," · Last 5 tasks"]})]}),s.jsx("button",{className:"build-close",type:"button","aria-label":"Close recent tasks",onClick:()=>M(null),children:"×"})]}),N?s.jsx("p",{role:"alert",className:"build-error",children:N}):P?s.jsx("p",{children:"Loading tasks…"}):I.length===0?s.jsx("p",{children:"No recent tasks."}):s.jsx("div",{className:"build-recent",children:s.jsxs("table",{children:[s.jsx("thead",{children:s.jsxs("tr",{children:[s.jsx("th",{children:"Branch"}),s.jsx("th",{children:"Submitter"}),s.jsx("th",{children:"Time"}),s.jsx("th",{children:"Status"})]})}),s.jsx("tbody",{children:I.map(te=>{var se;return s.jsxs("tr",{children:[s.jsx("td",{className:"build-branch",children:((se=te.input)==null?void 0:se.branch)??(te.kind==="initialize"?"Repository initialization":"Cache maintenance")}),s.jsx("td",{children:te.submittedByName??te.submittedBy}),s.jsx("td",{className:"build-time",children:t(te.createdAt*1e3)}),s.jsx("td",{children:s.jsxs("span",{className:`build-status ${te.status}`,children:[s.jsx("i",{}),_7[te.status]]})})]},te.id)})})]})}),s.jsx("footer",{children:s.jsx("button",{type:"button",onClick:()=>M(null),children:"Close"})})]})}),document.body),h&&sf.createPortal(s.jsx("div",{className:"build-dialog-overlay",role:"presentation",onClick:()=>{p||m(null)},children:s.jsxs("form",{ref:R,className:"build-dialog",role:"dialog","aria-modal":"true","aria-label":h.original?"Edit repository":"Add repository",onClick:te=>te.stopPropagation(),onSubmit:te=>{te.preventDefault(),ne()},children:[s.jsx("header",{children:s.jsx("h3",{children:h.original?"Edit repository":"Add repository"})}),s.jsxs("label",{children:["Name",s.jsx("input",{required:!0,maxLength:100,value:h.name,onChange:te=>m({...h,name:te.target.value})})]}),s.jsxs("label",{children:["Git URL",s.jsx("input",{required:!0,type:"url",readOnly:!!h.original,value:h.address,spellCheck:!1,placeholder:"https://code.alipay.com/shao/seele-codex.git",onChange:te=>{var be,he;const se=te.target.value;let ve="";try{ve=new URL(se).hostname}catch{}m({...h,address:se,username:((he=(be=n==null?void 0:n.credentials)==null?void 0:be.find(Z=>Z.host===ve))==null?void 0:he.username)??"",token:""})}})]}),s.jsxs("label",{children:["HTTPS username",s.jsx("input",{required:!0,value:h.username,autoComplete:"off",onChange:te=>m({...h,username:te.target.value})})]}),s.jsxs("label",{children:["Access token",s.jsx("input",{type:"password",value:h.token,autoComplete:"new-password",placeholder:h.original?"Leave empty to keep the current token":"",onChange:te=>m({...h,token:te.target.value})})]}),s.jsx("p",{children:"Git credentials are shared by repositories on the same host."}),k&&s.jsx("p",{className:"build-error",role:"alert",children:k}),s.jsxs("footer",{children:[s.jsx("button",{type:"button",disabled:p,onClick:()=>m(null),children:"Cancel"}),s.jsx("button",{type:"submit",disabled:p,children:p?"Saving…":"Save"})]})]})}),document.body)]})}function B7(e,t){return{textareaDisabled:!1,sendDisabled:t||!e.trim()}}function q7(e,t){return e.hasConversation?e.messageSubmitting?"blocked":e.hasActiveTurn||e.hasConfirmedCurrentTurn?t?"queue-turn":"steer-turn":"start-turn":"create-workspace"}function U7(e){return e.key!=="Enter"||!e.metaKey&&!e.ctrlKey||e.isComposing?null:{forceNewTurn:e.shiftKey}}function e2(e,t){return e.conversationId===t.conversationId&&e.version===t.version}const H7=3,$7=10;function W3({value:e,onChange:t,onShortcut:n,disabled:a=!1,sendDisabled:l,allowNewTurn:u=!1,textareaRef:c,label:f="Message",sendLabel:h="Send message",placeholder:m="Cmd/Ctrl + Enter"}){const p=A.useRef(null),y=c??p;return A.useLayoutEffect(()=>F7(y.current),[e,a,y]),s.jsxs("div",{className:"composer-panel",children:[s.jsx("textarea",{"aria-label":f,disabled:a,value:e,ref:y,onChange:k=>t(k.target.value),placeholder:m,onKeyDown:k=>{const x=U7({key:k.key,metaKey:k.metaKey,ctrlKey:k.ctrlKey,shiftKey:k.shiftKey,isComposing:k.nativeEvent.isComposing});x&&(k.preventDefault(),!a&&!l&&(!x.forceNewTurn||u)&&n(x.forceNewTurn))}}),s.jsxs("button",{"aria-label":h,className:"composer-send",disabled:l,type:"submit",children:[s.jsx(P7,{}),s.jsxs("span",{className:"composer-send-tooltip",role:"tooltip",children:[s.jsxs("span",{children:[s.jsx("kbd",{children:"⌘ / Ctrl + Enter"})," ",u?"Send or add to running turn":"发送引导"]}),u&&s.jsxs("span",{children:[s.jsx("kbd",{children:"⇧ + ⌘ / Ctrl + Enter"})," New turn or queue"]})]})]})]})}function F7(e){if(!e)return;const t=window.getComputedStyle(e),n=parseFloat(t.lineHeight)||24,a=parseFloat(t.paddingTop)||0,l=parseFloat(t.paddingBottom)||0,u=n*H7+a+l,c=n*$7+a+l;e.style.height="auto";const f=Math.min(Math.max(e.scrollHeight,u),c);e.style.height=`${f}px`,e.style.overflowY=e.scrollHeight>c?"auto":"hidden"}function P7(){return s.jsx("svg",{"aria-hidden":"true",fill:"none",height:"16",viewBox:"0 0 24 24",width:"16",children:s.jsx("path",{d:"M12 19V5m-5 5 5-5 5 5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2.1"})})}function t2(e,t){const n=u=>{var f;const c=/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-([0-9A-Za-z.-]+))?(?:\+[0-9A-Za-z.-]+)?$/.exec(u);return c?{core:c.slice(1,4).map(BigInt),pre:(f=c[4])==null?void 0:f.split(".")}:null},a=n(e),l=n(t);if(!a||!l)return!1;for(let u=0;u<3;u++)if(a.core[u]!==l.core[u])return a.core[u]>l.core[u];if(!a.pre||!l.pre)return!a.pre&&!!l.pre;for(let u=0;u<Math.max(a.pre.length,l.pre.length);u++){const c=a.pre[u],f=l.pre[u];if(c===void 0||f===void 0)return c!==void 0;if(c===f)continue;const h=/^\d+$/.test(c),m=/^\d+$/.test(f);return h&&m?BigInt(c)>BigInt(f):h!==m?!h:c>f}return!1}function Cd({kind:e}){return s.jsx("svg",{"aria-hidden":"true",width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:e==="edit"?s.jsxs(s.Fragment,{children:[s.jsx("path",{d:"m4 16-.8 4 4-.8L18.4 8 15.2 4.8 4 16Z"}),s.jsx("path",{d:"m13.8 6.2 3.2 3.2"})]}):e==="delete"?s.jsx(s.Fragment,{children:s.jsx("path",{d:"M3 6h18M9 6V4h6v2M5 6l1 14h12l1-14M10 10v6M14 10v6"})}):s.jsxs(s.Fragment,{children:[s.jsx("path",{d:"M20 7v5h-5M4 17v-5h5"}),s.jsx("path",{d:"M6 7a7 7 0 0 1 12-1l2 3M4 15l2 3a7 7 0 0 0 12-1"})]})})}const n2=e=>({queued:"Queued",running:"Installing",succeeded:"Installed",failed:"Retry pending"})[e]??e;async function Gi(e,t="GET",n){const a=await fetch(e,{method:t,credentials:"same-origin",headers:{"content-type":"application/json"},...n===void 0?{}:{body:JSON.stringify(n)}});if(!a.ok)throw new Error(`HTTP ${a.status}: ${await a.text()}`);return a.json()}function G7({apiUrl:e,admin:t,workspaceId:n,workspaces:a=[]}){var me;const[l,u]=A.useState(n??((me=a[0])==null?void 0:me.id)??""),[c,f]=A.useState(null),[h,m]=A.useState([]),[p,y]=A.useState(null),[k,x]=A.useState([]),[C,M]=A.useState([]),[I,_]=A.useState(""),[N,q]=A.useState(!1),[R,X]=A.useState(null),[P,H]=A.useState(0),J=A.useRef(null);A.useEffect(()=>{var U,E;if(!R)return;const V=document.activeElement;(E=(U=J.current)==null?void 0:U.querySelector("input,button"))==null||E.focus();const Ce=Y=>{var O;if(Y.key==="Escape"&&(Y.stopPropagation(),N||X(null)),Y.key==="Tab"){const ee=[...((O=J.current)==null?void 0:O.querySelectorAll("button:not(:disabled),input:not(:disabled),select:not(:disabled)"))??[]],ke=ee[0],Ae=ee.at(-1);Y.shiftKey&&document.activeElement===ke?(Y.preventDefault(),Ae==null||Ae.focus()):!Y.shiftKey&&document.activeElement===Ae&&(Y.preventDefault(),ke==null||ke.focus())}};return document.addEventListener("keydown",Ce,!0),()=>{document.removeEventListener("keydown",Ce,!0),V==null||V.focus()}},[!!R,N]),A.useEffect(()=>{if(N||R)return;const V=window.setInterval(()=>H(Ce=>Ce+1),5e3);return()=>window.clearInterval(V)},[N,R]),A.useEffect(()=>{if(N)return;let V=!1;return l&&Gi(e(`conversations/${encodeURIComponent(l)}/skills`)).then(Ce=>{V||M(Ce)}).catch(Ce=>{V||_(String(Ce))}),()=>{V=!0}},[e,l,P,N]),A.useEffect(()=>{M([])},[l]),A.useEffect(()=>{if(N)return;let V=!1;async function Ce(){const U=await Gi(e("settings/skills/local"));if(!V&&(y(U),t)){const[E,Y,O]=await Promise.all([Gi(e("settings/skills")),Gi(e("settings/skills/deployments")),Gi(e("settings/skills/reports"))]);V||(f(ee=>ee&&ee.revision>E.revision?ee:E),m(Y.deployments),x(O))}}return Ce().catch(U=>{V||_(String(U))}),()=>{V=!0}},[e,t,P,N]);async function ne(V){if(!N){q(!0),_("");try{await V(),X(null),H(Ce=>Ce+1)}catch(Ce){_(String(Ce))}finally{q(!1)}}}async function F(V){c&&f(await Gi(e("settings/skills"),"PUT",{expectedRevision:c.revision,skills:V.map(({checkGeneration:Ce,...U})=>U)}))}function te(V){return k.filter(U=>V.deployments.includes(U.deploymentId)&&U.report.revision>=((c==null?void 0:c.revision)??0)).flatMap(U=>U.report.skills).filter(U=>U.id===V.id&&(U.checkGeneration??0)>=V.checkGeneration).map(U=>U.latestVersion).filter(U=>!!U&&t2(U,V.source.version)).reduce((U,E)=>t2(E,U)?E:U,V.source.version)}const se=V=>{_(""),X({kind:"edit",skill:V??{id:crypto.randomUUID(),name:"",source:{package:"",version:"",directory:"."},deployments:[],checkGeneration:0}})},ve=V=>X(Ce=>Ce&&["edit","promote","scope"].includes(Ce.kind)?{...Ce,skill:V}:Ce),be=async()=>{if(!R)return;const V=R;await ne(async()=>{if(V.kind==="remove")await Gi(e(`conversations/${encodeURIComponent(l)}/skills`),"DELETE",{directory:V.skill.directory});else if(V.kind==="promote"){if(!c)return;f(await Gi(e(`conversations/${encodeURIComponent(l)}/skills/promote`),"POST",{directory:V.directory,expectedRevision:c.revision,deployments:V.skill.deployments}))}else c&&await F(V.kind==="delete"?c.skills.filter(Ce=>Ce.id!==V.skill.id):[...c.skills.filter(Ce=>Ce.id!==V.skill.id),V.skill])})},he=C.filter(V=>!V.platformBuiltin),Z=R&&(R.kind==="edit"||R.kind==="promote"||R.kind==="scope")?R:null;return s.jsxs("section",{className:"skills-panel",children:[s.jsxs("header",{className:"settings-section-header skills-heading",children:[s.jsxs("div",{children:[s.jsx("h3",{children:"Skills"}),s.jsx("p",{children:"Manage shared skills and workspace-private skills."})]}),s.jsxs("div",{className:"codex-account-toolbar",children:[s.jsx("button",{className:"codex-account-add skills-icon-action","aria-label":"Refresh skills",title:"Refresh skills",disabled:N,onClick:()=>{_(""),H(V=>V+1)},children:s.jsx(Cd,{kind:"refresh"})}),c&&s.jsx("button",{className:"codex-account-add",disabled:N,onClick:()=>se(),children:"Add skill"})]})]}),I&&!R&&s.jsx("p",{className:"skills-error",role:"alert",children:I}),s.jsxs("section",{className:"skills-section",children:[s.jsxs("h4",{children:["Managed skills ",s.jsx("small",{children:(c==null?void 0:c.skills.length)??(p==null?void 0:p.skills.length)??0})]}),s.jsxs("div",{className:"skills-list",children:[c?c.skills.map(V=>{const Ce=te(V);return s.jsxs("article",{className:"skills-card",children:[s.jsxs("div",{className:"skills-card-top",children:[s.jsxs("div",{className:"skills-identity",children:[s.jsx("strong",{children:V.name}),s.jsx("span",{className:"skills-version",children:V.source.version}),s.jsx("small",{children:V.source.package})]}),s.jsxs("div",{className:"skills-actions codex-account-actions",children:[Ce!==V.source.version&&s.jsxs("button",{className:"codex-credit-use",disabled:N,onClick:()=>void ne(()=>F(c.skills.map(U=>U.id===V.id?{...U,source:{...U.source,version:Ce}}:U))),children:["Upgrade to ",Ce]}),s.jsx("button",{disabled:N||!V.deployments.length,title:V.deployments.length?void 0:"Assign a deployment to check for updates",onClick:()=>void ne(async()=>f(await Gi(e(`settings/skills/${V.id}/check`),"POST",{expectedRevision:c.revision}))),children:"Check for updates"}),s.jsx("button",{disabled:N,onClick:()=>X({kind:"scope",skill:V}),children:"Deployments"}),s.jsx("button",{className:"skills-icon-action","aria-label":`Delete ${V.name}`,title:"Delete skill",disabled:N,onClick:()=>X({kind:"delete",skill:V}),children:s.jsx(Cd,{kind:"delete"})}),s.jsx("button",{className:"skills-icon-action","aria-label":`Edit ${V.name}`,title:"Edit skill",disabled:N,onClick:()=>se(V),children:s.jsx(Cd,{kind:"edit"})})]})]}),s.jsx("div",{className:"skills-deployments",children:V.deployments.length?V.deployments.map(U=>{var O;const E=k.find(ee=>ee.deploymentId===U),Y=E==null?void 0:E.report.skills.find(ee=>ee.id===V.id);return s.jsxs("span",{title:(Y==null?void 0:Y.error)??void 0,children:[((O=h.find(ee=>ee.deploymentId===U))==null?void 0:O.name)||U,s.jsx("small",{children:!Y||!E||E.report.revision<c.revision?"Sync pending":`${Y.installedVersion??"Not installed"} · ${n2(Y.installStatus)}${(Y.checkGeneration??0)<V.checkGeneration?" · Checking":""}`}),(Y==null?void 0:Y.error)&&s.jsx("small",{className:"skills-error",children:Y.error})]},U)}):s.jsx("span",{children:"No deployments"})})]},V.id)}):p==null?void 0:p.skills.map(V=>s.jsxs("article",{className:"skills-card",children:[s.jsx("strong",{children:V.name||V.id}),s.jsxs("small",{children:[V.installedVersion??"Not installed"," · ",n2(V.installStatus)]})]},V.id)),(c?c.skills.length===0:(p==null?void 0:p.skills.length)===0)&&s.jsx("p",{className:"skills-empty",children:"No managed skills yet."})]})]}),s.jsxs("section",{className:"skills-section",children:[s.jsxs("header",{className:"skills-heading",children:[s.jsxs("h4",{children:["Workspace skills ",s.jsx("small",{children:he.length})]}),a.length>0&&s.jsx("select",{"aria-label":"Skills workspace",disabled:N||!!R,value:l,onChange:V=>{_(""),u(V.target.value)},children:a.map(V=>s.jsx("option",{value:V.id,children:V.title},V.id))})]}),s.jsxs("div",{className:"skills-list",children:[he.map(V=>{var Ce,U,E;return s.jsx("article",{className:"skills-card",children:s.jsxs("div",{className:"skills-card-top",children:[s.jsxs("div",{className:"skills-identity",children:[s.jsx("strong",{children:V.name}),s.jsx("small",{children:(Ce=V.registration)!=null&&Ce.npm?`${V.registration.npm.package} · ${V.registration.npm.version}`:((U=V.registration)==null?void 0:U.origin)||"Local skill"}),s.jsx("small",{children:V.description})]}),s.jsxs("div",{className:"skills-actions codex-account-actions",children:[t&&c&&V.canPromote&&((E=V.registration)==null?void 0:E.npm)&&s.jsx("button",{disabled:N,onClick:()=>X({kind:"promote",directory:V.directory,skill:{id:"",name:V.name,source:V.registration.npm,deployments:[],checkGeneration:0}}),children:"Share"}),s.jsx("button",{className:"skills-icon-action","aria-label":`Delete ${V.name}`,title:"Delete workspace skill",disabled:N,onClick:()=>X({kind:"remove",skill:V}),children:s.jsx(Cd,{kind:"delete"})})]})]})},V.directory)}),!he.length&&s.jsx("p",{className:"skills-empty",children:l?"No workspace skills. Built-in skills are managed by Seele.":"Select a workspace to view its skills."})]})]}),R&&sf.createPortal(s.jsx("div",{className:"dialog-backdrop",role:"presentation",onMouseDown:()=>{N||X(null)},children:s.jsxs("form",{ref:J,className:"dialog-card skills-dialog",role:"dialog","aria-modal":"true","aria-labelledby":"skills-dialog-title",onMouseDown:V=>V.stopPropagation(),onSubmit:V=>{V.preventDefault(),be()},children:[s.jsxs("header",{children:[s.jsxs("div",{children:[s.jsx("h3",{id:"skills-dialog-title",children:R.kind==="promote"?"Share":R.kind==="scope"?"Deployments":R.kind==="remove"?"Delete workspace skill":R.kind==="delete"?"Delete managed skill":c!=null&&c.skills.some(V=>V.id===R.skill.id)?"Edit skill":"Add skill"}),s.jsxs("p",{children:[R.skill.name,R.kind==="promote"?" · Select target deployments":""]})]}),s.jsx("button",{className:"icon-button","aria-label":"Close skill dialog",disabled:N,type:"button",onClick:()=>X(null),children:"×"})]}),I&&s.jsx("p",{className:"skills-error",role:"alert",children:I}),R.kind==="remove"&&s.jsx("p",{children:"Remove this workspace's skill entry. Shared skills and other workspaces are unaffected. The entry is kept in the workspace's skill archive."}),R.kind==="delete"&&s.jsx("p",{children:"Remove this skill from the catalog and all deployments. Running turns are not interrupted; future turns will no longer load it."}),(Z==null?void 0:Z.kind)==="edit"&&s.jsxs(s.Fragment,{children:[s.jsxs("label",{children:["Skill name",s.jsx("input",{required:!0,value:Z.skill.name,onChange:V=>ve({...Z.skill,name:V.target.value})})]}),s.jsxs("label",{children:["npm package",s.jsx("input",{required:!0,value:Z.skill.source.package,onChange:V=>ve({...Z.skill,source:{...Z.skill.source,package:V.target.value}})})]}),s.jsxs("label",{children:["Version",s.jsx("input",{required:!0,value:Z.skill.source.version,onChange:V=>ve({...Z.skill,source:{...Z.skill.source,version:V.target.value}})})]}),s.jsxs("label",{children:["Skill directory",s.jsx("input",{required:!0,value:Z.skill.source.directory,onChange:V=>ve({...Z.skill,source:{...Z.skill.source,directory:V.target.value}})})]})]}),Z&&s.jsxs("fieldset",{className:"skills-instance-picker",children:[s.jsx("legend",{children:"Deployments"}),h.map(V=>s.jsxs("label",{children:[s.jsx("input",{type:"checkbox",checked:Z.skill.deployments.includes(V.deploymentId),onChange:Ce=>ve({...Z.skill,deployments:Ce.target.checked?[...Z.skill.deployments,V.deploymentId]:Z.skill.deployments.filter(U=>U!==V.deploymentId)})}),s.jsx("span",{children:V.name||V.deploymentId})]},V.deploymentId)),!h.length&&s.jsx("p",{children:"No deployments available."})]}),s.jsxs("footer",{children:[s.jsx("button",{className:"secondary",type:"button",disabled:N,onClick:()=>X(null),children:"Cancel"}),s.jsx("button",{disabled:N||R.kind==="promote"&&!R.skill.deployments.length,type:"submit",children:N?"Saving…":R.kind==="remove"||R.kind==="delete"?"Delete":R.kind==="promote"?"Share skill":"Save"})]})]})}),document.body)]})}var Sm={exports:{}},Ec={},jm={exports:{}},Cm={};/**
|
|
27
|
-
* @license React
|
|
28
|
-
* scheduler.production.js
|
|
29
|
-
*
|
|
30
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
31
|
-
*
|
|
32
|
-
* This source code is licensed under the MIT license found in the
|
|
33
|
-
* LICENSE file in the root directory of this source tree.
|
|
34
|
-
*/var r2;function V7(){return r2||(r2=1,(function(e){function t(Z,me){var V=Z.length;Z.push(me);e:for(;0<V;){var Ce=V-1>>>1,U=Z[Ce];if(0<l(U,me))Z[Ce]=me,Z[V]=U,V=Ce;else break e}}function n(Z){return Z.length===0?null:Z[0]}function a(Z){if(Z.length===0)return null;var me=Z[0],V=Z.pop();if(V!==me){Z[0]=V;e:for(var Ce=0,U=Z.length,E=U>>>1;Ce<E;){var Y=2*(Ce+1)-1,O=Z[Y],ee=Y+1,ke=Z[ee];if(0>l(O,V))ee<U&&0>l(ke,O)?(Z[Ce]=ke,Z[ee]=V,Ce=ee):(Z[Ce]=O,Z[Y]=V,Ce=Y);else if(ee<U&&0>l(ke,V))Z[Ce]=ke,Z[ee]=V,Ce=ee;else break e}}return me}function l(Z,me){var V=Z.sortIndex-me.sortIndex;return V!==0?V:Z.id-me.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var c=Date,f=c.now();e.unstable_now=function(){return c.now()-f}}var h=[],m=[],p=1,y=null,k=3,x=!1,C=!1,M=!1,I=!1,_=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,q=typeof setImmediate<"u"?setImmediate:null;function R(Z){for(var me=n(m);me!==null;){if(me.callback===null)a(m);else if(me.startTime<=Z)a(m),me.sortIndex=me.expirationTime,t(h,me);else break;me=n(m)}}function X(Z){if(M=!1,R(Z),!C)if(n(h)!==null)C=!0,P||(P=!0,se());else{var me=n(m);me!==null&&he(X,me.startTime-Z)}}var P=!1,H=-1,J=5,ne=-1;function F(){return I?!0:!(e.unstable_now()-ne<J)}function te(){if(I=!1,P){var Z=e.unstable_now();ne=Z;var me=!0;try{e:{C=!1,M&&(M=!1,N(H),H=-1),x=!0;var V=k;try{t:{for(R(Z),y=n(h);y!==null&&!(y.expirationTime>Z&&F());){var Ce=y.callback;if(typeof Ce=="function"){y.callback=null,k=y.priorityLevel;var U=Ce(y.expirationTime<=Z);if(Z=e.unstable_now(),typeof U=="function"){y.callback=U,R(Z),me=!0;break t}y===n(h)&&a(h),R(Z)}else a(h);y=n(h)}if(y!==null)me=!0;else{var E=n(m);E!==null&&he(X,E.startTime-Z),me=!1}}break e}finally{y=null,k=V,x=!1}me=void 0}}finally{me?se():P=!1}}}var se;if(typeof q=="function")se=function(){q(te)};else if(typeof MessageChannel<"u"){var ve=new MessageChannel,be=ve.port2;ve.port1.onmessage=te,se=function(){be.postMessage(null)}}else se=function(){_(te,0)};function he(Z,me){H=_(function(){Z(e.unstable_now())},me)}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(Z){Z.callback=null},e.unstable_forceFrameRate=function(Z){0>Z||125<Z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):J=0<Z?Math.floor(1e3/Z):5},e.unstable_getCurrentPriorityLevel=function(){return k},e.unstable_next=function(Z){switch(k){case 1:case 2:case 3:var me=3;break;default:me=k}var V=k;k=me;try{return Z()}finally{k=V}},e.unstable_requestPaint=function(){I=!0},e.unstable_runWithPriority=function(Z,me){switch(Z){case 1:case 2:case 3:case 4:case 5:break;default:Z=3}var V=k;k=Z;try{return me()}finally{k=V}},e.unstable_scheduleCallback=function(Z,me,V){var Ce=e.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?Ce+V:Ce):V=Ce,Z){case 1:var U=-1;break;case 2:U=250;break;case 5:U=1073741823;break;case 4:U=1e4;break;default:U=5e3}return U=V+U,Z={id:p++,callback:me,priorityLevel:Z,startTime:V,expirationTime:U,sortIndex:-1},V>Ce?(Z.sortIndex=V,t(m,Z),n(h)===null&&Z===n(m)&&(M?(N(H),H=-1):M=!0,he(X,V-Ce))):(Z.sortIndex=U,t(h,Z),C||x||(C=!0,P||(P=!0,se()))),Z},e.unstable_shouldYield=F,e.unstable_wrapCallback=function(Z){var me=k;return function(){var V=k;k=me;try{return Z.apply(this,arguments)}finally{k=V}}}})(Cm)),Cm}var a2;function Y7(){return a2||(a2=1,jm.exports=V7()),jm.exports}/**
|
|
35
|
-
* @license React
|
|
36
|
-
* react-dom-client.production.js
|
|
37
|
-
*
|
|
38
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
39
|
-
*
|
|
40
|
-
* This source code is licensed under the MIT license found in the
|
|
41
|
-
* LICENSE file in the root directory of this source tree.
|
|
42
|
-
*/var i2;function W7(){if(i2)return Ec;i2=1;var e=Y7(),t=h1(),n=Y3();function a(r){var i="https://react.dev/errors/"+r;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var o=2;o<arguments.length;o++)i+="&args[]="+encodeURIComponent(arguments[o])}return"Minified React error #"+r+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function u(r){var i=r,o=r;if(r.alternate)for(;i.return;)i=i.return;else{r=i;do i=r,(i.flags&4098)!==0&&(o=i.return),r=i.return;while(r)}return i.tag===3?o:null}function c(r){if(r.tag===13){var i=r.memoizedState;if(i===null&&(r=r.alternate,r!==null&&(i=r.memoizedState)),i!==null)return i.dehydrated}return null}function f(r){if(r.tag===31){var i=r.memoizedState;if(i===null&&(r=r.alternate,r!==null&&(i=r.memoizedState)),i!==null)return i.dehydrated}return null}function h(r){if(u(r)!==r)throw Error(a(188))}function m(r){var i=r.alternate;if(!i){if(i=u(r),i===null)throw Error(a(188));return i!==r?null:r}for(var o=r,d=i;;){var g=o.return;if(g===null)break;var v=g.alternate;if(v===null){if(d=g.return,d!==null){o=d;continue}break}if(g.child===v.child){for(v=g.child;v;){if(v===o)return h(g),r;if(v===d)return h(g),i;v=v.sibling}throw Error(a(188))}if(o.return!==d.return)o=g,d=v;else{for(var j=!1,L=g.child;L;){if(L===o){j=!0,o=g,d=v;break}if(L===d){j=!0,d=g,o=v;break}L=L.sibling}if(!j){for(L=v.child;L;){if(L===o){j=!0,o=v,d=g;break}if(L===d){j=!0,d=v,o=g;break}L=L.sibling}if(!j)throw Error(a(189))}}if(o.alternate!==d)throw Error(a(190))}if(o.tag!==3)throw Error(a(188));return o.stateNode.current===o?r:i}function p(r){var i=r.tag;if(i===5||i===26||i===27||i===6)return r;for(r=r.child;r!==null;){if(i=p(r),i!==null)return i;r=r.sibling}return null}var y=Object.assign,k=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),M=Symbol.for("react.fragment"),I=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),N=Symbol.for("react.consumer"),q=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),X=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),H=Symbol.for("react.memo"),J=Symbol.for("react.lazy"),ne=Symbol.for("react.activity"),F=Symbol.for("react.memo_cache_sentinel"),te=Symbol.iterator;function se(r){return r===null||typeof r!="object"?null:(r=te&&r[te]||r["@@iterator"],typeof r=="function"?r:null)}var ve=Symbol.for("react.client.reference");function be(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===ve?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case M:return"Fragment";case _:return"Profiler";case I:return"StrictMode";case X:return"Suspense";case P:return"SuspenseList";case ne:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case C:return"Portal";case q:return r.displayName||"Context";case N:return(r._context.displayName||"Context")+".Consumer";case R:var i=r.render;return r=r.displayName,r||(r=i.displayName||i.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case H:return i=r.displayName||null,i!==null?i:be(r.type)||"Memo";case J:i=r._payload,r=r._init;try{return be(r(i))}catch{}}return null}var he=Array.isArray,Z=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,me=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V={pending:!1,data:null,method:null,action:null},Ce=[],U=-1;function E(r){return{current:r}}function Y(r){0>U||(r.current=Ce[U],Ce[U]=null,U--)}function O(r,i){U++,Ce[U]=r.current,r.current=i}var ee=E(null),ke=E(null),Ae=E(null),He=E(null);function it(r,i){switch(O(Ae,i),O(ke,r),O(ee,null),i.nodeType){case 9:case 11:r=(r=i.documentElement)&&(r=r.namespaceURI)?py(r):0;break;default:if(r=i.tagName,i=i.namespaceURI)i=py(i),r=gy(i,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}Y(ee),O(ee,r)}function pe(){Y(ee),Y(ke),Y(Ae)}function Pe(r){r.memoizedState!==null&&O(He,r);var i=ee.current,o=gy(i,r.type);i!==o&&(O(ke,r),O(ee,o))}function Ke(r){ke.current===r&&(Y(ee),Y(ke)),He.current===r&&(Y(He),Sc._currentValue=V)}var oe,Me;function ze(r){if(oe===void 0)try{throw Error()}catch(o){var i=o.stack.trim().match(/\n( *(at )?)/);oe=i&&i[1]||"",Me=-1<o.stack.indexOf(`
|
|
43
|
-
at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
44
|
-
`+oe+r+Me}var Ze=!1;function Ut(r,i){if(!r||Ze)return"";Ze=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var d={DetermineComponentFrameRoot:function(){try{if(i){var je=function(){throw Error()};if(Object.defineProperty(je.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(je,[])}catch(ge){var fe=ge}Reflect.construct(r,[],je)}else{try{je.call()}catch(ge){fe=ge}r.call(je.prototype)}}else{try{throw Error()}catch(ge){fe=ge}(je=r())&&typeof je.catch=="function"&&je.catch(function(){})}}catch(ge){if(ge&&fe&&typeof ge.stack=="string")return[ge.stack,fe.stack]}return[null,null]}};d.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var g=Object.getOwnPropertyDescriptor(d.DetermineComponentFrameRoot,"name");g&&g.configurable&&Object.defineProperty(d.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var v=d.DetermineComponentFrameRoot(),j=v[0],L=v[1];if(j&&L){var Q=j.split(`
|
|
45
|
-
`),ce=L.split(`
|
|
46
|
-
`);for(g=d=0;d<Q.length&&!Q[d].includes("DetermineComponentFrameRoot");)d++;for(;g<ce.length&&!ce[g].includes("DetermineComponentFrameRoot");)g++;if(d===Q.length||g===ce.length)for(d=Q.length-1,g=ce.length-1;1<=d&&0<=g&&Q[d]!==ce[g];)g--;for(;1<=d&&0<=g;d--,g--)if(Q[d]!==ce[g]){if(d!==1||g!==1)do if(d--,g--,0>g||Q[d]!==ce[g]){var xe=`
|
|
47
|
-
`+Q[d].replace(" at new "," at ");return r.displayName&&xe.includes("<anonymous>")&&(xe=xe.replace("<anonymous>",r.displayName)),xe}while(1<=d&&0<=g);break}}}finally{Ze=!1,Error.prepareStackTrace=o}return(o=r?r.displayName||r.name:"")?ze(o):""}function ra(r,i){switch(r.tag){case 26:case 27:case 5:return ze(r.type);case 16:return ze("Lazy");case 13:return r.child!==i&&i!==null?ze("Suspense Fallback"):ze("Suspense");case 19:return ze("SuspenseList");case 0:case 15:return Ut(r.type,!1);case 11:return Ut(r.type.render,!1);case 1:return Ut(r.type,!0);case 31:return ze("Activity");default:return""}}function Jn(r){try{var i="",o=null;do i+=ra(r,o),o=r,r=r.return;while(r);return i}catch(d){return`
|
|
48
|
-
Error generating stack: `+d.message+`
|
|
49
|
-
`+d.stack}}var er=Object.prototype.hasOwnProperty,Xt=e.unstable_scheduleCallback,Bn=e.unstable_cancelCallback,Vn=e.unstable_shouldYield,Un=e.unstable_requestPaint,Zt=e.unstable_now,pr=e.unstable_getCurrentPriorityLevel,ye=e.unstable_ImmediatePriority,Le=e.unstable_UserBlockingPriority,ie=e.unstable_NormalPriority,we=e.unstable_LowPriority,qe=e.unstable_IdlePriority,Ge=e.log,ot=e.unstable_setDisableYieldValue,Tt=null,yt=null;function rt(r){if(typeof Ge=="function"&&ot(r),yt&&typeof yt.setStrictMode=="function")try{yt.setStrictMode(Tt,r)}catch{}}var bt=Math.clz32?Math.clz32:nl,Ht=Math.log,Qt=Math.LN2;function nl(r){return r>>>=0,r===0?32:31-(Ht(r)/Qt|0)|0}var aa=256,fi=262144,Ia=4194304;function Ir(r){var i=r&42;if(i!==0)return i;switch(r&-r){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 r&261888;case 262144:case 524288:case 1048576:case 2097152:return r&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return r&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return r}}function wa(r,i,o){var d=r.pendingLanes;if(d===0)return 0;var g=0,v=r.suspendedLanes,j=r.pingedLanes;r=r.warmLanes;var L=d&134217727;return L!==0?(d=L&~v,d!==0?g=Ir(d):(j&=L,j!==0?g=Ir(j):o||(o=L&~r,o!==0&&(g=Ir(o))))):(L=d&~v,L!==0?g=Ir(L):j!==0?g=Ir(j):o||(o=d&~r,o!==0&&(g=Ir(o)))),g===0?0:i!==0&&i!==g&&(i&v)===0&&(v=g&-g,o=i&-i,v>=o||v===32&&(o&4194048)!==0)?i:g}function en(r,i){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&i)===0}function rl(r,i){switch(r){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 tn(){var r=Ia;return Ia<<=1,(Ia&62914560)===0&&(Ia=4194304),r}function hi(r){for(var i=[],o=0;31>o;o++)i.push(r);return i}function al(r,i){r.pendingLanes|=i,i!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function is(r,i,o,d,g,v){var j=r.pendingLanes;r.pendingLanes=o,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=o,r.entangledLanes&=o,r.errorRecoveryDisabledLanes&=o,r.shellSuspendCounter=0;var L=r.entanglements,Q=r.expirationTimes,ce=r.hiddenUpdates;for(o=j&~o;0<o;){var xe=31-bt(o),je=1<<xe;L[xe]=0,Q[xe]=-1;var fe=ce[xe];if(fe!==null)for(ce[xe]=null,xe=0;xe<fe.length;xe++){var ge=fe[xe];ge!==null&&(ge.lane&=-536870913)}o&=~je}d!==0&&bu(r,d,0),v!==0&&g===0&&r.tag!==0&&(r.suspendedLanes|=v&~(j&~i))}function bu(r,i,o){r.pendingLanes|=i,r.suspendedLanes&=~i;var d=31-bt(i);r.entangledLanes|=i,r.entanglements[d]=r.entanglements[d]|1073741824|o&261930}function il(r,i){var o=r.entangledLanes|=i;for(r=r.entanglements;o;){var d=31-bt(o),g=1<<d;g&i|r[d]&i&&(r[d]|=i),o&=~g}}function d0(r,i){var o=i&-i;return o=(o&42)!==0?1:no(o),(o&(r.suspendedLanes|i))!==0?0:o}function no(r){switch(r){case 2:r=1;break;case 8:r=4;break;case 32:r=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:r=128;break;case 268435456:r=134217728;break;default:r=0}return r}function wu(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function ku(){var r=me.p;return r!==0?r:(r=window.event,r===void 0?32:qy(r.type))}function f0(r,i){var o=me.p;try{return me.p=r,i()}finally{me.p=o}}var ka=Math.random().toString(36).slice(2),Mn="__reactFiber$"+ka,bn="__reactProps$"+ka,_r="__reactContainer$"+ka,_a="__reactEvents$"+ka,ll="__reactListeners$"+ka,sl="__reactHandles$"+ka,ro="__reactResources$"+ka,La="__reactMarker$"+ka;function Su(r){delete r[Mn],delete r[bn],delete r[_a],delete r[ll],delete r[sl]}function ia(r){var i=r[Mn];if(i)return i;for(var o=r.parentNode;o;){if(i=o[_r]||o[Mn]){if(o=i.alternate,i.child!==null||o!==null&&o.child!==null)for(r=Sy(r);r!==null;){if(o=r[Mn])return o;r=Sy(r)}return i}r=o,o=r.parentNode}return null}function Ba(r){if(r=r[Mn]||r[_r]){var i=r.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return r}return null}function mi(r){var i=r.tag;if(i===5||i===26||i===27||i===6)return r.stateNode;throw Error(a(33))}function Sa(r){var i=r[ro];return i||(i=r[ro]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function nn(r){r[La]=!0}var h0=new Set,ju={};function Hn(r,i){qa(r,i),qa(r+"Capture",i)}function qa(r,i){for(ju[r]=i,r=0;r<i.length;r++)h0.add(i[r])}var Dn=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]*$"),Cu={},m0={};function p0(r){return er.call(m0,r)?!0:er.call(Cu,r)?!1:Dn.test(r)?m0[r]=!0:(Cu[r]=!0,!1)}function ol(r,i,o){if(p0(i))if(o===null)r.removeAttribute(i);else{switch(typeof o){case"undefined":case"function":case"symbol":r.removeAttribute(i);return;case"boolean":var d=i.toLowerCase().slice(0,5);if(d!=="data-"&&d!=="aria-"){r.removeAttribute(i);return}}r.setAttribute(i,""+o)}}function ls(r,i,o){if(o===null)r.removeAttribute(i);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(i);return}r.setAttribute(i,""+o)}}function tr(r,i,o,d){if(d===null)r.removeAttribute(o);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(o);return}r.setAttributeNS(i,o,""+d)}}function gr(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function ao(r){var i=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function Ua(r,i,o){var d=Object.getOwnPropertyDescriptor(r.constructor.prototype,i);if(!r.hasOwnProperty(i)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var g=d.get,v=d.set;return Object.defineProperty(r,i,{configurable:!0,get:function(){return g.call(this)},set:function(j){o=""+j,v.call(this,j)}}),Object.defineProperty(r,i,{enumerable:d.enumerable}),{getValue:function(){return o},setValue:function(j){o=""+j},stopTracking:function(){r._valueTracker=null,delete r[i]}}}}function ja(r){if(!r._valueTracker){var i=ao(r)?"checked":"value";r._valueTracker=Ua(r,i,""+r[i])}}function g0(r){if(!r)return!1;var i=r._valueTracker;if(!i)return!0;var o=i.getValue(),d="";return r&&(d=ao(r)?r.checked?"true":"false":r.value),r=d,r!==o?(i.setValue(r),!0):!1}function Ha(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}var ss=/[\n"\\]/g;function nr(r){return r.replace(ss,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function Lr(r,i,o,d,g,v,j,L){r.name="",j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"?r.type=j:r.removeAttribute("type"),i!=null?j==="number"?(i===0&&r.value===""||r.value!=i)&&(r.value=""+gr(i)):r.value!==""+gr(i)&&(r.value=""+gr(i)):j!=="submit"&&j!=="reset"||r.removeAttribute("value"),i!=null?la(r,j,gr(i)):o!=null?la(r,j,gr(o)):d!=null&&r.removeAttribute("value"),g==null&&v!=null&&(r.defaultChecked=!!v),g!=null&&(r.checked=g&&typeof g!="function"&&typeof g!="symbol"),L!=null&&typeof L!="function"&&typeof L!="symbol"&&typeof L!="boolean"?r.name=""+gr(L):r.removeAttribute("name")}function Br(r,i,o,d,g,v,j,L){if(v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(r.type=v),i!=null||o!=null){if(!(v!=="submit"&&v!=="reset"||i!=null)){ja(r);return}o=o!=null?""+gr(o):"",i=i!=null?""+gr(i):o,L||i===r.value||(r.value=i),r.defaultValue=i}d=d??g,d=typeof d!="function"&&typeof d!="symbol"&&!!d,r.checked=L?r.checked:!!d,r.defaultChecked=!!d,j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"&&(r.name=j),ja(r)}function la(r,i,o){i==="number"&&Ha(r.ownerDocument)===r||r.defaultValue===""+o||(r.defaultValue=""+o)}function pi(r,i,o,d){if(r=r.options,i){i={};for(var g=0;g<o.length;g++)i["$"+o[g]]=!0;for(o=0;o<r.length;o++)g=i.hasOwnProperty("$"+r[o].value),r[o].selected!==g&&(r[o].selected=g),g&&d&&(r[o].defaultSelected=!0)}else{for(o=""+gr(o),i=null,g=0;g<r.length;g++){if(r[g].value===o){r[g].selected=!0,d&&(r[g].defaultSelected=!0);return}i!==null||r[g].disabled||(i=r[g])}i!==null&&(i.selected=!0)}}function ul(r,i,o){if(i!=null&&(i=""+gr(i),i!==r.value&&(r.value=i),o==null)){r.defaultValue!==i&&(r.defaultValue=i);return}r.defaultValue=o!=null?""+gr(o):""}function Tu(r,i,o,d){if(i==null){if(d!=null){if(o!=null)throw Error(a(92));if(he(d)){if(1<d.length)throw Error(a(93));d=d[0]}o=d}o==null&&(o=""),i=o}o=gr(i),r.defaultValue=o,d=r.textContent,d===o&&d!==""&&d!==null&&(r.value=d),ja(r)}function Ca(r,i){if(i){var o=r.firstChild;if(o&&o===r.lastChild&&o.nodeType===3){o.nodeValue=i;return}}r.textContent=i}var Pf=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 cl(r,i,o){var d=i.indexOf("--")===0;o==null||typeof o=="boolean"||o===""?d?r.setProperty(i,""):i==="float"?r.cssFloat="":r[i]="":d?r.setProperty(i,o):typeof o!="number"||o===0||Pf.has(i)?i==="float"?r.cssFloat=o:r[i]=(""+o).trim():r[i]=o+"px"}function gi(r,i,o){if(i!=null&&typeof i!="object")throw Error(a(62));if(r=r.style,o!=null){for(var d in o)!o.hasOwnProperty(d)||i!=null&&i.hasOwnProperty(d)||(d.indexOf("--")===0?r.setProperty(d,""):d==="float"?r.cssFloat="":r[d]="");for(var g in i)d=i[g],i.hasOwnProperty(g)&&o[g]!==d&&cl(r,g,d)}else for(var v in i)i.hasOwnProperty(v)&&cl(r,v,i[v])}function os(r){if(r.indexOf("-")===-1)return!1;switch(r){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 io=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"]]),y0=/^[\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 $a(r){return y0.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function wn(){}var qr=null;function us(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var sa=null,oa=null;function lo(r){var i=Ba(r);if(i&&(r=i.stateNode)){var o=r[bn]||null;e:switch(r=i.stateNode,i.type){case"input":if(Lr(r,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name),i=o.name,o.type==="radio"&&i!=null){for(o=r;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll('input[name="'+nr(""+i)+'"][type="radio"]'),i=0;i<o.length;i++){var d=o[i];if(d!==r&&d.form===r.form){var g=d[bn]||null;if(!g)throw Error(a(90));Lr(d,g.value,g.defaultValue,g.defaultValue,g.checked,g.defaultChecked,g.type,g.name)}}for(i=0;i<o.length;i++)d=o[i],d.form===r.form&&g0(d)}break e;case"textarea":ul(r,o.value,o.defaultValue);break e;case"select":i=o.value,i!=null&&pi(r,!!o.multiple,i,!1)}}}var rn=!1;function dl(r,i,o){if(rn)return r(i,o);rn=!0;try{var d=r(i);return d}finally{if(rn=!1,(sa!==null||oa!==null)&&(nd(),sa&&(i=sa,r=oa,oa=sa=null,lo(i),r)))for(i=0;i<r.length;i++)lo(r[i])}}function cs(r,i){var o=r.stateNode;if(o===null)return null;var d=o[bn]||null;if(d===null)return null;o=d[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":(d=!d.disabled)||(r=r.type,d=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!d;break e;default:r=!1}if(r)return null;if(o&&typeof o!="function")throw Error(a(231,i,typeof o));return o}var Ur=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ds=!1;if(Ur)try{var fs={};Object.defineProperty(fs,"passive",{get:function(){ds=!0}}),window.addEventListener("test",fs,fs),window.removeEventListener("test",fs,fs)}catch{ds=!1}var rr=null,Au=null,so=null;function v0(){if(so)return so;var r,i=Au,o=i.length,d,g="value"in rr?rr.value:rr.textContent,v=g.length;for(r=0;r<o&&i[r]===g[r];r++);var j=o-r;for(d=1;d<=j&&i[o-d]===g[v-d];d++);return so=g.slice(r,1<d?1-d:void 0)}function hs(r){var i=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&i===13&&(r=13)):r=i,r===10&&(r=13),32<=r||r===13?r:0}function Fa(){return!0}function Eu(){return!1}function $n(r){function i(o,d,g,v,j){this._reactName=o,this._targetInst=g,this.type=d,this.nativeEvent=v,this.target=j,this.currentTarget=null;for(var L in r)r.hasOwnProperty(L)&&(o=r[L],this[L]=o?o(v):v[L]);return this.isDefaultPrevented=(v.defaultPrevented!=null?v.defaultPrevented:v.returnValue===!1)?Fa:Eu,this.isPropagationStopped=Eu,this}return y(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=Fa)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=Fa)},persist:function(){},isPersistent:Fa}),i}var yr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ta=$n(yr),fl=y({},yr,{view:0,detail:0}),yi=$n(fl),Nu,vi,xi,bi=y({},fl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ga,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==xi&&(xi&&r.type==="mousemove"?(Nu=r.screenX-xi.screenX,vi=r.screenY-xi.screenY):vi=Nu=0,xi=r),Nu)},movementY:function(r){return"movementY"in r?r.movementY:vi}}),oo=$n(bi),Mu=y({},bi,{dataTransfer:0}),Aa=$n(Mu),Pa=y({},fl,{relatedTarget:0}),uo=$n(Pa),ms=y({},yr,{animationName:0,elapsedTime:0,pseudoElement:0}),ps=$n(ms),co=y({},yr,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),fo=$n(co),gs=y({},yr,{data:0}),wi=$n(gs),hl={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},dn={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"},ar={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function vr(r){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(r):(r=ar[r])?!!i[r]:!1}function Ga(){return vr}var ys=y({},fl,{key:function(r){if(r.key){var i=hl[r.key]||r.key;if(i!=="Unidentified")return i}return r.type==="keypress"?(r=hs(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?dn[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ga,charCode:function(r){return r.type==="keypress"?hs(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?hs(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),ho=$n(ys),mo=y({},bi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),vs=$n(mo),po=y({},fl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ga}),Du=$n(po),zu=y({},yr,{propertyName:0,elapsedTime:0,pseudoElement:0}),go=$n(zu),Be=y({},bi,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),x0=$n(Be),ua=y({},yr,{newState:0,oldState:0}),gn=$n(ua),Ru=[9,13,27,32],Ea=Ur&&"CompositionEvent"in window,Va=null;Ur&&"documentMode"in document&&(Va=document.documentMode);var At=Ur&&"TextEvent"in window&&!Va,ki=Ur&&(!Ea||Va&&8<Va&&11>=Va),xs=" ",ml=!1;function pl(r,i){switch(r){case"keyup":return Ru.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function yo(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var xr=!1;function Gf(r,i){switch(r){case"compositionend":return yo(i);case"keypress":return i.which!==32?null:(ml=!0,xs);case"textInput":return r=i.data,r===xs&&ml?null:r;default:return null}}function Vf(r,i){if(xr)return r==="compositionend"||!Ea&&pl(r,i)?(r=v0(),so=Au=rr=null,xr=!1,r):null;switch(r){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 ki&&i.locale!=="ko"?null:i.data;default:return null}}var bs={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 Ou(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i==="input"?!!bs[r.type]:i==="textarea"}function vo(r,i,o,d){sa?oa?oa.push(d):oa=[d]:sa=d,i=ud(i,"onChange"),0<i.length&&(o=new Ta("onChange","change",null,o,d),r.push({event:o,listeners:i}))}var Si=null,Ya=null;function Yf(r){uy(r,0)}function ws(r){var i=mi(r);if(g0(i))return r}function xo(r,i){if(r==="change")return i}var ks=!1;if(Ur){var Iu;if(Ur){var ji="oninput"in document;if(!ji){var b0=document.createElement("div");b0.setAttribute("oninput","return;"),ji=typeof b0.oninput=="function"}Iu=ji}else Iu=!1;ks=Iu&&(!document.documentMode||9<document.documentMode)}function bo(){Si&&(Si.detachEvent("onpropertychange",Ss),Ya=Si=null)}function Ss(r){if(r.propertyName==="value"&&ws(Ya)){var i=[];vo(i,Ya,r,us(r)),dl(Yf,i)}}function Wf(r,i,o){r==="focusin"?(bo(),Si=i,Ya=o,Si.attachEvent("onpropertychange",Ss)):r==="focusout"&&bo()}function _u(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return ws(Ya)}function Wa(r,i){if(r==="click")return ws(i)}function js(r,i){if(r==="input"||r==="change")return ws(i)}function Qe(r,i){return r===i&&(r!==0||1/r===1/i)||r!==r&&i!==i}var zn=typeof Object.is=="function"?Object.is:Qe;function ca(r,i){if(zn(r,i))return!0;if(typeof r!="object"||r===null||typeof i!="object"||i===null)return!1;var o=Object.keys(r),d=Object.keys(i);if(o.length!==d.length)return!1;for(d=0;d<o.length;d++){var g=o[d];if(!er.call(i,g)||!zn(r[g],i[g]))return!1}return!0}function Lu(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function wo(r,i){var o=Lu(r);r=0;for(var d;o;){if(o.nodeType===3){if(d=r+o.textContent.length,r<=i&&d>=i)return{node:o,offset:i-r};r=d}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=Lu(o)}}function ko(r,i){return r&&i?r===i?!0:r&&r.nodeType===3?!1:i&&i.nodeType===3?ko(r,i.parentNode):"contains"in r?r.contains(i):r.compareDocumentPosition?!!(r.compareDocumentPosition(i)&16):!1:!1}function w0(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var i=Ha(r.document);i instanceof r.HTMLIFrameElement;){try{var o=typeof i.contentWindow.location.href=="string"}catch{o=!1}if(o)r=i.contentWindow;else break;i=Ha(r.document)}return i}function Fn(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i&&(i==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||i==="textarea"||r.contentEditable==="true")}var Kf=Ur&&"documentMode"in document&&11>=document.documentMode,gl=null,So=null,Cs=null,jo=!1;function Co(r,i,o){var d=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;jo||gl==null||gl!==Ha(d)||(d=gl,"selectionStart"in d&&Fn(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Cs&&ca(Cs,d)||(Cs=d,d=ud(So,"onSelect"),0<d.length&&(i=new Ta("onSelect","select",null,i,o),r.push({event:i,listeners:d}),i.target=gl)))}function Ci(r,i){var o={};return o[r.toLowerCase()]=i.toLowerCase(),o["Webkit"+r]="webkit"+i,o["Moz"+r]="moz"+i,o}var yl={animationend:Ci("Animation","AnimationEnd"),animationiteration:Ci("Animation","AnimationIteration"),animationstart:Ci("Animation","AnimationStart"),transitionrun:Ci("Transition","TransitionRun"),transitionstart:Ci("Transition","TransitionStart"),transitioncancel:Ci("Transition","TransitionCancel"),transitionend:Ci("Transition","TransitionEnd")},vl={},To={};Ur&&(To=document.createElement("div").style,"AnimationEvent"in window||(delete yl.animationend.animation,delete yl.animationiteration.animation,delete yl.animationstart.animation),"TransitionEvent"in window||delete yl.transitionend.transition);function Na(r){if(vl[r])return vl[r];if(!yl[r])return r;var i=yl[r],o;for(o in i)if(i.hasOwnProperty(o)&&o in To)return vl[r]=i[o];return r}var k0=Na("animationend"),Ao=Na("animationiteration"),S0=Na("animationstart"),Xf=Na("transitionrun"),Bu=Na("transitionstart"),j0=Na("transitioncancel"),qu=Na("transitionend"),C0=new Map,Eo="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(" ");Eo.push("scrollEnd");function Hr(r,i){C0.set(r,i),Hn(i,[r])}var No=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof r=="object"&&r!==null&&typeof r.message=="string"?String(r.message):String(r),error:r});if(!window.dispatchEvent(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",r);return}console.error(r)},br=[],xl=0,Uu=0;function Mo(){for(var r=xl,i=Uu=xl=0;i<r;){var o=br[i];br[i++]=null;var d=br[i];br[i++]=null;var g=br[i];br[i++]=null;var v=br[i];if(br[i++]=null,d!==null&&g!==null){var j=d.pending;j===null?g.next=g:(g.next=j.next,j.next=g),d.pending=g}v!==0&&T0(o,g,v)}}function Do(r,i,o,d){br[xl++]=r,br[xl++]=i,br[xl++]=o,br[xl++]=d,Uu|=d,r.lanes|=d,r=r.alternate,r!==null&&(r.lanes|=d)}function Hu(r,i,o,d){return Do(r,i,o,d),zo(r)}function Ti(r,i){return Do(r,null,null,i),zo(r)}function T0(r,i,o){r.lanes|=o;var d=r.alternate;d!==null&&(d.lanes|=o);for(var g=!1,v=r.return;v!==null;)v.childLanes|=o,d=v.alternate,d!==null&&(d.childLanes|=o),v.tag===22&&(r=v.stateNode,r===null||r._visibility&1||(g=!0)),r=v,v=v.return;return r.tag===3?(v=r.stateNode,g&&i!==null&&(g=31-bt(o),r=v.hiddenUpdates,d=r[g],d===null?r[g]=[i]:d.push(i),i.lane=o|536870912),v):null}function zo(r){if(50<gc)throw gc=0,Ph=null,Error(a(185));for(var i=r.return;i!==null;)r=i,i=r.return;return r.tag===3?r.stateNode:null}var bl={};function Zf(r,i,o,d){this.tag=r,this.key=o,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=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ir(r,i,o,d){return new Zf(r,i,o,d)}function $u(r){return r=r.prototype,!(!r||!r.isReactComponent)}function Ma(r,i){var o=r.alternate;return o===null?(o=ir(r.tag,i,r.key,r.mode),o.elementType=r.elementType,o.type=r.type,o.stateNode=r.stateNode,o.alternate=r,r.alternate=o):(o.pendingProps=i,o.type=r.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=r.flags&65011712,o.childLanes=r.childLanes,o.lanes=r.lanes,o.child=r.child,o.memoizedProps=r.memoizedProps,o.memoizedState=r.memoizedState,o.updateQueue=r.updateQueue,i=r.dependencies,o.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},o.sibling=r.sibling,o.index=r.index,o.ref=r.ref,o.refCleanup=r.refCleanup,o}function A0(r,i){r.flags&=65011714;var o=r.alternate;return o===null?(r.childLanes=0,r.lanes=i,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=o.childLanes,r.lanes=o.lanes,r.child=o.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=o.memoizedProps,r.memoizedState=o.memoizedState,r.updateQueue=o.updateQueue,r.type=o.type,i=o.dependencies,r.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),r}function Ro(r,i,o,d,g,v){var j=0;if(d=r,typeof r=="function")$u(r)&&(j=1);else if(typeof r=="string")j=g7(r,o,ee.current)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case ne:return r=ir(31,o,i,g),r.elementType=ne,r.lanes=v,r;case M:return Ka(o.children,g,v,i);case I:j=8,g|=24;break;case _:return r=ir(12,o,i,g|2),r.elementType=_,r.lanes=v,r;case X:return r=ir(13,o,i,g),r.elementType=X,r.lanes=v,r;case P:return r=ir(19,o,i,g),r.elementType=P,r.lanes=v,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case q:j=10;break e;case N:j=9;break e;case R:j=11;break e;case H:j=14;break e;case J:j=16,d=null;break e}j=29,o=Error(a(130,r===null?"null":typeof r,"")),d=null}return i=ir(j,o,i,g),i.elementType=r,i.type=d,i.lanes=v,i}function Ka(r,i,o,d){return r=ir(7,r,d,i),r.lanes=o,r}function wr(r,i,o){return r=ir(6,r,null,i),r.lanes=o,r}function Fu(r){var i=ir(18,null,null,0);return i.stateNode=r,i}function Pu(r,i,o){return i=ir(4,r.children!==null?r.children:[],r.key,i),i.lanes=o,i.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},i}var E0=new WeakMap;function kr(r,i){if(typeof r=="object"&&r!==null){var o=E0.get(r);return o!==void 0?o:(i={value:r,source:i,stack:Jn(i)},E0.set(r,i),i)}return{value:r,source:i,stack:Jn(i)}}var Ai=[],wl=0,kl=null,Ts=0,lr=[],sr=0,Xa=null,da=1,fa="";function Yn(r,i){Ai[wl++]=Ts,Ai[wl++]=kl,kl=r,Ts=i}function As(r,i,o){lr[sr++]=da,lr[sr++]=fa,lr[sr++]=Xa,Xa=r;var d=da;r=fa;var g=32-bt(d)-1;d&=~(1<<g),o+=1;var v=32-bt(i)+g;if(30<v){var j=g-g%5;v=(d&(1<<j)-1).toString(32),d>>=j,g-=j,da=1<<32-bt(i)+g|o<<g|d,fa=v+r}else da=1<<v|o<<g|d,fa=r}function Gu(r){r.return!==null&&(Yn(r,1),As(r,1,0))}function Oo(r){for(;r===kl;)kl=Ai[--wl],Ai[wl]=null,Ts=Ai[--wl],Ai[wl]=null;for(;r===Xa;)Xa=lr[--sr],lr[sr]=null,fa=lr[--sr],lr[sr]=null,da=lr[--sr],lr[sr]=null}function Vu(r,i){lr[sr++]=da,lr[sr++]=fa,lr[sr++]=Xa,da=i.id,fa=i.overflow,Xa=r}var Rn=null,$t=null,kt=!1,Za=null,Sr=!1,Yu=Error(a(519));function Qa(r){var i=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Es(kr(i,r)),Yu}function N0(r){var i=r.stateNode,o=r.type,d=r.memoizedProps;switch(i[Mn]=r,i[bn]=d,o){case"dialog":jt("cancel",i),jt("close",i);break;case"iframe":case"object":case"embed":jt("load",i);break;case"video":case"audio":for(o=0;o<vc.length;o++)jt(vc[o],i);break;case"source":jt("error",i);break;case"img":case"image":case"link":jt("error",i),jt("load",i);break;case"details":jt("toggle",i);break;case"input":jt("invalid",i),Br(i,d.value,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name,!0);break;case"select":jt("invalid",i);break;case"textarea":jt("invalid",i),Tu(i,d.value,d.defaultValue,d.children)}o=d.children,typeof o!="string"&&typeof o!="number"&&typeof o!="bigint"||i.textContent===""+o||d.suppressHydrationWarning===!0||hy(i.textContent,o)?(d.popover!=null&&(jt("beforetoggle",i),jt("toggle",i)),d.onScroll!=null&&jt("scroll",i),d.onScrollEnd!=null&&jt("scrollend",i),d.onClick!=null&&(i.onclick=wn),i=!0):i=!1,i||Qa(r,!0)}function M0(r){for(Rn=r.return;Rn;)switch(Rn.tag){case 5:case 31:case 13:Sr=!1;return;case 27:case 3:Sr=!0;return;default:Rn=Rn.return}}function Sl(r){if(r!==Rn)return!1;if(!kt)return M0(r),kt=!0,!1;var i=r.tag,o;if((o=i!==3&&i!==27)&&((o=i===5)&&(o=r.type,o=!(o!=="form"&&o!=="button")||im(r.type,r.memoizedProps)),o=!o),o&&$t&&Qa(r),M0(r),i===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(317));$t=ky(r)}else if(i===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(317));$t=ky(r)}else i===27?(i=$t,Bl(r.type)?(r=cm,cm=null,$t=r):$t=i):$t=Rn?pa(r.stateNode.nextSibling):null;return!0}function Ei(){$t=Rn=null,kt=!1}function Wu(){var r=Za;return r!==null&&(Nr===null?Nr=r:Nr.push.apply(Nr,r),Za=null),r}function Es(r){Za===null?Za=[r]:Za.push(r)}var Ku=E(null),Ni=null,jr=null;function Ja(r,i,o){O(Ku,i._currentValue),i._currentValue=o}function $r(r){r._currentValue=Ku.current,Y(Ku)}function Xu(r,i,o){for(;r!==null;){var d=r.alternate;if((r.childLanes&i)!==i?(r.childLanes|=i,d!==null&&(d.childLanes|=i)):d!==null&&(d.childLanes&i)!==i&&(d.childLanes|=i),r===o)break;r=r.return}}function Zu(r,i,o,d){var g=r.child;for(g!==null&&(g.return=r);g!==null;){var v=g.dependencies;if(v!==null){var j=g.child;v=v.firstContext;e:for(;v!==null;){var L=v;v=g;for(var Q=0;Q<i.length;Q++)if(L.context===i[Q]){v.lanes|=o,L=v.alternate,L!==null&&(L.lanes|=o),Xu(v.return,o,r),d||(j=null);break e}v=L.next}}else if(g.tag===18){if(j=g.return,j===null)throw Error(a(341));j.lanes|=o,v=j.alternate,v!==null&&(v.lanes|=o),Xu(j,o,r),j=null}else j=g.child;if(j!==null)j.return=g;else for(j=g;j!==null;){if(j===r){j=null;break}if(g=j.sibling,g!==null){g.return=j.return,j=g;break}j=j.return}g=j}}function ha(r,i,o,d){r=null;for(var g=i,v=!1;g!==null;){if(!v){if((g.flags&524288)!==0)v=!0;else if((g.flags&262144)!==0)break}if(g.tag===10){var j=g.alternate;if(j===null)throw Error(a(387));if(j=j.memoizedProps,j!==null){var L=g.type;zn(g.pendingProps.value,j.value)||(r!==null?r.push(L):r=[L])}}else if(g===He.current){if(j=g.alternate,j===null)throw Error(a(387));j.memoizedState.memoizedState!==g.memoizedState.memoizedState&&(r!==null?r.push(Sc):r=[Sc])}g=g.return}r!==null&&Zu(i,r,o,d),i.flags|=262144}function Io(r){for(r=r.firstContext;r!==null;){if(!zn(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function or(r){Ni=r,jr=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function yn(r){return Qu(Ni,r)}function Ns(r,i){return Ni===null&&or(r),Qu(r,i)}function Qu(r,i){var o=i._currentValue;if(i={context:i,memoizedValue:o,next:null},jr===null){if(r===null)throw Error(a(308));jr=i,r.dependencies={lanes:0,firstContext:i},r.flags|=524288}else jr=jr.next=i;return o}var Ju=typeof AbortController<"u"?AbortController:function(){var r=[],i=this.signal={aborted:!1,addEventListener:function(o,d){r.push(d)}};this.abort=function(){i.aborted=!0,r.forEach(function(o){return o()})}},ec=e.unstable_scheduleCallback,Qf=e.unstable_NormalPriority,fn={$$typeof:q,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function tc(){return{controller:new Ju,data:new Map,refCount:0}}function Da(r){r.refCount--,r.refCount===0&&ec(Qf,function(){r.controller.abort()})}var Ms=null,_o=0,jl=0,Fr=null;function Cl(r,i){if(Ms===null){var o=Ms=[];_o=0,jl=Xh(),Fr={status:"pending",value:void 0,then:function(d){o.push(d)}}}return _o++,i.then(Mi,Mi),i}function Mi(){if(--_o===0&&Ms!==null){Fr!==null&&(Fr.status="fulfilled");var r=Ms;Ms=null,jl=0,Fr=null;for(var i=0;i<r.length;i++)(0,r[i])()}}function Jf(r,i){var o=[],d={status:"pending",value:null,reason:null,then:function(g){o.push(g)}};return r.then(function(){d.status="fulfilled",d.value=i;for(var g=0;g<o.length;g++)(0,o[g])(i)},function(g){for(d.status="rejected",d.reason=g,g=0;g<o.length;g++)(0,o[g])(void 0)}),d}var D0=Z.S;Z.S=function(r,i){L4=Zt(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&Cl(r,i),D0!==null&&D0(r,i)};var ei=E(null);function Rt(){var r=ei.current;return r!==null?r:Vt.pooledCache}function Pr(r,i){i===null?O(ei,ei.current):O(ei,i.pool)}function z0(){var r=Rt();return r===null?null:{parent:fn._currentValue,pool:r}}var On=Error(a(460)),nc=Error(a(474)),Cr=Error(a(542)),Ds={then:function(){}};function R0(r){return r=r.status,r==="fulfilled"||r==="rejected"}function Lo(r,i,o){switch(o=r[o],o===void 0?r.push(i):o!==i&&(i.then(wn,wn),i=o),i.status){case"fulfilled":return i.value;case"rejected":throw r=i.reason,rc(r),r;default:if(typeof i.status=="string")i.then(wn,wn);else{if(r=Vt,r!==null&&100<r.shellSuspendCounter)throw Error(a(482));r=i,r.status="pending",r.then(function(d){if(i.status==="pending"){var g=i;g.status="fulfilled",g.value=d}},function(d){if(i.status==="pending"){var g=i;g.status="rejected",g.reason=d}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw r=i.reason,rc(r),r}throw zi=i,On}}function Di(r){try{var i=r._init;return i(r._payload)}catch(o){throw o!==null&&typeof o=="object"&&typeof o.then=="function"?(zi=o,On):o}}var zi=null;function O0(){if(zi===null)throw Error(a(459));var r=zi;return zi=null,r}function rc(r){if(r===On||r===Cr)throw Error(a(483))}var Ri=null,Tl=0;function zs(r){var i=Tl;return Tl+=1,Ri===null&&(Ri=[]),Lo(Ri,r,i)}function Al(r,i){i=i.props.ref,r.ref=i!==void 0?i:null}function b(r,i){throw i.$$typeof===k?Error(a(525)):(r=Object.prototype.toString.call(i),Error(a(31,r==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":r)))}function T(r){function i(le,re){if(r){var ue=le.deletions;ue===null?(le.deletions=[re],le.flags|=16):ue.push(re)}}function o(le,re){if(!r)return null;for(;re!==null;)i(le,re),re=re.sibling;return null}function d(le){for(var re=new Map;le!==null;)le.key!==null?re.set(le.key,le):re.set(le.index,le),le=le.sibling;return re}function g(le,re){return le=Ma(le,re),le.index=0,le.sibling=null,le}function v(le,re,ue){return le.index=ue,r?(ue=le.alternate,ue!==null?(ue=ue.index,ue<re?(le.flags|=67108866,re):ue):(le.flags|=67108866,re)):(le.flags|=1048576,re)}function j(le){return r&&le.alternate===null&&(le.flags|=67108866),le}function L(le,re,ue,Se){return re===null||re.tag!==6?(re=wr(ue,le.mode,Se),re.return=le,re):(re=g(re,ue),re.return=le,re)}function Q(le,re,ue,Se){var at=ue.type;return at===M?xe(le,re,ue.props.children,Se,ue.key):re!==null&&(re.elementType===at||typeof at=="object"&&at!==null&&at.$$typeof===J&&Di(at)===re.type)?(re=g(re,ue.props),Al(re,ue),re.return=le,re):(re=Ro(ue.type,ue.key,ue.props,null,le.mode,Se),Al(re,ue),re.return=le,re)}function ce(le,re,ue,Se){return re===null||re.tag!==4||re.stateNode.containerInfo!==ue.containerInfo||re.stateNode.implementation!==ue.implementation?(re=Pu(ue,le.mode,Se),re.return=le,re):(re=g(re,ue.children||[]),re.return=le,re)}function xe(le,re,ue,Se,at){return re===null||re.tag!==7?(re=Ka(ue,le.mode,Se,at),re.return=le,re):(re=g(re,ue),re.return=le,re)}function je(le,re,ue){if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return re=wr(""+re,le.mode,ue),re.return=le,re;if(typeof re=="object"&&re!==null){switch(re.$$typeof){case x:return ue=Ro(re.type,re.key,re.props,null,le.mode,ue),Al(ue,re),ue.return=le,ue;case C:return re=Pu(re,le.mode,ue),re.return=le,re;case J:return re=Di(re),je(le,re,ue)}if(he(re)||se(re))return re=Ka(re,le.mode,ue,null),re.return=le,re;if(typeof re.then=="function")return je(le,zs(re),ue);if(re.$$typeof===q)return je(le,Ns(le,re),ue);b(le,re)}return null}function fe(le,re,ue,Se){var at=re!==null?re.key:null;if(typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint")return at!==null?null:L(le,re,""+ue,Se);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case x:return ue.key===at?Q(le,re,ue,Se):null;case C:return ue.key===at?ce(le,re,ue,Se):null;case J:return ue=Di(ue),fe(le,re,ue,Se)}if(he(ue)||se(ue))return at!==null?null:xe(le,re,ue,Se,null);if(typeof ue.then=="function")return fe(le,re,zs(ue),Se);if(ue.$$typeof===q)return fe(le,re,Ns(le,ue),Se);b(le,ue)}return null}function ge(le,re,ue,Se,at){if(typeof Se=="string"&&Se!==""||typeof Se=="number"||typeof Se=="bigint")return le=le.get(ue)||null,L(re,le,""+Se,at);if(typeof Se=="object"&&Se!==null){switch(Se.$$typeof){case x:return le=le.get(Se.key===null?ue:Se.key)||null,Q(re,le,Se,at);case C:return le=le.get(Se.key===null?ue:Se.key)||null,ce(re,le,Se,at);case J:return Se=Di(Se),ge(le,re,ue,Se,at)}if(he(Se)||se(Se))return le=le.get(ue)||null,xe(re,le,Se,at,null);if(typeof Se.then=="function")return ge(le,re,ue,zs(Se),at);if(Se.$$typeof===q)return ge(le,re,ue,Ns(re,Se),at);b(re,Se)}return null}function Xe(le,re,ue,Se){for(var at=null,Dt=null,Je=re,vt=re=0,Nt=null;Je!==null&&vt<ue.length;vt++){Je.index>vt?(Nt=Je,Je=null):Nt=Je.sibling;var zt=fe(le,Je,ue[vt],Se);if(zt===null){Je===null&&(Je=Nt);break}r&&Je&&zt.alternate===null&&i(le,Je),re=v(zt,re,vt),Dt===null?at=zt:Dt.sibling=zt,Dt=zt,Je=Nt}if(vt===ue.length)return o(le,Je),kt&&Yn(le,vt),at;if(Je===null){for(;vt<ue.length;vt++)Je=je(le,ue[vt],Se),Je!==null&&(re=v(Je,re,vt),Dt===null?at=Je:Dt.sibling=Je,Dt=Je);return kt&&Yn(le,vt),at}for(Je=d(Je);vt<ue.length;vt++)Nt=ge(Je,le,vt,ue[vt],Se),Nt!==null&&(r&&Nt.alternate!==null&&Je.delete(Nt.key===null?vt:Nt.key),re=v(Nt,re,vt),Dt===null?at=Nt:Dt.sibling=Nt,Dt=Nt);return r&&Je.forEach(function(Fl){return i(le,Fl)}),kt&&Yn(le,vt),at}function ct(le,re,ue,Se){if(ue==null)throw Error(a(151));for(var at=null,Dt=null,Je=re,vt=re=0,Nt=null,zt=ue.next();Je!==null&&!zt.done;vt++,zt=ue.next()){Je.index>vt?(Nt=Je,Je=null):Nt=Je.sibling;var Fl=fe(le,Je,zt.value,Se);if(Fl===null){Je===null&&(Je=Nt);break}r&&Je&&Fl.alternate===null&&i(le,Je),re=v(Fl,re,vt),Dt===null?at=Fl:Dt.sibling=Fl,Dt=Fl,Je=Nt}if(zt.done)return o(le,Je),kt&&Yn(le,vt),at;if(Je===null){for(;!zt.done;vt++,zt=ue.next())zt=je(le,zt.value,Se),zt!==null&&(re=v(zt,re,vt),Dt===null?at=zt:Dt.sibling=zt,Dt=zt);return kt&&Yn(le,vt),at}for(Je=d(Je);!zt.done;vt++,zt=ue.next())zt=ge(Je,le,vt,zt.value,Se),zt!==null&&(r&&zt.alternate!==null&&Je.delete(zt.key===null?vt:zt.key),re=v(zt,re,vt),Dt===null?at=zt:Dt.sibling=zt,Dt=zt);return r&&Je.forEach(function(A7){return i(le,A7)}),kt&&Yn(le,vt),at}function Gt(le,re,ue,Se){if(typeof ue=="object"&&ue!==null&&ue.type===M&&ue.key===null&&(ue=ue.props.children),typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case x:e:{for(var at=ue.key;re!==null;){if(re.key===at){if(at=ue.type,at===M){if(re.tag===7){o(le,re.sibling),Se=g(re,ue.props.children),Se.return=le,le=Se;break e}}else if(re.elementType===at||typeof at=="object"&&at!==null&&at.$$typeof===J&&Di(at)===re.type){o(le,re.sibling),Se=g(re,ue.props),Al(Se,ue),Se.return=le,le=Se;break e}o(le,re);break}else i(le,re);re=re.sibling}ue.type===M?(Se=Ka(ue.props.children,le.mode,Se,ue.key),Se.return=le,le=Se):(Se=Ro(ue.type,ue.key,ue.props,null,le.mode,Se),Al(Se,ue),Se.return=le,le=Se)}return j(le);case C:e:{for(at=ue.key;re!==null;){if(re.key===at)if(re.tag===4&&re.stateNode.containerInfo===ue.containerInfo&&re.stateNode.implementation===ue.implementation){o(le,re.sibling),Se=g(re,ue.children||[]),Se.return=le,le=Se;break e}else{o(le,re);break}else i(le,re);re=re.sibling}Se=Pu(ue,le.mode,Se),Se.return=le,le=Se}return j(le);case J:return ue=Di(ue),Gt(le,re,ue,Se)}if(he(ue))return Xe(le,re,ue,Se);if(se(ue)){if(at=se(ue),typeof at!="function")throw Error(a(150));return ue=at.call(ue),ct(le,re,ue,Se)}if(typeof ue.then=="function")return Gt(le,re,zs(ue),Se);if(ue.$$typeof===q)return Gt(le,re,Ns(le,ue),Se);b(le,ue)}return typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint"?(ue=""+ue,re!==null&&re.tag===6?(o(le,re.sibling),Se=g(re,ue),Se.return=le,le=Se):(o(le,re),Se=wr(ue,le.mode,Se),Se.return=le,le=Se),j(le)):o(le,re)}return function(le,re,ue,Se){try{Tl=0;var at=Gt(le,re,ue,Se);return Ri=null,at}catch(Je){if(Je===On||Je===Cr)throw Je;var Dt=ir(29,Je,null,le.mode);return Dt.lanes=Se,Dt.return=le,Dt}finally{}}}var z=T(!0),$=T(!1),K=!1;function de(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Te(r,i){r=r.updateQueue,i.updateQueue===r&&(i.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,callbacks:null})}function $e(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function Re(r,i,o){var d=r.updateQueue;if(d===null)return null;if(d=d.shared,(Ot&2)!==0){var g=d.pending;return g===null?i.next=i:(i.next=g.next,g.next=i),d.pending=i,i=zo(r),T0(r,null,o),i}return Do(r,d,i,o),zo(r)}function ut(r,i,o){if(i=i.updateQueue,i!==null&&(i=i.shared,(o&4194048)!==0)){var d=i.lanes;d&=r.pendingLanes,o|=d,i.lanes=o,il(r,o)}}function nt(r,i){var o=r.updateQueue,d=r.alternate;if(d!==null&&(d=d.updateQueue,o===d)){var g=null,v=null;if(o=o.firstBaseUpdate,o!==null){do{var j={lane:o.lane,tag:o.tag,payload:o.payload,callback:null,next:null};v===null?g=v=j:v=v.next=j,o=o.next}while(o!==null);v===null?g=v=i:v=v.next=i}else g=v=i;o={baseState:d.baseState,firstBaseUpdate:g,lastBaseUpdate:v,shared:d.shared,callbacks:d.callbacks},r.updateQueue=o;return}r=o.lastBaseUpdate,r===null?o.firstBaseUpdate=i:r.next=i,o.lastBaseUpdate=i}var Lt=!1;function kn(){if(Lt){var r=Fr;if(r!==null)throw r}}function El(r,i,o,d){Lt=!1;var g=r.updateQueue;K=!1;var v=g.firstBaseUpdate,j=g.lastBaseUpdate,L=g.shared.pending;if(L!==null){g.shared.pending=null;var Q=L,ce=Q.next;Q.next=null,j===null?v=ce:j.next=ce,j=Q;var xe=r.alternate;xe!==null&&(xe=xe.updateQueue,L=xe.lastBaseUpdate,L!==j&&(L===null?xe.firstBaseUpdate=ce:L.next=ce,xe.lastBaseUpdate=Q))}if(v!==null){var je=g.baseState;j=0,xe=ce=Q=null,L=v;do{var fe=L.lane&-536870913,ge=fe!==L.lane;if(ge?(Et&fe)===fe:(d&fe)===fe){fe!==0&&fe===jl&&(Lt=!0),xe!==null&&(xe=xe.next={lane:0,tag:L.tag,payload:L.payload,callback:null,next:null});e:{var Xe=r,ct=L;fe=i;var Gt=o;switch(ct.tag){case 1:if(Xe=ct.payload,typeof Xe=="function"){je=Xe.call(Gt,je,fe);break e}je=Xe;break e;case 3:Xe.flags=Xe.flags&-65537|128;case 0:if(Xe=ct.payload,fe=typeof Xe=="function"?Xe.call(Gt,je,fe):Xe,fe==null)break e;je=y({},je,fe);break e;case 2:K=!0}}fe=L.callback,fe!==null&&(r.flags|=64,ge&&(r.flags|=8192),ge=g.callbacks,ge===null?g.callbacks=[fe]:ge.push(fe))}else ge={lane:fe,tag:L.tag,payload:L.payload,callback:L.callback,next:null},xe===null?(ce=xe=ge,Q=je):xe=xe.next=ge,j|=fe;if(L=L.next,L===null){if(L=g.shared.pending,L===null)break;ge=L,L=ge.next,ge.next=null,g.lastBaseUpdate=ge,g.shared.pending=null}}while(!0);xe===null&&(Q=je),g.baseState=Q,g.firstBaseUpdate=ce,g.lastBaseUpdate=xe,v===null&&(g.shared.lanes=0),Rl|=j,r.lanes=j,r.memoizedState=je}}function og(r,i){if(typeof r!="function")throw Error(a(191,r));r.call(i)}function ug(r,i){var o=r.callbacks;if(o!==null)for(r.callbacks=null,r=0;r<o.length;r++)og(o[r],i)}var Bo=E(null),I0=E(0);function cg(r,i){r=$i,O(I0,r),O(Bo,i),$i=r|i.baseLanes}function eh(){O(I0,$i),O(Bo,Bo.current)}function th(){$i=I0.current,Y(Bo),Y(I0)}var Gr=E(null),ma=null;function Nl(r){var i=r.alternate;O(vn,vn.current&1),O(Gr,r),ma===null&&(i===null||Bo.current!==null||i.memoizedState!==null)&&(ma=r)}function nh(r){O(vn,vn.current),O(Gr,r),ma===null&&(ma=r)}function dg(r){r.tag===22?(O(vn,vn.current),O(Gr,r),ma===null&&(ma=r)):Ml()}function Ml(){O(vn,vn.current),O(Gr,Gr.current)}function Vr(r){Y(Gr),ma===r&&(ma=null),Y(vn)}var vn=E(0);function _0(r){for(var i=r;i!==null;){if(i.tag===13){var o=i.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||om(o)||um(o)))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===r)break;for(;i.sibling===null;){if(i.return===null||i.return===r)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var Oi=0,gt=null,Ft=null,Sn=null,L0=!1,qo=!1,Rs=!1,B0=0,ac=0,Uo=null,yb=0;function hn(){throw Error(a(321))}function rh(r,i){if(i===null)return!1;for(var o=0;o<i.length&&o<r.length;o++)if(!zn(r[o],i[o]))return!1;return!0}function ah(r,i,o,d,g,v){return Oi=v,gt=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,Z.H=r===null||r.memoizedState===null?Wg:xh,Rs=!1,v=o(d,g),Rs=!1,qo&&(v=hg(i,o,d,g)),fg(r),v}function fg(r){Z.H=sc;var i=Ft!==null&&Ft.next!==null;if(Oi=0,Sn=Ft=gt=null,L0=!1,ac=0,Uo=null,i)throw Error(a(300));r===null||jn||(r=r.dependencies,r!==null&&Io(r)&&(jn=!0))}function hg(r,i,o,d){gt=r;var g=0;do{if(qo&&(Uo=null),ac=0,qo=!1,25<=g)throw Error(a(301));if(g+=1,Sn=Ft=null,r.updateQueue!=null){var v=r.updateQueue;v.lastEffect=null,v.events=null,v.stores=null,v.memoCache!=null&&(v.memoCache.index=0)}Z.H=Kg,v=i(o,d)}while(qo);return v}function vb(){var r=Z.H,i=r.useState()[0];return i=typeof i.then=="function"?ic(i):i,r=r.useState()[0],(Ft!==null?Ft.memoizedState:null)!==r&&(gt.flags|=1024),i}function ih(){var r=B0!==0;return B0=0,r}function lh(r,i,o){i.updateQueue=r.updateQueue,i.flags&=-2053,r.lanes&=~o}function sh(r){if(L0){for(r=r.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}L0=!1}Oi=0,Sn=Ft=gt=null,qo=!1,ac=B0=0,Uo=null}function ur(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Sn===null?gt.memoizedState=Sn=r:Sn=Sn.next=r,Sn}function xn(){if(Ft===null){var r=gt.alternate;r=r!==null?r.memoizedState:null}else r=Ft.next;var i=Sn===null?gt.memoizedState:Sn.next;if(i!==null)Sn=i,Ft=r;else{if(r===null)throw gt.alternate===null?Error(a(467)):Error(a(310));Ft=r,r={memoizedState:Ft.memoizedState,baseState:Ft.baseState,baseQueue:Ft.baseQueue,queue:Ft.queue,next:null},Sn===null?gt.memoizedState=Sn=r:Sn=Sn.next=r}return Sn}function q0(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ic(r){var i=ac;return ac+=1,Uo===null&&(Uo=[]),r=Lo(Uo,r,i),i=gt,(Sn===null?i.memoizedState:Sn.next)===null&&(i=i.alternate,Z.H=i===null||i.memoizedState===null?Wg:xh),r}function U0(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return ic(r);if(r.$$typeof===q)return yn(r)}throw Error(a(438,String(r)))}function oh(r){var i=null,o=gt.updateQueue;if(o!==null&&(i=o.memoCache),i==null){var d=gt.alternate;d!==null&&(d=d.updateQueue,d!==null&&(d=d.memoCache,d!=null&&(i={data:d.data.map(function(g){return g.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),o===null&&(o=q0(),gt.updateQueue=o),o.memoCache=i,o=i.data[i.index],o===void 0)for(o=i.data[i.index]=Array(r),d=0;d<r;d++)o[d]=F;return i.index++,o}function Ii(r,i){return typeof i=="function"?i(r):i}function H0(r){var i=xn();return uh(i,Ft,r)}function uh(r,i,o){var d=r.queue;if(d===null)throw Error(a(311));d.lastRenderedReducer=o;var g=r.baseQueue,v=d.pending;if(v!==null){if(g!==null){var j=g.next;g.next=v.next,v.next=j}i.baseQueue=g=v,d.pending=null}if(v=r.baseState,g===null)r.memoizedState=v;else{i=g.next;var L=j=null,Q=null,ce=i,xe=!1;do{var je=ce.lane&-536870913;if(je!==ce.lane?(Et&je)===je:(Oi&je)===je){var fe=ce.revertLane;if(fe===0)Q!==null&&(Q=Q.next={lane:0,revertLane:0,gesture:null,action:ce.action,hasEagerState:ce.hasEagerState,eagerState:ce.eagerState,next:null}),je===jl&&(xe=!0);else if((Oi&fe)===fe){ce=ce.next,fe===jl&&(xe=!0);continue}else je={lane:0,revertLane:ce.revertLane,gesture:null,action:ce.action,hasEagerState:ce.hasEagerState,eagerState:ce.eagerState,next:null},Q===null?(L=Q=je,j=v):Q=Q.next=je,gt.lanes|=fe,Rl|=fe;je=ce.action,Rs&&o(v,je),v=ce.hasEagerState?ce.eagerState:o(v,je)}else fe={lane:je,revertLane:ce.revertLane,gesture:ce.gesture,action:ce.action,hasEagerState:ce.hasEagerState,eagerState:ce.eagerState,next:null},Q===null?(L=Q=fe,j=v):Q=Q.next=fe,gt.lanes|=je,Rl|=je;ce=ce.next}while(ce!==null&&ce!==i);if(Q===null?j=v:Q.next=L,!zn(v,r.memoizedState)&&(jn=!0,xe&&(o=Fr,o!==null)))throw o;r.memoizedState=v,r.baseState=j,r.baseQueue=Q,d.lastRenderedState=v}return g===null&&(d.lanes=0),[r.memoizedState,d.dispatch]}function ch(r){var i=xn(),o=i.queue;if(o===null)throw Error(a(311));o.lastRenderedReducer=r;var d=o.dispatch,g=o.pending,v=i.memoizedState;if(g!==null){o.pending=null;var j=g=g.next;do v=r(v,j.action),j=j.next;while(j!==g);zn(v,i.memoizedState)||(jn=!0),i.memoizedState=v,i.baseQueue===null&&(i.baseState=v),o.lastRenderedState=v}return[v,d]}function mg(r,i,o){var d=gt,g=xn(),v=kt;if(v){if(o===void 0)throw Error(a(407));o=o()}else o=i();var j=!zn((Ft||g).memoizedState,o);if(j&&(g.memoizedState=o,jn=!0),g=g.queue,hh(yg.bind(null,d,g,r),[r]),g.getSnapshot!==i||j||Sn!==null&&Sn.memoizedState.tag&1){if(d.flags|=2048,Ho(9,{destroy:void 0},gg.bind(null,d,g,o,i),null),Vt===null)throw Error(a(349));v||(Oi&127)!==0||pg(d,i,o)}return o}function pg(r,i,o){r.flags|=16384,r={getSnapshot:i,value:o},i=gt.updateQueue,i===null?(i=q0(),gt.updateQueue=i,i.stores=[r]):(o=i.stores,o===null?i.stores=[r]:o.push(r))}function gg(r,i,o,d){i.value=o,i.getSnapshot=d,vg(i)&&xg(r)}function yg(r,i,o){return o(function(){vg(i)&&xg(r)})}function vg(r){var i=r.getSnapshot;r=r.value;try{var o=i();return!zn(r,o)}catch{return!0}}function xg(r){var i=Ti(r,2);i!==null&&Mr(i,r,2)}function dh(r){var i=ur();if(typeof r=="function"){var o=r;if(r=o(),Rs){rt(!0);try{o()}finally{rt(!1)}}}return i.memoizedState=i.baseState=r,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ii,lastRenderedState:r},i}function bg(r,i,o,d){return r.baseState=o,uh(r,Ft,typeof d=="function"?d:Ii)}function xb(r,i,o,d,g){if(P0(r))throw Error(a(485));if(r=i.action,r!==null){var v={payload:g,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(j){v.listeners.push(j)}};Z.T!==null?o(!0):v.isTransition=!1,d(v),o=i.pending,o===null?(v.next=i.pending=v,wg(i,v)):(v.next=o.next,i.pending=o.next=v)}}function wg(r,i){var o=i.action,d=i.payload,g=r.state;if(i.isTransition){var v=Z.T,j={};Z.T=j;try{var L=o(g,d),Q=Z.S;Q!==null&&Q(j,L),kg(r,i,L)}catch(ce){fh(r,i,ce)}finally{v!==null&&j.types!==null&&(v.types=j.types),Z.T=v}}else try{v=o(g,d),kg(r,i,v)}catch(ce){fh(r,i,ce)}}function kg(r,i,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(function(d){Sg(r,i,d)},function(d){return fh(r,i,d)}):Sg(r,i,o)}function Sg(r,i,o){i.status="fulfilled",i.value=o,jg(i),r.state=o,i=r.pending,i!==null&&(o=i.next,o===i?r.pending=null:(o=o.next,i.next=o,wg(r,o)))}function fh(r,i,o){var d=r.pending;if(r.pending=null,d!==null){d=d.next;do i.status="rejected",i.reason=o,jg(i),i=i.next;while(i!==d)}r.action=null}function jg(r){r=r.listeners;for(var i=0;i<r.length;i++)(0,r[i])()}function Cg(r,i){return i}function Tg(r,i){if(kt){var o=Vt.formState;if(o!==null){e:{var d=gt;if(kt){if($t){t:{for(var g=$t,v=Sr;g.nodeType!==8;){if(!v){g=null;break t}if(g=pa(g.nextSibling),g===null){g=null;break t}}v=g.data,g=v==="F!"||v==="F"?g:null}if(g){$t=pa(g.nextSibling),d=g.data==="F!";break e}}Qa(d)}d=!1}d&&(i=o[0])}}return o=ur(),o.memoizedState=o.baseState=i,d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Cg,lastRenderedState:i},o.queue=d,o=Gg.bind(null,gt,d),d.dispatch=o,d=dh(!1),v=vh.bind(null,gt,!1,d.queue),d=ur(),g={state:i,dispatch:null,action:r,pending:null},d.queue=g,o=xb.bind(null,gt,g,v,o),g.dispatch=o,d.memoizedState=r,[i,o,!1]}function Ag(r){var i=xn();return Eg(i,Ft,r)}function Eg(r,i,o){if(i=uh(r,i,Cg)[0],r=H0(Ii)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var d=ic(i)}catch(j){throw j===On?Cr:j}else d=i;i=xn();var g=i.queue,v=g.dispatch;return o!==i.memoizedState&&(gt.flags|=2048,Ho(9,{destroy:void 0},bb.bind(null,g,o),null)),[d,v,r]}function bb(r,i){r.action=i}function Ng(r){var i=xn(),o=Ft;if(o!==null)return Eg(i,o,r);xn(),i=i.memoizedState,o=xn();var d=o.queue.dispatch;return o.memoizedState=r,[i,d,!1]}function Ho(r,i,o,d){return r={tag:r,create:o,deps:d,inst:i,next:null},i=gt.updateQueue,i===null&&(i=q0(),gt.updateQueue=i),o=i.lastEffect,o===null?i.lastEffect=r.next=r:(d=o.next,o.next=r,r.next=d,i.lastEffect=r),r}function Mg(){return xn().memoizedState}function $0(r,i,o,d){var g=ur();gt.flags|=r,g.memoizedState=Ho(1|i,{destroy:void 0},o,d===void 0?null:d)}function F0(r,i,o,d){var g=xn();d=d===void 0?null:d;var v=g.memoizedState.inst;Ft!==null&&d!==null&&rh(d,Ft.memoizedState.deps)?g.memoizedState=Ho(i,v,o,d):(gt.flags|=r,g.memoizedState=Ho(1|i,v,o,d))}function Dg(r,i){$0(8390656,8,r,i)}function hh(r,i){F0(2048,8,r,i)}function wb(r){gt.flags|=4;var i=gt.updateQueue;if(i===null)i=q0(),gt.updateQueue=i,i.events=[r];else{var o=i.events;o===null?i.events=[r]:o.push(r)}}function zg(r){var i=xn().memoizedState;return wb({ref:i,nextImpl:r}),function(){if((Ot&2)!==0)throw Error(a(440));return i.impl.apply(void 0,arguments)}}function Rg(r,i){return F0(4,2,r,i)}function Og(r,i){return F0(4,4,r,i)}function Ig(r,i){if(typeof i=="function"){r=r();var o=i(r);return function(){typeof o=="function"?o():i(null)}}if(i!=null)return r=r(),i.current=r,function(){i.current=null}}function _g(r,i,o){o=o!=null?o.concat([r]):null,F0(4,4,Ig.bind(null,i,r),o)}function mh(){}function Lg(r,i){var o=xn();i=i===void 0?null:i;var d=o.memoizedState;return i!==null&&rh(i,d[1])?d[0]:(o.memoizedState=[r,i],r)}function Bg(r,i){var o=xn();i=i===void 0?null:i;var d=o.memoizedState;if(i!==null&&rh(i,d[1]))return d[0];if(d=r(),Rs){rt(!0);try{r()}finally{rt(!1)}}return o.memoizedState=[d,i],d}function ph(r,i,o){return o===void 0||(Oi&1073741824)!==0&&(Et&261930)===0?r.memoizedState=i:(r.memoizedState=o,r=q4(),gt.lanes|=r,Rl|=r,o)}function qg(r,i,o,d){return zn(o,i)?o:Bo.current!==null?(r=ph(r,o,d),zn(r,i)||(jn=!0),r):(Oi&42)===0||(Oi&1073741824)!==0&&(Et&261930)===0?(jn=!0,r.memoizedState=o):(r=q4(),gt.lanes|=r,Rl|=r,i)}function Ug(r,i,o,d,g){var v=me.p;me.p=v!==0&&8>v?v:8;var j=Z.T,L={};Z.T=L,vh(r,!1,i,o);try{var Q=g(),ce=Z.S;if(ce!==null&&ce(L,Q),Q!==null&&typeof Q=="object"&&typeof Q.then=="function"){var xe=Jf(Q,d);lc(r,i,xe,Kr(r))}else lc(r,i,d,Kr(r))}catch(je){lc(r,i,{then:function(){},status:"rejected",reason:je},Kr())}finally{me.p=v,j!==null&&L.types!==null&&(j.types=L.types),Z.T=j}}function kb(){}function gh(r,i,o,d){if(r.tag!==5)throw Error(a(476));var g=Hg(r).queue;Ug(r,g,i,V,o===null?kb:function(){return $g(r),o(d)})}function Hg(r){var i=r.memoizedState;if(i!==null)return i;i={memoizedState:V,baseState:V,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ii,lastRenderedState:V},next:null};var o={};return i.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ii,lastRenderedState:o},next:null},r.memoizedState=i,r=r.alternate,r!==null&&(r.memoizedState=i),i}function $g(r){var i=Hg(r);i.next===null&&(i=r.alternate.memoizedState),lc(r,i.next.queue,{},Kr())}function yh(){return yn(Sc)}function Fg(){return xn().memoizedState}function Pg(){return xn().memoizedState}function Sb(r){for(var i=r.return;i!==null;){switch(i.tag){case 24:case 3:var o=Kr();r=$e(o);var d=Re(i,r,o);d!==null&&(Mr(d,i,o),ut(d,i,o)),i={cache:tc()},r.payload=i;return}i=i.return}}function jb(r,i,o){var d=Kr();o={lane:d,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},P0(r)?Vg(i,o):(o=Hu(r,i,o,d),o!==null&&(Mr(o,r,d),Yg(o,i,d)))}function Gg(r,i,o){var d=Kr();lc(r,i,o,d)}function lc(r,i,o,d){var g={lane:d,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};if(P0(r))Vg(i,g);else{var v=r.alternate;if(r.lanes===0&&(v===null||v.lanes===0)&&(v=i.lastRenderedReducer,v!==null))try{var j=i.lastRenderedState,L=v(j,o);if(g.hasEagerState=!0,g.eagerState=L,zn(L,j))return Do(r,i,g,0),Vt===null&&Mo(),!1}catch{}finally{}if(o=Hu(r,i,g,d),o!==null)return Mr(o,r,d),Yg(o,i,d),!0}return!1}function vh(r,i,o,d){if(d={lane:2,revertLane:Xh(),gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},P0(r)){if(i)throw Error(a(479))}else i=Hu(r,o,d,2),i!==null&&Mr(i,r,2)}function P0(r){var i=r.alternate;return r===gt||i!==null&&i===gt}function Vg(r,i){qo=L0=!0;var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}function Yg(r,i,o){if((o&4194048)!==0){var d=i.lanes;d&=r.pendingLanes,o|=d,i.lanes=o,il(r,o)}}var sc={readContext:yn,use:U0,useCallback:hn,useContext:hn,useEffect:hn,useImperativeHandle:hn,useLayoutEffect:hn,useInsertionEffect:hn,useMemo:hn,useReducer:hn,useRef:hn,useState:hn,useDebugValue:hn,useDeferredValue:hn,useTransition:hn,useSyncExternalStore:hn,useId:hn,useHostTransitionStatus:hn,useFormState:hn,useActionState:hn,useOptimistic:hn,useMemoCache:hn,useCacheRefresh:hn};sc.useEffectEvent=hn;var Wg={readContext:yn,use:U0,useCallback:function(r,i){return ur().memoizedState=[r,i===void 0?null:i],r},useContext:yn,useEffect:Dg,useImperativeHandle:function(r,i,o){o=o!=null?o.concat([r]):null,$0(4194308,4,Ig.bind(null,i,r),o)},useLayoutEffect:function(r,i){return $0(4194308,4,r,i)},useInsertionEffect:function(r,i){$0(4,2,r,i)},useMemo:function(r,i){var o=ur();i=i===void 0?null:i;var d=r();if(Rs){rt(!0);try{r()}finally{rt(!1)}}return o.memoizedState=[d,i],d},useReducer:function(r,i,o){var d=ur();if(o!==void 0){var g=o(i);if(Rs){rt(!0);try{o(i)}finally{rt(!1)}}}else g=i;return d.memoizedState=d.baseState=g,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:g},d.queue=r,r=r.dispatch=jb.bind(null,gt,r),[d.memoizedState,r]},useRef:function(r){var i=ur();return r={current:r},i.memoizedState=r},useState:function(r){r=dh(r);var i=r.queue,o=Gg.bind(null,gt,i);return i.dispatch=o,[r.memoizedState,o]},useDebugValue:mh,useDeferredValue:function(r,i){var o=ur();return ph(o,r,i)},useTransition:function(){var r=dh(!1);return r=Ug.bind(null,gt,r.queue,!0,!1),ur().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,i,o){var d=gt,g=ur();if(kt){if(o===void 0)throw Error(a(407));o=o()}else{if(o=i(),Vt===null)throw Error(a(349));(Et&127)!==0||pg(d,i,o)}g.memoizedState=o;var v={value:o,getSnapshot:i};return g.queue=v,Dg(yg.bind(null,d,v,r),[r]),d.flags|=2048,Ho(9,{destroy:void 0},gg.bind(null,d,v,o,i),null),o},useId:function(){var r=ur(),i=Vt.identifierPrefix;if(kt){var o=fa,d=da;o=(d&~(1<<32-bt(d)-1)).toString(32)+o,i="_"+i+"R_"+o,o=B0++,0<o&&(i+="H"+o.toString(32)),i+="_"}else o=yb++,i="_"+i+"r_"+o.toString(32)+"_";return r.memoizedState=i},useHostTransitionStatus:yh,useFormState:Tg,useActionState:Tg,useOptimistic:function(r){var i=ur();i.memoizedState=i.baseState=r;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=o,i=vh.bind(null,gt,!0,o),o.dispatch=i,[r,i]},useMemoCache:oh,useCacheRefresh:function(){return ur().memoizedState=Sb.bind(null,gt)},useEffectEvent:function(r){var i=ur(),o={impl:r};return i.memoizedState=o,function(){if((Ot&2)!==0)throw Error(a(440));return o.impl.apply(void 0,arguments)}}},xh={readContext:yn,use:U0,useCallback:Lg,useContext:yn,useEffect:hh,useImperativeHandle:_g,useInsertionEffect:Rg,useLayoutEffect:Og,useMemo:Bg,useReducer:H0,useRef:Mg,useState:function(){return H0(Ii)},useDebugValue:mh,useDeferredValue:function(r,i){var o=xn();return qg(o,Ft.memoizedState,r,i)},useTransition:function(){var r=H0(Ii)[0],i=xn().memoizedState;return[typeof r=="boolean"?r:ic(r),i]},useSyncExternalStore:mg,useId:Fg,useHostTransitionStatus:yh,useFormState:Ag,useActionState:Ag,useOptimistic:function(r,i){var o=xn();return bg(o,Ft,r,i)},useMemoCache:oh,useCacheRefresh:Pg};xh.useEffectEvent=zg;var Kg={readContext:yn,use:U0,useCallback:Lg,useContext:yn,useEffect:hh,useImperativeHandle:_g,useInsertionEffect:Rg,useLayoutEffect:Og,useMemo:Bg,useReducer:ch,useRef:Mg,useState:function(){return ch(Ii)},useDebugValue:mh,useDeferredValue:function(r,i){var o=xn();return Ft===null?ph(o,r,i):qg(o,Ft.memoizedState,r,i)},useTransition:function(){var r=ch(Ii)[0],i=xn().memoizedState;return[typeof r=="boolean"?r:ic(r),i]},useSyncExternalStore:mg,useId:Fg,useHostTransitionStatus:yh,useFormState:Ng,useActionState:Ng,useOptimistic:function(r,i){var o=xn();return Ft!==null?bg(o,Ft,r,i):(o.baseState=r,[r,o.queue.dispatch])},useMemoCache:oh,useCacheRefresh:Pg};Kg.useEffectEvent=zg;function bh(r,i,o,d){i=r.memoizedState,o=o(d,i),o=o==null?i:y({},i,o),r.memoizedState=o,r.lanes===0&&(r.updateQueue.baseState=o)}var wh={enqueueSetState:function(r,i,o){r=r._reactInternals;var d=Kr(),g=$e(d);g.payload=i,o!=null&&(g.callback=o),i=Re(r,g,d),i!==null&&(Mr(i,r,d),ut(i,r,d))},enqueueReplaceState:function(r,i,o){r=r._reactInternals;var d=Kr(),g=$e(d);g.tag=1,g.payload=i,o!=null&&(g.callback=o),i=Re(r,g,d),i!==null&&(Mr(i,r,d),ut(i,r,d))},enqueueForceUpdate:function(r,i){r=r._reactInternals;var o=Kr(),d=$e(o);d.tag=2,i!=null&&(d.callback=i),i=Re(r,d,o),i!==null&&(Mr(i,r,o),ut(i,r,o))}};function Xg(r,i,o,d,g,v,j){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(d,v,j):i.prototype&&i.prototype.isPureReactComponent?!ca(o,d)||!ca(g,v):!0}function Zg(r,i,o,d){r=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(o,d),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(o,d),i.state!==r&&wh.enqueueReplaceState(i,i.state,null)}function Os(r,i){var o=i;if("ref"in i){o={};for(var d in i)d!=="ref"&&(o[d]=i[d])}if(r=r.defaultProps){o===i&&(o=y({},o));for(var g in r)o[g]===void 0&&(o[g]=r[g])}return o}function Qg(r){No(r)}function Jg(r){console.error(r)}function e4(r){No(r)}function G0(r,i){try{var o=r.onUncaughtError;o(i.value,{componentStack:i.stack})}catch(d){setTimeout(function(){throw d})}}function t4(r,i,o){try{var d=r.onCaughtError;d(o.value,{componentStack:o.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(g){setTimeout(function(){throw g})}}function kh(r,i,o){return o=$e(o),o.tag=3,o.payload={element:null},o.callback=function(){G0(r,i)},o}function n4(r){return r=$e(r),r.tag=3,r}function r4(r,i,o,d){var g=o.type.getDerivedStateFromError;if(typeof g=="function"){var v=d.value;r.payload=function(){return g(v)},r.callback=function(){t4(i,o,d)}}var j=o.stateNode;j!==null&&typeof j.componentDidCatch=="function"&&(r.callback=function(){t4(i,o,d),typeof g!="function"&&(Ol===null?Ol=new Set([this]):Ol.add(this));var L=d.stack;this.componentDidCatch(d.value,{componentStack:L!==null?L:""})})}function Cb(r,i,o,d,g){if(o.flags|=32768,d!==null&&typeof d=="object"&&typeof d.then=="function"){if(i=o.alternate,i!==null&&ha(i,o,g,!0),o=Gr.current,o!==null){switch(o.tag){case 31:case 13:return ma===null?rd():o.alternate===null&&mn===0&&(mn=3),o.flags&=-257,o.flags|=65536,o.lanes=g,d===Ds?o.flags|=16384:(i=o.updateQueue,i===null?o.updateQueue=new Set([d]):i.add(d),Yh(r,d,g)),!1;case 22:return o.flags|=65536,d===Ds?o.flags|=16384:(i=o.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([d])},o.updateQueue=i):(o=i.retryQueue,o===null?i.retryQueue=new Set([d]):o.add(d)),Yh(r,d,g)),!1}throw Error(a(435,o.tag))}return Yh(r,d,g),rd(),!1}if(kt)return i=Gr.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=g,d!==Yu&&(r=Error(a(422),{cause:d}),Es(kr(r,o)))):(d!==Yu&&(i=Error(a(423),{cause:d}),Es(kr(i,o))),r=r.current.alternate,r.flags|=65536,g&=-g,r.lanes|=g,d=kr(d,o),g=kh(r.stateNode,d,g),nt(r,g),mn!==4&&(mn=2)),!1;var v=Error(a(520),{cause:d});if(v=kr(v,o),pc===null?pc=[v]:pc.push(v),mn!==4&&(mn=2),i===null)return!0;d=kr(d,o),o=i;do{switch(o.tag){case 3:return o.flags|=65536,r=g&-g,o.lanes|=r,r=kh(o.stateNode,d,r),nt(o,r),!1;case 1:if(i=o.type,v=o.stateNode,(o.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(Ol===null||!Ol.has(v))))return o.flags|=65536,g&=-g,o.lanes|=g,g=n4(g),r4(g,r,o,d),nt(o,g),!1}o=o.return}while(o!==null);return!1}var Sh=Error(a(461)),jn=!1;function Pn(r,i,o,d){i.child=r===null?$(i,null,o,d):z(i,r.child,o,d)}function a4(r,i,o,d,g){o=o.render;var v=i.ref;if("ref"in d){var j={};for(var L in d)L!=="ref"&&(j[L]=d[L])}else j=d;return or(i),d=ah(r,i,o,j,v,g),L=ih(),r!==null&&!jn?(lh(r,i,g),_i(r,i,g)):(kt&&L&&Gu(i),i.flags|=1,Pn(r,i,d,g),i.child)}function i4(r,i,o,d,g){if(r===null){var v=o.type;return typeof v=="function"&&!$u(v)&&v.defaultProps===void 0&&o.compare===null?(i.tag=15,i.type=v,l4(r,i,v,d,g)):(r=Ro(o.type,null,d,i,i.mode,g),r.ref=i.ref,r.return=i,i.child=r)}if(v=r.child,!Dh(r,g)){var j=v.memoizedProps;if(o=o.compare,o=o!==null?o:ca,o(j,d)&&r.ref===i.ref)return _i(r,i,g)}return i.flags|=1,r=Ma(v,d),r.ref=i.ref,r.return=i,i.child=r}function l4(r,i,o,d,g){if(r!==null){var v=r.memoizedProps;if(ca(v,d)&&r.ref===i.ref)if(jn=!1,i.pendingProps=d=v,Dh(r,g))(r.flags&131072)!==0&&(jn=!0);else return i.lanes=r.lanes,_i(r,i,g)}return jh(r,i,o,d,g)}function s4(r,i,o,d){var g=d.children,v=r!==null?r.memoizedState:null;if(r===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),d.mode==="hidden"){if((i.flags&128)!==0){if(v=v!==null?v.baseLanes|o:o,r!==null){for(d=i.child=r.child,g=0;d!==null;)g=g|d.lanes|d.childLanes,d=d.sibling;d=g&~v}else d=0,i.child=null;return o4(r,i,v,o,d)}if((o&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},r!==null&&Pr(i,v!==null?v.cachePool:null),v!==null?cg(i,v):eh(),dg(i);else return d=i.lanes=536870912,o4(r,i,v!==null?v.baseLanes|o:o,o,d)}else v!==null?(Pr(i,v.cachePool),cg(i,v),Ml(),i.memoizedState=null):(r!==null&&Pr(i,null),eh(),Ml());return Pn(r,i,g,o),i.child}function oc(r,i){return r!==null&&r.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function o4(r,i,o,d,g){var v=Rt();return v=v===null?null:{parent:fn._currentValue,pool:v},i.memoizedState={baseLanes:o,cachePool:v},r!==null&&Pr(i,null),eh(),dg(i),r!==null&&ha(r,i,d,!0),i.childLanes=g,null}function V0(r,i){return i=W0({mode:i.mode,children:i.children},r.mode),i.ref=r.ref,r.child=i,i.return=r,i}function u4(r,i,o){return z(i,r.child,null,o),r=V0(i,i.pendingProps),r.flags|=2,Vr(i),i.memoizedState=null,r}function Tb(r,i,o){var d=i.pendingProps,g=(i.flags&128)!==0;if(i.flags&=-129,r===null){if(kt){if(d.mode==="hidden")return r=V0(i,d),i.lanes=536870912,oc(null,r);if(nh(i),(r=$t)?(r=wy(r,Sr),r=r!==null&&r.data==="&"?r:null,r!==null&&(i.memoizedState={dehydrated:r,treeContext:Xa!==null?{id:da,overflow:fa}:null,retryLane:536870912,hydrationErrors:null},o=Fu(r),o.return=i,i.child=o,Rn=i,$t=null)):r=null,r===null)throw Qa(i);return i.lanes=536870912,null}return V0(i,d)}var v=r.memoizedState;if(v!==null){var j=v.dehydrated;if(nh(i),g)if(i.flags&256)i.flags&=-257,i=u4(r,i,o);else if(i.memoizedState!==null)i.child=r.child,i.flags|=128,i=null;else throw Error(a(558));else if(jn||ha(r,i,o,!1),g=(o&r.childLanes)!==0,jn||g){if(d=Vt,d!==null&&(j=d0(d,o),j!==0&&j!==v.retryLane))throw v.retryLane=j,Ti(r,j),Mr(d,r,j),Sh;rd(),i=u4(r,i,o)}else r=v.treeContext,$t=pa(j.nextSibling),Rn=i,kt=!0,Za=null,Sr=!1,r!==null&&Vu(i,r),i=V0(i,d),i.flags|=4096;return i}return r=Ma(r.child,{mode:d.mode,children:d.children}),r.ref=i.ref,i.child=r,r.return=i,r}function Y0(r,i){var o=i.ref;if(o===null)r!==null&&r.ref!==null&&(i.flags|=4194816);else{if(typeof o!="function"&&typeof o!="object")throw Error(a(284));(r===null||r.ref!==o)&&(i.flags|=4194816)}}function jh(r,i,o,d,g){return or(i),o=ah(r,i,o,d,void 0,g),d=ih(),r!==null&&!jn?(lh(r,i,g),_i(r,i,g)):(kt&&d&&Gu(i),i.flags|=1,Pn(r,i,o,g),i.child)}function c4(r,i,o,d,g,v){return or(i),i.updateQueue=null,o=hg(i,d,o,g),fg(r),d=ih(),r!==null&&!jn?(lh(r,i,v),_i(r,i,v)):(kt&&d&&Gu(i),i.flags|=1,Pn(r,i,o,v),i.child)}function d4(r,i,o,d,g){if(or(i),i.stateNode===null){var v=bl,j=o.contextType;typeof j=="object"&&j!==null&&(v=yn(j)),v=new o(d,v),i.memoizedState=v.state!==null&&v.state!==void 0?v.state:null,v.updater=wh,i.stateNode=v,v._reactInternals=i,v=i.stateNode,v.props=d,v.state=i.memoizedState,v.refs={},de(i),j=o.contextType,v.context=typeof j=="object"&&j!==null?yn(j):bl,v.state=i.memoizedState,j=o.getDerivedStateFromProps,typeof j=="function"&&(bh(i,o,j,d),v.state=i.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof v.getSnapshotBeforeUpdate=="function"||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(j=v.state,typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount(),j!==v.state&&wh.enqueueReplaceState(v,v.state,null),El(i,d,v,g),kn(),v.state=i.memoizedState),typeof v.componentDidMount=="function"&&(i.flags|=4194308),d=!0}else if(r===null){v=i.stateNode;var L=i.memoizedProps,Q=Os(o,L);v.props=Q;var ce=v.context,xe=o.contextType;j=bl,typeof xe=="object"&&xe!==null&&(j=yn(xe));var je=o.getDerivedStateFromProps;xe=typeof je=="function"||typeof v.getSnapshotBeforeUpdate=="function",L=i.pendingProps!==L,xe||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(L||ce!==j)&&Zg(i,v,d,j),K=!1;var fe=i.memoizedState;v.state=fe,El(i,d,v,g),kn(),ce=i.memoizedState,L||fe!==ce||K?(typeof je=="function"&&(bh(i,o,je,d),ce=i.memoizedState),(Q=K||Xg(i,o,Q,d,fe,ce,j))?(xe||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount()),typeof v.componentDidMount=="function"&&(i.flags|=4194308)):(typeof v.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=d,i.memoizedState=ce),v.props=d,v.state=ce,v.context=j,d=Q):(typeof v.componentDidMount=="function"&&(i.flags|=4194308),d=!1)}else{v=i.stateNode,Te(r,i),j=i.memoizedProps,xe=Os(o,j),v.props=xe,je=i.pendingProps,fe=v.context,ce=o.contextType,Q=bl,typeof ce=="object"&&ce!==null&&(Q=yn(ce)),L=o.getDerivedStateFromProps,(ce=typeof L=="function"||typeof v.getSnapshotBeforeUpdate=="function")||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(j!==je||fe!==Q)&&Zg(i,v,d,Q),K=!1,fe=i.memoizedState,v.state=fe,El(i,d,v,g),kn();var ge=i.memoizedState;j!==je||fe!==ge||K||r!==null&&r.dependencies!==null&&Io(r.dependencies)?(typeof L=="function"&&(bh(i,o,L,d),ge=i.memoizedState),(xe=K||Xg(i,o,xe,d,fe,ge,Q)||r!==null&&r.dependencies!==null&&Io(r.dependencies))?(ce||typeof v.UNSAFE_componentWillUpdate!="function"&&typeof v.componentWillUpdate!="function"||(typeof v.componentWillUpdate=="function"&&v.componentWillUpdate(d,ge,Q),typeof v.UNSAFE_componentWillUpdate=="function"&&v.UNSAFE_componentWillUpdate(d,ge,Q)),typeof v.componentDidUpdate=="function"&&(i.flags|=4),typeof v.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof v.componentDidUpdate!="function"||j===r.memoizedProps&&fe===r.memoizedState||(i.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||j===r.memoizedProps&&fe===r.memoizedState||(i.flags|=1024),i.memoizedProps=d,i.memoizedState=ge),v.props=d,v.state=ge,v.context=Q,d=xe):(typeof v.componentDidUpdate!="function"||j===r.memoizedProps&&fe===r.memoizedState||(i.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||j===r.memoizedProps&&fe===r.memoizedState||(i.flags|=1024),d=!1)}return v=d,Y0(r,i),d=(i.flags&128)!==0,v||d?(v=i.stateNode,o=d&&typeof o.getDerivedStateFromError!="function"?null:v.render(),i.flags|=1,r!==null&&d?(i.child=z(i,r.child,null,g),i.child=z(i,null,o,g)):Pn(r,i,o,g),i.memoizedState=v.state,r=i.child):r=_i(r,i,g),r}function f4(r,i,o,d){return Ei(),i.flags|=256,Pn(r,i,o,d),i.child}var Ch={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Th(r){return{baseLanes:r,cachePool:z0()}}function Ah(r,i,o){return r=r!==null?r.childLanes&~o:0,i&&(r|=Wr),r}function h4(r,i,o){var d=i.pendingProps,g=!1,v=(i.flags&128)!==0,j;if((j=v)||(j=r!==null&&r.memoizedState===null?!1:(vn.current&2)!==0),j&&(g=!0,i.flags&=-129),j=(i.flags&32)!==0,i.flags&=-33,r===null){if(kt){if(g?Nl(i):Ml(),(r=$t)?(r=wy(r,Sr),r=r!==null&&r.data!=="&"?r:null,r!==null&&(i.memoizedState={dehydrated:r,treeContext:Xa!==null?{id:da,overflow:fa}:null,retryLane:536870912,hydrationErrors:null},o=Fu(r),o.return=i,i.child=o,Rn=i,$t=null)):r=null,r===null)throw Qa(i);return um(r)?i.lanes=32:i.lanes=536870912,null}var L=d.children;return d=d.fallback,g?(Ml(),g=i.mode,L=W0({mode:"hidden",children:L},g),d=Ka(d,g,o,null),L.return=i,d.return=i,L.sibling=d,i.child=L,d=i.child,d.memoizedState=Th(o),d.childLanes=Ah(r,j,o),i.memoizedState=Ch,oc(null,d)):(Nl(i),Eh(i,L))}var Q=r.memoizedState;if(Q!==null&&(L=Q.dehydrated,L!==null)){if(v)i.flags&256?(Nl(i),i.flags&=-257,i=Nh(r,i,o)):i.memoizedState!==null?(Ml(),i.child=r.child,i.flags|=128,i=null):(Ml(),L=d.fallback,g=i.mode,d=W0({mode:"visible",children:d.children},g),L=Ka(L,g,o,null),L.flags|=2,d.return=i,L.return=i,d.sibling=L,i.child=d,z(i,r.child,null,o),d=i.child,d.memoizedState=Th(o),d.childLanes=Ah(r,j,o),i.memoizedState=Ch,i=oc(null,d));else if(Nl(i),um(L)){if(j=L.nextSibling&&L.nextSibling.dataset,j)var ce=j.dgst;j=ce,d=Error(a(419)),d.stack="",d.digest=j,Es({value:d,source:null,stack:null}),i=Nh(r,i,o)}else if(jn||ha(r,i,o,!1),j=(o&r.childLanes)!==0,jn||j){if(j=Vt,j!==null&&(d=d0(j,o),d!==0&&d!==Q.retryLane))throw Q.retryLane=d,Ti(r,d),Mr(j,r,d),Sh;om(L)||rd(),i=Nh(r,i,o)}else om(L)?(i.flags|=192,i.child=r.child,i=null):(r=Q.treeContext,$t=pa(L.nextSibling),Rn=i,kt=!0,Za=null,Sr=!1,r!==null&&Vu(i,r),i=Eh(i,d.children),i.flags|=4096);return i}return g?(Ml(),L=d.fallback,g=i.mode,Q=r.child,ce=Q.sibling,d=Ma(Q,{mode:"hidden",children:d.children}),d.subtreeFlags=Q.subtreeFlags&65011712,ce!==null?L=Ma(ce,L):(L=Ka(L,g,o,null),L.flags|=2),L.return=i,d.return=i,d.sibling=L,i.child=d,oc(null,d),d=i.child,L=r.child.memoizedState,L===null?L=Th(o):(g=L.cachePool,g!==null?(Q=fn._currentValue,g=g.parent!==Q?{parent:Q,pool:Q}:g):g=z0(),L={baseLanes:L.baseLanes|o,cachePool:g}),d.memoizedState=L,d.childLanes=Ah(r,j,o),i.memoizedState=Ch,oc(r.child,d)):(Nl(i),o=r.child,r=o.sibling,o=Ma(o,{mode:"visible",children:d.children}),o.return=i,o.sibling=null,r!==null&&(j=i.deletions,j===null?(i.deletions=[r],i.flags|=16):j.push(r)),i.child=o,i.memoizedState=null,o)}function Eh(r,i){return i=W0({mode:"visible",children:i},r.mode),i.return=r,r.child=i}function W0(r,i){return r=ir(22,r,null,i),r.lanes=0,r}function Nh(r,i,o){return z(i,r.child,null,o),r=Eh(i,i.pendingProps.children),r.flags|=2,i.memoizedState=null,r}function m4(r,i,o){r.lanes|=i;var d=r.alternate;d!==null&&(d.lanes|=i),Xu(r.return,i,o)}function Mh(r,i,o,d,g,v){var j=r.memoizedState;j===null?r.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:d,tail:o,tailMode:g,treeForkCount:v}:(j.isBackwards=i,j.rendering=null,j.renderingStartTime=0,j.last=d,j.tail=o,j.tailMode=g,j.treeForkCount=v)}function p4(r,i,o){var d=i.pendingProps,g=d.revealOrder,v=d.tail;d=d.children;var j=vn.current,L=(j&2)!==0;if(L?(j=j&1|2,i.flags|=128):j&=1,O(vn,j),Pn(r,i,d,o),d=kt?Ts:0,!L&&r!==null&&(r.flags&128)!==0)e:for(r=i.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&m4(r,o,i);else if(r.tag===19)m4(r,o,i);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===i)break e;for(;r.sibling===null;){if(r.return===null||r.return===i)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}switch(g){case"forwards":for(o=i.child,g=null;o!==null;)r=o.alternate,r!==null&&_0(r)===null&&(g=o),o=o.sibling;o=g,o===null?(g=i.child,i.child=null):(g=o.sibling,o.sibling=null),Mh(i,!1,g,o,v,d);break;case"backwards":case"unstable_legacy-backwards":for(o=null,g=i.child,i.child=null;g!==null;){if(r=g.alternate,r!==null&&_0(r)===null){i.child=g;break}r=g.sibling,g.sibling=o,o=g,g=r}Mh(i,!0,o,null,v,d);break;case"together":Mh(i,!1,null,null,void 0,d);break;default:i.memoizedState=null}return i.child}function _i(r,i,o){if(r!==null&&(i.dependencies=r.dependencies),Rl|=i.lanes,(o&i.childLanes)===0)if(r!==null){if(ha(r,i,o,!1),(o&i.childLanes)===0)return null}else return null;if(r!==null&&i.child!==r.child)throw Error(a(153));if(i.child!==null){for(r=i.child,o=Ma(r,r.pendingProps),i.child=o,o.return=i;r.sibling!==null;)r=r.sibling,o=o.sibling=Ma(r,r.pendingProps),o.return=i;o.sibling=null}return i.child}function Dh(r,i){return(r.lanes&i)!==0?!0:(r=r.dependencies,!!(r!==null&&Io(r)))}function Ab(r,i,o){switch(i.tag){case 3:it(i,i.stateNode.containerInfo),Ja(i,fn,r.memoizedState.cache),Ei();break;case 27:case 5:Pe(i);break;case 4:it(i,i.stateNode.containerInfo);break;case 10:Ja(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,nh(i),null;break;case 13:var d=i.memoizedState;if(d!==null)return d.dehydrated!==null?(Nl(i),i.flags|=128,null):(o&i.child.childLanes)!==0?h4(r,i,o):(Nl(i),r=_i(r,i,o),r!==null?r.sibling:null);Nl(i);break;case 19:var g=(r.flags&128)!==0;if(d=(o&i.childLanes)!==0,d||(ha(r,i,o,!1),d=(o&i.childLanes)!==0),g){if(d)return p4(r,i,o);i.flags|=128}if(g=i.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),O(vn,vn.current),d)break;return null;case 22:return i.lanes=0,s4(r,i,o,i.pendingProps);case 24:Ja(i,fn,r.memoizedState.cache)}return _i(r,i,o)}function g4(r,i,o){if(r!==null)if(r.memoizedProps!==i.pendingProps)jn=!0;else{if(!Dh(r,o)&&(i.flags&128)===0)return jn=!1,Ab(r,i,o);jn=(r.flags&131072)!==0}else jn=!1,kt&&(i.flags&1048576)!==0&&As(i,Ts,i.index);switch(i.lanes=0,i.tag){case 16:e:{var d=i.pendingProps;if(r=Di(i.elementType),i.type=r,typeof r=="function")$u(r)?(d=Os(r,d),i.tag=1,i=d4(null,i,r,d,o)):(i.tag=0,i=jh(null,i,r,d,o));else{if(r!=null){var g=r.$$typeof;if(g===R){i.tag=11,i=a4(null,i,r,d,o);break e}else if(g===H){i.tag=14,i=i4(null,i,r,d,o);break e}}throw i=be(r)||r,Error(a(306,i,""))}}return i;case 0:return jh(r,i,i.type,i.pendingProps,o);case 1:return d=i.type,g=Os(d,i.pendingProps),d4(r,i,d,g,o);case 3:e:{if(it(i,i.stateNode.containerInfo),r===null)throw Error(a(387));d=i.pendingProps;var v=i.memoizedState;g=v.element,Te(r,i),El(i,d,null,o);var j=i.memoizedState;if(d=j.cache,Ja(i,fn,d),d!==v.cache&&Zu(i,[fn],o,!0),kn(),d=j.element,v.isDehydrated)if(v={element:d,isDehydrated:!1,cache:j.cache},i.updateQueue.baseState=v,i.memoizedState=v,i.flags&256){i=f4(r,i,d,o);break e}else if(d!==g){g=kr(Error(a(424)),i),Es(g),i=f4(r,i,d,o);break e}else{switch(r=i.stateNode.containerInfo,r.nodeType){case 9:r=r.body;break;default:r=r.nodeName==="HTML"?r.ownerDocument.body:r}for($t=pa(r.firstChild),Rn=i,kt=!0,Za=null,Sr=!0,o=$(i,null,d,o),i.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling}else{if(Ei(),d===g){i=_i(r,i,o);break e}Pn(r,i,d,o)}i=i.child}return i;case 26:return Y0(r,i),r===null?(o=Ay(i.type,null,i.pendingProps,null))?i.memoizedState=o:kt||(o=i.type,r=i.pendingProps,d=cd(Ae.current).createElement(o),d[Mn]=i,d[bn]=r,Gn(d,o,r),nn(d),i.stateNode=d):i.memoizedState=Ay(i.type,r.memoizedProps,i.pendingProps,r.memoizedState),null;case 27:return Pe(i),r===null&&kt&&(d=i.stateNode=jy(i.type,i.pendingProps,Ae.current),Rn=i,Sr=!0,g=$t,Bl(i.type)?(cm=g,$t=pa(d.firstChild)):$t=g),Pn(r,i,i.pendingProps.children,o),Y0(r,i),r===null&&(i.flags|=4194304),i.child;case 5:return r===null&&kt&&((g=d=$t)&&(d=r7(d,i.type,i.pendingProps,Sr),d!==null?(i.stateNode=d,Rn=i,$t=pa(d.firstChild),Sr=!1,g=!0):g=!1),g||Qa(i)),Pe(i),g=i.type,v=i.pendingProps,j=r!==null?r.memoizedProps:null,d=v.children,im(g,v)?d=null:j!==null&&im(g,j)&&(i.flags|=32),i.memoizedState!==null&&(g=ah(r,i,vb,null,null,o),Sc._currentValue=g),Y0(r,i),Pn(r,i,d,o),i.child;case 6:return r===null&&kt&&((r=o=$t)&&(o=a7(o,i.pendingProps,Sr),o!==null?(i.stateNode=o,Rn=i,$t=null,r=!0):r=!1),r||Qa(i)),null;case 13:return h4(r,i,o);case 4:return it(i,i.stateNode.containerInfo),d=i.pendingProps,r===null?i.child=z(i,null,d,o):Pn(r,i,d,o),i.child;case 11:return a4(r,i,i.type,i.pendingProps,o);case 7:return Pn(r,i,i.pendingProps,o),i.child;case 8:return Pn(r,i,i.pendingProps.children,o),i.child;case 12:return Pn(r,i,i.pendingProps.children,o),i.child;case 10:return d=i.pendingProps,Ja(i,i.type,d.value),Pn(r,i,d.children,o),i.child;case 9:return g=i.type._context,d=i.pendingProps.children,or(i),g=yn(g),d=d(g),i.flags|=1,Pn(r,i,d,o),i.child;case 14:return i4(r,i,i.type,i.pendingProps,o);case 15:return l4(r,i,i.type,i.pendingProps,o);case 19:return p4(r,i,o);case 31:return Tb(r,i,o);case 22:return s4(r,i,o,i.pendingProps);case 24:return or(i),d=yn(fn),r===null?(g=Rt(),g===null&&(g=Vt,v=tc(),g.pooledCache=v,v.refCount++,v!==null&&(g.pooledCacheLanes|=o),g=v),i.memoizedState={parent:d,cache:g},de(i),Ja(i,fn,g)):((r.lanes&o)!==0&&(Te(r,i),El(i,null,null,o),kn()),g=r.memoizedState,v=i.memoizedState,g.parent!==d?(g={parent:d,cache:d},i.memoizedState=g,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=g),Ja(i,fn,d)):(d=v.cache,Ja(i,fn,d),d!==g.cache&&Zu(i,[fn],o,!0))),Pn(r,i,i.pendingProps.children,o),i.child;case 29:throw i.pendingProps}throw Error(a(156,i.tag))}function Li(r){r.flags|=4}function zh(r,i,o,d,g){if((i=(r.mode&32)!==0)&&(i=!1),i){if(r.flags|=16777216,(g&335544128)===g)if(r.stateNode.complete)r.flags|=8192;else if(F4())r.flags|=8192;else throw zi=Ds,nc}else r.flags&=-16777217}function y4(r,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!zy(i))if(F4())r.flags|=8192;else throw zi=Ds,nc}function K0(r,i){i!==null&&(r.flags|=4),r.flags&16384&&(i=r.tag!==22?tn():536870912,r.lanes|=i,Go|=i)}function uc(r,i){if(!kt)switch(r.tailMode){case"hidden":i=r.tail;for(var o=null;i!==null;)i.alternate!==null&&(o=i),i=i.sibling;o===null?r.tail=null:o.sibling=null;break;case"collapsed":o=r.tail;for(var d=null;o!==null;)o.alternate!==null&&(d=o),o=o.sibling;d===null?i||r.tail===null?r.tail=null:r.tail.sibling=null:d.sibling=null}}function Jt(r){var i=r.alternate!==null&&r.alternate.child===r.child,o=0,d=0;if(i)for(var g=r.child;g!==null;)o|=g.lanes|g.childLanes,d|=g.subtreeFlags&65011712,d|=g.flags&65011712,g.return=r,g=g.sibling;else for(g=r.child;g!==null;)o|=g.lanes|g.childLanes,d|=g.subtreeFlags,d|=g.flags,g.return=r,g=g.sibling;return r.subtreeFlags|=d,r.childLanes=o,i}function Eb(r,i,o){var d=i.pendingProps;switch(Oo(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Jt(i),null;case 1:return Jt(i),null;case 3:return o=i.stateNode,d=null,r!==null&&(d=r.memoizedState.cache),i.memoizedState.cache!==d&&(i.flags|=2048),$r(fn),pe(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(r===null||r.child===null)&&(Sl(i)?Li(i):r===null||r.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,Wu())),Jt(i),null;case 26:var g=i.type,v=i.memoizedState;return r===null?(Li(i),v!==null?(Jt(i),y4(i,v)):(Jt(i),zh(i,g,null,d,o))):v?v!==r.memoizedState?(Li(i),Jt(i),y4(i,v)):(Jt(i),i.flags&=-16777217):(r=r.memoizedProps,r!==d&&Li(i),Jt(i),zh(i,g,r,d,o)),null;case 27:if(Ke(i),o=Ae.current,g=i.type,r!==null&&i.stateNode!=null)r.memoizedProps!==d&&Li(i);else{if(!d){if(i.stateNode===null)throw Error(a(166));return Jt(i),null}r=ee.current,Sl(i)?N0(i):(r=jy(g,d,o),i.stateNode=r,Li(i))}return Jt(i),null;case 5:if(Ke(i),g=i.type,r!==null&&i.stateNode!=null)r.memoizedProps!==d&&Li(i);else{if(!d){if(i.stateNode===null)throw Error(a(166));return Jt(i),null}if(v=ee.current,Sl(i))N0(i);else{var j=cd(Ae.current);switch(v){case 1:v=j.createElementNS("http://www.w3.org/2000/svg",g);break;case 2:v=j.createElementNS("http://www.w3.org/1998/Math/MathML",g);break;default:switch(g){case"svg":v=j.createElementNS("http://www.w3.org/2000/svg",g);break;case"math":v=j.createElementNS("http://www.w3.org/1998/Math/MathML",g);break;case"script":v=j.createElement("div"),v.innerHTML="<script><\/script>",v=v.removeChild(v.firstChild);break;case"select":v=typeof d.is=="string"?j.createElement("select",{is:d.is}):j.createElement("select"),d.multiple?v.multiple=!0:d.size&&(v.size=d.size);break;default:v=typeof d.is=="string"?j.createElement(g,{is:d.is}):j.createElement(g)}}v[Mn]=i,v[bn]=d;e:for(j=i.child;j!==null;){if(j.tag===5||j.tag===6)v.appendChild(j.stateNode);else if(j.tag!==4&&j.tag!==27&&j.child!==null){j.child.return=j,j=j.child;continue}if(j===i)break e;for(;j.sibling===null;){if(j.return===null||j.return===i)break e;j=j.return}j.sibling.return=j.return,j=j.sibling}i.stateNode=v;e:switch(Gn(v,g,d),g){case"button":case"input":case"select":case"textarea":d=!!d.autoFocus;break e;case"img":d=!0;break e;default:d=!1}d&&Li(i)}}return Jt(i),zh(i,i.type,r===null?null:r.memoizedProps,i.pendingProps,o),null;case 6:if(r&&i.stateNode!=null)r.memoizedProps!==d&&Li(i);else{if(typeof d!="string"&&i.stateNode===null)throw Error(a(166));if(r=Ae.current,Sl(i)){if(r=i.stateNode,o=i.memoizedProps,d=null,g=Rn,g!==null)switch(g.tag){case 27:case 5:d=g.memoizedProps}r[Mn]=i,r=!!(r.nodeValue===o||d!==null&&d.suppressHydrationWarning===!0||hy(r.nodeValue,o)),r||Qa(i,!0)}else r=cd(r).createTextNode(d),r[Mn]=i,i.stateNode=r}return Jt(i),null;case 31:if(o=i.memoizedState,r===null||r.memoizedState!==null){if(d=Sl(i),o!==null){if(r===null){if(!d)throw Error(a(318));if(r=i.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(557));r[Mn]=i}else Ei(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;Jt(i),r=!1}else o=Wu(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=o),r=!0;if(!r)return i.flags&256?(Vr(i),i):(Vr(i),null);if((i.flags&128)!==0)throw Error(a(558))}return Jt(i),null;case 13:if(d=i.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(g=Sl(i),d!==null&&d.dehydrated!==null){if(r===null){if(!g)throw Error(a(318));if(g=i.memoizedState,g=g!==null?g.dehydrated:null,!g)throw Error(a(317));g[Mn]=i}else Ei(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;Jt(i),g=!1}else g=Wu(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=g),g=!0;if(!g)return i.flags&256?(Vr(i),i):(Vr(i),null)}return Vr(i),(i.flags&128)!==0?(i.lanes=o,i):(o=d!==null,r=r!==null&&r.memoizedState!==null,o&&(d=i.child,g=null,d.alternate!==null&&d.alternate.memoizedState!==null&&d.alternate.memoizedState.cachePool!==null&&(g=d.alternate.memoizedState.cachePool.pool),v=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(v=d.memoizedState.cachePool.pool),v!==g&&(d.flags|=2048)),o!==r&&o&&(i.child.flags|=8192),K0(i,i.updateQueue),Jt(i),null);case 4:return pe(),r===null&&em(i.stateNode.containerInfo),Jt(i),null;case 10:return $r(i.type),Jt(i),null;case 19:if(Y(vn),d=i.memoizedState,d===null)return Jt(i),null;if(g=(i.flags&128)!==0,v=d.rendering,v===null)if(g)uc(d,!1);else{if(mn!==0||r!==null&&(r.flags&128)!==0)for(r=i.child;r!==null;){if(v=_0(r),v!==null){for(i.flags|=128,uc(d,!1),r=v.updateQueue,i.updateQueue=r,K0(i,r),i.subtreeFlags=0,r=o,o=i.child;o!==null;)A0(o,r),o=o.sibling;return O(vn,vn.current&1|2),kt&&Yn(i,d.treeForkCount),i.child}r=r.sibling}d.tail!==null&&Zt()>ed&&(i.flags|=128,g=!0,uc(d,!1),i.lanes=4194304)}else{if(!g)if(r=_0(v),r!==null){if(i.flags|=128,g=!0,r=r.updateQueue,i.updateQueue=r,K0(i,r),uc(d,!0),d.tail===null&&d.tailMode==="hidden"&&!v.alternate&&!kt)return Jt(i),null}else 2*Zt()-d.renderingStartTime>ed&&o!==536870912&&(i.flags|=128,g=!0,uc(d,!1),i.lanes=4194304);d.isBackwards?(v.sibling=i.child,i.child=v):(r=d.last,r!==null?r.sibling=v:i.child=v,d.last=v)}return d.tail!==null?(r=d.tail,d.rendering=r,d.tail=r.sibling,d.renderingStartTime=Zt(),r.sibling=null,o=vn.current,O(vn,g?o&1|2:o&1),kt&&Yn(i,d.treeForkCount),r):(Jt(i),null);case 22:case 23:return Vr(i),th(),d=i.memoizedState!==null,r!==null?r.memoizedState!==null!==d&&(i.flags|=8192):d&&(i.flags|=8192),d?(o&536870912)!==0&&(i.flags&128)===0&&(Jt(i),i.subtreeFlags&6&&(i.flags|=8192)):Jt(i),o=i.updateQueue,o!==null&&K0(i,o.retryQueue),o=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),d=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(d=i.memoizedState.cachePool.pool),d!==o&&(i.flags|=2048),r!==null&&Y(ei),null;case 24:return o=null,r!==null&&(o=r.memoizedState.cache),i.memoizedState.cache!==o&&(i.flags|=2048),$r(fn),Jt(i),null;case 25:return null;case 30:return null}throw Error(a(156,i.tag))}function Nb(r,i){switch(Oo(i),i.tag){case 1:return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 3:return $r(fn),pe(),r=i.flags,(r&65536)!==0&&(r&128)===0?(i.flags=r&-65537|128,i):null;case 26:case 27:case 5:return Ke(i),null;case 31:if(i.memoizedState!==null){if(Vr(i),i.alternate===null)throw Error(a(340));Ei()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 13:if(Vr(i),r=i.memoizedState,r!==null&&r.dehydrated!==null){if(i.alternate===null)throw Error(a(340));Ei()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 19:return Y(vn),null;case 4:return pe(),null;case 10:return $r(i.type),null;case 22:case 23:return Vr(i),th(),r!==null&&Y(ei),r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 24:return $r(fn),null;case 25:return null;default:return null}}function v4(r,i){switch(Oo(i),i.tag){case 3:$r(fn),pe();break;case 26:case 27:case 5:Ke(i);break;case 4:pe();break;case 31:i.memoizedState!==null&&Vr(i);break;case 13:Vr(i);break;case 19:Y(vn);break;case 10:$r(i.type);break;case 22:case 23:Vr(i),th(),r!==null&&Y(ei);break;case 24:$r(fn)}}function cc(r,i){try{var o=i.updateQueue,d=o!==null?o.lastEffect:null;if(d!==null){var g=d.next;o=g;do{if((o.tag&r)===r){d=void 0;var v=o.create,j=o.inst;d=v(),j.destroy=d}o=o.next}while(o!==g)}}catch(L){qt(i,i.return,L)}}function Dl(r,i,o){try{var d=i.updateQueue,g=d!==null?d.lastEffect:null;if(g!==null){var v=g.next;d=v;do{if((d.tag&r)===r){var j=d.inst,L=j.destroy;if(L!==void 0){j.destroy=void 0,g=i;var Q=o,ce=L;try{ce()}catch(xe){qt(g,Q,xe)}}}d=d.next}while(d!==v)}}catch(xe){qt(i,i.return,xe)}}function x4(r){var i=r.updateQueue;if(i!==null){var o=r.stateNode;try{ug(i,o)}catch(d){qt(r,r.return,d)}}}function b4(r,i,o){o.props=Os(r.type,r.memoizedProps),o.state=r.memoizedState;try{o.componentWillUnmount()}catch(d){qt(r,i,d)}}function dc(r,i){try{var o=r.ref;if(o!==null){switch(r.tag){case 26:case 27:case 5:var d=r.stateNode;break;case 30:d=r.stateNode;break;default:d=r.stateNode}typeof o=="function"?r.refCleanup=o(d):o.current=d}}catch(g){qt(r,i,g)}}function ti(r,i){var o=r.ref,d=r.refCleanup;if(o!==null)if(typeof d=="function")try{d()}catch(g){qt(r,i,g)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof o=="function")try{o(null)}catch(g){qt(r,i,g)}else o.current=null}function w4(r){var i=r.type,o=r.memoizedProps,d=r.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":o.autoFocus&&d.focus();break e;case"img":o.src?d.src=o.src:o.srcSet&&(d.srcset=o.srcSet)}}catch(g){qt(r,r.return,g)}}function Rh(r,i,o){try{var d=r.stateNode;Zb(d,r.type,o,i),d[bn]=i}catch(g){qt(r,r.return,g)}}function k4(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&Bl(r.type)||r.tag===4}function Oh(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||k4(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.tag===27&&Bl(r.type)||r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function Ih(r,i,o){var d=r.tag;if(d===5||d===6)r=r.stateNode,i?(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o).insertBefore(r,i):(i=o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,i.appendChild(r),o=o._reactRootContainer,o!=null||i.onclick!==null||(i.onclick=wn));else if(d!==4&&(d===27&&Bl(r.type)&&(o=r.stateNode,i=null),r=r.child,r!==null))for(Ih(r,i,o),r=r.sibling;r!==null;)Ih(r,i,o),r=r.sibling}function X0(r,i,o){var d=r.tag;if(d===5||d===6)r=r.stateNode,i?o.insertBefore(r,i):o.appendChild(r);else if(d!==4&&(d===27&&Bl(r.type)&&(o=r.stateNode),r=r.child,r!==null))for(X0(r,i,o),r=r.sibling;r!==null;)X0(r,i,o),r=r.sibling}function S4(r){var i=r.stateNode,o=r.memoizedProps;try{for(var d=r.type,g=i.attributes;g.length;)i.removeAttributeNode(g[0]);Gn(i,d,o),i[Mn]=r,i[bn]=o}catch(v){qt(r,r.return,v)}}var Bi=!1,Cn=!1,_h=!1,j4=typeof WeakSet=="function"?WeakSet:Set,qn=null;function Mb(r,i){if(r=r.containerInfo,rm=yd,r=w0(r),Fn(r)){if("selectionStart"in r)var o={start:r.selectionStart,end:r.selectionEnd};else e:{o=(o=r.ownerDocument)&&o.defaultView||window;var d=o.getSelection&&o.getSelection();if(d&&d.rangeCount!==0){o=d.anchorNode;var g=d.anchorOffset,v=d.focusNode;d=d.focusOffset;try{o.nodeType,v.nodeType}catch{o=null;break e}var j=0,L=-1,Q=-1,ce=0,xe=0,je=r,fe=null;t:for(;;){for(var ge;je!==o||g!==0&&je.nodeType!==3||(L=j+g),je!==v||d!==0&&je.nodeType!==3||(Q=j+d),je.nodeType===3&&(j+=je.nodeValue.length),(ge=je.firstChild)!==null;)fe=je,je=ge;for(;;){if(je===r)break t;if(fe===o&&++ce===g&&(L=j),fe===v&&++xe===d&&(Q=j),(ge=je.nextSibling)!==null)break;je=fe,fe=je.parentNode}je=ge}o=L===-1||Q===-1?null:{start:L,end:Q}}else o=null}o=o||{start:0,end:0}}else o=null;for(am={focusedElem:r,selectionRange:o},yd=!1,qn=i;qn!==null;)if(i=qn,r=i.child,(i.subtreeFlags&1028)!==0&&r!==null)r.return=i,qn=r;else for(;qn!==null;){switch(i=qn,v=i.alternate,r=i.flags,i.tag){case 0:if((r&4)!==0&&(r=i.updateQueue,r=r!==null?r.events:null,r!==null))for(o=0;o<r.length;o++)g=r[o],g.ref.impl=g.nextImpl;break;case 11:case 15:break;case 1:if((r&1024)!==0&&v!==null){r=void 0,o=i,g=v.memoizedProps,v=v.memoizedState,d=o.stateNode;try{var Xe=Os(o.type,g);r=d.getSnapshotBeforeUpdate(Xe,v),d.__reactInternalSnapshotBeforeUpdate=r}catch(ct){qt(o,o.return,ct)}}break;case 3:if((r&1024)!==0){if(r=i.stateNode.containerInfo,o=r.nodeType,o===9)sm(r);else if(o===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":sm(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((r&1024)!==0)throw Error(a(163))}if(r=i.sibling,r!==null){r.return=i.return,qn=r;break}qn=i.return}}function C4(r,i,o){var d=o.flags;switch(o.tag){case 0:case 11:case 15:Ui(r,o),d&4&&cc(5,o);break;case 1:if(Ui(r,o),d&4)if(r=o.stateNode,i===null)try{r.componentDidMount()}catch(j){qt(o,o.return,j)}else{var g=Os(o.type,i.memoizedProps);i=i.memoizedState;try{r.componentDidUpdate(g,i,r.__reactInternalSnapshotBeforeUpdate)}catch(j){qt(o,o.return,j)}}d&64&&x4(o),d&512&&dc(o,o.return);break;case 3:if(Ui(r,o),d&64&&(r=o.updateQueue,r!==null)){if(i=null,o.child!==null)switch(o.child.tag){case 27:case 5:i=o.child.stateNode;break;case 1:i=o.child.stateNode}try{ug(r,i)}catch(j){qt(o,o.return,j)}}break;case 27:i===null&&d&4&&S4(o);case 26:case 5:Ui(r,o),i===null&&d&4&&w4(o),d&512&&dc(o,o.return);break;case 12:Ui(r,o);break;case 31:Ui(r,o),d&4&&E4(r,o);break;case 13:Ui(r,o),d&4&&N4(r,o),d&64&&(r=o.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(o=qb.bind(null,o),i7(r,o))));break;case 22:if(d=o.memoizedState!==null||Bi,!d){i=i!==null&&i.memoizedState!==null||Cn,g=Bi;var v=Cn;Bi=d,(Cn=i)&&!v?Hi(r,o,(o.subtreeFlags&8772)!==0):Ui(r,o),Bi=g,Cn=v}break;case 30:break;default:Ui(r,o)}}function T4(r){var i=r.alternate;i!==null&&(r.alternate=null,T4(i)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(i=r.stateNode,i!==null&&Su(i)),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}var an=null,Tr=!1;function qi(r,i,o){for(o=o.child;o!==null;)A4(r,i,o),o=o.sibling}function A4(r,i,o){if(yt&&typeof yt.onCommitFiberUnmount=="function")try{yt.onCommitFiberUnmount(Tt,o)}catch{}switch(o.tag){case 26:Cn||ti(o,i),qi(r,i,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(o=o.stateNode,o.parentNode.removeChild(o));break;case 27:Cn||ti(o,i);var d=an,g=Tr;Bl(o.type)&&(an=o.stateNode,Tr=!1),qi(r,i,o),bc(o.stateNode),an=d,Tr=g;break;case 5:Cn||ti(o,i);case 6:if(d=an,g=Tr,an=null,qi(r,i,o),an=d,Tr=g,an!==null)if(Tr)try{(an.nodeType===9?an.body:an.nodeName==="HTML"?an.ownerDocument.body:an).removeChild(o.stateNode)}catch(v){qt(o,i,v)}else try{an.removeChild(o.stateNode)}catch(v){qt(o,i,v)}break;case 18:an!==null&&(Tr?(r=an,xy(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,o.stateNode),Jo(r)):xy(an,o.stateNode));break;case 4:d=an,g=Tr,an=o.stateNode.containerInfo,Tr=!0,qi(r,i,o),an=d,Tr=g;break;case 0:case 11:case 14:case 15:Dl(2,o,i),Cn||Dl(4,o,i),qi(r,i,o);break;case 1:Cn||(ti(o,i),d=o.stateNode,typeof d.componentWillUnmount=="function"&&b4(o,i,d)),qi(r,i,o);break;case 21:qi(r,i,o);break;case 22:Cn=(d=Cn)||o.memoizedState!==null,qi(r,i,o),Cn=d;break;default:qi(r,i,o)}}function E4(r,i){if(i.memoizedState===null&&(r=i.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{Jo(r)}catch(o){qt(i,i.return,o)}}}function N4(r,i){if(i.memoizedState===null&&(r=i.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{Jo(r)}catch(o){qt(i,i.return,o)}}function Db(r){switch(r.tag){case 31:case 13:case 19:var i=r.stateNode;return i===null&&(i=r.stateNode=new j4),i;case 22:return r=r.stateNode,i=r._retryCache,i===null&&(i=r._retryCache=new j4),i;default:throw Error(a(435,r.tag))}}function Z0(r,i){var o=Db(r);i.forEach(function(d){if(!o.has(d)){o.add(d);var g=Ub.bind(null,r,d);d.then(g,g)}})}function Ar(r,i){var o=i.deletions;if(o!==null)for(var d=0;d<o.length;d++){var g=o[d],v=r,j=i,L=j;e:for(;L!==null;){switch(L.tag){case 27:if(Bl(L.type)){an=L.stateNode,Tr=!1;break e}break;case 5:an=L.stateNode,Tr=!1;break e;case 3:case 4:an=L.stateNode.containerInfo,Tr=!0;break e}L=L.return}if(an===null)throw Error(a(160));A4(v,j,g),an=null,Tr=!1,v=g.alternate,v!==null&&(v.return=null),g.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)M4(i,r),i=i.sibling}var za=null;function M4(r,i){var o=r.alternate,d=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:Ar(i,r),Er(r),d&4&&(Dl(3,r,r.return),cc(3,r),Dl(5,r,r.return));break;case 1:Ar(i,r),Er(r),d&512&&(Cn||o===null||ti(o,o.return)),d&64&&Bi&&(r=r.updateQueue,r!==null&&(d=r.callbacks,d!==null&&(o=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=o===null?d:o.concat(d))));break;case 26:var g=za;if(Ar(i,r),Er(r),d&512&&(Cn||o===null||ti(o,o.return)),d&4){var v=o!==null?o.memoizedState:null;if(d=r.memoizedState,o===null)if(d===null)if(r.stateNode===null){e:{d=r.type,o=r.memoizedProps,g=g.ownerDocument||g;t:switch(d){case"title":v=g.getElementsByTagName("title")[0],(!v||v[La]||v[Mn]||v.namespaceURI==="http://www.w3.org/2000/svg"||v.hasAttribute("itemprop"))&&(v=g.createElement(d),g.head.insertBefore(v,g.querySelector("head > title"))),Gn(v,d,o),v[Mn]=r,nn(v),d=v;break e;case"link":var j=My("link","href",g).get(d+(o.href||""));if(j){for(var L=0;L<j.length;L++)if(v=j[L],v.getAttribute("href")===(o.href==null||o.href===""?null:o.href)&&v.getAttribute("rel")===(o.rel==null?null:o.rel)&&v.getAttribute("title")===(o.title==null?null:o.title)&&v.getAttribute("crossorigin")===(o.crossOrigin==null?null:o.crossOrigin)){j.splice(L,1);break t}}v=g.createElement(d),Gn(v,d,o),g.head.appendChild(v);break;case"meta":if(j=My("meta","content",g).get(d+(o.content||""))){for(L=0;L<j.length;L++)if(v=j[L],v.getAttribute("content")===(o.content==null?null:""+o.content)&&v.getAttribute("name")===(o.name==null?null:o.name)&&v.getAttribute("property")===(o.property==null?null:o.property)&&v.getAttribute("http-equiv")===(o.httpEquiv==null?null:o.httpEquiv)&&v.getAttribute("charset")===(o.charSet==null?null:o.charSet)){j.splice(L,1);break t}}v=g.createElement(d),Gn(v,d,o),g.head.appendChild(v);break;default:throw Error(a(468,d))}v[Mn]=r,nn(v),d=v}r.stateNode=d}else Dy(g,r.type,r.stateNode);else r.stateNode=Ny(g,d,r.memoizedProps);else v!==d?(v===null?o.stateNode!==null&&(o=o.stateNode,o.parentNode.removeChild(o)):v.count--,d===null?Dy(g,r.type,r.stateNode):Ny(g,d,r.memoizedProps)):d===null&&r.stateNode!==null&&Rh(r,r.memoizedProps,o.memoizedProps)}break;case 27:Ar(i,r),Er(r),d&512&&(Cn||o===null||ti(o,o.return)),o!==null&&d&4&&Rh(r,r.memoizedProps,o.memoizedProps);break;case 5:if(Ar(i,r),Er(r),d&512&&(Cn||o===null||ti(o,o.return)),r.flags&32){g=r.stateNode;try{Ca(g,"")}catch(Xe){qt(r,r.return,Xe)}}d&4&&r.stateNode!=null&&(g=r.memoizedProps,Rh(r,g,o!==null?o.memoizedProps:g)),d&1024&&(_h=!0);break;case 6:if(Ar(i,r),Er(r),d&4){if(r.stateNode===null)throw Error(a(162));d=r.memoizedProps,o=r.stateNode;try{o.nodeValue=d}catch(Xe){qt(r,r.return,Xe)}}break;case 3:if(hd=null,g=za,za=dd(i.containerInfo),Ar(i,r),za=g,Er(r),d&4&&o!==null&&o.memoizedState.isDehydrated)try{Jo(i.containerInfo)}catch(Xe){qt(r,r.return,Xe)}_h&&(_h=!1,D4(r));break;case 4:d=za,za=dd(r.stateNode.containerInfo),Ar(i,r),Er(r),za=d;break;case 12:Ar(i,r),Er(r);break;case 31:Ar(i,r),Er(r),d&4&&(d=r.updateQueue,d!==null&&(r.updateQueue=null,Z0(r,d)));break;case 13:Ar(i,r),Er(r),r.child.flags&8192&&r.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(J0=Zt()),d&4&&(d=r.updateQueue,d!==null&&(r.updateQueue=null,Z0(r,d)));break;case 22:g=r.memoizedState!==null;var Q=o!==null&&o.memoizedState!==null,ce=Bi,xe=Cn;if(Bi=ce||g,Cn=xe||Q,Ar(i,r),Cn=xe,Bi=ce,Er(r),d&8192)e:for(i=r.stateNode,i._visibility=g?i._visibility&-2:i._visibility|1,g&&(o===null||Q||Bi||Cn||Is(r)),o=null,i=r;;){if(i.tag===5||i.tag===26){if(o===null){Q=o=i;try{if(v=Q.stateNode,g)j=v.style,typeof j.setProperty=="function"?j.setProperty("display","none","important"):j.display="none";else{L=Q.stateNode;var je=Q.memoizedProps.style,fe=je!=null&&je.hasOwnProperty("display")?je.display:null;L.style.display=fe==null||typeof fe=="boolean"?"":(""+fe).trim()}}catch(Xe){qt(Q,Q.return,Xe)}}}else if(i.tag===6){if(o===null){Q=i;try{Q.stateNode.nodeValue=g?"":Q.memoizedProps}catch(Xe){qt(Q,Q.return,Xe)}}}else if(i.tag===18){if(o===null){Q=i;try{var ge=Q.stateNode;g?by(ge,!0):by(Q.stateNode,!1)}catch(Xe){qt(Q,Q.return,Xe)}}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===r)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===r)break e;for(;i.sibling===null;){if(i.return===null||i.return===r)break e;o===i&&(o=null),i=i.return}o===i&&(o=null),i.sibling.return=i.return,i=i.sibling}d&4&&(d=r.updateQueue,d!==null&&(o=d.retryQueue,o!==null&&(d.retryQueue=null,Z0(r,o))));break;case 19:Ar(i,r),Er(r),d&4&&(d=r.updateQueue,d!==null&&(r.updateQueue=null,Z0(r,d)));break;case 30:break;case 21:break;default:Ar(i,r),Er(r)}}function Er(r){var i=r.flags;if(i&2){try{for(var o,d=r.return;d!==null;){if(k4(d)){o=d;break}d=d.return}if(o==null)throw Error(a(160));switch(o.tag){case 27:var g=o.stateNode,v=Oh(r);X0(r,v,g);break;case 5:var j=o.stateNode;o.flags&32&&(Ca(j,""),o.flags&=-33);var L=Oh(r);X0(r,L,j);break;case 3:case 4:var Q=o.stateNode.containerInfo,ce=Oh(r);Ih(r,ce,Q);break;default:throw Error(a(161))}}catch(xe){qt(r,r.return,xe)}r.flags&=-3}i&4096&&(r.flags&=-4097)}function D4(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var i=r;D4(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),r=r.sibling}}function Ui(r,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)C4(r,i.alternate,i),i=i.sibling}function Is(r){for(r=r.child;r!==null;){var i=r;switch(i.tag){case 0:case 11:case 14:case 15:Dl(4,i,i.return),Is(i);break;case 1:ti(i,i.return);var o=i.stateNode;typeof o.componentWillUnmount=="function"&&b4(i,i.return,o),Is(i);break;case 27:bc(i.stateNode);case 26:case 5:ti(i,i.return),Is(i);break;case 22:i.memoizedState===null&&Is(i);break;case 30:Is(i);break;default:Is(i)}r=r.sibling}}function Hi(r,i,o){for(o=o&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var d=i.alternate,g=r,v=i,j=v.flags;switch(v.tag){case 0:case 11:case 15:Hi(g,v,o),cc(4,v);break;case 1:if(Hi(g,v,o),d=v,g=d.stateNode,typeof g.componentDidMount=="function")try{g.componentDidMount()}catch(ce){qt(d,d.return,ce)}if(d=v,g=d.updateQueue,g!==null){var L=d.stateNode;try{var Q=g.shared.hiddenCallbacks;if(Q!==null)for(g.shared.hiddenCallbacks=null,g=0;g<Q.length;g++)og(Q[g],L)}catch(ce){qt(d,d.return,ce)}}o&&j&64&&x4(v),dc(v,v.return);break;case 27:S4(v);case 26:case 5:Hi(g,v,o),o&&d===null&&j&4&&w4(v),dc(v,v.return);break;case 12:Hi(g,v,o);break;case 31:Hi(g,v,o),o&&j&4&&E4(g,v);break;case 13:Hi(g,v,o),o&&j&4&&N4(g,v);break;case 22:v.memoizedState===null&&Hi(g,v,o),dc(v,v.return);break;case 30:break;default:Hi(g,v,o)}i=i.sibling}}function Lh(r,i){var o=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),r=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(r=i.memoizedState.cachePool.pool),r!==o&&(r!=null&&r.refCount++,o!=null&&Da(o))}function Bh(r,i){r=null,i.alternate!==null&&(r=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==r&&(i.refCount++,r!=null&&Da(r))}function Ra(r,i,o,d){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)z4(r,i,o,d),i=i.sibling}function z4(r,i,o,d){var g=i.flags;switch(i.tag){case 0:case 11:case 15:Ra(r,i,o,d),g&2048&&cc(9,i);break;case 1:Ra(r,i,o,d);break;case 3:Ra(r,i,o,d),g&2048&&(r=null,i.alternate!==null&&(r=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==r&&(i.refCount++,r!=null&&Da(r)));break;case 12:if(g&2048){Ra(r,i,o,d),r=i.stateNode;try{var v=i.memoizedProps,j=v.id,L=v.onPostCommit;typeof L=="function"&&L(j,i.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(Q){qt(i,i.return,Q)}}else Ra(r,i,o,d);break;case 31:Ra(r,i,o,d);break;case 13:Ra(r,i,o,d);break;case 23:break;case 22:v=i.stateNode,j=i.alternate,i.memoizedState!==null?v._visibility&2?Ra(r,i,o,d):fc(r,i):v._visibility&2?Ra(r,i,o,d):(v._visibility|=2,$o(r,i,o,d,(i.subtreeFlags&10256)!==0||!1)),g&2048&&Lh(j,i);break;case 24:Ra(r,i,o,d),g&2048&&Bh(i.alternate,i);break;default:Ra(r,i,o,d)}}function $o(r,i,o,d,g){for(g=g&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var v=r,j=i,L=o,Q=d,ce=j.flags;switch(j.tag){case 0:case 11:case 15:$o(v,j,L,Q,g),cc(8,j);break;case 23:break;case 22:var xe=j.stateNode;j.memoizedState!==null?xe._visibility&2?$o(v,j,L,Q,g):fc(v,j):(xe._visibility|=2,$o(v,j,L,Q,g)),g&&ce&2048&&Lh(j.alternate,j);break;case 24:$o(v,j,L,Q,g),g&&ce&2048&&Bh(j.alternate,j);break;default:$o(v,j,L,Q,g)}i=i.sibling}}function fc(r,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var o=r,d=i,g=d.flags;switch(d.tag){case 22:fc(o,d),g&2048&&Lh(d.alternate,d);break;case 24:fc(o,d),g&2048&&Bh(d.alternate,d);break;default:fc(o,d)}i=i.sibling}}var hc=8192;function Fo(r,i,o){if(r.subtreeFlags&hc)for(r=r.child;r!==null;)R4(r,i,o),r=r.sibling}function R4(r,i,o){switch(r.tag){case 26:Fo(r,i,o),r.flags&hc&&r.memoizedState!==null&&y7(o,za,r.memoizedState,r.memoizedProps);break;case 5:Fo(r,i,o);break;case 3:case 4:var d=za;za=dd(r.stateNode.containerInfo),Fo(r,i,o),za=d;break;case 22:r.memoizedState===null&&(d=r.alternate,d!==null&&d.memoizedState!==null?(d=hc,hc=16777216,Fo(r,i,o),hc=d):Fo(r,i,o));break;default:Fo(r,i,o)}}function O4(r){var i=r.alternate;if(i!==null&&(r=i.child,r!==null)){i.child=null;do i=r.sibling,r.sibling=null,r=i;while(r!==null)}}function mc(r){var i=r.deletions;if((r.flags&16)!==0){if(i!==null)for(var o=0;o<i.length;o++){var d=i[o];qn=d,_4(d,r)}O4(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)I4(r),r=r.sibling}function I4(r){switch(r.tag){case 0:case 11:case 15:mc(r),r.flags&2048&&Dl(9,r,r.return);break;case 3:mc(r);break;case 12:mc(r);break;case 22:var i=r.stateNode;r.memoizedState!==null&&i._visibility&2&&(r.return===null||r.return.tag!==13)?(i._visibility&=-3,Q0(r)):mc(r);break;default:mc(r)}}function Q0(r){var i=r.deletions;if((r.flags&16)!==0){if(i!==null)for(var o=0;o<i.length;o++){var d=i[o];qn=d,_4(d,r)}O4(r)}for(r=r.child;r!==null;){switch(i=r,i.tag){case 0:case 11:case 15:Dl(8,i,i.return),Q0(i);break;case 22:o=i.stateNode,o._visibility&2&&(o._visibility&=-3,Q0(i));break;default:Q0(i)}r=r.sibling}}function _4(r,i){for(;qn!==null;){var o=qn;switch(o.tag){case 0:case 11:case 15:Dl(8,o,i);break;case 23:case 22:if(o.memoizedState!==null&&o.memoizedState.cachePool!==null){var d=o.memoizedState.cachePool.pool;d!=null&&d.refCount++}break;case 24:Da(o.memoizedState.cache)}if(d=o.child,d!==null)d.return=o,qn=d;else e:for(o=r;qn!==null;){d=qn;var g=d.sibling,v=d.return;if(T4(d),d===o){qn=null;break e}if(g!==null){g.return=v,qn=g;break e}qn=v}}}var zb={getCacheForType:function(r){var i=yn(fn),o=i.data.get(r);return o===void 0&&(o=r(),i.data.set(r,o)),o},cacheSignal:function(){return yn(fn).controller.signal}},Rb=typeof WeakMap=="function"?WeakMap:Map,Ot=0,Vt=null,St=null,Et=0,Bt=0,Yr=null,zl=!1,Po=!1,qh=!1,$i=0,mn=0,Rl=0,_s=0,Uh=0,Wr=0,Go=0,pc=null,Nr=null,Hh=!1,J0=0,L4=0,ed=1/0,td=null,Ol=null,In=0,Il=null,Vo=null,Fi=0,$h=0,Fh=null,B4=null,gc=0,Ph=null;function Kr(){return(Ot&2)!==0&&Et!==0?Et&-Et:Z.T!==null?Xh():ku()}function q4(){if(Wr===0)if((Et&536870912)===0||kt){var r=fi;fi<<=1,(fi&3932160)===0&&(fi=262144),Wr=r}else Wr=536870912;return r=Gr.current,r!==null&&(r.flags|=32),Wr}function Mr(r,i,o){(r===Vt&&(Bt===2||Bt===9)||r.cancelPendingCommit!==null)&&(Yo(r,0),_l(r,Et,Wr,!1)),al(r,o),((Ot&2)===0||r!==Vt)&&(r===Vt&&((Ot&2)===0&&(_s|=o),mn===4&&_l(r,Et,Wr,!1)),ni(r))}function U4(r,i,o){if((Ot&6)!==0)throw Error(a(327));var d=!o&&(i&127)===0&&(i&r.expiredLanes)===0||en(r,i),g=d?_b(r,i):Vh(r,i,!0),v=d;do{if(g===0){Po&&!d&&_l(r,i,0,!1);break}else{if(o=r.current.alternate,v&&!Ob(o)){g=Vh(r,i,!1),v=!1;continue}if(g===2){if(v=i,r.errorRecoveryDisabledLanes&v)var j=0;else j=r.pendingLanes&-536870913,j=j!==0?j:j&536870912?536870912:0;if(j!==0){i=j;e:{var L=r;g=pc;var Q=L.current.memoizedState.isDehydrated;if(Q&&(Yo(L,j).flags|=256),j=Vh(L,j,!1),j!==2){if(qh&&!Q){L.errorRecoveryDisabledLanes|=v,_s|=v,g=4;break e}v=Nr,Nr=g,v!==null&&(Nr===null?Nr=v:Nr.push.apply(Nr,v))}g=j}if(v=!1,g!==2)continue}}if(g===1){Yo(r,0),_l(r,i,0,!0);break}e:{switch(d=r,v=g,v){case 0:case 1:throw Error(a(345));case 4:if((i&4194048)!==i)break;case 6:_l(d,i,Wr,!zl);break e;case 2:Nr=null;break;case 3:case 5:break;default:throw Error(a(329))}if((i&62914560)===i&&(g=J0+300-Zt(),10<g)){if(_l(d,i,Wr,!zl),wa(d,0,!0)!==0)break e;Fi=i,d.timeoutHandle=yy(H4.bind(null,d,o,Nr,td,Hh,i,Wr,_s,Go,zl,v,"Throttled",-0,0),g);break e}H4(d,o,Nr,td,Hh,i,Wr,_s,Go,zl,v,null,-0,0)}}break}while(!0);ni(r)}function H4(r,i,o,d,g,v,j,L,Q,ce,xe,je,fe,ge){if(r.timeoutHandle=-1,je=i.subtreeFlags,je&8192||(je&16785408)===16785408){je={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:wn},R4(i,v,je);var Xe=(v&62914560)===v?J0-Zt():(v&4194048)===v?L4-Zt():0;if(Xe=v7(je,Xe),Xe!==null){Fi=v,r.cancelPendingCommit=Xe(K4.bind(null,r,i,v,o,d,g,j,L,Q,xe,je,null,fe,ge)),_l(r,v,j,!ce);return}}K4(r,i,v,o,d,g,j,L,Q)}function Ob(r){for(var i=r;;){var o=i.tag;if((o===0||o===11||o===15)&&i.flags&16384&&(o=i.updateQueue,o!==null&&(o=o.stores,o!==null)))for(var d=0;d<o.length;d++){var g=o[d],v=g.getSnapshot;g=g.value;try{if(!zn(v(),g))return!1}catch{return!1}}if(o=i.child,i.subtreeFlags&16384&&o!==null)o.return=i,i=o;else{if(i===r)break;for(;i.sibling===null;){if(i.return===null||i.return===r)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function _l(r,i,o,d){i&=~Uh,i&=~_s,r.suspendedLanes|=i,r.pingedLanes&=~i,d&&(r.warmLanes|=i),d=r.expirationTimes;for(var g=i;0<g;){var v=31-bt(g),j=1<<v;d[v]=-1,g&=~j}o!==0&&bu(r,o,i)}function nd(){return(Ot&6)===0?(yc(0),!1):!0}function Gh(){if(St!==null){if(Bt===0)var r=St.return;else r=St,jr=Ni=null,sh(r),Ri=null,Tl=0,r=St;for(;r!==null;)v4(r.alternate,r),r=r.return;St=null}}function Yo(r,i){var o=r.timeoutHandle;o!==-1&&(r.timeoutHandle=-1,e7(o)),o=r.cancelPendingCommit,o!==null&&(r.cancelPendingCommit=null,o()),Fi=0,Gh(),Vt=r,St=o=Ma(r.current,null),Et=i,Bt=0,Yr=null,zl=!1,Po=en(r,i),qh=!1,Go=Wr=Uh=_s=Rl=mn=0,Nr=pc=null,Hh=!1,(i&8)!==0&&(i|=i&32);var d=r.entangledLanes;if(d!==0)for(r=r.entanglements,d&=i;0<d;){var g=31-bt(d),v=1<<g;i|=r[g],d&=~v}return $i=i,Mo(),o}function $4(r,i){gt=null,Z.H=sc,i===On||i===Cr?(i=O0(),Bt=3):i===nc?(i=O0(),Bt=4):Bt=i===Sh?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,Yr=i,St===null&&(mn=1,G0(r,kr(i,r.current)))}function F4(){var r=Gr.current;return r===null?!0:(Et&4194048)===Et?ma===null:(Et&62914560)===Et||(Et&536870912)!==0?r===ma:!1}function P4(){var r=Z.H;return Z.H=sc,r===null?sc:r}function G4(){var r=Z.A;return Z.A=zb,r}function rd(){mn=4,zl||(Et&4194048)!==Et&&Gr.current!==null||(Po=!0),(Rl&134217727)===0&&(_s&134217727)===0||Vt===null||_l(Vt,Et,Wr,!1)}function Vh(r,i,o){var d=Ot;Ot|=2;var g=P4(),v=G4();(Vt!==r||Et!==i)&&(td=null,Yo(r,i)),i=!1;var j=mn;e:do try{if(Bt!==0&&St!==null){var L=St,Q=Yr;switch(Bt){case 8:Gh(),j=6;break e;case 3:case 2:case 9:case 6:Gr.current===null&&(i=!0);var ce=Bt;if(Bt=0,Yr=null,Wo(r,L,Q,ce),o&&Po){j=0;break e}break;default:ce=Bt,Bt=0,Yr=null,Wo(r,L,Q,ce)}}Ib(),j=mn;break}catch(xe){$4(r,xe)}while(!0);return i&&r.shellSuspendCounter++,jr=Ni=null,Ot=d,Z.H=g,Z.A=v,St===null&&(Vt=null,Et=0,Mo()),j}function Ib(){for(;St!==null;)V4(St)}function _b(r,i){var o=Ot;Ot|=2;var d=P4(),g=G4();Vt!==r||Et!==i?(td=null,ed=Zt()+500,Yo(r,i)):Po=en(r,i);e:do try{if(Bt!==0&&St!==null){i=St;var v=Yr;t:switch(Bt){case 1:Bt=0,Yr=null,Wo(r,i,v,1);break;case 2:case 9:if(R0(v)){Bt=0,Yr=null,Y4(i);break}i=function(){Bt!==2&&Bt!==9||Vt!==r||(Bt=7),ni(r)},v.then(i,i);break e;case 3:Bt=7;break e;case 4:Bt=5;break e;case 7:R0(v)?(Bt=0,Yr=null,Y4(i)):(Bt=0,Yr=null,Wo(r,i,v,7));break;case 5:var j=null;switch(St.tag){case 26:j=St.memoizedState;case 5:case 27:var L=St;if(j?zy(j):L.stateNode.complete){Bt=0,Yr=null;var Q=L.sibling;if(Q!==null)St=Q;else{var ce=L.return;ce!==null?(St=ce,ad(ce)):St=null}break t}}Bt=0,Yr=null,Wo(r,i,v,5);break;case 6:Bt=0,Yr=null,Wo(r,i,v,6);break;case 8:Gh(),mn=6;break e;default:throw Error(a(462))}}Lb();break}catch(xe){$4(r,xe)}while(!0);return jr=Ni=null,Z.H=d,Z.A=g,Ot=o,St!==null?0:(Vt=null,Et=0,Mo(),mn)}function Lb(){for(;St!==null&&!Vn();)V4(St)}function V4(r){var i=g4(r.alternate,r,$i);r.memoizedProps=r.pendingProps,i===null?ad(r):St=i}function Y4(r){var i=r,o=i.alternate;switch(i.tag){case 15:case 0:i=c4(o,i,i.pendingProps,i.type,void 0,Et);break;case 11:i=c4(o,i,i.pendingProps,i.type.render,i.ref,Et);break;case 5:sh(i);default:v4(o,i),i=St=A0(i,$i),i=g4(o,i,$i)}r.memoizedProps=r.pendingProps,i===null?ad(r):St=i}function Wo(r,i,o,d){jr=Ni=null,sh(i),Ri=null,Tl=0;var g=i.return;try{if(Cb(r,g,i,o,Et)){mn=1,G0(r,kr(o,r.current)),St=null;return}}catch(v){if(g!==null)throw St=g,v;mn=1,G0(r,kr(o,r.current)),St=null;return}i.flags&32768?(kt||d===1?r=!0:Po||(Et&536870912)!==0?r=!1:(zl=r=!0,(d===2||d===9||d===3||d===6)&&(d=Gr.current,d!==null&&d.tag===13&&(d.flags|=16384))),W4(i,r)):ad(i)}function ad(r){var i=r;do{if((i.flags&32768)!==0){W4(i,zl);return}r=i.return;var o=Eb(i.alternate,i,$i);if(o!==null){St=o;return}if(i=i.sibling,i!==null){St=i;return}St=i=r}while(i!==null);mn===0&&(mn=5)}function W4(r,i){do{var o=Nb(r.alternate,r);if(o!==null){o.flags&=32767,St=o;return}if(o=r.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!i&&(r=r.sibling,r!==null)){St=r;return}St=r=o}while(r!==null);mn=6,St=null}function K4(r,i,o,d,g,v,j,L,Q){r.cancelPendingCommit=null;do id();while(In!==0);if((Ot&6)!==0)throw Error(a(327));if(i!==null){if(i===r.current)throw Error(a(177));if(v=i.lanes|i.childLanes,v|=Uu,is(r,o,v,j,L,Q),r===Vt&&(St=Vt=null,Et=0),Vo=i,Il=r,Fi=o,$h=v,Fh=g,B4=d,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,Hb(ie,function(){return ey(),null})):(r.callbackNode=null,r.callbackPriority=0),d=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||d){d=Z.T,Z.T=null,g=me.p,me.p=2,j=Ot,Ot|=4;try{Mb(r,i,o)}finally{Ot=j,me.p=g,Z.T=d}}In=1,X4(),Z4(),Q4()}}function X4(){if(In===1){In=0;var r=Il,i=Vo,o=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||o){o=Z.T,Z.T=null;var d=me.p;me.p=2;var g=Ot;Ot|=4;try{M4(i,r);var v=am,j=w0(r.containerInfo),L=v.focusedElem,Q=v.selectionRange;if(j!==L&&L&&L.ownerDocument&&ko(L.ownerDocument.documentElement,L)){if(Q!==null&&Fn(L)){var ce=Q.start,xe=Q.end;if(xe===void 0&&(xe=ce),"selectionStart"in L)L.selectionStart=ce,L.selectionEnd=Math.min(xe,L.value.length);else{var je=L.ownerDocument||document,fe=je&&je.defaultView||window;if(fe.getSelection){var ge=fe.getSelection(),Xe=L.textContent.length,ct=Math.min(Q.start,Xe),Gt=Q.end===void 0?ct:Math.min(Q.end,Xe);!ge.extend&&ct>Gt&&(j=Gt,Gt=ct,ct=j);var le=wo(L,ct),re=wo(L,Gt);if(le&&re&&(ge.rangeCount!==1||ge.anchorNode!==le.node||ge.anchorOffset!==le.offset||ge.focusNode!==re.node||ge.focusOffset!==re.offset)){var ue=je.createRange();ue.setStart(le.node,le.offset),ge.removeAllRanges(),ct>Gt?(ge.addRange(ue),ge.extend(re.node,re.offset)):(ue.setEnd(re.node,re.offset),ge.addRange(ue))}}}}for(je=[],ge=L;ge=ge.parentNode;)ge.nodeType===1&&je.push({element:ge,left:ge.scrollLeft,top:ge.scrollTop});for(typeof L.focus=="function"&&L.focus(),L=0;L<je.length;L++){var Se=je[L];Se.element.scrollLeft=Se.left,Se.element.scrollTop=Se.top}}yd=!!rm,am=rm=null}finally{Ot=g,me.p=d,Z.T=o}}r.current=i,In=2}}function Z4(){if(In===2){In=0;var r=Il,i=Vo,o=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||o){o=Z.T,Z.T=null;var d=me.p;me.p=2;var g=Ot;Ot|=4;try{C4(r,i.alternate,i)}finally{Ot=g,me.p=d,Z.T=o}}In=3}}function Q4(){if(In===4||In===3){In=0,Un();var r=Il,i=Vo,o=Fi,d=B4;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?In=5:(In=0,Vo=Il=null,J4(r,r.pendingLanes));var g=r.pendingLanes;if(g===0&&(Ol=null),wu(o),i=i.stateNode,yt&&typeof yt.onCommitFiberRoot=="function")try{yt.onCommitFiberRoot(Tt,i,void 0,(i.current.flags&128)===128)}catch{}if(d!==null){i=Z.T,g=me.p,me.p=2,Z.T=null;try{for(var v=r.onRecoverableError,j=0;j<d.length;j++){var L=d[j];v(L.value,{componentStack:L.stack})}}finally{Z.T=i,me.p=g}}(Fi&3)!==0&&id(),ni(r),g=r.pendingLanes,(o&261930)!==0&&(g&42)!==0?r===Ph?gc++:(gc=0,Ph=r):gc=0,yc(0)}}function J4(r,i){(r.pooledCacheLanes&=i)===0&&(i=r.pooledCache,i!=null&&(r.pooledCache=null,Da(i)))}function id(){return X4(),Z4(),Q4(),ey()}function ey(){if(In!==5)return!1;var r=Il,i=$h;$h=0;var o=wu(Fi),d=Z.T,g=me.p;try{me.p=32>o?32:o,Z.T=null,o=Fh,Fh=null;var v=Il,j=Fi;if(In=0,Vo=Il=null,Fi=0,(Ot&6)!==0)throw Error(a(331));var L=Ot;if(Ot|=4,I4(v.current),z4(v,v.current,j,o),Ot=L,yc(0,!1),yt&&typeof yt.onPostCommitFiberRoot=="function")try{yt.onPostCommitFiberRoot(Tt,v)}catch{}return!0}finally{me.p=g,Z.T=d,J4(r,i)}}function ty(r,i,o){i=kr(o,i),i=kh(r.stateNode,i,2),r=Re(r,i,2),r!==null&&(al(r,2),ni(r))}function qt(r,i,o){if(r.tag===3)ty(r,r,o);else for(;i!==null;){if(i.tag===3){ty(i,r,o);break}else if(i.tag===1){var d=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(Ol===null||!Ol.has(d))){r=kr(o,r),o=n4(2),d=Re(i,o,2),d!==null&&(r4(o,d,i,r),al(d,2),ni(d));break}}i=i.return}}function Yh(r,i,o){var d=r.pingCache;if(d===null){d=r.pingCache=new Rb;var g=new Set;d.set(i,g)}else g=d.get(i),g===void 0&&(g=new Set,d.set(i,g));g.has(o)||(qh=!0,g.add(o),r=Bb.bind(null,r,i,o),i.then(r,r))}function Bb(r,i,o){var d=r.pingCache;d!==null&&d.delete(i),r.pingedLanes|=r.suspendedLanes&o,r.warmLanes&=~o,Vt===r&&(Et&o)===o&&(mn===4||mn===3&&(Et&62914560)===Et&&300>Zt()-J0?(Ot&2)===0&&Yo(r,0):Uh|=o,Go===Et&&(Go=0)),ni(r)}function ny(r,i){i===0&&(i=tn()),r=Ti(r,i),r!==null&&(al(r,i),ni(r))}function qb(r){var i=r.memoizedState,o=0;i!==null&&(o=i.retryLane),ny(r,o)}function Ub(r,i){var o=0;switch(r.tag){case 31:case 13:var d=r.stateNode,g=r.memoizedState;g!==null&&(o=g.retryLane);break;case 19:d=r.stateNode;break;case 22:d=r.stateNode._retryCache;break;default:throw Error(a(314))}d!==null&&d.delete(i),ny(r,o)}function Hb(r,i){return Xt(r,i)}var ld=null,Ko=null,Wh=!1,sd=!1,Kh=!1,Ll=0;function ni(r){r!==Ko&&r.next===null&&(Ko===null?ld=Ko=r:Ko=Ko.next=r),sd=!0,Wh||(Wh=!0,Fb())}function yc(r,i){if(!Kh&&sd){Kh=!0;do for(var o=!1,d=ld;d!==null;){if(r!==0){var g=d.pendingLanes;if(g===0)var v=0;else{var j=d.suspendedLanes,L=d.pingedLanes;v=(1<<31-bt(42|r)+1)-1,v&=g&~(j&~L),v=v&201326741?v&201326741|1:v?v|2:0}v!==0&&(o=!0,ly(d,v))}else v=Et,v=wa(d,d===Vt?v:0,d.cancelPendingCommit!==null||d.timeoutHandle!==-1),(v&3)===0||en(d,v)||(o=!0,ly(d,v));d=d.next}while(o);Kh=!1}}function $b(){ry()}function ry(){sd=Wh=!1;var r=0;Ll!==0&&Jb()&&(r=Ll);for(var i=Zt(),o=null,d=ld;d!==null;){var g=d.next,v=ay(d,i);v===0?(d.next=null,o===null?ld=g:o.next=g,g===null&&(Ko=o)):(o=d,(r!==0||(v&3)!==0)&&(sd=!0)),d=g}In!==0&&In!==5||yc(r),Ll!==0&&(Ll=0)}function ay(r,i){for(var o=r.suspendedLanes,d=r.pingedLanes,g=r.expirationTimes,v=r.pendingLanes&-62914561;0<v;){var j=31-bt(v),L=1<<j,Q=g[j];Q===-1?((L&o)===0||(L&d)!==0)&&(g[j]=rl(L,i)):Q<=i&&(r.expiredLanes|=L),v&=~L}if(i=Vt,o=Et,o=wa(r,r===i?o:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),d=r.callbackNode,o===0||r===i&&(Bt===2||Bt===9)||r.cancelPendingCommit!==null)return d!==null&&d!==null&&Bn(d),r.callbackNode=null,r.callbackPriority=0;if((o&3)===0||en(r,o)){if(i=o&-o,i===r.callbackPriority)return i;switch(d!==null&&Bn(d),wu(o)){case 2:case 8:o=Le;break;case 32:o=ie;break;case 268435456:o=qe;break;default:o=ie}return d=iy.bind(null,r),o=Xt(o,d),r.callbackPriority=i,r.callbackNode=o,i}return d!==null&&d!==null&&Bn(d),r.callbackPriority=2,r.callbackNode=null,2}function iy(r,i){if(In!==0&&In!==5)return r.callbackNode=null,r.callbackPriority=0,null;var o=r.callbackNode;if(id()&&r.callbackNode!==o)return null;var d=Et;return d=wa(r,r===Vt?d:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),d===0?null:(U4(r,d,i),ay(r,Zt()),r.callbackNode!=null&&r.callbackNode===o?iy.bind(null,r):null)}function ly(r,i){if(id())return null;U4(r,i,!0)}function Fb(){t7(function(){(Ot&6)!==0?Xt(ye,$b):ry()})}function Xh(){if(Ll===0){var r=jl;r===0&&(r=aa,aa<<=1,(aa&261888)===0&&(aa=256)),Ll=r}return Ll}function sy(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:$a(""+r)}function oy(r,i){var o=i.ownerDocument.createElement("input");return o.name=i.name,o.value=i.value,r.id&&o.setAttribute("form",r.id),i.parentNode.insertBefore(o,i),r=new FormData(r),o.parentNode.removeChild(o),r}function Pb(r,i,o,d,g){if(i==="submit"&&o&&o.stateNode===g){var v=sy((g[bn]||null).action),j=d.submitter;j&&(i=(i=j[bn]||null)?sy(i.formAction):j.getAttribute("formAction"),i!==null&&(v=i,j=null));var L=new Ta("action","action",null,d,g);r.push({event:L,listeners:[{instance:null,listener:function(){if(d.defaultPrevented){if(Ll!==0){var Q=j?oy(g,j):new FormData(g);gh(o,{pending:!0,data:Q,method:g.method,action:v},null,Q)}}else typeof v=="function"&&(L.preventDefault(),Q=j?oy(g,j):new FormData(g),gh(o,{pending:!0,data:Q,method:g.method,action:v},v,Q))},currentTarget:g}]})}}for(var Zh=0;Zh<Eo.length;Zh++){var Qh=Eo[Zh],Gb=Qh.toLowerCase(),Vb=Qh[0].toUpperCase()+Qh.slice(1);Hr(Gb,"on"+Vb)}Hr(k0,"onAnimationEnd"),Hr(Ao,"onAnimationIteration"),Hr(S0,"onAnimationStart"),Hr("dblclick","onDoubleClick"),Hr("focusin","onFocus"),Hr("focusout","onBlur"),Hr(Xf,"onTransitionRun"),Hr(Bu,"onTransitionStart"),Hr(j0,"onTransitionCancel"),Hr(qu,"onTransitionEnd"),qa("onMouseEnter",["mouseout","mouseover"]),qa("onMouseLeave",["mouseout","mouseover"]),qa("onPointerEnter",["pointerout","pointerover"]),qa("onPointerLeave",["pointerout","pointerover"]),Hn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Hn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Hn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Hn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Hn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Hn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var vc="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(" "),Yb=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(vc));function uy(r,i){i=(i&4)!==0;for(var o=0;o<r.length;o++){var d=r[o],g=d.event;d=d.listeners;e:{var v=void 0;if(i)for(var j=d.length-1;0<=j;j--){var L=d[j],Q=L.instance,ce=L.currentTarget;if(L=L.listener,Q!==v&&g.isPropagationStopped())break e;v=L,g.currentTarget=ce;try{v(g)}catch(xe){No(xe)}g.currentTarget=null,v=Q}else for(j=0;j<d.length;j++){if(L=d[j],Q=L.instance,ce=L.currentTarget,L=L.listener,Q!==v&&g.isPropagationStopped())break e;v=L,g.currentTarget=ce;try{v(g)}catch(xe){No(xe)}g.currentTarget=null,v=Q}}}}function jt(r,i){var o=i[_a];o===void 0&&(o=i[_a]=new Set);var d=r+"__bubble";o.has(d)||(cy(i,r,2,!1),o.add(d))}function Jh(r,i,o){var d=0;i&&(d|=4),cy(o,r,d,i)}var od="_reactListening"+Math.random().toString(36).slice(2);function em(r){if(!r[od]){r[od]=!0,h0.forEach(function(o){o!=="selectionchange"&&(Yb.has(o)||Jh(o,!1,r),Jh(o,!0,r))});var i=r.nodeType===9?r:r.ownerDocument;i===null||i[od]||(i[od]=!0,Jh("selectionchange",!1,i))}}function cy(r,i,o,d){switch(qy(i)){case 2:var g=w7;break;case 8:g=k7;break;default:g=pm}o=g.bind(null,i,o,r),g=void 0,!ds||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(g=!0),d?g!==void 0?r.addEventListener(i,o,{capture:!0,passive:g}):r.addEventListener(i,o,!0):g!==void 0?r.addEventListener(i,o,{passive:g}):r.addEventListener(i,o,!1)}function tm(r,i,o,d,g){var v=d;if((i&1)===0&&(i&2)===0&&d!==null)e:for(;;){if(d===null)return;var j=d.tag;if(j===3||j===4){var L=d.stateNode.containerInfo;if(L===g)break;if(j===4)for(j=d.return;j!==null;){var Q=j.tag;if((Q===3||Q===4)&&j.stateNode.containerInfo===g)return;j=j.return}for(;L!==null;){if(j=ia(L),j===null)return;if(Q=j.tag,Q===5||Q===6||Q===26||Q===27){d=v=j;continue e}L=L.parentNode}}d=d.return}dl(function(){var ce=v,xe=us(o),je=[];e:{var fe=C0.get(r);if(fe!==void 0){var ge=Ta,Xe=r;switch(r){case"keypress":if(hs(o)===0)break e;case"keydown":case"keyup":ge=ho;break;case"focusin":Xe="focus",ge=uo;break;case"focusout":Xe="blur",ge=uo;break;case"beforeblur":case"afterblur":ge=uo;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ge=oo;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ge=Aa;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ge=Du;break;case k0:case Ao:case S0:ge=ps;break;case qu:ge=go;break;case"scroll":case"scrollend":ge=yi;break;case"wheel":ge=x0;break;case"copy":case"cut":case"paste":ge=fo;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ge=vs;break;case"toggle":case"beforetoggle":ge=gn}var ct=(i&4)!==0,Gt=!ct&&(r==="scroll"||r==="scrollend"),le=ct?fe!==null?fe+"Capture":null:fe;ct=[];for(var re=ce,ue;re!==null;){var Se=re;if(ue=Se.stateNode,Se=Se.tag,Se!==5&&Se!==26&&Se!==27||ue===null||le===null||(Se=cs(re,le),Se!=null&&ct.push(xc(re,Se,ue))),Gt)break;re=re.return}0<ct.length&&(fe=new ge(fe,Xe,null,o,xe),je.push({event:fe,listeners:ct}))}}if((i&7)===0){e:{if(fe=r==="mouseover"||r==="pointerover",ge=r==="mouseout"||r==="pointerout",fe&&o!==qr&&(Xe=o.relatedTarget||o.fromElement)&&(ia(Xe)||Xe[_r]))break e;if((ge||fe)&&(fe=xe.window===xe?xe:(fe=xe.ownerDocument)?fe.defaultView||fe.parentWindow:window,ge?(Xe=o.relatedTarget||o.toElement,ge=ce,Xe=Xe?ia(Xe):null,Xe!==null&&(Gt=u(Xe),ct=Xe.tag,Xe!==Gt||ct!==5&&ct!==27&&ct!==6)&&(Xe=null)):(ge=null,Xe=ce),ge!==Xe)){if(ct=oo,Se="onMouseLeave",le="onMouseEnter",re="mouse",(r==="pointerout"||r==="pointerover")&&(ct=vs,Se="onPointerLeave",le="onPointerEnter",re="pointer"),Gt=ge==null?fe:mi(ge),ue=Xe==null?fe:mi(Xe),fe=new ct(Se,re+"leave",ge,o,xe),fe.target=Gt,fe.relatedTarget=ue,Se=null,ia(xe)===ce&&(ct=new ct(le,re+"enter",Xe,o,xe),ct.target=ue,ct.relatedTarget=Gt,Se=ct),Gt=Se,ge&&Xe)t:{for(ct=Wb,le=ge,re=Xe,ue=0,Se=le;Se;Se=ct(Se))ue++;Se=0;for(var at=re;at;at=ct(at))Se++;for(;0<ue-Se;)le=ct(le),ue--;for(;0<Se-ue;)re=ct(re),Se--;for(;ue--;){if(le===re||re!==null&&le===re.alternate){ct=le;break t}le=ct(le),re=ct(re)}ct=null}else ct=null;ge!==null&&dy(je,fe,ge,ct,!1),Xe!==null&&Gt!==null&&dy(je,Gt,Xe,ct,!0)}}e:{if(fe=ce?mi(ce):window,ge=fe.nodeName&&fe.nodeName.toLowerCase(),ge==="select"||ge==="input"&&fe.type==="file")var Dt=xo;else if(Ou(fe))if(ks)Dt=js;else{Dt=_u;var Je=Wf}else ge=fe.nodeName,!ge||ge.toLowerCase()!=="input"||fe.type!=="checkbox"&&fe.type!=="radio"?ce&&os(ce.elementType)&&(Dt=xo):Dt=Wa;if(Dt&&(Dt=Dt(r,ce))){vo(je,Dt,o,xe);break e}Je&&Je(r,fe,ce),r==="focusout"&&ce&&fe.type==="number"&&ce.memoizedProps.value!=null&&la(fe,"number",fe.value)}switch(Je=ce?mi(ce):window,r){case"focusin":(Ou(Je)||Je.contentEditable==="true")&&(gl=Je,So=ce,Cs=null);break;case"focusout":Cs=So=gl=null;break;case"mousedown":jo=!0;break;case"contextmenu":case"mouseup":case"dragend":jo=!1,Co(je,o,xe);break;case"selectionchange":if(Kf)break;case"keydown":case"keyup":Co(je,o,xe)}var vt;if(Ea)e:{switch(r){case"compositionstart":var Nt="onCompositionStart";break e;case"compositionend":Nt="onCompositionEnd";break e;case"compositionupdate":Nt="onCompositionUpdate";break e}Nt=void 0}else xr?pl(r,o)&&(Nt="onCompositionEnd"):r==="keydown"&&o.keyCode===229&&(Nt="onCompositionStart");Nt&&(ki&&o.locale!=="ko"&&(xr||Nt!=="onCompositionStart"?Nt==="onCompositionEnd"&&xr&&(vt=v0()):(rr=xe,Au="value"in rr?rr.value:rr.textContent,xr=!0)),Je=ud(ce,Nt),0<Je.length&&(Nt=new wi(Nt,r,null,o,xe),je.push({event:Nt,listeners:Je}),vt?Nt.data=vt:(vt=yo(o),vt!==null&&(Nt.data=vt)))),(vt=At?Gf(r,o):Vf(r,o))&&(Nt=ud(ce,"onBeforeInput"),0<Nt.length&&(Je=new wi("onBeforeInput","beforeinput",null,o,xe),je.push({event:Je,listeners:Nt}),Je.data=vt)),Pb(je,r,ce,o,xe)}uy(je,i)})}function xc(r,i,o){return{instance:r,listener:i,currentTarget:o}}function ud(r,i){for(var o=i+"Capture",d=[];r!==null;){var g=r,v=g.stateNode;if(g=g.tag,g!==5&&g!==26&&g!==27||v===null||(g=cs(r,o),g!=null&&d.unshift(xc(r,g,v)),g=cs(r,i),g!=null&&d.push(xc(r,g,v))),r.tag===3)return d;r=r.return}return[]}function Wb(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function dy(r,i,o,d,g){for(var v=i._reactName,j=[];o!==null&&o!==d;){var L=o,Q=L.alternate,ce=L.stateNode;if(L=L.tag,Q!==null&&Q===d)break;L!==5&&L!==26&&L!==27||ce===null||(Q=ce,g?(ce=cs(o,v),ce!=null&&j.unshift(xc(o,ce,Q))):g||(ce=cs(o,v),ce!=null&&j.push(xc(o,ce,Q)))),o=o.return}j.length!==0&&r.push({event:i,listeners:j})}var Kb=/\r\n?/g,Xb=/\u0000|\uFFFD/g;function fy(r){return(typeof r=="string"?r:""+r).replace(Kb,`
|
|
50
|
-
`).replace(Xb,"")}function hy(r,i){return i=fy(i),fy(r)===i}function Pt(r,i,o,d,g,v){switch(o){case"children":typeof d=="string"?i==="body"||i==="textarea"&&d===""||Ca(r,d):(typeof d=="number"||typeof d=="bigint")&&i!=="body"&&Ca(r,""+d);break;case"className":ls(r,"class",d);break;case"tabIndex":ls(r,"tabindex",d);break;case"dir":case"role":case"viewBox":case"width":case"height":ls(r,o,d);break;case"style":gi(r,d,v);break;case"data":if(i!=="object"){ls(r,"data",d);break}case"src":case"href":if(d===""&&(i!=="a"||o!=="href")){r.removeAttribute(o);break}if(d==null||typeof d=="function"||typeof d=="symbol"||typeof d=="boolean"){r.removeAttribute(o);break}d=$a(""+d),r.setAttribute(o,d);break;case"action":case"formAction":if(typeof d=="function"){r.setAttribute(o,"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 v=="function"&&(o==="formAction"?(i!=="input"&&Pt(r,i,"name",g.name,g,null),Pt(r,i,"formEncType",g.formEncType,g,null),Pt(r,i,"formMethod",g.formMethod,g,null),Pt(r,i,"formTarget",g.formTarget,g,null)):(Pt(r,i,"encType",g.encType,g,null),Pt(r,i,"method",g.method,g,null),Pt(r,i,"target",g.target,g,null)));if(d==null||typeof d=="symbol"||typeof d=="boolean"){r.removeAttribute(o);break}d=$a(""+d),r.setAttribute(o,d);break;case"onClick":d!=null&&(r.onclick=wn);break;case"onScroll":d!=null&&jt("scroll",r);break;case"onScrollEnd":d!=null&&jt("scrollend",r);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(a(61));if(o=d.__html,o!=null){if(g.children!=null)throw Error(a(60));r.innerHTML=o}}break;case"multiple":r.multiple=d&&typeof d!="function"&&typeof d!="symbol";break;case"muted":r.muted=d&&typeof d!="function"&&typeof d!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(d==null||typeof d=="function"||typeof d=="boolean"||typeof d=="symbol"){r.removeAttribute("xlink:href");break}o=$a(""+d),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":d!=null&&typeof d!="function"&&typeof d!="symbol"?r.setAttribute(o,""+d):r.removeAttribute(o);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":d&&typeof d!="function"&&typeof d!="symbol"?r.setAttribute(o,""):r.removeAttribute(o);break;case"capture":case"download":d===!0?r.setAttribute(o,""):d!==!1&&d!=null&&typeof d!="function"&&typeof d!="symbol"?r.setAttribute(o,d):r.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":d!=null&&typeof d!="function"&&typeof d!="symbol"&&!isNaN(d)&&1<=d?r.setAttribute(o,d):r.removeAttribute(o);break;case"rowSpan":case"start":d==null||typeof d=="function"||typeof d=="symbol"||isNaN(d)?r.removeAttribute(o):r.setAttribute(o,d);break;case"popover":jt("beforetoggle",r),jt("toggle",r),ol(r,"popover",d);break;case"xlinkActuate":tr(r,"http://www.w3.org/1999/xlink","xlink:actuate",d);break;case"xlinkArcrole":tr(r,"http://www.w3.org/1999/xlink","xlink:arcrole",d);break;case"xlinkRole":tr(r,"http://www.w3.org/1999/xlink","xlink:role",d);break;case"xlinkShow":tr(r,"http://www.w3.org/1999/xlink","xlink:show",d);break;case"xlinkTitle":tr(r,"http://www.w3.org/1999/xlink","xlink:title",d);break;case"xlinkType":tr(r,"http://www.w3.org/1999/xlink","xlink:type",d);break;case"xmlBase":tr(r,"http://www.w3.org/XML/1998/namespace","xml:base",d);break;case"xmlLang":tr(r,"http://www.w3.org/XML/1998/namespace","xml:lang",d);break;case"xmlSpace":tr(r,"http://www.w3.org/XML/1998/namespace","xml:space",d);break;case"is":ol(r,"is",d);break;case"innerText":case"textContent":break;default:(!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(o=io.get(o)||o,ol(r,o,d))}}function nm(r,i,o,d,g,v){switch(o){case"style":gi(r,d,v);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(a(61));if(o=d.__html,o!=null){if(g.children!=null)throw Error(a(60));r.innerHTML=o}}break;case"children":typeof d=="string"?Ca(r,d):(typeof d=="number"||typeof d=="bigint")&&Ca(r,""+d);break;case"onScroll":d!=null&&jt("scroll",r);break;case"onScrollEnd":d!=null&&jt("scrollend",r);break;case"onClick":d!=null&&(r.onclick=wn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ju.hasOwnProperty(o))e:{if(o[0]==="o"&&o[1]==="n"&&(g=o.endsWith("Capture"),i=o.slice(2,g?o.length-7:void 0),v=r[bn]||null,v=v!=null?v[o]:null,typeof v=="function"&&r.removeEventListener(i,v,g),typeof d=="function")){typeof v!="function"&&v!==null&&(o in r?r[o]=null:r.hasAttribute(o)&&r.removeAttribute(o)),r.addEventListener(i,d,g);break e}o in r?r[o]=d:d===!0?r.setAttribute(o,""):ol(r,o,d)}}}function Gn(r,i,o){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":jt("error",r),jt("load",r);var d=!1,g=!1,v;for(v in o)if(o.hasOwnProperty(v)){var j=o[v];if(j!=null)switch(v){case"src":d=!0;break;case"srcSet":g=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:Pt(r,i,v,j,o,null)}}g&&Pt(r,i,"srcSet",o.srcSet,o,null),d&&Pt(r,i,"src",o.src,o,null);return;case"input":jt("invalid",r);var L=v=j=g=null,Q=null,ce=null;for(d in o)if(o.hasOwnProperty(d)){var xe=o[d];if(xe!=null)switch(d){case"name":g=xe;break;case"type":j=xe;break;case"checked":Q=xe;break;case"defaultChecked":ce=xe;break;case"value":v=xe;break;case"defaultValue":L=xe;break;case"children":case"dangerouslySetInnerHTML":if(xe!=null)throw Error(a(137,i));break;default:Pt(r,i,d,xe,o,null)}}Br(r,v,L,Q,ce,j,g,!1);return;case"select":jt("invalid",r),d=j=v=null;for(g in o)if(o.hasOwnProperty(g)&&(L=o[g],L!=null))switch(g){case"value":v=L;break;case"defaultValue":j=L;break;case"multiple":d=L;default:Pt(r,i,g,L,o,null)}i=v,o=j,r.multiple=!!d,i!=null?pi(r,!!d,i,!1):o!=null&&pi(r,!!d,o,!0);return;case"textarea":jt("invalid",r),v=g=d=null;for(j in o)if(o.hasOwnProperty(j)&&(L=o[j],L!=null))switch(j){case"value":d=L;break;case"defaultValue":g=L;break;case"children":v=L;break;case"dangerouslySetInnerHTML":if(L!=null)throw Error(a(91));break;default:Pt(r,i,j,L,o,null)}Tu(r,d,g,v);return;case"option":for(Q in o)if(o.hasOwnProperty(Q)&&(d=o[Q],d!=null))switch(Q){case"selected":r.selected=d&&typeof d!="function"&&typeof d!="symbol";break;default:Pt(r,i,Q,d,o,null)}return;case"dialog":jt("beforetoggle",r),jt("toggle",r),jt("cancel",r),jt("close",r);break;case"iframe":case"object":jt("load",r);break;case"video":case"audio":for(d=0;d<vc.length;d++)jt(vc[d],r);break;case"image":jt("error",r),jt("load",r);break;case"details":jt("toggle",r);break;case"embed":case"source":case"link":jt("error",r),jt("load",r);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ce in o)if(o.hasOwnProperty(ce)&&(d=o[ce],d!=null))switch(ce){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:Pt(r,i,ce,d,o,null)}return;default:if(os(i)){for(xe in o)o.hasOwnProperty(xe)&&(d=o[xe],d!==void 0&&nm(r,i,xe,d,o,void 0));return}}for(L in o)o.hasOwnProperty(L)&&(d=o[L],d!=null&&Pt(r,i,L,d,o,null))}function Zb(r,i,o,d){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var g=null,v=null,j=null,L=null,Q=null,ce=null,xe=null;for(ge in o){var je=o[ge];if(o.hasOwnProperty(ge)&&je!=null)switch(ge){case"checked":break;case"value":break;case"defaultValue":Q=je;default:d.hasOwnProperty(ge)||Pt(r,i,ge,null,d,je)}}for(var fe in d){var ge=d[fe];if(je=o[fe],d.hasOwnProperty(fe)&&(ge!=null||je!=null))switch(fe){case"type":v=ge;break;case"name":g=ge;break;case"checked":ce=ge;break;case"defaultChecked":xe=ge;break;case"value":j=ge;break;case"defaultValue":L=ge;break;case"children":case"dangerouslySetInnerHTML":if(ge!=null)throw Error(a(137,i));break;default:ge!==je&&Pt(r,i,fe,ge,d,je)}}Lr(r,j,L,Q,ce,xe,v,g);return;case"select":ge=j=L=fe=null;for(v in o)if(Q=o[v],o.hasOwnProperty(v)&&Q!=null)switch(v){case"value":break;case"multiple":ge=Q;default:d.hasOwnProperty(v)||Pt(r,i,v,null,d,Q)}for(g in d)if(v=d[g],Q=o[g],d.hasOwnProperty(g)&&(v!=null||Q!=null))switch(g){case"value":fe=v;break;case"defaultValue":L=v;break;case"multiple":j=v;default:v!==Q&&Pt(r,i,g,v,d,Q)}i=L,o=j,d=ge,fe!=null?pi(r,!!o,fe,!1):!!d!=!!o&&(i!=null?pi(r,!!o,i,!0):pi(r,!!o,o?[]:"",!1));return;case"textarea":ge=fe=null;for(L in o)if(g=o[L],o.hasOwnProperty(L)&&g!=null&&!d.hasOwnProperty(L))switch(L){case"value":break;case"children":break;default:Pt(r,i,L,null,d,g)}for(j in d)if(g=d[j],v=o[j],d.hasOwnProperty(j)&&(g!=null||v!=null))switch(j){case"value":fe=g;break;case"defaultValue":ge=g;break;case"children":break;case"dangerouslySetInnerHTML":if(g!=null)throw Error(a(91));break;default:g!==v&&Pt(r,i,j,g,d,v)}ul(r,fe,ge);return;case"option":for(var Xe in o)if(fe=o[Xe],o.hasOwnProperty(Xe)&&fe!=null&&!d.hasOwnProperty(Xe))switch(Xe){case"selected":r.selected=!1;break;default:Pt(r,i,Xe,null,d,fe)}for(Q in d)if(fe=d[Q],ge=o[Q],d.hasOwnProperty(Q)&&fe!==ge&&(fe!=null||ge!=null))switch(Q){case"selected":r.selected=fe&&typeof fe!="function"&&typeof fe!="symbol";break;default:Pt(r,i,Q,fe,d,ge)}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 ct in o)fe=o[ct],o.hasOwnProperty(ct)&&fe!=null&&!d.hasOwnProperty(ct)&&Pt(r,i,ct,null,d,fe);for(ce in d)if(fe=d[ce],ge=o[ce],d.hasOwnProperty(ce)&&fe!==ge&&(fe!=null||ge!=null))switch(ce){case"children":case"dangerouslySetInnerHTML":if(fe!=null)throw Error(a(137,i));break;default:Pt(r,i,ce,fe,d,ge)}return;default:if(os(i)){for(var Gt in o)fe=o[Gt],o.hasOwnProperty(Gt)&&fe!==void 0&&!d.hasOwnProperty(Gt)&&nm(r,i,Gt,void 0,d,fe);for(xe in d)fe=d[xe],ge=o[xe],!d.hasOwnProperty(xe)||fe===ge||fe===void 0&&ge===void 0||nm(r,i,xe,fe,d,ge);return}}for(var le in o)fe=o[le],o.hasOwnProperty(le)&&fe!=null&&!d.hasOwnProperty(le)&&Pt(r,i,le,null,d,fe);for(je in d)fe=d[je],ge=o[je],!d.hasOwnProperty(je)||fe===ge||fe==null&&ge==null||Pt(r,i,je,fe,d,ge)}function my(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Qb(){if(typeof performance.getEntriesByType=="function"){for(var r=0,i=0,o=performance.getEntriesByType("resource"),d=0;d<o.length;d++){var g=o[d],v=g.transferSize,j=g.initiatorType,L=g.duration;if(v&&L&&my(j)){for(j=0,L=g.responseEnd,d+=1;d<o.length;d++){var Q=o[d],ce=Q.startTime;if(ce>L)break;var xe=Q.transferSize,je=Q.initiatorType;xe&&my(je)&&(Q=Q.responseEnd,j+=xe*(Q<L?1:(L-ce)/(Q-ce)))}if(--d,i+=8*(v+j)/(g.duration/1e3),r++,10<r)break}}if(0<r)return i/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r=="number")?r:5}var rm=null,am=null;function cd(r){return r.nodeType===9?r:r.ownerDocument}function py(r){switch(r){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function gy(r,i){if(r===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&i==="foreignObject"?0:r}function im(r,i){return r==="textarea"||r==="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 lm=null;function Jb(){var r=window.event;return r&&r.type==="popstate"?r===lm?!1:(lm=r,!0):(lm=null,!1)}var yy=typeof setTimeout=="function"?setTimeout:void 0,e7=typeof clearTimeout=="function"?clearTimeout:void 0,vy=typeof Promise=="function"?Promise:void 0,t7=typeof queueMicrotask=="function"?queueMicrotask:typeof vy<"u"?function(r){return vy.resolve(null).then(r).catch(n7)}:yy;function n7(r){setTimeout(function(){throw r})}function Bl(r){return r==="head"}function xy(r,i){var o=i,d=0;do{var g=o.nextSibling;if(r.removeChild(o),g&&g.nodeType===8)if(o=g.data,o==="/$"||o==="/&"){if(d===0){r.removeChild(g),Jo(i);return}d--}else if(o==="$"||o==="$?"||o==="$~"||o==="$!"||o==="&")d++;else if(o==="html")bc(r.ownerDocument.documentElement);else if(o==="head"){o=r.ownerDocument.head,bc(o);for(var v=o.firstChild;v;){var j=v.nextSibling,L=v.nodeName;v[La]||L==="SCRIPT"||L==="STYLE"||L==="LINK"&&v.rel.toLowerCase()==="stylesheet"||o.removeChild(v),v=j}}else o==="body"&&bc(r.ownerDocument.body);o=g}while(o);Jo(i)}function by(r,i){var o=r;r=0;do{var d=o.nextSibling;if(o.nodeType===1?i?(o._stashedDisplay=o.style.display,o.style.display="none"):(o.style.display=o._stashedDisplay||"",o.getAttribute("style")===""&&o.removeAttribute("style")):o.nodeType===3&&(i?(o._stashedText=o.nodeValue,o.nodeValue=""):o.nodeValue=o._stashedText||""),d&&d.nodeType===8)if(o=d.data,o==="/$"){if(r===0)break;r--}else o!=="$"&&o!=="$?"&&o!=="$~"&&o!=="$!"||r++;o=d}while(o)}function sm(r){var i=r.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var o=i;switch(i=i.nextSibling,o.nodeName){case"HTML":case"HEAD":case"BODY":sm(o),Su(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}r.removeChild(o)}}function r7(r,i,o,d){for(;r.nodeType===1;){var g=o;if(r.nodeName.toLowerCase()!==i.toLowerCase()){if(!d&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(d){if(!r[La])switch(i){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(v=r.getAttribute("rel"),v==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(v!==g.rel||r.getAttribute("href")!==(g.href==null||g.href===""?null:g.href)||r.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin)||r.getAttribute("title")!==(g.title==null?null:g.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(v=r.getAttribute("src"),(v!==(g.src==null?null:g.src)||r.getAttribute("type")!==(g.type==null?null:g.type)||r.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin))&&v&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(i==="input"&&r.type==="hidden"){var v=g.name==null?null:""+g.name;if(g.type==="hidden"&&r.getAttribute("name")===v)return r}else return r;if(r=pa(r.nextSibling),r===null)break}return null}function a7(r,i,o){if(i==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!o||(r=pa(r.nextSibling),r===null))return null;return r}function wy(r,i){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!i||(r=pa(r.nextSibling),r===null))return null;return r}function om(r){return r.data==="$?"||r.data==="$~"}function um(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function i7(r,i){var o=r.ownerDocument;if(r.data==="$~")r._reactRetry=i;else if(r.data!=="$?"||o.readyState!=="loading")i();else{var d=function(){i(),o.removeEventListener("DOMContentLoaded",d)};o.addEventListener("DOMContentLoaded",d),r._reactRetry=d}}function pa(r){for(;r!=null;r=r.nextSibling){var i=r.nodeType;if(i===1||i===3)break;if(i===8){if(i=r.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return r}var cm=null;function ky(r){r=r.nextSibling;for(var i=0;r;){if(r.nodeType===8){var o=r.data;if(o==="/$"||o==="/&"){if(i===0)return pa(r.nextSibling);i--}else o!=="$"&&o!=="$!"&&o!=="$?"&&o!=="$~"&&o!=="&"||i++}r=r.nextSibling}return null}function Sy(r){r=r.previousSibling;for(var i=0;r;){if(r.nodeType===8){var o=r.data;if(o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"){if(i===0)return r;i--}else o!=="/$"&&o!=="/&"||i++}r=r.previousSibling}return null}function jy(r,i,o){switch(i=cd(o),r){case"html":if(r=i.documentElement,!r)throw Error(a(452));return r;case"head":if(r=i.head,!r)throw Error(a(453));return r;case"body":if(r=i.body,!r)throw Error(a(454));return r;default:throw Error(a(451))}}function bc(r){for(var i=r.attributes;i.length;)r.removeAttributeNode(i[0]);Su(r)}var ga=new Map,Cy=new Set;function dd(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var Pi=me.d;me.d={f:l7,r:s7,D:o7,C:u7,L:c7,m:d7,X:h7,S:f7,M:m7};function l7(){var r=Pi.f(),i=nd();return r||i}function s7(r){var i=Ba(r);i!==null&&i.tag===5&&i.type==="form"?$g(i):Pi.r(r)}var Xo=typeof document>"u"?null:document;function Ty(r,i,o){var d=Xo;if(d&&typeof i=="string"&&i){var g=nr(i);g='link[rel="'+r+'"][href="'+g+'"]',typeof o=="string"&&(g+='[crossorigin="'+o+'"]'),Cy.has(g)||(Cy.add(g),r={rel:r,crossOrigin:o,href:i},d.querySelector(g)===null&&(i=d.createElement("link"),Gn(i,"link",r),nn(i),d.head.appendChild(i)))}}function o7(r){Pi.D(r),Ty("dns-prefetch",r,null)}function u7(r,i){Pi.C(r,i),Ty("preconnect",r,i)}function c7(r,i,o){Pi.L(r,i,o);var d=Xo;if(d&&r&&i){var g='link[rel="preload"][as="'+nr(i)+'"]';i==="image"&&o&&o.imageSrcSet?(g+='[imagesrcset="'+nr(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(g+='[imagesizes="'+nr(o.imageSizes)+'"]')):g+='[href="'+nr(r)+'"]';var v=g;switch(i){case"style":v=Zo(r);break;case"script":v=Qo(r)}ga.has(v)||(r=y({rel:"preload",href:i==="image"&&o&&o.imageSrcSet?void 0:r,as:i},o),ga.set(v,r),d.querySelector(g)!==null||i==="style"&&d.querySelector(wc(v))||i==="script"&&d.querySelector(kc(v))||(i=d.createElement("link"),Gn(i,"link",r),nn(i),d.head.appendChild(i)))}}function d7(r,i){Pi.m(r,i);var o=Xo;if(o&&r){var d=i&&typeof i.as=="string"?i.as:"script",g='link[rel="modulepreload"][as="'+nr(d)+'"][href="'+nr(r)+'"]',v=g;switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":v=Qo(r)}if(!ga.has(v)&&(r=y({rel:"modulepreload",href:r},i),ga.set(v,r),o.querySelector(g)===null)){switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(kc(v)))return}d=o.createElement("link"),Gn(d,"link",r),nn(d),o.head.appendChild(d)}}}function f7(r,i,o){Pi.S(r,i,o);var d=Xo;if(d&&r){var g=Sa(d).hoistableStyles,v=Zo(r);i=i||"default";var j=g.get(v);if(!j){var L={loading:0,preload:null};if(j=d.querySelector(wc(v)))L.loading=5;else{r=y({rel:"stylesheet",href:r,"data-precedence":i},o),(o=ga.get(v))&&dm(r,o);var Q=j=d.createElement("link");nn(Q),Gn(Q,"link",r),Q._p=new Promise(function(ce,xe){Q.onload=ce,Q.onerror=xe}),Q.addEventListener("load",function(){L.loading|=1}),Q.addEventListener("error",function(){L.loading|=2}),L.loading|=4,fd(j,i,d)}j={type:"stylesheet",instance:j,count:1,state:L},g.set(v,j)}}}function h7(r,i){Pi.X(r,i);var o=Xo;if(o&&r){var d=Sa(o).hoistableScripts,g=Qo(r),v=d.get(g);v||(v=o.querySelector(kc(g)),v||(r=y({src:r,async:!0},i),(i=ga.get(g))&&fm(r,i),v=o.createElement("script"),nn(v),Gn(v,"link",r),o.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},d.set(g,v))}}function m7(r,i){Pi.M(r,i);var o=Xo;if(o&&r){var d=Sa(o).hoistableScripts,g=Qo(r),v=d.get(g);v||(v=o.querySelector(kc(g)),v||(r=y({src:r,async:!0,type:"module"},i),(i=ga.get(g))&&fm(r,i),v=o.createElement("script"),nn(v),Gn(v,"link",r),o.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},d.set(g,v))}}function Ay(r,i,o,d){var g=(g=Ae.current)?dd(g):null;if(!g)throw Error(a(446));switch(r){case"meta":case"title":return null;case"style":return typeof o.precedence=="string"&&typeof o.href=="string"?(i=Zo(o.href),o=Sa(g).hoistableStyles,d=o.get(i),d||(d={type:"style",instance:null,count:0,state:null},o.set(i,d)),d):{type:"void",instance:null,count:0,state:null};case"link":if(o.rel==="stylesheet"&&typeof o.href=="string"&&typeof o.precedence=="string"){r=Zo(o.href);var v=Sa(g).hoistableStyles,j=v.get(r);if(j||(g=g.ownerDocument||g,j={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},v.set(r,j),(v=g.querySelector(wc(r)))&&!v._p&&(j.instance=v,j.state.loading=5),ga.has(r)||(o={rel:"preload",as:"style",href:o.href,crossOrigin:o.crossOrigin,integrity:o.integrity,media:o.media,hrefLang:o.hrefLang,referrerPolicy:o.referrerPolicy},ga.set(r,o),v||p7(g,r,o,j.state))),i&&d===null)throw Error(a(528,""));return j}if(i&&d!==null)throw Error(a(529,""));return null;case"script":return i=o.async,o=o.src,typeof o=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=Qo(o),o=Sa(g).hoistableScripts,d=o.get(i),d||(d={type:"script",instance:null,count:0,state:null},o.set(i,d)),d):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,r))}}function Zo(r){return'href="'+nr(r)+'"'}function wc(r){return'link[rel="stylesheet"]['+r+"]"}function Ey(r){return y({},r,{"data-precedence":r.precedence,precedence:null})}function p7(r,i,o,d){r.querySelector('link[rel="preload"][as="style"]['+i+"]")?d.loading=1:(i=r.createElement("link"),d.preload=i,i.addEventListener("load",function(){return d.loading|=1}),i.addEventListener("error",function(){return d.loading|=2}),Gn(i,"link",o),nn(i),r.head.appendChild(i))}function Qo(r){return'[src="'+nr(r)+'"]'}function kc(r){return"script[async]"+r}function Ny(r,i,o){if(i.count++,i.instance===null)switch(i.type){case"style":var d=r.querySelector('style[data-href~="'+nr(o.href)+'"]');if(d)return i.instance=d,nn(d),d;var g=y({},o,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return d=(r.ownerDocument||r).createElement("style"),nn(d),Gn(d,"style",g),fd(d,o.precedence,r),i.instance=d;case"stylesheet":g=Zo(o.href);var v=r.querySelector(wc(g));if(v)return i.state.loading|=4,i.instance=v,nn(v),v;d=Ey(o),(g=ga.get(g))&&dm(d,g),v=(r.ownerDocument||r).createElement("link"),nn(v);var j=v;return j._p=new Promise(function(L,Q){j.onload=L,j.onerror=Q}),Gn(v,"link",d),i.state.loading|=4,fd(v,o.precedence,r),i.instance=v;case"script":return v=Qo(o.src),(g=r.querySelector(kc(v)))?(i.instance=g,nn(g),g):(d=o,(g=ga.get(v))&&(d=y({},o),fm(d,g)),r=r.ownerDocument||r,g=r.createElement("script"),nn(g),Gn(g,"link",d),r.head.appendChild(g),i.instance=g);case"void":return null;default:throw Error(a(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(d=i.instance,i.state.loading|=4,fd(d,o.precedence,r));return i.instance}function fd(r,i,o){for(var d=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),g=d.length?d[d.length-1]:null,v=g,j=0;j<d.length;j++){var L=d[j];if(L.dataset.precedence===i)v=L;else if(v!==g)break}v?v.parentNode.insertBefore(r,v.nextSibling):(i=o.nodeType===9?o.head:o,i.insertBefore(r,i.firstChild))}function dm(r,i){r.crossOrigin==null&&(r.crossOrigin=i.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=i.referrerPolicy),r.title==null&&(r.title=i.title)}function fm(r,i){r.crossOrigin==null&&(r.crossOrigin=i.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=i.referrerPolicy),r.integrity==null&&(r.integrity=i.integrity)}var hd=null;function My(r,i,o){if(hd===null){var d=new Map,g=hd=new Map;g.set(o,d)}else g=hd,d=g.get(o),d||(d=new Map,g.set(o,d));if(d.has(r))return d;for(d.set(r,null),o=o.getElementsByTagName(r),g=0;g<o.length;g++){var v=o[g];if(!(v[La]||v[Mn]||r==="link"&&v.getAttribute("rel")==="stylesheet")&&v.namespaceURI!=="http://www.w3.org/2000/svg"){var j=v.getAttribute(i)||"";j=r+j;var L=d.get(j);L?L.push(v):d.set(j,[v])}}return d}function Dy(r,i,o){r=r.ownerDocument||r,r.head.insertBefore(o,i==="title"?r.querySelector("head > title"):null)}function g7(r,i,o){if(o===1||i.itemProp!=null)return!1;switch(r){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 r=i.disabled,typeof i.precedence=="string"&&r==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 zy(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function y7(r,i,o,d){if(o.type==="stylesheet"&&(typeof d.media!="string"||matchMedia(d.media).matches!==!1)&&(o.state.loading&4)===0){if(o.instance===null){var g=Zo(d.href),v=i.querySelector(wc(g));if(v){i=v._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(r.count++,r=md.bind(r),i.then(r,r)),o.state.loading|=4,o.instance=v,nn(v);return}v=i.ownerDocument||i,d=Ey(d),(g=ga.get(g))&&dm(d,g),v=v.createElement("link"),nn(v);var j=v;j._p=new Promise(function(L,Q){j.onload=L,j.onerror=Q}),Gn(v,"link",d),o.instance=v}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(o,i),(i=o.state.preload)&&(o.state.loading&3)===0&&(r.count++,o=md.bind(r),i.addEventListener("load",o),i.addEventListener("error",o))}}var hm=0;function v7(r,i){return r.stylesheets&&r.count===0&&gd(r,r.stylesheets),0<r.count||0<r.imgCount?function(o){var d=setTimeout(function(){if(r.stylesheets&&gd(r,r.stylesheets),r.unsuspend){var v=r.unsuspend;r.unsuspend=null,v()}},6e4+i);0<r.imgBytes&&hm===0&&(hm=62500*Qb());var g=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&gd(r,r.stylesheets),r.unsuspend)){var v=r.unsuspend;r.unsuspend=null,v()}},(r.imgBytes>hm?50:800)+i);return r.unsuspend=o,function(){r.unsuspend=null,clearTimeout(d),clearTimeout(g)}}:null}function md(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)gd(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var pd=null;function gd(r,i){r.stylesheets=null,r.unsuspend!==null&&(r.count++,pd=new Map,i.forEach(x7,r),pd=null,md.call(r))}function x7(r,i){if(!(i.state.loading&4)){var o=pd.get(r);if(o)var d=o.get(null);else{o=new Map,pd.set(r,o);for(var g=r.querySelectorAll("link[data-precedence],style[data-precedence]"),v=0;v<g.length;v++){var j=g[v];(j.nodeName==="LINK"||j.getAttribute("media")!=="not all")&&(o.set(j.dataset.precedence,j),d=j)}d&&o.set(null,d)}g=i.instance,j=g.getAttribute("data-precedence"),v=o.get(j)||d,v===d&&o.set(null,g),o.set(j,g),this.count++,d=md.bind(this),g.addEventListener("load",d),g.addEventListener("error",d),v?v.parentNode.insertBefore(g,v.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(g,r.firstChild)),i.state.loading|=4}}var Sc={$$typeof:q,Provider:null,Consumer:null,_currentValue:V,_currentValue2:V,_threadCount:0};function b7(r,i,o,d,g,v,j,L,Q){this.tag=1,this.containerInfo=r,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=hi(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=hi(0),this.hiddenUpdates=hi(null),this.identifierPrefix=d,this.onUncaughtError=g,this.onCaughtError=v,this.onRecoverableError=j,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Q,this.incompleteTransitions=new Map}function Ry(r,i,o,d,g,v,j,L,Q,ce,xe,je){return r=new b7(r,i,o,j,Q,ce,xe,je,L),i=1,v===!0&&(i|=24),v=ir(3,null,null,i),r.current=v,v.stateNode=r,i=tc(),i.refCount++,r.pooledCache=i,i.refCount++,v.memoizedState={element:d,isDehydrated:o,cache:i},de(v),r}function Oy(r){return r?(r=bl,r):bl}function Iy(r,i,o,d,g,v){g=Oy(g),d.context===null?d.context=g:d.pendingContext=g,d=$e(i),d.payload={element:o},v=v===void 0?null:v,v!==null&&(d.callback=v),o=Re(r,d,i),o!==null&&(Mr(o,r,i),ut(o,r,i))}function _y(r,i){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var o=r.retryLane;r.retryLane=o!==0&&o<i?o:i}}function mm(r,i){_y(r,i),(r=r.alternate)&&_y(r,i)}function Ly(r){if(r.tag===13||r.tag===31){var i=Ti(r,67108864);i!==null&&Mr(i,r,67108864),mm(r,67108864)}}function By(r){if(r.tag===13||r.tag===31){var i=Kr();i=no(i);var o=Ti(r,i);o!==null&&Mr(o,r,i),mm(r,i)}}var yd=!0;function w7(r,i,o,d){var g=Z.T;Z.T=null;var v=me.p;try{me.p=2,pm(r,i,o,d)}finally{me.p=v,Z.T=g}}function k7(r,i,o,d){var g=Z.T;Z.T=null;var v=me.p;try{me.p=8,pm(r,i,o,d)}finally{me.p=v,Z.T=g}}function pm(r,i,o,d){if(yd){var g=gm(d);if(g===null)tm(r,i,d,vd,o),Uy(r,d);else if(j7(g,r,i,o,d))d.stopPropagation();else if(Uy(r,d),i&4&&-1<S7.indexOf(r)){for(;g!==null;){var v=Ba(g);if(v!==null)switch(v.tag){case 3:if(v=v.stateNode,v.current.memoizedState.isDehydrated){var j=Ir(v.pendingLanes);if(j!==0){var L=v;for(L.pendingLanes|=2,L.entangledLanes|=2;j;){var Q=1<<31-bt(j);L.entanglements[1]|=Q,j&=~Q}ni(v),(Ot&6)===0&&(ed=Zt()+500,yc(0))}}break;case 31:case 13:L=Ti(v,2),L!==null&&Mr(L,v,2),nd(),mm(v,2)}if(v=gm(d),v===null&&tm(r,i,d,vd,o),v===g)break;g=v}g!==null&&d.stopPropagation()}else tm(r,i,d,null,o)}}function gm(r){return r=us(r),ym(r)}var vd=null;function ym(r){if(vd=null,r=ia(r),r!==null){var i=u(r);if(i===null)r=null;else{var o=i.tag;if(o===13){if(r=c(i),r!==null)return r;r=null}else if(o===31){if(r=f(i),r!==null)return r;r=null}else if(o===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;r=null}else i!==r&&(r=null)}}return vd=r,null}function qy(r){switch(r){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(pr()){case ye:return 2;case Le:return 8;case ie:case we:return 32;case qe:return 268435456;default:return 32}default:return 32}}var vm=!1,ql=null,Ul=null,Hl=null,jc=new Map,Cc=new Map,$l=[],S7="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 Uy(r,i){switch(r){case"focusin":case"focusout":ql=null;break;case"dragenter":case"dragleave":Ul=null;break;case"mouseover":case"mouseout":Hl=null;break;case"pointerover":case"pointerout":jc.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Cc.delete(i.pointerId)}}function Tc(r,i,o,d,g,v){return r===null||r.nativeEvent!==v?(r={blockedOn:i,domEventName:o,eventSystemFlags:d,nativeEvent:v,targetContainers:[g]},i!==null&&(i=Ba(i),i!==null&&Ly(i)),r):(r.eventSystemFlags|=d,i=r.targetContainers,g!==null&&i.indexOf(g)===-1&&i.push(g),r)}function j7(r,i,o,d,g){switch(i){case"focusin":return ql=Tc(ql,r,i,o,d,g),!0;case"dragenter":return Ul=Tc(Ul,r,i,o,d,g),!0;case"mouseover":return Hl=Tc(Hl,r,i,o,d,g),!0;case"pointerover":var v=g.pointerId;return jc.set(v,Tc(jc.get(v)||null,r,i,o,d,g)),!0;case"gotpointercapture":return v=g.pointerId,Cc.set(v,Tc(Cc.get(v)||null,r,i,o,d,g)),!0}return!1}function Hy(r){var i=ia(r.target);if(i!==null){var o=u(i);if(o!==null){if(i=o.tag,i===13){if(i=c(o),i!==null){r.blockedOn=i,f0(r.priority,function(){By(o)});return}}else if(i===31){if(i=f(o),i!==null){r.blockedOn=i,f0(r.priority,function(){By(o)});return}}else if(i===3&&o.stateNode.current.memoizedState.isDehydrated){r.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}r.blockedOn=null}function xd(r){if(r.blockedOn!==null)return!1;for(var i=r.targetContainers;0<i.length;){var o=gm(r.nativeEvent);if(o===null){o=r.nativeEvent;var d=new o.constructor(o.type,o);qr=d,o.target.dispatchEvent(d),qr=null}else return i=Ba(o),i!==null&&Ly(i),r.blockedOn=o,!1;i.shift()}return!0}function $y(r,i,o){xd(r)&&o.delete(i)}function C7(){vm=!1,ql!==null&&xd(ql)&&(ql=null),Ul!==null&&xd(Ul)&&(Ul=null),Hl!==null&&xd(Hl)&&(Hl=null),jc.forEach($y),Cc.forEach($y)}function bd(r,i){r.blockedOn===i&&(r.blockedOn=null,vm||(vm=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,C7)))}var wd=null;function Fy(r){wd!==r&&(wd=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){wd===r&&(wd=null);for(var i=0;i<r.length;i+=3){var o=r[i],d=r[i+1],g=r[i+2];if(typeof d!="function"){if(ym(d||o)===null)continue;break}var v=Ba(o);v!==null&&(r.splice(i,3),i-=3,gh(v,{pending:!0,data:g,method:o.method,action:d},d,g))}}))}function Jo(r){function i(Q){return bd(Q,r)}ql!==null&&bd(ql,r),Ul!==null&&bd(Ul,r),Hl!==null&&bd(Hl,r),jc.forEach(i),Cc.forEach(i);for(var o=0;o<$l.length;o++){var d=$l[o];d.blockedOn===r&&(d.blockedOn=null)}for(;0<$l.length&&(o=$l[0],o.blockedOn===null);)Hy(o),o.blockedOn===null&&$l.shift();if(o=(r.ownerDocument||r).$$reactFormReplay,o!=null)for(d=0;d<o.length;d+=3){var g=o[d],v=o[d+1],j=g[bn]||null;if(typeof v=="function")j||Fy(o);else if(j){var L=null;if(v&&v.hasAttribute("formAction")){if(g=v,j=v[bn]||null)L=j.formAction;else if(ym(g)!==null)continue}else L=j.action;typeof L=="function"?o[d+1]=L:(o.splice(d,3),d-=3),Fy(o)}}}function Py(){function r(v){v.canIntercept&&v.info==="react-transition"&&v.intercept({handler:function(){return new Promise(function(j){return g=j})},focusReset:"manual",scroll:"manual"})}function i(){g!==null&&(g(),g=null),d||setTimeout(o,20)}function o(){if(!d&&!navigation.transition){var v=navigation.currentEntry;v&&v.url!=null&&navigation.navigate(v.url,{state:v.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var d=!1,g=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(o,100),function(){d=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),g!==null&&(g(),g=null)}}}function xm(r){this._internalRoot=r}kd.prototype.render=xm.prototype.render=function(r){var i=this._internalRoot;if(i===null)throw Error(a(409));var o=i.current,d=Kr();Iy(o,d,r,i,null,null)},kd.prototype.unmount=xm.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var i=r.containerInfo;Iy(r.current,2,null,r,null,null),nd(),i[_r]=null}};function kd(r){this._internalRoot=r}kd.prototype.unstable_scheduleHydration=function(r){if(r){var i=ku();r={blockedOn:null,target:r,priority:i};for(var o=0;o<$l.length&&i!==0&&i<$l[o].priority;o++);$l.splice(o,0,r),o===0&&Hy(r)}};var Gy=t.version;if(Gy!=="19.2.7")throw Error(a(527,Gy,"19.2.7"));me.findDOMNode=function(r){var i=r._reactInternals;if(i===void 0)throw typeof r.render=="function"?Error(a(188)):(r=Object.keys(r).join(","),Error(a(268,r)));return r=m(i),r=r!==null?p(r):null,r=r===null?null:r.stateNode,r};var T7={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:Z,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Sd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Sd.isDisabled&&Sd.supportsFiber)try{Tt=Sd.inject(T7),yt=Sd}catch{}}return Ec.createRoot=function(r,i){if(!l(r))throw Error(a(299));var o=!1,d="",g=Qg,v=Jg,j=e4;return i!=null&&(i.unstable_strictMode===!0&&(o=!0),i.identifierPrefix!==void 0&&(d=i.identifierPrefix),i.onUncaughtError!==void 0&&(g=i.onUncaughtError),i.onCaughtError!==void 0&&(v=i.onCaughtError),i.onRecoverableError!==void 0&&(j=i.onRecoverableError)),i=Ry(r,1,!1,null,null,o,d,null,g,v,j,Py),r[_r]=i.current,em(r),new xm(i)},Ec.hydrateRoot=function(r,i,o){if(!l(r))throw Error(a(299));var d=!1,g="",v=Qg,j=Jg,L=e4,Q=null;return o!=null&&(o.unstable_strictMode===!0&&(d=!0),o.identifierPrefix!==void 0&&(g=o.identifierPrefix),o.onUncaughtError!==void 0&&(v=o.onUncaughtError),o.onCaughtError!==void 0&&(j=o.onCaughtError),o.onRecoverableError!==void 0&&(L=o.onRecoverableError),o.formState!==void 0&&(Q=o.formState)),i=Ry(r,1,!0,i,o??null,d,g,Q,v,j,L,Py),i.context=Oy(null),o=i.current,d=Kr(),d=no(d),g=$e(d),g.callback=null,Re(o,g,d),o=d,i.current.lanes=o,al(i,o),ni(i),r[_r]=i.current,em(r),new kd(i)},Ec.version="19.2.7",Ec}var l2;function K7(){if(l2)return Sm.exports;l2=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(),Sm.exports=W7(),Sm.exports}var X7=K7();function s2(e){const t=[],n=String(e||"");let a=n.indexOf(","),l=0,u=!1;for(;!u;){a===-1&&(a=n.length,u=!0);const c=n.slice(l,a).trim();(c||!u)&&t.push(c),l=a+1,a=n.indexOf(",",l)}return t}function Z7(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Q7=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,J7=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,e8={};function o2(e,t){return(e8.jsx?J7:Q7).test(e)}const t8=/[ \t\n\f\r]/g;function n8(e){return typeof e=="object"?e.type==="text"?u2(e.value):!1:u2(e)}function u2(e){return e.replace(t8,"")===""}class i0{constructor(t,n,a){this.normal=n,this.property=t,a&&(this.space=a)}}i0.prototype.normal={};i0.prototype.property={};i0.prototype.space=void 0;function K3(e,t){const n={},a={};for(const l of e)Object.assign(n,l.property),Object.assign(a,l.normal);return new i0(n,a,t)}function Zc(e){return e.toLowerCase()}class Or{constructor(t,n){this.attribute=n,this.property=t}}Or.prototype.attribute="";Or.prototype.booleanish=!1;Or.prototype.boolean=!1;Or.prototype.commaOrSpaceSeparated=!1;Or.prototype.commaSeparated=!1;Or.prototype.defined=!1;Or.prototype.mustUseProperty=!1;Or.prototype.number=!1;Or.prototype.overloadedBoolean=!1;Or.prototype.property="";Or.prototype.spaceSeparated=!1;Or.prototype.space=void 0;let r8=0;const ht=Qs(),Tn=Qs(),kp=Qs(),Ie=Qs(),Yt=Qs(),Ws=Qs(),Xr=Qs();function Qs(){return 2**++r8}const Sp=Object.freeze(Object.defineProperty({__proto__:null,boolean:ht,booleanish:Tn,commaOrSpaceSeparated:Xr,commaSeparated:Ws,number:Ie,overloadedBoolean:kp,spaceSeparated:Yt},Symbol.toStringTag,{value:"Module"})),Tm=Object.keys(Sp);class m1 extends Or{constructor(t,n,a,l){let u=-1;if(super(t,n),c2(this,"space",l),typeof a=="number")for(;++u<Tm.length;){const c=Tm[u];c2(this,Tm[u],(a&Sp[c])===Sp[c])}}}m1.prototype.defined=!0;function c2(e,t,n){n&&(e[t]=n)}function mu(e){const t={},n={};for(const[a,l]of Object.entries(e.properties)){const u=new m1(a,e.transform(e.attributes||{},a),l,e.space);e.mustUseProperty&&e.mustUseProperty.includes(a)&&(u.mustUseProperty=!0),t[a]=u,n[Zc(a)]=a,n[Zc(u.attribute)]=a}return new i0(t,n,e.space)}const X3=mu({properties:{ariaActiveDescendant:null,ariaAtomic:Tn,ariaAutoComplete:null,ariaBusy:Tn,ariaChecked:Tn,ariaColCount:Ie,ariaColIndex:Ie,ariaColSpan:Ie,ariaControls:Yt,ariaCurrent:null,ariaDescribedBy:Yt,ariaDetails:null,ariaDisabled:Tn,ariaDropEffect:Yt,ariaErrorMessage:null,ariaExpanded:Tn,ariaFlowTo:Yt,ariaGrabbed:Tn,ariaHasPopup:null,ariaHidden:Tn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Yt,ariaLevel:Ie,ariaLive:null,ariaModal:Tn,ariaMultiLine:Tn,ariaMultiSelectable:Tn,ariaOrientation:null,ariaOwns:Yt,ariaPlaceholder:null,ariaPosInSet:Ie,ariaPressed:Tn,ariaReadOnly:Tn,ariaRelevant:null,ariaRequired:Tn,ariaRoleDescription:Yt,ariaRowCount:Ie,ariaRowIndex:Ie,ariaRowSpan:Ie,ariaSelected:Tn,ariaSetSize:Ie,ariaSort:null,ariaValueMax:Ie,ariaValueMin:Ie,ariaValueNow:Ie,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Z3(e,t){return t in e?e[t]:t}function Q3(e,t){return Z3(e,t.toLowerCase())}const a8=mu({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ws,acceptCharset:Yt,accessKey:Yt,action:null,allow:null,allowFullScreen:ht,allowPaymentRequest:ht,allowUserMedia:ht,alpha:ht,alt:null,as:null,async:ht,autoCapitalize:null,autoComplete:Yt,autoFocus:ht,autoPlay:ht,blocking:Yt,capture:null,charSet:null,checked:ht,cite:null,className:Yt,closedBy:null,colorSpace:null,cols:Ie,colSpan:Ie,command:null,commandFor:null,content:null,contentEditable:Tn,controls:ht,controlsList:Yt,coords:Ie|Ws,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ht,defer:ht,dir:null,dirName:null,disabled:ht,download:kp,draggable:Tn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ht,formTarget:null,headers:Yt,height:Ie,hidden:kp,high:Ie,href:null,hrefLang:null,htmlFor:Yt,httpEquiv:Yt,id:null,imageSizes:null,imageSrcSet:null,inert:ht,inputMode:null,integrity:null,is:null,isMap:ht,itemId:null,itemProp:Yt,itemRef:Yt,itemScope:ht,itemType:Yt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ht,low:Ie,manifest:null,max:null,maxLength:Ie,media:null,method:null,min:null,minLength:Ie,multiple:ht,muted:ht,name:null,nonce:null,noModule:ht,noValidate:ht,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:ht,optimum:Ie,pattern:null,ping:Yt,placeholder:null,playsInline:ht,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ht,referrerPolicy:null,rel:Yt,required:ht,reversed:ht,rows:Ie,rowSpan:Ie,sandbox:Yt,scope:null,scoped:ht,seamless:ht,selected:ht,shadowRootClonable:ht,shadowRootCustomElementRegistry:ht,shadowRootDelegatesFocus:ht,shadowRootMode:null,shadowRootSerializable:ht,shape:null,size:Ie,sizes:null,slot:null,span:Ie,spellCheck:Tn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ie,step:null,style:null,tabIndex:Ie,target:null,title:null,translate:null,type:null,typeMustMatch:ht,useMap:null,value:Tn,width:Ie,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Yt,axis:null,background:null,bgColor:null,border:Ie,borderColor:null,bottomMargin:Ie,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ht,declare:ht,event:null,face:null,frame:null,frameBorder:null,hSpace:Ie,leftMargin:Ie,link:null,longDesc:null,lowSrc:null,marginHeight:Ie,marginWidth:Ie,noResize:ht,noHref:ht,noShade:ht,noWrap:ht,object:null,profile:null,prompt:null,rev:null,rightMargin:Ie,rules:null,scheme:null,scrolling:Tn,standby:null,summary:null,text:null,topMargin:Ie,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ie,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:ht,disablePictureInPicture:ht,disableRemotePlayback:ht,exportParts:Ws,part:Yt,prefix:null,property:null,results:Ie,security:null,unselectable:null},space:"html",transform:Q3}),i8=mu({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Xr,accentHeight:Ie,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ie,amplitude:Ie,arabicForm:null,ascent:Ie,attributeName:null,attributeType:null,azimuth:Ie,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ie,by:null,calcMode:null,capHeight:Ie,className:Yt,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:Ie,diffuseConstant:Ie,direction:null,display:null,dur:null,divisor:Ie,dominantBaseline:null,download:ht,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ie,enableBackground:null,end:null,event:null,exponent:Ie,externalResourcesRequired:null,fill:null,fillOpacity:Ie,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:Ws,g2:Ws,glyphName:Ws,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ie,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ie,horizOriginX:Ie,horizOriginY:Ie,id:null,ideographic:Ie,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ie,k:Ie,k1:Ie,k2:Ie,k3:Ie,k4:Ie,kernelMatrix:Xr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ie,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Ie,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:Ie,overlineThickness:Ie,paintOrder:null,panose1:null,path:null,pathLength:Ie,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Yt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ie,pointsAtY:Ie,pointsAtZ:Ie,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Xr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Xr,rev:Xr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Xr,requiredFeatures:Xr,requiredFonts:Xr,requiredFormats:Xr,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:Ie,specularExponent:Ie,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ie,strikethroughThickness:Ie,string:null,stroke:null,strokeDashArray:Xr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ie,strokeOpacity:Ie,strokeWidth:null,style:null,surfaceScale:Ie,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Xr,tabIndex:Ie,tableValues:null,target:null,targetX:Ie,targetY:Ie,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Xr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ie,underlineThickness:Ie,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ie,values:null,vAlphabetic:Ie,vMathematical:Ie,vectorEffect:null,vHanging:Ie,vIdeographic:Ie,version:null,vertAdvY:Ie,vertOriginX:Ie,vertOriginY:Ie,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ie,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Z3}),J3=mu({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()}}),ex=mu({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Q3}),tx=mu({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),l8={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"},s8=/[A-Z]/g,d2=/-[a-z]/g,o8=/^data[-\w.:]+$/i;function nx(e,t){const n=Zc(t);let a=t,l=Or;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&o8.test(t)){if(t.charAt(4)==="-"){const u=t.slice(5).replace(d2,c8);a="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=t.slice(4);if(!d2.test(u)){let c=u.replace(s8,u8);c.charAt(0)!=="-"&&(c="-"+c),t="data"+c}}l=m1}return new l(a,t)}function u8(e){return"-"+e.toLowerCase()}function c8(e){return e.charAt(1).toUpperCase()}const rx=K3([X3,a8,J3,ex,tx],"html"),kf=K3([X3,i8,J3,ex,tx],"svg");function f2(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function d8(e){return e.join(" ").trim()}var tu={},Am,h2;function f8(){if(h2)return Am;h2=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,l=/^:\s*/,u=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,f=/^\s+|\s+$/g,h=`
|
|
51
|
-
`,m="/",p="*",y="",k="comment",x="declaration";function C(I,_){if(typeof I!="string")throw new TypeError("First argument must be a string");if(!I)return[];_=_||{};var N=1,q=1;function R(be){var he=be.match(t);he&&(N+=he.length);var Z=be.lastIndexOf(h);q=~Z?be.length-Z:q+be.length}function X(){var be={line:N,column:q};return function(he){return he.position=new P(be),ne(),he}}function P(be){this.start=be,this.end={line:N,column:q},this.source=_.source}P.prototype.content=I;function H(be){var he=new Error(_.source+":"+N+":"+q+": "+be);if(he.reason=be,he.filename=_.source,he.line=N,he.column=q,he.source=I,!_.silent)throw he}function J(be){var he=be.exec(I);if(he){var Z=he[0];return R(Z),I=I.slice(Z.length),he}}function ne(){J(n)}function F(be){var he;for(be=be||[];he=te();)he!==!1&&be.push(he);return be}function te(){var be=X();if(!(m!=I.charAt(0)||p!=I.charAt(1))){for(var he=2;y!=I.charAt(he)&&(p!=I.charAt(he)||m!=I.charAt(he+1));)++he;if(he+=2,y===I.charAt(he-1))return H("End of comment missing");var Z=I.slice(2,he-2);return q+=2,R(Z),I=I.slice(he),q+=2,be({type:k,comment:Z})}}function se(){var be=X(),he=J(a);if(he){if(te(),!J(l))return H("property missing ':'");var Z=J(u),me=be({type:x,property:M(he[0].replace(e,y)),value:Z?M(Z[0].replace(e,y)):y});return J(c),me}}function ve(){var be=[];F(be);for(var he;he=se();)he!==!1&&(be.push(he),F(be));return be}return ne(),ve()}function M(I){return I?I.replace(f,y):y}return Am=C,Am}var m2;function h8(){if(m2)return tu;m2=1;var e=tu&&tu.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(tu,"__esModule",{value:!0}),tu.default=n;const t=e(f8());function n(a,l){let u=null;if(!a||typeof a!="string")return u;const c=(0,t.default)(a),f=typeof l=="function";return c.forEach(h=>{if(h.type!=="declaration")return;const{property:m,value:p}=h;f?l(m,p,h):p&&(u=u||{},u[m]=p)}),u}return tu}var Nc={},p2;function m8(){if(p2)return Nc;p2=1,Object.defineProperty(Nc,"__esModule",{value:!0}),Nc.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,l=/^-(ms)-/,u=function(m){return!m||n.test(m)||e.test(m)},c=function(m,p){return p.toUpperCase()},f=function(m,p){return"".concat(p,"-")},h=function(m,p){return p===void 0&&(p={}),u(m)?m:(m=m.toLowerCase(),p.reactCompat?m=m.replace(l,f):m=m.replace(a,f),m.replace(t,c))};return Nc.camelCase=h,Nc}var Mc,g2;function p8(){if(g2)return Mc;g2=1;var e=Mc&&Mc.__importDefault||function(l){return l&&l.__esModule?l:{default:l}},t=e(h8()),n=m8();function a(l,u){var c={};return!l||typeof l!="string"||(0,t.default)(l,function(f,h){f&&h&&(c[(0,n.camelCase)(f,u)]=h)}),c}return a.default=a,Mc=a,Mc}var g8=p8();const y8=V3(g8),ax=ix("end"),p1=ix("start");function ix(e){return t;function t(n){const a=n&&n.position&&n.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 v8(e){const t=p1(e),n=ax(e);if(t&&n)return{start:t,end:n}}function $c(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?y2(e.position):"start"in e||"end"in e?y2(e):"line"in e||"column"in e?jp(e):""}function jp(e){return v2(e&&e.line)+":"+v2(e&&e.column)}function y2(e){return jp(e&&e.start)+"-"+jp(e&&e.end)}function v2(e){return e&&typeof e=="number"?e:1}class Qn extends Error{constructor(t,n,a){super(),typeof n=="string"&&(a=n,n=void 0);let l="",u={},c=!1;if(n&&("line"in n&&"column"in n?u={place:n}:"start"in n&&"end"in n?u={place:n}:"type"in n?u={ancestors:[n],place:n.position}:u={...n}),typeof t=="string"?l=t:!u.cause&&t&&(c=!0,l=t.message,u.cause=t),!u.ruleId&&!u.source&&typeof a=="string"){const h=a.indexOf(":");h===-1?u.ruleId=a:(u.source=a.slice(0,h),u.ruleId=a.slice(h+1))}if(!u.place&&u.ancestors&&u.ancestors){const h=u.ancestors[u.ancestors.length-1];h&&(u.place=h.position)}const f=u.place&&"start"in u.place?u.place.start:u.place;this.ancestors=u.ancestors||void 0,this.cause=u.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=$c(u.place)||"1:1",this.place=u.place||void 0,this.reason=this.message,this.ruleId=u.ruleId||void 0,this.source=u.source||void 0,this.stack=c&&u.cause&&typeof u.cause.stack=="string"?u.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 g1={}.hasOwnProperty,x8=new Map,b8=/[A-Z]/g,w8=new Set(["table","tbody","thead","tfoot","tr"]),k8=new Set(["td","th"]),lx="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function S8(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=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=D8(n,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=M8(n,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:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?kf:rx,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},u=sx(l,e,void 0);return u&&typeof u!="string"?u:l.create(e,l.Fragment,{children:u||void 0},void 0)}function sx(e,t,n){if(t.type==="element")return j8(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return C8(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return A8(e,t,n);if(t.type==="mdxjsEsm")return T8(e,t);if(t.type==="root")return E8(e,t,n);if(t.type==="text")return N8(e,t)}function j8(e,t,n){const a=e.schema;let l=a;t.tagName.toLowerCase()==="svg"&&a.space==="html"&&(l=kf,e.schema=l),e.ancestors.push(t);const u=ux(e,t.tagName,!1),c=z8(e,t);let f=v1(e,t);return w8.has(t.tagName)&&(f=f.filter(function(h){return typeof h=="string"?!n8(h):!0})),ox(e,c,u,t),y1(c,f),e.ancestors.pop(),e.schema=a,e.create(t,u,c,n)}function C8(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)}Qc(e,t.position)}function T8(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Qc(e,t.position)}function A8(e,t,n){const a=e.schema;let l=a;t.name==="svg"&&a.space==="html"&&(l=kf,e.schema=l),e.ancestors.push(t);const u=t.name===null?e.Fragment:ux(e,t.name,!0),c=R8(e,t),f=v1(e,t);return ox(e,c,u,t),y1(c,f),e.ancestors.pop(),e.schema=a,e.create(t,u,c,n)}function E8(e,t,n){const a={};return y1(a,v1(e,t)),e.create(t,e.Fragment,a,n)}function N8(e,t){return t.value}function ox(e,t,n,a){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=a)}function y1(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function M8(e,t,n){return a;function a(l,u,c,f){const m=Array.isArray(c.children)?n:t;return f?m(u,c,f):m(u,c)}}function D8(e,t){return n;function n(a,l,u,c){const f=Array.isArray(u.children),h=p1(a);return t(l,u,c,f,{columnNumber:h?h.column-1:void 0,fileName:e,lineNumber:h?h.line:void 0},void 0)}}function z8(e,t){const n={};let a,l;for(l in t.properties)if(l!=="children"&&g1.call(t.properties,l)){const u=O8(e,l,t.properties[l]);if(u){const[c,f]=u;e.tableCellAlignToStyle&&c==="align"&&typeof f=="string"&&k8.has(t.tagName)?a=f:n[c]=f}}if(a){const u=n.style||(n.style={});u[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=a}return n}function R8(e,t){const n={};for(const a of t.attributes)if(a.type==="mdxJsxExpressionAttribute")if(a.data&&a.data.estree&&e.evaluater){const u=a.data.estree.body[0];u.type;const c=u.expression;c.type;const f=c.properties[0];f.type,Object.assign(n,e.evaluater.evaluateExpression(f.argument))}else Qc(e,t.position);else{const l=a.name;let u;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,u=e.evaluater.evaluateExpression(f.expression)}else Qc(e,t.position);else u=a.value===null?!0:a.value;n[l]=u}return n}function v1(e,t){const n=[];let a=-1;const l=e.passKeys?new Map:x8;for(;++a<t.children.length;){const u=t.children[a];let c;if(e.passKeys){const h=u.type==="element"?u.tagName:u.type==="mdxJsxFlowElement"||u.type==="mdxJsxTextElement"?u.name:void 0;if(h){const m=l.get(h)||0;c=h+"-"+m,l.set(h,m+1)}}const f=sx(e,u,c);f!==void 0&&n.push(f)}return n}function O8(e,t,n){const a=nx(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=a.commaSeparated?Z7(n):d8(n)),a.property==="style"){let l=typeof n=="object"?n:I8(e,String(n));return e.stylePropertyNameCase==="css"&&(l=_8(l)),["style",l]}return[e.elementAttributeNameCase==="react"&&a.space?l8[a.property]||a.property:a.attribute,n]}}function I8(e,t){try{return y8(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const a=n,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=lx+"#cannot-parse-style-attribute",l}}function ux(e,t,n){let a;if(!n)a={type:"Literal",value:t};else if(t.includes(".")){const l=t.split(".");let u=-1,c;for(;++u<l.length;){const f=o2(l[u])?{type:"Identifier",name:l[u]}:{type:"Literal",value:l[u]};c=c?{type:"MemberExpression",object:c,property:f,computed:!!(u&&f.type==="Literal"),optional:!1}:f}a=c}else a=o2(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(a.type==="Literal"){const l=a.value;return g1.call(e.components,l)?e.components[l]:l}if(e.evaluater)return e.evaluater.evaluateExpression(a);Qc(e)}function Qc(e,t){const n=new Qn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=lx+"#cannot-handle-mdx-estrees-without-createevaluater",n}function _8(e){const t={};let n;for(n in e)g1.call(e,n)&&(t[L8(n)]=e[n]);return t}function L8(e){let t=e.replace(b8,B8);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function B8(e){return"-"+e.toLowerCase()}const Em={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"]},q8={};function x1(e,t){const n=q8,a=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,l=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return cx(e,a,l)}function cx(e,t,n){if(U8(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return x2(e.children,t,n)}return Array.isArray(e)?x2(e,t,n):""}function x2(e,t,n){const a=[];let l=-1;for(;++l<e.length;)a[l]=cx(e[l],t,n);return a.join("")}function U8(e){return!!(e&&typeof e=="object")}const b2=document.createElement("i");function b1(e){const t="&"+e+";";b2.innerHTML=t;const n=b2.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Zr(e,t,n,a){const l=e.length;let u=0,c;if(t<0?t=-t>l?0:l+t:t=t>l?l:t,n=n>0?n:0,a.length<1e4)c=Array.from(a),c.unshift(t,n),e.splice(...c);else for(n&&e.splice(t,n);u<a.length;)c=a.slice(u,u+1e4),c.unshift(t,0),e.splice(...c),u+=1e4,t+=1e4}function ya(e,t){return e.length>0?(Zr(e,e.length,0,t),e):t}const w2={}.hasOwnProperty;function dx(e){const t={};let n=-1;for(;++n<e.length;)H8(t,e[n]);return t}function H8(e,t){let n;for(n in t){const l=(w2.call(e,n)?e[n]:void 0)||(e[n]={}),u=t[n];let c;if(u)for(c in u){w2.call(l,c)||(l[c]=[]);const f=u[c];$8(l[c],Array.isArray(f)?f:f?[f]:[])}}}function $8(e,t){let n=-1;const a=[];for(;++n<t.length;)(t[n].add==="after"?e:a).push(t[n]);Zr(e,0,0,a)}function fx(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Oa(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const fr=rs(/[A-Za-z]/),Xn=rs(/[\dA-Za-z]/),F8=rs(/[#-'*+\--9=?A-Z^-~]/);function of(e){return e!==null&&(e<32||e===127)}const Cp=rs(/\d/),P8=rs(/[\dA-Fa-f]/),G8=rs(/[!-/:-@[-`{-~]/);function tt(e){return e!==null&&e<-2}function Wt(e){return e!==null&&(e<0||e===32)}function Ct(e){return e===-2||e===-1||e===32}const Sf=rs(new RegExp("\\p{P}|\\p{S}","u")),Ks=rs(/\s/);function rs(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function pu(e){const t=[];let n=-1,a=0,l=0;for(;++n<e.length;){const u=e.charCodeAt(n);let c="";if(u===37&&Xn(e.charCodeAt(n+1))&&Xn(e.charCodeAt(n+2)))l=2;else if(u<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(u))||(c=String.fromCharCode(u));else if(u>55295&&u<57344){const f=e.charCodeAt(n+1);u<56320&&f>56319&&f<57344?(c=String.fromCharCode(u,f),l=1):c="�"}else c=String.fromCharCode(u);c&&(t.push(e.slice(a,n),encodeURIComponent(c)),a=n+l+1,c=""),l&&(n+=l,l=0)}return t.join("")+e.slice(a)}function wt(e,t,n,a){const l=a?a-1:Number.POSITIVE_INFINITY;let u=0;return c;function c(h){return Ct(h)?(e.enter(n),f(h)):t(h)}function f(h){return Ct(h)&&u++<l?(e.consume(h),f):(e.exit(n),t(h))}}const V8={tokenize:Y8};function Y8(e){const t=e.attempt(this.parser.constructs.contentInitial,a,l);let n;return t;function a(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),wt(e,t,"linePrefix")}function l(f){return e.enter("paragraph"),u(f)}function u(f){const h=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=h),n=h,c(f)}function c(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return tt(f)?(e.consume(f),e.exit("chunkText"),u):(e.consume(f),c)}}const W8={tokenize:K8},k2={tokenize:X8};function K8(e){const t=this,n=[];let a=0,l,u,c;return f;function f(q){if(a<n.length){const R=n[a];return t.containerState=R[1],e.attempt(R[0].continuation,h,m)(q)}return m(q)}function h(q){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,l&&N();const R=t.events.length;let X=R,P;for(;X--;)if(t.events[X][0]==="exit"&&t.events[X][1].type==="chunkFlow"){P=t.events[X][1].end;break}_(a);let H=R;for(;H<t.events.length;)t.events[H][1].end={...P},H++;return Zr(t.events,X+1,0,t.events.slice(R)),t.events.length=H,m(q)}return f(q)}function m(q){if(a===n.length){if(!l)return k(q);if(l.currentConstruct&&l.currentConstruct.concrete)return C(q);t.interrupt=!!(l.currentConstruct&&!l._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(k2,p,y)(q)}function p(q){return l&&N(),_(a),k(q)}function y(q){return t.parser.lazy[t.now().line]=a!==n.length,c=t.now().offset,C(q)}function k(q){return t.containerState={},e.attempt(k2,x,C)(q)}function x(q){return a++,n.push([t.currentConstruct,t.containerState]),k(q)}function C(q){if(q===null){l&&N(),_(0),e.consume(q);return}return l=l||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:l,contentType:"flow",previous:u}),M(q)}function M(q){if(q===null){I(e.exit("chunkFlow"),!0),_(0),e.consume(q);return}return tt(q)?(e.consume(q),I(e.exit("chunkFlow")),a=0,t.interrupt=void 0,f):(e.consume(q),M)}function I(q,R){const X=t.sliceStream(q);if(R&&X.push(null),q.previous=u,u&&(u.next=q),u=q,l.defineSkip(q.start),l.write(X),t.parser.lazy[q.start.line]){let P=l.events.length;for(;P--;)if(l.events[P][1].start.offset<c&&(!l.events[P][1].end||l.events[P][1].end.offset>c))return;const H=t.events.length;let J=H,ne,F;for(;J--;)if(t.events[J][0]==="exit"&&t.events[J][1].type==="chunkFlow"){if(ne){F=t.events[J][1].end;break}ne=!0}for(_(a),P=H;P<t.events.length;)t.events[P][1].end={...F},P++;Zr(t.events,J+1,0,t.events.slice(H)),t.events.length=P}}function _(q){let R=n.length;for(;R-- >q;){const X=n[R];t.containerState=X[1],X[0].exit.call(t,e)}n.length=q}function N(){l.write([null]),u=void 0,l=void 0,t.containerState._closeFlow=void 0}}function X8(e,t,n){return wt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function uu(e){if(e===null||Wt(e)||Ks(e))return 1;if(Sf(e))return 2}function jf(e,t,n){const a=[];let l=-1;for(;++l<e.length;){const u=e[l].resolveAll;u&&!a.includes(u)&&(t=u(t,n),a.push(u))}return t}const Tp={name:"attention",resolveAll:Z8,tokenize:Q8};function Z8(e,t){let n=-1,a,l,u,c,f,h,m,p;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(a=n;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[n][1]).charCodeAt(0)){if((e[a][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[a][1].end.offset-e[a][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;h=e[a][1].end.offset-e[a][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const y={...e[a][1].end},k={...e[n][1].start};S2(y,-h),S2(k,h),c={type:h>1?"strongSequence":"emphasisSequence",start:y,end:{...e[a][1].end}},f={type:h>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:k},u={type:h>1?"strongText":"emphasisText",start:{...e[a][1].end},end:{...e[n][1].start}},l={type:h>1?"strong":"emphasis",start:{...c.start},end:{...f.end}},e[a][1].end={...c.start},e[n][1].start={...f.end},m=[],e[a][1].end.offset-e[a][1].start.offset&&(m=ya(m,[["enter",e[a][1],t],["exit",e[a][1],t]])),m=ya(m,[["enter",l,t],["enter",c,t],["exit",c,t],["enter",u,t]]),m=ya(m,jf(t.parser.constructs.insideSpan.null,e.slice(a+1,n),t)),m=ya(m,[["exit",u,t],["enter",f,t],["exit",f,t],["exit",l,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,m=ya(m,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,Zr(e,a-1,n-a+3,m),n=a+m.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Q8(e,t){const n=this.parser.constructs.attentionMarkers.null,a=this.previous,l=uu(a);let u;return c;function c(h){return u=h,e.enter("attentionSequence"),f(h)}function f(h){if(h===u)return e.consume(h),f;const m=e.exit("attentionSequence"),p=uu(h),y=!p||p===2&&l||n.includes(h),k=!l||l===2&&p||n.includes(a);return m._open=!!(u===42?y:y&&(l||!k)),m._close=!!(u===42?k:k&&(p||!y)),t(h)}}function S2(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const J8={name:"autolink",tokenize:ew};function ew(e,t,n){let a=0;return l;function l(x){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),u}function u(x){return fr(x)?(e.consume(x),c):x===64?n(x):m(x)}function c(x){return x===43||x===45||x===46||Xn(x)?(a=1,f(x)):m(x)}function f(x){return x===58?(e.consume(x),a=0,h):(x===43||x===45||x===46||Xn(x))&&a++<32?(e.consume(x),f):(a=0,m(x))}function h(x){return x===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),t):x===null||x===32||x===60||of(x)?n(x):(e.consume(x),h)}function m(x){return x===64?(e.consume(x),p):F8(x)?(e.consume(x),m):n(x)}function p(x){return Xn(x)?y(x):n(x)}function y(x){return x===46?(e.consume(x),a=0,p):x===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),t):k(x)}function k(x){if((x===45||Xn(x))&&a++<63){const C=x===45?k:y;return e.consume(x),C}return n(x)}}const l0={partial:!0,tokenize:tw};function tw(e,t,n){return a;function a(u){return Ct(u)?wt(e,l,"linePrefix")(u):l(u)}function l(u){return u===null||tt(u)?t(u):n(u)}}const hx={continuation:{tokenize:rw},exit:aw,name:"blockQuote",tokenize:nw};function nw(e,t,n){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"),u}return n(c)}function u(c){return Ct(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(c))}}function rw(e,t,n){const a=this;return l;function l(c){return Ct(c)?wt(e,u,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):u(c)}function u(c){return e.attempt(hx,t,n)(c)}}function aw(e){e.exit("blockQuote")}const mx={name:"characterEscape",tokenize:iw};function iw(e,t,n){return a;function a(u){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(u),e.exit("escapeMarker"),l}function l(u){return G8(u)?(e.enter("characterEscapeValue"),e.consume(u),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(u)}}const px={name:"characterReference",tokenize:lw};function lw(e,t,n){const a=this;let l=0,u,c;return f;function f(y){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(y),e.exit("characterReferenceMarker"),h}function h(y){return y===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(y),e.exit("characterReferenceMarkerNumeric"),m):(e.enter("characterReferenceValue"),u=31,c=Xn,p(y))}function m(y){return y===88||y===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(y),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),u=6,c=P8,p):(e.enter("characterReferenceValue"),u=7,c=Cp,p(y))}function p(y){if(y===59&&l){const k=e.exit("characterReferenceValue");return c===Xn&&!b1(a.sliceSerialize(k))?n(y):(e.enter("characterReferenceMarker"),e.consume(y),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return c(y)&&l++<u?(e.consume(y),p):n(y)}}const j2={partial:!0,tokenize:ow},C2={concrete:!0,name:"codeFenced",tokenize:sw};function sw(e,t,n){const a=this,l={partial:!0,tokenize:X};let u=0,c=0,f;return h;function h(P){return m(P)}function m(P){const H=a.events[a.events.length-1];return u=H&&H[1].type==="linePrefix"?H[2].sliceSerialize(H[1],!0).length:0,f=P,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(P)}function p(P){return P===f?(c++,e.consume(P),p):c<3?n(P):(e.exit("codeFencedFenceSequence"),Ct(P)?wt(e,y,"whitespace")(P):y(P))}function y(P){return P===null||tt(P)?(e.exit("codeFencedFence"),a.interrupt?t(P):e.check(j2,M,R)(P)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),k(P))}function k(P){return P===null||tt(P)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),y(P)):Ct(P)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),wt(e,x,"whitespace")(P)):P===96&&P===f?n(P):(e.consume(P),k)}function x(P){return P===null||tt(P)?y(P):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),C(P))}function C(P){return P===null||tt(P)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),y(P)):P===96&&P===f?n(P):(e.consume(P),C)}function M(P){return e.attempt(l,R,I)(P)}function I(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),_}function _(P){return u>0&&Ct(P)?wt(e,N,"linePrefix",u+1)(P):N(P)}function N(P){return P===null||tt(P)?e.check(j2,M,R)(P):(e.enter("codeFlowValue"),q(P))}function q(P){return P===null||tt(P)?(e.exit("codeFlowValue"),N(P)):(e.consume(P),q)}function R(P){return e.exit("codeFenced"),t(P)}function X(P,H,J){let ne=0;return F;function F(he){return P.enter("lineEnding"),P.consume(he),P.exit("lineEnding"),te}function te(he){return P.enter("codeFencedFence"),Ct(he)?wt(P,se,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(he):se(he)}function se(he){return he===f?(P.enter("codeFencedFenceSequence"),ve(he)):J(he)}function ve(he){return he===f?(ne++,P.consume(he),ve):ne>=c?(P.exit("codeFencedFenceSequence"),Ct(he)?wt(P,be,"whitespace")(he):be(he)):J(he)}function be(he){return he===null||tt(he)?(P.exit("codeFencedFence"),H(he)):J(he)}}}function ow(e,t,n){const a=this;return l;function l(c){return c===null?n(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),u)}function u(c){return a.parser.lazy[a.now().line]?n(c):t(c)}}const Nm={name:"codeIndented",tokenize:cw},uw={partial:!0,tokenize:dw};function cw(e,t,n){const a=this;return l;function l(m){return e.enter("codeIndented"),wt(e,u,"linePrefix",5)(m)}function u(m){const p=a.events[a.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?c(m):n(m)}function c(m){return m===null?h(m):tt(m)?e.attempt(uw,c,h)(m):(e.enter("codeFlowValue"),f(m))}function f(m){return m===null||tt(m)?(e.exit("codeFlowValue"),c(m)):(e.consume(m),f)}function h(m){return e.exit("codeIndented"),t(m)}}function dw(e,t,n){const a=this;return l;function l(c){return a.parser.lazy[a.now().line]?n(c):tt(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),l):wt(e,u,"linePrefix",5)(c)}function u(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):tt(c)?l(c):n(c)}}const fw={name:"codeText",previous:mw,resolve:hw,tokenize:pw};function hw(e){let t=e.length-4,n=3,a,l;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(a=n;++a<t;)if(e[a][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(a=n-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 mw(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function pw(e,t,n){let a=0,l,u;return c;function c(y){return e.enter("codeText"),e.enter("codeTextSequence"),f(y)}function f(y){return y===96?(e.consume(y),a++,f):(e.exit("codeTextSequence"),h(y))}function h(y){return y===null?n(y):y===32?(e.enter("space"),e.consume(y),e.exit("space"),h):y===96?(u=e.enter("codeTextSequence"),l=0,p(y)):tt(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),h):(e.enter("codeTextData"),m(y))}function m(y){return y===null||y===32||y===96||tt(y)?(e.exit("codeTextData"),h(y)):(e.consume(y),m)}function p(y){return y===96?(e.consume(y),l++,p):l===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(y)):(u.type="codeTextData",m(y))}}class gw{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,n){const a=n??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,n,a){const l=n||0;this.setCursor(Math.trunc(t));const u=this.right.splice(this.right.length-l,Number.POSITIVE_INFINITY);return a&&Dc(this.left,a),u.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),Dc(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Dc(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 n=this.left.splice(t,Number.POSITIVE_INFINITY);Dc(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Dc(this.left,n.reverse())}}}function Dc(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function gx(e){const t={};let n=-1,a,l,u,c,f,h,m;const p=new gw(e);for(;++n<p.length;){for(;n in t;)n=t[n];if(a=p.get(n),n&&a[1].type==="chunkFlow"&&p.get(n-1)[1].type==="listItemPrefix"&&(h=a[1]._tokenizer.events,u=0,u<h.length&&h[u][1].type==="lineEndingBlank"&&(u+=2),u<h.length&&h[u][1].type==="content"))for(;++u<h.length&&h[u][1].type!=="content";)h[u][1].type==="chunkText"&&(h[u][1]._isInFirstContentOfListItem=!0,u++);if(a[0]==="enter")a[1].contentType&&(Object.assign(t,yw(p,n)),n=t[n],m=!0);else if(a[1]._container){for(u=n,l=void 0;u--;)if(c=p.get(u),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(l&&(p.get(l)[1].type="lineEndingBlank"),c[1].type="lineEnding",l=u);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;l&&(a[1].end={...p.get(l)[1].start},f=p.slice(l,n),f.unshift(a),p.splice(l,n-l+1,f))}}return Zr(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!m}function yw(e,t){const n=e.get(t)[1],a=e.get(t)[2];let l=t-1;const u=[];let c=n._tokenizer;c||(c=a.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const f=c.events,h=[],m={};let p,y,k=-1,x=n,C=0,M=0;const I=[M];for(;x;){for(;e.get(++l)[1]!==x;);u.push(l),x._tokenizer||(p=a.sliceStream(x),x.next||p.push(null),y&&c.defineSkip(x.start),x._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(p),x._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),y=x,x=x.next}for(x=n;++k<f.length;)f[k][0]==="exit"&&f[k-1][0]==="enter"&&f[k][1].type===f[k-1][1].type&&f[k][1].start.line!==f[k][1].end.line&&(M=k+1,I.push(M),x._tokenizer=void 0,x.previous=void 0,x=x.next);for(c.events=[],x?(x._tokenizer=void 0,x.previous=void 0):I.pop(),k=I.length;k--;){const _=f.slice(I[k],I[k+1]),N=u.pop();h.push([N,N+_.length-1]),e.splice(N,2,_)}for(h.reverse(),k=-1;++k<h.length;)m[C+h[k][0]]=C+h[k][1],C+=h[k][1]-h[k][0]-1;return m}const vw={resolve:bw,tokenize:ww},xw={partial:!0,tokenize:kw};function bw(e){return gx(e),e}function ww(e,t){let n;return a;function a(f){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),l(f)}function l(f){return f===null?u(f):tt(f)?e.check(xw,c,u)(f):(e.consume(f),l)}function u(f){return e.exit("chunkContent"),e.exit("content"),t(f)}function c(f){return e.consume(f),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,l}}function kw(e,t,n){const a=this;return l;function l(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),wt(e,u,"linePrefix")}function u(c){if(c===null||tt(c))return n(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,n,t)(c)}}function yx(e,t,n,a,l,u,c,f,h){const m=h||Number.POSITIVE_INFINITY;let p=0;return y;function y(_){return _===60?(e.enter(a),e.enter(l),e.enter(u),e.consume(_),e.exit(u),k):_===null||_===32||_===41||of(_)?n(_):(e.enter(a),e.enter(c),e.enter(f),e.enter("chunkString",{contentType:"string"}),M(_))}function k(_){return _===62?(e.enter(u),e.consume(_),e.exit(u),e.exit(l),e.exit(a),t):(e.enter(f),e.enter("chunkString",{contentType:"string"}),x(_))}function x(_){return _===62?(e.exit("chunkString"),e.exit(f),k(_)):_===null||_===60||tt(_)?n(_):(e.consume(_),_===92?C:x)}function C(_){return _===60||_===62||_===92?(e.consume(_),x):x(_)}function M(_){return!p&&(_===null||_===41||Wt(_))?(e.exit("chunkString"),e.exit(f),e.exit(c),e.exit(a),t(_)):p<m&&_===40?(e.consume(_),p++,M):_===41?(e.consume(_),p--,M):_===null||_===32||_===40||of(_)?n(_):(e.consume(_),_===92?I:M)}function I(_){return _===40||_===41||_===92?(e.consume(_),M):M(_)}}function vx(e,t,n,a,l,u){const c=this;let f=0,h;return m;function m(x){return e.enter(a),e.enter(l),e.consume(x),e.exit(l),e.enter(u),p}function p(x){return f>999||x===null||x===91||x===93&&!h||x===94&&!f&&"_hiddenFootnoteSupport"in c.parser.constructs?n(x):x===93?(e.exit(u),e.enter(l),e.consume(x),e.exit(l),e.exit(a),t):tt(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),y(x))}function y(x){return x===null||x===91||x===93||tt(x)||f++>999?(e.exit("chunkString"),p(x)):(e.consume(x),h||(h=!Ct(x)),x===92?k:y)}function k(x){return x===91||x===92||x===93?(e.consume(x),f++,y):y(x)}}function xx(e,t,n,a,l,u){let c;return f;function f(k){return k===34||k===39||k===40?(e.enter(a),e.enter(l),e.consume(k),e.exit(l),c=k===40?41:k,h):n(k)}function h(k){return k===c?(e.enter(l),e.consume(k),e.exit(l),e.exit(a),t):(e.enter(u),m(k))}function m(k){return k===c?(e.exit(u),h(c)):k===null?n(k):tt(k)?(e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),wt(e,m,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(k))}function p(k){return k===c||k===null||tt(k)?(e.exit("chunkString"),m(k)):(e.consume(k),k===92?y:p)}function y(k){return k===c||k===92?(e.consume(k),p):p(k)}}function Fc(e,t){let n;return a;function a(l){return tt(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),n=!0,a):Ct(l)?wt(e,a,n?"linePrefix":"lineSuffix")(l):t(l)}}const Sw={name:"definition",tokenize:Cw},jw={partial:!0,tokenize:Tw};function Cw(e,t,n){const a=this;let l;return u;function u(x){return e.enter("definition"),c(x)}function c(x){return vx.call(a,e,f,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(x)}function f(x){return l=Oa(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),h):n(x)}function h(x){return Wt(x)?Fc(e,m)(x):m(x)}function m(x){return yx(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(x)}function p(x){return e.attempt(jw,y,y)(x)}function y(x){return Ct(x)?wt(e,k,"whitespace")(x):k(x)}function k(x){return x===null||tt(x)?(e.exit("definition"),a.parser.defined.push(l),t(x)):n(x)}}function Tw(e,t,n){return a;function a(f){return Wt(f)?Fc(e,l)(f):n(f)}function l(f){return xx(e,u,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function u(f){return Ct(f)?wt(e,c,"whitespace")(f):c(f)}function c(f){return f===null||tt(f)?t(f):n(f)}}const Aw={name:"hardBreakEscape",tokenize:Ew};function Ew(e,t,n){return a;function a(u){return e.enter("hardBreakEscape"),e.consume(u),l}function l(u){return tt(u)?(e.exit("hardBreakEscape"),t(u)):n(u)}}const Nw={name:"headingAtx",resolve:Mw,tokenize:Dw};function Mw(e,t){let n=e.length-2,a=3,l,u;return e[a][1].type==="whitespace"&&(a+=2),n-2>a&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(a===n-1||n-4>a&&e[n-2][1].type==="whitespace")&&(n-=a+1===n?2:4),n>a&&(l={type:"atxHeadingText",start:e[a][1].start,end:e[n][1].end},u={type:"chunkText",start:e[a][1].start,end:e[n][1].end,contentType:"text"},Zr(e,a,n-a+1,[["enter",l,t],["enter",u,t],["exit",u,t],["exit",l,t]])),e}function Dw(e,t,n){let a=0;return l;function l(p){return e.enter("atxHeading"),u(p)}function u(p){return e.enter("atxHeadingSequence"),c(p)}function c(p){return p===35&&a++<6?(e.consume(p),c):p===null||Wt(p)?(e.exit("atxHeadingSequence"),f(p)):n(p)}function f(p){return p===35?(e.enter("atxHeadingSequence"),h(p)):p===null||tt(p)?(e.exit("atxHeading"),t(p)):Ct(p)?wt(e,f,"whitespace")(p):(e.enter("atxHeadingText"),m(p))}function h(p){return p===35?(e.consume(p),h):(e.exit("atxHeadingSequence"),f(p))}function m(p){return p===null||p===35||Wt(p)?(e.exit("atxHeadingText"),f(p)):(e.consume(p),m)}}const zw=["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"],T2=["pre","script","style","textarea"],Rw={concrete:!0,name:"htmlFlow",resolveTo:_w,tokenize:Lw},Ow={partial:!0,tokenize:qw},Iw={partial:!0,tokenize:Bw};function _w(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 Lw(e,t,n){const a=this;let l,u,c,f,h;return m;function m(O){return p(O)}function p(O){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(O),y}function y(O){return O===33?(e.consume(O),k):O===47?(e.consume(O),u=!0,M):O===63?(e.consume(O),l=3,a.interrupt?t:U):fr(O)?(e.consume(O),c=String.fromCharCode(O),I):n(O)}function k(O){return O===45?(e.consume(O),l=2,x):O===91?(e.consume(O),l=5,f=0,C):fr(O)?(e.consume(O),l=4,a.interrupt?t:U):n(O)}function x(O){return O===45?(e.consume(O),a.interrupt?t:U):n(O)}function C(O){const ee="CDATA[";return O===ee.charCodeAt(f++)?(e.consume(O),f===ee.length?a.interrupt?t:se:C):n(O)}function M(O){return fr(O)?(e.consume(O),c=String.fromCharCode(O),I):n(O)}function I(O){if(O===null||O===47||O===62||Wt(O)){const ee=O===47,ke=c.toLowerCase();return!ee&&!u&&T2.includes(ke)?(l=1,a.interrupt?t(O):se(O)):zw.includes(c.toLowerCase())?(l=6,ee?(e.consume(O),_):a.interrupt?t(O):se(O)):(l=7,a.interrupt&&!a.parser.lazy[a.now().line]?n(O):u?N(O):q(O))}return O===45||Xn(O)?(e.consume(O),c+=String.fromCharCode(O),I):n(O)}function _(O){return O===62?(e.consume(O),a.interrupt?t:se):n(O)}function N(O){return Ct(O)?(e.consume(O),N):F(O)}function q(O){return O===47?(e.consume(O),F):O===58||O===95||fr(O)?(e.consume(O),R):Ct(O)?(e.consume(O),q):F(O)}function R(O){return O===45||O===46||O===58||O===95||Xn(O)?(e.consume(O),R):X(O)}function X(O){return O===61?(e.consume(O),P):Ct(O)?(e.consume(O),X):q(O)}function P(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),h=O,H):Ct(O)?(e.consume(O),P):J(O)}function H(O){return O===h?(e.consume(O),h=null,ne):O===null||tt(O)?n(O):(e.consume(O),H)}function J(O){return O===null||O===34||O===39||O===47||O===60||O===61||O===62||O===96||Wt(O)?X(O):(e.consume(O),J)}function ne(O){return O===47||O===62||Ct(O)?q(O):n(O)}function F(O){return O===62?(e.consume(O),te):n(O)}function te(O){return O===null||tt(O)?se(O):Ct(O)?(e.consume(O),te):n(O)}function se(O){return O===45&&l===2?(e.consume(O),Z):O===60&&l===1?(e.consume(O),me):O===62&&l===4?(e.consume(O),E):O===63&&l===3?(e.consume(O),U):O===93&&l===5?(e.consume(O),Ce):tt(O)&&(l===6||l===7)?(e.exit("htmlFlowData"),e.check(Ow,Y,ve)(O)):O===null||tt(O)?(e.exit("htmlFlowData"),ve(O)):(e.consume(O),se)}function ve(O){return e.check(Iw,be,Y)(O)}function be(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),he}function he(O){return O===null||tt(O)?ve(O):(e.enter("htmlFlowData"),se(O))}function Z(O){return O===45?(e.consume(O),U):se(O)}function me(O){return O===47?(e.consume(O),c="",V):se(O)}function V(O){if(O===62){const ee=c.toLowerCase();return T2.includes(ee)?(e.consume(O),E):se(O)}return fr(O)&&c.length<8?(e.consume(O),c+=String.fromCharCode(O),V):se(O)}function Ce(O){return O===93?(e.consume(O),U):se(O)}function U(O){return O===62?(e.consume(O),E):O===45&&l===2?(e.consume(O),U):se(O)}function E(O){return O===null||tt(O)?(e.exit("htmlFlowData"),Y(O)):(e.consume(O),E)}function Y(O){return e.exit("htmlFlow"),t(O)}}function Bw(e,t,n){const a=this;return l;function l(c){return tt(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),u):n(c)}function u(c){return a.parser.lazy[a.now().line]?n(c):t(c)}}function qw(e,t,n){return a;function a(l){return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),e.attempt(l0,t,n)}}const Uw={name:"htmlText",tokenize:Hw};function Hw(e,t,n){const a=this;let l,u,c;return f;function f(U){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(U),h}function h(U){return U===33?(e.consume(U),m):U===47?(e.consume(U),X):U===63?(e.consume(U),q):fr(U)?(e.consume(U),J):n(U)}function m(U){return U===45?(e.consume(U),p):U===91?(e.consume(U),u=0,C):fr(U)?(e.consume(U),N):n(U)}function p(U){return U===45?(e.consume(U),x):n(U)}function y(U){return U===null?n(U):U===45?(e.consume(U),k):tt(U)?(c=y,me(U)):(e.consume(U),y)}function k(U){return U===45?(e.consume(U),x):y(U)}function x(U){return U===62?Z(U):U===45?k(U):y(U)}function C(U){const E="CDATA[";return U===E.charCodeAt(u++)?(e.consume(U),u===E.length?M:C):n(U)}function M(U){return U===null?n(U):U===93?(e.consume(U),I):tt(U)?(c=M,me(U)):(e.consume(U),M)}function I(U){return U===93?(e.consume(U),_):M(U)}function _(U){return U===62?Z(U):U===93?(e.consume(U),_):M(U)}function N(U){return U===null||U===62?Z(U):tt(U)?(c=N,me(U)):(e.consume(U),N)}function q(U){return U===null?n(U):U===63?(e.consume(U),R):tt(U)?(c=q,me(U)):(e.consume(U),q)}function R(U){return U===62?Z(U):q(U)}function X(U){return fr(U)?(e.consume(U),P):n(U)}function P(U){return U===45||Xn(U)?(e.consume(U),P):H(U)}function H(U){return tt(U)?(c=H,me(U)):Ct(U)?(e.consume(U),H):Z(U)}function J(U){return U===45||Xn(U)?(e.consume(U),J):U===47||U===62||Wt(U)?ne(U):n(U)}function ne(U){return U===47?(e.consume(U),Z):U===58||U===95||fr(U)?(e.consume(U),F):tt(U)?(c=ne,me(U)):Ct(U)?(e.consume(U),ne):Z(U)}function F(U){return U===45||U===46||U===58||U===95||Xn(U)?(e.consume(U),F):te(U)}function te(U){return U===61?(e.consume(U),se):tt(U)?(c=te,me(U)):Ct(U)?(e.consume(U),te):ne(U)}function se(U){return U===null||U===60||U===61||U===62||U===96?n(U):U===34||U===39?(e.consume(U),l=U,ve):tt(U)?(c=se,me(U)):Ct(U)?(e.consume(U),se):(e.consume(U),be)}function ve(U){return U===l?(e.consume(U),l=void 0,he):U===null?n(U):tt(U)?(c=ve,me(U)):(e.consume(U),ve)}function be(U){return U===null||U===34||U===39||U===60||U===61||U===96?n(U):U===47||U===62||Wt(U)?ne(U):(e.consume(U),be)}function he(U){return U===47||U===62||Wt(U)?ne(U):n(U)}function Z(U){return U===62?(e.consume(U),e.exit("htmlTextData"),e.exit("htmlText"),t):n(U)}function me(U){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(U),e.exit("lineEnding"),V}function V(U){return Ct(U)?wt(e,Ce,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):Ce(U)}function Ce(U){return e.enter("htmlTextData"),c(U)}}const w1={name:"labelEnd",resolveAll:Gw,resolveTo:Vw,tokenize:Yw},$w={tokenize:Ww},Fw={tokenize:Kw},Pw={tokenize:Xw};function Gw(e){let t=-1;const n=[];for(;++t<e.length;){const a=e[t][1];if(n.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!==n.length&&Zr(e,0,e.length,n),e}function Vw(e,t){let n=e.length,a=0,l,u,c,f;for(;n--;)if(l=e[n][1],u){if(l.type==="link"||l.type==="labelLink"&&l._inactive)break;e[n][0]==="enter"&&l.type==="labelLink"&&(l._inactive=!0)}else if(c){if(e[n][0]==="enter"&&(l.type==="labelImage"||l.type==="labelLink")&&!l._balanced&&(u=n,l.type!=="labelLink")){a=2;break}}else l.type==="labelEnd"&&(c=n);const h={type:e[u][1].type==="labelLink"?"link":"image",start:{...e[u][1].start},end:{...e[e.length-1][1].end}},m={type:"label",start:{...e[u][1].start},end:{...e[c][1].end}},p={type:"labelText",start:{...e[u+a+2][1].end},end:{...e[c-2][1].start}};return f=[["enter",h,t],["enter",m,t]],f=ya(f,e.slice(u+1,u+a+3)),f=ya(f,[["enter",p,t]]),f=ya(f,jf(t.parser.constructs.insideSpan.null,e.slice(u+a+4,c-3),t)),f=ya(f,[["exit",p,t],e[c-2],e[c-1],["exit",m,t]]),f=ya(f,e.slice(c+1)),f=ya(f,[["exit",h,t]]),Zr(e,u,e.length,f),e}function Yw(e,t,n){const a=this;let l=a.events.length,u,c;for(;l--;)if((a.events[l][1].type==="labelImage"||a.events[l][1].type==="labelLink")&&!a.events[l][1]._balanced){u=a.events[l][1];break}return f;function f(k){return u?u._inactive?y(k):(c=a.parser.defined.includes(Oa(a.sliceSerialize({start:u.end,end:a.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(k),e.exit("labelMarker"),e.exit("labelEnd"),h):n(k)}function h(k){return k===40?e.attempt($w,p,c?p:y)(k):k===91?e.attempt(Fw,p,c?m:y)(k):c?p(k):y(k)}function m(k){return e.attempt(Pw,p,y)(k)}function p(k){return t(k)}function y(k){return u._balanced=!0,n(k)}}function Ww(e,t,n){return a;function a(y){return e.enter("resource"),e.enter("resourceMarker"),e.consume(y),e.exit("resourceMarker"),l}function l(y){return Wt(y)?Fc(e,u)(y):u(y)}function u(y){return y===41?p(y):yx(e,c,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(y)}function c(y){return Wt(y)?Fc(e,h)(y):p(y)}function f(y){return n(y)}function h(y){return y===34||y===39||y===40?xx(e,m,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(y):p(y)}function m(y){return Wt(y)?Fc(e,p)(y):p(y)}function p(y){return y===41?(e.enter("resourceMarker"),e.consume(y),e.exit("resourceMarker"),e.exit("resource"),t):n(y)}}function Kw(e,t,n){const a=this;return l;function l(f){return vx.call(a,e,u,c,"reference","referenceMarker","referenceString")(f)}function u(f){return a.parser.defined.includes(Oa(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)))?t(f):n(f)}function c(f){return n(f)}}function Xw(e,t,n){return a;function a(u){return e.enter("reference"),e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),l}function l(u){return u===93?(e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),e.exit("reference"),t):n(u)}}const Zw={name:"labelStartImage",resolveAll:w1.resolveAll,tokenize:Qw};function Qw(e,t,n){const a=this;return l;function l(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),u}function u(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),c):n(f)}function c(f){return f===94&&"_hiddenFootnoteSupport"in a.parser.constructs?n(f):t(f)}}const Jw={name:"labelStartLink",resolveAll:w1.resolveAll,tokenize:e9};function e9(e,t,n){const a=this;return l;function l(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelLink"),u}function u(c){return c===94&&"_hiddenFootnoteSupport"in a.parser.constructs?n(c):t(c)}}const Mm={name:"lineEnding",tokenize:t9};function t9(e,t){return n;function n(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),wt(e,t,"linePrefix")}}const Yd={name:"thematicBreak",tokenize:n9};function n9(e,t,n){let a=0,l;return u;function u(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||tt(m))?(e.exit("thematicBreak"),t(m)):n(m)}function h(m){return m===l?(e.consume(m),a++,h):(e.exit("thematicBreakSequence"),Ct(m)?wt(e,f,"whitespace")(m):f(m))}}const Dr={continuation:{tokenize:l9},exit:o9,name:"list",tokenize:i9},r9={partial:!0,tokenize:u9},a9={partial:!0,tokenize:s9};function i9(e,t,n){const a=this,l=a.events[a.events.length-1];let u=l&&l[1].type==="linePrefix"?l[2].sliceSerialize(l[1],!0).length:0,c=0;return f;function f(x){const C=a.containerState.type||(x===42||x===43||x===45?"listUnordered":"listOrdered");if(C==="listUnordered"?!a.containerState.marker||x===a.containerState.marker:Cp(x)){if(a.containerState.type||(a.containerState.type=C,e.enter(C,{_container:!0})),C==="listUnordered")return e.enter("listItemPrefix"),x===42||x===45?e.check(Yd,n,m)(x):m(x);if(!a.interrupt||x===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),h(x)}return n(x)}function h(x){return Cp(x)&&++c<10?(e.consume(x),h):(!a.interrupt||c<2)&&(a.containerState.marker?x===a.containerState.marker:x===41||x===46)?(e.exit("listItemValue"),m(x)):n(x)}function m(x){return e.enter("listItemMarker"),e.consume(x),e.exit("listItemMarker"),a.containerState.marker=a.containerState.marker||x,e.check(l0,a.interrupt?n:p,e.attempt(r9,k,y))}function p(x){return a.containerState.initialBlankLine=!0,u++,k(x)}function y(x){return Ct(x)?(e.enter("listItemPrefixWhitespace"),e.consume(x),e.exit("listItemPrefixWhitespace"),k):n(x)}function k(x){return a.containerState.size=u+a.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(x)}}function l9(e,t,n){const a=this;return a.containerState._closeFlow=void 0,e.check(l0,l,u);function l(f){return a.containerState.furtherBlankLines=a.containerState.furtherBlankLines||a.containerState.initialBlankLine,wt(e,t,"listItemIndent",a.containerState.size+1)(f)}function u(f){return a.containerState.furtherBlankLines||!Ct(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(a9,t,c)(f))}function c(f){return a.containerState._closeFlow=!0,a.interrupt=void 0,wt(e,e.attempt(Dr,t,n),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function s9(e,t,n){const a=this;return wt(e,l,"listItemIndent",a.containerState.size+1);function l(u){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(u):n(u)}}function o9(e){e.exit(this.containerState.type)}function u9(e,t,n){const a=this;return wt(e,l,"listItemPrefixWhitespace",a.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function l(u){const c=a.events[a.events.length-1];return!Ct(u)&&c&&c[1].type==="listItemPrefixWhitespace"?t(u):n(u)}}const A2={name:"setextUnderline",resolveTo:c9,tokenize:d9};function c9(e,t){let n=e.length,a,l,u;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){a=n;break}e[n][1].type==="paragraph"&&(l=n)}else e[n][1].type==="content"&&e.splice(n,1),!u&&e[n][1].type==="definition"&&(u=n);const c={type:"setextHeading",start:{...e[a][1].start},end:{...e[e.length-1][1].end}};return e[l][1].type="setextHeadingText",u?(e.splice(l,0,["enter",c,t]),e.splice(u+1,0,["exit",e[a][1],t]),e[a][1].end={...e[u][1].end}):e[a][1]=c,e.push(["exit",c,t]),e}function d9(e,t,n){const a=this;let l;return u;function u(m){let p=a.events.length,y;for(;p--;)if(a.events[p][1].type!=="lineEnding"&&a.events[p][1].type!=="linePrefix"&&a.events[p][1].type!=="content"){y=a.events[p][1].type==="paragraph";break}return!a.parser.lazy[a.now().line]&&(a.interrupt||y)?(e.enter("setextHeadingLine"),l=m,c(m)):n(m)}function c(m){return e.enter("setextHeadingLineSequence"),f(m)}function f(m){return m===l?(e.consume(m),f):(e.exit("setextHeadingLineSequence"),Ct(m)?wt(e,h,"lineSuffix")(m):h(m))}function h(m){return m===null||tt(m)?(e.exit("setextHeadingLine"),t(m)):n(m)}}const f9={tokenize:h9};function h9(e){const t=this,n=e.attempt(l0,a,e.attempt(this.parser.constructs.flowInitial,l,wt(e,e.attempt(this.parser.constructs.flow,l,e.attempt(vw,l)),"linePrefix")));return n;function a(u){if(u===null){e.consume(u);return}return e.enter("lineEndingBlank"),e.consume(u),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function l(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const m9={resolveAll:wx()},p9=bx("string"),g9=bx("text");function bx(e){return{resolveAll:wx(e==="text"?y9:void 0),tokenize:t};function t(n){const a=this,l=this.parser.constructs[e],u=n.attempt(l,c,f);return c;function c(p){return m(p)?u(p):f(p)}function f(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),h}function h(p){return m(p)?(n.exit("data"),u(p)):(n.consume(p),h)}function m(p){if(p===null)return!0;const y=l[p];let k=-1;if(y)for(;++k<y.length;){const x=y[k];if(!x.previous||x.previous.call(a,a.previous))return!0}return!1}}}function wx(e){return t;function t(n,a){let l=-1,u;for(;++l<=n.length;)u===void 0?n[l]&&n[l][1].type==="data"&&(u=l,l++):(!n[l]||n[l][1].type!=="data")&&(l!==u+2&&(n[u][1].end=n[l-1][1].end,n.splice(u+2,l-u-2),l=u+2),u=void 0);return e?e(n,a):n}}function y9(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const a=e[n-1][1],l=t.sliceStream(a);let u=l.length,c=-1,f=0,h;for(;u--;){const m=l[u];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){u++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(f=0),f){const m={type:n===e.length||h||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:u?c:a.start._bufferIndex+c,_index:a.start._index+u,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(n,0,["enter",m,t],["exit",m,t]),n+=2)}n++}return e}const v9={42:Dr,43:Dr,45:Dr,48:Dr,49:Dr,50:Dr,51:Dr,52:Dr,53:Dr,54:Dr,55:Dr,56:Dr,57:Dr,62:hx},x9={91:Sw},b9={[-2]:Nm,[-1]:Nm,32:Nm},w9={35:Nw,42:Yd,45:[A2,Yd],60:Rw,61:A2,95:Yd,96:C2,126:C2},k9={38:px,92:mx},S9={[-5]:Mm,[-4]:Mm,[-3]:Mm,33:Zw,38:px,42:Tp,60:[J8,Uw],91:Jw,92:[Aw,mx],93:w1,95:Tp,96:fw},j9={null:[Tp,m9]},C9={null:[42,95]},T9={null:[]},A9=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:C9,contentInitial:x9,disable:T9,document:v9,flow:w9,flowInitial:b9,insideSpan:j9,string:k9,text:S9},Symbol.toStringTag,{value:"Module"}));function E9(e,t,n){let a={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const l={},u=[];let c=[],f=[];const h={attempt:H(X),check:H(P),consume:N,enter:q,exit:R,interrupt:H(P,{interrupt:!0})},m={code:null,containerState:{},defineSkip:M,events:[],now:C,parser:e,previous:null,sliceSerialize:k,sliceStream:x,write:y};let p=t.tokenize.call(m,h);return t.resolveAll&&u.push(t),m;function y(te){return c=ya(c,te),I(),c[c.length-1]!==null?[]:(J(t,0),m.events=jf(u,m.events,m),m.events)}function k(te,se){return M9(x(te),se)}function x(te){return N9(c,te)}function C(){const{_bufferIndex:te,_index:se,line:ve,column:be,offset:he}=a;return{_bufferIndex:te,_index:se,line:ve,column:be,offset:he}}function M(te){l[te.line]=te.column,F()}function I(){let te;for(;a._index<c.length;){const se=c[a._index];if(typeof se=="string")for(te=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===te&&a._bufferIndex<se.length;)_(se.charCodeAt(a._bufferIndex));else _(se)}}function _(te){p=p(te)}function N(te){tt(te)?(a.line++,a.column=1,a.offset+=te===-3?2:1,F()):te!==-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=te}function q(te,se){const ve=se||{};return ve.type=te,ve.start=C(),m.events.push(["enter",ve,m]),f.push(ve),ve}function R(te){const se=f.pop();return se.end=C(),m.events.push(["exit",se,m]),se}function X(te,se){J(te,se.from)}function P(te,se){se.restore()}function H(te,se){return ve;function ve(be,he,Z){let me,V,Ce,U;return Array.isArray(be)?Y(be):"tokenize"in be?Y([be]):E(be);function E(Ae){return He;function He(it){const pe=it!==null&&Ae[it],Pe=it!==null&&Ae.null,Ke=[...Array.isArray(pe)?pe:pe?[pe]:[],...Array.isArray(Pe)?Pe:Pe?[Pe]:[]];return Y(Ke)(it)}}function Y(Ae){return me=Ae,V=0,Ae.length===0?Z:O(Ae[V])}function O(Ae){return He;function He(it){return U=ne(),Ce=Ae,Ae.partial||(m.currentConstruct=Ae),Ae.name&&m.parser.constructs.disable.null.includes(Ae.name)?ke():Ae.tokenize.call(se?Object.assign(Object.create(m),se):m,h,ee,ke)(it)}}function ee(Ae){return te(Ce,U),he}function ke(Ae){return U.restore(),++V<me.length?O(me[V]):Z}}}function J(te,se){te.resolveAll&&!u.includes(te)&&u.push(te),te.resolve&&Zr(m.events,se,m.events.length-se,te.resolve(m.events.slice(se),m)),te.resolveTo&&(m.events=te.resolveTo(m.events,m))}function ne(){const te=C(),se=m.previous,ve=m.currentConstruct,be=m.events.length,he=Array.from(f);return{from:be,restore:Z};function Z(){a=te,m.previous=se,m.currentConstruct=ve,m.events.length=be,f=he,F()}}function F(){a.line in l&&a.column<2&&(a.column=l[a.line],a.offset+=l[a.line]-1)}}function N9(e,t){const n=t.start._index,a=t.start._bufferIndex,l=t.end._index,u=t.end._bufferIndex;let c;if(n===l)c=[e[n].slice(a,u)];else{if(c=e.slice(n,l),a>-1){const f=c[0];typeof f=="string"?c[0]=f.slice(a):c.shift()}u>0&&c.push(e[l].slice(0,u))}return c}function M9(e,t){let n=-1;const a=[];let l;for(;++n<e.length;){const u=e[n];let c;if(typeof u=="string")c=u;else switch(u){case-5:{c="\r";break}case-4:{c=`
|
|
52
|
-
`;break}case-3:{c=`\r
|
|
53
|
-
`;break}case-2:{c=t?" ":" ";break}case-1:{if(!t&&l)continue;c=" ";break}default:c=String.fromCharCode(u)}l=u===-2,a.push(c)}return a.join("")}function D9(e){const a={constructs:dx([A9,...(e||{}).extensions||[]]),content:l(V8),defined:[],document:l(W8),flow:l(f9),lazy:{},string:l(p9),text:l(g9)};return a;function l(u){return c;function c(f){return E9(a,u,f)}}}function z9(e){for(;!gx(e););return e}const E2=/[\0\t\n\r]/g;function R9(){let e=1,t="",n=!0,a;return l;function l(u,c,f){const h=[];let m,p,y,k,x;for(u=t+(typeof u=="string"?u.toString():new TextDecoder(c||void 0).decode(u)),y=0,t="",n&&(u.charCodeAt(0)===65279&&y++,n=void 0);y<u.length;){if(E2.lastIndex=y,m=E2.exec(u),k=m&&m.index!==void 0?m.index:u.length,x=u.charCodeAt(k),!m){t=u.slice(y);break}if(x===10&&y===k&&a)h.push(-3),a=void 0;else switch(a&&(h.push(-5),a=void 0),y<k&&(h.push(u.slice(y,k)),e+=k-y),x){case 0:{h.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,h.push(-2);e++<p;)h.push(-1);break}case 10:{h.push(-4),e=1;break}default:a=!0,e=1}y=k+1}return f&&(a&&h.push(-5),t&&h.push(t),h.push(null)),h}}const O9=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function I9(e){return e.replace(O9,_9)}function _9(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const l=n.charCodeAt(1),u=l===120||l===88;return fx(n.slice(u?2:1),u?16:10)}return b1(n)||e}const kx={}.hasOwnProperty;function L9(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),B9(n)(z9(D9(n).document().write(R9()(e,t,!0))))}function B9(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(er),autolinkProtocol:ne,autolinkEmail:ne,atxHeading:u(Ze),blockQuote:u(Pe),characterEscape:ne,characterReference:ne,codeFenced:u(Ke),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:u(Ke,c),codeText:u(oe,c),codeTextData:ne,data:ne,codeFlowValue:ne,definition:u(Me),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:u(ze),hardBreakEscape:u(Ut),hardBreakTrailing:u(Ut),htmlFlow:u(ra,c),htmlFlowData:ne,htmlText:u(ra,c),htmlTextData:ne,image:u(Jn),label:c,link:u(er),listItem:u(Bn),listItemValue:k,listOrdered:u(Xt,y),listUnordered:u(Xt),paragraph:u(Vn),reference:O,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:u(Ze),strong:u(Un),thematicBreak:u(pr)},exit:{atxHeading:h(),atxHeadingSequence:X,autolink:h(),autolinkEmail:pe,autolinkProtocol:it,blockQuote:h(),characterEscapeValue:F,characterReferenceMarkerHexadecimal:ke,characterReferenceMarkerNumeric:ke,characterReferenceValue:Ae,characterReference:He,codeFenced:h(I),codeFencedFence:M,codeFencedFenceInfo:x,codeFencedFenceMeta:C,codeFlowValue:F,codeIndented:h(_),codeText:h(he),codeTextData:F,data:F,definition:h(),definitionDestinationString:R,definitionLabelString:N,definitionTitleString:q,emphasis:h(),hardBreakEscape:h(se),hardBreakTrailing:h(se),htmlFlow:h(ve),htmlFlowData:F,htmlText:h(be),htmlTextData:F,image:h(me),label:Ce,labelText:V,lineEnding:te,link:h(Z),listItem:h(),listOrdered:h(),listUnordered:h(),paragraph:h(),referenceString:ee,resourceDestinationString:U,resourceTitleString:E,resource:Y,setextHeading:h(J),setextHeadingLineSequence:H,setextHeadingText:P,strong:h(),thematicBreak:h()}};Sx(t,(e||{}).mdastExtensions||[]);const n={};return a;function a(ye){let Le={type:"root",children:[]};const ie={stack:[Le],tokenStack:[],config:t,enter:f,exit:m,buffer:c,resume:p,data:n},we=[];let qe=-1;for(;++qe<ye.length;)if(ye[qe][1].type==="listOrdered"||ye[qe][1].type==="listUnordered")if(ye[qe][0]==="enter")we.push(qe);else{const Ge=we.pop();qe=l(ye,Ge,qe)}for(qe=-1;++qe<ye.length;){const Ge=t[ye[qe][0]];kx.call(Ge,ye[qe][1].type)&&Ge[ye[qe][1].type].call(Object.assign({sliceSerialize:ye[qe][2].sliceSerialize},ie),ye[qe][1])}if(ie.tokenStack.length>0){const Ge=ie.tokenStack[ie.tokenStack.length-1];(Ge[1]||N2).call(ie,void 0,Ge[0])}for(Le.position={start:Pl(ye.length>0?ye[0][1].start:{line:1,column:1,offset:0}),end:Pl(ye.length>0?ye[ye.length-2][1].end:{line:1,column:1,offset:0})},qe=-1;++qe<t.transforms.length;)Le=t.transforms[qe](Le)||Le;return Le}function l(ye,Le,ie){let we=Le-1,qe=-1,Ge=!1,ot,Tt,yt,rt;for(;++we<=ie;){const bt=ye[we];switch(bt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{bt[0]==="enter"?qe++:qe--,rt=void 0;break}case"lineEndingBlank":{bt[0]==="enter"&&(ot&&!rt&&!qe&&!yt&&(yt=we),rt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:rt=void 0}if(!qe&&bt[0]==="enter"&&bt[1].type==="listItemPrefix"||qe===-1&&bt[0]==="exit"&&(bt[1].type==="listUnordered"||bt[1].type==="listOrdered")){if(ot){let Ht=we;for(Tt=void 0;Ht--;){const Qt=ye[Ht];if(Qt[1].type==="lineEnding"||Qt[1].type==="lineEndingBlank"){if(Qt[0]==="exit")continue;Tt&&(ye[Tt][1].type="lineEndingBlank",Ge=!0),Qt[1].type="lineEnding",Tt=Ht}else if(!(Qt[1].type==="linePrefix"||Qt[1].type==="blockQuotePrefix"||Qt[1].type==="blockQuotePrefixWhitespace"||Qt[1].type==="blockQuoteMarker"||Qt[1].type==="listItemIndent"))break}yt&&(!Tt||yt<Tt)&&(ot._spread=!0),ot.end=Object.assign({},Tt?ye[Tt][1].start:bt[1].end),ye.splice(Tt||we,0,["exit",ot,bt[2]]),we++,ie++}if(bt[1].type==="listItemPrefix"){const Ht={type:"listItem",_spread:!1,start:Object.assign({},bt[1].start),end:void 0};ot=Ht,ye.splice(we,0,["enter",Ht,bt[2]]),we++,ie++,yt=void 0,rt=!0}}}return ye[Le][1]._spread=Ge,ie}function u(ye,Le){return ie;function ie(we){f.call(this,ye(we),we),Le&&Le.call(this,we)}}function c(){this.stack.push({type:"fragment",children:[]})}function f(ye,Le,ie){this.stack[this.stack.length-1].children.push(ye),this.stack.push(ye),this.tokenStack.push([Le,ie||void 0]),ye.position={start:Pl(Le.start),end:void 0}}function h(ye){return Le;function Le(ie){ye&&ye.call(this,ie),m.call(this,ie)}}function m(ye,Le){const ie=this.stack.pop(),we=this.tokenStack.pop();if(we)we[0].type!==ye.type&&(Le?Le.call(this,ye,we[0]):(we[1]||N2).call(this,ye,we[0]));else throw new Error("Cannot close `"+ye.type+"` ("+$c({start:ye.start,end:ye.end})+"): it’s not open");ie.position.end=Pl(ye.end)}function p(){return x1(this.stack.pop())}function y(){this.data.expectingFirstListItemValue=!0}function k(ye){if(this.data.expectingFirstListItemValue){const Le=this.stack[this.stack.length-2];Le.start=Number.parseInt(this.sliceSerialize(ye),10),this.data.expectingFirstListItemValue=void 0}}function x(){const ye=this.resume(),Le=this.stack[this.stack.length-1];Le.lang=ye}function C(){const ye=this.resume(),Le=this.stack[this.stack.length-1];Le.meta=ye}function M(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function I(){const ye=this.resume(),Le=this.stack[this.stack.length-1];Le.value=ye.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const ye=this.resume(),Le=this.stack[this.stack.length-1];Le.value=ye.replace(/(\r?\n|\r)$/g,"")}function N(ye){const Le=this.resume(),ie=this.stack[this.stack.length-1];ie.label=Le,ie.identifier=Oa(this.sliceSerialize(ye)).toLowerCase()}function q(){const ye=this.resume(),Le=this.stack[this.stack.length-1];Le.title=ye}function R(){const ye=this.resume(),Le=this.stack[this.stack.length-1];Le.url=ye}function X(ye){const Le=this.stack[this.stack.length-1];if(!Le.depth){const ie=this.sliceSerialize(ye).length;Le.depth=ie}}function P(){this.data.setextHeadingSlurpLineEnding=!0}function H(ye){const Le=this.stack[this.stack.length-1];Le.depth=this.sliceSerialize(ye).codePointAt(0)===61?1:2}function J(){this.data.setextHeadingSlurpLineEnding=void 0}function ne(ye){const ie=this.stack[this.stack.length-1].children;let we=ie[ie.length-1];(!we||we.type!=="text")&&(we=Zt(),we.position={start:Pl(ye.start),end:void 0},ie.push(we)),this.stack.push(we)}function F(ye){const Le=this.stack.pop();Le.value+=this.sliceSerialize(ye),Le.position.end=Pl(ye.end)}function te(ye){const Le=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ie=Le.children[Le.children.length-1];ie.position.end=Pl(ye.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Le.type)&&(ne.call(this,ye),F.call(this,ye))}function se(){this.data.atHardBreak=!0}function ve(){const ye=this.resume(),Le=this.stack[this.stack.length-1];Le.value=ye}function be(){const ye=this.resume(),Le=this.stack[this.stack.length-1];Le.value=ye}function he(){const ye=this.resume(),Le=this.stack[this.stack.length-1];Le.value=ye}function Z(){const ye=this.stack[this.stack.length-1];if(this.data.inReference){const Le=this.data.referenceType||"shortcut";ye.type+="Reference",ye.referenceType=Le,delete ye.url,delete ye.title}else delete ye.identifier,delete ye.label;this.data.referenceType=void 0}function me(){const ye=this.stack[this.stack.length-1];if(this.data.inReference){const Le=this.data.referenceType||"shortcut";ye.type+="Reference",ye.referenceType=Le,delete ye.url,delete ye.title}else delete ye.identifier,delete ye.label;this.data.referenceType=void 0}function V(ye){const Le=this.sliceSerialize(ye),ie=this.stack[this.stack.length-2];ie.label=I9(Le),ie.identifier=Oa(Le).toLowerCase()}function Ce(){const ye=this.stack[this.stack.length-1],Le=this.resume(),ie=this.stack[this.stack.length-1];if(this.data.inReference=!0,ie.type==="link"){const we=ye.children;ie.children=we}else ie.alt=Le}function U(){const ye=this.resume(),Le=this.stack[this.stack.length-1];Le.url=ye}function E(){const ye=this.resume(),Le=this.stack[this.stack.length-1];Le.title=ye}function Y(){this.data.inReference=void 0}function O(){this.data.referenceType="collapsed"}function ee(ye){const Le=this.resume(),ie=this.stack[this.stack.length-1];ie.label=Le,ie.identifier=Oa(this.sliceSerialize(ye)).toLowerCase(),this.data.referenceType="full"}function ke(ye){this.data.characterReferenceType=ye.type}function Ae(ye){const Le=this.sliceSerialize(ye),ie=this.data.characterReferenceType;let we;ie?(we=fx(Le,ie==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):we=b1(Le);const qe=this.stack[this.stack.length-1];qe.value+=we}function He(ye){const Le=this.stack.pop();Le.position.end=Pl(ye.end)}function it(ye){F.call(this,ye);const Le=this.stack[this.stack.length-1];Le.url=this.sliceSerialize(ye)}function pe(ye){F.call(this,ye);const Le=this.stack[this.stack.length-1];Le.url="mailto:"+this.sliceSerialize(ye)}function Pe(){return{type:"blockquote",children:[]}}function Ke(){return{type:"code",lang:null,meta:null,value:""}}function oe(){return{type:"inlineCode",value:""}}function Me(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ze(){return{type:"emphasis",children:[]}}function Ze(){return{type:"heading",depth:0,children:[]}}function Ut(){return{type:"break"}}function ra(){return{type:"html",value:""}}function Jn(){return{type:"image",title:null,url:"",alt:null}}function er(){return{type:"link",title:null,url:"",children:[]}}function Xt(ye){return{type:"list",ordered:ye.type==="listOrdered",start:null,spread:ye._spread,children:[]}}function Bn(ye){return{type:"listItem",spread:ye._spread,checked:null,children:[]}}function Vn(){return{type:"paragraph",children:[]}}function Un(){return{type:"strong",children:[]}}function Zt(){return{type:"text",value:""}}function pr(){return{type:"thematicBreak"}}}function Pl(e){return{line:e.line,column:e.column,offset:e.offset}}function Sx(e,t){let n=-1;for(;++n<t.length;){const a=t[n];Array.isArray(a)?Sx(e,a):q9(e,a)}}function q9(e,t){let n;for(n in t)if(kx.call(t,n))switch(n){case"canContainEols":{const a=t[n];a&&e[n].push(...a);break}case"transforms":{const a=t[n];a&&e[n].push(...a);break}case"enter":case"exit":{const a=t[n];a&&Object.assign(e[n],a);break}}}function N2(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+$c({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+$c({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+$c({start:t.start,end:t.end})+") is still open")}function U9(e){const t=this;t.parser=n;function n(a){return L9(a,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function H9(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function $9(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
54
|
-
`}]}function F9(e,t){const n=t.value?t.value+`
|
|
55
|
-
`:"",a={},l=t.lang?t.lang.split(/\s+/):[];l.length>0&&(a.className=["language-"+l[0]]);let u={type:"element",tagName:"code",properties:a,children:[{type:"text",value:n}]};return t.meta&&(u.data={meta:t.meta}),e.patch(t,u),u=e.applyData(t,u),u={type:"element",tagName:"pre",properties:{},children:[u]},e.patch(t,u),u}function P9(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function G9(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function V9(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=String(t.identifier).toUpperCase(),l=pu(a.toLowerCase()),u=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=u+1,f+=1,e.footnoteCounts.set(a,f);const h={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+l,id:n+"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 Y9(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function W9(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function jx(e,t){const n=t.referenceType;let a="]";if(n==="collapsed"?a+="[]":n==="full"&&(a+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+a}];const l=e.all(t),u=l[0];u&&u.type==="text"?u.value="["+u.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 K9(e,t){const n=String(t.identifier).toUpperCase(),a=e.definitionById.get(n);if(!a)return jx(e,t);const l={src:pu(a.url||""),alt:t.alt};a.title!==null&&a.title!==void 0&&(l.title=a.title);const u={type:"element",tagName:"img",properties:l,children:[]};return e.patch(t,u),e.applyData(t,u)}function X9(e,t){const n={src:pu(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const a={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,a),e.applyData(t,a)}function Z9(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const a={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,a),e.applyData(t,a)}function Q9(e,t){const n=String(t.identifier).toUpperCase(),a=e.definitionById.get(n);if(!a)return jx(e,t);const l={href:pu(a.url||"")};a.title!==null&&a.title!==void 0&&(l.title=a.title);const u={type:"element",tagName:"a",properties:l,children:e.all(t)};return e.patch(t,u),e.applyData(t,u)}function J9(e,t){const n={href:pu(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const a={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function ek(e,t,n){const a=e.all(t),l=n?tk(n):Cx(t),u={},c=[];if(typeof t.checked=="boolean"){const p=a[0];let y;p&&p.type==="element"&&p.tagName==="p"?y=p:(y={type:"element",tagName:"p",properties:{},children:[]},a.unshift(y)),y.children.length>0&&y.children.unshift({type:"text",value:" "}),y.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),u.className=["task-list-item"]}let f=-1;for(;++f<a.length;){const p=a[f];(l||f!==0||p.type!=="element"||p.tagName!=="p")&&c.push({type:"text",value:`
|
|
56
|
-
`}),p.type==="element"&&p.tagName==="p"&&!l?c.push(...p.children):c.push(p)}const h=a[a.length-1];h&&(l||h.type!=="element"||h.tagName!=="p")&&c.push({type:"text",value:`
|
|
57
|
-
`});const m={type:"element",tagName:"li",properties:u,children:c};return e.patch(t,m),e.applyData(t,m)}function tk(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let a=-1;for(;!t&&++a<n.length;)t=Cx(n[a])}return t}function Cx(e){const t=e.spread;return t??e.children.length>1}function nk(e,t){const n={},a=e.all(t);let l=-1;for(typeof t.start=="number"&&t.start!==1&&(n.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")){n.className=["contains-task-list"];break}}const u={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(a,!0)};return e.patch(t,u),e.applyData(t,u)}function rk(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ak(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function ik(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function lk(e,t){const n=e.all(t),a=n.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(n.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},f=p1(t.children[1]),h=ax(t.children[t.children.length-1]);f&&h&&(c.position={start:f,end:h}),l.push(c)}const u={type:"element",tagName:"table",properties:{},children:e.wrap(l,!0)};return e.patch(t,u),e.applyData(t,u)}function sk(e,t,n){const a=n?n.children:void 0,u=(a?a.indexOf(t):1)===0?"th":"td",c=n&&n.type==="table"?n.align:void 0,f=c?c.length:t.children.length;let h=-1;const m=[];for(;++h<f;){const y=t.children[h],k={},x=c?c[h]:void 0;x&&(k.align=x);let C={type:"element",tagName:u,properties:k,children:[]};y&&(C.children=e.all(y),e.patch(y,C),C=e.applyData(y,C)),m.push(C)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(m,!0)};return e.patch(t,p),e.applyData(t,p)}function ok(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const M2=9,D2=32;function uk(e){const t=String(e),n=/\r?\n|\r/g;let a=n.exec(t),l=0;const u=[];for(;a;)u.push(z2(t.slice(l,a.index),l>0,!0),a[0]),l=a.index+a[0].length,a=n.exec(t);return u.push(z2(t.slice(l),l>0,!1)),u.join("")}function z2(e,t,n){let a=0,l=e.length;if(t){let u=e.codePointAt(a);for(;u===M2||u===D2;)a++,u=e.codePointAt(a)}if(n){let u=e.codePointAt(l-1);for(;u===M2||u===D2;)l--,u=e.codePointAt(l-1)}return l>a?e.slice(a,l):""}function ck(e,t){const n={type:"text",value:uk(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function dk(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const fk={blockquote:H9,break:$9,code:F9,delete:P9,emphasis:G9,footnoteReference:V9,heading:Y9,html:W9,imageReference:K9,image:X9,inlineCode:Z9,linkReference:Q9,link:J9,listItem:ek,list:nk,paragraph:rk,root:ak,strong:ik,table:lk,tableCell:ok,tableRow:sk,text:ck,thematicBreak:dk,toml:Td,yaml:Td,definition:Td,footnoteDefinition:Td};function Td(){}const Tx=-1,Cf=0,Pc=1,uf=2,k1=3,S1=4,j1=5,C1=6,Ax=7,Ex=8,hk=typeof self=="object"?self:globalThis,R2=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new hk[e](t)},mk=(e,t)=>{const n=(l,u)=>(e.set(u,l),l),a=l=>{if(e.has(l))return e.get(l);const[u,c]=t[l];switch(u){case Cf:case Tx:return n(c,l);case Pc:{const f=n([],l);for(const h of c)f.push(a(h));return f}case uf:{const f=n({},l);for(const[h,m]of c)f[a(h)]=a(m);return f}case k1:return n(new Date(c),l);case S1:{const{source:f,flags:h}=c;return n(new RegExp(f,h),l)}case j1:{const f=n(new Map,l);for(const[h,m]of c)f.set(a(h),a(m));return f}case C1:{const f=n(new Set,l);for(const h of c)f.add(a(h));return f}case Ax:{const{name:f,message:h}=c;return n(R2(f,h),l)}case Ex:return n(BigInt(c),l);case"BigInt":return n(Object(BigInt(c)),l);case"ArrayBuffer":return n(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:f}=new Uint8Array(c);return n(new DataView(f),c)}}return n(R2(u,c),l)};return a},O2=e=>mk(new Map,e)(0),Hs="",{toString:pk}={},{keys:gk}=Object,zc=e=>{const t=typeof e;if(t!=="object"||!e)return[Cf,t];const n=pk.call(e).slice(8,-1);switch(n){case"Array":return[Pc,Hs];case"Object":return[uf,Hs];case"Date":return[k1,Hs];case"RegExp":return[S1,Hs];case"Map":return[j1,Hs];case"Set":return[C1,Hs];case"DataView":return[Pc,n]}return n.includes("Array")?[Pc,n]:n.includes("Error")?[Ax,n]:[uf,n]},Ad=([e,t])=>e===Cf&&(t==="function"||t==="symbol"),yk=(e,t,n,a)=>{const l=(c,f)=>{const h=a.push(c)-1;return n.set(f,h),h},u=c=>{if(n.has(c))return n.get(c);let[f,h]=zc(c);switch(f){case Cf:{let p=c;switch(h){case"bigint":f=Ex,p=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+h);p=null;break;case"undefined":return l([Tx],c)}return l([f,p],c)}case Pc:{if(h){let k=c;return h==="DataView"?k=new Uint8Array(c.buffer):h==="ArrayBuffer"&&(k=new Uint8Array(c)),l([h,[...k]],c)}const p=[],y=l([f,p],c);for(const k of c)p.push(u(k));return y}case uf:{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 u(c.toJSON());const p=[],y=l([f,p],c);for(const k of gk(c))(e||!Ad(zc(c[k])))&&p.push([u(k),u(c[k])]);return y}case k1:return l([f,isNaN(c.getTime())?Hs:c.toISOString()],c);case S1:{const{source:p,flags:y}=c;return l([f,{source:p,flags:y}],c)}case j1:{const p=[],y=l([f,p],c);for(const[k,x]of c)(e||!(Ad(zc(k))||Ad(zc(x))))&&p.push([u(k),u(x)]);return y}case C1:{const p=[],y=l([f,p],c);for(const k of c)(e||!Ad(zc(k)))&&p.push(u(k));return y}}const{message:m}=c;return l([f,{name:h,message:m}],c)};return u},I2=(e,{json:t,lossy:n}={})=>{const a=[];return yk(!(t||n),!!t,new Map,a)(e),a},cf=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?O2(I2(e,t)):structuredClone(e):(e,t)=>O2(I2(e,t));function vk(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function xk(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function bk(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||vk,a=e.options.footnoteBackLabel||xk,l=e.options.footnoteLabel||"Footnotes",u=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 p=e.all(m),y=String(m.identifier).toUpperCase(),k=pu(y.toLowerCase());let x=0;const C=[],M=e.footnoteCounts.get(y);for(;M!==void 0&&++x<=M;){C.length>0&&C.push({type:"text",value:" "});let N=typeof n=="string"?n:n(h,x);typeof N=="string"&&(N={type:"text",value:N}),C.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+k+(x>1?"-"+x:""),dataFootnoteBackref:"",ariaLabel:typeof a=="string"?a:a(h,x),className:["data-footnote-backref"]},children:Array.isArray(N)?N:[N]})}const I=p[p.length-1];if(I&&I.type==="element"&&I.tagName==="p"){const N=I.children[I.children.length-1];N&&N.type==="text"?N.value+=" ":I.children.push({type:"text",value:" "}),I.children.push(...C)}else p.push(...C);const _={type:"element",tagName:"li",properties:{id:t+"fn-"+k},children:e.wrap(p,!0)};e.patch(m,_),f.push(_)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:u,properties:{...cf(c),id:"footnote-label"},children:[{type:"text",value:l}]},{type:"text",value:`
|
|
58
|
-
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
|
|
59
|
-
`}]}}const s0=(function(e){if(e==null)return jk;if(typeof e=="function")return Tf(e);if(typeof e=="object")return Array.isArray(e)?wk(e):kk(e);if(typeof e=="string")return Sk(e);throw new Error("Expected function, string, or object as test")});function wk(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=s0(e[n]);return Tf(a);function a(...l){let u=-1;for(;++u<t.length;)if(t[u].apply(this,l))return!0;return!1}}function kk(e){const t=e;return Tf(n);function n(a){const l=a;let u;for(u in e)if(l[u]!==t[u])return!1;return!0}}function Sk(e){return Tf(t);function t(n){return n&&n.type===e}}function Tf(e){return t;function t(n,a,l){return!!(Ck(n)&&e.call(this,n,typeof a=="number"?a:void 0,l||void 0))}}function jk(){return!0}function Ck(e){return e!==null&&typeof e=="object"&&"type"in e}const Nx=[],Tk=!0,Ap=!1,Mx="skip";function T1(e,t,n,a){let l;typeof t=="function"&&typeof n!="function"?(a=n,n=t):l=t;const u=s0(l),c=a?-1:1;f(e,void 0,[])();function f(h,m,p){const y=h&&typeof h=="object"?h:{};if(typeof y.type=="string"){const x=typeof y.tagName=="string"?y.tagName:typeof y.name=="string"?y.name:void 0;Object.defineProperty(k,"name",{value:"node ("+(h.type+(x?"<"+x+">":""))+")"})}return k;function k(){let x=Nx,C,M,I;if((!t||u(h,m,p[p.length-1]||void 0))&&(x=Ak(n(h,p)),x[0]===Ap))return x;if("children"in h&&h.children){const _=h;if(_.children&&x[0]!==Mx)for(M=(a?_.children.length:-1)+c,I=p.concat(_);M>-1&&M<_.children.length;){const N=_.children[M];if(C=f(N,M,I)(),C[0]===Ap)return C;M=typeof C[1]=="number"?C[1]:M+c}}return x}}}function Ak(e){return Array.isArray(e)?e:typeof e=="number"?[Tk,e]:e==null?Nx:[e]}function A1(e,t,n,a){let l,u,c;typeof t=="function"&&typeof n!="function"?(u=void 0,c=t,l=n):(u=t,c=n,l=a),T1(e,u,f,l);function f(h,m){const p=m[m.length-1],y=p?p.children.indexOf(h):void 0;return c(h,y,p)}}const Ep={}.hasOwnProperty,Ek={};function Nk(e,t){const n=t||Ek,a=new Map,l=new Map,u=new Map,c={...fk,...n.handlers},f={all:m,applyData:Dk,definitionById:a,footnoteById:l,footnoteCounts:u,footnoteOrder:[],handlers:c,one:h,options:n,patch:Mk,wrap:Rk};return A1(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const y=p.type==="definition"?a:l,k=String(p.identifier).toUpperCase();y.has(k)||y.set(k,p)}}),f;function h(p,y){const k=p.type,x=f.handlers[k];if(Ep.call(f.handlers,k)&&x)return x(f,p,y);if(f.options.passThrough&&f.options.passThrough.includes(k)){if("children"in p){const{children:M,...I}=p,_=cf(I);return _.children=f.all(p),_}return cf(p)}return(f.options.unknownHandler||zk)(f,p,y)}function m(p){const y=[];if("children"in p){const k=p.children;let x=-1;for(;++x<k.length;){const C=f.one(k[x],p);if(C){if(x&&k[x-1].type==="break"&&(!Array.isArray(C)&&C.type==="text"&&(C.value=_2(C.value)),!Array.isArray(C)&&C.type==="element")){const M=C.children[0];M&&M.type==="text"&&(M.value=_2(M.value))}Array.isArray(C)?y.push(...C):y.push(C)}}}return y}}function Mk(e,t){e.position&&(t.position=v8(e))}function Dk(e,t){let n=t;if(e&&e.data){const a=e.data.hName,l=e.data.hChildren,u=e.data.hProperties;if(typeof a=="string")if(n.type==="element")n.tagName=a;else{const c="children"in n?n.children:[n];n={type:"element",tagName:a,properties:{},children:c}}n.type==="element"&&u&&Object.assign(n.properties,cf(u)),"children"in n&&n.children&&l!==null&&l!==void 0&&(n.children=l)}return n}function zk(e,t){const n=t.data||{},a="value"in t&&!(Ep.call(n,"hProperties")||Ep.call(n,"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 Rk(e,t){const n=[];let a=-1;for(t&&n.push({type:"text",value:`
|
|
60
|
-
`});++a<e.length;)a&&n.push({type:"text",value:`
|
|
61
|
-
`}),n.push(e[a]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
62
|
-
`}),n}function _2(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function L2(e,t){const n=Nk(e,t),a=n.one(e,void 0),l=bk(n),u=Array.isArray(a)?{type:"root",children:a}:a||{type:"root",children:[]};return l&&u.children.push({type:"text",value:`
|
|
63
|
-
`},l),u}function Ok(e,t){return e&&"run"in e?async function(n,a){const l=L2(n,{file:a,...t});await e.run(l,a)}:function(n,a){return L2(n,{file:a,...e||t})}}function B2(e){if(e)throw e}var Dm,q2;function Ik(){if(q2)return Dm;q2=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,a=Object.getOwnPropertyDescriptor,l=function(m){return typeof Array.isArray=="function"?Array.isArray(m):t.call(m)==="[object Array]"},u=function(m){if(!m||t.call(m)!=="[object Object]")return!1;var p=e.call(m,"constructor"),y=m.constructor&&m.constructor.prototype&&e.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!p&&!y)return!1;var k;for(k in m);return typeof k>"u"||e.call(m,k)},c=function(m,p){n&&p.name==="__proto__"?n(m,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):m[p.name]=p.newValue},f=function(m,p){if(p==="__proto__")if(e.call(m,p)){if(a)return a(m,p).value}else return;return m[p]};return Dm=function h(){var m,p,y,k,x,C,M=arguments[0],I=1,_=arguments.length,N=!1;for(typeof M=="boolean"&&(N=M,M=arguments[1]||{},I=2),(M==null||typeof M!="object"&&typeof M!="function")&&(M={});I<_;++I)if(m=arguments[I],m!=null)for(p in m)y=f(M,p),k=f(m,p),M!==k&&(N&&k&&(u(k)||(x=l(k)))?(x?(x=!1,C=y&&l(y)?y:[]):C=y&&u(y)?y:{},c(M,{name:p,newValue:h(N,C,k)})):typeof k<"u"&&c(M,{name:p,newValue:k}));return M},Dm}var _k=Ik();const zm=V3(_k);function Np(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 Lk(){const e=[],t={run:n,use:a};return t;function n(...l){let u=-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 p=e[++u];let y=-1;if(h){c(h);return}for(;++y<l.length;)(m[y]===null||m[y]===void 0)&&(m[y]=l[y]);l=m,p?Bk(p,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 Bk(e,t){let n;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 p=m;if(f&&n)throw p;return l(p)}f||(h&&h.then&&typeof h.then=="function"?h.then(u,l):h instanceof Error?l(h):u(h))}function l(c,...f){n||(n=!0,t(c,...f))}function u(c){l(null,c)}}const ri={basename:qk,dirname:Uk,extname:Hk,join:$k,sep:"/"};function qk(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');o0(e);let n=0,a=-1,l=e.length,u;if(t===void 0||t.length===0||t.length>e.length){for(;l--;)if(e.codePointAt(l)===47){if(u){n=l+1;break}}else a<0&&(u=!0,a=l+1);return a<0?"":e.slice(n,a)}if(t===e)return"";let c=-1,f=t.length-1;for(;l--;)if(e.codePointAt(l)===47){if(u){n=l+1;break}}else c<0&&(u=!0,c=l+1),f>-1&&(e.codePointAt(l)===t.codePointAt(f--)?f<0&&(a=l):(f=-1,a=c));return n===a?a=c:a<0&&(a=e.length),e.slice(n,a)}function Uk(e){if(o0(e),e.length===0)return".";let t=-1,n=e.length,a;for(;--n;)if(e.codePointAt(n)===47){if(a){t=n;break}}else a||(a=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Hk(e){o0(e);let t=e.length,n=-1,a=0,l=-1,u=0,c;for(;t--;){const f=e.codePointAt(t);if(f===47){if(c){a=t+1;break}continue}n<0&&(c=!0,n=t+1),f===46?l<0?l=t:u!==1&&(u=1):l>-1&&(u=-1)}return l<0||n<0||u===0||u===1&&l===n-1&&l===a+1?"":e.slice(l,n)}function $k(...e){let t=-1,n;for(;++t<e.length;)o0(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Fk(n)}function Fk(e){o0(e);const t=e.codePointAt(0)===47;let n=Pk(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Pk(e,t){let n="",a=0,l=-1,u=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||u===1))if(l!==c-1&&u===2){if(n.length<2||a!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(h=n.lastIndexOf("/"),h!==n.length-1){h<0?(n="",a=0):(n=n.slice(0,h),a=n.length-1-n.lastIndexOf("/")),l=c,u=0;continue}}else if(n.length>0){n="",a=0,l=c,u=0;continue}}t&&(n=n.length>0?n+"/..":"..",a=2)}else n.length>0?n+="/"+e.slice(l+1,c):n=e.slice(l+1,c),a=c-l-1;l=c,u=0}else f===46&&u>-1?u++:u=-1}return n}function o0(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Gk={cwd:Vk};function Vk(){return"/"}function Mp(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Yk(e){if(typeof e=="string")e=new URL(e);else if(!Mp(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 Wk(e)}function Wk(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 n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const a=t.codePointAt(n+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 Rm=["history","path","basename","stem","extname","dirname"];class Dx{constructor(t){let n;t?Mp(t)?n={path:t}:typeof t=="string"||Kk(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":Gk.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let a=-1;for(;++a<Rm.length;){const u=Rm[a];u in n&&n[u]!==void 0&&n[u]!==null&&(this[u]=u==="history"?[...n[u]]:n[u])}let l;for(l in n)Rm.includes(l)||(this[l]=n[l])}get basename(){return typeof this.path=="string"?ri.basename(this.path):void 0}set basename(t){Im(t,"basename"),Om(t,"basename"),this.path=ri.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?ri.dirname(this.path):void 0}set dirname(t){U2(this.basename,"dirname"),this.path=ri.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?ri.extname(this.path):void 0}set extname(t){if(Om(t,"extname"),U2(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=ri.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Mp(t)&&(t=Yk(t)),Im(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?ri.basename(this.path,this.extname):void 0}set stem(t){Im(t,"stem"),Om(t,"stem"),this.path=ri.join(this.dirname||"",t+(this.extname||""))}fail(t,n,a){const l=this.message(t,n,a);throw l.fatal=!0,l}info(t,n,a){const l=this.message(t,n,a);return l.fatal=void 0,l}message(t,n,a){const l=new Qn(t,n,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 Om(e,t){if(e&&e.includes(ri.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+ri.sep+"`")}function Im(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function U2(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Kk(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Xk=(function(e){const a=this.constructor.prototype,l=a[e],u=function(){return l.apply(u,arguments)};return Object.setPrototypeOf(u,a),u}),Zk={}.hasOwnProperty;class E1 extends Xk{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=Lk()}copy(){const t=new E1;let n=-1;for(;++n<this.attachers.length;){const a=this.attachers[n];t.use(...a)}return t.data(zm(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Bm("data",this.frozen),this.namespace[t]=n,this):Zk.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Bm("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[n,...a]=this.attachers[this.freezeIndex];if(a[0]===!1)continue;a[0]===!0&&(a[0]=void 0);const l=n.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 n=Ed(t),a=this.parser||this.Parser;return _m("parse",a),a(String(n),n)}process(t,n){const a=this;return this.freeze(),_m("process",this.parser||this.Parser),Lm("process",this.compiler||this.Compiler),n?l(void 0,n):new Promise(l);function l(u,c){const f=Ed(t),h=a.parse(f);a.run(h,f,function(p,y,k){if(p||!y||!k)return m(p);const x=y,C=a.stringify(x,k);eS(C)?k.value=C:k.result=C,m(p,k)});function m(p,y){p||!y?c(p):u?u(y):n(void 0,y)}}}processSync(t){let n=!1,a;return this.freeze(),_m("processSync",this.parser||this.Parser),Lm("processSync",this.compiler||this.Compiler),this.process(t,l),$2("processSync","process",n),a;function l(u,c){n=!0,B2(u),a=c}}run(t,n,a){H2(t),this.freeze();const l=this.transformers;return!a&&typeof n=="function"&&(a=n,n=void 0),a?u(void 0,a):new Promise(u);function u(c,f){const h=Ed(n);l.run(t,h,m);function m(p,y,k){const x=y||t;p?f(p):c?c(x):a(void 0,x,k)}}}runSync(t,n){let a=!1,l;return this.run(t,n,u),$2("runSync","run",a),l;function u(c,f){B2(c),l=f,a=!0}}stringify(t,n){this.freeze();const a=Ed(n),l=this.compiler||this.Compiler;return Lm("stringify",l),H2(t),l(t,a)}use(t,...n){const a=this.attachers,l=this.namespace;if(Bm("use",this.frozen),t!=null)if(typeof t=="function")h(t,n);else if(typeof t=="object")Array.isArray(t)?f(t):c(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function u(m){if(typeof m=="function")h(m,[]);else if(typeof m=="object")if(Array.isArray(m)){const[p,...y]=m;h(p,y)}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=zm(!0,l.settings,m.settings))}function f(m){let p=-1;if(m!=null)if(Array.isArray(m))for(;++p<m.length;){const y=m[p];u(y)}else throw new TypeError("Expected a list of plugins, not `"+m+"`")}function h(m,p){let y=-1,k=-1;for(;++y<a.length;)if(a[y][0]===m){k=y;break}if(k===-1)a.push([m,...p]);else if(p.length>0){let[x,...C]=p;const M=a[k][1];Np(M)&&Np(x)&&(x=zm(!0,M,x)),a[k]=[m,x,...C]}}}}const Qk=new E1().freeze();function _m(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Lm(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Bm(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 H2(e){if(!Np(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function $2(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ed(e){return Jk(e)?e:new Dx(e)}function Jk(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function eS(e){return typeof e=="string"||tS(e)}function tS(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const nS="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",F2=[],P2={allowDangerousHtml:!0},rS=/^(https?|ircs?|mailto|xmpp)$/i,aS=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function iS(e){const t=lS(e),n=sS(e);return oS(t.runSync(t.parse(n),n),e)}function lS(e){const t=e.rehypePlugins||F2,n=e.remarkPlugins||F2,a=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...P2}:P2;return Qk().use(U9).use(n).use(Ok,a).use(t)}function sS(e){const t=e.children||"",n=new Dx;return typeof t=="string"&&(n.value=t),n}function oS(e,t){const n=t.allowedElements,a=t.allowElement,l=t.components,u=t.disallowedElements,c=t.skipHtml,f=t.unwrapDisallowed,h=t.urlTransform||zx;for(const p of aS)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+nS+p.id,void 0);return A1(e,m),S8(e,{Fragment:s.Fragment,components:l,ignoreInvalidStyle:!0,jsx:s.jsx,jsxs:s.jsxs,passKeys:!0,passNode:!0});function m(p,y,k){if(p.type==="raw"&&k&&typeof y=="number")return c?k.children.splice(y,1):k.children[y]={type:"text",value:p.value},y;if(p.type==="element"){let x;for(x in Em)if(Object.hasOwn(Em,x)&&Object.hasOwn(p.properties,x)){const C=p.properties[x],M=Em[x];(M===null||M.includes(p.tagName))&&(p.properties[x]=h(String(C||""),x,p))}}if(p.type==="element"){let x=n?!n.includes(p.tagName):u?u.includes(p.tagName):!1;if(!x&&a&&typeof y=="number"&&(x=!a(p,y,k)),x&&k&&typeof y=="number")return f&&p.children?k.children.splice(y,1,...p.children):k.children.splice(y,1),y}}}function zx(e){const t=e.indexOf(":"),n=e.indexOf("?"),a=e.indexOf("#"),l=e.indexOf("/");return t===-1||l!==-1&&t>l||n!==-1&&t>n||a!==-1&&t>a||rS.test(e.slice(0,t))?e:""}function G2(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let a=0,l=n.indexOf(t);for(;l!==-1;)a++,l=n.indexOf(t,l+t.length);return a}function uS(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function cS(e,t,n){const l=s0((n||{}).ignore||[]),u=dS(t);let c=-1;for(;++c<u.length;)T1(e,"text",f);function f(m,p){let y=-1,k;for(;++y<p.length;){const x=p[y],C=k?k.children:void 0;if(l(x,C?C.indexOf(x):void 0,k))return;k=x}if(k)return h(m,p)}function h(m,p){const y=p[p.length-1],k=u[c][0],x=u[c][1];let C=0;const I=y.children.indexOf(m);let _=!1,N=[];k.lastIndex=0;let q=k.exec(m.value);for(;q;){const R=q.index,X={index:q.index,input:q.input,stack:[...p,m]};let P=x(...q,X);if(typeof P=="string"&&(P=P.length>0?{type:"text",value:P}:void 0),P===!1?k.lastIndex=R+1:(C!==R&&N.push({type:"text",value:m.value.slice(C,R)}),Array.isArray(P)?N.push(...P):P&&N.push(P),C=R+q[0].length,_=!0),!k.global)break;q=k.exec(m.value)}return _?(C<m.value.length&&N.push({type:"text",value:m.value.slice(C)}),y.children.splice(I,1,...N)):N=[m],I+N.length}}function dS(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let a=-1;for(;++a<n.length;){const l=n[a];t.push([fS(l[0]),hS(l[1])])}return t}function fS(e){return typeof e=="string"?new RegExp(uS(e),"g"):e}function hS(e){return typeof e=="function"?e:function(){return e}}const qm="phrasing",Um=["autolink","link","image","label"];function mS(){return{transforms:[wS],enter:{literalAutolink:gS,literalAutolinkEmail:Hm,literalAutolinkHttp:Hm,literalAutolinkWww:Hm},exit:{literalAutolink:bS,literalAutolinkEmail:xS,literalAutolinkHttp:yS,literalAutolinkWww:vS}}}function pS(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:qm,notInConstruct:Um},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:qm,notInConstruct:Um},{character:":",before:"[ps]",after:"\\/",inConstruct:qm,notInConstruct:Um}]}}function gS(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Hm(e){this.config.enter.autolinkProtocol.call(this,e)}function yS(e){this.config.exit.autolinkProtocol.call(this,e)}function vS(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 xS(e){this.config.exit.autolinkEmail.call(this,e)}function bS(e){this.exit(e)}function wS(e){cS(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,kS],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),SS]],{ignore:["link","linkReference"]})}function kS(e,t,n,a,l){let u="";if(!Rx(l)||(/^w/i.test(t)&&(n=t+n,t="",u="http://"),!jS(n)))return!1;const c=CS(n+a);if(!c[0])return!1;const f={type:"link",title:null,url:u+t+c[0],children:[{type:"text",value:t+c[0]}]};return c[1]?[f,{type:"text",value:c[1]}]:f}function SS(e,t,n,a){return!Rx(a,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function jS(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 CS(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],a=n.indexOf(")");const l=G2(e,"(");let u=G2(e,")");for(;a!==-1&&l>u;)e+=n.slice(0,a+1),n=n.slice(a+1),a=n.indexOf(")"),u++;return[e,n]}function Rx(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Ks(n)||Sf(n))&&(!t||n!==47)}Ox.peek=OS;function TS(){this.buffer()}function AS(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function ES(){this.buffer()}function NS(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function MS(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Oa(this.sliceSerialize(e)).toLowerCase(),n.label=t}function DS(e){this.exit(e)}function zS(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Oa(this.sliceSerialize(e)).toLowerCase(),n.label=t}function RS(e){this.exit(e)}function OS(){return"["}function Ox(e,t,n,a){const l=n.createTracker(a);let u=l.move("[^");const c=n.enter("footnoteReference"),f=n.enter("reference");return u+=l.move(n.safe(n.associationId(e),{after:"]",before:u})),f(),c(),u+=l.move("]"),u}function IS(){return{enter:{gfmFootnoteCallString:TS,gfmFootnoteCall:AS,gfmFootnoteDefinitionLabelString:ES,gfmFootnoteDefinition:NS},exit:{gfmFootnoteCallString:MS,gfmFootnoteCall:DS,gfmFootnoteDefinitionLabelString:zS,gfmFootnoteDefinition:RS}}}function _S(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Ox},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(a,l,u,c){const f=u.createTracker(c);let h=f.move("[^");const m=u.enter("footnoteDefinition"),p=u.enter("label");return h+=f.move(u.safe(u.associationId(a),{before:h,after:"]"})),p(),h+=f.move("]:"),a.children&&a.children.length>0&&(f.shift(4),h+=f.move((t?`
|
|
64
|
-
`:" ")+u.indentLines(u.containerFlow(a,f.current()),t?Ix:LS))),m(),h}}function LS(e,t,n){return t===0?e:Ix(e,t,n)}function Ix(e,t,n){return(n?"":" ")+e}const BS=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];_x.peek=FS;function qS(){return{canContainEols:["delete"],enter:{strikethrough:HS},exit:{strikethrough:$S}}}function US(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:BS}],handlers:{delete:_x}}}function HS(e){this.enter({type:"delete",children:[]},e)}function $S(e){this.exit(e)}function _x(e,t,n,a){const l=n.createTracker(a),u=n.enter("strikethrough");let c=l.move("~~");return c+=n.containerPhrasing(e,{...l.current(),before:c,after:"~"}),c+=l.move("~~"),u(),c}function FS(){return"~"}function PS(e){return e.length}function GS(e,t){const n=t||{},a=(n.align||[]).concat(),l=n.stringLength||PS,u=[],c=[],f=[],h=[];let m=0,p=-1;for(;++p<e.length;){const M=[],I=[];let _=-1;for(e[p].length>m&&(m=e[p].length);++_<e[p].length;){const N=VS(e[p][_]);if(n.alignDelimiters!==!1){const q=l(N);I[_]=q,(h[_]===void 0||q>h[_])&&(h[_]=q)}M.push(N)}c[p]=M,f[p]=I}let y=-1;if(typeof a=="object"&&"length"in a)for(;++y<m;)u[y]=V2(a[y]);else{const M=V2(a);for(;++y<m;)u[y]=M}y=-1;const k=[],x=[];for(;++y<m;){const M=u[y];let I="",_="";M===99?(I=":",_=":"):M===108?I=":":M===114&&(_=":");let N=n.alignDelimiters===!1?1:Math.max(1,h[y]-I.length-_.length);const q=I+"-".repeat(N)+_;n.alignDelimiters!==!1&&(N=I.length+N+_.length,N>h[y]&&(h[y]=N),x[y]=N),k[y]=q}c.splice(1,0,k),f.splice(1,0,x),p=-1;const C=[];for(;++p<c.length;){const M=c[p],I=f[p];y=-1;const _=[];for(;++y<m;){const N=M[y]||"";let q="",R="";if(n.alignDelimiters!==!1){const X=h[y]-(I[y]||0),P=u[y];P===114?q=" ".repeat(X):P===99?X%2?(q=" ".repeat(X/2+.5),R=" ".repeat(X/2-.5)):(q=" ".repeat(X/2),R=q):R=" ".repeat(X)}n.delimiterStart!==!1&&!y&&_.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&N==="")&&(n.delimiterStart!==!1||y)&&_.push(" "),n.alignDelimiters!==!1&&_.push(q),_.push(N),n.alignDelimiters!==!1&&_.push(R),n.padding!==!1&&_.push(" "),(n.delimiterEnd!==!1||y!==m-1)&&_.push("|")}C.push(n.delimiterEnd===!1?_.join("").replace(/ +$/,""):_.join(""))}return C.join(`
|
|
65
|
-
`)}function VS(e){return e==null?"":String(e)}function V2(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 YS(e,t,n,a){const l=n.enter("blockquote"),u=n.createTracker(a);u.move("> "),u.shift(2);const c=n.indentLines(n.containerFlow(e,u.current()),WS);return l(),c}function WS(e,t,n){return">"+(n?"":" ")+e}function KS(e,t){return Y2(e,t.inConstruct,!0)&&!Y2(e,t.notInConstruct,!1)}function Y2(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let a=-1;for(;++a<t.length;)if(e.includes(t[a]))return!0;return!1}function W2(e,t,n,a){let l=-1;for(;++l<n.unsafe.length;)if(n.unsafe[l].character===`
|
|
66
|
-
`&&KS(n.stack,n.unsafe[l]))return/[ \t]/.test(a.before)?"":" ";return`\\
|
|
67
|
-
`}function Lx(e,t){const n=String(e);let a=n.indexOf(t),l=a,u=0,c=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;a!==-1;)a===l?++u>c&&(c=u):u=1,l=a+t.length,a=n.indexOf(t,l);return c}function XS(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 ZS(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 QS(e,t,n,a){const l=ZS(n),u=e.value||"",c=l==="`"?"GraveAccent":"Tilde";if(XS(e,n)){const y=n.enter("codeIndented"),k=n.indentLines(u,JS);return y(),k}const f=n.createTracker(a),h=l.repeat(Math.max(Lx(u,l)+1,3)),m=n.enter("codeFenced");let p=f.move(h);if(e.lang){const y=n.enter(`codeFencedLang${c}`);p+=f.move(n.safe(e.lang,{before:p,after:" ",encode:["`"],...f.current()})),y()}if(e.lang&&e.meta){const y=n.enter(`codeFencedMeta${c}`);p+=f.move(" "),p+=f.move(n.safe(e.meta,{before:p,after:`
|
|
68
|
-
`,encode:["`"],...f.current()})),y()}return p+=f.move(`
|
|
69
|
-
`),u&&(p+=f.move(u+`
|
|
70
|
-
`)),p+=f.move(h),m(),p}function JS(e,t,n){return(n?"":" ")+e}function N1(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 ej(e,t,n,a){const l=N1(n),u=l==='"'?"Quote":"Apostrophe",c=n.enter("definition");let f=n.enter("label");const h=n.createTracker(a);let m=h.move("[");return m+=h.move(n.safe(n.associationId(e),{before:m,after:"]",...h.current()})),m+=h.move("]: "),f(),!e.url||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),m+=h.move("<"),m+=h.move(n.safe(e.url,{before:m,after:">",...h.current()})),m+=h.move(">")):(f=n.enter("destinationRaw"),m+=h.move(n.safe(e.url,{before:m,after:e.title?" ":`
|
|
71
|
-
`,...h.current()}))),f(),e.title&&(f=n.enter(`title${u}`),m+=h.move(" "+l),m+=h.move(n.safe(e.title,{before:m,after:l,...h.current()})),m+=h.move(l),f()),c(),m}function tj(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 Jc(e){return"&#x"+e.toString(16).toUpperCase()+";"}function df(e,t,n){const a=uu(e),l=uu(t);return a===void 0?l===void 0?n==="_"?{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}}Bx.peek=nj;function Bx(e,t,n,a){const l=tj(n),u=n.enter("emphasis"),c=n.createTracker(a),f=c.move(l);let h=c.move(n.containerPhrasing(e,{after:l,before:f,...c.current()}));const m=h.charCodeAt(0),p=df(a.before.charCodeAt(a.before.length-1),m,l);p.inside&&(h=Jc(m)+h.slice(1));const y=h.charCodeAt(h.length-1),k=df(a.after.charCodeAt(0),y,l);k.inside&&(h=h.slice(0,-1)+Jc(y));const x=c.move(l);return u(),n.attentionEncodeSurroundingInfo={after:k.outside,before:p.outside},f+h+x}function nj(e,t,n){return n.options.emphasis||"*"}function rj(e,t){let n=!1;return A1(e,function(a){if("value"in a&&/\r?\n|\r/.test(a.value)||a.type==="break")return n=!0,Ap}),!!((!e.depth||e.depth<3)&&x1(e)&&(t.options.setext||n))}function aj(e,t,n,a){const l=Math.max(Math.min(6,e.depth||1),1),u=n.createTracker(a);if(rj(e,n)){const p=n.enter("headingSetext"),y=n.enter("phrasing"),k=n.containerPhrasing(e,{...u.current(),before:`
|
|
72
|
-
`,after:`
|
|
73
|
-
`});return y(),p(),k+`
|
|
74
|
-
`+(l===1?"=":"-").repeat(k.length-(Math.max(k.lastIndexOf("\r"),k.lastIndexOf(`
|
|
75
|
-
`))+1))}const c="#".repeat(l),f=n.enter("headingAtx"),h=n.enter("phrasing");u.move(c+" ");let m=n.containerPhrasing(e,{before:"# ",after:`
|
|
76
|
-
`,...u.current()});return/^[\t ]/.test(m)&&(m=Jc(m.charCodeAt(0))+m.slice(1)),m=m?c+" "+m:c,n.options.closeAtx&&(m+=" "+c),h(),f(),m}qx.peek=ij;function qx(e){return e.value||""}function ij(){return"<"}Ux.peek=lj;function Ux(e,t,n,a){const l=N1(n),u=l==='"'?"Quote":"Apostrophe",c=n.enter("image");let f=n.enter("label");const h=n.createTracker(a);let m=h.move("![");return m+=h.move(n.safe(e.alt,{before:m,after:"]",...h.current()})),m+=h.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),m+=h.move("<"),m+=h.move(n.safe(e.url,{before:m,after:">",...h.current()})),m+=h.move(">")):(f=n.enter("destinationRaw"),m+=h.move(n.safe(e.url,{before:m,after:e.title?" ":")",...h.current()}))),f(),e.title&&(f=n.enter(`title${u}`),m+=h.move(" "+l),m+=h.move(n.safe(e.title,{before:m,after:l,...h.current()})),m+=h.move(l),f()),m+=h.move(")"),c(),m}function lj(){return"!"}Hx.peek=sj;function Hx(e,t,n,a){const l=e.referenceType,u=n.enter("imageReference");let c=n.enter("label");const f=n.createTracker(a);let h=f.move("![");const m=n.safe(e.alt,{before:h,after:"]",...f.current()});h+=f.move(m+"]["),c();const p=n.stack;n.stack=[],c=n.enter("reference");const y=n.safe(n.associationId(e),{before:h,after:"]",...f.current()});return c(),n.stack=p,u(),l==="full"||!m||m!==y?h+=f.move(y+"]"):l==="shortcut"?h=h.slice(0,-1):h+=f.move("]"),h}function sj(){return"!"}$x.peek=oj;function $x(e,t,n){let a=e.value||"",l="`",u=-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+" ");++u<n.unsafe.length;){const c=n.unsafe[u],f=n.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 oj(){return"`"}function Fx(e,t){const n=x1(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Px.peek=uj;function Px(e,t,n,a){const l=N1(n),u=l==='"'?"Quote":"Apostrophe",c=n.createTracker(a);let f,h;if(Fx(e,n)){const p=n.stack;n.stack=[],f=n.enter("autolink");let y=c.move("<");return y+=c.move(n.containerPhrasing(e,{before:y,after:">",...c.current()})),y+=c.move(">"),f(),n.stack=p,y}f=n.enter("link"),h=n.enter("label");let m=c.move("[");return m+=c.move(n.containerPhrasing(e,{before:m,after:"](",...c.current()})),m+=c.move("]("),h(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(h=n.enter("destinationLiteral"),m+=c.move("<"),m+=c.move(n.safe(e.url,{before:m,after:">",...c.current()})),m+=c.move(">")):(h=n.enter("destinationRaw"),m+=c.move(n.safe(e.url,{before:m,after:e.title?" ":")",...c.current()}))),h(),e.title&&(h=n.enter(`title${u}`),m+=c.move(" "+l),m+=c.move(n.safe(e.title,{before:m,after:l,...c.current()})),m+=c.move(l),h()),m+=c.move(")"),f(),m}function uj(e,t,n){return Fx(e,n)?"<":"["}Gx.peek=cj;function Gx(e,t,n,a){const l=e.referenceType,u=n.enter("linkReference");let c=n.enter("label");const f=n.createTracker(a);let h=f.move("[");const m=n.containerPhrasing(e,{before:h,after:"]",...f.current()});h+=f.move(m+"]["),c();const p=n.stack;n.stack=[],c=n.enter("reference");const y=n.safe(n.associationId(e),{before:h,after:"]",...f.current()});return c(),n.stack=p,u(),l==="full"||!m||m!==y?h+=f.move(y+"]"):l==="shortcut"?h=h.slice(0,-1):h+=f.move("]"),h}function cj(){return"["}function M1(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 dj(e){const t=M1(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function fj(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 Vx(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 hj(e,t,n,a){const l=n.enter("list"),u=n.bulletCurrent;let c=e.ordered?fj(n):M1(n);const f=e.ordered?c==="."?")":".":dj(n);let h=t&&n.bulletLastUsed?c===n.bulletLastUsed:!1;if(!e.ordered){const p=e.children?e.children[0]:void 0;if((c==="*"||c==="-")&&p&&(!p.children||!p.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(h=!0),Vx(n)===c&&p){let y=-1;for(;++y<e.children.length;){const k=e.children[y];if(k&&k.type==="listItem"&&k.children&&k.children[0]&&k.children[0].type==="thematicBreak"){h=!0;break}}}}h&&(c=f),n.bulletCurrent=c;const m=n.containerFlow(e,a);return n.bulletLastUsed=c,n.bulletCurrent=u,l(),m}function mj(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 pj(e,t,n,a){const l=mj(n);let u=n.bulletCurrent||M1(n);t&&t.type==="list"&&t.ordered&&(u=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+u);let c=u.length+1;(l==="tab"||l==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(c=Math.ceil(c/4)*4);const f=n.createTracker(a);f.move(u+" ".repeat(c-u.length)),f.shift(c);const h=n.enter("listItem"),m=n.indentLines(n.containerFlow(e,f.current()),p);return h(),m;function p(y,k,x){return k?(x?"":" ".repeat(c))+y:(x?u:u+" ".repeat(c-u.length))+y}}function gj(e,t,n,a){const l=n.enter("paragraph"),u=n.enter("phrasing"),c=n.containerPhrasing(e,a);return u(),l(),c}const yj=s0(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function vj(e,t,n,a){return(e.children.some(function(c){return yj(c)})?n.containerPhrasing:n.containerFlow).call(n,e,a)}function xj(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Yx.peek=bj;function Yx(e,t,n,a){const l=xj(n),u=n.enter("strong"),c=n.createTracker(a),f=c.move(l+l);let h=c.move(n.containerPhrasing(e,{after:l,before:f,...c.current()}));const m=h.charCodeAt(0),p=df(a.before.charCodeAt(a.before.length-1),m,l);p.inside&&(h=Jc(m)+h.slice(1));const y=h.charCodeAt(h.length-1),k=df(a.after.charCodeAt(0),y,l);k.inside&&(h=h.slice(0,-1)+Jc(y));const x=c.move(l+l);return u(),n.attentionEncodeSurroundingInfo={after:k.outside,before:p.outside},f+h+x}function bj(e,t,n){return n.options.strong||"*"}function wj(e,t,n,a){return n.safe(e.value,a)}function kj(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 Sj(e,t,n){const a=(Vx(n)+(n.options.ruleSpaces?" ":"")).repeat(kj(n));return n.options.ruleSpaces?a.slice(0,-1):a}const Wx={blockquote:YS,break:W2,code:QS,definition:ej,emphasis:Bx,hardBreak:W2,heading:aj,html:qx,image:Ux,imageReference:Hx,inlineCode:$x,link:Px,linkReference:Gx,list:hj,listItem:pj,paragraph:gj,root:vj,strong:Yx,text:wj,thematicBreak:Sj};function jj(){return{enter:{table:Cj,tableData:K2,tableHeader:K2,tableRow:Aj},exit:{codeText:Ej,table:Tj,tableData:$m,tableHeader:$m,tableRow:$m}}}function Cj(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function Tj(e){this.exit(e),this.data.inTable=void 0}function Aj(e){this.enter({type:"tableRow",children:[]},e)}function $m(e){this.exit(e)}function K2(e){this.enter({type:"tableCell",children:[]},e)}function Ej(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Nj));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Nj(e,t){return t==="|"?t:e}function Mj(e){const t=e||{},n=t.tableCellPadding,a=t.tablePipeAlign,l=t.stringLength,u=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
77
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:k,table:c,tableCell:h,tableRow:f}};function c(x,C,M,I){return m(p(x,M,I),x.align)}function f(x,C,M,I){const _=y(x,M,I),N=m([_]);return N.slice(0,N.indexOf(`
|
|
78
|
-
`))}function h(x,C,M,I){const _=M.enter("tableCell"),N=M.enter("phrasing"),q=M.containerPhrasing(x,{...I,before:u,after:u});return N(),_(),q}function m(x,C){return GS(x,{align:C,alignDelimiters:a,padding:n,stringLength:l})}function p(x,C,M){const I=x.children;let _=-1;const N=[],q=C.enter("table");for(;++_<I.length;)N[_]=y(I[_],C,M);return q(),N}function y(x,C,M){const I=x.children;let _=-1;const N=[],q=C.enter("tableRow");for(;++_<I.length;)N[_]=h(I[_],x,C,M);return q(),N}function k(x,C,M){let I=Wx.inlineCode(x,C,M);return M.stack.includes("tableCell")&&(I=I.replace(/\|/g,"\\$&")),I}}function Dj(){return{exit:{taskListCheckValueChecked:X2,taskListCheckValueUnchecked:X2,paragraph:Rj}}}function zj(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Oj}}}function X2(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Rj(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const a=n.children[0];if(a&&a.type==="text"){const l=t.children;let u=-1,c;for(;++u<l.length;){const f=l[u];if(f.type==="paragraph"){c=f;break}}c===n&&(a.value=a.value.slice(1),a.value.length===0?n.children.shift():n.position&&a.position&&typeof a.position.start.offset=="number"&&(a.position.start.column++,a.position.start.offset++,n.position.start=Object.assign({},a.position.start)))}}this.exit(e)}function Oj(e,t,n,a){const l=e.children[0],u=typeof e.checked=="boolean"&&l&&l.type==="paragraph",c="["+(e.checked?"x":" ")+"] ",f=n.createTracker(a);u&&f.move(c);let h=Wx.listItem(e,t,n,{...a,...f.current()});return u&&(h=h.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,m)),h;function m(p){return p+c}}function Ij(){return[mS(),IS(),qS(),jj(),Dj()]}function _j(e){return{extensions:[pS(),_S(e),US(),Mj(e),zj()]}}const Lj={tokenize:Fj,partial:!0},Kx={tokenize:Pj,partial:!0},Xx={tokenize:Gj,partial:!0},Zx={tokenize:Vj,partial:!0},Bj={tokenize:Yj,partial:!0},Qx={name:"wwwAutolink",tokenize:Hj,previous:e5},Jx={name:"protocolAutolink",tokenize:$j,previous:t5},Qi={name:"emailAutolink",tokenize:Uj,previous:n5},oi={};function qj(){return{text:oi}}let Ls=48;for(;Ls<123;)oi[Ls]=Qi,Ls++,Ls===58?Ls=65:Ls===91&&(Ls=97);oi[43]=Qi;oi[45]=Qi;oi[46]=Qi;oi[95]=Qi;oi[72]=[Qi,Jx];oi[104]=[Qi,Jx];oi[87]=[Qi,Qx];oi[119]=[Qi,Qx];function Uj(e,t,n){const a=this;let l,u;return c;function c(y){return!Dp(y)||!n5.call(a,a.previous)||D1(a.events)?n(y):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(y))}function f(y){return Dp(y)?(e.consume(y),f):y===64?(e.consume(y),h):n(y)}function h(y){return y===46?e.check(Bj,p,m)(y):y===45||y===95||Xn(y)?(u=!0,e.consume(y),h):p(y)}function m(y){return e.consume(y),l=!0,h}function p(y){return u&&l&&fr(a.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(y)):n(y)}}function Hj(e,t,n){const a=this;return l;function l(c){return c!==87&&c!==119||!e5.call(a,a.previous)||D1(a.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Lj,e.attempt(Kx,e.attempt(Xx,u),n),n)(c))}function u(c){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(c)}}function $j(e,t,n){const a=this;let l="",u=!1;return c;function c(y){return(y===72||y===104)&&t5.call(a,a.previous)&&!D1(a.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),l+=String.fromCodePoint(y),e.consume(y),f):n(y)}function f(y){if(fr(y)&&l.length<5)return l+=String.fromCodePoint(y),e.consume(y),f;if(y===58){const k=l.toLowerCase();if(k==="http"||k==="https")return e.consume(y),h}return n(y)}function h(y){return y===47?(e.consume(y),u?m:(u=!0,h)):n(y)}function m(y){return y===null||of(y)||Wt(y)||Ks(y)||Sf(y)?n(y):e.attempt(Kx,e.attempt(Xx,p),n)(y)}function p(y){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(y)}}function Fj(e,t,n){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),u):n(c)}function u(c){return c===null?n(c):t(c)}}function Pj(e,t,n){let a,l,u;return c;function c(m){return m===46||m===95?e.check(Zx,h,f)(m):m===null||Wt(m)||Ks(m)||m!==45&&Sf(m)?h(m):(u=!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||!u?n(m):t(m)}}function Gj(e,t){let n=0,a=0;return l;function l(c){return c===40?(n++,e.consume(c),l):c===41&&a<n?u(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(Zx,t,u)(c):c===null||Wt(c)||Ks(c)?t(c):(e.consume(c),l)}function u(c){return c===41&&a++,e.consume(c),l}}function Vj(e,t,n){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),u):f===93?(e.consume(f),l):f===60||f===null||Wt(f)||Ks(f)?t(f):n(f)}function l(f){return f===null||f===40||f===91||Wt(f)||Ks(f)?t(f):a(f)}function u(f){return fr(f)?c(f):n(f)}function c(f){return f===59?(e.consume(f),a):fr(f)?(e.consume(f),c):n(f)}}function Yj(e,t,n){return a;function a(u){return e.consume(u),l}function l(u){return Xn(u)?n(u):t(u)}}function e5(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Wt(e)}function t5(e){return!fr(e)}function n5(e){return!(e===47||Dp(e))}function Dp(e){return e===43||e===45||e===46||e===95||Xn(e)}function D1(e){let t=e.length,n=!1;for(;t--;){const a=e[t][1];if((a.type==="labelLink"||a.type==="labelImage")&&!a._balanced){n=!0;break}if(a._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const Wj={tokenize:nC,partial:!0};function Kj(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Jj,continuation:{tokenize:eC},exit:tC}},text:{91:{name:"gfmFootnoteCall",tokenize:Qj},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Xj,resolveTo:Zj}}}}function Xj(e,t,n){const a=this;let l=a.events.length;const u=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 n(h);const m=Oa(a.sliceSerialize({start:c.end,end:a.now()}));return m.codePointAt(0)!==94||!u.includes(m.slice(1))?n(h):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),t(h))}}function Zj(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const a={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},l={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};l.end.column++,l.end.offset++,l.end._bufferIndex++;const u={type:"gfmFootnoteCallString",start:Object.assign({},l.end),end:Object.assign({},e[e.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},u.start),end:Object.assign({},u.end)},f=[e[n+1],e[n+2],["enter",a,t],e[n+3],e[n+4],["enter",l,t],["exit",l,t],["enter",u,t],["enter",c,t],["exit",c,t],["exit",u,t],e[e.length-2],e[e.length-1],["exit",a,t]];return e.splice(n,e.length-n+1,...f),e}function Qj(e,t,n){const a=this,l=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let u=0,c;return f;function f(y){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(y),e.exit("gfmFootnoteCallLabelMarker"),h}function h(y){return y!==94?n(y):(e.enter("gfmFootnoteCallMarker"),e.consume(y),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",m)}function m(y){if(u>999||y===93&&!c||y===null||y===91||Wt(y))return n(y);if(y===93){e.exit("chunkString");const k=e.exit("gfmFootnoteCallString");return l.includes(Oa(a.sliceSerialize(k)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(y),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(y)}return Wt(y)||(c=!0),u++,e.consume(y),y===92?p:m}function p(y){return y===91||y===92||y===93?(e.consume(y),u++,m):m(y)}}function Jj(e,t,n){const a=this,l=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let u,c=0,f;return h;function h(C){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(C),e.exit("gfmFootnoteDefinitionLabelMarker"),m}function m(C){return C===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(C),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",p):n(C)}function p(C){if(c>999||C===93&&!f||C===null||C===91||Wt(C))return n(C);if(C===93){e.exit("chunkString");const M=e.exit("gfmFootnoteDefinitionLabelString");return u=Oa(a.sliceSerialize(M)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(C),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),k}return Wt(C)||(f=!0),c++,e.consume(C),C===92?y:p}function y(C){return C===91||C===92||C===93?(e.consume(C),c++,p):p(C)}function k(C){return C===58?(e.enter("definitionMarker"),e.consume(C),e.exit("definitionMarker"),l.includes(u)||l.push(u),wt(e,x,"gfmFootnoteDefinitionWhitespace")):n(C)}function x(C){return t(C)}}function eC(e,t,n){return e.check(l0,t,e.attempt(Wj,t,n))}function tC(e){e.exit("gfmFootnoteDefinition")}function nC(e,t,n){const a=this;return wt(e,l,"gfmFootnoteDefinitionIndent",5);function l(u){const c=a.events[a.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?t(u):n(u)}}function rC(e){let n=(e||{}).singleTilde;const a={name:"strikethrough",tokenize:u,resolveAll:l};return n==null&&(n=!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 p={type:"strikethrough",start:Object.assign({},c[m][1].start),end:Object.assign({},c[h][1].end)},y={type:"strikethroughText",start:Object.assign({},c[m][1].end),end:Object.assign({},c[h][1].start)},k=[["enter",p,f],["enter",c[m][1],f],["exit",c[m][1],f],["enter",y,f]],x=f.parser.constructs.insideSpan.null;x&&Zr(k,k.length,0,jf(x,c.slice(m+1,h),f)),Zr(k,k.length,0,[["exit",y,f],["enter",c[h][1],f],["exit",c[h][1],f],["exit",p,f]]),Zr(c,m-1,h-m+3,k),h=m+k.length-2;break}}for(h=-1;++h<c.length;)c[h][1].type==="strikethroughSequenceTemporary"&&(c[h][1].type="data");return c}function u(c,f,h){const m=this.previous,p=this.events;let y=0;return k;function k(C){return m===126&&p[p.length-1][1].type!=="characterEscape"?h(C):(c.enter("strikethroughSequenceTemporary"),x(C))}function x(C){const M=uu(m);if(C===126)return y>1?h(C):(c.consume(C),y++,x);if(y<2&&!n)return h(C);const I=c.exit("strikethroughSequenceTemporary"),_=uu(C);return I._open=!_||_===2&&!!M,I._close=!M||M===2&&!!_,f(C)}}}class aC{constructor(){this.map=[]}add(t,n,a){iC(this,t,n,a)}consume(t){if(this.map.sort(function(u,c){return u[0]-c[0]}),this.map.length===0)return;let n=this.map.length;const a=[];for(;n>0;)n-=1,a.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];a.push(t.slice()),t.length=0;let l=a.pop();for(;l;){for(const u of l)t.push(u);l=a.pop()}this.map.length=0}}function iC(e,t,n,a){let l=0;if(!(n===0&&a.length===0)){for(;l<e.map.length;){if(e.map[l][0]===t){e.map[l][1]+=n,e.map[l][2].push(...a);return}l+=1}e.map.push([t,n,a])}}function lC(e,t){let n=!1;const a=[];for(;t<e.length;){const l=e[t];if(n){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 u=a.length-1;a[u]=a[u]==="left"?"center":"right"}}else if(l[1].type==="tableDelimiterRow")break}else l[0]==="enter"&&l[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return a}function sC(){return{flow:{null:{name:"table",tokenize:oC,resolveAll:uC}}}}function oC(e,t,n){const a=this;let l=0,u=0,c;return f;function f(F){let te=a.events.length-1;for(;te>-1;){const be=a.events[te][1].type;if(be==="lineEnding"||be==="linePrefix")te--;else break}const se=te>-1?a.events[te][1].type:null,ve=se==="tableHead"||se==="tableRow"?P:h;return ve===P&&a.parser.lazy[a.now().line]?n(F):ve(F)}function h(F){return e.enter("tableHead"),e.enter("tableRow"),m(F)}function m(F){return F===124||(c=!0,u+=1),p(F)}function p(F){return F===null?n(F):tt(F)?u>1?(u=0,a.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(F),e.exit("lineEnding"),x):n(F):Ct(F)?wt(e,p,"whitespace")(F):(u+=1,c&&(c=!1,l+=1),F===124?(e.enter("tableCellDivider"),e.consume(F),e.exit("tableCellDivider"),c=!0,p):(e.enter("data"),y(F)))}function y(F){return F===null||F===124||Wt(F)?(e.exit("data"),p(F)):(e.consume(F),F===92?k:y)}function k(F){return F===92||F===124?(e.consume(F),y):y(F)}function x(F){return a.interrupt=!1,a.parser.lazy[a.now().line]?n(F):(e.enter("tableDelimiterRow"),c=!1,Ct(F)?wt(e,C,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):C(F))}function C(F){return F===45||F===58?I(F):F===124?(c=!0,e.enter("tableCellDivider"),e.consume(F),e.exit("tableCellDivider"),M):X(F)}function M(F){return Ct(F)?wt(e,I,"whitespace")(F):I(F)}function I(F){return F===58?(u+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(F),e.exit("tableDelimiterMarker"),_):F===45?(u+=1,_(F)):F===null||tt(F)?R(F):X(F)}function _(F){return F===45?(e.enter("tableDelimiterFiller"),N(F)):X(F)}function N(F){return F===45?(e.consume(F),N):F===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(F),e.exit("tableDelimiterMarker"),q):(e.exit("tableDelimiterFiller"),q(F))}function q(F){return Ct(F)?wt(e,R,"whitespace")(F):R(F)}function R(F){return F===124?C(F):F===null||tt(F)?!c||l!==u?X(F):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(F)):X(F)}function X(F){return n(F)}function P(F){return e.enter("tableRow"),H(F)}function H(F){return F===124?(e.enter("tableCellDivider"),e.consume(F),e.exit("tableCellDivider"),H):F===null||tt(F)?(e.exit("tableRow"),t(F)):Ct(F)?wt(e,H,"whitespace")(F):(e.enter("data"),J(F))}function J(F){return F===null||F===124||Wt(F)?(e.exit("data"),H(F)):(e.consume(F),F===92?ne:J)}function ne(F){return F===92||F===124?(e.consume(F),J):J(F)}}function uC(e,t){let n=-1,a=!0,l=0,u=[0,0,0,0],c=[0,0,0,0],f=!1,h=0,m,p,y;const k=new aC;for(;++n<e.length;){const x=e[n],C=x[1];x[0]==="enter"?C.type==="tableHead"?(f=!1,h!==0&&(Z2(k,t,h,m,p),p=void 0,h=0),m={type:"table",start:Object.assign({},C.start),end:Object.assign({},C.end)},k.add(n,0,[["enter",m,t]])):C.type==="tableRow"||C.type==="tableDelimiterRow"?(a=!0,y=void 0,u=[0,0,0,0],c=[0,n+1,0,0],f&&(f=!1,p={type:"tableBody",start:Object.assign({},C.start),end:Object.assign({},C.end)},k.add(n,0,[["enter",p,t]])),l=C.type==="tableDelimiterRow"?2:p?3:1):l&&(C.type==="data"||C.type==="tableDelimiterMarker"||C.type==="tableDelimiterFiller")?(a=!1,c[2]===0&&(u[1]!==0&&(c[0]=c[1],y=Nd(k,t,u,l,void 0,y),u=[0,0,0,0]),c[2]=n)):C.type==="tableCellDivider"&&(a?a=!1:(u[1]!==0&&(c[0]=c[1],y=Nd(k,t,u,l,void 0,y)),u=c,c=[u[1],n,0,0])):C.type==="tableHead"?(f=!0,h=n):C.type==="tableRow"||C.type==="tableDelimiterRow"?(h=n,u[1]!==0?(c[0]=c[1],y=Nd(k,t,u,l,n,y)):c[1]!==0&&(y=Nd(k,t,c,l,n,y)),l=0):l&&(C.type==="data"||C.type==="tableDelimiterMarker"||C.type==="tableDelimiterFiller")&&(c[3]=n)}for(h!==0&&Z2(k,t,h,m,p),k.consume(t.events),n=-1;++n<t.events.length;){const x=t.events[n];x[0]==="enter"&&x[1].type==="table"&&(x[1]._align=lC(t.events,n))}return e}function Nd(e,t,n,a,l,u){const c=a===1?"tableHeader":a===2?"tableDelimiter":"tableData",f="tableContent";n[0]!==0&&(u.end=Object.assign({},ru(t.events,n[0])),e.add(n[0],0,[["exit",u,t]]));const h=ru(t.events,n[1]);if(u={type:c,start:Object.assign({},h),end:Object.assign({},h)},e.add(n[1],0,[["enter",u,t]]),n[2]!==0){const m=ru(t.events,n[2]),p=ru(t.events,n[3]),y={type:f,start:Object.assign({},m),end:Object.assign({},p)};if(e.add(n[2],0,[["enter",y,t]]),a!==2){const k=t.events[n[2]],x=t.events[n[3]];if(k[1].end=Object.assign({},x[1].end),k[1].type="chunkText",k[1].contentType="text",n[3]>n[2]+1){const C=n[2]+1,M=n[3]-n[2]-1;e.add(C,M,[])}}e.add(n[3]+1,0,[["exit",y,t]])}return l!==void 0&&(u.end=Object.assign({},ru(t.events,l)),e.add(l,0,[["exit",u,t]]),u=void 0),u}function Z2(e,t,n,a,l){const u=[],c=ru(t.events,n);l&&(l.end=Object.assign({},c),u.push(["exit",l,t])),a.end=Object.assign({},c),u.push(["exit",a,t]),e.add(n+1,0,u)}function ru(e,t){const n=e[t],a=n[0]==="enter"?"start":"end";return n[1][a]}const cC={name:"tasklistCheck",tokenize:fC};function dC(){return{text:{91:cC}}}function fC(e,t,n){const a=this;return l;function l(h){return a.previous!==null||!a._gfmTasklistFirstContentOfListItem?n(h):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(h),e.exit("taskListCheckMarker"),u)}function u(h){return Wt(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):n(h)}function c(h){return h===93?(e.enter("taskListCheckMarker"),e.consume(h),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),f):n(h)}function f(h){return tt(h)?t(h):Ct(h)?e.check({tokenize:hC},t,n)(h):n(h)}}function hC(e,t,n){return wt(e,a,"whitespace");function a(l){return l===null?n(l):t(l)}}function mC(e){return dx([qj(),Kj(),rC(e),sC(),dC()])}const pC={};function gC(e){const t=this,n=e||pC,a=t.data(),l=a.micromarkExtensions||(a.micromarkExtensions=[]),u=a.fromMarkdownExtensions||(a.fromMarkdownExtensions=[]),c=a.toMarkdownExtensions||(a.toMarkdownExtensions=[]);l.push(mC(n)),u.push(Ij()),c.push(_j(n))}function yC(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:u},exit:{mathFlow:l,mathFlowFence:a,mathFlowFenceMeta:n,mathFlowValue:f,mathText:c,mathTextData:f}};function e(h){const m={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[m]}},h)}function t(){this.buffer()}function n(){const h=this.resume(),m=this.stack[this.stack.length-1];m.type,m.meta=h}function a(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function l(h){const m=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),p=this.stack[this.stack.length-1];p.type,this.exit(h),p.value=m;const y=p.data.hChildren[0];y.type,y.tagName,y.children.push({type:"text",value:m}),this.data.mathFlowInside=void 0}function u(h){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},h),this.buffer()}function c(h){const m=this.resume(),p=this.stack[this.stack.length-1];p.type,this.exit(h),p.value=m,p.data.hChildren.push({type:"text",value:m})}function f(h){this.config.enter.data.call(this,h),this.config.exit.data.call(this,h)}}function vC(e){let t=(e||{}).singleDollarTextMath;return t==null&&(t=!0),a.peek=l,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:`
|
|
79
|
-
`,inConstruct:"mathFlowMeta"},{character:"$",after:t?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:n,inlineMath:a}};function n(u,c,f,h){const m=u.value||"",p=f.createTracker(h),y="$".repeat(Math.max(Lx(m,"$")+1,2)),k=f.enter("mathFlow");let x=p.move(y);if(u.meta){const C=f.enter("mathFlowMeta");x+=p.move(f.safe(u.meta,{after:`
|
|
80
|
-
`,before:x,encode:["$"],...p.current()})),C()}return x+=p.move(`
|
|
81
|
-
`),m&&(x+=p.move(m+`
|
|
82
|
-
`)),x+=p.move(y),k(),x}function a(u,c,f){let h=u.value||"",m=1;for(t||m++;new RegExp("(^|[^$])"+"\\$".repeat(m)+"([^$]|$)").test(h);)m++;const p="$".repeat(m);/[^ \r\n]/.test(h)&&(/^[ \r\n]/.test(h)&&/[ \r\n]$/.test(h)||/^\$|\$$/.test(h))&&(h=" "+h+" ");let y=-1;for(;++y<f.unsafe.length;){const k=f.unsafe[y];if(!k.atBreak)continue;const x=f.compilePattern(k);let C;for(;C=x.exec(h);){let M=C.index;h.codePointAt(M)===10&&h.codePointAt(M-1)===13&&M--,h=h.slice(0,M)+" "+h.slice(C.index+1)}}return p+h+p}function l(){return"$"}}const xC={tokenize:bC,concrete:!0,name:"mathFlow"},Q2={tokenize:wC,partial:!0};function bC(e,t,n){const a=this,l=a.events[a.events.length-1],u=l&&l[1].type==="linePrefix"?l[2].sliceSerialize(l[1],!0).length:0;let c=0;return f;function f(N){return e.enter("mathFlow"),e.enter("mathFlowFence"),e.enter("mathFlowFenceSequence"),h(N)}function h(N){return N===36?(e.consume(N),c++,h):c<2?n(N):(e.exit("mathFlowFenceSequence"),wt(e,m,"whitespace")(N))}function m(N){return N===null||tt(N)?y(N):(e.enter("mathFlowFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(N))}function p(N){return N===null||tt(N)?(e.exit("chunkString"),e.exit("mathFlowFenceMeta"),y(N)):N===36?n(N):(e.consume(N),p)}function y(N){return e.exit("mathFlowFence"),a.interrupt?t(N):e.attempt(Q2,k,I)(N)}function k(N){return e.attempt({tokenize:_,partial:!0},I,x)(N)}function x(N){return(u?wt(e,C,"linePrefix",u+1):C)(N)}function C(N){return N===null?I(N):tt(N)?e.attempt(Q2,k,I)(N):(e.enter("mathFlowValue"),M(N))}function M(N){return N===null||tt(N)?(e.exit("mathFlowValue"),C(N)):(e.consume(N),M)}function I(N){return e.exit("mathFlow"),t(N)}function _(N,q,R){let X=0;return wt(N,P,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function P(ne){return N.enter("mathFlowFence"),N.enter("mathFlowFenceSequence"),H(ne)}function H(ne){return ne===36?(X++,N.consume(ne),H):X<c?R(ne):(N.exit("mathFlowFenceSequence"),wt(N,J,"whitespace")(ne))}function J(ne){return ne===null||tt(ne)?(N.exit("mathFlowFence"),q(ne)):R(ne)}}}function wC(e,t,n){const a=this;return l;function l(c){return c===null?t(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),u)}function u(c){return a.parser.lazy[a.now().line]?n(c):t(c)}}function kC(e){let n=(e||{}).singleDollarTextMath;return n==null&&(n=!0),{tokenize:a,resolve:SC,previous:jC,name:"mathText"};function a(l,u,c){let f=0,h,m;return p;function p(M){return l.enter("mathText"),l.enter("mathTextSequence"),y(M)}function y(M){return M===36?(l.consume(M),f++,y):f<2&&!n?c(M):(l.exit("mathTextSequence"),k(M))}function k(M){return M===null?c(M):M===36?(m=l.enter("mathTextSequence"),h=0,C(M)):M===32?(l.enter("space"),l.consume(M),l.exit("space"),k):tt(M)?(l.enter("lineEnding"),l.consume(M),l.exit("lineEnding"),k):(l.enter("mathTextData"),x(M))}function x(M){return M===null||M===32||M===36||tt(M)?(l.exit("mathTextData"),k(M)):(l.consume(M),x)}function C(M){return M===36?(l.consume(M),h++,C):h===f?(l.exit("mathTextSequence"),l.exit("mathText"),u(M)):(m.type="mathTextData",x(M))}}}function SC(e){let t=e.length-4,n=3,a,l;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(a=n;++a<t;)if(e[a][1].type==="mathTextData"){e[t][1].type="mathTextPadding",e[n][1].type="mathTextPadding",n+=2,t-=2;break}}for(a=n-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="mathTextData",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 jC(e){return e!==36||this.events[this.events.length-1][1].type==="characterEscape"}function CC(e){return{flow:{36:xC},text:{36:kC(e)}}}class Oe extends Error{constructor(t,n){var a="KaTeX parse error: "+t,l,u,c=n&&n.loc;if(c&&c.start<=c.end){var f=c.lexer.input;l=c.start,u=c.end,l===f.length?a+=" at end of input: ":a+=" at position "+(l+1)+": ";var h=f.slice(l,u).replace(/[^]/g,"$&̲"),m;l>15?m="…"+f.slice(l-15,l):m=f.slice(0,l);var p;u+15<f.length?p=f.slice(u,u+15)+"…":p=f.slice(u),a+=m+h+p}super(a),this.name="ParseError",this.position=void 0,this.length=void 0,this.rawMessage=void 0,Object.setPrototypeOf(this,Oe.prototype),this.position=l,l!=null&&u!=null&&(this.length=u-l),this.rawMessage=t}}var TC=/([A-Z])/g,AC=e=>e.replace(TC,"-$1").toLowerCase(),EC={"&":"&",">":">","<":"<",'"':""","'":"'"},NC=/[&><"']/g,Zn=e=>String(e).replace(NC,t=>EC[t]),Wd=e=>e.type==="ordgroup"||e.type==="color"?e.body.length===1?Wd(e.body[0]):e:e.type==="font"?Wd(e.body):e,MC=new Set(["mathord","textord","atom"]),Ji=e=>MC.has(Wd(e).type),DC=e=>{var t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?t[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():"_relative"},ff={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand <n>",cliProcessor:e=>e==="Infinity"?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function zC(e){if(typeof e!="string")return e.enum[0];switch(e){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{};default:throw new Error("Unexpected schema type; settings must declare an explicit default.")}}function RC(e){if(e.default!==void 0)return e.default;var t=Array.isArray(e.type)?e.type[0]:e.type;return zC(t)}function OC(e,t,n,a){var l=n[t];e[t]=l!==void 0?a.processor?a.processor(l):l:RC(a)}class z1{constructor(t){t===void 0&&(t={}),this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,t=t||{};for(var n of Object.keys(ff)){var a=ff[n];a&&OC(this,n,t,a)}}reportNonstrict(t,n,a){var l=this.strict;if(typeof l=="function"&&(l=l(t,n,a)),!(!l||l==="ignore")){if(l===!0||l==="error")throw new Oe("LaTeX-incompatible input and strict mode is set to 'error': "+(n+" ["+t+"]"),a);l==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(n+" ["+t+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+l+"': "+n+" ["+t+"]"))}}useStrictBehavior(t,n,a){var l=this.strict;if(typeof l=="function")try{l=l(t,n,a)}catch{l="error"}return!l||l==="ignore"?!1:l===!0||l==="error"?!0:l==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(n+" ["+t+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+l+"': "+n+" ["+t+"]")),!1)}isTrusted(t){if("url"in t&&t.url&&!t.protocol){var n=DC(t.url);if(n==null)return!1;t.protocol=n}var a=typeof this.trust=="function"?this.trust(t):this.trust;return!!a}}class Gl{constructor(t,n,a){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=t,this.size=n,this.cramped=a}sup(){return ai[IC[this.id]]}sub(){return ai[_C[this.id]]}fracNum(){return ai[LC[this.id]]}fracDen(){return ai[BC[this.id]]}cramp(){return ai[qC[this.id]]}text(){return ai[UC[this.id]]}isTight(){return this.size>=2}}var R1=0,hf=1,su=2,Ki=3,e0=4,xa=5,cu=6,hr=7,ai=[new Gl(R1,0,!1),new Gl(hf,0,!0),new Gl(su,1,!1),new Gl(Ki,1,!0),new Gl(e0,2,!1),new Gl(xa,2,!0),new Gl(cu,3,!1),new Gl(hr,3,!0)],IC=[e0,xa,e0,xa,cu,hr,cu,hr],_C=[xa,xa,xa,xa,hr,hr,hr,hr],LC=[su,Ki,e0,xa,cu,hr,cu,hr],BC=[Ki,Ki,xa,xa,hr,hr,hr,hr],qC=[hf,hf,Ki,Ki,xa,xa,hr,hr],UC=[R1,hf,su,Ki,su,Ki,su,Ki],mt={DISPLAY:ai[R1],TEXT:ai[su],SCRIPT:ai[e0],SCRIPTSCRIPT:ai[cu]},zp=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function HC(e){for(var t=0;t<zp.length;t++)for(var n=zp[t],a=0;a<n.blocks.length;a++){var l=n.blocks[a];if(e>=l[0]&&e<=l[1])return n.name}return null}var Kd=[];zp.forEach(e=>e.blocks.forEach(t=>Kd.push(...t)));function r5(e){for(var t=0;t<Kd.length;t+=2)if(e>=Kd[t]&&e<=Kd[t+1])return!0;return!1}var _n=e=>e+" "+e,nu=80,$C=function(t,n){return"M95,"+(622+t+n)+`
|
|
83
|
-
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
|
|
84
|
-
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
|
|
85
|
-
c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
|
|
86
|
-
s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
|
|
87
|
-
c69,-144,104.5,-217.7,106.5,-221
|
|
88
|
-
l`+t/2.075+" -"+t+`
|
|
89
|
-
c5.3,-9.3,12,-14,20,-14
|
|
90
|
-
H400000v`+(40+t)+`H845.2724
|
|
91
|
-
s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
|
|
92
|
-
c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
|
|
93
|
-
M`+(834+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},FC=function(t,n){return"M263,"+(601+t+n)+`c0.7,0,18,39.7,52,119
|
|
94
|
-
c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
|
|
95
|
-
c340,-704.7,510.7,-1060.3,512,-1067
|
|
96
|
-
l`+t/2.084+" -"+t+`
|
|
97
|
-
c4.7,-7.3,11,-11,19,-11
|
|
98
|
-
H40000v`+(40+t)+`H1012.3
|
|
99
|
-
s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
|
|
100
|
-
c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
|
|
101
|
-
s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
|
|
102
|
-
c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
|
|
103
|
-
M`+(1001+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},PC=function(t,n){return"M983 "+(10+t+n)+`
|
|
104
|
-
l`+t/3.13+" -"+t+`
|
|
105
|
-
c4,-6.7,10,-10,18,-10 H400000v`+(40+t)+`
|
|
106
|
-
H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
|
|
107
|
-
s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
|
|
108
|
-
c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
|
|
109
|
-
c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
|
|
110
|
-
c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
|
|
111
|
-
c53.7,-170.3,84.5,-266.8,92.5,-289.5z
|
|
112
|
-
M`+(1001+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},GC=function(t,n){return"M424,"+(2398+t+n)+`
|
|
113
|
-
c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
|
|
114
|
-
c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
|
|
115
|
-
s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
|
|
116
|
-
s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
|
|
117
|
-
l`+t/4.223+" -"+t+`c4,-6.7,10,-10,18,-10 H400000
|
|
118
|
-
v`+(40+t)+`H1014.6
|
|
119
|
-
s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
|
|
120
|
-
c-2,6,-10,9,-24,9
|
|
121
|
-
c-8,0,-12,-0.7,-12,-2z M`+(1001+t)+" "+n+`
|
|
122
|
-
h400000v`+(40+t)+"h-400000z"},VC=function(t,n){return"M473,"+(2713+t+n)+`
|
|
123
|
-
c339.3,-1799.3,509.3,-2700,510,-2702 l`+t/5.298+" -"+t+`
|
|
124
|
-
c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+t)+`H1017.7
|
|
125
|
-
s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
|
|
126
|
-
c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
|
|
127
|
-
c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26
|
|
128
|
-
s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
|
|
129
|
-
606zM`+(1001+t)+" "+n+"h400000v"+(40+t)+"H1017.7z"},YC=function(t){var n=t/2;return"M400000 "+t+" H0 L"+n+" 0 l65 45 L145 "+(t-80)+" H400000z"},WC=function(t,n,a){var l=a-54-n-t;return"M702 "+(t+n)+"H400000"+(40+t)+`
|
|
130
|
-
H742v`+l+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
|
|
131
|
-
h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
|
|
132
|
-
c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
|
|
133
|
-
219 661 l218 661zM702 `+n+"H400000v"+(40+t)+"H742z"},KC=function(t,n,a){n=1e3*n;var l="";switch(t){case"sqrtMain":l=$C(n,nu);break;case"sqrtSize1":l=FC(n,nu);break;case"sqrtSize2":l=PC(n,nu);break;case"sqrtSize3":l=GC(n,nu);break;case"sqrtSize4":l=VC(n,nu);break;case"sqrtTall":l=WC(n,nu,a)}return l},XC=function(t,n){switch(t){case"⎜":return _n("M291 0 H417 V"+n+" H291z");case"∣":return _n("M145 0 H188 V"+n+" H145z");case"∥":return _n("M145 0 H188 V"+n+" H145z")+_n("M367 0 H410 V"+n+" H367z");case"⎟":return _n("M457 0 H583 V"+n+" H457z");case"⎢":return _n("M319 0 H403 V"+n+" H319z");case"⎥":return _n("M263 0 H347 V"+n+" H263z");case"⎪":return _n("M384 0 H504 V"+n+" H384z");case"⏐":return _n("M312 0 H355 V"+n+" H312z");case"‖":return _n("M257 0 H300 V"+n+" H257z")+_n("M478 0 H521 V"+n+" H478z");default:return""}},J2={doubleleftarrow:`M262 157
|
|
134
|
-
l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
|
|
135
|
-
0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
|
|
136
|
-
14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
|
|
137
|
-
c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
|
|
138
|
-
157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
|
|
139
|
-
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
|
|
140
|
-
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
|
|
141
|
-
m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
|
|
142
|
-
-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
|
|
143
|
-
14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
|
|
144
|
-
-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
|
|
145
|
-
-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
|
|
146
|
-
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
|
|
147
|
-
c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
|
|
148
|
-
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
|
|
149
|
-
135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
|
|
150
|
-
-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
|
|
151
|
-
c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
|
|
152
|
-
490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
|
|
153
|
-
1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
|
|
154
|
-
l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
|
|
155
|
-
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
|
|
156
|
-
5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
|
|
157
|
-
35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
|
|
158
|
-
0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
|
|
159
|
-
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
|
|
160
|
-
H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
|
|
161
|
-
435 0h399565z`,leftgroupunder:`M400000 262
|
|
162
|
-
H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
|
|
163
|
-
435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
|
|
164
|
-
-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
|
|
165
|
-
-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
|
|
166
|
-
-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
|
|
167
|
-
20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
|
|
168
|
-
-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
|
|
169
|
-
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
|
|
170
|
-
m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
|
|
171
|
-
5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
|
|
172
|
-
1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
|
|
173
|
-
-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
|
|
174
|
-
10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
|
|
175
|
-
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
|
|
176
|
-
v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
|
|
177
|
-
-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
|
|
178
|
-
-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
|
|
179
|
-
71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:_n("M40 281 V428 H0 V94 H40 V241 H400000 v40z"),leftbracketunder:_n("M0 0 h120 V290 H399995 v120 H0z"),leftbracketover:_n("M0 440 h120 V150 H399995 v-120 H0z"),leftmapsto:_n("M40 281 V448H0V74H40V241H400000v40z"),leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
|
|
180
|
-
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
|
|
181
|
-
c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
|
|
182
|
-
68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:_n("M0 50 h400000 v40H0z m0 194h40000v40H0z"),midbrace:`M200428 334
|
|
183
|
-
c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
|
|
184
|
-
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
|
|
185
|
-
311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
|
|
186
|
-
12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
|
|
187
|
-
c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
|
|
188
|
-
53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
|
|
189
|
-
11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
|
|
190
|
-
-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
|
|
191
|
-
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
|
|
192
|
-
m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
|
|
193
|
-
60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
|
|
194
|
-
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
|
|
195
|
-
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
|
|
196
|
-
c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
|
|
197
|
-
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
|
|
198
|
-
m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
|
|
199
|
-
85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
|
|
200
|
-
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
|
|
201
|
-
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
|
|
202
|
-
c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
|
|
203
|
-
-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
|
|
204
|
-
11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
|
|
205
|
-
39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
|
|
206
|
-
-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
|
|
207
|
-
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
|
|
208
|
-
151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
|
|
209
|
-
-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
|
|
210
|
-
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
|
|
211
|
-
c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
|
|
212
|
-
28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
|
|
213
|
-
-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
|
|
214
|
-
3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
|
|
215
|
-
0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
|
|
216
|
-
-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
|
|
217
|
-
-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
|
|
218
|
-
69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
|
|
219
|
-
-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
|
|
220
|
-
2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
|
|
221
|
-
m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
|
|
222
|
-
8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
|
|
223
|
-
-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
|
|
224
|
-
-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
|
|
225
|
-
15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
|
|
226
|
-
8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
|
|
227
|
-
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
|
|
228
|
-
m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
|
|
229
|
-
15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
|
|
230
|
-
-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
|
|
231
|
-
66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:_n("M399960 241 V94 h40 V428 h-40 V281 H0 v-40z"),rightbracketunder:_n("M399995 0 h-120 V290 H0 v120 H400000z"),rightbracketover:_n("M399995 440 h-120 V150 H0 v-120 H399995z"),rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
|
|
232
|
-
1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
|
|
233
|
-
-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
|
|
234
|
-
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
|
|
235
|
-
115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
|
|
236
|
-
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
|
|
237
|
-
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
|
|
238
|
-
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
|
|
239
|
-
10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
|
|
240
|
-
c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
|
|
241
|
-
41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
|
|
242
|
-
18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
|
|
243
|
-
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
|
|
244
|
-
101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
|
|
245
|
-
-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
|
|
246
|
-
114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
|
|
247
|
-
4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
|
|
248
|
-
-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
|
|
249
|
-
-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
|
|
250
|
-
31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
|
|
251
|
-
c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
|
|
252
|
-
181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
|
|
253
|
-
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
|
|
254
|
-
411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
|
|
255
|
-
16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
|
|
256
|
-
-338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
|
|
257
|
-
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
|
|
258
|
-
177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
|
|
259
|
-
14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
|
|
260
|
-
-175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
|
|
261
|
-
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
|
|
262
|
-
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
|
|
263
|
-
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
|
|
264
|
-
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
|
|
265
|
-
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
|
|
266
|
-
c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
|
|
267
|
-
c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
268
|
-
-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
269
|
-
-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
270
|
-
-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
|
|
271
|
-
-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
272
|
-
-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
273
|
-
-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
274
|
-
-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
|
|
275
|
-
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
|
|
276
|
-
c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
|
|
277
|
-
s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
|
|
278
|
-
121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
|
|
279
|
-
s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
|
|
280
|
-
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
|
|
281
|
-
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
|
|
282
|
-
-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
|
|
283
|
-
13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
|
|
284
|
-
-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
|
|
285
|
-
-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
|
|
286
|
-
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
|
|
287
|
-
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
|
288
|
-
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
|
|
289
|
-
c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
|
|
290
|
-
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
|
|
291
|
-
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
|
|
292
|
-
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
|
|
293
|
-
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
|
294
|
-
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
|
|
295
|
-
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
|
|
296
|
-
M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
|
297
|
-
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
|
|
298
|
-
1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
|
|
299
|
-
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
|
|
300
|
-
M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
|
|
301
|
-
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
|
302
|
-
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
|
|
303
|
-
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
|
|
304
|
-
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},ZC=function(t,n){switch(t){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+n+` v1759 v84 h347 v-84
|
|
305
|
-
H403z M403 1759 V0 H319 V1759 v`+n+" v1759 v84 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+n+` v1759 H0 v84 H347z
|
|
306
|
-
M347 1759 V0 H263 V1759 v`+n+" v1759 h84z";case"vert":return"M145 15 v585 v"+n+` v585 c2.667,10,9.667,15,21,15
|
|
307
|
-
c10,0,16.667,-5,20,-15 v-585 v`+-n+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
308
|
-
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+n+" v585 h43z";case"doublevert":return"M145 15 v585 v"+n+` v585 c2.667,10,9.667,15,21,15
|
|
309
|
-
c10,0,16.667,-5,20,-15 v-585 v`+-n+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
310
|
-
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+n+` v585 h43z
|
|
311
|
-
M367 15 v585 v`+n+` v585 c2.667,10,9.667,15,21,15
|
|
312
|
-
c10,0,16.667,-5,20,-15 v-585 v`+-n+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
313
|
-
c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+n+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+n+` v1715 h263 v84 H319z
|
|
314
|
-
MM319 602 V0 H403 V602 v`+n+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+n+` v1799 H0 v-84 H319z
|
|
315
|
-
MM319 602 V0 H403 V602 v`+n+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+n+` v602 h84z
|
|
316
|
-
M403 1759 V0 H319 V1759 v`+n+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+n+` v602 h84z
|
|
317
|
-
M347 1759 V0 h-84 V1759 v`+n+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1
|
|
318
|
-
c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,
|
|
319
|
-
-36,557 l0,`+(n+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
|
|
320
|
-
949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9
|
|
321
|
-
c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,
|
|
322
|
-
-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
|
|
323
|
-
l0,-`+(n+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
|
|
324
|
-
-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,
|
|
325
|
-
63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
|
|
326
|
-
c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(n+9)+`
|
|
327
|
-
c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664
|
|
328
|
-
c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11
|
|
329
|
-
c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17
|
|
330
|
-
c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
|
|
331
|
-
l0,-`+(n+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
|
|
332
|
-
-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};function QC(e){return"toText"in e}class gu{constructor(t){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=t,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(t){return this.classes.includes(t)}toNode(){for(var t=document.createDocumentFragment(),n=0;n<this.children.length;n++)t.appendChild(this.children[n].toNode());return t}toMarkup(){for(var t="",n=0;n<this.children.length;n++)t+=this.children[n].toMarkup();return t}toText(){return this.children.map(t=>{if(QC(t))return t.toText();throw new Error("Expected MathDomNode with toText, got "+t.constructor.name)}).join("")}}var Rp={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},JC={ex:!0,em:!0,mu:!0},a5=function(t){return typeof t!="string"&&(t=t.unit),t in Rp||t in JC||t==="ex"},cn=function(t,n){var a;if(t.unit in Rp)a=Rp[t.unit]/n.fontMetrics().ptPerEm/n.sizeMultiplier;else if(t.unit==="mu")a=n.fontMetrics().cssEmPerMu;else{var l;if(n.style.isTight()?l=n.havingStyle(n.style.text()):l=n,t.unit==="ex")a=l.fontMetrics().xHeight;else if(t.unit==="em")a=l.fontMetrics().quad;else throw new Oe("Invalid unit: '"+t.unit+"'");l!==n&&(a*=l.sizeMultiplier/n.sizeMultiplier)}return Math.min(t.number*a,n.maxSize)},Ue=function(t){return+t.toFixed(4)+"em"},Xl=function(t){return t.filter(n=>n).join(" ")},O1=function(t){var n="";for(var a of Object.keys(t)){var l=t[a];l!==void 0&&(n+=AC(a)+":"+l+";")}return n},i5=function(t,n,a){if(this.classes=t||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=a||{},n){n.style.isTight()&&this.classes.push("mtight");var l=n.getColor();l&&(this.style.color=l)}},l5=function(t){var n=document.createElement(t);n.className=Xl(this.classes),Object.assign(n.style,this.style);for(var a of Object.keys(this.attributes))n.setAttribute(a,this.attributes[a]);for(var l=0;l<this.children.length;l++)n.appendChild(this.children[l].toNode());return n},eT=/[\s"'>/=\x00-\x1f]/,s5=function(t){var n="<"+t;this.classes.length&&(n+=' class="'+Zn(Xl(this.classes))+'"');var a=O1(this.style);a&&(n+=' style="'+Zn(a)+'"');for(var l of Object.keys(this.attributes)){if(eT.test(l))throw new Oe("Invalid attribute name '"+l+"'");n+=" "+l+'="'+Zn(this.attributes[l])+'"'}n+=">";for(var u=0;u<this.children.length;u++)n+=this.children[u].toMarkup();return n+="</"+t+">",n};class yu{constructor(t,n,a,l){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,this.italic=void 0,i5.call(this,t,a,l),this.children=n||[]}setAttribute(t,n){this.attributes[t]=n}hasClass(t){return this.classes.includes(t)}toNode(){return l5.call(this,"span")}toMarkup(){return s5.call(this,"span")}}class Af{constructor(t,n,a,l){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,i5.call(this,n,l),this.children=a||[],this.setAttribute("href",t)}setAttribute(t,n){this.attributes[t]=n}hasClass(t){return this.classes.includes(t)}toNode(){return l5.call(this,"a")}toMarkup(){return s5.call(this,"a")}}class tT{constructor(t,n,a){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=n,this.src=t,this.classes=["mord"],this.height=0,this.depth=0,this.maxFontSize=0,this.style=a}hasClass(t){return this.classes.includes(t)}toNode(){var t=document.createElement("img");return t.src=this.src,t.alt=this.alt,t.className="mord",Object.assign(t.style,this.style),t}toMarkup(){var t='<img src="'+Zn(this.src)+'"'+(' alt="'+Zn(this.alt)+'"'),n=O1(this.style);return n&&(t+=' style="'+Zn(n)+'"'),t+="'/>",t}}var nT={î:"ı̂",ï:"ı̈",í:"ı́",ì:"ı̀"};class Jr{constructor(t,n,a,l,u,c,f,h){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=t,this.height=n||0,this.depth=a||0,this.italic=l||0,this.skew=u||0,this.width=c||0,this.classes=f||[],this.style=h||{},this.maxFontSize=0;var m=HC(this.text.charCodeAt(0));m&&this.classes.push(m+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=nT[this.text])}hasClass(t){return this.classes.includes(t)}toNode(){var t=document.createTextNode(this.text),n=null;return this.italic>0&&(n=document.createElement("span"),n.style.marginRight=Ue(this.italic)),this.classes.length>0&&(n=n||document.createElement("span"),n.className=Xl(this.classes)),Object.keys(this.style).length>0&&(n=n||document.createElement("span"),Object.assign(n.style,this.style)),n?(n.appendChild(t),n):t}toMarkup(){var t=!1,n="<span";this.classes.length&&(t=!0,n+=' class="',n+=Zn(Xl(this.classes)),n+='"');var a="";this.italic>0&&(a+="margin-right:"+Ue(this.italic)+";"),a+=O1(this.style),a&&(t=!0,n+=' style="'+Zn(a)+'"');var l=Zn(this.text);return t?(n+=">",n+=l,n+="</span>",n):l}}class Zi{constructor(t,n){this.children=void 0,this.attributes=void 0,this.children=t||[],this.attributes=n||{}}toNode(){var t="http://www.w3.org/2000/svg",n=document.createElementNS(t,"svg");for(var a of Object.keys(this.attributes))n.setAttribute(a,this.attributes[a]);for(var l=0;l<this.children.length;l++)n.appendChild(this.children[l].toNode());return n}toMarkup(){var t='<svg xmlns="http://www.w3.org/2000/svg"';for(var n of Object.keys(this.attributes))t+=" "+n+'="'+Zn(this.attributes[n])+'"';t+=">";for(var a=0;a<this.children.length;a++)t+=this.children[a].toMarkup();return t+="</svg>",t}}class Zl{constructor(t,n){this.pathName=void 0,this.alternate=void 0,this.pathName=t,this.alternate=n}toNode(){var t="http://www.w3.org/2000/svg",n=document.createElementNS(t,"path");return this.alternate?n.setAttribute("d",this.alternate):n.setAttribute("d",J2[this.pathName]),n}toMarkup(){return this.alternate?'<path d="'+Zn(this.alternate)+'"/>':'<path d="'+Zn(J2[this.pathName])+'"/>'}}class Op{constructor(t){this.attributes=void 0,this.attributes=t||{}}toNode(){var t="http://www.w3.org/2000/svg",n=document.createElementNS(t,"line");for(var a of Object.keys(this.attributes))n.setAttribute(a,this.attributes[a]);return n}toMarkup(){var t="<line";for(var n of Object.keys(this.attributes))t+=" "+n+'="'+Zn(this.attributes[n])+'"';return t+="/>",t}}function rT(e){if(e instanceof Jr)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}function aT(e){if(e instanceof yu)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}var iT=e=>e instanceof yu||e instanceof Af||e instanceof gu,ii={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},Md={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},ev={Å:"A",Ð:"D",Þ:"o",å:"a",ð:"d",þ:"o",А:"A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};function o5(e,t){ii[e]=t}function I1(e,t,n){if(!ii[t])throw new Error("Font metrics not found for font: "+t+".");var a=e.charCodeAt(0),l=ii[t][a];if(!l&&e[0]in ev&&(a=ev[e[0]].charCodeAt(0),l=ii[t][a]),!l&&n==="text"&&r5(a)&&(l=ii[t][77]),l)return{depth:l[0],height:l[1],italic:l[2],skew:l[3],width:l[4]}}var Fm={};function lT(e){var t;if(e>=5?t=0:e>=3?t=1:t=2,!Fm[t]){var n=Fm[t]={cssEmPerMu:Md.quad[t]/18};for(var a in Md)Md.hasOwnProperty(a)&&(n[a]=Md[a][t])}return Fm[t]}var sn={math:{},text:{}};function w(e,t,n,a,l,u){sn[e][l]={font:t,group:n,replace:a},u&&a&&(sn[e][a]=sn[e][l])}var S="math",Ee="text",D="main",G="ams",on="accent-token",We="bin",mr="close",vu="inner",st="mathord",Nn="op-token",ea="open",u0="punct",W="rel",el="spacing",ae="textord";w(S,D,W,"≡","\\equiv",!0);w(S,D,W,"≺","\\prec",!0);w(S,D,W,"≻","\\succ",!0);w(S,D,W,"∼","\\sim",!0);w(S,D,W,"⊥","\\perp");w(S,D,W,"⪯","\\preceq",!0);w(S,D,W,"⪰","\\succeq",!0);w(S,D,W,"≃","\\simeq",!0);w(S,D,W,"∣","\\mid",!0);w(S,D,W,"≪","\\ll",!0);w(S,D,W,"≫","\\gg",!0);w(S,D,W,"≍","\\asymp",!0);w(S,D,W,"∥","\\parallel");w(S,D,W,"⋈","\\bowtie",!0);w(S,D,W,"⌣","\\smile",!0);w(S,D,W,"⊑","\\sqsubseteq",!0);w(S,D,W,"⊒","\\sqsupseteq",!0);w(S,D,W,"≐","\\doteq",!0);w(S,D,W,"⌢","\\frown",!0);w(S,D,W,"∋","\\ni",!0);w(S,D,W,"∝","\\propto",!0);w(S,D,W,"⊢","\\vdash",!0);w(S,D,W,"⊣","\\dashv",!0);w(S,D,W,"∋","\\owns");w(S,D,u0,".","\\ldotp");w(S,D,u0,"⋅","\\cdotp");w(S,D,u0,"⋅","·");w(Ee,D,ae,"⋅","·");w(S,D,ae,"#","\\#");w(Ee,D,ae,"#","\\#");w(S,D,ae,"&","\\&");w(Ee,D,ae,"&","\\&");w(S,D,ae,"ℵ","\\aleph",!0);w(S,D,ae,"∀","\\forall",!0);w(S,D,ae,"ℏ","\\hbar",!0);w(S,D,ae,"∃","\\exists",!0);w(S,D,ae,"∇","\\nabla",!0);w(S,D,ae,"♭","\\flat",!0);w(S,D,ae,"ℓ","\\ell",!0);w(S,D,ae,"♮","\\natural",!0);w(S,D,ae,"♣","\\clubsuit",!0);w(S,D,ae,"℘","\\wp",!0);w(S,D,ae,"♯","\\sharp",!0);w(S,D,ae,"♢","\\diamondsuit",!0);w(S,D,ae,"ℜ","\\Re",!0);w(S,D,ae,"♡","\\heartsuit",!0);w(S,D,ae,"ℑ","\\Im",!0);w(S,D,ae,"♠","\\spadesuit",!0);w(S,D,ae,"§","\\S",!0);w(Ee,D,ae,"§","\\S");w(S,D,ae,"¶","\\P",!0);w(Ee,D,ae,"¶","\\P");w(S,D,ae,"†","\\dag");w(Ee,D,ae,"†","\\dag");w(Ee,D,ae,"†","\\textdagger");w(S,D,ae,"‡","\\ddag");w(Ee,D,ae,"‡","\\ddag");w(Ee,D,ae,"‡","\\textdaggerdbl");w(S,D,mr,"⎱","\\rmoustache",!0);w(S,D,ea,"⎰","\\lmoustache",!0);w(S,D,mr,"⟯","\\rgroup",!0);w(S,D,ea,"⟮","\\lgroup",!0);w(S,D,We,"∓","\\mp",!0);w(S,D,We,"⊖","\\ominus",!0);w(S,D,We,"⊎","\\uplus",!0);w(S,D,We,"⊓","\\sqcap",!0);w(S,D,We,"∗","\\ast");w(S,D,We,"⊔","\\sqcup",!0);w(S,D,We,"◯","\\bigcirc",!0);w(S,D,We,"∙","\\bullet",!0);w(S,D,We,"‡","\\ddagger");w(S,D,We,"≀","\\wr",!0);w(S,D,We,"⨿","\\amalg");w(S,D,We,"&","\\And");w(S,D,W,"⟵","\\longleftarrow",!0);w(S,D,W,"⇐","\\Leftarrow",!0);w(S,D,W,"⟸","\\Longleftarrow",!0);w(S,D,W,"⟶","\\longrightarrow",!0);w(S,D,W,"⇒","\\Rightarrow",!0);w(S,D,W,"⟹","\\Longrightarrow",!0);w(S,D,W,"↔","\\leftrightarrow",!0);w(S,D,W,"⟷","\\longleftrightarrow",!0);w(S,D,W,"⇔","\\Leftrightarrow",!0);w(S,D,W,"⟺","\\Longleftrightarrow",!0);w(S,D,W,"↦","\\mapsto",!0);w(S,D,W,"⟼","\\longmapsto",!0);w(S,D,W,"↗","\\nearrow",!0);w(S,D,W,"↩","\\hookleftarrow",!0);w(S,D,W,"↪","\\hookrightarrow",!0);w(S,D,W,"↘","\\searrow",!0);w(S,D,W,"↼","\\leftharpoonup",!0);w(S,D,W,"⇀","\\rightharpoonup",!0);w(S,D,W,"↙","\\swarrow",!0);w(S,D,W,"↽","\\leftharpoondown",!0);w(S,D,W,"⇁","\\rightharpoondown",!0);w(S,D,W,"↖","\\nwarrow",!0);w(S,D,W,"⇌","\\rightleftharpoons",!0);w(S,G,W,"≮","\\nless",!0);w(S,G,W,"","\\@nleqslant");w(S,G,W,"","\\@nleqq");w(S,G,W,"⪇","\\lneq",!0);w(S,G,W,"≨","\\lneqq",!0);w(S,G,W,"","\\@lvertneqq");w(S,G,W,"⋦","\\lnsim",!0);w(S,G,W,"⪉","\\lnapprox",!0);w(S,G,W,"⊀","\\nprec",!0);w(S,G,W,"⋠","\\npreceq",!0);w(S,G,W,"⋨","\\precnsim",!0);w(S,G,W,"⪹","\\precnapprox",!0);w(S,G,W,"≁","\\nsim",!0);w(S,G,W,"","\\@nshortmid");w(S,G,W,"∤","\\nmid",!0);w(S,G,W,"⊬","\\nvdash",!0);w(S,G,W,"⊭","\\nvDash",!0);w(S,G,W,"⋪","\\ntriangleleft");w(S,G,W,"⋬","\\ntrianglelefteq",!0);w(S,G,W,"⊊","\\subsetneq",!0);w(S,G,W,"","\\@varsubsetneq");w(S,G,W,"⫋","\\subsetneqq",!0);w(S,G,W,"","\\@varsubsetneqq");w(S,G,W,"≯","\\ngtr",!0);w(S,G,W,"","\\@ngeqslant");w(S,G,W,"","\\@ngeqq");w(S,G,W,"⪈","\\gneq",!0);w(S,G,W,"≩","\\gneqq",!0);w(S,G,W,"","\\@gvertneqq");w(S,G,W,"⋧","\\gnsim",!0);w(S,G,W,"⪊","\\gnapprox",!0);w(S,G,W,"⊁","\\nsucc",!0);w(S,G,W,"⋡","\\nsucceq",!0);w(S,G,W,"⋩","\\succnsim",!0);w(S,G,W,"⪺","\\succnapprox",!0);w(S,G,W,"≆","\\ncong",!0);w(S,G,W,"","\\@nshortparallel");w(S,G,W,"∦","\\nparallel",!0);w(S,G,W,"⊯","\\nVDash",!0);w(S,G,W,"⋫","\\ntriangleright");w(S,G,W,"⋭","\\ntrianglerighteq",!0);w(S,G,W,"","\\@nsupseteqq");w(S,G,W,"⊋","\\supsetneq",!0);w(S,G,W,"","\\@varsupsetneq");w(S,G,W,"⫌","\\supsetneqq",!0);w(S,G,W,"","\\@varsupsetneqq");w(S,G,W,"⊮","\\nVdash",!0);w(S,G,W,"⪵","\\precneqq",!0);w(S,G,W,"⪶","\\succneqq",!0);w(S,G,W,"","\\@nsubseteqq");w(S,G,We,"⊴","\\unlhd");w(S,G,We,"⊵","\\unrhd");w(S,G,W,"↚","\\nleftarrow",!0);w(S,G,W,"↛","\\nrightarrow",!0);w(S,G,W,"⇍","\\nLeftarrow",!0);w(S,G,W,"⇏","\\nRightarrow",!0);w(S,G,W,"↮","\\nleftrightarrow",!0);w(S,G,W,"⇎","\\nLeftrightarrow",!0);w(S,G,W,"△","\\vartriangle");w(S,G,ae,"ℏ","\\hslash");w(S,G,ae,"▽","\\triangledown");w(S,G,ae,"◊","\\lozenge");w(S,G,ae,"Ⓢ","\\circledS");w(S,G,ae,"®","\\circledR");w(Ee,G,ae,"®","\\circledR");w(S,G,ae,"∡","\\measuredangle",!0);w(S,G,ae,"∄","\\nexists");w(S,G,ae,"℧","\\mho");w(S,G,ae,"Ⅎ","\\Finv",!0);w(S,G,ae,"⅁","\\Game",!0);w(S,G,ae,"‵","\\backprime");w(S,G,ae,"▲","\\blacktriangle");w(S,G,ae,"▼","\\blacktriangledown");w(S,G,ae,"■","\\blacksquare");w(S,G,ae,"⧫","\\blacklozenge");w(S,G,ae,"★","\\bigstar");w(S,G,ae,"∢","\\sphericalangle",!0);w(S,G,ae,"∁","\\complement",!0);w(S,G,ae,"ð","\\eth",!0);w(Ee,D,ae,"ð","ð");w(S,G,ae,"╱","\\diagup");w(S,G,ae,"╲","\\diagdown");w(S,G,ae,"□","\\square");w(S,G,ae,"□","\\Box");w(S,G,ae,"◊","\\Diamond");w(S,G,ae,"¥","\\yen",!0);w(Ee,G,ae,"¥","\\yen",!0);w(S,G,ae,"✓","\\checkmark",!0);w(Ee,G,ae,"✓","\\checkmark");w(S,G,ae,"ℶ","\\beth",!0);w(S,G,ae,"ℸ","\\daleth",!0);w(S,G,ae,"ℷ","\\gimel",!0);w(S,G,ae,"ϝ","\\digamma",!0);w(S,G,ae,"ϰ","\\varkappa");w(S,G,ea,"┌","\\@ulcorner",!0);w(S,G,mr,"┐","\\@urcorner",!0);w(S,G,ea,"└","\\@llcorner",!0);w(S,G,mr,"┘","\\@lrcorner",!0);w(S,G,W,"≦","\\leqq",!0);w(S,G,W,"⩽","\\leqslant",!0);w(S,G,W,"⪕","\\eqslantless",!0);w(S,G,W,"≲","\\lesssim",!0);w(S,G,W,"⪅","\\lessapprox",!0);w(S,G,W,"≊","\\approxeq",!0);w(S,G,We,"⋖","\\lessdot");w(S,G,W,"⋘","\\lll",!0);w(S,G,W,"≶","\\lessgtr",!0);w(S,G,W,"⋚","\\lesseqgtr",!0);w(S,G,W,"⪋","\\lesseqqgtr",!0);w(S,G,W,"≑","\\doteqdot");w(S,G,W,"≓","\\risingdotseq",!0);w(S,G,W,"≒","\\fallingdotseq",!0);w(S,G,W,"∽","\\backsim",!0);w(S,G,W,"⋍","\\backsimeq",!0);w(S,G,W,"⫅","\\subseteqq",!0);w(S,G,W,"⋐","\\Subset",!0);w(S,G,W,"⊏","\\sqsubset",!0);w(S,G,W,"≼","\\preccurlyeq",!0);w(S,G,W,"⋞","\\curlyeqprec",!0);w(S,G,W,"≾","\\precsim",!0);w(S,G,W,"⪷","\\precapprox",!0);w(S,G,W,"⊲","\\vartriangleleft");w(S,G,W,"⊴","\\trianglelefteq");w(S,G,W,"⊨","\\vDash",!0);w(S,G,W,"⊪","\\Vvdash",!0);w(S,G,W,"⌣","\\smallsmile");w(S,G,W,"⌢","\\smallfrown");w(S,G,W,"≏","\\bumpeq",!0);w(S,G,W,"≎","\\Bumpeq",!0);w(S,G,W,"≧","\\geqq",!0);w(S,G,W,"⩾","\\geqslant",!0);w(S,G,W,"⪖","\\eqslantgtr",!0);w(S,G,W,"≳","\\gtrsim",!0);w(S,G,W,"⪆","\\gtrapprox",!0);w(S,G,We,"⋗","\\gtrdot");w(S,G,W,"⋙","\\ggg",!0);w(S,G,W,"≷","\\gtrless",!0);w(S,G,W,"⋛","\\gtreqless",!0);w(S,G,W,"⪌","\\gtreqqless",!0);w(S,G,W,"≖","\\eqcirc",!0);w(S,G,W,"≗","\\circeq",!0);w(S,G,W,"≜","\\triangleq",!0);w(S,G,W,"∼","\\thicksim");w(S,G,W,"≈","\\thickapprox");w(S,G,W,"⫆","\\supseteqq",!0);w(S,G,W,"⋑","\\Supset",!0);w(S,G,W,"⊐","\\sqsupset",!0);w(S,G,W,"≽","\\succcurlyeq",!0);w(S,G,W,"⋟","\\curlyeqsucc",!0);w(S,G,W,"≿","\\succsim",!0);w(S,G,W,"⪸","\\succapprox",!0);w(S,G,W,"⊳","\\vartriangleright");w(S,G,W,"⊵","\\trianglerighteq");w(S,G,W,"⊩","\\Vdash",!0);w(S,G,W,"∣","\\shortmid");w(S,G,W,"∥","\\shortparallel");w(S,G,W,"≬","\\between",!0);w(S,G,W,"⋔","\\pitchfork",!0);w(S,G,W,"∝","\\varpropto");w(S,G,W,"◀","\\blacktriangleleft");w(S,G,W,"∴","\\therefore",!0);w(S,G,W,"∍","\\backepsilon");w(S,G,W,"▶","\\blacktriangleright");w(S,G,W,"∵","\\because",!0);w(S,G,W,"⋘","\\llless");w(S,G,W,"⋙","\\gggtr");w(S,G,We,"⊲","\\lhd");w(S,G,We,"⊳","\\rhd");w(S,G,W,"≂","\\eqsim",!0);w(S,D,W,"⋈","\\Join");w(S,G,W,"≑","\\Doteq",!0);w(S,G,We,"∔","\\dotplus",!0);w(S,G,We,"∖","\\smallsetminus");w(S,G,We,"⋒","\\Cap",!0);w(S,G,We,"⋓","\\Cup",!0);w(S,G,We,"⩞","\\doublebarwedge",!0);w(S,G,We,"⊟","\\boxminus",!0);w(S,G,We,"⊞","\\boxplus",!0);w(S,G,We,"⋇","\\divideontimes",!0);w(S,G,We,"⋉","\\ltimes",!0);w(S,G,We,"⋊","\\rtimes",!0);w(S,G,We,"⋋","\\leftthreetimes",!0);w(S,G,We,"⋌","\\rightthreetimes",!0);w(S,G,We,"⋏","\\curlywedge",!0);w(S,G,We,"⋎","\\curlyvee",!0);w(S,G,We,"⊝","\\circleddash",!0);w(S,G,We,"⊛","\\circledast",!0);w(S,G,We,"⋅","\\centerdot");w(S,G,We,"⊺","\\intercal",!0);w(S,G,We,"⋒","\\doublecap");w(S,G,We,"⋓","\\doublecup");w(S,G,We,"⊠","\\boxtimes",!0);w(S,G,W,"⇢","\\dashrightarrow",!0);w(S,G,W,"⇠","\\dashleftarrow",!0);w(S,G,W,"⇇","\\leftleftarrows",!0);w(S,G,W,"⇆","\\leftrightarrows",!0);w(S,G,W,"⇚","\\Lleftarrow",!0);w(S,G,W,"↞","\\twoheadleftarrow",!0);w(S,G,W,"↢","\\leftarrowtail",!0);w(S,G,W,"↫","\\looparrowleft",!0);w(S,G,W,"⇋","\\leftrightharpoons",!0);w(S,G,W,"↶","\\curvearrowleft",!0);w(S,G,W,"↺","\\circlearrowleft",!0);w(S,G,W,"↰","\\Lsh",!0);w(S,G,W,"⇈","\\upuparrows",!0);w(S,G,W,"↿","\\upharpoonleft",!0);w(S,G,W,"⇃","\\downharpoonleft",!0);w(S,D,W,"⊶","\\origof",!0);w(S,D,W,"⊷","\\imageof",!0);w(S,G,W,"⊸","\\multimap",!0);w(S,G,W,"↭","\\leftrightsquigarrow",!0);w(S,G,W,"⇉","\\rightrightarrows",!0);w(S,G,W,"⇄","\\rightleftarrows",!0);w(S,G,W,"↠","\\twoheadrightarrow",!0);w(S,G,W,"↣","\\rightarrowtail",!0);w(S,G,W,"↬","\\looparrowright",!0);w(S,G,W,"↷","\\curvearrowright",!0);w(S,G,W,"↻","\\circlearrowright",!0);w(S,G,W,"↱","\\Rsh",!0);w(S,G,W,"⇊","\\downdownarrows",!0);w(S,G,W,"↾","\\upharpoonright",!0);w(S,G,W,"⇂","\\downharpoonright",!0);w(S,G,W,"⇝","\\rightsquigarrow",!0);w(S,G,W,"⇝","\\leadsto");w(S,G,W,"⇛","\\Rrightarrow",!0);w(S,G,W,"↾","\\restriction");w(S,D,ae,"‘","`");w(S,D,ae,"$","\\$");w(Ee,D,ae,"$","\\$");w(Ee,D,ae,"$","\\textdollar");w(S,D,ae,"%","\\%");w(Ee,D,ae,"%","\\%");w(S,D,ae,"_","\\_");w(Ee,D,ae,"_","\\_");w(Ee,D,ae,"_","\\textunderscore");w(S,D,ae,"∠","\\angle",!0);w(S,D,ae,"∞","\\infty",!0);w(S,D,ae,"′","\\prime");w(S,D,ae,"△","\\triangle");w(S,D,ae,"Γ","\\Gamma",!0);w(S,D,ae,"Δ","\\Delta",!0);w(S,D,ae,"Θ","\\Theta",!0);w(S,D,ae,"Λ","\\Lambda",!0);w(S,D,ae,"Ξ","\\Xi",!0);w(S,D,ae,"Π","\\Pi",!0);w(S,D,ae,"Σ","\\Sigma",!0);w(S,D,ae,"Υ","\\Upsilon",!0);w(S,D,ae,"Φ","\\Phi",!0);w(S,D,ae,"Ψ","\\Psi",!0);w(S,D,ae,"Ω","\\Omega",!0);w(S,D,ae,"A","Α");w(S,D,ae,"B","Β");w(S,D,ae,"E","Ε");w(S,D,ae,"Z","Ζ");w(S,D,ae,"H","Η");w(S,D,ae,"I","Ι");w(S,D,ae,"K","Κ");w(S,D,ae,"M","Μ");w(S,D,ae,"N","Ν");w(S,D,ae,"O","Ο");w(S,D,ae,"P","Ρ");w(S,D,ae,"T","Τ");w(S,D,ae,"X","Χ");w(S,D,ae,"¬","\\neg",!0);w(S,D,ae,"¬","\\lnot");w(S,D,ae,"⊤","\\top");w(S,D,ae,"⊥","\\bot");w(S,D,ae,"∅","\\emptyset");w(S,G,ae,"∅","\\varnothing");w(S,D,st,"α","\\alpha",!0);w(S,D,st,"β","\\beta",!0);w(S,D,st,"γ","\\gamma",!0);w(S,D,st,"δ","\\delta",!0);w(S,D,st,"ϵ","\\epsilon",!0);w(S,D,st,"ζ","\\zeta",!0);w(S,D,st,"η","\\eta",!0);w(S,D,st,"θ","\\theta",!0);w(S,D,st,"ι","\\iota",!0);w(S,D,st,"κ","\\kappa",!0);w(S,D,st,"λ","\\lambda",!0);w(S,D,st,"μ","\\mu",!0);w(S,D,st,"ν","\\nu",!0);w(S,D,st,"ξ","\\xi",!0);w(S,D,st,"ο","\\omicron",!0);w(S,D,st,"π","\\pi",!0);w(S,D,st,"ρ","\\rho",!0);w(S,D,st,"σ","\\sigma",!0);w(S,D,st,"τ","\\tau",!0);w(S,D,st,"υ","\\upsilon",!0);w(S,D,st,"ϕ","\\phi",!0);w(S,D,st,"χ","\\chi",!0);w(S,D,st,"ψ","\\psi",!0);w(S,D,st,"ω","\\omega",!0);w(S,D,st,"ε","\\varepsilon",!0);w(S,D,st,"ϑ","\\vartheta",!0);w(S,D,st,"ϖ","\\varpi",!0);w(S,D,st,"ϱ","\\varrho",!0);w(S,D,st,"ς","\\varsigma",!0);w(S,D,st,"φ","\\varphi",!0);w(S,D,We,"∗","*",!0);w(S,D,We,"+","+");w(S,D,We,"−","-",!0);w(S,D,We,"⋅","\\cdot",!0);w(S,D,We,"∘","\\circ",!0);w(S,D,We,"÷","\\div",!0);w(S,D,We,"±","\\pm",!0);w(S,D,We,"×","\\times",!0);w(S,D,We,"∩","\\cap",!0);w(S,D,We,"∪","\\cup",!0);w(S,D,We,"∖","\\setminus",!0);w(S,D,We,"∧","\\land");w(S,D,We,"∨","\\lor");w(S,D,We,"∧","\\wedge",!0);w(S,D,We,"∨","\\vee",!0);w(S,D,ae,"√","\\surd");w(S,D,ea,"⟨","\\langle",!0);w(S,D,ea,"∣","\\lvert");w(S,D,ea,"∥","\\lVert");w(S,D,mr,"?","?");w(S,D,mr,"!","!");w(S,D,mr,"⟩","\\rangle",!0);w(S,D,mr,"∣","\\rvert");w(S,D,mr,"∥","\\rVert");w(S,D,W,"=","=");w(S,D,W,":",":");w(S,D,W,"≈","\\approx",!0);w(S,D,W,"≅","\\cong",!0);w(S,D,W,"≥","\\ge");w(S,D,W,"≥","\\geq",!0);w(S,D,W,"←","\\gets");w(S,D,W,">","\\gt",!0);w(S,D,W,"∈","\\in",!0);w(S,D,W,"","\\@not");w(S,D,W,"⊂","\\subset",!0);w(S,D,W,"⊃","\\supset",!0);w(S,D,W,"⊆","\\subseteq",!0);w(S,D,W,"⊇","\\supseteq",!0);w(S,G,W,"⊈","\\nsubseteq",!0);w(S,G,W,"⊉","\\nsupseteq",!0);w(S,D,W,"⊨","\\models");w(S,D,W,"←","\\leftarrow",!0);w(S,D,W,"≤","\\le");w(S,D,W,"≤","\\leq",!0);w(S,D,W,"<","\\lt",!0);w(S,D,W,"→","\\rightarrow",!0);w(S,D,W,"→","\\to");w(S,G,W,"≱","\\ngeq",!0);w(S,G,W,"≰","\\nleq",!0);w(S,D,el," ","\\ ");w(S,D,el," ","\\space");w(S,D,el," ","\\nobreakspace");w(Ee,D,el," ","\\ ");w(Ee,D,el," "," ");w(Ee,D,el," ","\\space");w(Ee,D,el," ","\\nobreakspace");w(S,D,el,"","\\nobreak");w(S,D,el,"","\\allowbreak");w(S,D,u0,",",",");w(S,D,u0,";",";");w(S,G,We,"⊼","\\barwedge",!0);w(S,G,We,"⊻","\\veebar",!0);w(S,D,We,"⊙","\\odot",!0);w(S,D,We,"⊕","\\oplus",!0);w(S,D,We,"⊗","\\otimes",!0);w(S,D,ae,"∂","\\partial",!0);w(S,D,We,"⊘","\\oslash",!0);w(S,G,We,"⊚","\\circledcirc",!0);w(S,G,We,"⊡","\\boxdot",!0);w(S,D,We,"△","\\bigtriangleup");w(S,D,We,"▽","\\bigtriangledown");w(S,D,We,"†","\\dagger");w(S,D,We,"⋄","\\diamond");w(S,D,We,"⋆","\\star");w(S,D,We,"◃","\\triangleleft");w(S,D,We,"▹","\\triangleright");w(S,D,ea,"{","\\{");w(Ee,D,ae,"{","\\{");w(Ee,D,ae,"{","\\textbraceleft");w(S,D,mr,"}","\\}");w(Ee,D,ae,"}","\\}");w(Ee,D,ae,"}","\\textbraceright");w(S,D,ea,"{","\\lbrace");w(S,D,mr,"}","\\rbrace");w(S,D,ea,"[","\\lbrack",!0);w(Ee,D,ae,"[","\\lbrack",!0);w(S,D,mr,"]","\\rbrack",!0);w(Ee,D,ae,"]","\\rbrack",!0);w(S,D,ea,"(","\\lparen",!0);w(S,D,mr,")","\\rparen",!0);w(Ee,D,ae,"<","\\textless",!0);w(Ee,D,ae,">","\\textgreater",!0);w(S,D,ea,"⌊","\\lfloor",!0);w(S,D,mr,"⌋","\\rfloor",!0);w(S,D,ea,"⌈","\\lceil",!0);w(S,D,mr,"⌉","\\rceil",!0);w(S,D,ae,"\\","\\backslash");w(S,D,ae,"∣","|");w(S,D,ae,"∣","\\vert");w(Ee,D,ae,"|","\\textbar",!0);w(S,D,ae,"∥","\\|");w(S,D,ae,"∥","\\Vert");w(Ee,D,ae,"∥","\\textbardbl");w(Ee,D,ae,"~","\\textasciitilde");w(Ee,D,ae,"\\","\\textbackslash");w(Ee,D,ae,"^","\\textasciicircum");w(S,D,W,"↑","\\uparrow",!0);w(S,D,W,"⇑","\\Uparrow",!0);w(S,D,W,"↓","\\downarrow",!0);w(S,D,W,"⇓","\\Downarrow",!0);w(S,D,W,"↕","\\updownarrow",!0);w(S,D,W,"⇕","\\Updownarrow",!0);w(S,D,Nn,"∐","\\coprod");w(S,D,Nn,"⋁","\\bigvee");w(S,D,Nn,"⋀","\\bigwedge");w(S,D,Nn,"⨄","\\biguplus");w(S,D,Nn,"⋂","\\bigcap");w(S,D,Nn,"⋃","\\bigcup");w(S,D,Nn,"∫","\\int");w(S,D,Nn,"∫","\\intop");w(S,D,Nn,"∬","\\iint");w(S,D,Nn,"∭","\\iiint");w(S,D,Nn,"∏","\\prod");w(S,D,Nn,"∑","\\sum");w(S,D,Nn,"⨂","\\bigotimes");w(S,D,Nn,"⨁","\\bigoplus");w(S,D,Nn,"⨀","\\bigodot");w(S,D,Nn,"∮","\\oint");w(S,D,Nn,"∯","\\oiint");w(S,D,Nn,"∰","\\oiiint");w(S,D,Nn,"⨆","\\bigsqcup");w(S,D,Nn,"∫","\\smallint");w(Ee,D,vu,"…","\\textellipsis");w(S,D,vu,"…","\\mathellipsis");w(Ee,D,vu,"…","\\ldots",!0);w(S,D,vu,"…","\\ldots",!0);w(S,D,vu,"⋯","\\@cdots",!0);w(S,D,vu,"⋱","\\ddots",!0);w(S,D,ae,"⋮","\\varvdots");w(Ee,D,ae,"⋮","\\varvdots");w(S,D,on,"ˊ","\\acute");w(S,D,on,"ˋ","\\grave");w(S,D,on,"¨","\\ddot");w(S,D,on,"~","\\tilde");w(S,D,on,"ˉ","\\bar");w(S,D,on,"˘","\\breve");w(S,D,on,"ˇ","\\check");w(S,D,on,"^","\\hat");w(S,D,on,"⃗","\\vec");w(S,D,on,"˙","\\dot");w(S,D,on,"˚","\\mathring");w(S,D,st,"","\\@imath");w(S,D,st,"","\\@jmath");w(S,D,ae,"ı","ı");w(S,D,ae,"ȷ","ȷ");w(Ee,D,ae,"ı","\\i",!0);w(Ee,D,ae,"ȷ","\\j",!0);w(Ee,D,ae,"ß","\\ss",!0);w(Ee,D,ae,"æ","\\ae",!0);w(Ee,D,ae,"œ","\\oe",!0);w(Ee,D,ae,"ø","\\o",!0);w(Ee,D,ae,"Æ","\\AE",!0);w(Ee,D,ae,"Œ","\\OE",!0);w(Ee,D,ae,"Ø","\\O",!0);w(Ee,D,on,"ˊ","\\'");w(Ee,D,on,"ˋ","\\`");w(Ee,D,on,"ˆ","\\^");w(Ee,D,on,"˜","\\~");w(Ee,D,on,"ˉ","\\=");w(Ee,D,on,"˘","\\u");w(Ee,D,on,"˙","\\.");w(Ee,D,on,"¸","\\c");w(Ee,D,on,"˚","\\r");w(Ee,D,on,"ˇ","\\v");w(Ee,D,on,"¨",'\\"');w(Ee,D,on,"˝","\\H");w(Ee,D,on,"◯","\\textcircled");var u5={"--":!0,"---":!0,"``":!0,"''":!0};w(Ee,D,ae,"–","--",!0);w(Ee,D,ae,"–","\\textendash");w(Ee,D,ae,"—","---",!0);w(Ee,D,ae,"—","\\textemdash");w(Ee,D,ae,"‘","`",!0);w(Ee,D,ae,"‘","\\textquoteleft");w(Ee,D,ae,"’","'",!0);w(Ee,D,ae,"’","\\textquoteright");w(Ee,D,ae,"“","``",!0);w(Ee,D,ae,"“","\\textquotedblleft");w(Ee,D,ae,"”","''",!0);w(Ee,D,ae,"”","\\textquotedblright");w(S,D,ae,"°","\\degree",!0);w(Ee,D,ae,"°","\\degree");w(Ee,D,ae,"°","\\textdegree",!0);w(S,D,ae,"£","\\pounds");w(S,D,ae,"£","\\mathsterling",!0);w(Ee,D,ae,"£","\\pounds");w(Ee,D,ae,"£","\\textsterling",!0);w(S,G,ae,"✠","\\maltese");w(Ee,G,ae,"✠","\\maltese");var tv='0123456789/@."';for(var Pm=0;Pm<tv.length;Pm++){var nv=tv.charAt(Pm);w(S,D,ae,nv,nv)}var rv='0123456789!@*()-=+";:?/.,';for(var Gm=0;Gm<rv.length;Gm++){var av=rv.charAt(Gm);w(Ee,D,ae,av,av)}var mf="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(var Vm=0;Vm<mf.length;Vm++){var Dd=mf.charAt(Vm);w(S,D,st,Dd,Dd),w(Ee,D,ae,Dd,Dd)}w(S,G,ae,"C","ℂ");w(Ee,G,ae,"C","ℂ");w(S,G,ae,"H","ℍ");w(Ee,G,ae,"H","ℍ");w(S,G,ae,"N","ℕ");w(Ee,G,ae,"N","ℕ");w(S,G,ae,"P","ℙ");w(Ee,G,ae,"P","ℙ");w(S,G,ae,"Q","ℚ");w(Ee,G,ae,"Q","ℚ");w(S,G,ae,"R","ℝ");w(Ee,G,ae,"R","ℝ");w(S,G,ae,"Z","ℤ");w(Ee,G,ae,"Z","ℤ");w(S,D,st,"h","ℎ");w(Ee,D,st,"h","ℎ");var dt;for(var cr=0;cr<mf.length;cr++){var pn=mf.charAt(cr);dt=String.fromCharCode(55349,56320+cr),w(S,D,st,pn,dt),w(Ee,D,ae,pn,dt),dt=String.fromCharCode(55349,56372+cr),w(S,D,st,pn,dt),w(Ee,D,ae,pn,dt),dt=String.fromCharCode(55349,56424+cr),w(S,D,st,pn,dt),w(Ee,D,ae,pn,dt),dt=String.fromCharCode(55349,56580+cr),w(S,D,st,pn,dt),w(Ee,D,ae,pn,dt),dt=String.fromCharCode(55349,56684+cr),w(S,D,st,pn,dt),w(Ee,D,ae,pn,dt),dt=String.fromCharCode(55349,56736+cr),w(S,D,st,pn,dt),w(Ee,D,ae,pn,dt),dt=String.fromCharCode(55349,56788+cr),w(S,D,st,pn,dt),w(Ee,D,ae,pn,dt),dt=String.fromCharCode(55349,56840+cr),w(S,D,st,pn,dt),w(Ee,D,ae,pn,dt),dt=String.fromCharCode(55349,56944+cr),w(S,D,st,pn,dt),w(Ee,D,ae,pn,dt),cr<26&&(dt=String.fromCharCode(55349,56632+cr),w(S,D,st,pn,dt),w(Ee,D,ae,pn,dt),dt=String.fromCharCode(55349,56476+cr),w(S,D,st,pn,dt),w(Ee,D,ae,pn,dt))}dt="𝕜";w(S,D,st,"k",dt);w(Ee,D,ae,"k",dt);for(var Bs=0;Bs<10;Bs++){var Vl=Bs.toString();dt=String.fromCharCode(55349,57294+Bs),w(S,D,st,Vl,dt),w(Ee,D,ae,Vl,dt),dt=String.fromCharCode(55349,57314+Bs),w(S,D,st,Vl,dt),w(Ee,D,ae,Vl,dt),dt=String.fromCharCode(55349,57324+Bs),w(S,D,st,Vl,dt),w(Ee,D,ae,Vl,dt),dt=String.fromCharCode(55349,57334+Bs),w(S,D,st,Vl,dt),w(Ee,D,ae,Vl,dt)}var Ip="ÐÞþ";for(var Ym=0;Ym<Ip.length;Ym++){var zd=Ip.charAt(Ym);w(S,D,st,zd,zd),w(Ee,D,ae,zd,zd)}var _p={mathClass:"mathbf",textClass:"textbf",font:"Main-Bold"},iv={mathClass:"mathnormal",textClass:"textit",font:"Math-Italic"},lv={mathClass:"boldsymbol",textClass:"boldsymbol",font:"Main-BoldItalic"},sT={mathClass:"mathscr",textClass:"textscr",font:"Script-Regular"},$s={mathClass:"",textClass:"",font:""},sv={mathClass:"mathfrak",textClass:"textfrak",font:"Fraktur-Regular"},ov={mathClass:"mathbb",textClass:"textbb",font:"AMS-Regular"},uv={mathClass:"mathboldfrak",textClass:"textboldfrak",font:"Fraktur-Regular"},Lp={mathClass:"mathsf",textClass:"textsf",font:"SansSerif-Regular"},Bp={mathClass:"mathboldsf",textClass:"textboldsf",font:"SansSerif-Bold"},cv={mathClass:"mathitsf",textClass:"textitsf",font:"SansSerif-Italic"},qp={mathClass:"mathtt",textClass:"texttt",font:"Typewriter-Regular"},dv=[_p,_p,iv,iv,lv,lv,sT,$s,$s,$s,sv,sv,ov,ov,uv,uv,Lp,Lp,Bp,Bp,cv,cv,$s,$s,qp,qp],oT=[_p,$s,Lp,Bp,qp],uT=e=>{var t=e.charCodeAt(0),n=e.charCodeAt(1),a=(t-55296)*1024+(n-56320)+65536;if(119808<=a&&a<120484){var l=Math.floor((a-119808)/26);return dv[l]}else if(120782<=a&&a<=120831){var u=Math.floor((a-120782)/10);return oT[u]}else{if(a===120485||a===120486)return dv[0];if(120486<a&&a<120782)return $s;throw new Oe("Unsupported character: "+e)}},Ef=function(t,n,a){if(sn[a][t]){var l=sn[a][t].replace;l&&(t=l)}return{value:t,metrics:I1(t,n,a)}},dr=function(t,n,a,l,u){var c=Ef(t,n,a),f=c.metrics;t=c.value;var h;if(f){var m=f.italic;(a==="text"||l&&l.font==="mathit")&&(m=0),h=new Jr(t,f.height,f.depth,m,f.skew,f.width,u)}else typeof console<"u"&&console.warn("No character metrics "+("for '"+t+"' in style '"+n+"' and mode '"+a+"'")),h=new Jr(t,0,0,0,0,0,u);if(l){h.maxFontSize=l.sizeMultiplier,l.style.isTight()&&h.classes.push("mtight");var p=l.getColor();p&&(h.style.color=p)}return h},_1=function(t,n,a,l){return l===void 0&&(l=[]),a.font==="boldsymbol"&&Ef(t,"Main-Bold",n).metrics?dr(t,"Main-Bold",n,a,l.concat(["mathbf"])):t==="\\"||sn[n][t].font==="main"?dr(t,"Main-Regular",n,a,l):dr(t,"AMS-Regular",n,a,l.concat(["amsrm"]))},cT=function(t,n,a){return a!=="textord"&&Ef(t,"Math-BoldItalic",n).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},Nf=function(t,n,a){var l=t.mode,u=t.text,c=["mord"],{font:f,fontFamily:h,fontWeight:m,fontShape:p}=n,y=l==="math"||l==="text"&&!!f,k=y?f:h,x="",C="";if(u.charCodeAt(0)===55349){var M=uT(u);x=M.font,C=M[l+"Class"]}if(x)return dr(u,x,l,n,c.concat(C));if(k){var I,_;if(k==="boldsymbol"){var N=cT(u,l,a);I=N.fontName,_=[N.fontClass]}else y?(I=Up[f].fontName,_=[f]):(I=Rd(h,m,p),_=[h,m,p]);if(Ef(u,I,l).metrics)return dr(u,I,l,n,c.concat(_));if(u5.hasOwnProperty(u)&&I.slice(0,10)==="Typewriter"){for(var q=[],R=0;R<u.length;R++)q.push(dr(u[R],I,l,n,c.concat(_)));return tl(q)}}if(a==="mathord")return dr(u,"Math-Italic",l,n,c.concat(["mathnormal"]));if(a==="textord"){var X=sn[l][u]&&sn[l][u].font;if(X==="ams"){var P=Rd("amsrm",m,p);return dr(u,P,l,n,c.concat("amsrm",m,p))}else if(X==="main"||!X){var H=Rd("textrm",m,p);return dr(u,H,l,n,c.concat(m,p))}else{var J=Rd(X,m,p);return dr(u,J,l,n,c.concat(J,m,p))}}else throw new Error("unexpected type: "+a+" in makeOrd")},dT=(e,t)=>{if(Xl(e.classes)!==Xl(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize||e.italic!==0&&e.hasClass("mathnormal"))return!1;if(e.classes.length===1){var n=e.classes[0];if(n==="mbin"||n==="mord")return!1}for(var a of Object.keys(e.style))if(e.style[a]!==t.style[a])return!1;for(var l of Object.keys(t.style))if(e.style[l]!==t.style[l])return!1;return!0},c5=e=>{for(var t=0;t<e.length-1;t++){var n=e[t],a=e[t+1];n instanceof Jr&&a instanceof Jr&&dT(n,a)&&(n.text+=a.text,n.height=Math.max(n.height,a.height),n.depth=Math.max(n.depth,a.depth),n.italic=a.italic,e.splice(t+1,1),t--)}return e},L1=function(t){for(var n=0,a=0,l=0,u=0;u<t.children.length;u++){var c=t.children[u];c.height>n&&(n=c.height),c.depth>a&&(a=c.depth),c.maxFontSize>l&&(l=c.maxFontSize)}t.height=n,t.depth=a,t.maxFontSize=l},De=function(t,n,a,l){var u=new yu(t,n,a,l);return L1(u),u},Ql=(e,t,n,a)=>new yu(e,t,n,a),du=function(t,n,a){var l=De([t],[],n);return l.height=Math.max(a||n.fontMetrics().defaultRuleThickness,n.minRuleThickness),l.style.borderBottomWidth=Ue(l.height),l.maxFontSize=1,l},fT=function(t,n,a,l){var u=new Af(t,n,a,l);return L1(u),u},tl=function(t){var n=new gu(t);return L1(n),n},fu=function(t,n){return t instanceof gu?De([],[t],n):t},hT=function(t){if(t.positionType==="individualShift"){for(var n=t.children,a=[n[0]],l=-n[0].shift-n[0].elem.depth,u=l,c=1;c<n.length;c++){var f=-n[c].shift-u-n[c].elem.depth,h=f-(n[c-1].elem.height+n[c-1].elem.depth);u=u+f,a.push({type:"kern",size:h}),a.push(n[c])}return{children:a,depth:l}}var m;if(t.positionType==="top"){for(var p=t.positionData,y=0;y<t.children.length;y++){var k=t.children[y];p-=k.type==="kern"?k.size:k.elem.height+k.elem.depth}m=p}else if(t.positionType==="bottom")m=-t.positionData;else{var x=t.children[0];if(x.type!=="elem")throw new Error('First child must have type "elem".');if(t.positionType==="shift")m=-x.elem.depth-t.positionData;else if(t.positionType==="firstBaseline")m=-x.elem.depth;else throw new Error("Invalid positionType "+t.positionType+".")}return{children:t.children,depth:m}},It=function(t,n){for(var{children:a,depth:l}=hT(t),u=0,c=0;c<a.length;c++){var f=a[c];if(f.type==="elem"){var h=f.elem;u=Math.max(u,h.maxFontSize,h.height)}}u+=2;var m=De(["pstrut"],[]);m.style.height=Ue(u);for(var p=[],y=l,k=l,x=l,C=0;C<a.length;C++){var M=a[C];if(M.type==="kern")x+=M.size;else{var I=M.elem,_=M.wrapperClasses||[],N=M.wrapperStyle||{},q=De(_,[m,I],void 0,N);q.style.top=Ue(-u-x-I.depth),M.marginLeft&&(q.style.marginLeft=M.marginLeft),M.marginRight&&(q.style.marginRight=M.marginRight),p.push(q),x+=I.height+I.depth}y=Math.min(y,x),k=Math.max(k,x)}var R=De(["vlist"],p);R.style.height=Ue(k);var X;if(y<0){var P=De([],[]),H=De(["vlist"],[P]);H.style.height=Ue(-y);var J=De(["vlist-s"],[new Jr("")]);X=[De(["vlist-r"],[R,J]),De(["vlist-r"],[H])]}else X=[De(["vlist-r"],[R])];var ne=De(["vlist-t"],X);return X.length===2&&ne.classes.push("vlist-t2"),ne.height=k,ne.depth=-y,ne},d5=(e,t)=>{var n=De(["mspace"],[],t),a=cn(e,t);return n.style.marginRight=Ue(a),n},Rd=(e,t,n)=>{var a,l;switch(e){case"amsrm":a="AMS";break;case"textrm":a="Main";break;case"textsf":a="SansSerif";break;case"texttt":a="Typewriter";break;default:a=e}return t==="textbf"&&n==="textit"?l="BoldItalic":t==="textbf"?l="Bold":n==="textit"?l="Italic":l="Regular",a+"-"+l},Up={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},f5={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},h5=function(t,n){var[a,l,u]=f5[t],c=new Zl(a),f=new Zi([c],{width:Ue(l),height:Ue(u),style:"width:"+Ue(l),viewBox:"0 0 "+1e3*l+" "+1e3*u,preserveAspectRatio:"xMinYMin"}),h=Ql(["overlay"],[f],n);return h.height=u,h.style.height=Ue(u),h.style.width=Ue(l),h},un={number:3,unit:"mu"},qs={number:4,unit:"mu"},Vi={number:5,unit:"mu"},mT={mord:{mop:un,mbin:qs,mrel:Vi,minner:un},mop:{mord:un,mop:un,mrel:Vi,minner:un},mbin:{mord:qs,mop:qs,mopen:qs,minner:qs},mrel:{mord:Vi,mop:Vi,mopen:Vi,minner:Vi},mopen:{},mclose:{mop:un,mbin:qs,mrel:Vi,minner:un},mpunct:{mord:un,mop:un,mrel:Vi,mopen:un,mclose:un,mpunct:un,minner:un},minner:{mord:un,mop:un,mbin:qs,mrel:Vi,mopen:un,mpunct:un,minner:un}},pT={mord:{mop:un},mop:{mord:un,mop:un},mbin:{},mrel:{},mopen:{},mclose:{mop:un},mpunct:{},minner:{mop:un}},m5={},pf={},gf={};function Ye(e){for(var{type:t,names:n,props:a,handler:l,htmlBuilder:u,mathmlBuilder:c}=e,f={type:t,numArgs:a.numArgs,argTypes:a.argTypes,allowedInArgument:!!a.allowedInArgument,allowedInText:!!a.allowedInText,allowedInMath:a.allowedInMath===void 0?!0:a.allowedInMath,numOptionalArgs:a.numOptionalArgs||0,infix:!!a.infix,primitive:!!a.primitive,handler:l},h=0;h<n.length;++h)m5[n[h]]=f;t&&(u&&(pf[t]=u),c&&(gf[t]=c))}function Js(e){var{type:t,htmlBuilder:n,mathmlBuilder:a}=e;Ye({type:t,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:n,mathmlBuilder:a})}var yf=function(t){return t.type==="ordgroup"&&t.body.length===1?t.body[0]:t},An=function(t){return t.type==="ordgroup"?t.body:[t]},gT=new Set(["leftmost","mbin","mopen","mrel","mop","mpunct"]),yT=new Set(["rightmost","mrel","mclose","mpunct"]),vT={display:mt.DISPLAY,text:mt.TEXT,script:mt.SCRIPT,scriptscript:mt.SCRIPTSCRIPT},xT={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},Ln=function(t,n,a,l){l===void 0&&(l=[null,null]);for(var u=[],c=0;c<t.length;c++){var f=_t(t[c],n);if(f instanceof gu){var h=f.children;u.push(...h)}else u.push(f)}if(c5(u),!a)return u;var m=n;if(t.length===1){var p=t[0];p.type==="sizing"?m=n.havingSize(p.size):p.type==="styling"&&(m=n.havingStyle(vT[p.style]))}var y=De([l[0]||"leftmost"],[],n),k=De([l[1]||"rightmost"],[],n),x=a==="root";return Hp(u,(C,M)=>{var I=M.classes[0],_=C.classes[0];I==="mbin"&&yT.has(_)?M.classes[0]="mord":_==="mbin"&&gT.has(I)&&(C.classes[0]="mord")},{node:y},k,x),Hp(u,(C,M)=>{var I,_,N=Fp(M),q=Fp(C),R=N&&q?C.hasClass("mtight")?(I=pT[N])==null?void 0:I[q]:(_=mT[N])==null?void 0:_[q]:null;if(R)return d5(R,m)},{node:y},k,x),u},Hp=function(t,n,a,l,u){l&&t.push(l);for(var c=0;c<t.length;c++){var f=t[c],h=p5(f);if(h){Hp(h.children,n,a,null,u);continue}var m=!f.hasClass("mspace");if(m){var p=n(f,a.node);p&&(a.insertAfter?a.insertAfter(p):(t.unshift(p),c++))}m?a.node=f:u&&f.hasClass("newline")&&(a.node=De(["leftmost"])),a.insertAfter=(y=>k=>{t.splice(y+1,0,k),c++})(c)}l&&t.pop()},p5=function(t){return t instanceof gu||t instanceof Af||t instanceof yu&&t.hasClass("enclosing")?t:null},$p=function(t,n){var a=p5(t);if(a){var l=a.children;if(l.length){if(n==="right")return $p(l[l.length-1],"right");if(n==="left")return $p(l[0],"left")}}return t},Fp=function(t,n){if(!t)return null;n&&(t=$p(t,n));var a=t.classes[0];return xT[a]||null},t0=function(t,n){var a=["nulldelimiter"].concat(t.baseSizingClasses());return De(n.concat(a))},_t=function(t,n,a){if(!t)return De();if(pf[t.type]){var l=pf[t.type](t,n);if(a&&n.size!==a.size){l=De(n.sizingClasses(a),[l],n);var u=n.sizeMultiplier/a.sizeMultiplier;l.height*=u,l.depth*=u}return l}else throw new Oe("Got group of unknown type: '"+t.type+"'")};function Od(e,t){var n=De(["base"],e,t),a=De(["strut"]);return a.style.height=Ue(n.height+n.depth),n.depth&&(a.style.verticalAlign=Ue(-n.depth)),n.children.unshift(a),n}function Pp(e,t){var n=null;e.length===1&&e[0].type==="tag"&&(n=e[0].tag,e=e[0].body);var a=Ln(e,t,"root"),l;a.length===2&&a[1].hasClass("tag")&&(l=a.pop());for(var u=[],c=[],f=0;f<a.length;f++)if(c.push(a[f]),a[f].hasClass("mbin")||a[f].hasClass("mrel")||a[f].hasClass("allowbreak")){for(var h=!1;f<a.length-1&&a[f+1].hasClass("mspace")&&!a[f+1].hasClass("newline");)f++,c.push(a[f]),a[f].hasClass("nobreak")&&(h=!0);h||(u.push(Od(c,t)),c=[])}else a[f].hasClass("newline")&&(c.pop(),c.length>0&&(u.push(Od(c,t)),c=[]),u.push(a[f]));c.length>0&&u.push(Od(c,t));var m;n?(m=Od(Ln(n,t,!0),t),m.classes=["tag"],u.push(m)):l&&u.push(l);var p=De(["katex-html"],u);if(p.setAttribute("aria-hidden","true"),m){var y=m.children[0];y.style.height=Ue(p.height+p.depth),p.depth&&(y.style.verticalAlign=Ue(-p.depth))}return p}function g5(e){return new gu(e)}class _e{constructor(t,n,a){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=t,this.attributes={},this.children=n||[],this.classes=a||[]}setAttribute(t,n){this.attributes[t]=n}getAttribute(t){return this.attributes[t]}toNode(){var t=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&t.setAttribute(n,this.attributes[n]);this.classes.length>0&&(t.className=Xl(this.classes));for(var a=0;a<this.children.length;a++)if(this.children[a]instanceof En&&this.children[a+1]instanceof En){for(var l=this.children[a].toText()+this.children[++a].toText();this.children[a+1]instanceof En;)l+=this.children[++a].toText();t.appendChild(new En(l).toNode())}else t.appendChild(this.children[a].toNode());return t}toMarkup(){var t="<"+this.type;for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&(t+=" "+n+'="',t+=Zn(this.attributes[n]),t+='"');this.classes.length>0&&(t+=' class ="'+Zn(Xl(this.classes))+'"'),t+=">";for(var a=0;a<this.children.length;a++)t+=this.children[a].toMarkup();return t+="</"+this.type+">",t}toText(){return this.children.map(t=>t.toText()).join("")}}class En{constructor(t){this.text=void 0,this.text=t}toNode(){return document.createTextNode(this.text)}toMarkup(){return Zn(this.toText())}toText(){return this.text}}class y5{constructor(t){this.width=void 0,this.character=void 0,this.width=t,t>=.05555&&t<=.05556?this.character=" ":t>=.1666&&t<=.1667?this.character=" ":t>=.2222&&t<=.2223?this.character=" ":t>=.2777&&t<=.2778?this.character=" ":t>=-.05556&&t<=-.05555?this.character=" ":t>=-.1667&&t<=-.1666?this.character=" ":t>=-.2223&&t<=-.2222?this.character=" ":t>=-.2778&&t<=-.2777?this.character=" ":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var t=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return t.setAttribute("width",Ue(this.width)),t}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+Ue(this.width)+'"/>'}toText(){return this.character?this.character:" "}}var bT=new Set(["\\imath","\\jmath"]),wT=new Set(["mrow","mtable"]),ba=function(t,n,a){return sn[n][t]&&sn[n][t].replace&&t.charCodeAt(0)!==55349&&!(u5.hasOwnProperty(t)&&a&&(a.fontFamily&&a.fontFamily.slice(4,6)==="tt"||a.font&&a.font.slice(4,6)==="tt"))&&(t=sn[n][t].replace),new En(t)},B1=function(t){return t.length===1?t[0]:new _e("mrow",t)},kT={mathit:"italic",boldsymbol:e=>e.type==="textord"?"bold":"bold-italic",mathbf:"bold",mathbb:"double-struck",mathsfit:"sans-serif-italic",mathfrak:"fraktur",mathscr:"script",mathcal:"script",mathsf:"sans-serif",mathtt:"monospace"},q1=(e,t)=>{if(e.mode==="text"){if(t.fontFamily==="texttt")return"monospace";if(t.fontFamily==="textsf")return t.fontShape==="textit"&&t.fontWeight==="textbf"?"sans-serif-bold-italic":t.fontShape==="textit"?"sans-serif-italic":t.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(t.fontShape==="textit"&&t.fontWeight==="textbf")return"bold-italic";if(t.fontShape==="textit")return"italic";if(t.fontWeight==="textbf")return"bold"}var n=t.font;if(!n||n==="mathnormal")return null;var a=e.mode,l=kT[n];if(l)return typeof l=="function"?l(e):l;var u=e.text;if(bT.has(u))return null;if(sn[a][u]){var c=sn[a][u].replace;c&&(u=c)}var f=Up[n].fontName;return I1(u,f,a)?Up[n].variant:null};function Wm(e){if(!e)return!1;if(e.type==="mi"&&e.children.length===1){var t=e.children[0];return t instanceof En&&t.text==="."}else if(e.type==="mo"&&e.children.length===1&&e.getAttribute("separator")==="true"&&e.getAttribute("lspace")==="0em"&&e.getAttribute("rspace")==="0em"){var n=e.children[0];return n instanceof En&&n.text===","}else return!1}var ta=function(t,n,a){if(t.length===1){var l=Kt(t[0],n);return a&&l instanceof _e&&l.type==="mo"&&(l.setAttribute("lspace","0em"),l.setAttribute("rspace","0em")),[l]}for(var u=[],c,f=0;f<t.length;f++){var h=Kt(t[f],n);if(h instanceof _e&&c instanceof _e){if(h.type==="mtext"&&c.type==="mtext"&&h.getAttribute("mathvariant")===c.getAttribute("mathvariant")){c.children.push(...h.children);continue}else if(h.type==="mn"&&c.type==="mn"){c.children.push(...h.children);continue}else if(Wm(h)&&c.type==="mn"){c.children.push(...h.children);continue}else if(h.type==="mn"&&Wm(c))h.children=[...c.children,...h.children],u.pop();else if((h.type==="msup"||h.type==="msub")&&h.children.length>=1&&(c.type==="mn"||Wm(c))){var m=h.children[0];m instanceof _e&&m.type==="mn"&&(m.children=[...c.children,...m.children],u.pop())}else if(c.type==="mi"&&c.children.length===1){var p=c.children[0];if(p instanceof En&&p.text==="̸"&&(h.type==="mo"||h.type==="mi"||h.type==="mn")){var y=h.children[0];y instanceof En&&y.text.length>0&&(y.text=y.text.slice(0,1)+"̸"+y.text.slice(1),u.pop())}}}u.push(h),c=h}return u},Jl=function(t,n,a){return B1(ta(t,n,a))},Kt=function(t,n){if(!t)return new _e("mrow");if(gf[t.type])return gf[t.type](t,n);throw new Oe("Got group of unknown type: '"+t.type+"'")};function fv(e,t,n,a,l){var u=ta(e,n),c;u.length===1&&u[0]instanceof _e&&wT.has(u[0].type)?c=u[0]:c=new _e("mrow",u);var f=new _e("annotation",[new En(t)]);f.setAttribute("encoding","application/x-tex");var h=new _e("semantics",[c,f]),m=new _e("math",[h]);m.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),a&&m.setAttribute("display","block");var p=l?"katex":"katex-mathml";return De([p],[m])}var ST=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],hv=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],mv=function(t,n){return n.size<2?t:ST[t-1][n.size-1]};class Yi{constructor(t){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=t.style,this.color=t.color,this.size=t.size||Yi.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||"",this.fontFamily=t.fontFamily||"",this.fontWeight=t.fontWeight||"",this.fontShape=t.fontShape||"",this.sizeMultiplier=hv[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}extend(t){var n={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};return Object.assign(n,t),new Yi(n)}havingStyle(t){return this.style===t?this:this.extend({style:t,size:mv(this.textSize,t)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(t){return this.size===t&&this.textSize===t?this:this.extend({style:this.style.text(),size:t,textSize:t,sizeMultiplier:hv[t-1]})}havingBaseStyle(t){t=t||this.style.text();var n=mv(Yi.BASESIZE,t);return this.size===n&&this.textSize===Yi.BASESIZE&&this.style===t?this:this.extend({style:t,size:n})}havingBaseSizing(){var t;switch(this.style.id){case 4:case 5:t=3;break;case 6:case 7:t=1;break;default:t=6}return this.extend({style:this.style.text(),size:t})}withColor(t){return this.extend({color:t})}withPhantom(){return this.extend({phantom:!0})}withFont(t){return this.extend({font:t})}withTextFontFamily(t){return this.extend({fontFamily:t,font:""})}withTextFontWeight(t){return this.extend({fontWeight:t,font:""})}withTextFontShape(t){return this.extend({fontShape:t,font:""})}sizingClasses(t){return t.size!==this.size?["sizing","reset-size"+t.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==Yi.BASESIZE?["sizing","reset-size"+this.size,"size"+Yi.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=lT(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}Yi.BASESIZE=6;var v5=function(t){return new Yi({style:t.displayMode?mt.DISPLAY:mt.TEXT,maxSize:t.maxSize,minRuleThickness:t.minRuleThickness})},x5=function(t,n){if(n.displayMode){var a=["katex-display"];n.leqno&&a.push("leqno"),n.fleqn&&a.push("fleqn"),t=De(a,[t])}return t},jT=function(t,n,a){var l=v5(a),u;if(a.output==="mathml")return fv(t,n,l,a.displayMode,!0);if(a.output==="html"){var c=Pp(t,l);u=De(["katex"],[c])}else{var f=fv(t,n,l,a.displayMode,!1),h=Pp(t,l);u=De(["katex"],[f,h])}return x5(u,a)},CT=function(t,n,a){var l=v5(a),u=Pp(t,l),c=De(["katex"],[u]);return x5(c,a)},TT={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",underbracket:"⎵",overbracket:"⎴",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},Mf=function(t){var n=new _e("mo",[new En(TT[t.replace(/^\\/,"")])]);return n.setAttribute("stretchy","true"),n},AT={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overbracket:[["leftbracketover","rightbracketover"],1.6,440],underbracket:[["leftbracketunder","rightbracketunder"],1.6,410],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},ET=new Set(["widehat","widecheck","widetilde","utilde"]),Df=function(t,n){function a(){var f=4e5,h=t.label.slice(1);if(ET.has(h)&&"base"in t){var m=t.base.type==="ordgroup"?t.base.body.length:1,p,y,k;if(m>5)h==="widehat"||h==="widecheck"?(p=420,f=2364,k=.42,y=h+"4"):(p=312,f=2340,k=.34,y="tilde4");else{var x=[1,1,2,2,3,3][m];h==="widehat"||h==="widecheck"?(f=[0,1062,2364,2364,2364][x],p=[0,239,300,360,420][x],k=[0,.24,.3,.3,.36,.42][x],y=h+x):(f=[0,600,1033,2339,2340][x],p=[0,260,286,306,312][x],k=[0,.26,.286,.3,.306,.34][x],y="tilde"+x)}var C=new Zl(y),M=new Zi([C],{width:"100%",height:Ue(k),viewBox:"0 0 "+f+" "+p,preserveAspectRatio:"none"});return{span:Ql([],[M],n),minWidth:0,height:k}}else{var I=[],_=AT[h];if(!_)throw new Error('No SVG data for "'+h+'".');var[N,q,R]=_,X=R/1e3,P=N.length,H,J;if(P===1){if(_.length!==4)throw new Error('Expected 4-tuple for single-path SVG data "'+h+'".');H=["hide-tail"],J=[_[3]]}else if(P===2)H=["halfarrow-left","halfarrow-right"],J=["xMinYMin","xMaxYMin"];else if(P===3)H=["brace-left","brace-center","brace-right"],J=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
|
|
333
|
-
`+P+" children.");for(var ne=0;ne<P;ne++){var F=new Zl(N[ne]),te=new Zi([F],{width:"400em",height:Ue(X),viewBox:"0 0 "+f+" "+R,preserveAspectRatio:J[ne]+" slice"}),se=Ql([H[ne]],[te],n);if(P===1)return{span:se,minWidth:q,height:X};se.style.height=Ue(X),I.push(se)}return{span:De(["stretchy"],I,n),minWidth:q,height:X}}}var{span:l,minWidth:u,height:c}=a();return l.height=c,l.style.height=Ue(c),u>0&&(l.style.minWidth=Ue(u)),l},NT=function(t,n,a,l,u){var c,f=t.height+t.depth+a+l;if(/fbox|color|angl/.test(n)){if(c=De(["stretchy",n],[],u),n==="fbox"){var h=u.color&&u.getColor();h&&(c.style.borderColor=h)}}else{var m=[];/^[bx]cancel$/.test(n)&&m.push(new Op({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(n)&&m.push(new Op({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var p=new Zi(m,{width:"100%",height:Ue(f)});c=Ql([],[p],u)}return c.height=f,c.style.height=Ue(f),c},MT={bin:1,close:1,inner:1,open:1,punct:1,rel:1},DT={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function zT(e){return e in MT}function xt(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function zf(e){var t=Rf(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function Rf(e){return e&&(e.type==="atom"||DT.hasOwnProperty(e.type))?e:null}var b5=e=>{if(e instanceof Jr)return e;if(iT(e)&&e.children.length===1)return b5(e.children[0])},U1=(e,t)=>{var n,a,l;e&&e.type==="supsub"?(a=xt(e.base,"accent"),n=a.base,e.base=n,l=aT(_t(e,t)),e.base=a):(a=xt(e,"accent"),n=a.base);var u=_t(n,t.havingCrampedStyle()),c=a.isShifty&&Ji(n),f=0;if(c){var h,m;f=(h=(m=b5(u))==null?void 0:m.skew)!=null?h:0}var p=a.label==="\\c",y=p?u.height+u.depth:Math.min(u.height,t.fontMetrics().xHeight),k;if(a.isStretchy)k=Df(a,t),k=It({positionType:"firstBaseline",children:[{type:"elem",elem:u},{type:"elem",elem:k,wrapperClasses:["svg-align"],wrapperStyle:f>0?{width:"calc(100% - "+Ue(2*f)+")",marginLeft:Ue(2*f)}:void 0}]});else{var x,C;a.label==="\\vec"?(x=h5("vec",t),C=f5.vec[1]):(x=Nf({mode:a.mode,text:a.label},t,"textord"),x=rT(x),x.italic=0,C=x.width,p&&(y+=x.depth)),k=De(["accent-body"],[x]);var M=a.label==="\\textcircled";M&&(k.classes.push("accent-full"),y=u.height);var I=f;M||(I-=C/2),k.style.left=Ue(I),a.label==="\\textcircled"&&(k.style.top=".2em"),k=It({positionType:"firstBaseline",children:[{type:"elem",elem:u},{type:"kern",size:-y},{type:"elem",elem:k}]})}var _=De(["mord","accent"],[k],t);return l?(l.children[0]=_,l.height=Math.max(_.height,l.height),l.classes[0]="mord",l):_},w5=(e,t)=>{var n=e.isStretchy?Mf(e.label):new _e("mo",[ba(e.label,e.mode)]),a=new _e("mover",[Kt(e.base,t),n]);return a.setAttribute("accent","true"),a},RT=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));Ye({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{var n=yf(t[0]),a=!RT.test(e.funcName),l=!a||e.funcName==="\\widehat"||e.funcName==="\\widetilde"||e.funcName==="\\widecheck";return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:a,isShifty:l,base:n}},htmlBuilder:U1,mathmlBuilder:w5});Ye({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{var n=t[0],a=e.parser.mode;return a==="math"&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),a="text"),{type:"accent",mode:a,label:e.funcName,isStretchy:!1,isShifty:!0,base:n}},htmlBuilder:U1,mathmlBuilder:w5});Ye({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:a}=e,l=t[0];return{type:"accentUnder",mode:n.mode,label:a,base:l}},htmlBuilder:(e,t)=>{var n=_t(e.base,t),a=Df(e,t),l=e.label==="\\utilde"?.12:0,u=It({positionType:"top",positionData:n.height,children:[{type:"elem",elem:a,wrapperClasses:["svg-align"]},{type:"kern",size:l},{type:"elem",elem:n}]});return De(["mord","accentunder"],[u],t)},mathmlBuilder:(e,t)=>{var n=Mf(e.label),a=new _e("munder",[Kt(e.base,t),n]);return a.setAttribute("accentunder","true"),a}});var Id=e=>{var t=new _e("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};Ye({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:a,funcName:l}=e;return{type:"xArrow",mode:a.mode,label:l,body:t[0],below:n[0]}},htmlBuilder(e,t){var n=t.style,a=t.havingStyle(n.sup()),l=fu(_t(e.body,a,t),t),u=e.label.slice(0,2)==="\\x"?"x":"cd";l.classes.push(u+"-arrow-pad");var c;e.below&&(a=t.havingStyle(n.sub()),c=fu(_t(e.below,a,t),t),c.classes.push(u+"-arrow-pad"));var f=Df(e,t),h=-t.fontMetrics().axisHeight+.5*f.height,m=-t.fontMetrics().axisHeight-.5*f.height-.111;(l.depth>.25||e.label==="\\xleftequilibrium")&&(m-=l.depth);var p;if(c){var y=-t.fontMetrics().axisHeight+c.height+.5*f.height+.111;p=It({positionType:"individualShift",children:[{type:"elem",elem:l,shift:m},{type:"elem",elem:f,shift:h,wrapperClasses:["svg-align"]},{type:"elem",elem:c,shift:y}]})}else p=It({positionType:"individualShift",children:[{type:"elem",elem:l,shift:m},{type:"elem",elem:f,shift:h,wrapperClasses:["svg-align"]}]});return De(["mrel","x-arrow"],[p],t)},mathmlBuilder(e,t){var n=Mf(e.label);n.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var a;if(e.body){var l=Id(Kt(e.body,t));if(e.below){var u=Id(Kt(e.below,t));a=new _e("munderover",[n,u,l])}else a=new _e("mover",[n,l])}else if(e.below){var c=Id(Kt(e.below,t));a=new _e("munder",[n,c])}else a=Id(),a=new _e("mover",[n,a]);return a}});function k5(e,t){var n=Ln(e.body,t,!0);return De([e.mclass],n,t)}function S5(e,t){var n,a=ta(e.body,t);return e.mclass==="minner"?n=new _e("mpadded",a):e.mclass==="mord"?e.isCharacterBox?(n=a[0],n.type="mi"):n=new _e("mi",a):(e.isCharacterBox?(n=a[0],n.type="mo"):n=new _e("mo",a),e.mclass==="mbin"?(n.attributes.lspace="0.22em",n.attributes.rspace="0.22em"):e.mclass==="mpunct"?(n.attributes.lspace="0em",n.attributes.rspace="0.17em"):e.mclass==="mopen"||e.mclass==="mclose"?(n.attributes.lspace="0em",n.attributes.rspace="0em"):e.mclass==="minner"&&(n.attributes.lspace="0.0556em",n.attributes.width="+0.1111em")),n}Ye({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:n,funcName:a}=e,l=t[0];return{type:"mclass",mode:n.mode,mclass:"m"+a.slice(5),body:An(l),isCharacterBox:Ji(l)}},htmlBuilder:k5,mathmlBuilder:S5});var Of=e=>{var t=e.type==="ordgroup"&&e.body.length?e.body[0]:e;return t.type==="atom"&&(t.family==="bin"||t.family==="rel")?"m"+t.family:"mord"};Ye({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:n}=e;return{type:"mclass",mode:n.mode,mclass:Of(t[0]),body:An(t[1]),isCharacterBox:Ji(t[1])}}});Ye({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var{parser:n,funcName:a}=e,l=t[1],u=t[0],c;a!=="\\stackrel"?c=Of(l):c="mrel";var f={type:"op",mode:l.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:a!=="\\stackrel",body:An(l)},h={type:"supsub",mode:u.mode,base:f,sup:a==="\\underset"?null:u,sub:a==="\\underset"?u:null};return{type:"mclass",mode:n.mode,mclass:c,body:[h],isCharacterBox:Ji(h)}},htmlBuilder:k5,mathmlBuilder:S5});Ye({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"pmb",mode:n.mode,mclass:Of(t[0]),body:An(t[0])}},htmlBuilder(e,t){var n=Ln(e.body,t,!0),a=De([e.mclass],n,t);return a.style.textShadow="0.02em 0.01em 0.04px",a},mathmlBuilder(e,t){var n=ta(e.body,t),a=new _e("mstyle",n);return a.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),a}});var OT={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},pv=()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),gv=e=>e.type==="textord"&&e.text==="@",IT=(e,t)=>(e.type==="mathord"||e.type==="atom")&&e.text===t;function _T(e,t,n){var a=OT[e];switch(a){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return n.callFunction(a,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":{var l=n.callFunction("\\\\cdleft",[t[0]],[]),u={type:"atom",text:a,mode:"math",family:"rel"},c=n.callFunction("\\Big",[u],[]),f=n.callFunction("\\\\cdright",[t[1]],[]),h={type:"ordgroup",mode:"math",body:[l,c,f]};return n.callFunction("\\\\cdparent",[h],[])}case"\\\\cdlongequal":return n.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var m={type:"textord",text:"\\Vert",mode:"math"};return n.callFunction("\\Big",[m],[])}default:return{type:"textord",text:" ",mode:"math"}}}function LT(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var n=e.fetch().text;if(n==="&"||n==="\\\\")e.consume();else if(n==="\\end"){t[t.length-1].length===0&&t.pop();break}else throw new Oe("Expected \\\\ or \\cr or \\end",e.nextToken)}for(var a=[],l=[a],u=0;u<t.length;u++){for(var c=t[u],f=pv(),h=0;h<c.length;h++)if(!gv(c[h]))f.body.push(c[h]);else{a.push(f),h+=1;var m=zf(c[h]).text,p=new Array(2);if(p[0]={type:"ordgroup",mode:"math",body:[]},p[1]={type:"ordgroup",mode:"math",body:[]},!"=|.".includes(m))if("<>AV".includes(m))for(var y=0;y<2;y++){for(var k=!0,x=h+1;x<c.length;x++){if(IT(c[x],m)){k=!1,h=x;break}if(gv(c[x]))throw new Oe("Missing a "+m+" character to complete a CD arrow.",c[x]);p[y].body.push(c[x])}if(k)throw new Oe("Missing a "+m+" character to complete a CD arrow.",c[h])}else throw new Oe('Expected one of "<>AV=|." after @',c[h]);var C=_T(m,p,e),M={type:"styling",body:[C],mode:"math",style:"display",resetFont:!0};a.push(M),f=pv()}u%2===0?a.push(f):a.shift(),a=[],l.push(a)}e.gullet.endGroup(),e.gullet.endGroup();var I=new Array(l[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:l,arraystretch:1,addJot:!0,rowGaps:[null],cols:I,colSeparationType:"CD",hLinesBeforeRow:new Array(l.length+1).fill([])}}Ye({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:a}=e;return{type:"cdlabel",mode:n.mode,side:a.slice(4),label:t[0]}},htmlBuilder(e,t){var n=t.havingStyle(t.style.sup()),a=fu(_t(e.label,n,t),t);return a.classes.push("cd-label-"+e.side),a.style.bottom=Ue(.8-a.depth),a.height=0,a.depth=0,a},mathmlBuilder(e,t){var n=new _e("mrow",[Kt(e.label,t)]);return n=new _e("mpadded",[n]),n.setAttribute("width","0"),e.side==="left"&&n.setAttribute("lspace","-1width"),n.setAttribute("voffset","0.7em"),n=new _e("mstyle",[n]),n.setAttribute("displaystyle","false"),n.setAttribute("scriptlevel","1"),n}});Ye({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){var{parser:n}=e;return{type:"cdlabelparent",mode:n.mode,fragment:t[0]}},htmlBuilder(e,t){var n=fu(_t(e.fragment,t),t);return n.classes.push("cd-vert-arrow"),n},mathmlBuilder(e,t){return new _e("mrow",[Kt(e.fragment,t)])}});Ye({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:n}=e,a=xt(t[0],"ordgroup"),l=a.body,u="",c=0;c<l.length;c++){var f=xt(l[c],"textord");u+=f.text}var h=parseInt(u),m;if(isNaN(h))throw new Oe("\\@char has non-numeric argument "+u);if(h<0||h>=1114111)throw new Oe("\\@char with invalid code point "+u);return h<=65535?m=String.fromCharCode(h):(h-=65536,m=String.fromCharCode((h>>10)+55296,(h&1023)+56320)),{type:"textord",mode:n.mode,text:m}}});var j5=(e,t)=>{var n=Ln(e.body,t.withColor(e.color),!1);return tl(n)},C5=(e,t)=>{var n=ta(e.body,t.withColor(e.color)),a=new _e("mstyle",n);return a.setAttribute("mathcolor",e.color),a};Ye({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:n}=e,a=xt(t[0],"color-token").color,l=t[1];return{type:"color",mode:n.mode,color:a,body:An(l)}},htmlBuilder:j5,mathmlBuilder:C5});Ye({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:n,breakOnTokenText:a}=e,l=xt(t[0],"color-token").color;n.gullet.macros.set("\\current@color",l);var u=n.parseExpression(!0,a);return{type:"color",mode:n.mode,color:l,body:u}},htmlBuilder:j5,mathmlBuilder:C5});Ye({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,n){var{parser:a}=e,l=a.gullet.future().text==="["?a.parseSizeGroup(!0):null,u=!a.settings.displayMode||!a.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:a.mode,newLine:u,size:l&&xt(l,"size").value}},htmlBuilder(e,t){var n=De(["mspace"],[],t);return e.newLine&&(n.classes.push("newline"),e.size&&(n.style.marginTop=Ue(cn(e.size,t)))),n},mathmlBuilder(e,t){var n=new _e("mspace");return e.newLine&&(n.setAttribute("linebreak","newline"),e.size&&n.setAttribute("height",Ue(cn(e.size,t)))),n}});var Gp={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},T5=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new Oe("Expected a control sequence",e);return t},BT=e=>{var t=e.gullet.popToken();return t.text==="="&&(t=e.gullet.popToken(),t.text===" "&&(t=e.gullet.popToken())),t},A5=(e,t,n,a)=>{var l=e.gullet.macros.get(n.text);l==null&&(n.noexpand=!0,l={tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,l,a)};Ye({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:n}=e;t.consumeSpaces();var a=t.fetch();if(Gp[a.text])return(n==="\\global"||n==="\\\\globallong")&&(a.text=Gp[a.text]),xt(t.parseFunction(),"internal");throw new Oe("Invalid token after macro prefix",a)}});Ye({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,a=t.gullet.popToken(),l=a.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(l))throw new Oe("Expected a control sequence",a);for(var u=0,c,f=[[]];t.gullet.future().text!=="{";)if(a=t.gullet.popToken(),a.text==="#"){if(t.gullet.future().text==="{"){c=t.gullet.future(),f[u].push("{");break}if(a=t.gullet.popToken(),!/^[1-9]$/.test(a.text))throw new Oe('Invalid argument number "'+a.text+'"');if(parseInt(a.text)!==u+1)throw new Oe('Argument number "'+a.text+'" out of order');u++,f.push([])}else{if(a.text==="EOF")throw new Oe("Expected a macro definition");f[u].push(a.text)}var{tokens:h}=t.gullet.consumeArg();return c&&h.unshift(c),(n==="\\edef"||n==="\\xdef")&&(h=t.gullet.expandTokens(h),h.reverse()),t.gullet.macros.set(l,{tokens:h,numArgs:u,delimiters:f},n===Gp[n]),{type:"internal",mode:t.mode}}});Ye({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,a=T5(t.gullet.popToken());t.gullet.consumeSpaces();var l=BT(t);return A5(t,a,l,n==="\\\\globallet"),{type:"internal",mode:t.mode}}});Ye({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,a=T5(t.gullet.popToken()),l=t.gullet.popToken(),u=t.gullet.popToken();return A5(t,a,u,n==="\\\\globalfuture"),t.gullet.pushToken(u),t.gullet.pushToken(l),{type:"internal",mode:t.mode}}});var Bc=function(t,n,a){var l=sn.math[t]&&sn.math[t].replace,u=I1(l||t,n,a);if(!u)throw new Error("Unsupported symbol "+t+" and font size "+n+".");return u},H1=function(t,n,a,l){var u=a.havingBaseStyle(n),c=De(l.concat(u.sizingClasses(a)),[t],a),f=u.sizeMultiplier/a.sizeMultiplier;return c.height*=f,c.depth*=f,c.maxFontSize=u.sizeMultiplier,c},E5=function(t,n,a){var l=n.havingBaseStyle(a),u=(1-n.sizeMultiplier/l.sizeMultiplier)*n.fontMetrics().axisHeight;t.classes.push("delimcenter"),t.style.top=Ue(u),t.height-=u,t.depth+=u},qT=function(t,n,a,l,u,c){var f=dr(t,"Main-Regular",u,l),h=H1(f,n,l,c);return E5(h,l,n),h},UT=function(t,n,a,l){return dr(t,"Size"+n+"-Regular",a,l)},N5=function(t,n,a,l,u,c){var f=UT(t,n,u,l),h=H1(De(["delimsizing","size"+n],[f],l),mt.TEXT,l,c);return a&&E5(h,l,mt.TEXT),h},Km=function(t,n,a){var l;n==="Size1-Regular"?l="delim-size1":l="delim-size4";var u=De(["delimsizinginner",l],[De([],[dr(t,n,a)])]);return{type:"elem",elem:u}},Xm=function(t,n,a){var l=ii["Size4-Regular"][t.charCodeAt(0)]?ii["Size4-Regular"][t.charCodeAt(0)][4]:ii["Size1-Regular"][t.charCodeAt(0)][4],u=new Zl("inner",XC(t,Math.round(1e3*n))),c=new Zi([u],{width:Ue(l),height:Ue(n),style:"width:"+Ue(l),viewBox:"0 0 "+1e3*l+" "+Math.round(1e3*n),preserveAspectRatio:"xMinYMin"}),f=Ql([],[c],a);return f.height=n,f.style.height=Ue(n),f.style.width=Ue(l),{type:"elem",elem:f}},Vp=.008,_d={type:"kern",size:-1*Vp},HT=new Set(["|","\\lvert","\\rvert","\\vert"]),$T=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),M5=function(t,n,a,l,u,c){var f,h,m,p,y="",k=0;f=m=p=t,h=null;var x="Size1-Regular";t==="\\uparrow"?m=p="⏐":t==="\\Uparrow"?m=p="‖":t==="\\downarrow"?f=m="⏐":t==="\\Downarrow"?f=m="‖":t==="\\updownarrow"?(f="\\uparrow",m="⏐",p="\\downarrow"):t==="\\Updownarrow"?(f="\\Uparrow",m="‖",p="\\Downarrow"):HT.has(t)?(m="∣",y="vert",k=333):$T.has(t)?(m="∥",y="doublevert",k=556):t==="["||t==="\\lbrack"?(f="⎡",m="⎢",p="⎣",x="Size4-Regular",y="lbrack",k=667):t==="]"||t==="\\rbrack"?(f="⎤",m="⎥",p="⎦",x="Size4-Regular",y="rbrack",k=667):t==="\\lfloor"||t==="⌊"?(m=f="⎢",p="⎣",x="Size4-Regular",y="lfloor",k=667):t==="\\lceil"||t==="⌈"?(f="⎡",m=p="⎢",x="Size4-Regular",y="lceil",k=667):t==="\\rfloor"||t==="⌋"?(m=f="⎥",p="⎦",x="Size4-Regular",y="rfloor",k=667):t==="\\rceil"||t==="⌉"?(f="⎤",m=p="⎥",x="Size4-Regular",y="rceil",k=667):t==="("||t==="\\lparen"?(f="⎛",m="⎜",p="⎝",x="Size4-Regular",y="lparen",k=875):t===")"||t==="\\rparen"?(f="⎞",m="⎟",p="⎠",x="Size4-Regular",y="rparen",k=875):t==="\\{"||t==="\\lbrace"?(f="⎧",h="⎨",p="⎩",m="⎪",x="Size4-Regular"):t==="\\}"||t==="\\rbrace"?(f="⎫",h="⎬",p="⎭",m="⎪",x="Size4-Regular"):t==="\\lgroup"||t==="⟮"?(f="⎧",p="⎩",m="⎪",x="Size4-Regular"):t==="\\rgroup"||t==="⟯"?(f="⎫",p="⎭",m="⎪",x="Size4-Regular"):t==="\\lmoustache"||t==="⎰"?(f="⎧",p="⎭",m="⎪",x="Size4-Regular"):(t==="\\rmoustache"||t==="⎱")&&(f="⎫",p="⎩",m="⎪",x="Size4-Regular");var C=Bc(f,x,u),M=C.height+C.depth,I=Bc(m,x,u),_=I.height+I.depth,N=Bc(p,x,u),q=N.height+N.depth,R=0,X=1;if(h!==null){var P=Bc(h,x,u);R=P.height+P.depth,X=2}var H=M+q+R,J=Math.max(0,Math.ceil((n-H)/(X*_))),ne=H+J*X*_,F=l.fontMetrics().axisHeight;a&&(F*=l.sizeMultiplier);var te=ne/2-F,se=[];if(y.length>0){var ve=ne-M-q,be=Math.round(ne*1e3),he=ZC(y,Math.round(ve*1e3)),Z=new Zl(y,he),me=Ue(k/1e3),V=Ue(be/1e3),Ce=new Zi([Z],{width:me,height:V,viewBox:"0 0 "+k+" "+be}),U=Ql([],[Ce],l);U.height=be/1e3,U.style.width=me,U.style.height=V,se.push({type:"elem",elem:U})}else{if(se.push(Km(p,x,u)),se.push(_d),h===null){var E=ne-M-q+2*Vp;se.push(Xm(m,E,l))}else{var Y=(ne-M-q-R)/2+2*Vp;se.push(Xm(m,Y,l)),se.push(_d),se.push(Km(h,x,u)),se.push(_d),se.push(Xm(m,Y,l))}se.push(_d),se.push(Km(f,x,u))}var O=l.havingBaseStyle(mt.TEXT),ee=It({positionType:"bottom",positionData:te,children:se});return H1(De(["delimsizing","mult"],[ee],O),mt.TEXT,l,c)},Zm=80,Qm=.08,Jm=function(t,n,a,l,u){var c=KC(t,l,a),f=new Zl(t,c),h=new Zi([f],{width:"400em",height:Ue(n),viewBox:"0 0 400000 "+a,preserveAspectRatio:"xMinYMin slice"});return Ql(["hide-tail"],[h],u)},FT=function(t,n){var a=n.havingBaseSizing(),l=I5("\\surd",t*a.sizeMultiplier,O5,a),u=a.sizeMultiplier,c=Math.max(0,n.minRuleThickness-n.fontMetrics().sqrtRuleThickness),f,h,m,p,y;return l.type==="small"?(p=1e3+1e3*c+Zm,t<1?u=1:t<1.4&&(u=.7),h=(1+c+Qm)/u,m=(1+c)/u,f=Jm("sqrtMain",h,p,c,n),f.style.minWidth="0.853em",y=.833/u):l.type==="large"?(p=(1e3+Zm)*Gc[l.size],m=(Gc[l.size]+c)/u,h=(Gc[l.size]+c+Qm)/u,f=Jm("sqrtSize"+l.size,h,p,c,n),f.style.minWidth="1.02em",y=1/u):(h=t+c+Qm,m=t+c,p=Math.floor(1e3*t+c)+Zm,f=Jm("sqrtTall",h,p,c,n),f.style.minWidth="0.742em",y=1.056),f.height=m,f.style.height=Ue(h),{span:f,advanceWidth:y,ruleWidth:(n.fontMetrics().sqrtRuleThickness+c)*u}},D5=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),PT=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),z5=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),Gc=[0,1.2,1.8,2.4,3],R5=function(t,n,a,l,u){if(t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle"),D5.has(t)||z5.has(t))return N5(t,n,!1,a,l,u);if(PT.has(t))return M5(t,Gc[n],!1,a,l,u);throw new Oe("Illegal delimiter: '"+t+"'")},GT=[{type:"small",style:mt.SCRIPTSCRIPT},{type:"small",style:mt.SCRIPT},{type:"small",style:mt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],VT=[{type:"small",style:mt.SCRIPTSCRIPT},{type:"small",style:mt.SCRIPT},{type:"small",style:mt.TEXT},{type:"stack"}],O5=[{type:"small",style:mt.SCRIPTSCRIPT},{type:"small",style:mt.SCRIPT},{type:"small",style:mt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],YT=function(t){if(t.type==="small")return"Main-Regular";if(t.type==="large")return"Size"+t.size+"-Regular";if(t.type==="stack")return"Size4-Regular";var n=t.type;throw new Error("Add support for delim type '"+n+"' here.")},I5=function(t,n,a,l){for(var u=Math.min(2,3-l.style.size),c=u;c<a.length;c++){var f=a[c];if(f.type==="stack")break;var h=Bc(t,YT(f),"math"),m=h.height+h.depth;if(f.type==="small"){var p=l.havingBaseStyle(f.style);m*=p.sizeMultiplier}if(m>n)return f}return a[a.length-1]},Yp=function(t,n,a,l,u,c){t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle");var f;z5.has(t)?f=GT:D5.has(t)?f=O5:f=VT;var h=I5(t,n,f,l);return h.type==="small"?qT(t,h.style,a,l,u,c):h.type==="large"?N5(t,h.size,a,l,u,c):M5(t,n,a,l,u,c)},ep=function(t,n,a,l,u,c){var f=l.fontMetrics().axisHeight*l.sizeMultiplier,h=901,m=5/l.fontMetrics().ptPerEm,p=Math.max(n-f,a+f),y=Math.max(p/500*h,2*p-m);return Yp(t,y,!0,l,u,c)},yv={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},WT=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."]);function vv(e){return"isMiddle"in e}function If(e,t){var n=Rf(e);if(n&&WT.has(n.text))return n;throw n?new Oe("Invalid delimiter '"+n.text+"' after '"+t.funcName+"'",e):new Oe("Invalid delimiter type '"+e.type+"'",e)}Ye({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{var n=If(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:yv[e.funcName].size,mclass:yv[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>e.delim==="."?De([e.mclass]):R5(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];e.delim!=="."&&t.push(ba(e.delim,e.mode));var n=new _e("mo",t);e.mclass==="mopen"||e.mclass==="mclose"?n.setAttribute("fence","true"):n.setAttribute("fence","false"),n.setAttribute("stretchy","true");var a=Ue(Gc[e.size]);return n.setAttribute("minsize",a),n.setAttribute("maxsize",a),n}});function xv(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}Ye({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=e.parser.gullet.macros.get("\\current@color");if(n&&typeof n!="string")throw new Oe("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:If(t[0],e).text,color:n}}});Ye({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=If(t[0],e),a=e.parser;++a.leftrightDepth;var l=a.parseExpression(!1);--a.leftrightDepth,a.expect("\\right",!1);var u=xt(a.parseFunction(),"leftright-right");return{type:"leftright",mode:a.mode,body:l,left:n.text,right:u.delim,rightColor:u.color}},htmlBuilder:(e,t)=>{xv(e);for(var n=Ln(e.body,t,!0,["mopen","mclose"]),a=0,l=0,u=!1,c=0;c<n.length;c++){var f=n[c];vv(f)?u=!0:(a=Math.max(n[c].height,a),l=Math.max(n[c].depth,l))}a*=t.sizeMultiplier,l*=t.sizeMultiplier;var h;if(e.left==="."?h=t0(t,["mopen"]):h=ep(e.left,a,l,t,e.mode,["mopen"]),n.unshift(h),u)for(var m=1;m<n.length;m++){var p=n[m];if(vv(p)){var y=p.isMiddle;n[m]=ep(y.delim,a,l,y.options,e.mode,[])}}var k;if(e.right===".")k=t0(t,["mclose"]);else{var x=e.rightColor?t.withColor(e.rightColor):t;k=ep(e.right,a,l,x,e.mode,["mclose"])}return n.push(k),De(["minner"],n,t)},mathmlBuilder:(e,t)=>{xv(e);var n=ta(e.body,t);if(e.left!=="."){var a=new _e("mo",[ba(e.left,e.mode)]);a.setAttribute("fence","true"),n.unshift(a)}if(e.right!=="."){var l=new _e("mo",[ba(e.right,e.mode)]);l.setAttribute("fence","true"),e.rightColor&&l.setAttribute("mathcolor",e.rightColor),n.push(l)}return B1(n)}});Ye({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=If(t[0],e);if(!e.parser.leftrightDepth)throw new Oe("\\middle without preceding \\left",n);return{type:"middle",mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{var n;return e.delim==="."?n=t0(t,[]):(n=R5(e.delim,1,t,e.mode,[]),n.isMiddle={delim:e.delim,options:t}),n},mathmlBuilder:(e,t)=>{var n=e.delim==="\\vert"||e.delim==="|"?ba("|","text"):ba(e.delim,e.mode),a=new _e("mo",[n]);return a.setAttribute("fence","true"),a.setAttribute("lspace","0.05em"),a.setAttribute("rspace","0.05em"),a}});var _f=(e,t)=>{var n=fu(_t(e.body,t),t),a=e.label.slice(1),l=t.sizeMultiplier,u,c,f=Ji(e.body);if(a==="sout")u=De(["stretchy","sout"]),u.height=t.fontMetrics().defaultRuleThickness/l,c=-.5*t.fontMetrics().xHeight;else if(a==="phase"){var h=cn({number:.6,unit:"pt"},t),m=cn({number:.35,unit:"ex"},t),p=t.havingBaseSizing();l=l/p.sizeMultiplier;var y=n.height+n.depth+h+m;n.style.paddingLeft=Ue(y/2+h);var k=Math.floor(1e3*y*l),x=YC(k),C=new Zi([new Zl("phase",x)],{width:"400em",height:Ue(k/1e3),viewBox:"0 0 400000 "+k,preserveAspectRatio:"xMinYMin slice"});u=Ql(["hide-tail"],[C],t),u.style.height=Ue(y),c=n.depth+h+m}else{/cancel/.test(a)?f||n.classes.push("cancel-pad"):a==="angl"?n.classes.push("anglpad"):n.classes.push("boxpad");var M,I,_=0;/box/.test(a)?(_=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),M=t.fontMetrics().fboxsep+(a==="colorbox"?0:_),I=M):a==="angl"?(_=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),M=4*_,I=Math.max(0,.25-n.depth)):(M=f?.2:0,I=M),u=NT(n,a,M,I,t),/fbox|boxed|fcolorbox/.test(a)?(u.style.borderStyle="solid",u.style.borderWidth=Ue(_)):a==="angl"&&_!==.049&&(u.style.borderTopWidth=Ue(_),u.style.borderRightWidth=Ue(_)),c=n.depth+I,e.backgroundColor&&(u.style.backgroundColor=e.backgroundColor,e.borderColor&&(u.style.borderColor=e.borderColor))}var N;if(e.backgroundColor)N=It({positionType:"individualShift",children:[{type:"elem",elem:u,shift:c},{type:"elem",elem:n,shift:0}]});else{var q=/cancel|phase/.test(a)?["svg-align"]:[];N=It({positionType:"individualShift",children:[{type:"elem",elem:n,shift:0},{type:"elem",elem:u,shift:c,wrapperClasses:q}]})}return/cancel/.test(a)&&(N.height=n.height,N.depth=n.depth),/cancel/.test(a)&&!f?De(["mord","cancel-lap"],[N],t):De(["mord"],[N],t)},Lf=(e,t)=>{var n,a=new _e(e.label.includes("colorbox")?"mpadded":"menclose",[Kt(e.body,t)]);switch(e.label){case"\\cancel":a.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":a.setAttribute("notation","downdiagonalstrike");break;case"\\phase":a.setAttribute("notation","phasorangle");break;case"\\sout":a.setAttribute("notation","horizontalstrike");break;case"\\fbox":a.setAttribute("notation","box");break;case"\\angl":a.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,a.setAttribute("width","+"+2*n+"pt"),a.setAttribute("height","+"+2*n+"pt"),a.setAttribute("lspace",n+"pt"),a.setAttribute("voffset",n+"pt"),e.label==="\\fcolorbox"){var l=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);a.setAttribute("style","border: "+Ue(l)+" solid "+e.borderColor)}break;case"\\xcancel":a.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&a.setAttribute("mathbackground",e.backgroundColor),a};Ye({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","hbox"]},handler(e,t,n){var{parser:a,funcName:l}=e,u=xt(t[0],"color-token").color,c=t[1];return{type:"enclose",mode:a.mode,label:l,backgroundColor:u,body:c}},htmlBuilder:_f,mathmlBuilder:Lf});Ye({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"]},handler(e,t,n){var{parser:a,funcName:l}=e,u=xt(t[0],"color-token").color,c=xt(t[1],"color-token").color,f=t[2];return{type:"enclose",mode:a.mode,label:l,backgroundColor:c,borderColor:u,body:f}},htmlBuilder:_f,mathmlBuilder:Lf});Ye({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"enclose",mode:n.mode,label:"\\fbox",body:t[0]}}});Ye({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\phase"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:a}=e,l=t[0];return{type:"enclose",mode:n.mode,label:a,body:l}},htmlBuilder:_f,mathmlBuilder:Lf});Ye({type:"enclose",names:["\\sout"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n,funcName:a}=e;n.mode==="math"&&n.settings.reportNonstrict("mathVsSout","LaTeX's \\sout works only in text mode");var l=t[0];return{type:"enclose",mode:n.mode,label:a,body:l}},htmlBuilder:_f,mathmlBuilder:Lf});Ye({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:"enclose",mode:n.mode,label:"\\angl",body:t[0]}}});var _5={};function ui(e){for(var{type:t,names:n,props:a,handler:l,htmlBuilder:u,mathmlBuilder:c}=e,f={type:t,numArgs:a.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:l},h=0;h<n.length;++h)_5[n[h]]=f;u&&(pf[t]=u),c&&(gf[t]=c)}var L5={};function B(e,t){L5[e]=t}class zr{constructor(t,n,a){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=t,this.start=n,this.end=a}static range(t,n){return n?!t||!t.loc||!n.loc||t.loc.lexer!==n.loc.lexer?null:new zr(t.loc.lexer,t.loc.start,n.loc.end):t&&t.loc}}class Qr{constructor(t,n){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=t,this.loc=n}range(t,n){return new Qr(n,zr.range(this,t))}}function bv(e){var t=[];e.consumeSpaces();var n=e.fetch().text;for(n==="\\relax"&&(e.consume(),e.consumeSpaces(),n=e.fetch().text);n==="\\hline"||n==="\\hdashline";)e.consume(),t.push(n==="\\hdashline"),e.consumeSpaces(),n=e.fetch().text;return t}var Bf=e=>{var t=e.parser.settings;if(!t.displayMode)throw new Oe("{"+e.envName+"} can be used only in display mode.")},KT=new Set(["gather","gather*"]);function $1(e){if(!e.includes("ed"))return!e.includes("*")}function as(e,t,n){var{hskipBeforeAndAfter:a,addJot:l,cols:u,arraystretch:c,colSeparationType:f,autoTag:h,singleRow:m,emptySingleRow:p,maxNumCols:y,leqno:k}=t;if(e.gullet.beginGroup(),m||e.gullet.macros.set("\\cr","\\\\\\relax"),!c){var x=e.gullet.expandMacroAsText("\\arraystretch");if(x==null)c=1;else if(c=parseFloat(x),!c||c<0)throw new Oe("Invalid \\arraystretch: "+x)}e.gullet.beginGroup();var C=[],M=[C],I=[],_=[],N=h!=null?[]:void 0;function q(){h&&e.gullet.macros.set("\\@eqnsw","1",!0)}function R(){N&&(e.gullet.macros.get("\\df@tag")?(N.push(e.subparse([new Qr("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):N.push(!!h&&e.gullet.macros.get("\\@eqnsw")==="1"))}for(q(),_.push(bv(e));;){var X=e.parseExpression(!1,m?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup();var P={type:"ordgroup",mode:e.mode,body:X};n&&(P={type:"styling",mode:e.mode,style:n,resetFont:!0,body:[P]}),C.push(P);var H=e.fetch().text;if(H==="&"){if(y&&C.length===y){if(m||f)throw new Oe("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else if(H==="\\end"){R(),C.length===1&&P.type==="styling"&&P.body.length===1&&P.body[0].type==="ordgroup"&&P.body[0].body.length===0&&(M.length>1||!p)&&M.pop(),_.length<M.length+1&&_.push([]);break}else if(H==="\\\\"){e.consume();var J=void 0;e.gullet.future().text!==" "&&(J=e.parseSizeGroup(!0)),I.push(J?J.value:null),R(),_.push(bv(e)),C=[],M.push(C),q()}else throw new Oe("Expected & or \\\\ or \\cr or \\end",e.nextToken)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,addJot:l,arraystretch:c,body:M,cols:u,rowGaps:I,hskipBeforeAndAfter:a,hLinesBeforeRow:_,colSeparationType:f,tags:N,leqno:k}}function F1(e){return e.slice(0,1)==="d"?"display":"text"}var ci=function(t,n){var a,l,u=t.body.length,c=t.hLinesBeforeRow,f=0,h=new Array(u),m=[],p=Math.max(n.fontMetrics().arrayRuleWidth,n.minRuleThickness),y=1/n.fontMetrics().ptPerEm,k=5*y;if(t.colSeparationType&&t.colSeparationType==="small"){var x=n.havingStyle(mt.SCRIPT).sizeMultiplier;k=.2778*(x/n.sizeMultiplier)}var C=t.colSeparationType==="CD"?cn({number:3,unit:"ex"},n):12*y,M=3*y,I=t.arraystretch*C,_=.7*I,N=.3*I,q=0;function R(ie){for(var we=0;we<ie.length;++we)we>0&&(q+=.25),m.push({pos:q,isDashed:ie[we]})}for(R(c[0]),a=0;a<t.body.length;++a){var X=t.body[a],P=_,H=N;f<X.length&&(f=X.length);var J={cells:new Array(X.length),height:0,depth:0,pos:0};for(l=0;l<X.length;++l){var ne=_t(X[l],n);H<ne.depth&&(H=ne.depth),P<ne.height&&(P=ne.height),J.cells[l]=ne}var F=t.rowGaps[a],te=0;F&&(te=cn(F,n),te>0&&(te+=N,H<te&&(H=te),te=0)),t.addJot&&a<t.body.length-1&&(H+=M),J.height=P,J.depth=H,q+=P,J.pos=q,q+=H+te,h[a]=J,R(c[a+1])}var se=q/2+n.fontMetrics().axisHeight,ve=t.cols||[],be=[],he,Z,me=[];if(t.tags&&t.tags.some(ie=>ie))for(a=0;a<u;++a){var V=h[a],Ce=V.pos-se,U=t.tags[a],E=void 0;U===!0?E=De(["eqn-num"],[],n):U===!1?E=De([],[],n):E=De([],Ln(U,n,!0),n),E.depth=V.depth,E.height=V.height,me.push({type:"elem",elem:E,shift:Ce})}for(l=0,Z=0;l<f||Z<ve.length;++l,++Z){for(var Y,O=ve[Z],ee=!0;((ke=O)==null?void 0:ke.type)==="separator";){var ke;if(ee||(he=De(["arraycolsep"],[]),he.style.width=Ue(n.fontMetrics().doubleRuleSep),be.push(he)),O.separator==="|"||O.separator===":"){var Ae=O.separator==="|"?"solid":"dashed",He=De(["vertical-separator"],[],n);He.style.height=Ue(q),He.style.borderRightWidth=Ue(p),He.style.borderRightStyle=Ae,He.style.margin="0 "+Ue(-p/2);var it=q-se;it&&(He.style.verticalAlign=Ue(-it)),be.push(He)}else throw new Oe("Invalid separator type: "+O.separator);Z++,O=ve[Z],ee=!1}if(!(l>=f)){var pe=void 0;if(l>0||t.hskipBeforeAndAfter){var Pe,Ke;pe=(Pe=(Ke=O)==null?void 0:Ke.pregap)!=null?Pe:k,pe!==0&&(he=De(["arraycolsep"],[]),he.style.width=Ue(pe),be.push(he))}var oe=[];for(a=0;a<u;++a){var Me=h[a],ze=Me.cells[l];if(ze){var Ze=Me.pos-se;ze.depth=Me.depth,ze.height=Me.height,oe.push({type:"elem",elem:ze,shift:Ze})}}var Ut=It({positionType:"individualShift",children:oe}),ra=De(["col-align-"+(((Y=O)==null?void 0:Y.align)||"c")],[Ut]);if(be.push(ra),l<f-1||t.hskipBeforeAndAfter){var Jn,er;pe=(Jn=(er=O)==null?void 0:er.postgap)!=null?Jn:k,pe!==0&&(he=De(["arraycolsep"],[]),he.style.width=Ue(pe),be.push(he))}}}var Xt=De(["mtable"],be);if(m.length>0){for(var Bn=du("hline",n,p),Vn=du("hdashline",n,p),Un=[{type:"elem",elem:Xt,shift:0}];m.length>0;){var Zt=m.pop(),pr=Zt.pos-se;Zt.isDashed?Un.push({type:"elem",elem:Vn,shift:pr}):Un.push({type:"elem",elem:Bn,shift:pr})}Xt=It({positionType:"individualShift",children:Un})}if(me.length===0)return De(["mord"],[Xt],n);var ye=It({positionType:"individualShift",children:me}),Le=De(["tag"],[ye],n);return tl([Xt,Le])},XT={c:"center ",l:"left ",r:"right "},di=function(t,n){for(var a=[],l=new _e("mtd",[],["mtr-glue"]),u=new _e("mtd",[],["mml-eqn-num"]),c=0;c<t.body.length;c++){for(var f=t.body[c],h=[],m=0;m<f.length;m++)h.push(new _e("mtd",[Kt(f[m],n)]));t.tags&&t.tags[c]&&(h.unshift(l),h.push(l),t.leqno?h.unshift(u):h.push(u)),a.push(new _e("mtr",h))}var p=new _e("mtable",a),y=t.arraystretch===.5?.1:.16+t.arraystretch-1+(t.addJot?.09:0);p.setAttribute("rowspacing",Ue(y));var k="",x="";if(t.cols&&t.cols.length>0){var C=t.cols,M="",I=!1,_=0,N=C.length;C[0].type==="separator"&&(k+="top ",_=1),C[C.length-1].type==="separator"&&(k+="bottom ",N-=1);for(var q=_;q<N;q++){var R=C[q];R.type==="align"?(x+=XT[R.align],I&&(M+="none "),I=!0):R.type==="separator"&&I&&(M+=R.separator==="|"?"solid ":"dashed ",I=!1)}p.setAttribute("columnalign",x.trim()),/[sd]/.test(M)&&p.setAttribute("columnlines",M.trim())}if(t.colSeparationType==="align"){for(var X=t.cols||[],P="",H=1;H<X.length;H++)P+=H%2?"0em ":"1em ";p.setAttribute("columnspacing",P.trim())}else t.colSeparationType==="alignat"||t.colSeparationType==="gather"?p.setAttribute("columnspacing","0em"):t.colSeparationType==="small"?p.setAttribute("columnspacing","0.2778em"):t.colSeparationType==="CD"?p.setAttribute("columnspacing","0.5em"):p.setAttribute("columnspacing","1em");var J="",ne=t.hLinesBeforeRow;k+=ne[0].length>0?"left ":"",k+=ne[ne.length-1].length>0?"right ":"";for(var F=1;F<ne.length-1;F++)J+=ne[F].length===0?"none ":ne[F][0]?"dashed ":"solid ";return/[sd]/.test(J)&&p.setAttribute("rowlines",J.trim()),k!==""&&(p=new _e("menclose",[p]),p.setAttribute("notation",k.trim())),t.arraystretch&&t.arraystretch<1&&(p=new _e("mstyle",[p]),p.setAttribute("scriptlevel","1")),p},B5=function(t,n){t.envName.includes("ed")||Bf(t);var a=[],l=t.envName.includes("at")?"alignat":"align",u=t.envName==="split",c=as(t.parser,{cols:a,addJot:!0,autoTag:u?void 0:$1(t.envName),emptySingleRow:!0,colSeparationType:l,maxNumCols:u?2:void 0,leqno:t.parser.settings.leqno},"display"),f=0,h=0,m={type:"ordgroup",mode:t.mode,body:[]};if(n[0]&&n[0].type==="ordgroup"){for(var p="",y=0;y<n[0].body.length;y++){var k=xt(n[0].body[y],"textord");p+=k.text}f=Number(p),h=f*2}var x=!h;c.body.forEach(function(_){for(var N=1;N<_.length;N+=2){var q=xt(_[N],"styling"),R=xt(q.body[0],"ordgroup");R.body.unshift(m)}if(x)h<_.length&&(h=_.length);else{var X=_.length/2;if(f<X)throw new Oe("Too many math in a row: "+("expected "+f+", but got "+X),_[0])}});for(var C=0;C<h;++C){var M="r",I=0;C%2===1?M="l":C>0&&x&&(I=1),a[C]={type:"align",align:M,pregap:I,postgap:0}}return c.colSeparationType=x?"align":"alignat",c};ui({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var n=Rf(t[0]),a=n?[t[0]]:xt(t[0],"ordgroup").body,l=a.map(function(c){var f=zf(c),h=f.text;if("lcr".includes(h))return{type:"align",align:h};if(h==="|")return{type:"separator",separator:"|"};if(h===":")return{type:"separator",separator:":"};throw new Oe("Unknown column alignment: "+h,c)}),u={cols:l,hskipBeforeAndAfter:!0,maxNumCols:l.length};return as(e.parser,u,F1(e.envName))},htmlBuilder:ci,mathmlBuilder:di});ui({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],n="c",a={hskipBeforeAndAfter:!1,cols:[{type:"align",align:n}]};if(e.envName.charAt(e.envName.length-1)==="*"){var l=e.parser;if(l.consumeSpaces(),l.fetch().text==="["){if(l.consume(),l.consumeSpaces(),n=l.fetch().text,!"lcr".includes(n))throw new Oe("Expected l or c or r",l.nextToken);l.consume(),l.consumeSpaces(),l.expect("]"),l.consume(),a.cols=[{type:"align",align:n}]}}var u=as(e.parser,a,F1(e.envName)),c=Math.max(0,...u.body.map(f=>f.length));return u.cols=new Array(c).fill({type:"align",align:n}),t?{type:"leftright",mode:e.mode,body:[u],left:t[0],right:t[1],rightColor:void 0}:u},htmlBuilder:ci,mathmlBuilder:di});ui({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t={arraystretch:.5},n=as(e.parser,t,"script");return n.colSeparationType="small",n},htmlBuilder:ci,mathmlBuilder:di});ui({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var n=Rf(t[0]),a=n?[t[0]]:xt(t[0],"ordgroup").body,l=a.map(function(f){var h=zf(f),m=h.text;if("lc".includes(m))return{type:"align",align:m};throw new Oe("Unknown column alignment: "+m,f)});if(l.length>1)throw new Oe("{subarray} can contain only one column");var u={cols:l,hskipBeforeAndAfter:!1,arraystretch:.5},c=as(e.parser,u,"script");if(c.body.length>0&&c.body[0].length>1)throw new Oe("{subarray} can contain only one column");return c},htmlBuilder:ci,mathmlBuilder:di});ui({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},n=as(e.parser,t,F1(e.envName));return{type:"leftright",mode:e.mode,body:[n],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:ci,mathmlBuilder:di});ui({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:B5,htmlBuilder:ci,mathmlBuilder:di});ui({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){KT.has(e.envName)&&Bf(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:$1(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return as(e.parser,t,"display")},htmlBuilder:ci,mathmlBuilder:di});ui({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:B5,htmlBuilder:ci,mathmlBuilder:di});ui({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){Bf(e);var t={autoTag:$1(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return as(e.parser,t,"display")},htmlBuilder:ci,mathmlBuilder:di});ui({type:"array",names:["CD"],props:{numArgs:0},handler(e){return Bf(e),LT(e.parser)},htmlBuilder:ci,mathmlBuilder:di});B("\\nonumber","\\gdef\\@eqnsw{0}");B("\\notag","\\nonumber");Ye({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new Oe(e.funcName+" valid only within array environment")}});var wv=_5;Ye({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){var{parser:n,funcName:a}=e,l=t[0];if(l.type!=="ordgroup")throw new Oe("Invalid environment name",l);for(var u="",c=0;c<l.body.length;++c)u+=xt(l.body[c],"textord").text;if(a==="\\begin"){if(!wv.hasOwnProperty(u))throw new Oe("No such environment: "+u,l);var f=wv[u],{args:h,optArgs:m}=n.parseArguments("\\begin{"+u+"}",f),p={mode:n.mode,envName:u,parser:n},y=f.handler(p,h,m);n.expect("\\end",!1);var k=n.nextToken,x=xt(n.parseFunction(),"environment");if(x.name!==u)throw new Oe("Mismatch: \\begin{"+u+"} matched by \\end{"+x.name+"}",k);return y}return{type:"environment",mode:n.mode,name:u,nameGroup:l}}});var q5=(e,t)=>{var n=e.font,a=t.withFont(n);return _t(e.body,a)},U5=(e,t)=>{var n=e.font,a=t.withFont(n);return Kt(e.body,a)},kv={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};Ye({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:a}=e,l=yf(t[0]),u=a;return u in kv&&(u=kv[u]),{type:"font",mode:n.mode,font:u.slice(1),body:l}},htmlBuilder:q5,mathmlBuilder:U5});Ye({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var{parser:n}=e,a=t[0];return{type:"mclass",mode:n.mode,mclass:Of(a),body:[{type:"font",mode:n.mode,font:"boldsymbol",body:a}],isCharacterBox:Ji(a)}}});Ye({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:a,breakOnTokenText:l}=e,{mode:u}=n,c=n.parseExpression(!0,l);return{type:"font",mode:u,font:"math"+a.slice(1),body:{type:"ordgroup",mode:n.mode,body:c}}},htmlBuilder:q5,mathmlBuilder:U5});var ZT=(e,t)=>{var n=t.style,a=n.fracNum(),l=n.fracDen(),u;u=t.havingStyle(a);var c=_t(e.numer,u,t);if(e.continued){var f=8.5/t.fontMetrics().ptPerEm,h=3.5/t.fontMetrics().ptPerEm;c.height=c.height<f?f:c.height,c.depth=c.depth<h?h:c.depth}u=t.havingStyle(l);var m=_t(e.denom,u,t),p,y,k;e.hasBarLine?(e.barSize?(y=cn(e.barSize,t),p=du("frac-line",t,y)):p=du("frac-line",t),y=p.height,k=p.height):(p=null,y=0,k=t.fontMetrics().defaultRuleThickness);var x,C,M;n.size===mt.DISPLAY.size?(x=t.fontMetrics().num1,y>0?C=3*k:C=7*k,M=t.fontMetrics().denom1):(y>0?(x=t.fontMetrics().num2,C=k):(x=t.fontMetrics().num3,C=3*k),M=t.fontMetrics().denom2);var I;if(p){var N=t.fontMetrics().axisHeight;x-c.depth-(N+.5*y)<C&&(x+=C-(x-c.depth-(N+.5*y))),N-.5*y-(m.height-M)<C&&(M+=C-(N-.5*y-(m.height-M)));var q=-(N-.5*y);I=It({positionType:"individualShift",children:[{type:"elem",elem:m,shift:M},{type:"elem",elem:p,shift:q},{type:"elem",elem:c,shift:-x}]})}else{var _=x-c.depth-(m.height-M);_<C&&(x+=.5*(C-_),M+=.5*(C-_)),I=It({positionType:"individualShift",children:[{type:"elem",elem:m,shift:M},{type:"elem",elem:c,shift:-x}]})}u=t.havingStyle(n),I.height*=u.sizeMultiplier/t.sizeMultiplier,I.depth*=u.sizeMultiplier/t.sizeMultiplier;var R;n.size===mt.DISPLAY.size?R=t.fontMetrics().delim1:n.size===mt.SCRIPTSCRIPT.size?R=t.havingStyle(mt.SCRIPT).fontMetrics().delim2:R=t.fontMetrics().delim2;var X,P;return e.leftDelim==null?X=t0(t,["mopen"]):X=Yp(e.leftDelim,R,!0,t.havingStyle(n),e.mode,["mopen"]),e.continued?P=De([]):e.rightDelim==null?P=t0(t,["mclose"]):P=Yp(e.rightDelim,R,!0,t.havingStyle(n),e.mode,["mclose"]),De(["mord"].concat(u.sizingClasses(t)),[X,De(["mfrac"],[I]),P],t)},QT=(e,t)=>{var n=new _e("mfrac",[Kt(e.numer,t),Kt(e.denom,t)]);if(!e.hasBarLine)n.setAttribute("linethickness","0px");else if(e.barSize){var a=cn(e.barSize,t);n.setAttribute("linethickness",Ue(a))}if(e.leftDelim!=null||e.rightDelim!=null){var l=[];if(e.leftDelim!=null){var u=new _e("mo",[new En(e.leftDelim.replace("\\",""))]);u.setAttribute("fence","true"),l.push(u)}if(l.push(n),e.rightDelim!=null){var c=new _e("mo",[new En(e.rightDelim.replace("\\",""))]);c.setAttribute("fence","true"),l.push(c)}return B1(l)}return n},H5=(e,t)=>{if(!t)return e;var n={type:"styling",mode:e.mode,style:t,body:[e]};return n};Ye({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:a}=e,l=t[0],u=t[1],c,f=null,h=null;switch(a){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":c=!0;break;case"\\\\atopfrac":c=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":c=!1,f="(",h=")";break;case"\\\\bracefrac":c=!1,f="\\{",h="\\}";break;case"\\\\brackfrac":c=!1,f="[",h="]";break;default:throw new Error("Unrecognized genfrac command")}var m=a==="\\cfrac",p=null;return m||a.startsWith("\\d")?p="display":a.startsWith("\\t")&&(p="text"),H5({type:"genfrac",mode:n.mode,numer:l,denom:u,continued:m,hasBarLine:c,leftDelim:f,rightDelim:h,barSize:null},p)},htmlBuilder:ZT,mathmlBuilder:QT});Ye({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var{parser:t,funcName:n,token:a}=e,l;switch(n){case"\\over":l="\\frac";break;case"\\choose":l="\\binom";break;case"\\atop":l="\\\\atopfrac";break;case"\\brace":l="\\\\bracefrac";break;case"\\brack":l="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:t.mode,replaceWith:l,token:a}}});var Sv=["display","text","script","scriptscript"],jv=function(t){var n=null;return t.length>0&&(n=t,n=n==="."?null:n),n};Ye({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var{parser:n}=e,a=t[4],l=t[5],u=yf(t[0]),c=u.type==="atom"&&u.family==="open"?jv(u.text):null,f=yf(t[1]),h=f.type==="atom"&&f.family==="close"?jv(f.text):null,m=xt(t[2],"size"),p,y=null;m.isBlank?p=!0:(y=m.value,p=y.number>0);var k=null,x=t[3];if(x.type==="ordgroup"){if(x.body.length>0){var C=xt(x.body[0],"textord");k=Sv[Number(C.text)]}}else x=xt(x,"textord"),k=Sv[Number(x.text)];return H5({type:"genfrac",mode:n.mode,numer:a,denom:l,continued:!1,hasBarLine:p,barSize:y,leftDelim:c,rightDelim:h},k)}});Ye({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:n,funcName:a,token:l}=e;return{type:"infix",mode:n.mode,replaceWith:"\\\\abovefrac",size:xt(t[0],"size").value,token:l}}});Ye({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:n,funcName:a}=e,l=t[0],u=xt(t[1],"infix").size;if(!u)throw new Error("\\\\abovefrac expected size, but got "+String(u));var c=t[2],f=u.number>0;return{type:"genfrac",mode:n.mode,numer:l,denom:c,continued:!1,hasBarLine:f,barSize:u,leftDelim:null,rightDelim:null}}});var $5=(e,t)=>{var n=t.style,a,l;e.type==="supsub"?(a=e.sup?_t(e.sup,t.havingStyle(n.sup()),t):_t(e.sub,t.havingStyle(n.sub()),t),l=xt(e.base,"horizBrace")):l=xt(e,"horizBrace");var u=_t(l.base,t.havingBaseStyle(mt.DISPLAY)),c=Df(l,t),f;if(l.isOver?f=It({positionType:"firstBaseline",children:[{type:"elem",elem:u},{type:"kern",size:.1},{type:"elem",elem:c,wrapperClasses:["svg-align"]}]}):f=It({positionType:"bottom",positionData:u.depth+.1+c.height,children:[{type:"elem",elem:c,wrapperClasses:["svg-align"]},{type:"kern",size:.1},{type:"elem",elem:u}]}),a){var h=De(["minner",l.isOver?"mover":"munder"],[f],t);l.isOver?f=It({positionType:"firstBaseline",children:[{type:"elem",elem:h},{type:"kern",size:.2},{type:"elem",elem:a}]}):f=It({positionType:"bottom",positionData:h.depth+.2+a.height+a.depth,children:[{type:"elem",elem:a},{type:"kern",size:.2},{type:"elem",elem:h}]})}return De(["minner",l.isOver?"mover":"munder"],[f],t)},JT=(e,t)=>{var n=Mf(e.label);return new _e(e.isOver?"mover":"munder",[Kt(e.base,t),n])};Ye({type:"horizBrace",names:["\\overbrace","\\underbrace","\\overbracket","\\underbracket"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:a}=e;return{type:"horizBrace",mode:n.mode,label:a,isOver:a.includes("\\over"),base:t[0]}},htmlBuilder:$5,mathmlBuilder:JT});Ye({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,a=t[1],l=xt(t[0],"url").url;return n.settings.isTrusted({command:"\\href",url:l})?{type:"href",mode:n.mode,href:l,body:An(a)}:n.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var n=Ln(e.body,t,!1);return fT(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=Jl(e.body,t);return n instanceof _e||(n=new _e("mrow",[n])),n.setAttribute("href",e.href),n}});Ye({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,a=xt(t[0],"url").url;if(!n.settings.isTrusted({command:"\\url",url:a}))return n.formatUnsupportedCmd("\\url");for(var l=[],u=0;u<a.length;u++){var c=a[u];c==="~"&&(c="\\textasciitilde"),l.push({type:"textord",mode:"text",text:c})}var f={type:"text",mode:n.mode,font:"\\texttt",body:l};return{type:"href",mode:n.mode,href:a,body:An(f)}}});Ye({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(e,t){var{parser:n}=e;return{type:"hbox",mode:n.mode,body:An(t[0])}},htmlBuilder(e,t){var n=Ln(e.body,t.withFont(""),!1);return tl(n)},mathmlBuilder(e,t){return new _e("mrow",ta(e.body,t.withFont("")))}});Ye({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:a,token:l}=e,u=xt(t[0],"raw").string,c=t[1];n.settings.strict&&n.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var f,h={};switch(a){case"\\htmlClass":h.class=u,f={command:"\\htmlClass",class:u};break;case"\\htmlId":h.id=u,f={command:"\\htmlId",id:u};break;case"\\htmlStyle":h.style=u,f={command:"\\htmlStyle",style:u};break;case"\\htmlData":{for(var m=u.split(","),p=0;p<m.length;p++){var y=m[p],k=y.indexOf("=");if(k<0)throw new Oe("\\htmlData key/value '"+y+"' missing equals sign");var x=y.slice(0,k),C=y.slice(k+1);h["data-"+x.trim()]=C}f={command:"\\htmlData",attributes:h};break}default:throw new Error("Unrecognized html command")}return n.settings.isTrusted(f)?{type:"html",mode:n.mode,attributes:h,body:An(c)}:n.formatUnsupportedCmd(a)},htmlBuilder:(e,t)=>{var n=Ln(e.body,t,!1),a=["enclosing"];e.attributes.class&&a.push(...e.attributes.class.trim().split(/\s+/));var l=De(a,n,t);for(var u in e.attributes)u!=="class"&&e.attributes.hasOwnProperty(u)&&l.setAttribute(u,e.attributes[u]);return l},mathmlBuilder:(e,t)=>Jl(e.body,t)});Ye({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e;return{type:"htmlmathml",mode:n.mode,html:An(t[0]),mathml:An(t[1])}},htmlBuilder:(e,t)=>{var n=Ln(e.html,t,!1);return tl(n)},mathmlBuilder:(e,t)=>Jl(e.mathml,t)});var tp=function(t){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(t))return{number:+t,unit:"bp"};var n=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t);if(!n)throw new Oe("Invalid size: '"+t+"' in \\includegraphics");var a={number:+(n[1]+n[2]),unit:n[3]};if(!a5(a))throw new Oe("Invalid unit: '"+a.unit+"' in \\includegraphics.");return a};Ye({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,n)=>{var{parser:a}=e,l={number:0,unit:"em"},u={number:.9,unit:"em"},c={number:0,unit:"em"},f="";if(n[0])for(var h=xt(n[0],"raw").string,m=h.split(","),p=0;p<m.length;p++){var y=m[p].split("=");if(y.length===2){var k=y[1].trim();switch(y[0].trim()){case"alt":f=k;break;case"width":l=tp(k);break;case"height":u=tp(k);break;case"totalheight":c=tp(k);break;default:throw new Oe("Invalid key: '"+y[0]+"' in \\includegraphics.")}}}var x=xt(t[0],"url").url;return f===""&&(f=x,f=f.replace(/^.*[\\/]/,""),f=f.substring(0,f.lastIndexOf("."))),a.settings.isTrusted({command:"\\includegraphics",url:x})?{type:"includegraphics",mode:a.mode,alt:f,width:l,height:u,totalheight:c,src:x}:a.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(e,t)=>{var n=cn(e.height,t),a=0;e.totalheight.number>0&&(a=cn(e.totalheight,t)-n);var l=0;e.width.number>0&&(l=cn(e.width,t));var u={height:Ue(n+a)};l>0&&(u.width=Ue(l)),a>0&&(u.verticalAlign=Ue(-a));var c=new tT(e.src,e.alt,u);return c.height=n,c.depth=a,c},mathmlBuilder:(e,t)=>{var n=new _e("mglyph",[]);n.setAttribute("alt",e.alt);var a=cn(e.height,t),l=0;if(e.totalheight.number>0&&(l=cn(e.totalheight,t)-a,n.setAttribute("valign",Ue(-l))),n.setAttribute("height",Ue(a+l)),e.width.number>0){var u=cn(e.width,t);n.setAttribute("width",Ue(u))}return n.setAttribute("src",e.src),n}});Ye({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:a}=e,l=xt(t[0],"size");if(n.settings.strict){var u=a[1]==="m",c=l.value.unit==="mu";u?(c||n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" supports only mu units, "+("not "+l.value.unit+" units")),n.mode!=="math"&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" works only in math mode")):c&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" doesn't support mu units")}return{type:"kern",mode:n.mode,dimension:l.value}},htmlBuilder(e,t){return d5(e.dimension,t)},mathmlBuilder(e,t){var n=cn(e.dimension,t);return new y5(n)}});Ye({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:a}=e,l=t[0];return{type:"lap",mode:n.mode,alignment:a.slice(5),body:l}},htmlBuilder:(e,t)=>{var n;e.alignment==="clap"?(n=De([],[_t(e.body,t)]),n=De(["inner"],[n],t)):n=De(["inner"],[_t(e.body,t)]);var a=De(["fix"],[]),l=De([e.alignment],[n,a],t),u=De(["strut"]);return u.style.height=Ue(l.height+l.depth),l.depth&&(u.style.verticalAlign=Ue(-l.depth)),l.children.unshift(u),l=De(["thinbox"],[l],t),De(["mord","vbox"],[l],t)},mathmlBuilder:(e,t)=>{var n=new _e("mpadded",[Kt(e.body,t)]);if(e.alignment!=="rlap"){var a=e.alignment==="llap"?"-1":"-0.5";n.setAttribute("lspace",a+"width")}return n.setAttribute("width","0px"),n}});Ye({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:n,parser:a}=e,l=a.mode;a.switchMode("math");var u=n==="\\("?"\\)":"$",c=a.parseExpression(!1,u);return a.expect(u),a.switchMode(l),{type:"styling",mode:a.mode,style:"text",resetFont:!0,body:c}}});Ye({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new Oe("Mismatched "+e.funcName)}});var Cv=(e,t)=>{switch(t.style.size){case mt.DISPLAY.size:return e.display;case mt.TEXT.size:return e.text;case mt.SCRIPT.size:return e.script;case mt.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};Ye({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:n}=e;return{type:"mathchoice",mode:n.mode,display:An(t[0]),text:An(t[1]),script:An(t[2]),scriptscript:An(t[3])}},htmlBuilder:(e,t)=>{var n=Cv(e,t),a=Ln(n,t,!1);return tl(a)},mathmlBuilder:(e,t)=>{var n=Cv(e,t);return Jl(n,t)}});var F5=(e,t,n,a,l,u,c)=>{e=De([],[e]);var f=n&&Ji(n),h,m;if(t){var p=_t(t,a.havingStyle(l.sup()),a);m={elem:p,kern:Math.max(a.fontMetrics().bigOpSpacing1,a.fontMetrics().bigOpSpacing3-p.depth)}}if(n){var y=_t(n,a.havingStyle(l.sub()),a);h={elem:y,kern:Math.max(a.fontMetrics().bigOpSpacing2,a.fontMetrics().bigOpSpacing4-y.height)}}var k;if(m&&h){var x=a.fontMetrics().bigOpSpacing5+h.elem.height+h.elem.depth+h.kern+e.depth+c;k=It({positionType:"bottom",positionData:x,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:h.elem,marginLeft:Ue(-u)},{type:"kern",size:h.kern},{type:"elem",elem:e},{type:"kern",size:m.kern},{type:"elem",elem:m.elem,marginLeft:Ue(u)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]})}else if(h){var C=e.height-c;k=It({positionType:"top",positionData:C,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:h.elem,marginLeft:Ue(-u)},{type:"kern",size:h.kern},{type:"elem",elem:e}]})}else if(m){var M=e.depth+c;k=It({positionType:"bottom",positionData:M,children:[{type:"elem",elem:e},{type:"kern",size:m.kern},{type:"elem",elem:m.elem,marginLeft:Ue(u)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]})}else return e;var I=[k];if(h&&u!==0&&!f){var _=De(["mspace"],[],a);_.style.marginRight=Ue(u),I.unshift(_)}return De(["mop","op-limits"],I,a)},P5=new Set(["\\smallint"]),xu=(e,t)=>{var n,a,l=!1,u;e.type==="supsub"?(n=e.sup,a=e.sub,u=xt(e.base,"op"),l=!0):u=xt(e,"op");var c=t.style,f=!1;c.size===mt.DISPLAY.size&&u.symbol&&!P5.has(u.name)&&(f=!0);var h,m;if(u.symbol){var p=f?"Size2-Regular":"Size1-Regular",y="";if((u.name==="\\oiint"||u.name==="\\oiiint")&&(y=u.name.slice(1),u.name=y==="oiint"?"\\iint":"\\iiint"),h=dr(u.name,p,"math",t,["mop","op-symbol",f?"large-op":"small-op"]),m=h.italic,y.length>0){var k=h5(y+"Size"+(f?"2":"1"),t);h=It({positionType:"individualShift",children:[{type:"elem",elem:h,shift:0},{type:"elem",elem:k,shift:f?.08:0}]}),u.name="\\"+y,h.classes.unshift("mop"),h.italic=m}}else if(u.body){var x=Ln(u.body,t,!0);x.length===1&&x[0]instanceof Jr?(h=x[0],h.classes[0]="mop"):h=De(["mop"],x,t)}else{for(var C=[],M=1;M<u.name.length;M++)C.push(_1(u.name[M],u.mode,t));h=De(["mop"],C,t)}var I=0,_=0;if((h instanceof Jr||u.name==="\\oiint"||u.name==="\\oiiint")&&!u.suppressBaseShift){var N;I=(h.height-h.depth)/2-t.fontMetrics().axisHeight,_=(N=h.italic)!=null?N:0}return l?F5(h,n,a,t,c,_,I):(I&&(h.style.position="relative",h.style.top=Ue(I)),h)},c0=(e,t)=>{var n;if(e.symbol)n=new _e("mo",[ba(e.name,e.mode)]),P5.has(e.name)&&n.setAttribute("largeop","false");else if(e.body)n=new _e("mo",ta(e.body,t));else{n=new _e("mi",[new En(e.name.slice(1))]);var a=new _e("mo",[ba("","text")]);e.parentIsSupSub?n=new _e("mrow",[n,a]):n=g5([n,a])}return n},eA={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};Ye({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,t)=>{var{parser:n,funcName:a}=e,l=a;return l.length===1&&(l=eA[l]),{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:l}},htmlBuilder:xu,mathmlBuilder:c0});Ye({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:n}=e,a=t[0];return{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:An(a)}},htmlBuilder:xu,mathmlBuilder:c0});var tA={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};Ye({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:xu,mathmlBuilder:c0});Ye({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:xu,mathmlBuilder:c0});Ye({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0,allowedInArgument:!0},handler(e){var{parser:t,funcName:n}=e,a=n;return a.length===1&&(a=tA[a]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:a}},htmlBuilder:xu,mathmlBuilder:c0});var G5=(e,t)=>{var n,a,l=!1,u;e.type==="supsub"?(n=e.sup,a=e.sub,u=xt(e.base,"operatorname"),l=!0):u=xt(e,"operatorname");var c;if(u.body.length>0){for(var f=u.body.map(y=>{var k="text"in y?y.text:void 0;return typeof k=="string"?{type:"textord",mode:y.mode,text:k}:y}),h=Ln(f,t.withFont("mathrm"),!0),m=0;m<h.length;m++){var p=h[m];p instanceof Jr&&(p.text=p.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}c=De(["mop"],h,t)}else c=De(["mop"],[],t);return l?F5(c,n,a,t,t.style,0,0):c},nA=(e,t)=>{for(var n=ta(e.body,t.withFont("mathrm")),a=!0,l=0;l<n.length;l++){var u=n[l];if(!(u instanceof y5))if(u instanceof _e)switch(u.type){case"mi":case"mn":case"mspace":case"mtext":break;case"mo":{var c=u.children[0];u.children.length===1&&c instanceof En?c.text=c.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):a=!1;break}default:a=!1}else a=!1}if(a){var f=n.map(p=>p.toText()).join("");n=[new En(f)]}var h=new _e("mi",n);h.setAttribute("mathvariant","normal");var m=new _e("mo",[ba("","text")]);return e.parentIsSupSub?new _e("mrow",[h,m]):g5([h,m])};Ye({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:a}=e,l=t[0];return{type:"operatorname",mode:n.mode,body:An(l),alwaysHandleSupSub:a==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:G5,mathmlBuilder:nA});B("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");Js({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?tl(Ln(e.body,t,!1)):De(["mord"],Ln(e.body,t,!0),t)},mathmlBuilder(e,t){return Jl(e.body,t,!0)}});Ye({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){var{parser:n}=e,a=t[0];return{type:"overline",mode:n.mode,body:a}},htmlBuilder(e,t){var n=_t(e.body,t.havingCrampedStyle()),a=du("overline-line",t),l=t.fontMetrics().defaultRuleThickness,u=It({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"kern",size:3*l},{type:"elem",elem:a},{type:"kern",size:l}]});return De(["mord","overline"],[u],t)},mathmlBuilder(e,t){var n=new _e("mo",[new En("‾")]);n.setAttribute("stretchy","true");var a=new _e("mover",[Kt(e.body,t),n]);return a.setAttribute("accent","true"),a}});Ye({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,a=t[0];return{type:"phantom",mode:n.mode,body:An(a)}},htmlBuilder:(e,t)=>{var n=Ln(e.body,t.withPhantom(),!1);return tl(n)},mathmlBuilder:(e,t)=>{var n=ta(e.body,t);return new _e("mphantom",n)}});B("\\hphantom","\\smash{\\phantom{#1}}");Ye({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,a=t[0];return{type:"vphantom",mode:n.mode,body:a}},htmlBuilder:(e,t)=>{var n=De(["inner"],[_t(e.body,t.withPhantom())]),a=De(["fix"],[]);return De(["mord","rlap"],[n,a],t)},mathmlBuilder:(e,t)=>{var n=ta(An(e.body),t),a=new _e("mphantom",n),l=new _e("mpadded",[a]);return l.setAttribute("width","0px"),l}});Ye({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:n}=e,a=xt(t[0],"size").value,l=t[1];return{type:"raisebox",mode:n.mode,dy:a,body:l}},htmlBuilder(e,t){var n=_t(e.body,t),a=cn(e.dy,t);return It({positionType:"shift",positionData:-a,children:[{type:"elem",elem:n}]})},mathmlBuilder(e,t){var n=new _e("mpadded",[Kt(e.body,t)]),a=e.dy.number+e.dy.unit;return n.setAttribute("voffset",a),n}});Ye({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}});Ye({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,t,n){var{parser:a}=e,l=n[0],u=xt(t[0],"size"),c=xt(t[1],"size");return{type:"rule",mode:a.mode,shift:l&&xt(l,"size").value,width:u.value,height:c.value}},htmlBuilder(e,t){var n=De(["mord","rule"],[],t),a=cn(e.width,t),l=cn(e.height,t),u=e.shift?cn(e.shift,t):0;return n.style.borderRightWidth=Ue(a),n.style.borderTopWidth=Ue(l),n.style.bottom=Ue(u),n.width=a,n.height=l+u,n.depth=-u,n.maxFontSize=l*1.125*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=cn(e.width,t),a=cn(e.height,t),l=e.shift?cn(e.shift,t):0,u=t.color&&t.getColor()||"black",c=new _e("mspace");c.setAttribute("mathbackground",u),c.setAttribute("width",Ue(n)),c.setAttribute("height",Ue(a));var f=new _e("mpadded",[c]);return l>=0?f.setAttribute("height",Ue(l)):(f.setAttribute("height",Ue(l)),f.setAttribute("depth",Ue(-l))),f.setAttribute("voffset",Ue(l)),f}});function V5(e,t,n){for(var a=Ln(e,t,!1),l=t.sizeMultiplier/n.sizeMultiplier,u=0;u<a.length;u++){var c=a[u].classes.indexOf("sizing");c<0?Array.prototype.push.apply(a[u].classes,t.sizingClasses(n)):a[u].classes[c+1]==="reset-size"+t.size&&(a[u].classes[c+1]="reset-size"+n.size),a[u].height*=l,a[u].depth*=l}return tl(a)}var Tv=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],rA=(e,t)=>{var n=t.havingSize(e.size);return V5(e.body,n,t)};Ye({type:"sizing",names:Tv,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:n,funcName:a,parser:l}=e,u=l.parseExpression(!1,n);return{type:"sizing",mode:l.mode,size:Tv.indexOf(a)+1,body:u}},htmlBuilder:rA,mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),a=ta(e.body,n),l=new _e("mstyle",a);return l.setAttribute("mathsize",Ue(n.sizeMultiplier)),l}});Ye({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,n)=>{var{parser:a}=e,l=!1,u=!1,c=n[0]&&xt(n[0],"ordgroup");if(c)for(var f,h=0;h<c.body.length;++h){var m=c.body[h];if(f=zf(m).text,f==="t")l=!0;else if(f==="b")u=!0;else{l=!1,u=!1;break}}else l=!0,u=!0;var p=t[0];return{type:"smash",mode:a.mode,body:p,smashHeight:l,smashDepth:u}},htmlBuilder:(e,t)=>{var n=De([],[_t(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight&&(n.height=0),e.smashDepth&&(n.depth=0),e.smashHeight&&e.smashDepth)return De(["mord","smash"],[n],t);if(n.children)for(var a=0;a<n.children.length;a++)e.smashHeight&&(n.children[a].height=0),e.smashDepth&&(n.children[a].depth=0);var l=It({positionType:"firstBaseline",children:[{type:"elem",elem:n}]});return De(["mord"],[l],t)},mathmlBuilder:(e,t)=>{var n=new _e("mpadded",[Kt(e.body,t)]);return e.smashHeight&&n.setAttribute("height","0px"),e.smashDepth&&n.setAttribute("depth","0px"),n}});Ye({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:a}=e,l=n[0],u=t[0];return{type:"sqrt",mode:a.mode,body:u,index:l}},htmlBuilder(e,t){var n=_t(e.body,t.havingCrampedStyle());n.height===0&&(n.height=t.fontMetrics().xHeight),n=fu(n,t);var a=t.fontMetrics(),l=a.defaultRuleThickness,u=l;t.style.id<mt.TEXT.id&&(u=t.fontMetrics().xHeight);var c=l+u/4,f=n.height+n.depth+c+l,{span:h,ruleWidth:m,advanceWidth:p}=FT(f,t),y=h.height-m;y>n.height+n.depth+c&&(c=(c+y-n.height-n.depth)/2);var k=h.height-n.height-c-m;n.style.paddingLeft=Ue(p);var x=It({positionType:"firstBaseline",children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:-(n.height+k)},{type:"elem",elem:h},{type:"kern",size:m}]});if(e.index){var C=t.havingStyle(mt.SCRIPTSCRIPT),M=_t(e.index,C,t),I=.6*(x.height-x.depth),_=It({positionType:"shift",positionData:-I,children:[{type:"elem",elem:M}]}),N=De(["root"],[_]);return De(["mord","sqrt"],[N,x],t)}else return De(["mord","sqrt"],[x],t)},mathmlBuilder(e,t){var{body:n,index:a}=e;return a?new _e("mroot",[Kt(n,t),Kt(a,t)]):new _e("msqrt",[Kt(n,t)])}});var Wp={display:mt.DISPLAY,text:mt.TEXT,script:mt.SCRIPT,scriptscript:mt.SCRIPTSCRIPT};function aA(e){return e in Wp}Ye({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:n,funcName:a,parser:l}=e,u=l.parseExpression(!0,n),c=a.slice(1,a.length-5);if(!aA(c))throw new Error("Unknown style: "+c);return{type:"styling",mode:l.mode,style:c,body:u}},htmlBuilder(e,t){var n=Wp[e.style],a=t.havingStyle(n);return e.resetFont&&(a=a.withFont("")),V5(e.body,a,t)},mathmlBuilder(e,t){var n=Wp[e.style],a=t.havingStyle(n);e.resetFont&&(a=a.withFont(""));var l=ta(e.body,a),u=new _e("mstyle",l),c={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},f=c[e.style];return u.setAttribute("scriptlevel",f[0]),u.setAttribute("displaystyle",f[1]),u}});var iA=function(t,n){var a=t.base;if(a)if(a.type==="op"){var l=a.limits&&(n.style.size===mt.DISPLAY.size||a.alwaysHandleSupSub);return l?xu:null}else if(a.type==="operatorname"){var u=a.alwaysHandleSupSub&&(n.style.size===mt.DISPLAY.size||a.limits);return u?G5:null}else{if(a.type==="accent")return Ji(a.base)?U1:null;if(a.type==="horizBrace"){var c=!t.sub;return c===a.isOver?$5:null}else return null}else return null};Js({type:"supsub",htmlBuilder(e,t){var n=iA(e,t);if(n)return n(e,t);var{base:a,sup:l,sub:u}=e,c=_t(a,t),f,h,m=t.fontMetrics(),p=0,y=0,k=a&&Ji(a);if(l){var x=t.havingStyle(t.style.sup());f=_t(l,x,t),k||(p=c.height-x.fontMetrics().supDrop*x.sizeMultiplier/t.sizeMultiplier)}if(u){var C=t.havingStyle(t.style.sub());h=_t(u,C,t),k||(y=c.depth+C.fontMetrics().subDrop*C.sizeMultiplier/t.sizeMultiplier)}var M;t.style===mt.DISPLAY?M=m.sup1:t.style.cramped?M=m.sup3:M=m.sup2;var I=t.sizeMultiplier,_=Ue(.5/m.ptPerEm/I),N=null;if(h){var q=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");if(c instanceof Jr||q){var R;N=Ue(-((R=c.italic)!=null?R:0))}}var X;if(f&&h){p=Math.max(p,M,f.depth+.25*m.xHeight),y=Math.max(y,m.sub2);var P=m.defaultRuleThickness,H=4*P;if(p-f.depth-(h.height-y)<H){y=H-(p-f.depth)+h.height;var J=.8*m.xHeight-(p-f.depth);J>0&&(p+=J,y-=J)}var ne=[{type:"elem",elem:h,shift:y,marginRight:_,marginLeft:N},{type:"elem",elem:f,shift:-p,marginRight:_}];X=It({positionType:"individualShift",children:ne})}else if(h){y=Math.max(y,m.sub1,h.height-.8*m.xHeight);var F=[{type:"elem",elem:h,marginLeft:N,marginRight:_}];X=It({positionType:"shift",positionData:y,children:F})}else if(f)p=Math.max(p,M,f.depth+.25*m.xHeight),X=It({positionType:"shift",positionData:-p,children:[{type:"elem",elem:f,marginRight:_}]});else throw new Error("supsub must have either sup or sub.");var te=Fp(c,"right")||"mord";return De([te],[c,De(["msupsub"],[X])],t)},mathmlBuilder(e,t){var n=!1,a,l;e.base&&e.base.type==="horizBrace"&&(l=!!e.sup,l===e.base.isOver&&(n=!0,a=e.base.isOver)),e.base&&(e.base.type==="op"||e.base.type==="operatorname")&&(e.base.parentIsSupSub=!0);var u=[Kt(e.base,t)];e.sub&&u.push(Kt(e.sub,t)),e.sup&&u.push(Kt(e.sup,t));var c;if(n)c=a?"mover":"munder";else if(e.sub)if(e.sup){var m=e.base;m&&m.type==="op"&&m.limits&&t.style===mt.DISPLAY||m&&m.type==="operatorname"&&m.alwaysHandleSupSub&&(t.style===mt.DISPLAY||m.limits)?c="munderover":c="msubsup"}else{var h=e.base;h&&h.type==="op"&&h.limits&&(t.style===mt.DISPLAY||h.alwaysHandleSupSub)||h&&h.type==="operatorname"&&h.alwaysHandleSupSub&&(h.limits||t.style===mt.DISPLAY)?c="munder":c="msub"}else{var f=e.base;f&&f.type==="op"&&f.limits&&(t.style===mt.DISPLAY||f.alwaysHandleSupSub)||f&&f.type==="operatorname"&&f.alwaysHandleSupSub&&(f.limits||t.style===mt.DISPLAY)?c="mover":c="msup"}return new _e(c,u)}});Js({type:"atom",htmlBuilder(e,t){return _1(e.text,e.mode,t,["m"+e.family])},mathmlBuilder(e,t){var n=new _e("mo",[ba(e.text,e.mode)]);if(e.family==="bin"){var a=q1(e,t);a==="bold-italic"&&n.setAttribute("mathvariant",a)}else e.family==="punct"?n.setAttribute("separator","true"):(e.family==="open"||e.family==="close")&&n.setAttribute("stretchy","false");return n}});var Y5={mi:"italic",mn:"normal",mtext:"normal"};Js({type:"mathord",htmlBuilder(e,t){return Nf(e,t,"mathord")},mathmlBuilder(e,t){var n=new _e("mi",[ba(e.text,e.mode,t)]),a=q1(e,t)||"italic";return a!==Y5[n.type]&&n.setAttribute("mathvariant",a),n}});Js({type:"textord",htmlBuilder(e,t){return Nf(e,t,"textord")},mathmlBuilder(e,t){var n=ba(e.text,e.mode,t),a=q1(e,t)||"normal",l;return e.mode==="text"?l=new _e("mtext",[n]):/[0-9]/.test(e.text)?l=new _e("mn",[n]):e.text==="\\prime"?l=new _e("mo",[n]):l=new _e("mi",[n]),a!==Y5[l.type]&&l.setAttribute("mathvariant",a),l}});var np={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},rp={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Js({type:"spacing",htmlBuilder(e,t){if(rp.hasOwnProperty(e.text)){var n=rp[e.text].className||"";if(e.mode==="text"){var a=Nf(e,t,"textord");return a.classes.push(n),a}else return De(["mspace",n],[_1(e.text,e.mode,t)],t)}else{if(np.hasOwnProperty(e.text))return De(["mspace",np[e.text]],[],t);throw new Oe('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,t){var n;if(rp.hasOwnProperty(e.text))n=new _e("mtext",[new En(" ")]);else{if(np.hasOwnProperty(e.text))return new _e("mspace");throw new Oe('Unknown type of space "'+e.text+'"')}return n}});var Av=()=>{var e=new _e("mtd",[]);return e.setAttribute("width","50%"),e};Js({type:"tag",mathmlBuilder(e,t){var n=new _e("mtable",[new _e("mtr",[Av(),new _e("mtd",[Jl(e.body,t)]),Av(),new _e("mtd",[Jl(e.tag,t)])])]);return n.setAttribute("width","100%"),n}});var Ev={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Nv={"\\textbf":"textbf","\\textmd":"textmd"},lA={"\\textit":"textit","\\textup":"textup"},Mv=(e,t)=>{var n=e.font;if(n){if(Ev[n])return t.withTextFontFamily(Ev[n]);if(Nv[n])return t.withTextFontWeight(Nv[n]);if(n==="\\emph")return t.fontShape==="textit"?t.withTextFontShape("textup"):t.withTextFontShape("textit")}else return t;return t.withTextFontShape(lA[n])};Ye({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:a}=e,l=t[0];return{type:"text",mode:n.mode,body:An(l),font:a}},htmlBuilder(e,t){var n=Mv(e,t),a=Ln(e.body,n,!0);return De(["mord","text"],a,n)},mathmlBuilder(e,t){var n=Mv(e,t);return Jl(e.body,n)}});Ye({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"underline",mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=_t(e.body,t),a=du("underline-line",t),l=t.fontMetrics().defaultRuleThickness,u=It({positionType:"top",positionData:n.height,children:[{type:"kern",size:l},{type:"elem",elem:a},{type:"kern",size:3*l},{type:"elem",elem:n}]});return De(["mord","underline"],[u],t)},mathmlBuilder(e,t){var n=new _e("mo",[new En("‾")]);n.setAttribute("stretchy","true");var a=new _e("munder",[Kt(e.body,t),n]);return a.setAttribute("accentunder","true"),a}});Ye({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:"vcenter",mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=_t(e.body,t),a=t.fontMetrics().axisHeight,l=.5*(n.height-a-(n.depth+a));return It({positionType:"shift",positionData:l,children:[{type:"elem",elem:n}]})},mathmlBuilder(e,t){var n=new _e("mpadded",[Kt(e.body,t)],["vcenter"]);return new _e("mrow",[n])}});Ye({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,n){throw new Oe("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var n=Dv(e),a=[],l=t.havingStyle(t.style.text()),u=0;u<n.length;u++){var c=n[u];c==="~"&&(c="\\textasciitilde"),a.push(dr(c,"Typewriter-Regular",e.mode,l,["mord","texttt"]))}return De(["mord","text"].concat(l.sizingClasses(t)),c5(a),l)},mathmlBuilder(e,t){var n=new En(Dv(e)),a=new _e("mtext",[n]);return a.setAttribute("mathvariant","monospace"),a}});var Dv=e=>e.body.replace(/ /g,e.star?"␣":" "),Kl=m5,W5=`[ \r
|
|
334
|
-
]`,sA="\\\\[a-zA-Z@]+",oA="\\\\[^\uD800-\uDFFF]",uA="("+sA+")"+W5+"*",cA=`\\\\(
|
|
335
|
-
|[ \r ]+
|
|
336
|
-
?)[ \r ]*`,Kp="[̀-ͯ]",dA=new RegExp(Kp+"+$"),fA="("+W5+"+)|"+(cA+"|")+"([!-\\[\\]-‧-豈-]"+(Kp+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(Kp+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+uA)+("|"+oA+")");class zv{constructor(t,n){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=t,this.settings=n,this.tokenRegex=new RegExp(fA,"g"),this.catcodes={"%":14,"~":13}}setCatcode(t,n){this.catcodes[t]=n}lex(){var t=this.input,n=this.tokenRegex.lastIndex;if(n===t.length)return new Qr("EOF",new zr(this,n,n));var a=this.tokenRegex.exec(t);if(a===null||a.index!==n)throw new Oe("Unexpected character: '"+t[n]+"'",new Qr(t[n],new zr(this,n,n+1)));var l=a[6]||a[3]||(a[2]?"\\ ":" ");if(this.catcodes[l]===14){var u=t.indexOf(`
|
|
337
|
-
`,this.tokenRegex.lastIndex);return u===-1?(this.tokenRegex.lastIndex=t.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=u+1,this.lex()}return new Qr(l,new zr(this,n,this.tokenRegex.lastIndex))}}class hA{constructor(t,n){t===void 0&&(t={}),n===void 0&&(n={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=n,this.builtins=t,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new Oe("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var t=this.undefStack.pop();for(var n in t)t.hasOwnProperty(n)&&(t[n]==null?delete this.current[n]:this.current[n]=t[n])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(t){return this.current.hasOwnProperty(t)||this.builtins.hasOwnProperty(t)}get(t){return this.current.hasOwnProperty(t)?this.current[t]:this.builtins[t]}set(t,n,a){if(a===void 0&&(a=!1),a){for(var l=0;l<this.undefStack.length;l++)delete this.undefStack[l][t];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][t]=n)}else{var u=this.undefStack[this.undefStack.length-1];u&&!u.hasOwnProperty(t)&&(u[t]=this.current[t])}n==null?delete this.current[t]:this.current[t]=n}}var mA=L5;B("\\noexpand",function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}});B("\\expandafter",function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}});B("\\@firstoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[0],numArgs:0}});B("\\@secondoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[1],numArgs:0}});B("\\@ifnextchar",function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();return t[0].length===1&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}});B("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");B("\\TextOrMath",function(e){var t=e.consumeArgs(2);return e.mode==="text"?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var Rv={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};B("\\char",function(e){var t=e.popToken(),n,a=0;if(t.text==="'")n=8,t=e.popToken();else if(t.text==='"')n=16,t=e.popToken();else if(t.text==="`")if(t=e.popToken(),t.text[0]==="\\")a=t.text.charCodeAt(1);else{if(t.text==="EOF")throw new Oe("\\char` missing argument");a=t.text.charCodeAt(0)}else n=10;if(n){if(a=Rv[t.text],a==null||a>=n)throw new Oe("Invalid base-"+n+" digit "+t.text);for(var l;(l=Rv[e.future().text])!=null&&l<n;)a*=n,a+=l,e.popToken()}return"\\@char{"+a+"}"});var P1=(e,t,n,a)=>{var l=e.consumeArg().tokens;if(l.length!==1)throw new Oe("\\newcommand's first argument must be a macro name");var u=l[0].text,c=e.isDefined(u);if(c&&!t)throw new Oe("\\newcommand{"+u+"} attempting to redefine "+(u+"; use \\renewcommand"));if(!c&&!n)throw new Oe("\\renewcommand{"+u+"} when command "+u+" does not yet exist; use \\newcommand");var f=0;if(l=e.consumeArg().tokens,l.length===1&&l[0].text==="["){for(var h="",m=e.expandNextToken();m.text!=="]"&&m.text!=="EOF";)h+=m.text,m=e.expandNextToken();if(!h.match(/^\s*[0-9]+\s*$/))throw new Oe("Invalid number of arguments: "+h);f=parseInt(h),l=e.consumeArg().tokens}return c&&a||e.macros.set(u,{tokens:l,numArgs:f}),""};B("\\newcommand",e=>P1(e,!1,!0,!1));B("\\renewcommand",e=>P1(e,!0,!1,!1));B("\\providecommand",e=>P1(e,!0,!0,!0));B("\\message",e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(n=>n.text).join("")),""});B("\\errmessage",e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(n=>n.text).join("")),""});B("\\show",e=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),Kl[n],sn.math[n],sn.text[n]),""});B("\\bgroup","{");B("\\egroup","}");B("~","\\nobreakspace");B("\\lq","`");B("\\rq","'");B("\\aa","\\r a");B("\\AA","\\r A");B("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");B("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");B("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");B("ℬ","\\mathscr{B}");B("ℰ","\\mathscr{E}");B("ℱ","\\mathscr{F}");B("ℋ","\\mathscr{H}");B("ℐ","\\mathscr{I}");B("ℒ","\\mathscr{L}");B("ℳ","\\mathscr{M}");B("ℛ","\\mathscr{R}");B("ℭ","\\mathfrak{C}");B("ℌ","\\mathfrak{H}");B("ℨ","\\mathfrak{Z}");B("\\Bbbk","\\Bbb{k}");B("\\llap","\\mathllap{\\textrm{#1}}");B("\\rlap","\\mathrlap{\\textrm{#1}}");B("\\clap","\\mathclap{\\textrm{#1}}");B("\\mathstrut","\\vphantom{(}");B("\\underbar","\\underline{\\text{#1}}");B("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}');B("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");B("\\ne","\\neq");B("≠","\\neq");B("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");B("∉","\\notin");B("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");B("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");B("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");B("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");B("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");B("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");B("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");B("⟂","\\perp");B("‼","\\mathclose{!\\mkern-0.8mu!}");B("∌","\\notni");B("⌜","\\ulcorner");B("⌝","\\urcorner");B("⌞","\\llcorner");B("⌟","\\lrcorner");B("©","\\copyright");B("®","\\textregistered");B("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');B("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');B("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');B("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');B("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");B("⋮","\\vdots");B("\\varGamma","\\mathit{\\Gamma}");B("\\varDelta","\\mathit{\\Delta}");B("\\varTheta","\\mathit{\\Theta}");B("\\varLambda","\\mathit{\\Lambda}");B("\\varXi","\\mathit{\\Xi}");B("\\varPi","\\mathit{\\Pi}");B("\\varSigma","\\mathit{\\Sigma}");B("\\varUpsilon","\\mathit{\\Upsilon}");B("\\varPhi","\\mathit{\\Phi}");B("\\varPsi","\\mathit{\\Psi}");B("\\varOmega","\\mathit{\\Omega}");B("\\substack","\\begin{subarray}{c}#1\\end{subarray}");B("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");B("\\boxed","\\fbox{$\\displaystyle{#1}$}");B("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");B("\\implies","\\DOTSB\\;\\Longrightarrow\\;");B("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");B("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");B("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var Ov={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"},pA=new Set(["bin","rel"]);B("\\dots",function(e){var t="\\dotso",n=e.expandAfterFuture().text;return n in Ov?t=Ov[n]:(n.slice(0,4)==="\\not"||n in sn.math&&pA.has(sn.math[n].group))&&(t="\\dotsb"),t});var G1={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};B("\\dotso",function(e){var t=e.future().text;return t in G1?"\\ldots\\,":"\\ldots"});B("\\dotsc",function(e){var t=e.future().text;return t in G1&&t!==","?"\\ldots\\,":"\\ldots"});B("\\cdots",function(e){var t=e.future().text;return t in G1?"\\@cdots\\,":"\\@cdots"});B("\\dotsb","\\cdots");B("\\dotsm","\\cdots");B("\\dotsi","\\!\\cdots");B("\\dotsx","\\ldots\\,");B("\\DOTSI","\\relax");B("\\DOTSB","\\relax");B("\\DOTSX","\\relax");B("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");B("\\,","\\tmspace+{3mu}{.1667em}");B("\\thinspace","\\,");B("\\>","\\mskip{4mu}");B("\\:","\\tmspace+{4mu}{.2222em}");B("\\medspace","\\:");B("\\;","\\tmspace+{5mu}{.2777em}");B("\\thickspace","\\;");B("\\!","\\tmspace-{3mu}{.1667em}");B("\\negthinspace","\\!");B("\\negmedspace","\\tmspace-{4mu}{.2222em}");B("\\negthickspace","\\tmspace-{5mu}{.277em}");B("\\enspace","\\kern.5em ");B("\\enskip","\\hskip.5em\\relax");B("\\quad","\\hskip1em\\relax");B("\\qquad","\\hskip2em\\relax");B("\\tag","\\@ifstar\\tag@literal\\tag@paren");B("\\tag@paren","\\tag@literal{({#1})}");B("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new Oe("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});B("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");B("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");B("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");B("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");B("\\newline","\\\\\\relax");B("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var K5=Ue(ii["Main-Regular"][84][1]-.7*ii["Main-Regular"][65][1]);B("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+K5+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");B("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+K5+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");B("\\hspace","\\@ifstar\\@hspacer\\@hspace");B("\\@hspace","\\hskip #1\\relax");B("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");B("\\ordinarycolon",":");B("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");B("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');B("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');B("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');B("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');B("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');B("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');B("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');B("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');B("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');B("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');B("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');B("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');B("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');B("∷","\\dblcolon");B("∹","\\eqcolon");B("≔","\\coloneqq");B("≕","\\eqqcolon");B("⩴","\\Coloneqq");B("\\ratio","\\vcentcolon");B("\\coloncolon","\\dblcolon");B("\\colonequals","\\coloneqq");B("\\coloncolonequals","\\Coloneqq");B("\\equalscolon","\\eqqcolon");B("\\equalscoloncolon","\\Eqqcolon");B("\\colonminus","\\coloneq");B("\\coloncolonminus","\\Coloneq");B("\\minuscolon","\\eqcolon");B("\\minuscoloncolon","\\Eqcolon");B("\\coloncolonapprox","\\Colonapprox");B("\\coloncolonsim","\\Colonsim");B("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");B("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");B("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");B("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");B("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");B("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");B("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");B("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");B("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");B("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");B("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");B("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");B("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");B("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");B("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");B("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");B("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");B("\\nleqq","\\html@mathml{\\@nleqq}{≰}");B("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");B("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");B("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");B("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");B("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");B("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");B("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");B("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");B("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");B("\\imath","\\html@mathml{\\@imath}{ı}");B("\\jmath","\\html@mathml{\\@jmath}{ȷ}");B("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");B("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");B("⟦","\\llbracket");B("⟧","\\rrbracket");B("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");B("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");B("⦃","\\lBrace");B("⦄","\\rBrace");B("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");B("⦵","\\minuso");B("\\darr","\\downarrow");B("\\dArr","\\Downarrow");B("\\Darr","\\Downarrow");B("\\lang","\\langle");B("\\rang","\\rangle");B("\\uarr","\\uparrow");B("\\uArr","\\Uparrow");B("\\Uarr","\\Uparrow");B("\\N","\\mathbb{N}");B("\\R","\\mathbb{R}");B("\\Z","\\mathbb{Z}");B("\\alef","\\aleph");B("\\alefsym","\\aleph");B("\\Alpha","\\mathrm{A}");B("\\Beta","\\mathrm{B}");B("\\bull","\\bullet");B("\\Chi","\\mathrm{X}");B("\\clubs","\\clubsuit");B("\\cnums","\\mathbb{C}");B("\\Complex","\\mathbb{C}");B("\\Dagger","\\ddagger");B("\\diamonds","\\diamondsuit");B("\\empty","\\emptyset");B("\\Epsilon","\\mathrm{E}");B("\\Eta","\\mathrm{H}");B("\\exist","\\exists");B("\\harr","\\leftrightarrow");B("\\hArr","\\Leftrightarrow");B("\\Harr","\\Leftrightarrow");B("\\hearts","\\heartsuit");B("\\image","\\Im");B("\\infin","\\infty");B("\\Iota","\\mathrm{I}");B("\\isin","\\in");B("\\Kappa","\\mathrm{K}");B("\\larr","\\leftarrow");B("\\lArr","\\Leftarrow");B("\\Larr","\\Leftarrow");B("\\lrarr","\\leftrightarrow");B("\\lrArr","\\Leftrightarrow");B("\\Lrarr","\\Leftrightarrow");B("\\Mu","\\mathrm{M}");B("\\natnums","\\mathbb{N}");B("\\Nu","\\mathrm{N}");B("\\Omicron","\\mathrm{O}");B("\\plusmn","\\pm");B("\\rarr","\\rightarrow");B("\\rArr","\\Rightarrow");B("\\Rarr","\\Rightarrow");B("\\real","\\Re");B("\\reals","\\mathbb{R}");B("\\Reals","\\mathbb{R}");B("\\Rho","\\mathrm{P}");B("\\sdot","\\cdot");B("\\sect","\\S");B("\\spades","\\spadesuit");B("\\sub","\\subset");B("\\sube","\\subseteq");B("\\supe","\\supseteq");B("\\Tau","\\mathrm{T}");B("\\thetasym","\\vartheta");B("\\weierp","\\wp");B("\\Zeta","\\mathrm{Z}");B("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");B("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");B("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");B("\\bra","\\mathinner{\\langle{#1}|}");B("\\ket","\\mathinner{|{#1}\\rangle}");B("\\braket","\\mathinner{\\langle{#1}\\rangle}");B("\\Bra","\\left\\langle#1\\right|");B("\\Ket","\\left|#1\\right\\rangle");var X5=e=>t=>{var n=t.consumeArg().tokens,a=t.consumeArg().tokens,l=t.consumeArg().tokens,u=t.consumeArg().tokens,c=t.macros.get("|"),f=t.macros.get("\\|");t.macros.beginGroup();var h=y=>k=>{e&&(k.macros.set("|",c),l.length&&k.macros.set("\\|",f));var x=y;if(!y&&l.length){var C=k.future();C.text==="|"&&(k.popToken(),x=!0)}return{tokens:x?l:a,numArgs:0}};t.macros.set("|",h(!1)),l.length&&t.macros.set("\\|",h(!0));var m=t.consumeArg().tokens,p=t.expandTokens([...u,...m,...n]);return t.macros.endGroup(),{tokens:p.reverse(),numArgs:0}};B("\\bra@ket",X5(!1));B("\\bra@set",X5(!0));B("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");B("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");B("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");B("\\angln","{\\angl n}");B("\\blue","\\textcolor{##6495ed}{#1}");B("\\orange","\\textcolor{##ffa500}{#1}");B("\\pink","\\textcolor{##ff00af}{#1}");B("\\red","\\textcolor{##df0030}{#1}");B("\\green","\\textcolor{##28ae7b}{#1}");B("\\gray","\\textcolor{gray}{#1}");B("\\purple","\\textcolor{##9d38bd}{#1}");B("\\blueA","\\textcolor{##ccfaff}{#1}");B("\\blueB","\\textcolor{##80f6ff}{#1}");B("\\blueC","\\textcolor{##63d9ea}{#1}");B("\\blueD","\\textcolor{##11accd}{#1}");B("\\blueE","\\textcolor{##0c7f99}{#1}");B("\\tealA","\\textcolor{##94fff5}{#1}");B("\\tealB","\\textcolor{##26edd5}{#1}");B("\\tealC","\\textcolor{##01d1c1}{#1}");B("\\tealD","\\textcolor{##01a995}{#1}");B("\\tealE","\\textcolor{##208170}{#1}");B("\\greenA","\\textcolor{##b6ffb0}{#1}");B("\\greenB","\\textcolor{##8af281}{#1}");B("\\greenC","\\textcolor{##74cf70}{#1}");B("\\greenD","\\textcolor{##1fab54}{#1}");B("\\greenE","\\textcolor{##0d923f}{#1}");B("\\goldA","\\textcolor{##ffd0a9}{#1}");B("\\goldB","\\textcolor{##ffbb71}{#1}");B("\\goldC","\\textcolor{##ff9c39}{#1}");B("\\goldD","\\textcolor{##e07d10}{#1}");B("\\goldE","\\textcolor{##a75a05}{#1}");B("\\redA","\\textcolor{##fca9a9}{#1}");B("\\redB","\\textcolor{##ff8482}{#1}");B("\\redC","\\textcolor{##f9685d}{#1}");B("\\redD","\\textcolor{##e84d39}{#1}");B("\\redE","\\textcolor{##bc2612}{#1}");B("\\maroonA","\\textcolor{##ffbde0}{#1}");B("\\maroonB","\\textcolor{##ff92c6}{#1}");B("\\maroonC","\\textcolor{##ed5fa6}{#1}");B("\\maroonD","\\textcolor{##ca337c}{#1}");B("\\maroonE","\\textcolor{##9e034e}{#1}");B("\\purpleA","\\textcolor{##ddd7ff}{#1}");B("\\purpleB","\\textcolor{##c6b9fc}{#1}");B("\\purpleC","\\textcolor{##aa87ff}{#1}");B("\\purpleD","\\textcolor{##7854ab}{#1}");B("\\purpleE","\\textcolor{##543b78}{#1}");B("\\mintA","\\textcolor{##f5f9e8}{#1}");B("\\mintB","\\textcolor{##edf2df}{#1}");B("\\mintC","\\textcolor{##e0e5cc}{#1}");B("\\grayA","\\textcolor{##f6f7f7}{#1}");B("\\grayB","\\textcolor{##f0f1f2}{#1}");B("\\grayC","\\textcolor{##e3e5e6}{#1}");B("\\grayD","\\textcolor{##d6d8da}{#1}");B("\\grayE","\\textcolor{##babec2}{#1}");B("\\grayF","\\textcolor{##888d93}{#1}");B("\\grayG","\\textcolor{##626569}{#1}");B("\\grayH","\\textcolor{##3b3e40}{#1}");B("\\grayI","\\textcolor{##21242c}{#1}");B("\\kaBlue","\\textcolor{##314453}{#1}");B("\\kaGreen","\\textcolor{##71B307}{#1}");var Z5={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class gA{constructor(t,n,a){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=n,this.expansionCount=0,this.feed(t),this.macros=new hA(mA,n.macros),this.mode=a,this.stack=[]}feed(t){this.lexer=new zv(t,this.settings)}switchMode(t){this.mode=t}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(t){this.stack.push(t)}pushTokens(t){this.stack.push(...t)}scanArgument(t){var n,a,l;if(t){if(this.consumeSpaces(),this.future().text!=="[")return null;n=this.popToken(),{tokens:l,end:a}=this.consumeArg(["]"])}else({tokens:l,start:n,end:a}=this.consumeArg());return this.pushToken(new Qr("EOF",a.loc)),this.pushTokens(l),new Qr("",zr.range(n,a))}consumeSpaces(){for(;;){var t=this.future();if(t.text===" ")this.stack.pop();else break}}consumeArg(t){var n=[],a=t&&t.length>0;a||this.consumeSpaces();var l=this.future(),u,c=0,f=0;do{if(u=this.popToken(),n.push(u),u.text==="{")++c;else if(u.text==="}"){if(--c,c===-1)throw new Oe("Extra }",u)}else if(u.text==="EOF")throw new Oe("Unexpected end of input in a macro argument, expected '"+(t&&a?t[f]:"}")+"'",u);if(t&&a)if((c===0||c===1&&t[f]==="{")&&u.text===t[f]){if(++f,f===t.length){n.splice(-f,f);break}}else f=0}while(c!==0||a);return l.text==="{"&&n[n.length-1].text==="}"&&(n.pop(),n.shift()),n.reverse(),{tokens:n,start:l,end:u}}consumeArgs(t,n){if(n){if(n.length!==t+1)throw new Oe("The length of delimiters doesn't match the number of args!");for(var a=n[0],l=0;l<a.length;l++){var u=this.popToken();if(a[l]!==u.text)throw new Oe("Use of the macro doesn't match its definition",u)}}for(var c=[],f=0;f<t;f++)c.push(this.consumeArg(n&&n[f+1]).tokens);return c}countExpansion(t){if(this.expansionCount+=t,this.expansionCount>this.settings.maxExpand)throw new Oe("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(t){var n=this.popToken(),a=n.text,l=n.noexpand?null:this._getExpansion(a);if(l==null||t&&l.unexpandable){if(t&&l==null&&a[0]==="\\"&&!this.isDefined(a))throw new Oe("Undefined control sequence: "+a);return this.pushToken(n),!1}this.countExpansion(1);var u=l.tokens,c=this.consumeArgs(l.numArgs,l.delimiters);if(l.numArgs){u=u.slice();for(var f=u.length-1;f>=0;--f){var h=u[f];if(h.text==="#"){if(f===0)throw new Oe("Incomplete placeholder at end of macro body",h);if(h=u[--f],h.text==="#")u.splice(f+1,1);else if(/^[1-9]$/.test(h.text))u.splice(f,2,...c[+h.text-1]);else throw new Oe("Not a valid argument number",h)}}}return this.pushTokens(u),u.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var t=this.stack.pop();return t.treatAsRelax&&(t.text="\\relax"),t}}expandMacro(t){return this.macros.has(t)?this.expandTokens([new Qr(t)]):void 0}expandTokens(t){var n=[],a=this.stack.length;for(this.pushTokens(t);this.stack.length>a;)if(this.expandOnce(!0)===!1){var l=this.stack.pop();l.treatAsRelax&&(l.noexpand=!1,l.treatAsRelax=!1),n.push(l)}return this.countExpansion(n.length),n}expandMacroAsText(t){var n=this.expandMacro(t);return n&&n.map(a=>a.text).join("")}_getExpansion(t){var n=this.macros.get(t);if(n==null)return n;if(t.length===1){var a=this.lexer.catcodes[t];if(a!=null&&a!==13)return}var l=typeof n=="function"?n(this):n;if(typeof l=="string"){var u=0;if(l.includes("#"))for(var c=l.replace(/##/g,"");c.includes("#"+(u+1));)++u;for(var f=new zv(l,this.settings),h=[],m=f.lex();m.text!=="EOF";)h.push(m),m=f.lex();h.reverse();var p={tokens:h,numArgs:u};return p}return l}isDefined(t){return this.macros.has(t)||Kl.hasOwnProperty(t)||sn.math.hasOwnProperty(t)||sn.text.hasOwnProperty(t)||Z5.hasOwnProperty(t)}isExpandable(t){var n=this.macros.get(t);return n!=null?typeof n=="string"||typeof n=="function"||!n.unexpandable:Kl.hasOwnProperty(t)&&!Kl[t].primitive}}var Iv=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Ld=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g",ʰ:"h","ⁱ":"i",ʲ:"j","ᵏ":"k",ˡ:"l","ᵐ":"m",ⁿ:"n","ᵒ":"o","ᵖ":"p",ʳ:"r",ˢ:"s","ᵗ":"t","ᵘ":"u","ᵛ":"v",ʷ:"w",ˣ:"x",ʸ:"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),ap={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},_v={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class qf{constructor(t,n){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new gA(t,n,this.mode),this.settings=n,this.leftrightDepth=0,this.nextToken=null}expect(t,n){if(n===void 0&&(n=!0),this.fetch().text!==t)throw new Oe("Expected '"+t+"', got '"+this.fetch().text+"'",this.fetch());n&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(t){this.mode=t,this.gullet.switchMode(t)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var t=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),t}finally{this.gullet.endGroups()}}subparse(t){var n=this.nextToken;this.consume(),this.gullet.pushToken(new Qr("}")),this.gullet.pushTokens(t);var a=this.parseExpression(!1);return this.expect("}"),this.nextToken=n,a}parseExpression(t,n){for(var a=[];;){this.mode==="math"&&this.consumeSpaces();var l=this.fetch();if(qf.endOfExpression.has(l.text)||n&&l.text===n||t&&Kl[l.text]&&Kl[l.text].infix)break;var u=this.parseAtom(n);if(u){if(u.type==="internal")continue}else break;a.push(u)}return this.mode==="text"&&this.formLigatures(a),this.handleInfixNodes(a)}handleInfixNodes(t){for(var n=-1,a,l=0;l<t.length;l++){var u=t[l];if(u.type==="infix"){if(n!==-1)throw new Oe("only one infix operator per group",u.token);n=l,a=u.replaceWith}}if(n!==-1&&a){var c,f,h=t.slice(0,n),m=t.slice(n+1);h.length===1&&h[0].type==="ordgroup"?c=h[0]:c={type:"ordgroup",mode:this.mode,body:h},m.length===1&&m[0].type==="ordgroup"?f=m[0]:f={type:"ordgroup",mode:this.mode,body:m};var p;return a==="\\\\abovefrac"?p=this.callFunction(a,[c,t[n],f],[]):p=this.callFunction(a,[c,f],[]),[p]}else return t}handleSupSubscript(t){var n=this.fetch(),a=n.text;this.consume(),this.consumeSpaces();var l;do{var u;l=this.parseGroup(t)}while(((u=l)==null?void 0:u.type)==="internal");if(!l)throw new Oe("Expected group after '"+a+"'",n);return l}formatUnsupportedCmd(t){for(var n=[],a=0;a<t.length;a++)n.push({type:"textord",mode:"text",text:t[a]});var l={type:"text",mode:this.mode,body:n},u={type:"color",mode:this.mode,color:this.settings.errorColor,body:[l]};return u}parseAtom(t){var n=this.parseGroup("atom",t);if((n==null?void 0:n.type)==="internal"||this.mode==="text")return n;for(var a,l;;){this.consumeSpaces();var u=this.fetch();if(u.text==="\\limits"||u.text==="\\nolimits"){if(n&&n.type==="op"){var c=u.text==="\\limits";n.limits=c,n.alwaysHandleSupSub=!0}else if(n&&n.type==="operatorname")n.alwaysHandleSupSub&&(n.limits=u.text==="\\limits");else throw new Oe("Limit controls must follow a math operator",u);this.consume()}else if(u.text==="^"){if(a)throw new Oe("Double superscript",u);a=this.handleSupSubscript("superscript")}else if(u.text==="_"){if(l)throw new Oe("Double subscript",u);l=this.handleSupSubscript("subscript")}else if(u.text==="'"){if(a)throw new Oe("Double superscript",u);var f={type:"textord",mode:this.mode,text:"\\prime"},h=[f];for(this.consume();this.fetch().text==="'";)h.push(f),this.consume();this.fetch().text==="^"&&h.push(this.handleSupSubscript("superscript")),a={type:"ordgroup",mode:this.mode,body:h}}else if(Ld[u.text]){var m=Iv.test(u.text),p=[];for(p.push(new Qr(Ld[u.text])),this.consume();;){var y=this.fetch().text;if(!Ld[y]||Iv.test(y)!==m)break;p.unshift(new Qr(Ld[y])),this.consume()}var k=this.subparse(p);m?l={type:"ordgroup",mode:"math",body:k}:a={type:"ordgroup",mode:"math",body:k}}else break}return a||l?{type:"supsub",mode:this.mode,base:n,sup:a,sub:l}:n}parseFunction(t,n){var a=this.fetch(),l=a.text,u=Kl[l];if(!u)return null;if(this.consume(),n&&n!=="atom"&&!u.allowedInArgument)throw new Oe("Got function '"+l+"' with no arguments"+(n?" as "+n:""),a);if(this.mode==="text"&&!u.allowedInText)throw new Oe("Can't use function '"+l+"' in text mode",a);if(this.mode==="math"&&u.allowedInMath===!1)throw new Oe("Can't use function '"+l+"' in math mode",a);var{args:c,optArgs:f}=this.parseArguments(l,u);return this.callFunction(l,c,f,a,t)}callFunction(t,n,a,l,u){var c={funcName:t,parser:this,token:l,breakOnTokenText:u},f=Kl[t];if(f&&f.handler)return f.handler(c,n,a);throw new Oe("No function handler for "+t)}parseArguments(t,n){var a=n.numArgs+n.numOptionalArgs;if(a===0)return{args:[],optArgs:[]};for(var l=[],u=[],c=0;c<a;c++){var f=n.argTypes&&n.argTypes[c],h=c<n.numOptionalArgs;("primitive"in n&&n.primitive&&f==null||n.type==="sqrt"&&c===1&&u[0]==null)&&(f="primitive");var m=this.parseGroupOfType("argument to '"+t+"'",f,h);if(h)u.push(m);else if(m!=null)l.push(m);else throw new Oe("Null argument, please report this as a bug")}return{args:l,optArgs:u}}parseGroupOfType(t,n,a){switch(n){case"color":return this.parseColorGroup(a);case"size":return this.parseSizeGroup(a);case"url":return this.parseUrlGroup(a);case"math":case"text":return this.parseArgumentGroup(a,n);case"hbox":{var l=this.parseArgumentGroup(a,"text");return l!=null?{type:"styling",mode:l.mode,body:[l],style:"text",resetFont:!0}:null}case"raw":{var u=this.parseStringGroup("raw",a);return u!=null?{type:"raw",mode:"text",string:u.text}:null}case"primitive":{if(a)throw new Oe("A primitive argument cannot be optional");var c=this.parseGroup(t);if(c==null)throw new Oe("Expected group as "+t,this.fetch());return c}case"original":case null:case void 0:return this.parseArgumentGroup(a);default:throw new Oe("Unknown group type as "+t,this.fetch())}}consumeSpaces(){for(;this.fetch().text===" ";)this.consume()}parseStringGroup(t,n){var a=this.gullet.scanArgument(n);if(a==null)return null;for(var l="",u;(u=this.fetch()).text!=="EOF";)l+=u.text,this.consume();return this.consume(),a.text=l,a}parseRegexGroup(t,n){for(var a=this.fetch(),l=a,u="",c;(c=this.fetch()).text!=="EOF"&&t.test(u+c.text);)l=c,u+=l.text,this.consume();if(u==="")throw new Oe("Invalid "+n+": '"+a.text+"'",a);return a.range(l,u)}parseColorGroup(t){var n=this.parseStringGroup("color",t);if(n==null)return null;var a=/^(#[a-f0-9]{3,4}|#[a-f0-9]{6}|#[a-f0-9]{8}|[a-f0-9]{6}|[a-z]+)$/i.exec(n.text);if(!a)throw new Oe("Invalid color: '"+n.text+"'",n);var l=a[0];return/^[0-9a-f]{6}$/i.test(l)&&(l="#"+l),{type:"color-token",mode:this.mode,color:l}}parseSizeGroup(t){var n,a=!1;if(this.gullet.consumeSpaces(),!t&&this.gullet.future().text!=="{"?n=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"):n=this.parseStringGroup("size",t),!n)return null;!t&&n.text.length===0&&(n.text="0pt",a=!0);var l=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(n.text);if(!l)throw new Oe("Invalid size: '"+n.text+"'",n);var u={number:+(l[1]+l[2]),unit:l[3]};if(!a5(u))throw new Oe("Invalid unit: '"+u.unit+"'",n);return{type:"size",mode:this.mode,value:u,isBlank:a}}parseUrlGroup(t){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var n=this.parseStringGroup("url",t);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),n==null)return null;var a=n.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:a}}parseArgumentGroup(t,n){var a=this.gullet.scanArgument(t);if(a==null)return null;var l=this.mode;n&&this.switchMode(n),this.gullet.beginGroup();var u=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var c={type:"ordgroup",mode:this.mode,loc:a.loc,body:u};return n&&this.switchMode(l),c}parseGroup(t,n){var a=this.fetch(),l=a.text,u;if(l==="{"||l==="\\begingroup"){this.consume();var c=l==="{"?"}":"\\endgroup";this.gullet.beginGroup();var f=this.parseExpression(!1,c),h=this.fetch();this.expect(c),this.gullet.endGroup(),u={type:"ordgroup",mode:this.mode,loc:zr.range(a,h),body:f,semisimple:l==="\\begingroup"||void 0}}else if(u=this.parseFunction(n,t)||this.parseSymbol(),u==null&&l[0]==="\\"&&!Z5.hasOwnProperty(l)){if(this.settings.throwOnError)throw new Oe("Undefined control sequence: "+l,a);u=this.formatUnsupportedCmd(l),this.consume()}return u}formLigatures(t){for(var n=t.length-1,a=0;a<n;++a){var l=t[a];if(l.type==="textord"){var u=l.text,c=t[a+1];if(!(!c||c.type!=="textord")){if(u==="-"&&c.text==="-"){var f=t[a+2];a+1<n&&f&&f.type==="textord"&&f.text==="-"?(t.splice(a,3,{type:"textord",mode:"text",loc:zr.range(l,f),text:"---"}),n-=2):(t.splice(a,2,{type:"textord",mode:"text",loc:zr.range(l,c),text:"--"}),n-=1)}(u==="'"||u==="`")&&c.text===u&&(t.splice(a,2,{type:"textord",mode:"text",loc:zr.range(l,c),text:u+u}),n-=1)}}}}parseSymbol(){var t=this.fetch(),n=t.text;if(/^\\verb[^a-zA-Z]/.test(n)){this.consume();var a=n.slice(5),l=a.charAt(0)==="*";if(l&&(a=a.slice(1)),a.length<2||a.charAt(0)!==a.slice(-1))throw new Oe(`\\verb assertion failed --
|
|
338
|
-
please report what input caused this bug`);return a=a.slice(1,-1),{type:"verb",mode:"text",body:a,star:l}}_v.hasOwnProperty(n[0])&&!sn[this.mode][n[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+n[0]+'" used in math mode',t),n=_v[n[0]]+n.slice(1));var u=dA.exec(n);u&&(n=n.substring(0,u.index),n==="i"?n="ı":n==="j"&&(n="ȷ"));var c;if(sn[this.mode][n]){this.settings.strict&&this.mode==="math"&&Ip.includes(n)&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+n[0]+'" used in math mode',t);var f=sn[this.mode][n].group,h=zr.range(t),m;zT(f)?m={type:"atom",mode:this.mode,family:f,loc:h,text:n}:m={type:f,mode:this.mode,loc:h,text:n},c=m}else if(n.charCodeAt(0)>=128)this.settings.strict&&(r5(n.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+n[0]+'" used in math mode',t):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+n[0]+'"'+(" ("+n.charCodeAt(0)+")"),t)),c={type:"textord",mode:"text",loc:zr.range(t),text:n};else return null;if(this.consume(),u)for(var p=0;p<u[0].length;p++){var y=u[0][p];if(!ap[y])throw new Oe("Unknown accent ' "+y+"'",t);var k=ap[y][this.mode]||ap[y].text;if(!k)throw new Oe("Accent "+y+" unsupported in "+this.mode+" mode",t);c={type:"accent",mode:this.mode,loc:zr.range(t),label:k,isStretchy:!1,isShifty:!0,base:c}}return c}}qf.endOfExpression=new Set(["}","\\endgroup","\\end","\\right","&"]);var V1=function(t,n){if(!(typeof t=="string"||t instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var a=new qf(t,n);delete a.gullet.macros.current["\\df@tag"];var l=a.parse();if(delete a.gullet.macros.current["\\current@color"],delete a.gullet.macros.current["\\color"],a.gullet.macros.get("\\df@tag")){if(!n.displayMode)throw new Oe("\\tag works only in display equations");l=[{type:"tag",mode:"text",body:l,tag:a.subparse([new Qr("\\df@tag")])}]}return l},Y1=function(t,n,a){n.textContent="";var l=Uf(t,a).toNode();n.appendChild(l)};typeof document<"u"&&document.compatMode!=="CSS1Compat"&&(typeof console<"u"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),Y1=function(){throw new Oe("KaTeX doesn't work in quirks mode.")});var Q5=function(t,n){var a=Uf(t,n).toMarkup();return a},J5=function(t,n){var a=new z1(n);return V1(t,a)},e6=function(t,n,a){if(a.throwOnError||!(t instanceof Oe))throw t;var l=De(["katex-error"],[new Jr(n)]);return l.setAttribute("title",t.toString()),l.setAttribute("style","color:"+a.errorColor),l},Uf=function(t,n){var a=new z1(n);try{var l=V1(t,a);return jT(l,t,a)}catch(u){return e6(u,t,a)}},t6=function(t,n){var a=new z1(n);try{var l=V1(t,a);return CT(l,t,a)}catch(u){return e6(u,t,a)}},n6="0.16.47",r6={Span:yu,Anchor:Af,SymbolNode:Jr,SvgNode:Zi,PathNode:Zl,LineNode:Op},Xp={version:n6,render:Y1,renderToString:Q5,ParseError:Oe,SETTINGS_SCHEMA:ff,__parse:J5,__renderToDomTree:Uf,__renderToHTMLTree:t6,__setFontMetrics:o5,__defineSymbol:w,__defineFunction:Ye,__defineMacro:B,__domTree:r6};const yR=Object.freeze(Object.defineProperty({__proto__:null,ParseError:Oe,SETTINGS_SCHEMA:ff,__defineFunction:Ye,__defineMacro:B,__defineSymbol:w,__domTree:r6,__parse:J5,__renderToDomTree:Uf,__renderToHTMLTree:t6,__setFontMetrics:o5,default:Xp,get render(){return Y1},renderToString:Q5,version:n6},Symbol.toStringTag,{value:"Module"})),yA={};function vA(e){const t=this,n=e||yA,a=t.data(),l=a.micromarkExtensions||(a.micromarkExtensions=[]),u=a.fromMarkdownExtensions||(a.fromMarkdownExtensions=[]),c=a.toMarkdownExtensions||(a.toMarkdownExtensions=[]);l.push(CC(n)),u.push(yC()),c.push(vC(n))}function xA(e){return e.replace(/(^ {0,3}(`{3,}|~{3,})[^\n]*\n[\s\S]*?(?:^ {0,3}\2[^\n]*(?:\n|$)|(?![\s\S])))|(`+)([^`]|(?!\3)`)*?\3|\\\\|\\\(([\s\S]*?)\\\)|\\\[([\s\S]*?)\\\]/gm,(t,n,a,l,u,c,f)=>n||l||t==="\\\\"?t:c!==void 0?`$${c}$`:f!==void 0?`
|
|
339
|
-
|
|
340
|
-
$$
|
|
341
|
-
${f.trim()}
|
|
342
|
-
$$
|
|
343
|
-
|
|
344
|
-
`:t)}const Lv=/[#.]/g;function bA(e,t){const n=e||"",a={};let l=0,u,c;for(;l<n.length;){Lv.lastIndex=l;const f=Lv.exec(n),h=n.slice(l,f?f.index:n.length);h&&(u?u==="#"?a.id=h:Array.isArray(a.className)?a.className.push(h):a.className=[h]:c=h,l+=h.length),f&&(u=f[0],l++)}return{type:"element",tagName:c||t||"div",properties:a,children:[]}}function a6(e,t,n){const a=n?jA(n):void 0;function l(u,c,...f){let h;if(u==null){h={type:"root",children:[]};const m=c;f.unshift(m)}else{h=bA(u,t);const m=h.tagName.toLowerCase(),p=a?a.get(m):void 0;if(h.tagName=p||m,wA(c))f.unshift(c);else for(const[y,k]of Object.entries(c))kA(e,h.properties,y,k)}for(const m of f)Zp(h.children,m);return h.type==="element"&&h.tagName==="template"&&(h.content={type:"root",children:h.children},h.children=[]),h}return l}function wA(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const a of n){const l=t[a];if(l&&typeof l=="object"){if(!Array.isArray(l))return!0;const u=l;for(const c of u)if(typeof c!="number"&&typeof c!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function kA(e,t,n,a){const l=nx(e,n);let u;if(a!=null){if(typeof a=="number"){if(Number.isNaN(a))return;u=a}else typeof a=="boolean"?u=a:typeof a=="string"?l.spaceSeparated?u=f2(a):l.commaSeparated?u=s2(a):l.commaOrSpaceSeparated?u=f2(s2(a).join(" ")):u=Bv(l,l.property,a):Array.isArray(a)?u=[...a]:u=l.property==="style"?SA(a):String(a);if(Array.isArray(u)){const c=[];for(const f of u)c.push(Bv(l,l.property,f));u=c}l.property==="className"&&Array.isArray(t.className)&&(u=t.className.concat(u)),t[l.property]=u}}function Zp(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)Zp(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Zp(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Bv(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Zc(n)===Zc(t)))return!0}return n}function SA(e){const t=[];for(const[n,a]of Object.entries(e))t.push([n,a].join(": "));return t.join("; ")}function jA(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const CA=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],TA=a6(rx,"div"),AA=a6(kf,"g",CA),ip={html:"http://www.w3.org/1999/xhtml",svg:"http://www.w3.org/2000/svg"};function EA(e,t){return i6(e,{})||{type:"root",children:[]}}function i6(e,t){const n=NA(e,t);return n&&t.afterTransform&&t.afterTransform(e,n),n}function NA(e,t){switch(e.nodeType){case 1:return RA(e,t);case 3:return DA(e);case 8:return zA(e);case 9:return qv(e,t);case 10:return MA();case 11:return qv(e,t);default:return}}function qv(e,t){return{type:"root",children:l6(e,t)}}function MA(){return{type:"doctype"}}function DA(e){return{type:"text",value:e.nodeValue||""}}function zA(e){return{type:"comment",value:e.nodeValue||""}}function RA(e,t){const n=e.namespaceURI,a=n===ip.svg?AA:TA,l=n===ip.html?e.tagName.toLowerCase():e.tagName,u=n===ip.html&&l==="template"?e.content:e,c=e.getAttributeNames(),f={};let h=-1;for(;++h<c.length;)f[c[h]]=e.getAttribute(c[h])||"";return a(l,f,l6(u,t))}function l6(e,t){const n=e.childNodes,a=[];let l=-1;for(;++l<n.length;){const u=i6(n[l],t);u!==void 0&&a.push(u)}return a}new DOMParser;function OA(e,t){const n=IA(e);return EA(n)}function IA(e){const t=document.createElement("template");return t.innerHTML=e,t.content}const Uv=(function(e,t,n){const a=s0(n);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]}),eo=(function(e){if(e==null)return BA;if(typeof e=="string")return LA(e);if(typeof e=="object")return _A(e);if(typeof e=="function")return W1(e);throw new Error("Expected function, string, or array as `test`")});function _A(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=eo(e[n]);return W1(a);function a(...l){let u=-1;for(;++u<t.length;)if(t[u].apply(this,l))return!0;return!1}}function LA(e){return W1(t);function t(n){return n.tagName===e}}function W1(e){return t;function t(n,a,l){return!!(qA(n)&&e.call(this,n,typeof a=="number"?a:void 0,l||void 0))}}function BA(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function qA(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const Hv=/\n/g,$v=/[\t ]+/g,Qp=eo("br"),Fv=eo(YA),UA=eo("p"),Pv=eo("tr"),HA=eo(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",VA,WA]),s6=eo(["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 $A(e,t){const n=t||{},a="children"in e?e.children:[],l=s6(e),u=c6(e,{whitespace:n.whitespace||"normal"}),c=[];(e.type==="text"||e.type==="comment")&&c.push(...u6(e,{breakBefore:!0,breakAfter:!0}));let f=-1;for(;++f<a.length;)c.push(...o6(a[f],e,{whitespace:u,breakBefore:f?void 0:l,breakAfter:f<a.length-1?Qp(a[f+1]):l}));const h=[];let m;for(f=-1;++f<c.length;){const p=c[f];typeof p=="number"?m!==void 0&&p>m&&(m=p):p&&(m!==void 0&&m>-1&&h.push(`
|
|
345
|
-
`.repeat(m)||" "),m=-1,h.push(p))}return h.join("")}function o6(e,t,n){return e.type==="element"?FA(e,t,n):e.type==="text"?n.whitespace==="normal"?u6(e,n):PA(e):[]}function FA(e,t,n){const a=c6(e,n),l=e.children||[];let u=-1,c=[];if(HA(e))return c;let f,h;for(Qp(e)||Pv(e)&&Uv(t,e,Pv)?h=`
|
|
346
|
-
`:UA(e)?(f=2,h=2):s6(e)&&(f=1,h=1);++u<l.length;)c=c.concat(o6(l[u],e,{whitespace:a,breakBefore:u?void 0:f,breakAfter:u<l.length-1?Qp(l[u+1]):h}));return Fv(e)&&Uv(t,e,Fv)&&c.push(" "),f&&c.unshift(f),h&&c.push(h),c}function u6(e,t){const n=String(e.value),a=[],l=[];let u=0;for(;u<=n.length;){Hv.lastIndex=u;const h=Hv.exec(n),m=h&&"index"in h?h.index:n.length;a.push(GA(n.slice(u,m).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),u===0?t.breakBefore:!0,m===n.length?t.breakAfter:!0)),u=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 PA(e){return[String(e.value)]}function GA(e,t,n){const a=[];let l=0,u;for(;l<e.length;){$v.lastIndex=l;const c=$v.exec(e);u=c?c.index:e.length,!l&&!u&&c&&!t&&a.push(""),l!==u&&a.push(e.slice(l,u)),l=c?u+c[0].length:u}return l!==u&&!n&&a.push(""),a.join(" ")}function c6(e,t){if(e.type==="element"){const n=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return n.wrap?"pre-wrap":"pre";case"td":case"th":return n.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}}return t.whitespace}function VA(e){return!!(e.properties||{}).hidden}function YA(e){return e.tagName==="td"||e.tagName==="th"}function WA(e){return e.tagName==="dialog"&&!(e.properties||{}).open}const KA={},XA=[];function ZA(e){const t=e||KA;return function(n,a){T1(n,"element",function(l,u){const c=Array.isArray(l.properties.className)?l.properties.className:XA,f=c.includes("language-math"),h=c.includes("math-display"),m=c.includes("math-inline");let p=h;if(!f&&!h&&!m)return;let y=u[u.length-1],k=l;if(l.tagName==="code"&&f&&y&&y.type==="element"&&y.tagName==="pre"&&(k=y,y=u[u.length-2],p=!0),!y)return;const x=$A(k,{whitespace:"pre"});let C;try{C=Xp.renderToString(x,{...t,displayMode:p,throwOnError:!0})}catch(I){const _=I,N=_.name.toLowerCase();a.message("Could not render math with KaTeX",{ancestors:[...u,l],cause:_,place:l.position,ruleId:N,source:"rehype-katex"});try{C=Xp.renderToString(x,{...t,displayMode:p,strict:"ignore",throwOnError:!1})}catch{C=[{type:"element",tagName:"span",properties:{className:["katex-error"],style:"color:"+(t.errorColor||"#cc0000"),title:String(I)},children:[{type:"text",value:x}]}]}}typeof C=="string"&&(C=OA(C).children);const M=y.children.indexOf(k);return y.children.splice(M,1,...C),Mx})}}function QA(e,t,n){return e?t?n==="delta"?e+t:t.startsWith(e)?t:e:e:t}function JA(e,t,n){if(e.kind||e.status!=="pending")return e.status;const a=[...t].reverse().find(l=>l.nodeId===e.id);return a?a.status==="completed"?n.some(l=>l.executionId===a.id&&l.type==="result")?"delivered":"awaiting_review":["accepted","running","failed","cancelled"].includes(a.status)?a.status:e.status:e.status}function eE(e,t){var l;if(!["input:cotask_report","input:cotask_execution"].includes(e.subtype))return null;const n=Date.parse(e.createdAt);return((l=t.filter(u=>(!e.turnId||e.turnId===u.id)&&Date.parse(u.startedAt)<n&&(!u.finishedAt||n<=Date.parse(u.finishedAt))).sort((u,c)=>Date.parse(c.startedAt)-Date.parse(u.startedAt))[0])==null?void 0:l.id)??null}function tE(e){const t=e.phase??e.status,n=e.nodeActivity;if(!n||["draft","finished","completed","cancelled"].includes(t))return[{status:t}];const a=[];return t!=="running"&&a.push({status:t}),n.blocked>0&&a.push({status:"blocked",count:n.blocked}),n.waiting>0&&a.push({status:"waiting",count:n.waiting}),t==="running"&&(n.running>0||a.length===0)&&a.push({status:"running"}),a}const n0=224,Wi=76,Gv=e=>`${e.x},${e.y}`,lp=(e,t)=>Math.hypot(e.x-t.x,e.y-t.y),nE=(e,t)=>({x:(e.x+t.x)/2,y:(e.y+t.y)/2});function Jp(e,t,n=0){const a=Math.min(...e.map(p=>p.x)),l=Math.max(...e.map(p=>p.x)),u=Math.min(...e.map(p=>p.y)),c=Math.max(...e.map(p=>p.y));if(l<t.x-4||a>t.x+n0+4||c<t.y-4||u>t.y+(t.height??Wi)+4)return!1;if(n>=16||Math.max(l-a,c-u)<.25)return!0;const f=[e[0]],h=[e[e.length-1]];let m=e;for(;m.length>1;)m=m.slice(1).map((p,y)=>nE(m[y],p)),f.push(m[0]),h.unshift(m[m.length-1]);return Jp(f,t,n+1)||Jp(h,t,n+1)}function Vv(e,t){return e.every(n=>t.every(a=>!Jp(n,a)))}function rE(e,t){const n=[];let a=e[0];const l=(u,c,f)=>{const h=f/lp(u,c);return{x:u.x+(c.x-u.x)*h,y:u.y+(c.y-u.y)*h}};for(let u=1;u<e.length-1;u++){const c=e[u],f=e[u-1],h=e[u+1],m=Math.min(t,lp(c,f)/2,lp(c,h)/2);if(m<.001){n.push([a,c]),a=c;continue}const p=l(c,f,m),y=l(c,h,m);n.push([a,p],[p,c,y]),a=y}return n.push([a,e[e.length-1]]),n}function Yv(e){return`M ${Gv(e[0][0])} `+e.map(t=>`${t.length===4?"C":t.length===3?"Q":"L"} ${t.slice(1).map(Gv).join(" ")}`).join(" ")}function d6(e,t){const n=e[0],a=e[e.length-1],l=(n.y+a.y)/2,u=[[n,{x:n.x,y:l},{x:a.x,y:l},a]];if(a.y>n.y&&Vv(u,t))return{path:Yv(u),segments:u};for(const c of[64,40,24,12,6,2,0]){const f=rE(e,c);if(Vv(f,t))return{path:Yv(f),segments:f}}throw new Error("No unobstructed CoTask route")}function aE(e){return JSON.stringify(e.map(t=>({id:t.id,dependencies:[...t.dependencies].sort(),height:t.height??Wi})).sort((t,n)=>t.id.localeCompare(n.id)))}function f6(e){const t=new Map,n=new Map,a=new Map(e.map(x=>[x.id,x])),l=[];for(;a.size;){const x=[...a.values()].filter(M=>M.dependencies.every(I=>n.has(I)||!a.has(I))),C=x.length?x:[...a.values()];l.push(C);for(const M of C)a.delete(M.id),n.set(M.id,l.length-1)}const u=Math.max(1,...l.map(x=>x.length))*296-24,c=[];let f=24;l.forEach(x=>{x.forEach((M,I)=>t.set(M.id,{x:(u-(x.length*296-72))/2+I*296,y:f}));const C=f+Math.max(Wi,...x.map(M=>M.height??Wi));c.push(C),f=C+80});const h=new Map(e.map(x=>[x.id,x.height??Wi])),m=[...t].map(([x,C])=>({id:x,...C,height:h.get(x)})),p=[],y=[];let k=u;for(const x of e)for(const C of x.dependencies){const M=t.get(C),I=t.get(x.id);if(!M||!I)continue;const _={x:M.x+n0/2,y:M.y+(h.get(C)??Wi)},N={x:I.x+n0/2,y:I.y};k+=18;const q=c[n.get(C)]+25,R=[_,{x:_.x,y:q},{x:k,y:q},{x:k,y:N.y-25},{x:N.x,y:N.y-25},N],X=m.filter(P=>P.id!==C&&P.id!==x.id);try{p.push({source:C,target:x.id,path:d6(R,X).path})}catch{y.push({source:C,target:x.id})}}return{positions:t,edges:p,failedEdges:y,width:k+48,height:Math.max(124,f-80+24)}}async function iE(e){var m;if(!e.length)return f6(e);const{default:t}=await ln(async()=>{const{default:p}=await import("./elk.bundled-BP0w9QVX.js").then(y=>y.e);return{default:p}},[],import.meta.url),n=new Set(e.map(p=>p.id)),a=e.flatMap(p=>p.dependencies.filter(y=>n.has(y)).map(y=>({source:y,target:p.id}))),u=await new t().layout({id:"root",layoutOptions:{"elk.algorithm":"layered","elk.direction":"DOWN","elk.edgeRouting":"ORTHOGONAL","elk.spacing.nodeNode":"40","elk.layered.spacing.nodeNodeBetweenLayers":"80","elk.layered.spacing.edgeNodeBetweenLayers":"18","elk.padding":"[top=24,left=24,bottom=24,right=24]","elk.layered.crossingMinimization.strategy":"LAYER_SWEEP","elk.layered.nodePlacement.strategy":"NETWORK_SIMPLEX"},children:e.map(p=>({id:p.id,width:n0,height:p.height??Wi})),edges:a.map((p,y)=>({id:`edge-${y}`,sources:[p.source],targets:[p.target]}))}),c=(u.children??[]).map(p=>({id:p.id,x:p.x??0,y:p.y??0,height:p.height})),f=new Map((m=u.edges)==null?void 0:m.map(p=>[p.id,p])),h=a.map((p,y)=>{var C,M;const k=(M=(C=f.get(`edge-${y}`))==null?void 0:C.sections)==null?void 0:M[0];if(!k)throw new Error("Missing CoTask dependency route");const x=[k.startPoint,...k.bendPoints??[],k.endPoint];return{...p,path:d6(x,c.filter(I=>I.id!==p.source&&I.id!==p.target)).path}});return{positions:new Map(c.map(p=>[p.id,p])),edges:h,width:u.width??320,height:u.height??196}}const Wv={pending:"待开始",completed:"已确认完成",blocked:"已阻塞",cancelled:"已取消",running:"执行中",accepted:"等待执行",failed:"执行失败",delivered:"已交付,待确认",awaiting_review:"执行已结束,待确认"};function lE({nodes:e,members:t,executions:n,reports:a,selectedId:l,onSelect:u,onDismiss:c,detail:f,finalCheckpointId:h}){var Ce,U;const m=e.some(E=>E.kind!==void 0),p=(E,Y)=>E.kind==="checkpoint"?{pending:"等待前置完成",waiting:"等待 Owner 继续",completed:"已继续"}[Y]??Wv[Y]??Y:E.kind&&Y==="completed"?"已完成":Wv[Y]??Y,[y,k]=A.useState({}),x=A.useRef(new Map);A.useEffect(()=>{const E=new ResizeObserver(()=>{k(Y=>{const O=Object.fromEntries([...x.current].map(([ee,ke])=>[ee,ke.offsetHeight]));return Object.keys(O).length===Object.keys(Y).length&&Object.entries(O).every(([ee,ke])=>Y[ee]===ke)?Y:O})});return x.current.forEach(Y=>E.observe(Y)),()=>E.disconnect()},[e.map(E=>E.id).join("\0")]);const C=aE(e.map(E=>({...E,height:y[E.id]??Wi}))),M=A.useMemo(()=>f6(JSON.parse(C)),[C]),[I,_]=A.useState(null),[N,q]=A.useState(!1),R=(I==null?void 0:I.topology)===C?I.graph:M;A.useEffect(()=>{let E=!0;return q(!1),iE(JSON.parse(C)).then(Y=>{E&&_({topology:C,graph:Y})}).catch(()=>{E&&q(!0)}),()=>{E=!1}},[C]);const X=A.useRef(null),[P,H]=A.useState({width:900,height:560}),[J,ne]=A.useState(1),[F,te]=A.useState(!1),se=A.useRef(!1),ve=A.useRef(null),be=A.useId().replace(/:/g,"");A.useEffect(()=>{if(!X.current)return;const E=new ResizeObserver(([Y])=>H({width:Y.contentRect.width,height:Y.contentRect.height}));return E.observe(X.current),()=>E.disconnect()},[]);const he=Math.min(1,Math.max(.15,Math.min((P.width-32)/R.width,(P.height-32)/R.height))),Z=J??he,me=new Map(e.map(E=>[E.id,JA(E,n,a)])),V=e.find(E=>E.id===l);return s.jsxs("section",{className:"cotask-graph","aria-label":"Task dependency graph",children:[s.jsxs("div",{className:"cotask-graph-toolbar",children:[s.jsxs("span",{children:["Arrows show dependencies ",s.jsxs("span",{className:"cotask-graph-count",children:["· ",e.length," nodes / ",R.edges.length+(((Ce=R.failedEdges)==null?void 0:Ce.length)??0)," dependencies"]}),N&&s.jsx("small",{role:"status",children:" · 自动布局暂不可用,已显示基础布局"})]}),s.jsxs("div",{children:[s.jsx("button",{"aria-label":"Zoom out",onClick:()=>ne(Math.max(.15,Z-.15)),children:"−"}),s.jsxs("span",{children:[Math.round(Z*100),"%"]}),s.jsx("button",{"aria-label":"Zoom in",onClick:()=>ne(Math.min(2,Z+.15)),children:"+"}),s.jsx("button",{onClick:()=>ne(1),children:"100%"}),s.jsx("button",{onClick:()=>ne(null),children:"Fit to view"})]})]}),!!((U=R.failedEdges)!=null&&U.length)&&s.jsxs("details",{className:"cotask-warning",role:"status",children:[s.jsxs("summary",{children:[R.failedEdges.length," 条依赖连线暂未能绘制,节点仍可查看"]}),s.jsx("ul",{children:R.failedEdges.map(E=>{var Y,O;return s.jsxs("li",{children:[((Y=e.find(ee=>ee.id===E.source))==null?void 0:Y.name)??E.source," → ",((O=e.find(ee=>ee.id===E.target))==null?void 0:O.name)??E.target]},`${E.source}:${E.target}`)})})]}),s.jsxs("div",{className:"cotask-graph-stage",children:[s.jsx("div",{className:`cotask-graph-viewport${F?" dragging":""}`,ref:X,"data-layout":(I==null?void 0:I.topology)===C?"adaptive":"fallback",onClickCapture:E=>{se.current&&(E.preventDefault(),E.stopPropagation())},onClick:E=>{E.target.closest("button")||c()},onPointerDown:E=>{if(E.button!==0||E.target.closest(".cotask-node-text"))return;se.current=!1;const Y=E.currentTarget;ve.current={id:E.pointerId,x:E.clientX,y:E.clientY,left:Y.scrollLeft,top:Y.scrollTop,moved:!1}},onPointerMove:E=>{if(!ve.current||ve.current.id!==E.pointerId)return;const Y=E.clientX-ve.current.x,O=E.clientY-ve.current.y;Math.abs(Y)+Math.abs(O)>4&&(ve.current.moved=!0,te(!0),E.currentTarget.setPointerCapture(E.pointerId),E.preventDefault()),ve.current.moved&&(E.currentTarget.scrollLeft=ve.current.left-Y,E.currentTarget.scrollTop=ve.current.top-O)},onPointerUp:E=>{ve.current&&(se.current=ve.current.moved,ve.current=null,te(!1),E.currentTarget.hasPointerCapture(E.pointerId)&&E.currentTarget.releasePointerCapture(E.pointerId),window.setTimeout(()=>{se.current=!1},0))},onPointerCancel:()=>{ve.current=null,te(!1)},onLostPointerCapture:()=>{ve.current=null,te(!1)},children:s.jsx("div",{className:"cotask-graph-scroll",style:{width:Math.max(P.width,R.width*Z),height:Math.max(P.height,R.height*Z)},children:s.jsxs("div",{className:"cotask-graph-canvas",style:{width:R.width,height:R.height,transform:`scale(${Z})`,left:0,top:0},children:[s.jsxs("svg",{width:R.width,height:R.height,className:"cotask-graph-edges","aria-hidden":"true",children:[s.jsx("defs",{children:["default","complete","selected"].map(E=>s.jsx("marker",{id:`${be}-${E}`,markerWidth:"8",markerHeight:"8",refX:"7",refY:"4",orient:"auto",markerUnits:"userSpaceOnUse",children:s.jsx("path",{d:"M 1 1 L 7 4 L 1 7 Z",className:`cotask-arrow-${E}`})},E))}),R.edges.map(E=>{const Y=l&&[E.source,E.target].includes(l)?"selected":me.get(E.source)==="completed"?"complete":"default";return s.jsx("path",{"data-source":E.source,"data-target":E.target,d:E.path,className:`cotask-edge ${Y}`,markerEnd:`url(#${be}-${Y})`},`${E.source}:${E.target}`)})]}),e.map(E=>{var ee;const Y=R.positions.get(E.id),O=me.get(E.id);return s.jsxs("button",{ref:ke=>{ke?x.current.set(E.id,ke):x.current.delete(E.id)},className:`cotask-graph-node ${O}${E.kind==="checkpoint"?" checkpoint":""}${l===E.id?" selected":""}`,style:{left:Y.x,top:Y.y,width:n0,minHeight:Wi},"aria-pressed":l===E.id,onClick:()=>u(E),title:E.dependencies.length?`Depends on: ${E.dependencies.map(ke=>{var Ae;return((Ae=e.find(He=>He.id===ke))==null?void 0:Ae.name)??ke}).join(", ")}`:"No dependencies",children:[E.dependencies.length>0&&s.jsx("i",{className:"cotask-node-port input"}),s.jsx("strong",{className:"cotask-node-text",children:E.name}),s.jsxs("span",{className:"cotask-graph-node-footer",children:[s.jsx("span",{className:"cotask-graph-node-member cotask-node-text",children:E.kind==="checkpoint"?s.jsx(s.Fragment,{children:s.jsxs("span",{className:"cotask-checkpoint-type",children:[s.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12","aria-hidden":"true",children:s.jsx("path",{d:"M6 1 11 6 6 11 1 6Z",fill:"none",stroke:"currentColor",strokeWidth:"1.5"})}),E.id===h?"最终检查点":"检查点"]})}):((ee=t.find(ke=>ke.id===E.memberId))==null?void 0:ee.name)??E.memberId}),s.jsxs("span",{className:"cotask-graph-node-status",children:[s.jsx("i",{}),s.jsx("span",{className:"cotask-node-text",children:p(E,O)})]})]}),R.edges.some(ke=>ke.source===E.id)&&s.jsx("i",{className:"cotask-node-port output"})]},E.id)})]})})}),V&&s.jsxs("aside",{className:"cotask-node-drawer","aria-label":`Node details: ${V.name}`,onKeyDown:E=>{E.key==="Escape"&&(E.stopPropagation(),c())},children:[s.jsxs("header",{children:[s.jsx("strong",{children:V.name}),s.jsx("button",{onClick:c,"aria-label":"Close node details",children:"关闭"})]}),s.jsx("div",{className:"cotask-node-drawer-content",children:f},V.id)]})]}),s.jsxs("div",{className:"cotask-graph-legend",children:[s.jsxs("span",{children:[s.jsx("i",{className:"running"}),"执行中"]}),s.jsxs("span",{children:[s.jsx("i",{className:"delivered"}),m?"检查点等待继续":"待 Owner 确认"]}),s.jsxs("span",{children:[s.jsx("i",{className:"completed"}),m?"已完成 / 已继续":"已确认完成"]}),s.jsxs("span",{children:[s.jsx("i",{className:"pending"}),"待开始"]}),s.jsx("span",{children:m?"执行节点报告结果并正常结束后自动完成;检查点由 Owner 检查后继续":"点击节点查看上下文与报告;成员执行结束不等于节点已确认完成"})]})]})}const h6=e=>({draft:"草稿",running:"运行中",pausing:"正在暂停",paused:"已暂停",waiting:"等待继续",finished:"已结束",pending:"Pending",completed:"Completed",blocked:"Blocked",cancelled:"Cancelled",accepted:"Accepted",failed:"Failed"})[e]??e;function sp({task:e}){const t=tE(e),n={running:["active","进行中","M8 5l10 7-10 7Z"],finished:["done","已结束","m6 12 4 4 8-8"],completed:["done","已结束","m6 12 4 4 8-8"],paused:["attention","已暂停","M9 7v10M15 7v10"],pausing:["attention","正在暂停","M9 7v10M15 7v10"],waiting:["attention","等待检查","M12 6v6l4 2"],blocked:["danger","存在阻塞","M12 6v7m0 3v1"],failed:["danger","失败","M12 6v7m0 3v1"],cancelled:["neutral","已取消","m8 8 8 8m0-8-8 8"],draft:["neutral","草稿","M8 8h8M8 12h8M8 16h5"]};return s.jsx("span",{className:"cotask-task-statuses",children:t.map(({status:a,count:l})=>{const[u,c,f]=n[a]??["neutral",h6(a),"M12 6v6l4 2"];return s.jsxs("span",{className:`cotask-task-status ${u}`,children:[s.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[s.jsx("circle",{cx:"12",cy:"12",r:"10"}),s.jsx("path",{d:f})]}),c,l!=null&&` · ${l}`]},a)})})}function sE({ownerId:e,ownerName:t,request:n,onExpanded:a,renderMember:l,renderMarkdown:u}){const[c,f]=A.useState([]),[h,m]=A.useState(null),[p,y]=A.useState(null),[k,x]=A.useState("graph"),[C,M]=A.useState(null),[I,_]=A.useState(null),[N,q]=A.useState(null),[R,X]=A.useState([]),[P,H]=A.useState(null),[J,ne]=A.useState(null),[F,te]=A.useState([]),[se,ve]=A.useState(""),[be,he]=A.useState(!1),Z=A.useRef(null),me=A.useRef(0),V=A.useRef("");V.current=`${h}:${p==null?void 0:p.task.revision}`;const Ce=A.useRef(C);Ce.current=C;const U=`conversations/${encodeURIComponent(e)}/cotasks`;A.useEffect(()=>{let oe=!0;const Me=async()=>{try{const Ze=await n(U);oe&&f(Ze.tasks)}catch(Ze){oe&&ve(String(Ze))}};Me();const ze=window.setInterval(()=>void Me(),5e3);return()=>{oe=!1,window.clearInterval(ze)}},[U,n]),A.useEffect(()=>(a(h!==null),()=>a(!1)),[h,a]),A.useEffect(()=>{if(!h)return;let oe=!0;const Me=async()=>{try{const Ze=await n(`${U}/${encodeURIComponent(h)}`);if(oe&&(y(Ze),ve("")),k==="operations"){const Ut=await n(`${U}/${encodeURIComponent(h)}`,{operations:!0});oe&&te(Ut.operations)}}catch(Ze){oe&&ve(String(Ze))}};Me();const ze=window.setInterval(()=>void Me(),3e3);return()=>{oe=!1,window.clearInterval(ze)}},[h,U,n,k]),A.useEffect(()=>{var oe;h&&((oe=Z.current)==null||oe.focus())},[h]),A.useEffect(()=>{me.current++,H(null),ne(null),X([])},[p==null?void 0:p.task.revision]);const E=JSON.stringify(p==null?void 0:p.reports.map(oe=>oe.id)),Y=JSON.stringify(p==null?void 0:p.nodes.map(oe=>[oe.id,oe.status,oe.reason]));A.useEffect(()=>{if(!h||!I||!p)return;let oe=!0;if(!p.nodes.some(Me=>Me.id===I)){_(null),q(null);return}return n(`${U}/${encodeURIComponent(h)}`,{nodeIds:[I]}).then(Me=>{oe&&q(Me.nodes[0]??null)}).catch(Me=>{oe&&ve(String(Me))}),()=>{oe=!1}},[h,I,p==null?void 0:p.task.revision,E,Y,U,n]);const O=oe=>{_(null),me.current++,H(null),ne(null),te([]),ve(""),y(null),m(oe),x("graph"),M(null),q(null),X([])},ee=()=>{me.current++,_(null),q(null),X([])},ke=()=>{me.current++,m(null)},Ae=c.find(oe=>oe.status==="running")??c.find(oe=>oe.status==="draft")??c[0];if(!h)return Ae?s.jsxs("div",{className:"cotask-launcher",children:[s.jsxs("button",{className:"cotask-launch-primary",onClick:()=>O(Ae.id),children:[s.jsxs("span",{className:"cotask-launch-heading",children:[s.jsx("span",{children:"CoTask"}),s.jsx(sp,{task:Ae})]}),s.jsx("strong",{children:Ae.name}),s.jsxs("small",{children:["已完成 ",Ae.completedNodeCount??0," / ",Ae.nodeCount," 节点 ↗"]})]}),c.length>1&&s.jsxs("details",{className:"cotask-task-list",children:[s.jsxs("summary",{children:["其他任务(",c.length-1,")"]}),c.filter(oe=>oe.id!==Ae.id).map(oe=>s.jsxs("button",{onClick:()=>O(oe.id),children:[s.jsx("strong",{children:oe.name}),s.jsx(sp,{task:oe})]},oe.id))]})]}):null;const He=oe=>{I!==oe.id&&(me.current++,ve(""),q(null),X([]),_(oe.id))},it=async oe=>{const Me=++me.current;try{const ze=await n(`${U}/${h}`,{reportIds:[oe.id]});Me===me.current&&X(ze.reports)}catch(ze){ve(String(ze))}},pe=p==null?void 0:p.bindings.find(oe=>oe.memberId===C),Pe=p==null?void 0:p.members.find(oe=>oe.id===C),Ke=(oe,Me=e)=>s.jsx("div",{className:"cotask-markdown",children:u(oe??"",Me)});return s.jsx("div",{className:"context-panel-overlay settings-overlay cotask-overlay",children:s.jsxs("section",{className:"context-panel settings-panel cotask-frame",role:"dialog","aria-modal":"true","aria-label":"CoTask",tabIndex:-1,ref:Z,onKeyDown:oe=>{var Me;if(oe.stopPropagation(),oe.key==="Escape"&&(oe.preventDefault(),k==="graph"&&I?ee():ke()),oe.key==="Tab"){const ze=(Me=Z.current)==null?void 0:Me.querySelectorAll('button:not(:disabled),select,input,a[href],textarea,[tabindex="0"]');if(!(ze!=null&&ze.length))return;const Ze=ze[0],Ut=ze[ze.length-1];oe.shiftKey&&(document.activeElement===Ze||document.activeElement===Z.current)?(oe.preventDefault(),Ut.focus()):!oe.shiftKey&&document.activeElement===Ut&&(oe.preventDefault(),Ze.focus())}},children:[s.jsxs("header",{className:"cotask-header settings-panel-header",children:[s.jsxs("div",{children:[s.jsxs("p",{children:["CoTask · ",t]}),s.jsx("h1",{children:(p==null?void 0:p.task.name)??"Loading task…"})]}),p&&s.jsx(sp,{task:p.task}),s.jsxs("button",{className:"cotask-back",onClick:ke,title:`返回 ${t}`,children:[s.jsx("span",{"aria-hidden":"true",children:"← "}),"返回"]}),(p==null?void 0:p.task.status)==="draft"&&s.jsx("button",{className:"cotask-close-draft cotask-back",disabled:be,onClick:async()=>{if(!window.confirm(`Close draft “${p.task.name}”? It will not run. The task history will be retained.`))return;const oe=h,Me=V.current;he(!0),ve("");try{const ze=await n(`${U}/${encodeURIComponent(oe)}/close-draft`,{expectedRevision:p.task.revision},"POST");f(Ze=>Ze.map(Ut=>Ut.id===oe?ze.task:Ut)),V.current===Me&&y(Ze=>Ze&&{...Ze,task:ze.task})}catch(ze){V.current===Me&&ve(String(ze))}finally{he(!1)}},children:be?"Closing…":"Close draft"})]}),s.jsxs("aside",{className:"cotask-nav",children:[s.jsxs("section",{className:"workspace-group","aria-label":"Task navigation",children:[s.jsx("h2",{className:"cotask-nav-group-title",children:"Task"}),s.jsx("nav",{className:"workspace-group-items",children:[["graph","Task graph"],["operations","Activity"],["settings","Settings"]].map(([oe,Me])=>s.jsx("button",{className:`session-item${k===oe?" active":""}`,"aria-current":k===oe?"page":void 0,onClick:()=>{x(oe),M(null)},children:s.jsx("span",{className:"session-title",children:Me})},oe))})]}),s.jsxs("section",{className:"workspace-group","aria-label":"Task members",children:[s.jsx("h2",{className:"cotask-nav-group-title",children:"Members"}),s.jsx("div",{className:"workspace-group-items cotask-member-list",children:p==null?void 0:p.members.map(oe=>{const Me=p.executions.some(Ze=>Ze.memberId===oe.id&&["accepted","running"].includes(Ze.status)),ze=Me?"Running":p.bindings.some(Ze=>Ze.memberId===oe.id&&Ze.workspaceId)?"Idle":"Not created";return s.jsx("button",{className:`session-item${k==="member"&&C===oe.id?" active":""}`,title:`${oe.name} · ${ze}`,"aria-label":`${oe.name} · ${ze}`,"aria-current":k==="member"&&C===oe.id?"page":void 0,onClick:()=>{M(oe.id),x("member")},children:s.jsxs("span",{className:"session-heading",children:[s.jsx("span",{className:`session-status${Me?" running":""}`,"aria-hidden":"true"}),s.jsx("span",{className:"session-title",children:oe.name})]})},oe.id)})})]}),s.jsxs("button",{className:"cotask-return",onClick:ke,children:["← Back to ",t]})]}),s.jsxs("section",{className:"cotask-main",children:[se&&s.jsx("div",{className:"cotask-error",role:"alert",children:se}),s.jsx("div",{className:`cotask-body${k==="graph"?" cotask-graph-body":k==="member"?" cotask-member-body":""}`,children:p?s.jsxs(s.Fragment,{children:[p.warnings.length>0&&s.jsx("div",{className:"cotask-warning",children:p.warnings.map((oe,Me)=>s.jsxs("p",{children:[oe.id?`${oe.id}: `:"Common context: ","Context may exceed the injection limit. (estimated ",oe.estimatedTokens," tokens)"]},Me))}),k==="graph"&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"cotask-section-heading",children:[s.jsx("h2",{children:"Task graph"}),s.jsxs("span",{children:[p.nodes.filter(oe=>oe.status==="completed").length," / ",p.nodes.length," Completed"]})]}),!p.nodes.length&&s.jsx("p",{children:"No nodes yet. Discuss the plan with the initiating agent to define the graph."}),s.jsxs("details",{className:"cotask-context",onToggle:oe=>{if(oe.currentTarget.open&&P===null){const Me=V.current;n(`${U}/${h}`,{view:"definition"}).then(ze=>{V.current===Me&&H(ze.definition.commonContext)}).catch(ze=>{V.current===Me&&ve(String(ze))})}},children:[s.jsx("summary",{children:"Common context"}),P===null?s.jsx("p",{children:"Loading…"}):Ke(P)]},p.task.revision),p.nodes.length>0&&s.jsx(lE,{finalCheckpointId:p.finalCheckpointId,nodes:p.nodes,members:p.members,executions:p.executions,reports:p.reports,selectedId:I??void 0,onSelect:oe=>void He(oe),onDismiss:ee,detail:(N==null?void 0:N.definition.id)===I?s.jsxs("div",{className:"cotask-node-detail",children:[N.runtime&&s.jsxs("p",{children:[h6(N.runtime.status),N.runtime.reason&&s.jsxs(s.Fragment,{children:[" · ",N.runtime.reason]})]}),Ke(N.definition.context),s.jsx("h4",{children:N.definition.kind==="checkpoint"?"检查点":"Reports"}),N.reports.length?N.reports.map(oe=>s.jsxs("button",{onClick:()=>void it(oe),children:[oe.type," · ",oe.summary]},oe.id)):s.jsx("p",{children:N.definition.kind==="checkpoint"?"此节点不启动成员执行,也不生成成员报告。Owner 按上下文检查交付内容后继续。":"No reports yet."}),R.map(oe=>{var Me;return s.jsxs("article",{children:[s.jsx("h4",{children:oe.summary}),Ke(oe.content,((Me=p.executions.find(ze=>ze.id===oe.executionId))==null?void 0:Me.workspaceId)??"")]},oe.id)})]}):s.jsx("p",{children:"Loading node…"})}),p.task.conclusion&&s.jsxs("details",{className:"cotask-conclusion",children:[s.jsx("summary",{children:"Conclusion"}),Ke(p.task.conclusion)]})]}),k==="operations"&&s.jsxs(s.Fragment,{children:[s.jsx("h2",{children:"Activity"}),s.jsx("p",{children:"Changes are saved immediately and retained if a turn fails."}),F.length?F.map((oe,Me)=>s.jsxs("details",{className:"cotask-operation",children:[s.jsxs("summary",{children:[String(oe.action)," · ",String(oe.status)," · Turn ",String(oe.turnStatus)]}),s.jsx("pre",{children:JSON.stringify(oe,null,2)})]},Me)):s.jsx("p",{children:"No activity yet."})]}),k==="settings"&&s.jsx(oE,{task:p.task,path:`${U}/${h}/settings`,request:n,onSaved:oe=>y({...p,task:oe})},h),k==="member"&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"cotask-section-heading",children:[s.jsx("h2",{children:Pe==null?void 0:Pe.name}),s.jsx("span",{children:"CoTask member"})]}),s.jsxs("details",{className:"cotask-context",onToggle:oe=>{if(oe.currentTarget.open&&C&&(J==null?void 0:J.id)!==C){const Me=C,ze=V.current;n(`${U}/${h}`,{memberIds:[Me]}).then(Ze=>{var Ut;V.current===ze&&Ce.current===Me&&ne({id:Me,context:((Ut=Ze.members[0])==null?void 0:Ut.context)??""})}).catch(Ze=>{V.current===ze&&Ce.current===Me&&ve(String(Ze))})}},children:[s.jsx("summary",{children:"Member context"}),(J==null?void 0:J.id)===C?Ke(J.context):s.jsx("p",{children:"Loading…"})]},`${C}:${p.task.revision}`),pe!=null&&pe.workspaceId?l(pe.workspaceId):s.jsx("p",{children:p.executions.some(oe=>oe.memberId===C)?"This member instance was removed. Execution history is retained.":p.task.executionMode==="self_driving"?"首次符合执行条件时,平台自动创建此成员实例。":"This member will be created when its first node is driven."})]})]}):s.jsx("p",{children:"Loading task…"})})]})]})})}function oE({task:e,path:t,request:n,onSaved:a}){var N,q;const[l,u]=A.useState({...e.runtimeSettings,mode:e.runtimeSettings.mode??"custom",fastMode:e.runtimeSettings.fastMode??!1}),[c,f]=A.useState(e.revision),[h,m]=A.useState([]),[p,y]=A.useState([]),[k,x]=A.useState(!1),[C,M]=A.useState("");A.useEffect(()=>{let R=!0;return Promise.all([n("settings/runtime/models?refresh=0"),n("settings/model-providers/options")]).then(([X,P])=>{R&&(m(X.models),y(P.channels))}).catch(X=>{R&&M(String(X))}),()=>{R=!1}},[n]);const I=h.find(R=>R.model===l.model||R.id===l.model),_=((N=I==null?void 0:I.supportedReasoningEfforts)==null?void 0:N.map(R=>R.reasoningEffort))??["none","minimal","low","medium","high","xhigh","max"];return s.jsxs("section",{className:"cotask-settings",children:[s.jsx("h2",{children:"Settings"}),s.jsx("p",{children:"Settings apply to the whole CoTask and take effect on each member’s next turn."}),s.jsxs("label",{children:["配置模式",s.jsxs("select",{value:l.mode,onChange:R=>u({...l,mode:R.target.value}),children:[s.jsx("option",{value:"global",children:"沿用 CoTask 默认配置"}),s.jsx("option",{value:"custom",children:"CoTask 自定义配置"})]})]}),l.mode==="global"?s.jsx("p",{children:"每个成员在下一次 turn 读取最新 CoTask 默认模型、推理强度和倍速设置;正在运行的 turn 不受影响。"}):s.jsxs(s.Fragment,{children:[s.jsxs("label",{children:["Model source",s.jsxs("select",{value:l.modelSource.type==="codex"?"codex":l.modelSource.channelId,onChange:R=>u({...l,modelSource:R.target.value==="codex"?{type:"codex"}:{type:"custom",channelId:R.target.value}}),children:[s.jsx("option",{value:"codex",children:"Codex"}),l.modelSource.type==="custom"&&!p.some(R=>R.id===l.modelSource.channelId)&&s.jsx("option",{value:l.modelSource.channelId,children:"Current channel unavailable"}),p.map(R=>s.jsx("option",{value:R.id,children:R.name},R.id))]})]}),l.modelSource.type==="codex"?s.jsxs(s.Fragment,{children:[s.jsxs("label",{children:[s.jsx("span",{children:"1.5 倍速(Fast mode)"}),s.jsx("input",{type:"checkbox",checked:l.fastMode,onChange:R=>u({...l,fastMode:R.target.checked})})]}),s.jsxs("label",{children:["Model",s.jsxs("select",{value:l.model,onChange:R=>u({...l,model:R.target.value}),children:[s.jsx("option",{value:"",children:"Default model"}),l.model&&!h.some(R=>R.model===l.model)&&s.jsx("option",{children:l.model}),h.map(R=>s.jsx("option",{value:R.model,children:R.displayName},R.id))]})]}),s.jsxs("label",{children:["Reasoning effort",s.jsxs("select",{value:l.reasoningEffort,onChange:R=>u({...l,reasoningEffort:R.target.value}),children:[s.jsx("option",{value:"",children:"Default"}),l.reasoningEffort&&!_.includes(l.reasoningEffort)&&s.jsx("option",{children:l.reasoningEffort}),_.map(R=>s.jsx("option",{children:R},R))]})]})]}):s.jsxs("p",{children:["Channel model: ",((q=p.find(R=>R.id===l.modelSource.channelId))==null?void 0:q.model)??"Channel unavailable",". Codex reasoning effort does not apply to custom channels."]})]}),s.jsx("button",{disabled:k,onClick:async()=>{x(!0),M("");try{const R=await n(t,{expectedRevision:c,runtimeSettings:l},"PUT");f(R.task.revision),a(R.task),M("Saved. Changes take effect on the next turn.")}catch(R){M(`${String(R)}. If the task changed, reopen Settings before saving.`)}finally{x(!1)}},children:k?"Saving…":"Save settings"}),C&&s.jsx("p",{role:"status",children:C})]})}function uE(e,t=new Date){if(e==null||!Number.isInteger(e)||e<1||e>31)return null;const n=new Date(t.getTime()+480*60*1e3),a=n.getUTCFullYear(),l=n.getUTCMonth(),u=Date.UTC(a,l,n.getUTCDate()),c=h=>Date.UTC(a,l+h,Math.min(e,new Date(Date.UTC(a,l+h+1,0)).getUTCDate()));let f=c(0);return f<u&&(f=c(1)),{date:new Date(f).toISOString().slice(0,10),days:(f-u)/864e5}}function cE({content:e,streaming:t}){const[n,a]=A.useState(!1),l=A.useId();return s.jsxs("section",{className:`message reasoning${t?" is-streaming":""}${n?" is-expanded":""}`,children:[s.jsxs("button",{className:"reasoning-toggle",type:"button","aria-expanded":n,"aria-controls":l,onClick:()=>a(u=>!u),children:[s.jsx("span",{className:"reasoning-indicator","aria-hidden":"true"}),s.jsx("span",{children:t?"思考中":"思考过程"}),s.jsx("span",{className:"reasoning-action",children:n?"收起":"展开"}),s.jsx("svg",{className:"reasoning-chevron",width:"12",height:"12",viewBox:"0 0 12 12","aria-hidden":"true",children:s.jsx("path",{d:"m4 2 4 4-4 4",fill:"none",stroke:"currentColor",strokeWidth:"1.4"})})]}),s.jsx("div",{id:l,hidden:!n&&!t,className:`reasoning-content${n?"":" reasoning-preview"}`,children:s.jsx("div",{className:"message-body",children:n?e:e.slice(-600)})})]})}function dE(e,t){if(!t||typeof t!="object")return null;const{method:n,params:a}=t;if(!a)return null;if(n==="item/completed"){const m=a.item;if((m==null?void 0:m.type)!=="reasoning"||typeof m.id!="string")return null;const p=e.get(m.id)??{itemId:m.id,text:new Map,summary:new Map,completed:!1};for(const y of["text","summary"]){const k=m[y];Array.isArray(k)&&k.forEach((x,C)=>{typeof x=="string"&&x&&p[y].set(C,x)})}return p.completed=!0,e.set(m.id,p),p}const l=/^item\/reasoning\/(text|summaryText)(Delta|Snapshot)$/.exec(n??"");if(!l||typeof a.itemId!="string")return null;const u=l[1]==="text"?"text":"summary",c=a[u==="text"?"contentIndex":"summaryIndex"],f=a[l[2]==="Delta"?"delta":"text"];if(typeof c!="number"||!Number.isSafeInteger(c)||c<0||typeof f!="string")return null;const h=e.get(a.itemId)??{itemId:a.itemId,text:new Map,summary:new Map,completed:!1};return h[u].set(c,l[2]==="Snapshot"?f:(h[u].get(c)??"")+f),e.set(a.itemId,h),h}function fE(e){return[...e.text.size?e.text:e.summary].sort(([n],[a])=>n-a).map(([,n])=>n).join(`
|
|
347
|
-
|
|
348
|
-
`)}function hE({id:e,baseUrl:t,query:n}){var p;const[a,l]=A.useState(null),[u,c]=A.useState(!1),[f,h]=A.useState(!1),m=async()=>{c(!0),h(!1);try{const y=await n(e);y.status==="ok"||y.status==="unsupported"?l(y):(h(!0),l(k=>(k==null?void 0:k.status)==="ok"?k:y))}catch{h(!0)}finally{c(!1)}};return A.useEffect(()=>{let y=!1;return c(!0),n(e).then(k=>{y||l(k)}).catch(()=>{y||h(!0)}).finally(()=>{y||c(!1)}),()=>{y=!0}},[e,n]),s.jsxs("div",{className:"channel-balance-inline",children:[s.jsx("span",{className:"channel-balance-total",title:"Available balance",children:(a==null?void 0:a.status)==="ok"&&a.balance?a.balance.balance_infos.map(y=>`${y.currency} ${y.total_balance}`).join(" / "):u?"Checking…":(a==null?void 0:a.status)==="unsupported"?"Balance —":"Balance unavailable"}),f?s.jsx("span",{className:"channel-balance-warning",title:"Refresh failed; the displayed amount may be stale",role:"status",children:"Stale"}):null,a!=null&&a.balance&&!a.balance.is_available?s.jsx("span",{className:"channel-balance-warning",children:"Insufficient"}):null,s.jsx("button",{type:"button","aria-label":"Refresh balance",title:"Refresh balance",disabled:u,onClick:()=>void m(),children:"↻"}),s.jsxs("details",{className:"channel-balance-details",children:[s.jsx("summary",{children:"Details"}),s.jsxs("div",{children:[s.jsxs("p",{className:"channel-endpoint",children:[t," · Responses API"]}),(p=a==null?void 0:a.balance)==null?void 0:p.balance_infos.map(y=>s.jsxs("p",{children:[y.currency," · Granted ",y.granted_balance," · Topped up ",y.topped_up_balance]},y.currency)),a?s.jsxs("small",{children:["Checked ",new Date(a.checkedAt).toLocaleString()]}):null,f?s.jsx("small",{children:"Refresh failed. Any amount shown is the last successful result."}):null,(a==null?void 0:a.status)==="unsupported"?s.jsx("small",{children:"This channel does not support balance queries."}):null,s.jsx("small",{children:"Uses saved credentials; unsaved edits are not queried."})]})]})]})}function m6(e,t){const n=e??{type:"codex"},a=t??{type:"codex"};return n.type===a.type&&(n.type!=="custom"||a.type==="custom"&&n.channelId===a.channelId)}function mE({load:e,save:t,queryBalance:n}){const[a,l]=A.useState(null),[u,c]=A.useState([]),[f,h]=A.useState(!1),[m,p]=A.useState(""),[y,k]=A.useState(!1),[x,C]=A.useState(null),M=JSON.stringify(u)!==JSON.stringify((a==null?void 0:a.channels.map(N=>({channel:N})))??[]);A.useEffect(()=>{let N=!1;return e().then(q=>{N||(l(q),c(q.channels.map(R=>({channel:R}))))}).catch(()=>{N||p("Unable to load channels. Reopen this panel to retry.")}),()=>{N=!0}},[e]);const I=(N,q)=>{k(!1),c(R=>R.map((X,P)=>P===N?{...X,channel:{...X.channel,...q}}:X))},_=async N=>{if(N.preventDefault(),!(!a||f)){h(!0),p(""),k(!1);try{const q=await t({expectedRevision:a.revision,channels:u.map(R=>({channel:R.channel,...R.apiKey?{apiKey:R.apiKey}:{}}))});l(q),c(q.channels.map(R=>({channel:R}))),k(!0),C(null)}catch{p("Channels were not saved. Check the fields. If another administrator changed them, reopen this panel to load the latest version.")}finally{h(!1)}}};return s.jsxs("section",{children:[s.jsx("header",{className:"settings-section-header",children:s.jsxs("div",{children:[s.jsx("h3",{children:"Custom model channels"}),s.jsx("p",{children:"Select a configured channel in Runtime."})]})}),s.jsxs("form",{className:"settings-form",onSubmit:N=>void _(N),children:[!a&&!m?s.jsx("p",{children:"Loading channels…"}):null,s.jsxs("div",{className:"settings-field-wide channel-summary-list",children:[u.map(N=>s.jsxs("article",{className:"channel-summary-card",children:[s.jsxs("div",{className:"channel-summary-identity",children:[s.jsx("h4",{children:N.channel.name||"New channel"}),s.jsx("p",{children:N.channel.model||"Model not configured"})]}),n&&(a!=null&&a.channels.some(q=>q.id===N.channel.id))?s.jsx(hE,{id:N.channel.id,baseUrl:a.channels.find(q=>q.id===N.channel.id).baseUrl,query:n},`${N.channel.id}:${a.revision}`):s.jsx("small",{children:"Not saved"}),s.jsx("button",{type:"button",disabled:f||x!==null&&x!==N.channel.id,onClick:()=>{C(N.channel.id),k(!1)},children:"Edit channel"})]},N.channel.id)),a&&u.length===0?s.jsx("p",{children:"No custom channels yet. Add a channel to get started."}):null]}),u.map((N,q)=>x===N.channel.id?s.jsxs("fieldset",{disabled:f,className:"settings-field-wide model-channel-card",children:[s.jsx("legend",{children:a!=null&&a.channels.some(R=>R.id===N.channel.id)?"Edit channel":"Add channel"}),s.jsxs("label",{className:"settings-field",children:[s.jsx("span",{children:"Name"}),s.jsx("input",{"aria-label":`Channel ${q+1} name`,required:!0,maxLength:128,value:N.channel.name,onChange:R=>I(q,{name:R.target.value})})]}),s.jsxs("label",{className:"settings-field",children:[s.jsx("span",{children:"Type"}),s.jsx("select",{"aria-label":`Channel ${q+1} type`,value:N.channel.kind,onChange:()=>{},children:s.jsx("option",{value:"responses",children:"Responses API"})})]}),s.jsxs("label",{className:"settings-field",children:[s.jsx("span",{children:"Base URL"}),s.jsx("input",{"aria-label":`Channel ${q+1} URL`,type:"url",required:!0,placeholder:"https://api.example.com/v1",value:N.channel.baseUrl,onChange:R=>I(q,{baseUrl:R.target.value})})]}),s.jsxs("label",{className:"settings-field",children:[s.jsx("span",{children:"Model ID"}),s.jsx("input",{"aria-label":`Channel ${q+1} model`,required:!0,maxLength:256,placeholder:"Model ID from your service",value:N.channel.model,onChange:R=>I(q,{model:R.target.value})})]}),s.jsxs("label",{className:"settings-field",children:[s.jsx("span",{children:"API key"}),s.jsx("input",{"aria-label":`Channel ${q+1} API key`,type:"password",autoComplete:"new-password",required:!(a!=null&&a.channels.some(R=>R.id===N.channel.id)),value:N.apiKey??"",placeholder:a!=null&&a.channels.some(R=>R.id===N.channel.id)?"Configured · leave blank to keep":"Enter API key",onChange:R=>{const X=R.target.value;k(!1),c(P=>P.map((H,J)=>J===q?{...H,apiKey:X}:H))}})]}),s.jsx("button",{type:"button",onClick:()=>{c(R=>R.filter((X,P)=>P!==q)),k(!1),C(null)},children:"Remove channel on save"}),s.jsx("small",{children:"Changes take effect only after Save channels. Leave the API key blank to keep the saved key."})]},N.channel.id):null),m?s.jsx("p",{role:"alert",children:m}):null,y?s.jsx("p",{role:"status",children:"Channels saved. New executions use the updated configuration."}):null,s.jsxs("div",{className:"settings-form-actions",children:[s.jsx("button",{type:"button",disabled:!a||f||x!==null||u.length>=100,onClick:()=>{const N=crypto.randomUUID().replaceAll("-","");C(N),k(!1),c(q=>[...q,{channel:{id:N,name:"",kind:"responses",baseUrl:"",model:""}}])},children:"Add channel"}),x||JSON.stringify(u)!==JSON.stringify(a==null?void 0:a.channels.map(N=>({channel:N})))?s.jsx("button",{type:"button",disabled:f,onClick:()=>{c((a==null?void 0:a.channels.map(N=>({channel:N})))??[]),C(null),p("")},children:"Discard changes"}):null,x||M?s.jsx("button",{type:"submit",disabled:!a||f,children:f?"Saving…":"Save channels"}):null]})]})]})}function pE(e){const t=new Map;for(const n of e){if(!n.turnId)continue;if(n.event==="server.wakeup.started"){t.set(n.turnId,"wakeup");continue}if(n.event!=="server.turn")continue;const a=yE(n.data);t.set(n.turnId,typeof a.source=="string"?a.source:"web")}return t}function Vc(e,t){return!!(t&&e.includes(t))}function gE(e){var n;if((e==null?void 0:e.status)!=="failed")return null;const t=(n=e.error)==null?void 0:n.trim();return t?{turnId:e.id,content:t,createdAt:e.finishedAt??e.startedAt}:null}function yE(e){return e&&typeof e=="object"?e:{}}const vE=["summary","message","status","instruction","description","reason","error","text"],Kv=96,xE=new Set(["codex.dynamic_tool_request","codex.process_exited","codex.protocol_error"]),bE=new Set(["server.item.snapshot","server.status","runtime.worker_stderr","codex.dynamic_tool_request"]),wE=new Set(["agentMessage","commandExecution","contextCompaction","fileChange","mcpToolCall","reasoning","userMessage","webSearch"]),p6=new Set(["item/commandExecution/terminalInteraction"]),kE=new Map([["server.wakeup.retry_scheduled","Wakeup retry scheduled"],["runtime.worker_exit","Runtime worker exited"]]);function SE(e){if(e.event!=="codex.notification")return!1;const t=si(e.data);return typeof t.method=="string"&&p6.has(t.method)}function jE(e){if(bE.has(e.event))return null;if(e.event.startsWith("server.")||e.event.startsWith("runtime.")||xE.has(e.event))return e.event;if(e.event!=="codex.notification")return null;const t=si(e.data),n=typeof t.method=="string"?t.method:"",a=si(t.params),l=si(a.item),u=typeof l.type=="string"?l.type:"";return!n.startsWith("item/")||p6.has(n)||/(?:\/delta|Delta)$/.test(n)||wE.has(u)?null:n}function g6(e,t){const n=t.replace(/^input:/,""),a=(e==null?void 0:e.trim())??"";return!a||a===t||a===n?kE.get(n)??y6(n):a}function Xs(e,t=[]){const n=si(e),l=[...t,...vE.map(u=>Yc(n[u]))].map(u=>(u==null?void 0:u.replace(/\s+/g," ").trim())??"").find(Boolean);return l?l.length<=Kv?l:`${l.slice(0,Kv-3)}...`:"查看详情"}function e1(e,t=new Map){const n=si(e),a=typeof n.unreadCount=="number"&&n.unreadCount>0?Math.floor(n.unreadCount):0,u=(Array.isArray(n.senderWorkspaceIds)?Array.from(new Set(n.senderWorkspaceIds.filter(h=>typeof h=="string").map(h=>h.trim()).filter(Boolean))):[]).map(h=>t.get(h)??h),c="Messages",f=[a>0?String(a):"",u.length>0?`from ${u.join(", ")}`:""].filter(Boolean).join(" ");return{title:c,detail:Xs({},[f])}}function CE(e){const t=si(e),n=Array.isArray(t.offers)?t.offers.map(si).filter(u=>Object.keys(u).length>0):[],a=n.map(u=>{var c;return(c=Yc(u.previewText))==null?void 0:c.trim()}).filter(u=>!!u),l=n.length;return{title:l===1?"New input available":`${l} new inputs available`,detail:Xs({},a.slice(0,2)),meta:l===1?"preview":`${l} previews`}}function TE(e){const t=si(e),n=Yc(t.actionType)??"",a=si(t.payload);return n==="seele_wakeup"||n==="seele_workspace_schedule_wakeup"?{title:(Yc(a.action)??"schedule")==="cancel"?"Wakeup cancellation requested":"Wakeup requested",detail:Xs(a,[Yc(a.instruction)]),meta:"after turn"}:{title:"Action requested",detail:Xs(a,[y6(n||"agent action")]),meta:"after turn"}}function y6(e){const n=(e.split(/[./]/).filter(Boolean).pop()??e).replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").trim();return n?n.charAt(0).toUpperCase()+n.slice(1):"System event"}function Yc(e){if(typeof e=="string")return e;if(typeof e=="number"||typeof e=="boolean")return String(e)}function si(e){return e&&typeof e=="object"?e:{}}function t1(e){const t=n1(e);return(Array.isArray(t.changes)?t.changes:[]).flatMap(a=>{const l=n1(a);if(typeof l.path!="string"||!l.path.trim())return[];const u=ME(l.kind),c=typeof l.diff=="string"?l.diff:"",f=NE(c,u);return[{path:l.path,kind:u,additions:f.additions,deletions:f.deletions}]})}function v6(e,t){const n=Zv(e),a=Zv(t??"").replace(/\/+$/,"");return a&&(n===a||n.startsWith(`${a}/`))?n.slice(a.length+1)||".":n}function AE(e,t){if(e.length===0)return"File changed";const n=v6(e[0].path,t);return e.length===1?n:`${n} +${e.length-1}`}function EE(e){return e.reduce((t,n)=>({additions:t.additions+n.additions,deletions:t.deletions+n.deletions}),{additions:0,deletions:0})}function NE(e,t){if(!e)return{additions:0,deletions:0};if(t==="add")return{additions:Xv(e),deletions:0};if(t==="delete")return{additions:0,deletions:Xv(e)};let n=0,a=0;for(const l of e.split(`
|
|
349
|
-
`))l.startsWith("+")&&!l.startsWith("+++")?n+=1:l.startsWith("-")&&!l.startsWith("---")&&(a+=1);return{additions:n,deletions:a}}function Xv(e){const t=e.split(`
|
|
350
|
-
`).length;return e.endsWith(`
|
|
351
|
-
`)?Math.max(0,t-1):t}function ME(e){const t=n1(e);return t.type==="add"?"add":t.type==="delete"?"delete":t.type==="move"||typeof t.move_path=="string"?"move":"update"}function Zv(e){return e.replace(/\\/g,"/").replace(/\/+/g,"/")}function n1(e){return e&&typeof e=="object"?e:{}}const DE=["low","medium","high","xhigh"];function Gs(e){const t=e.trim();return t?{minimal:"Minimal",none:"None",low:"Low",medium:"Medium",high:"High",xhigh:"Extra high",max:"Max",ultra:"Ultra"}[t]??t:"Use model default"}function Qv(e,t){const n=r0(e),a=r0(t==null?void 0:t.defaultReasoningEffort);return n?n===a?`${Gs(n)} (model default)`:Gs(n):a?`Not configured (model default: ${Gs(a)})`:"Not configured (model default applies)"}function zE(e,t=""){const n=r0(e==null?void 0:e.defaultReasoningEffort),a=[];if(t||a.push({value:"",label:"Not configured (model default applies)"}),!e){const c=t;return c&&a.push({value:c,label:`${Gs(c)} (configured)`}),a}const u=(x6(e)??DE).filter(c=>!r1(c));n&&!r1(n)&&!u.includes(n)&&u.unshift(n);for(const c of u)a.push({value:c,label:c===n?`${Gs(c)} (model default)`:Gs(c)});return t&&!a.some(c=>c.value===t)&&a.push({value:t,label:`${Gs(t)} (configured)`}),a}function RE(e,t){const n=r0(e);if(!n)return null;if(r1(n))return"The configured reasoning effort is not supported. Choose a supported value explicitly.";if(!t)return null;const a=x6(t);return a!==null?a.includes(n)?null:"The selected model does not support the configured reasoning effort. Your value has been preserved; choose a supported value before saving.":null}function OE(e,t,n){return n||e!==t?e:null}function x6(e){if(!Array.isArray(e==null?void 0:e.supportedReasoningEfforts))return null;const t=[];for(const n of e.supportedReasoningEfforts){const a=r0(n==null?void 0:n.reasoningEffort);a&&!t.includes(a)&&t.push(a)}return t}function r0(e){return typeof e=="string"?e.trim():""}function r1(e){return e.toLowerCase()==="ultra"}function IE(e){return e.status!=="authorized"||!e.configurationReady}function _E(e,t,n){return e===401&&!n&&t==="authentication_required"?"reauthenticate":"ignore"}function Jv(e,t){const n=Date.parse(e??""),a=Date.parse(t??"");return Number.isFinite(n)&&(!Number.isFinite(a)||n>a)}function LE(e,t){var u,c;if(!e||!t||typeof e!="object"||typeof t!="object")return t;const n=e,a=t,l=Jv(n.refreshedAt,a.refreshedAt)?{...n}:{...a};return l.usage=Jv((u=n.usage)==null?void 0:u.updatedAt,(c=a.usage)==null?void 0:c.updatedAt)?n.usage:a.usage,l}function op(e,t){var l,u;if(!e)return t;const n={...e.accountDetails},a={...e.credentialStatus};for(const c of e.accounts){const f=t.accounts.find(h=>h.id===c.id);if(!(c.updatedAt&&(f!=null&&f.updatedAt)&&f.updatedAt<c.updatedAt)&&(Object.hasOwn(t.accountDetails,c.id)&&(n[c.id]=LE(n[c.id],t.accountDetails[c.id])),t.credentialStatus&&Object.hasOwn(t.credentialStatus,c.id))){const h=a[c.id],m=t.credentialStatus[c.id],p=Date.parse((h==null?void 0:h.accessTokenExpiresAt)??""),y=Date.parse((m==null?void 0:m.accessTokenExpiresAt)??""),k=Number.isFinite(p)&&(!Number.isFinite(y)||y<p),x=((l=h==null?void 0:h.renewal)==null?void 0:l.lastAttemptAt)!=null&&(((u=m==null?void 0:m.renewal)==null?void 0:u.lastAttemptAt)??0)<h.renewal.lastAttemptAt;!k&&!(x&&!(y>p))&&(a[c.id]=t.credentialStatus[c.id])}}return{...e,accountDetails:n,...e.credentialStatus||t.credentialStatus?{credentialStatus:a}:{}}}const e3=15e3,t3=[1e3,2e3,5e3,1e4,15e3];function BE(e){return!e.workspaceRunning||e.streamLeaseActive||e.controllerActive?{kind:"none"}:e.currentTurnAbsent?e.retryAt!==null&&e.now>=e.retryAt?{kind:"probe",waitMs:e3}:{kind:"none"}:{kind:"probe",waitMs:e3}}function qE(e){const t=Math.min(Math.max(1,Math.floor(e))-1,t3.length-1);return t3[t]}function UE(e){const t=n3(e),n=n3(t.conversation),a=t.workspaceStatus??t.status??n.status;return a==="idle"||a==="error"||a==="done"||a==="initialization_failed"?a:"done"}function n3(e){return e&&typeof e=="object"?e:{}}function HE(e,t,n){return n?"running":e==="running"||e==="error"?e:t==="scheduled"?"waiting":e}function na(e,t){if(!e.deploymentId||!e.userId||!t)throw new Error("Browser storage requires deployment, user, and preference identities.");return["seele","v1",encodeURIComponent(e.deploymentId),encodeURIComponent(e.userId),encodeURIComponent(t)].join(":")}function K1(e,t){const n=[],a=new Set;for(const l of[...e,...t])a.has(l)||(a.add(l),n.push(l));return n}function r3(e,t,n){return K1([t,...e.filter(a=>a!==t)],n)}function $E(e,t){return e.filter(n=>n!==t)}function FE(e,t){const n=e.code==="ArrowUp"?-1:e.code==="ArrowDown"?1:null;return n!==null&&e.metaKey&&e.shiftKey&&e.leftShiftPressed&&!e.ctrlKey&&!e.altKey?{type:"move",direction:n}:t?e.key==="Escape"?{type:"cancel"}:e.code==="Space"&&!e.repeat?{type:"confirm"}:null:null}function Fs(e){return`${e.kind}:${e.id}`}function PE(e,t){return e.flatMap(n=>[{kind:"group",id:n.id},...t.has(n.id)?[]:n.conversations.map(a=>({kind:"workspace",id:a.id}))])}function GE(e,t,n,a){if(e.length===0)return null;const l=t?Fs(t):null;let u=l?e.findIndex(c=>Fs(c)===l):-1;return u<0&&n&&(u=e.findIndex(c=>c.kind==="workspace"&&c.id===n)),u<0?a>0?e[0]:e[e.length-1]:e[(u+a+e.length)%e.length]}function VE(e,t){return t??e}function YE(e,t){return e==="saved"||t==="accept"?"saved":"declined"}const WE=/^[a-z][a-z\d+.-]*:/i,KE=/^L([1-9]\d*)(?:C([1-9]\d*))?$/i;function b6(e){if(!e.startsWith("seele-public:/"))return null;const t=e.slice(13);return t.startsWith("//")||t.includes("\\")?null:t}function XE(e,t){const n=e.trim();if(!n||n.startsWith("#")||n.startsWith("?")||n.startsWith("/api/")||WE.test(n))return null;const a=n.indexOf("#"),l=a>=0?n.slice(0,a):n,u=a>=0?n.slice(a+1):"",c=l.indexOf("?"),f=c>=0?l.slice(0,c):l;let h;try{h=decodeURIComponent(f)}catch{return null}const m=ZE(h);if(!m)return null;const p=u.match(KE);return{path:w6(m,t),...p?{line:Number(p[1])}:{},...p!=null&&p[2]?{column:Number(p[2])}:{}}}function w6(e,t){const n=e.replace(/\\/g,"/"),a=t.replace(/\\/g,"/").replace(/\/+$/,"");return n===a||!n.startsWith(`${a}/`)?n:n.slice(a.length+1)}function ZE(e){const t=e.trim().replace(/^`+|`+$/g,"").replace(/^\.\//,"");return t||null}function a3(){const e=A.useRef(null),t=()=>{e.current&&(clearTimeout(e.current.timer),delete e.current.element.dataset.touchDrag),e.current=null};return A.useEffect(()=>{const n=u=>{e.current&&u.preventDefault()},a=u=>{u.touches.length!==1&&t()},l=u=>{const c=e.current;if(!c)return;if(u.touches.length!==1){t();return}if(c.armed){u.preventDefault();return}const f=u.touches[0];Math.hypot(f.clientX-c.x,f.clientY-c.y)>8&&t()};return document.addEventListener("touchmove",l,{passive:!1}),document.addEventListener("touchstart",a,{passive:!0}),document.addEventListener("contextmenu",n),document.addEventListener("touchend",t),document.addEventListener("touchcancel",t),()=>{t(),document.removeEventListener("touchmove",l),document.removeEventListener("touchstart",a),document.removeEventListener("contextmenu",n),document.removeEventListener("touchend",t),document.removeEventListener("touchcancel",t)}},[]),{begin(n,a){if(t(),n.pointerType!=="touch")return;const l=n.currentTarget;l.dataset.touchDrag="holding";const u={x:n.clientX,y:n.clientY,element:l,armed:!1,timer:setTimeout(()=>{e.current===u&&(u.armed=!0,l.dataset.touchDrag="ready",a())},2e3)};e.current=u},allows(n){var a;return n!=="touch"||((a=e.current)==null?void 0:a.armed)===!0},end:t}}const a1="seele:authentication-required",i1="seele:deployment-status-required",k6=12,QE=3e3,S6="activeWorkspaceId",X1="workspaceOrder",j6="workspaceGroupOrder",C6="workspaceDrafts",T6="collapsedWorkspaceGroups",A6="sidebarWidth",i3=5,l3=275,JE=236,eN=420,s3="default",o3=300,tN=2,nN=13,rN=1.65,aN=20,iN=900;class Zs extends Error{constructor(n,a,l,u){super(n);jd(this,"detail");jd(this,"status");jd(this,"body");this.name="DetailedHttpError",this.detail=a,this.status=l,this.body=u}}const lN=[{value:"workspace-write",label:"Workspace"},{value:"danger-full-access",label:"System"}],Rc={id:null,kind:"source",name:"",description:"",purpose:"",attention:"tracked",refreshPolicy:"manual",status:"draft",sourceCluesText:"",requiredEnvText:""};function Z1(){var e;return((e=document.querySelector('meta[name="seele-public-base-path"]'))==null?void 0:e.content.replace(/\/?$/,"/"))??"/"}function Ne(e){return`${Z1()}api/${e.replace(/^\/+/,"")}`}async function Kn(e,t){const n=await e.text().catch(()=>""),a=`Request failed with ${e.status}`,l=[`${t.method??"GET"} ${t.url}`,`HTTP ${e.status} ${e.statusText||""}`.trim(),n?`Response: ${n}`:"Response: <empty>"].join(`
|
|
352
|
-
`);return new Zs(a,l,e.status,n)}function ft(e){return e instanceof Zs?{message:e.message,detail:e.detail}:e instanceof Error?{message:e.message}:{message:String(e)}}function Us(e){const t=ft(e);return t.detail?{message:t.message,detail:t.detail}:t.message}async function Ve(e,t){if(!e.ok)throw await Kn(e,t)}function sN(e){return e instanceof Zs&&e.status===410&&e.body.includes('"turn_not_active"')}function oN(e){return e instanceof Zs&&e.status===409&&e.body.includes('"turn_not_running"')}function uN(e){return e instanceof Zs&&e.status===409&&e.body.includes('"thread_capability_upgrade_required"')}function u3(e){return{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:e})}}async function cN(e){if(e.status!==409)return null;try{const t=await e.json();if(t.error==="turn_already_running"&&typeof t.turnId=="string")return t.turnId}catch{return null}return null}function Q1(e){return Math.max(JE,Math.min(eN,Math.round(e)))}function dN(e){try{const t=window.localStorage.getItem(na(e,A6)),n=t?Number.parseInt(t,10):Number.NaN;return Number.isFinite(n)?Q1(n):l3}catch{return l3}}function fN(e,t){try{window.localStorage.setItem(na(e,A6),String(Q1(t)))}catch{}}function up(e){E6(e,()=>{e.scrollTop=Math.max(0,e.scrollHeight-e.clientHeight)})}function hN(e,t=48){return e.scrollHeight-e.scrollTop-e.clientHeight<=t}function mN(e){const t=e.split(/\r\n|\r|\n/).length;return Math.min(tN,Math.max(1,t+1))}function pN(e){return Math.ceil(mN(e)*nN*rN+aN)}function E6(e,t){const n=e.style.scrollBehavior;e.style.scrollBehavior="auto",t(),e.style.scrollBehavior=n}function c3(e){const t=e.getBoundingClientRect(),n=t.bottom-32,a=Array.from(e.querySelectorAll(".turn-group[data-turn-id]")),l=[...a].reverse().find(c=>{const f=c.getBoundingClientRect();return f.top<=n&&f.bottom>=t.top})??a[a.length-1]??null;if(!(l!=null&&l.dataset.turnId))return{anchorOffset:null,anchorTurnId:null};const u=l.getBoundingClientRect();return{anchorOffset:n-u.top,anchorTurnId:l.dataset.turnId}}function gN(e,t){return t?Array.from(e.querySelectorAll(".turn-group[data-turn-id]")).find(n=>n.dataset.turnId===t)??null:null}function d3(e,t){E6(e,()=>{const n=gN(e,t.anchorTurnId);if(n&&t.anchorOffset!==null){const l=e.getBoundingClientRect().bottom-32,c=n.getBoundingClientRect().top-(l-t.anchorOffset);Math.abs(c)>.5&&(e.scrollTop+=c);return}e.scrollTop=Math.max(0,e.scrollHeight-t.previousScrollHeight)})}function f3(e,t){let n=!1;const a=e.querySelector(".stream-inner")??e,l=typeof ResizeObserver>"u"?null:new ResizeObserver(()=>{n||d3(e,t)});d3(e,t),l==null||l.observe(a);const u=window.setTimeout(c,1200);function c(){n||(n=!0,l==null||l.disconnect(),window.clearTimeout(u))}return c}function yN(e){try{return window.localStorage.getItem(na(e,S6))}catch{return null}}function cp(e,t){const n=na(e,S6);try{t?window.localStorage.setItem(n,t):window.localStorage.removeItem(n)}catch{}}function au(e){try{const t=window.localStorage.getItem(na(e,X1)),n=t?JSON.parse(t):[];return Array.isArray(n)?n.filter(a=>typeof a=="string"):[]}catch{return[]}}function N6(e){try{const t=window.localStorage.getItem(na(e,j6)),n=t?JSON.parse(t):[];return Array.isArray(n)?n.filter(a=>typeof a=="string"):[]}catch{return[]}}function M6(e,t){try{window.localStorage.setItem(na(e,j6),JSON.stringify(t))}catch{}}function qc(e,t){try{window.localStorage.setItem(na(e,X1),JSON.stringify(t))}catch{}}function D6(e){try{const t=window.localStorage.getItem(na(e,C6)),n=t?JSON.parse(t):{};return!n||typeof n!="object"||Array.isArray(n)?{}:Object.fromEntries(Object.entries(n).filter(a=>typeof a[0]=="string"&&typeof a[1]=="string"))}catch{return{}}}function vN(e,t){return t?D6(e)[t]??"":""}function dp(e,t,n){if(t)try{const a=D6(e);n?a[t]=n:delete a[t],window.localStorage.setItem(na(e,C6),JSON.stringify(a))}catch{}}function xN(e){try{const t=window.localStorage.getItem(na(e,T6)),n=t?JSON.parse(t):[];return new Set(Array.isArray(n)?n.filter(a=>typeof a=="string"):[])}catch{return new Set}}function fp(e,t){try{window.localStorage.setItem(na(e,T6),JSON.stringify(Array.from(t)))}catch{}}function Yl(e,t){const n=au(e);if(n.length===0)return t;const a=new Map(n.map((l,u)=>[l,u]));return[...t].sort((l,u)=>{const c=a.get(l.id),f=a.get(u.id);return c!==void 0&&f!==void 0?c-f:c!==void 0?-1:f!==void 0?1:0})}function Bd(e,t){const n=N6(e);if(n.length===0)return t;const a=new Map(n.map((l,u)=>[l,u]));return[...t].sort((l,u)=>{const c=a.get(l.id),f=a.get(u.id);return c!==void 0&&f!==void 0?c-f:c!==void 0?-1:f!==void 0?1:l.createdAt.localeCompare(u.createdAt)})}function qd(e,t){const n=au(e),a=K1(n,t.map(l=>l.id));JSON.stringify(a)!==JSON.stringify(n)&&qc(e,a)}function hp(e,t){const n=new Set(t.map(u=>u.id)),a=N6(e).filter(u=>n.has(u)),l=t.map(u=>u.id).filter(u=>!a.includes(u));M6(e,[...a,...l])}function bN(e,t){const n=e.getBoundingClientRect(),a=n.top+n.height/2;return t<a?"before":"after"}function wN(e,t,n,a){if(t===n)return e;const l=e.findIndex(p=>p.id===t),u=e.findIndex(p=>p.id===n);if(l===-1||u===-1)return e;const c=[...e],[f]=c.splice(l,1),h=c.findIndex(p=>p.id===n),m=a==="before"?h:h+1;return c.splice(m,0,f),c}function kN(e,t,n){if(t===n)return e;const a=e.findIndex(h=>h.id===t),l=e.findIndex(h=>h.id===n);if(a===-1||l===-1)return e;const u=[...e],[c]=u.splice(a,1),f=u.findIndex(h=>h.id===n);return u.splice(f+1,0,c),u}function SN({authEnabled:e,currentUser:t,deploymentId:n,onLogout:a}){var rc,Ri,Tl,zs,Al;const l=A.useMemo(()=>({deploymentId:n,userId:t.id}),[n,t.id]),[u,c]=A.useState(""),[f,h]=A.useState(new Set),[m,p]=A.useState([]),[y,k]=A.useState([]),[x,C]=A.useState(null),[M,I]=A.useState(!1),[_,N]=A.useState(null),[q,R]=A.useState(null),[X,P]=A.useState(!1),[H,J]=A.useState(!1),[ne,F]=A.useState({}),[te,se]=A.useState({}),[ve,be]=A.useState(null),[he,Z]=A.useState([]),[me,V]=A.useState(null),[Ce,U]=A.useState(!1),[E,Y]=A.useState(null),[O,ee]=A.useState("checking"),[ke,Ae]=A.useState(null),[He,it]=A.useState(!1),[pe,Pe]=A.useState(null),[Ke,oe]=A.useState(!1),[Me,ze]=A.useState(null),[Ze,Ut]=A.useState(!1),[ra,Jn]=A.useState(!1),[er,Xt]=A.useState([]),[Bn,Vn]=A.useState([]),[Un,Zt]=A.useState({model:"",reasoningEffort:"",fastMode:!1,sandbox:"workspace-write"}),[pr,ye]=A.useState({profuseNotificationEnabled:!1,publicUrl:null}),[Le,ie]=A.useState([]),[we,qe]=A.useState(null),[Ge,ot]=A.useState(null),[Tt,yt]=A.useState(!1),[rt,bt]=A.useState(null),[Ht,Qt]=A.useState(!1),[nl,aa]=A.useState(null),[fi,Ia]=A.useState(!1),[Ir,wa]=A.useState({model:"",reasoningEffort:"",fastMode:!1,sandbox:"workspace-write"}),[en,rl]=A.useState("global"),[tn,hi]=A.useState(null),[al,is]=A.useState(null),[bu,il]=A.useState({model:"",reasoningEffort:"",fastMode:!1,sandbox:"workspace-write"}),[d0,no]=A.useState({memory:"",items:[]}),[wu,ku]=A.useState({memory:"",items:[]}),[f0,ka]=A.useState({memory:"",items:[]}),[Mn,bn]=A.useState([]),[_r,_a]=A.useState(Rc),[ll,sl]=A.useState({description:"",key:"",value:""}),[ro,La]=A.useState(null),[Su,ia]=A.useState(()=>new Set),[Ba,mi]=A.useState(!1),[Sa,nn]=A.useState(!1),[h0,ju]=A.useState(!1),[Hn,qa]=A.useState(null),Dn=A.useRef(0);A.useEffect(()=>(++Dn.current,ol(!1),tr(!1),ao(!1),()=>{++Dn.current}),[Sa,Hn]);const[Cu,m0]=A.useState(!0),[p0,ol]=A.useState(!1),[ls,tr]=A.useState(!1),[gr,ao]=A.useState(!1),[Ua,ja]=A.useState(null),[g0,Ha]=A.useState(null),[ss,nr]=A.useState(null),[Lr,Br]=A.useState(null),[la,pi]=A.useState(null),[ul,Tu]=A.useState(null),[Ca,Pf]=A.useState(()=>new Set),[cl,gi]=A.useState(null),[os,io]=A.useState(null),[y0,$a]=A.useState(null),[wn,qr]=A.useState(null),[us,sa]=A.useState(null),[oa,lo]=A.useState(()=>xN(l)),[rn,dl]=A.useState(null),[cs,Ur]=A.useState(()=>dN(l)),[ds,fs]=A.useState(230),[rr,Au]=A.useState(()=>Date.now()),[so,v0]=A.useState(0),hs=A.useRef(null),Fa=A.useRef(null),Eu=A.useRef(null),$n=A.useRef(null),yr=A.useRef(null),Ta=A.useRef(!0),fl=A.useRef(null),yi=A.useRef(null),Nu=A.useCallback(b=>{var $;const T=Fa.current,z=Aa.current;b&&T&&z&&(yi.current={conversationId:z,scrollTop:T.scrollTop,...c3(T),followBottom:Ta.current},($=dn.current)==null||$.call(dn),dn.current=null),I(b)},[]),vi=A.useRef(null),xi=A.useRef(null),bi=A.useRef(new Set),oo=A.useRef(!1),Mu=A.useRef([]),Aa=A.useRef(null),Pa=A.useRef(null);Pa.current=M?x:null;const uo=A.useRef(null),ms=A.useRef(new Map),ps=A.useRef(new Map),co=A.useRef(new Set),fo=A.useRef(new Map),gs=A.useRef(new Map),wi=A.useRef(new Map),hl=A.useRef(new Set),dn=A.useRef(null),ar=A.useRef(new Map),vr=A.useRef(new Map),Ga=A.useRef(new Map),ys=A.useRef(new Set),ho=a3(),mo=a3(),vs=A.useRef(null),po=A.useRef(null),Du=A.useRef(!1),zu=A.useRef(!1),go=A.useRef(!1),Be=m.find(b=>b.id===x),x0=(Be==null?void 0:Be.unreadTurnCount)??0,ua=m.find(b=>b.id===Hn),gn=m.find(b=>b.id===tn),Ru=m.find(b=>b.id===cl),Ea=A.useMemo(()=>{const T=Bd(l,y.length>0?y:[{id:"default",title:"Default",createdAt:"",updatedAt:""}]).map(K=>({id:K.id,title:K.title,conversations:[]})),z=new Map(T.map(K=>[K.id,K])),$=T[0];for(const K of m)(z.get(K.groupId)??$).conversations.push(K);return T.filter(K=>K.conversations.length>0||K.id!=="default")},[m,y]),Va=A.useMemo(()=>PE(Ea,oa),[oa,Ea]),At=x!==null?ne[x]:null,ki=(At==null?void 0:At.messages)??[],xs=(At==null?void 0:At.events)??[],ml=$z(Hz(xs),x?te[x]:null),pl=cb(ml),yo=(At==null?void 0:At.status)??(Be==null?void 0:Be.status)??"idle",xr=f1(Be,yo),Gf=Hn!==null?((rc=ne[Hn])==null?void 0:rc.status)??(ua==null?void 0:ua.status)??"idle":"idle",Vf=f1(ua,Gf),bs=x?vr.current.get(x)??null:null,Ou=A.useMemo(()=>new Map(m.map(b=>[b.id,b.title])),[m]),vo=A.useMemo(()=>_6(ki,xs,(At==null?void 0:At.turns)??[],(At==null?void 0:At.timelineNodes)??[],bs,Ou),[bs,At==null?void 0:At.timelineNodes,At==null?void 0:At.turns,xs,ki,Ou]),Si=A.useMemo(()=>new Set(ki.filter(b=>b.origin==="clone"&&b.turnId).map(b=>b.turnId)),[ki]),Ya=x!==null&&Ca.has(x),Yf=x!==null&&f.has(x),ws=B7(u,Yf),xo=bs?(Ri=vo.find(b=>Vc(b.turnIds,bs)))==null?void 0:Ri.activity:null,ks=xr==="running"||xr==="initializing"||Ya?xo&&!Nz(xo)?xo:{title:xr==="initializing"?"Initializing clone":"Thinking",createdAt:new Date().toISOString(),tone:"running"}:null,Iu=!ks&&xr==="waiting"&&(Be!=null&&Be.nextWakeup)?{title:"Scheduled wakeup",detail:wf(Be.nextWakeup,rr),createdAt:Be.nextWakeup.wakeAt,tone:"waiting"}:null,ji=ks??Iu,b0=E,bo=A.useRef(0);A.useEffect(()=>{w0(),gl()},[]),A.useEffect(()=>()=>{yr.current!==null&&window.clearTimeout(yr.current)},[]),A.useEffect(()=>{let b=!1;const T=()=>{b||(b=!0,So().finally(()=>{b=!1}))};T();const z=window.setInterval(T,15*1e3);return()=>window.clearInterval(z)},[]),A.useEffect(()=>{const b=window.setInterval(()=>Au(Date.now()),1e3);return()=>window.clearInterval(b)},[]),A.useEffect(()=>{ys.current=Ca},[Ca]),A.useEffect(()=>{Aa.current=x},[x]),A.useLayoutEffect(()=>{const b=uo.current;if(uo.current=x,!x||b===x)return;const T=window.requestAnimationFrame(()=>{const z=$n.current;z&&!z.disabled&&!document.querySelector('[aria-modal="true"]')&&z.focus({preventScroll:!0})});return()=>window.cancelAnimationFrame(T)},[x]),A.useEffect(()=>{Mu.current=m},[m]),A.useEffect(()=>{const b=na(l,X1),T=z=>{z.key===b&&p($=>Yl(l,$))};return window.addEventListener("storage",T),()=>window.removeEventListener("storage",T)},[l]),A.useEffect(()=>{x&&cp(l,x)},[x,l]),A.useLayoutEffect(()=>{if(M||!x||x0<=0)return;let b=!1;const T=async()=>{if(document.visibilityState==="visible"){p($=>$.map(K=>K.id===x?{...K,unreadTurnCount:0}:K));try{await TD(x)}catch($){b||console.error($)}}},z=()=>void T();return T(),document.addEventListener("visibilitychange",z),()=>{b=!0,document.removeEventListener("visibilitychange",z)}},[x,x0,M]),A.useEffect(()=>{var b;x&&(M?(zn(x),(b=ar.current.get(x))==null||b.abort()):(ca(x),wr(x)))},[x,M]),A.useEffect(()=>{const b=window.setInterval(()=>void Kf(),QE);return()=>window.clearInterval(b)},[]),A.useEffect(()=>{var Te;const b=(Te=Be==null?void 0:Be.cloneLineage)==null?void 0:Te.initializationStatus;if(!x||!(b==="copying"||b==="injecting"||b==="initializing")&&(Be==null?void 0:Be.status)!=="initializing"&&(Be==null?void 0:Be.status)!=="initialization_failed")return;let z=!1,$=!1;const K=async()=>{if(!$){$=!0;try{const $e=Ne(`conversations/${x}/clone`),Re=await fetch($e);await Ve(Re,{method:"GET",url:$e});const ut=await Re.json();z||On(ut.conversation)}catch($e){z||console.warn("Failed to read clone status",$e)}finally{$=!1}}};K();const de=(Be==null?void 0:Be.status)==="initialization_failed"?void 0:window.setInterval(()=>void K(),2e3);return()=>{z=!0,window.clearInterval(de)}},[x,Be==null?void 0:Be.status,(Tl=Be==null?void 0:Be.cloneLineage)==null?void 0:Tl.initializationStatus]),A.useEffect(()=>{c(vN(l,x))},[x]),A.useEffect(()=>{if(!x||M)return;const b=BE({workspaceRunning:yo==="running",streamLeaseActive:Ya,controllerActive:ar.current.has(x),currentTurnAbsent:co.current.has(x),retryAt:gs.current.get(x)??null,now:Date.now()});b.kind==="probe"&&Ju(x,{waitMs:b.waitMs})},[x,Ya,so,M,yo]),A.useEffect(()=>()=>{for(const b of wi.current.values())window.clearTimeout(b);wi.current.clear()},[]),A.useEffect(()=>{if(!x)return;let b=!1;return nz(x).then(T=>{b||se(z=>({...z,[x]:T}))}).catch(T=>console.error(T)),()=>{b=!0}},[x]),A.useEffect(()=>{!x&&en==="workspace"&&rl("global")},[x,en]),A.useEffect(()=>{var b;if(Ze){if(!tn&&x){hi(x);return}tn&&!m.some(T=>T.id===tn)&&hi(x??((b=m[0])==null?void 0:b.id)??null)}},[x,m,Ze,tn]),A.useEffect(()=>{if(!Ze||t.role!=="admin")return;const b=window.setInterval(()=>void Bu(),5e3);return()=>window.clearInterval(b)},[t.role,Ze]),A.useEffect(()=>{!Ze||en!=="workspace"||ka({memory:(gn==null?void 0:gn.memory)??"",items:(gn==null?void 0:gn.memoryItems)??[]})},[en,Ze,gn==null?void 0:gn.id,gn==null?void 0:gn.memory,gn==null?void 0:gn.memoryItems]),A.useEffect(()=>{if(!Ba)return;x&&Co(x);const b=T=>{T.key==="Escape"&&mi(!1)};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[x,Ba]),A.useEffect(()=>{if(!Ze)return;const b=T=>{T.key==="Escape"&&Ut(!1)};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[Ze]),A.useEffect(()=>{var T;if(!Sa)return;if(Hn&&!m.some(z=>z.id===Hn)){qa(x??((T=m[0])==null?void 0:T.id)??null);return}const b=z=>{z.key==="Escape"&&(Ua?ja(null):nn(!1))};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[x,Sa,Ua,Hn,m]),A.useEffect(()=>{if(!Lr)return;pi(null);const b=T=>{T.key==="Escape"&&Br(null)};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[Lr]),A.useEffect(()=>{const b=K=>{if(K.code==="ShiftLeft"){go.current=!0;return}const de=FE({code:K.code,key:K.key,metaKey:K.metaKey,shiftKey:K.shiftKey,ctrlKey:K.ctrlKey,altKey:K.altKey,leftShiftPressed:go.current,repeat:K.repeat},rn!==null);if((de==null?void 0:de.type)==="move"){K.preventDefault(),J(!0),dl(Te=>GE(Va,Te,Aa.current,de.direction));return}if((de==null?void 0:de.type)==="cancel"){dl(null);return}if(!((de==null?void 0:de.type)!=="confirm"||!rn||Oo(K.target))){if(K.preventDefault(),rn.kind==="group"){Ds(rn.id);return}kl(rn.id),dl(null),J(!1)}},T=K=>{K.code==="ShiftLeft"&&(go.current=!1)},z=()=>{go.current=!1},$=()=>dl(null);return window.addEventListener("keydown",b,!0),window.addEventListener("keyup",T,!0),window.addEventListener("blur",z),window.addEventListener("pointerdown",$),()=>{window.removeEventListener("keydown",b,!0),window.removeEventListener("keyup",T,!0),window.removeEventListener("blur",z),window.removeEventListener("pointerdown",$)}},[rn,Va]),A.useEffect(()=>{rn&&!Va.some(b=>Fs(b)===Fs(rn))&&dl(null)},[rn,Va]),A.useLayoutEffect(()=>{if(!rn)return;const b=Fs(rn),T=document.querySelector(`[data-keyboard-focus-key="${CSS.escape(b)}"]`);T==null||T.focus({preventScroll:!0}),T==null||T.scrollIntoView({block:"nearest"})},[rn]),A.useLayoutEffect(()=>{const b=Eu.current;if(M||!b)return;let T=!1;const z=()=>{if(T)return;const K=b.getBoundingClientRect();fs(Math.ceil(K.height+44))};z();const $=typeof ResizeObserver>"u"?null:new ResizeObserver(z);return $==null||$.observe(b),window.addEventListener("resize",z),()=>{T=!0,$==null||$.disconnect(),window.removeEventListener("resize",z)}},[M]),A.useLayoutEffect(()=>{var Te,$e,Re;const b=Fa.current;if(!b)return;const T=fl.current!==x;fl.current=x,T&&((Te=dn.current)==null||Te.call(dn),dn.current=null);const z=yi.current;if(z&&z.conversationId!==x)yi.current=null;else if(z&&(Ta.current=z.followBottom,!z.followBottom)){($e=dn.current)==null||$e.call(dn),dn.current=f3(b,{...z,previousScrollHeight:b.scrollHeight-z.scrollTop});return}const $=vi.current;if($&&$.conversationId===x){(Re=dn.current)==null||Re.call(dn),dn.current=f3(b,$),vi.current=null,Ta.current=!1;return}if(!T&&!Ta.current)return;Ta.current=!0,up(b);const K=requestAnimationFrame(()=>up(b)),de=window.setTimeout(()=>up(b),120);return()=>{cancelAnimationFrame(K),window.clearTimeout(de)}},[x,M,ds,At==null?void 0:At.timelineNodes,xs.length,ki.length]);function Ss(){var b;yi.current&&(yi.current=null,(b=dn.current)==null||b.call(dn),dn.current=null)}async function Wf(){var T;const b=Fa.current;b&&(yi.current||(Ta.current=hN(b),!(!x||!((T=At==null?void 0:At.history)!=null&&T.hasMoreBefore))&&(At.loadingOlder||bi.current.has(x)||b.scrollTop>96||await Ai(x))))}function _u(b){var z,$;if(b.history)return b.history;const T=((z=b.timelineNodes)==null?void 0:z.filter(K=>K.parentId===null).reduce((K,de)=>K===null||de.timelineAt<K.timelineAt||de.timelineAt===K.timelineAt&&de.sequence<K.sequence?de:K,null))??null;return{hasMoreBefore:!1,oldestMessageCreatedAt:(($=b.messages[0])==null?void 0:$.createdAt)??null,oldestTimelineAt:(T==null?void 0:T.timelineAt)??null,oldestTimelineSequence:(T==null?void 0:T.sequence)??null,messageTotal:b.messages.length,eventTotal:b.events.length,loadedMessageCount:b.messages.length,loadedEventCount:b.events.length}}async function Wa(b){const T=new URL(b.url,window.location.href).toString();await navigator.clipboard.writeText(T),pi(b.url)}async function js(b,T){await navigator.clipboard.writeText(T),Tu(b),yr.current!==null&&window.clearTimeout(yr.current),yr.current=window.setTimeout(()=>{Tu(null),yr.current=null},1800)}function Qe(b,T,z){const $=Date.now();nr({id:$,tone:b,text:T,detail:z}),window.setTimeout(()=>{nr(K=>(K==null?void 0:K.id)===$?null:K)},z?8e3:2400)}function zn(b){const T=wi.current.get(b);T!==void 0&&(window.clearTimeout(T),wi.current.delete(b))}function ca(b){co.current.delete(b),fo.current.delete(b),gs.current.delete(b),hl.current.delete(b),zn(b)}function Lu(b){co.current.add(b),fo.current.delete(b),gs.current.delete(b),hl.current.delete(b),zn(b)}function wo(b){co.current.add(b),hl.current.delete(b);const T=(fo.current.get(b)??0)+1;fo.current.set(b,T);const z=qE(T);gs.current.set(b,Date.now()+z),zn(b);const $=window.setTimeout(()=>{wi.current.delete(b),v0(K=>K+1)},z);wi.current.set(b,$)}function ko(b,T){T!=="running"&&ca(b)}async function w0(){try{const[b,T]=await Promise.all([D3(),R3()]);ee("connected");const z=Bd(l,T);if(k(z),hp(l,z),b.length>0){const $=Yl(l,b),K=yN(l),de=$.find(Te=>Te.id===K)??$[0];p($),qd(l,$),C(de.id);return}p([]),cp(l,null),C(null)}catch(b){console.error(b),ee("error")}}async function Fn(){const[b,T]=await Promise.all([D3(),R3()]);for(const K of b)ko(K.id,K.status);const z=Yl(l,b),$=Bd(l,T);k($),hp(l,$),p(z),qd(l,z)}async function Kf(){if(!oo.current){oo.current=!0;try{const b=await kD(),T=Mu.current,z=new Set(T.map(Re=>Re.id)),$=new Set(b.map(Re=>Re.id));if(z.size!==$.size||[...z].some(Re=>!$.has(Re))){await Fn(),ee("connected");return}const K=Aa.current;for(const Re of b)ko(Re.id,Re.status);const de=new Map(b.map(Re=>[Re.id,Re])),Te=K?de.get(K)??null:null,$e=Yl(l,T.map(Re=>{const ut=de.get(Re.id);return ut?{...Re,status:ut.status,statusError:ut.statusError,nextWakeup:ut.nextWakeup,unreadTurnCount:ut.unreadTurnCount,updatedAt:ut.updatedAt}:Re}));p($e),qd(l,$e),ee("connected"),Te&&!ys.current.has(Te.id)&&Rt(Te.id,Re=>({...Re,status:Te.status}))}catch(b){console.error(b),ee("error")}finally{oo.current=!1}}}async function gl(){try{const b=await kz();ee("connected"),be(b.version)}catch(b){console.error(b),ee("error")}}async function So(){const b=++bo.current;try{const T=await Sz();b===bo.current&&Y(T)}catch(T){b===bo.current&&Y(z=>z?{...z,stale:!0,error:"无法读取云端额度缓存"}:null),console.error("runtime rate-limit cache read failed",T)}}async function Cs(){try{const b=await MD();Xt(b),ee("connected")}catch(b){console.error(b),ee("error")}}async function jo(b){try{const T=await DD(b);Vn(T),ee("connected")}catch(T){console.error(T),Vn([]),ee("error")}}async function Co(b){try{const T=await zD(b);bn(T),ee("connected")}catch(T){console.error(T),bn([]),ee("error")}}async function Ci(b){try{const T=await LD();Zt(T),wa(T),b||(is(null),il(T)),ee("connected")}catch(T){console.error(T),ee("error")}}async function yl(){if(t.role==="admin")try{ye(await BD()),ee("connected")}catch(b){console.error(b),ee("error")}}async function vl(b=!0){try{const T=await YD(b);ie(T.models),ee("connected"),T.refreshing&&window.setTimeout(()=>void vl(!1),1e3)}catch(T){console.error(T),ie([]),ee("error")}}async function To(){try{const b=await UD();qe(b.codexVersion),ot(b.codexReleasedAt),ee("connected")}catch(b){console.error(b),qe(null),ot(null),ee("error")}}async function Na(b=!1){b&&Ia(!0);try{const T=await WD(b);bt(T.job),aa(T.latest),ee("connected"),T.job&&T.job.status!=="running"&&xi.current===T.job.id&&(xi.current=null,T.job.status==="succeeded"?(await Promise.all([vl(),To()]),Qe("success",`Codex CLI updated to ${Ff(T.job.currentVersion)}`)):Qe("error","Codex CLI update failed",T.job.error??void 0))}catch(T){console.error(T),ee("error")}finally{b&&Ia(!1)}}async function k0(){Qt(!0);try{const b=await KD();xi.current=b.id,bt(b),ee("connected")}catch(b){console.error(b);const T=ft(b);Qe("error","Unable to start Codex CLI update",T.detail??T.message)}finally{Qt(!1)}}A.useEffect(()=>{if(!Tt||(rt==null?void 0:rt.status)!=="running")return;const b=window.setInterval(()=>void Na(),1e3);return()=>window.clearInterval(b)},[Tt,rt==null?void 0:rt.id,rt==null?void 0:rt.status]);async function Ao(b){try{const T=await XD(b);is(T),il(T.effective),ee("connected")}catch(T){console.error(T),is(null),ee("error")}}async function S0(){try{const b=await ZD();no(b),ku(b),ee("connected")}catch(b){console.error(b),ee("error")}}async function Xf(){if(t.role!=="admin"){Z([]);return}try{Z(await cR()),ee("connected")}catch(b){console.error(b),ee("error")}}async function Bu(){if(t.role!=="admin"){V(null);return}U(!0);try{V(await qD()),ee("connected")}catch(b){console.error(b),ee("error")}finally{U(!1)}}async function j0(b=tn){const T=[Cs(),Ci(b),To(),vl(),S0()];t.role==="admin"&&(T.push(Xf()),T.push(Bu()),T.push(yl())),b&&(T.push(wr(b)),T.push(Ao(b)),T.push(jo(b)),T.push(Co(b))),await Promise.all(T)}function qu(){var T;Jn(!1);const b=x??((T=m[0])==null?void 0:T.id)??null;J(!1),hi(b),rl(t.role==="admin"?"global":b?"workspace":"global"),Ut(!0),j0(b)}function C0(){var T;Jn(!1);const b=x??((T=m[0])==null?void 0:T.id)??null;hi(b),rl(b?"workspace":"global"),Ut(!0),j0(b)}function Eo(){var T;J(!1);const b=x??((T=m[0])==null?void 0:T.id)??null;qa(b),Ha(null),ja(null),nn(!0)}function Hr(b){hi(b),rl("workspace"),wr(b),Ao(b),jo(b),Co(b),_a(Rc)}async function No(b){b.preventDefault();try{if(en==="workspace"&&tn){const T=(gn==null?void 0:gn.status)==="running",z=await I3(tn,iz(bu,Un,al));is(z.settings),il(z.settings.effective),On(z.conversation),Qe("success","Workspace settings saved",T?"The current turn keeps its existing settings. Changes apply from the next turn.":void 0)}else{const T=await QD(Ir);Zt(T),wa(T),tn&&await Ao(tn),Qe("success","Global settings saved")}ee("connected")}catch(T){console.error(T),ee("error");const z=ft(T);Qe("error","Failed to save runtime settings",z.detail??z.message)}}async function br(b){try{const T=await JD(b);ye(T),ee("connected"),Qe("success","Deployment settings saved")}catch(T){console.error(T),ee("error");const z=ft(T);throw Qe("error","Failed to save deployment settings",z.detail??z.message),T}}async function xl(){var $;const b=Dn.current,T=ua;if(!T){Qe("error","No workspace selected");return}const z=(($=ne[T.id])==null?void 0:$.status)??T.status;if(z==="running"||z==="initializing"){Qe("error","Stop the running turn before resetting runtime");return}ao(!0),Ha(null);try{const K=await L3(T.id);if(b!==Dn.current)return;ja(K),ee("connected")}catch(K){if(b!==Dn.current)return;console.error(K),ee("error");const de=ft(K);Qe("error","Failed to preview runtime reset",de.detail??de.message)}finally{b===Dn.current&&ao(!1)}}async function Uu(b){const T=Dn.current,z=ua,$=Ua;if(!z||!$||$.conversationId!==z.id){Qe("error","Reset preview is required");return}tr(!0),Ha(null);try{if(await _3(z.id,{warmup:Cu,previewFingerprint:$.fingerprint,selectedEntryIds:b}),T!==Dn.current)return;ja(null),nn(!1),ee("connected"),Qe("success","Reset 已提交,可从工作空间标题旁查看进度或停止"),Aa.current===z.id&&await wr(z.id),await Fn()}catch(K){if(T!==Dn.current)return;console.error(K),ee("error");const de=ft(K);Qe("error","Failed to reset runtime thread",de.detail??de.message)}finally{T===Dn.current&&tr(!1)}}async function Mo(){var K;const b=Dn.current,T=ua;if(!T){Qe("error","No workspace selected");return}const z=((K=ne[T.id])==null?void 0:K.status)??T.status;if(z==="running"||z==="initializing"){Qe("error","Stop the running turn before clearing context");return}if(window.confirm(`Start "${T.title}" from a blank context?
|
|
353
|
-
|
|
354
|
-
This clears Workspace Memory and creates a new Codex thread without restored history. Workspace files, Timeline, metadata, and Base Memory remain intact.`)){ol(!0),Ha(null);try{const de=await L3(T.id);if(b!==Dn.current||(await _3(T.id,{warmup:!1,previewFingerprint:de.fingerprint,selectedEntryIds:[],clearWorkspaceMemory:!0,saveSelection:!1}),b!==Dn.current))return;ja(null),nn(!1),ee("connected"),Qe("success","空白上下文重置已提交,可从工作空间标题旁查看进度或停止"),Aa.current===T.id&&await wr(T.id),await Fn()}catch(de){if(b!==Dn.current)return;console.error(de),ee("error");const Te=ft(de);Qe("error","Failed to clear workspace context",Te.detail??Te.message)}finally{b===Dn.current&&ol(!1)}}}async function Do(b){const T=ua,z=Ua;if(!T||!z||z.conversationId!==T.id)throw new Error("Reset preview is no longer current.");try{await ez(T.id,{previewFingerprint:z.fingerprint,selectedEntryIds:b}),ee("connected")}catch($){console.error($),ee("error");const K=ft($);throw Qe("error","Failed to save reset defaults",K.detail??K.message),$}}async function Hu(b,T){try{const z=await I3(b,{[T]:null});is(z.settings),il(z.settings.effective),On(z.conversation),ee("connected"),Qe("success","Workspace override reset")}catch(z){console.error(z),ee("error"),Qe("error","Failed to reset workspace override")}}async function Ti(b){try{const T=await fz({memory:dz(b),items:b});return no(T),ku(T),ee("connected"),Qe("success","Base memory saved"),T.items}catch(T){throw console.error(T),ee("error"),Qe("error","Failed to save memory"),T}}async function T0(b,T){try{const z=await Gd(b,{memoryItems:T});return On(z),ka({memory:z.memory,items:z.memoryItems}),ee("connected"),Qe("success","Workspace memory saved"),z.memoryItems}catch(z){throw console.error(z),ee("error"),Qe("error","Failed to save memory"),z}}async function zo(b){b.preventDefault();const T=ll.key.trim();if(T)try{if(en==="workspace"&&tn){const z=await mz(tn,T,ll.value,ll.description);Vn($=>[...$.filter(K=>K.key!==z.variable.key),z.variable].sort((K,de)=>K.key.localeCompare(de.key))),On(z.conversation)}else{const z=await hz(T,ll.value,ll.description);Xt($=>[...$.filter(K=>K.key!==z.key),z].sort((K,de)=>K.key.localeCompare(de.key)))}Qe("success",en==="workspace"?"Workspace environment saved":"Base environment saved"),sl({description:"",key:"",value:""}),La(null),ia(z=>{const $=new Set(z);return $.delete(T),$}),ee("connected")}catch(z){console.error(z),ee("error"),Qe("error","Failed to save environment")}}async function bl(b){try{if(en==="workspace"&&tn){const T=await vz(tn,b);Vn(z=>z.filter($=>$.key!==b)),On(T)}else await yz(b),Xt(T=>T.filter(z=>z.key!==b));ro===b&&(sl({description:"",key:"",value:""}),La(null),ia(T=>{const z=new Set(T);return z.delete(b),z})),ee("connected"),Qe("success",en==="workspace"?"Workspace environment deleted":"Base environment deleted")}catch(T){console.error(T),ee("error"),Qe("error","Failed to delete environment")}}async function Zf(b,T){if(T.preventDefault(),!_r.name.trim()){Qe("error","Knowledge name is required");return}const z=lz(_r);try{const $=_r.id?await bz(b,_r.id,z):await xz(b,z);bn(K=>[...K.filter(de=>de.id!==$.id),$].sort(B3)),_a(Rc),ee("connected"),Qe("success","Workspace knowledge saved")}catch($){console.error($),ee("error"),Qe("error","Failed to save workspace knowledge")}}async function ir(b,T){try{await wz(b,T),bn(z=>z.filter($=>$.id!==T)),_r.id===T&&_a(Rc),ee("connected"),Qe("success","Workspace knowledge deleted")}catch(z){console.error(z),ee("error"),Qe("error","Failed to delete workspace knowledge")}}function $u(b){rl("workspace"),_a(sz(b))}function Ma(b){sl({description:b.description,key:b.key,value:""}),La(b.key),ia(T=>{const z=new Set(T);return z.delete(b.key),z}),Ka(b.key,{preserveTypedValue:!0})}function A0(){const b=ro;sl({description:"",key:"",value:""}),La(null),b&&ia(T=>{const z=new Set(T);return z.delete(b),z})}async function Ro(b){await Ka(b)}async function Ka(b,T={}){try{const z=en==="workspace"&&tn?await gz(tn,b):await pz(b);sl($=>$.key===b&&(!T.preserveTypedValue||$.value.length===0)?{...$,value:z}:$),ia($=>new Set($).add(b)),ee("connected")}catch(z){console.error(z),ee("error")}}async function wr(b){var $;if(Pa.current===b)return;const T=(($=yi.current)==null?void 0:$.conversationId)===b,z=await Xc(b);T?ei(z):Jf(z)}async function Fu(b){if(Pa.current!==b)try{const T=await Xc(b);ei(T)}catch(T){console.warn("Failed to synchronize timeline before turn stream",T)}}function Pu(){Be&&R({requestId:Cz(),sourceId:Be.id,name:`${Be.title} - Clone`,groupId:Be.groupId,excludeTopicHistory:!1})}async function E0(b){if(b.preventDefault(),!(X||!q||!q.name.trim())){P(!0);try{const T=await Tz(q.sourceId,q.name.trim(),q.groupId,q.excludeTopicHistory,q.requestId);p(z=>{const $=[T.conversation,...z];return qc(l,r3(au(l),T.conversation.id,$.map(K=>K.id))),Yl(l,$)}),C(T.conversation.id),R(null),J(!1),Qe(T.error?"error":"success",T.error?"克隆初始化失败":"克隆已提交,可在工作空间中查看初始化状态",T.error??void 0)}catch(T){Qe("error","Clone failed",ft(T).detail??ft(T).message)}finally{P(!1)}}}async function kr(){if(Be)try{const b=await Az(Be.id);On(b.conversation),Qe(b.error?"error":"success",b.error?"Clone retry failed":"Clone initialization restarted",b.error??void 0)}catch(b){Qe("error","Clone retry failed",ft(b).detail??ft(b).message)}}async function Ai(b,T={}){var Re,ut,nt,Lt;const z=ne[b];if(!((Re=z==null?void 0:z.history)!=null&&Re.hasMoreBefore)||z.loadingOlder||bi.current.has(b))return;const $=(ut=z==null?void 0:z.history)==null?void 0:ut.oldestTimelineAt,K=(nt=z==null?void 0:z.history)==null?void 0:nt.oldestTimelineSequence,de=$&&K!==null&&K!==void 0?`${$}|${K}`:K==null?(Lt=z==null?void 0:z.history)==null?void 0:Lt.oldestMessageCreatedAt:String(K),Te=Fa.current;if(!de||!Te)return;if(T.preserveAnchor??!0){const kn=c3(Te);vi.current={anchorOffset:kn.anchorOffset,conversationId:b,previousScrollHeight:Te.scrollHeight,anchorTurnId:kn.anchorTurnId}}else vi.current=null;bi.current.add(b),Rt(b,kn=>({...kn,loadingOlder:!0}));try{const kn=await Xc(b,{before:de,limit:k6});D0(kn)}catch(kn){console.error(kn),vi.current=null}finally{bi.current.delete(b),Rt(b,kn=>({...kn,loadingOlder:!1}))}}async function wl(b,T){const z=await jz(b,T||void 0);p($=>{const K=[z,...$];return qc(l,r3(au(l),z.id,K.map(de=>de.id))),Yl(l,K)}),C(z.id),J(!1)}function kl(b){b!==Aa.current&&(F(T=>{if(!(b in T))return T;const z={...T};return delete z[b],z}),C(b))}function Ts(){J(!1),ze({mode:"create",groupId:null,title:""})}function lr(b){ze({mode:"rename",groupId:b.id,title:b.title})}function sr(){var b;J(!1),Ae({mode:"create",conversationId:null,title:"",groupId:(Be==null?void 0:Be.groupId)??((b=y[0])==null?void 0:b.id)})}async function Xa(b){var T;if(b.status!=="running"){oe(!0);try{await Ez(b.id),F($=>{const K={...$};return delete K[b.id],K});const z=Mu.current.filter($=>$.id!==b.id);if(qc(l,$E(au(l),b.id)),dp(l,b.id,""),p(z),x===b.id){const $=((T=z[0])==null?void 0:T.id)??null;cp(l,$),C($)}(ke==null?void 0:ke.conversationId)===b.id&&Yn(),Pe(null),Qe("success","Workspace 已删除,本地数据正在后台清理")}catch(z){const $=ft(z);Qe("error","Failed to delete workspace",$.detail??$.message)}finally{oe(!1)}}}async function da(b){if(!(b.id===s3||!window.confirm(`Delete group "${b.title}"?
|
|
355
|
-
|
|
356
|
-
Workspaces in this group will move to Default.`)))try{const z=await ND(b.id),$=Bd(l,z.groups);k($),hp(l,$);const K=Yl(l,z.conversations);p(K),qd(l,K),lo(de=>{const Te=new Set(de);return Te.delete(b.id),fp(l,Te),Te})}catch(z){console.error(z)}}function fa(b){Ae({mode:"rename",conversationId:b.id,title:b.title})}function Yn(){it(!1),Ae(null)}function As(){ze(null)}async function Gu(b,T){const z=T.trim(),$=m.find(de=>de.id===b);if(!$||!z||z===$.title){Yn();return}const K=await Gd(b,{title:z});On(K),Yn()}function Oo(b){return b instanceof HTMLInputElement||b instanceof HTMLTextAreaElement}function Vu(b){return b instanceof Element&&!!b.closest("input, button")}function Rn(b,T){const z=document.elementFromPoint(b,T);return z instanceof HTMLElement?z.closest(".session-item[data-workspace-id]"):null}function $t(b,T){const z=document.elementFromPoint(b,T);return z instanceof HTMLElement?z.closest(".workspace-group[data-group-id]"):null}function kt(b,T,z){const $=Rn(T,z),K=$==null?void 0:$.dataset.workspaceId;if($&&K&&K!==b){qr({kind:"workspace",id:K,position:bN($,z)});return}const de=$t(T,z),Te=de==null?void 0:de.dataset.groupId;if(!Te){qr(null);return}qr({kind:"group",id:Te})}function Za(b,T){if(!b.isPrimary||b.button!==0||Vu(b.target))return;b.pointerType!=="touch"&&b.currentTarget.setPointerCapture(b.pointerId),vs.current={id:T,pointerId:b.pointerId,startX:b.clientX,startY:b.clientY};const z=b.currentTarget,$=b.pointerId;ho.begin(b,()=>{z.isConnected&&(z.setPointerCapture($),gi(T),qr(null))})}function Sr(b,T){const z=vs.current;if(!ho.allows(b.pointerType)||!z||z.id!==T||z.pointerId!==b.pointerId)return;const $=Math.hypot(b.clientX-z.startX,b.clientY-z.startY);if(cl!==T){if($<i3)return;gi(T),qr(null)}b.preventDefault(),sa({x:b.clientX,y:b.clientY}),kt(T,b.clientX,b.clientY)}async function Yu(b,T){var Te;ho.end(),cl===T&&b.preventDefault(),b.currentTarget.hasPointerCapture(b.pointerId)&&b.currentTarget.releasePointerCapture(b.pointerId),vs.current=null;const z=cl===T;z&&(Du.current=!0);const $=wn;if(!z||!$){gi(null),qr(null),sa(null);return}const K=m.find($e=>$e.id===T),de=$.kind==="group"?$.id:(Te=m.find($e=>$e.id===$.id))==null?void 0:Te.groupId;if(!K||!de){gi(null),qr(null),sa(null);return}if(p($e=>{const Re=$.kind==="workspace"?wN($e.map(ut=>ut.id===T?{...ut,groupId:de}:ut),T,$.id,$.position):[...$e.filter(ut=>ut.id!==T),{...K,groupId:de}];return qc(l,K1(Re.map(ut=>ut.id),au(l))),Re}),K.groupId!==de)try{const $e=await Gd(T,{groupId:de});On($e)}catch($e){console.error($e),await Fn()}gi(null),qr(null),sa(null)}function Qa(b){ho.end(),b.currentTarget.hasPointerCapture(b.pointerId)&&b.currentTarget.releasePointerCapture(b.pointerId),vs.current=null,gi(null),qr(null),sa(null)}function N0(b,T){if(!b.isPrimary||b.button!==0)return;b.pointerType!=="touch"&&b.currentTarget.setPointerCapture(b.pointerId),po.current={id:T,pointerId:b.pointerId,startX:b.clientX,startY:b.clientY};const z=b.currentTarget,$=b.pointerId;mo.begin(b,()=>{z.isConnected&&(z.setPointerCapture($),io(T),$a(null))})}function M0(b,T){const z=po.current;if(!mo.allows(b.pointerType)||!z||z.id!==T||z.pointerId!==b.pointerId)return;const $=Math.hypot(b.clientX-z.startX,b.clientY-z.startY);if(os!==T){if($<i3)return;io(T),$a(null)}b.preventDefault();const K=$t(b.clientX,b.clientY),de=K==null?void 0:K.dataset.groupId;$a(de&&de!==T?de:null)}function Sl(b,T){mo.end(),b.currentTarget.hasPointerCapture(b.pointerId)&&b.currentTarget.releasePointerCapture(b.pointerId);const z=os===T;z&&(b.preventDefault(),zu.current=!0);const $=y0;z&&$&&k(K=>{const de=kN(K,T,$);return M6(l,de.map(Te=>Te.id)),de}),po.current=null,io(null),$a(null)}function Ei(b){mo.end(),b.currentTarget.hasPointerCapture(b.pointerId)&&b.currentTarget.releasePointerCapture(b.pointerId),po.current=null,io(null),$a(null)}function Wu(b){const T=b.target.value;Ae(z=>z&&{...z,title:T})}function Es(b){const T=b.target.value;Ae(z=>z&&{...z,groupId:T})}function Ku(b){const T=b.target.value;ze(z=>z&&{...z,title:T})}async function Ni(b){if(b.preventDefault(),!ke)return;const T=ke.title.trim();if(T){it(!0);try{if(ke.mode==="create"){await wl(T,ke.groupId),Yn();return}ke.conversationId&&await Gu(ke.conversationId,T)}catch(z){console.error(z);const $=ft(z);Qe("error",ke.mode==="create"?"Failed to create workspace":"Failed to rename workspace",$.detail??$.message)}finally{it(!1)}}}function jr(b){b.key==="Escape"&&(b.preventDefault(),b.stopPropagation(),Yn())}async function Ja(b){if(b.preventDefault(),!Me)return;const T=Me.title.trim();if(T)try{if(Me.mode==="rename"){if(!Me.groupId)return;const $=await ED(Me.groupId,{title:T});k(K=>K.map(de=>de.id===$.id?$:de)),As();return}const z=await AD(T);k($=>[...$,z]),lo($=>{const K=new Set($);return K.delete(z.id),fp(l,K),K}),As()}catch(z){console.error(z)}}function $r(b){b.key==="Escape"&&(b.preventDefault(),b.stopPropagation(),As())}async function Xu(b){b.preventDefault(),await Ns()}function Zu(b){x&&ms.current.set(x,(ms.current.get(x)??0)+1),c(b),dp(l,x,b)}function ha(b,T,z){const $={conversationId:b,version:z};if(!e2($,{conversationId:b,version:ms.current.get(b)??0}))return;dp(l,b,"");const K=Aa.current;K&&e2($,{conversationId:K,version:ms.current.get(K)??0})&&c(de=>de.trim()===T?"":de)}function Io(b){if(ps.current.has(b))return null;const T=Symbol(b);return ps.current.set(b,T),h(z=>{const $=new Set(z);return $.add(b),$}),T}function or(b,T){ps.current.get(b)===T&&(ps.current.delete(b),h(z=>{const $=new Set(z);return $.delete(b),$}))}function yn(b){const T=ft(b);Qe("error","Message was not confirmed",`${T.message}. Your text is still in the composer and can be retried.`)}async function Ns(b={}){const T=u.trim();if(!T)return;const z=x,$=q7({hasConversation:z!==null,messageSubmitting:z!==null&&ps.current.has(z),hasActiveTurn:z!==null&&vr.current.has(z),hasConfirmedCurrentTurn:z!==null&&hl.current.has(z)},!!b.forceNewTurn);if($==="create-workspace"){sr();return}if($==="blocked"||!z)return;const K=ms.current.get(z)??0,de=Io(z);if(!de)return;if($==="queue-turn"){await Qf(z,T,K,de);return}if($==="steer-turn"){await fn(z,T,K,de);return}const Te=`local-${Date.now()}`;Rt(z,Re=>({...Re,messages:[...Re.messages,{id:Te,role:"user",content:T,createdAt:new Date().toISOString()}],status:"running"})),Pr(z,"running"),Cr(z,!0);let $e=!1;try{let Re=null;const ut=Ne(`conversations/${z}/turns`),nt=await fetch(ut,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:T,receiptOnly:!0})});if(nt.ok){const Lt=await nt.json();if(Lt.inputId&&Lt.message){Da(z,Te,Lt.message),$e=!0,ha(z,T,K),or(z,de),Cr(z,!1),Ju(z,{waitMs:15e3});return}if(!Lt.turnId)throw new Error("Turn did not return a turn id");if(Re=Lt.turnId,!Lt.message)throw new Error("Turn did not return the persisted message");Da(z,Te,Lt.message,Re),$e=!0,ha(z,T,K)}else{const Lt=await cN(nt);if(Lt){Re=Lt;const kn=await tc(z,Lt,T);if(!kn.ok)throw await Kn(kn,{method:"POST",url:Ne(`conversations/${z}/turns/${Lt}/steer`)});const El=await kn.json();if(!El.message)throw new Error("Steer did not return the persisted message");Da(z,Te,El.message,Lt),$e=!0,ha(z,T,K)}else throw await Kn(nt,{method:"POST",url:ut})}if(!Re)throw await Kn(nt,{method:"POST",url:ut});ec(z,Re),or(z,de)}catch(Re){$e||yn(Re);const ut=uN(Re);ut&&Qe("error","Reset thread required","This thread does not support the required Seele tools. Reset this workspace thread and try again."),Rt(z,nt=>({...nt,status:"error",messages:$e?nt.messages:nt.messages.filter(Lt=>Lt.id!==Te),events:[...nt.events,{id:nt.events.length+1,event:"client.error",data:ut?{message:"Reset thread required",detail:"This thread does not support the required Seele tools. Reset this workspace thread and try again."}:Us(Re),createdAt:new Date().toISOString()}]})),Pr(z,"error"),Cr(z,!1),await Fn()}finally{or(z,de)}}async function Qu(b){const T=Ga.current.get(b)??[];if(T.length===0)return;const[z,...$]=T;Ga.current.set(b,$),await ec(b,z)}async function Ju(b,T={}){if(Pa.current===b||ys.current.has(b)||ar.current.has(b))return;zn(b),gs.current.delete(b);const z=new AbortController;ar.current.set(b,z),Cr(b,!0);try{const $=T.waitMs?`?waitMs=${T.waitMs}`:"",K=Ne(`conversations/${b}/turns/current/events${$}`),de=await fetch(K,{signal:z.signal});if(!de.ok||!de.body)throw await Kn(de,{method:"GET",url:K});ca(b),hl.current.add(b),await Fu(b),await F3(de.body,Te=>{const $e=j3(Te,`stream-${Date.now()}-${Math.random().toString(36).slice(2)}`);$e.turnId&&!vr.current.has(b)&&vr.current.set(b,$e.turnId),Rt(b,ut=>({...ut,status:Vd($e)??ut.status,events:S3(ut.events,$e)}));const Re=Vd($e);Re&&Pr(b,Re)}),await wr(b),await Fn()}catch($){if(!T3($)){if(oN($)){ar.current.get(b)===z&&wo(b);return}Rt(b,K=>({...K,status:"error",events:[...K.events,{id:K.events.length+1,event:"client.error",data:Us($),createdAt:new Date().toISOString()}]}))}}finally{ar.current.get(b)===z&&(hl.current.delete(b),vr.current.delete(b),ar.current.delete(b),Cr(b,!1),await Qu(b))}}async function ec(b,T,z={}){if(Pa.current===b)return;const $=vr.current.get(b);if($===T)return;if($||ar.current.has(b)){const de=Ga.current.get(b)??[];de.includes(T)||Ga.current.set(b,[...de,T]);return}ca(b);const K=new AbortController;ar.current.set(b,K),vr.current.set(b,T),Cr(b,!0);try{const de=Ne(`conversations/${b}/turns/${T}/events`),Te=await fetch(de,{signal:K.signal});if(!Te.ok||!Te.body)throw await Kn(Te,{method:"GET",url:de});await Fu(b),await F3(Te.body,$e=>{const Re=j3($e,`stream-${Date.now()}-${Math.random().toString(36).slice(2)}`);Rt(b,nt=>({...nt,status:Vd(Re)??nt.status,events:S3(nt.events,Re)}));const ut=Vd(Re);ut&&Pr(b,ut)}),await wr(b),await Fn()}catch(de){if(!T3(de)){if(z.recovered&&sN(de)){await wr(b),await Fn();return}Rt(b,Te=>({...Te,status:"error",events:[...Te.events,{id:Te.events.length+1,event:"client.error",data:Us(de),createdAt:new Date().toISOString()}]}))}}finally{ar.current.get(b)===K&&(vr.current.get(b)===T&&vr.current.delete(b),ar.current.delete(b),Cr(b,!1),await Qu(b))}}async function Qf(b,T,z,$){let K=!1;const de=`local-queued-${Date.now()}`;Rt(b,Te=>({...Te,messages:[...Te.messages,{id:de,role:"user",content:T,createdAt:new Date().toISOString()}]}));try{const Te=Ne(`conversations/${b}/turns`),$e=await fetch(Te,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:T,mode:"queue",receiptOnly:!0})});if(!$e.ok)throw await Kn($e,{method:"POST",url:Te});const Re=await $e.json();if(!Re.turnId&&!Re.inputId)throw new Error("Queued turn did not return a turn id");if(!Re.message)throw new Error("Queued turn did not return the persisted message");Da(b,de,Re.message,Re.turnId),K=!0,ha(b,T,z),Re.turnId?ec(b,Re.turnId):Ju(b,{waitMs:15e3}),or(b,$),await Fn(),Qe("success",Re.inputId?"Message accepted":Re.queuePosition?`Queued as next turn (${Re.queuePosition})`:"Started new turn")}catch(Te){K||yn(Te),Rt(b,$e=>({...$e,messages:K?$e.messages:$e.messages.filter(Re=>Re.id!==de),events:[...$e.events,{id:$e.events.length+1,event:"client.error",data:Us(Te),createdAt:new Date().toISOString()}]}))}finally{or(b,$)}}async function fn(b,T,z,$){const K=vr.current.get(b);let de=!1;const Te=`local-steer-${Date.now()}`;Rt(b,$e=>({...$e,messages:[...$e.messages,{id:Te,role:"user",content:T,createdAt:new Date().toISOString(),turnId:K??null}],status:"running"}));try{const $e=Ne(K?`conversations/${b}/turns/${K}/steer`:`conversations/${b}/turns/steer`),Re=await fetch($e,u3(T));if(!Re.ok)throw await Kn(Re,{method:"POST",url:$e});const ut=await Re.json();if(!ut.message)throw new Error("Steer did not return the persisted message");Da(b,Te,ut.message,K),de=!0,ha(b,T,z),or(b,$)}catch($e){yn($e),Rt(b,Re=>({...Re,messages:de?Re.messages:Re.messages.filter(ut=>ut.id!==Te),events:[...Re.events,{id:Re.events.length+1,event:"client.error",data:Us($e),createdAt:new Date().toISOString()}]}))}finally{or(b,$)}}async function tc(b,T,z){return fetch(Ne(`conversations/${b}/turns/${T}/steer`),u3(z))}function Da(b,T,z,$){Rt(b,K=>({...K,messages:Zd(K.messages.filter(de=>de.id!==T),[{...z,turnId:$??z.turnId??null}])}))}async function Ms(){var $;if(!x||xr!=="running"&&xr!=="initializing"&&!Ya)return;const b=x,T=xr,z=`client-stop-${Date.now()}`;Lu(b),($=ar.current.get(b))==null||$.abort(),vr.current.delete(b),Ga.current.delete(b),Cr(b,!1),Rt(b,K=>({...K,status:"done",events:[...K.events,{id:z,event:"server.stop",data:{source:"client"},createdAt:new Date().toISOString()}]})),Pr(b,"done");try{const K=await _o(b);ca(b),Rt(b,de=>({...de,status:K})),Pr(b,K),Promise.all([wr(b),Fn()]).catch(de=>{console.warn("Failed to refresh workspace after Stop",de)})}catch(K){wo(b),Rt(b,Te=>({...Te,status:T==="initializing"?"initializing":"running",events:[...Te.events.filter($e=>$e.id!==z),{id:Te.events.length+1,event:"client.error",data:Us(K),createdAt:new Date().toISOString()}]})),Pr(b,T==="initializing"?"initializing":"running");const de=ft(K);Qe("error","Stop failed",de.detail??de.message);try{await Fn()}catch(Te){console.warn("Failed to refresh workspace after Stop failed",Te)}}}async function _o(b){const T=Ne(`conversations/${b}/turns/interrupt`),z=await fetch(T,{method:"POST"});if(!z.ok)throw await Kn(z,{method:"POST",url:T});return UE(await z.json().catch(()=>null))}async function jl(){var K;const b=Dn.current,T=ua;if(!T){Qe("error","No workspace selected");return}if(!window.confirm(`Force stop and repair "${T.title}"?
|
|
357
|
-
|
|
358
|
-
This cancels every current or queued turn, kills its runtime, and repairs scheduler state. Future scheduled wakeups are preserved.`))return;const $=T.id;tr(!0),Lu($),(K=ar.current.get($))==null||K.abort(),vr.current.delete($),Ga.current.delete($),Cr($,!1);try{const de=await _o($);ca($),Rt($,Te=>({...Te,status:de})),Pr($,de),Aa.current===$&&await wr($),await Fn(),Qe("success","Workspace stopped and repaired")}catch(de){wo($);const Te=ft(de);Qe("error","Force stop failed",Te.detail??Te.message);try{await Fn()}catch($e){console.warn("Failed to refresh workspace after force Stop failed",$e)}}finally{b===Dn.current&&tr(!1)}}async function Fr(b,T){if(!x||!b.approvalTurnId||b.approvalRequestId===void 0)return;const z=x;try{const $=Ne(`conversations/${z}/turns/${b.approvalTurnId}/approvals/${encodeURIComponent(String(b.approvalRequestId))}`),K=await fetch($,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({decision:T})});if(!K.ok)throw await Kn(K,{method:"POST",url:$});Rt(z,de=>({...de,events:[...de.events,{id:de.events.length+1,event:"server.approval.decision",data:{requestId:b.approvalRequestId,decision:T,source:"client"},createdAt:new Date().toISOString()}]}))}catch($){Rt(z,de=>({...de,events:[...de.events,{id:de.events.length+1,event:"client.error",data:Us($),createdAt:new Date().toISOString()}]}));const K=ft($);Qe("error","Failed to respond to approval",K.detail??K.message)}}async function Cl(b,T,z){const $=x,K=b.workspaceChangeProposalId??b.responsibilityProposalId;if(!$||!K)return!1;try{const de=Ne(`conversations/${$}/workspace-change-proposals/${encodeURIComponent(K)}`),Te=await fetch(de,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({decision:T,payload:T==="accept"?z??b.workspaceChangePayload:void 0})});if(!Te.ok)throw await Kn(Te,{method:"POST",url:de});const $e=await Te.json(),Re=VE(T,$e.decision),ut=Re==="accept"?$e.payload??z??b.workspaceChangePayload:null;return On($e.conversation),Rt($,nt=>({...nt,events:[...nt.events,{id:`${b.id}:${Re}`,event:"server.workspace_change.decision",data:{proposalId:K,changeType:b.workspaceChangeType??"responsibility",decision:Re,payload:ut},createdAt:new Date().toISOString()}]})),Qe("success",Re==="accept"?"Workspace change applied":"Workspace change declined"),!0}catch(de){console.error(de);const Te=ft(de);return Qe("error","Failed to respond to workspace change proposal",Te.detail??Te.message),!1}}async function Mi(b,T,z){const $=x;if(!(!$||!b.knowledgeProposalId))try{let K;if(T==="accept")try{K=JSON.parse(z??b.body)}catch{Qe("error","Knowledge proposal JSON is invalid");return}const de=Ne(`conversations/${$}/knowledge-proposals/${encodeURIComponent(b.knowledgeProposalId)}`),Te=await fetch(de,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({decision:T,knowledge:K})});if(!Te.ok)throw await Kn(Te,{method:"POST",url:de});const $e=await Te.json();bn([...$e.items??[]].sort(B3)),Rt($,Re=>({...Re,events:[...Re.events,{id:`${b.id}:${T}`,event:"server.knowledge.decision",data:{proposalId:b.knowledgeProposalId,decision:T,knowledge:T==="accept"?$e.item:null},createdAt:new Date().toISOString()}]})),Qe("success",T==="accept"?"Workspace knowledge saved":"Knowledge proposal declined")}catch(K){console.error(K);const de=ft(K);Qe("error","Failed to respond to knowledge proposal",de.detail??de.message)}}function Jf(b){Pa.current!==b.id&&(ko(b.id,b.status),z0(b),F(T=>{const z=T[b.id],$=b.events.map(K=>({id:K.id,turnId:K.turnId,seq:K.seq,event:K.event,data:K.data,createdAt:K.createdAt}));return{...T,[b.id]:{messages:b.messages,events:$d($,(z==null?void 0:z.events)??[]),timelineNodes:Jd(b.timelineNodes??[],(z==null?void 0:z.timelineNodes)??[]),turns:Qd(b.turns??[],(z==null?void 0:z.turns)??[]),contextVersions:b.contextVersions??[],status:b.status,history:_u(b),loadingOlder:!1,fullEventTurnIds:(z==null?void 0:z.fullEventTurnIds)??new Set,loadingEventTurnIds:(z==null?void 0:z.loadingEventTurnIds)??new Set}}}))}function D0(b){const T=_u(b);Rt(b.id,z=>{var $,K,de;return{...z,messages:Zd(b.messages,z.messages),timelineNodes:Jd(b.timelineNodes??[],z.timelineNodes),turns:Qd(b.turns??[],z.turns),events:$d(b.events.map(Te=>({id:Te.id,turnId:Te.turnId,seq:Te.seq,event:Te.event,data:Te.data,createdAt:Te.createdAt})),z.events),contextVersions:((($=b.contextVersions)==null?void 0:$.length)??0)>0?b.contextVersions??[]:z.contextVersions,history:{...T,loadedMessageCount:T.loadedMessageCount+(((K=z.history)==null?void 0:K.loadedMessageCount)??z.messages.length),loadedEventCount:T.loadedEventCount+(((de=z.history)==null?void 0:de.loadedEventCount)??z.events.length)},loadingOlder:!1}})}function ei(b){if(Pa.current===b.id)return;const T=_u(b),z=b.events.map($=>({id:$.id,turnId:$.turnId,seq:$.seq,event:$.event,data:$.data,createdAt:$.createdAt}));Rt(b.id,$=>{var K,de,Te;return{...$,messages:Zd($.messages,b.messages),timelineNodes:Jd($.timelineNodes,b.timelineNodes??[]),turns:Qd($.turns,b.turns??[]),events:$d(z,$.events),contextVersions:(((K=b.contextVersions)==null?void 0:K.length)??0)>0?b.contextVersions??[]:$.contextVersions,status:b.status,history:{...$.history??T,messageTotal:T.messageTotal,eventTotal:T.eventTotal,loadedMessageCount:Math.max(((de=$.history)==null?void 0:de.loadedMessageCount)??$.messages.length,$.messages.length,b.messages.length),loadedEventCount:Math.max(((Te=$.history)==null?void 0:Te.loadedEventCount)??$.events.length,$.events.length,b.events.length)},loadingOlder:!1}})}function Rt(b,T){F(z=>{if(Pa.current===b)return z;const $=z[b]??{messages:[],events:[],timelineNodes:[],turns:[],contextVersions:[],status:"idle",history:null,loadingOlder:!1,fullEventTurnIds:new Set,loadingEventTurnIds:new Set};return{...z,[b]:T($)}})}function Pr(b,T){p(z=>z.map($=>$.id===b?{...$,status:T,updatedAt:new Date().toISOString()}:$))}function z0(b){On(b)}function On(b){p(T=>Yl(l,T.map(z=>z.id===b.id?{...z,...b}:z)))}async function nc(b,T){const z=T.filter($=>{const K=ne[b];return K&&!K.fullEventTurnIds.has($)&&!K.loadingEventTurnIds.has($)});if(z.length!==0){Rt(b,$=>{const K=new Set($.loadingEventTurnIds);for(const de of z)K.add(de);return{...$,loadingEventTurnIds:K}});try{const $=await Promise.all(z.map(K=>Z6(b,K)));Rt(b,K=>{const de=new Set(K.fullEventTurnIds),Te=new Set(K.loadingEventTurnIds),$e=$.flatMap((Re,ut)=>{const nt=z[ut];return de.add(nt),Te.delete(nt),Re.map(Lt=>({id:Lt.id,turnId:Lt.turnId,seq:Lt.seq,event:Lt.event,data:Lt.data,createdAt:Lt.createdAt}))});return{...K,events:$d(K.events,$e),fullEventTurnIds:de,loadingEventTurnIds:Te}})}catch($){console.error($),Rt(b,K=>{const de=new Set(K.loadingEventTurnIds);for(const Te of z)de.delete(Te);return{...K,loadingEventTurnIds:de}}),Qe("error","Failed to load process details")}}}function Cr(b,T){const z=new Set(ys.current);T?z.add(b):z.delete(b),ys.current=z,Pf($=>{const K=new Set($);return T?K.add(b):K.delete(b),K})}function Ds(b){lo(T=>{const z=new Set(T);return z.has(b)?z.delete(b):z.add(b),fp(l,z),z})}function R0(b){var T;return HE(b.status,(T=b.nextWakeup)==null?void 0:T.status,Ca.has(b.id))}function Lo(b){var $;const T=($=hs.current)==null?void 0:$.getBoundingClientRect(),z=T?b-T.left:b;return Q1(z)}function Di(b){b.preventDefault(),b.currentTarget.setPointerCapture(b.pointerId),Ur(Lo(b.clientX))}function zi(b){b.currentTarget.hasPointerCapture(b.pointerId)&&(b.preventDefault(),Ur(Lo(b.clientX)))}function O0(b){b.currentTarget.hasPointerCapture(b.pointerId)&&b.currentTarget.releasePointerCapture(b.pointerId);const T=Lo(b.clientX);Ur(T),fN(l,T)}return s.jsx(s.Fragment,{children:s.jsxs("main",{className:`shell${H?" mobile-sidebar-open":""}`,ref:hs,style:{"--sidebar-width":`${cs}px`},children:[s.jsxs("aside",{className:"sidebar",inert:M,children:[t.role==="admin"?s.jsx(UN,{onOpen:()=>{qu(),Jn(!0)}}):null,s.jsxs("div",{className:"sidebar-header",children:[s.jsxs("div",{children:[s.jsxs("p",{className:"eyebrow brand-line",children:[s.jsx("span",{children:"Seele"}),ve?t.role==="admin"?s.jsxs("a",{"aria-label":`Open Seele Host control for Work v${ve}`,className:"work-version-link",href:`${Z1()}admin/host`,title:"Open Seele Host control: versions, restart, and logs",children:["v",ve,s.jsx("span",{"aria-hidden":"true",children:"↗"})]}):s.jsxs("span",{children:["v",ve]}):null,s.jsx("span",{"aria-label":P3(O),className:`backend-status ${O}`,"data-label":P3(O)})]}),s.jsxs("div",{className:"sidebar-title-row",children:[s.jsx("h2",{children:"Workspaces"}),e?s.jsx("button",{"aria-label":`Sign out ${t.username}`,className:"sign-out-button",onClick:a,title:`Sign out ${t.username}`,type:"button",children:"Sign out"}):null]})]}),s.jsxs("div",{className:"sidebar-header-actions",children:[s.jsx("button",{"aria-label":"Close workspace list",className:"mobile-sidebar-dismiss",onClick:()=>J(!1),title:"Close workspace list",type:"button",children:"×"}),s.jsx("button",{"aria-label":"New workspace",className:"new-workspace-button",type:"button",onClick:sr,children:"+"})]})]}),s.jsx("nav",{className:"session-list","aria-label":"Workspaces",children:Ea.map(b=>s.jsxs("section",{className:["workspace-group",os===b.id?"dragging":"",y0===b.id?"drop-after":"",(wn==null?void 0:wn.kind)==="group"&&wn.id===b.id?"drop-into":""].filter(Boolean).join(" "),"data-group-id":b.id,children:[s.jsxs("div",{className:"workspace-group-header",children:[s.jsxs("button",{"aria-expanded":!oa.has(b.id),className:(rn==null?void 0:rn.kind)==="group"&&rn.id===b.id?"workspace-group-toggle keyboard-focused":"workspace-group-toggle","data-keyboard-focus-key":Fs({kind:"group",id:b.id}),onClick:T=>{if(zu.current){T.preventDefault(),zu.current=!1;return}Ds(b.id)},onDoubleClick:T=>{T.preventDefault(),T.stopPropagation(),lr(b)},onPointerCancel:Ei,onPointerDown:T=>N0(T,b.id),onPointerMove:T=>M0(T,b.id),onPointerUp:T=>Sl(T,b.id),type:"button",children:[s.jsx("span",{className:oa.has(b.id)?"workspace-group-caret collapsed":"workspace-group-caret","aria-hidden":"true",children:"▾"}),s.jsx("span",{onDoubleClick:T=>{T.preventDefault(),T.stopPropagation(),lr(b)},title:"Double-click to rename",children:b.title})]}),b.id!==s3?s.jsx("button",{"aria-label":`Delete group ${b.title}`,className:"workspace-group-delete",onClick:T=>{T.stopPropagation(),da(b)},title:"Delete group",type:"button",children:"×"}):null]}),oa.has(b.id)?null:s.jsx("div",{className:"workspace-group-items",children:b.conversations.map(T=>{const z=R0(T);return s.jsxs("div",{className:["session-item",(rn==null?void 0:rn.kind)==="workspace"&&rn.id===T.id?"keyboard-focused":"",T.id===x?"active":"",T.id===cl?"dragging":"",(wn==null?void 0:wn.kind)==="workspace"&&wn.id===T.id?`drop-${wn.position}`:""].filter(Boolean).join(" "),"data-keyboard-focus-key":Fs({kind:"workspace",id:T.id}),"data-workspace-id":T.id,onClick:$=>{if(Du.current){$.preventDefault(),Du.current=!1;return}kl(T.id),J(!1)},onDoubleClick:$=>{Vu($.target)||($.preventDefault(),fa(T))},onKeyDown:$=>{Oo($.target)||$.key==="Enter"&&(kl(T.id),J(!1))},onPointerCancel:Qa,onPointerDown:$=>Za($,T.id),onPointerMove:$=>Sr($,T.id),onPointerUp:$=>Yu($,T.id),role:"button",tabIndex:0,children:[s.jsxs("span",{className:"session-heading",children:[s.jsx("span",{"aria-label":lf(z,T.nextWakeup,rr),className:`session-status ${z}`,title:lf(z,T.nextWakeup,rr)}),s.jsx("span",{className:"session-title",title:"Double-click to rename",children:T.title}),z==="waiting"&&T.nextWakeup?s.jsx("span",{className:"session-countdown",title:lf(z,T.nextWakeup,rr),children:wf(T.nextWakeup,rr)}):null,T.unreadTurnCount>0?s.jsx("span",{"aria-label":`${T.unreadTurnCount} unread turns`,className:"session-unread",title:`${T.unreadTurnCount} unread turns`,children:T.unreadTurnCount>99?"99+":T.unreadTurnCount}):null,z!=="running"?s.jsx("button",{"aria-label":`Delete ${T.title}`,className:"session-delete",onClick:$=>{$.stopPropagation(),Pe(T)},title:"Delete workspace and local data",type:"button",children:"×"}):null]}),s.jsxs("span",{className:"session-workspace",title:T.workspacePath,children:["workspaces/",ou(T.id)]})]},T.id)})})]},b.id))}),s.jsx("footer",{className:"sidebar-footer",children:s.jsxs("div",{className:"sidebar-actions","aria-label":"Workspace actions",children:[s.jsx("button",{"aria-label":"Settings",className:"sidebar-action-button",onClick:qu,type:"button",children:s.jsx(E3,{})}),s.jsx("button",{"aria-label":"New group",className:"sidebar-action-button",onClick:Ts,type:"button",children:s.jsx(mD,{})}),s.jsx("button",{"aria-label":"Collaboration topics",className:"sidebar-action-button",onClick:()=>{ju(!0),J(!1)},type:"button",children:s.jsx(ef,{})}),s.jsx("button",{"aria-label":"Console",className:"sidebar-action-button",onClick:Eo,type:"button",children:s.jsx(pD,{})}),s.jsx(xM,{usage:b0})]})})]}),s.jsx("button",{"aria-label":"Close workspace list",className:"mobile-sidebar-backdrop",onClick:()=>J(!1),tabIndex:H?0:-1,type:"button"}),s.jsx("div",{"aria-label":"Resize sidebar",className:"sidebar-resizer",onPointerDown:Di,onPointerMove:zi,onPointerUp:O0,role:"separator",tabIndex:0}),Ru&&us?s.jsxs("div",{className:"workspace-drag-preview",style:{transform:`translate3d(${us.x+12}px, ${us.y+10}px, 0)`},children:[s.jsx("span",{className:"workspace-drag-title",children:Ru.title}),s.jsxs("span",{className:"workspace-drag-path",children:["workspaces/",ou(Ru.id)]})]}):null,ke?s.jsx("div",{className:"workspace-editor-overlay",onKeyDown:jr,role:"presentation",children:s.jsxs("form",{className:"workspace-editor",onKeyDown:jr,onSubmit:b=>void Ni(b),children:[s.jsx("label",{className:"workspace-editor-label",htmlFor:"workspace-title",children:"Workspace name"}),s.jsx("input",{autoFocus:!0,id:"workspace-title",onChange:Wu,onKeyDown:jr,value:ke.title}),ke.mode==="create"?s.jsxs(s.Fragment,{children:[s.jsx("label",{className:"workspace-editor-label",htmlFor:"workspace-group",children:"Group"}),s.jsx("select",{id:"workspace-group",onChange:Es,onKeyDown:jr,value:ke.groupId??((zs=y[0])==null?void 0:zs.id)??"",children:y.map(b=>s.jsx("option",{value:b.id,children:b.title},b.id))})]}):null,s.jsxs("div",{className:"workspace-editor-actions",children:[s.jsx("button",{type:"button",onClick:Yn,children:"Cancel"}),s.jsx("button",{disabled:He,type:"submit",children:He?"Saving...":ke.mode==="create"?"Create":"Save"})]})]})}):null,Me?s.jsx("div",{className:"workspace-editor-overlay",onKeyDown:$r,role:"presentation",children:s.jsxs("form",{className:"workspace-editor",onKeyDown:$r,onSubmit:b=>void Ja(b),children:[s.jsx("label",{className:"workspace-editor-label",htmlFor:"workspace-group-title",children:"Group name"}),s.jsx("input",{autoFocus:!0,id:"workspace-group-title",onChange:Ku,onKeyDown:$r,value:Me.title}),s.jsxs("div",{className:"workspace-editor-actions",children:[s.jsx("button",{type:"button",onClick:As,children:"Cancel"}),s.jsx("button",{type:"submit",children:Me.mode==="create"?"Create":"Save"})]})]})}):null,Ze?s.jsx(zN,{startWithAccounts:ra,currentUser:t,conversations:m,editingEnvironmentKey:ro,deploymentSettings:pr,environmentDraft:ll,globalEnvironment:er,workspaceEnvironment:Bn,memorySettings:d0,memorySettingsDraft:wu,workspaceMemoryDraft:f0,runtimeSettings:Un,runtimeModels:Le,runtimeCodexVersion:we,runtimeCodexReleasedAt:Ge,runtimeCodexUpdating:(rt==null?void 0:rt.status)==="running",runtimeSettingsDraft:Ir,runtimeSettingsScope:en,settingsWorkspace:gn,settingsWorkspaceId:tn,systemDiagnostics:me,systemDiagnosticsLoading:Ce,workspaceGroups:Ea,workspaceRuntimeSettings:al,workspaceRuntimeSettingsDraft:bu,managedUsers:he,onCancelEnvironmentEdit:A0,onClose:()=>Ut(!1),onCreateUser:async b=>{const T=await dR(b);Z(z=>[...z,T]),Qe("success","User created")},onDeleteUser:async b=>{await hR(b),Z(T=>T.filter(z=>z.id!==b)),Qe("success","User deleted")},onSaveDeploymentSettings:br,onDeleteEnvironment:b=>void bl(b),onDraftChange:sl,onEditEnvironment:Ma,onRevealEnvironmentValue:b=>void Ro(b),onSaveBaseMemoryItems:b=>Ti(b),onSaveResponsibility:async(b,T)=>{try{const z=await Gd(b,{responsibility:T});return On(z),ee("connected"),Qe("success","Workspace responsibility saved"),z.responsibility}catch(z){throw console.error(z),ee("error"),Qe("error","Failed to save workspace responsibility"),z}},onSaveWorkspaceMemoryItems:b=>tn?T0(tn,b):Promise.reject(new Error("No workspace selected")),onRuntimeDraftChange:wa,onCodexAccountSwitched:async()=>{Qe("success","Codex account selection saved"),(await gb()).codexAccountsReady&&await Promise.all([So(),vl(!0),To()])},onUpdateCodexCli:()=>{yt(!0),Na(!0)},onRuntimeScopeChange:rl,onSettingsWorkspaceChange:Hr,onSubmitRuntimeSettings:b=>void No(b),onWorkspaceRuntimeDraftChange:il,onWorkspaceRuntimeReset:b=>tn?void Hu(tn,b):void 0,revealedEnvironmentKeys:Su,onSubmitEnvironment:b=>void zo(b),onRefreshSystemDiagnostics:()=>void Bu(),onUpdateUser:async(b,T)=>{const z=await fR(b,T);Z($=>$.map(K=>K.id===z.id?z:K)),Qe("success","User updated")}}):null,Tt?s.jsx(DN,{currentReleasedAt:Ge,currentVersion:we,job:rt,latest:nl,latestChecking:fi,starting:Ht,onClose:()=>yt(!1),onRefresh:()=>void Na(),onStart:()=>void k0()}):null,Ba&&Be?s.jsx(CN,{conversation:Be,clockNow:rr,knowledgeDraft:_r,workspaceKnowledge:Mn,tokenUsage:ml,onCancelKnowledgeEdit:()=>_a(Rc),onDeleteKnowledge:b=>void ir(Be.id,b),onEditKnowledge:$u,onKnowledgeDraftChange:_a,onSubmitKnowledge:b=>void Zf(Be.id,b),onClose:()=>mi(!1)}):null,h0?s.jsx(TN,{conversations:m,onClose:()=>ju(!1),workspaceGroups:Ea}):null,Sa?s.jsx(NN,{busy:p0||ls,conversation:ua??null,conversationId:Hn,forceStopBusy:ls,preview:(Ua==null?void 0:Ua.conversationId)===Hn?Ua:null,previewLoading:gr,result:g0,status:Vf,warmup:Cu,workspaceGroups:Ea,onClose:()=>nn(!1),onCancelResetPreview:()=>ja(null),onForceStop:()=>void jl(),onPreviewReset:()=>void xl(),onStartBlankContext:()=>void Mo(),onResetRuntime:b=>void Uu(b),onSaveResetSelection:Do,onWorkspaceChange:b=>{qa(b),Ha(null),ja(null)},onWarmupChange:m0}):null,q?s.jsx("div",{className:"dialog-backdrop",role:"presentation",onMouseDown:()=>!X&&R(null),children:s.jsxs("form",{className:"dialog-card clone-dialog",onSubmit:E0,onMouseDown:b=>b.stopPropagation(),children:[s.jsxs("header",{children:[s.jsxs("div",{children:[s.jsx("h2",{children:"Clone workspace"}),s.jsx("p",{children:"复制成功完成的对话历史与可复用配置到独立 workspace。历史将分批整理压缩,优先保留有效决策与未完成事项。"})]}),s.jsx("button",{"aria-label":"Close",className:"icon-button",onClick:()=>R(null),type:"button",children:"×"})]}),s.jsxs("label",{children:[s.jsx("span",{children:"Name"}),s.jsx("input",{autoFocus:!0,value:q.name,onChange:b=>R(T=>T&&{...T,name:b.target.value})})]}),s.jsxs("label",{children:[s.jsx("span",{children:"Group"}),s.jsx("select",{value:q.groupId,onChange:b=>R(T=>T&&{...T,groupId:b.target.value}),children:Ea.map(b=>s.jsx("option",{value:b.id,children:b.title},b.id))})]}),s.jsxs("label",{children:[s.jsxs("span",{children:[s.jsx("input",{type:"checkbox",checked:q.excludeTopicHistory,disabled:X,onChange:b=>R(T=>T&&{...T,excludeTopicHistory:b.target.checked})})," 排除 Topic 相关历史回复"]}),s.jsx("small",{children:"保留用户直接输入;Topic 消息和成员关系原本就不复制。普通对话中转述的 Topic 内容不会自动清除。"})]}),s.jsxs("footer",{children:[s.jsx("button",{className:"secondary",disabled:X,onClick:()=>R(null),type:"button",children:"Cancel"}),s.jsx("button",{disabled:X||!q.name.trim(),type:"submit",children:X?"Cloning...":"Clone"})]})]})}):null,_?s.jsx("div",{className:"dialog-backdrop",role:"presentation",onMouseDown:()=>N(null),children:s.jsxs("section",{"aria-labelledby":"system-event-detail-title","aria-modal":"true",className:"dialog-card system-event-detail-dialog",onMouseDown:b=>b.stopPropagation(),role:"dialog",children:[s.jsxs("header",{children:[s.jsxs("div",{children:[s.jsx("h2",{id:"system-event-detail-title",children:_.title}),s.jsx("p",{children:lt(_.createdAt)})]}),s.jsx("button",{"aria-label":"Close",className:"icon-button",onClick:()=>N(null),type:"button",children:"×"})]}),s.jsx("div",{className:"system-event-detail-content",children:s.jsx(iu,{content:_.fullDetail??_.detail??"No additional details.",conversation:Be,streaming:!1,onPreviewArtifact:Br,onCopyArtifactUrl:Wa,copiedArtifactUrl:la})}),s.jsx("footer",{children:s.jsx("button",{className:"secondary",onClick:()=>N(null),type:"button",children:"Close"})})]})}):null,pe?s.jsx("div",{className:"memory-editor-overlay",onClick:()=>{Ke||Pe(null)},role:"presentation",children:s.jsxs("section",{"aria-label":"Confirm workspace deletion","aria-modal":"true",className:"memory-delete-dialog workspace-delete-dialog",onClick:b=>b.stopPropagation(),role:"dialog",children:[s.jsxs("header",{children:[s.jsx("strong",{children:"删除 Workspace"}),s.jsx("button",{"aria-label":"Close workspace deletion confirmation",className:"memory-icon-button",disabled:Ke,onClick:()=>Pe(null),title:"Close",type:"button",children:"×"})]}),s.jsxs("p",{children:["删除 ",s.jsx("strong",{children:pe.title}),"?本地文件和历史数据将永久清理,无法恢复。"]}),s.jsx("code",{children:pe.workspacePath}),s.jsxs("div",{className:"memory-delete-actions",children:[s.jsx("button",{className:"memory-dialog-button",disabled:Ke,onClick:()=>Pe(null),type:"button",children:"Cancel"}),s.jsx("button",{className:"memory-dialog-button danger",disabled:Ke,onClick:()=>void Xa(pe),type:"button",children:Ke?"正在删除…":"删除并清理数据"})]})]})}):null,ss?s.jsxs("div",{className:`app-toast ${ss.tone}`,role:"status",children:[s.jsx("strong",{children:ss.text}),ss.detail?s.jsx("pre",{children:ss.detail}):null]}):null,s.jsx("section",{className:"conversation",hidden:M,style:M?{display:"none"}:void 0,children:!M&&s.jsxs(s.Fragment,{children:[s.jsxs("header",{className:"topbar",children:[s.jsxs("div",{className:"topbar-main",children:[s.jsx("button",{"aria-label":"Show workspaces",className:"mobile-workspace-menu",onClick:()=>J(!0),title:"Workspaces",type:"button",children:s.jsx(hD,{})}),s.jsxs("div",{className:"topbar-heading",children:[s.jsx("div",{className:"topbar-title-row",children:s.jsx("h1",{children:(Be==null?void 0:Be.title)??"New workspace"})}),Be?s.jsxs("div",{className:"topbar-workspace-row",children:[s.jsxs("p",{className:"topbar-workspace",children:["workspaces/",ou(Be.id)]}),s.jsx(AN,{workspace:Be,refreshKey:p0},Be.id)]}):null]})]}),s.jsx("div",{className:"topbar-actions",children:Be?s.jsxs(s.Fragment,{children:[Be.threadUpgradeRequired?s.jsx("button",{"aria-label":"Reset required for latest thread tools",className:"topbar-icon-button thread-upgrade-button",onClick:Eo,title:`当前 Thread 工具集已过期(${Be.threadCapabilityVersion} / ${Be.requiredThreadCapabilityVersion}),点击进行 Reset`,type:"button",children:s.jsx(ag,{})}):null,s.jsx("button",{"aria-label":"Clone workspace",className:"topbar-icon-button",onClick:Pu,title:"Clone workspace",type:"button",children:s.jsx(X6,{})}),s.jsxs("button",{className:`context-button has-usage ${sg(pl??0)}`,onClick:()=>mi(!0),style:{"--context-usage":`${$f(pl??0)}%`},title:ml&&pl!==null?`Context ${Math.round(pl)}% · ${Rr(ml.totalTokens)} / ${rf(ml.modelContextWindow)}`:"Context 0% · no usage recorded yet",type:"button",children:[s.jsx("span",{children:"Context"}),s.jsxs("strong",{children:[Math.round(pl??0),"%"]})]}),s.jsx("button",{"aria-label":"Workspace settings",className:"topbar-icon-button",onClick:C0,title:"Workspace settings",type:"button",children:s.jsx(E3,{})})]}):null})]}),(Be==null?void 0:Be.status)==="initialization_failed"&&Be.cloneLineage?s.jsxs("div",{className:"clone-initialization-error",children:[s.jsxs("div",{children:[s.jsx("strong",{children:"克隆初始化失败"}),s.jsx("span",{children:Be.cloneLineage.initializationError??Be.statusError??"初始化未完成,可在当前工作空间重试。"})]}),s.jsx("button",{onClick:()=>void kr(),type:"button",children:"重试初始化"})]}):null,(Be==null?void 0:Be.status)==="initializing"&&Be.cloneLineage?s.jsxs("div",{className:"clone-initialization-status",role:"status",children:[s.jsx("strong",{children:Be.cloneLineage.initializationStatus==="copying"?"正在复制历史记录":Be.cloneLineage.initializationStatus==="injecting"?"正在注入历史并压缩上下文":"正在完成线程初始化"}),s.jsxs("span",{children:["快照截止 ",lt(Be.cloneLineage.snapshotAt)," · 已复制 ",Be.cloneLineage.importedMessageCount," 条记录。可离开页面,初始化会继续。"]})]}):null,s.jsx("div",{className:"stream",onScroll:()=>void Wf(),onWheel:Ss,onTouchStart:Ss,onPointerDown:Ss,onKeyDown:Ss,ref:Fa,style:{scrollPaddingBottom:ds},children:s.jsxs("div",{className:"stream-inner",style:{paddingBottom:ds},children:[ki.length===0?s.jsx("div",{className:"empty-state",children:s.jsx("h2",{children:"Start a workspace"})}):null,s.jsxs("section",{className:"message-log","aria-label":"Conversation messages",children:[Be!=null&&Be.cloneLineage&&Si.size>0?s.jsxs("div",{className:"clone-history-boundary clone-history-source",children:[s.jsxs("strong",{children:["Inherited from ",Be.cloneLineage.sourceWorkspaceTitle]}),s.jsxs("span",{children:["through ",lt(Be.cloneLineage.snapshotAt)," · ",Be.cloneLineage.importedMessageCount," messages"]})]}):null,(Al=At==null?void 0:At.history)!=null&&Al.hasMoreBefore?s.jsx("button",{className:"history-loader",type:"button",disabled:At.loadingOlder,"aria-busy":At.loadingOlder,onClick:()=>x&&void Ai(x),children:At.loadingOlder?"正在加载更早消息…":"加载更早消息"}):null,vo.map((b,T)=>{var Te,$e,Re,ut;const z=((Te=b.user)==null?void 0:Te.type)==="system",$=b.turnIds.some(nt=>Si.has(nt)),K=vo[T+1],de=$&&(!K||!K.turnIds.some(nt=>Si.has(nt)));return s.jsxs(A.Fragment,{children:[s.jsxs("section",{className:`turn-group${$?" clone-history-turn":""}`,"data-turn-id":b.id,children:[b.user?s.jsxs("div",{className:`turn-panel ${z?"system-turn":"user-turn"}`,children:[Ps(b.user,Be,Br,Wa,la,Fr,Cl,Mi,N),s.jsx(Uc,{copied:ul===`${z?"system":"user"}-${b.id}-bottom`,content:Hc(b.user),id:`${z?"system":"user"}-${b.id}-bottom`,timestamp:b.user.createdAt,variant:"outside",onCopy:js})]}):null,b.followupUsers.length>0?s.jsx("div",{className:"turn-followup-users","aria-label":"Additional turn input",children:b.followupUsers.map(nt=>s.jsxs("div",{className:"turn-panel user-turn followup-user-turn",children:[s.jsx("span",{className:"followup-user-label",children:"Added while running"}),Ps(nt,Be,Br,Wa,la,Fr,Cl,Mi,N),s.jsx(Uc,{copied:ul===`user-${nt.id}-bottom`,content:Hc(nt),id:`user-${nt.id}-bottom`,timestamp:nt.createdAt,variant:"outside",onCopy:js})]},nt.id))}):null,!!(($e=b.cotaskNotices)!=null&&$e.length)&&s.jsxs("details",{className:"cotask-turn-notices",children:[s.jsxs("summary",{children:["CoTask updates · ",b.cotaskNotices.length]}),b.cotaskNotices.map(nt=>s.jsx("div",{children:Ps(nt,Be,Br,Wa,la,Fr,Cl,Mi,N)},nt.id))]}),(Re=b.acceptedSystemInputs)==null?void 0:Re.map(nt=>s.jsxs("div",{className:"turn-panel system-turn",children:[Ps(nt,Be,Br,Wa,la,Fr,Cl,Mi,N),s.jsx(Uc,{copied:ul===`system-${nt.id}-bottom`,content:Hc(nt),id:`system-${nt.id}-bottom`,timestamp:nt.createdAt,variant:"outside",onCopy:js})]},nt.id)),b.agentItems.length>0||b.stopped?s.jsx(O6,{group:b,conversation:Be,allowProcessView:!$,copiedFooter:ul===`agent-${b.id}-bottom`,copiedArtifactUrl:la,running:!$&&Vc(b.turnIds,bs),onCopyArtifactUrl:Wa,onCopyBubble:js,onPreviewArtifact:Br,onLoadProcessDetails:nt=>Be&&!$?nc(Be.id,nt):void 0,onRespondApproval:Fr,onRespondWorkspaceChangeProposal:Cl,onRespondKnowledgeProposal:Mi,onOpenSystemEvent:N}):null,(ut=b.trailingSystemItems)==null?void 0:ut.map(nt=>s.jsxs("div",{className:"turn-panel system-turn",children:[Ps(nt,Be,Br,Wa,la,Fr,Cl,Mi,N),s.jsx(Uc,{copied:ul===`system-${nt.id}-bottom`,content:Hc(nt),id:`system-${nt.id}-bottom`,timestamp:nt.createdAt,variant:"outside",onCopy:js})]},nt.id))]}),de?s.jsx("div",{className:"clone-history-boundary clone-history-end",children:"Clone starts here"}):null]},b.id)})]})]})}),s.jsxs("form",{className:"composer",onSubmit:Xu,ref:Eu,children:[ji?s.jsxs("div",{className:`global-activity ${ji.tone??"running"}`,children:[ks?s.jsx("button",{"aria-label":"Stop current workspace activity",className:"turn-stop activity-stop",onClick:()=>void Ms(),title:"Stop current workspace activity",type:"button",children:s.jsx(oM,{})}):s.jsx("span",{className:"activity-wait-dot","aria-hidden":"true"}),s.jsxs("div",{className:"global-activity-text",children:[s.jsx("span",{children:ji.title}),ji.detail?s.jsx("small",{children:ji.detail}):null]}),ks?s.jsx("span",{className:"activity-spinner","aria-hidden":"true"}):null]}):null,s.jsx(W3,{value:u,onChange:Zu,textareaRef:$n,sendDisabled:ws.sendDisabled,disabled:ws.textareaDisabled,allowNewTurn:!0,onShortcut:b=>void Ns({forceNewTurn:b})})]}),Lr?s.jsx("div",{className:"artifact-lightbox",onClick:()=>Br(null),role:"presentation",children:s.jsxs("figure",{className:"artifact-lightbox-card",onClick:b=>b.stopPropagation(),children:[s.jsx("button",{"aria-label":"Close preview",className:"artifact-lightbox-close",onClick:()=>Br(null),type:"button",children:"×"}),s.jsx("img",{alt:Lr.name,src:Lr.url}),s.jsxs("figcaption",{children:[s.jsx("span",{children:Lr.name}),s.jsxs("div",{className:"artifact-lightbox-actions",children:[s.jsx("a",{href:Lr.url,rel:"noreferrer",target:"_blank",children:"Open in new tab"}),s.jsx("button",{onClick:()=>void Wa(Lr),type:"button",children:la===Lr.url?"Copied":"Copy URL"})]})]})]})}):null]})}),x&&s.jsx(sE,{ownerId:x,ownerName:(Be==null?void 0:Be.title)??"Workspace",request:Xd,onExpanded:Nu,renderMarkdown:(b,T)=>{var z;return es(b,T?{id:T,workspacePath:((z=m.find($=>$.id===T))==null?void 0:z.workspacePath)??""}:void 0)},renderMember:b=>s.jsx(jN,{workspaceId:b},b)},x)]})})}async function Xd(e,t,n){const a=Ne(e),l=await fetch(a,{method:n??(t===void 0?"GET":"POST"),headers:t===void 0?void 0:{"Content-Type":"application/json"},body:t===void 0?void 0:JSON.stringify(t)});return await Ve(l,{url:a}),l.json()}function jN({workspaceId:e}){var it;const[t,n]=A.useState(null),[a,l]=A.useState(""),[u,c]=A.useState(""),f=A.useRef(!1),h=A.useRef(0),[m,p]=A.useState({executionId:null}),y=A.useRef(null),k=A.useRef(!0),x=A.useRef(null),[C,M]=A.useState(null),[I,_]=A.useState(""),[N,q]=A.useState(!1),[R,X]=A.useState(!1),[P,H]=A.useState(null),[J,ne]=A.useState(null),F=A.useRef(!1),te=A.useRef(new Map),se=`conversations/${encodeURIComponent(e)}`;function ve(pe,Pe=!1){n(Ke=>{const oe=new Map;for(const Me of[...(Ke==null?void 0:Ke.events)??[],...te.current.values(),...pe.events])oe.set(Me.id,Me);return Ke?{...pe,messages:Zd(Pe?Ke.messages:pe.messages,Pe?pe.messages:Ke.messages),turns:Qd(Pe?pe.turns:Ke.turns,Pe?Ke.turns:pe.turns),timelineNodes:Jd(Pe?pe.timelineNodes??[]:Ke.timelineNodes??[],Pe?Ke.timelineNodes??[]:pe.timelineNodes??[]),events:[...oe.values()],history:Pe||!F.current?pe.history:Ke.history}:{...pe,events:[...oe.values()]}})}async function be(){return Promise.all([Xc(e),Xd(`${se}/cotask-guidance`)])}async function he(){const[pe,Pe]=await be();ve(pe),p(Pe)}A.useEffect(()=>{const pe=y.current;pe&&(x.current?(pe.scrollTop=x.current.top+pe.scrollHeight-x.current.height,x.current=null):k.current&&(pe.scrollTop=pe.scrollHeight))},[t]),A.useEffect(()=>{const pe=y.current;if(!pe||typeof ResizeObserver>"u")return;const Pe=new ResizeObserver(()=>{k.current&&(pe.scrollTop=pe.scrollHeight)});return Pe.observe(pe),()=>Pe.disconnect()},[!!t]),A.useEffect(()=>{let pe=!0,Pe=!1;const Ke=async()=>{if(!Pe){Pe=!0;try{const[Me,ze]=await be();pe&&(ve(Me),p(ze),c(""))}catch(Me){pe&&c(String(Me))}finally{Pe=!1}}};Ke();const oe=window.setInterval(()=>void Ke(),2e3);return()=>{pe=!1,window.clearInterval(oe)}},[e]);async function Z(pe,Pe={}){q(!0),l("");try{return await Xd(`${se}/${pe}`,Pe),await he(),!0}catch(Ke){return l(String(Ke)),!1}finally{q(!1)}}const me=(pe,Pe)=>{pe.approvalTurnId&&pe.approvalRequestId!==void 0&&Z(`turns/${pe.approvalTurnId}/approvals/${encodeURIComponent(String(pe.approvalRequestId))}`,{decision:Pe})},V=async(pe,Pe,Ke)=>{const oe=pe.workspaceChangeProposalId??pe.responsibilityProposalId;return oe?Z(`workspace-change-proposals/${encodeURIComponent(oe)}`,{decision:Pe,payload:Pe==="accept"?Ke??pe.workspaceChangePayload:void 0}):!1},Ce=async(pe,Pe,Ke)=>{if(pe.knowledgeProposalId)try{await Z(`knowledge-proposals/${encodeURIComponent(pe.knowledgeProposalId)}`,{decision:Pe,knowledge:Pe==="accept"?JSON.parse(Ke??pe.body):void 0})}catch(oe){l(String(oe))}};async function U(pe){try{const Pe=await Promise.all(pe.map(Ke=>Z6(e,Ke)));for(const Ke of Pe.flat())te.current.set(Ke.id,Ke);await he()}catch(Pe){l(String(Pe))}}async function E(){const pe=t==null?void 0:t.history;if(!pe||R)return;const Pe=pe.oldestTimelineAt&&pe.oldestTimelineSequence!==null?`${pe.oldestTimelineAt}|${pe.oldestTimelineSequence}`:pe.oldestMessageCreatedAt;if(Pe){X(!0);try{const Ke=await Xc(e,{before:Pe});F.current=!0,y.current&&(x.current={height:y.current.scrollHeight,top:y.current.scrollTop}),ve(Ke,!0)}catch(Ke){l(String(Ke))}finally{X(!1)}}}const Y=t==null?void 0:t.turns.find(pe=>["running","queued","waiting_input","waiting_approval"].includes(pe.status)),O=!!m.executionId;async function ee(pe){if(pe==null||pe.preventDefault(),!O||!I.trim()||f.current||N)return;const Pe=I.trim(),Ke=h.current,oe=m.executionId;f.current=!0,q(!0),l("");try{await Xd(`${se}/cotask-guidance`,{executionId:oe,message:Pe}),k.current=!0,h.current===Ke&&_(""),he().catch(Me=>c(String(Me)))}catch(Me){l(String(Me))}finally{f.current=!1,q(!1)}}const ke=t?_6(t.messages,t.events,t.turns,t.timelineNodes??[],(Y==null?void 0:Y.id)??null,new Map):[],Ae=pe=>{navigator.clipboard.writeText(pe.url).then(()=>M(pe.url)).catch(Pe=>l(String(Pe)))},He=pe=>Ps(pe,t??void 0,H,Ae,C,me,V,Ce,ne);return s.jsxs("div",{className:"cotask-member-content",children:[(a||u)&&s.jsx("p",{role:"alert",className:"cotask-error",children:a||u}),t?s.jsxs(s.Fragment,{children:[s.jsxs("header",{className:"cotask-member-toolbar",children:[s.jsxs("span",{children:["Member status: ",t.status]}),(Y||t.status==="running")&&s.jsx("button",{disabled:N,onClick:()=>void Z("turns/interrupt"),children:"Stop"})]}),s.jsxs("div",{className:"cotask-member-timeline",ref:y,onScroll:pe=>{const Pe=pe.currentTarget;k.current=Pe.scrollHeight-Pe.scrollTop-Pe.clientHeight<48},children:[((it=t.history)==null?void 0:it.hasMoreBefore)&&s.jsx("button",{disabled:R,onClick:()=>void E(),children:R?"Loading…":"Load earlier history"}),ke.map(pe=>{var Pe,Ke,oe;return s.jsxs("section",{className:"turn-group",children:[pe.user&&He(pe.user),pe.followupUsers.map(Me=>s.jsx(A.Fragment,{children:He(Me)},Me.id)),!!((Pe=pe.cotaskNotices)!=null&&Pe.length)&&s.jsxs("details",{className:"cotask-turn-notices",children:[s.jsxs("summary",{children:["CoTask updates · ",pe.cotaskNotices.length]}),pe.cotaskNotices.map(Me=>s.jsx(A.Fragment,{children:He(Me)},Me.id))]}),(Ke=pe.acceptedSystemInputs)==null?void 0:Ke.map(Me=>s.jsx(A.Fragment,{children:He(Me)},Me.id)),s.jsx(O6,{group:pe,conversation:t,copiedFooter:C===pe.id,copiedArtifactUrl:C,running:!!(Y&&pe.turnIds.includes(Y.id)),onCopyArtifactUrl:Ae,onCopyBubble:(Me,ze)=>{navigator.clipboard.writeText(ze).then(()=>M(Me)).catch(Ze=>l(String(Ze)))},onLoadProcessDetails:U,onPreviewArtifact:H,onRespondApproval:me,onRespondWorkspaceChangeProposal:V,onRespondKnowledgeProposal:Ce,onOpenSystemEvent:ne}),(oe=pe.trailingSystemItems)==null?void 0:oe.map(Me=>s.jsx(A.Fragment,{children:He(Me)},Me.id))]},pe.id)}),!ke.length&&s.jsx("p",{children:"Member created. Waiting for task activity."})]}),s.jsxs("form",{className:"cotask-member-reply",onSubmit:pe=>void ee(pe),children:[s.jsx(W3,{value:I,onChange:pe=>{h.current++,_(pe)},disabled:!O,sendDisabled:N||!O||!I.trim(),label:"给角色补充引导",sendLabel:"发送",onShortcut:()=>void ee(),placeholder:O?"补充引导 · Cmd/Ctrl + Enter":"节点执行期间可补充引导"}),s.jsx("small",{className:"cotask-guidance-hint",children:O?Y?"补充当前节点的过程引导":"节点等待中,恢复执行时接收引导":"当前没有正在执行的任务,暂不可发送。"})]})]}):s.jsx("p",{children:"Loading member activity…"}),P&&s.jsxs("div",{className:"cotask-detail-overlay",role:"dialog","aria-label":"Artifact preview",onKeyDown:pe=>{pe.key==="Escape"&&(pe.stopPropagation(),H(null))},children:[s.jsx("button",{onClick:()=>H(null),children:"Close preview"}),s.jsxs("a",{href:P.url,target:"_blank",rel:"noreferrer",children:["Open in new tab: ",P.name]}),s.jsx("iframe",{title:P.name,src:P.url,sandbox:"allow-scripts",referrerPolicy:"no-referrer"})]}),J&&s.jsxs("div",{className:"cotask-detail-overlay",role:"dialog","aria-label":"Execution event",onKeyDown:pe=>{pe.key==="Escape"&&(pe.stopPropagation(),ne(null))},children:[s.jsx("button",{onClick:()=>ne(null),children:"Close details"}),s.jsx("h3",{children:J.title}),s.jsx(iu,{content:J.fullDetail??J.detail??"No further details",conversation:t??void 0,onPreviewArtifact:H,onCopyArtifactUrl:Ae,copiedArtifactUrl:C})]})]})}function CN({conversation:e,clockNow:t,knowledgeDraft:n,workspaceKnowledge:a,tokenUsage:l,onCancelKnowledgeEdit:u,onDeleteKnowledge:c,onEditKnowledge:f,onKnowledgeDraftChange:h,onSubmitKnowledge:m,onClose:p}){const[y,k]=A.useState("overview"),[x,C]=A.useState(!1),[M,I]=A.useState(!1),[_,N]=A.useState(null),[q,R]=A.useState(null),[X,P]=A.useState(!1),[H,J]=A.useState(null),[ne,F]=A.useState(null),[te,se]=A.useState(!1),[ve,be]=A.useState(null),[he,Z]=A.useState(null),me=cb(l),V=f1(e,e.status),Ce=_?Pz(_):null;A.useEffect(()=>{C(!1),N(null),R(null),J(null),F(null),be(null),Z(null)},[e.id]),A.useEffect(()=>{y==="additionalContext"&&!H&&E()},[y,H]),A.useEffect(()=>{y==="compactions"&&!ve&&Y()},[y,ve]);const U=()=>{C(!0),I(!0),R(null),tz(e.id).then(O=>N(O)).catch(O=>{const ee=ft(O);R(ee.detail?`${ee.message}
|
|
359
|
-
${ee.detail}`:ee.message)}).finally(()=>I(!1))},E=()=>{P(!0),F(null),rz(e.id).then(O=>J(O)).catch(O=>{const ee=ft(O);F(ee.detail?`${ee.message}
|
|
360
|
-
${ee.detail}`:ee.message)}).finally(()=>P(!1))},Y=()=>{se(!0),Z(null),az(e.id).then(O=>be(O)).catch(O=>{const ee=ft(O);Z(ee.detail?`${ee.message}
|
|
361
|
-
${ee.detail}`:ee.message)}).finally(()=>se(!1))};return s.jsx("div",{className:"context-panel-overlay workspace-context-overlay",onClick:p,role:"presentation",children:s.jsxs("section",{"aria-label":"Workspace context",className:"context-panel workspace-context-panel",onClick:O=>O.stopPropagation(),children:[s.jsxs("header",{className:"context-panel-header workspace-context-header",children:[s.jsxs("div",{children:[s.jsx("h2",{children:"Workspace Context"}),s.jsx("p",{children:"Long-lived context assets and observable state for this workspace."})]}),s.jsx("button",{"aria-label":"Close context panel",onClick:p,type:"button",children:"×"})]}),s.jsxs("div",{className:"workspace-context-body",children:[s.jsxs("nav",{className:"settings-nav workspace-context-nav","aria-label":"Workspace context sections",children:[s.jsxs("button",{className:y==="overview"?"active":void 0,onClick:()=>k("overview"),type:"button",children:[s.jsx("span",{children:"Overview"}),s.jsx("small",{children:"Identity + state"})]}),s.jsxs("button",{className:y==="responsibility"?"active":void 0,onClick:()=>k("responsibility"),type:"button",children:[s.jsx("span",{children:"Responsibility"}),s.jsx("small",{children:"Long-lived role"})]}),s.jsxs("button",{className:y==="knowledge"?"active":void 0,onClick:()=>k("knowledge"),type:"button",children:[s.jsx("span",{children:"Knowledge"}),s.jsx("small",{children:"Sources + skills"})]}),s.jsxs("button",{className:y==="runtime"?"active":void 0,onClick:()=>k("runtime"),type:"button",children:[s.jsx("span",{children:"Runtime View"}),s.jsx("small",{children:"Thread + tokens"})]}),s.jsxs("button",{className:y==="compactions"?"active":void 0,onClick:()=>k("compactions"),type:"button",children:[s.jsx("span",{children:"Compactions"}),s.jsx("small",{children:"Context history"})]}),s.jsxs("button",{className:y==="additionalContext"?"active":void 0,onClick:()=>k("additionalContext"),type:"button",children:[s.jsx("span",{children:"Additional Context"}),s.jsx("small",{children:"Injected keys"})]})]}),s.jsx("div",{className:"workspace-context-content",children:y==="overview"?s.jsxs("div",{className:"workspace-context-grid",children:[s.jsxs("section",{className:`context-card wide workspace-status-detail ${V}`,children:[s.jsx("h3",{children:"Current Status"}),s.jsx(Mt,{label:"Status",value:lf(V,e.nextWakeup,t)}),e.nextWakeup?s.jsxs(s.Fragment,{children:[s.jsx(Mt,{label:"Wakeup state",value:e.nextWakeup.status}),s.jsx(Mt,{label:"Wake at",value:Xi(e.nextWakeup.wakeAt)}),e.nextWakeup.status==="scheduled"?s.jsx(Mt,{label:"Remaining",value:wf(e.nextWakeup,t)}):null,s.jsx(Mt,{label:"Created by",value:e.nextWakeup.createdBy}),s.jsx(Mt,{label:"Attempts",value:`${e.nextWakeup.attemptCount} / ${e.nextWakeup.maxAttempts}`,mono:!0}),s.jsxs("div",{className:"workspace-status-detail-text",children:[s.jsx("span",{children:"Wakeup instruction"}),s.jsx("pre",{children:e.nextWakeup.instruction})]}),e.nextWakeup.error?s.jsxs("div",{className:"workspace-status-detail-text error",children:[s.jsx("span",{children:"Wakeup error"}),s.jsx("pre",{children:e.nextWakeup.error})]}):null]}):null,e.statusError?s.jsxs("div",{className:"workspace-status-detail-text error",children:[s.jsx("span",{children:"Error"}),s.jsx("pre",{children:e.statusError})]}):e.status==="error"||e.status==="initialization_failed"?s.jsx("p",{className:"context-muted",children:"No persisted error detail is available for this status."}):null]}),s.jsxs("section",{className:"context-card",children:[s.jsx("h3",{children:"Workspace"}),s.jsx(Mt,{label:"Name",value:e.title}),s.jsx(Mt,{label:"ID",value:`workspaces/${ou(e.id)}`,mono:!0}),s.jsx(Mt,{label:"Path",value:e.workspacePath,mono:!0})]}),s.jsxs("section",{className:"context-card",children:[s.jsx("h3",{children:"Context Assets"}),s.jsx(Mt,{label:"Responsibility",value:e.responsibility.trim()?"configured":"missing"}),s.jsx(Mt,{label:"Memory",value:e.memory.trim()?"configured":"empty"}),s.jsx(Mt,{label:"Knowledge",value:`${a.length} item${a.length===1?"":"s"}`})]}),s.jsxs("section",{className:"context-card wide",children:[s.jsx("h3",{children:"Current Responsibility"}),e.responsibility.trim()?s.jsx("div",{className:"context-markdown-preview",children:es(e.responsibility,e)}):s.jsx("p",{className:"context-muted",children:"No approved responsibility is configured yet."})]}),s.jsxs("section",{className:"context-card wide",children:[s.jsx("h3",{children:"Knowledge Index"}),s.jsx(R6,{items:a,onDelete:c,onEdit:O=>{f(O),k("knowledge")}})]})]}):y==="responsibility"?s.jsxs("section",{className:"context-tab-surface",children:[s.jsx("header",{className:"settings-section-header",children:s.jsxs("div",{children:[s.jsx("h3",{children:"Workspace Responsibility"}),s.jsx("p",{children:"User-approved long-lived role for this workspace. Edit it from Settings in workspace scope."})]})}),e.responsibility.trim()?s.jsx("div",{className:"context-card context-markdown-preview",children:es(e.responsibility,e)}):s.jsx("p",{className:"context-card context-muted",children:"No approved responsibility is configured yet."})]}):y==="knowledge"?s.jsx(XN,{draft:n,items:a,scope:"workspace",workspaceName:e.title,onCancel:u,onDelete:c,onDraftChange:h,onEdit:f,onSubmit:m}):y==="runtime"?s.jsxs("div",{className:"workspace-context-grid",children:[s.jsxs("section",{className:"context-card",children:[s.jsx("h3",{children:"Runtime"}),s.jsx(Mt,{label:"Runtime thread",value:e.codexThreadId??"not started",mono:!0}),s.jsxs("div",{className:"thread-read-actions",children:[s.jsx("button",{disabled:M,onClick:U,type:"button",children:M?"Reading...":"Read Codex thread"}),x?s.jsx("button",{disabled:M,onClick:()=>C(!1),type:"button",children:"Hide"}):null]})]}),s.jsxs("section",{className:"context-card",children:[s.jsx("h3",{children:"Token Window"}),l?s.jsxs(s.Fragment,{children:[s.jsx(Mt,{label:"Used",value:me===null?"unknown":`${Math.round(me)}%`,mono:!0}),s.jsx(Mt,{label:"Latest usage",value:l.modelContextWindow?`${Rr(l.totalTokens)} / ${Rr(l.modelContextWindow)}`:Rr(l.totalTokens),mono:!0}),me!==null?s.jsx("div",{className:`context-token-bar ${sg(me)}`,children:s.jsx("span",{style:{width:`${$f(me)}%`}})}):null,s.jsx(Mt,{label:"Input / output",value:`${rf(l.inputTokens)} / ${rf(l.outputTokens)}`,mono:!0}),s.jsx(Mt,{label:"Reasoning",value:rf(l.reasoningOutputTokens),mono:!0}),s.jsxs("p",{className:"context-muted",children:["Updated ",lt(l.createdAt),"."]})]}):s.jsx("p",{className:"context-muted",children:"No token usage event has been observed in the loaded event window yet."})]}),x?s.jsxs("section",{className:"context-card wide thread-read-panel",children:[s.jsx("h3",{children:"Runtime thread profile"}),s.jsx("p",{className:"context-muted",children:"One-time live thread/read response from Codex app-server. Seele does not persist this profile result."}),M?s.jsx("p",{className:"context-muted",children:"Reading Codex thread..."}):q?s.jsx("pre",{className:"thread-read-error",children:q}):_?s.jsxs(s.Fragment,{children:[Ce?s.jsx(rM,{summary:Ce}):null,s.jsxs("details",{className:"thread-read-raw",open:!0,children:[s.jsx("summary",{children:"Raw thread/read JSON"}),s.jsx("pre",{className:"thread-read-dump",children:JSON.stringify(_,null,2)})]})]}):s.jsx("p",{className:"context-muted",children:"No thread/read result loaded yet."})]}):null]}):y==="compactions"?s.jsxs("section",{className:"context-tab-surface",children:[s.jsxs("header",{className:"settings-section-header",children:[s.jsxs("div",{children:[s.jsx("h3",{children:"Context Compactions"}),s.jsx("p",{children:"Compaction history recorded for the current runtime thread."})]}),s.jsx("button",{className:"context-refresh-button",disabled:te,onClick:Y,type:"button",children:te?"Refreshing...":"Refresh"})]}),he?s.jsx("pre",{className:"thread-read-error",children:he}):te&&!ve?s.jsx("p",{className:"context-card context-muted",children:"Loading compaction history..."}):ve!=null&&ve.length?s.jsx("div",{className:"context-compaction-list",children:ve.map(O=>s.jsxs("article",{className:"context-compaction-item",children:[s.jsxs("div",{className:"context-compaction-heading",children:[s.jsx("time",{children:lt(O.completedAt??O.usageObservedAt??O.startedAt??"")}),s.jsx("span",{className:`context-compaction-status ${O.status}`,children:O.status==="completed"?"Completed":"Running"})]}),s.jsx("dl",{className:"context-compaction-facts",children:Uz(O).map(ee=>s.jsxs("div",{children:[s.jsx("dt",{children:ee.label}),s.jsx("dd",{children:ee.value})]},ee.label))}),s.jsxs("small",{children:[ns(O.id),O.turnId?` · turn ${ns(O.turnId)}`:""]})]},O.id))}):s.jsx("p",{className:"context-card context-muted",children:"No compaction records yet."})]}):s.jsxs("section",{className:"context-tab-surface thread-read-panel",children:[s.jsx("header",{className:"settings-section-header",children:s.jsxs("div",{children:[s.jsx("h3",{children:"Additional Context"}),s.jsx("p",{children:"One-time live render of the application additionalContext for this workspace. Seele does not persist this preview result."})]})}),X?s.jsx("p",{className:"context-card context-muted",children:"Rendering additionalContext..."}):ne?s.jsx("pre",{className:"thread-read-error",children:ne}):H?s.jsx(tM,{preview:H,refreshing:X,onRefresh:E}):s.jsx("p",{className:"context-card context-muted",children:"No additionalContext preview loaded yet."})]})})]})]})})}function Oc(e){const t=e instanceof Zs?e.detail:e instanceof Error?e.message:String(e);let n="";if(e instanceof Zs)try{n=JSON.parse(e.body).error??""}catch{}return`${{collaboration_owner_mismatch:"无法添加参与者:所选工作空间与 Topic 不属于同一个平台用户。请检查工作空间的归属;这不是 Topic Owner 角色不匹配。",collaboration_version_conflict:"Topic 已被更新,本次修改未保存。请重新打开编辑后再试。",workspace_owner_required:"工作空间缺少所属用户,无法创建 Topic。请检查工作空间的归属。"}[n]??"Topic 操作失败,请查看以下错误详情。"}
|
|
362
|
-
|
|
363
|
-
${t}`}function TN({conversations:e,onClose:t,workspaceGroups:n}){var U;const[a,l]=A.useState([]),[u,c]=A.useState("active"),[f,h]=A.useState(null),[m,p]=A.useState([]),[y,k]=A.useState(!0),[x,C]=A.useState(null),[M,I]=A.useState(null),[_,N]=A.useState(!1),[q,R]=A.useState(!1),[X,P]=A.useState(new Set),[H,J]=A.useState({title:"",publicDescription:"",ownerWorkspaceId:((U=e[0])==null?void 0:U.id)??"",participantWorkspaceIds:[]}),ne=a.find(E=>E.id===f)??null,F=A.useMemo(()=>new Map(e.map(E=>[E.id,E.title])),[e]),te=a.filter(E=>u==="archived"?E.status==="archived":E.status!=="archived"),se=n.map(E=>({...E,conversations:E.conversations.filter(Y=>Y.id!==H.ownerWorkspaceId)})).filter(E=>E.conversations.length>0),ve=()=>{var E;C(null),J({title:"",publicDescription:"",ownerWorkspaceId:((E=e[0])==null?void 0:E.id)??"",participantWorkspaceIds:[]}),P(new Set),I("create")},be=()=>{!ne||ne.status!=="active"||(C(null),J({title:ne.title,publicDescription:ne.publicDescription,ownerWorkspaceId:ne.ownerWorkspaceId,participantWorkspaceIds:ne.members.filter(E=>E.role==="participant"&&E.status==="active").map(E=>E.workspaceId)}),P(new Set),I("edit"))},he=async(E,Y=u)=>{var O;k(!0),C(null);try{const ee=await z3();l(ee);const ke=ee.filter(He=>Y==="archived"?He.status==="archived":He.status!=="archived"),Ae=(E&&ke.some(He=>He.id===E)?E:null)??(f&&ke.some(He=>He.id===f)?f:((O=ke[0])==null?void 0:O.id)??null);h(Ae),p(Ae?await Pd(Ae):[])}catch(ee){C(Oc(ee))}finally{k(!1)}};A.useEffect(()=>{he()},[]),A.useEffect(()=>{const E=window.setInterval(()=>{(async()=>{try{const Y=await z3();l(Y),f&&Y.some(O=>O.id===f)&&p(await Pd(f))}catch{}})()},1e4);return()=>window.clearInterval(E)},[f]);const Z=async E=>{h(E),C(null);try{p(await Pd(E))}catch(Y){C(Oc(Y))}},me=async E=>{var O;if(E===u)return;c(E),C(null);const Y=((O=a.find(ee=>E==="archived"?ee.status==="archived":ee.status!=="archived"))==null?void 0:O.id)??null;if(h(Y),!Y){p([]);return}try{p(await Pd(Y))}catch(ee){C(Oc(ee))}},V=async E=>{var Y;if(E.preventDefault(),!(!H.title.trim()||!H.ownerWorkspaceId)){R(!0),C(null);try{const O=M==="edit"&&ne?await jD(ne.id,{expectedVersion:ne.version,title:H.title.trim(),publicDescription:H.publicDescription.trim(),participantWorkspaceIds:H.participantWorkspaceIds}):await SD({...H,title:H.title.trim(),publicDescription:H.publicDescription.trim()});c("active"),I(null),J({title:"",publicDescription:"",ownerWorkspaceId:((Y=e[0])==null?void 0:Y.id)??"",participantWorkspaceIds:[]}),await he(O.id,"active")}catch(O){C(Oc(O))}finally{R(!1)}}},Ce=async()=>{if(!(!ne||ne.status!=="active")){R(!0),C(null);try{const E=await CD(ne.id,ne.version);N(!1),c("active"),await he(void 0,"active")}catch(E){C(Oc(E))}finally{R(!1)}}};return s.jsx("div",{className:"context-panel-overlay settings-overlay",onClick:t,role:"presentation",children:s.jsxs("section",{"aria-label":"工作空间协作",className:"context-panel collaboration-panel",onClick:E=>E.stopPropagation(),children:[s.jsxs("header",{className:"context-panel-header collaboration-panel-header",children:[s.jsxs("div",{children:[s.jsx("h2",{children:"协作"}),s.jsx("p",{children:"在明确选择的工作空间之间建立持久、定向的 Topic 通信。"})]}),s.jsxs("div",{className:"collaboration-header-actions",children:[s.jsx("button",{"aria-label":"新建 Topic",className:"memory-icon-button collaboration-new-topic",onClick:ve,title:"新建 Topic",type:"button",children:"+"}),s.jsx("button",{"aria-label":"关闭协作",className:"icon-button",onClick:t,type:"button",children:"×"})]})]}),x&&!M&&!_?s.jsx("div",{className:"collaboration-error",role:"alert",children:x}):null,s.jsxs("div",{className:"collaboration-body",children:[s.jsxs("nav",{className:"collaboration-topic-list","aria-label":"协作 Topics",children:[s.jsxs("div",{className:"collaboration-topic-tabs",role:"tablist","aria-label":"Topic 列表范围",children:[s.jsx("button",{"aria-selected":u==="active",className:u==="active"?"active":void 0,onClick:()=>void me("active"),role:"tab",type:"button",children:"当前"}),s.jsx("button",{"aria-selected":u==="archived",className:u==="archived"?"active":void 0,onClick:()=>void me("archived"),role:"tab",type:"button",children:"已归档"})]}),y?s.jsx("p",{children:"正在加载..."}):te.length===0?s.jsx("p",{children:u==="archived"?"还没有已归档 Topic。":"还没有当前 Topic。"}):te.map(E=>s.jsxs("button",{className:`collaboration-topic-entry${E.id===f?" active":""}`,onClick:()=>void Z(E.id),type:"button",children:[s.jsx("span",{children:E.title}),s.jsxs("small",{children:[E.members.length," 个工作空间 · ",E.status]})]},E.id))]}),s.jsx("main",{className:"collaboration-topic-detail",children:ne?s.jsxs(s.Fragment,{children:[s.jsxs("header",{children:[s.jsxs("div",{children:[s.jsx("h3",{children:ne.title}),s.jsx("p",{children:ne.publicDescription||"没有公开描述。"})]}),s.jsxs("div",{className:"collaboration-topic-actions",children:[s.jsx("span",{children:ne.status}),ne.status==="active"?s.jsxs(s.Fragment,{children:[s.jsx("button",{"aria-label":`编辑 Topic ${ne.title}`,className:"memory-icon-button",onClick:be,title:"编辑",type:"button",children:s.jsx(Hf,{})}),s.jsx("button",{"aria-label":`归档 Topic ${ne.title}`,className:"memory-icon-button",onClick:()=>N(!0),title:"归档",type:"button",children:s.jsx(gD,{})})]}):null]})]}),s.jsx("div",{className:"collaboration-members",children:ne.members.filter(E=>E.status==="active").map(E=>s.jsxs("span",{children:[E.workspaceTitleSnapshot,s.jsx("small",{children:E.role})]},`${E.workspaceId}-${E.membershipVersion}`))}),s.jsx("div",{className:"collaboration-message-list",children:m.length===0?s.jsx("p",{children:"还没有消息。"}):m.map(E=>s.jsxs("article",{children:[s.jsxs("header",{children:[s.jsx("strong",{children:E.senderTitleSnapshot}),s.jsx("span",{children:E.recipientWorkspaceIds.includes("ALL")?"发给全部参与者":`发给 ${Q6(E.recipientWorkspaceIds.map(Y=>F.get(Y)??ns(Y)))}`}),s.jsx("time",{children:lt(E.createdAt)})]}),s.jsx("div",{className:"markdown-body",children:es(E.contentMarkdown,void 0)})]},E.id))})]}):s.jsx("div",{className:"collaboration-empty",children:"选择或新建一个 Topic。"})})]}),M?s.jsx("div",{className:"collaboration-create-overlay",role:"presentation",onClick:()=>!q&&I(null),children:s.jsxs("form",{className:"dialog-card collaboration-create-dialog",onClick:E=>E.stopPropagation(),onSubmit:V,children:[s.jsxs("header",{children:[s.jsxs("div",{children:[s.jsx("h3",{children:M==="edit"?"编辑 Topic":"新建 Topic"}),s.jsx("p",{children:M==="edit"?"调整公开信息与参与工作空间。":"明确选择本次通信的 owner 与参与者。"})]}),s.jsx("button",{"aria-label":"关闭 Topic 编辑",className:"icon-button",onClick:()=>I(null),type:"button",children:"×"})]}),s.jsxs("label",{children:["标题",s.jsx("input",{autoFocus:!0,placeholder:"填写 Topic 标题",value:H.title,onChange:E=>J(Y=>({...Y,title:E.target.value}))})]}),s.jsxs("label",{children:["公开描述",s.jsx("textarea",{placeholder:"填写所有参与工作空间可见的共享背景",value:H.publicDescription,onChange:E=>J(Y=>({...Y,publicDescription:E.target.value}))})]}),s.jsxs("label",{children:["Owner 工作空间",s.jsx("select",{disabled:M==="edit",value:H.ownerWorkspaceId,onChange:E=>J(Y=>({...Y,ownerWorkspaceId:E.target.value,participantWorkspaceIds:Y.participantWorkspaceIds.filter(O=>O!==E.target.value)})),children:n.map(E=>s.jsx("optgroup",{label:E.title,children:E.conversations.map(Y=>s.jsx("option",{value:Y.id,children:Y.title},Y.id))},E.id))})]}),s.jsxs("fieldset",{className:"collaboration-participant-groups",children:[s.jsx("legend",{children:"参与工作空间"}),s.jsxs("div",{className:"collaboration-participant-toolbar",children:[s.jsxs("span",{children:[H.participantWorkspaceIds.length," 个已选择"]}),s.jsxs("div",{children:[s.jsx("button",{onClick:()=>P(new Set),type:"button",children:"全部展开"}),s.jsx("button",{onClick:()=>P(new Set(se.map(E=>E.id))),type:"button",children:"全部收起"})]})]}),se.map(E=>{const Y=E.conversations,O=Y.filter(ke=>H.participantWorkspaceIds.includes(ke.id)).length,ee=X.has(E.id);return s.jsxs("section",{className:"collaboration-participant-group",children:[s.jsxs("header",{children:[s.jsxs("button",{"aria-expanded":!ee,className:"collaboration-group-toggle",onClick:()=>P(ke=>{const Ae=new Set(ke);return Ae.has(E.id)?Ae.delete(E.id):Ae.add(E.id),Ae}),type:"button",children:[s.jsx("span",{"aria-hidden":"true",className:ee?void 0:"expanded",children:"›"}),s.jsx("strong",{children:E.title}),s.jsxs("small",{children:[O,"/",Y.length]})]}),s.jsxs("label",{title:`选择 ${E.title} 全部工作空间`,children:[s.jsx("input",{checked:O===Y.length,onChange:()=>J(ke=>{const Ae=Y.map(it=>it.id),He=new Set(ke.participantWorkspaceIds);return Ae.every(it=>He.has(it))?Ae.forEach(it=>He.delete(it)):Ae.forEach(it=>He.add(it)),{...ke,participantWorkspaceIds:Array.from(He)}}),type:"checkbox"}),s.jsx("span",{children:"全选"})]})]}),ee?null:s.jsx("div",{children:Y.map(ke=>s.jsxs("label",{className:"collaboration-participant-option",children:[s.jsx("input",{checked:H.participantWorkspaceIds.includes(ke.id),onChange:Ae=>J(He=>({...He,participantWorkspaceIds:Ae.target.checked?[...He.participantWorkspaceIds,ke.id]:He.participantWorkspaceIds.filter(it=>it!==ke.id)})),type:"checkbox"}),s.jsx("span",{children:ke.title})]},ke.id))})]},E.id)})]}),s.jsxs("footer",{className:"collaboration-submit-footer",children:[x?s.jsx("div",{className:"collaboration-error",role:"alert",children:x}):null,s.jsxs("div",{children:[s.jsx("button",{className:"secondary",disabled:q,onClick:()=>I(null),type:"button",children:"取消"}),s.jsx("button",{disabled:q||!H.title.trim()||!H.ownerWorkspaceId,type:"submit",children:q?"正在保存...":M==="edit"?"保存":"创建 Topic"})]})]})]})}):null,_&&ne?s.jsx("div",{className:"collaboration-create-overlay",onClick:()=>!q&&N(!1),role:"presentation",children:s.jsxs("section",{"aria-label":"归档 Topic",className:"dialog-card collaboration-archive-dialog",onClick:E=>E.stopPropagation(),children:[s.jsxs("header",{children:[s.jsxs("div",{children:[s.jsx("h3",{children:"归档 Topic"}),s.jsx("p",{children:"归档后保留历史消息,但工作空间不能再向此 Topic 发送新消息。"})]}),s.jsx("button",{"aria-label":"关闭归档确认",className:"icon-button",onClick:()=>N(!1),type:"button",children:"×"})]}),s.jsx("strong",{children:ne.title}),x?s.jsx("div",{className:"collaboration-error",role:"alert",children:x}):null,s.jsxs("footer",{children:[s.jsx("button",{className:"secondary",disabled:q,onClick:()=>N(!1),type:"button",children:"取消"}),s.jsx("button",{className:"danger",disabled:q,onClick:()=>void Ce(),type:"button",children:q?"正在归档...":"归档"})]})]})}):null]})})}function AN({workspace:e,refreshKey:t}){const[n,a]=A.useState([]),[l,u]=A.useState(null),[c,f]=A.useState(null),[h,m]=A.useState(!1),[p,y]=A.useState(0);A.useEffect(()=>{let I=!1,_;const N=new AbortController;async function q(){try{const R=Ne(`conversations/${e.id}/runtime/operations`),X=await fetch(R,{signal:N.signal});await Ve(X,{url:R});const P=(await X.json()).operations;I||(a(P),f(null),u(H=>H?P.find(J=>J.id===H.id)??{...H,status:"superseded",stage:"finished"}:null))}catch(R){I||f(ft(R).message)}finally{I||(_=setTimeout(q,3e3))}}return q(),()=>{I=!0,N.abort(),clearTimeout(_)}},[e.id,t,p]),A.useEffect(()=>{if(!l)return;const I=_=>{_.key==="Escape"&&u(null)};return window.addEventListener("keydown",I),()=>window.removeEventListener("keydown",I)},[l==null?void 0:l.id]);async function k(){if(!l||l.status!=="running"||h)return;const I=l.id;m(!0),f(null);try{const _=Ne(`conversations/${e.id}/runtime/operations/${encodeURIComponent(I)}/stop`),N=await fetch(_,{method:"POST"});await Ve(N,{url:_,method:"POST"});const q=await N.json();u(R=>(R==null?void 0:R.id)===I?{...R,status:q.stopped?"stopping":"superseded",stage:q.stopped?R.stage:"finished"}:R),y(R=>R+1)}catch(_){f(ft(_).message)}finally{m(!1)}}const x={running:"进行中",stopping:"正在停止",succeeded:"已完成",failed:"失败",cancelled:"已取消",interrupted:"已中断",superseded:"已结束或被替换"},C={preparing:"准备历史",rebuilding:"注入历史并按容量压缩",finalizing:"保存 Thread 并完成初始化",warming_up:"正在唤醒新 Thread",finished:"处理结束"},M=n.filter(I=>I.status==="running");return s.jsxs(s.Fragment,{children:[M.length?s.jsx("div",{className:"workspace-operation-strip",children:M.map(I=>s.jsxs("button",{className:"workspace-rebuild-notice",type:"button",onClick:()=>u(I),title:"查看实际进度或停止此操作",children:[I.kind==="clone"?s.jsx(X6,{}):s.jsx(ag,{}),I.kind==="clone"?"Clone":"Reset"," · 进行中 ",s.jsx("span",{"aria-hidden":"true",children:"↗"})]},I.id))}):null,l?sf.createPortal(s.jsx("div",{className:"dialog-backdrop",role:"presentation",onMouseDown:()=>u(null),children:s.jsxs("section",{className:"dialog-card runtime-operation-dialog",role:"dialog","aria-modal":"true","aria-label":`${l.kind==="clone"?"Clone":"Reset"} 进度`,onMouseDown:I=>I.stopPropagation(),children:[s.jsxs("header",{children:[s.jsxs("div",{children:[s.jsxs("h2",{children:[l.kind==="clone"?"Clone":"Reset"," 进度"]}),s.jsx("p",{children:e.title})]}),s.jsx("button",{className:"icon-button",type:"button","aria-label":"关闭进度窗口",onClick:()=>u(null),children:"×"})]}),s.jsxs("dl",{children:[s.jsx("dt",{children:"状态"}),s.jsx("dd",{children:x[l.status]??l.status}),s.jsx("dt",{children:"阶段"}),s.jsx("dd",{children:C[l.stage]??l.stage}),s.jsx("dt",{children:"开始时间"}),s.jsx("dd",{children:Xi(l.startedAt)}),l.completedAt?s.jsxs(s.Fragment,{children:[s.jsx("dt",{children:"结束时间"}),s.jsx("dd",{children:Xi(l.completedAt)})]}):null,s.jsx("dt",{children:"实际进度"}),s.jsx("dd",{children:l.progressAvailable?`已注入 ${l.injectedBatches} 批 · 已压缩 ${l.completedCompactions} 段`:l.status==="running"?"等待进度上报":"无历史进度数据"}),l.totalItems!=null&&l.processedItems!=null?s.jsxs(s.Fragment,{children:[s.jsx("dt",{children:"历史处理"}),s.jsxs("dd",{children:[l.processedItems," / ",l.totalItems," 条",l.totalItems>0?s.jsxs(s.Fragment,{children:[" · ",Math.floor(l.processedItems*100/l.totalItems),"%",s.jsx("progress",{"aria-label":"历史处理进度",max:l.totalItems,value:l.processedItems})]}):"(无历史内容)"]})]}):null]}),s.jsx("p",{children:"进度按已完成处理的历史条目计算,不代表剩余时间;压缩次数随内容容量变化。历史处理完成后仍需保存和初始化。关闭窗口不会停止操作。"}),l.error?s.jsx("p",{role:"alert",children:l.error}):null,c?s.jsxs("p",{role:"alert",children:["进度更新失败:",c]}):null,s.jsxs("footer",{children:[s.jsx("button",{className:"secondary",type:"button",onClick:()=>u(null),children:"关闭"}),s.jsx("button",{className:"danger",type:"button",disabled:h||l.status!=="running",onClick:()=>void k(),children:h?"正在停止…":"停止此操作"})]})]})}),document.body):null]})}function EN({workspaceId:e}){const[t,n]=A.useState({records:[],nextCursor:null}),[a,l]=A.useState(null),[u,c]=A.useState(!1),f=A.useRef(0),h=A.useRef(!1),[m,p]=A.useState(0);A.useEffect(()=>{let x=!1;const C=new AbortController;let M;const I=++f.current;h.current=!1;async function _(){if(!h.current)try{const N=Ne(`conversations/${e}/runtime/reset-history`),q=await fetch(N,{signal:C.signal});await Ve(q,{url:N});const R=await q.json();!x&&I===f.current&&(n(R),l(null))}catch(N){x||l(ft(N).message)}finally{x||(M=setTimeout(_,5e3))}}return _(),()=>{x=!0,++f.current,C.abort(),clearTimeout(M)}},[e,m]);async function y(){if(!t.nextCursor||u)return;h.current=!0;const x=++f.current;c(!0);try{const C=Ne(`conversations/${e}/runtime/reset-history?${new URLSearchParams(t.nextCursor)}`),M=await fetch(C);await Ve(M,{url:C});const I=await M.json();x===f.current&&n(_=>({records:[..._.records,...I.records],nextCursor:I.nextCursor}))}catch(C){x===f.current&&l(ft(C).message)}finally{c(!1)}}const k={running:"进行中",succeeded:"已完成",failed:"失败",cancelled:"已取消",interrupted:"已中断"};return s.jsxs("section",{"aria-label":"Reset history",className:"reset-history",children:[s.jsxs("strong",{children:["Reset 记录 ",s.jsx("button",{className:"secondary",type:"button",onClick:()=>p(x=>x+1),children:"刷新"})]}),s.jsx("small",{children:"关闭窗口不会停止 Reset。记录会保留;旧版记录仅包含成功操作,开始时间不可追溯。"}),a?s.jsx("p",{role:"alert",children:a}):null,!t.records.length&&!a?s.jsx("span",{children:"暂无记录"}):null,s.jsx("ul",{className:"reset-history-list",children:t.records.map(x=>s.jsxs("li",{children:[s.jsxs("span",{className:"reset-history-times",children:[s.jsxs("span",{children:["开始 ",x.id.startsWith("legacy:")?"未知":s.jsx("time",{dateTime:x.startedAt,title:Xi(x.startedAt),children:lt(x.startedAt)})]}),s.jsx("span",{"aria-hidden":"true",children:" → "}),s.jsxs("span",{children:["结束 ",x.completedAt||x.id.startsWith("legacy:")?s.jsx("time",{dateTime:x.completedAt??x.startedAt,title:Xi(x.completedAt??x.startedAt),children:lt(x.completedAt??x.startedAt)}):x.status==="running"?"未结束":"未知"]})]}),s.jsx("span",{children:k[x.status]??x.status}),s.jsx("span",{className:"reset-history-note",title:x.error??void 0,children:x.error||(x.id.startsWith("legacy:")?"旧记录完成时间":"")})]},x.id))}),t.nextCursor?s.jsx("button",{className:"secondary",disabled:u,onClick:()=>void y(),type:"button",children:u?"加载中…":"更早记录"}):null]})}function NN({busy:e,conversation:t,conversationId:n,forceStopBusy:a,preview:l,previewLoading:u,result:c,status:f,warmup:h,workspaceGroups:m,onCancelResetPreview:p,onClose:y,onForceStop:k,onPreviewReset:x,onStartBlankContext:C,onResetRuntime:M,onSaveResetSelection:I,onWorkspaceChange:_,onWarmupChange:N}){const q=!t||e||f==="running"||f==="initializing";return s.jsx("div",{className:"context-panel-overlay settings-overlay",onClick:y,role:"presentation",children:s.jsxs("section",{"aria-label":"Seele console",className:"context-panel console-panel",onClick:R=>R.stopPropagation(),children:[s.jsxs("header",{className:"context-panel-header console-panel-header",children:[s.jsxs("div",{children:[s.jsx("h2",{children:"Console"}),s.jsx("p",{children:"Control actions for the selected workspace runtime."})]}),s.jsxs("div",{className:"console-header-actions",children:[s.jsxs("label",{className:"console-workspace-picker",children:[s.jsx("span",{children:"Workspace"}),s.jsx("select",{onChange:R=>_(R.target.value),value:n??"",children:m.map(R=>s.jsx("optgroup",{label:R.title,children:R.conversations.map(X=>s.jsxs("option",{value:X.id,children:[X.title," · workspaces/",ou(X.id)]},X.id))},R.id))})]}),s.jsx("button",{"aria-label":"Close console",onClick:y,type:"button",children:"×"})]})]}),s.jsx("div",{className:"console-body",children:s.jsxs("section",{className:"console-card",children:[s.jsxs("div",{className:"console-card-heading",children:[s.jsxs("div",{children:[s.jsx("h3",{children:"Workspace Runtime"}),s.jsx("p",{children:"Reset only replaces the Codex runtime thread. Seele workspace history, metadata, and files remain intact."})]}),s.jsx("span",{className:`console-status ${f}`,children:f})]}),s.jsxs("dl",{className:"console-facts",children:[s.jsxs("div",{children:[s.jsx("dt",{children:"Workspace"}),s.jsx("dd",{children:(t==null?void 0:t.title)??"No workspace selected"})]}),s.jsxs("div",{children:[s.jsx("dt",{children:"ID"}),s.jsx("dd",{children:t?`workspaces/${ou(t.id)}`:"-"})]}),s.jsxs("div",{children:[s.jsx("dt",{children:"Thread"}),s.jsx("dd",{children:(t==null?void 0:t.codexThreadId)??"Not created"})]})]}),s.jsxs("label",{className:"console-toggle",children:[s.jsx("input",{checked:h,onChange:R=>N(R.target.checked),type:"checkbox"}),s.jsxs("span",{children:["Run a warmup turn after reset",s.jsx("small",{children:"The workspace will receive a system wakeup to re-orient itself after the thread is rebuilt."})]})]}),s.jsxs("div",{className:"console-actions",children:[s.jsx("button",{className:"danger",disabled:!t||a,onClick:k,title:"Kill the workspace runtime and repair every non-terminal scheduler state",type:"button",children:a?"Stopping & repairing...":"Force stop & repair"}),s.jsx("button",{className:"danger",disabled:q||u,onClick:x,type:"button",children:u?"Preparing preview...":"Preview runtime reset"}),s.jsx("button",{disabled:q||u,onClick:C,type:"button",children:"Clear memory & start blank"}),f==="running"||f==="initializing"?s.jsx("span",{children:"Force stop the active workspace operation before resetting."}):null]}),n?s.jsx(EN,{workspaceId:n},n):null,c?s.jsxs("div",{className:"console-result",children:[s.jsx("strong",{children:c.workspaceMemoryCleared?"Blank workspace context ready":"Runtime reset completed"}),s.jsxs("span",{children:[c.injectedItemCount," visible history items injected"]}),c.historyCompactionCount>0?s.jsxs("span",{children:["Full history processed in ",c.historyBatchCount," chronological batches with ",c.historyCompactionCount," native compactions"]}):null,c.workspaceMemoryCleared?s.jsx("span",{children:"Workspace Memory cleared; Base Memory retained"}):null,s.jsxs("span",{children:["New thread: ",c.newThreadId]}),c.warmupTurnId?s.jsxs("span",{children:["Warmup turn: ",c.warmupTurnId]}):null]}):null]})}),l?s.jsx(MN,{busy:e,preview:l,warmup:h,onCancel:p,onConfirm:M,onSaveSelection:I}):null]})})}function MN({busy:e,preview:t,warmup:n,onCancel:a,onConfirm:l,onSaveSelection:u}){const[c,f]=A.useState(()=>new Set(t.entries.filter(F=>F.includedByDefault).map(F=>F.id))),[h,m]=A.useState(!1),[p,y]=A.useState(!1),[k,x]=A.useState(null),C=A.useRef(null),M=t.entries.filter(F=>c.has(F.id)),I=M.filter(F=>F.role==="user").length,_=M.length-I,N=t.entries.filter(F=>F.topicRelation!==null).map(F=>F.id),q=N.filter(F=>c.has(F)).length,R=t.entries.length>0&&c.size===t.entries.length;A.useEffect(()=>{C.current&&(C.current.indeterminate=c.size>0&&c.size<t.entries.length)},[t.entries.length,c.size]);const X=e||p;async function P(F){y(!0),x(null);try{await u(t.entries.filter(te=>F.has(te.id)).map(te=>te.id)),f(F)}catch(te){x(ft(te).message)}finally{y(!1)}}function H(F,te){const se=new Set(c);te?se.add(F):se.delete(F),P(se)}function J(){const F=new Set(c);N.forEach(te=>F.add(te)),P(F)}function ne(){const F=new Set(c);N.forEach(te=>{F.has(te)?F.delete(te):F.add(te)}),P(F)}return s.jsx("div",{className:`reset-preview-overlay ${h?"expanded":""}`,onClick:X?void 0:a,role:"presentation",children:s.jsxs("section",{"aria-label":"Runtime reset preview","aria-modal":"true",className:`reset-preview-dialog ${h?"expanded":""}`,onClick:F=>F.stopPropagation(),role:"dialog",children:[s.jsxs("header",{className:"reset-preview-header",children:[s.jsxs("div",{children:[s.jsx("h3",{children:"Confirm runtime reset"}),s.jsx("p",{children:"The new thread will process the selected original messages in chronological batches. Each batch is compacted natively before the next batch is injected; the old thread context is never reused."})]}),s.jsxs("div",{className:"reset-preview-header-actions",children:[s.jsx("button",{"aria-label":h?"Restore reset preview size":"Expand reset preview",onClick:()=>m(F=>!F),title:h?"Restore size":"Expand",type:"button",children:h?"⊡":"⛶"}),s.jsx("button",{"aria-label":"Close reset preview",disabled:X,onClick:a,type:"button",children:"×"})]})]}),s.jsxs("div",{className:"reset-preview-summary",children:[s.jsxs("label",{className:"reset-preview-select-all",children:[s.jsx("input",{checked:R,disabled:X||t.entries.length===0,onChange:F=>void P(F.target.checked?new Set(t.entries.map(te=>te.id)):new Set),ref:C,type:"checkbox"}),s.jsxs("span",{children:[c.size," of ",t.entries.length," selected"]})]}),s.jsxs("span",{children:[I," user"]}),s.jsxs("span",{children:[_," assistant"]}),N.length>0?s.jsxs("div",{className:"reset-preview-topic-actions",children:[s.jsxs("span",{children:[q," of ",N.length," Topic input + response"]}),s.jsx("button",{disabled:X||q===N.length,onClick:J,type:"button",children:"Select Topic turns"}),s.jsx("button",{disabled:X,onClick:ne,type:"button",children:"Invert Topic turns"})]}):null,s.jsxs("span",{children:[t.historyBatchCount," planned batch",t.historyBatchCount===1?"":"es"]}),s.jsxs("span",{children:["~",t.estimatedTokenCount.toLocaleString()," source tokens"]}),s.jsx("span",{children:n?"Warmup enabled":"No warmup"}),p?s.jsx("span",{children:"Saving defaults..."}):null,k?s.jsx("span",{className:"reset-preview-selection-error",children:k}):null]}),s.jsx("div",{className:"reset-preview-list",children:t.entries.length>0?t.entries.map((F,te)=>s.jsxs("article",{className:`reset-preview-item ${F.role} ${c.has(F.id)?"":"excluded"}`,children:[s.jsxs("header",{children:[s.jsxs("label",{children:[s.jsx("input",{"aria-label":`Include ${F.role} message ${te+1}`,checked:c.has(F.id),disabled:X,onChange:se=>H(F.id,se.target.checked),type:"checkbox"}),s.jsx("span",{children:te+1})]}),s.jsx("strong",{children:F.role}),F.topicRelation?s.jsxs("span",{className:"reset-preview-topic-badge",children:["Topic ",F.topicRelation]}):null,s.jsx("time",{dateTime:F.createdAt,children:lt(F.createdAt)})]}),s.jsx("pre",{children:F.content})]},F.id)):s.jsx("p",{className:"reset-preview-empty",children:"No visible history will be injected."})}),s.jsxs("footer",{className:"reset-preview-actions",children:[s.jsxs("small",{children:["Preview fingerprint: ",t.fingerprint.slice(0,12)]}),s.jsxs("div",{children:[s.jsx("button",{disabled:X,onClick:a,type:"button",children:"Cancel"}),s.jsx("button",{className:"danger",disabled:X,onClick:()=>l(t.entries.filter(F=>c.has(F.id)).map(F=>F.id)),type:"button",children:e?"Submitting...":"Confirm full-history reset"})]})]})]})})}function DN({currentReleasedAt:e,currentVersion:t,job:n,latest:a,latestChecking:l,starting:u,onClose:c,onRefresh:f,onStart:h}){const m=(n==null?void 0:n.currentVersion)??t,p=a!=null&&a.version&&Zz(a.version,m)?Xz(a.version):null;return A.useEffect(()=>{const y=k=>{k.key==="Escape"&&c()};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[c]),s.jsx("div",{className:"codex-update-overlay",onClick:c,role:"presentation",children:s.jsxs("section",{"aria-label":"Codex CLI update",className:"codex-update-panel",onClick:y=>y.stopPropagation(),children:[s.jsxs("header",{children:[s.jsxs("div",{children:[s.jsx("h3",{children:"Codex CLI update"}),s.jsx("p",{children:"Updates apply to new turns. Running turns continue uninterrupted."})]}),s.jsx("button",{"aria-label":"Close Codex CLI update",onClick:c,type:"button",children:"×"})]}),s.jsxs("dl",{className:"codex-update-summary",children:[s.jsxs("div",{children:[s.jsx("dt",{children:"Status"}),s.jsx("dd",{className:n?`status-${n.status}`:void 0,children:(n==null?void 0:n.status)??"Not started"})]}),s.jsxs("div",{children:[s.jsx("dt",{children:"Current"}),s.jsx("dd",{children:d1(m,(n==null?void 0:n.codexReleasedAt)??e)})]}),s.jsxs("div",{children:[s.jsx("dt",{children:"Latest"}),s.jsxs("dd",{title:(a==null?void 0:a.error)??void 0,children:[l?"Checking...":a!=null&&a.version?d1(a.version,a.releasedAt):a!=null&&a.error?"Check failed":"Not checked",p?s.jsx("a",{className:"codex-release-notes-link",href:p,rel:"noreferrer",target:"_blank",children:"Release notes"}):null]})]}),n?s.jsxs("div",{children:[s.jsx("dt",{children:"Started"}),s.jsx("dd",{children:lt(n.startedAt)})]}):null]}),a!=null&&a.error?s.jsxs("p",{className:"codex-latest-error",children:["Latest version check: ",a.error]}):null,s.jsx("div",{className:"codex-update-log",role:"log","aria-live":"polite",children:n!=null&&n.logs.length?n.logs.map((y,k)=>s.jsxs("div",{className:`log-${y.stream}`,children:[s.jsx("time",{children:Kz(y.at)}),s.jsx("span",{children:y.text})]},`${y.at}-${k}`)):s.jsx("p",{children:"No update logs yet."})}),s.jsxs("footer",{children:[s.jsx("button",{className:"secondary",onClick:f,type:"button",children:"Refresh"}),s.jsx("button",{disabled:u||(n==null?void 0:n.status)==="running",onClick:h,type:"button",children:u?"Starting...":(n==null?void 0:n.status)==="running"?"Updating...":n?"Run again":"Start update"})]})]})})}function zN({startWithAccounts:e=!1,currentUser:t,conversations:n,deploymentSettings:a,editingEnvironmentKey:l,environmentDraft:u,globalEnvironment:c,workspaceEnvironment:f,memorySettings:h,memorySettingsDraft:m,managedUsers:p,workspaceMemoryDraft:y,runtimeSettings:k,runtimeModels:x,runtimeCodexVersion:C,runtimeCodexReleasedAt:M,runtimeCodexUpdating:I,runtimeSettingsDraft:_,runtimeSettingsScope:N,settingsWorkspace:q,settingsWorkspaceId:R,systemDiagnostics:X,systemDiagnosticsLoading:P,workspaceGroups:H,workspaceRuntimeSettings:J,workspaceRuntimeSettingsDraft:ne,onCancelEnvironmentEdit:F,onClose:te,onCreateUser:se,onDeleteUser:ve,onDeleteEnvironment:be,onDraftChange:he,onEditEnvironment:Z,onSaveBaseMemoryItems:me,onSaveDeploymentSettings:V,onSaveResponsibility:Ce,onSaveWorkspaceMemoryItems:U,onRevealEnvironmentValue:E,onRuntimeDraftChange:Y,onCodexAccountSwitched:O,onUpdateCodexCli:ee,onRuntimeScopeChange:ke,onSettingsWorkspaceChange:Ae,onSubmitRuntimeSettings:He,onSubmitEnvironment:it,onRefreshSystemDiagnostics:pe,onUpdateUser:Pe,onWorkspaceRuntimeDraftChange:Ke,onWorkspaceRuntimeReset:oe,revealedEnvironmentKeys:Me}){const[ze,Ze]=A.useState(e&&t.role==="admin"?"accounts":"model"),[Ut,ra]=A.useState(!1);A.useEffect(()=>{t.role!=="admin"&&["accounts","channels","users","system","deployment","build"].includes(ze)&&Ze("model")},[t.role,ze]);const[Jn,er]=A.useState(null),[Xt,Bn]=A.useState(!1),[Vn,Un]=A.useState((q==null?void 0:q.responsibility)??""),[Zt,pr]=A.useState(!1),ye=A.useRef(null),Le=N==="workspace"?Object.values((J==null?void 0:J.sources)??{}).filter(ie=>ie==="workspace").length:0;return A.useEffect(()=>{N==="global"&&Bn(!1)},[N]),A.useEffect(()=>{Un((q==null?void 0:q.responsibility)??"")},[q==null?void 0:q.id,q==null?void 0:q.responsibility]),A.useEffect(()=>{if(!Xt)return;const ie=qe=>{var ot;const Ge=qe.target;Ge instanceof Node&&((ot=ye.current)!=null&&ot.contains(Ge))||Bn(!1)},we=qe=>{qe.key==="Escape"&&Bn(!1)};return document.addEventListener("pointerdown",ie,!0),document.addEventListener("keydown",we,!0),()=>{document.removeEventListener("pointerdown",ie,!0),document.removeEventListener("keydown",we,!0)}},[Xt]),s.jsx("div",{className:"context-panel-overlay settings-overlay",onClick:te,role:"presentation",children:s.jsxs("section",{"aria-label":"Seele settings",className:"context-panel settings-panel",onClick:ie=>ie.stopPropagation(),children:[s.jsxs("header",{className:"context-panel-header settings-panel-header",children:[s.jsxs("div",{className:"settings-panel-title",children:[s.jsx("h2",{children:"Settings"}),ze!=="system"&&ze!=="users"&&ze!=="accounts"&&ze!=="skills"&&ze!=="deployment"&&ze!=="build"?s.jsxs("div",{"aria-label":"Configuration scope",className:"settings-scope-segments",role:"radiogroup",children:[t.role==="admin"?s.jsx("button",{"aria-checked":N==="global",className:N==="global"?"active":void 0,onClick:()=>ke("global"),role:"radio",type:"button",children:"Global"}):null,s.jsxs("div",{className:"settings-workspace-picker",ref:ye,children:[s.jsx("button",{"aria-checked":N==="workspace","aria-expanded":N==="workspace"?Xt:void 0,"aria-label":N==="workspace"?"Settings workspace target":void 0,className:N==="workspace"?"active settings-scope-workspace-trigger":void 0,disabled:n.length===0,onClick:()=>{if(N!=="workspace"){ke("workspace");return}Bn(ie=>!ie)},role:"radio",type:"button",children:N==="workspace"?s.jsxs(s.Fragment,{children:[s.jsxs("span",{children:["Workspace: ",(q==null?void 0:q.title)??"Select workspace"]}),s.jsx("span",{"aria-hidden":"true",children:"⌄"})]}):"Workspace"}),N==="workspace"&&Xt?s.jsx("div",{className:"settings-workspace-menu",role:"listbox",children:H.map(ie=>s.jsxs("div",{className:"settings-workspace-menu-group",children:[s.jsx("div",{className:"settings-workspace-menu-heading",children:ie.title}),ie.conversations.map(we=>s.jsxs("button",{"aria-selected":we.id===R,className:we.id===R?"selected":void 0,onClick:()=>{Ae(we.id),Bn(!1)},role:"option",type:"button",children:[s.jsx("span",{children:we.title}),s.jsxs("small",{children:["workspaces/",we.id]})]},we.id))]},ie.id))}):null]})]}):null]}),s.jsx("div",{className:"settings-header-actions",children:s.jsx("button",{"aria-label":"Close settings panel",onClick:te,type:"button",children:"×"})})]}),s.jsxs("div",{className:"settings-body",children:[s.jsxs("nav",{className:"settings-nav","aria-label":"Settings sections",children:[s.jsxs("button",{className:ze==="model"?"active":void 0,onClick:()=>Ze("model"),type:"button",children:[s.jsx("span",{children:"Runtime"}),s.jsx("small",{children:"Effective settings"})]}),s.jsxs("button",{className:ze==="responsibility"?"active":void 0,onClick:()=>Ze("responsibility"),type:"button",children:[s.jsx("span",{children:"Responsibility"}),s.jsx("small",{children:"Workspace role"})]}),s.jsxs("button",{className:ze==="memory"?"active":void 0,onClick:()=>Ze("memory"),type:"button",children:[s.jsx("span",{children:"Memory"}),s.jsx("small",{children:"Base + workspace context"})]}),s.jsxs("button",{className:ze==="environment"?"active":void 0,onClick:()=>Ze("environment"),type:"button",children:[s.jsx("span",{children:"Environment"}),s.jsx("small",{children:"Base + workspace variables"})]}),s.jsxs("button",{className:ze==="skills"?"active":void 0,onClick:()=>Ze("skills"),type:"button",children:[s.jsx("span",{children:"Skills"}),s.jsx("small",{children:"Instance + workspace skills"})]}),t.role==="admin"?s.jsxs(s.Fragment,{children:[s.jsxs("button",{className:ze==="accounts"?"active":void 0,onClick:()=>Ze("accounts"),type:"button",children:[s.jsx("span",{children:"Codex Accounts"}),s.jsx("small",{children:"Cloud login + active account"})]}),s.jsxs("button",{className:ze==="channels"?"active":void 0,onClick:()=>Ze("channels"),type:"button",children:[s.jsx("span",{children:"Custom model channels"}),s.jsx("small",{children:"Endpoint + key + fixed model"})]}),s.jsxs("button",{className:ze==="deployment"?"active":void 0,onClick:()=>Ze("deployment"),type:"button",children:[s.jsx("span",{children:"Deployment"}),s.jsx("small",{children:"Local integrations"})]}),s.jsxs("button",{className:ze==="build"?"active":void 0,onClick:()=>Ze("build"),type:"button",children:[s.jsx("span",{children:"Builds"}),s.jsx("small",{children:"Repositories & history"})]}),s.jsxs("button",{onClick:()=>{window.location.assign(`${Z1()}admin/host`)},type:"button",children:[s.jsx("span",{children:"Work Operations"}),s.jsx("small",{children:"Versions, restart, logs"})]}),s.jsxs("button",{className:ze==="system"?"active":void 0,onClick:()=>Ze("system"),type:"button",children:[s.jsx("span",{children:"System"}),s.jsx("small",{children:"Runtime + resources"})]}),s.jsxs("button",{className:ze==="users"?"active":void 0,onClick:()=>Ze("users"),type:"button",children:[s.jsx("span",{children:"Users"}),s.jsx("small",{children:"Access + roles"})]})]}):null]}),s.jsxs("section",{className:"settings-content",children:[ze!=="system"&&ze!=="users"&&ze!=="accounts"&&ze!=="channels"&&ze!=="skills"&&ze!=="deployment"&&ze!=="build"?s.jsxs("div",{className:`settings-scope-banner ${N==="workspace"?"workspace":"global"}`,children:[s.jsx("strong",{children:N==="workspace"?"Editing workspace custom settings":"Editing global settings"}),s.jsx("span",{children:N==="workspace"?`${(q==null?void 0:q.title)??"Selected workspace"} overrides global defaults.`:"These defaults apply to every workspace unless that workspace overrides them."})]}):null,ze==="system"?s.jsx(RN,{conversations:n,diagnostics:X,loading:P,onRefresh:pe}):ze==="users"?s.jsx($N,{currentUser:t,users:p,onCreate:se,onDelete:ve,onUpdate:Pe}):ze==="build"?t.role==="admin"?s.jsx(L7,{apiUrl:Ne,formatDate:lt}):null:ze==="skills"?s.jsx(G7,{apiUrl:Ne,admin:t.role==="admin",workspaceId:(q==null?void 0:q.id)??null,workspaces:n},t.role):ze==="channels"?t.role==="admin"?s.jsx(mE,{load:RD,save:_D,queryBalance:ID}):null:ze==="accounts"?t.role==="admin"?s.jsx(HN,{onSwitched:O}):null:ze==="deployment"?s.jsx(FN,{settings:a,onSave:V}):ze==="model"?s.jsx(PN,{enabled:N==="global",models:x,workspaceDirty:JSON.stringify(_)!==JSON.stringify(k),children:s.jsx(z6,{draft:N==="workspace"?ne:_,globalSettings:k,models:x,codexVersion:C,codexReleasedAt:M,codexUpdating:I,scope:N,workspaceOverrideCount:Le,settings:N==="workspace"?(J==null?void 0:J.effective)??ne:k,workspaceSettings:J,onDraftChange:N==="workspace"?Ke:Y,onResetWorkspaceSetting:oe,onSubmit:He,onUpdateCodexCli:ee})}):ze==="responsibility"?s.jsx(_N,{draft:Vn,saving:Zt,scope:N,workspace:q,onDraftChange:Un,onSubmit:ie=>{ie.preventDefault(),ie.stopPropagation(),!(N!=="workspace"||!q)&&(pr(!0),Ce(q.id,Vn).then(we=>Un(we)).finally(()=>pr(!1)))}}):ze==="memory"?s.jsx(VN,{baseSettings:h,scope:N,workspaceSettings:y,workspaceName:q==null?void 0:q.title,onSaveBaseItems:me,onSaveWorkspaceItems:U}):s.jsx(KN,{deleteConfirmKey:Jn,editingEnvironmentKey:l,environmentDraft:u,globalEnvironment:c,scope:N,workspaceEnvironment:f,valueVisible:Ut,onCancelEnvironmentEdit:F,onDeleteConfirmChange:er,onDeleteEnvironment:be,onDraftChange:he,onEditEnvironment:Z,onRevealEnvironmentValue:E,onSubmitEnvironment:it,onValueVisibleChange:ra,revealedEnvironmentKeys:Me})]})]})]})})}function RN({conversations:e,diagnostics:t,loading:n,onRefresh:a}){const l=(t==null?void 0:t.runtime.pool)??null,u=A.useMemo(()=>(t==null?void 0:t.systemLogs)??[],[t]),[c,f]=A.useState(!1),h=A.useMemo(()=>new Map(e.map(x=>[x.id,x.title])),[e]),m=A.useMemo(()=>t?JSON.stringify({generatedAt:t.generatedAt,app:t.app,systemLogs:u},null,2):"",[t,u]),p=async()=>{m&&(await navigator.clipboard.writeText(m),f(!0),window.setTimeout(()=>f(!1),1800))},y=()=>{if(!m||!t)return;const x=URL.createObjectURL(new Blob([m],{type:"application/json"})),C=document.createElement("a");C.href=x,C.download=`seele-system-log-${t.generatedAt.replaceAll(":","-").replaceAll(".","-")}.json`,C.click(),URL.revokeObjectURL(x)},k=()=>{if(!t||!u.length)return;const x=u[0],C=u.slice(0,5).map(q=>`- ${Xi(q.createdAt)} · ${q.level.toUpperCase()} · ${q.event} · ${q.summary}`).join(`
|
|
364
|
-
`),M=JSON.stringify(x,null,2),I=["## Environment","",`- Seele: ${t.app.version}`,`- Runtime: ${t.app.runtime}`,`- Report generated: ${Xi(t.generatedAt)}`,"","## Latest incident","","```json",M.slice(0,2500),"```","","## Recent system log","",C,"","_Generated by Seele System Log. Attach the downloaded JSON report when more history is needed._"].join(`
|
|
365
|
-
`),_=`[System Log] ${x.summary}`.slice(0,180),N=new URL("https://github.com/seele-labs/seele-work/issues/new");N.searchParams.set("title",_),N.searchParams.set("body",I),window.open(N.toString(),"_blank","noopener,noreferrer")};return s.jsxs("section",{className:"system-information-section",children:[s.jsxs("header",{className:"settings-section-header",children:[s.jsxs("div",{children:[s.jsx("h3",{children:"System"}),s.jsx("p",{children:"Read-only runtime and resource information managed by Seele."})]}),s.jsx("button",{className:"system-information-refresh",disabled:n,onClick:a,type:"button",children:n?"Refreshing...":"Refresh"})]}),l?s.jsxs(s.Fragment,{children:[s.jsxs("dl",{className:"system-information-summary",children:[s.jsxs("div",{children:[s.jsx("dt",{children:"LRU pool target"}),s.jsxs("dd",{children:[Rr(l.maxRetainedRuntimes)," runtimes"]}),s.jsx("small",{children:l.capacitySource==="system_memory"?"Idle runtimes are released by least recent use":"Fallback target because system memory was unavailable"})]}),s.jsxs("div",{children:[s.jsx("dt",{children:"Retention policy"}),s.jsxs("dd",{children:["LRU · ",bp(l.maxIdleSeconds*1e3)," max idle"]}),s.jsx("small",{children:"Only idle runtimes are eligible for eviction"})]}),s.jsxs("div",{children:[s.jsx("dt",{children:"Current pool"}),s.jsxs("dd",{children:[l.activeRuntimeCount," active · ",l.idleRuntimeCount," idle"]}),s.jsxs("small",{children:[l.retainedRuntimeCount," retained runtimes"]})]})]}),s.jsxs("section",{className:"system-runtime-list",children:[s.jsxs("header",{children:[s.jsxs("div",{children:[s.jsx("h4",{children:"Workspace runtimes"}),s.jsx("p",{children:"Active workspaces and idle runtimes currently retained for reuse."})]}),s.jsx("time",{dateTime:t==null?void 0:t.generatedAt,children:t?lt(t.generatedAt):""})]}),l.workspaces.length>0?s.jsxs("div",{className:"system-runtime-table",children:[s.jsxs("div",{className:"system-runtime-table-header",children:[s.jsx("span",{children:"Workspace"}),s.jsx("span",{children:"Status"}),s.jsx("span",{children:"Runtime"}),s.jsx("span",{children:"Age"})]}),l.workspaces.map(x=>s.jsxs("div",{className:"system-runtime-row",children:[s.jsxs("div",{children:[s.jsx("strong",{children:h.get(x.workspaceId)??x.workspaceId}),s.jsx("small",{children:x.workspaceId})]}),s.jsx("span",{className:`system-runtime-state ${x.turnId?"active":"idle"}`,children:x.lifecycle==="shutting_down"?"Shutting down":x.turnId?"Active":"Idle"}),s.jsxs("div",{children:[s.jsx("span",{children:x.turnId?x.state:"Retained"}),s.jsx("small",{children:x.pid===null?"PID unavailable":`PID ${x.pid}`})]}),s.jsx("span",{children:x.idleMs===null?bp(x.uptimeMs):`${bp(x.idleMs)} idle`})]},x.workspaceId))]}):s.jsx("div",{className:"system-runtime-empty",children:"No workspace runtimes are currently retained."})]}),s.jsxs("section",{className:"system-runtime-list system-log-list",children:[s.jsxs("header",{children:[s.jsxs("div",{children:[s.jsx("h4",{children:"System log"}),s.jsx("p",{children:"Recent persistent warnings and errors for external diagnostics."})]}),s.jsxs("div",{className:"system-log-actions",children:[s.jsx("button",{"aria-label":"Copy system log report",className:"icon-button",disabled:!u.length,onClick:()=>void p(),title:"Copy system log report",type:"button",children:s.jsx(rg,{})}),s.jsx("button",{"aria-label":"Download system log report",className:"icon-button",disabled:!u.length,onClick:y,title:"Download system log report",type:"button",children:s.jsx(ON,{})}),s.jsx("button",{"aria-label":"Report system log issue",className:"icon-button",disabled:!u.length,onClick:k,title:"Report issue to seele-labs/seele-work",type:"button",children:s.jsx(IN,{})}),c?s.jsx("small",{children:"Copied"}):null]})]}),u.length?s.jsx("div",{className:"system-log-entries",children:u.map(x=>s.jsxs("details",{className:`system-log-entry ${x.level}`,children:[s.jsxs("summary",{children:[s.jsx("span",{className:"system-log-level",children:x.level}),s.jsxs("span",{children:[s.jsx("strong",{children:x.summary}),s.jsxs("small",{children:[x.component," · ",Xi(x.createdAt)]})]})]}),s.jsxs("dl",{children:[s.jsxs("div",{children:[s.jsx("dt",{children:"Event"}),s.jsx("dd",{children:x.event})]}),x.workspaceId?s.jsxs("div",{children:[s.jsx("dt",{children:"Workspace"}),s.jsxs("dd",{children:[h.get(x.workspaceId)??x.workspaceId," · ",x.workspaceId]})]}):null,x.turnId?s.jsxs("div",{children:[s.jsx("dt",{children:"Turn"}),s.jsx("dd",{children:x.turnId})]}):null,x.runtimeId?s.jsxs("div",{children:[s.jsx("dt",{children:"Runtime"}),s.jsx("dd",{children:x.runtimeId})]}):null]}),s.jsx("pre",{children:JSON.stringify(x.detail,null,2)})]},x.id))}):s.jsx("div",{className:"system-runtime-empty",children:"No warnings or errors have been recorded."})]})]}):s.jsx("div",{className:"system-runtime-empty",children:n?"Loading system information...":"System information is unavailable."})]})}function ON(){return s.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",children:s.jsx("path",{d:"M12 3v12m0 0 4-4m-4 4-4-4M5 20h14"})})}function IN(){return s.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",children:[s.jsx("circle",{cx:"12",cy:"12",r:"9"}),s.jsx("path",{d:"M12 7v6m0 4h.01"})]})}function _N({draft:e,saving:t,scope:n,workspace:a,onDraftChange:l,onSubmit:u}){const c=n==="workspace";return s.jsxs(s.Fragment,{children:[s.jsx("header",{className:"settings-section-header",children:s.jsxs("div",{children:[s.jsx("h3",{children:"Responsibility"}),s.jsx("p",{children:"Workspace-specific long-lived role. This is content context, so it is only editable in workspace scope."})]})}),c&&a?s.jsxs("form",{className:"settings-responsibility-form",onSubmit:u,children:[s.jsxs("label",{children:[s.jsx("span",{children:a.title}),s.jsx("textarea",{"aria-label":"Workspace responsibility",onChange:f=>l(f.target.value),placeholder:"Describe this workspace's durable role, scope, and long-term responsibilities.",rows:14,value:e})]}),s.jsx("div",{className:"settings-form-actions",children:s.jsx("button",{disabled:t,type:"submit",children:t?"Saving...":"Save responsibility"})})]}):s.jsx("section",{className:"settings-readonly-block",children:s.jsxs("div",{children:[s.jsx("strong",{children:"Workspace-only setting"}),s.jsx("span",{children:"Switch the header scope to Workspace and choose a workspace to edit its responsibility."})]})})]})}function LN({usage:e}){return s.jsx("div",{"aria-label":"Codex account usage",className:"codex-account-usage",children:[...e.windows].sort((t,n)=>t.windowDurationMins-n.windowDurationMins).map(t=>{const n=$f(t.usedPercent),a=I6(t.windowDurationMins);return s.jsxs("div",{className:"codex-account-usage-window",children:[s.jsx("div",{className:"codex-account-usage-heading",children:s.jsxs("span",{children:[a," used ",s.jsxs("small",{children:["(Resets ",mb(t.resetsAt),")"]})]})}),s.jsxs("div",{className:"codex-account-usage-meter",children:[s.jsx("span",{"aria-hidden":"true",className:"codex-account-usage-track",children:s.jsx("span",{style:{width:`${n}%`}})}),s.jsx("strong",{children:hb(n)})]})]},`${t.windowDurationMins}:${t.resetsAt}`)})})}function BN(e){if(!e)return null;const t=e.toLowerCase();return t==="chatgpt"?"ChatGPT":t==="apikey"||t==="api_key"?"API key":e}function qN(e){return e?e.split(/[_-]/).filter(Boolean).map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" "):null}function UN({onOpen:e}){const[t,n]=A.useState(null);A.useEffect(()=>{let u=!1,c;const f=async()=>{try{const h=await tf();u||n(h)}catch{}finally{u||(c=window.setTimeout(()=>void f(),6e4))}};return f(),()=>{u=!0,window.clearTimeout(c)}},[]);const a=(t==null?void 0:t.accounts.filter(u=>{var f,h;const c=(h=(f=t.credentialStatus)==null?void 0:f[u.id])==null?void 0:h.renewal;return(c==null?void 0:c.statusUnavailable)||(c==null?void 0:c.requiresReauthentication)||((c==null?void 0:c.consecutiveFailures)??0)>=4}))??[];if(!a.length)return null;const l=a.some(u=>{var f,h,m,p,y;const c=(h=(f=t==null?void 0:t.credentialStatus)==null?void 0:f[u.id])==null?void 0:h.accessTokenExpiresAt;return((y=(p=(m=t==null?void 0:t.credentialStatus)==null?void 0:m[u.id])==null?void 0:p.renewal)==null?void 0:y.requiresReauthentication)||!c||Date.parse(c)-Date.now()<=48*36e5});return s.jsxs("button",{type:"button",role:"alert",style:{margin:"8px",padding:"8px",textAlign:"left",borderRadius:8,border:`1px solid ${l?"#fecaca":"#fde68a"}`,background:l?"#fef2f2":"#fffbeb",color:l?"#991b1b":"#92400e",fontSize:12,cursor:"pointer"},onClick:e,title:a.map(u=>u.name).join("、"),children:["⚠ ",a.length," 个账号自动续期异常。",l?"请及时检查或重新登录。":"","查看 Codex Accounts →"]})}function HN({onSwitched:e}){var Bn,Vn,Un,Zt,pr,ye,Le;const[t,n]=A.useState(null),[a,l]=A.useState(!1),[u,c]=A.useState(!0),[f,h]=A.useState(!1),[m,p]=A.useState(!1),[y,k]=A.useState(!1),[x,C]=A.useState(""),[M,I]=A.useState(""),[_,N]=A.useState(!1),[q,R]=A.useState(""),[X,P]=A.useState(null),[H,J]=A.useState(null),[ne,F]=A.useState(""),[te,se]=A.useState(()=>new Date);A.useEffect(()=>{const ie=window.setInterval(()=>se(new Date),3e4);return()=>window.clearInterval(ie)},[]);const[ve,be]=A.useState(""),[he,Z]=A.useState(null),[me,V]=A.useState(""),[Ce,U]=A.useState(null),[E,Y]=A.useState(!1),[O,ee]=A.useState(""),[ke,Ae]=A.useState(null),He=A.useRef(new Map);async function it(ie,we){if(m||f||!window.confirm(`Use one reset credit for ${ie.name}? This consumes the credit if an eligible rate-limit window is reset.`))return;const qe=JSON.stringify([ie.id,we.id]),Ge=He.current.get(qe)??crypto.randomUUID();He.current.set(qe,Ge),p(!0),I(""),ee("");try{const ot=Ne(`settings/runtime/accounts/${encodeURIComponent(ie.id)}/reset-credits/consume`),Tt=await fetch(ot,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({creditId:we.id,idempotencyKey:Ge})});await Ve(Tt,{method:"POST",url:ot});const yt=await Tt.json(),bt={reset:"Reset credit used. Eligible rate limits have been reset.",alreadyRedeemed:"This reset was already completed.",nothingToReset:"No rate-limit window needs a reset. No credit was used.",noCredit:"No reset credit is available for this account."}[yt.outcome];if(!bt)throw new Error("Reset outcome is unknown. Refresh details before trying again.");(yt.outcome==="nothingToReset"||yt.outcome==="noCredit")&&He.current.delete(qe),ee(`${ie.name}: ${bt}`),n(Ht=>{if(!Ht)return Ht;const Qt={...Ht.accountDetails};return delete Qt[ie.id],{...Ht,accountDetails:Qt}});try{const Ht=await O3(!0);n(Qt=>op(Qt,Ht))}catch{I("The result above is confirmed, but refreshing details failed. Please refresh details.")}}catch(ot){I(`${ft(ot).message} The outcome may be unknown; retrying this credit on this page reuses the same request ID.`)}finally{p(!1)}}async function pe(){var we;const ie=await tf();n(ie),l(ie.managementAllowed===!0),ie.managementAllowed===!0&&((we=ie.login)==null?void 0:we.status)==="pending"&&(P(ie.login),N(!0))}async function Pe(ie){h(!0),I("");try{const we=await O3(ie);n(qe=>op(qe,we))}catch(we){I(ft(we).message)}finally{h(!1)}}A.useEffect(()=>{let ie=!1;return tf().then(we=>{var qe;ie||(n(we),l(we.managementAllowed===!0),we.managementAllowed===!0&&((qe=we.login)==null?void 0:qe.status)==="pending"&&(P(we.login),N(!0)))}).catch(we=>{ie||I(ft(we).message)}).finally(()=>{ie||c(!1)}),()=>{ie=!0}},[]),A.useEffect(()=>{let ie=!1,we=!1;const qe=window.setInterval(()=>{we||m||f||(we=!0,tf().then(Ge=>{ie||n(ot=>{const Tt=op(ot,Ge),yt=Object.fromEntries(Ge.accounts.map(rt=>[rt.id,Tt.accountDetails[rt.id]??Ge.accountDetails[rt.id]]).filter(([,rt])=>rt!=null));return{...Ge,accountDetails:yt}})}).catch(Ge=>{ie||I(ft(Ge).message)}).finally(()=>{we=!1}))},15e3);return()=>{ie=!0,window.clearInterval(qe)}},[m,f]),A.useEffect(()=>{if(!X||X.status!=="pending")return;let ie=!1;const we=window.setInterval(()=>{$D(X.id).then(async qe=>{ie||(P(qe),qe.status!=="pending"&&(window.clearInterval(we),qe.status==="succeeded"&&(n(Ge=>{if(!Ge||!qe.account)return Ge;const ot=Ge.accounts.some(Tt=>{var yt;return Tt.id===((yt=qe.account)==null?void 0:yt.id)})?Ge.accounts.map(Tt=>{var yt;return Tt.id===((yt=qe.account)==null?void 0:yt.id)?qe.account:Tt}):[...Ge.accounts,qe.account];return{...Ge,accounts:ot}}),await pe())))}).catch(qe=>{ie||I(ft(qe).message)})},1e3);return()=>{ie=!0,window.clearInterval(we)}},[X==null?void 0:X.id,X==null?void 0:X.status]);function Ke(){R(""),P(null),I(""),Y(!1),N(!0)}async function oe(ie){ie.preventDefault(),p(!0),I("");try{P(await HD(q.trim()))}catch(we){I(ft(we).message)}finally{p(!1)}}async function Me(){if(!X||X.status!=="pending"){N(!1);return}p(!0),I("");try{const ie=await FD(X.id);P(ie),N(!1)}catch(ie){I(ft(ie).message)}finally{p(!1)}}function ze(ie){J(ie),F(ie.renewalDay==null?"":String(ie.renewalDay)),be(ie.name),I(""),C("")}async function Ze(ie){p(!0),k(!0),I(""),C("");try{const we=Ne(`settings/runtime/accounts/${encodeURIComponent(ie.id)}/renew`),qe=await fetch(we,{method:"POST"});await Ve(qe,{method:"POST",url:we});const Ge=await qe.json();n(Ge.snapshot),Ge.renewal.lastError?I(Ge.renewal.lastError):C("令牌已续期,账号选择和其他配置未改变。")}catch(we){I(ft(we).message)}finally{p(!1),k(!1)}}async function Ut(ie){p(!0),I("");try{const we=Ne(`settings/runtime/accounts/${encodeURIComponent(ie.id)}/reauthenticate`),qe=await fetch(we,{method:"POST"});await Ve(qe,{method:"POST",url:we});const Ge=await qe.json();P(Ge.login),J(null),Y(!1),N(!0)}catch(we){I(ft(we).message)}finally{p(!1)}}async function ra(ie){if(ie.preventDefault(),!H)return;const we=ve.trim();if(!we){J(null);return}p(!0),I("");try{await PD(H.id,we,ne===""?null:Number(ne)),await pe(),J(null)}catch(qe){I(ft(qe).message)}finally{p(!1)}}async function Jn(){if(he){p(!0),I("");try{const ie=await VD(he.id);n(ie),Z(null),V("Account selection saved. Each deployment applies it to new requests after syncing; active turns are unchanged."),e().catch(()=>{V("Account selection saved. Refreshing local status failed; deployment synchronization will continue in the background.")})}catch(ie){const we=ft(ie);I(we.detail??we.message)}finally{p(!1)}}}async function er(){if(Ce){p(!0),I("");try{await GD(Ce.id),await pe(),U(null)}catch(ie){I(ft(ie).detail??ft(ie).message)}finally{p(!1)}}}const Xt=(t==null?void 0:t.accounts)??[];return s.jsxs("section",{className:"settings-section codex-accounts-section",children:[s.jsxs("header",{className:"settings-section-header",children:[s.jsxs("div",{children:[s.jsx("h3",{children:"Codex Accounts"}),s.jsx("p",{children:"Manage the cloud-owned Codex logins. Every deployment uses the same globally active account; workspaces do not bind to accounts."})]}),s.jsx("div",{className:"codex-account-toolbar",children:a?s.jsxs(s.Fragment,{children:[s.jsx("button",{className:"codex-account-add",disabled:m||f||Xt.length===0,onClick:()=>void Pe(!0),type:"button",children:f?"Refreshing...":"Refresh details"}),s.jsx("button",{className:"codex-account-add",disabled:m||f||(X==null?void 0:X.status)==="pending",onClick:Ke,type:"button",children:"Add account"})]}):s.jsx("button",{className:"codex-account-add",disabled:u,onClick:()=>void pe().catch(ie=>I(ft(ie).message)),type:"button",children:"刷新列表"})})]}),!u&&!a?s.jsx("p",{className:"settings-note",role:"status",children:"当前部署只读。新增、删除、切换、登录、续期及使用重置券,请在云端 Work 操作。"}):null,s.jsxs("div",{className:"codex-account-policy",children:[s.jsx("strong",{children:"Cloud-wide account selection"}),s.jsx("span",{children:"Active turns keep their original account. Each deployment uses the selected account for new requests after syncing, without pausing existing work. There is no per-deployment selection."})]}),me?s.jsx("p",{className:"settings-note",role:"status",children:me}):null,M?s.jsx("p",{className:"memory-editor-error",children:M}):null,u?s.jsx("p",{className:"settings-note",children:"Loading Codex accounts..."}):null,!u&&Xt.length===0?s.jsx("p",{className:"settings-note",children:"No persisted Codex account. Add one with the official device login flow."}):null,s.jsx("div",{className:"codex-account-list",children:Xt.map(ie=>{var aa,fi,Ia,Ir,wa;const we=(t==null?void 0:t.activeAccountId)===ie.id,qe=uE(ie.renewalDay,te),Ge=(aa=t==null?void 0:t.accountDetails)==null?void 0:aa[ie.id],ot=(fi=t==null?void 0:t.credentialStatus)==null?void 0:fi[ie.id],Tt=ot==null?void 0:ot.accessTokenExpiresAt,yt=Tt?Date.parse(Tt):NaN,rt=Math.ceil((yt-te.getTime())/864e5),bt=((Ia=t==null?void 0:t.accountIssues)==null?void 0:Ia[ie.id])??[],Ht=bt.length>0,Qt=bt.some(en=>["missing_credential","invalid_credential","credential_unreadable"].includes(en.code)),nl=[ie.email,BN(ie.accountType),qN(ie.planType)].filter(en=>!!en);return s.jsxs("article",{className:`codex-account-card${we?" active":""}${Ht?" issue":""}`,children:[s.jsxs("div",{className:"codex-account-main",children:[s.jsxs("div",{className:"codex-account-title",children:[s.jsx("strong",{children:ie.name}),we?s.jsx("span",{className:"codex-account-active",children:"Selected"}):null,Ht?s.jsx("span",{className:"codex-account-warning",children:"Needs attention"}):null]}),s.jsxs("small",{children:[nl.join(" · ")||`Added ${lt(ie.createdAt)}`,qe?s.jsxs("span",{title:`按手动设置的每月 ${ie.renewalDay} 日计算(北京时间),下次 ${qe.date}`,children:[" · ",qe.days===0?"今日续费":`距续费 ${qe.days} 天`]}):null,Number.isFinite(yt)?s.jsxs("span",{className:rt<=3?"codex-account-warning":"",title:`访问令牌到期:${lt(Tt)}(北京时间)。${ot!=null&&ot.lastRefreshedAt?`上次续期:${lt(ot.lastRefreshedAt)}。`:""}访问令牌可自动续期;到期不等于账号或订阅失效。若刷新持续失败,请在 Edit 中重新登录。`,children:[" · ",yt<=te.getTime()?"访问令牌已到期":`令牌 ${rt} 天后到期`]}):ie.accountType==="chatgpt"?s.jsx("span",{title:"无法从已保存凭据读取有效期,不代表账号已失效",children:" · 令牌有效期未知"}):null,(Ir=ot==null?void 0:ot.renewal)!=null&&Ir.lastError?s.jsxs("span",{className:ot.renewal.requiresReauthentication||ot.renewal.consecutiveFailures>=4?"codex-account-detail-error":"codex-account-warning",style:ot.renewal.requiresReauthentication||ot.renewal.consecutiveFailures>=4?{color:"#b91c1c",fontWeight:600}:void 0,title:`${ot.renewal.lastError};连续失败 ${ot.renewal.consecutiveFailures} 次;最近尝试 ${ot.renewal.lastAttemptAt?lt(new Date(ot.renewal.lastAttemptAt*1e3).toISOString()):"未知"};下次重试 ${ot.renewal.nextAttemptAt?lt(new Date(ot.renewal.nextAttemptAt*1e3).toISOString()):"待定"}(北京时间)`,children:[" · ",ot.renewal.statusUnavailable?"续期状态不可用":ot.renewal.requiresReauthentication?"需要重新登录":ot.renewal.consecutiveFailures>=4?"自动续期异常":"续期重试中"]}):null]}),Ht?s.jsx("div",{className:"codex-account-issues",role:"status",children:bt.map(en=>s.jsx("span",{children:en.message},en.code))}):null,Ge!=null&&Ge.usage?s.jsx(LN,{usage:Ge.usage}):s.jsx("span",{className:"codex-account-usage-empty",children:f?"Reading account usage...":"Usage unavailable"}),Ge?s.jsxs("small",{className:Ge.error?"codex-account-detail-error":"codex-account-refreshed",children:[(wa=Ge.usage)!=null&&wa.updatedAt?`Updated ${lt(Ge.usage.updatedAt)}`:`Checked ${lt(Ge.refreshedAt)}`,Ge.error?` · Refresh issue: ${Ge.error}`:""]}):null]}),s.jsxs("div",{className:"codex-account-actions",children:[s.jsxs("button",{className:"codex-credit-count",type:"button",disabled:m,"aria-label":`${ie.name}(${Ge!=null&&Ge.error||!(Ge!=null&&Ge.rateLimitResetCredits)?"券数量未知":`${Ge.rateLimitResetCredits.availableCount} 张可用券`})`,title:`${ie.name}(${Ge!=null&&Ge.error||!(Ge!=null&&Ge.rateLimitResetCredits)?"券数量未知":`${Ge.rateLimitResetCredits.availableCount} 张可用券`})`,onClick:()=>{Ae(ie.id),ee(""),I("")},children:[s.jsxs("svg",{"aria-hidden":"true",width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",children:[s.jsx("path",{d:"M3 5h18v5a2 2 0 0 0 0 4v5H3v-5a2 2 0 0 0 0-4V5Z"}),s.jsx("path",{d:"M16 5v3m0 3v2m0 3v3"})]}),s.jsx("span",{children:Ge!=null&&Ge.error||!(Ge!=null&&Ge.rateLimitResetCredits)?"—":Ge.rateLimitResetCredits.availableCount})]}),a?s.jsxs(s.Fragment,{children:[s.jsx("button",{disabled:m||f||Qt,onClick:()=>ze(ie),title:Qt?"Sign in again or delete this account to replace its credential.":void 0,type:"button",children:Ht?"Repair & edit":"Edit"}),s.jsx("button",{disabled:m||we||Ht,onClick:()=>{I(""),Z(ie)},type:"button",children:Ht?"Unavailable":"Switch"}),s.jsx("button",{className:"danger",disabled:m||f||we,onClick:()=>{I(""),U(ie)},type:"button",children:"Delete"})]}):null]})]},ie.id)})}),ke&&Xt.some(ie=>ie.id===ke)?s.jsxs("dialog",{className:"memory-editor-popover codex-credit-dialog","aria-label":"Rate-limit reset credits",ref:ie=>{ie&&!ie.open&&ie.showModal()},onCancel:ie=>{ie.preventDefault(),m||Ae(null)},children:[s.jsxs("header",{children:[s.jsx("strong",{children:"Rate-limit reset credits"}),s.jsx("button",{autoFocus:!0,className:"memory-icon-button",type:"button","aria-label":"Close reset credits",disabled:m,onClick:()=>Ae(null),children:"×"})]}),O?s.jsx("p",{className:"settings-note",role:"status",children:O}):null,M?s.jsx("p",{className:"memory-editor-error",role:"alert",children:M}):null,Xt.filter(ie=>ie.id===ke).map(ie=>{var Ge,ot,Tt,yt;const we=(Ge=t==null?void 0:t.accountDetails)==null?void 0:Ge[ie.id],qe=we==null?void 0:we.rateLimitResetCredits;return s.jsxs("article",{className:"codex-credit-group",children:[s.jsxs("div",{className:"codex-credit-group-heading",children:[s.jsx("strong",{children:ie.name}),s.jsx("span",{children:we!=null&&we.error?"Unavailable":qe?`${qe.availableCount} available`:f?"Loading...":"Unavailable"})]}),qe?qe.availableCount===0&&!((ot=qe.credits)!=null&&ot.length)?s.jsx("small",{children:"No reset credits available."}):null:s.jsx("small",{children:"Credit details unavailable. Refresh details to try again."}),s.jsx("div",{className:"codex-credit-grid",children:(Tt=qe==null?void 0:qe.credits)==null?void 0:Tt.map(rt=>{var nl,aa;const bt=rt.expiresAt!==null&&rt.expiresAt*1e3<=te.getTime(),Ht=rt.status==="available"&&!bt,Qt=bt&&rt.status==="available"?"Expired":rt.status;return s.jsxs("article",{className:`codex-credit-ticket${Ht?"":" inactive"}`,"aria-label":`${ie.name}: ${rt.title||"Rate-limit reset"}`,children:[s.jsxs("div",{className:"codex-credit-ticket-heading",children:[s.jsx("strong",{title:rt.title||"Rate-limit reset",children:rt.title||"Rate-limit reset"}),s.jsx("span",{className:"codex-credit-badge",children:Ht?"1 use":Qt})]}),s.jsx("small",{children:rt.expiresAt===null?"No expiry":`Expires ${lt(new Date(rt.expiresAt*1e3).toISOString())}`}),s.jsxs("div",{className:"codex-credit-ticket-actions",children:[s.jsxs("details",{children:[s.jsx("summary",{children:"Details"}),rt.description?s.jsx("p",{children:rt.description}):null,s.jsxs("p",{children:["Single-use credit · ",Qt]}),s.jsxs("p",{children:["Granted ",lt(new Date(rt.grantedAt*1e3).toISOString())]}),rt.resetType!=="codexRateLimits"?s.jsx("p",{children:"This credit type is not supported."}):null]}),a?s.jsx("button",{className:"codex-account-add codex-credit-use",type:"button",disabled:m||f||!!(we!=null&&we.error)||!Ht||rt.resetType!=="codexRateLimits"||!!((aa=(nl=t==null?void 0:t.accountIssues)==null?void 0:nl[ie.id])!=null&&aa.length),onClick:()=>void it(ie,rt),children:"Use"}):null]})]},rt.id)})}),qe&&qe.availableCount>(((yt=qe.credits)==null?void 0:yt.length)??0)?s.jsx("small",{children:"Credit details unavailable for some credits. Refresh details to use them."}):null,we!=null&&we.error?s.jsxs("small",{className:"codex-credit-error",children:["Refresh issue: ",we.error]}):null]},ie.id)}),a?s.jsx("footer",{className:"memory-editor-actions",children:s.jsx("button",{type:"button",className:"memory-dialog-button",disabled:m||f,onClick:()=>void Pe(!0),children:f?"Refreshing...":"Refresh details"})}):null]}):null,H?s.jsx("div",{className:"memory-editor-overlay",onClick:()=>!m&&J(null),role:"presentation",children:s.jsxs("form",{"aria-label":"Edit Codex account",className:"memory-editor-popover codex-account-login-dialog",onClick:ie=>ie.stopPropagation(),onSubmit:ie=>void ra(ie),children:[s.jsxs("header",{children:[s.jsx("strong",{children:"Edit Codex Account"}),s.jsx("button",{"aria-label":"Close account editor",className:"memory-icon-button",disabled:m,onClick:()=>J(null),type:"button",children:"×"})]}),s.jsx("p",{className:"settings-note",children:"This name is only a Seele label. It does not change the Codex login or credential."}),s.jsxs("label",{children:[s.jsx("span",{children:"Account name"}),s.jsx("input",{"aria-label":"Codex account name",autoFocus:!0,maxLength:80,onChange:ie=>be(ie.target.value),value:ve})]}),s.jsxs("label",{children:[s.jsx("span",{children:"每月续费日"}),s.jsxs("select",{"aria-label":"每月续费日",value:ne,title:"按北京时间计算;不足对应日期的月份按月末计算",onChange:ie=>F(ie.target.value),children:[s.jsx("option",{value:"",children:"未设置"}),Array.from({length:31},(ie,we)=>we+1).map(ie=>s.jsxs("option",{value:ie,children:[ie," 日"]},ie))]})]}),M?s.jsx("p",{className:"memory-editor-error",children:M}):null,s.jsxs("div",{className:"memory-editor-actions",children:[x?s.jsx("span",{role:"status",children:x}):null,H.accountType==="chatgpt"?s.jsx("button",{className:"memory-dialog-button",disabled:m,onClick:()=>void Ze(H),type:"button",children:y?"续期中…":"立即续期"}):null,s.jsx("button",{className:"memory-dialog-button",disabled:m||((Bn=t==null?void 0:t.login)==null?void 0:Bn.status)==="pending",onClick:()=>void Ut(H),type:"button",children:"重新登录"}),s.jsx("button",{className:"memory-dialog-button",disabled:m,onClick:()=>J(null),type:"button",children:"Cancel"}),s.jsx("button",{className:"memory-dialog-button primary",disabled:m||!ve.trim(),type:"submit",children:m?"Saving...":"Save"})]}),(Zt=(Un=(Vn=t==null?void 0:t.credentialStatus)==null?void 0:Vn[H.id])==null?void 0:Un.renewal)!=null&&Zt.lastResponse?s.jsxs("details",{children:[s.jsx("summary",{children:"最近续期响应(凭据已脱敏)"}),s.jsx("button",{className:"memory-dialog-button",type:"button",onClick:()=>{var ie,we,qe;navigator.clipboard.writeText(JSON.stringify((qe=(we=(ie=t.credentialStatus)==null?void 0:ie[H.id])==null?void 0:we.renewal)==null?void 0:qe.lastResponse,null,2)).then(()=>C("已复制脱敏响应")).catch(()=>I("复制失败,请手动选择响应内容复制"))},children:"复制响应"}),s.jsx("pre",{style:{maxHeight:280,overflow:"auto",whiteSpace:"pre-wrap",overflowWrap:"anywhere"},children:JSON.stringify((ye=(pr=t.credentialStatus[H.id])==null?void 0:pr.renewal)==null?void 0:ye.lastResponse,null,2)})]}):null]})}):null,_?s.jsx("div",{className:"memory-editor-overlay",onClick:()=>!m&&!X&&N(!1),role:"presentation",children:X?s.jsxs("section",{"aria-label":"Complete Codex account login",className:"memory-delete-dialog codex-account-login-dialog",onClick:ie=>ie.stopPropagation(),children:[s.jsxs("header",{children:[s.jsx("strong",{children:X.reauthenticateAccountId?X.status==="succeeded"?"账号登录已更新":"重新登录 Codex 账号":X.status==="succeeded"?"Account Added":"Complete Codex Login"}),s.jsx("button",{"aria-label":"Close account login",className:"memory-icon-button",disabled:m,onClick:()=>void Me(),type:"button",children:"×"})]}),X.status==="pending"?s.jsxs(s.Fragment,{children:[s.jsx("p",{children:"Open the official Codex device page and enter this one-time code."}),X.reauthenticateAccountId?s.jsxs("p",{children:["请登录 ",s.jsx("strong",{children:X.accountName})," 对应的原 ChatGPT 用户和 workspace。成功后仅更新凭据,保留名称、续费日和当前账号选择;尚未保存的编辑不会提交。"]}):null,s.jsxs("div",{className:"codex-device-code",children:[s.jsx("strong",{children:X.userCode}),s.jsx("button",{onClick:()=>{navigator.clipboard.writeText(X.userCode),Y(!0),window.setTimeout(()=>Y(!1),1500)},type:"button",children:E?"Copied":"Copy code"})]}),s.jsx("a",{href:X.verificationUrl,rel:"noreferrer",target:"_blank",children:"Open Codex device login"}),s.jsx("small",{className:"codex-login-waiting",children:"Waiting for Codex to confirm the login..."})]}):X.status==="succeeded"?s.jsxs("p",{children:[s.jsx("strong",{children:((Le=X.account)==null?void 0:Le.name)??X.accountName})," is persisted on the cloud and ready to synchronize. It was not activated automatically."]}):s.jsx("p",{className:"memory-editor-error",children:X.error??"Codex login was cancelled."}),s.jsx("div",{className:"memory-delete-actions",children:s.jsx("button",{className:"memory-dialog-button",disabled:m,onClick:()=>void Me(),type:"button",children:X.status==="pending"?"Cancel login":"Close"})})]}):s.jsxs("form",{"aria-label":"Add Codex account",className:"memory-editor-popover codex-account-login-dialog",onClick:ie=>ie.stopPropagation(),onSubmit:ie=>void oe(ie),children:[s.jsxs("header",{children:[s.jsx("strong",{children:"Add Codex Account"}),s.jsx("button",{"aria-label":"Close account login",className:"memory-icon-button",onClick:()=>N(!1),type:"button",children:"×"})]}),s.jsx("p",{className:"settings-note",children:"Seele creates the login profile on the cloud. Completing login shares it with every deployment but does not make it active."}),s.jsxs("label",{children:[s.jsx("span",{children:"Account name"}),s.jsx("input",{autoFocus:!0,maxLength:80,onChange:ie=>R(ie.target.value),placeholder:"For example: Codex backup",value:q})]}),M?s.jsx("p",{className:"memory-editor-error",children:M}):null,s.jsxs("div",{className:"memory-editor-actions",children:[s.jsx("button",{className:"memory-dialog-button",onClick:()=>N(!1),type:"button",children:"Cancel"}),s.jsx("button",{className:"memory-dialog-button primary",disabled:m||!q.trim(),type:"submit",children:m?"Starting...":"Continue"})]})]})}):null,he?s.jsx("div",{className:"memory-editor-overlay",onClick:()=>!m&&Z(null),role:"presentation",children:s.jsxs("section",{"aria-label":"Switch Codex account",className:"memory-delete-dialog",onClick:ie=>ie.stopPropagation(),children:[s.jsxs("header",{children:[s.jsx("strong",{children:"Switch Codex Account"}),s.jsx("button",{"aria-label":"Close account switch",className:"memory-icon-button",disabled:m,onClick:()=>Z(null),type:"button",children:"×"})]}),s.jsxs("p",{children:["Switch cloud-wide execution to ",s.jsx("strong",{children:he.name}),"? Active turns continue with the account they started with. New requests use this account once their deployment syncs; workspace threads and memory stay unchanged."]}),M?s.jsx("p",{className:"memory-editor-error",children:M}):null,s.jsxs("div",{className:"memory-delete-actions",children:[s.jsx("button",{className:"memory-dialog-button",disabled:m,onClick:()=>Z(null),type:"button",children:"Cancel"}),s.jsx("button",{className:"memory-dialog-button primary",disabled:m,onClick:()=>void Jn(),type:"button",children:m?"Switching...":"Switch account"})]})]})}):null,Ce?s.jsx("div",{className:"memory-editor-overlay",onClick:()=>!m&&U(null),role:"presentation",children:s.jsxs("section",{"aria-label":"Delete Codex account",className:"memory-delete-dialog",onClick:ie=>ie.stopPropagation(),children:[s.jsxs("header",{children:[s.jsx("strong",{children:"Delete Codex Account"}),s.jsx("button",{"aria-label":"Close account deletion",className:"memory-icon-button",disabled:m,onClick:()=>U(null),type:"button",children:"×"})]}),s.jsxs("p",{children:["Delete ",s.jsx("strong",{children:Ce.name})," and its persisted Codex credential from the cloud and every member mirror? This cannot be undone."]}),M?s.jsx("p",{className:"memory-editor-error",children:M}):null,s.jsxs("div",{className:"memory-delete-actions",children:[s.jsx("button",{className:"memory-dialog-button",disabled:m,onClick:()=>U(null),type:"button",children:"Cancel"}),s.jsx("button",{className:"memory-dialog-button danger",disabled:m,onClick:()=>void er(),type:"button",children:m?"Deleting...":"Delete"})]})]})}):null]})}function $N({currentUser:e,users:t,onCreate:n,onDelete:a,onUpdate:l}){const u={username:"",password:"",role:"user",active:!0},[c,f]=A.useState(null),[h,m]=A.useState(u),[p,y]=A.useState(!1),[k,x]=A.useState(null),[C,M]=A.useState("");function I(){m(u),M(""),f("new")}function _(R){m({username:R.username,password:"",role:R.role,active:R.active}),M(""),f(R)}function N(){p||(f(null),M(""))}async function q(R){if(R.preventDefault(),!!c){y(!0),M("");try{c==="new"?await n({username:h.username.trim(),password:h.password,role:h.role}):await l(c.id,{username:h.username.trim(),password:h.password||void 0,role:h.role,active:h.active}),f(null)}catch(X){M(ft(X).message)}finally{y(!1)}}}return s.jsxs("section",{className:"settings-section user-management-section",children:[s.jsx("header",{className:"settings-section-header",children:s.jsxs("div",{children:[s.jsx("h3",{children:"Users"}),s.jsx("p",{children:"Manage sign-in access and Seele roles."})]})}),s.jsx("div",{className:"memory-items-editor-header actions-only",children:s.jsx("button",{"aria-label":"Add user",className:"memory-icon-button",onClick:I,title:"Add user",type:"button",children:"+"})}),s.jsxs("div",{className:"user-list",children:[t.map(R=>s.jsxs("div",{className:"user-list-item",children:[s.jsxs("div",{className:"user-list-main",children:[s.jsxs("div",{children:[s.jsx("strong",{children:R.username}),R.id===e.id?s.jsx("span",{className:"user-current-badge",children:"Current"}):null]}),s.jsxs("small",{children:["Created ",lt(R.createdAt)]})]}),s.jsx("span",{className:`user-role-badge role-${R.role}`,children:R.role}),s.jsx("span",{className:`user-status ${R.active?"active":"disabled"}`,children:R.active?"Active":"Disabled"}),s.jsxs("div",{className:"user-row-actions",children:[s.jsx("button",{"aria-label":`Edit user ${R.username}`,className:"memory-icon-button",onClick:()=>_(R),title:"Edit",type:"button",children:s.jsx(Hf,{})}),s.jsx("button",{"aria-label":`Delete user ${R.username}`,className:"memory-icon-button memory-item-delete",disabled:R.id===e.id,onClick:()=>{M(""),x(R)},title:"Delete",type:"button",children:"×"})]})]},R.id)),t.length===0?s.jsx("p",{className:"settings-note",children:"No users are configured."}):null]}),c?s.jsx("div",{className:"memory-editor-overlay",onClick:N,role:"presentation",children:s.jsxs("form",{"aria-label":c==="new"?"Add user":"Edit user",className:"memory-editor-popover user-editor-popover",onClick:R=>R.stopPropagation(),onSubmit:R=>void q(R),children:[s.jsxs("header",{children:[s.jsx("strong",{children:c==="new"?"Add User":"Edit User"}),s.jsx("button",{"aria-label":"Close user editor",className:"memory-icon-button",onClick:N,title:"Close",type:"button",children:"×"})]}),s.jsxs("label",{children:[s.jsx("span",{children:"Username"}),s.jsx("input",{autoComplete:"off",autoFocus:!0,onChange:R=>m(X=>({...X,username:R.target.value})),placeholder:"Sign-in username",value:h.username})]}),s.jsxs("label",{children:[s.jsx("span",{children:c==="new"?"Initial password":"New password"}),s.jsx("input",{autoComplete:"new-password",minLength:8,onChange:R=>m(X=>({...X,password:R.target.value})),placeholder:c==="new"?"At least 8 characters":"Leave blank to keep the current password",type:"password",value:h.password})]}),s.jsxs("label",{children:[s.jsx("span",{children:"Role"}),s.jsxs("select",{disabled:c!=="new"&&c.id===e.id,onChange:R=>m(X=>({...X,role:R.target.value==="admin"?"admin":"user"})),value:h.role,children:[s.jsx("option",{value:"user",children:"User"}),s.jsx("option",{value:"admin",children:"Admin"})]})]}),c!=="new"?s.jsxs("label",{className:"user-editor-active",children:[s.jsx("input",{checked:h.active,disabled:c.id===e.id,onChange:R=>m(X=>({...X,active:R.target.checked})),type:"checkbox"}),s.jsx("span",{children:"Account active"})]}):null,C?s.jsx("p",{className:"memory-editor-error",children:C}):null,s.jsxs("div",{className:"memory-editor-actions",children:[s.jsx("button",{className:"memory-dialog-button",onClick:N,type:"button",children:"Cancel"}),s.jsx("button",{className:"memory-dialog-button primary",disabled:p||!h.username.trim()||c==="new"&&h.password.length<8||c!=="new"&&h.password.length>0&&h.password.length<8,type:"submit",children:p?"Saving...":"Save"})]})]})}):null,k?s.jsx("div",{className:"memory-editor-overlay",onClick:()=>x(null),role:"presentation",children:s.jsxs("section",{"aria-label":"Delete user",className:"memory-delete-dialog",onClick:R=>R.stopPropagation(),children:[s.jsxs("header",{children:[s.jsx("strong",{children:"Delete User"}),s.jsx("button",{"aria-label":"Close delete user confirmation",className:"memory-icon-button",onClick:()=>x(null),title:"Close",type:"button",children:"×"})]}),s.jsxs("p",{children:["Delete ",s.jsx("strong",{children:k.username}),". Users that own workspaces must be disabled instead."]}),C?s.jsx("p",{className:"memory-editor-error",children:C}):null,s.jsxs("div",{className:"memory-delete-actions",children:[s.jsx("button",{className:"memory-dialog-button",onClick:()=>x(null),type:"button",children:"Cancel"}),s.jsx("button",{className:"memory-dialog-button danger",onClick:()=>{a(k.id).then(()=>x(null)).catch(R=>M(ft(R).message))},type:"button",children:"Delete"})]})]})}):null]})}function FN({settings:e,onSave:t}){const[n,a]=A.useState(e),[l,u]=A.useState(!1);return A.useEffect(()=>a(e),[e]),s.jsxs(s.Fragment,{children:[s.jsx("header",{className:"settings-section-header",children:s.jsxs("div",{children:[s.jsx("h3",{children:"Deployment"}),s.jsx("p",{children:"Settings stored only on this Seele instance. Cloud synchronization does not copy or overwrite them."})]})}),s.jsxs("form",{className:"settings-form",onSubmit:c=>{c.preventDefault(),u(!0),t(n).finally(()=>u(!1))},children:[s.jsxs("label",{className:"settings-field settings-field-wide",children:[s.jsxs("span",{children:[s.jsx("strong",{children:"Public URL"}),s.jsx("small",{children:"The externally reachable main URL of this deployment. Seele uses it when publishing callback links to external systems."})]}),s.jsx("input",{"aria-label":"Public URL of this deployment",onChange:c=>a({...n,publicUrl:c.target.value||null}),placeholder:"https://profuse.antgroup-inc.cn/codex/yishao-0/",type:"url",value:n.publicUrl||""})]}),s.jsxs("label",{className:"settings-toggle-field",children:[s.jsxs("span",{children:[s.jsx("strong",{children:"Profuse notification"}),s.jsx("small",{children:"Send DingTalk notifications from this deployment when a turn finishes or fails. Keep this off where the Profuse endpoint is unreachable."})]}),s.jsx("input",{"aria-label":"Enable Profuse notification on this deployment",checked:n.profuseNotificationEnabled,onChange:c=>a({...n,profuseNotificationEnabled:c.target.checked}),type:"checkbox"})]}),s.jsx("div",{className:"settings-form-actions",children:s.jsx("button",{disabled:l,type:"submit",children:l?"Saving...":"Save deployment settings"})})]})]})}function PN({enabled:e,models:t,workspaceDirty:n,children:a}){const[l,u]=A.useState("workspace"),[c,f]=A.useState(!1);return e?s.jsxs("div",{className:"runtime-defaults",children:[s.jsxs("div",{className:"runtime-default-tabs",role:"tablist","aria-label":"默认配置类型",children:[s.jsxs("button",{type:"button",role:"tab",id:"runtime-workspace-tab","aria-selected":l==="workspace","aria-controls":"runtime-workspace-panel",onClick:()=>u("workspace"),children:["Workspace 默认",n&&s.jsx("small",{children:"未保存"})]}),s.jsxs("button",{type:"button",role:"tab",id:"runtime-cotask-tab","aria-selected":l==="cotask","aria-controls":"runtime-cotask-panel",onClick:()=>u("cotask"),children:["CoTask 默认",c&&s.jsx("small",{children:"未保存"})]})]}),s.jsx("div",{role:"tabpanel",id:"runtime-workspace-panel","aria-labelledby":"runtime-workspace-tab",hidden:l!=="workspace",children:a}),s.jsx("div",{role:"tabpanel",id:"runtime-cotask-panel","aria-labelledby":"runtime-cotask-tab",hidden:l!=="cotask",children:s.jsx(GN,{models:t,onDirtyChange:f})})]}):s.jsx(s.Fragment,{children:a})}function GN({models:e,onDirtyChange:t}){const[n,a]=A.useState(null),[l,u]=A.useState(null),[c,f]=A.useState(""),[h,m]=A.useState(!1),[p,y]=A.useState("");return A.useEffect(()=>{let k=!1;const x=Ne("settings/runtime/cotask");return fetch(x).then(async C=>{await Ve(C,{url:x});const M=await C.json();k||(a(M.settings),u(M.settings))}).catch(C=>{k||f(ft(C).message)}),()=>{k=!0}},[]),A.useEffect(()=>{t==null||t(!!l&&!!n&&JSON.stringify(l)!==JSON.stringify(n))},[l,n,t]),s.jsxs("section",{"aria-label":"CoTask 默认配置",children:[c&&s.jsx("p",{role:"alert",children:c}),!l||!n?!c&&s.jsx("p",{children:"正在读取 CoTask 默认配置…"}):s.jsx("fieldset",{disabled:h,style:{border:0,padding:0,margin:0},children:s.jsx(z6,{cotaskDefaults:!0,codexReleasedAt:null,codexVersion:null,codexUpdating:!1,draft:l,globalSettings:n,models:e,scope:"global",settings:n,workspaceOverrideCount:0,workspaceSettings:null,onDraftChange:u,onResetWorkspaceSetting:()=>{},onUpdateCodexCli:()=>{},onSubmit:k=>{if(k.preventDefault(),h)return;m(!0),f(""),y("");const x=Ne("settings/runtime/cotask");fetch(x,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)}).then(async C=>(await Ve(C,{url:x,method:"PUT"}),C.json())).then(C=>{a(C.settings),u(C.settings),y("已保存;沿用默认配置的 CoTask 成员在下一次 turn 生效。")}).catch(C=>f(ft(C).message)).finally(()=>m(!1))}})}),p&&s.jsx("p",{role:"status",children:p})]})}function z6({cotaskDefaults:e=!1,codexReleasedAt:t,codexVersion:n,codexUpdating:a,draft:l,globalSettings:u,models:c,scope:f,settings:h,workspaceOverrideCount:m,workspaceSettings:p,onDraftChange:y,onResetWorkspaceSetting:k,onSubmit:x,onUpdateCodexCli:C}){var ve,be,he,Z,me;const M=f==="workspace",I=l.modelSource??{type:"codex"},_=I.type==="codex",N=((ve=u.modelSource)==null?void 0:ve.type)==="custom"?u.modelSource.channelId:null,q=((be=h.modelSource)==null?void 0:be.type)==="custom"?h.modelSource.channelId:null,[R,X]=A.useState(null),[P,H]=A.useState(!1);A.useEffect(()=>{let V=!1;return OD().then(Ce=>{V||X(Ce)}).catch(()=>{V||H(!0)}),()=>{V=!0}},[]);const J=af(l.model,c),ne=af(u.model,c),F=af(h.model,c),te=RE(l.reasoningEffort,J),se=zE(J,l.reasoningEffort);return s.jsxs(s.Fragment,{children:[s.jsxs("header",{className:"settings-section-header",children:[s.jsxs("div",{children:[s.jsx("h3",{children:e?"CoTask 默认配置":"Runtime"}),s.jsx("p",{children:e?"独立于普通 Workspace 默认值。CoTask 默认沿用此配置;任务内自定义配置优先。运行中的 turn 不受修改影响。":"Configure global defaults or override them for the selected workspace. Running turns keep the settings they started with."})]}),M?s.jsx("span",{className:m>0?"section-override-count active":"section-override-count",children:m>0?`${m} custom`:"No custom runtime"}):null]}),s.jsxs("form",{className:"settings-form runtime-form",onSubmit:x,children:[s.jsxs("div",{className:"settings-wide-field",children:[s.jsx(Ic,{label:"Model source",settingKey:"modelSource",isWorkspaceScope:M,globalValue:N?`Custom · ${((he=R==null?void 0:R.channels.find(V=>V.id===N))==null?void 0:he.name)??"Unavailable channel"}`:"Codex official",source:m6(l.modelSource,u.modelSource)?p==null?void 0:p.sources.modelSource:"workspace",onReset:k}),s.jsx(Ud,{"aria-label":"Runtime model source",value:I.type,options:[{value:"codex",label:"Codex official"},{value:"custom",label:"Custom"}],onChange:V=>{var Ce;return y({...l,modelSource:V==="custom"?{type:"custom",channelId:((Ce=R==null?void 0:R.channels[0])==null?void 0:Ce.id)??""}:{type:"codex"}})}}),_?null:s.jsxs(s.Fragment,{children:[s.jsxs("label",{className:"settings-field",children:[s.jsx("span",{children:"Custom channel"}),s.jsxs("select",{"aria-label":"Runtime custom channel",required:!0,value:I.channelId,onChange:V=>y({...l,modelSource:{type:"custom",channelId:V.target.value}}),children:[s.jsx("option",{value:"",disabled:!0,children:"Select a configured channel"}),I.channelId&&!(R!=null&&R.channels.some(V=>V.id===I.channelId))?s.jsx("option",{value:I.channelId,children:"Unavailable channel"}):null,R==null?void 0:R.channels.map(V=>s.jsxs("option",{value:V.id,children:[V.name," · ",V.model]},V.id))]})]}),P?s.jsx("p",{role:"alert",children:"Unable to load custom channels. Reopen Runtime to retry."}):(R==null?void 0:R.channels.length)===0?s.jsx("p",{children:"Add a channel in Custom model channels first."}):null,s.jsx("small",{children:"The channel fixes the model and connection. Codex reasoning effort and Fast mode do not apply."})]})]}),_?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:Hd(M,Wl(l.model,u.model,p==null?void 0:p.sources.model)),children:[s.jsx(Ic,{globalValue:H3(u.model,c),isWorkspaceScope:M,label:"Model",settingKey:"model",source:Wl(l.model,u.model,p==null?void 0:p.sources.model),onReset:k}),s.jsx(Ud,{"aria-label":"Runtime model",onChange:V=>{y({...l,model:V})},options:Qz(c,l.model),value:l.model||((Z=c.find(V=>V.isDefault))==null?void 0:Z.model)||""})]}),s.jsxs("div",{className:Hd(M,Wl(l.reasoningEffort,u.reasoningEffort,p==null?void 0:p.sources.reasoningEffort)),children:[s.jsx(Ic,{globalValue:Qv(u.reasoningEffort,ne),isWorkspaceScope:M,label:"Reasoning effort",settingKey:"reasoningEffort",source:Wl(l.reasoningEffort,u.reasoningEffort,p==null?void 0:p.sources.reasoningEffort),onReset:k}),s.jsx(Ud,{"aria-label":"Runtime reasoning effort",onChange:V=>y({...l,reasoningEffort:V}),options:se,value:l.reasoningEffort}),te?s.jsx("p",{role:"status",children:te}):null]})]}):null,!e&&s.jsxs("div",{className:Hd(M,Wl(l.sandbox,u.sandbox,p==null?void 0:p.sources.sandbox)),children:[s.jsx(Ic,{globalValue:wp(u.sandbox),isWorkspaceScope:M,label:"Permission mode",settingKey:"sandbox",source:Wl(l.sandbox,u.sandbox,p==null?void 0:p.sources.sandbox),onReset:k}),s.jsx(Ud,{"aria-label":"Permission mode",onChange:V=>y({...l,sandbox:V}),options:lN,value:l.sandbox})]}),_?s.jsxs("div",{className:Hd(M,Wl(l.fastMode,u.fastMode,p==null?void 0:p.sources.fastMode),"settings-toggle-field"),children:[s.jsxs("span",{children:[s.jsx(Ic,{globalValue:u.fastMode?"On":"Off",isWorkspaceScope:M,label:"Fast mode",settingKey:"fastMode",source:Wl(l.fastMode,u.fastMode,p==null?void 0:p.sources.fastMode),onReset:k}),s.jsx("small",{children:"1.5x speed with higher Codex credit consumption"})]}),s.jsx("input",{"aria-label":"Enable Fast mode",checked:l.fastMode,onChange:V=>y({...l,fastMode:V.target.checked}),type:"checkbox"})]}):null,!e&&s.jsxs("dl",{className:"runtime-summary",children:[s.jsxs("div",{children:[s.jsx("dt",{children:"Current"}),s.jsx("dd",{children:q?s.jsxs(s.Fragment,{children:["Custom · ",((me=R==null?void 0:R.channels.find(V=>V.id===q))==null?void 0:me.name)??"Unavailable channel"," · ",wp(h.sandbox),"."]}):s.jsxs(s.Fragment,{children:["Model ",H3(h.model,c),", reasoning"," ",Qv(h.reasoningEffort,F),", Fast mode"," ",h.fastMode?"on":"off",", permission"," ",wp(h.sandbox),"."]})})]}),s.jsxs("div",{children:[s.jsx("dt",{children:"Codex CLI"}),s.jsxs("dd",{className:"runtime-version-value",children:[s.jsx("span",{children:d1(n,t)}),s.jsx("button",{className:"runtime-update-button",disabled:a,onClick:C,type:"button",children:a?"Updating...":"Check update"})]})]})]}),s.jsx("div",{className:"settings-form-actions",children:s.jsx("button",{type:"submit",children:e?"保存 CoTask 默认配置":M?"Save workspace overrides":"Save global runtime"})})]})]})}function Ic({globalValue:e,isWorkspaceScope:t,label:n,settingKey:a,source:l,onReset:u}){const c=t&&l==="workspace";return s.jsxs("span",{className:"runtime-field-label",children:[s.jsx("span",{children:n}),t?s.jsxs("span",{className:"runtime-field-meta",children:[s.jsx("span",{className:c?"override":"inherited",children:c?"Workspace override":`Inherited: ${e}`}),c?s.jsx("button",{type:"button",onClick:()=>u(a),children:"Reset"}):null]}):null]})}function Ud({"aria-label":e,onChange:t,options:n,value:a}){const[l,u]=A.useState(!1),c=A.useRef(null),f=n.find(h=>h.value===a)??n[0]??null;return A.useEffect(()=>{if(!l)return;function h(p){var y;(y=c.current)!=null&&y.contains(p.target)||u(!1)}function m(p){p.key==="Escape"&&u(!1)}return document.addEventListener("pointerdown",h,!0),document.addEventListener("keydown",m,!0),()=>{document.removeEventListener("pointerdown",h,!0),document.removeEventListener("keydown",m,!0)}},[l]),s.jsxs("div",{className:"runtime-select",ref:c,children:[s.jsxs("button",{"aria-expanded":l,"aria-label":e,className:"runtime-select-trigger",onClick:()=>u(h=>!h),type:"button",children:[s.jsx("span",{children:(f==null?void 0:f.label)??a}),s.jsx("span",{"aria-hidden":"true",children:"⌄"})]}),l?s.jsx("div",{className:"runtime-select-menu",role:"listbox",children:n.map(h=>s.jsx("button",{"aria-selected":h.value===a,className:h.value===a?"selected":void 0,onClick:()=>{t(h.value),u(!1)},role:"option",type:"button",children:h.label},h.value||"default"))}):null]})}function Wl(e,t,n){return JSON.stringify(e)!==JSON.stringify(t)?"workspace":n}function Hd(e,t,n="settings-wide-field"){return[n,e?"workspace-scoped":"",e&&t==="workspace"?"workspace-overridden":""].filter(Boolean).join(" ")}function VN({baseSettings:e,scope:t,workspaceSettings:n,workspaceName:a,onSaveBaseItems:l,onSaveWorkspaceItems:u}){const c=t==="workspace",f=c?n.items:e.items,h=c?u:l;return s.jsxs(s.Fragment,{children:[s.jsx("header",{className:"settings-section-header",children:s.jsxs("div",{children:[s.jsx("h3",{children:c?"Workspace Memory":"Base Memory"}),s.jsx("p",{children:c?"Workspace memory applies only to the selected workspace. Use stable English keys; values may be Chinese, plain text, or Markdown.":"Base memory applies to every workspace. Use stable English keys; values may be Chinese, plain text, or Markdown."})]})}),c?s.jsxs("section",{className:"settings-readonly-block",children:[s.jsxs("div",{children:[s.jsx("strong",{children:"Base Memory"}),s.jsx("span",{children:"Read-only in workspace scope"})]}),s.jsx(WN,{emptyText:"No base memory is configured.",items:e.items,readonly:!0})]}):null,s.jsx("div",{className:"memory-manager-shell",children:s.jsx(YN,{ariaLabel:c?"Workspace memory":"Base memory",emptyText:"No memory items are configured.",items:f,onSaveItems:h,title:""})})]})}function YN({ariaLabel:e,emptyText:t,items:n,onSaveItems:a,title:l}){var H;const[u,c]=A.useState(Kc(n)),[f,h]=A.useState(null),[m,p]=A.useState({key:"",value:""}),[y,k]=A.useState(null),[x,C]=A.useState(null),[M,I]=A.useState(null);A.useEffect(()=>{c(Kc(n))},[n]),A.useEffect(()=>{if(f===null)return;const J=ne=>{ne.key==="Escape"&&(R(),C(null))};return document.addEventListener("keydown",J),()=>document.removeEventListener("keydown",J)},[f]);async function _(J,ne){I(ne);try{const F=await a(J);return c(Kc(F)),F}finally{I(null)}}function N(){C(null),k(null),p({key:"",value:""}),h("new")}function q(J){const ne=u[J];ne&&(C(null),k(null),p({...ne}),h(J))}function R(){h(null),k(null),p({key:"",value:""})}async function X(J){const ne=u[J],F=(ne==null?void 0:ne.key)||`${J}`;await _(u.filter((te,se)=>se!==J),`delete:${F}`),C(null)}async function P(J){J.preventDefault(),J.stopPropagation();const ne=m.key.trim(),F=cz(ne);if(F){k(F);return}const te=m.value.trim();if(!te){k("Value is required.");return}const se=f==="new"?-1:f;if(u.some((be,he)=>he!==se&&be.key.trim()===ne)){k(`Key "${ne}" already exists. Each memory key must be unique.`);return}const ve={...m,key:ne,value:te};f==="new"?await _([...u,ve],"add"):typeof f=="number"&&await _(u.map((be,he)=>he===f?ve:be),`save:${f}`),R()}return s.jsxs("section",{className:"memory-items-manager","aria-label":e,children:[s.jsxs("div",{className:l?"memory-items-editor-header":"memory-items-editor-header actions-only",children:[l?s.jsx("span",{children:l}):null,s.jsx("button",{"aria-label":"Add memory item",className:"memory-icon-button",title:"Add",type:"button",onClick:N,children:"+"})]}),u.length?s.jsx("div",{className:"memory-items-grid",children:u.map((J,ne)=>s.jsxs("div",{className:"memory-item-display",children:[s.jsxs("pre",{"aria-label":`Memory item ${J.key}`,children:[s.jsx("span",{className:"memory-tag",children:`<${J.key}>`}),`
|
|
366
|
-
`,s.jsx("span",{children:J.value}),`
|
|
367
|
-
`,s.jsx("span",{className:"memory-tag",children:`</${J.key}>`})]}),s.jsxs("div",{className:"memory-item-actions",children:[s.jsx("button",{"aria-label":`Edit memory item ${J.key||ne+1}`,className:"memory-icon-button memory-item-edit",disabled:M!==null,title:"Edit",type:"button",onClick:()=>q(ne),children:"✎"}),s.jsx("button",{"aria-label":`Delete memory item ${J.key||ne+1}`,className:"memory-icon-button memory-item-delete",disabled:M!==null,title:"Delete",type:"button",onClick:()=>C(ne),children:"×"})]})]},`${ne}-${J.key}`))}):s.jsx("p",{className:"settings-note",children:t}),f!==null?s.jsx("div",{className:"memory-editor-overlay",onClick:R,role:"presentation",children:s.jsxs("form",{"aria-label":f==="new"?"Add memory item":"Edit memory item",className:"memory-editor-popover",onClick:J=>J.stopPropagation(),onSubmit:J=>void P(J),children:[s.jsxs("header",{children:[s.jsx("strong",{children:f==="new"?"Add Memory":"Edit Memory"}),s.jsx("button",{"aria-label":"Close memory editor",className:"memory-icon-button",title:"Close",type:"button",onClick:R,children:"×"})]}),s.jsxs("label",{children:[s.jsx("span",{children:"Key"}),s.jsx("input",{autoComplete:"off",autoFocus:!0,onChange:J=>p(ne=>({...ne,key:J.target.value})),placeholder:"Stable technical key used as the injected tag name",value:m.key})]}),s.jsxs("label",{children:[s.jsx("span",{children:"Value · up to 1000 tokens"}),s.jsx("textarea",{onChange:J=>p(ne=>({...ne,value:J.target.value})),placeholder:"Memory content injected under this key",rows:10,value:m.value})]}),y?s.jsx("p",{className:"memory-editor-error",children:y}):null,s.jsxs("div",{className:"memory-editor-actions",children:[s.jsx("button",{"aria-label":"Cancel memory edit",className:"memory-dialog-button",type:"button",onClick:R,children:"Cancel"}),s.jsx("button",{"aria-label":"Save memory item",className:"memory-dialog-button primary",disabled:M!==null,type:"submit",children:M==="add"||M!=null&&M.startsWith("save:")?"Saving...":"Save"})]})]})}):null,x!==null?s.jsx("div",{className:"memory-editor-overlay",onClick:()=>C(null),role:"presentation",children:s.jsxs("section",{"aria-label":"Confirm delete memory item",className:"memory-delete-dialog",onClick:J=>J.stopPropagation(),children:[s.jsxs("header",{children:[s.jsx("strong",{children:"Delete Memory"}),s.jsx("button",{"aria-label":"Close delete confirmation",className:"memory-icon-button",title:"Close",type:"button",onClick:()=>C(null),children:"×"})]}),s.jsxs("p",{children:["Delete"," ",s.jsx("code",{children:((H=u[x])==null?void 0:H.key)||`item ${x+1}`}),"?"]}),s.jsxs("div",{className:"memory-delete-actions",children:[s.jsx("button",{"aria-label":"Cancel delete",className:"memory-dialog-button",disabled:M!==null,type:"button",onClick:()=>C(null),children:"Cancel"}),s.jsx("button",{"aria-label":"Confirm delete",className:"memory-dialog-button danger",disabled:M!==null,type:"button",onClick:()=>void X(x),children:"Delete"})]})]})}):null]})}function WN({emptyText:e,items:t}){const n=Kc(t);return n.length?s.jsx("div",{className:"memory-items-list",children:n.map(a=>s.jsx("div",{className:"memory-item-display memory-item-readonly",children:s.jsxs("pre",{"aria-label":`Memory item ${a.key}`,children:[s.jsx("span",{className:"memory-tag",children:`<${a.key}>`}),`
|
|
368
|
-
`,s.jsx("span",{children:a.value}),`
|
|
369
|
-
`,s.jsx("span",{className:"memory-tag",children:`</${a.key}>`})]})},a.key))}):s.jsx("p",{className:"settings-note",children:e})}function KN({deleteConfirmKey:e,editingEnvironmentKey:t,environmentDraft:n,globalEnvironment:a,scope:l,workspaceEnvironment:u,valueVisible:c,onCancelEnvironmentEdit:f,onDeleteConfirmChange:h,onDeleteEnvironment:m,onDraftChange:p,onEditEnvironment:y,onRevealEnvironmentValue:k,onSubmitEnvironment:x,onValueVisibleChange:C,revealedEnvironmentKeys:M}){const I=t!==null&&M.has(t),_=l==="workspace",N=_?u:a,[q,R]=A.useState(!1);function X(){f(),p({description:"",key:"",value:""}),C(!1),R(!0)}function P(ne){y(ne),C(!1),R(!0)}function H(){R(!1),f(),C(!1)}function J(ne){x(ne),R(!1)}return s.jsxs(s.Fragment,{children:[s.jsx("header",{className:"settings-section-header",children:s.jsxs("div",{children:[s.jsx("h3",{children:_?"Workspace Environment":"Base Environment"}),s.jsx("p",{children:_?"Workspace variables are stored in this workspace and are merged with base variables for new runs.":"Base variables are injected into every new workspace run. Existing runs keep the environment they started with."})]})}),_?s.jsxs("section",{className:"settings-readonly-block",children:[s.jsxs("div",{children:[s.jsx("strong",{children:"Base Environment"}),s.jsx("span",{children:"Read-only in workspace scope"})]}),s.jsx(h3,{emptyText:"No base environment variables are configured.",readonly:!0,variables:a})]}):null,s.jsxs("section",{className:"environment-manager",children:[s.jsx("div",{className:"memory-items-editor-header actions-only",children:s.jsx("button",{"aria-label":"Add environment variable",className:"memory-icon-button",title:"Add",type:"button",onClick:X,children:"+"})}),s.jsx(h3,{emptyText:_?"No workspace environment variables are configured.":"No base environment variables are configured.",onDelete:ne=>h(ne),onEdit:P,variables:N})]}),q?s.jsx("div",{className:"memory-editor-overlay",onClick:H,role:"presentation",children:s.jsxs("form",{"aria-label":t?"Edit environment variable":"Add environment variable",className:"memory-editor-popover environment-editor-popover",onClick:ne=>ne.stopPropagation(),onSubmit:J,children:[s.jsxs("header",{children:[s.jsx("strong",{children:t?"Edit Environment":"Add Environment"}),s.jsx("button",{"aria-label":"Close environment editor",className:"memory-icon-button",title:"Close",type:"button",onClick:H,children:"×"})]}),s.jsxs("label",{children:[s.jsx("span",{children:"Key"}),s.jsx("input",{"aria-label":"Environment variable key",autoComplete:"off",autoFocus:!0,disabled:t!==null,onChange:ne=>p({...n,key:ne.target.value}),placeholder:"Environment variable name",spellCheck:!1,value:n.key})]}),s.jsxs("label",{children:[s.jsx("span",{children:"Value"}),s.jsxs("span",{className:"environment-value-field",children:[s.jsx("input",{"aria-label":"Environment variable value",autoComplete:"off",onChange:ne=>p({...n,value:ne.target.value}),placeholder:"Environment variable value",spellCheck:!1,type:c?"text":"password",value:n.value}),s.jsx("button",{"aria-label":c?"Hide value":"Show value",onClick:()=>{if(t&&!I&&!n.value){k(t),C(!0);return}C(!c)},title:c?"Hide value":"Show value",type:"button",children:c?s.jsx(vD,{}):s.jsx(yD,{})})]})]}),s.jsxs("label",{children:[s.jsx("span",{children:"Description"}),s.jsx("input",{"aria-label":"Environment variable description",autoComplete:"off",onChange:ne=>p({...n,description:ne.target.value}),placeholder:"What this variable is for",spellCheck:!1,value:n.description})]}),s.jsxs("div",{className:"memory-editor-actions",children:[s.jsx("button",{className:"memory-dialog-button",type:"button",onClick:H,children:"Cancel"}),s.jsx("button",{className:"memory-dialog-button primary",disabled:!n.key.trim(),type:"submit",children:"Save"})]})]})}):null,e?s.jsx("div",{className:"memory-editor-overlay",onClick:()=>h(null),role:"presentation",children:s.jsxs("section",{"aria-label":"Confirm delete environment variable",className:"memory-delete-dialog",onClick:ne=>ne.stopPropagation(),children:[s.jsxs("header",{children:[s.jsx("strong",{children:"Delete Environment"}),s.jsx("button",{"aria-label":"Close delete confirmation",className:"memory-icon-button",title:"Close",type:"button",onClick:()=>h(null),children:"×"})]}),s.jsxs("p",{children:["Delete ",s.jsx("code",{children:e}),"?"]}),s.jsxs("div",{className:"memory-delete-actions",children:[s.jsx("button",{className:"memory-dialog-button",type:"button",onClick:()=>h(null),children:"Cancel"}),s.jsx("button",{className:"memory-dialog-button danger",type:"button",onClick:()=>{m(e),h(null)},children:"Delete"})]})]})}):null]})}function h3({emptyText:e,onDelete:t,onEdit:n,readonly:a=!1,variables:l}){return l.length===0?s.jsx("p",{className:"settings-note",children:e}):s.jsx("div",{className:a?"environment-list readonly":"environment-list",children:l.map(u=>s.jsxs("div",{className:a?"environment-row readonly":"environment-row",children:[s.jsxs("div",{className:"environment-row-main",children:[s.jsxs("pre",{"aria-label":`Environment variable ${u.key}`,children:[s.jsx("span",{className:"memory-tag",children:u.key}),"=",u.hasValue?"••••••":"",u.description?s.jsx("span",{className:"environment-comment",children:` # ${u.description}`}):null]}),s.jsxs("span",{children:[u.hasValue?"configured":"empty"," · updated"," ",lt(u.updatedAt)]})]}),a?s.jsx("span",{className:"environment-readonly-tag",children:"read-only"}):s.jsxs("div",{className:"environment-row-actions",children:[s.jsx("button",{"aria-label":`Edit ${u.key}`,className:"memory-icon-button memory-item-edit",onClick:()=>n==null?void 0:n(u),title:"Edit",type:"button",children:"✎"}),s.jsx("button",{"aria-label":`Delete ${u.key}`,className:"memory-icon-button memory-item-delete",onClick:()=>t==null?void 0:t(u.key),title:"Delete",type:"button",children:"×"})]})]},u.key))})}function R6({items:e,onDelete:t,onEdit:n}){const[a,l]=A.useState(null),[u,c]=A.useState(null);return e.length===0?s.jsxs("section",{className:"knowledge-empty",children:[s.jsx("h4",{children:"No knowledge registered"}),s.jsx("p",{children:"Give this workspace durable source material in chat. The workspace should decide whether to register it, create local copies, and produce digest or skill files."})]}):s.jsx("div",{className:"knowledge-list",children:e.map(f=>s.jsxs("article",{className:"knowledge-row",children:[s.jsxs("div",{className:"knowledge-row-main",children:[s.jsxs("header",{children:[s.jsx("strong",{children:f.name}),s.jsx("span",{children:ZN(f.kind)}),s.jsx("span",{className:eM(f.status),children:QN(f.status)})]}),s.jsx("p",{children:f.purpose||f.description||"No purpose set."}),s.jsxs("div",{className:"knowledge-paths",children:[s.jsx("code",{children:f.digestPath}),s.jsx("code",{children:f.skillPath}),s.jsx("code",{children:f.fetch.scriptPath})]}),f.fetch.requiredEnv.length>0?s.jsx("div",{className:"knowledge-envs",children:f.fetch.requiredEnv.map(h=>s.jsx("span",{title:h.description||h.key,children:h.key},h.key))}):null,u===f.id?s.jsx("small",{className:"knowledge-row-notice",children:"Refresh/check is not automatic yet. Ask this workspace to review or refresh this knowledge source."}):null,s.jsxs("small",{children:[f.attention," · ",JN(f.refreshPolicy)," · updated ",lt(f.updatedAt)]})]}),s.jsx("div",{className:"environment-row-actions",children:a===f.id?s.jsxs(s.Fragment,{children:[s.jsx("button",{className:"danger",onClick:()=>{t(f.id),l(null)},type:"button",children:"Delete"}),s.jsx("button",{onClick:()=>l(null),type:"button",children:"Cancel"})]}):s.jsxs(s.Fragment,{children:[s.jsx("button",{"aria-label":`Check ${f.name}`,onClick:()=>c(f.id),title:"Check or refresh through workspace",type:"button",children:"↻"}),s.jsx("button",{"aria-label":`Edit ${f.name}`,onClick:()=>n(f),title:"Edit knowledge",type:"button",children:s.jsx(Hf,{})}),s.jsx("button",{"aria-label":`Delete ${f.name}`,onClick:()=>l(f.id),title:"Delete knowledge",type:"button",children:"×"})]})})]},f.id))})}function XN({draft:e,items:t,scope:n,workspaceName:a,onCancel:l,onDelete:u,onDraftChange:c,onEdit:f,onSubmit:h}){return n==="workspace"?s.jsxs(s.Fragment,{children:[s.jsx("header",{className:"settings-section-header",children:s.jsxs("div",{children:[s.jsx("h3",{children:"Workspace Knowledge"}),s.jsxs("p",{children:["Long-lived source-backed material for ",a??"this workspace",". The workspace should create and maintain these assets itself when it digests external material. You mainly review status, delete stale items, or trigger a future refresh/check."]})]})}),s.jsx(R6,{items:t,onDelete:u,onEdit:f}),e.id?s.jsxs("form",{className:"settings-form knowledge-form",onSubmit:h,children:[s.jsxs("div",{className:"knowledge-form-header",children:[s.jsxs("div",{children:[s.jsx("strong",{children:"Edit metadata"}),s.jsx("span",{children:"This is mainly for correction. New knowledge should usually be created by the workspace while processing source material."})]}),s.jsx("button",{className:"secondary",onClick:l,type:"button",children:"Close"})]}),s.jsxs("div",{className:"knowledge-form-grid",children:[s.jsxs("label",{children:[s.jsx("span",{children:"Name"}),s.jsx("input",{"aria-label":"Knowledge name",onChange:p=>c({...e,name:p.target.value}),value:e.name})]}),s.jsxs("label",{children:[s.jsx("span",{children:"Kind"}),s.jsxs("select",{"aria-label":"Knowledge kind",onChange:p=>c({...e,kind:p.target.value}),value:e.kind,children:[s.jsx("option",{value:"source",children:"Source"}),s.jsx("option",{value:"skill",children:"Skill"}),s.jsx("option",{value:"reference",children:"Reference"})]})]}),s.jsxs("label",{children:[s.jsx("span",{children:"Status"}),s.jsxs("select",{"aria-label":"Knowledge status",onChange:p=>c({...e,status:p.target.value}),value:e.status,children:[s.jsx("option",{value:"draft",children:"Draft"}),s.jsx("option",{value:"needs_fetch_method",children:"Needs fetch method"}),s.jsx("option",{value:"needs_credentials",children:"Needs credentials"}),s.jsx("option",{value:"invalid_credentials",children:"Invalid credentials"}),s.jsx("option",{value:"ready",children:"Ready"}),s.jsx("option",{value:"stale_signal",children:"Stale signal"})]})]}),s.jsxs("label",{children:[s.jsx("span",{children:"Attention"}),s.jsxs("select",{"aria-label":"Knowledge attention",onChange:p=>c({...e,attention:p.target.value}),value:e.attention,children:[s.jsx("option",{value:"none",children:"None"}),s.jsx("option",{value:"tracked",children:"Tracked"}),s.jsx("option",{value:"watch",children:"Watch"})]})]}),s.jsxs("label",{children:[s.jsx("span",{children:"Refresh"}),s.jsxs("select",{"aria-label":"Knowledge refresh policy",onChange:p=>c({...e,refreshPolicy:p.target.value}),value:e.refreshPolicy,children:[s.jsx("option",{value:"manual",children:"Manual"}),s.jsx("option",{value:"low-frequency-check",children:"Low-frequency check"})]})]})]}),s.jsxs("label",{className:"settings-wide-field",children:[s.jsx("span",{children:"Purpose"}),s.jsx("textarea",{"aria-label":"Knowledge purpose",onChange:p=>c({...e,purpose:p.target.value}),rows:2,value:e.purpose})]}),s.jsxs("label",{className:"settings-wide-field",children:[s.jsx("span",{children:"Content"}),s.jsx("textarea",{"aria-label":"Knowledge content",onChange:p=>c({...e,description:p.target.value}),rows:2,value:e.description})]}),s.jsxs("label",{className:"settings-wide-field",children:[s.jsx("span",{children:"Source clues"}),s.jsx("textarea",{"aria-label":"Knowledge source clues",onChange:p=>c({...e,sourceCluesText:p.target.value}),rows:4,value:e.sourceCluesText})]}),s.jsxs("label",{className:"settings-wide-field",children:[s.jsx("span",{children:"Required environment"}),s.jsx("textarea",{"aria-label":"Knowledge required environment",onChange:p=>c({...e,requiredEnvText:p.target.value}),rows:3,value:e.requiredEnvText})]}),s.jsx("p",{className:"settings-note",children:"Metadata lives under `.seele/knowledge/<id>/item.json`. Source copies, digest, skill, and fetch script stay in the same folder."}),s.jsx("div",{className:"settings-form-actions",children:s.jsx("button",{disabled:!e.name.trim(),type:"submit",children:"Save metadata"})})]}):null]}):s.jsxs("section",{className:"settings-empty-section",children:[s.jsx("h3",{children:"Workspace Knowledge"}),s.jsx("p",{children:"Knowledge belongs to a specific workspace because source copies, digests, skills, and fetch scripts live under that workspace's `.seele/knowledge` directory. Switch to Workspace scope to manage it."})]})}function ZN(e){return e==="skill"?"Skill":e==="reference"?"Reference":"Source"}function QN(e){return e.split("_").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}function JN(e){return e==="low-frequency-check"?"low-frequency check":"manual refresh"}function eM(e){return e==="ready"?"knowledge-status ready":e==="needs_credentials"||e==="invalid_credentials"||e==="needs_fetch_method"?"knowledge-status warning":e==="stale_signal"?"knowledge-status stale":"knowledge-status"}function Mt({label:e,value:t,mono:n=!1}){return s.jsxs("div",{className:"context-field",children:[s.jsx("span",{children:e}),s.jsx("strong",{className:n?"mono":void 0,title:t,children:t})]})}function tM({onRefresh:e,preview:t,refreshing:n}){const a=["workspace_identity","workspace_environment","rendering"],l=A.useMemo(()=>Object.entries(t.context).map(([c,f])=>[c,nM(f)]).sort(([c],[f])=>{const h=a.indexOf(c),m=a.indexOf(f);return h>=0||m>=0?(h>=0?h:Number.MAX_SAFE_INTEGER)-(m>=0?m:Number.MAX_SAFE_INTEGER):c.localeCompare(f)}),[t.context]),u=c=>{var f;(f=document.getElementById(m3(c)))==null||f.scrollIntoView({behavior:"smooth",block:"start"})};return s.jsxs("div",{className:"additional-context-preview",children:[s.jsx("div",{className:"additional-context-header",children:s.jsxs("div",{className:"additional-context-meta",children:[s.jsxs("span",{children:["Generated ",lt(t.generatedAt)]}),s.jsxs("span",{children:[Rr(l.length)," keys"]}),s.jsx("button",{disabled:n,onClick:e,type:"button",children:n?"Rendering...":"Refresh"})]})}),s.jsxs("div",{className:"additional-context-toc",children:[s.jsx("button",{"aria-label":"Additional context outline",type:"button",children:"☰"}),s.jsx("div",{className:"additional-context-toc-menu",children:l.map(([c])=>s.jsx("button",{onClick:()=>u(c),type:"button",children:c},c))})]}),s.jsx("div",{className:"additional-context-list",children:l.map(([c,f])=>s.jsxs("section",{className:"additional-context-item",id:m3(c),children:[s.jsxs("header",{children:[s.jsxs("code",{children:["<",c,">"]}),s.jsxs("span",{children:[Rr(f.length)," chars"]})]}),s.jsx("pre",{children:f})]},c))})]})}function m3(e){return`additional-context-${e.replace(/[^a-zA-Z0-9_-]/g,"-")}`}function nM(e){if(typeof e=="string")return e;if(e!==null&&typeof e=="object"&&"value"in e&&typeof e.value=="string")return e.value;if(e==null)return"";try{return JSON.stringify(e,null,2)}catch{return String(e)}}function rM({summary:e}){return s.jsxs("div",{className:"thread-read-summary",children:[s.jsxs("section",{className:"thread-read-summary-grid",children:[s.jsx(Mt,{label:"Thread",value:e.id,mono:!0}),s.jsx(Mt,{label:"Session",value:e.sessionId,mono:!0}),s.jsx(Mt,{label:"Status",value:e.status}),s.jsx(Mt,{label:"Source",value:e.source}),s.jsx(Mt,{label:"Created",value:Lc(e.createdAt)}),s.jsx(Mt,{label:"Updated",value:Lc(e.updatedAt)}),s.jsx(Mt,{label:"Recency",value:Lc(e.recencyAt)}),s.jsx(Mt,{label:"Turns",value:Rr(e.turnCount),mono:!0}),s.jsx(Mt,{label:"Items",value:Rr(e.itemCount),mono:!0}),s.jsx(Mt,{label:"User / agent",value:`${Rr(e.userMessageCount)} / ${Rr(e.agentMessageCount)}`,mono:!0}),s.jsx(Mt,{label:"Compactions",value:`${Rr(e.compactionCount)} / ${Rr(e.contextCompactionCount)} context`,mono:!0}),s.jsx(Mt,{label:"CWD",value:e.cwd,mono:!0}),s.jsx(Mt,{label:"Path",value:e.path,mono:!0})]}),e.preview?s.jsxs("details",{className:"thread-read-preview",children:[s.jsx("summary",{children:"Preview"}),s.jsx("p",{children:e.preview})]}):null,s.jsxs("section",{className:"thread-read-turns",children:[s.jsxs("div",{children:[s.jsx("strong",{children:"Turns"}),s.jsxs("span",{children:[e.turns.length," turn",e.turns.length===1?"":"s"]})]}),s.jsx("div",{className:"thread-read-turn-list",children:e.turns.map((t,n)=>s.jsxs("details",{className:"thread-read-turn",children:[s.jsxs("summary",{children:[s.jsxs("code",{children:["turn ",n+1]}),s.jsx("span",{title:t.id,children:t.id}),s.jsxs("small",{children:[t.status," · ",t.itemCount," item",t.itemCount===1?"":"s"]})]}),s.jsxs("div",{className:"thread-read-turn-detail",children:[s.jsxs("div",{className:"thread-read-turn-fields",children:[s.jsx(Mt,{label:"Status",value:t.status}),s.jsx(Mt,{label:"Items view",value:t.itemsView}),s.jsx(Mt,{label:"Started",value:Lc(t.startedAt)}),s.jsx(Mt,{label:"Completed",value:Lc(t.completedAt)}),s.jsx(Mt,{label:"Duration",value:t.durationMs===null?"unknown":hu(t.durationMs)}),s.jsx(Mt,{label:"Item types",value:t.itemTypes||"none"})]}),t.preview?s.jsx("p",{className:"thread-read-turn-preview",children:t.preview}):null,s.jsxs("details",{className:"thread-read-turn-raw",children:[s.jsx("summary",{children:"Turn raw JSON"}),s.jsx("pre",{children:JSON.stringify(t.raw,null,2)})]})]})]},t.id))})]})]})}function Ps(e,t,n,a,l,u,c,f,h){var m,p,y,k;if(e.type==="reasoning")return s.jsx(cE,{content:e.content,streaming:e.streaming});if(e.type==="assistantText")return s.jsx("article",{className:`message assistant${e.streaming?" streaming":""}`,"data-hover-time":lt(e.createdAt),children:s.jsxs("div",{className:"message-main",children:[s.jsxs("header",{className:"message-header",children:[s.jsx("span",{children:"Seele"}),s.jsx("time",{dateTime:e.createdAt,children:e.streaming?"streaming":lt(e.createdAt)})]}),s.jsx("div",{className:"message-body",children:s.jsx(iu,{content:e.content,conversation:t,streaming:e.streaming,onPreviewArtifact:n,onCopyArtifactUrl:a,copiedArtifactUrl:l})})]})});if(e.type==="turnError")return s.jsxs("article",{className:"turn-error-result","data-hover-time":lt(e.createdAt),role:"alert",children:[s.jsx("strong",{children:"Task failed"}),s.jsx(C3,{content:e.content})]});if(e.type==="message")return s.jsx("article",{className:`message ${e.message.role}`,"data-hover-time":lt(e.message.createdAt),children:s.jsxs("div",{className:"message-main",children:[s.jsxs("header",{className:"message-header",children:[s.jsx("span",{children:aR(e.message.role)}),s.jsx("time",{dateTime:e.message.createdAt,children:lt(e.message.createdAt)})]}),s.jsx("div",{className:"message-body",children:e.message.role==="user"?s.jsx(C3,{content:e.message.content}):s.jsx(iu,{content:e.message.content,conversation:t,streaming:!1,onPreviewArtifact:n,onCopyArtifactUrl:a,copiedArtifactUrl:l})})]})});if(e.type==="system"){if((m=e.topicMessages)!=null&&m.length)return s.jsx("div",{className:"topic-input-list",children:e.topicMessages.map(C=>s.jsx("article",{className:"message topic-input","data-hover-time":lt(C.createdAt),children:s.jsxs("div",{className:"topic-message-bubble topic-input-bubble",children:[s.jsxs("header",{className:"topic-input-header",children:[s.jsxs("span",{className:"topic-input-sender",children:["From ",C.senderName]}),s.jsx("time",{dateTime:C.createdAt,children:lt(C.createdAt)})]}),s.jsx("div",{className:"topic-input-content message-body",children:s.jsx(iu,{content:C.contentMarkdown,conversation:t,streaming:!1,onPreviewArtifact:n,onCopyArtifactUrl:a,copiedArtifactUrl:l})})]})},C.id))});const x=Xs({},[e.detail]);return s.jsx("article",{className:"message system","data-hover-time":lt(e.createdAt),children:s.jsx("div",{className:"message-main",children:s.jsxs("button",{className:`system-message-body system-message-link${e.visualKind?` ${e.visualKind}`:""}`,onClick:()=>h==null?void 0:h(e),type:"button",children:[e.visualKind==="topic"?s.jsx("span",{className:"system-message-icon",children:s.jsx(ef,{})}):null,s.jsx("span",{className:"system-message-title",children:e.title}),s.jsx("small",{children:x})]})})})}return e.type==="steerMarker"?s.jsxs("div",{className:"turn-steer-marker","data-message-id":e.messageId,title:e.content,children:[s.jsx("span",{children:"Added while running"}),s.jsx("strong",{children:e.content})]}):e.tool.kind==="command"?s.jsx(mM,{tool:e.tool,onRespondApproval:u}):e.tool.kind==="file"&&((p=e.tool.fileChanges)!=null&&p.length)?s.jsx(fM,{conversation:t,tool:e.tool}):e.tool.kind==="responsibility"||e.tool.kind==="workspaceChange"?s.jsx(cM,{conversation:t,tool:e.tool,onRespond:c}):e.tool.kind==="knowledge"?s.jsx(dM,{tool:e.tool,onRespond:f}):e.tool.kind==="collaboration"&&e.tool.topicAction==="send"?s.jsxs("details",{className:"tool-card collaboration topic-output","data-hover-time":lt(e.tool.createdAt),title:lt(e.tool.createdAt),children:[s.jsxs("summary",{children:[s.jsxs("span",{className:"tool-card-summary-title",children:[s.jsx("span",{className:"tool-card-kind-icon",children:s.jsx(ef,{})}),s.jsx("span",{children:e.tool.title})]}),e.tool.meta?s.jsx("small",{children:e.tool.meta}):null]}),s.jsxs("div",{className:"topic-message-bubble topic-output-bubble",children:[s.jsxs("header",{className:"topic-input-header",children:[s.jsxs("span",{className:"topic-input-sender",children:["To ",e.tool.topicRecipientLabel??"Topic"]}),s.jsx("time",{dateTime:e.tool.createdAt,children:lt(e.tool.createdAt)})]}),s.jsx("div",{className:"topic-input-content message-body",children:s.jsx(iu,{content:e.tool.topicMessageContent??e.tool.output??"",conversation:t,streaming:!1,onPreviewArtifact:n,onCopyArtifactUrl:a,copiedArtifactUrl:l})})]}),(y=e.tool.rawEvents)!=null&&y.length?s.jsxs("details",{className:"tool-raw-details",children:[s.jsx("summary",{children:"Raw events"}),s.jsx("pre",{className:"tool-raw-json",children:JSON.stringify(e.tool.rawEvents,null,2)})]}):null]}):s.jsxs("details",{className:`tool-card ${e.tool.kind}`,"data-hover-time":lt(e.tool.createdAt),title:lt(e.tool.createdAt),children:[s.jsxs("summary",{children:[s.jsxs("span",{className:"tool-card-summary-title",children:[e.tool.kind==="collaboration"?s.jsx("span",{className:"tool-card-kind-icon",children:s.jsx(ef,{})}):null,s.jsx("span",{children:e.tool.title})]}),e.tool.meta?s.jsx("small",{children:e.tool.meta}):null]}),s.jsx("code",{children:e.tool.body}),e.tool.output?s.jsx("pre",{children:e.tool.output}):null,(k=e.tool.rawEvents)!=null&&k.length?s.jsxs("details",{className:"tool-raw-details",children:[s.jsx("summary",{children:"Raw events"}),s.jsx("pre",{className:"tool-raw-json",children:JSON.stringify(e.tool.rawEvents,null,2)})]}):null]})}function p3(e){return e.type==="message"||e.type==="turnError"||e.type==="assistantText"&&e.pinnedToResult||e.type==="assistantText"&&e.phase==="final_answer"||e.type==="tool"&&aM(e.tool)}function aM(e){return e.kind==="responsibility"||e.kind==="workspaceChange"&&!!(e.workspaceChangeProposalId??e.responsibilityProposalId)||e.kind==="knowledge"||e.kind==="collaboration"&&e.topicAction==="send"||e.meta==="approval"}function iM(e){const t=[],n=[];for(const a of e)a.type==="tool"&&(a.tool.kind==="collaboration"&&a.tool.topicAction==="send"||a.tool.kind==="workspaceChange"||a.tool.kind==="responsibility")?n.push(a):t.push(a);return[...t,...n]}function O6({group:e,conversation:t,allowProcessView:n=!0,copiedFooter:a,copiedArtifactUrl:l,running:u,onCopyArtifactUrl:c,onCopyBubble:f,onLoadProcessDetails:h,onPreviewArtifact:m,onRespondApproval:p,onRespondWorkspaceChangeProposal:y,onRespondKnowledgeProposal:k,onOpenSystemEvent:x}){const C=iM(e.agentItems.filter(p3)),M=e.agentItems.some(F=>!p3(F)),I=n&&(M||e.turnIds.length>0),_=u?"process":"result",[N,q]=A.useState(_),[R,X]=A.useState(!1),P=N==="result"?C:e.agentItems,H=yM(P);A.useEffect(()=>{R||q(_)},[_,R]);const J=u||I||e.stopped,ne=s.jsxs(s.Fragment,{children:[J?s.jsx("div",{className:"turn-panel-controls",children:u?s.jsx("span",{"aria-label":"Agent run in progress",className:"turn-view-spinner",title:"Agent run in progress"}):I?s.jsx("button",{"aria-label":N==="result"?"Show process":"Show result",className:"turn-view-toggle",title:N==="result"?"Show process":"Show result",type:"button",onClick:()=>{X(!0),q(F=>F==="result"?(h(e.turnIds),"process"):"result")},children:N==="result"?s.jsx(lM,{}):s.jsx(sM,{})}):null}):null,P.map(F=>s.jsx(A.Fragment,{children:Ps(F,t,m,c,l,p,y,k,x)},F.id)),N==="result"&&P.length===0?s.jsx("div",{className:"turn-result-empty",children:e.stopped?"Run stopped by user":M?"No reliable final answer captured":"No result yet"}):null,s.jsx(Uc,{copied:a,content:H,id:`agent-${e.id}-bottom`,notice:e.notificationFailure,timestamp:vM(P),variant:"outside",onCopy:f})]});return e.stopped?s.jsxs("details",{className:"turn-panel agent-turn stopped","data-collapsed":"true",children:[s.jsxs("summary",{children:[s.jsx("span",{className:"turn-stopped-badge",children:"Stopped"}),s.jsx("span",{children:"Run stopped by user"})]}),s.jsx("div",{className:J?"stopped-turn-body has-controls":"stopped-turn-body",children:ne})]}):s.jsx("div",{className:["turn-panel","agent-turn",e.stopped?"stopped":"",J?"has-controls":""].filter(Boolean).join(" "),children:ne})}function lM(){return s.jsx("svg",{"aria-hidden":"true",fill:"none",height:"14",viewBox:"0 0 24 24",width:"14",children:s.jsx("path",{d:"M8 7h8M6 12h12M8 17h8",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2"})})}function sM(){return s.jsx("svg",{"aria-hidden":"true",fill:"none",height:"14",viewBox:"0 0 24 24",width:"14",children:s.jsx("path",{d:"m7 12 3 3 7-7",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})})}function oM(){return s.jsx("svg",{"aria-hidden":"true",fill:"none",height:"13",viewBox:"0 0 24 24",width:"13",children:s.jsx("rect",{fill:"currentColor",height:"12",rx:"2.6",width:"12",x:"6",y:"6"})})}function uM({className:e="",description:t,icon:n,onClick:a,timestamp:l,title:u,trailing:c,visibleTitle:f}){return s.jsxs("button",{className:`tool-card file compact-timeline-link ${e}`.trim(),"data-hover-time":lt(l),onClick:a,title:u,type:"button",children:[s.jsx("span",{className:"compact-timeline-link-icon",children:n}),s.jsxs("span",{className:"compact-timeline-link-copy",children:[s.jsx("strong",{children:f}),s.jsx("small",{children:t})]}),c?s.jsx("span",{className:"compact-timeline-link-trailing",children:c}):null]})}function cM({conversation:e,tool:t,onRespond:n}){var I;const a=et((I=t.workspaceChangePayload)==null?void 0:I.content)||t.body,[l,u]=A.useState(a),[c,f]=A.useState(null),[h,m]=A.useState("source"),[p,y]=A.useState(!1),k=!!(t.workspaceChangeProposalId??t.responsibilityProposalId),x=t.meta==="saved"||t.meta==="declined"?t.meta:k?"pending":"preparing",C=x==="pending";A.useEffect(()=>{u(a)},[a]);async function M(_){f(_);try{await n(t,_,_==="accept"?{content:l}:void 0)&&y(!1)}finally{f(null)}}return s.jsxs(s.Fragment,{children:[s.jsx(uM,{className:"responsibility-request-link",description:"Workspace responsibility",icon:s.jsx(Hf,{}),onClick:()=>y(!0),timestamp:t.createdAt,title:"View workspace change request",trailing:s.jsx("span",{className:`responsibility-request-status ${x}`,children:x}),visibleTitle:t.title}),p?s.jsx("div",{className:"dialog-backdrop",role:"presentation",onMouseDown:()=>!c&&y(!1),children:s.jsxs("section",{"aria-labelledby":`responsibility-proposal-${t.id}`,"aria-modal":"true",className:"dialog-card responsibility-proposal-dialog",onMouseDown:_=>_.stopPropagation(),role:"dialog",children:[s.jsxs("header",{children:[s.jsxs("div",{children:[s.jsx("h2",{id:`responsibility-proposal-${t.id}`,children:t.title}),s.jsxs("p",{children:["Workspace change · ",lt(t.createdAt)]})]}),s.jsx("button",{"aria-label":"Close",className:"icon-button",disabled:!!c,onClick:()=>y(!1),type:"button",children:"×"})]}),s.jsxs("div",{className:"responsibility-proposal-dialog-body",children:[s.jsxs("div",{className:"responsibility-proposal-header",children:[s.jsxs("div",{children:[s.jsx("strong",{children:"Proposed responsibility"}),s.jsx("p",{children:k?"Review or edit the Markdown before applying it to future turns.":"The proposal becomes actionable after the current turn completes."})]}),s.jsx("span",{children:x})]}),t.responsibilityReason?s.jsx("p",{className:"responsibility-proposal-reason",children:t.responsibilityReason}):null,C?s.jsxs("div",{className:"responsibility-proposal-editor",children:[s.jsxs("div",{className:"responsibility-proposal-tabs",role:"tablist",children:[s.jsx("button",{"aria-selected":h==="source",className:h==="source"?"active":"",role:"tab",type:"button",onClick:()=>m("source"),children:"Source"}),s.jsx("button",{"aria-selected":h==="preview",className:h==="preview"?"active":"",role:"tab",type:"button",onClick:()=>m("preview"),children:"Preview"})]}),h==="source"?s.jsx("textarea",{"aria-label":"Proposed workspace responsibility",className:"responsibility-proposal-body",disabled:!!c,onChange:_=>u(_.target.value),rows:12,value:l}):s.jsx("div",{className:"message-body responsibility-markdown-preview",children:es(l,e)})]}):s.jsx("div",{className:"message-body responsibility-markdown-preview saved",children:es(l,e)})]}),s.jsx("footer",{className:"responsibility-proposal-dialog-actions",children:C?s.jsxs(s.Fragment,{children:[s.jsx("button",{className:"secondary reject",disabled:!!c,type:"button",onClick:()=>void M("decline"),children:c==="decline"?"Rejecting...":"Reject"}),s.jsx("button",{className:"approve",disabled:!!c,type:"button",onClick:()=>void M("accept"),children:c==="accept"?"Saving...":"Save"})]}):s.jsx("button",{className:"secondary",onClick:()=>y(!1),type:"button",children:"Close"})})]})}):null]})}function dM({tool:e,onRespond:t}){const[n,a]=A.useState(e.body),[l,u]=A.useState(null),[c,f]=A.useState("source"),h=e.meta==="saved"||e.meta==="declined"?e.meta:"pending",m=h==="pending",p=g3(n);return A.useEffect(()=>{a(e.body)},[e.body]),s.jsxs("article",{className:"tool-card responsibility knowledge-proposal","data-hover-time":lt(e.createdAt),title:lt(e.createdAt),children:[s.jsxs("div",{className:"responsibility-proposal-header",children:[s.jsxs("div",{children:[s.jsx("strong",{children:e.title}),s.jsx("p",{children:"Long-term knowledge changes require approval. Keep one item as a reusable source or skill, not a tiny note."})]}),s.jsx("span",{children:h})]}),m?s.jsxs("div",{className:"responsibility-proposal-editor",children:[s.jsxs("div",{className:"responsibility-proposal-tabs",role:"tablist",children:[s.jsx("button",{"aria-selected":c==="source",className:c==="source"?"active":"",role:"tab",type:"button",onClick:()=>f("source"),children:"JSON"}),s.jsx("button",{"aria-selected":c==="preview",className:c==="preview"?"active":"",role:"tab",type:"button",onClick:()=>f("preview"),children:"Preview"})]}),c==="source"?s.jsx("textarea",{"aria-label":"Proposed workspace knowledge",className:"responsibility-proposal-body",disabled:!!l,onChange:y=>a(y.target.value),rows:10,value:n}):p?s.jsx(y3,{value:p}):s.jsx("div",{className:"knowledge-proposal-invalid",children:"Invalid JSON. Fix the proposal before saving."})]}):p?s.jsx(y3,{value:p,saved:!0}):s.jsx("pre",{className:"knowledge-proposal-raw",children:n}),m?s.jsxs("div",{className:"tool-approval-actions responsibility-actions",children:[s.jsx("button",{className:"approve",disabled:!!l,type:"button",onClick:()=>{g3(n)&&(u("accept"),Promise.resolve(t(e,"accept",n)).finally(()=>u(null)))},children:l==="accept"?"Saving...":"Save"}),s.jsx("button",{className:"reject",disabled:!!l,type:"button",onClick:()=>{u("decline"),Promise.resolve(t(e,"decline",n)).finally(()=>u(null))},children:l==="decline"?"Rejecting...":"Reject"})]}):null]})}function g3(e){try{const t=JSON.parse(e);return!t||typeof t!="object"||Array.isArray(t)?null:t}catch{return null}}function mp(e){return typeof e=="string"&&e.trim()?e.trim():typeof e=="number"||typeof e=="boolean"?String(e):"-"}function y3({value:e,saved:t}){return s.jsx("div",{className:`knowledge-proposal-preview${t?" saved":""}`,children:s.jsxs("dl",{children:[s.jsxs("div",{children:[s.jsx("dt",{children:"Name"}),s.jsx("dd",{children:mp(e.name)})]}),s.jsxs("div",{children:[s.jsx("dt",{children:"Purpose"}),s.jsx("dd",{children:mp(e.purpose)})]}),s.jsxs("div",{children:[s.jsx("dt",{children:"Content"}),s.jsx("dd",{children:mp(e.content??e.description)})]})]})})}function fM({conversation:e,tool:t}){var c;const n=t.fileChanges??[],a=e==null?void 0:e.workspacePath,l=EE(n),u=t.meta==="started"||t.meta==="running";return s.jsxs("details",{className:`tool-card file${u?" running":" done"}`,"data-hover-time":lt(t.createdAt),title:lt(t.createdAt),children:[s.jsxs("summary",{children:[s.jsxs("span",{className:"tool-card-summary-title",children:[s.jsx("span",{className:"file-change-indicator","aria-hidden":"true"}),s.jsx("span",{className:"file-change-title",children:AE(n,a)})]}),s.jsx(v3,{additions:l.additions,deletions:l.deletions,running:u})]}),s.jsx("div",{className:"file-change-list",children:n.map((f,h)=>s.jsxs("div",{className:"file-change-row",children:[s.jsx("span",{className:"file-change-kind",children:hM(f.kind)}),s.jsx("code",{title:f.path,children:v6(f.path,a)}),s.jsx(v3,{additions:f.additions,deletions:f.deletions})]},`${f.path}:${h}`))}),(c=t.rawEvents)!=null&&c.length?s.jsxs("details",{className:"tool-raw-details",children:[s.jsx("summary",{children:"Raw events"}),s.jsx("pre",{className:"tool-raw-json",children:JSON.stringify(t.rawEvents,null,2)})]}):null]})}function v3({additions:e,deletions:t,running:n=!1}){return s.jsxs("span",{className:"file-change-stats",children:[n?s.jsx("small",{children:"editing"}):null,e>0?s.jsxs("span",{className:"file-change-additions",children:["+",e]}):null,t>0?s.jsxs("span",{className:"file-change-deletions",children:["-",t]}):null]})}function hM(e){switch(e){case"add":return"A";case"delete":return"D";case"move":return"R";default:return"M"}}function mM({tool:e,onRespondApproval:t}){var k;const n=Oz(e),[a,l]=A.useState(!1),[u,c]=A.useState("script"),f=n==="approval"&&e.approvalRequestId!==void 0&&!!e.approvalTurnId,h=xf(e.body)?null:e.body,m=h?qz(h):null,p=m?`${pM(n)} · ${m}`:n==="running"?"Running script":n==="approval"?"Waiting for approval":"Command",y=Iz(e,n);return s.jsxs("article",{className:`tool-card command ${n}`,"data-hover-time":lt(e.createdAt),title:lt(e.createdAt),children:[s.jsxs("div",{className:"tool-command-bar",children:[s.jsxs("button",{"aria-expanded":a,className:"tool-command-toggle",type:"button",onClick:()=>l(x=>!x),children:[s.jsx("span",{className:"tool-command-indicator","aria-hidden":"true"}),s.jsx("span",{children:p}),s.jsx("small",{className:"tool-command-badge",children:y})]}),a?s.jsxs("div",{className:"tool-command-tabs",role:"tablist","aria-label":"Command details",children:[s.jsx("button",{"aria-selected":u==="script",role:"tab",type:"button",onClick:()=>c("script"),children:"Script"}),s.jsx("button",{"aria-selected":u==="result",role:"tab",type:"button",onClick:()=>c("result"),children:"Result"}),(k=e.rawEvents)!=null&&k.length?s.jsx("button",{"aria-selected":u==="raw",role:"tab",type:"button",onClick:()=>c("raw"),children:"Raw"}):null]}):null,f?s.jsxs("div",{className:"tool-approval-actions",children:[s.jsx("button",{className:"approve",type:"button",onClick:()=>t(e,"accept"),children:"Approve"}),s.jsx("button",{className:"reject",type:"button",onClick:()=>t(e,"decline"),children:"Reject"})]}):null]}),a?u==="script"?s.jsx("div",{className:"tool-tab-panel",role:"tabpanel",children:h?s.jsx(x3,{content:h}):s.jsx("p",{className:"tool-output-pending",children:"Script unavailable"})}):u==="result"?s.jsxs("div",{className:"tool-tab-panel result",role:"tabpanel",children:[s.jsx("p",{className:"tool-command-result-meta",children:_z(e,n)}),e.output?s.jsx(x3,{content:e.output}):s.jsx("p",{className:"tool-output-pending",children:n==="running"?"Waiting for output...":n==="approval"?"Waiting for approval before running.":e.meta??"No output"})]}):s.jsx(gM,{events:e.rawEvents??[]}):null]})}function pM(e){return e==="running"?"Running":e==="approval"?"Approval required":"Command"}function x3({content:e}){const[t,n]=A.useState(!1),a=Bz(e,o3);return s.jsxs("div",{className:"tool-content-block",children:[s.jsx("pre",{className:"tool-content-code",children:t?e:Lz(e,o3)}),a?s.jsx("button",{className:"tool-content-toggle",type:"button",onClick:()=>n(l=>!l),children:t?"Collapse":"Show all"}):null]})}function gM({events:e}){return s.jsx("div",{className:"tool-tab-panel raw",role:"tabpanel",children:s.jsx("pre",{className:"tool-raw-json",children:JSON.stringify(e,null,2)})})}function Uc({copied:e,content:t,id:n,notice:a,timestamp:l,variant:u,onCopy:c}){return t.trim()?s.jsxs("footer",{className:`turn-panel-footer ${u}${a?" has-notice":""}`,children:[a?s.jsx("span",{"aria-label":`Notification failed: ${a}`,className:"turn-panel-footer-notice",role:"img",title:a,children:s.jsx(ag,{})}):null,s.jsx("time",{dateTime:l,children:lt(l)}),s.jsx("button",{"aria-label":e?"Copied markdown":"Copy markdown",onClick:()=>c(n,t),title:e?"Copied":"Copy",type:"button",children:e?s.jsx("span",{"aria-hidden":"true",children:"Copied"}):s.jsxs("svg",{"aria-hidden":"true",fill:"none",height:"12",viewBox:"0 0 24 24",width:"12",children:[s.jsx("rect",{height:"14",rx:"2",stroke:"currentColor",strokeWidth:"2",width:"14",x:"8",y:"8"}),s.jsx("path",{d:"M4 16V6a2 2 0 0 1 2-2h10",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2"})]})})]}):null}function Hc(e){return e.type==="message"?e.message.role==="user"?e.message.content:a0(e.message.content):e.type==="assistantText"?a0(e.content):e.type==="turnError"?`Task failed
|
|
370
|
-
|
|
371
|
-
${e.content}`:e.type==="system"?[e.title,e.fullDetail??e.detail].filter(t=>!!(t!=null&&t.trim())).join(`
|
|
372
|
-
|
|
373
|
-
`):""}function yM(e){return e.map(Hc).filter(t=>t.trim()).join(`
|
|
374
|
-
|
|
375
|
-
`)}function vM(e){for(let t=e.length-1;t>=0;t-=1){const n=e[t];if(n.type!=="tool")return n.createdAt}return new Date().toISOString()}function xM({usage:e}){if(!e)return s.jsx("span",{"aria-label":"Usage pending",className:"usage-indicator muted","data-tooltip":"Usage pending",role:"status",tabIndex:0,children:s.jsx("strong",{children:"--"})});const t=[e.accountName??"Codex",e.updatedAt?`更新于 ${lt(e.updatedAt)}`:"尚无额度数据",e.stale?"数据待更新":"",e.syncPending?`正在同步到 ${e.selectedAccountName??"新账户"}`:"",e.error?`最近一次刷新失败:${e.error}`:""].filter(Boolean).join(" · ");return s.jsxs("div",{className:"usage-indicators","aria-label":"Seele usage",children:[e.windows.length===0&&s.jsx("span",{className:"usage-indicator muted",role:"status",tabIndex:0,"aria-label":t,"data-tooltip":t,children:"--"}),e.windows.map(n=>s.jsx(bM,{label:I6(n.windowDurationMins),window:n,accountTooltip:t},`${n.windowDurationMins}:${n.resetsAt}`))]})}function I6(e){return e%10080===0?`${e/10080}w`:e%1440===0?`${e/1440}d`:e%60===0?`${e/60}h`:`${e}m`}function bM({label:e,window:t,accountTooltip:n}){const a=$f(t.usedPercent),l=sg(a),u=`${n?`${n} · `:""}${e} usage ${hb(a)} · resets ${mb(t.resetsAt)}`;return s.jsx("span",{"aria-label":u,className:`usage-indicator ${l}`,"data-tooltip":u,role:"status",style:{"--usage-level":`${a}%`},tabIndex:0,children:s.jsxs("strong",{children:[Math.round(a),"%"]})})}function _6(e,t,n,a,l,u){const c=[...e].sort(Wc),f=new Map(a.filter(H=>H.parentId===null&&H.nodeType==="agent_turn"&&H.turnId!==null).map(H=>[H.turnId,H.sequence])),h=new Map(a.filter(H=>H.parentId===null&&H.nodeType==="agent_turn"&&H.turnId!==null).map(H=>[H.turnId,H.timelineAt])),m=new Map(a.filter(H=>H.nodeType==="user_message"&&H.entityId!==null).map(H=>[H.entityId,H.sequence])),p=new Map(a.filter(H=>H.nodeType==="user_message"&&H.entityId!==null).map(H=>[H.entityId,H.timelineAt])),y=a.filter(H=>H.parentId===null&&H.nodeType==="system_event"),k=new Map(y.flatMap(H=>{const J=eE(H,n);return J&&f.has(J)?[[H.id,J]]:[]})),x=y.filter(H=>!k.has(H.id)&&H.turnId!==null&&H.subtype.startsWith("input:")),C=y.filter(H=>!k.has(H.id)&&!x.includes(H)),M=new Set(y.flatMap(H=>H.turnId?[H.turnId]:[])),I=pE(t),_=new Map(n.map(H=>[H.id,H])),N=a.filter(H=>H.parentId===null&&H.nodeType==="agent_turn"&&H.turnId!==null).map(H=>H.turnId),R=[...new Set(a.length>0?[...N,...l?[l]:[]]:[...n.map(H=>H.id),...c.flatMap(H=>H.turnId?[H.turnId]:[]),...t.flatMap(H=>H.turnId?[H.turnId]:[])])].map(H=>{var it,pe,Pe,Ke;const J=_.get(H),ne=c.filter(oe=>oe.turnId===H),F=ne.filter(oe=>oe.role==="user").sort((oe,Me)=>{const ze=p.get(oe.id)??oe.createdAt,Ze=p.get(Me.id)??Me.createdAt;return ze.localeCompare(Ze)||Wc(oe,Me)}),te=ne.filter(oe=>oe.role==="assistant"),se=t.filter(oe=>oe.turnId===H).sort(Wc),ve=`turn:${H}`,be=a.filter(oe=>oe.parentId===ve).sort((oe,Me)=>oe.sequence-Me.sequence),he=(J==null?void 0:J.origin)??I.get(H),Z=x.filter(oe=>oe.turnId===H).sort((oe,Me)=>oe.timelineAt.localeCompare(Me.timelineAt)||oe.sequence-Me.sequence).map(oe=>pp(oe,void 0,u)),me=he==="timeline_event"?[]:a.length>0?EM(be,se,Vc([H],l),u):B6(se,Vc([H],l),u),V=te.map(_c),Ce=AM(me,V),U=gE(J);U&&Ce.push({id:`turn-error-${U.turnId}`,type:"turnError",createdAt:U.createdAt,content:U.content});const E=se.find(oe=>oe.event==="server.wakeup.started"),Y=Fe(E==null?void 0:E.data),O=typeof Y.instruction=="string"?Y.instruction.trim():"",ee=he==="timeline_event"?se[0]:void 0,ke=M.has(H)?null:ee?L6(ee,(J==null?void 0:J.startedAt)??new Date(0).toISOString()):jM(he)?{id:`system-${H}`,type:"system",createdAt:(J==null?void 0:J.startedAt)??((it=se[0])==null?void 0:it.createdAt)??new Date(0).toISOString(),title:CM(he??"system"),detail:TM(he??"system",O),fullDetail:O||void 0}:null,Ae=FM(se),He=(F[0]?p.get(F[0].id):(pe=x.find(oe=>oe.turnId===H))==null?void 0:pe.timelineAt)??h.get(H)??(J==null?void 0:J.startedAt)??((Pe=ne[0])==null?void 0:Pe.createdAt)??((Ke=se[0])==null?void 0:Ke.createdAt)??new Date(0).toISOString();return{id:`turn-${H}`,turnIds:[H],user:ke??(F[0]?_c(F[0]):null),followupUsers:F.slice(1).map(_c),acceptedSystemInputs:Z,cotaskNotices:y.filter(oe=>k.get(oe.id)===H).map(oe=>pp(oe,void 0,u)),agentItems:Ce,activity:Ae??(Vc([H],l)?{id:-1,title:Ce.some(oe=>oe.type==="assistantText"&&oe.streaming)?"Writing response":"Working",createdAt:He,tone:"running"}:null),notificationFailure:$M(se),stopped:(J==null?void 0:J.status)==="cancelled"||se.some(U6),trailingSystemItems:[],sortAt:He,sortSequence:f.get(H)??null}}),X=c.filter(H=>!H.turnId);R.push(...X.map(H=>({id:`message-${H.id}`,turnIds:[],user:H.role==="user"?_c(H):null,followupUsers:[],agentItems:H.role==="assistant"?[_c(H)]:[],activity:null,notificationFailure:null,stopped:!1,sortAt:p.get(H.id)??H.createdAt,sortSequence:m.get(H.id)??null})));const P=new Map(t.map(H=>[String(H.id),H]));return R.push(...C.map(H=>({id:H.id,turnIds:[],user:pp(H,H.entityType==="event"&&H.entityId?P.get(H.entityId):void 0,u),followupUsers:[],agentItems:[],activity:null,notificationFailure:null,stopped:!1,trailingSystemItems:[],sortAt:H.timelineAt,sortSequence:H.sequence}))),R.sort((H,J)=>{const ne=H.sortAt.localeCompare(J.sortAt);return ne!==0?ne:H.sortSequence!==null||J.sortSequence!==null?(H.sortSequence??Number.MAX_SAFE_INTEGER)-(J.sortSequence??Number.MAX_SAFE_INTEGER):0}).map(({sortAt:H,...J})=>J)}function pp(e,t,n){var f,h;if(t||e.entityType==="event")return L6(t??s1(e),e.createdAt);const a=Fe(e.detail);if(e.subtype==="input:collaboration_notice"||e.subtype==="input:topic_message"){const m=e1(a,n),p=wM(a.messages,n),y=Array.isArray(a.senderWorkspaceIds)?a.senderWorkspaceIds.filter(x=>typeof x=="string"&&x.trim().length>0):[],k=typeof a.unreadCount=="number"?a.unreadCount:0;return{id:e.id,type:"system",createdAt:e.createdAt,title:m.title,detail:m.detail,visualKind:"topic",topicMessages:p,fullDetail:[`## ${m.title}`,"","**Unread**","",String(k),"","**From**","",y.length>0?y.map(x=>{const C=n.get(x)??x;return`${Ys(C)} (\`${x}\`)`}).join(", "):"Unknown"].join(`
|
|
376
|
-
`)}}const l=g6(e.title,e.subtype),u=Xs(a,[e.summary,e.contentMarkdown]),c=[`## ${Ys(l)}`,"",((f=e.contentMarkdown)==null?void 0:f.trim())||((h=e.summary)==null?void 0:h.trim())||"",Object.keys(a).length>0?["","```json",JSON.stringify(a,null,2),"```"].join(`
|
|
377
|
-
`):""].filter(Boolean).join(`
|
|
378
|
-
`);return{id:e.id,type:"system",createdAt:e.createdAt,title:l,detail:u,fullDetail:c||void 0}}function wM(e,t){if(!Array.isArray(e))return[];const n=new Set,a=[];for(const l of e){const u=Fe(l),c=et(u.id),f=et(u.senderWorkspaceId),h=et(u.contentMarkdown).trim(),m=et(u.createdAt);!c||n.has(c)||!f||!h||!m||(n.add(c),a.push({id:c,senderWorkspaceId:f,senderName:t.get(f)??(et(u.senderTitleSnapshot)||f),contentMarkdown:h,createdAt:m}))}return a}function L6(e,t){return e.event==="server.collaboration.topic_created"?kM(e,t):SM(e,t)}function kM(e,t){const n=Fe(Fe(e.data).topic),a=et(n.title).trim()||"Untitled Topic",l=et(n.publicDescription).trim()||"未填写描述",u=Array.isArray(n.members)?n.members.map(Fe):[],c=et(n.ownerWorkspaceId),f=u.find(y=>et(y.role)==="owner"||et(y.workspaceId)===c),h=et(f==null?void 0:f.workspaceTitleSnapshot).trim()||"Unknown workspace",m=u.filter(y=>et(y.role)!=="owner"&&et(y.status)==="active"),p=m.length?m.map(y=>{const k=et(y.workspaceTitleSnapshot).trim()||"Unknown workspace";return`- ${Ys(k)} (\`${et(y.workspaceId)}\`)`}):["无"];return{id:`collaboration-topic-created-${e.id}`,type:"system",createdAt:e.createdAt??t,title:"Created",detail:a,visualKind:"topic",fullDetail:["## Topic 已创建","","**名称**","",Ys(a),"","**描述**","",Ys(l),"","**Owner Workspace**","",`${Ys(h)} (\`${c}\`)`,"","**协作 Workspace**","",...p].join(`
|
|
379
|
-
`)}}function SM(e,t){const n=Fe(e.data),a=l1(e.data),l=g6(void 0,e.event);return{id:`system-event-${e.id}`,type:"system",createdAt:e.createdAt??t,title:l,detail:Xs(n),visualKind:e.event.startsWith("server.collaboration.")?"topic":void 0,fullDetail:[`## ${Ys(l)}`,"","**Event**","",`\`${e.event}\``,"","```json",JSON.stringify(a??null,null,2),"```"].join(`
|
|
380
|
-
`)}}function l1(e,t=""){return Array.isArray(e)?e.map(n=>l1(n)):e&&typeof e=="object"?Object.fromEntries(Object.entries(e).map(([n,a])=>[n,l1(a,n)])):typeof e=="string"&&(t==="wakeAt"||t==="wake_at")&&Xi(e)||e}function jM(e){return e==="system"||e==="wakeup"||e==="runtime-reset"||e==="clone_initialization"}function CM(e){return e==="runtime-reset"?"Runtime reset":e==="clone_initialization"?"Clone initialization":e==="system"?"System action":"Scheduled wakeup"}function TM(e,t){return e==="runtime-reset"?"Thread rebuilt":e==="clone_initialization"?"Activating inherited context":e==="system"?"Workspace runtime action":t?lb(t,20):"Auto resumed"}function AM(e,t){if(e.some(l=>l.type==="assistantText"))return vf(e);if(t.length===0)return e;const n=[...t],a=[];for(const l of e)l.type==="tool"&&tg(l.tool)&&eg(n,l.tool)||a.push(l);return vf([...a,...n])}function EM(e,t,n,a){var h;const l=new Map(t.filter(m=>m.id!==void 0).map(m=>[String(m.id),m])),u=new Map,c=new Set;for(const m of e){const p=NM(m,t,l);p.length>0&&c.add(m.id);for(const y of p)u.set(li(y),y)}if(n)for(const m of t)MM(e,m)||u.set(li(m),m);else if(t.length>0&&!e.some(m=>m.phase==="process"))for(const m of t)u.set(li(m),m);for(const m of t){const p=Fe(m.data),y=Fe(p.params);(typeof p.method=="string"&&p.method.startsWith("item/reasoning/")||p.method==="item/completed"&&Fe(y.item).type==="reasoning")&&u.set(li(m),m)}const f=B6([...u.values()].sort(Wc),n,a);for(const m of e)if(!c.has(m.id)){if(m.nodeType==="agent_text"&&m.subtype!=="final_answer"&&((h=m.contentMarkdown)!=null&&h.trim())){f.push({id:m.id,type:"assistantText",createdAt:m.createdAt,content:m.contentMarkdown,phase:DM(m),itemId:m.entityType==="codex_item"?m.entityId??void 0:void 0,streaming:n&&m.status==="running"});continue}m.nodeType==="operation"&&f.push({id:m.id,type:"tool",createdAt:m.createdAt,tool:zM(m,a)})}return vf(f)}function NM(e,t,n){if(e.entityType==="event"&&e.entityId){const a=n.get(e.entityId);return a&&e.phase==="process"&&e.status==="running"?[{...a,timelineSequence:e.sequence}]:[{...s1(e),seq:a==null?void 0:a.seq}]}if(e.entityType==="codex_item"&&e.entityId){const a=t.filter(l=>J1(l)===e.entityId);return a.length>0?a.map(l=>({...l,timelineSequence:e.sequence})):[s1(e)]}return[]}function s1(e){const t=Fe(e.detail),n=e.subtype==="server.collaboration.message_staged"&&e.phase==="result"?e.status==="failed"?"server.collaboration.message_rejected":et(t.messageId)?"server.collaboration.message_sent":e.subtype:e.subtype;return{id:e.entityId??e.id,turnId:e.turnId,timelineSequence:e.sequence,event:e.entityType==="codex_item"?"codex.notification":n,data:e.detail,createdAt:e.updatedAt||e.createdAt}}function MM(e,t){const n=t.id===void 0?null:String(t.id),a=J1(t);return e.some(l=>n!==null&&l.entityType==="event"&&l.entityId===n||a!==null&&l.entityType==="codex_item"&&l.entityId===a)}function J1(e){if(e.event!=="codex.notification"&&e.event!=="server.item.snapshot")return null;const t=Fe(e.data),n=Fe(t.params),a=Fe(n.item);return et(a.id)||et(n.itemId)||null}function DM(e){return e.subtype==="final_answer"?"final_answer":e.phase==="process"?"commentary":"unknown"}function zM(e,t){var a,l;const n=Fe(e.detail);return{id:e.id,kind:e.status==="failed"?"error":"activity",title:e.subtype==="input:collaboration_notice"?e1(n,t).title:e.title||sb(e.subtype),body:e.subtype==="input:collaboration_notice"?e1(n,t).detail:((a=e.summary)==null?void 0:a.trim())||((l=e.contentMarkdown)==null?void 0:l.trim())||eb(n),createdAt:e.createdAt,itemId:e.entityType==="codex_item"?e.entityId??void 0:void 0,meta:e.status}}function B6(e,t,n){const a=[],l=new Map,u=new Map,c=new Map,f=new Map,h=new Map;for(const m of e){const p=dE(l,m.data);if(p){const _=fE(p);let N=u.get(p.itemId);!N&&_&&(N={id:`reasoning-${m.id}`,type:"reasoning",createdAt:m.createdAt??new Date().toISOString(),content:_,streaming:!1},u.set(p.itemId,N),a.push(N)),N&&(N.content=_,N.streaming=t&&!p.completed);continue}if(m.event==="server.workspace_change.decision"||m.event==="server.responsibility.decision"){_M(a,m);continue}if(m.event==="server.knowledge.decision"){LM(a,m);continue}if(U6(m)){HM(a);continue}if(m.event==="server.steer"){const _=Fe(m.data),N=typeof _.content=="string"?_.content.trim():typeof _.message=="string"?_.message.trim():"";a.push({id:`steer-${m.id}`,type:"steerMarker",createdAt:m.createdAt??new Date().toISOString(),content:N||"Additional input",messageId:typeof _.messageId=="string"?_.messageId:void 0});continue}const y=tR(m.data);y!=null&&y.itemId&&h.set(y.itemId,y.phase);const k=eR(m.data);if(k!=null&&k.text){const _=k.itemId?h.get(k.itemId)??k.phase:k.phase,N=k.itemId??`phase:${_}`,q=`${c.get(N)??""}${k.text}`,R=V6(q),X=f.get(N)??"",P=R.startsWith(X)?R.slice(X.length):R;if(c.set(N,q),f.set(N,R),P){const H=a[a.length-1];(H==null?void 0:H.type)==="assistantText"&&qM(H,k.itemId,_)?(H.content+=P,H.itemId=H.itemId??k.itemId,H.streamKey=H.streamKey??N,H.streaming=t):a.push({id:`assistant-event-${m.id}`,type:"assistantText",createdAt:m.createdAt??new Date().toISOString(),content:P,phase:_,itemId:k.itemId,streamKey:N,streaming:t})}continue}const x=nR(m.data);if(x!=null&&x.text){const _=a0(x.text),N=x.itemId??`phase:${x.phase}`,q=UM(a,x.itemId,x.phase);if(q>=0&&OM(a,q,x.itemId,x.phase,N,_,m))continue;if(q>=0){const R=a[q];R.type==="assistantText"&&(_?(R.content=_,R.phase=x.phase,R.itemId=R.itemId??x.itemId,R.streamKey=R.streamKey??N,R.streaming=!1,IM(a,q,x.itemId)):a.splice(q,1))}else _&&a.push({id:`assistant-completed-${m.id}`,type:"assistantText",createdAt:m.createdAt??new Date().toISOString(),content:_,phase:x.phase,itemId:x.itemId,streamKey:N,streaming:!1});continue}const C=Mz(m,n);if(C){C.rawEvents=[m];const _=w3(a,C);if(_>=0){k3(a[_],C);continue}if(tg(C)&&eg(a,C)||C.kind==="command"&&C.meta==="running"&&xf(C.body))continue;a.push({id:`tool-${C.id}`,type:"tool",createdAt:C.createdAt,tool:C});continue}const M=Dz(m);if(M){M.rawEvents=[m];const _=w3(a,M);if(_>=0){k3(a[_],M);continue}a.push({id:`tool-${M.id}`,type:"tool",createdAt:M.createdAt,tool:M});continue}if(SE(m)){RM(a,m);continue}const I=zz(m);I&&(I.rawEvents=[m],a.push({id:`tool-${I.id}`,type:"tool",createdAt:I.createdAt,tool:I}))}return vf(a)}function RM(e,t){const n=J1(t);if(n)for(let a=e.length-1;a>=0;a-=1){const l=e[a];if(!(l.type!=="tool"||l.tool.itemId!==n)){l.tool={...l.tool,rawEvents:H6(l.tool.rawEvents,[t])};return}}}function OM(e,t,n,a,l,u,c){const f=e.reduce((x,C,M)=>C.type==="steerMarker"?M:x,-1);if(f<=t)return!1;const h=e.flatMap((x,C)=>x.type==="assistantText"&&(C===t||(n?x.itemId===n:x.streamKey===l))?[{item:x,index:C}]:[]),m=[...h].reverse().find(({index:x})=>x>f),p=h.filter(x=>x!==m),y=p.map(({item:x})=>x.content).join("");if(!u.startsWith(y)){const x=new Set(h.map(({item:C})=>C));for(let C=e.length-1;C>=0;C--)x.has(e[C])&&e.splice(C,1);return u&&e.push({id:`assistant-completed-${c.id}`,type:"assistantText",createdAt:c.createdAt??new Date().toISOString(),content:u,phase:a,itemId:n,streamKey:l,streaming:!1}),!0}for(const{item:x}of p)x.streaming=!1,x.phase=a;const k=u.slice(y.length);return m?k?(m.item.content=k,m.item.streaming=!1,m.item.phase=a):e.splice(m.index,1):k&&e.push({id:`assistant-completed-${c.id}`,type:"assistantText",createdAt:c.createdAt??new Date().toISOString(),content:k,phase:a,itemId:n,streamKey:l,streaming:!1}),!0}function IM(e,t,n){if(n)for(let a=e.length-1;a>t;a-=1){const l=e[a];l.type==="assistantText"&&l.itemId===n&&e.splice(a,1)}}function _M(e,t){const n=Fe(t.data),a=typeof n.proposalId=="string"?n.proposalId:void 0,l=typeof n.decision=="string"?n.decision:void 0,u=Fe(n.payload),c=et(u.content)||(typeof n.responsibility=="string"?n.responsibility:void 0);if(!(!a||l!=="accept"&&l!=="decline"))for(let f=e.length-1;f>=0;f-=1){const h=e[f];if(h.type==="tool"&&(h.tool.kind==="responsibility"||h.tool.kind==="workspaceChange")&&(h.tool.workspaceChangeProposalId===a||h.tool.responsibilityProposalId===a)){const m=YE(h.tool.meta,l);h.tool={...h.tool,title:m==="saved"?"Workspace change applied":"Workspace change declined",meta:m,body:m==="saved"?c??h.tool.body:h.tool.body,workspaceChangePayload:m==="saved"&&Object.keys(u).length>0?u:h.tool.workspaceChangePayload};return}}}function LM(e,t){const n=Fe(t.data),a=typeof n.proposalId=="string"?n.proposalId:void 0,l=typeof n.decision=="string"?n.decision:void 0,u=Fe(n.knowledge);if(!(!a||l!=="accept"&&l!=="decline"))for(let c=e.length-1;c>=0;c-=1){const f=e[c];if(f.type==="tool"&&f.tool.kind==="knowledge"&&f.tool.knowledgeProposalId===a){f.tool={...f.tool,title:l==="accept"?"Knowledge saved":"Knowledge proposal declined",meta:l==="accept"?"saved":"declined",body:l==="accept"&&Object.keys(u).length>0?JSON.stringify(u,null,2):f.tool.body};return}}}function eg(e,t){const n=q6(t);if(typeof n!="number")return!1;for(let u=0;u<e.length;u+=1){const c=e[u];if(c.type!=="assistantText"||!b3(c,t))continue;const f=a0(c.content);f!==c.content&&(e[u]={...c,content:f})}let a=0,l=-1;for(let u=0;u<e.length;u+=1){const c=e[u];if(c.type!=="assistantText"||!b3(c,t))continue;l=u;const f=a,h=f+c.content.length;if(a=h,n>=h)continue;const m=Math.max(0,Math.min(c.content.length,n-f)),p=c.content.slice(0,m).trimEnd(),y=c.content.slice(m).trimStart(),k=[];return p&&k.push({...c,id:`${c.id}:before-tool-${t.id}`,content:p,pinnedToResult:!0}),k.push({id:`tool-${t.id}`,type:"tool",createdAt:t.createdAt,tool:t}),y&&k.push({...c,id:`${c.id}:after-tool-${t.id}`,content:y,pinnedToResult:!0}),e.splice(u,1,...k),!0}if(l>=0&&n>=a){const u=e[l];return(u==null?void 0:u.type)==="assistantText"&&(e[l]={...u,pinnedToResult:!0}),e.splice(l+1,0,{id:`tool-${t.id}`,type:"tool",createdAt:t.createdAt,tool:t}),!0}return!1}function b3(e,t){return!t.anchorStreamKey||e.streamKey===t.anchorStreamKey}function vf(e){const t=[],n=[];for(const u of e){if(u.type==="tool"&&tg(u.tool)){t.push(u.tool);continue}n.push(u)}const a=[...n],l=[];for(const u of t)eg(a,u)||l.push({id:`tool-${u.id}`,type:"tool",createdAt:u.createdAt,tool:u});return BM([...l,...a])}function tg(e){return typeof q6(e)=="number"}function q6(e){if(typeof e.anchorOffset=="number")return e.anchorOffset;if(e.kind==="responsibility")return e.responsibilityAnchorOffset;if(e.kind==="knowledge")return e.knowledgeAnchorOffset}function BM(e){const t=[];for(let n=0;n<e.length;n+=1){const a=e[n],l=e[n+1];if((a==null?void 0:a.type)==="tool"&&a.tool.kind==="responsibility"&&typeof a.tool.responsibilityAnchorOffset!="number"&&(l==null?void 0:l.type)==="assistantText"){t.push({...l,pinnedToResult:!0}),t.push(a),n+=1;continue}t.push(a)}return t}function qM(e,t,n){return e.type!=="assistantText"?!1:e.itemId&&t?e.itemId===t:e.itemId||t?!1:e.phase===n}function UM(e,t,n){if(t){const a=e.findIndex(l=>l.type==="assistantText"&&l.itemId===t);if(a>=0)return a}for(let a=e.length-1;a>=0;a-=1){const l=e[a];if(l.type==="assistantText"&&l.streaming&&(!t||!l.itemId)&&(l.phase===n||l.phase==="unknown"||n==="unknown"))return a}return-1}function U6(e){return e.event==="server.stop"||e.event==="server.stopped"}function HM(e){for(const t of e)t.type==="tool"&&t.tool.kind==="command"&&t.tool.meta==="running"&&(t.tool={...t.tool,title:"Command stopped",meta:"stopped"})}function $M(e){for(let t=e.length-1;t>=0;t-=1){const n=e[t];if(n.event!=="server.notification.failed")continue;const a=Fe(n.data);return typeof a.message=="string"?a.message:"Notification failed"}return null}function FM(e){for(let t=e.length-1;t>=0;t-=1){const n=ob(e[t]);if(n)return n}return null}function w3(e,t){for(let n=e.length-1;n>=0;n-=1){const a=e[n];if(a.type==="tool"&&a.tool.kind===t.kind&&(t.itemId&&a.tool.itemId===t.itemId||a.tool.body===t.body&&a.tool.meta==="running"))return n}return-1}function k3(e,t){if(e.type!=="tool")return;const n=e.tool.kind==="command"&&e.tool.meta!=="running"&&t.meta==="running",a=e.tool.kind==="command"&&t.kind==="command"&&xf(t.body)&&!xf(e.tool.body);e.tool={...e.tool,...t,id:e.tool.id,createdAt:e.tool.createdAt,title:n?e.tool.title:t.title,body:a?e.tool.body:t.body,meta:n?e.tool.meta:t.meta,output:t.outputKind?QA(e.tool.output,t.output,t.outputKind):Fz(e.tool.output,t.output),topicRecipientLabel:t.topicRecipientLabel??e.tool.topicRecipientLabel,topicMessageContent:t.topicMessageContent??e.tool.topicMessageContent,rawEvents:H6(e.tool.rawEvents,t.rawEvents)}}function H6(e,t){const n=[...e??[],...t??[]];if(n.length===0)return;const a=new Set;return n.filter(l=>{const u=li(l);return a.has(u)?!1:(a.add(u),!0)})}function _c(e){return{id:`message-${e.id}`,type:"message",createdAt:e.createdAt,message:e}}function Zd(e,t){const n=new Set,a=[...e,...t].filter(l=>n.has(l.id)?!1:(n.add(l.id),!0));return a.filter(l=>$6(l)?!a.some(u=>PM(u,l)):!0)}function Qd(e,t){const n=new Map;for(const a of[...e,...t])n.set(a.id,a);return[...n.values()].sort((a,l)=>Date.parse(a.startedAt)-Date.parse(l.startedAt))}function Jd(e,t){const n=new Map;for(const a of[...e,...t])n.set(a.id,a);return[...n.values()].sort((a,l)=>a.timelineAt.localeCompare(l.timelineAt)||a.sequence-l.sequence)}function $6(e){return e.id.startsWith("local-")}function PM(e,t){if($6(e)||e.role!==t.role||e.content.trim()!==t.content.trim())return!1;const n=Date.parse(e.createdAt),a=Date.parse(t.createdAt);return Number.isNaN(n)||Number.isNaN(a)?!1:Math.abs(n-a)<=12e4}function $d(e,t){const n=new Map,a=new Map;for(const u of[...e,...t]){const c=li(u);a.has(c)||a.set(c,a.size),n.set(c,u)}return[...n.values()].sort((u,c)=>{const f=F6(u,c);return f!==0?f:(a.get(li(u))??0)-(a.get(li(c))??0)})}function S3(e,t){const n=li(t),a=e.findIndex(u=>li(u)===n);if(a<0)return[...e,t];if(GM(e[a],t))return e;const l=[...e];return l[a]=t,l}function GM(e,t){return e.turnId===t.turnId&&e.event===t.event&&e.createdAt===t.createdAt&&e.seq===t.seq&&JSON.stringify(e.data)===JSON.stringify(t.data)}function li(e){return e.id!==void 0?`${typeof e.id}:${e.id}`:`${e.event}:${e.createdAt??""}:${JSON.stringify(e.data)}`}function Wc(e,t){const n=F6(e,t);return n!==0?n:VM(e.id,t.id)}function F6(e,t){if(e.turnId&&t.turnId&&e.turnId===t.turnId&&typeof e.seq=="number"&&typeof t.seq=="number"&&e.seq!==t.seq)return e.seq-t.seq;const n=Date.parse(e.createdAt??""),a=Date.parse(t.createdAt??"");return!Number.isNaN(n)&&!Number.isNaN(a)&&n!==a?n-a:Number.isNaN(n)!==Number.isNaN(a)?Number.isNaN(n)?1:-1:e.turnId&&e.turnId===t.turnId&&typeof e.timelineSequence=="number"&&typeof t.timelineSequence=="number"?e.timelineSequence-t.timelineSequence:0}function VM(e,t){return e===t?0:e===void 0?1:t===void 0?-1:typeof e=="number"&&typeof t=="number"?e-t:String(e).localeCompare(String(t))}function j3(e,t){const n=Fe(e.data);return typeof n.__seq=="number"&&typeof n.__createdAt=="string"&&Object.prototype.hasOwnProperty.call(n,"payload")?{id:typeof n.__eventId=="string"?n.__eventId:`stream:${n.__turnId??"unknown"}:${n.__seq}`,turnId:typeof n.__turnId=="string"?n.__turnId:null,seq:n.__seq,event:e.event,data:n.payload,createdAt:n.__createdAt}:{id:t,turnId:e.turnId??null,event:e.event,data:e.data,createdAt:e.createdAt??new Date().toISOString()}}const iu=A.memo(function({content:t,conversation:n,streaming:a,onPreviewArtifact:l,onCopyArtifactUrl:u,copiedArtifactUrl:c}){const f=a?V6(t):a0(t),h=n&&!a?eD(f,n):[];return s.jsxs(s.Fragment,{children:[a?s.jsx(KM,{content:f,conversation:n}):es(f,n),h.length>0?s.jsx("div",{className:"artifact-preview-list",children:h.map(m=>s.jsx(JM,{artifact:m,onPreview:l,onCopyUrl:u,copied:c===m.url},m.id))}):null]})},YM);function YM(e,t){var n,a,l,u;return e.content===t.content&&e.streaming===t.streaming&&e.copiedArtifactUrl===t.copiedArtifactUrl&&((n=e.conversation)==null?void 0:n.id)===((a=t.conversation)==null?void 0:a.id)&&((l=e.conversation)==null?void 0:l.workspacePath)===((u=t.conversation)==null?void 0:u.workspacePath)}function C3({content:e}){return s.jsx("div",{className:"plain-message-content",children:e})}const WM=2;function KM({content:e,conversation:t}){const n=A.useRef(null),[a,l]=A.useState(null),{committedBlocks:u,activeBlock:c}=XM(e);return A.useLayoutEffect(()=>{const f=n.current;if(!f)return;const h=parseFloat(window.getComputedStyle(f).lineHeight)||28,m=f.scrollHeight;l(p=>{const y=h*WM,k=Math.min(m,y);return p!==null&&k<=p?p:k})},[e]),s.jsxs("div",{className:"streaming-message-content",ref:n,style:a===null?void 0:{minHeight:a},children:[u.map((f,h)=>s.jsx(A.Fragment,{children:es(f,t)},`${h}:${f.length}`)),c?s.jsx("p",{className:"streaming-active-line",children:c}):null]})}function XM(e){const t=QM(e),n=t>0?e.slice(0,t):"",a=e.slice(t);return{committedBlocks:ZM(n),activeBlock:a}}function ZM(e){const t=[];let n=0,a=!1,l=!1;const u=e.match(/[^\n]*(?:\n|$)/g)??[];let c=0;for(const f of u){if(!f)continue;const h=f.trim(),m=c;if(c+=f.length,/^\s*(```|~~~)/.test(f)){a=!a,a||(Fd(t,e.slice(n,c)),n=c);continue}if(a)continue;if(/^\s*\|.*\|\s*$/.test(f)||/^\s*:?-{3,}:?\s*(\|\s*:?-{3,}:?\s*)+\|?\s*$/.test(f)){l=!0;continue}l&&(Fd(t,e.slice(n,m)),n=m,l=!1),h===""&&(Fd(t,e.slice(n,c)),n=c)}return n<e.length&&Fd(t,e.slice(n)),t}function Fd(e,t){t.trim()&&e.push(t)}function QM(e){const t=e.lastIndexOf(`
|
|
381
|
-
`);if(t<0)return 0;const n=[0];for(let l=0;l<e.length;l+=1)e[l]===`
|
|
382
|
-
`&&l+1<e.length&&n.push(l+1);let a=-1;for(const l of n){const u=e.indexOf(`
|
|
383
|
-
`,l),c=e.slice(l,u===-1?e.length:u);/^\s*(```|~~~)/.test(c)&&(a=a===-1?l:-1)}return a>=0?a:t+1}function JM({artifact:e,onPreview:t,onCopyUrl:n,copied:a}){return e?s.jsxs("figure",{className:"artifact-preview",children:[s.jsx("button",{className:"artifact-preview-media",onClick:()=>t(e),type:"button",children:s.jsx("img",{alt:e.name,src:e.url})}),s.jsxs("figcaption",{children:[s.jsx("span",{children:e.name}),s.jsxs("div",{className:"artifact-preview-actions",children:[s.jsx("button",{onClick:()=>t(e),type:"button",children:"Preview"}),s.jsx("a",{href:e.url,rel:"noreferrer",target:"_blank",children:"Open"}),s.jsx("button",{onClick:()=>n(e),type:"button",children:a?"Copied":"Copy"})]})]})]}):null}function eD(e,t){const n=new Map;for(const a of tD(e)){const l=P6(a);if(l){const u=G6(l).toLowerCase(),c=n.get(u);(!c||aD(l,c))&&n.set(u,l)}}return Array.from(n.values()).map(a=>nD(a,t)).filter(a=>a!==null)}function tD(e){const t=[],n=/!\[[^\]]*]\(([^)]+)\)/g,a=/\[[^\]]+]\(([^)]+)\)/g,l=/(?:artifact|preview|image|file)\s*:\s*(`?[^`\n]+?\.(?:svg|png|jpe?g|webp|gif)`?)/gim;for(const u of[n,a,l]){let c;for(;(c=u.exec(e))!==null;)t.push(c[1])}return t}function nD(e,t){const n=P6(e);if(!n||!rD(n))return null;const a=w6(n,t.workspacePath);return{id:`${t.id}:${a}`,path:a,name:G6(a),url:Ne(`conversations/${t.id}/files?path=${encodeURIComponent(a)}`)}}function P6(e){const t=e.trim().replace(/^`+|`+$/g,"").replace(/[),.;:,。;:]+$/g,"");return t||null}function rD(e){return/\.(?:svg|png|jpe?g|webp|gif)$/i.test(e)}function G6(e){return e.replace(/\\/g,"/").split("/").filter(Boolean).pop()??e}function aD(e,t){return e.startsWith("/")&&!t.startsWith("/")?!0:e.length>t.length}function a0(e){return e.trim()}function V6(e){return e.trim()}function T3(e){return e instanceof DOMException&&e.name==="AbortError"||e instanceof Error&&e.name==="AbortError"}function iD(e){return{a({children:t,href:n}){if(!n)return s.jsx(s.Fragment,{children:t});const a=/^[a-z][a-z\d+.-]*:/i.test(n),l=b6(n);if(n.startsWith("seele-public:")&&!l)return s.jsxs("span",{title:"无效的 Seele Public URL 地址",children:[t,"(地址格式无效)"]});const u=!a&&e?lD(n,e):null,c=l?Ne(`deployment/public-link?path=${encodeURIComponent(l)}`):u??n,f=a||!!u;return s.jsx("a",{className:"markdown-link",href:c,rel:f?"noreferrer":void 0,target:f?"_blank":void 0,children:t})},img(){return null},pre({children:t}){const n=oD(t);return n?ng(n.language)==="mermaid"?s.jsx(uD,{code:n.code}):s.jsx(fD,{code:n.code,language:n.language}):s.jsx("pre",{children:t})},table({children:t}){return s.jsx("div",{className:"markdown-table-wrap",children:s.jsx("table",{className:"markdown-table",children:t})})},td({align:t,children:n}){return s.jsx("td",{style:A3(t),children:n})},th({align:t,children:n}){return s.jsx("th",{style:A3(t),children:n})}}}function lD(e,t){if(!e||e.startsWith("#")||e.startsWith("/api/")||e.startsWith("?"))return null;const n=XE(e,t.workspacePath);if(!n)return null;const a=n.line?`#L${n.line}${n.column?`C${n.column}`:""}`:"";return`${Ne(`conversations/${t.id}/files?path=${encodeURIComponent(n.path)}`)}${a}`}function A3(e){return e&&e!=="char"?{textAlign:e}:void 0}function es(e,t){const n=xA(sD(e));return s.jsx(iS,{urlTransform:a=>b6(a)?a:zx(a),components:iD(t),remarkPlugins:[gC,vA],rehypePlugins:[[ZA,{trust:!1,strict:"ignore"}]],skipHtml:!0,children:n})}function sD(e){return e.replace(/([^\n])(```[^\n`]*(?:\r?\n|$))/g,`$1
|
|
384
|
-
$2`)}function oD(e){var u;const t=A.Children.toArray(e),n=t.length===1&&A.isValidElement(t[0])?t[0]:null;if(!n||n.type!=="code")return null;const l=((u=(n.props.className??"").match(/(?:^|\s)language-([^\s]+)/))==null?void 0:u[1])??"";return{code:o1(n.props.children).replace(/\n$/,""),language:l}}function o1(e){return e==null||typeof e=="boolean"?"":typeof e=="string"||typeof e=="number"||typeof e=="bigint"?String(e):Array.isArray(e)?e.map(o1).join(""):A.isValidElement(e)?o1(e.props.children):""}const Y6="github-light",gp=new Map,yp=new Map;let vp=null,xp=null;const W6=new Set(["bash","css","diff","dockerfile","html","java","javascript","json","jsonc","jsx","markdown","python","shellscript","sql","toml","tsx","typescript","xml","yaml"]);function ng(e){const t=e.trim().toLowerCase().replace(/^\./,"");return{bash:"bash",cjs:"javascript",console:"shellscript",htm:"html",js:"javascript",jsx:"jsx",md:"markdown",mjs:"javascript",py:"python",rb:"ruby",shell:"bash",ts:"typescript",tsx:"tsx",yml:"yaml",zsh:"bash"}[t]??t}function K6(e){const t=ng(e);return!t||t==="text"||t==="txt"?"text":W6.has(t)?t:"text"}function uD({code:e}){const n=`seele-mermaid-${A.useId().replace(/[^a-zA-Z0-9_-]/g,"")}`,[a,l]=A.useState(!1),[u,c]=A.useState(()=>yp.get(e)??null),[f,h]=A.useState(null);A.useEffect(()=>{let p=!1,y;const k=yp.get(e);return k?(c(k),h(null),()=>{p=!0}):(h(null),c(null),cD(n,e).then(x=>{p||(y!==void 0&&window.clearTimeout(y),yp.set(e,x),c(x),h(null))},x=>{if(!p){const C=x instanceof Error?x.message:String(x);y=window.setTimeout(()=>{p||h(C)},iN)}}),()=>{p=!0,y!==void 0&&window.clearTimeout(y)})},[e,n]);async function m(){await navigator.clipboard.writeText(e),l(!0),window.setTimeout(()=>l(!1),1200)}return s.jsxs("figure",{className:`mermaid-block${f?" error":""}`,children:[s.jsx("span",{className:"code-block-kind",children:"mermaid"}),s.jsx("div",{className:"code-block-tools",children:s.jsx("button",{"aria-label":a?"Copied Mermaid source":"Copy Mermaid source",className:a?"copied":"",onClick:()=>void m(),title:a?"Copied":"Copy",type:"button",children:s.jsx(rg,{})})}),u?s.jsx("div",{className:"mermaid-diagram",dangerouslySetInnerHTML:{__html:u}}):f?s.jsxs("div",{className:"mermaid-error",children:[s.jsx("strong",{children:"Mermaid render failed"}),s.jsx("pre",{children:f}),s.jsx("code",{children:e})]}):s.jsx("div",{className:"mermaid-loading",children:"Rendering diagram..."})]})}async function cD(e,t){return(await(await dD()).render(e,t)).svg}function dD(){return xp||(xp=ln(()=>import("./mermaid.core-u6kdiNZf.js").then(e=>e.bp),[],import.meta.url).then(e=>{const t=e.default;return t.initialize({startOnLoad:!1,securityLevel:"strict",theme:"base",themeVariables:{background:"#ffffff",primaryColor:"#f9fafa",primaryBorderColor:"#d8d9e8",primaryTextColor:"#0b0f16",lineColor:"#7a8294",secondaryColor:"#f5f5fb",tertiaryColor:"#ffffff",fontFamily:'Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif'}}),t})),xp}function fD({code:e,language:t,reserveHeight:n=!1}){const[a,l]=A.useState(!1),[u,c]=A.useState(()=>{if(!M3(t))return null;const m=N3(e,t);return gp.get(m)??null}),f=n?{"--code-block-min-height":`${pN(e)}px`}:void 0;A.useEffect(()=>{let m=!1;if(!M3(t))return c(null),()=>{m=!0};const p=N3(e,t),y=gp.get(p);return y?(c(y),()=>{m=!0}):(c(null),xD(e,t).then(k=>{gp.set(p,k),m||c(k)}).catch(k=>{console.warn("Failed to highlight code block",k),m||c(null)}),()=>{m=!0})},[e,t]);async function h(){await navigator.clipboard.writeText(e),l(!0),window.setTimeout(()=>l(!1),1200)}return s.jsxs("figure",{className:"code-block",style:f,children:[t?s.jsx("span",{className:"code-block-kind",children:t}):null,s.jsx("div",{className:"code-block-tools",children:s.jsx("button",{"aria-label":a?"Copied code block":"Copy code block",className:a?"copied":"",onClick:()=>void h(),title:a?"Copied":"Copy",type:"button",children:s.jsx(rg,{})})}),u?s.jsx("div",{className:"code-block-shiki",dangerouslySetInnerHTML:{__html:u}}):s.jsx("pre",{children:s.jsx("code",{children:e})})]})}function rg(){return s.jsxs("svg",{"aria-hidden":"true",fill:"none",height:"13",viewBox:"0 0 24 24",width:"13",children:[s.jsx("rect",{height:"14",rx:"2",stroke:"currentColor",strokeWidth:"2",width:"14",x:"8",y:"8"}),s.jsx("path",{d:"M4 16V6a2 2 0 0 1 2-2h10",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2"})]})}function X6(){return s.jsxs("svg",{"aria-hidden":"true",fill:"none",height:"16",viewBox:"0 0 24 24",width:"16",children:[s.jsx("circle",{cx:"6",cy:"5",r:"2",stroke:"currentColor",strokeWidth:"2"}),s.jsx("circle",{cx:"18",cy:"5",r:"2",stroke:"currentColor",strokeWidth:"2"}),s.jsx("circle",{cx:"12",cy:"19",r:"2",stroke:"currentColor",strokeWidth:"2"}),s.jsx("path",{d:"M6 7v1a6 6 0 0 0 6 6v3M18 7v1a6 6 0 0 1-6 6",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})]})}function ag(){return s.jsxs("svg",{"aria-hidden":"true",fill:"none",height:"12",viewBox:"0 0 24 24",width:"12",children:[s.jsx("circle",{cx:"12",cy:"12",r:"9",stroke:"currentColor",strokeWidth:"2.2"}),s.jsx("path",{d:"M12 7v6",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2.4"}),s.jsx("circle",{cx:"12",cy:"17",fill:"currentColor",r:"1.25"})]})}function hD(){return s.jsx("svg",{"aria-hidden":"true",fill:"none",height:"18",viewBox:"0 0 24 24",width:"18",children:s.jsx("path",{d:"M4 7h16M4 12h16M4 17h16",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2"})})}function mD(){return s.jsxs("svg",{"aria-hidden":"true",fill:"none",height:"14",viewBox:"0 0 24 24",width:"14",children:[s.jsx("path",{d:"M7 7h10M7 12h10M7 17h10",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2"}),s.jsx("circle",{cx:"4",cy:"7",fill:"currentColor",r:"1.4"}),s.jsx("circle",{cx:"4",cy:"12",fill:"currentColor",r:"1.4"}),s.jsx("circle",{cx:"4",cy:"17",fill:"currentColor",r:"1.4"})]})}function E3(){return s.jsxs("svg",{"aria-hidden":"true",fill:"none",height:"14",viewBox:"0 0 24 24",width:"14",children:[s.jsx("circle",{cx:"12",cy:"12",r:"3",stroke:"currentColor",strokeWidth:"2"}),s.jsx("path",{d:"M19 12a7.8 7.8 0 0 0-.1-1l2-1.5-2-3.4-2.4 1a8 8 0 0 0-1.8-1l-.3-2.6h-4l-.3 2.6a8 8 0 0 0-1.8 1l-2.4-1-2 3.4 2 1.5a7.8 7.8 0 0 0 0 2l-2 1.5 2 3.4 2.4-1a8 8 0 0 0 1.8 1l.3 2.6h4l.3-2.6a8 8 0 0 0 1.8-1l2.4 1 2-3.4-2-1.5c.1-.3.1-.7.1-1Z",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.7"})]})}function pD(){return s.jsxs("svg",{"aria-hidden":"true",fill:"none",height:"14",viewBox:"0 0 24 24",width:"14",children:[s.jsx("rect",{height:"16",rx:"2.6",stroke:"currentColor",strokeWidth:"1.8",width:"18",x:"3",y:"4"}),s.jsx("path",{d:"m7 9 3 3-3 3M12.5 15h4.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.9"})]})}function ef(){return s.jsxs("svg",{"aria-hidden":"true",fill:"none",height:"17",viewBox:"0 0 24 24",width:"17",children:[s.jsx("circle",{cx:"7",cy:"12",r:"2.4",stroke:"currentColor",strokeWidth:"1.8"}),s.jsx("circle",{cx:"17",cy:"7",r:"2.4",stroke:"currentColor",strokeWidth:"1.8"}),s.jsx("circle",{cx:"17",cy:"17",r:"2.4",stroke:"currentColor",strokeWidth:"1.8"}),s.jsx("path",{d:"m9.2 10.9 5.6-2.8M9.2 13.1l5.6 2.8",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.8"})]})}function Hf(){return s.jsxs("svg",{"aria-hidden":"true",fill:"none",height:"13",viewBox:"0 0 24 24",width:"13",children:[s.jsx("path",{d:"m4 16-.8 4 4-.8L18.4 8 15.2 4.8 4 16Z",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"2"}),s.jsx("path",{d:"m13.8 6.2 3.2 3.2",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2"})]})}function gD(){return s.jsx("svg",{"aria-hidden":"true",fill:"none",height:"14",viewBox:"0 0 24 24",width:"14",children:s.jsx("path",{d:"M5 8v11h14V8M4 4h16v4H4zM9 12h6",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})})}function yD(){return s.jsxs("svg",{"aria-hidden":"true",fill:"none",height:"14",viewBox:"0 0 24 24",width:"14",children:[s.jsx("path",{d:"M2.5 12s3.5-6 9.5-6 9.5 6 9.5 6-3.5 6-9.5 6-9.5-6-9.5-6Z",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"2"}),s.jsx("circle",{cx:"12",cy:"12",r:"3",stroke:"currentColor",strokeWidth:"2"})]})}function vD(){return s.jsxs("svg",{"aria-hidden":"true",fill:"none",height:"14",viewBox:"0 0 24 24",width:"14",children:[s.jsx("path",{d:"M3 3l18 18",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2"}),s.jsx("path",{d:"M9.9 5.4A9.8 9.8 0 0 1 12 5c6 0 9.5 7 9.5 7a15.5 15.5 0 0 1-3 3.8M6.2 6.8C3.8 8.4 2.5 12 2.5 12s3.5 7 9.5 7a9.7 9.7 0 0 0 4-.8",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})]})}function N3(e,t){return`${Y6}:${K6(t)}:${e}`}function M3(e){const t=ng(e);return!!t&&W6.has(t)}async function xD(e,t){return(await bD()).codeToHtml(e,{lang:K6(t),theme:Y6})}function bD(){return vp||(vp=wD()),vp}async function wD(){const[{createHighlighterCore:e},{createJavaScriptRegexEngine:t},{default:n},{default:a},{default:l},{default:u},{default:c},{default:f},{default:h},{default:m},{default:p},{default:y},{default:k},{default:x},{default:C},{default:M},{default:I},{default:_},{default:N},{default:q},{default:R},{default:X}]=await Promise.all([ln(()=>import("./core-zwIxNY4N.js"),[],import.meta.url),ln(()=>import("./engine-javascript-DBd1bXLz.js"),[],import.meta.url),ln(()=>import("./github-light-DAi9KRSo.js"),[],import.meta.url),ln(()=>import("./bash-BELqPA7S.js").then(P=>P.b),[],import.meta.url),ln(()=>import("./css-CLj8gQPS.js"),[],import.meta.url),ln(()=>import("./diff-D97Zzqfu.js"),[],import.meta.url),ln(()=>import("./dockerfile-BcOcwvcX.js"),[],import.meta.url),ln(()=>import("./html-pp8916En.js"),__vite__mapDeps([0,1,2]),import.meta.url),ln(()=>import("./java-CylS5w8V.js"),[],import.meta.url),ln(()=>import("./javascript-wDzz0qaB.js"),[],import.meta.url),ln(()=>import("./json-Cp-IABpG.js"),[],import.meta.url),ln(()=>import("./jsonc-Des-eS-w.js"),[],import.meta.url),ln(()=>import("./jsx-g9-lgVsj.js"),[],import.meta.url),ln(()=>import("./markdown-Cvjx9yec.js"),[],import.meta.url),ln(()=>import("./python-B6aJPvgy.js"),[],import.meta.url),ln(()=>import("./bash-BELqPA7S.js").then(P=>P.s),[],import.meta.url),ln(()=>import("./sql-CRqJ_cUM.js"),[],import.meta.url),ln(()=>import("./toml-vGWfd6FD.js"),[],import.meta.url),ln(()=>import("./tsx-COt5Ahok.js"),[],import.meta.url),ln(()=>import("./typescript-BPQ3VLAy.js"),[],import.meta.url),ln(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([3,4]),import.meta.url),ln(()=>import("./yaml-Buea-lGh.js"),[],import.meta.url)]);return e({engine:t(),themes:[n],langs:[a,l,u,c,f,h,m,p,y,k,x,C,M,I,_,N,q,R,X]})}async function D3(){const e=Ne("conversations"),t=await fetch(e);return await Ve(t,{url:e}),(await t.json()).conversations}async function kD(){const e=Ne("workspace-states"),t=await fetch(e);return await Ve(t,{url:e}),(await t.json()).workspaces}async function z3(){const e=Ne("collaboration/topics"),t=await fetch(e);return await Ve(t,{url:e}),(await t.json()).topics}async function Pd(e){const t=Ne(`collaboration/topics/${e}/messages?limit=100`),n=await fetch(t);return await Ve(n,{url:t}),(await n.json()).messages}async function SD(e){const t=Ne("collaboration/topics"),n=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return await Ve(n,{method:"POST",url:t}),(await n.json()).topic}async function jD(e,t){const n=Ne(`collaboration/topics/${e}`),a=await fetch(n,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return await Ve(a,{method:"PATCH",url:n}),(await a.json()).topic}async function CD(e,t){const n=Ne(`collaboration/topics/${e}/archive`),a=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({expectedVersion:t})});return await Ve(a,{method:"POST",url:n}),(await a.json()).topic}async function TD(e){const t=Ne(`conversations/${e}/read`),n=await fetch(t,{method:"POST"});await Ve(n,{method:"POST",url:t})}async function R3(){const e=Ne("workspace-groups"),t=await fetch(e);return await Ve(t,{url:e}),(await t.json()).groups}async function AD(e){const t=Ne("workspace-groups"),n=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:e})});return await Ve(n,{method:"POST",url:t}),(await n.json()).group}async function ED(e,t){const n=Ne(`workspace-groups/${e}`),a=await fetch(n,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return await Ve(a,{method:"PATCH",url:n}),(await a.json()).group}async function ND(e){const t=Ne(`workspace-groups/${e}`),n=await fetch(t,{method:"DELETE"});return await Ve(n,{method:"DELETE",url:t}),await n.json()}async function MD(){const e=Ne("settings/environment"),t=await fetch(e);return await Ve(t,{url:e}),(await t.json()).variables}async function DD(e){const t=Ne(`conversations/${e}/settings/environment`),n=await fetch(t);return await Ve(n,{url:t}),(await n.json()).variables}async function zD(e){const t=Ne(`conversations/${e}/knowledge`),n=await fetch(t);return await Ve(n,{url:t}),(await n.json()).items}async function RD(){const e=Ne("settings/model-providers"),t=await fetch(e);return await Ve(t,{url:e}),t.json()}async function OD(){const e=Ne("settings/model-providers/options"),t=await fetch(e);return await Ve(t,{url:e}),t.json()}async function ID(e){const t=Ne(`settings/model-providers/${encodeURIComponent(e)}/balance`),n=await fetch(t);return await Ve(n,{url:t}),n.json()}async function _D(e){const t=Ne("settings/model-providers"),n=await fetch(t,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return await Ve(n,{url:t,method:"PUT"}),n.json()}async function LD(){const e=Ne("settings/runtime"),t=await fetch(e);return await Ve(t,{url:e}),(await t.json()).settings}async function BD(){const e=Ne("settings/deployment"),t=await fetch(e);return await Ve(t,{url:e}),(await t.json()).settings}async function qD(){const e=Ne("diagnostics"),t=await fetch(e);return await Ve(t,{url:e}),await t.json()}async function UD(){const e=Ne("settings/runtime/codex"),t=await fetch(e);return await Ve(t,{url:e}),await t.json()}async function tf(){const e=Ne("settings/runtime/accounts"),t=await fetch(e);await Ve(t,{url:e});const n=await t.json();return to(),n}async function O3(e=!1){const t=Ne(`settings/runtime/accounts/refresh${e?"?force=1":""}`),n=await fetch(t,{method:"POST"});await Ve(n,{method:"POST",url:t});const a=await n.json();return to(),a}async function HD(e){const t=Ne("settings/runtime/accounts"),n=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e})});await Ve(n,{method:"POST",url:t});const a=await n.json();return a.login.status==="succeeded"&&to(),a.login}async function $D(e){const t=Ne(`settings/runtime/accounts/login/${e}`),n=await fetch(t);return await Ve(n,{url:t}),(await n.json()).login}async function FD(e){const t=Ne(`settings/runtime/accounts/login/${e}/cancel`),n=await fetch(t,{method:"POST"});return await Ve(n,{method:"POST",url:t}),(await n.json()).login}async function PD(e,t,n){const a=Ne(`settings/runtime/accounts/${e}`),l=await fetch(a,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:t,renewalDay:n})});await Ve(l,{method:"PATCH",url:a});const u=await l.json();return to(),u.account}async function GD(e){const t=Ne(`settings/runtime/accounts/${e}`),n=await fetch(t,{method:"DELETE"});await Ve(n,{method:"DELETE",url:t}),to()}async function VD(e){const t=Ne(`settings/runtime/accounts/${e}/switch`),n=await fetch(t,{method:"POST"});await Ve(n,{method:"POST",url:t});const a=await n.json();return to(),a}async function YD(e=!0){const t=Ne(`settings/runtime/models?refresh=${e?"1":"0"}`),n=await fetch(t);return await Ve(n,{url:t}),await n.json()}async function WD(e=!1){const t=Ne(`settings/runtime/codex/update${e?"?refreshLatest=1":""}`),n=await fetch(t);return await Ve(n,{url:t}),await n.json()}async function KD(){const e=Ne("settings/runtime/codex/update"),t=await fetch(e,{method:"POST"});return await Ve(t,{method:"POST",url:e}),(await t.json()).job}async function XD(e){const t=Ne(`conversations/${e}/settings/runtime`),n=await fetch(t);return await Ve(n,{url:t}),(await n.json()).settings}async function ZD(){const e=Ne("settings/memory"),t=await fetch(e);return await Ve(t,{url:e}),await t.json()}async function QD(e){const t=Ne("settings/runtime"),n=await fetch(t,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return await Ve(n,{method:"PUT",url:t}),(await n.json()).settings}async function JD(e){const t=Ne("settings/deployment"),n=await fetch(t,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return await Ve(n,{method:"PUT",url:t}),(await n.json()).settings}async function I3(e,t){const n=Ne(`conversations/${e}/settings/runtime`),a=await fetch(n,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return await Ve(a,{method:"PUT",url:n}),await a.json()}async function _3(e,t){const n=Ne(`conversations/${e}/runtime/reset`),a=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return await Ve(a,{method:"POST",url:n}),(await a.json()).job}async function L3(e){const t=Ne(`conversations/${e}/runtime/reset-preview`),n=await fetch(t);return await Ve(n,{url:t}),await n.json()}async function ez(e,t){const n=Ne(`conversations/${e}/runtime/reset-selection`),a=await fetch(n,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});await Ve(a,{method:"PUT",url:n})}async function tz(e){const t=Ne(`conversations/${e}/runtime/thread-read`),n=await fetch(t);return await Ve(n,{url:t}),(await n.json()).result}async function nz(e){const t=Ne(`conversations/${e}/runtime/token-usage`),n=await fetch(t);await Ve(n,{url:t});const a=await n.json();return a.event?ub(a.event):null}async function rz(e){const t=Ne(`conversations/${e}/runtime/additional-context`),n=await fetch(t);return await Ve(n,{url:t}),await n.json()}async function az(e){const t=Ne(`conversations/${e}/runtime/compactions`),n=await fetch(t);return await Ve(n,{url:t}),(await n.json()).compactions}function iz(e,t,n){return{modelSource:m6(e.modelSource,t.modelSource)&&(n==null?void 0:n.sources.modelSource)!=="workspace"?null:e.modelSource??{type:"codex"},model:e.model===t.model?null:e.model,reasoningEffort:OE(e.reasoningEffort,t.reasoningEffort,(n==null?void 0:n.sources.reasoningEffort)==="workspace"),fastMode:e.fastMode===t.fastMode?null:e.fastMode,sandbox:e.sandbox===t.sandbox?null:e.sandbox}}function lz(e){return{kind:e.kind,name:e.name,description:e.description,purpose:e.purpose,attention:e.attention,refreshPolicy:e.refreshPolicy,status:e.status,sourceClues:oz(e.sourceCluesText),requiredEnv:uz(e.requiredEnvText)}}function sz(e){return{id:e.id,kind:e.kind,name:e.name,description:e.description,purpose:e.purpose,attention:e.attention,refreshPolicy:e.refreshPolicy,status:e.status,sourceCluesText:e.sourceClues.map(t=>`${t.type}: ${t.value}`).join(`
|
|
385
|
-
`),requiredEnvText:e.fetch.requiredEnv.map(t=>t.description?`${t.key} - ${t.description}`:t.key).join(`
|
|
386
|
-
`)}}function oz(e){const t=new Date().toISOString();return e.split(/\r?\n/).map(n=>n.trim()).filter(Boolean).map(n=>{const a=n.match(/^([a-zA-Z][\w-]{0,31})\s*:\s*(.+)$/);return{type:a?a[1].toLowerCase():"text",value:a?a[2].trim():n,providedBy:"user",providedAt:t}})}function uz(e){return e.split(/\r?\n/).map(t=>t.trim()).filter(Boolean).map(t=>{const[n,...a]=t.split(/\s+-\s+/);return{key:n.trim().toUpperCase(),description:a.join(" - ").trim()}}).filter(t=>/^[A-Z_][A-Z0-9_]*$/.test(t.key))}function B3(e,t){const n=q3(t.attention)-q3(e.attention);return n!==0?n:t.updatedAt.localeCompare(e.updatedAt)}function q3(e){return e==="watch"?2:e==="tracked"?1:0}function Kc(e){return e.map(t=>({key:t.key??"",value:t.value??"",updatedAt:t.updatedAt}))}function cz(e){return e?/^[a-z_][a-z0-9_.-]*$/.test(e)?null:"Key must start with a lowercase English letter or underscore, and may contain lowercase letters, numbers, dots, underscores, and hyphens.":"Key is required."}function dz(e){return Kc(e).filter(t=>t.key.trim()&&t.value.trim()).map(t=>`${t.key.trim()}: ${t.value.trim()}`).join(`
|
|
387
|
-
`)}async function fz(e){const t=Ne("settings/memory"),n=await fetch(t,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return await Ve(n,{method:"PUT",url:t}),await n.json()}async function hz(e,t,n){const a=Ne("settings/environment"),l=await fetch(a,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({description:n,key:e,value:t})});return await Ve(l,{method:"PUT",url:a}),(await l.json()).variable}async function mz(e,t,n,a){const l=Ne(`conversations/${e}/settings/environment`),u=await fetch(l,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({description:a,key:t,value:n})});return await Ve(u,{method:"PUT",url:l}),await u.json()}async function pz(e){const t=Ne(`settings/environment/${encodeURIComponent(e)}/reveal`),n=await fetch(t);return await Ve(n,{url:t}),(await n.json()).variable.value}async function gz(e,t){const n=Ne(`conversations/${e}/settings/environment/${encodeURIComponent(t)}/reveal`),a=await fetch(n);return await Ve(a,{url:n}),(await a.json()).variable.value}async function yz(e){const t=Ne(`settings/environment/${encodeURIComponent(e)}`),n=await fetch(t,{method:"DELETE"});await Ve(n,{method:"DELETE",url:t})}async function vz(e,t){const n=Ne(`conversations/${e}/settings/environment/${encodeURIComponent(t)}`),a=await fetch(n,{method:"DELETE"});return await Ve(a,{method:"DELETE",url:n}),(await a.json()).conversation}async function xz(e,t){const n=Ne(`conversations/${e}/knowledge`),a=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return await Ve(a,{method:"POST",url:n}),(await a.json()).item}async function bz(e,t,n){const a=Ne(`conversations/${e}/knowledge/${encodeURIComponent(t)}`),l=await fetch(a,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});return await Ve(l,{method:"PATCH",url:a}),(await l.json()).item}async function wz(e,t){const n=Ne(`conversations/${e}/knowledge/${encodeURIComponent(t)}`),a=await fetch(n,{method:"DELETE"});await Ve(a,{method:"DELETE",url:n})}async function kz(){const e=Ne("meta"),t=await fetch(e);return await Ve(t,{url:e}),await t.json()}async function Sz(){const e=Ne("settings/runtime/rate-limits"),t=await fetch(e);return await Ve(t,{url:e}),(await t.json()).usage??null}async function jz(e,t){const n=Ne("conversations"),a=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:e,groupId:t})});return await Ve(a,{method:"POST",url:n}),(await a.json()).conversation}function Cz(){if(typeof crypto.randomUUID=="function")return crypto.randomUUID();const e=crypto.getRandomValues(new Uint8Array(16));e[6]=e[6]&15|64,e[8]=e[8]&63|128;const t=Array.from(e,n=>n.toString(16).padStart(2,"0")).join("");return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`}async function Tz(e,t,n,a,l){const u=Ne(`conversations/${e}/clone`),c=await fetch(u,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:t,groupId:n,excludeTopicHistory:a,requestId:l})});return await Ve(c,{method:"POST",url:u}),await c.json()}async function Az(e){const t=Ne(`conversations/${e}/clone/retry`),n=await fetch(t,{method:"POST"});return await Ve(n,{method:"POST",url:t}),await n.json()}async function Xc(e,t={}){const n=new URLSearchParams;n.set("limit",String(t.limit??k6)),t.before&&n.set("before",t.before);const a=Ne(`conversations/${e}?${n}`),l=await fetch(a);return await Ve(l,{url:a}),(await l.json()).conversation}async function Z6(e,t){const n=Ne(`conversations/${e}/turns/${t}/history-events`),a=await fetch(n);return await Ve(a,{url:n}),(await a.json()).events}async function Gd(e,t){const n=Ne(`conversations/${e}`),a=await fetch(n,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return await Ve(a,{method:"PATCH",url:n}),(await a.json()).conversation}async function Ez(e){const t=Ne(`conversations/${e}`),n=await fetch(t,{method:"DELETE"});await Ve(n,{method:"DELETE",url:t})}function Nz(e){return e.title==="Phase boundary recommended"||e.title==="Long run in progress"}function Q6(e){return e.length<=3?e.join(", "):`${e.slice(0,3).join(", ")} +${e.length-3}`}function Mz(e,t){if(e.event==="server.error"||e.event==="client.error")return{id:e.id,kind:"error",title:"Error",body:Wz(e.data),createdAt:e.createdAt??new Date().toISOString()};if(e.event==="server.collaboration.message_staged"||e.event==="server.collaboration.message_sent"||e.event==="server.collaboration.message_rejected"){const u=Fe(e.data),c=et(u.toolCallId),f=typeof u.controlIndex=="number"?u.controlIndex:null;if(c||f!==null){const h=e.event==="server.collaboration.message_staged",m=e.event==="server.collaboration.message_sent",p=et(u.audience),y=et(u.recipientWorkspaceId),k=y?[y]:Array.isArray(u.recipientWorkspaceIds)?u.recipientWorkspaceIds.filter(I=>typeof I=="string"):Array.isArray(u.recipients)?u.recipients.filter(I=>typeof I=="string"):[],x=k.filter(I=>I!=="ALL").map(I=>t.get(I)).filter(I=>!!I);let C="Topic";x.length>0?C=Q6(x):k.length===1?C=k[0]==="ALL"?"Topic participants":ns(k[0]):k.length>1?C=`${k.length} workspaces`:p==="public"||p==="all"?C="Topic participants":p==="owner"&&(C="Topic owner");const M=et(u.topicId);return{id:e.id,kind:"collaboration",title:`Send to ${C}`,body:M?`Topic ${ns(M)}`:"Topic",createdAt:e.createdAt??new Date().toISOString(),itemId:c||`legacy-topic-message:${f}`,meta:h?"pending send":m?"done":"failed",output:h||m?et(u.contentMarkdown)||void 0:et(u.reason)||void 0,topicAction:"send",topicRecipientLabel:C,topicMessageContent:(h||m)&&et(u.contentMarkdown)||void 0}}}if(e.event==="codex.input_request"||e.event==="codex.input_or_approval_request"){const u=Fe(e.data);if(e.event==="codex.input_request"||u.method==="item/tool/requestUserInput"){const c=Fe(u.params),h=(Array.isArray(c.questions)?c.questions:[]).map(m=>{const p=Fe(m),y=typeof p.question=="string"?p.question:"Please provide the missing information.",k=Array.isArray(p.options)?p.options.map(x=>{const C=Fe(x);return typeof C.label=="string"?`- ${C.label}${typeof C.description=="string"?`: ${C.description}`:""}`:""}).filter(Boolean).join(`
|
|
388
|
-
`):"";return k?`${y}
|
|
389
|
-
|
|
390
|
-
${k}`:y}).join(`
|
|
391
|
-
|
|
392
|
-
`);return{id:e.id,kind:"activity",title:"Seele needs input",body:h||"Please answer in the main input box to continue.",createdAt:e.createdAt??new Date().toISOString(),meta:"waiting for reply"}}}if(e.event==="server.agent_action.staged"){const u=Fe(e.data);if(et(u.actionType)==="seele_workspace_change"){const f=Fe(u.payload),h=Fe(f.payload),m=et(f.type)||"workspace";return{id:e.id,kind:"workspaceChange",title:"Preparing workspace change",body:ab(m,h),createdAt:e.createdAt??new Date().toISOString(),itemId:et(u.toolCallId)||void 0,meta:"pending turn",workspaceChangeType:m,workspaceChangePayload:h}}const c=TE(u);return{id:e.id,kind:"activity",title:c.title,body:c.detail,createdAt:e.createdAt??new Date().toISOString(),itemId:et(u.toolCallId)||void 0,meta:c.meta}}if(e.event==="server.workspace_inbox.offered"){const u=CE(e.data);return{id:e.id,kind:"activity",title:u.title,body:u.detail,createdAt:e.createdAt??new Date().toISOString(),meta:u.meta}}if(e.event==="codex.dynamic_tool_request"){const u=Fe(e.data),c=Fe(u.params),f=et(c.tool)||"dynamic tool",h=Fe(c.arguments);return{id:e.id,kind:f==="seele_topics"?"collaboration":f==="seele_workspace_change"?"workspaceChange":"activity",title:nb(f,!1,h),body:rb(f,h),createdAt:e.createdAt??new Date().toISOString(),itemId:et(c.callId)||void 0,meta:"running",topicAction:f==="seele_topics"?J6(h.action):void 0,workspaceChangeType:f==="seele_workspace_change"&&et(h.type)||void 0,workspaceChangePayload:f==="seele_workspace_change"?Fe(h.payload):void 0}}if(e.event==="server.workspace_change.proposed"||e.event==="server.responsibility.proposed"){const u=Fe(e.data),c=Fe(u.payload),f=et(c.content)||et(u.responsibility);return{id:e.id,kind:"workspaceChange",title:"Workspace change proposed",body:f,createdAt:e.createdAt??new Date().toISOString(),itemId:et(u.toolCallId)||void 0,meta:"pending",responsibilityProposalId:String(e.id),workspaceChangeProposalId:String(e.id),responsibilityReason:typeof u.reason=="string"?u.reason:void 0,responsibilityAnchorOffset:typeof u.anchorOffset=="number"?u.anchorOffset:void 0,workspaceChangeType:et(u.changeType)||"responsibility",workspaceChangePayload:Object.keys(c).length>0?c:{content:f}}}if(e.event==="server.knowledge.proposed"){const u=Fe(e.data),c=Fe(u.knowledge);return{id:e.id,kind:"knowledge",title:u.action==="update"?"Knowledge update proposed":"Knowledge creation proposed",body:JSON.stringify(c,null,2),createdAt:e.createdAt??new Date().toISOString(),meta:"pending",knowledgeProposalId:String(e.id),knowledgeAnchorOffset:typeof u.anchorOffset=="number"?u.anchorOffset:void 0}}if(e.event==="runtime.command.started"||e.event==="runtime.command.completed"){const u=Fe(e.data),c=e.event==="runtime.command.completed",f=typeof u.exitCode=="number"?u.exitCode:null;return{id:e.id,kind:"command",title:c?f!==null&&f!==0?"Command failed":"Command completed":"Seele ran command",body:typeof u.command=="string"?nf(u.command):"command",createdAt:e.createdAt??new Date().toISOString(),itemId:typeof u.itemId=="string"?u.itemId:void 0,meta:c?f!==null?`exit ${f}`:"done":"running",output:c&&typeof u.output=="string"&&u.output?u.output:void 0}}if(e.event==="runtime.compaction.started"||e.event==="runtime.compaction.completed"){const u=Fe(e.data),c=e.event==="runtime.compaction.completed";return{id:e.id,kind:"activity",title:c?"Context compacted":"Compacting context",body:u1(u,c),createdAt:e.createdAt??new Date().toISOString(),itemId:typeof u.itemId=="string"?u.itemId:void 0,meta:c?"done":"running"}}if(e.event==="codex.server_request"){const u=Fe(e.data);if(u.method==="item/commandExecution/requestApproval"){const c=Yz(u.requestId),f=Fe(u.params),h=typeof f.command=="string"?f.command:"command";return{id:e.id,kind:"command",title:"Command waiting for approval",body:h,createdAt:e.createdAt??new Date().toISOString(),itemId:typeof f.itemId=="string"?f.itemId:void 0,meta:"approval",approvalRequestId:c??void 0,approvalTurnId:typeof e.turnId=="string"?e.turnId:typeof f.turnId=="string"?f.turnId:void 0,approvalReason:typeof f.reason=="string"?f.reason:void 0}}}if(e.event!=="codex.notification"&&e.event!=="server.item.snapshot")return null;const n=Fe(e.data),a=n.method,l=Fe(n.params);if(a==="item/started"){const u=Fe(l.item);if(u.type==="commandExecution"){const f=u.status==="inProgress"&&u.processId===null;return{id:e.id,kind:"command",title:f?"Command waiting for approval":"Seele ran command",body:nf(u.command),createdAt:e.createdAt??new Date().toISOString(),itemId:typeof u.id=="string"?u.id:void 0,meta:f?"approval":"running"}}const c=t1(u);if(c.length>0)return{id:e.id,kind:"file",title:"File change",body:c[0].path,createdAt:e.createdAt??new Date().toISOString(),itemId:et(u.id)||void 0,meta:"started",fileChanges:c}}if(a==="item/completed"){const u=Fe(l.item);if(u.type==="commandExecution"){const f=typeof u.exitCode=="number"?u.exitCode:null;return{id:e.id,kind:"command",title:f!==null&&f!==0?"Command failed":"Command completed",body:nf(u.command),createdAt:e.createdAt??new Date().toISOString(),itemId:typeof u.id=="string"?u.id:void 0,meta:f!==null?`exit ${f}`:"done",outputKind:"complete",output:typeof u.aggregatedOutput=="string"&&u.aggregatedOutput?u.aggregatedOutput:void 0}}const c=t1(u);if(c.length>0)return{id:e.id,kind:"file",title:"File changed",body:c[0].path,createdAt:e.createdAt??new Date().toISOString(),itemId:et(u.id)||void 0,meta:"done",fileChanges:c}}return a==="item/commandExecution/outputDelta"||a==="item/commandExecution/outputSnapshot"?{id:e.id,kind:"command",title:"Command output",body:typeof l.itemId=="string"?l.itemId:"command",createdAt:e.createdAt??new Date().toISOString(),itemId:typeof l.itemId=="string"?l.itemId:void 0,meta:"running",outputKind:"delta",output:a.endsWith("Snapshot")?typeof l.text=="string"?l.text:void 0:typeof l.delta=="string"?l.delta:void 0}:null}function Dz(e){if(e.event!=="codex.notification")return null;const t=Fe(e.data),n=t.method;if(n!=="item/started"&&n!=="item/completed")return null;const a=Fe(t.params),l=Fe(a.item),u=typeof l.type=="string"?l.type:"item";if(tb(u)||db(l))return null;const c=n==="item/completed",f=Fe(l.arguments),h=u==="dynamicToolCall"&&typeof l.tool=="string"?l.tool:null;return{id:e.id,kind:h==="seele_topics"?"collaboration":h==="seele_workspace_change"?"workspaceChange":"activity",title:h?nb(h,c,f):c?`Finished ${ts(u)}`:`Working on ${ts(u)}`,body:h?rb(h,f):ib(l,u),createdAt:e.createdAt??new Date().toISOString(),itemId:typeof l.id=="string"?l.id:void 0,meta:h==="seele_wakeup"&&c?"after turn":c?Rz(l):"running",topicAction:h==="seele_topics"?J6(f.action):void 0,workspaceChangeType:h==="seele_workspace_change"&&et(f.type)||void 0,workspaceChangePayload:h==="seele_workspace_change"?Fe(f.payload):void 0}}function J6(e){return e==="read"||e==="history"||e==="send"?e:void 0}function zz(e){if(ob(e)||["server.turn","server.done","server.notification.sent","server.notification.failed","server.approval.decision","server.workspace_change.decision","server.responsibility.decision","server.knowledge.decision","server.collaboration.topic_created"].includes(e.event))return null;const t=jE(e);return t?{id:e.id,kind:"activity",title:sb(t),body:eb(e.data),createdAt:e.createdAt??new Date().toISOString(),meta:"event"}:null}function eb(e){const t=Fe(e);for(const n of["title","message","description","status","reason"])if(typeof t[n]=="string"&&t[n].trim())return lb(t[n].trim(),180);return"Event details are available"}function tb(e){return["agentMessage","assistantMessage","commandExecution","message","reasoning","plan","systemMessage","userMessage"].includes(e)}function Rz(e){return e.status==="failed"||e.status==="error"?"failed":e.status==="cancelled"||e.status==="canceled"?"stopped":"done"}function ts(e){return e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/[-_]+/g," ").toLowerCase()}function nb(e,t,n){if(e==="seele_topics")switch(et(n.action)){case"read":return"Read messages";case"history":return"Review history";case"send":return"Send message";default:return t?"Operation completed":"Working"}if(e==="seele_wakeup"){const l=et(n.action)==="cancel";return t?l?"Wakeup cancellation requested":"Wakeup requested":l?"Requesting wakeup cancellation":"Requesting wakeup"}if(e==="seele_workspace_change")return t?"Workspace change proposed":"Preparing workspace change";const a=ts(e);return t?`Finished ${a}`:`Running ${a}`}function rb(e,t){if(e==="seele_topics"){const n=et(t.topicId);return n?`Topic ${ns(n)}`:"Topic"}if(e==="seele_wakeup")return et(t.instruction)||(et(t.action)==="cancel"?"Cancel the current wakeup":"Schedule the current wakeup");if(e==="seele_workspace_change"){const n=et(t.type)||"workspace";return ab(n,Fe(t.payload))}return ts(e)}function ab(e,t){return e==="responsibility"?et(t.content)||"Workspace responsibility":JSON.stringify(t,null,2)}function ib(e,t){for(const n of["title","name","description","text","summary"])if(typeof e[n]=="string"&&e[n].trim())return lu(e[n].trim(),160);return typeof e.id=="string"?`${ts(t)} ${ns(e.id)}`:ts(t)}function Oz(e){var n;if(e.meta==="running")return"running";if(e.meta==="approval")return"approval";if(e.meta==="stopped")return"stopped";const t=(n=e.meta)==null?void 0:n.match(/^exit\s+(-?\d+)$/);return t?Number(t[1])===0?"done":"failed":"done"}function Iz(e,t){return t==="running"?"running":t==="approval"?"approval":t==="stopped"?"stopped":t==="failed"?e.meta??"failed":"ok"}function _z(e,t){var a;if(t==="running")return"Command is still running.";if(t==="approval")return"Waiting for approval before running.";if(t==="stopped")return"Command was stopped.";const n=(a=e.meta)==null?void 0:a.match(/^exit\s+(-?\d+)$/);return n?`Exit code: ${n[1]}`:t==="failed"?"Command failed.":"Command completed."}function Lz(e,t){const n=e.split(/\r?\n/),l=n.slice(0,t).join(`
|
|
393
|
-
`);return n.length>t?`${l}
|
|
394
|
-
...`:l}function Bz(e,t){return e?e.split(/\r?\n/).filter(n=>n.trim()).length>t:!1}function xf(e){return/^call_[A-Za-z0-9]+$/.test(e)||e==="command"}function qz(e){const t=e.trim();return!t||t.includes(`
|
|
395
|
-
`)?null:lu(t,120)}function lu(e,t){if(e.length<=t)return e;const n=Math.max(8,Math.floor((t-3)/2));return`${e.slice(0,n)}...${e.slice(-n)}`}function lb(e,t){return e.length<=t?e:`${e.slice(0,Math.max(1,t-3))}...`}function sb(e){const n=(e.split(/[./]/).filter(Boolean).pop()??e).replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").trim();return n?n.charAt(0).toUpperCase()+n.slice(1):"System event"}function ob(e){const t=e.createdAt??new Date().toISOString();if(e.event==="server.status"){const u=Fe(e.data);if(u.status==="initialized")return{id:e.id,title:"Connected to Seele runtime",createdAt:t,tone:"done"};if(u.status==="turn_started")return{id:e.id,title:"Turn started",createdAt:t,tone:"running"};if(u.status==="archived_thread_replaced")return{id:e.id,title:"Started a fresh runtime thread",detail:typeof u.archivedThreadId=="string"?`archived ${ns(u.archivedThreadId)}`:void 0,createdAt:t,tone:"warning"}}if(e.event==="server.stopped"||e.event==="server.stop")return{id:e.id,title:"Stopped current run",createdAt:t,tone:"error"};if(e.event==="runtime.worker_stale")return{id:e.id,title:"Runtime appears stalled",detail:"No runtime signal for a while",createdAt:t,tone:"warning"};if(e.event==="runtime.worker_recovered")return{id:e.id,title:"Runtime resumed",createdAt:t,tone:"running"};if(e.event==="runtime.compaction.started"){const u=Fe(e.data);return{id:e.id,title:"Codex compacting context",detail:u1(u,!1),createdAt:t,tone:"running"}}if(e.event==="runtime.compaction.completed"){const u=Fe(e.data);return{id:e.id,title:"Codex context compacted",detail:u1(u,!0),createdAt:t,tone:"done"}}if(e.event==="server.turn.long_running")return{id:e.id,title:"Long run in progress",detail:"Consider splitting into a wakeup phase",createdAt:t,tone:"warning"};if(e.event==="server.turn.phase_boundary_recommended"){const u=Fe(e.data);return{id:e.id,title:"Phase boundary recommended",detail:typeof u.operationCount=="number"?`${u.operationCount} operations in this turn`:"Many operations in this turn",createdAt:t,tone:"warning"}}if(e.event==="server.wakeup.started"){const u=Fe(e.data);return{id:e.id,title:"Scheduled wakeup resumed",detail:typeof u.instruction=="string"?lu(u.instruction,96):void 0,createdAt:t,tone:"running"}}if(e.event==="codex.server_request"){const u=Fe(e.data);if(u.method==="item/commandExecution/requestApproval"){const c=Fe(u.params);return{id:e.id,title:"Waiting for approval",detail:typeof c.command=="string"?lu(c.command,96):"Command needs confirmation",createdAt:t,tone:"warning"}}}if(e.event!=="codex.notification")return null;const n=Fe(e.data),a=n.method,l=Fe(n.params);if(a==="item/started"||a==="item/completed"){const u=Fe(l.item),c=typeof u.type=="string"?u.type:"item",f=a==="item/completed";if(c==="commandExecution")return{id:e.id,title:f?"Command completed":"Running command",detail:lu(nf(u.command),96),createdAt:t,tone:f?"done":"running"};if(c==="contextCompaction")return{id:e.id,title:f?"Codex context compacted":"Codex compacting context",detail:f?void 0:"Current runtime thread is being compacted",createdAt:t,tone:f?"done":"running"};const h=db(u);if(h)return{id:e.id,title:f?"File update finished":"Editing file",detail:lu(h,96),createdAt:t,tone:f?"done":"running"};if(!tb(c))return{id:e.id,title:f?`Finished ${ts(c)}`:`Working on ${ts(c)}`,detail:ib(u,c),createdAt:t,tone:f?"done":"running"}}if(a==="thread/status/changed"){const u=Fe(l.status),c=Array.isArray(u.activeFlags)?u.activeFlags:[];if(u.type==="active"&&c.some(f=>f==="waitingOnApproval"))return{id:e.id,title:"Waiting for approval",detail:"Command needs confirmation",createdAt:t,tone:"warning"}}if(a==="turn/started")return{id:e.id,title:"Seele started working",createdAt:t,tone:"running"};if(a==="turn/completed"){const u=Fe(l.turn);return{id:e.id,title:"Turn completed",detail:typeof u.durationMs=="number"?hu(u.durationMs):void 0,createdAt:t,tone:"done"}}if(a==="hook/started"||a==="hook/completed"){const u=Fe(l.run),c=typeof u.eventName=="string"?u.eventName:"hook";return{id:e.id,title:a==="hook/started"?`Running ${U3(c)}`:`Finished ${U3(c)}`,detail:typeof u.durationMs=="number"?hu(u.durationMs):void 0,createdAt:t,tone:a==="hook/started"?"running":"done"}}return null}function u1(e,t){const n=bf(e.before),a=bf(e.after),l=[];if(t){const u=typeof e.durationMs=="number"?e.durationMs:null;l.push(u===null?"Completed":`Completed in ${hu(u)}`)}else l.push("Codex triggered");if(n&&a){l.push(`context ${Vs(n)} → ${Vs(a)}`);const u=n.totalTokens-a.totalTokens;u>0&&l.push(`released ~${ig(u)} tokens`)}else n&&l.push(`context ${Vs(n)}`);return l.join(" · ")}function Uz(e){const t=bf(e.before),n=bf(e.after),a=t&&n?t.totalTokens-n.totalTokens:null;let l="Unavailable";return t&&n?l=`${Vs(t)} → ${Vs(n)}`:t?l=`${Vs(t)} → unavailable`:n&&(l=`unavailable → ${Vs(n)}`),[{label:"Trigger",value:e.trigger==="codex"?"Codex automatic":e.trigger??"Unavailable"},{label:"Duration",value:e.durationMs===null?"Unavailable":hu(e.durationMs)},{label:"Context",value:l},{label:"Released",value:a===null?"Unavailable":a>0?`~${ig(a)} tokens`:"No decrease observed"}]}function bf(e){const t=Fe(e);return typeof t.totalTokens=="number"?{totalTokens:t.totalTokens,modelContextWindow:typeof t.modelContextWindow=="number"?t.modelContextWindow:null}:null}function Vs(e){return e.modelContextWindow&&e.modelContextWindow>0?`${Math.round(e.totalTokens/e.modelContextWindow*100)}%`:`${ig(e.totalTokens)} tokens`}function ig(e){return new Intl.NumberFormat("en",{notation:"compact",maximumFractionDigits:1}).format(Math.max(0,e))}function Hz(e){let t=null;for(const n of e){const a=ub(n);a&&(!t||Wc(n,t)>0)&&(t=a)}return t}function ub(e){if(e.event!=="codex.notification")return null;const t=Fe(e.data);if(t.method!=="thread/tokenUsage/updated")return null;const n=Fe(t.params),a=Fe(n.tokenUsage),l=Fe(a.last),u=Fe(a.total),c=Object.keys(l).length>0?l:u,f=va(c.totalTokens);return f===null?null:{totalTokens:f,inputTokens:va(c.inputTokens),cachedInputTokens:va(c.cachedInputTokens),outputTokens:va(c.outputTokens),reasoningOutputTokens:va(c.reasoningOutputTokens),modelContextWindow:va(a.modelContextWindow),createdAt:e.createdAt??new Date().toISOString()}}function $z(...e){return e.reduce((t,n)=>n&&(!t||Date.parse(n.createdAt)>Date.parse(t.createdAt))?n:t,null)}function cb(e){return e!=null&&e.modelContextWindow&&e.modelContextWindow>0?e.totalTokens/e.modelContextWindow*100:null}function Fz(e,t){return e?!t||e===t?e:t.startsWith(e)?t:`${e}${t}`:t}function nf(e){return typeof e=="string"?e:Array.isArray(e)?e.map(t=>String(t)).join(" "):"command"}function db(e){var n;const t=e.path??e.file??e.filename;return typeof t=="string"?t:((n=t1(e)[0])==null?void 0:n.path)??null}function Fe(e){return e&&typeof e=="object"?e:{}}function va(e){return typeof e=="number"&&Number.isFinite(e)?e:null}function et(e){return typeof e=="string"?e:""}function Ys(e){return e.replace(/([\\`*_[\]<>])/g,"\\$1")}function Pz(e){const t=Fe(e),n=Fe(t.thread);if(!Object.keys(n).length)return null;const a=Array.isArray(n.turns)?n.turns:[],l=[];let u=0,c=0,f=0,h=0,m=0;return a.forEach((p,y)=>{const k=Fe(p),x=et(k.id)||`turn-${y+1}`,C=Array.isArray(k.items)?k.items:[];u+=C.length,l.push(Gz(k,x)),C.forEach(M=>{const I=Fe(M),_=et(I.type);_==="userMessage"?c+=1:_==="agentMessage"?f+=1:_==="compaction"?h+=1:_==="contextCompaction"&&(m+=1)})}),{id:et(n.id),sessionId:et(n.sessionId),status:fb(n.status),source:lg(n.source),cwd:et(n.cwd),path:et(n.path),preview:et(n.preview),createdAt:va(n.createdAt),updatedAt:va(n.updatedAt),recencyAt:va(n.recencyAt),turnCount:a.length,itemCount:u,userMessageCount:c,agentMessageCount:f,compactionCount:h,contextCompactionCount:m,turns:l}}function Gz(e,t){const n=Array.isArray(e.items)?e.items:[],a=Array.from(new Set(n.map(u=>et(Fe(u).type)).filter(u=>u.length>0))).join(", "),l=Vz(n.map(u=>c1(u)).filter(Boolean).join(" "),220);return{id:t,status:fb(e.status),itemsView:et(e.itemsView)||"unknown",itemCount:n.length,startedAt:va(e.startedAt),completedAt:va(e.completedAt),durationMs:va(e.durationMs),itemTypes:a,preview:l,raw:e}}function c1(e){if(typeof e=="string")return e;if(Array.isArray(e))return e.map(c1).filter(Boolean).join(`
|
|
396
|
-
`);if(!e||typeof e!="object")return"";const t=e,n=et(t.text),a=c1(t.content);return[n,a].filter(Boolean).join(`
|
|
397
|
-
`)}function fb(e){const t=Fe(e);return et(t.type)||lg(e)}function Vz(e,t){const n=e.replace(/\s+/g," ").trim();return n.length>t?`${n.slice(0,t)}...`:n}function Lc(e){return e===null?"unknown":lt(e*1e3)}function Yz(e){return typeof e=="number"&&Number.isFinite(e)||typeof e=="string"&&e.trim()?e:null}function lg(e){if(typeof e=="string")return e;const t=JSON.stringify(e);return t.length>180?`${t.slice(0,180)}...`:t}function Wz(e){if(typeof e=="string")return e;const t=Fe(e),n=typeof t.message=="string"?t.message:null,a=typeof t.detail=="string"?t.detail:null;return n&&a?`${n}
|
|
398
|
-
|
|
399
|
-
${a}`:n||a||lg(e)}function U3(e){return e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/[-_]+/g," ").toLowerCase()}function hu(e){return e<1e3?`${e}ms`:`${(e/1e3).toFixed(e<1e4?1:0)}s`}function bp(e){if(e<6e4)return hu(e);const t=Math.floor(e/6e4);if(t<60)return`${t}m`;const n=Math.floor(t/60),a=t%60;return a===0?`${n}h`:`${n}h ${a}m`}function hb(e){return`${Math.round(e)}%`}function Rr(e){return new Intl.NumberFormat("en-US").format(e)}function rf(e){return e===null?"unknown":Rr(e)}function $f(e){return Math.max(0,Math.min(100,Math.round(e)))}function sg(e){return e>=100?"exhausted":e>=90?"danger":e>=75?"warning":"healthy"}function mb(e){return lt(e*1e3)}function lt(e){const t=typeof e=="number"?new Date(e):new Date(e);if(Number.isNaN(t.getTime()))return"";const n={timeZone:"Asia/Shanghai",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1},a=new Intl.DateTimeFormat("en-CA",n).formatToParts(t),l=u=>{var c;return((c=a.find(f=>f.type===u))==null?void 0:c.value)??""};return`${l("month")}/${l("day")} ${l("hour")}:${l("minute")}:${l("second")}`}function Xi(e){const t=lt(e);return t?`${t} UTC+08:00`:""}function Kz(e){const t=new Date(e);return Number.isNaN(t.getTime())?"--:--:--":new Intl.DateTimeFormat("en-GB",{timeZone:"Asia/Shanghai",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).format(t)}function H3(e,t){const n=af(e,t);return n?`${n.displayName}${n.isDefault?" (default)":""}`:e||"Unavailable"}function af(e,t){return e?t.find(n=>n.model===e)??null:t.find(n=>n.isDefault)??t[0]??null}function Ff(e){return e?e.replace(/^codex-cli\s+/i,""):"Unavailable"}function d1(e,t){const n=Ff(e);return t?`${n} (${lt(t)})`:n}function Xz(e){return`https://github.com/openai/codex/releases/tag/rust-v${encodeURIComponent(Ff(e))}`}function Zz(e,t){const n=$3(e),a=$3(t);if(!n||!a)return!1;for(let l=0;l<n.core.length;l+=1)if(n.core[l]!==a.core[l])return n.core[l]>a.core[l];return n.prerelease===a.prerelease?!1:n.prerelease?a.prerelease?n.prerelease.localeCompare(a.prerelease,void 0,{numeric:!0})>0:!1:!0}function $3(e){if(!e)return null;const t=Ff(e).match(/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);return t?{core:[Number(t[1]),Number(t[2]),Number(t[3])],prerelease:t[4]??null}:null}function Qz(e,t){const n=e.map(a=>({value:a.model,label:`${a.displayName}${a.isDefault?" (default)":""}`}));return t&&!e.some(a=>a.model===t)&&n.push({value:t,label:`${t} (unavailable)`}),n.length===0&&n.push({value:"",label:"Models unavailable"}),n}async function F3(e,t){const n=e.getReader(),a=new TextDecoder;let l="";for(;;){const{done:u,value:c}=await n.read();if(u)break;l+=a.decode(c,{stream:!0});const f=l.split(`
|
|
400
|
-
|
|
401
|
-
`);l=f.pop()??"";for(const h of f){const m=Jz(h);m&&t(m)}}}function Jz(e){const t=e.split(`
|
|
402
|
-
`),n=t.find(c=>c.startsWith("event: ")),a=t.filter(c=>c.startsWith("data: ")).map(c=>c.slice(6));if(!n||a.length===0)return null;const l=n.slice(7),u=a.join(`
|
|
403
|
-
`);try{return{event:l,data:JSON.parse(u)}}catch{return{event:l,data:u}}}function eR(e){var a,l,u,c,f;if(!e||typeof e!="object")return null;const t=e;if(t.method!=="item/agentMessage/delta"&&t.method!=="item/plan/delta"&&t.method!=="item/agentMessage/textSnapshot"&&t.method!=="item/plan/textSnapshot")return null;const n=((a=t.params)==null?void 0:a.delta)??((l=t.params)==null?void 0:l.text)??"";return n?{text:n,phase:t.method.startsWith("item/plan/")?"final_answer":((u=t.params)==null?void 0:u.phase)==="commentary"||((c=t.params)==null?void 0:c.phase)==="final_answer"?t.params.phase:"unknown",itemId:(f=t.params)==null?void 0:f.itemId}:null}function tR(e){var a;if(!e||typeof e!="object")return null;const t=e;if(t.method!=="item/started")return null;const n=(a=t.params)==null?void 0:a.item;return(n==null?void 0:n.type)!=="agentMessage"&&(n==null?void 0:n.type)!=="plan"?null:{itemId:n.id,phase:n.type==="plan"?"final_answer":n.phase==="commentary"||n.phase==="final_answer"?n.phase:"unknown"}}function nR(e){var a;if(!e||typeof e!="object")return null;const t=e;if(t.method!=="item/completed")return null;const n=(a=t.params)==null?void 0:a.item;return(n==null?void 0:n.type)!=="agentMessage"&&(n==null?void 0:n.type)!=="plan"||!n.text?null:{itemId:n.id,text:n.text,phase:n.type==="plan"?"final_answer":n.phase==="commentary"||n.phase==="final_answer"?n.phase:"unknown"}}function Vd(e){var n,a,l,u;if(e.event==="server.error"||e.event==="client.error")return"error";if(!e.data||typeof e.data!="object")return null;const t=e.data;return t.method==="thread/status/changed"&&((a=(n=t.params)==null?void 0:n.status)==null?void 0:a.type)==="idle"?"done":t.method==="turn/completed"?(u=(l=t.params)==null?void 0:l.turn)!=null&&u.error?"error":"done":null}function ou(e){return e.length<=6?e:e.slice(0,6)}function ns(e){return e.slice(0,8)}function wp(e){switch(e){case"danger-full-access":return"System";case"workspace-write":return"Workspace";case"read-only":return"Read only"}}function f1(e,t){var n;return t==="running"||t==="error"?t:((n=e==null?void 0:e.nextWakeup)==null?void 0:n.status)==="scheduled"?"waiting":t}function rR(e,t){return`waiting ${wf(e,t)}`}function wf(e,t){const n=Date.parse(e.wakeAt);if(Number.isNaN(n))return"waiting";const a=Math.max(0,Math.ceil((n-t)/1e3));if(a<60)return`${a}s`;const l=Math.ceil(a/60);if(l<60)return`${l}m`;const u=Math.ceil(l/60);return u<24?`${u}h`:`${Math.ceil(u/24)}d`}function lf(e,t=null,n=Date.now()){if(e==="waiting")return t?rR(t,n):"waiting";switch(e){case"done":return"idle";case"running":return"running";case"error":return"error";case"initializing":return"initializing";case"initialization_failed":return"initialization failed";case"idle":return"idle"}}function P3(e){switch(e){case"checking":return"backend checking";case"connected":return"backend connected";case"error":return"backend unavailable"}}function aR(e){return e==="assistant"?"Seele":"You"}const iR=document.getElementById("root"),pb=window.__seeleCodexRoot??X7.createRoot(iR);window.__seeleCodexRoot=pb;mR();pb.render(s.jsx(A.StrictMode,{children:s.jsx(lR,{})}));function lR(){const[e,t]=A.useState(null),[n,a]=A.useState(null),[l,u]=A.useState(""),[c,f]=A.useState(""),[h,m]=A.useState("admin"),[p,y]=A.useState(""),[k,x]=A.useState(!1),[C,M]=A.useState("");A.useEffect(()=>{let N=!1,q=0;const R=async()=>{try{const X=await G3();if(N)return;t(X),f("")}catch{if(N)return;f("Reconnecting to Seele..."),q=window.setTimeout(R,2e3)}};return R(),()=>{N=!0,window.clearTimeout(q)}},[]),A.useEffect(()=>{let N=!1,q=0;const R=async()=>{try{const P=await gb();if(N)return;a(P),u(""),q=window.setTimeout(R,P.status==="authorized"&&P.configurationReady&&P.codexAccountsReady?3e4:3e3)}catch{if(N)return;u("Unable to reach Seele."),q=window.setTimeout(R,3e3)}},X=()=>{window.clearTimeout(q),R()};return window.addEventListener(i1,X),R(),()=>{N=!0,window.clearTimeout(q),window.removeEventListener(i1,X)}},[]),A.useEffect(()=>{const N=()=>{t({enabled:!0,authenticated:!1,user:null}),y(""),M("Your session has expired. Sign in again.")};return window.addEventListener(a1,N),()=>window.removeEventListener(a1,N)},[]);async function I(N){N.preventDefault(),x(!0),M("");try{const q=await fetch(Ne("auth/login"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:h,password:p})});if(!q.ok){M(q.status===401?"Incorrect username or password.":q.status===429?"Too many failed attempts. Try again later.":"Login failed.");return}y(""),t(await G3())}catch{M("Unable to reach Seele.")}finally{x(!1)}}async function _(){await fetch(Ne("auth/logout"),{method:"POST"}).catch(()=>{}),t({enabled:!0,authenticated:!1,user:null})}if(n&&IE(n))return s.jsx(sR,{authorization:n});if(!e||!n)return s.jsx("main",{className:"auth-shell",children:s.jsx("span",{className:"auth-loading",children:l||c||"Loading Seele..."})});if(!e.enabled||e.authenticated){const N=e.user??{id:"local-admin",username:"admin",role:"admin",active:!0,createdAt:"",updatedAt:""};return s.jsx(SN,{authEnabled:e.enabled,currentUser:N,deploymentId:n.deploymentId,onLogout:_},`${n.deploymentId}:${N.id}`)}return s.jsx("main",{className:"auth-shell",children:s.jsxs("section",{className:"auth-panel",children:[s.jsxs("header",{children:[s.jsx("p",{children:"Seele"}),s.jsx("h1",{children:"Sign in"})]}),s.jsxs("form",{onSubmit:I,children:[s.jsxs("label",{children:[s.jsx("span",{children:"Username"}),s.jsx("input",{autoComplete:"username",autoFocus:!0,onChange:N=>m(N.target.value),value:h})]}),s.jsxs("label",{children:[s.jsx("span",{children:"Password"}),s.jsx("input",{autoComplete:"current-password",onChange:N=>y(N.target.value),type:"password",value:p})]}),C?s.jsx("p",{className:"auth-error",role:"alert",children:C}):null,s.jsx("button",{disabled:k||!h||!p,type:"submit",children:k?"Signing in...":"Sign in"})]})]})})}function sR({authorization:e}){const t={starting:{title:"Checking deployment authorization",body:"Seele is contacting its configured cloud service."},pending:{title:"Waiting for cloud approval",body:"A cloud administrator must authorize this deployment before it can be used."},revoked:{title:"Deployment access revoked",body:"This deployment is disabled until a cloud administrator authorizes it again."},unavailable:{title:"Cloud authorization unavailable",body:"Seele will keep retrying. Business APIs and the runtime remain paused."},authorized:{title:"Deployment authorized",body:"Seele is ready."}},n=e.status==="authorized"&&!e.configurationReady?{title:"Synchronizing global configuration",body:"Seele is applying the current cloud configuration before the deployment becomes available."}:e.status==="authorized"&&!e.codexAccountsReady?{title:"Synchronizing Codex accounts",body:"Seele is installing the cloud account credentials before the deployment becomes available."}:t[e.status];return s.jsx("main",{className:"deployment-shell",children:s.jsxs("section",{className:"deployment-panel deployment-waiting-panel",children:[s.jsx("div",{className:`deployment-status-mark is-${e.status}`,"aria-hidden":"true"}),s.jsx("p",{className:"deployment-kicker",children:"Seele deployment"}),s.jsx("h1",{children:n.title}),s.jsx("p",{className:"deployment-lead",children:n.body}),s.jsxs("dl",{className:"deployment-facts",children:[s.jsxs("div",{children:[s.jsx("dt",{children:"Deployment ID"}),s.jsx("dd",{children:s.jsx("code",{children:e.deploymentId})})]}),s.jsxs("div",{children:[s.jsx("dt",{children:"Name"}),s.jsx("dd",{children:e.name})]}),s.jsxs("div",{children:[s.jsx("dt",{children:"Cloud"}),s.jsx("dd",{children:e.cloudUrl})]}),s.jsxs("div",{children:[s.jsx("dt",{children:"Last checked"}),s.jsx("dd",{children:e.lastCheckedAt?uR(e.lastCheckedAt):"Starting"})]}),s.jsxs("div",{children:[s.jsx("dt",{children:"Global revision"}),s.jsxs("dd",{children:[e.appliedGlobalRevision," / ",e.requiredGlobalRevision]})]}),s.jsxs("div",{children:[s.jsx("dt",{children:"Codex account revision"}),s.jsxs("dd",{children:[e.appliedCodexAccountRevision," / ",e.requiredCodexAccountRevision]})]})]}),e.lastError||e.configurationError||e.codexAccountError?s.jsx("p",{className:"deployment-error",role:"alert",children:e.lastError||e.configurationError||e.codexAccountError}):null,s.jsx("a",{className:"deployment-primary-link",href:oR(e.cloudUrl),children:"Open cloud deployment management"}),s.jsx("p",{className:"deployment-retry-note",children:"Authorization is checked automatically."})]})})}function oR(e){return`${e.replace(/\/+$/,"")}/admin/deployments`}function uR(e){const t=Date.parse(e);return Number.isNaN(t)?e:new Date(t).toLocaleString()}async function gb(){const e=await fetch(Ne("deployment/authorization"));if(!e.ok)throw new Error(`Deployment authorization request failed: ${e.status}`);return e.json()}async function G3(){const e=await fetch(Ne("auth/session"));if(!e.ok)throw new Error(`Auth session request failed: ${e.status}`);return e.json()}async function cR(){const e=Ne("admin/users"),t=await fetch(e);if(!t.ok)throw await Kn(t,{url:e});return(await t.json()).users}async function dR(e){const t=Ne("admin/users"),n=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!n.ok)throw await Kn(n,{method:"POST",url:t});return(await n.json()).user}async function fR(e,t){const n=Ne(`admin/users/${encodeURIComponent(e)}`),a=await fetch(n,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok)throw await Kn(a,{method:"PATCH",url:n});return(await a.json()).user}async function hR(e){const t=Ne(`admin/users/${encodeURIComponent(e)}`),n=await fetch(t,{method:"DELETE"});if(!n.ok)throw await Kn(n,{method:"DELETE",url:t})}function mR(){if(window.__seeleAuthFetchInstalled)return;const e=window.fetch.bind(window);window.fetch=async(...t)=>{const n=await e(...t),a=typeof t[0]=="string"?t[0]:t[0]instanceof URL?t[0].toString():t[0].url;if(n.status===401){const l=await n.clone().json().then(u=>u&&typeof u=="object"&&"error"in u?u.error:void 0).catch(()=>{});_E(n.status,l,a.includes("/api/auth/"))==="reauthenticate"&&window.dispatchEvent(new Event(a1))}return n.status===503&&a.includes("/api/")&&to(),n},window.__seeleAuthFetchInstalled=!0}function to(){window.dispatchEvent(new Event(i1))}export{ln as _,Z7 as a,d8 as b,gR as c,G2 as d,nx as f,V3 as g,rx as h,yR as k,kf as s,n8 as w};
|