@seele00/seele-work 0.1.135 → 0.1.136
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 +135 -135
- package/web/dist/assets/{abnfDiagram-VRR7QNED-P-znzss5.js → abnfDiagram-VRR7QNED-BNaPvcWq.js} +1 -1
- package/web/dist/assets/{arc-D8CsjyUi.js → arc-slZQXmKC.js} +1 -1
- package/web/dist/assets/{architectureDiagram-ZJ3FMSHR-sU4pA_45.js → architectureDiagram-ZJ3FMSHR-DWuUVI3l.js} +1 -1
- package/web/dist/assets/{blockDiagram-677ZJIJ3-66INN3Bg.js → blockDiagram-677ZJIJ3-BAGQvy_f.js} +1 -1
- package/web/dist/assets/{c4Diagram-LMCZKHZV-CZtPXtMY.js → c4Diagram-LMCZKHZV-DxULde0Z.js} +1 -1
- package/web/dist/assets/channel-DO44n-sY.js +1 -0
- package/web/dist/assets/{chunk-2Q5K7J3B-B706Ng6D.js → chunk-2Q5K7J3B-C5XXnM6W.js} +1 -1
- package/web/dist/assets/{chunk-32BRIVSS-BN-8Gbsp.js → chunk-32BRIVSS-Da9UmCi2.js} +1 -1
- package/web/dist/assets/{chunk-5VM5RSS4-BFo-8dxI.js → chunk-5VM5RSS4-c0vfNTKk.js} +1 -1
- package/web/dist/assets/{chunk-EX3LRPZG-CXYTQVyG.js → chunk-EX3LRPZG-Cz8hIOnx.js} +1 -1
- package/web/dist/assets/{chunk-JWPE2WC7-CaEsZ5wt.js → chunk-JWPE2WC7-BtaaRjvn.js} +1 -1
- package/web/dist/assets/{chunk-MOJQB5TN-CeScW6Q-.js → chunk-MOJQB5TN-CKlCE6Y_.js} +1 -1
- package/web/dist/assets/{chunk-RYQCIY6F-CL4l_fFr.js → chunk-RYQCIY6F-BOJfAuUe.js} +1 -1
- package/web/dist/assets/{chunk-V7JOEXUC-CBRZkG_K.js → chunk-V7JOEXUC-9r4xqhPh.js} +1 -1
- package/web/dist/assets/{chunk-VR4S4FIN-BVCEntY6.js → chunk-VR4S4FIN-BhxMrkrg.js} +1 -1
- package/web/dist/assets/{chunk-XXDRQBXY-ileXPa6T.js → chunk-XXDRQBXY-CwU8qWGO.js} +1 -1
- package/web/dist/assets/classDiagram-OUVF2IWQ-BkIIQno9.js +1 -0
- package/web/dist/assets/classDiagram-v2-EOCWNBFH-BkIIQno9.js +1 -0
- package/web/dist/assets/{core-Cm9kRhNN.js → core-DSYKin3G.js} +1 -1
- package/web/dist/assets/{cose-bilkent-JH36ORCC-DxdjXaDH.js → cose-bilkent-JH36ORCC-Dab6pAkj.js} +1 -1
- package/web/dist/assets/{cynefin-VYW2F7L2-BJKopRfy.js → cynefin-VYW2F7L2-BZwISilI.js} +1 -1
- package/web/dist/assets/{cynefinDiagram-TSTJHNR4-CVhtsEwx.js → cynefinDiagram-TSTJHNR4-C_d0wHJq.js} +1 -1
- package/web/dist/assets/{dagre-VKFMJZFB-CaOOFAp7.js → dagre-VKFMJZFB-DTTgXtAQ.js} +1 -1
- package/web/dist/assets/{diagram-FQU43EPY-eo1bb_BS.js → diagram-FQU43EPY-BBfijNn2.js} +1 -1
- package/web/dist/assets/{diagram-G47NLZAW-DwAF2hOd.js → diagram-G47NLZAW-C15MlfiE.js} +1 -1
- package/web/dist/assets/{diagram-NH7WQ7WH-0itrrp7A.js → diagram-NH7WQ7WH-Dk2WRsUE.js} +1 -1
- package/web/dist/assets/{diagram-OA4YK3LP-DA_4ldsi.js → diagram-OA4YK3LP-C0n7-pOO.js} +1 -1
- package/web/dist/assets/{diagram-WEI45ONY-Cs3ftGHs.js → diagram-WEI45ONY-BbpkQrN8.js} +1 -1
- package/web/dist/assets/{ebnfDiagram-CCIWWBDH-C1LZkv6T.js → ebnfDiagram-CCIWWBDH-15IV2cO1.js} +1 -1
- package/web/dist/assets/{erDiagram-Q63AITRT-BSoQIfkq.js → erDiagram-Q63AITRT-DRNK9qPN.js} +1 -1
- package/web/dist/assets/{flowDiagram-23GEKE2U-C9bBXEtX.js → flowDiagram-23GEKE2U-CtJDOPEq.js} +1 -1
- package/web/dist/assets/{ganttDiagram-NO4QXBWP-khjksv96.js → ganttDiagram-NO4QXBWP-7WFEH8I5.js} +1 -1
- package/web/dist/assets/{gitGraphDiagram-IHSO6WYX-tO2a71eq.js → gitGraphDiagram-IHSO6WYX-BeyKux_J.js} +1 -1
- package/web/dist/assets/index-Bex-AmFk.js +403 -0
- package/web/dist/assets/index-DLjjNhyv.css +1 -0
- package/web/dist/assets/{infoDiagram-FWYZ7A6U-bl4jWoav.js → infoDiagram-FWYZ7A6U-BhYR9ZNu.js} +1 -1
- package/web/dist/assets/{ishikawaDiagram-FXEZZL3T-DuBW7RIz.js → ishikawaDiagram-FXEZZL3T-JIbz-qII.js} +1 -1
- package/web/dist/assets/{journeyDiagram-5HDEW3XC-C67kR31s.js → journeyDiagram-5HDEW3XC-bp7juubn.js} +1 -1
- package/web/dist/assets/{kanban-definition-HUTT4EX6-Y_0xKHMj.js → kanban-definition-HUTT4EX6-CeuJOjFT.js} +1 -1
- package/web/dist/assets/{linear-Ci39oT9I.js → linear-TmSe7pXF.js} +1 -1
- package/web/dist/assets/{mermaid.core-BAJAVA4f.js → mermaid.core-CeDonWvV.js} +5 -5
- package/web/dist/assets/{mindmap-definition-LN4V7U3C-DjW1Ux7D.js → mindmap-definition-LN4V7U3C-CxMQjNc5.js} +1 -1
- package/web/dist/assets/{pegDiagram-2B236MQR-DH-KGbqu.js → pegDiagram-2B236MQR-B8eZKJlL.js} +1 -1
- package/web/dist/assets/{pieDiagram-ENE6RG2P-mZiRCKie.js → pieDiagram-ENE6RG2P-CZnzYtLB.js} +1 -1
- package/web/dist/assets/{quadrantDiagram-ABIIQ3AL-SMLtGnyI.js → quadrantDiagram-ABIIQ3AL-JOieDU2e.js} +1 -1
- package/web/dist/assets/{railroadDiagram-RFXS5EU6-U_k67Zqj.js → railroadDiagram-RFXS5EU6-BYcXbhCh.js} +1 -1
- package/web/dist/assets/{requirementDiagram-TGXJPOKE-IaB2Z7iz.js → requirementDiagram-TGXJPOKE-AUa3MyAP.js} +1 -1
- package/web/dist/assets/{sankeyDiagram-HTMAVEWB-BAqYjhAw.js → sankeyDiagram-HTMAVEWB-DzFX2PDH.js} +1 -1
- package/web/dist/assets/{sequenceDiagram-DBY2YBRQ-CEC5KEEY.js → sequenceDiagram-DBY2YBRQ-BqBqIwM6.js} +1 -1
- package/web/dist/assets/{sizeCapture-X5ZJPWSS-C9iD_H1M.js → sizeCapture-X5ZJPWSS-BXfRSJN_.js} +1 -1
- package/web/dist/assets/{stateDiagram-2N3HPSRC-BTRfn4iD.js → stateDiagram-2N3HPSRC-DdCs_b_T.js} +1 -1
- package/web/dist/assets/stateDiagram-v2-6OUMAXLB-BFLR_iEx.js +1 -0
- package/web/dist/assets/{swimlanes-5IMT3BWC-CGT_c2bu.js → swimlanes-5IMT3BWC-a1MhyOsA.js} +2 -2
- package/web/dist/assets/swimlanesDiagram-G3AALYLV-Ca3W_S1t.js +8 -0
- package/web/dist/assets/{timeline-definition-FHXFAJF6-BPqH-I2j.js → timeline-definition-FHXFAJF6-yqYzUuD1.js} +1 -1
- package/web/dist/assets/{vennDiagram-L72KCM5P-cbddz-IJ.js → vennDiagram-L72KCM5P--ECkNj85.js} +1 -1
- package/web/dist/assets/{wardleyDiagram-EHGQE667-DPhnHjAo.js → wardleyDiagram-EHGQE667-D8zKt4eJ.js} +1 -1
- package/web/dist/assets/{xychartDiagram-FW5EYKEG-D2chzgur.js → xychartDiagram-FW5EYKEG-RWwbDAca.js} +1 -1
- package/web/dist/index.html +2 -2
- package/web/dist/assets/channel-DOtthfif.js +0 -1
- package/web/dist/assets/classDiagram-OUVF2IWQ-DLZ5M2cd.js +0 -1
- package/web/dist/assets/classDiagram-v2-EOCWNBFH-DLZ5M2cd.js +0 -1
- package/web/dist/assets/index-Cc2ZBeTz.css +0 -1
- package/web/dist/assets/index-D_aiDops.js +0 -403
- package/web/dist/assets/stateDiagram-v2-6OUMAXLB-BEFvUx3q.js +0 -1
- package/web/dist/assets/swimlanesDiagram-G3AALYLV-Dt1SxpQF.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 ib=Object.defineProperty;var lb=(e,t,n)=>t in e?ib(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Cd=(e,t,n)=>lb(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 o of l)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&a(c)}).observe(document,{childList:!0,subtree:!0});function n(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?o.credentials="include":l.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function a(l){if(l.ep)return;l.ep=!0;const o=n(l);fetch(l.href,o)}})();const sb="modulepreload",ob=function(e,t){return new URL(e,t).href},_2={},rn=function(t,n,a){let l=Promise.resolve();if(n&&n.length>0){let c=function(y){return Promise.all(y.map(v=>Promise.resolve(v).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(y=>{if(y=ob(y,a),y in _2)return;_2[y]=!0;const v=y.endsWith(".css"),k=v?'[rel="stylesheet"]':"";if(!!a)for(let N=f.length-1;N>=0;N--){const U=f[N];if(U.href===y&&(!v||U.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${y}"]${k}`))return;const T=document.createElement("link");if(T.rel=v?"stylesheet":sb,v||(T.as="script"),T.crossOrigin="",T.href=y,m&&T.setAttribute("nonce",m),document.head.appendChild(T),v)return new Promise((N,U)=>{T.addEventListener("load",N),T.addEventListener("error",()=>U(new Error(`Unable to preload CSS for ${y}`)))})}))}function o(c){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=c,window.dispatchEvent(f),!f.defaultPrevented)throw c}return l.then(c=>{for(const f of c||[])f.status==="rejected"&&o(f.reason);return t().catch(o)})};function E5(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var um={exports:{}},kc={};/**
|
|
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 I2;function ub(){if(I2)return kc;I2=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(a,l,o){var c=null;if(o!==void 0&&(c=""+o),l.key!==void 0&&(c=""+l.key),"key"in l){o={};for(var f in l)f!=="key"&&(o[f]=l[f])}else o=l;return l=o.ref,{$$typeof:e,type:a,key:c,ref:l!==void 0?l:null,props:o}}return kc.Fragment=t,kc.jsx=n,kc.jsxs=n,kc}var B2;function cb(){return B2||(B2=1,um.exports=ub()),um.exports}var u=cb(),cm={exports:{}},ot={};/**
|
|
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 L2;function db(){if(L2)return ot;L2=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"),o=Symbol.for("react.consumer"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),k=Symbol.iterator;function b(I){return I===null||typeof I!="object"?null:(I=k&&I[k]||I["@@iterator"],typeof I=="function"?I:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,U={};function D(I,ee,R){this.props=I,this.context=ee,this.refs=U,this.updater=R||T}D.prototype.isReactComponent={},D.prototype.setState=function(I,ee){if(typeof I!="object"&&typeof I!="function"&&I!=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,I,ee,"setState")},D.prototype.forceUpdate=function(I){this.updater.enqueueForceUpdate(this,I,"forceUpdate")};function M(){}M.prototype=D.prototype;function L(I,ee,R){this.props=I,this.context=ee,this.refs=U,this.updater=R||T}var G=L.prototype=new M;G.constructor=L,N(G,D.prototype),G.isPureReactComponent=!0;var te=Array.isArray;function _(){}var W={H:null,A:null,T:null,S:null},ae=Object.prototype.hasOwnProperty;function Q(I,ee,R){var me=R.ref;return{$$typeof:e,type:I,key:ee,ref:me!==void 0?me:null,props:R}}function F(I,ee){return Q(I.type,ee,I.props)}function oe(I){return typeof I=="object"&&I!==null&&I.$$typeof===e}function de(I){var ee={"=":"=0",":":"=2"};return"$"+I.replace(/[=:]/g,function(R){return ee[R]})}var _e=/\/+/g;function be(I,ee){return typeof I=="object"&&I!==null&&I.key!=null?de(""+I.key):ee.toString(36)}function ge(I){switch(I.status){case"fulfilled":return I.value;case"rejected":throw I.reason;default:switch(typeof I.status=="string"?I.then(_,_):(I.status="pending",I.then(function(ee){I.status==="pending"&&(I.status="fulfilled",I.value=ee)},function(ee){I.status==="pending"&&(I.status="rejected",I.reason=ee)})),I.status){case"fulfilled":return I.value;case"rejected":throw I.reason}}throw I}function Z(I,ee,R,me,Oe){var Re=typeof I;(Re==="undefined"||Re==="boolean")&&(I=null);var Be=!1;if(I===null)Be=!0;else switch(Re){case"bigint":case"string":case"number":Be=!0;break;case"object":switch(I.$$typeof){case e:case t:Be=!0;break;case y:return Be=I._init,Z(Be(I._payload),ee,R,me,Oe)}}if(Be)return Oe=Oe(I),Be=me===""?"."+be(I,0):me,te(Oe)?(R="",Be!=null&&(R=Be.replace(_e,"$&/")+"/"),Z(Oe,ee,R,"",function(Ft){return Ft})):Oe!=null&&(oe(Oe)&&(Oe=F(Oe,R+(Oe.key==null||I&&I.key===Oe.key?"":(""+Oe.key).replace(_e,"$&/")+"/")+Be)),ee.push(Oe)),1;Be=0;var ve=me===""?".":me+":";if(te(I))for(var Xe=0;Xe<I.length;Xe++)me=I[Xe],Re=ve+be(me,Xe),Be+=Z(me,ee,R,Re,Oe);else if(Xe=b(I),typeof Xe=="function")for(I=Xe.call(I),Xe=0;!(me=I.next()).done;)me=me.value,Re=ve+be(me,Xe++),Be+=Z(me,ee,R,Re,Oe);else if(Re==="object"){if(typeof I.then=="function")return Z(ge(I),ee,R,me,Oe);throw ee=String(I),Error("Objects are not valid as a React child (found: "+(ee==="[object Object]"?"object with keys {"+Object.keys(I).join(", ")+"}":ee)+"). If you meant to render a collection of children, use an array instead.")}return Be}function le(I,ee,R){if(I==null)return I;var me=[],Oe=0;return Z(I,me,"","",function(Re){return ee.call(R,Re,Oe++)}),me}function Me(I){if(I._status===-1){var ee=I._result;ee=ee(),ee.then(function(R){(I._status===0||I._status===-1)&&(I._status=1,I._result=R)},function(R){(I._status===0||I._status===-1)&&(I._status=2,I._result=R)}),I._status===-1&&(I._status=0,I._result=ee)}if(I._status===1)return I._result.default;throw I._result}var We=typeof reportError=="function"?reportError:function(I){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var ee=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof I=="object"&&I!==null&&typeof I.message=="string"?String(I.message):String(I),error:I});if(!window.dispatchEvent(ee))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",I);return}console.error(I)},H={map:le,forEach:function(I,ee,R){le(I,function(){ee.apply(this,arguments)},R)},count:function(I){var ee=0;return le(I,function(){ee++}),ee},toArray:function(I){return le(I,function(ee){return ee})||[]},only:function(I){if(!oe(I))throw Error("React.Children.only expected to receive a single React element child.");return I}};return ot.Activity=v,ot.Children=H,ot.Component=D,ot.Fragment=n,ot.Profiler=l,ot.PureComponent=L,ot.StrictMode=a,ot.Suspense=h,ot.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=W,ot.__COMPILER_RUNTIME={__proto__:null,c:function(I){return W.H.useMemoCache(I)}},ot.cache=function(I){return function(){return I.apply(null,arguments)}},ot.cacheSignal=function(){return null},ot.cloneElement=function(I,ee,R){if(I==null)throw Error("The argument must be a React element, but you passed "+I+".");var me=N({},I.props),Oe=I.key;if(ee!=null)for(Re in ee.key!==void 0&&(Oe=""+ee.key),ee)!ae.call(ee,Re)||Re==="key"||Re==="__self"||Re==="__source"||Re==="ref"&&ee.ref===void 0||(me[Re]=ee[Re]);var Re=arguments.length-2;if(Re===1)me.children=R;else if(1<Re){for(var Be=Array(Re),ve=0;ve<Re;ve++)Be[ve]=arguments[ve+2];me.children=Be}return Q(I.type,Oe,me)},ot.createContext=function(I){return I={$$typeof:c,_currentValue:I,_currentValue2:I,_threadCount:0,Provider:null,Consumer:null},I.Provider=I,I.Consumer={$$typeof:o,_context:I},I},ot.createElement=function(I,ee,R){var me,Oe={},Re=null;if(ee!=null)for(me in ee.key!==void 0&&(Re=""+ee.key),ee)ae.call(ee,me)&&me!=="key"&&me!=="__self"&&me!=="__source"&&(Oe[me]=ee[me]);var Be=arguments.length-2;if(Be===1)Oe.children=R;else if(1<Be){for(var ve=Array(Be),Xe=0;Xe<Be;Xe++)ve[Xe]=arguments[Xe+2];Oe.children=ve}if(I&&I.defaultProps)for(me in Be=I.defaultProps,Be)Oe[me]===void 0&&(Oe[me]=Be[me]);return Q(I,Re,Oe)},ot.createRef=function(){return{current:null}},ot.forwardRef=function(I){return{$$typeof:f,render:I}},ot.isValidElement=oe,ot.lazy=function(I){return{$$typeof:y,_payload:{_status:-1,_result:I},_init:Me}},ot.memo=function(I,ee){return{$$typeof:m,type:I,compare:ee===void 0?null:ee}},ot.startTransition=function(I){var ee=W.T,R={};W.T=R;try{var me=I(),Oe=W.S;Oe!==null&&Oe(R,me),typeof me=="object"&&me!==null&&typeof me.then=="function"&&me.then(_,We)}catch(Re){We(Re)}finally{ee!==null&&R.types!==null&&(ee.types=R.types),W.T=ee}},ot.unstable_useCacheRefresh=function(){return W.H.useCacheRefresh()},ot.use=function(I){return W.H.use(I)},ot.useActionState=function(I,ee,R){return W.H.useActionState(I,ee,R)},ot.useCallback=function(I,ee){return W.H.useCallback(I,ee)},ot.useContext=function(I){return W.H.useContext(I)},ot.useDebugValue=function(){},ot.useDeferredValue=function(I,ee){return W.H.useDeferredValue(I,ee)},ot.useEffect=function(I,ee){return W.H.useEffect(I,ee)},ot.useEffectEvent=function(I){return W.H.useEffectEvent(I)},ot.useId=function(){return W.H.useId()},ot.useImperativeHandle=function(I,ee,R){return W.H.useImperativeHandle(I,ee,R)},ot.useInsertionEffect=function(I,ee){return W.H.useInsertionEffect(I,ee)},ot.useLayoutEffect=function(I,ee){return W.H.useLayoutEffect(I,ee)},ot.useMemo=function(I,ee){return W.H.useMemo(I,ee)},ot.useOptimistic=function(I,ee){return W.H.useOptimistic(I,ee)},ot.useReducer=function(I,ee,R){return W.H.useReducer(I,ee,R)},ot.useRef=function(I){return W.H.useRef(I)},ot.useState=function(I){return W.H.useState(I)},ot.useSyncExternalStore=function(I,ee,R){return W.H.useSyncExternalStore(I,ee,R)},ot.useTransition=function(){return W.H.useTransition()},ot.version="19.2.7",ot}var q2;function a1(){return q2||(q2=1,cm.exports=db()),cm.exports}var B=a1(),dm={exports:{}},Sc={},fm={exports:{}},hm={};/**
|
|
19
|
-
* @license React
|
|
20
|
-
* scheduler.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 U2;function fb(){return U2||(U2=1,(function(e){function t(Z,le){var Me=Z.length;Z.push(le);e:for(;0<Me;){var We=Me-1>>>1,H=Z[We];if(0<l(H,le))Z[We]=le,Z[Me]=H,Me=We;else break e}}function n(Z){return Z.length===0?null:Z[0]}function a(Z){if(Z.length===0)return null;var le=Z[0],Me=Z.pop();if(Me!==le){Z[0]=Me;e:for(var We=0,H=Z.length,I=H>>>1;We<I;){var ee=2*(We+1)-1,R=Z[ee],me=ee+1,Oe=Z[me];if(0>l(R,Me))me<H&&0>l(Oe,R)?(Z[We]=Oe,Z[me]=Me,We=me):(Z[We]=R,Z[ee]=Me,We=ee);else if(me<H&&0>l(Oe,Me))Z[We]=Oe,Z[me]=Me,We=me;else break e}}return le}function l(Z,le){var Me=Z.sortIndex-le.sortIndex;return Me!==0?Me:Z.id-le.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var c=Date,f=c.now();e.unstable_now=function(){return c.now()-f}}var h=[],m=[],y=1,v=null,k=3,b=!1,T=!1,N=!1,U=!1,D=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,L=typeof setImmediate<"u"?setImmediate:null;function G(Z){for(var le=n(m);le!==null;){if(le.callback===null)a(m);else if(le.startTime<=Z)a(m),le.sortIndex=le.expirationTime,t(h,le);else break;le=n(m)}}function te(Z){if(N=!1,G(Z),!T)if(n(h)!==null)T=!0,_||(_=!0,de());else{var le=n(m);le!==null&&ge(te,le.startTime-Z)}}var _=!1,W=-1,ae=5,Q=-1;function F(){return U?!0:!(e.unstable_now()-Q<ae)}function oe(){if(U=!1,_){var Z=e.unstable_now();Q=Z;var le=!0;try{e:{T=!1,N&&(N=!1,M(W),W=-1),b=!0;var Me=k;try{t:{for(G(Z),v=n(h);v!==null&&!(v.expirationTime>Z&&F());){var We=v.callback;if(typeof We=="function"){v.callback=null,k=v.priorityLevel;var H=We(v.expirationTime<=Z);if(Z=e.unstable_now(),typeof H=="function"){v.callback=H,G(Z),le=!0;break t}v===n(h)&&a(h),G(Z)}else a(h);v=n(h)}if(v!==null)le=!0;else{var I=n(m);I!==null&&ge(te,I.startTime-Z),le=!1}}break e}finally{v=null,k=Me,b=!1}le=void 0}}finally{le?de():_=!1}}}var de;if(typeof L=="function")de=function(){L(oe)};else if(typeof MessageChannel<"u"){var _e=new MessageChannel,be=_e.port2;_e.port1.onmessage=oe,de=function(){be.postMessage(null)}}else de=function(){D(oe,0)};function ge(Z,le){W=D(function(){Z(e.unstable_now())},le)}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"):ae=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 le=3;break;default:le=k}var Me=k;k=le;try{return Z()}finally{k=Me}},e.unstable_requestPaint=function(){U=!0},e.unstable_runWithPriority=function(Z,le){switch(Z){case 1:case 2:case 3:case 4:case 5:break;default:Z=3}var Me=k;k=Z;try{return le()}finally{k=Me}},e.unstable_scheduleCallback=function(Z,le,Me){var We=e.unstable_now();switch(typeof Me=="object"&&Me!==null?(Me=Me.delay,Me=typeof Me=="number"&&0<Me?We+Me:We):Me=We,Z){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=Me+H,Z={id:y++,callback:le,priorityLevel:Z,startTime:Me,expirationTime:H,sortIndex:-1},Me>We?(Z.sortIndex=Me,t(m,Z),n(h)===null&&Z===n(m)&&(N?(M(W),W=-1):N=!0,ge(te,Me-We))):(Z.sortIndex=H,t(h,Z),T||b||(T=!0,_||(_=!0,de()))),Z},e.unstable_shouldYield=F,e.unstable_wrapCallback=function(Z){var le=k;return function(){var Me=k;k=le;try{return Z.apply(this,arguments)}finally{k=Me}}}})(hm)),hm}var H2;function hb(){return H2||(H2=1,fm.exports=fb()),fm.exports}var mm={exports:{}},Pn={};/**
|
|
27
|
-
* @license React
|
|
28
|
-
* react-dom.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 $2;function mb(){if($2)return Pn;$2=1;var e=a1();function t(h){var m="https://react.dev/errors/"+h;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)m+="&args[]="+encodeURIComponent(arguments[y])}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 o(h,m,y){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:l,key:v==null?null:""+v,children:h,containerInfo:m,implementation:y}}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 Pn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,Pn.createPortal=function(h,m){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(t(299));return o(h,m,null,y)},Pn.flushSync=function(h){var m=c.T,y=a.p;try{if(c.T=null,a.p=2,h)return h()}finally{c.T=m,a.p=y,a.d.f()}},Pn.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))},Pn.prefetchDNS=function(h){typeof h=="string"&&a.d.D(h)},Pn.preinit=function(h,m){if(typeof h=="string"&&m&&typeof m.as=="string"){var y=m.as,v=f(y,m.crossOrigin),k=typeof m.integrity=="string"?m.integrity:void 0,b=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;y==="style"?a.d.S(h,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:v,integrity:k,fetchPriority:b}):y==="script"&&a.d.X(h,{crossOrigin:v,integrity:k,fetchPriority:b,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Pn.preinitModule=function(h,m){if(typeof h=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var y=f(m.as,m.crossOrigin);a.d.M(h,{crossOrigin:y,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)},Pn.preload=function(h,m){if(typeof h=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var y=m.as,v=f(y,m.crossOrigin);a.d.L(h,y,{crossOrigin:v,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})}},Pn.preloadModule=function(h,m){if(typeof h=="string")if(m){var y=f(m.as,m.crossOrigin);a.d.m(h,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else a.d.m(h)},Pn.requestFormReset=function(h){a.d.r(h)},Pn.unstable_batchedUpdates=function(h,m){return h(m)},Pn.useFormState=function(h,m,y){return c.H.useFormState(h,m,y)},Pn.useFormStatus=function(){return c.H.useHostTransitionStatus()},Pn.version="19.2.7",Pn}var F2;function pb(){if(F2)return mm.exports;F2=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(),mm.exports=mb(),mm.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 P2;function gb(){if(P2)return Sc;P2=1;var e=hb(),t=a1(),n=pb();function a(r){var i="https://react.dev/errors/"+r;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)i+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+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 o(r){var i=r,s=r;if(r.alternate)for(;i.return;)i=i.return;else{r=i;do i=r,(i.flags&4098)!==0&&(s=i.return),r=i.return;while(r)}return i.tag===3?s: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(o(r)!==r)throw Error(a(188))}function m(r){var i=r.alternate;if(!i){if(i=o(r),i===null)throw Error(a(188));return i!==r?null:r}for(var s=r,d=i;;){var p=s.return;if(p===null)break;var g=p.alternate;if(g===null){if(d=p.return,d!==null){s=d;continue}break}if(p.child===g.child){for(g=p.child;g;){if(g===s)return h(p),r;if(g===d)return h(p),i;g=g.sibling}throw Error(a(188))}if(s.return!==d.return)s=p,d=g;else{for(var C=!1,z=p.child;z;){if(z===s){C=!0,s=p,d=g;break}if(z===d){C=!0,d=p,s=g;break}z=z.sibling}if(!C){for(z=g.child;z;){if(z===s){C=!0,s=g,d=p;break}if(z===d){C=!0,d=g,s=p;break}z=z.sibling}if(!C)throw Error(a(189))}}if(s.alternate!==d)throw Error(a(190))}if(s.tag!==3)throw Error(a(188));return s.stateNode.current===s?r:i}function y(r){var i=r.tag;if(i===5||i===26||i===27||i===6)return r;for(r=r.child;r!==null;){if(i=y(r),i!==null)return i;r=r.sibling}return null}var v=Object.assign,k=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),T=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),U=Symbol.for("react.strict_mode"),D=Symbol.for("react.profiler"),M=Symbol.for("react.consumer"),L=Symbol.for("react.context"),G=Symbol.for("react.forward_ref"),te=Symbol.for("react.suspense"),_=Symbol.for("react.suspense_list"),W=Symbol.for("react.memo"),ae=Symbol.for("react.lazy"),Q=Symbol.for("react.activity"),F=Symbol.for("react.memo_cache_sentinel"),oe=Symbol.iterator;function de(r){return r===null||typeof r!="object"?null:(r=oe&&r[oe]||r["@@iterator"],typeof r=="function"?r:null)}var _e=Symbol.for("react.client.reference");function be(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===_e?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case N:return"Fragment";case D:return"Profiler";case U:return"StrictMode";case te:return"Suspense";case _:return"SuspenseList";case Q:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case T:return"Portal";case L:return r.displayName||"Context";case M:return(r._context.displayName||"Context")+".Consumer";case G:var i=r.render;return r=r.displayName,r||(r=i.displayName||i.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case W:return i=r.displayName||null,i!==null?i:be(r.type)||"Memo";case ae:i=r._payload,r=r._init;try{return be(r(i))}catch{}}return null}var ge=Array.isArray,Z=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,le=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Me={pending:!1,data:null,method:null,action:null},We=[],H=-1;function I(r){return{current:r}}function ee(r){0>H||(r.current=We[H],We[H]=null,H--)}function R(r,i){H++,We[H]=r.current,r.current=i}var me=I(null),Oe=I(null),Re=I(null),Be=I(null);function ve(r,i){switch(R(Re,i),R(Oe,r),R(me,null),i.nodeType){case 9:case 11:r=(r=i.documentElement)&&(r=r.namespaceURI)?a2(r):0;break;default:if(r=i.tagName,i=i.namespaceURI)i=a2(i),r=i2(i,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}ee(me),R(me,r)}function Xe(){ee(me),ee(Oe),ee(Re)}function Ft(r){r.memoizedState!==null&&R(Be,r);var i=me.current,s=i2(i,r.type);i!==s&&(R(Oe,r),R(me,s))}function pn(r){Oe.current===r&&(ee(me),ee(Oe)),Be.current===r&&(ee(Be),vc._currentValue=Me)}var tn,nt;function ue(r){if(tn===void 0)try{throw Error()}catch(s){var i=s.stack.trim().match(/\n( *(at )?)/);tn=i&&i[1]||"",nt=-1<s.stack.indexOf(`
|
|
43
|
-
at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
44
|
-
`+tn+r+nt}var $e=!1;function Ze(r,i){if(!r||$e)return"";$e=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var d={DetermineComponentFrameRoot:function(){try{if(i){var ye=function(){throw Error()};if(Object.defineProperty(ye.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ye,[])}catch(ce){var ie=ce}Reflect.construct(r,[],ye)}else{try{ye.call()}catch(ce){ie=ce}r.call(ye.prototype)}}else{try{throw Error()}catch(ce){ie=ce}(ye=r())&&typeof ye.catch=="function"&&ye.catch(function(){})}}catch(ce){if(ce&&ie&&typeof ce.stack=="string")return[ce.stack,ie.stack]}return[null,null]}};d.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(d.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(d.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var g=d.DetermineComponentFrameRoot(),C=g[0],z=g[1];if(C&&z){var V=C.split(`
|
|
45
|
-
`),re=z.split(`
|
|
46
|
-
`);for(p=d=0;d<V.length&&!V[d].includes("DetermineComponentFrameRoot");)d++;for(;p<re.length&&!re[p].includes("DetermineComponentFrameRoot");)p++;if(d===V.length||p===re.length)for(d=V.length-1,p=re.length-1;1<=d&&0<=p&&V[d]!==re[p];)p--;for(;1<=d&&0<=p;d--,p--)if(V[d]!==re[p]){if(d!==1||p!==1)do if(d--,p--,0>p||V[d]!==re[p]){var he=`
|
|
47
|
-
`+V[d].replace(" at new "," at ");return r.displayName&&he.includes("<anonymous>")&&(he=he.replace("<anonymous>",r.displayName)),he}while(1<=d&&0<=p);break}}}finally{$e=!1,Error.prepareStackTrace=s}return(s=r?r.displayName||r.name:"")?ue(s):""}function Se(r,i){switch(r.tag){case 26:case 27:case 5:return ue(r.type);case 16:return ue("Lazy");case 13:return r.child!==i&&i!==null?ue("Suspense Fallback"):ue("Suspense");case 19:return ue("SuspenseList");case 0:case 15:return Ze(r.type,!1);case 11:return Ze(r.type.render,!1);case 1:return Ze(r.type,!0);case 31:return ue("Activity");default:return""}}function gt(r){try{var i="",s=null;do i+=Se(r,s),s=r,r=r.return;while(r);return i}catch(d){return`
|
|
48
|
-
Error generating stack: `+d.message+`
|
|
49
|
-
`+d.stack}}var st=Object.prototype.hasOwnProperty,pt=e.unstable_scheduleCallback,At=e.unstable_cancelCallback,sn=e.unstable_shouldYield,Kt=e.unstable_requestPaint,dt=e.unstable_now,Kn=e.unstable_getCurrentPriorityLevel,fe=e.unstable_ImmediatePriority,ke=e.unstable_UserBlockingPriority,Fe=e.unstable_NormalPriority,rt=e.unstable_LowPriority,St=e.unstable_IdlePriority,An=e.log,$r=e.unstable_setDisableYieldValue,Dn=null,on=null;function Rn(r){if(typeof An=="function"&&$r(r),on&&typeof on.setStrictMode=="function")try{on.setStrictMode(Dn,r)}catch{}}var _t=Math.clz32?Math.clz32:Bf,un=Math.log,lr=Math.LN2;function Bf(r){return r>>>=0,r===0?32:31-(un(r)/lr|0)|0}var rs=256,ro=262144,ao=4194304;function ei(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 as(r,i,s){var d=r.pendingLanes;if(d===0)return 0;var p=0,g=r.suspendedLanes,C=r.pingedLanes;r=r.warmLanes;var z=d&134217727;return z!==0?(d=z&~g,d!==0?p=ei(d):(C&=z,C!==0?p=ei(C):s||(s=z&~r,s!==0&&(p=ei(s))))):(z=d&~g,z!==0?p=ei(z):C!==0?p=ei(C):s||(s=d&~r,s!==0&&(p=ei(s)))),p===0?0:i!==0&&i!==p&&(i&g)===0&&(g=p&-p,s=i&-i,g>=s||g===32&&(s&4194048)!==0)?i:p}function Gi(r,i){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&i)===0}function xu(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 sr(){var r=ao;return ao<<=1,(ao&62914560)===0&&(ao=4194304),r}function Aa(r){for(var i=[],s=0;31>s;s++)i.push(r);return i}function Lt(r,i){r.pendingLanes|=i,i!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function is(r,i,s,d,p,g){var C=r.pendingLanes;r.pendingLanes=s,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=s,r.entangledLanes&=s,r.errorRecoveryDisabledLanes&=s,r.shellSuspendCounter=0;var z=r.entanglements,V=r.expirationTimes,re=r.hiddenUpdates;for(s=C&~s;0<s;){var he=31-_t(s),ye=1<<he;z[he]=0,V[he]=-1;var ie=re[he];if(ie!==null)for(re[he]=null,he=0;he<ie.length;he++){var ce=ie[he];ce!==null&&(ce.lane&=-536870913)}s&=~ye}d!==0&&bu(r,d,0),g!==0&&p===0&&r.tag!==0&&(r.suspendedLanes|=g&~(C&~i))}function bu(r,i,s){r.pendingLanes|=i,r.suspendedLanes&=~i;var d=31-_t(i);r.entangledLanes|=i,r.entanglements[d]=r.entanglements[d]|1073741824|s&261930}function Vi(r,i){var s=r.entangledLanes|=i;for(r=r.entanglements;s;){var d=31-_t(s),p=1<<d;p&i|r[d]&i&&(r[d]|=i),s&=~p}}function wu(r,i){var s=i&-i;return s=(s&42)!==0?1:ti(s),(s&(r.suspendedLanes|i))!==0?0:s}function ti(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 ku(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function Su(){var r=le.p;return r!==0?r:(r=window.event,r===void 0?32:E2(r.type))}function l0(r,i){var s=le.p;try{return le.p=r,i()}finally{le.p=s}}var ia=Math.random().toString(36).slice(2),En="__reactFiber$"+ia,On="__reactProps$"+ia,Yi="__reactContainer$"+ia,ni="__reactEvents$"+ia,Wi="__reactListeners$"+ia,Ki="__reactHandles$"+ia,ri="__reactResources$"+ia,Fr="__reactMarker$"+ia;function ls(r){delete r[En],delete r[On],delete r[ni],delete r[Wi],delete r[Ki]}function la(r){var i=r[En];if(i)return i;for(var s=r.parentNode;s;){if(i=s[Yi]||s[En]){if(s=i.alternate,i.child!==null||s!==null&&s.child!==null)for(r=f2(r);r!==null;){if(s=r[En])return s;r=f2(r)}return i}r=s,s=r.parentNode}return null}function Xi(r){if(r=r[En]||r[Yi]){var i=r.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return r}return null}function sa(r){var i=r.tag;if(i===5||i===26||i===27||i===6)return r.stateNode;throw Error(a(33))}function Ea(r){var i=r[ri];return i||(i=r[ri]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function cn(r){r[Fr]=!0}var io=new Set,lo={};function ai(r,i){ii(r,i),ii(r+"Capture",i)}function ii(r,i){for(lo[r]=i,r=0;r<i.length;r++)io.add(i[r])}var Na=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]*$"),so={},Cu={};function Lf(r){return st.call(Cu,r)?!0:st.call(so,r)?!1:Na.test(r)?Cu[r]=!0:(so[r]=!0,!1)}function oo(r,i,s){if(Lf(i))if(s===null)r.removeAttribute(i);else{switch(typeof s){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,""+s)}}function li(r,i,s){if(s===null)r.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(i);return}r.setAttribute(i,""+s)}}function Pr(r,i,s,d){if(d===null)r.removeAttribute(s);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(s);return}r.setAttributeNS(i,s,""+d)}}function Ln(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function s0(r){var i=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function o0(r,i,s){var d=Object.getOwnPropertyDescriptor(r.constructor.prototype,i);if(!r.hasOwnProperty(i)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var p=d.get,g=d.set;return Object.defineProperty(r,i,{configurable:!0,get:function(){return p.call(this)},set:function(C){s=""+C,g.call(this,C)}}),Object.defineProperty(r,i,{enumerable:d.enumerable}),{getValue:function(){return s},setValue:function(C){s=""+C},stopTracking:function(){r._valueTracker=null,delete r[i]}}}}function Gr(r){if(!r._valueTracker){var i=s0(r)?"checked":"value";r._valueTracker=o0(r,i,""+r[i])}}function Ma(r){if(!r)return!1;var i=r._valueTracker;if(!i)return!0;var s=i.getValue(),d="";return r&&(d=s0(r)?r.checked?"true":"false":r.value),r=d,r!==s?(i.setValue(r),!0):!1}function uo(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 za=/[\n"\\]/g;function _n(r){return r.replace(za,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function co(r,i,s,d,p,g,C,z){r.name="",C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"?r.type=C:r.removeAttribute("type"),i!=null?C==="number"?(i===0&&r.value===""||r.value!=i)&&(r.value=""+Ln(i)):r.value!==""+Ln(i)&&(r.value=""+Ln(i)):C!=="submit"&&C!=="reset"||r.removeAttribute("value"),i!=null?Tr(r,C,Ln(i)):s!=null?Tr(r,C,Ln(s)):d!=null&&r.removeAttribute("value"),p==null&&g!=null&&(r.defaultChecked=!!g),p!=null&&(r.checked=p&&typeof p!="function"&&typeof p!="symbol"),z!=null&&typeof z!="function"&&typeof z!="symbol"&&typeof z!="boolean"?r.name=""+Ln(z):r.removeAttribute("name")}function Vr(r,i,s,d,p,g,C,z){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(r.type=g),i!=null||s!=null){if(!(g!=="submit"&&g!=="reset"||i!=null)){Gr(r);return}s=s!=null?""+Ln(s):"",i=i!=null?""+Ln(i):s,z||i===r.value||(r.value=i),r.defaultValue=i}d=d??p,d=typeof d!="function"&&typeof d!="symbol"&&!!d,r.checked=z?r.checked:!!d,r.defaultChecked=!!d,C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"&&(r.name=C),Gr(r)}function Tr(r,i,s){i==="number"&&uo(r.ownerDocument)===r||r.defaultValue===""+s||(r.defaultValue=""+s)}function or(r,i,s,d){if(r=r.options,i){i={};for(var p=0;p<s.length;p++)i["$"+s[p]]=!0;for(s=0;s<r.length;s++)p=i.hasOwnProperty("$"+r[s].value),r[s].selected!==p&&(r[s].selected=p),p&&d&&(r[s].defaultSelected=!0)}else{for(s=""+Ln(s),i=null,p=0;p<r.length;p++){if(r[p].value===s){r[p].selected=!0,d&&(r[p].defaultSelected=!0);return}i!==null||r[p].disabled||(i=r[p])}i!==null&&(i.selected=!0)}}function ju(r,i,s){if(i!=null&&(i=""+Ln(i),i!==r.value&&(r.value=i),s==null)){r.defaultValue!==i&&(r.defaultValue=i);return}r.defaultValue=s!=null?""+Ln(s):""}function Qi(r,i,s,d){if(i==null){if(d!=null){if(s!=null)throw Error(a(92));if(ge(d)){if(1<d.length)throw Error(a(93));d=d[0]}s=d}s==null&&(s=""),i=s}s=Ln(i),r.defaultValue=s,d=r.textContent,d===s&&d!==""&&d!==null&&(r.value=d),Gr(r)}function si(r,i){if(i){var s=r.firstChild;if(s&&s===r.lastChild&&s.nodeType===3){s.nodeValue=i;return}}r.textContent=i}var fo=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 u0(r,i,s){var d=i.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?d?r.setProperty(i,""):i==="float"?r.cssFloat="":r[i]="":d?r.setProperty(i,s):typeof s!="number"||s===0||fo.has(i)?i==="float"?r.cssFloat=s:r[i]=(""+s).trim():r[i]=s+"px"}function Zi(r,i,s){if(i!=null&&typeof i!="object")throw Error(a(62));if(r=r.style,s!=null){for(var d in s)!s.hasOwnProperty(d)||i!=null&&i.hasOwnProperty(d)||(d.indexOf("--")===0?r.setProperty(d,""):d==="float"?r.cssFloat="":r[d]="");for(var p in i)d=i[p],i.hasOwnProperty(p)&&s[p]!==d&&u0(r,p,d)}else for(var g in i)i.hasOwnProperty(g)&&u0(r,g,i[g])}function Da(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 Tu=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"]]),ho=/^[\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 ss(r){return ho.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function Xn(){}var ur=null;function Ar(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Ra=null,Yr=null;function Ji(r){var i=Xi(r);if(i&&(r=i.stateNode)){var s=r[On]||null;e:switch(r=i.stateNode,i.type){case"input":if(co(r,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),i=s.name,s.type==="radio"&&i!=null){for(s=r;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+_n(""+i)+'"][type="radio"]'),i=0;i<s.length;i++){var d=s[i];if(d!==r&&d.form===r.form){var p=d[On]||null;if(!p)throw Error(a(90));co(d,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(i=0;i<s.length;i++)d=s[i],d.form===r.form&&Ma(d)}break e;case"textarea":ju(r,s.value,s.defaultValue);break e;case"select":i=s.value,i!=null&&or(r,!!s.multiple,i,!1)}}}var os=!1;function nn(r,i,s){if(os)return r(i,s);os=!0;try{var d=r(i);return d}finally{if(os=!1,(Ra!==null||Yr!==null)&&(nd(),Ra&&(i=Ra,r=Yr,Yr=Ra=null,Ji(i),r)))for(i=0;i<r.length;i++)Ji(r[i])}}function oa(r,i){var s=r.stateNode;if(s===null)return null;var d=s[On]||null;if(d===null)return null;s=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(s&&typeof s!="function")throw Error(a(231,i,typeof s));return s}var ua=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),us=!1;if(ua)try{var el={};Object.defineProperty(el,"passive",{get:function(){us=!0}}),window.addEventListener("test",el,el),window.removeEventListener("test",el,el)}catch{us=!1}var Oa=null,ca=null,mo=null;function c0(){if(mo)return mo;var r,i=ca,s=i.length,d,p="value"in Oa?Oa.value:Oa.textContent,g=p.length;for(r=0;r<s&&i[r]===p[r];r++);var C=s-r;for(d=1;d<=C&&i[s-d]===p[g-d];d++);return mo=p.slice(r,1<d?1-d:void 0)}function po(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 cs(){return!0}function ds(){return!1}function qn(r){function i(s,d,p,g,C){this._reactName=s,this._targetInst=p,this.type=d,this.nativeEvent=g,this.target=C,this.currentTarget=null;for(var z in r)r.hasOwnProperty(z)&&(s=r[z],this[z]=s?s(g):g[z]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?cs:ds,this.isPropagationStopped=ds,this}return v(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=cs)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=cs)},persist:function(){},isPersistent:cs}),i}var da={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},fa=qn(da),_a=v({},da,{view:0,detail:0}),d0=qn(_a),oi,fs,ui,tl=v({},_a,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:il,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!==ui&&(ui&&r.type==="mousemove"?(oi=r.screenX-ui.screenX,fs=r.screenY-ui.screenY):fs=oi=0,ui=r),oi)},movementY:function(r){return"movementY"in r?r.movementY:fs}}),go=qn(tl),hs=v({},tl,{dataTransfer:0}),f0=qn(hs),ms=v({},_a,{relatedTarget:0}),ci=qn(ms),yo=v({},da,{animationName:0,elapsedTime:0,pseudoElement:0}),vo=qn(yo),ps=v({},da,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),nl=qn(ps),rl=v({},da,{data:0}),ha=qn(rl),cr={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},dr={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"},al={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function gs(r){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(r):(r=al[r])?!!i[r]:!1}function il(){return gs}var xo=v({},_a,{key:function(r){if(r.key){var i=cr[r.key]||r.key;if(i!=="Unidentified")return i}return r.type==="keypress"?(r=po(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?dr[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:il,charCode:function(r){return r.type==="keypress"?po(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?po(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),bo=qn(xo),wo=v({},tl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ko=qn(wo),Au=v({},_a,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:il}),So=qn(Au),Qe=v({},da,{propertyName:0,elapsedTime:0,pseudoElement:0}),h0=qn(Qe),Wr=v({},tl,{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}),gn=qn(Wr),Eu=v({},da,{newState:0,oldState:0}),di=qn(Eu),Co=[9,13,27,32],Et=ua&&"CompositionEvent"in window,Kr=null;ua&&"documentMode"in document&&(Kr=document.documentMode);var jo=ua&&"TextEvent"in window&&!Kr,ll=ua&&(!Et||Kr&&8<Kr&&11>=Kr),sl=" ",To=!1;function Ia(r,i){switch(r){case"keyup":return Co.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function m0(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var ol=!1;function ys(r,i){switch(r){case"compositionend":return m0(i);case"keypress":return i.which!==32?null:(To=!0,sl);case"textInput":return r=i.data,r===sl&&To?null:r;default:return null}}function p0(r,i){if(ol)return r==="compositionend"||!Et&&Ia(r,i)?(r=c0(),mo=ca=Oa=null,ol=!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 ll&&i.locale!=="ko"?null:i.data;default:return null}}var Nu={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 Ao(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i==="input"?!!Nu[r.type]:i==="textarea"}function vs(r,i,s,d){Ra?Yr?Yr.push(d):Yr=[d]:Ra=d,i=ud(i,"onChange"),0<i.length&&(s=new fa("onChange","change",null,s,d),r.push({event:s,listeners:i}))}var xs=null,ul=null;function Mu(r){Zg(r,0)}function fi(r){var i=sa(r);if(Ma(i))return r}function g0(r,i){if(r==="change")return i}var cl=!1;if(ua){var zu;if(ua){var Du="oninput"in document;if(!Du){var y0=document.createElement("div");y0.setAttribute("oninput","return;"),Du=typeof y0.oninput=="function"}zu=Du}else zu=!1;cl=zu&&(!document.documentMode||9<document.documentMode)}function Eo(){xs&&(xs.detachEvent("onpropertychange",Ba),ul=xs=null)}function Ba(r){if(r.propertyName==="value"&&fi(ul)){var i=[];vs(i,ul,r,Ar(r)),nn(Mu,i)}}function bs(r,i,s){r==="focusin"?(Eo(),xs=i,ul=s,xs.attachEvent("onpropertychange",Ba)):r==="focusout"&&Eo()}function Pe(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return fi(ul)}function No(r,i){if(r==="click")return fi(i)}function ws(r,i){if(r==="input"||r==="change")return fi(i)}function v0(r,i){return r===i&&(r!==0||1/r===1/i)||r!==r&&i!==i}var Un=typeof Object.is=="function"?Object.is:v0;function hi(r,i){if(Un(r,i))return!0;if(typeof r!="object"||r===null||typeof i!="object"||i===null)return!1;var s=Object.keys(r),d=Object.keys(i);if(s.length!==d.length)return!1;for(d=0;d<s.length;d++){var p=s[d];if(!st.call(i,p)||!Un(r[p],i[p]))return!1}return!0}function x0(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function In(r,i){var s=x0(r);r=0;for(var d;s;){if(s.nodeType===3){if(d=r+s.textContent.length,r<=i&&d>=i)return{node:s,offset:i-r};r=d}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=x0(s)}}function b0(r,i){return r&&i?r===i?!0:r&&r.nodeType===3?!1:i&&i.nodeType===3?b0(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=uo(r.document);i instanceof r.HTMLIFrameElement;){try{var s=typeof i.contentWindow.location.href=="string"}catch{s=!1}if(s)r=i.contentWindow;else break;i=uo(r.document)}return i}function dl(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 qf=ua&&"documentMode"in document&&11>=document.documentMode,mi=null,ks=null,Ss=null,Ru=!1;function Cs(r,i,s){var d=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;Ru||mi==null||mi!==uo(d)||(d=mi,"selectionStart"in d&&dl(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}),Ss&&hi(Ss,d)||(Ss=d,d=ud(ks,"onSelect"),0<d.length&&(i=new fa("onSelect","select",null,i,s),r.push({event:i,listeners:d}),i.target=mi)))}function ma(r,i){var s={};return s[r.toLowerCase()]=i.toLowerCase(),s["Webkit"+r]="webkit"+i,s["Moz"+r]="moz"+i,s}var La={animationend:ma("Animation","AnimationEnd"),animationiteration:ma("Animation","AnimationIteration"),animationstart:ma("Animation","AnimationStart"),transitionrun:ma("Transition","TransitionRun"),transitionstart:ma("Transition","TransitionStart"),transitioncancel:ma("Transition","TransitionCancel"),transitionend:ma("Transition","TransitionEnd")},Ou={},Mo={};ua&&(Mo=document.createElement("div").style,"AnimationEvent"in window||(delete La.animationend.animation,delete La.animationiteration.animation,delete La.animationstart.animation),"TransitionEvent"in window||delete La.transitionend.transition);function pi(r){if(Ou[r])return Ou[r];if(!La[r])return r;var i=La[r],s;for(s in i)if(i.hasOwnProperty(s)&&s in Mo)return Ou[r]=i[s];return r}var k0=pi("animationend"),zo=pi("animationiteration"),_u=pi("animationstart"),Uf=pi("transitionrun"),Hf=pi("transitionstart"),S0=pi("transitioncancel"),C0=pi("transitionend"),j0=new Map,Iu="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(" ");Iu.push("scrollEnd");function Er(r,i){j0.set(r,i),ai(i,[r])}var Do=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)},fr=[],fl=0,Bu=0;function Ro(){for(var r=fl,i=Bu=fl=0;i<r;){var s=fr[i];fr[i++]=null;var d=fr[i];fr[i++]=null;var p=fr[i];fr[i++]=null;var g=fr[i];if(fr[i++]=null,d!==null&&p!==null){var C=d.pending;C===null?p.next=p:(p.next=C.next,C.next=p),d.pending=p}g!==0&&T0(s,p,g)}}function Oo(r,i,s,d){fr[fl++]=r,fr[fl++]=i,fr[fl++]=s,fr[fl++]=d,Bu|=d,r.lanes|=d,r=r.alternate,r!==null&&(r.lanes|=d)}function Lu(r,i,s,d){return Oo(r,i,s,d),_o(r)}function gi(r,i){return Oo(r,null,null,i),_o(r)}function T0(r,i,s){r.lanes|=s;var d=r.alternate;d!==null&&(d.lanes|=s);for(var p=!1,g=r.return;g!==null;)g.childLanes|=s,d=g.alternate,d!==null&&(d.childLanes|=s),g.tag===22&&(r=g.stateNode,r===null||r._visibility&1||(p=!0)),r=g,g=g.return;return r.tag===3?(g=r.stateNode,p&&i!==null&&(p=31-_t(s),r=g.hiddenUpdates,d=r[p],d===null?r[p]=[i]:d.push(i),i.lane=s|536870912),g):null}function _o(r){if(50<dc)throw dc=0,Rh=null,Error(a(185));for(var i=r.return;i!==null;)r=i,i=r.return;return r.tag===3?r.stateNode:null}var hl={};function $f(r,i,s,d){this.tag=r,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Qn(r,i,s,d){return new $f(r,i,s,d)}function qu(r){return r=r.prototype,!(!r||!r.isReactComponent)}function pa(r,i){var s=r.alternate;return s===null?(s=Qn(r.tag,i,r.key,r.mode),s.elementType=r.elementType,s.type=r.type,s.stateNode=r.stateNode,s.alternate=r,r.alternate=s):(s.pendingProps=i,s.type=r.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=r.flags&65011712,s.childLanes=r.childLanes,s.lanes=r.lanes,s.child=r.child,s.memoizedProps=r.memoizedProps,s.memoizedState=r.memoizedState,s.updateQueue=r.updateQueue,i=r.dependencies,s.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},s.sibling=r.sibling,s.index=r.index,s.ref=r.ref,s.refCleanup=r.refCleanup,s}function Uu(r,i){r.flags&=65011714;var s=r.alternate;return s===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=s.childLanes,r.lanes=s.lanes,r.child=s.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=s.memoizedProps,r.memoizedState=s.memoizedState,r.updateQueue=s.updateQueue,r.type=s.type,i=s.dependencies,r.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),r}function Fn(r,i,s,d,p,g){var C=0;if(d=r,typeof r=="function")qu(r)&&(C=1);else if(typeof r=="string")C=Yx(r,s,me.current)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case Q:return r=Qn(31,s,i,p),r.elementType=Q,r.lanes=g,r;case N:return qa(s.children,p,g,i);case U:C=8,p|=24;break;case D:return r=Qn(12,s,i,p|2),r.elementType=D,r.lanes=g,r;case te:return r=Qn(13,s,i,p),r.elementType=te,r.lanes=g,r;case _:return r=Qn(19,s,i,p),r.elementType=_,r.lanes=g,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case L:C=10;break e;case M:C=9;break e;case G:C=11;break e;case W:C=14;break e;case ae:C=16,d=null;break e}C=29,s=Error(a(130,r===null?"null":typeof r,"")),d=null}return i=Qn(C,s,i,p),i.elementType=r,i.type=d,i.lanes=g,i}function qa(r,i,s,d){return r=Qn(7,r,d,i),r.lanes=s,r}function js(r,i,s){return r=Qn(6,r,null,i),r.lanes=s,r}function ml(r){var i=Qn(18,null,null,0);return i.stateNode=r,i}function ga(r,i,s){return i=Qn(4,r.children!==null?r.children:[],r.key,i),i.lanes=s,i.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},i}var A0=new WeakMap;function hr(r,i){if(typeof r=="object"&&r!==null){var s=A0.get(r);return s!==void 0?s:(i={value:r,source:i,stack:gt(i)},A0.set(r,i),i)}return{value:r,source:i,stack:gt(i)}}var pl=[],gl=0,Io=null,yi=0,mr=[],Zn=0,ya=null,Xr=1,Qr="";function va(r,i){pl[gl++]=yi,pl[gl++]=Io,Io=r,yi=i}function vi(r,i,s){mr[Zn++]=Xr,mr[Zn++]=Qr,mr[Zn++]=ya,ya=r;var d=Xr;r=Qr;var p=32-_t(d)-1;d&=~(1<<p),s+=1;var g=32-_t(i)+p;if(30<g){var C=p-p%5;g=(d&(1<<C)-1).toString(32),d>>=C,p-=C,Xr=1<<32-_t(i)+p|s<<p|d,Qr=g+r}else Xr=1<<g|s<<p|d,Qr=r}function yl(r){r.return!==null&&(va(r,1),vi(r,1,0))}function Hu(r){for(;r===Io;)Io=pl[--gl],pl[gl]=null,yi=pl[--gl],pl[gl]=null;for(;r===ya;)ya=mr[--Zn],mr[Zn]=null,Qr=mr[--Zn],mr[Zn]=null,Xr=mr[--Zn],mr[Zn]=null}function $u(r,i){mr[Zn++]=Xr,mr[Zn++]=Qr,mr[Zn++]=ya,Xr=i.id,Qr=i.overflow,ya=r}var xn=null,Pt=null,vt=!1,Ua=null,pr=!1,Fu=Error(a(519));function Ha(r){var i=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ts(hr(i,r)),Fu}function E0(r){var i=r.stateNode,s=r.type,d=r.memoizedProps;switch(i[En]=r,i[On]=d,s){case"dialog":wt("cancel",i),wt("close",i);break;case"iframe":case"object":case"embed":wt("load",i);break;case"video":case"audio":for(s=0;s<hc.length;s++)wt(hc[s],i);break;case"source":wt("error",i);break;case"img":case"image":case"link":wt("error",i),wt("load",i);break;case"details":wt("toggle",i);break;case"input":wt("invalid",i),Vr(i,d.value,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name,!0);break;case"select":wt("invalid",i);break;case"textarea":wt("invalid",i),Qi(i,d.value,d.defaultValue,d.children)}s=d.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||i.textContent===""+s||d.suppressHydrationWarning===!0||n2(i.textContent,s)?(d.popover!=null&&(wt("beforetoggle",i),wt("toggle",i)),d.onScroll!=null&&wt("scroll",i),d.onScrollEnd!=null&&wt("scrollend",i),d.onClick!=null&&(i.onclick=Xn),i=!0):i=!1,i||Ha(r,!0)}function N0(r){for(xn=r.return;xn;)switch(xn.tag){case 5:case 31:case 13:pr=!1;return;case 27:case 3:pr=!0;return;default:xn=xn.return}}function vl(r){if(r!==xn)return!1;if(!vt)return N0(r),vt=!0,!1;var i=r.tag,s;if((s=i!==3&&i!==27)&&((s=i===5)&&(s=r.type,s=!(s!=="form"&&s!=="button")||Wh(r.type,r.memoizedProps)),s=!s),s&&Pt&&Ha(r),N0(r),i===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(317));Pt=d2(r)}else if(i===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(317));Pt=d2(r)}else i===27?(i=Pt,Il(r.type)?(r=Jh,Jh=null,Pt=r):Pt=i):Pt=xn?Jr(r.stateNode.nextSibling):null;return!0}function xi(){Pt=xn=null,vt=!1}function Pu(){var r=Ua;return r!==null&&(br===null?br=r:br.push.apply(br,r),Ua=null),r}function Ts(r){Ua===null?Ua=[r]:Ua.push(r)}var Gu=I(null),bi=null,xa=null;function Nr(r,i,s){R(Gu,i._currentValue),i._currentValue=s}function ba(r){r._currentValue=Gu.current,ee(Gu)}function As(r,i,s){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===s)break;r=r.return}}function Vu(r,i,s,d){var p=r.child;for(p!==null&&(p.return=r);p!==null;){var g=p.dependencies;if(g!==null){var C=p.child;g=g.firstContext;e:for(;g!==null;){var z=g;g=p;for(var V=0;V<i.length;V++)if(z.context===i[V]){g.lanes|=s,z=g.alternate,z!==null&&(z.lanes|=s),As(g.return,s,r),d||(C=null);break e}g=z.next}}else if(p.tag===18){if(C=p.return,C===null)throw Error(a(341));C.lanes|=s,g=C.alternate,g!==null&&(g.lanes|=s),As(C,s,r),C=null}else C=p.child;if(C!==null)C.return=p;else for(C=p;C!==null;){if(C===r){C=null;break}if(p=C.sibling,p!==null){p.return=C.return,C=p;break}C=C.return}p=C}}function xl(r,i,s,d){r=null;for(var p=i,g=!1;p!==null;){if(!g){if((p.flags&524288)!==0)g=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var C=p.alternate;if(C===null)throw Error(a(387));if(C=C.memoizedProps,C!==null){var z=p.type;Un(p.pendingProps.value,C.value)||(r!==null?r.push(z):r=[z])}}else if(p===Be.current){if(C=p.alternate,C===null)throw Error(a(387));C.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(r!==null?r.push(vc):r=[vc])}p=p.return}r!==null&&Vu(i,r,s,d),i.flags|=262144}function $a(r){for(r=r.firstContext;r!==null;){if(!Un(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function wi(r){bi=r,xa=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function Xt(r){return Yu(bi,r)}function bl(r,i){return bi===null&&wi(r),Yu(r,i)}function Yu(r,i){var s=i._currentValue;if(i={context:i,memoizedValue:s,next:null},xa===null){if(r===null)throw Error(a(308));xa=i,r.dependencies={lanes:0,firstContext:i},r.flags|=524288}else xa=xa.next=i;return s}var M0=typeof AbortController<"u"?AbortController:function(){var r=[],i=this.signal={aborted:!1,addEventListener:function(s,d){r.push(d)}};this.abort=function(){i.aborted=!0,r.forEach(function(s){return s()})}},Bo=e.unstable_scheduleCallback,Es=e.unstable_NormalPriority,dn={$$typeof:L,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Wu(){return{controller:new M0,data:new Map,refCount:0}}function Ns(r){r.refCount--,r.refCount===0&&Bo(Es,function(){r.controller.abort()})}var wa=null,Ku=0,ki=0,wl=null;function Ms(r,i){if(wa===null){var s=wa=[];Ku=0,ki=qh(),wl={status:"pending",value:void 0,then:function(d){s.push(d)}}}return Ku++,i.then(kl,kl),i}function kl(){if(--Ku===0&&wa!==null){wl!==null&&(wl.status="fulfilled");var r=wa;wa=null,ki=0,wl=null;for(var i=0;i<r.length;i++)(0,r[i])()}}function zs(r,i){var s=[],d={status:"pending",value:null,reason:null,then:function(p){s.push(p)}};return r.then(function(){d.status="fulfilled",d.value=i;for(var p=0;p<s.length;p++)(0,s[p])(i)},function(p){for(d.status="rejected",d.reason=p,p=0;p<s.length;p++)(0,s[p])(void 0)}),d}var z0=Z.S;Z.S=function(r,i){Tg=dt(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&Ms(r,i),z0!==null&&z0(r,i)};var Si=I(null);function Xu(){var r=Si.current;return r!==null?r:Gt.pooledCache}function Nt(r,i){i===null?R(Si,Si.current):R(Si,i.pool)}function ka(){var r=Xu();return r===null?null:{parent:dn._currentValue,pool:r}}var Sl=Error(a(460)),Jn=Error(a(474)),Lo=Error(a(542)),gr={then:function(){}};function D0(r){return r=r.status,r==="fulfilled"||r==="rejected"}function Qu(r,i,s){switch(s=r[s],s===void 0?r.push(i):s!==i&&(i.then(Xn,Xn),i=s),i.status){case"fulfilled":return i.value;case"rejected":throw r=i.reason,O0(r),r;default:if(typeof i.status=="string")i.then(Xn,Xn);else{if(r=Gt,r!==null&&100<r.shellSuspendCounter)throw Error(a(482));r=i,r.status="pending",r.then(function(d){if(i.status==="pending"){var p=i;p.status="fulfilled",p.value=d}},function(d){if(i.status==="pending"){var p=i;p.status="rejected",p.reason=d}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw r=i.reason,O0(r),r}throw Sa=i,Sl}}function Ci(r){try{var i=r._init;return i(r._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(Sa=s,Sl):s}}var Sa=null;function R0(){if(Sa===null)throw Error(a(459));var r=Sa;return Sa=null,r}function O0(r){if(r===Sl||r===Lo)throw Error(a(483))}var Cl=null,jl=0;function Ds(r){var i=jl;return jl+=1,Cl===null&&(Cl=[]),Qu(Cl,r,i)}function Tl(r,i){i=i.props.ref,r.ref=i!==void 0?i:null}function Rs(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 x(r){function i(J,K){if(r){var ne=J.deletions;ne===null?(J.deletions=[K],J.flags|=16):ne.push(K)}}function s(J,K){if(!r)return null;for(;K!==null;)i(J,K),K=K.sibling;return null}function d(J){for(var K=new Map;J!==null;)J.key!==null?K.set(J.key,J):K.set(J.index,J),J=J.sibling;return K}function p(J,K){return J=pa(J,K),J.index=0,J.sibling=null,J}function g(J,K,ne){return J.index=ne,r?(ne=J.alternate,ne!==null?(ne=ne.index,ne<K?(J.flags|=67108866,K):ne):(J.flags|=67108866,K)):(J.flags|=1048576,K)}function C(J){return r&&J.alternate===null&&(J.flags|=67108866),J}function z(J,K,ne,pe){return K===null||K.tag!==6?(K=js(ne,J.mode,pe),K.return=J,K):(K=p(K,ne),K.return=J,K)}function V(J,K,ne,pe){var Je=ne.type;return Je===N?he(J,K,ne.props.children,pe,ne.key):K!==null&&(K.elementType===Je||typeof Je=="object"&&Je!==null&&Je.$$typeof===ae&&Ci(Je)===K.type)?(K=p(K,ne.props),Tl(K,ne),K.return=J,K):(K=Fn(ne.type,ne.key,ne.props,null,J.mode,pe),Tl(K,ne),K.return=J,K)}function re(J,K,ne,pe){return K===null||K.tag!==4||K.stateNode.containerInfo!==ne.containerInfo||K.stateNode.implementation!==ne.implementation?(K=ga(ne,J.mode,pe),K.return=J,K):(K=p(K,ne.children||[]),K.return=J,K)}function he(J,K,ne,pe,Je){return K===null||K.tag!==7?(K=qa(ne,J.mode,pe,Je),K.return=J,K):(K=p(K,ne),K.return=J,K)}function ye(J,K,ne){if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return K=js(""+K,J.mode,ne),K.return=J,K;if(typeof K=="object"&&K!==null){switch(K.$$typeof){case b:return ne=Fn(K.type,K.key,K.props,null,J.mode,ne),Tl(ne,K),ne.return=J,ne;case T:return K=ga(K,J.mode,ne),K.return=J,K;case ae:return K=Ci(K),ye(J,K,ne)}if(ge(K)||de(K))return K=qa(K,J.mode,ne,null),K.return=J,K;if(typeof K.then=="function")return ye(J,Ds(K),ne);if(K.$$typeof===L)return ye(J,bl(J,K),ne);Rs(J,K)}return null}function ie(J,K,ne,pe){var Je=K!==null?K.key:null;if(typeof ne=="string"&&ne!==""||typeof ne=="number"||typeof ne=="bigint")return Je!==null?null:z(J,K,""+ne,pe);if(typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case b:return ne.key===Je?V(J,K,ne,pe):null;case T:return ne.key===Je?re(J,K,ne,pe):null;case ae:return ne=Ci(ne),ie(J,K,ne,pe)}if(ge(ne)||de(ne))return Je!==null?null:he(J,K,ne,pe,null);if(typeof ne.then=="function")return ie(J,K,Ds(ne),pe);if(ne.$$typeof===L)return ie(J,K,bl(J,ne),pe);Rs(J,ne)}return null}function ce(J,K,ne,pe,Je){if(typeof pe=="string"&&pe!==""||typeof pe=="number"||typeof pe=="bigint")return J=J.get(ne)||null,z(K,J,""+pe,Je);if(typeof pe=="object"&&pe!==null){switch(pe.$$typeof){case b:return J=J.get(pe.key===null?ne:pe.key)||null,V(K,J,pe,Je);case T:return J=J.get(pe.key===null?ne:pe.key)||null,re(K,J,pe,Je);case ae:return pe=Ci(pe),ce(J,K,ne,pe,Je)}if(ge(pe)||de(pe))return J=J.get(ne)||null,he(K,J,pe,Je,null);if(typeof pe.then=="function")return ce(J,K,ne,Ds(pe),Je);if(pe.$$typeof===L)return ce(J,K,ne,bl(K,pe),Je);Rs(K,pe)}return null}function Ge(J,K,ne,pe){for(var Je=null,Mt=null,Ye=K,ft=K=0,jt=null;Ye!==null&&ft<ne.length;ft++){Ye.index>ft?(jt=Ye,Ye=null):jt=Ye.sibling;var zt=ie(J,Ye,ne[ft],pe);if(zt===null){Ye===null&&(Ye=jt);break}r&&Ye&&zt.alternate===null&&i(J,Ye),K=g(zt,K,ft),Mt===null?Je=zt:Mt.sibling=zt,Mt=zt,Ye=jt}if(ft===ne.length)return s(J,Ye),vt&&va(J,ft),Je;if(Ye===null){for(;ft<ne.length;ft++)Ye=ye(J,ne[ft],pe),Ye!==null&&(K=g(Ye,K,ft),Mt===null?Je=Ye:Mt.sibling=Ye,Mt=Ye);return vt&&va(J,ft),Je}for(Ye=d(Ye);ft<ne.length;ft++)jt=ce(Ye,J,ft,ne[ft],pe),jt!==null&&(r&&jt.alternate!==null&&Ye.delete(jt.key===null?ft:jt.key),K=g(jt,K,ft),Mt===null?Je=jt:Mt.sibling=jt,Mt=jt);return r&&Ye.forEach(function(Hl){return i(J,Hl)}),vt&&va(J,ft),Je}function tt(J,K,ne,pe){if(ne==null)throw Error(a(151));for(var Je=null,Mt=null,Ye=K,ft=K=0,jt=null,zt=ne.next();Ye!==null&&!zt.done;ft++,zt=ne.next()){Ye.index>ft?(jt=Ye,Ye=null):jt=Ye.sibling;var Hl=ie(J,Ye,zt.value,pe);if(Hl===null){Ye===null&&(Ye=jt);break}r&&Ye&&Hl.alternate===null&&i(J,Ye),K=g(Hl,K,ft),Mt===null?Je=Hl:Mt.sibling=Hl,Mt=Hl,Ye=jt}if(zt.done)return s(J,Ye),vt&&va(J,ft),Je;if(Ye===null){for(;!zt.done;ft++,zt=ne.next())zt=ye(J,zt.value,pe),zt!==null&&(K=g(zt,K,ft),Mt===null?Je=zt:Mt.sibling=zt,Mt=zt);return vt&&va(J,ft),Je}for(Ye=d(Ye);!zt.done;ft++,zt=ne.next())zt=ce(Ye,J,ft,zt.value,pe),zt!==null&&(r&&zt.alternate!==null&&Ye.delete(zt.key===null?ft:zt.key),K=g(zt,K,ft),Mt===null?Je=zt:Mt.sibling=zt,Mt=zt);return r&&Ye.forEach(function(ab){return i(J,ab)}),vt&&va(J,ft),Je}function $t(J,K,ne,pe){if(typeof ne=="object"&&ne!==null&&ne.type===N&&ne.key===null&&(ne=ne.props.children),typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case b:e:{for(var Je=ne.key;K!==null;){if(K.key===Je){if(Je=ne.type,Je===N){if(K.tag===7){s(J,K.sibling),pe=p(K,ne.props.children),pe.return=J,J=pe;break e}}else if(K.elementType===Je||typeof Je=="object"&&Je!==null&&Je.$$typeof===ae&&Ci(Je)===K.type){s(J,K.sibling),pe=p(K,ne.props),Tl(pe,ne),pe.return=J,J=pe;break e}s(J,K);break}else i(J,K);K=K.sibling}ne.type===N?(pe=qa(ne.props.children,J.mode,pe,ne.key),pe.return=J,J=pe):(pe=Fn(ne.type,ne.key,ne.props,null,J.mode,pe),Tl(pe,ne),pe.return=J,J=pe)}return C(J);case T:e:{for(Je=ne.key;K!==null;){if(K.key===Je)if(K.tag===4&&K.stateNode.containerInfo===ne.containerInfo&&K.stateNode.implementation===ne.implementation){s(J,K.sibling),pe=p(K,ne.children||[]),pe.return=J,J=pe;break e}else{s(J,K);break}else i(J,K);K=K.sibling}pe=ga(ne,J.mode,pe),pe.return=J,J=pe}return C(J);case ae:return ne=Ci(ne),$t(J,K,ne,pe)}if(ge(ne))return Ge(J,K,ne,pe);if(de(ne)){if(Je=de(ne),typeof Je!="function")throw Error(a(150));return ne=Je.call(ne),tt(J,K,ne,pe)}if(typeof ne.then=="function")return $t(J,K,Ds(ne),pe);if(ne.$$typeof===L)return $t(J,K,bl(J,ne),pe);Rs(J,ne)}return typeof ne=="string"&&ne!==""||typeof ne=="number"||typeof ne=="bigint"?(ne=""+ne,K!==null&&K.tag===6?(s(J,K.sibling),pe=p(K,ne),pe.return=J,J=pe):(s(J,K),pe=js(ne,J.mode,pe),pe.return=J,J=pe),C(J)):s(J,K)}return function(J,K,ne,pe){try{jl=0;var Je=$t(J,K,ne,pe);return Cl=null,Je}catch(Ye){if(Ye===Sl||Ye===Lo)throw Ye;var Mt=Qn(29,Ye,null,J.mode);return Mt.lanes=pe,Mt.return=J,Mt}finally{}}}var j=x(!0),E=x(!1),q=!1;function Y(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function se(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 we(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function qe(r,i,s){var d=r.updateQueue;if(d===null)return null;if(d=d.shared,(Dt&2)!==0){var p=d.pending;return p===null?i.next=i:(i.next=p.next,p.next=i),d.pending=i,i=_o(r),T0(r,null,s),i}return Oo(r,d,i,s),_o(r)}function De(r,i,s){if(i=i.updateQueue,i!==null&&(i=i.shared,(s&4194048)!==0)){var d=i.lanes;d&=r.pendingLanes,s|=d,i.lanes=s,Vi(r,s)}}function Le(r,i){var s=r.updateQueue,d=r.alternate;if(d!==null&&(d=d.updateQueue,s===d)){var p=null,g=null;if(s=s.firstBaseUpdate,s!==null){do{var C={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};g===null?p=g=C:g=g.next=C,s=s.next}while(s!==null);g===null?p=g=i:g=g.next=i}else p=g=i;s={baseState:d.baseState,firstBaseUpdate:p,lastBaseUpdate:g,shared:d.shared,callbacks:d.callbacks},r.updateQueue=s;return}r=s.lastBaseUpdate,r===null?s.firstBaseUpdate=i:r.next=i,s.lastBaseUpdate=i}var qt=!1;function yt(){if(qt){var r=wl;if(r!==null)throw r}}function ji(r,i,s,d){qt=!1;var p=r.updateQueue;q=!1;var g=p.firstBaseUpdate,C=p.lastBaseUpdate,z=p.shared.pending;if(z!==null){p.shared.pending=null;var V=z,re=V.next;V.next=null,C===null?g=re:C.next=re,C=V;var he=r.alternate;he!==null&&(he=he.updateQueue,z=he.lastBaseUpdate,z!==C&&(z===null?he.firstBaseUpdate=re:z.next=re,he.lastBaseUpdate=V))}if(g!==null){var ye=p.baseState;C=0,he=re=V=null,z=g;do{var ie=z.lane&-536870913,ce=ie!==z.lane;if(ce?(Ct&ie)===ie:(d&ie)===ie){ie!==0&&ie===ki&&(qt=!0),he!==null&&(he=he.next={lane:0,tag:z.tag,payload:z.payload,callback:null,next:null});e:{var Ge=r,tt=z;ie=i;var $t=s;switch(tt.tag){case 1:if(Ge=tt.payload,typeof Ge=="function"){ye=Ge.call($t,ye,ie);break e}ye=Ge;break e;case 3:Ge.flags=Ge.flags&-65537|128;case 0:if(Ge=tt.payload,ie=typeof Ge=="function"?Ge.call($t,ye,ie):Ge,ie==null)break e;ye=v({},ye,ie);break e;case 2:q=!0}}ie=z.callback,ie!==null&&(r.flags|=64,ce&&(r.flags|=8192),ce=p.callbacks,ce===null?p.callbacks=[ie]:ce.push(ie))}else ce={lane:ie,tag:z.tag,payload:z.payload,callback:z.callback,next:null},he===null?(re=he=ce,V=ye):he=he.next=ce,C|=ie;if(z=z.next,z===null){if(z=p.shared.pending,z===null)break;ce=z,z=ce.next,ce.next=null,p.lastBaseUpdate=ce,p.shared.pending=null}}while(!0);he===null&&(V=ye),p.baseState=V,p.firstBaseUpdate=re,p.lastBaseUpdate=he,g===null&&(p.shared.lanes=0),zl|=C,r.lanes=C,r.memoizedState=ye}}function Zu(r,i){if(typeof r!="function")throw Error(a(191,r));r.call(i)}function Z1(r,i){var s=r.callbacks;if(s!==null)for(r.callbacks=null,r=0;r<s.length;r++)Zu(s[r],i)}var qo=I(null),_0=I(0);function J1(r,i){r=Oi,R(_0,r),R(qo,i),Oi=r|i.baseLanes}function Ff(){R(_0,Oi),R(qo,qo.current)}function Pf(){Oi=_0.current,ee(qo),ee(_0)}var Mr=I(null),Zr=null;function Al(r){var i=r.alternate;R(yn,yn.current&1),R(Mr,r),Zr===null&&(i===null||qo.current!==null||i.memoizedState!==null)&&(Zr=r)}function Gf(r){R(yn,yn.current),R(Mr,r),Zr===null&&(Zr=r)}function e4(r){r.tag===22?(R(yn,yn.current),R(Mr,r),Zr===null&&(Zr=r)):El()}function El(){R(yn,yn.current),R(Mr,Mr.current)}function zr(r){ee(Mr),Zr===r&&(Zr=null),ee(yn)}var yn=I(0);function I0(r){for(var i=r;i!==null;){if(i.tag===13){var s=i.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||Qh(s)||Zh(s)))return i}else if(i.tag===19&&(i.memoizedProps.revealOrder==="forwards"||i.memoizedProps.revealOrder==="backwards"||i.memoizedProps.revealOrder==="unstable_legacy-backwards"||i.memoizedProps.revealOrder==="together")){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===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 Ti=0,ct=null,Ut=null,bn=null,B0=!1,Uo=!1,Os=!1,L0=0,Ju=0,Ho=null,W7=0;function fn(){throw Error(a(321))}function Vf(r,i){if(i===null)return!1;for(var s=0;s<i.length&&s<r.length;s++)if(!Un(r[s],i[s]))return!1;return!0}function Yf(r,i,s,d,p,g){return Ti=g,ct=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,Z.H=r===null||r.memoizedState===null?B4:oh,Os=!1,g=s(d,p),Os=!1,Uo&&(g=n4(i,s,d,p)),t4(r),g}function t4(r){Z.H=nc;var i=Ut!==null&&Ut.next!==null;if(Ti=0,bn=Ut=ct=null,B0=!1,Ju=0,Ho=null,i)throw Error(a(300));r===null||wn||(r=r.dependencies,r!==null&&$a(r)&&(wn=!0))}function n4(r,i,s,d){ct=r;var p=0;do{if(Uo&&(Ho=null),Ju=0,Uo=!1,25<=p)throw Error(a(301));if(p+=1,bn=Ut=null,r.updateQueue!=null){var g=r.updateQueue;g.lastEffect=null,g.events=null,g.stores=null,g.memoCache!=null&&(g.memoCache.index=0)}Z.H=L4,g=i(s,d)}while(Uo);return g}function K7(){var r=Z.H,i=r.useState()[0];return i=typeof i.then=="function"?ec(i):i,r=r.useState()[0],(Ut!==null?Ut.memoizedState:null)!==r&&(ct.flags|=1024),i}function Wf(){var r=L0!==0;return L0=0,r}function Kf(r,i,s){i.updateQueue=r.updateQueue,i.flags&=-2053,r.lanes&=~s}function Xf(r){if(B0){for(r=r.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}B0=!1}Ti=0,bn=Ut=ct=null,Uo=!1,Ju=L0=0,Ho=null}function er(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return bn===null?ct.memoizedState=bn=r:bn=bn.next=r,bn}function vn(){if(Ut===null){var r=ct.alternate;r=r!==null?r.memoizedState:null}else r=Ut.next;var i=bn===null?ct.memoizedState:bn.next;if(i!==null)bn=i,Ut=r;else{if(r===null)throw ct.alternate===null?Error(a(467)):Error(a(310));Ut=r,r={memoizedState:Ut.memoizedState,baseState:Ut.baseState,baseQueue:Ut.baseQueue,queue:Ut.queue,next:null},bn===null?ct.memoizedState=bn=r:bn=bn.next=r}return bn}function q0(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ec(r){var i=Ju;return Ju+=1,Ho===null&&(Ho=[]),r=Qu(Ho,r,i),i=ct,(bn===null?i.memoizedState:bn.next)===null&&(i=i.alternate,Z.H=i===null||i.memoizedState===null?B4:oh),r}function U0(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return ec(r);if(r.$$typeof===L)return Xt(r)}throw Error(a(438,String(r)))}function Qf(r){var i=null,s=ct.updateQueue;if(s!==null&&(i=s.memoCache),i==null){var d=ct.alternate;d!==null&&(d=d.updateQueue,d!==null&&(d=d.memoCache,d!=null&&(i={data:d.data.map(function(p){return p.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),s===null&&(s=q0(),ct.updateQueue=s),s.memoCache=i,s=i.data[i.index],s===void 0)for(s=i.data[i.index]=Array(r),d=0;d<r;d++)s[d]=F;return i.index++,s}function Ai(r,i){return typeof i=="function"?i(r):i}function H0(r){var i=vn();return Zf(i,Ut,r)}function Zf(r,i,s){var d=r.queue;if(d===null)throw Error(a(311));d.lastRenderedReducer=s;var p=r.baseQueue,g=d.pending;if(g!==null){if(p!==null){var C=p.next;p.next=g.next,g.next=C}i.baseQueue=p=g,d.pending=null}if(g=r.baseState,p===null)r.memoizedState=g;else{i=p.next;var z=C=null,V=null,re=i,he=!1;do{var ye=re.lane&-536870913;if(ye!==re.lane?(Ct&ye)===ye:(Ti&ye)===ye){var ie=re.revertLane;if(ie===0)V!==null&&(V=V.next={lane:0,revertLane:0,gesture:null,action:re.action,hasEagerState:re.hasEagerState,eagerState:re.eagerState,next:null}),ye===ki&&(he=!0);else if((Ti&ie)===ie){re=re.next,ie===ki&&(he=!0);continue}else ye={lane:0,revertLane:re.revertLane,gesture:null,action:re.action,hasEagerState:re.hasEagerState,eagerState:re.eagerState,next:null},V===null?(z=V=ye,C=g):V=V.next=ye,ct.lanes|=ie,zl|=ie;ye=re.action,Os&&s(g,ye),g=re.hasEagerState?re.eagerState:s(g,ye)}else ie={lane:ye,revertLane:re.revertLane,gesture:re.gesture,action:re.action,hasEagerState:re.hasEagerState,eagerState:re.eagerState,next:null},V===null?(z=V=ie,C=g):V=V.next=ie,ct.lanes|=ye,zl|=ye;re=re.next}while(re!==null&&re!==i);if(V===null?C=g:V.next=z,!Un(g,r.memoizedState)&&(wn=!0,he&&(s=wl,s!==null)))throw s;r.memoizedState=g,r.baseState=C,r.baseQueue=V,d.lastRenderedState=g}return p===null&&(d.lanes=0),[r.memoizedState,d.dispatch]}function Jf(r){var i=vn(),s=i.queue;if(s===null)throw Error(a(311));s.lastRenderedReducer=r;var d=s.dispatch,p=s.pending,g=i.memoizedState;if(p!==null){s.pending=null;var C=p=p.next;do g=r(g,C.action),C=C.next;while(C!==p);Un(g,i.memoizedState)||(wn=!0),i.memoizedState=g,i.baseQueue===null&&(i.baseState=g),s.lastRenderedState=g}return[g,d]}function r4(r,i,s){var d=ct,p=vn(),g=vt;if(g){if(s===void 0)throw Error(a(407));s=s()}else s=i();var C=!Un((Ut||p).memoizedState,s);if(C&&(p.memoizedState=s,wn=!0),p=p.queue,nh(l4.bind(null,d,p,r),[r]),p.getSnapshot!==i||C||bn!==null&&bn.memoizedState.tag&1){if(d.flags|=2048,$o(9,{destroy:void 0},i4.bind(null,d,p,s,i),null),Gt===null)throw Error(a(349));g||(Ti&127)!==0||a4(d,i,s)}return s}function a4(r,i,s){r.flags|=16384,r={getSnapshot:i,value:s},i=ct.updateQueue,i===null?(i=q0(),ct.updateQueue=i,i.stores=[r]):(s=i.stores,s===null?i.stores=[r]:s.push(r))}function i4(r,i,s,d){i.value=s,i.getSnapshot=d,s4(i)&&o4(r)}function l4(r,i,s){return s(function(){s4(i)&&o4(r)})}function s4(r){var i=r.getSnapshot;r=r.value;try{var s=i();return!Un(r,s)}catch{return!0}}function o4(r){var i=gi(r,2);i!==null&&wr(i,r,2)}function eh(r){var i=er();if(typeof r=="function"){var s=r;if(r=s(),Os){Rn(!0);try{s()}finally{Rn(!1)}}}return i.memoizedState=i.baseState=r,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ai,lastRenderedState:r},i}function u4(r,i,s,d){return r.baseState=s,Zf(r,Ut,typeof d=="function"?d:Ai)}function X7(r,i,s,d,p){if(P0(r))throw Error(a(485));if(r=i.action,r!==null){var g={payload:p,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(C){g.listeners.push(C)}};Z.T!==null?s(!0):g.isTransition=!1,d(g),s=i.pending,s===null?(g.next=i.pending=g,c4(i,g)):(g.next=s.next,i.pending=s.next=g)}}function c4(r,i){var s=i.action,d=i.payload,p=r.state;if(i.isTransition){var g=Z.T,C={};Z.T=C;try{var z=s(p,d),V=Z.S;V!==null&&V(C,z),d4(r,i,z)}catch(re){th(r,i,re)}finally{g!==null&&C.types!==null&&(g.types=C.types),Z.T=g}}else try{g=s(p,d),d4(r,i,g)}catch(re){th(r,i,re)}}function d4(r,i,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(d){f4(r,i,d)},function(d){return th(r,i,d)}):f4(r,i,s)}function f4(r,i,s){i.status="fulfilled",i.value=s,h4(i),r.state=s,i=r.pending,i!==null&&(s=i.next,s===i?r.pending=null:(s=s.next,i.next=s,c4(r,s)))}function th(r,i,s){var d=r.pending;if(r.pending=null,d!==null){d=d.next;do i.status="rejected",i.reason=s,h4(i),i=i.next;while(i!==d)}r.action=null}function h4(r){r=r.listeners;for(var i=0;i<r.length;i++)(0,r[i])()}function m4(r,i){return i}function p4(r,i){if(vt){var s=Gt.formState;if(s!==null){e:{var d=ct;if(vt){if(Pt){t:{for(var p=Pt,g=pr;p.nodeType!==8;){if(!g){p=null;break t}if(p=Jr(p.nextSibling),p===null){p=null;break t}}g=p.data,p=g==="F!"||g==="F"?p:null}if(p){Pt=Jr(p.nextSibling),d=p.data==="F!";break e}}Ha(d)}d=!1}d&&(i=s[0])}}return s=er(),s.memoizedState=s.baseState=i,d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:m4,lastRenderedState:i},s.queue=d,s=O4.bind(null,ct,d),d.dispatch=s,d=eh(!1),g=sh.bind(null,ct,!1,d.queue),d=er(),p={state:i,dispatch:null,action:r,pending:null},d.queue=p,s=X7.bind(null,ct,p,g,s),p.dispatch=s,d.memoizedState=r,[i,s,!1]}function g4(r){var i=vn();return y4(i,Ut,r)}function y4(r,i,s){if(i=Zf(r,i,m4)[0],r=H0(Ai)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var d=ec(i)}catch(C){throw C===Sl?Lo:C}else d=i;i=vn();var p=i.queue,g=p.dispatch;return s!==i.memoizedState&&(ct.flags|=2048,$o(9,{destroy:void 0},Q7.bind(null,p,s),null)),[d,g,r]}function Q7(r,i){r.action=i}function v4(r){var i=vn(),s=Ut;if(s!==null)return y4(i,s,r);vn(),i=i.memoizedState,s=vn();var d=s.queue.dispatch;return s.memoizedState=r,[i,d,!1]}function $o(r,i,s,d){return r={tag:r,create:s,deps:d,inst:i,next:null},i=ct.updateQueue,i===null&&(i=q0(),ct.updateQueue=i),s=i.lastEffect,s===null?i.lastEffect=r.next=r:(d=s.next,s.next=r,r.next=d,i.lastEffect=r),r}function x4(){return vn().memoizedState}function $0(r,i,s,d){var p=er();ct.flags|=r,p.memoizedState=$o(1|i,{destroy:void 0},s,d===void 0?null:d)}function F0(r,i,s,d){var p=vn();d=d===void 0?null:d;var g=p.memoizedState.inst;Ut!==null&&d!==null&&Vf(d,Ut.memoizedState.deps)?p.memoizedState=$o(i,g,s,d):(ct.flags|=r,p.memoizedState=$o(1|i,g,s,d))}function b4(r,i){$0(8390656,8,r,i)}function nh(r,i){F0(2048,8,r,i)}function Z7(r){ct.flags|=4;var i=ct.updateQueue;if(i===null)i=q0(),ct.updateQueue=i,i.events=[r];else{var s=i.events;s===null?i.events=[r]:s.push(r)}}function w4(r){var i=vn().memoizedState;return Z7({ref:i,nextImpl:r}),function(){if((Dt&2)!==0)throw Error(a(440));return i.impl.apply(void 0,arguments)}}function k4(r,i){return F0(4,2,r,i)}function S4(r,i){return F0(4,4,r,i)}function C4(r,i){if(typeof i=="function"){r=r();var s=i(r);return function(){typeof s=="function"?s():i(null)}}if(i!=null)return r=r(),i.current=r,function(){i.current=null}}function j4(r,i,s){s=s!=null?s.concat([r]):null,F0(4,4,C4.bind(null,i,r),s)}function rh(){}function T4(r,i){var s=vn();i=i===void 0?null:i;var d=s.memoizedState;return i!==null&&Vf(i,d[1])?d[0]:(s.memoizedState=[r,i],r)}function A4(r,i){var s=vn();i=i===void 0?null:i;var d=s.memoizedState;if(i!==null&&Vf(i,d[1]))return d[0];if(d=r(),Os){Rn(!0);try{r()}finally{Rn(!1)}}return s.memoizedState=[d,i],d}function ah(r,i,s){return s===void 0||(Ti&1073741824)!==0&&(Ct&261930)===0?r.memoizedState=i:(r.memoizedState=s,r=Eg(),ct.lanes|=r,zl|=r,s)}function E4(r,i,s,d){return Un(s,i)?s:qo.current!==null?(r=ah(r,s,d),Un(r,i)||(wn=!0),r):(Ti&42)===0||(Ti&1073741824)!==0&&(Ct&261930)===0?(wn=!0,r.memoizedState=s):(r=Eg(),ct.lanes|=r,zl|=r,i)}function N4(r,i,s,d,p){var g=le.p;le.p=g!==0&&8>g?g:8;var C=Z.T,z={};Z.T=z,sh(r,!1,i,s);try{var V=p(),re=Z.S;if(re!==null&&re(z,V),V!==null&&typeof V=="object"&&typeof V.then=="function"){var he=zs(V,d);tc(r,i,he,Or(r))}else tc(r,i,d,Or(r))}catch(ye){tc(r,i,{then:function(){},status:"rejected",reason:ye},Or())}finally{le.p=g,C!==null&&z.types!==null&&(C.types=z.types),Z.T=C}}function J7(){}function ih(r,i,s,d){if(r.tag!==5)throw Error(a(476));var p=M4(r).queue;N4(r,p,i,Me,s===null?J7:function(){return z4(r),s(d)})}function M4(r){var i=r.memoizedState;if(i!==null)return i;i={memoizedState:Me,baseState:Me,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ai,lastRenderedState:Me},next:null};var s={};return i.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ai,lastRenderedState:s},next:null},r.memoizedState=i,r=r.alternate,r!==null&&(r.memoizedState=i),i}function z4(r){var i=M4(r);i.next===null&&(i=r.alternate.memoizedState),tc(r,i.next.queue,{},Or())}function lh(){return Xt(vc)}function D4(){return vn().memoizedState}function R4(){return vn().memoizedState}function ex(r){for(var i=r.return;i!==null;){switch(i.tag){case 24:case 3:var s=Or();r=we(s);var d=qe(i,r,s);d!==null&&(wr(d,i,s),De(d,i,s)),i={cache:Wu()},r.payload=i;return}i=i.return}}function tx(r,i,s){var d=Or();s={lane:d,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},P0(r)?_4(i,s):(s=Lu(r,i,s,d),s!==null&&(wr(s,r,d),I4(s,i,d)))}function O4(r,i,s){var d=Or();tc(r,i,s,d)}function tc(r,i,s,d){var p={lane:d,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(P0(r))_4(i,p);else{var g=r.alternate;if(r.lanes===0&&(g===null||g.lanes===0)&&(g=i.lastRenderedReducer,g!==null))try{var C=i.lastRenderedState,z=g(C,s);if(p.hasEagerState=!0,p.eagerState=z,Un(z,C))return Oo(r,i,p,0),Gt===null&&Ro(),!1}catch{}finally{}if(s=Lu(r,i,p,d),s!==null)return wr(s,r,d),I4(s,i,d),!0}return!1}function sh(r,i,s,d){if(d={lane:2,revertLane:qh(),gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},P0(r)){if(i)throw Error(a(479))}else i=Lu(r,s,d,2),i!==null&&wr(i,r,2)}function P0(r){var i=r.alternate;return r===ct||i!==null&&i===ct}function _4(r,i){Uo=B0=!0;var s=r.pending;s===null?i.next=i:(i.next=s.next,s.next=i),r.pending=i}function I4(r,i,s){if((s&4194048)!==0){var d=i.lanes;d&=r.pendingLanes,s|=d,i.lanes=s,Vi(r,s)}}var nc={readContext:Xt,use:U0,useCallback:fn,useContext:fn,useEffect:fn,useImperativeHandle:fn,useLayoutEffect:fn,useInsertionEffect:fn,useMemo:fn,useReducer:fn,useRef:fn,useState:fn,useDebugValue:fn,useDeferredValue:fn,useTransition:fn,useSyncExternalStore:fn,useId:fn,useHostTransitionStatus:fn,useFormState:fn,useActionState:fn,useOptimistic:fn,useMemoCache:fn,useCacheRefresh:fn};nc.useEffectEvent=fn;var B4={readContext:Xt,use:U0,useCallback:function(r,i){return er().memoizedState=[r,i===void 0?null:i],r},useContext:Xt,useEffect:b4,useImperativeHandle:function(r,i,s){s=s!=null?s.concat([r]):null,$0(4194308,4,C4.bind(null,i,r),s)},useLayoutEffect:function(r,i){return $0(4194308,4,r,i)},useInsertionEffect:function(r,i){$0(4,2,r,i)},useMemo:function(r,i){var s=er();i=i===void 0?null:i;var d=r();if(Os){Rn(!0);try{r()}finally{Rn(!1)}}return s.memoizedState=[d,i],d},useReducer:function(r,i,s){var d=er();if(s!==void 0){var p=s(i);if(Os){Rn(!0);try{s(i)}finally{Rn(!1)}}}else p=i;return d.memoizedState=d.baseState=p,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:p},d.queue=r,r=r.dispatch=tx.bind(null,ct,r),[d.memoizedState,r]},useRef:function(r){var i=er();return r={current:r},i.memoizedState=r},useState:function(r){r=eh(r);var i=r.queue,s=O4.bind(null,ct,i);return i.dispatch=s,[r.memoizedState,s]},useDebugValue:rh,useDeferredValue:function(r,i){var s=er();return ah(s,r,i)},useTransition:function(){var r=eh(!1);return r=N4.bind(null,ct,r.queue,!0,!1),er().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,i,s){var d=ct,p=er();if(vt){if(s===void 0)throw Error(a(407));s=s()}else{if(s=i(),Gt===null)throw Error(a(349));(Ct&127)!==0||a4(d,i,s)}p.memoizedState=s;var g={value:s,getSnapshot:i};return p.queue=g,b4(l4.bind(null,d,g,r),[r]),d.flags|=2048,$o(9,{destroy:void 0},i4.bind(null,d,g,s,i),null),s},useId:function(){var r=er(),i=Gt.identifierPrefix;if(vt){var s=Qr,d=Xr;s=(d&~(1<<32-_t(d)-1)).toString(32)+s,i="_"+i+"R_"+s,s=L0++,0<s&&(i+="H"+s.toString(32)),i+="_"}else s=W7++,i="_"+i+"r_"+s.toString(32)+"_";return r.memoizedState=i},useHostTransitionStatus:lh,useFormState:p4,useActionState:p4,useOptimistic:function(r){var i=er();i.memoizedState=i.baseState=r;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=s,i=sh.bind(null,ct,!0,s),s.dispatch=i,[r,i]},useMemoCache:Qf,useCacheRefresh:function(){return er().memoizedState=ex.bind(null,ct)},useEffectEvent:function(r){var i=er(),s={impl:r};return i.memoizedState=s,function(){if((Dt&2)!==0)throw Error(a(440));return s.impl.apply(void 0,arguments)}}},oh={readContext:Xt,use:U0,useCallback:T4,useContext:Xt,useEffect:nh,useImperativeHandle:j4,useInsertionEffect:k4,useLayoutEffect:S4,useMemo:A4,useReducer:H0,useRef:x4,useState:function(){return H0(Ai)},useDebugValue:rh,useDeferredValue:function(r,i){var s=vn();return E4(s,Ut.memoizedState,r,i)},useTransition:function(){var r=H0(Ai)[0],i=vn().memoizedState;return[typeof r=="boolean"?r:ec(r),i]},useSyncExternalStore:r4,useId:D4,useHostTransitionStatus:lh,useFormState:g4,useActionState:g4,useOptimistic:function(r,i){var s=vn();return u4(s,Ut,r,i)},useMemoCache:Qf,useCacheRefresh:R4};oh.useEffectEvent=w4;var L4={readContext:Xt,use:U0,useCallback:T4,useContext:Xt,useEffect:nh,useImperativeHandle:j4,useInsertionEffect:k4,useLayoutEffect:S4,useMemo:A4,useReducer:Jf,useRef:x4,useState:function(){return Jf(Ai)},useDebugValue:rh,useDeferredValue:function(r,i){var s=vn();return Ut===null?ah(s,r,i):E4(s,Ut.memoizedState,r,i)},useTransition:function(){var r=Jf(Ai)[0],i=vn().memoizedState;return[typeof r=="boolean"?r:ec(r),i]},useSyncExternalStore:r4,useId:D4,useHostTransitionStatus:lh,useFormState:v4,useActionState:v4,useOptimistic:function(r,i){var s=vn();return Ut!==null?u4(s,Ut,r,i):(s.baseState=r,[r,s.queue.dispatch])},useMemoCache:Qf,useCacheRefresh:R4};L4.useEffectEvent=w4;function uh(r,i,s,d){i=r.memoizedState,s=s(d,i),s=s==null?i:v({},i,s),r.memoizedState=s,r.lanes===0&&(r.updateQueue.baseState=s)}var ch={enqueueSetState:function(r,i,s){r=r._reactInternals;var d=Or(),p=we(d);p.payload=i,s!=null&&(p.callback=s),i=qe(r,p,d),i!==null&&(wr(i,r,d),De(i,r,d))},enqueueReplaceState:function(r,i,s){r=r._reactInternals;var d=Or(),p=we(d);p.tag=1,p.payload=i,s!=null&&(p.callback=s),i=qe(r,p,d),i!==null&&(wr(i,r,d),De(i,r,d))},enqueueForceUpdate:function(r,i){r=r._reactInternals;var s=Or(),d=we(s);d.tag=2,i!=null&&(d.callback=i),i=qe(r,d,s),i!==null&&(wr(i,r,s),De(i,r,s))}};function q4(r,i,s,d,p,g,C){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(d,g,C):i.prototype&&i.prototype.isPureReactComponent?!hi(s,d)||!hi(p,g):!0}function U4(r,i,s,d){r=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(s,d),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(s,d),i.state!==r&&ch.enqueueReplaceState(i,i.state,null)}function _s(r,i){var s=i;if("ref"in i){s={};for(var d in i)d!=="ref"&&(s[d]=i[d])}if(r=r.defaultProps){s===i&&(s=v({},s));for(var p in r)s[p]===void 0&&(s[p]=r[p])}return s}function H4(r){Do(r)}function $4(r){console.error(r)}function F4(r){Do(r)}function G0(r,i){try{var s=r.onUncaughtError;s(i.value,{componentStack:i.stack})}catch(d){setTimeout(function(){throw d})}}function P4(r,i,s){try{var d=r.onCaughtError;d(s.value,{componentStack:s.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function dh(r,i,s){return s=we(s),s.tag=3,s.payload={element:null},s.callback=function(){G0(r,i)},s}function G4(r){return r=we(r),r.tag=3,r}function V4(r,i,s,d){var p=s.type.getDerivedStateFromError;if(typeof p=="function"){var g=d.value;r.payload=function(){return p(g)},r.callback=function(){P4(i,s,d)}}var C=s.stateNode;C!==null&&typeof C.componentDidCatch=="function"&&(r.callback=function(){P4(i,s,d),typeof p!="function"&&(Dl===null?Dl=new Set([this]):Dl.add(this));var z=d.stack;this.componentDidCatch(d.value,{componentStack:z!==null?z:""})})}function nx(r,i,s,d,p){if(s.flags|=32768,d!==null&&typeof d=="object"&&typeof d.then=="function"){if(i=s.alternate,i!==null&&xl(i,s,p,!0),s=Mr.current,s!==null){switch(s.tag){case 31:case 13:return Zr===null?rd():s.alternate===null&&hn===0&&(hn=3),s.flags&=-257,s.flags|=65536,s.lanes=p,d===gr?s.flags|=16384:(i=s.updateQueue,i===null?s.updateQueue=new Set([d]):i.add(d),Ih(r,d,p)),!1;case 22:return s.flags|=65536,d===gr?s.flags|=16384:(i=s.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([d])},s.updateQueue=i):(s=i.retryQueue,s===null?i.retryQueue=new Set([d]):s.add(d)),Ih(r,d,p)),!1}throw Error(a(435,s.tag))}return Ih(r,d,p),rd(),!1}if(vt)return i=Mr.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=p,d!==Fu&&(r=Error(a(422),{cause:d}),Ts(hr(r,s)))):(d!==Fu&&(i=Error(a(423),{cause:d}),Ts(hr(i,s))),r=r.current.alternate,r.flags|=65536,p&=-p,r.lanes|=p,d=hr(d,s),p=dh(r.stateNode,d,p),Le(r,p),hn!==4&&(hn=2)),!1;var g=Error(a(520),{cause:d});if(g=hr(g,s),cc===null?cc=[g]:cc.push(g),hn!==4&&(hn=2),i===null)return!0;d=hr(d,s),s=i;do{switch(s.tag){case 3:return s.flags|=65536,r=p&-p,s.lanes|=r,r=dh(s.stateNode,d,r),Le(s,r),!1;case 1:if(i=s.type,g=s.stateNode,(s.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(Dl===null||!Dl.has(g))))return s.flags|=65536,p&=-p,s.lanes|=p,p=G4(p),V4(p,r,s,d),Le(s,p),!1}s=s.return}while(s!==null);return!1}var fh=Error(a(461)),wn=!1;function Hn(r,i,s,d){i.child=r===null?E(i,null,s,d):j(i,r.child,s,d)}function Y4(r,i,s,d,p){s=s.render;var g=i.ref;if("ref"in d){var C={};for(var z in d)z!=="ref"&&(C[z]=d[z])}else C=d;return wi(i),d=Yf(r,i,s,C,g,p),z=Wf(),r!==null&&!wn?(Kf(r,i,p),Ei(r,i,p)):(vt&&z&&yl(i),i.flags|=1,Hn(r,i,d,p),i.child)}function W4(r,i,s,d,p){if(r===null){var g=s.type;return typeof g=="function"&&!qu(g)&&g.defaultProps===void 0&&s.compare===null?(i.tag=15,i.type=g,K4(r,i,g,d,p)):(r=Fn(s.type,null,d,i,i.mode,p),r.ref=i.ref,r.return=i,i.child=r)}if(g=r.child,!bh(r,p)){var C=g.memoizedProps;if(s=s.compare,s=s!==null?s:hi,s(C,d)&&r.ref===i.ref)return Ei(r,i,p)}return i.flags|=1,r=pa(g,d),r.ref=i.ref,r.return=i,i.child=r}function K4(r,i,s,d,p){if(r!==null){var g=r.memoizedProps;if(hi(g,d)&&r.ref===i.ref)if(wn=!1,i.pendingProps=d=g,bh(r,p))(r.flags&131072)!==0&&(wn=!0);else return i.lanes=r.lanes,Ei(r,i,p)}return hh(r,i,s,d,p)}function X4(r,i,s,d){var p=d.children,g=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(g=g!==null?g.baseLanes|s:s,r!==null){for(d=i.child=r.child,p=0;d!==null;)p=p|d.lanes|d.childLanes,d=d.sibling;d=p&~g}else d=0,i.child=null;return Q4(r,i,g,s,d)}if((s&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},r!==null&&Nt(i,g!==null?g.cachePool:null),g!==null?J1(i,g):Ff(),e4(i);else return d=i.lanes=536870912,Q4(r,i,g!==null?g.baseLanes|s:s,s,d)}else g!==null?(Nt(i,g.cachePool),J1(i,g),El(),i.memoizedState=null):(r!==null&&Nt(i,null),Ff(),El());return Hn(r,i,p,s),i.child}function rc(r,i){return r!==null&&r.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function Q4(r,i,s,d,p){var g=Xu();return g=g===null?null:{parent:dn._currentValue,pool:g},i.memoizedState={baseLanes:s,cachePool:g},r!==null&&Nt(i,null),Ff(),e4(i),r!==null&&xl(r,i,d,!0),i.childLanes=p,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 Z4(r,i,s){return j(i,r.child,null,s),r=V0(i,i.pendingProps),r.flags|=2,zr(i),i.memoizedState=null,r}function rx(r,i,s){var d=i.pendingProps,p=(i.flags&128)!==0;if(i.flags&=-129,r===null){if(vt){if(d.mode==="hidden")return r=V0(i,d),i.lanes=536870912,rc(null,r);if(Gf(i),(r=Pt)?(r=c2(r,pr),r=r!==null&&r.data==="&"?r:null,r!==null&&(i.memoizedState={dehydrated:r,treeContext:ya!==null?{id:Xr,overflow:Qr}:null,retryLane:536870912,hydrationErrors:null},s=ml(r),s.return=i,i.child=s,xn=i,Pt=null)):r=null,r===null)throw Ha(i);return i.lanes=536870912,null}return V0(i,d)}var g=r.memoizedState;if(g!==null){var C=g.dehydrated;if(Gf(i),p)if(i.flags&256)i.flags&=-257,i=Z4(r,i,s);else if(i.memoizedState!==null)i.child=r.child,i.flags|=128,i=null;else throw Error(a(558));else if(wn||xl(r,i,s,!1),p=(s&r.childLanes)!==0,wn||p){if(d=Gt,d!==null&&(C=wu(d,s),C!==0&&C!==g.retryLane))throw g.retryLane=C,gi(r,C),wr(d,r,C),fh;rd(),i=Z4(r,i,s)}else r=g.treeContext,Pt=Jr(C.nextSibling),xn=i,vt=!0,Ua=null,pr=!1,r!==null&&$u(i,r),i=V0(i,d),i.flags|=4096;return i}return r=pa(r.child,{mode:d.mode,children:d.children}),r.ref=i.ref,i.child=r,r.return=i,r}function Y0(r,i){var s=i.ref;if(s===null)r!==null&&r.ref!==null&&(i.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(a(284));(r===null||r.ref!==s)&&(i.flags|=4194816)}}function hh(r,i,s,d,p){return wi(i),s=Yf(r,i,s,d,void 0,p),d=Wf(),r!==null&&!wn?(Kf(r,i,p),Ei(r,i,p)):(vt&&d&&yl(i),i.flags|=1,Hn(r,i,s,p),i.child)}function J4(r,i,s,d,p,g){return wi(i),i.updateQueue=null,s=n4(i,d,s,p),t4(r),d=Wf(),r!==null&&!wn?(Kf(r,i,g),Ei(r,i,g)):(vt&&d&&yl(i),i.flags|=1,Hn(r,i,s,g),i.child)}function eg(r,i,s,d,p){if(wi(i),i.stateNode===null){var g=hl,C=s.contextType;typeof C=="object"&&C!==null&&(g=Xt(C)),g=new s(d,g),i.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=ch,i.stateNode=g,g._reactInternals=i,g=i.stateNode,g.props=d,g.state=i.memoizedState,g.refs={},Y(i),C=s.contextType,g.context=typeof C=="object"&&C!==null?Xt(C):hl,g.state=i.memoizedState,C=s.getDerivedStateFromProps,typeof C=="function"&&(uh(i,s,C,d),g.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(C=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),C!==g.state&&ch.enqueueReplaceState(g,g.state,null),ji(i,d,g,p),yt(),g.state=i.memoizedState),typeof g.componentDidMount=="function"&&(i.flags|=4194308),d=!0}else if(r===null){g=i.stateNode;var z=i.memoizedProps,V=_s(s,z);g.props=V;var re=g.context,he=s.contextType;C=hl,typeof he=="object"&&he!==null&&(C=Xt(he));var ye=s.getDerivedStateFromProps;he=typeof ye=="function"||typeof g.getSnapshotBeforeUpdate=="function",z=i.pendingProps!==z,he||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(z||re!==C)&&U4(i,g,d,C),q=!1;var ie=i.memoizedState;g.state=ie,ji(i,d,g,p),yt(),re=i.memoizedState,z||ie!==re||q?(typeof ye=="function"&&(uh(i,s,ye,d),re=i.memoizedState),(V=q||q4(i,s,V,d,ie,re,C))?(he||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount=="function"&&(i.flags|=4194308)):(typeof g.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=d,i.memoizedState=re),g.props=d,g.state=re,g.context=C,d=V):(typeof g.componentDidMount=="function"&&(i.flags|=4194308),d=!1)}else{g=i.stateNode,se(r,i),C=i.memoizedProps,he=_s(s,C),g.props=he,ye=i.pendingProps,ie=g.context,re=s.contextType,V=hl,typeof re=="object"&&re!==null&&(V=Xt(re)),z=s.getDerivedStateFromProps,(re=typeof z=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(C!==ye||ie!==V)&&U4(i,g,d,V),q=!1,ie=i.memoizedState,g.state=ie,ji(i,d,g,p),yt();var ce=i.memoizedState;C!==ye||ie!==ce||q||r!==null&&r.dependencies!==null&&$a(r.dependencies)?(typeof z=="function"&&(uh(i,s,z,d),ce=i.memoizedState),(he=q||q4(i,s,he,d,ie,ce,V)||r!==null&&r.dependencies!==null&&$a(r.dependencies))?(re||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(d,ce,V),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(d,ce,V)),typeof g.componentDidUpdate=="function"&&(i.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof g.componentDidUpdate!="function"||C===r.memoizedProps&&ie===r.memoizedState||(i.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||C===r.memoizedProps&&ie===r.memoizedState||(i.flags|=1024),i.memoizedProps=d,i.memoizedState=ce),g.props=d,g.state=ce,g.context=V,d=he):(typeof g.componentDidUpdate!="function"||C===r.memoizedProps&&ie===r.memoizedState||(i.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||C===r.memoizedProps&&ie===r.memoizedState||(i.flags|=1024),d=!1)}return g=d,Y0(r,i),d=(i.flags&128)!==0,g||d?(g=i.stateNode,s=d&&typeof s.getDerivedStateFromError!="function"?null:g.render(),i.flags|=1,r!==null&&d?(i.child=j(i,r.child,null,p),i.child=j(i,null,s,p)):Hn(r,i,s,p),i.memoizedState=g.state,r=i.child):r=Ei(r,i,p),r}function tg(r,i,s,d){return xi(),i.flags|=256,Hn(r,i,s,d),i.child}var mh={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ph(r){return{baseLanes:r,cachePool:ka()}}function gh(r,i,s){return r=r!==null?r.childLanes&~s:0,i&&(r|=Rr),r}function ng(r,i,s){var d=i.pendingProps,p=!1,g=(i.flags&128)!==0,C;if((C=g)||(C=r!==null&&r.memoizedState===null?!1:(yn.current&2)!==0),C&&(p=!0,i.flags&=-129),C=(i.flags&32)!==0,i.flags&=-33,r===null){if(vt){if(p?Al(i):El(),(r=Pt)?(r=c2(r,pr),r=r!==null&&r.data!=="&"?r:null,r!==null&&(i.memoizedState={dehydrated:r,treeContext:ya!==null?{id:Xr,overflow:Qr}:null,retryLane:536870912,hydrationErrors:null},s=ml(r),s.return=i,i.child=s,xn=i,Pt=null)):r=null,r===null)throw Ha(i);return Zh(r)?i.lanes=32:i.lanes=536870912,null}var z=d.children;return d=d.fallback,p?(El(),p=i.mode,z=W0({mode:"hidden",children:z},p),d=qa(d,p,s,null),z.return=i,d.return=i,z.sibling=d,i.child=z,d=i.child,d.memoizedState=ph(s),d.childLanes=gh(r,C,s),i.memoizedState=mh,rc(null,d)):(Al(i),yh(i,z))}var V=r.memoizedState;if(V!==null&&(z=V.dehydrated,z!==null)){if(g)i.flags&256?(Al(i),i.flags&=-257,i=vh(r,i,s)):i.memoizedState!==null?(El(),i.child=r.child,i.flags|=128,i=null):(El(),z=d.fallback,p=i.mode,d=W0({mode:"visible",children:d.children},p),z=qa(z,p,s,null),z.flags|=2,d.return=i,z.return=i,d.sibling=z,i.child=d,j(i,r.child,null,s),d=i.child,d.memoizedState=ph(s),d.childLanes=gh(r,C,s),i.memoizedState=mh,i=rc(null,d));else if(Al(i),Zh(z)){if(C=z.nextSibling&&z.nextSibling.dataset,C)var re=C.dgst;C=re,d=Error(a(419)),d.stack="",d.digest=C,Ts({value:d,source:null,stack:null}),i=vh(r,i,s)}else if(wn||xl(r,i,s,!1),C=(s&r.childLanes)!==0,wn||C){if(C=Gt,C!==null&&(d=wu(C,s),d!==0&&d!==V.retryLane))throw V.retryLane=d,gi(r,d),wr(C,r,d),fh;Qh(z)||rd(),i=vh(r,i,s)}else Qh(z)?(i.flags|=192,i.child=r.child,i=null):(r=V.treeContext,Pt=Jr(z.nextSibling),xn=i,vt=!0,Ua=null,pr=!1,r!==null&&$u(i,r),i=yh(i,d.children),i.flags|=4096);return i}return p?(El(),z=d.fallback,p=i.mode,V=r.child,re=V.sibling,d=pa(V,{mode:"hidden",children:d.children}),d.subtreeFlags=V.subtreeFlags&65011712,re!==null?z=pa(re,z):(z=qa(z,p,s,null),z.flags|=2),z.return=i,d.return=i,d.sibling=z,i.child=d,rc(null,d),d=i.child,z=r.child.memoizedState,z===null?z=ph(s):(p=z.cachePool,p!==null?(V=dn._currentValue,p=p.parent!==V?{parent:V,pool:V}:p):p=ka(),z={baseLanes:z.baseLanes|s,cachePool:p}),d.memoizedState=z,d.childLanes=gh(r,C,s),i.memoizedState=mh,rc(r.child,d)):(Al(i),s=r.child,r=s.sibling,s=pa(s,{mode:"visible",children:d.children}),s.return=i,s.sibling=null,r!==null&&(C=i.deletions,C===null?(i.deletions=[r],i.flags|=16):C.push(r)),i.child=s,i.memoizedState=null,s)}function yh(r,i){return i=W0({mode:"visible",children:i},r.mode),i.return=r,r.child=i}function W0(r,i){return r=Qn(22,r,null,i),r.lanes=0,r}function vh(r,i,s){return j(i,r.child,null,s),r=yh(i,i.pendingProps.children),r.flags|=2,i.memoizedState=null,r}function rg(r,i,s){r.lanes|=i;var d=r.alternate;d!==null&&(d.lanes|=i),As(r.return,i,s)}function xh(r,i,s,d,p,g){var C=r.memoizedState;C===null?r.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:d,tail:s,tailMode:p,treeForkCount:g}:(C.isBackwards=i,C.rendering=null,C.renderingStartTime=0,C.last=d,C.tail=s,C.tailMode=p,C.treeForkCount=g)}function ag(r,i,s){var d=i.pendingProps,p=d.revealOrder,g=d.tail;d=d.children;var C=yn.current,z=(C&2)!==0;if(z?(C=C&1|2,i.flags|=128):C&=1,R(yn,C),Hn(r,i,d,s),d=vt?yi:0,!z&&r!==null&&(r.flags&128)!==0)e:for(r=i.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&rg(r,s,i);else if(r.tag===19)rg(r,s,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(p){case"forwards":for(s=i.child,p=null;s!==null;)r=s.alternate,r!==null&&I0(r)===null&&(p=s),s=s.sibling;s=p,s===null?(p=i.child,i.child=null):(p=s.sibling,s.sibling=null),xh(i,!1,p,s,g,d);break;case"backwards":case"unstable_legacy-backwards":for(s=null,p=i.child,i.child=null;p!==null;){if(r=p.alternate,r!==null&&I0(r)===null){i.child=p;break}r=p.sibling,p.sibling=s,s=p,p=r}xh(i,!0,s,null,g,d);break;case"together":xh(i,!1,null,null,void 0,d);break;default:i.memoizedState=null}return i.child}function Ei(r,i,s){if(r!==null&&(i.dependencies=r.dependencies),zl|=i.lanes,(s&i.childLanes)===0)if(r!==null){if(xl(r,i,s,!1),(s&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,s=pa(r,r.pendingProps),i.child=s,s.return=i;r.sibling!==null;)r=r.sibling,s=s.sibling=pa(r,r.pendingProps),s.return=i;s.sibling=null}return i.child}function bh(r,i){return(r.lanes&i)!==0?!0:(r=r.dependencies,!!(r!==null&&$a(r)))}function ax(r,i,s){switch(i.tag){case 3:ve(i,i.stateNode.containerInfo),Nr(i,dn,r.memoizedState.cache),xi();break;case 27:case 5:Ft(i);break;case 4:ve(i,i.stateNode.containerInfo);break;case 10:Nr(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,Gf(i),null;break;case 13:var d=i.memoizedState;if(d!==null)return d.dehydrated!==null?(Al(i),i.flags|=128,null):(s&i.child.childLanes)!==0?ng(r,i,s):(Al(i),r=Ei(r,i,s),r!==null?r.sibling:null);Al(i);break;case 19:var p=(r.flags&128)!==0;if(d=(s&i.childLanes)!==0,d||(xl(r,i,s,!1),d=(s&i.childLanes)!==0),p){if(d)return ag(r,i,s);i.flags|=128}if(p=i.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),R(yn,yn.current),d)break;return null;case 22:return i.lanes=0,X4(r,i,s,i.pendingProps);case 24:Nr(i,dn,r.memoizedState.cache)}return Ei(r,i,s)}function ig(r,i,s){if(r!==null)if(r.memoizedProps!==i.pendingProps)wn=!0;else{if(!bh(r,s)&&(i.flags&128)===0)return wn=!1,ax(r,i,s);wn=(r.flags&131072)!==0}else wn=!1,vt&&(i.flags&1048576)!==0&&vi(i,yi,i.index);switch(i.lanes=0,i.tag){case 16:e:{var d=i.pendingProps;if(r=Ci(i.elementType),i.type=r,typeof r=="function")qu(r)?(d=_s(r,d),i.tag=1,i=eg(null,i,r,d,s)):(i.tag=0,i=hh(null,i,r,d,s));else{if(r!=null){var p=r.$$typeof;if(p===G){i.tag=11,i=Y4(null,i,r,d,s);break e}else if(p===W){i.tag=14,i=W4(null,i,r,d,s);break e}}throw i=be(r)||r,Error(a(306,i,""))}}return i;case 0:return hh(r,i,i.type,i.pendingProps,s);case 1:return d=i.type,p=_s(d,i.pendingProps),eg(r,i,d,p,s);case 3:e:{if(ve(i,i.stateNode.containerInfo),r===null)throw Error(a(387));d=i.pendingProps;var g=i.memoizedState;p=g.element,se(r,i),ji(i,d,null,s);var C=i.memoizedState;if(d=C.cache,Nr(i,dn,d),d!==g.cache&&Vu(i,[dn],s,!0),yt(),d=C.element,g.isDehydrated)if(g={element:d,isDehydrated:!1,cache:C.cache},i.updateQueue.baseState=g,i.memoizedState=g,i.flags&256){i=tg(r,i,d,s);break e}else if(d!==p){p=hr(Error(a(424)),i),Ts(p),i=tg(r,i,d,s);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(Pt=Jr(r.firstChild),xn=i,vt=!0,Ua=null,pr=!0,s=E(i,null,d,s),i.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling}else{if(xi(),d===p){i=Ei(r,i,s);break e}Hn(r,i,d,s)}i=i.child}return i;case 26:return Y0(r,i),r===null?(s=g2(i.type,null,i.pendingProps,null))?i.memoizedState=s:vt||(s=i.type,r=i.pendingProps,d=cd(Re.current).createElement(s),d[En]=i,d[On]=r,$n(d,s,r),cn(d),i.stateNode=d):i.memoizedState=g2(i.type,r.memoizedProps,i.pendingProps,r.memoizedState),null;case 27:return Ft(i),r===null&&vt&&(d=i.stateNode=h2(i.type,i.pendingProps,Re.current),xn=i,pr=!0,p=Pt,Il(i.type)?(Jh=p,Pt=Jr(d.firstChild)):Pt=p),Hn(r,i,i.pendingProps.children,s),Y0(r,i),r===null&&(i.flags|=4194304),i.child;case 5:return r===null&&vt&&((p=d=Pt)&&(d=Ox(d,i.type,i.pendingProps,pr),d!==null?(i.stateNode=d,xn=i,Pt=Jr(d.firstChild),pr=!1,p=!0):p=!1),p||Ha(i)),Ft(i),p=i.type,g=i.pendingProps,C=r!==null?r.memoizedProps:null,d=g.children,Wh(p,g)?d=null:C!==null&&Wh(p,C)&&(i.flags|=32),i.memoizedState!==null&&(p=Yf(r,i,K7,null,null,s),vc._currentValue=p),Y0(r,i),Hn(r,i,d,s),i.child;case 6:return r===null&&vt&&((r=s=Pt)&&(s=_x(s,i.pendingProps,pr),s!==null?(i.stateNode=s,xn=i,Pt=null,r=!0):r=!1),r||Ha(i)),null;case 13:return ng(r,i,s);case 4:return ve(i,i.stateNode.containerInfo),d=i.pendingProps,r===null?i.child=j(i,null,d,s):Hn(r,i,d,s),i.child;case 11:return Y4(r,i,i.type,i.pendingProps,s);case 7:return Hn(r,i,i.pendingProps,s),i.child;case 8:return Hn(r,i,i.pendingProps.children,s),i.child;case 12:return Hn(r,i,i.pendingProps.children,s),i.child;case 10:return d=i.pendingProps,Nr(i,i.type,d.value),Hn(r,i,d.children,s),i.child;case 9:return p=i.type._context,d=i.pendingProps.children,wi(i),p=Xt(p),d=d(p),i.flags|=1,Hn(r,i,d,s),i.child;case 14:return W4(r,i,i.type,i.pendingProps,s);case 15:return K4(r,i,i.type,i.pendingProps,s);case 19:return ag(r,i,s);case 31:return rx(r,i,s);case 22:return X4(r,i,s,i.pendingProps);case 24:return wi(i),d=Xt(dn),r===null?(p=Xu(),p===null&&(p=Gt,g=Wu(),p.pooledCache=g,g.refCount++,g!==null&&(p.pooledCacheLanes|=s),p=g),i.memoizedState={parent:d,cache:p},Y(i),Nr(i,dn,p)):((r.lanes&s)!==0&&(se(r,i),ji(i,null,null,s),yt()),p=r.memoizedState,g=i.memoizedState,p.parent!==d?(p={parent:d,cache:d},i.memoizedState=p,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=p),Nr(i,dn,d)):(d=g.cache,Nr(i,dn,d),d!==p.cache&&Vu(i,[dn],s,!0))),Hn(r,i,i.pendingProps.children,s),i.child;case 29:throw i.pendingProps}throw Error(a(156,i.tag))}function Ni(r){r.flags|=4}function wh(r,i,s,d,p){if((i=(r.mode&32)!==0)&&(i=!1),i){if(r.flags|=16777216,(p&335544128)===p)if(r.stateNode.complete)r.flags|=8192;else if(Dg())r.flags|=8192;else throw Sa=gr,Jn}else r.flags&=-16777217}function lg(r,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!w2(i))if(Dg())r.flags|=8192;else throw Sa=gr,Jn}function K0(r,i){i!==null&&(r.flags|=4),r.flags&16384&&(i=r.tag!==22?sr():536870912,r.lanes|=i,Vo|=i)}function ac(r,i){if(!vt)switch(r.tailMode){case"hidden":i=r.tail;for(var s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?r.tail=null:s.sibling=null;break;case"collapsed":s=r.tail;for(var d=null;s!==null;)s.alternate!==null&&(d=s),s=s.sibling;d===null?i||r.tail===null?r.tail=null:r.tail.sibling=null:d.sibling=null}}function Qt(r){var i=r.alternate!==null&&r.alternate.child===r.child,s=0,d=0;if(i)for(var p=r.child;p!==null;)s|=p.lanes|p.childLanes,d|=p.subtreeFlags&65011712,d|=p.flags&65011712,p.return=r,p=p.sibling;else for(p=r.child;p!==null;)s|=p.lanes|p.childLanes,d|=p.subtreeFlags,d|=p.flags,p.return=r,p=p.sibling;return r.subtreeFlags|=d,r.childLanes=s,i}function ix(r,i,s){var d=i.pendingProps;switch(Hu(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Qt(i),null;case 1:return Qt(i),null;case 3:return s=i.stateNode,d=null,r!==null&&(d=r.memoizedState.cache),i.memoizedState.cache!==d&&(i.flags|=2048),ba(dn),Xe(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(r===null||r.child===null)&&(vl(i)?Ni(i):r===null||r.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,Pu())),Qt(i),null;case 26:var p=i.type,g=i.memoizedState;return r===null?(Ni(i),g!==null?(Qt(i),lg(i,g)):(Qt(i),wh(i,p,null,d,s))):g?g!==r.memoizedState?(Ni(i),Qt(i),lg(i,g)):(Qt(i),i.flags&=-16777217):(r=r.memoizedProps,r!==d&&Ni(i),Qt(i),wh(i,p,r,d,s)),null;case 27:if(pn(i),s=Re.current,p=i.type,r!==null&&i.stateNode!=null)r.memoizedProps!==d&&Ni(i);else{if(!d){if(i.stateNode===null)throw Error(a(166));return Qt(i),null}r=me.current,vl(i)?E0(i):(r=h2(p,d,s),i.stateNode=r,Ni(i))}return Qt(i),null;case 5:if(pn(i),p=i.type,r!==null&&i.stateNode!=null)r.memoizedProps!==d&&Ni(i);else{if(!d){if(i.stateNode===null)throw Error(a(166));return Qt(i),null}if(g=me.current,vl(i))E0(i);else{var C=cd(Re.current);switch(g){case 1:g=C.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:g=C.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":g=C.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":g=C.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;case"script":g=C.createElement("div"),g.innerHTML="<script><\/script>",g=g.removeChild(g.firstChild);break;case"select":g=typeof d.is=="string"?C.createElement("select",{is:d.is}):C.createElement("select"),d.multiple?g.multiple=!0:d.size&&(g.size=d.size);break;default:g=typeof d.is=="string"?C.createElement(p,{is:d.is}):C.createElement(p)}}g[En]=i,g[On]=d;e:for(C=i.child;C!==null;){if(C.tag===5||C.tag===6)g.appendChild(C.stateNode);else if(C.tag!==4&&C.tag!==27&&C.child!==null){C.child.return=C,C=C.child;continue}if(C===i)break e;for(;C.sibling===null;){if(C.return===null||C.return===i)break e;C=C.return}C.sibling.return=C.return,C=C.sibling}i.stateNode=g;e:switch($n(g,p,d),p){case"button":case"input":case"select":case"textarea":d=!!d.autoFocus;break e;case"img":d=!0;break e;default:d=!1}d&&Ni(i)}}return Qt(i),wh(i,i.type,r===null?null:r.memoizedProps,i.pendingProps,s),null;case 6:if(r&&i.stateNode!=null)r.memoizedProps!==d&&Ni(i);else{if(typeof d!="string"&&i.stateNode===null)throw Error(a(166));if(r=Re.current,vl(i)){if(r=i.stateNode,s=i.memoizedProps,d=null,p=xn,p!==null)switch(p.tag){case 27:case 5:d=p.memoizedProps}r[En]=i,r=!!(r.nodeValue===s||d!==null&&d.suppressHydrationWarning===!0||n2(r.nodeValue,s)),r||Ha(i,!0)}else r=cd(r).createTextNode(d),r[En]=i,i.stateNode=r}return Qt(i),null;case 31:if(s=i.memoizedState,r===null||r.memoizedState!==null){if(d=vl(i),s!==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[En]=i}else xi(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;Qt(i),r=!1}else s=Pu(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=s),r=!0;if(!r)return i.flags&256?(zr(i),i):(zr(i),null);if((i.flags&128)!==0)throw Error(a(558))}return Qt(i),null;case 13:if(d=i.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(p=vl(i),d!==null&&d.dehydrated!==null){if(r===null){if(!p)throw Error(a(318));if(p=i.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(a(317));p[En]=i}else xi(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;Qt(i),p=!1}else p=Pu(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=p),p=!0;if(!p)return i.flags&256?(zr(i),i):(zr(i),null)}return zr(i),(i.flags&128)!==0?(i.lanes=s,i):(s=d!==null,r=r!==null&&r.memoizedState!==null,s&&(d=i.child,p=null,d.alternate!==null&&d.alternate.memoizedState!==null&&d.alternate.memoizedState.cachePool!==null&&(p=d.alternate.memoizedState.cachePool.pool),g=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(g=d.memoizedState.cachePool.pool),g!==p&&(d.flags|=2048)),s!==r&&s&&(i.child.flags|=8192),K0(i,i.updateQueue),Qt(i),null);case 4:return Xe(),r===null&&Fh(i.stateNode.containerInfo),Qt(i),null;case 10:return ba(i.type),Qt(i),null;case 19:if(ee(yn),d=i.memoizedState,d===null)return Qt(i),null;if(p=(i.flags&128)!==0,g=d.rendering,g===null)if(p)ac(d,!1);else{if(hn!==0||r!==null&&(r.flags&128)!==0)for(r=i.child;r!==null;){if(g=I0(r),g!==null){for(i.flags|=128,ac(d,!1),r=g.updateQueue,i.updateQueue=r,K0(i,r),i.subtreeFlags=0,r=s,s=i.child;s!==null;)Uu(s,r),s=s.sibling;return R(yn,yn.current&1|2),vt&&va(i,d.treeForkCount),i.child}r=r.sibling}d.tail!==null&&dt()>ed&&(i.flags|=128,p=!0,ac(d,!1),i.lanes=4194304)}else{if(!p)if(r=I0(g),r!==null){if(i.flags|=128,p=!0,r=r.updateQueue,i.updateQueue=r,K0(i,r),ac(d,!0),d.tail===null&&d.tailMode==="hidden"&&!g.alternate&&!vt)return Qt(i),null}else 2*dt()-d.renderingStartTime>ed&&s!==536870912&&(i.flags|=128,p=!0,ac(d,!1),i.lanes=4194304);d.isBackwards?(g.sibling=i.child,i.child=g):(r=d.last,r!==null?r.sibling=g:i.child=g,d.last=g)}return d.tail!==null?(r=d.tail,d.rendering=r,d.tail=r.sibling,d.renderingStartTime=dt(),r.sibling=null,s=yn.current,R(yn,p?s&1|2:s&1),vt&&va(i,d.treeForkCount),r):(Qt(i),null);case 22:case 23:return zr(i),Pf(),d=i.memoizedState!==null,r!==null?r.memoizedState!==null!==d&&(i.flags|=8192):d&&(i.flags|=8192),d?(s&536870912)!==0&&(i.flags&128)===0&&(Qt(i),i.subtreeFlags&6&&(i.flags|=8192)):Qt(i),s=i.updateQueue,s!==null&&K0(i,s.retryQueue),s=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(s=r.memoizedState.cachePool.pool),d=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(d=i.memoizedState.cachePool.pool),d!==s&&(i.flags|=2048),r!==null&&ee(Si),null;case 24:return s=null,r!==null&&(s=r.memoizedState.cache),i.memoizedState.cache!==s&&(i.flags|=2048),ba(dn),Qt(i),null;case 25:return null;case 30:return null}throw Error(a(156,i.tag))}function lx(r,i){switch(Hu(i),i.tag){case 1:return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 3:return ba(dn),Xe(),r=i.flags,(r&65536)!==0&&(r&128)===0?(i.flags=r&-65537|128,i):null;case 26:case 27:case 5:return pn(i),null;case 31:if(i.memoizedState!==null){if(zr(i),i.alternate===null)throw Error(a(340));xi()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 13:if(zr(i),r=i.memoizedState,r!==null&&r.dehydrated!==null){if(i.alternate===null)throw Error(a(340));xi()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 19:return ee(yn),null;case 4:return Xe(),null;case 10:return ba(i.type),null;case 22:case 23:return zr(i),Pf(),r!==null&&ee(Si),r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 24:return ba(dn),null;case 25:return null;default:return null}}function sg(r,i){switch(Hu(i),i.tag){case 3:ba(dn),Xe();break;case 26:case 27:case 5:pn(i);break;case 4:Xe();break;case 31:i.memoizedState!==null&&zr(i);break;case 13:zr(i);break;case 19:ee(yn);break;case 10:ba(i.type);break;case 22:case 23:zr(i),Pf(),r!==null&&ee(Si);break;case 24:ba(dn)}}function ic(r,i){try{var s=i.updateQueue,d=s!==null?s.lastEffect:null;if(d!==null){var p=d.next;s=p;do{if((s.tag&r)===r){d=void 0;var g=s.create,C=s.inst;d=g(),C.destroy=d}s=s.next}while(s!==p)}}catch(z){Bt(i,i.return,z)}}function Nl(r,i,s){try{var d=i.updateQueue,p=d!==null?d.lastEffect:null;if(p!==null){var g=p.next;d=g;do{if((d.tag&r)===r){var C=d.inst,z=C.destroy;if(z!==void 0){C.destroy=void 0,p=i;var V=s,re=z;try{re()}catch(he){Bt(p,V,he)}}}d=d.next}while(d!==g)}}catch(he){Bt(i,i.return,he)}}function og(r){var i=r.updateQueue;if(i!==null){var s=r.stateNode;try{Z1(i,s)}catch(d){Bt(r,r.return,d)}}}function ug(r,i,s){s.props=_s(r.type,r.memoizedProps),s.state=r.memoizedState;try{s.componentWillUnmount()}catch(d){Bt(r,i,d)}}function lc(r,i){try{var s=r.ref;if(s!==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 s=="function"?r.refCleanup=s(d):s.current=d}}catch(p){Bt(r,i,p)}}function Fa(r,i){var s=r.ref,d=r.refCleanup;if(s!==null)if(typeof d=="function")try{d()}catch(p){Bt(r,i,p)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(p){Bt(r,i,p)}else s.current=null}function cg(r){var i=r.type,s=r.memoizedProps,d=r.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":s.autoFocus&&d.focus();break e;case"img":s.src?d.src=s.src:s.srcSet&&(d.srcset=s.srcSet)}}catch(p){Bt(r,r.return,p)}}function kh(r,i,s){try{var d=r.stateNode;Ex(d,r.type,s,i),d[On]=i}catch(p){Bt(r,r.return,p)}}function dg(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&Il(r.type)||r.tag===4}function Sh(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||dg(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&&Il(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 Ch(r,i,s){var d=r.tag;if(d===5||d===6)r=r.stateNode,i?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(r,i):(i=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,i.appendChild(r),s=s._reactRootContainer,s!=null||i.onclick!==null||(i.onclick=Xn));else if(d!==4&&(d===27&&Il(r.type)&&(s=r.stateNode,i=null),r=r.child,r!==null))for(Ch(r,i,s),r=r.sibling;r!==null;)Ch(r,i,s),r=r.sibling}function X0(r,i,s){var d=r.tag;if(d===5||d===6)r=r.stateNode,i?s.insertBefore(r,i):s.appendChild(r);else if(d!==4&&(d===27&&Il(r.type)&&(s=r.stateNode),r=r.child,r!==null))for(X0(r,i,s),r=r.sibling;r!==null;)X0(r,i,s),r=r.sibling}function fg(r){var i=r.stateNode,s=r.memoizedProps;try{for(var d=r.type,p=i.attributes;p.length;)i.removeAttributeNode(p[0]);$n(i,d,s),i[En]=r,i[On]=s}catch(g){Bt(r,r.return,g)}}var Mi=!1,kn=!1,jh=!1,hg=typeof WeakSet=="function"?WeakSet:Set,Bn=null;function sx(r,i){if(r=r.containerInfo,Vh=yd,r=w0(r),dl(r)){if("selectionStart"in r)var s={start:r.selectionStart,end:r.selectionEnd};else e:{s=(s=r.ownerDocument)&&s.defaultView||window;var d=s.getSelection&&s.getSelection();if(d&&d.rangeCount!==0){s=d.anchorNode;var p=d.anchorOffset,g=d.focusNode;d=d.focusOffset;try{s.nodeType,g.nodeType}catch{s=null;break e}var C=0,z=-1,V=-1,re=0,he=0,ye=r,ie=null;t:for(;;){for(var ce;ye!==s||p!==0&&ye.nodeType!==3||(z=C+p),ye!==g||d!==0&&ye.nodeType!==3||(V=C+d),ye.nodeType===3&&(C+=ye.nodeValue.length),(ce=ye.firstChild)!==null;)ie=ye,ye=ce;for(;;){if(ye===r)break t;if(ie===s&&++re===p&&(z=C),ie===g&&++he===d&&(V=C),(ce=ye.nextSibling)!==null)break;ye=ie,ie=ye.parentNode}ye=ce}s=z===-1||V===-1?null:{start:z,end:V}}else s=null}s=s||{start:0,end:0}}else s=null;for(Yh={focusedElem:r,selectionRange:s},yd=!1,Bn=i;Bn!==null;)if(i=Bn,r=i.child,(i.subtreeFlags&1028)!==0&&r!==null)r.return=i,Bn=r;else for(;Bn!==null;){switch(i=Bn,g=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(s=0;s<r.length;s++)p=r[s],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:if((r&1024)!==0&&g!==null){r=void 0,s=i,p=g.memoizedProps,g=g.memoizedState,d=s.stateNode;try{var Ge=_s(s.type,p);r=d.getSnapshotBeforeUpdate(Ge,g),d.__reactInternalSnapshotBeforeUpdate=r}catch(tt){Bt(s,s.return,tt)}}break;case 3:if((r&1024)!==0){if(r=i.stateNode.containerInfo,s=r.nodeType,s===9)Xh(r);else if(s===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":Xh(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,Bn=r;break}Bn=i.return}}function mg(r,i,s){var d=s.flags;switch(s.tag){case 0:case 11:case 15:Di(r,s),d&4&&ic(5,s);break;case 1:if(Di(r,s),d&4)if(r=s.stateNode,i===null)try{r.componentDidMount()}catch(C){Bt(s,s.return,C)}else{var p=_s(s.type,i.memoizedProps);i=i.memoizedState;try{r.componentDidUpdate(p,i,r.__reactInternalSnapshotBeforeUpdate)}catch(C){Bt(s,s.return,C)}}d&64&&og(s),d&512&&lc(s,s.return);break;case 3:if(Di(r,s),d&64&&(r=s.updateQueue,r!==null)){if(i=null,s.child!==null)switch(s.child.tag){case 27:case 5:i=s.child.stateNode;break;case 1:i=s.child.stateNode}try{Z1(r,i)}catch(C){Bt(s,s.return,C)}}break;case 27:i===null&&d&4&&fg(s);case 26:case 5:Di(r,s),i===null&&d&4&&cg(s),d&512&&lc(s,s.return);break;case 12:Di(r,s);break;case 31:Di(r,s),d&4&&yg(r,s);break;case 13:Di(r,s),d&4&&vg(r,s),d&64&&(r=s.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(s=gx.bind(null,s),Ix(r,s))));break;case 22:if(d=s.memoizedState!==null||Mi,!d){i=i!==null&&i.memoizedState!==null||kn,p=Mi;var g=kn;Mi=d,(kn=i)&&!g?Ri(r,s,(s.subtreeFlags&8772)!==0):Di(r,s),Mi=p,kn=g}break;case 30:break;default:Di(r,s)}}function pg(r){var i=r.alternate;i!==null&&(r.alternate=null,pg(i)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(i=r.stateNode,i!==null&&ls(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 Zt=null,yr=!1;function zi(r,i,s){for(s=s.child;s!==null;)gg(r,i,s),s=s.sibling}function gg(r,i,s){if(on&&typeof on.onCommitFiberUnmount=="function")try{on.onCommitFiberUnmount(Dn,s)}catch{}switch(s.tag){case 26:kn||Fa(s,i),zi(r,i,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:kn||Fa(s,i);var d=Zt,p=yr;Il(s.type)&&(Zt=s.stateNode,yr=!1),zi(r,i,s),pc(s.stateNode),Zt=d,yr=p;break;case 5:kn||Fa(s,i);case 6:if(d=Zt,p=yr,Zt=null,zi(r,i,s),Zt=d,yr=p,Zt!==null)if(yr)try{(Zt.nodeType===9?Zt.body:Zt.nodeName==="HTML"?Zt.ownerDocument.body:Zt).removeChild(s.stateNode)}catch(g){Bt(s,i,g)}else try{Zt.removeChild(s.stateNode)}catch(g){Bt(s,i,g)}break;case 18:Zt!==null&&(yr?(r=Zt,o2(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,s.stateNode),eu(r)):o2(Zt,s.stateNode));break;case 4:d=Zt,p=yr,Zt=s.stateNode.containerInfo,yr=!0,zi(r,i,s),Zt=d,yr=p;break;case 0:case 11:case 14:case 15:Nl(2,s,i),kn||Nl(4,s,i),zi(r,i,s);break;case 1:kn||(Fa(s,i),d=s.stateNode,typeof d.componentWillUnmount=="function"&&ug(s,i,d)),zi(r,i,s);break;case 21:zi(r,i,s);break;case 22:kn=(d=kn)||s.memoizedState!==null,zi(r,i,s),kn=d;break;default:zi(r,i,s)}}function yg(r,i){if(i.memoizedState===null&&(r=i.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{eu(r)}catch(s){Bt(i,i.return,s)}}}function vg(r,i){if(i.memoizedState===null&&(r=i.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{eu(r)}catch(s){Bt(i,i.return,s)}}function ox(r){switch(r.tag){case 31:case 13:case 19:var i=r.stateNode;return i===null&&(i=r.stateNode=new hg),i;case 22:return r=r.stateNode,i=r._retryCache,i===null&&(i=r._retryCache=new hg),i;default:throw Error(a(435,r.tag))}}function Q0(r,i){var s=ox(r);i.forEach(function(d){if(!s.has(d)){s.add(d);var p=yx.bind(null,r,d);d.then(p,p)}})}function vr(r,i){var s=i.deletions;if(s!==null)for(var d=0;d<s.length;d++){var p=s[d],g=r,C=i,z=C;e:for(;z!==null;){switch(z.tag){case 27:if(Il(z.type)){Zt=z.stateNode,yr=!1;break e}break;case 5:Zt=z.stateNode,yr=!1;break e;case 3:case 4:Zt=z.stateNode.containerInfo,yr=!0;break e}z=z.return}if(Zt===null)throw Error(a(160));gg(g,C,p),Zt=null,yr=!1,g=p.alternate,g!==null&&(g.return=null),p.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)xg(i,r),i=i.sibling}var Ca=null;function xg(r,i){var s=r.alternate,d=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:vr(i,r),xr(r),d&4&&(Nl(3,r,r.return),ic(3,r),Nl(5,r,r.return));break;case 1:vr(i,r),xr(r),d&512&&(kn||s===null||Fa(s,s.return)),d&64&&Mi&&(r=r.updateQueue,r!==null&&(d=r.callbacks,d!==null&&(s=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=s===null?d:s.concat(d))));break;case 26:var p=Ca;if(vr(i,r),xr(r),d&512&&(kn||s===null||Fa(s,s.return)),d&4){var g=s!==null?s.memoizedState:null;if(d=r.memoizedState,s===null)if(d===null)if(r.stateNode===null){e:{d=r.type,s=r.memoizedProps,p=p.ownerDocument||p;t:switch(d){case"title":g=p.getElementsByTagName("title")[0],(!g||g[Fr]||g[En]||g.namespaceURI==="http://www.w3.org/2000/svg"||g.hasAttribute("itemprop"))&&(g=p.createElement(d),p.head.insertBefore(g,p.querySelector("head > title"))),$n(g,d,s),g[En]=r,cn(g),d=g;break e;case"link":var C=x2("link","href",p).get(d+(s.href||""));if(C){for(var z=0;z<C.length;z++)if(g=C[z],g.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&g.getAttribute("rel")===(s.rel==null?null:s.rel)&&g.getAttribute("title")===(s.title==null?null:s.title)&&g.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){C.splice(z,1);break t}}g=p.createElement(d),$n(g,d,s),p.head.appendChild(g);break;case"meta":if(C=x2("meta","content",p).get(d+(s.content||""))){for(z=0;z<C.length;z++)if(g=C[z],g.getAttribute("content")===(s.content==null?null:""+s.content)&&g.getAttribute("name")===(s.name==null?null:s.name)&&g.getAttribute("property")===(s.property==null?null:s.property)&&g.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&g.getAttribute("charset")===(s.charSet==null?null:s.charSet)){C.splice(z,1);break t}}g=p.createElement(d),$n(g,d,s),p.head.appendChild(g);break;default:throw Error(a(468,d))}g[En]=r,cn(g),d=g}r.stateNode=d}else b2(p,r.type,r.stateNode);else r.stateNode=v2(p,d,r.memoizedProps);else g!==d?(g===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):g.count--,d===null?b2(p,r.type,r.stateNode):v2(p,d,r.memoizedProps)):d===null&&r.stateNode!==null&&kh(r,r.memoizedProps,s.memoizedProps)}break;case 27:vr(i,r),xr(r),d&512&&(kn||s===null||Fa(s,s.return)),s!==null&&d&4&&kh(r,r.memoizedProps,s.memoizedProps);break;case 5:if(vr(i,r),xr(r),d&512&&(kn||s===null||Fa(s,s.return)),r.flags&32){p=r.stateNode;try{si(p,"")}catch(Ge){Bt(r,r.return,Ge)}}d&4&&r.stateNode!=null&&(p=r.memoizedProps,kh(r,p,s!==null?s.memoizedProps:p)),d&1024&&(jh=!0);break;case 6:if(vr(i,r),xr(r),d&4){if(r.stateNode===null)throw Error(a(162));d=r.memoizedProps,s=r.stateNode;try{s.nodeValue=d}catch(Ge){Bt(r,r.return,Ge)}}break;case 3:if(hd=null,p=Ca,Ca=dd(i.containerInfo),vr(i,r),Ca=p,xr(r),d&4&&s!==null&&s.memoizedState.isDehydrated)try{eu(i.containerInfo)}catch(Ge){Bt(r,r.return,Ge)}jh&&(jh=!1,bg(r));break;case 4:d=Ca,Ca=dd(r.stateNode.containerInfo),vr(i,r),xr(r),Ca=d;break;case 12:vr(i,r),xr(r);break;case 31:vr(i,r),xr(r),d&4&&(d=r.updateQueue,d!==null&&(r.updateQueue=null,Q0(r,d)));break;case 13:vr(i,r),xr(r),r.child.flags&8192&&r.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(J0=dt()),d&4&&(d=r.updateQueue,d!==null&&(r.updateQueue=null,Q0(r,d)));break;case 22:p=r.memoizedState!==null;var V=s!==null&&s.memoizedState!==null,re=Mi,he=kn;if(Mi=re||p,kn=he||V,vr(i,r),kn=he,Mi=re,xr(r),d&8192)e:for(i=r.stateNode,i._visibility=p?i._visibility&-2:i._visibility|1,p&&(s===null||V||Mi||kn||Is(r)),s=null,i=r;;){if(i.tag===5||i.tag===26){if(s===null){V=s=i;try{if(g=V.stateNode,p)C=g.style,typeof C.setProperty=="function"?C.setProperty("display","none","important"):C.display="none";else{z=V.stateNode;var ye=V.memoizedProps.style,ie=ye!=null&&ye.hasOwnProperty("display")?ye.display:null;z.style.display=ie==null||typeof ie=="boolean"?"":(""+ie).trim()}}catch(Ge){Bt(V,V.return,Ge)}}}else if(i.tag===6){if(s===null){V=i;try{V.stateNode.nodeValue=p?"":V.memoizedProps}catch(Ge){Bt(V,V.return,Ge)}}}else if(i.tag===18){if(s===null){V=i;try{var ce=V.stateNode;p?u2(ce,!0):u2(V.stateNode,!1)}catch(Ge){Bt(V,V.return,Ge)}}}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;s===i&&(s=null),i=i.return}s===i&&(s=null),i.sibling.return=i.return,i=i.sibling}d&4&&(d=r.updateQueue,d!==null&&(s=d.retryQueue,s!==null&&(d.retryQueue=null,Q0(r,s))));break;case 19:vr(i,r),xr(r),d&4&&(d=r.updateQueue,d!==null&&(r.updateQueue=null,Q0(r,d)));break;case 30:break;case 21:break;default:vr(i,r),xr(r)}}function xr(r){var i=r.flags;if(i&2){try{for(var s,d=r.return;d!==null;){if(dg(d)){s=d;break}d=d.return}if(s==null)throw Error(a(160));switch(s.tag){case 27:var p=s.stateNode,g=Sh(r);X0(r,g,p);break;case 5:var C=s.stateNode;s.flags&32&&(si(C,""),s.flags&=-33);var z=Sh(r);X0(r,z,C);break;case 3:case 4:var V=s.stateNode.containerInfo,re=Sh(r);Ch(r,re,V);break;default:throw Error(a(161))}}catch(he){Bt(r,r.return,he)}r.flags&=-3}i&4096&&(r.flags&=-4097)}function bg(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var i=r;bg(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),r=r.sibling}}function Di(r,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)mg(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:Nl(4,i,i.return),Is(i);break;case 1:Fa(i,i.return);var s=i.stateNode;typeof s.componentWillUnmount=="function"&&ug(i,i.return,s),Is(i);break;case 27:pc(i.stateNode);case 26:case 5:Fa(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 Ri(r,i,s){for(s=s&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var d=i.alternate,p=r,g=i,C=g.flags;switch(g.tag){case 0:case 11:case 15:Ri(p,g,s),ic(4,g);break;case 1:if(Ri(p,g,s),d=g,p=d.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(re){Bt(d,d.return,re)}if(d=g,p=d.updateQueue,p!==null){var z=d.stateNode;try{var V=p.shared.hiddenCallbacks;if(V!==null)for(p.shared.hiddenCallbacks=null,p=0;p<V.length;p++)Zu(V[p],z)}catch(re){Bt(d,d.return,re)}}s&&C&64&&og(g),lc(g,g.return);break;case 27:fg(g);case 26:case 5:Ri(p,g,s),s&&d===null&&C&4&&cg(g),lc(g,g.return);break;case 12:Ri(p,g,s);break;case 31:Ri(p,g,s),s&&C&4&&yg(p,g);break;case 13:Ri(p,g,s),s&&C&4&&vg(p,g);break;case 22:g.memoizedState===null&&Ri(p,g,s),lc(g,g.return);break;case 30:break;default:Ri(p,g,s)}i=i.sibling}}function Th(r,i){var s=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(s=r.memoizedState.cachePool.pool),r=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(r=i.memoizedState.cachePool.pool),r!==s&&(r!=null&&r.refCount++,s!=null&&Ns(s))}function Ah(r,i){r=null,i.alternate!==null&&(r=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==r&&(i.refCount++,r!=null&&Ns(r))}function ja(r,i,s,d){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)wg(r,i,s,d),i=i.sibling}function wg(r,i,s,d){var p=i.flags;switch(i.tag){case 0:case 11:case 15:ja(r,i,s,d),p&2048&&ic(9,i);break;case 1:ja(r,i,s,d);break;case 3:ja(r,i,s,d),p&2048&&(r=null,i.alternate!==null&&(r=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==r&&(i.refCount++,r!=null&&Ns(r)));break;case 12:if(p&2048){ja(r,i,s,d),r=i.stateNode;try{var g=i.memoizedProps,C=g.id,z=g.onPostCommit;typeof z=="function"&&z(C,i.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(V){Bt(i,i.return,V)}}else ja(r,i,s,d);break;case 31:ja(r,i,s,d);break;case 13:ja(r,i,s,d);break;case 23:break;case 22:g=i.stateNode,C=i.alternate,i.memoizedState!==null?g._visibility&2?ja(r,i,s,d):sc(r,i):g._visibility&2?ja(r,i,s,d):(g._visibility|=2,Fo(r,i,s,d,(i.subtreeFlags&10256)!==0||!1)),p&2048&&Th(C,i);break;case 24:ja(r,i,s,d),p&2048&&Ah(i.alternate,i);break;default:ja(r,i,s,d)}}function Fo(r,i,s,d,p){for(p=p&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var g=r,C=i,z=s,V=d,re=C.flags;switch(C.tag){case 0:case 11:case 15:Fo(g,C,z,V,p),ic(8,C);break;case 23:break;case 22:var he=C.stateNode;C.memoizedState!==null?he._visibility&2?Fo(g,C,z,V,p):sc(g,C):(he._visibility|=2,Fo(g,C,z,V,p)),p&&re&2048&&Th(C.alternate,C);break;case 24:Fo(g,C,z,V,p),p&&re&2048&&Ah(C.alternate,C);break;default:Fo(g,C,z,V,p)}i=i.sibling}}function sc(r,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var s=r,d=i,p=d.flags;switch(d.tag){case 22:sc(s,d),p&2048&&Th(d.alternate,d);break;case 24:sc(s,d),p&2048&&Ah(d.alternate,d);break;default:sc(s,d)}i=i.sibling}}var oc=8192;function Po(r,i,s){if(r.subtreeFlags&oc)for(r=r.child;r!==null;)kg(r,i,s),r=r.sibling}function kg(r,i,s){switch(r.tag){case 26:Po(r,i,s),r.flags&oc&&r.memoizedState!==null&&Wx(s,Ca,r.memoizedState,r.memoizedProps);break;case 5:Po(r,i,s);break;case 3:case 4:var d=Ca;Ca=dd(r.stateNode.containerInfo),Po(r,i,s),Ca=d;break;case 22:r.memoizedState===null&&(d=r.alternate,d!==null&&d.memoizedState!==null?(d=oc,oc=16777216,Po(r,i,s),oc=d):Po(r,i,s));break;default:Po(r,i,s)}}function Sg(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 uc(r){var i=r.deletions;if((r.flags&16)!==0){if(i!==null)for(var s=0;s<i.length;s++){var d=i[s];Bn=d,jg(d,r)}Sg(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)Cg(r),r=r.sibling}function Cg(r){switch(r.tag){case 0:case 11:case 15:uc(r),r.flags&2048&&Nl(9,r,r.return);break;case 3:uc(r);break;case 12:uc(r);break;case 22:var i=r.stateNode;r.memoizedState!==null&&i._visibility&2&&(r.return===null||r.return.tag!==13)?(i._visibility&=-3,Z0(r)):uc(r);break;default:uc(r)}}function Z0(r){var i=r.deletions;if((r.flags&16)!==0){if(i!==null)for(var s=0;s<i.length;s++){var d=i[s];Bn=d,jg(d,r)}Sg(r)}for(r=r.child;r!==null;){switch(i=r,i.tag){case 0:case 11:case 15:Nl(8,i,i.return),Z0(i);break;case 22:s=i.stateNode,s._visibility&2&&(s._visibility&=-3,Z0(i));break;default:Z0(i)}r=r.sibling}}function jg(r,i){for(;Bn!==null;){var s=Bn;switch(s.tag){case 0:case 11:case 15:Nl(8,s,i);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var d=s.memoizedState.cachePool.pool;d!=null&&d.refCount++}break;case 24:Ns(s.memoizedState.cache)}if(d=s.child,d!==null)d.return=s,Bn=d;else e:for(s=r;Bn!==null;){d=Bn;var p=d.sibling,g=d.return;if(pg(d),d===s){Bn=null;break e}if(p!==null){p.return=g,Bn=p;break e}Bn=g}}}var ux={getCacheForType:function(r){var i=Xt(dn),s=i.data.get(r);return s===void 0&&(s=r(),i.data.set(r,s)),s},cacheSignal:function(){return Xt(dn).controller.signal}},cx=typeof WeakMap=="function"?WeakMap:Map,Dt=0,Gt=null,bt=null,Ct=0,It=0,Dr=null,Ml=!1,Go=!1,Eh=!1,Oi=0,hn=0,zl=0,Bs=0,Nh=0,Rr=0,Vo=0,cc=null,br=null,Mh=!1,J0=0,Tg=0,ed=1/0,td=null,Dl=null,Nn=0,Rl=null,Yo=null,_i=0,zh=0,Dh=null,Ag=null,dc=0,Rh=null;function Or(){return(Dt&2)!==0&&Ct!==0?Ct&-Ct:Z.T!==null?qh():Su()}function Eg(){if(Rr===0)if((Ct&536870912)===0||vt){var r=ro;ro<<=1,(ro&3932160)===0&&(ro=262144),Rr=r}else Rr=536870912;return r=Mr.current,r!==null&&(r.flags|=32),Rr}function wr(r,i,s){(r===Gt&&(It===2||It===9)||r.cancelPendingCommit!==null)&&(Wo(r,0),Ol(r,Ct,Rr,!1)),Lt(r,s),((Dt&2)===0||r!==Gt)&&(r===Gt&&((Dt&2)===0&&(Bs|=s),hn===4&&Ol(r,Ct,Rr,!1)),Pa(r))}function Ng(r,i,s){if((Dt&6)!==0)throw Error(a(327));var d=!s&&(i&127)===0&&(i&r.expiredLanes)===0||Gi(r,i),p=d?hx(r,i):_h(r,i,!0),g=d;do{if(p===0){Go&&!d&&Ol(r,i,0,!1);break}else{if(s=r.current.alternate,g&&!dx(s)){p=_h(r,i,!1),g=!1;continue}if(p===2){if(g=i,r.errorRecoveryDisabledLanes&g)var C=0;else C=r.pendingLanes&-536870913,C=C!==0?C:C&536870912?536870912:0;if(C!==0){i=C;e:{var z=r;p=cc;var V=z.current.memoizedState.isDehydrated;if(V&&(Wo(z,C).flags|=256),C=_h(z,C,!1),C!==2){if(Eh&&!V){z.errorRecoveryDisabledLanes|=g,Bs|=g,p=4;break e}g=br,br=p,g!==null&&(br===null?br=g:br.push.apply(br,g))}p=C}if(g=!1,p!==2)continue}}if(p===1){Wo(r,0),Ol(r,i,0,!0);break}e:{switch(d=r,g=p,g){case 0:case 1:throw Error(a(345));case 4:if((i&4194048)!==i)break;case 6:Ol(d,i,Rr,!Ml);break e;case 2:br=null;break;case 3:case 5:break;default:throw Error(a(329))}if((i&62914560)===i&&(p=J0+300-dt(),10<p)){if(Ol(d,i,Rr,!Ml),as(d,0,!0)!==0)break e;_i=i,d.timeoutHandle=l2(Mg.bind(null,d,s,br,td,Mh,i,Rr,Bs,Vo,Ml,g,"Throttled",-0,0),p);break e}Mg(d,s,br,td,Mh,i,Rr,Bs,Vo,Ml,g,null,-0,0)}}break}while(!0);Pa(r)}function Mg(r,i,s,d,p,g,C,z,V,re,he,ye,ie,ce){if(r.timeoutHandle=-1,ye=i.subtreeFlags,ye&8192||(ye&16785408)===16785408){ye={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Xn},kg(i,g,ye);var Ge=(g&62914560)===g?J0-dt():(g&4194048)===g?Tg-dt():0;if(Ge=Kx(ye,Ge),Ge!==null){_i=g,r.cancelPendingCommit=Ge(Lg.bind(null,r,i,g,s,d,p,C,z,V,he,ye,null,ie,ce)),Ol(r,g,C,!re);return}}Lg(r,i,g,s,d,p,C,z,V)}function dx(r){for(var i=r;;){var s=i.tag;if((s===0||s===11||s===15)&&i.flags&16384&&(s=i.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var d=0;d<s.length;d++){var p=s[d],g=p.getSnapshot;p=p.value;try{if(!Un(g(),p))return!1}catch{return!1}}if(s=i.child,i.subtreeFlags&16384&&s!==null)s.return=i,i=s;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 Ol(r,i,s,d){i&=~Nh,i&=~Bs,r.suspendedLanes|=i,r.pingedLanes&=~i,d&&(r.warmLanes|=i),d=r.expirationTimes;for(var p=i;0<p;){var g=31-_t(p),C=1<<g;d[g]=-1,p&=~C}s!==0&&bu(r,s,i)}function nd(){return(Dt&6)===0?(fc(0),!1):!0}function Oh(){if(bt!==null){if(It===0)var r=bt.return;else r=bt,xa=bi=null,Xf(r),Cl=null,jl=0,r=bt;for(;r!==null;)sg(r.alternate,r),r=r.return;bt=null}}function Wo(r,i){var s=r.timeoutHandle;s!==-1&&(r.timeoutHandle=-1,zx(s)),s=r.cancelPendingCommit,s!==null&&(r.cancelPendingCommit=null,s()),_i=0,Oh(),Gt=r,bt=s=pa(r.current,null),Ct=i,It=0,Dr=null,Ml=!1,Go=Gi(r,i),Eh=!1,Vo=Rr=Nh=Bs=zl=hn=0,br=cc=null,Mh=!1,(i&8)!==0&&(i|=i&32);var d=r.entangledLanes;if(d!==0)for(r=r.entanglements,d&=i;0<d;){var p=31-_t(d),g=1<<p;i|=r[p],d&=~g}return Oi=i,Ro(),s}function zg(r,i){ct=null,Z.H=nc,i===Sl||i===Lo?(i=R0(),It=3):i===Jn?(i=R0(),It=4):It=i===fh?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,Dr=i,bt===null&&(hn=1,G0(r,hr(i,r.current)))}function Dg(){var r=Mr.current;return r===null?!0:(Ct&4194048)===Ct?Zr===null:(Ct&62914560)===Ct||(Ct&536870912)!==0?r===Zr:!1}function Rg(){var r=Z.H;return Z.H=nc,r===null?nc:r}function Og(){var r=Z.A;return Z.A=ux,r}function rd(){hn=4,Ml||(Ct&4194048)!==Ct&&Mr.current!==null||(Go=!0),(zl&134217727)===0&&(Bs&134217727)===0||Gt===null||Ol(Gt,Ct,Rr,!1)}function _h(r,i,s){var d=Dt;Dt|=2;var p=Rg(),g=Og();(Gt!==r||Ct!==i)&&(td=null,Wo(r,i)),i=!1;var C=hn;e:do try{if(It!==0&&bt!==null){var z=bt,V=Dr;switch(It){case 8:Oh(),C=6;break e;case 3:case 2:case 9:case 6:Mr.current===null&&(i=!0);var re=It;if(It=0,Dr=null,Ko(r,z,V,re),s&&Go){C=0;break e}break;default:re=It,It=0,Dr=null,Ko(r,z,V,re)}}fx(),C=hn;break}catch(he){zg(r,he)}while(!0);return i&&r.shellSuspendCounter++,xa=bi=null,Dt=d,Z.H=p,Z.A=g,bt===null&&(Gt=null,Ct=0,Ro()),C}function fx(){for(;bt!==null;)_g(bt)}function hx(r,i){var s=Dt;Dt|=2;var d=Rg(),p=Og();Gt!==r||Ct!==i?(td=null,ed=dt()+500,Wo(r,i)):Go=Gi(r,i);e:do try{if(It!==0&&bt!==null){i=bt;var g=Dr;t:switch(It){case 1:It=0,Dr=null,Ko(r,i,g,1);break;case 2:case 9:if(D0(g)){It=0,Dr=null,Ig(i);break}i=function(){It!==2&&It!==9||Gt!==r||(It=7),Pa(r)},g.then(i,i);break e;case 3:It=7;break e;case 4:It=5;break e;case 7:D0(g)?(It=0,Dr=null,Ig(i)):(It=0,Dr=null,Ko(r,i,g,7));break;case 5:var C=null;switch(bt.tag){case 26:C=bt.memoizedState;case 5:case 27:var z=bt;if(C?w2(C):z.stateNode.complete){It=0,Dr=null;var V=z.sibling;if(V!==null)bt=V;else{var re=z.return;re!==null?(bt=re,ad(re)):bt=null}break t}}It=0,Dr=null,Ko(r,i,g,5);break;case 6:It=0,Dr=null,Ko(r,i,g,6);break;case 8:Oh(),hn=6;break e;default:throw Error(a(462))}}mx();break}catch(he){zg(r,he)}while(!0);return xa=bi=null,Z.H=d,Z.A=p,Dt=s,bt!==null?0:(Gt=null,Ct=0,Ro(),hn)}function mx(){for(;bt!==null&&!sn();)_g(bt)}function _g(r){var i=ig(r.alternate,r,Oi);r.memoizedProps=r.pendingProps,i===null?ad(r):bt=i}function Ig(r){var i=r,s=i.alternate;switch(i.tag){case 15:case 0:i=J4(s,i,i.pendingProps,i.type,void 0,Ct);break;case 11:i=J4(s,i,i.pendingProps,i.type.render,i.ref,Ct);break;case 5:Xf(i);default:sg(s,i),i=bt=Uu(i,Oi),i=ig(s,i,Oi)}r.memoizedProps=r.pendingProps,i===null?ad(r):bt=i}function Ko(r,i,s,d){xa=bi=null,Xf(i),Cl=null,jl=0;var p=i.return;try{if(nx(r,p,i,s,Ct)){hn=1,G0(r,hr(s,r.current)),bt=null;return}}catch(g){if(p!==null)throw bt=p,g;hn=1,G0(r,hr(s,r.current)),bt=null;return}i.flags&32768?(vt||d===1?r=!0:Go||(Ct&536870912)!==0?r=!1:(Ml=r=!0,(d===2||d===9||d===3||d===6)&&(d=Mr.current,d!==null&&d.tag===13&&(d.flags|=16384))),Bg(i,r)):ad(i)}function ad(r){var i=r;do{if((i.flags&32768)!==0){Bg(i,Ml);return}r=i.return;var s=ix(i.alternate,i,Oi);if(s!==null){bt=s;return}if(i=i.sibling,i!==null){bt=i;return}bt=i=r}while(i!==null);hn===0&&(hn=5)}function Bg(r,i){do{var s=lx(r.alternate,r);if(s!==null){s.flags&=32767,bt=s;return}if(s=r.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!i&&(r=r.sibling,r!==null)){bt=r;return}bt=r=s}while(r!==null);hn=6,bt=null}function Lg(r,i,s,d,p,g,C,z,V){r.cancelPendingCommit=null;do id();while(Nn!==0);if((Dt&6)!==0)throw Error(a(327));if(i!==null){if(i===r.current)throw Error(a(177));if(g=i.lanes|i.childLanes,g|=Bu,is(r,s,g,C,z,V),r===Gt&&(bt=Gt=null,Ct=0),Yo=i,Rl=r,_i=s,zh=g,Dh=p,Ag=d,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,vx(Fe,function(){return Fg(),null})):(r.callbackNode=null,r.callbackPriority=0),d=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||d){d=Z.T,Z.T=null,p=le.p,le.p=2,C=Dt,Dt|=4;try{sx(r,i,s)}finally{Dt=C,le.p=p,Z.T=d}}Nn=1,qg(),Ug(),Hg()}}function qg(){if(Nn===1){Nn=0;var r=Rl,i=Yo,s=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||s){s=Z.T,Z.T=null;var d=le.p;le.p=2;var p=Dt;Dt|=4;try{xg(i,r);var g=Yh,C=w0(r.containerInfo),z=g.focusedElem,V=g.selectionRange;if(C!==z&&z&&z.ownerDocument&&b0(z.ownerDocument.documentElement,z)){if(V!==null&&dl(z)){var re=V.start,he=V.end;if(he===void 0&&(he=re),"selectionStart"in z)z.selectionStart=re,z.selectionEnd=Math.min(he,z.value.length);else{var ye=z.ownerDocument||document,ie=ye&&ye.defaultView||window;if(ie.getSelection){var ce=ie.getSelection(),Ge=z.textContent.length,tt=Math.min(V.start,Ge),$t=V.end===void 0?tt:Math.min(V.end,Ge);!ce.extend&&tt>$t&&(C=$t,$t=tt,tt=C);var J=In(z,tt),K=In(z,$t);if(J&&K&&(ce.rangeCount!==1||ce.anchorNode!==J.node||ce.anchorOffset!==J.offset||ce.focusNode!==K.node||ce.focusOffset!==K.offset)){var ne=ye.createRange();ne.setStart(J.node,J.offset),ce.removeAllRanges(),tt>$t?(ce.addRange(ne),ce.extend(K.node,K.offset)):(ne.setEnd(K.node,K.offset),ce.addRange(ne))}}}}for(ye=[],ce=z;ce=ce.parentNode;)ce.nodeType===1&&ye.push({element:ce,left:ce.scrollLeft,top:ce.scrollTop});for(typeof z.focus=="function"&&z.focus(),z=0;z<ye.length;z++){var pe=ye[z];pe.element.scrollLeft=pe.left,pe.element.scrollTop=pe.top}}yd=!!Vh,Yh=Vh=null}finally{Dt=p,le.p=d,Z.T=s}}r.current=i,Nn=2}}function Ug(){if(Nn===2){Nn=0;var r=Rl,i=Yo,s=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||s){s=Z.T,Z.T=null;var d=le.p;le.p=2;var p=Dt;Dt|=4;try{mg(r,i.alternate,i)}finally{Dt=p,le.p=d,Z.T=s}}Nn=3}}function Hg(){if(Nn===4||Nn===3){Nn=0,Kt();var r=Rl,i=Yo,s=_i,d=Ag;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?Nn=5:(Nn=0,Yo=Rl=null,$g(r,r.pendingLanes));var p=r.pendingLanes;if(p===0&&(Dl=null),ku(s),i=i.stateNode,on&&typeof on.onCommitFiberRoot=="function")try{on.onCommitFiberRoot(Dn,i,void 0,(i.current.flags&128)===128)}catch{}if(d!==null){i=Z.T,p=le.p,le.p=2,Z.T=null;try{for(var g=r.onRecoverableError,C=0;C<d.length;C++){var z=d[C];g(z.value,{componentStack:z.stack})}}finally{Z.T=i,le.p=p}}(_i&3)!==0&&id(),Pa(r),p=r.pendingLanes,(s&261930)!==0&&(p&42)!==0?r===Rh?dc++:(dc=0,Rh=r):dc=0,fc(0)}}function $g(r,i){(r.pooledCacheLanes&=i)===0&&(i=r.pooledCache,i!=null&&(r.pooledCache=null,Ns(i)))}function id(){return qg(),Ug(),Hg(),Fg()}function Fg(){if(Nn!==5)return!1;var r=Rl,i=zh;zh=0;var s=ku(_i),d=Z.T,p=le.p;try{le.p=32>s?32:s,Z.T=null,s=Dh,Dh=null;var g=Rl,C=_i;if(Nn=0,Yo=Rl=null,_i=0,(Dt&6)!==0)throw Error(a(331));var z=Dt;if(Dt|=4,Cg(g.current),wg(g,g.current,C,s),Dt=z,fc(0,!1),on&&typeof on.onPostCommitFiberRoot=="function")try{on.onPostCommitFiberRoot(Dn,g)}catch{}return!0}finally{le.p=p,Z.T=d,$g(r,i)}}function Pg(r,i,s){i=hr(s,i),i=dh(r.stateNode,i,2),r=qe(r,i,2),r!==null&&(Lt(r,2),Pa(r))}function Bt(r,i,s){if(r.tag===3)Pg(r,r,s);else for(;i!==null;){if(i.tag===3){Pg(i,r,s);break}else if(i.tag===1){var d=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(Dl===null||!Dl.has(d))){r=hr(s,r),s=G4(2),d=qe(i,s,2),d!==null&&(V4(s,d,i,r),Lt(d,2),Pa(d));break}}i=i.return}}function Ih(r,i,s){var d=r.pingCache;if(d===null){d=r.pingCache=new cx;var p=new Set;d.set(i,p)}else p=d.get(i),p===void 0&&(p=new Set,d.set(i,p));p.has(s)||(Eh=!0,p.add(s),r=px.bind(null,r,i,s),i.then(r,r))}function px(r,i,s){var d=r.pingCache;d!==null&&d.delete(i),r.pingedLanes|=r.suspendedLanes&s,r.warmLanes&=~s,Gt===r&&(Ct&s)===s&&(hn===4||hn===3&&(Ct&62914560)===Ct&&300>dt()-J0?(Dt&2)===0&&Wo(r,0):Nh|=s,Vo===Ct&&(Vo=0)),Pa(r)}function Gg(r,i){i===0&&(i=sr()),r=gi(r,i),r!==null&&(Lt(r,i),Pa(r))}function gx(r){var i=r.memoizedState,s=0;i!==null&&(s=i.retryLane),Gg(r,s)}function yx(r,i){var s=0;switch(r.tag){case 31:case 13:var d=r.stateNode,p=r.memoizedState;p!==null&&(s=p.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),Gg(r,s)}function vx(r,i){return pt(r,i)}var ld=null,Xo=null,Bh=!1,sd=!1,Lh=!1,_l=0;function Pa(r){r!==Xo&&r.next===null&&(Xo===null?ld=Xo=r:Xo=Xo.next=r),sd=!0,Bh||(Bh=!0,bx())}function fc(r,i){if(!Lh&&sd){Lh=!0;do for(var s=!1,d=ld;d!==null;){if(r!==0){var p=d.pendingLanes;if(p===0)var g=0;else{var C=d.suspendedLanes,z=d.pingedLanes;g=(1<<31-_t(42|r)+1)-1,g&=p&~(C&~z),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(s=!0,Kg(d,g))}else g=Ct,g=as(d,d===Gt?g:0,d.cancelPendingCommit!==null||d.timeoutHandle!==-1),(g&3)===0||Gi(d,g)||(s=!0,Kg(d,g));d=d.next}while(s);Lh=!1}}function xx(){Vg()}function Vg(){sd=Bh=!1;var r=0;_l!==0&&Mx()&&(r=_l);for(var i=dt(),s=null,d=ld;d!==null;){var p=d.next,g=Yg(d,i);g===0?(d.next=null,s===null?ld=p:s.next=p,p===null&&(Xo=s)):(s=d,(r!==0||(g&3)!==0)&&(sd=!0)),d=p}Nn!==0&&Nn!==5||fc(r),_l!==0&&(_l=0)}function Yg(r,i){for(var s=r.suspendedLanes,d=r.pingedLanes,p=r.expirationTimes,g=r.pendingLanes&-62914561;0<g;){var C=31-_t(g),z=1<<C,V=p[C];V===-1?((z&s)===0||(z&d)!==0)&&(p[C]=xu(z,i)):V<=i&&(r.expiredLanes|=z),g&=~z}if(i=Gt,s=Ct,s=as(r,r===i?s:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),d=r.callbackNode,s===0||r===i&&(It===2||It===9)||r.cancelPendingCommit!==null)return d!==null&&d!==null&&At(d),r.callbackNode=null,r.callbackPriority=0;if((s&3)===0||Gi(r,s)){if(i=s&-s,i===r.callbackPriority)return i;switch(d!==null&&At(d),ku(s)){case 2:case 8:s=ke;break;case 32:s=Fe;break;case 268435456:s=St;break;default:s=Fe}return d=Wg.bind(null,r),s=pt(s,d),r.callbackPriority=i,r.callbackNode=s,i}return d!==null&&d!==null&&At(d),r.callbackPriority=2,r.callbackNode=null,2}function Wg(r,i){if(Nn!==0&&Nn!==5)return r.callbackNode=null,r.callbackPriority=0,null;var s=r.callbackNode;if(id()&&r.callbackNode!==s)return null;var d=Ct;return d=as(r,r===Gt?d:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),d===0?null:(Ng(r,d,i),Yg(r,dt()),r.callbackNode!=null&&r.callbackNode===s?Wg.bind(null,r):null)}function Kg(r,i){if(id())return null;Ng(r,i,!0)}function bx(){Dx(function(){(Dt&6)!==0?pt(fe,xx):Vg()})}function qh(){if(_l===0){var r=ki;r===0&&(r=rs,rs<<=1,(rs&261888)===0&&(rs=256)),_l=r}return _l}function Xg(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:ss(""+r)}function Qg(r,i){var s=i.ownerDocument.createElement("input");return s.name=i.name,s.value=i.value,r.id&&s.setAttribute("form",r.id),i.parentNode.insertBefore(s,i),r=new FormData(r),s.parentNode.removeChild(s),r}function wx(r,i,s,d,p){if(i==="submit"&&s&&s.stateNode===p){var g=Xg((p[On]||null).action),C=d.submitter;C&&(i=(i=C[On]||null)?Xg(i.formAction):C.getAttribute("formAction"),i!==null&&(g=i,C=null));var z=new fa("action","action",null,d,p);r.push({event:z,listeners:[{instance:null,listener:function(){if(d.defaultPrevented){if(_l!==0){var V=C?Qg(p,C):new FormData(p);ih(s,{pending:!0,data:V,method:p.method,action:g},null,V)}}else typeof g=="function"&&(z.preventDefault(),V=C?Qg(p,C):new FormData(p),ih(s,{pending:!0,data:V,method:p.method,action:g},g,V))},currentTarget:p}]})}}for(var Uh=0;Uh<Iu.length;Uh++){var Hh=Iu[Uh],kx=Hh.toLowerCase(),Sx=Hh[0].toUpperCase()+Hh.slice(1);Er(kx,"on"+Sx)}Er(k0,"onAnimationEnd"),Er(zo,"onAnimationIteration"),Er(_u,"onAnimationStart"),Er("dblclick","onDoubleClick"),Er("focusin","onFocus"),Er("focusout","onBlur"),Er(Uf,"onTransitionRun"),Er(Hf,"onTransitionStart"),Er(S0,"onTransitionCancel"),Er(C0,"onTransitionEnd"),ii("onMouseEnter",["mouseout","mouseover"]),ii("onMouseLeave",["mouseout","mouseover"]),ii("onPointerEnter",["pointerout","pointerover"]),ii("onPointerLeave",["pointerout","pointerover"]),ai("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ai("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ai("onBeforeInput",["compositionend","keypress","textInput","paste"]),ai("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ai("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ai("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var hc="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(" "),Cx=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(hc));function Zg(r,i){i=(i&4)!==0;for(var s=0;s<r.length;s++){var d=r[s],p=d.event;d=d.listeners;e:{var g=void 0;if(i)for(var C=d.length-1;0<=C;C--){var z=d[C],V=z.instance,re=z.currentTarget;if(z=z.listener,V!==g&&p.isPropagationStopped())break e;g=z,p.currentTarget=re;try{g(p)}catch(he){Do(he)}p.currentTarget=null,g=V}else for(C=0;C<d.length;C++){if(z=d[C],V=z.instance,re=z.currentTarget,z=z.listener,V!==g&&p.isPropagationStopped())break e;g=z,p.currentTarget=re;try{g(p)}catch(he){Do(he)}p.currentTarget=null,g=V}}}}function wt(r,i){var s=i[ni];s===void 0&&(s=i[ni]=new Set);var d=r+"__bubble";s.has(d)||(Jg(i,r,2,!1),s.add(d))}function $h(r,i,s){var d=0;i&&(d|=4),Jg(s,r,d,i)}var od="_reactListening"+Math.random().toString(36).slice(2);function Fh(r){if(!r[od]){r[od]=!0,io.forEach(function(s){s!=="selectionchange"&&(Cx.has(s)||$h(s,!1,r),$h(s,!0,r))});var i=r.nodeType===9?r:r.ownerDocument;i===null||i[od]||(i[od]=!0,$h("selectionchange",!1,i))}}function Jg(r,i,s,d){switch(E2(i)){case 2:var p=Zx;break;case 8:p=Jx;break;default:p=am}s=p.bind(null,i,s,r),p=void 0,!us||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(p=!0),d?p!==void 0?r.addEventListener(i,s,{capture:!0,passive:p}):r.addEventListener(i,s,!0):p!==void 0?r.addEventListener(i,s,{passive:p}):r.addEventListener(i,s,!1)}function Ph(r,i,s,d,p){var g=d;if((i&1)===0&&(i&2)===0&&d!==null)e:for(;;){if(d===null)return;var C=d.tag;if(C===3||C===4){var z=d.stateNode.containerInfo;if(z===p)break;if(C===4)for(C=d.return;C!==null;){var V=C.tag;if((V===3||V===4)&&C.stateNode.containerInfo===p)return;C=C.return}for(;z!==null;){if(C=la(z),C===null)return;if(V=C.tag,V===5||V===6||V===26||V===27){d=g=C;continue e}z=z.parentNode}}d=d.return}nn(function(){var re=g,he=Ar(s),ye=[];e:{var ie=j0.get(r);if(ie!==void 0){var ce=fa,Ge=r;switch(r){case"keypress":if(po(s)===0)break e;case"keydown":case"keyup":ce=bo;break;case"focusin":Ge="focus",ce=ci;break;case"focusout":Ge="blur",ce=ci;break;case"beforeblur":case"afterblur":ce=ci;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ce=go;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ce=f0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ce=So;break;case k0:case zo:case _u:ce=vo;break;case C0:ce=h0;break;case"scroll":case"scrollend":ce=d0;break;case"wheel":ce=gn;break;case"copy":case"cut":case"paste":ce=nl;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ce=ko;break;case"toggle":case"beforetoggle":ce=di}var tt=(i&4)!==0,$t=!tt&&(r==="scroll"||r==="scrollend"),J=tt?ie!==null?ie+"Capture":null:ie;tt=[];for(var K=re,ne;K!==null;){var pe=K;if(ne=pe.stateNode,pe=pe.tag,pe!==5&&pe!==26&&pe!==27||ne===null||J===null||(pe=oa(K,J),pe!=null&&tt.push(mc(K,pe,ne))),$t)break;K=K.return}0<tt.length&&(ie=new ce(ie,Ge,null,s,he),ye.push({event:ie,listeners:tt}))}}if((i&7)===0){e:{if(ie=r==="mouseover"||r==="pointerover",ce=r==="mouseout"||r==="pointerout",ie&&s!==ur&&(Ge=s.relatedTarget||s.fromElement)&&(la(Ge)||Ge[Yi]))break e;if((ce||ie)&&(ie=he.window===he?he:(ie=he.ownerDocument)?ie.defaultView||ie.parentWindow:window,ce?(Ge=s.relatedTarget||s.toElement,ce=re,Ge=Ge?la(Ge):null,Ge!==null&&($t=o(Ge),tt=Ge.tag,Ge!==$t||tt!==5&&tt!==27&&tt!==6)&&(Ge=null)):(ce=null,Ge=re),ce!==Ge)){if(tt=go,pe="onMouseLeave",J="onMouseEnter",K="mouse",(r==="pointerout"||r==="pointerover")&&(tt=ko,pe="onPointerLeave",J="onPointerEnter",K="pointer"),$t=ce==null?ie:sa(ce),ne=Ge==null?ie:sa(Ge),ie=new tt(pe,K+"leave",ce,s,he),ie.target=$t,ie.relatedTarget=ne,pe=null,la(he)===re&&(tt=new tt(J,K+"enter",Ge,s,he),tt.target=ne,tt.relatedTarget=$t,pe=tt),$t=pe,ce&&Ge)t:{for(tt=jx,J=ce,K=Ge,ne=0,pe=J;pe;pe=tt(pe))ne++;pe=0;for(var Je=K;Je;Je=tt(Je))pe++;for(;0<ne-pe;)J=tt(J),ne--;for(;0<pe-ne;)K=tt(K),pe--;for(;ne--;){if(J===K||K!==null&&J===K.alternate){tt=J;break t}J=tt(J),K=tt(K)}tt=null}else tt=null;ce!==null&&e2(ye,ie,ce,tt,!1),Ge!==null&&$t!==null&&e2(ye,$t,Ge,tt,!0)}}e:{if(ie=re?sa(re):window,ce=ie.nodeName&&ie.nodeName.toLowerCase(),ce==="select"||ce==="input"&&ie.type==="file")var Mt=g0;else if(Ao(ie))if(cl)Mt=ws;else{Mt=Pe;var Ye=bs}else ce=ie.nodeName,!ce||ce.toLowerCase()!=="input"||ie.type!=="checkbox"&&ie.type!=="radio"?re&&Da(re.elementType)&&(Mt=g0):Mt=No;if(Mt&&(Mt=Mt(r,re))){vs(ye,Mt,s,he);break e}Ye&&Ye(r,ie,re),r==="focusout"&&re&&ie.type==="number"&&re.memoizedProps.value!=null&&Tr(ie,"number",ie.value)}switch(Ye=re?sa(re):window,r){case"focusin":(Ao(Ye)||Ye.contentEditable==="true")&&(mi=Ye,ks=re,Ss=null);break;case"focusout":Ss=ks=mi=null;break;case"mousedown":Ru=!0;break;case"contextmenu":case"mouseup":case"dragend":Ru=!1,Cs(ye,s,he);break;case"selectionchange":if(qf)break;case"keydown":case"keyup":Cs(ye,s,he)}var ft;if(Et)e:{switch(r){case"compositionstart":var jt="onCompositionStart";break e;case"compositionend":jt="onCompositionEnd";break e;case"compositionupdate":jt="onCompositionUpdate";break e}jt=void 0}else ol?Ia(r,s)&&(jt="onCompositionEnd"):r==="keydown"&&s.keyCode===229&&(jt="onCompositionStart");jt&&(ll&&s.locale!=="ko"&&(ol||jt!=="onCompositionStart"?jt==="onCompositionEnd"&&ol&&(ft=c0()):(Oa=he,ca="value"in Oa?Oa.value:Oa.textContent,ol=!0)),Ye=ud(re,jt),0<Ye.length&&(jt=new ha(jt,r,null,s,he),ye.push({event:jt,listeners:Ye}),ft?jt.data=ft:(ft=m0(s),ft!==null&&(jt.data=ft)))),(ft=jo?ys(r,s):p0(r,s))&&(jt=ud(re,"onBeforeInput"),0<jt.length&&(Ye=new ha("onBeforeInput","beforeinput",null,s,he),ye.push({event:Ye,listeners:jt}),Ye.data=ft)),wx(ye,r,re,s,he)}Zg(ye,i)})}function mc(r,i,s){return{instance:r,listener:i,currentTarget:s}}function ud(r,i){for(var s=i+"Capture",d=[];r!==null;){var p=r,g=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||g===null||(p=oa(r,s),p!=null&&d.unshift(mc(r,p,g)),p=oa(r,i),p!=null&&d.push(mc(r,p,g))),r.tag===3)return d;r=r.return}return[]}function jx(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function e2(r,i,s,d,p){for(var g=i._reactName,C=[];s!==null&&s!==d;){var z=s,V=z.alternate,re=z.stateNode;if(z=z.tag,V!==null&&V===d)break;z!==5&&z!==26&&z!==27||re===null||(V=re,p?(re=oa(s,g),re!=null&&C.unshift(mc(s,re,V))):p||(re=oa(s,g),re!=null&&C.push(mc(s,re,V)))),s=s.return}C.length!==0&&r.push({event:i,listeners:C})}var Tx=/\r\n?/g,Ax=/\u0000|\uFFFD/g;function t2(r){return(typeof r=="string"?r:""+r).replace(Tx,`
|
|
50
|
-
`).replace(Ax,"")}function n2(r,i){return i=t2(i),t2(r)===i}function Ht(r,i,s,d,p,g){switch(s){case"children":typeof d=="string"?i==="body"||i==="textarea"&&d===""||si(r,d):(typeof d=="number"||typeof d=="bigint")&&i!=="body"&&si(r,""+d);break;case"className":li(r,"class",d);break;case"tabIndex":li(r,"tabindex",d);break;case"dir":case"role":case"viewBox":case"width":case"height":li(r,s,d);break;case"style":Zi(r,d,g);break;case"data":if(i!=="object"){li(r,"data",d);break}case"src":case"href":if(d===""&&(i!=="a"||s!=="href")){r.removeAttribute(s);break}if(d==null||typeof d=="function"||typeof d=="symbol"||typeof d=="boolean"){r.removeAttribute(s);break}d=ss(""+d),r.setAttribute(s,d);break;case"action":case"formAction":if(typeof d=="function"){r.setAttribute(s,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof g=="function"&&(s==="formAction"?(i!=="input"&&Ht(r,i,"name",p.name,p,null),Ht(r,i,"formEncType",p.formEncType,p,null),Ht(r,i,"formMethod",p.formMethod,p,null),Ht(r,i,"formTarget",p.formTarget,p,null)):(Ht(r,i,"encType",p.encType,p,null),Ht(r,i,"method",p.method,p,null),Ht(r,i,"target",p.target,p,null)));if(d==null||typeof d=="symbol"||typeof d=="boolean"){r.removeAttribute(s);break}d=ss(""+d),r.setAttribute(s,d);break;case"onClick":d!=null&&(r.onclick=Xn);break;case"onScroll":d!=null&&wt("scroll",r);break;case"onScrollEnd":d!=null&&wt("scrollend",r);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(a(61));if(s=d.__html,s!=null){if(p.children!=null)throw Error(a(60));r.innerHTML=s}}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}s=ss(""+d),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":d!=null&&typeof d!="function"&&typeof d!="symbol"?r.setAttribute(s,""+d):r.removeAttribute(s);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":d&&typeof d!="function"&&typeof d!="symbol"?r.setAttribute(s,""):r.removeAttribute(s);break;case"capture":case"download":d===!0?r.setAttribute(s,""):d!==!1&&d!=null&&typeof d!="function"&&typeof d!="symbol"?r.setAttribute(s,d):r.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":d!=null&&typeof d!="function"&&typeof d!="symbol"&&!isNaN(d)&&1<=d?r.setAttribute(s,d):r.removeAttribute(s);break;case"rowSpan":case"start":d==null||typeof d=="function"||typeof d=="symbol"||isNaN(d)?r.removeAttribute(s):r.setAttribute(s,d);break;case"popover":wt("beforetoggle",r),wt("toggle",r),oo(r,"popover",d);break;case"xlinkActuate":Pr(r,"http://www.w3.org/1999/xlink","xlink:actuate",d);break;case"xlinkArcrole":Pr(r,"http://www.w3.org/1999/xlink","xlink:arcrole",d);break;case"xlinkRole":Pr(r,"http://www.w3.org/1999/xlink","xlink:role",d);break;case"xlinkShow":Pr(r,"http://www.w3.org/1999/xlink","xlink:show",d);break;case"xlinkTitle":Pr(r,"http://www.w3.org/1999/xlink","xlink:title",d);break;case"xlinkType":Pr(r,"http://www.w3.org/1999/xlink","xlink:type",d);break;case"xmlBase":Pr(r,"http://www.w3.org/XML/1998/namespace","xml:base",d);break;case"xmlLang":Pr(r,"http://www.w3.org/XML/1998/namespace","xml:lang",d);break;case"xmlSpace":Pr(r,"http://www.w3.org/XML/1998/namespace","xml:space",d);break;case"is":oo(r,"is",d);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=Tu.get(s)||s,oo(r,s,d))}}function Gh(r,i,s,d,p,g){switch(s){case"style":Zi(r,d,g);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(a(61));if(s=d.__html,s!=null){if(p.children!=null)throw Error(a(60));r.innerHTML=s}}break;case"children":typeof d=="string"?si(r,d):(typeof d=="number"||typeof d=="bigint")&&si(r,""+d);break;case"onScroll":d!=null&&wt("scroll",r);break;case"onScrollEnd":d!=null&&wt("scrollend",r);break;case"onClick":d!=null&&(r.onclick=Xn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!lo.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(p=s.endsWith("Capture"),i=s.slice(2,p?s.length-7:void 0),g=r[On]||null,g=g!=null?g[s]:null,typeof g=="function"&&r.removeEventListener(i,g,p),typeof d=="function")){typeof g!="function"&&g!==null&&(s in r?r[s]=null:r.hasAttribute(s)&&r.removeAttribute(s)),r.addEventListener(i,d,p);break e}s in r?r[s]=d:d===!0?r.setAttribute(s,""):oo(r,s,d)}}}function $n(r,i,s){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":wt("error",r),wt("load",r);var d=!1,p=!1,g;for(g in s)if(s.hasOwnProperty(g)){var C=s[g];if(C!=null)switch(g){case"src":d=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:Ht(r,i,g,C,s,null)}}p&&Ht(r,i,"srcSet",s.srcSet,s,null),d&&Ht(r,i,"src",s.src,s,null);return;case"input":wt("invalid",r);var z=g=C=p=null,V=null,re=null;for(d in s)if(s.hasOwnProperty(d)){var he=s[d];if(he!=null)switch(d){case"name":p=he;break;case"type":C=he;break;case"checked":V=he;break;case"defaultChecked":re=he;break;case"value":g=he;break;case"defaultValue":z=he;break;case"children":case"dangerouslySetInnerHTML":if(he!=null)throw Error(a(137,i));break;default:Ht(r,i,d,he,s,null)}}Vr(r,g,z,V,re,C,p,!1);return;case"select":wt("invalid",r),d=C=g=null;for(p in s)if(s.hasOwnProperty(p)&&(z=s[p],z!=null))switch(p){case"value":g=z;break;case"defaultValue":C=z;break;case"multiple":d=z;default:Ht(r,i,p,z,s,null)}i=g,s=C,r.multiple=!!d,i!=null?or(r,!!d,i,!1):s!=null&&or(r,!!d,s,!0);return;case"textarea":wt("invalid",r),g=p=d=null;for(C in s)if(s.hasOwnProperty(C)&&(z=s[C],z!=null))switch(C){case"value":d=z;break;case"defaultValue":p=z;break;case"children":g=z;break;case"dangerouslySetInnerHTML":if(z!=null)throw Error(a(91));break;default:Ht(r,i,C,z,s,null)}Qi(r,d,p,g);return;case"option":for(V in s)if(s.hasOwnProperty(V)&&(d=s[V],d!=null))switch(V){case"selected":r.selected=d&&typeof d!="function"&&typeof d!="symbol";break;default:Ht(r,i,V,d,s,null)}return;case"dialog":wt("beforetoggle",r),wt("toggle",r),wt("cancel",r),wt("close",r);break;case"iframe":case"object":wt("load",r);break;case"video":case"audio":for(d=0;d<hc.length;d++)wt(hc[d],r);break;case"image":wt("error",r),wt("load",r);break;case"details":wt("toggle",r);break;case"embed":case"source":case"link":wt("error",r),wt("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(re in s)if(s.hasOwnProperty(re)&&(d=s[re],d!=null))switch(re){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:Ht(r,i,re,d,s,null)}return;default:if(Da(i)){for(he in s)s.hasOwnProperty(he)&&(d=s[he],d!==void 0&&Gh(r,i,he,d,s,void 0));return}}for(z in s)s.hasOwnProperty(z)&&(d=s[z],d!=null&&Ht(r,i,z,d,s,null))}function Ex(r,i,s,d){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,g=null,C=null,z=null,V=null,re=null,he=null;for(ce in s){var ye=s[ce];if(s.hasOwnProperty(ce)&&ye!=null)switch(ce){case"checked":break;case"value":break;case"defaultValue":V=ye;default:d.hasOwnProperty(ce)||Ht(r,i,ce,null,d,ye)}}for(var ie in d){var ce=d[ie];if(ye=s[ie],d.hasOwnProperty(ie)&&(ce!=null||ye!=null))switch(ie){case"type":g=ce;break;case"name":p=ce;break;case"checked":re=ce;break;case"defaultChecked":he=ce;break;case"value":C=ce;break;case"defaultValue":z=ce;break;case"children":case"dangerouslySetInnerHTML":if(ce!=null)throw Error(a(137,i));break;default:ce!==ye&&Ht(r,i,ie,ce,d,ye)}}co(r,C,z,V,re,he,g,p);return;case"select":ce=C=z=ie=null;for(g in s)if(V=s[g],s.hasOwnProperty(g)&&V!=null)switch(g){case"value":break;case"multiple":ce=V;default:d.hasOwnProperty(g)||Ht(r,i,g,null,d,V)}for(p in d)if(g=d[p],V=s[p],d.hasOwnProperty(p)&&(g!=null||V!=null))switch(p){case"value":ie=g;break;case"defaultValue":z=g;break;case"multiple":C=g;default:g!==V&&Ht(r,i,p,g,d,V)}i=z,s=C,d=ce,ie!=null?or(r,!!s,ie,!1):!!d!=!!s&&(i!=null?or(r,!!s,i,!0):or(r,!!s,s?[]:"",!1));return;case"textarea":ce=ie=null;for(z in s)if(p=s[z],s.hasOwnProperty(z)&&p!=null&&!d.hasOwnProperty(z))switch(z){case"value":break;case"children":break;default:Ht(r,i,z,null,d,p)}for(C in d)if(p=d[C],g=s[C],d.hasOwnProperty(C)&&(p!=null||g!=null))switch(C){case"value":ie=p;break;case"defaultValue":ce=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(a(91));break;default:p!==g&&Ht(r,i,C,p,d,g)}ju(r,ie,ce);return;case"option":for(var Ge in s)if(ie=s[Ge],s.hasOwnProperty(Ge)&&ie!=null&&!d.hasOwnProperty(Ge))switch(Ge){case"selected":r.selected=!1;break;default:Ht(r,i,Ge,null,d,ie)}for(V in d)if(ie=d[V],ce=s[V],d.hasOwnProperty(V)&&ie!==ce&&(ie!=null||ce!=null))switch(V){case"selected":r.selected=ie&&typeof ie!="function"&&typeof ie!="symbol";break;default:Ht(r,i,V,ie,d,ce)}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 tt in s)ie=s[tt],s.hasOwnProperty(tt)&&ie!=null&&!d.hasOwnProperty(tt)&&Ht(r,i,tt,null,d,ie);for(re in d)if(ie=d[re],ce=s[re],d.hasOwnProperty(re)&&ie!==ce&&(ie!=null||ce!=null))switch(re){case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(a(137,i));break;default:Ht(r,i,re,ie,d,ce)}return;default:if(Da(i)){for(var $t in s)ie=s[$t],s.hasOwnProperty($t)&&ie!==void 0&&!d.hasOwnProperty($t)&&Gh(r,i,$t,void 0,d,ie);for(he in d)ie=d[he],ce=s[he],!d.hasOwnProperty(he)||ie===ce||ie===void 0&&ce===void 0||Gh(r,i,he,ie,d,ce);return}}for(var J in s)ie=s[J],s.hasOwnProperty(J)&&ie!=null&&!d.hasOwnProperty(J)&&Ht(r,i,J,null,d,ie);for(ye in d)ie=d[ye],ce=s[ye],!d.hasOwnProperty(ye)||ie===ce||ie==null&&ce==null||Ht(r,i,ye,ie,d,ce)}function r2(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Nx(){if(typeof performance.getEntriesByType=="function"){for(var r=0,i=0,s=performance.getEntriesByType("resource"),d=0;d<s.length;d++){var p=s[d],g=p.transferSize,C=p.initiatorType,z=p.duration;if(g&&z&&r2(C)){for(C=0,z=p.responseEnd,d+=1;d<s.length;d++){var V=s[d],re=V.startTime;if(re>z)break;var he=V.transferSize,ye=V.initiatorType;he&&r2(ye)&&(V=V.responseEnd,C+=he*(V<z?1:(z-re)/(V-re)))}if(--d,i+=8*(g+C)/(p.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 Vh=null,Yh=null;function cd(r){return r.nodeType===9?r:r.ownerDocument}function a2(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 i2(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 Wh(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 Kh=null;function Mx(){var r=window.event;return r&&r.type==="popstate"?r===Kh?!1:(Kh=r,!0):(Kh=null,!1)}var l2=typeof setTimeout=="function"?setTimeout:void 0,zx=typeof clearTimeout=="function"?clearTimeout:void 0,s2=typeof Promise=="function"?Promise:void 0,Dx=typeof queueMicrotask=="function"?queueMicrotask:typeof s2<"u"?function(r){return s2.resolve(null).then(r).catch(Rx)}:l2;function Rx(r){setTimeout(function(){throw r})}function Il(r){return r==="head"}function o2(r,i){var s=i,d=0;do{var p=s.nextSibling;if(r.removeChild(s),p&&p.nodeType===8)if(s=p.data,s==="/$"||s==="/&"){if(d===0){r.removeChild(p),eu(i);return}d--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")d++;else if(s==="html")pc(r.ownerDocument.documentElement);else if(s==="head"){s=r.ownerDocument.head,pc(s);for(var g=s.firstChild;g;){var C=g.nextSibling,z=g.nodeName;g[Fr]||z==="SCRIPT"||z==="STYLE"||z==="LINK"&&g.rel.toLowerCase()==="stylesheet"||s.removeChild(g),g=C}}else s==="body"&&pc(r.ownerDocument.body);s=p}while(s);eu(i)}function u2(r,i){var s=r;r=0;do{var d=s.nextSibling;if(s.nodeType===1?i?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(i?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),d&&d.nodeType===8)if(s=d.data,s==="/$"){if(r===0)break;r--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||r++;s=d}while(s)}function Xh(r){var i=r.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var s=i;switch(i=i.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":Xh(s),ls(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}r.removeChild(s)}}function Ox(r,i,s,d){for(;r.nodeType===1;){var p=s;if(r.nodeName.toLowerCase()!==i.toLowerCase()){if(!d&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(d){if(!r[Fr])switch(i){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(g=r.getAttribute("rel"),g==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(g!==p.rel||r.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||r.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||r.getAttribute("title")!==(p.title==null?null:p.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(g=r.getAttribute("src"),(g!==(p.src==null?null:p.src)||r.getAttribute("type")!==(p.type==null?null:p.type)||r.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&g&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(i==="input"&&r.type==="hidden"){var g=p.name==null?null:""+p.name;if(p.type==="hidden"&&r.getAttribute("name")===g)return r}else return r;if(r=Jr(r.nextSibling),r===null)break}return null}function _x(r,i,s){if(i==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!s||(r=Jr(r.nextSibling),r===null))return null;return r}function c2(r,i){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!i||(r=Jr(r.nextSibling),r===null))return null;return r}function Qh(r){return r.data==="$?"||r.data==="$~"}function Zh(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function Ix(r,i){var s=r.ownerDocument;if(r.data==="$~")r._reactRetry=i;else if(r.data!=="$?"||s.readyState!=="loading")i();else{var d=function(){i(),s.removeEventListener("DOMContentLoaded",d)};s.addEventListener("DOMContentLoaded",d),r._reactRetry=d}}function Jr(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 Jh=null;function d2(r){r=r.nextSibling;for(var i=0;r;){if(r.nodeType===8){var s=r.data;if(s==="/$"||s==="/&"){if(i===0)return Jr(r.nextSibling);i--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||i++}r=r.nextSibling}return null}function f2(r){r=r.previousSibling;for(var i=0;r;){if(r.nodeType===8){var s=r.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(i===0)return r;i--}else s!=="/$"&&s!=="/&"||i++}r=r.previousSibling}return null}function h2(r,i,s){switch(i=cd(s),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 pc(r){for(var i=r.attributes;i.length;)r.removeAttributeNode(i[0]);ls(r)}var ea=new Map,m2=new Set;function dd(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var Ii=le.d;le.d={f:Bx,r:Lx,D:qx,C:Ux,L:Hx,m:$x,X:Px,S:Fx,M:Gx};function Bx(){var r=Ii.f(),i=nd();return r||i}function Lx(r){var i=Xi(r);i!==null&&i.tag===5&&i.type==="form"?z4(i):Ii.r(r)}var Qo=typeof document>"u"?null:document;function p2(r,i,s){var d=Qo;if(d&&typeof i=="string"&&i){var p=_n(i);p='link[rel="'+r+'"][href="'+p+'"]',typeof s=="string"&&(p+='[crossorigin="'+s+'"]'),m2.has(p)||(m2.add(p),r={rel:r,crossOrigin:s,href:i},d.querySelector(p)===null&&(i=d.createElement("link"),$n(i,"link",r),cn(i),d.head.appendChild(i)))}}function qx(r){Ii.D(r),p2("dns-prefetch",r,null)}function Ux(r,i){Ii.C(r,i),p2("preconnect",r,i)}function Hx(r,i,s){Ii.L(r,i,s);var d=Qo;if(d&&r&&i){var p='link[rel="preload"][as="'+_n(i)+'"]';i==="image"&&s&&s.imageSrcSet?(p+='[imagesrcset="'+_n(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(p+='[imagesizes="'+_n(s.imageSizes)+'"]')):p+='[href="'+_n(r)+'"]';var g=p;switch(i){case"style":g=Zo(r);break;case"script":g=Jo(r)}ea.has(g)||(r=v({rel:"preload",href:i==="image"&&s&&s.imageSrcSet?void 0:r,as:i},s),ea.set(g,r),d.querySelector(p)!==null||i==="style"&&d.querySelector(gc(g))||i==="script"&&d.querySelector(yc(g))||(i=d.createElement("link"),$n(i,"link",r),cn(i),d.head.appendChild(i)))}}function $x(r,i){Ii.m(r,i);var s=Qo;if(s&&r){var d=i&&typeof i.as=="string"?i.as:"script",p='link[rel="modulepreload"][as="'+_n(d)+'"][href="'+_n(r)+'"]',g=p;switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=Jo(r)}if(!ea.has(g)&&(r=v({rel:"modulepreload",href:r},i),ea.set(g,r),s.querySelector(p)===null)){switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(yc(g)))return}d=s.createElement("link"),$n(d,"link",r),cn(d),s.head.appendChild(d)}}}function Fx(r,i,s){Ii.S(r,i,s);var d=Qo;if(d&&r){var p=Ea(d).hoistableStyles,g=Zo(r);i=i||"default";var C=p.get(g);if(!C){var z={loading:0,preload:null};if(C=d.querySelector(gc(g)))z.loading=5;else{r=v({rel:"stylesheet",href:r,"data-precedence":i},s),(s=ea.get(g))&&em(r,s);var V=C=d.createElement("link");cn(V),$n(V,"link",r),V._p=new Promise(function(re,he){V.onload=re,V.onerror=he}),V.addEventListener("load",function(){z.loading|=1}),V.addEventListener("error",function(){z.loading|=2}),z.loading|=4,fd(C,i,d)}C={type:"stylesheet",instance:C,count:1,state:z},p.set(g,C)}}}function Px(r,i){Ii.X(r,i);var s=Qo;if(s&&r){var d=Ea(s).hoistableScripts,p=Jo(r),g=d.get(p);g||(g=s.querySelector(yc(p)),g||(r=v({src:r,async:!0},i),(i=ea.get(p))&&tm(r,i),g=s.createElement("script"),cn(g),$n(g,"link",r),s.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},d.set(p,g))}}function Gx(r,i){Ii.M(r,i);var s=Qo;if(s&&r){var d=Ea(s).hoistableScripts,p=Jo(r),g=d.get(p);g||(g=s.querySelector(yc(p)),g||(r=v({src:r,async:!0,type:"module"},i),(i=ea.get(p))&&tm(r,i),g=s.createElement("script"),cn(g),$n(g,"link",r),s.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},d.set(p,g))}}function g2(r,i,s,d){var p=(p=Re.current)?dd(p):null;if(!p)throw Error(a(446));switch(r){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(i=Zo(s.href),s=Ea(p).hoistableStyles,d=s.get(i),d||(d={type:"style",instance:null,count:0,state:null},s.set(i,d)),d):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){r=Zo(s.href);var g=Ea(p).hoistableStyles,C=g.get(r);if(C||(p=p.ownerDocument||p,C={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},g.set(r,C),(g=p.querySelector(gc(r)))&&!g._p&&(C.instance=g,C.state.loading=5),ea.has(r)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},ea.set(r,s),g||Vx(p,r,s,C.state))),i&&d===null)throw Error(a(528,""));return C}if(i&&d!==null)throw Error(a(529,""));return null;case"script":return i=s.async,s=s.src,typeof s=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=Jo(s),s=Ea(p).hoistableScripts,d=s.get(i),d||(d={type:"script",instance:null,count:0,state:null},s.set(i,d)),d):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,r))}}function Zo(r){return'href="'+_n(r)+'"'}function gc(r){return'link[rel="stylesheet"]['+r+"]"}function y2(r){return v({},r,{"data-precedence":r.precedence,precedence:null})}function Vx(r,i,s,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}),$n(i,"link",s),cn(i),r.head.appendChild(i))}function Jo(r){return'[src="'+_n(r)+'"]'}function yc(r){return"script[async]"+r}function v2(r,i,s){if(i.count++,i.instance===null)switch(i.type){case"style":var d=r.querySelector('style[data-href~="'+_n(s.href)+'"]');if(d)return i.instance=d,cn(d),d;var p=v({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return d=(r.ownerDocument||r).createElement("style"),cn(d),$n(d,"style",p),fd(d,s.precedence,r),i.instance=d;case"stylesheet":p=Zo(s.href);var g=r.querySelector(gc(p));if(g)return i.state.loading|=4,i.instance=g,cn(g),g;d=y2(s),(p=ea.get(p))&&em(d,p),g=(r.ownerDocument||r).createElement("link"),cn(g);var C=g;return C._p=new Promise(function(z,V){C.onload=z,C.onerror=V}),$n(g,"link",d),i.state.loading|=4,fd(g,s.precedence,r),i.instance=g;case"script":return g=Jo(s.src),(p=r.querySelector(yc(g)))?(i.instance=p,cn(p),p):(d=s,(p=ea.get(g))&&(d=v({},s),tm(d,p)),r=r.ownerDocument||r,p=r.createElement("script"),cn(p),$n(p,"link",d),r.head.appendChild(p),i.instance=p);case"void":return null;default:throw Error(a(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(d=i.instance,i.state.loading|=4,fd(d,s.precedence,r));return i.instance}function fd(r,i,s){for(var d=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=d.length?d[d.length-1]:null,g=p,C=0;C<d.length;C++){var z=d[C];if(z.dataset.precedence===i)g=z;else if(g!==p)break}g?g.parentNode.insertBefore(r,g.nextSibling):(i=s.nodeType===9?s.head:s,i.insertBefore(r,i.firstChild))}function em(r,i){r.crossOrigin==null&&(r.crossOrigin=i.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=i.referrerPolicy),r.title==null&&(r.title=i.title)}function tm(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 x2(r,i,s){if(hd===null){var d=new Map,p=hd=new Map;p.set(s,d)}else p=hd,d=p.get(s),d||(d=new Map,p.set(s,d));if(d.has(r))return d;for(d.set(r,null),s=s.getElementsByTagName(r),p=0;p<s.length;p++){var g=s[p];if(!(g[Fr]||g[En]||r==="link"&&g.getAttribute("rel")==="stylesheet")&&g.namespaceURI!=="http://www.w3.org/2000/svg"){var C=g.getAttribute(i)||"";C=r+C;var z=d.get(C);z?z.push(g):d.set(C,[g])}}return d}function b2(r,i,s){r=r.ownerDocument||r,r.head.insertBefore(s,i==="title"?r.querySelector("head > title"):null)}function Yx(r,i,s){if(s===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 w2(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function Wx(r,i,s,d){if(s.type==="stylesheet"&&(typeof d.media!="string"||matchMedia(d.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var p=Zo(d.href),g=i.querySelector(gc(p));if(g){i=g._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(r.count++,r=md.bind(r),i.then(r,r)),s.state.loading|=4,s.instance=g,cn(g);return}g=i.ownerDocument||i,d=y2(d),(p=ea.get(p))&&em(d,p),g=g.createElement("link"),cn(g);var C=g;C._p=new Promise(function(z,V){C.onload=z,C.onerror=V}),$n(g,"link",d),s.instance=g}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(s,i),(i=s.state.preload)&&(s.state.loading&3)===0&&(r.count++,s=md.bind(r),i.addEventListener("load",s),i.addEventListener("error",s))}}var nm=0;function Kx(r,i){return r.stylesheets&&r.count===0&&gd(r,r.stylesheets),0<r.count||0<r.imgCount?function(s){var d=setTimeout(function(){if(r.stylesheets&&gd(r,r.stylesheets),r.unsuspend){var g=r.unsuspend;r.unsuspend=null,g()}},6e4+i);0<r.imgBytes&&nm===0&&(nm=62500*Nx());var p=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&gd(r,r.stylesheets),r.unsuspend)){var g=r.unsuspend;r.unsuspend=null,g()}},(r.imgBytes>nm?50:800)+i);return r.unsuspend=s,function(){r.unsuspend=null,clearTimeout(d),clearTimeout(p)}}: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(Xx,r),pd=null,md.call(r))}function Xx(r,i){if(!(i.state.loading&4)){var s=pd.get(r);if(s)var d=s.get(null);else{s=new Map,pd.set(r,s);for(var p=r.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g<p.length;g++){var C=p[g];(C.nodeName==="LINK"||C.getAttribute("media")!=="not all")&&(s.set(C.dataset.precedence,C),d=C)}d&&s.set(null,d)}p=i.instance,C=p.getAttribute("data-precedence"),g=s.get(C)||d,g===d&&s.set(null,p),s.set(C,p),this.count++,d=md.bind(this),p.addEventListener("load",d),p.addEventListener("error",d),g?g.parentNode.insertBefore(p,g.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(p,r.firstChild)),i.state.loading|=4}}var vc={$$typeof:L,Provider:null,Consumer:null,_currentValue:Me,_currentValue2:Me,_threadCount:0};function Qx(r,i,s,d,p,g,C,z,V){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=Aa(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Aa(0),this.hiddenUpdates=Aa(null),this.identifierPrefix=d,this.onUncaughtError=p,this.onCaughtError=g,this.onRecoverableError=C,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=V,this.incompleteTransitions=new Map}function k2(r,i,s,d,p,g,C,z,V,re,he,ye){return r=new Qx(r,i,s,C,V,re,he,ye,z),i=1,g===!0&&(i|=24),g=Qn(3,null,null,i),r.current=g,g.stateNode=r,i=Wu(),i.refCount++,r.pooledCache=i,i.refCount++,g.memoizedState={element:d,isDehydrated:s,cache:i},Y(g),r}function S2(r){return r?(r=hl,r):hl}function C2(r,i,s,d,p,g){p=S2(p),d.context===null?d.context=p:d.pendingContext=p,d=we(i),d.payload={element:s},g=g===void 0?null:g,g!==null&&(d.callback=g),s=qe(r,d,i),s!==null&&(wr(s,r,i),De(s,r,i))}function j2(r,i){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var s=r.retryLane;r.retryLane=s!==0&&s<i?s:i}}function rm(r,i){j2(r,i),(r=r.alternate)&&j2(r,i)}function T2(r){if(r.tag===13||r.tag===31){var i=gi(r,67108864);i!==null&&wr(i,r,67108864),rm(r,67108864)}}function A2(r){if(r.tag===13||r.tag===31){var i=Or();i=ti(i);var s=gi(r,i);s!==null&&wr(s,r,i),rm(r,i)}}var yd=!0;function Zx(r,i,s,d){var p=Z.T;Z.T=null;var g=le.p;try{le.p=2,am(r,i,s,d)}finally{le.p=g,Z.T=p}}function Jx(r,i,s,d){var p=Z.T;Z.T=null;var g=le.p;try{le.p=8,am(r,i,s,d)}finally{le.p=g,Z.T=p}}function am(r,i,s,d){if(yd){var p=im(d);if(p===null)Ph(r,i,d,vd,s),N2(r,d);else if(tb(p,r,i,s,d))d.stopPropagation();else if(N2(r,d),i&4&&-1<eb.indexOf(r)){for(;p!==null;){var g=Xi(p);if(g!==null)switch(g.tag){case 3:if(g=g.stateNode,g.current.memoizedState.isDehydrated){var C=ei(g.pendingLanes);if(C!==0){var z=g;for(z.pendingLanes|=2,z.entangledLanes|=2;C;){var V=1<<31-_t(C);z.entanglements[1]|=V,C&=~V}Pa(g),(Dt&6)===0&&(ed=dt()+500,fc(0))}}break;case 31:case 13:z=gi(g,2),z!==null&&wr(z,g,2),nd(),rm(g,2)}if(g=im(d),g===null&&Ph(r,i,d,vd,s),g===p)break;p=g}p!==null&&d.stopPropagation()}else Ph(r,i,d,null,s)}}function im(r){return r=Ar(r),lm(r)}var vd=null;function lm(r){if(vd=null,r=la(r),r!==null){var i=o(r);if(i===null)r=null;else{var s=i.tag;if(s===13){if(r=c(i),r!==null)return r;r=null}else if(s===31){if(r=f(i),r!==null)return r;r=null}else if(s===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 E2(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(Kn()){case fe:return 2;case ke:return 8;case Fe:case rt:return 32;case St:return 268435456;default:return 32}default:return 32}}var sm=!1,Bl=null,Ll=null,ql=null,xc=new Map,bc=new Map,Ul=[],eb="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 N2(r,i){switch(r){case"focusin":case"focusout":Bl=null;break;case"dragenter":case"dragleave":Ll=null;break;case"mouseover":case"mouseout":ql=null;break;case"pointerover":case"pointerout":xc.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":bc.delete(i.pointerId)}}function wc(r,i,s,d,p,g){return r===null||r.nativeEvent!==g?(r={blockedOn:i,domEventName:s,eventSystemFlags:d,nativeEvent:g,targetContainers:[p]},i!==null&&(i=Xi(i),i!==null&&T2(i)),r):(r.eventSystemFlags|=d,i=r.targetContainers,p!==null&&i.indexOf(p)===-1&&i.push(p),r)}function tb(r,i,s,d,p){switch(i){case"focusin":return Bl=wc(Bl,r,i,s,d,p),!0;case"dragenter":return Ll=wc(Ll,r,i,s,d,p),!0;case"mouseover":return ql=wc(ql,r,i,s,d,p),!0;case"pointerover":var g=p.pointerId;return xc.set(g,wc(xc.get(g)||null,r,i,s,d,p)),!0;case"gotpointercapture":return g=p.pointerId,bc.set(g,wc(bc.get(g)||null,r,i,s,d,p)),!0}return!1}function M2(r){var i=la(r.target);if(i!==null){var s=o(i);if(s!==null){if(i=s.tag,i===13){if(i=c(s),i!==null){r.blockedOn=i,l0(r.priority,function(){A2(s)});return}}else if(i===31){if(i=f(s),i!==null){r.blockedOn=i,l0(r.priority,function(){A2(s)});return}}else if(i===3&&s.stateNode.current.memoizedState.isDehydrated){r.blockedOn=s.tag===3?s.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 s=im(r.nativeEvent);if(s===null){s=r.nativeEvent;var d=new s.constructor(s.type,s);ur=d,s.target.dispatchEvent(d),ur=null}else return i=Xi(s),i!==null&&T2(i),r.blockedOn=s,!1;i.shift()}return!0}function z2(r,i,s){xd(r)&&s.delete(i)}function nb(){sm=!1,Bl!==null&&xd(Bl)&&(Bl=null),Ll!==null&&xd(Ll)&&(Ll=null),ql!==null&&xd(ql)&&(ql=null),xc.forEach(z2),bc.forEach(z2)}function bd(r,i){r.blockedOn===i&&(r.blockedOn=null,sm||(sm=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,nb)))}var wd=null;function D2(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 s=r[i],d=r[i+1],p=r[i+2];if(typeof d!="function"){if(lm(d||s)===null)continue;break}var g=Xi(s);g!==null&&(r.splice(i,3),i-=3,ih(g,{pending:!0,data:p,method:s.method,action:d},d,p))}}))}function eu(r){function i(V){return bd(V,r)}Bl!==null&&bd(Bl,r),Ll!==null&&bd(Ll,r),ql!==null&&bd(ql,r),xc.forEach(i),bc.forEach(i);for(var s=0;s<Ul.length;s++){var d=Ul[s];d.blockedOn===r&&(d.blockedOn=null)}for(;0<Ul.length&&(s=Ul[0],s.blockedOn===null);)M2(s),s.blockedOn===null&&Ul.shift();if(s=(r.ownerDocument||r).$$reactFormReplay,s!=null)for(d=0;d<s.length;d+=3){var p=s[d],g=s[d+1],C=p[On]||null;if(typeof g=="function")C||D2(s);else if(C){var z=null;if(g&&g.hasAttribute("formAction")){if(p=g,C=g[On]||null)z=C.formAction;else if(lm(p)!==null)continue}else z=C.action;typeof z=="function"?s[d+1]=z:(s.splice(d,3),d-=3),D2(s)}}}function R2(){function r(g){g.canIntercept&&g.info==="react-transition"&&g.intercept({handler:function(){return new Promise(function(C){return p=C})},focusReset:"manual",scroll:"manual"})}function i(){p!==null&&(p(),p=null),d||setTimeout(s,20)}function s(){if(!d&&!navigation.transition){var g=navigation.currentEntry;g&&g.url!=null&&navigation.navigate(g.url,{state:g.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var d=!1,p=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(s,100),function(){d=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),p!==null&&(p(),p=null)}}}function om(r){this._internalRoot=r}kd.prototype.render=om.prototype.render=function(r){var i=this._internalRoot;if(i===null)throw Error(a(409));var s=i.current,d=Or();C2(s,d,r,i,null,null)},kd.prototype.unmount=om.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var i=r.containerInfo;C2(r.current,2,null,r,null,null),nd(),i[Yi]=null}};function kd(r){this._internalRoot=r}kd.prototype.unstable_scheduleHydration=function(r){if(r){var i=Su();r={blockedOn:null,target:r,priority:i};for(var s=0;s<Ul.length&&i!==0&&i<Ul[s].priority;s++);Ul.splice(s,0,r),s===0&&M2(r)}};var O2=t.version;if(O2!=="19.2.7")throw Error(a(527,O2,"19.2.7"));le.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?y(r):null,r=r===null?null:r.stateNode,r};var rb={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{Dn=Sd.inject(rb),on=Sd}catch{}}return Sc.createRoot=function(r,i){if(!l(r))throw Error(a(299));var s=!1,d="",p=H4,g=$4,C=F4;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(d=i.identifierPrefix),i.onUncaughtError!==void 0&&(p=i.onUncaughtError),i.onCaughtError!==void 0&&(g=i.onCaughtError),i.onRecoverableError!==void 0&&(C=i.onRecoverableError)),i=k2(r,1,!1,null,null,s,d,null,p,g,C,R2),r[Yi]=i.current,Fh(r),new om(i)},Sc.hydrateRoot=function(r,i,s){if(!l(r))throw Error(a(299));var d=!1,p="",g=H4,C=$4,z=F4,V=null;return s!=null&&(s.unstable_strictMode===!0&&(d=!0),s.identifierPrefix!==void 0&&(p=s.identifierPrefix),s.onUncaughtError!==void 0&&(g=s.onUncaughtError),s.onCaughtError!==void 0&&(C=s.onCaughtError),s.onRecoverableError!==void 0&&(z=s.onRecoverableError),s.formState!==void 0&&(V=s.formState)),i=k2(r,1,!0,i,s??null,d,p,V,g,C,z,R2),i.context=S2(null),s=i.current,d=Or(),d=ti(d),p=we(d),p.callback=null,qe(s,p,d),s=d,i.current.lanes=s,Lt(i,s),Pa(i),r[Yi]=i.current,Fh(r),new kd(i)},Sc.version="19.2.7",Sc}var G2;function yb(){if(G2)return dm.exports;G2=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(),dm.exports=gb(),dm.exports}var vb=yb();function V2(e){const t=[],n=String(e||"");let a=n.indexOf(","),l=0,o=!1;for(;!o;){a===-1&&(a=n.length,o=!0);const c=n.slice(l,a).trim();(c||!o)&&t.push(c),l=a+1,a=n.indexOf(",",l)}return t}function xb(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const bb=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,wb=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,kb={};function Y2(e,t){return(kb.jsx?wb:bb).test(e)}const Sb=/[ \t\n\f\r]/g;function Cb(e){return typeof e=="object"?e.type==="text"?W2(e.value):!1:W2(e)}function W2(e){return e.replace(Sb,"")===""}class e0{constructor(t,n,a){this.normal=n,this.property=t,a&&(this.space=a)}}e0.prototype.normal={};e0.prototype.property={};e0.prototype.space=void 0;function N5(e,t){const n={},a={};for(const l of e)Object.assign(n,l.property),Object.assign(a,l.normal);return new e0(n,a,t)}function Wc(e){return e.toLowerCase()}class jr{constructor(t,n){this.attribute=n,this.property=t}}jr.prototype.attribute="";jr.prototype.booleanish=!1;jr.prototype.boolean=!1;jr.prototype.commaOrSpaceSeparated=!1;jr.prototype.commaSeparated=!1;jr.prototype.defined=!1;jr.prototype.mustUseProperty=!1;jr.prototype.number=!1;jr.prototype.overloadedBoolean=!1;jr.prototype.property="";jr.prototype.spaceSeparated=!1;jr.prototype.space=void 0;let jb=0;const it=Js(),Sn=Js(),mp=Js(),Ae=Js(),Vt=Js(),Ws=Js(),_r=Js();function Js(){return 2**++jb}const pp=Object.freeze(Object.defineProperty({__proto__:null,boolean:it,booleanish:Sn,commaOrSpaceSeparated:_r,commaSeparated:Ws,number:Ae,overloadedBoolean:mp,spaceSeparated:Vt},Symbol.toStringTag,{value:"Module"})),pm=Object.keys(pp);class i1 extends jr{constructor(t,n,a,l){let o=-1;if(super(t,n),K2(this,"space",l),typeof a=="number")for(;++o<pm.length;){const c=pm[o];K2(this,pm[o],(a&pp[c])===pp[c])}}}i1.prototype.defined=!0;function K2(e,t,n){n&&(e[t]=n)}function hu(e){const t={},n={};for(const[a,l]of Object.entries(e.properties)){const o=new i1(a,e.transform(e.attributes||{},a),l,e.space);e.mustUseProperty&&e.mustUseProperty.includes(a)&&(o.mustUseProperty=!0),t[a]=o,n[Wc(a)]=a,n[Wc(o.attribute)]=a}return new e0(t,n,e.space)}const M5=hu({properties:{ariaActiveDescendant:null,ariaAtomic:Sn,ariaAutoComplete:null,ariaBusy:Sn,ariaChecked:Sn,ariaColCount:Ae,ariaColIndex:Ae,ariaColSpan:Ae,ariaControls:Vt,ariaCurrent:null,ariaDescribedBy:Vt,ariaDetails:null,ariaDisabled:Sn,ariaDropEffect:Vt,ariaErrorMessage:null,ariaExpanded:Sn,ariaFlowTo:Vt,ariaGrabbed:Sn,ariaHasPopup:null,ariaHidden:Sn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Vt,ariaLevel:Ae,ariaLive:null,ariaModal:Sn,ariaMultiLine:Sn,ariaMultiSelectable:Sn,ariaOrientation:null,ariaOwns:Vt,ariaPlaceholder:null,ariaPosInSet:Ae,ariaPressed:Sn,ariaReadOnly:Sn,ariaRelevant:null,ariaRequired:Sn,ariaRoleDescription:Vt,ariaRowCount:Ae,ariaRowIndex:Ae,ariaRowSpan:Ae,ariaSelected:Sn,ariaSetSize:Ae,ariaSort:null,ariaValueMax:Ae,ariaValueMin:Ae,ariaValueNow:Ae,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function z5(e,t){return t in e?e[t]:t}function D5(e,t){return z5(e,t.toLowerCase())}const Tb=hu({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ws,acceptCharset:Vt,accessKey:Vt,action:null,allow:null,allowFullScreen:it,allowPaymentRequest:it,allowUserMedia:it,alpha:it,alt:null,as:null,async:it,autoCapitalize:null,autoComplete:Vt,autoFocus:it,autoPlay:it,blocking:Vt,capture:null,charSet:null,checked:it,cite:null,className:Vt,closedBy:null,colorSpace:null,cols:Ae,colSpan:Ae,command:null,commandFor:null,content:null,contentEditable:Sn,controls:it,controlsList:Vt,coords:Ae|Ws,crossOrigin:null,data:null,dateTime:null,decoding:null,default:it,defer:it,dir:null,dirName:null,disabled:it,download:mp,draggable:Sn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:it,formTarget:null,headers:Vt,height:Ae,hidden:mp,high:Ae,href:null,hrefLang:null,htmlFor:Vt,httpEquiv:Vt,id:null,imageSizes:null,imageSrcSet:null,inert:it,inputMode:null,integrity:null,is:null,isMap:it,itemId:null,itemProp:Vt,itemRef:Vt,itemScope:it,itemType:Vt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:it,low:Ae,manifest:null,max:null,maxLength:Ae,media:null,method:null,min:null,minLength:Ae,multiple:it,muted:it,name:null,nonce:null,noModule:it,noValidate:it,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:it,optimum:Ae,pattern:null,ping:Vt,placeholder:null,playsInline:it,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:it,referrerPolicy:null,rel:Vt,required:it,reversed:it,rows:Ae,rowSpan:Ae,sandbox:Vt,scope:null,scoped:it,seamless:it,selected:it,shadowRootClonable:it,shadowRootCustomElementRegistry:it,shadowRootDelegatesFocus:it,shadowRootMode:null,shadowRootSerializable:it,shape:null,size:Ae,sizes:null,slot:null,span:Ae,spellCheck:Sn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ae,step:null,style:null,tabIndex:Ae,target:null,title:null,translate:null,type:null,typeMustMatch:it,useMap:null,value:Sn,width:Ae,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Vt,axis:null,background:null,bgColor:null,border:Ae,borderColor:null,bottomMargin:Ae,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:it,declare:it,event:null,face:null,frame:null,frameBorder:null,hSpace:Ae,leftMargin:Ae,link:null,longDesc:null,lowSrc:null,marginHeight:Ae,marginWidth:Ae,noResize:it,noHref:it,noShade:it,noWrap:it,object:null,profile:null,prompt:null,rev:null,rightMargin:Ae,rules:null,scheme:null,scrolling:Sn,standby:null,summary:null,text:null,topMargin:Ae,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ae,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:it,disablePictureInPicture:it,disableRemotePlayback:it,exportParts:Ws,part:Vt,prefix:null,property:null,results:Ae,security:null,unselectable:null},space:"html",transform:D5}),Ab=hu({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:_r,accentHeight:Ae,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ae,amplitude:Ae,arabicForm:null,ascent:Ae,attributeName:null,attributeType:null,azimuth:Ae,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ae,by:null,calcMode:null,capHeight:Ae,className:Vt,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:Ae,diffuseConstant:Ae,direction:null,display:null,dur:null,divisor:Ae,dominantBaseline:null,download:it,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ae,enableBackground:null,end:null,event:null,exponent:Ae,externalResourcesRequired:null,fill:null,fillOpacity:Ae,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:Ae,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ae,horizOriginX:Ae,horizOriginY:Ae,id:null,ideographic:Ae,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ae,k:Ae,k1:Ae,k2:Ae,k3:Ae,k4:Ae,kernelMatrix:_r,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ae,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:Ae,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:Ae,overlineThickness:Ae,paintOrder:null,panose1:null,path:null,pathLength:Ae,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Vt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ae,pointsAtY:Ae,pointsAtZ:Ae,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:_r,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:_r,rev:_r,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:_r,requiredFeatures:_r,requiredFonts:_r,requiredFormats:_r,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:Ae,specularExponent:Ae,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ae,strikethroughThickness:Ae,string:null,stroke:null,strokeDashArray:_r,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ae,strokeOpacity:Ae,strokeWidth:null,style:null,surfaceScale:Ae,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:_r,tabIndex:Ae,tableValues:null,target:null,targetX:Ae,targetY:Ae,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:_r,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ae,underlineThickness:Ae,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ae,values:null,vAlphabetic:Ae,vMathematical:Ae,vectorEffect:null,vHanging:Ae,vIdeographic:Ae,version:null,vertAdvY:Ae,vertOriginX:Ae,vertOriginY:Ae,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ae,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:z5}),R5=hu({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()}}),O5=hu({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:D5}),_5=hu({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Eb={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"},Nb=/[A-Z]/g,X2=/-[a-z]/g,Mb=/^data[-\w.:]+$/i;function I5(e,t){const n=Wc(t);let a=t,l=jr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Mb.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(X2,Db);a="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!X2.test(o)){let c=o.replace(Nb,zb);c.charAt(0)!=="-"&&(c="-"+c),t="data"+c}}l=i1}return new l(a,t)}function zb(e){return"-"+e.toLowerCase()}function Db(e){return e.charAt(1).toUpperCase()}const B5=N5([M5,Tb,R5,O5,_5],"html"),pf=N5([M5,Ab,R5,O5,_5],"svg");function Q2(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Rb(e){return e.join(" ").trim()}var tu={},gm,Z2;function Ob(){if(Z2)return gm;Z2=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,l=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,f=/^\s+|\s+$/g,h=`
|
|
51
|
-
`,m="/",y="*",v="",k="comment",b="declaration";function T(U,D){if(typeof U!="string")throw new TypeError("First argument must be a string");if(!U)return[];D=D||{};var M=1,L=1;function G(be){var ge=be.match(t);ge&&(M+=ge.length);var Z=be.lastIndexOf(h);L=~Z?be.length-Z:L+be.length}function te(){var be={line:M,column:L};return function(ge){return ge.position=new _(be),Q(),ge}}function _(be){this.start=be,this.end={line:M,column:L},this.source=D.source}_.prototype.content=U;function W(be){var ge=new Error(D.source+":"+M+":"+L+": "+be);if(ge.reason=be,ge.filename=D.source,ge.line=M,ge.column=L,ge.source=U,!D.silent)throw ge}function ae(be){var ge=be.exec(U);if(ge){var Z=ge[0];return G(Z),U=U.slice(Z.length),ge}}function Q(){ae(n)}function F(be){var ge;for(be=be||[];ge=oe();)ge!==!1&&be.push(ge);return be}function oe(){var be=te();if(!(m!=U.charAt(0)||y!=U.charAt(1))){for(var ge=2;v!=U.charAt(ge)&&(y!=U.charAt(ge)||m!=U.charAt(ge+1));)++ge;if(ge+=2,v===U.charAt(ge-1))return W("End of comment missing");var Z=U.slice(2,ge-2);return L+=2,G(Z),U=U.slice(ge),L+=2,be({type:k,comment:Z})}}function de(){var be=te(),ge=ae(a);if(ge){if(oe(),!ae(l))return W("property missing ':'");var Z=ae(o),le=be({type:b,property:N(ge[0].replace(e,v)),value:Z?N(Z[0].replace(e,v)):v});return ae(c),le}}function _e(){var be=[];F(be);for(var ge;ge=de();)ge!==!1&&(be.push(ge),F(be));return be}return Q(),_e()}function N(U){return U?U.replace(f,v):v}return gm=T,gm}var J2;function _b(){if(J2)return tu;J2=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(Ob());function n(a,l){let o=null;if(!a||typeof a!="string")return o;const c=(0,t.default)(a),f=typeof l=="function";return c.forEach(h=>{if(h.type!=="declaration")return;const{property:m,value:y}=h;f?l(m,y,h):y&&(o=o||{},o[m]=y)}),o}return tu}var Cc={},ey;function Ib(){if(ey)return Cc;ey=1,Object.defineProperty(Cc,"__esModule",{value:!0}),Cc.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,l=/^-(ms)-/,o=function(m){return!m||n.test(m)||e.test(m)},c=function(m,y){return y.toUpperCase()},f=function(m,y){return"".concat(y,"-")},h=function(m,y){return y===void 0&&(y={}),o(m)?m:(m=m.toLowerCase(),y.reactCompat?m=m.replace(l,f):m=m.replace(a,f),m.replace(t,c))};return Cc.camelCase=h,Cc}var jc,ty;function Bb(){if(ty)return jc;ty=1;var e=jc&&jc.__importDefault||function(l){return l&&l.__esModule?l:{default:l}},t=e(_b()),n=Ib();function a(l,o){var c={};return!l||typeof l!="string"||(0,t.default)(l,function(f,h){f&&h&&(c[(0,n.camelCase)(f,o)]=h)}),c}return a.default=a,jc=a,jc}var Lb=Bb();const qb=E5(Lb),L5=q5("end"),l1=q5("start");function q5(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 Ub(e){const t=l1(e),n=L5(e);if(t&&n)return{start:t,end:n}}function qc(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?ny(e.position):"start"in e||"end"in e?ny(e):"line"in e||"column"in e?gp(e):""}function gp(e){return ry(e&&e.line)+":"+ry(e&&e.column)}function ny(e){return gp(e&&e.start)+"-"+gp(e&&e.end)}function ry(e){return e&&typeof e=="number"?e:1}class Wn extends Error{constructor(t,n,a){super(),typeof n=="string"&&(a=n,n=void 0);let l="",o={},c=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?l=t:!o.cause&&t&&(c=!0,l=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof a=="string"){const h=a.indexOf(":");h===-1?o.ruleId=a:(o.source=a.slice(0,h),o.ruleId=a.slice(h+1))}if(!o.place&&o.ancestors&&o.ancestors){const h=o.ancestors[o.ancestors.length-1];h&&(o.place=h.position)}const f=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=l,this.line=f?f.line:void 0,this.name=qc(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=c&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Wn.prototype.file="";Wn.prototype.name="";Wn.prototype.reason="";Wn.prototype.message="";Wn.prototype.stack="";Wn.prototype.column=void 0;Wn.prototype.line=void 0;Wn.prototype.ancestors=void 0;Wn.prototype.cause=void 0;Wn.prototype.fatal=void 0;Wn.prototype.place=void 0;Wn.prototype.ruleId=void 0;Wn.prototype.source=void 0;const s1={}.hasOwnProperty,Hb=new Map,$b=/[A-Z]/g,Fb=new Set(["table","tbody","thead","tfoot","tr"]),Pb=new Set(["td","th"]),U5="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Gb(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=Jb(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=Zb(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"?pf:B5,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=H5(l,e,void 0);return o&&typeof o!="string"?o:l.create(e,l.Fragment,{children:o||void 0},void 0)}function H5(e,t,n){if(t.type==="element")return Vb(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Yb(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Kb(e,t,n);if(t.type==="mdxjsEsm")return Wb(e,t);if(t.type==="root")return Xb(e,t,n);if(t.type==="text")return Qb(e,t)}function Vb(e,t,n){const a=e.schema;let l=a;t.tagName.toLowerCase()==="svg"&&a.space==="html"&&(l=pf,e.schema=l),e.ancestors.push(t);const o=F5(e,t.tagName,!1),c=e8(e,t);let f=u1(e,t);return Fb.has(t.tagName)&&(f=f.filter(function(h){return typeof h=="string"?!Cb(h):!0})),$5(e,c,o,t),o1(c,f),e.ancestors.pop(),e.schema=a,e.create(t,o,c,n)}function Yb(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)}Kc(e,t.position)}function Wb(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Kc(e,t.position)}function Kb(e,t,n){const a=e.schema;let l=a;t.name==="svg"&&a.space==="html"&&(l=pf,e.schema=l),e.ancestors.push(t);const o=t.name===null?e.Fragment:F5(e,t.name,!0),c=t8(e,t),f=u1(e,t);return $5(e,c,o,t),o1(c,f),e.ancestors.pop(),e.schema=a,e.create(t,o,c,n)}function Xb(e,t,n){const a={};return o1(a,u1(e,t)),e.create(t,e.Fragment,a,n)}function Qb(e,t){return t.value}function $5(e,t,n,a){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=a)}function o1(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Zb(e,t,n){return a;function a(l,o,c,f){const m=Array.isArray(c.children)?n:t;return f?m(o,c,f):m(o,c)}}function Jb(e,t){return n;function n(a,l,o,c){const f=Array.isArray(o.children),h=l1(a);return t(l,o,c,f,{columnNumber:h?h.column-1:void 0,fileName:e,lineNumber:h?h.line:void 0},void 0)}}function e8(e,t){const n={};let a,l;for(l in t.properties)if(l!=="children"&&s1.call(t.properties,l)){const o=n8(e,l,t.properties[l]);if(o){const[c,f]=o;e.tableCellAlignToStyle&&c==="align"&&typeof f=="string"&&Pb.has(t.tagName)?a=f:n[c]=f}}if(a){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=a}return n}function t8(e,t){const n={};for(const a of t.attributes)if(a.type==="mdxJsxExpressionAttribute")if(a.data&&a.data.estree&&e.evaluater){const o=a.data.estree.body[0];o.type;const c=o.expression;c.type;const f=c.properties[0];f.type,Object.assign(n,e.evaluater.evaluateExpression(f.argument))}else Kc(e,t.position);else{const l=a.name;let o;if(a.value&&typeof a.value=="object")if(a.value.data&&a.value.data.estree&&e.evaluater){const f=a.value.data.estree.body[0];f.type,o=e.evaluater.evaluateExpression(f.expression)}else Kc(e,t.position);else o=a.value===null?!0:a.value;n[l]=o}return n}function u1(e,t){const n=[];let a=-1;const l=e.passKeys?new Map:Hb;for(;++a<t.children.length;){const o=t.children[a];let c;if(e.passKeys){const h=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(h){const m=l.get(h)||0;c=h+"-"+m,l.set(h,m+1)}}const f=H5(e,o,c);f!==void 0&&n.push(f)}return n}function n8(e,t,n){const a=I5(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=a.commaSeparated?xb(n):Rb(n)),a.property==="style"){let l=typeof n=="object"?n:r8(e,String(n));return e.stylePropertyNameCase==="css"&&(l=a8(l)),["style",l]}return[e.elementAttributeNameCase==="react"&&a.space?Eb[a.property]||a.property:a.attribute,n]}}function r8(e,t){try{return qb(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const a=n,l=new Wn("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=U5+"#cannot-parse-style-attribute",l}}function F5(e,t,n){let a;if(!n)a={type:"Literal",value:t};else if(t.includes(".")){const l=t.split(".");let o=-1,c;for(;++o<l.length;){const f=Y2(l[o])?{type:"Identifier",name:l[o]}:{type:"Literal",value:l[o]};c=c?{type:"MemberExpression",object:c,property:f,computed:!!(o&&f.type==="Literal"),optional:!1}:f}a=c}else a=Y2(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(a.type==="Literal"){const l=a.value;return s1.call(e.components,l)?e.components[l]:l}if(e.evaluater)return e.evaluater.evaluateExpression(a);Kc(e)}function Kc(e,t){const n=new Wn("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=U5+"#cannot-handle-mdx-estrees-without-createevaluater",n}function a8(e){const t={};let n;for(n in e)s1.call(e,n)&&(t[i8(n)]=e[n]);return t}function i8(e){let t=e.replace($b,l8);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function l8(e){return"-"+e.toLowerCase()}const ym={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"]},s8={};function c1(e,t){const n=s8,a=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,l=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return P5(e,a,l)}function P5(e,t,n){if(o8(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 ay(e.children,t,n)}return Array.isArray(e)?ay(e,t,n):""}function ay(e,t,n){const a=[];let l=-1;for(;++l<e.length;)a[l]=P5(e[l],t,n);return a.join("")}function o8(e){return!!(e&&typeof e=="object")}const iy=document.createElement("i");function d1(e){const t="&"+e+";";iy.innerHTML=t;const n=iy.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Ir(e,t,n,a){const l=e.length;let o=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);o<a.length;)c=a.slice(o,o+1e4),c.unshift(t,0),e.splice(...c),o+=1e4,t+=1e4}function ta(e,t){return e.length>0?(Ir(e,e.length,0,t),e):t}const ly={}.hasOwnProperty;function G5(e){const t={};let n=-1;for(;++n<e.length;)u8(t,e[n]);return t}function u8(e,t){let n;for(n in t){const l=(ly.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let c;if(o)for(c in o){ly.call(l,c)||(l[c]=[]);const f=o[c];c8(l[c],Array.isArray(f)?f:f?[f]:[])}}}function c8(e,t){let n=-1;const a=[];for(;++n<t.length;)(t[n].add==="after"?e:a).push(t[n]);Ir(e,0,0,a)}function V5(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 Ta(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const rr=ts(/[A-Za-z]/),Vn=ts(/[\dA-Za-z]/),d8=ts(/[#-'*+\--9=?A-Z^-~]/);function ef(e){return e!==null&&(e<32||e===127)}const yp=ts(/\d/),f8=ts(/[\dA-Fa-f]/),h8=ts(/[!-/:-@[-`{-~]/);function Ke(e){return e!==null&&e<-2}function Yt(e){return e!==null&&(e<0||e===32)}function kt(e){return e===-2||e===-1||e===32}const gf=ts(new RegExp("\\p{P}|\\p{S}","u")),Ks=ts(/\s/);function ts(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function mu(e){const t=[];let n=-1,a=0,l=0;for(;++n<e.length;){const o=e.charCodeAt(n);let c="";if(o===37&&Vn(e.charCodeAt(n+1))&&Vn(e.charCodeAt(n+2)))l=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(c=String.fromCharCode(o));else if(o>55295&&o<57344){const f=e.charCodeAt(n+1);o<56320&&f>56319&&f<57344?(c=String.fromCharCode(o,f),l=1):c="�"}else c=String.fromCharCode(o);c&&(t.push(e.slice(a,n),encodeURIComponent(c)),a=n+l+1,c=""),l&&(n+=l,l=0)}return t.join("")+e.slice(a)}function xt(e,t,n,a){const l=a?a-1:Number.POSITIVE_INFINITY;let o=0;return c;function c(h){return kt(h)?(e.enter(n),f(h)):t(h)}function f(h){return kt(h)&&o++<l?(e.consume(h),f):(e.exit(n),t(h))}}const m8={tokenize:p8};function p8(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"),xt(e,t,"linePrefix")}function l(f){return e.enter("paragraph"),o(f)}function o(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 Ke(f)?(e.consume(f),e.exit("chunkText"),o):(e.consume(f),c)}}const g8={tokenize:y8},sy={tokenize:v8};function y8(e){const t=this,n=[];let a=0,l,o,c;return f;function f(L){if(a<n.length){const G=n[a];return t.containerState=G[1],e.attempt(G[0].continuation,h,m)(L)}return m(L)}function h(L){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,l&&M();const G=t.events.length;let te=G,_;for(;te--;)if(t.events[te][0]==="exit"&&t.events[te][1].type==="chunkFlow"){_=t.events[te][1].end;break}D(a);let W=G;for(;W<t.events.length;)t.events[W][1].end={..._},W++;return Ir(t.events,te+1,0,t.events.slice(G)),t.events.length=W,m(L)}return f(L)}function m(L){if(a===n.length){if(!l)return k(L);if(l.currentConstruct&&l.currentConstruct.concrete)return T(L);t.interrupt=!!(l.currentConstruct&&!l._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(sy,y,v)(L)}function y(L){return l&&M(),D(a),k(L)}function v(L){return t.parser.lazy[t.now().line]=a!==n.length,c=t.now().offset,T(L)}function k(L){return t.containerState={},e.attempt(sy,b,T)(L)}function b(L){return a++,n.push([t.currentConstruct,t.containerState]),k(L)}function T(L){if(L===null){l&&M(),D(0),e.consume(L);return}return l=l||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:l,contentType:"flow",previous:o}),N(L)}function N(L){if(L===null){U(e.exit("chunkFlow"),!0),D(0),e.consume(L);return}return Ke(L)?(e.consume(L),U(e.exit("chunkFlow")),a=0,t.interrupt=void 0,f):(e.consume(L),N)}function U(L,G){const te=t.sliceStream(L);if(G&&te.push(null),L.previous=o,o&&(o.next=L),o=L,l.defineSkip(L.start),l.write(te),t.parser.lazy[L.start.line]){let _=l.events.length;for(;_--;)if(l.events[_][1].start.offset<c&&(!l.events[_][1].end||l.events[_][1].end.offset>c))return;const W=t.events.length;let ae=W,Q,F;for(;ae--;)if(t.events[ae][0]==="exit"&&t.events[ae][1].type==="chunkFlow"){if(Q){F=t.events[ae][1].end;break}Q=!0}for(D(a),_=W;_<t.events.length;)t.events[_][1].end={...F},_++;Ir(t.events,ae+1,0,t.events.slice(W)),t.events.length=_}}function D(L){let G=n.length;for(;G-- >L;){const te=n[G];t.containerState=te[1],te[0].exit.call(t,e)}n.length=L}function M(){l.write([null]),o=void 0,l=void 0,t.containerState._closeFlow=void 0}}function v8(e,t,n){return xt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ou(e){if(e===null||Yt(e)||Ks(e))return 1;if(gf(e))return 2}function yf(e,t,n){const a=[];let l=-1;for(;++l<e.length;){const o=e[l].resolveAll;o&&!a.includes(o)&&(t=o(t,n),a.push(o))}return t}const vp={name:"attention",resolveAll:x8,tokenize:b8};function x8(e,t){let n=-1,a,l,o,c,f,h,m,y;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 v={...e[a][1].end},k={...e[n][1].start};oy(v,-h),oy(k,h),c={type:h>1?"strongSequence":"emphasisSequence",start:v,end:{...e[a][1].end}},f={type:h>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:k},o={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=ta(m,[["enter",e[a][1],t],["exit",e[a][1],t]])),m=ta(m,[["enter",l,t],["enter",c,t],["exit",c,t],["enter",o,t]]),m=ta(m,yf(t.parser.constructs.insideSpan.null,e.slice(a+1,n),t)),m=ta(m,[["exit",o,t],["enter",f,t],["exit",f,t],["exit",l,t]]),e[n][1].end.offset-e[n][1].start.offset?(y=2,m=ta(m,[["enter",e[n][1],t],["exit",e[n][1],t]])):y=0,Ir(e,a-1,n-a+3,m),n=a+m.length-y-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function b8(e,t){const n=this.parser.constructs.attentionMarkers.null,a=this.previous,l=ou(a);let o;return c;function c(h){return o=h,e.enter("attentionSequence"),f(h)}function f(h){if(h===o)return e.consume(h),f;const m=e.exit("attentionSequence"),y=ou(h),v=!y||y===2&&l||n.includes(h),k=!l||l===2&&y||n.includes(a);return m._open=!!(o===42?v:v&&(l||!k)),m._close=!!(o===42?k:k&&(y||!v)),t(h)}}function oy(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const w8={name:"autolink",tokenize:k8};function k8(e,t,n){let a=0;return l;function l(b){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(b){return rr(b)?(e.consume(b),c):b===64?n(b):m(b)}function c(b){return b===43||b===45||b===46||Vn(b)?(a=1,f(b)):m(b)}function f(b){return b===58?(e.consume(b),a=0,h):(b===43||b===45||b===46||Vn(b))&&a++<32?(e.consume(b),f):(a=0,m(b))}function h(b){return b===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):b===null||b===32||b===60||ef(b)?n(b):(e.consume(b),h)}function m(b){return b===64?(e.consume(b),y):d8(b)?(e.consume(b),m):n(b)}function y(b){return Vn(b)?v(b):n(b)}function v(b){return b===46?(e.consume(b),a=0,y):b===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):k(b)}function k(b){if((b===45||Vn(b))&&a++<63){const T=b===45?k:v;return e.consume(b),T}return n(b)}}const t0={partial:!0,tokenize:S8};function S8(e,t,n){return a;function a(o){return kt(o)?xt(e,l,"linePrefix")(o):l(o)}function l(o){return o===null||Ke(o)?t(o):n(o)}}const Y5={continuation:{tokenize:j8},exit:T8,name:"blockQuote",tokenize:C8};function C8(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"),o}return n(c)}function o(c){return kt(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(c))}}function j8(e,t,n){const a=this;return l;function l(c){return kt(c)?xt(e,o,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):o(c)}function o(c){return e.attempt(Y5,t,n)(c)}}function T8(e){e.exit("blockQuote")}const W5={name:"characterEscape",tokenize:A8};function A8(e,t,n){return a;function a(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),l}function l(o){return h8(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const K5={name:"characterReference",tokenize:E8};function E8(e,t,n){const a=this;let l=0,o,c;return f;function f(v){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(v),e.exit("characterReferenceMarker"),h}function h(v){return v===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(v),e.exit("characterReferenceMarkerNumeric"),m):(e.enter("characterReferenceValue"),o=31,c=Vn,y(v))}function m(v){return v===88||v===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(v),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,c=f8,y):(e.enter("characterReferenceValue"),o=7,c=yp,y(v))}function y(v){if(v===59&&l){const k=e.exit("characterReferenceValue");return c===Vn&&!d1(a.sliceSerialize(k))?n(v):(e.enter("characterReferenceMarker"),e.consume(v),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return c(v)&&l++<o?(e.consume(v),y):n(v)}}const uy={partial:!0,tokenize:M8},cy={concrete:!0,name:"codeFenced",tokenize:N8};function N8(e,t,n){const a=this,l={partial:!0,tokenize:te};let o=0,c=0,f;return h;function h(_){return m(_)}function m(_){const W=a.events[a.events.length-1];return o=W&&W[1].type==="linePrefix"?W[2].sliceSerialize(W[1],!0).length:0,f=_,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),y(_)}function y(_){return _===f?(c++,e.consume(_),y):c<3?n(_):(e.exit("codeFencedFenceSequence"),kt(_)?xt(e,v,"whitespace")(_):v(_))}function v(_){return _===null||Ke(_)?(e.exit("codeFencedFence"),a.interrupt?t(_):e.check(uy,N,G)(_)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),k(_))}function k(_){return _===null||Ke(_)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),v(_)):kt(_)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),xt(e,b,"whitespace")(_)):_===96&&_===f?n(_):(e.consume(_),k)}function b(_){return _===null||Ke(_)?v(_):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),T(_))}function T(_){return _===null||Ke(_)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),v(_)):_===96&&_===f?n(_):(e.consume(_),T)}function N(_){return e.attempt(l,G,U)(_)}function U(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),D}function D(_){return o>0&&kt(_)?xt(e,M,"linePrefix",o+1)(_):M(_)}function M(_){return _===null||Ke(_)?e.check(uy,N,G)(_):(e.enter("codeFlowValue"),L(_))}function L(_){return _===null||Ke(_)?(e.exit("codeFlowValue"),M(_)):(e.consume(_),L)}function G(_){return e.exit("codeFenced"),t(_)}function te(_,W,ae){let Q=0;return F;function F(ge){return _.enter("lineEnding"),_.consume(ge),_.exit("lineEnding"),oe}function oe(ge){return _.enter("codeFencedFence"),kt(ge)?xt(_,de,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ge):de(ge)}function de(ge){return ge===f?(_.enter("codeFencedFenceSequence"),_e(ge)):ae(ge)}function _e(ge){return ge===f?(Q++,_.consume(ge),_e):Q>=c?(_.exit("codeFencedFenceSequence"),kt(ge)?xt(_,be,"whitespace")(ge):be(ge)):ae(ge)}function be(ge){return ge===null||Ke(ge)?(_.exit("codeFencedFence"),W(ge)):ae(ge)}}}function M8(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"),o)}function o(c){return a.parser.lazy[a.now().line]?n(c):t(c)}}const vm={name:"codeIndented",tokenize:D8},z8={partial:!0,tokenize:R8};function D8(e,t,n){const a=this;return l;function l(m){return e.enter("codeIndented"),xt(e,o,"linePrefix",5)(m)}function o(m){const y=a.events[a.events.length-1];return y&&y[1].type==="linePrefix"&&y[2].sliceSerialize(y[1],!0).length>=4?c(m):n(m)}function c(m){return m===null?h(m):Ke(m)?e.attempt(z8,c,h)(m):(e.enter("codeFlowValue"),f(m))}function f(m){return m===null||Ke(m)?(e.exit("codeFlowValue"),c(m)):(e.consume(m),f)}function h(m){return e.exit("codeIndented"),t(m)}}function R8(e,t,n){const a=this;return l;function l(c){return a.parser.lazy[a.now().line]?n(c):Ke(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),l):xt(e,o,"linePrefix",5)(c)}function o(c){const f=a.events[a.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(c):Ke(c)?l(c):n(c)}}const O8={name:"codeText",previous:I8,resolve:_8,tokenize:B8};function _8(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 I8(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function B8(e,t,n){let a=0,l,o;return c;function c(v){return e.enter("codeText"),e.enter("codeTextSequence"),f(v)}function f(v){return v===96?(e.consume(v),a++,f):(e.exit("codeTextSequence"),h(v))}function h(v){return v===null?n(v):v===32?(e.enter("space"),e.consume(v),e.exit("space"),h):v===96?(o=e.enter("codeTextSequence"),l=0,y(v)):Ke(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),h):(e.enter("codeTextData"),m(v))}function m(v){return v===null||v===32||v===96||Ke(v)?(e.exit("codeTextData"),h(v)):(e.consume(v),m)}function y(v){return v===96?(e.consume(v),l++,y):l===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(v)):(o.type="codeTextData",m(v))}}class L8{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 o=this.right.splice(this.right.length-l,Number.POSITIVE_INFINITY);return a&&Tc(this.left,a),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Tc(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Tc(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);Tc(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Tc(this.left,n.reverse())}}}function Tc(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 X5(e){const t={};let n=-1,a,l,o,c,f,h,m;const y=new L8(e);for(;++n<y.length;){for(;n in t;)n=t[n];if(a=y.get(n),n&&a[1].type==="chunkFlow"&&y.get(n-1)[1].type==="listItemPrefix"&&(h=a[1]._tokenizer.events,o=0,o<h.length&&h[o][1].type==="lineEndingBlank"&&(o+=2),o<h.length&&h[o][1].type==="content"))for(;++o<h.length&&h[o][1].type!=="content";)h[o][1].type==="chunkText"&&(h[o][1]._isInFirstContentOfListItem=!0,o++);if(a[0]==="enter")a[1].contentType&&(Object.assign(t,q8(y,n)),n=t[n],m=!0);else if(a[1]._container){for(o=n,l=void 0;o--;)if(c=y.get(o),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(l&&(y.get(l)[1].type="lineEndingBlank"),c[1].type="lineEnding",l=o);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;l&&(a[1].end={...y.get(l)[1].start},f=y.slice(l,n),f.unshift(a),y.splice(l,n-l+1,f))}}return Ir(e,0,Number.POSITIVE_INFINITY,y.slice(0)),!m}function q8(e,t){const n=e.get(t)[1],a=e.get(t)[2];let l=t-1;const o=[];let c=n._tokenizer;c||(c=a.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const f=c.events,h=[],m={};let y,v,k=-1,b=n,T=0,N=0;const U=[N];for(;b;){for(;e.get(++l)[1]!==b;);o.push(l),b._tokenizer||(y=a.sliceStream(b),b.next||y.push(null),v&&c.defineSkip(b.start),b._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(y),b._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),v=b,b=b.next}for(b=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&&(N=k+1,U.push(N),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(c.events=[],b?(b._tokenizer=void 0,b.previous=void 0):U.pop(),k=U.length;k--;){const D=f.slice(U[k],U[k+1]),M=o.pop();h.push([M,M+D.length-1]),e.splice(M,2,D)}for(h.reverse(),k=-1;++k<h.length;)m[T+h[k][0]]=T+h[k][1],T+=h[k][1]-h[k][0]-1;return m}const U8={resolve:$8,tokenize:F8},H8={partial:!0,tokenize:P8};function $8(e){return X5(e),e}function F8(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?o(f):Ke(f)?e.check(H8,c,o)(f):(e.consume(f),l)}function o(f){return e.exit("chunkContent"),e.exit("content"),t(f)}function c(f){return e.consume(f),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,l}}function P8(e,t,n){const a=this;return l;function l(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),xt(e,o,"linePrefix")}function o(c){if(c===null||Ke(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 Q5(e,t,n,a,l,o,c,f,h){const m=h||Number.POSITIVE_INFINITY;let y=0;return v;function v(D){return D===60?(e.enter(a),e.enter(l),e.enter(o),e.consume(D),e.exit(o),k):D===null||D===32||D===41||ef(D)?n(D):(e.enter(a),e.enter(c),e.enter(f),e.enter("chunkString",{contentType:"string"}),N(D))}function k(D){return D===62?(e.enter(o),e.consume(D),e.exit(o),e.exit(l),e.exit(a),t):(e.enter(f),e.enter("chunkString",{contentType:"string"}),b(D))}function b(D){return D===62?(e.exit("chunkString"),e.exit(f),k(D)):D===null||D===60||Ke(D)?n(D):(e.consume(D),D===92?T:b)}function T(D){return D===60||D===62||D===92?(e.consume(D),b):b(D)}function N(D){return!y&&(D===null||D===41||Yt(D))?(e.exit("chunkString"),e.exit(f),e.exit(c),e.exit(a),t(D)):y<m&&D===40?(e.consume(D),y++,N):D===41?(e.consume(D),y--,N):D===null||D===32||D===40||ef(D)?n(D):(e.consume(D),D===92?U:N)}function U(D){return D===40||D===41||D===92?(e.consume(D),N):N(D)}}function Z5(e,t,n,a,l,o){const c=this;let f=0,h;return m;function m(b){return e.enter(a),e.enter(l),e.consume(b),e.exit(l),e.enter(o),y}function y(b){return f>999||b===null||b===91||b===93&&!h||b===94&&!f&&"_hiddenFootnoteSupport"in c.parser.constructs?n(b):b===93?(e.exit(o),e.enter(l),e.consume(b),e.exit(l),e.exit(a),t):Ke(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),y):(e.enter("chunkString",{contentType:"string"}),v(b))}function v(b){return b===null||b===91||b===93||Ke(b)||f++>999?(e.exit("chunkString"),y(b)):(e.consume(b),h||(h=!kt(b)),b===92?k:v)}function k(b){return b===91||b===92||b===93?(e.consume(b),f++,v):v(b)}}function J5(e,t,n,a,l,o){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(o),m(k))}function m(k){return k===c?(e.exit(o),h(c)):k===null?n(k):Ke(k)?(e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),xt(e,m,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),y(k))}function y(k){return k===c||k===null||Ke(k)?(e.exit("chunkString"),m(k)):(e.consume(k),k===92?v:y)}function v(k){return k===c||k===92?(e.consume(k),y):y(k)}}function Uc(e,t){let n;return a;function a(l){return Ke(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),n=!0,a):kt(l)?xt(e,a,n?"linePrefix":"lineSuffix")(l):t(l)}}const G8={name:"definition",tokenize:Y8},V8={partial:!0,tokenize:W8};function Y8(e,t,n){const a=this;let l;return o;function o(b){return e.enter("definition"),c(b)}function c(b){return Z5.call(a,e,f,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function f(b){return l=Ta(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),h):n(b)}function h(b){return Yt(b)?Uc(e,m)(b):m(b)}function m(b){return Q5(e,y,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function y(b){return e.attempt(V8,v,v)(b)}function v(b){return kt(b)?xt(e,k,"whitespace")(b):k(b)}function k(b){return b===null||Ke(b)?(e.exit("definition"),a.parser.defined.push(l),t(b)):n(b)}}function W8(e,t,n){return a;function a(f){return Yt(f)?Uc(e,l)(f):n(f)}function l(f){return J5(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function o(f){return kt(f)?xt(e,c,"whitespace")(f):c(f)}function c(f){return f===null||Ke(f)?t(f):n(f)}}const K8={name:"hardBreakEscape",tokenize:X8};function X8(e,t,n){return a;function a(o){return e.enter("hardBreakEscape"),e.consume(o),l}function l(o){return Ke(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const Q8={name:"headingAtx",resolve:Z8,tokenize:J8};function Z8(e,t){let n=e.length-2,a=3,l,o;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},o={type:"chunkText",start:e[a][1].start,end:e[n][1].end,contentType:"text"},Ir(e,a,n-a+1,[["enter",l,t],["enter",o,t],["exit",o,t],["exit",l,t]])),e}function J8(e,t,n){let a=0;return l;function l(y){return e.enter("atxHeading"),o(y)}function o(y){return e.enter("atxHeadingSequence"),c(y)}function c(y){return y===35&&a++<6?(e.consume(y),c):y===null||Yt(y)?(e.exit("atxHeadingSequence"),f(y)):n(y)}function f(y){return y===35?(e.enter("atxHeadingSequence"),h(y)):y===null||Ke(y)?(e.exit("atxHeading"),t(y)):kt(y)?xt(e,f,"whitespace")(y):(e.enter("atxHeadingText"),m(y))}function h(y){return y===35?(e.consume(y),h):(e.exit("atxHeadingSequence"),f(y))}function m(y){return y===null||y===35||Yt(y)?(e.exit("atxHeadingText"),f(y)):(e.consume(y),m)}}const e9=["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"],dy=["pre","script","style","textarea"],t9={concrete:!0,name:"htmlFlow",resolveTo:a9,tokenize:i9},n9={partial:!0,tokenize:s9},r9={partial:!0,tokenize:l9};function a9(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 i9(e,t,n){const a=this;let l,o,c,f,h;return m;function m(R){return y(R)}function y(R){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(R),v}function v(R){return R===33?(e.consume(R),k):R===47?(e.consume(R),o=!0,N):R===63?(e.consume(R),l=3,a.interrupt?t:H):rr(R)?(e.consume(R),c=String.fromCharCode(R),U):n(R)}function k(R){return R===45?(e.consume(R),l=2,b):R===91?(e.consume(R),l=5,f=0,T):rr(R)?(e.consume(R),l=4,a.interrupt?t:H):n(R)}function b(R){return R===45?(e.consume(R),a.interrupt?t:H):n(R)}function T(R){const me="CDATA[";return R===me.charCodeAt(f++)?(e.consume(R),f===me.length?a.interrupt?t:de:T):n(R)}function N(R){return rr(R)?(e.consume(R),c=String.fromCharCode(R),U):n(R)}function U(R){if(R===null||R===47||R===62||Yt(R)){const me=R===47,Oe=c.toLowerCase();return!me&&!o&&dy.includes(Oe)?(l=1,a.interrupt?t(R):de(R)):e9.includes(c.toLowerCase())?(l=6,me?(e.consume(R),D):a.interrupt?t(R):de(R)):(l=7,a.interrupt&&!a.parser.lazy[a.now().line]?n(R):o?M(R):L(R))}return R===45||Vn(R)?(e.consume(R),c+=String.fromCharCode(R),U):n(R)}function D(R){return R===62?(e.consume(R),a.interrupt?t:de):n(R)}function M(R){return kt(R)?(e.consume(R),M):F(R)}function L(R){return R===47?(e.consume(R),F):R===58||R===95||rr(R)?(e.consume(R),G):kt(R)?(e.consume(R),L):F(R)}function G(R){return R===45||R===46||R===58||R===95||Vn(R)?(e.consume(R),G):te(R)}function te(R){return R===61?(e.consume(R),_):kt(R)?(e.consume(R),te):L(R)}function _(R){return R===null||R===60||R===61||R===62||R===96?n(R):R===34||R===39?(e.consume(R),h=R,W):kt(R)?(e.consume(R),_):ae(R)}function W(R){return R===h?(e.consume(R),h=null,Q):R===null||Ke(R)?n(R):(e.consume(R),W)}function ae(R){return R===null||R===34||R===39||R===47||R===60||R===61||R===62||R===96||Yt(R)?te(R):(e.consume(R),ae)}function Q(R){return R===47||R===62||kt(R)?L(R):n(R)}function F(R){return R===62?(e.consume(R),oe):n(R)}function oe(R){return R===null||Ke(R)?de(R):kt(R)?(e.consume(R),oe):n(R)}function de(R){return R===45&&l===2?(e.consume(R),Z):R===60&&l===1?(e.consume(R),le):R===62&&l===4?(e.consume(R),I):R===63&&l===3?(e.consume(R),H):R===93&&l===5?(e.consume(R),We):Ke(R)&&(l===6||l===7)?(e.exit("htmlFlowData"),e.check(n9,ee,_e)(R)):R===null||Ke(R)?(e.exit("htmlFlowData"),_e(R)):(e.consume(R),de)}function _e(R){return e.check(r9,be,ee)(R)}function be(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),ge}function ge(R){return R===null||Ke(R)?_e(R):(e.enter("htmlFlowData"),de(R))}function Z(R){return R===45?(e.consume(R),H):de(R)}function le(R){return R===47?(e.consume(R),c="",Me):de(R)}function Me(R){if(R===62){const me=c.toLowerCase();return dy.includes(me)?(e.consume(R),I):de(R)}return rr(R)&&c.length<8?(e.consume(R),c+=String.fromCharCode(R),Me):de(R)}function We(R){return R===93?(e.consume(R),H):de(R)}function H(R){return R===62?(e.consume(R),I):R===45&&l===2?(e.consume(R),H):de(R)}function I(R){return R===null||Ke(R)?(e.exit("htmlFlowData"),ee(R)):(e.consume(R),I)}function ee(R){return e.exit("htmlFlow"),t(R)}}function l9(e,t,n){const a=this;return l;function l(c){return Ke(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o):n(c)}function o(c){return a.parser.lazy[a.now().line]?n(c):t(c)}}function s9(e,t,n){return a;function a(l){return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),e.attempt(t0,t,n)}}const o9={name:"htmlText",tokenize:u9};function u9(e,t,n){const a=this;let l,o,c;return f;function f(H){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(H),h}function h(H){return H===33?(e.consume(H),m):H===47?(e.consume(H),te):H===63?(e.consume(H),L):rr(H)?(e.consume(H),ae):n(H)}function m(H){return H===45?(e.consume(H),y):H===91?(e.consume(H),o=0,T):rr(H)?(e.consume(H),M):n(H)}function y(H){return H===45?(e.consume(H),b):n(H)}function v(H){return H===null?n(H):H===45?(e.consume(H),k):Ke(H)?(c=v,le(H)):(e.consume(H),v)}function k(H){return H===45?(e.consume(H),b):v(H)}function b(H){return H===62?Z(H):H===45?k(H):v(H)}function T(H){const I="CDATA[";return H===I.charCodeAt(o++)?(e.consume(H),o===I.length?N:T):n(H)}function N(H){return H===null?n(H):H===93?(e.consume(H),U):Ke(H)?(c=N,le(H)):(e.consume(H),N)}function U(H){return H===93?(e.consume(H),D):N(H)}function D(H){return H===62?Z(H):H===93?(e.consume(H),D):N(H)}function M(H){return H===null||H===62?Z(H):Ke(H)?(c=M,le(H)):(e.consume(H),M)}function L(H){return H===null?n(H):H===63?(e.consume(H),G):Ke(H)?(c=L,le(H)):(e.consume(H),L)}function G(H){return H===62?Z(H):L(H)}function te(H){return rr(H)?(e.consume(H),_):n(H)}function _(H){return H===45||Vn(H)?(e.consume(H),_):W(H)}function W(H){return Ke(H)?(c=W,le(H)):kt(H)?(e.consume(H),W):Z(H)}function ae(H){return H===45||Vn(H)?(e.consume(H),ae):H===47||H===62||Yt(H)?Q(H):n(H)}function Q(H){return H===47?(e.consume(H),Z):H===58||H===95||rr(H)?(e.consume(H),F):Ke(H)?(c=Q,le(H)):kt(H)?(e.consume(H),Q):Z(H)}function F(H){return H===45||H===46||H===58||H===95||Vn(H)?(e.consume(H),F):oe(H)}function oe(H){return H===61?(e.consume(H),de):Ke(H)?(c=oe,le(H)):kt(H)?(e.consume(H),oe):Q(H)}function de(H){return H===null||H===60||H===61||H===62||H===96?n(H):H===34||H===39?(e.consume(H),l=H,_e):Ke(H)?(c=de,le(H)):kt(H)?(e.consume(H),de):(e.consume(H),be)}function _e(H){return H===l?(e.consume(H),l=void 0,ge):H===null?n(H):Ke(H)?(c=_e,le(H)):(e.consume(H),_e)}function be(H){return H===null||H===34||H===39||H===60||H===61||H===96?n(H):H===47||H===62||Yt(H)?Q(H):(e.consume(H),be)}function ge(H){return H===47||H===62||Yt(H)?Q(H):n(H)}function Z(H){return H===62?(e.consume(H),e.exit("htmlTextData"),e.exit("htmlText"),t):n(H)}function le(H){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(H),e.exit("lineEnding"),Me}function Me(H){return kt(H)?xt(e,We,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(H):We(H)}function We(H){return e.enter("htmlTextData"),c(H)}}const f1={name:"labelEnd",resolveAll:h9,resolveTo:m9,tokenize:p9},c9={tokenize:g9},d9={tokenize:y9},f9={tokenize:v9};function h9(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&&Ir(e,0,e.length,n),e}function m9(e,t){let n=e.length,a=0,l,o,c,f;for(;n--;)if(l=e[n][1],o){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&&(o=n,l.type!=="labelLink")){a=2;break}}else l.type==="labelEnd"&&(c=n);const h={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},m={type:"label",start:{...e[o][1].start},end:{...e[c][1].end}},y={type:"labelText",start:{...e[o+a+2][1].end},end:{...e[c-2][1].start}};return f=[["enter",h,t],["enter",m,t]],f=ta(f,e.slice(o+1,o+a+3)),f=ta(f,[["enter",y,t]]),f=ta(f,yf(t.parser.constructs.insideSpan.null,e.slice(o+a+4,c-3),t)),f=ta(f,[["exit",y,t],e[c-2],e[c-1],["exit",m,t]]),f=ta(f,e.slice(c+1)),f=ta(f,[["exit",h,t]]),Ir(e,o,e.length,f),e}function p9(e,t,n){const a=this;let l=a.events.length,o,c;for(;l--;)if((a.events[l][1].type==="labelImage"||a.events[l][1].type==="labelLink")&&!a.events[l][1]._balanced){o=a.events[l][1];break}return f;function f(k){return o?o._inactive?v(k):(c=a.parser.defined.includes(Ta(a.sliceSerialize({start:o.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(c9,y,c?y:v)(k):k===91?e.attempt(d9,y,c?m:v)(k):c?y(k):v(k)}function m(k){return e.attempt(f9,y,v)(k)}function y(k){return t(k)}function v(k){return o._balanced=!0,n(k)}}function g9(e,t,n){return a;function a(v){return e.enter("resource"),e.enter("resourceMarker"),e.consume(v),e.exit("resourceMarker"),l}function l(v){return Yt(v)?Uc(e,o)(v):o(v)}function o(v){return v===41?y(v):Q5(e,c,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(v)}function c(v){return Yt(v)?Uc(e,h)(v):y(v)}function f(v){return n(v)}function h(v){return v===34||v===39||v===40?J5(e,m,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(v):y(v)}function m(v){return Yt(v)?Uc(e,y)(v):y(v)}function y(v){return v===41?(e.enter("resourceMarker"),e.consume(v),e.exit("resourceMarker"),e.exit("resource"),t):n(v)}}function y9(e,t,n){const a=this;return l;function l(f){return Z5.call(a,e,o,c,"reference","referenceMarker","referenceString")(f)}function o(f){return a.parser.defined.includes(Ta(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)))?t(f):n(f)}function c(f){return n(f)}}function v9(e,t,n){return a;function a(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),l}function l(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const x9={name:"labelStartImage",resolveAll:f1.resolveAll,tokenize:b9};function b9(e,t,n){const a=this;return l;function l(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),o}function o(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),c):n(f)}function c(f){return f===94&&"_hiddenFootnoteSupport"in a.parser.constructs?n(f):t(f)}}const w9={name:"labelStartLink",resolveAll:f1.resolveAll,tokenize:k9};function k9(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"),o}function o(c){return c===94&&"_hiddenFootnoteSupport"in a.parser.constructs?n(c):t(c)}}const xm={name:"lineEnding",tokenize:S9};function S9(e,t){return n;function n(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),xt(e,t,"linePrefix")}}const Vd={name:"thematicBreak",tokenize:C9};function C9(e,t,n){let a=0,l;return o;function o(m){return e.enter("thematicBreak"),c(m)}function c(m){return l=m,f(m)}function f(m){return m===l?(e.enter("thematicBreakSequence"),h(m)):a>=3&&(m===null||Ke(m))?(e.exit("thematicBreak"),t(m)):n(m)}function h(m){return m===l?(e.consume(m),a++,h):(e.exit("thematicBreakSequence"),kt(m)?xt(e,f,"whitespace")(m):f(m))}}const kr={continuation:{tokenize:E9},exit:M9,name:"list",tokenize:A9},j9={partial:!0,tokenize:z9},T9={partial:!0,tokenize:N9};function A9(e,t,n){const a=this,l=a.events[a.events.length-1];let o=l&&l[1].type==="linePrefix"?l[2].sliceSerialize(l[1],!0).length:0,c=0;return f;function f(b){const T=a.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(T==="listUnordered"?!a.containerState.marker||b===a.containerState.marker:yp(b)){if(a.containerState.type||(a.containerState.type=T,e.enter(T,{_container:!0})),T==="listUnordered")return e.enter("listItemPrefix"),b===42||b===45?e.check(Vd,n,m)(b):m(b);if(!a.interrupt||b===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),h(b)}return n(b)}function h(b){return yp(b)&&++c<10?(e.consume(b),h):(!a.interrupt||c<2)&&(a.containerState.marker?b===a.containerState.marker:b===41||b===46)?(e.exit("listItemValue"),m(b)):n(b)}function m(b){return e.enter("listItemMarker"),e.consume(b),e.exit("listItemMarker"),a.containerState.marker=a.containerState.marker||b,e.check(t0,a.interrupt?n:y,e.attempt(j9,k,v))}function y(b){return a.containerState.initialBlankLine=!0,o++,k(b)}function v(b){return kt(b)?(e.enter("listItemPrefixWhitespace"),e.consume(b),e.exit("listItemPrefixWhitespace"),k):n(b)}function k(b){return a.containerState.size=o+a.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(b)}}function E9(e,t,n){const a=this;return a.containerState._closeFlow=void 0,e.check(t0,l,o);function l(f){return a.containerState.furtherBlankLines=a.containerState.furtherBlankLines||a.containerState.initialBlankLine,xt(e,t,"listItemIndent",a.containerState.size+1)(f)}function o(f){return a.containerState.furtherBlankLines||!kt(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(T9,t,c)(f))}function c(f){return a.containerState._closeFlow=!0,a.interrupt=void 0,xt(e,e.attempt(kr,t,n),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function N9(e,t,n){const a=this;return xt(e,l,"listItemIndent",a.containerState.size+1);function l(o){const c=a.events[a.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===a.containerState.size?t(o):n(o)}}function M9(e){e.exit(this.containerState.type)}function z9(e,t,n){const a=this;return xt(e,l,"listItemPrefixWhitespace",a.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function l(o){const c=a.events[a.events.length-1];return!kt(o)&&c&&c[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const fy={name:"setextUnderline",resolveTo:D9,tokenize:R9};function D9(e,t){let n=e.length,a,l,o;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),!o&&e[n][1].type==="definition"&&(o=n);const c={type:"setextHeading",start:{...e[a][1].start},end:{...e[e.length-1][1].end}};return e[l][1].type="setextHeadingText",o?(e.splice(l,0,["enter",c,t]),e.splice(o+1,0,["exit",e[a][1],t]),e[a][1].end={...e[o][1].end}):e[a][1]=c,e.push(["exit",c,t]),e}function R9(e,t,n){const a=this;let l;return o;function o(m){let y=a.events.length,v;for(;y--;)if(a.events[y][1].type!=="lineEnding"&&a.events[y][1].type!=="linePrefix"&&a.events[y][1].type!=="content"){v=a.events[y][1].type==="paragraph";break}return!a.parser.lazy[a.now().line]&&(a.interrupt||v)?(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"),kt(m)?xt(e,h,"lineSuffix")(m):h(m))}function h(m){return m===null||Ke(m)?(e.exit("setextHeadingLine"),t(m)):n(m)}}const O9={tokenize:_9};function _9(e){const t=this,n=e.attempt(t0,a,e.attempt(this.parser.constructs.flowInitial,l,xt(e,e.attempt(this.parser.constructs.flow,l,e.attempt(U8,l)),"linePrefix")));return n;function a(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function l(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const I9={resolveAll:t6()},B9=e6("string"),L9=e6("text");function e6(e){return{resolveAll:t6(e==="text"?q9:void 0),tokenize:t};function t(n){const a=this,l=this.parser.constructs[e],o=n.attempt(l,c,f);return c;function c(y){return m(y)?o(y):f(y)}function f(y){if(y===null){n.consume(y);return}return n.enter("data"),n.consume(y),h}function h(y){return m(y)?(n.exit("data"),o(y)):(n.consume(y),h)}function m(y){if(y===null)return!0;const v=l[y];let k=-1;if(v)for(;++k<v.length;){const b=v[k];if(!b.previous||b.previous.call(a,a.previous))return!0}return!1}}}function t6(e){return t;function t(n,a){let l=-1,o;for(;++l<=n.length;)o===void 0?n[l]&&n[l][1].type==="data"&&(o=l,l++):(!n[l]||n[l][1].type!=="data")&&(l!==o+2&&(n[o][1].end=n[l-1][1].end,n.splice(o+2,l-o-2),l=o+2),o=void 0);return e?e(n,a):n}}function q9(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 o=l.length,c=-1,f=0,h;for(;o--;){const m=l[o];if(typeof m=="string"){for(c=m.length;m.charCodeAt(c-1)===32;)f++,c--;if(c)break;c=-1}else if(m===-2)h=!0,f++;else if(m!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(f=0),f){const m={type:n===e.length||h||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?c:a.start._bufferIndex+c,_index:a.start._index+o,line:a.end.line,column:a.end.column-f,offset:a.end.offset-f},end:{...a.end}};a.end={...m.start},a.start.offset===a.end.offset?Object.assign(a,m):(e.splice(n,0,["enter",m,t],["exit",m,t]),n+=2)}n++}return e}const U9={42:kr,43:kr,45:kr,48:kr,49:kr,50:kr,51:kr,52:kr,53:kr,54:kr,55:kr,56:kr,57:kr,62:Y5},H9={91:G8},$9={[-2]:vm,[-1]:vm,32:vm},F9={35:Q8,42:Vd,45:[fy,Vd],60:t9,61:fy,95:Vd,96:cy,126:cy},P9={38:K5,92:W5},G9={[-5]:xm,[-4]:xm,[-3]:xm,33:x9,38:K5,42:vp,60:[w8,o9],91:w9,92:[K8,W5],93:f1,95:vp,96:O8},V9={null:[vp,I9]},Y9={null:[42,95]},W9={null:[]},K9=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Y9,contentInitial:H9,disable:W9,document:U9,flow:F9,flowInitial:$9,insideSpan:V9,string:P9,text:G9},Symbol.toStringTag,{value:"Module"}));function X9(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={},o=[];let c=[],f=[];const h={attempt:W(te),check:W(_),consume:M,enter:L,exit:G,interrupt:W(_,{interrupt:!0})},m={code:null,containerState:{},defineSkip:N,events:[],now:T,parser:e,previous:null,sliceSerialize:k,sliceStream:b,write:v};let y=t.tokenize.call(m,h);return t.resolveAll&&o.push(t),m;function v(oe){return c=ta(c,oe),U(),c[c.length-1]!==null?[]:(ae(t,0),m.events=yf(o,m.events,m),m.events)}function k(oe,de){return Z9(b(oe),de)}function b(oe){return Q9(c,oe)}function T(){const{_bufferIndex:oe,_index:de,line:_e,column:be,offset:ge}=a;return{_bufferIndex:oe,_index:de,line:_e,column:be,offset:ge}}function N(oe){l[oe.line]=oe.column,F()}function U(){let oe;for(;a._index<c.length;){const de=c[a._index];if(typeof de=="string")for(oe=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===oe&&a._bufferIndex<de.length;)D(de.charCodeAt(a._bufferIndex));else D(de)}}function D(oe){y=y(oe)}function M(oe){Ke(oe)?(a.line++,a.column=1,a.offset+=oe===-3?2:1,F()):oe!==-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=oe}function L(oe,de){const _e=de||{};return _e.type=oe,_e.start=T(),m.events.push(["enter",_e,m]),f.push(_e),_e}function G(oe){const de=f.pop();return de.end=T(),m.events.push(["exit",de,m]),de}function te(oe,de){ae(oe,de.from)}function _(oe,de){de.restore()}function W(oe,de){return _e;function _e(be,ge,Z){let le,Me,We,H;return Array.isArray(be)?ee(be):"tokenize"in be?ee([be]):I(be);function I(Re){return Be;function Be(ve){const Xe=ve!==null&&Re[ve],Ft=ve!==null&&Re.null,pn=[...Array.isArray(Xe)?Xe:Xe?[Xe]:[],...Array.isArray(Ft)?Ft:Ft?[Ft]:[]];return ee(pn)(ve)}}function ee(Re){return le=Re,Me=0,Re.length===0?Z:R(Re[Me])}function R(Re){return Be;function Be(ve){return H=Q(),We=Re,Re.partial||(m.currentConstruct=Re),Re.name&&m.parser.constructs.disable.null.includes(Re.name)?Oe():Re.tokenize.call(de?Object.assign(Object.create(m),de):m,h,me,Oe)(ve)}}function me(Re){return oe(We,H),ge}function Oe(Re){return H.restore(),++Me<le.length?R(le[Me]):Z}}}function ae(oe,de){oe.resolveAll&&!o.includes(oe)&&o.push(oe),oe.resolve&&Ir(m.events,de,m.events.length-de,oe.resolve(m.events.slice(de),m)),oe.resolveTo&&(m.events=oe.resolveTo(m.events,m))}function Q(){const oe=T(),de=m.previous,_e=m.currentConstruct,be=m.events.length,ge=Array.from(f);return{from:be,restore:Z};function Z(){a=oe,m.previous=de,m.currentConstruct=_e,m.events.length=be,f=ge,F()}}function F(){a.line in l&&a.column<2&&(a.column=l[a.line],a.offset+=l[a.line]-1)}}function Q9(e,t){const n=t.start._index,a=t.start._bufferIndex,l=t.end._index,o=t.end._bufferIndex;let c;if(n===l)c=[e[n].slice(a,o)];else{if(c=e.slice(n,l),a>-1){const f=c[0];typeof f=="string"?c[0]=f.slice(a):c.shift()}o>0&&c.push(e[l].slice(0,o))}return c}function Z9(e,t){let n=-1;const a=[];let l;for(;++n<e.length;){const o=e[n];let c;if(typeof o=="string")c=o;else switch(o){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(o)}l=o===-2,a.push(c)}return a.join("")}function J9(e){const a={constructs:G5([K9,...(e||{}).extensions||[]]),content:l(m8),defined:[],document:l(g8),flow:l(O9),lazy:{},string:l(B9),text:l(L9)};return a;function l(o){return c;function c(f){return X9(a,o,f)}}}function ew(e){for(;!X5(e););return e}const hy=/[\0\t\n\r]/g;function tw(){let e=1,t="",n=!0,a;return l;function l(o,c,f){const h=[];let m,y,v,k,b;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(c||void 0).decode(o)),v=0,t="",n&&(o.charCodeAt(0)===65279&&v++,n=void 0);v<o.length;){if(hy.lastIndex=v,m=hy.exec(o),k=m&&m.index!==void 0?m.index:o.length,b=o.charCodeAt(k),!m){t=o.slice(v);break}if(b===10&&v===k&&a)h.push(-3),a=void 0;else switch(a&&(h.push(-5),a=void 0),v<k&&(h.push(o.slice(v,k)),e+=k-v),b){case 0:{h.push(65533),e++;break}case 9:{for(y=Math.ceil(e/4)*4,h.push(-2);e++<y;)h.push(-1);break}case 10:{h.push(-4),e=1;break}default:a=!0,e=1}v=k+1}return f&&(a&&h.push(-5),t&&h.push(t),h.push(null)),h}}const nw=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function rw(e){return e.replace(nw,aw)}function aw(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const l=n.charCodeAt(1),o=l===120||l===88;return V5(n.slice(o?2:1),o?16:10)}return d1(n)||e}const n6={}.hasOwnProperty;function iw(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),lw(n)(ew(J9(n).document().write(tw()(e,t,!0))))}function lw(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(st),autolinkProtocol:Q,autolinkEmail:Q,atxHeading:o($e),blockQuote:o(Ft),characterEscape:Q,characterReference:Q,codeFenced:o(pn),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:o(pn,c),codeText:o(tn,c),codeTextData:Q,data:Q,codeFlowValue:Q,definition:o(nt),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:o(ue),hardBreakEscape:o(Ze),hardBreakTrailing:o(Ze),htmlFlow:o(Se,c),htmlFlowData:Q,htmlText:o(Se,c),htmlTextData:Q,image:o(gt),label:c,link:o(st),listItem:o(At),listItemValue:k,listOrdered:o(pt,v),listUnordered:o(pt),paragraph:o(sn),reference:R,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:o($e),strong:o(Kt),thematicBreak:o(Kn)},exit:{atxHeading:h(),atxHeadingSequence:te,autolink:h(),autolinkEmail:Xe,autolinkProtocol:ve,blockQuote:h(),characterEscapeValue:F,characterReferenceMarkerHexadecimal:Oe,characterReferenceMarkerNumeric:Oe,characterReferenceValue:Re,characterReference:Be,codeFenced:h(U),codeFencedFence:N,codeFencedFenceInfo:b,codeFencedFenceMeta:T,codeFlowValue:F,codeIndented:h(D),codeText:h(ge),codeTextData:F,data:F,definition:h(),definitionDestinationString:G,definitionLabelString:M,definitionTitleString:L,emphasis:h(),hardBreakEscape:h(de),hardBreakTrailing:h(de),htmlFlow:h(_e),htmlFlowData:F,htmlText:h(be),htmlTextData:F,image:h(le),label:We,labelText:Me,lineEnding:oe,link:h(Z),listItem:h(),listOrdered:h(),listUnordered:h(),paragraph:h(),referenceString:me,resourceDestinationString:H,resourceTitleString:I,resource:ee,setextHeading:h(ae),setextHeadingLineSequence:W,setextHeadingText:_,strong:h(),thematicBreak:h()}};r6(t,(e||{}).mdastExtensions||[]);const n={};return a;function a(fe){let ke={type:"root",children:[]};const Fe={stack:[ke],tokenStack:[],config:t,enter:f,exit:m,buffer:c,resume:y,data:n},rt=[];let St=-1;for(;++St<fe.length;)if(fe[St][1].type==="listOrdered"||fe[St][1].type==="listUnordered")if(fe[St][0]==="enter")rt.push(St);else{const An=rt.pop();St=l(fe,An,St)}for(St=-1;++St<fe.length;){const An=t[fe[St][0]];n6.call(An,fe[St][1].type)&&An[fe[St][1].type].call(Object.assign({sliceSerialize:fe[St][2].sliceSerialize},Fe),fe[St][1])}if(Fe.tokenStack.length>0){const An=Fe.tokenStack[Fe.tokenStack.length-1];(An[1]||my).call(Fe,void 0,An[0])}for(ke.position={start:$l(fe.length>0?fe[0][1].start:{line:1,column:1,offset:0}),end:$l(fe.length>0?fe[fe.length-2][1].end:{line:1,column:1,offset:0})},St=-1;++St<t.transforms.length;)ke=t.transforms[St](ke)||ke;return ke}function l(fe,ke,Fe){let rt=ke-1,St=-1,An=!1,$r,Dn,on,Rn;for(;++rt<=Fe;){const _t=fe[rt];switch(_t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{_t[0]==="enter"?St++:St--,Rn=void 0;break}case"lineEndingBlank":{_t[0]==="enter"&&($r&&!Rn&&!St&&!on&&(on=rt),Rn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Rn=void 0}if(!St&&_t[0]==="enter"&&_t[1].type==="listItemPrefix"||St===-1&&_t[0]==="exit"&&(_t[1].type==="listUnordered"||_t[1].type==="listOrdered")){if($r){let un=rt;for(Dn=void 0;un--;){const lr=fe[un];if(lr[1].type==="lineEnding"||lr[1].type==="lineEndingBlank"){if(lr[0]==="exit")continue;Dn&&(fe[Dn][1].type="lineEndingBlank",An=!0),lr[1].type="lineEnding",Dn=un}else if(!(lr[1].type==="linePrefix"||lr[1].type==="blockQuotePrefix"||lr[1].type==="blockQuotePrefixWhitespace"||lr[1].type==="blockQuoteMarker"||lr[1].type==="listItemIndent"))break}on&&(!Dn||on<Dn)&&($r._spread=!0),$r.end=Object.assign({},Dn?fe[Dn][1].start:_t[1].end),fe.splice(Dn||rt,0,["exit",$r,_t[2]]),rt++,Fe++}if(_t[1].type==="listItemPrefix"){const un={type:"listItem",_spread:!1,start:Object.assign({},_t[1].start),end:void 0};$r=un,fe.splice(rt,0,["enter",un,_t[2]]),rt++,Fe++,on=void 0,Rn=!0}}}return fe[ke][1]._spread=An,Fe}function o(fe,ke){return Fe;function Fe(rt){f.call(this,fe(rt),rt),ke&&ke.call(this,rt)}}function c(){this.stack.push({type:"fragment",children:[]})}function f(fe,ke,Fe){this.stack[this.stack.length-1].children.push(fe),this.stack.push(fe),this.tokenStack.push([ke,Fe||void 0]),fe.position={start:$l(ke.start),end:void 0}}function h(fe){return ke;function ke(Fe){fe&&fe.call(this,Fe),m.call(this,Fe)}}function m(fe,ke){const Fe=this.stack.pop(),rt=this.tokenStack.pop();if(rt)rt[0].type!==fe.type&&(ke?ke.call(this,fe,rt[0]):(rt[1]||my).call(this,fe,rt[0]));else throw new Error("Cannot close `"+fe.type+"` ("+qc({start:fe.start,end:fe.end})+"): it’s not open");Fe.position.end=$l(fe.end)}function y(){return c1(this.stack.pop())}function v(){this.data.expectingFirstListItemValue=!0}function k(fe){if(this.data.expectingFirstListItemValue){const ke=this.stack[this.stack.length-2];ke.start=Number.parseInt(this.sliceSerialize(fe),10),this.data.expectingFirstListItemValue=void 0}}function b(){const fe=this.resume(),ke=this.stack[this.stack.length-1];ke.lang=fe}function T(){const fe=this.resume(),ke=this.stack[this.stack.length-1];ke.meta=fe}function N(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function U(){const fe=this.resume(),ke=this.stack[this.stack.length-1];ke.value=fe.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function D(){const fe=this.resume(),ke=this.stack[this.stack.length-1];ke.value=fe.replace(/(\r?\n|\r)$/g,"")}function M(fe){const ke=this.resume(),Fe=this.stack[this.stack.length-1];Fe.label=ke,Fe.identifier=Ta(this.sliceSerialize(fe)).toLowerCase()}function L(){const fe=this.resume(),ke=this.stack[this.stack.length-1];ke.title=fe}function G(){const fe=this.resume(),ke=this.stack[this.stack.length-1];ke.url=fe}function te(fe){const ke=this.stack[this.stack.length-1];if(!ke.depth){const Fe=this.sliceSerialize(fe).length;ke.depth=Fe}}function _(){this.data.setextHeadingSlurpLineEnding=!0}function W(fe){const ke=this.stack[this.stack.length-1];ke.depth=this.sliceSerialize(fe).codePointAt(0)===61?1:2}function ae(){this.data.setextHeadingSlurpLineEnding=void 0}function Q(fe){const Fe=this.stack[this.stack.length-1].children;let rt=Fe[Fe.length-1];(!rt||rt.type!=="text")&&(rt=dt(),rt.position={start:$l(fe.start),end:void 0},Fe.push(rt)),this.stack.push(rt)}function F(fe){const ke=this.stack.pop();ke.value+=this.sliceSerialize(fe),ke.position.end=$l(fe.end)}function oe(fe){const ke=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Fe=ke.children[ke.children.length-1];Fe.position.end=$l(fe.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ke.type)&&(Q.call(this,fe),F.call(this,fe))}function de(){this.data.atHardBreak=!0}function _e(){const fe=this.resume(),ke=this.stack[this.stack.length-1];ke.value=fe}function be(){const fe=this.resume(),ke=this.stack[this.stack.length-1];ke.value=fe}function ge(){const fe=this.resume(),ke=this.stack[this.stack.length-1];ke.value=fe}function Z(){const fe=this.stack[this.stack.length-1];if(this.data.inReference){const ke=this.data.referenceType||"shortcut";fe.type+="Reference",fe.referenceType=ke,delete fe.url,delete fe.title}else delete fe.identifier,delete fe.label;this.data.referenceType=void 0}function le(){const fe=this.stack[this.stack.length-1];if(this.data.inReference){const ke=this.data.referenceType||"shortcut";fe.type+="Reference",fe.referenceType=ke,delete fe.url,delete fe.title}else delete fe.identifier,delete fe.label;this.data.referenceType=void 0}function Me(fe){const ke=this.sliceSerialize(fe),Fe=this.stack[this.stack.length-2];Fe.label=rw(ke),Fe.identifier=Ta(ke).toLowerCase()}function We(){const fe=this.stack[this.stack.length-1],ke=this.resume(),Fe=this.stack[this.stack.length-1];if(this.data.inReference=!0,Fe.type==="link"){const rt=fe.children;Fe.children=rt}else Fe.alt=ke}function H(){const fe=this.resume(),ke=this.stack[this.stack.length-1];ke.url=fe}function I(){const fe=this.resume(),ke=this.stack[this.stack.length-1];ke.title=fe}function ee(){this.data.inReference=void 0}function R(){this.data.referenceType="collapsed"}function me(fe){const ke=this.resume(),Fe=this.stack[this.stack.length-1];Fe.label=ke,Fe.identifier=Ta(this.sliceSerialize(fe)).toLowerCase(),this.data.referenceType="full"}function Oe(fe){this.data.characterReferenceType=fe.type}function Re(fe){const ke=this.sliceSerialize(fe),Fe=this.data.characterReferenceType;let rt;Fe?(rt=V5(ke,Fe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):rt=d1(ke);const St=this.stack[this.stack.length-1];St.value+=rt}function Be(fe){const ke=this.stack.pop();ke.position.end=$l(fe.end)}function ve(fe){F.call(this,fe);const ke=this.stack[this.stack.length-1];ke.url=this.sliceSerialize(fe)}function Xe(fe){F.call(this,fe);const ke=this.stack[this.stack.length-1];ke.url="mailto:"+this.sliceSerialize(fe)}function Ft(){return{type:"blockquote",children:[]}}function pn(){return{type:"code",lang:null,meta:null,value:""}}function tn(){return{type:"inlineCode",value:""}}function nt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ue(){return{type:"emphasis",children:[]}}function $e(){return{type:"heading",depth:0,children:[]}}function Ze(){return{type:"break"}}function Se(){return{type:"html",value:""}}function gt(){return{type:"image",title:null,url:"",alt:null}}function st(){return{type:"link",title:null,url:"",children:[]}}function pt(fe){return{type:"list",ordered:fe.type==="listOrdered",start:null,spread:fe._spread,children:[]}}function At(fe){return{type:"listItem",spread:fe._spread,checked:null,children:[]}}function sn(){return{type:"paragraph",children:[]}}function Kt(){return{type:"strong",children:[]}}function dt(){return{type:"text",value:""}}function Kn(){return{type:"thematicBreak"}}}function $l(e){return{line:e.line,column:e.column,offset:e.offset}}function r6(e,t){let n=-1;for(;++n<t.length;){const a=t[n];Array.isArray(a)?r6(e,a):sw(e,a)}}function sw(e,t){let n;for(n in t)if(n6.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 my(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+qc({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+qc({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+qc({start:t.start,end:t.end})+") is still open")}function ow(e){const t=this;t.parser=n;function n(a){return iw(a,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function uw(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 cw(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
54
|
-
`}]}function dw(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 o={type:"element",tagName:"code",properties:a,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function fw(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function hw(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function mw(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=String(t.identifier).toUpperCase(),l=mu(a.toLowerCase()),o=e.footnoteOrder.indexOf(a);let c,f=e.footnoteCounts.get(a);f===void 0?(f=0,e.footnoteOrder.push(a),c=e.footnoteOrder.length):c=o+1,f+=1,e.footnoteCounts.set(a,f);const h={type:"element",tagName:"a",properties:{href:"#"+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 pw(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 gw(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function a6(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),o=l[0];o&&o.type==="text"?o.value="["+o.value:l.unshift({type:"text",value:"["});const c=l[l.length-1];return c&&c.type==="text"?c.value+=a:l.push({type:"text",value:a}),l}function yw(e,t){const n=String(t.identifier).toUpperCase(),a=e.definitionById.get(n);if(!a)return a6(e,t);const l={src:mu(a.url||""),alt:t.alt};a.title!==null&&a.title!==void 0&&(l.title=a.title);const o={type:"element",tagName:"img",properties:l,children:[]};return e.patch(t,o),e.applyData(t,o)}function vw(e,t){const n={src:mu(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 xw(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 bw(e,t){const n=String(t.identifier).toUpperCase(),a=e.definitionById.get(n);if(!a)return a6(e,t);const l={href:mu(a.url||"")};a.title!==null&&a.title!==void 0&&(l.title=a.title);const o={type:"element",tagName:"a",properties:l,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function ww(e,t){const n={href:mu(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 kw(e,t,n){const a=e.all(t),l=n?Sw(n):i6(t),o={},c=[];if(typeof t.checked=="boolean"){const y=a[0];let v;y&&y.type==="element"&&y.tagName==="p"?v=y:(v={type:"element",tagName:"p",properties:{},children:[]},a.unshift(v)),v.children.length>0&&v.children.unshift({type:"text",value:" "}),v.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let f=-1;for(;++f<a.length;){const y=a[f];(l||f!==0||y.type!=="element"||y.tagName!=="p")&&c.push({type:"text",value:`
|
|
56
|
-
`}),y.type==="element"&&y.tagName==="p"&&!l?c.push(...y.children):c.push(y)}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:o,children:c};return e.patch(t,m),e.applyData(t,m)}function Sw(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=i6(n[a])}return t}function i6(e){const t=e.spread;return t??e.children.length>1}function Cw(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 o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(a,!0)};return e.patch(t,o),e.applyData(t,o)}function jw(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Tw(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Aw(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ew(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=l1(t.children[1]),h=L5(t.children[t.children.length-1]);f&&h&&(c.position={start:f,end:h}),l.push(c)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(l,!0)};return e.patch(t,o),e.applyData(t,o)}function Nw(e,t,n){const a=n?n.children:void 0,o=(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 v=t.children[h],k={},b=c?c[h]:void 0;b&&(k.align=b);let T={type:"element",tagName:o,properties:k,children:[]};v&&(T.children=e.all(v),e.patch(v,T),T=e.applyData(v,T)),m.push(T)}const y={type:"element",tagName:"tr",properties:{},children:e.wrap(m,!0)};return e.patch(t,y),e.applyData(t,y)}function Mw(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const py=9,gy=32;function zw(e){const t=String(e),n=/\r?\n|\r/g;let a=n.exec(t),l=0;const o=[];for(;a;)o.push(yy(t.slice(l,a.index),l>0,!0),a[0]),l=a.index+a[0].length,a=n.exec(t);return o.push(yy(t.slice(l),l>0,!1)),o.join("")}function yy(e,t,n){let a=0,l=e.length;if(t){let o=e.codePointAt(a);for(;o===py||o===gy;)a++,o=e.codePointAt(a)}if(n){let o=e.codePointAt(l-1);for(;o===py||o===gy;)l--,o=e.codePointAt(l-1)}return l>a?e.slice(a,l):""}function Dw(e,t){const n={type:"text",value:zw(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Rw(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Ow={blockquote:uw,break:cw,code:dw,delete:fw,emphasis:hw,footnoteReference:mw,heading:pw,html:gw,imageReference:yw,image:vw,inlineCode:xw,linkReference:bw,link:ww,listItem:kw,list:Cw,paragraph:jw,root:Tw,strong:Aw,table:Ew,tableCell:Mw,tableRow:Nw,text:Dw,thematicBreak:Rw,toml:jd,yaml:jd,definition:jd,footnoteDefinition:jd};function jd(){}const l6=-1,vf=0,Hc=1,tf=2,h1=3,m1=4,p1=5,g1=6,s6=7,o6=8,_w=typeof self=="object"?self:globalThis,vy=(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 _w[e](t)},Iw=(e,t)=>{const n=(l,o)=>(e.set(o,l),l),a=l=>{if(e.has(l))return e.get(l);const[o,c]=t[l];switch(o){case vf:case l6:return n(c,l);case Hc:{const f=n([],l);for(const h of c)f.push(a(h));return f}case tf:{const f=n({},l);for(const[h,m]of c)f[a(h)]=a(m);return f}case h1:return n(new Date(c),l);case m1:{const{source:f,flags:h}=c;return n(new RegExp(f,h),l)}case p1:{const f=n(new Map,l);for(const[h,m]of c)f.set(a(h),a(m));return f}case g1:{const f=n(new Set,l);for(const h of c)f.add(a(h));return f}case s6:{const{name:f,message:h}=c;return n(vy(f,h),l)}case o6: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(vy(o,c),l)};return a},xy=e=>Iw(new Map,e)(0),$s="",{toString:Bw}={},{keys:Lw}=Object,Ac=e=>{const t=typeof e;if(t!=="object"||!e)return[vf,t];const n=Bw.call(e).slice(8,-1);switch(n){case"Array":return[Hc,$s];case"Object":return[tf,$s];case"Date":return[h1,$s];case"RegExp":return[m1,$s];case"Map":return[p1,$s];case"Set":return[g1,$s];case"DataView":return[Hc,n]}return n.includes("Array")?[Hc,n]:n.includes("Error")?[s6,n]:[tf,n]},Td=([e,t])=>e===vf&&(t==="function"||t==="symbol"),qw=(e,t,n,a)=>{const l=(c,f)=>{const h=a.push(c)-1;return n.set(f,h),h},o=c=>{if(n.has(c))return n.get(c);let[f,h]=Ac(c);switch(f){case vf:{let y=c;switch(h){case"bigint":f=o6,y=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+h);y=null;break;case"undefined":return l([l6],c)}return l([f,y],c)}case Hc:{if(h){let k=c;return h==="DataView"?k=new Uint8Array(c.buffer):h==="ArrayBuffer"&&(k=new Uint8Array(c)),l([h,[...k]],c)}const y=[],v=l([f,y],c);for(const k of c)y.push(o(k));return v}case tf:{if(h)switch(h){case"BigInt":return l([h,c.toString()],c);case"Boolean":case"Number":case"String":return l([h,c.valueOf()],c)}if(t&&"toJSON"in c)return o(c.toJSON());const y=[],v=l([f,y],c);for(const k of Lw(c))(e||!Td(Ac(c[k])))&&y.push([o(k),o(c[k])]);return v}case h1:return l([f,isNaN(c.getTime())?$s:c.toISOString()],c);case m1:{const{source:y,flags:v}=c;return l([f,{source:y,flags:v}],c)}case p1:{const y=[],v=l([f,y],c);for(const[k,b]of c)(e||!(Td(Ac(k))||Td(Ac(b))))&&y.push([o(k),o(b)]);return v}case g1:{const y=[],v=l([f,y],c);for(const k of c)(e||!Td(Ac(k)))&&y.push(o(k));return v}}const{message:m}=c;return l([f,{name:h,message:m}],c)};return o},by=(e,{json:t,lossy:n}={})=>{const a=[];return qw(!(t||n),!!t,new Map,a)(e),a},nf=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?xy(by(e,t)):structuredClone(e):(e,t)=>xy(by(e,t));function Uw(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 Hw(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function $w(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Uw,a=e.options.footnoteBackLabel||Hw,l=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let h=-1;for(;++h<e.footnoteOrder.length;){const m=e.footnoteById.get(e.footnoteOrder[h]);if(!m)continue;const y=e.all(m),v=String(m.identifier).toUpperCase(),k=mu(v.toLowerCase());let b=0;const T=[],N=e.footnoteCounts.get(v);for(;N!==void 0&&++b<=N;){T.length>0&&T.push({type:"text",value:" "});let M=typeof n=="string"?n:n(h,b);typeof M=="string"&&(M={type:"text",value:M}),T.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+k+(b>1?"-"+b:""),dataFootnoteBackref:"",ariaLabel:typeof a=="string"?a:a(h,b),className:["data-footnote-backref"]},children:Array.isArray(M)?M:[M]})}const U=y[y.length-1];if(U&&U.type==="element"&&U.tagName==="p"){const M=U.children[U.children.length-1];M&&M.type==="text"?M.value+=" ":U.children.push({type:"text",value:" "}),U.children.push(...T)}else y.push(...T);const D={type:"element",tagName:"li",properties:{id:t+"fn-"+k},children:e.wrap(y,!0)};e.patch(m,D),f.push(D)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...nf(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 n0=(function(e){if(e==null)return Vw;if(typeof e=="function")return xf(e);if(typeof e=="object")return Array.isArray(e)?Fw(e):Pw(e);if(typeof e=="string")return Gw(e);throw new Error("Expected function, string, or object as test")});function Fw(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=n0(e[n]);return xf(a);function a(...l){let o=-1;for(;++o<t.length;)if(t[o].apply(this,l))return!0;return!1}}function Pw(e){const t=e;return xf(n);function n(a){const l=a;let o;for(o in e)if(l[o]!==t[o])return!1;return!0}}function Gw(e){return xf(t);function t(n){return n&&n.type===e}}function xf(e){return t;function t(n,a,l){return!!(Yw(n)&&e.call(this,n,typeof a=="number"?a:void 0,l||void 0))}}function Vw(){return!0}function Yw(e){return e!==null&&typeof e=="object"&&"type"in e}const u6=[],Ww=!0,xp=!1,c6="skip";function y1(e,t,n,a){let l;typeof t=="function"&&typeof n!="function"?(a=n,n=t):l=t;const o=n0(l),c=a?-1:1;f(e,void 0,[])();function f(h,m,y){const v=h&&typeof h=="object"?h:{};if(typeof v.type=="string"){const b=typeof v.tagName=="string"?v.tagName:typeof v.name=="string"?v.name:void 0;Object.defineProperty(k,"name",{value:"node ("+(h.type+(b?"<"+b+">":""))+")"})}return k;function k(){let b=u6,T,N,U;if((!t||o(h,m,y[y.length-1]||void 0))&&(b=Kw(n(h,y)),b[0]===xp))return b;if("children"in h&&h.children){const D=h;if(D.children&&b[0]!==c6)for(N=(a?D.children.length:-1)+c,U=y.concat(D);N>-1&&N<D.children.length;){const M=D.children[N];if(T=f(M,N,U)(),T[0]===xp)return T;N=typeof T[1]=="number"?T[1]:N+c}}return b}}}function Kw(e){return Array.isArray(e)?e:typeof e=="number"?[Ww,e]:e==null?u6:[e]}function v1(e,t,n,a){let l,o,c;typeof t=="function"&&typeof n!="function"?(o=void 0,c=t,l=n):(o=t,c=n,l=a),y1(e,o,f,l);function f(h,m){const y=m[m.length-1],v=y?y.children.indexOf(h):void 0;return c(h,v,y)}}const bp={}.hasOwnProperty,Xw={};function Qw(e,t){const n=t||Xw,a=new Map,l=new Map,o=new Map,c={...Ow,...n.handlers},f={all:m,applyData:Jw,definitionById:a,footnoteById:l,footnoteCounts:o,footnoteOrder:[],handlers:c,one:h,options:n,patch:Zw,wrap:tk};return v1(e,function(y){if(y.type==="definition"||y.type==="footnoteDefinition"){const v=y.type==="definition"?a:l,k=String(y.identifier).toUpperCase();v.has(k)||v.set(k,y)}}),f;function h(y,v){const k=y.type,b=f.handlers[k];if(bp.call(f.handlers,k)&&b)return b(f,y,v);if(f.options.passThrough&&f.options.passThrough.includes(k)){if("children"in y){const{children:N,...U}=y,D=nf(U);return D.children=f.all(y),D}return nf(y)}return(f.options.unknownHandler||ek)(f,y,v)}function m(y){const v=[];if("children"in y){const k=y.children;let b=-1;for(;++b<k.length;){const T=f.one(k[b],y);if(T){if(b&&k[b-1].type==="break"&&(!Array.isArray(T)&&T.type==="text"&&(T.value=wy(T.value)),!Array.isArray(T)&&T.type==="element")){const N=T.children[0];N&&N.type==="text"&&(N.value=wy(N.value))}Array.isArray(T)?v.push(...T):v.push(T)}}}return v}}function Zw(e,t){e.position&&(t.position=Ub(e))}function Jw(e,t){let n=t;if(e&&e.data){const a=e.data.hName,l=e.data.hChildren,o=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"&&o&&Object.assign(n.properties,nf(o)),"children"in n&&n.children&&l!==null&&l!==void 0&&(n.children=l)}return n}function ek(e,t){const n=t.data||{},a="value"in t&&!(bp.call(n,"hProperties")||bp.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 tk(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 wy(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function ky(e,t){const n=Qw(e,t),a=n.one(e,void 0),l=$w(n),o=Array.isArray(a)?{type:"root",children:a}:a||{type:"root",children:[]};return l&&o.children.push({type:"text",value:`
|
|
63
|
-
`},l),o}function nk(e,t){return e&&"run"in e?async function(n,a){const l=ky(n,{file:a,...t});await e.run(l,a)}:function(n,a){return ky(n,{file:a,...e||t})}}function Sy(e){if(e)throw e}var bm,Cy;function rk(){if(Cy)return bm;Cy=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]"},o=function(m){if(!m||t.call(m)!=="[object Object]")return!1;var y=e.call(m,"constructor"),v=m.constructor&&m.constructor.prototype&&e.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!y&&!v)return!1;var k;for(k in m);return typeof k>"u"||e.call(m,k)},c=function(m,y){n&&y.name==="__proto__"?n(m,y.name,{enumerable:!0,configurable:!0,value:y.newValue,writable:!0}):m[y.name]=y.newValue},f=function(m,y){if(y==="__proto__")if(e.call(m,y)){if(a)return a(m,y).value}else return;return m[y]};return bm=function h(){var m,y,v,k,b,T,N=arguments[0],U=1,D=arguments.length,M=!1;for(typeof N=="boolean"&&(M=N,N=arguments[1]||{},U=2),(N==null||typeof N!="object"&&typeof N!="function")&&(N={});U<D;++U)if(m=arguments[U],m!=null)for(y in m)v=f(N,y),k=f(m,y),N!==k&&(M&&k&&(o(k)||(b=l(k)))?(b?(b=!1,T=v&&l(v)?v:[]):T=v&&o(v)?v:{},c(N,{name:y,newValue:h(M,T,k)})):typeof k<"u"&&c(N,{name:y,newValue:k}));return N},bm}var ak=rk();const wm=E5(ak);function wp(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 ik(){const e=[],t={run:n,use:a};return t;function n(...l){let o=-1;const c=l.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);f(null,...l);function f(h,...m){const y=e[++o];let v=-1;if(h){c(h);return}for(;++v<l.length;)(m[v]===null||m[v]===void 0)&&(m[v]=l[v]);l=m,y?lk(y,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 lk(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 y=m;if(f&&n)throw y;return l(y)}f||(h&&h.then&&typeof h.then=="function"?h.then(o,l):h instanceof Error?l(h):o(h))}function l(c,...f){n||(n=!0,t(c,...f))}function o(c){l(null,c)}}const Ga={basename:sk,dirname:ok,extname:uk,join:ck,sep:"/"};function sk(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');r0(e);let n=0,a=-1,l=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;l--;)if(e.codePointAt(l)===47){if(o){n=l+1;break}}else a<0&&(o=!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(o){n=l+1;break}}else c<0&&(o=!0,c=l+1),f>-1&&(e.codePointAt(l)===t.codePointAt(f--)?f<0&&(a=l):(f=-1,a=c));return n===a?a=c:a<0&&(a=e.length),e.slice(n,a)}function ok(e){if(r0(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 uk(e){r0(e);let t=e.length,n=-1,a=0,l=-1,o=0,c;for(;t--;){const f=e.codePointAt(t);if(f===47){if(c){a=t+1;break}continue}n<0&&(c=!0,n=t+1),f===46?l<0?l=t:o!==1&&(o=1):l>-1&&(o=-1)}return l<0||n<0||o===0||o===1&&l===n-1&&l===a+1?"":e.slice(l,n)}function ck(...e){let t=-1,n;for(;++t<e.length;)r0(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":dk(n)}function dk(e){r0(e);const t=e.codePointAt(0)===47;let n=fk(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function fk(e,t){let n="",a=0,l=-1,o=0,c=-1,f,h;for(;++c<=e.length;){if(c<e.length)f=e.codePointAt(c);else{if(f===47)break;f=47}if(f===47){if(!(l===c-1||o===1))if(l!==c-1&&o===2){if(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,o=0;continue}}else if(n.length>0){n="",a=0,l=c,o=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,o=0}else f===46&&o>-1?o++:o=-1}return n}function r0(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const hk={cwd:mk};function mk(){return"/"}function kp(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function pk(e){if(typeof e=="string")e=new URL(e);else if(!kp(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 gk(e)}function gk(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 km=["history","path","basename","stem","extname","dirname"];class d6{constructor(t){let n;t?kp(t)?n={path:t}:typeof t=="string"||yk(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":hk.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let a=-1;for(;++a<km.length;){const o=km[a];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let l;for(l in n)km.includes(l)||(this[l]=n[l])}get basename(){return typeof this.path=="string"?Ga.basename(this.path):void 0}set basename(t){Cm(t,"basename"),Sm(t,"basename"),this.path=Ga.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Ga.dirname(this.path):void 0}set dirname(t){jy(this.basename,"dirname"),this.path=Ga.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Ga.extname(this.path):void 0}set extname(t){if(Sm(t,"extname"),jy(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=Ga.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){kp(t)&&(t=pk(t)),Cm(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Ga.basename(this.path,this.extname):void 0}set stem(t){Cm(t,"stem"),Sm(t,"stem"),this.path=Ga.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 Wn(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 Sm(e,t){if(e&&e.includes(Ga.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ga.sep+"`")}function Cm(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function jy(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function yk(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const vk=(function(e){const a=this.constructor.prototype,l=a[e],o=function(){return l.apply(o,arguments)};return Object.setPrototypeOf(o,a),o}),xk={}.hasOwnProperty;class x1 extends vk{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=ik()}copy(){const t=new x1;let n=-1;for(;++n<this.attachers.length;){const a=this.attachers[n];t.use(...a)}return t.data(wm(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Am("data",this.frozen),this.namespace[t]=n,this):xk.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Am("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=Ad(t),a=this.parser||this.Parser;return jm("parse",a),a(String(n),n)}process(t,n){const a=this;return this.freeze(),jm("process",this.parser||this.Parser),Tm("process",this.compiler||this.Compiler),n?l(void 0,n):new Promise(l);function l(o,c){const f=Ad(t),h=a.parse(f);a.run(h,f,function(y,v,k){if(y||!v||!k)return m(y);const b=v,T=a.stringify(b,k);kk(T)?k.value=T:k.result=T,m(y,k)});function m(y,v){y||!v?c(y):o?o(v):n(void 0,v)}}}processSync(t){let n=!1,a;return this.freeze(),jm("processSync",this.parser||this.Parser),Tm("processSync",this.compiler||this.Compiler),this.process(t,l),Ay("processSync","process",n),a;function l(o,c){n=!0,Sy(o),a=c}}run(t,n,a){Ty(t),this.freeze();const l=this.transformers;return!a&&typeof n=="function"&&(a=n,n=void 0),a?o(void 0,a):new Promise(o);function o(c,f){const h=Ad(n);l.run(t,h,m);function m(y,v,k){const b=v||t;y?f(y):c?c(b):a(void 0,b,k)}}}runSync(t,n){let a=!1,l;return this.run(t,n,o),Ay("runSync","run",a),l;function o(c,f){Sy(c),l=f,a=!0}}stringify(t,n){this.freeze();const a=Ad(n),l=this.compiler||this.Compiler;return Tm("stringify",l),Ty(t),l(t,a)}use(t,...n){const a=this.attachers,l=this.namespace;if(Am("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 o(m){if(typeof m=="function")h(m,[]);else if(typeof m=="object")if(Array.isArray(m)){const[y,...v]=m;h(y,v)}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=wm(!0,l.settings,m.settings))}function f(m){let y=-1;if(m!=null)if(Array.isArray(m))for(;++y<m.length;){const v=m[y];o(v)}else throw new TypeError("Expected a list of plugins, not `"+m+"`")}function h(m,y){let v=-1,k=-1;for(;++v<a.length;)if(a[v][0]===m){k=v;break}if(k===-1)a.push([m,...y]);else if(y.length>0){let[b,...T]=y;const N=a[k][1];wp(N)&&wp(b)&&(b=wm(!0,N,b)),a[k]=[m,b,...T]}}}}const bk=new x1().freeze();function jm(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Tm(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Am(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 Ty(e){if(!wp(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Ay(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ad(e){return wk(e)?e:new d6(e)}function wk(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function kk(e){return typeof e=="string"||Sk(e)}function Sk(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Ck="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Ey=[],Ny={allowDangerousHtml:!0},jk=/^(https?|ircs?|mailto|xmpp)$/i,Tk=[{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 Ak(e){const t=Ek(e),n=Nk(e);return Mk(t.runSync(t.parse(n),n),e)}function Ek(e){const t=e.rehypePlugins||Ey,n=e.remarkPlugins||Ey,a=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Ny}:Ny;return bk().use(ow).use(n).use(nk,a).use(t)}function Nk(e){const t=e.children||"",n=new d6;return typeof t=="string"&&(n.value=t),n}function Mk(e,t){const n=t.allowedElements,a=t.allowElement,l=t.components,o=t.disallowedElements,c=t.skipHtml,f=t.unwrapDisallowed,h=t.urlTransform||f6;for(const y of Tk)Object.hasOwn(t,y.from)&&(""+y.from+(y.to?"use `"+y.to+"` instead":"remove it")+Ck+y.id,void 0);return v1(e,m),Gb(e,{Fragment:u.Fragment,components:l,ignoreInvalidStyle:!0,jsx:u.jsx,jsxs:u.jsxs,passKeys:!0,passNode:!0});function m(y,v,k){if(y.type==="raw"&&k&&typeof v=="number")return c?k.children.splice(v,1):k.children[v]={type:"text",value:y.value},v;if(y.type==="element"){let b;for(b in ym)if(Object.hasOwn(ym,b)&&Object.hasOwn(y.properties,b)){const T=y.properties[b],N=ym[b];(N===null||N.includes(y.tagName))&&(y.properties[b]=h(String(T||""),b,y))}}if(y.type==="element"){let b=n?!n.includes(y.tagName):o?o.includes(y.tagName):!1;if(!b&&a&&typeof v=="number"&&(b=!a(y,v,k)),b&&k&&typeof v=="number")return f&&y.children?k.children.splice(v,1,...y.children):k.children.splice(v,1),v}}}function f6(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||jk.test(e.slice(0,t))?e:""}function My(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 zk(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Dk(e,t,n){const l=n0((n||{}).ignore||[]),o=Rk(t);let c=-1;for(;++c<o.length;)y1(e,"text",f);function f(m,y){let v=-1,k;for(;++v<y.length;){const b=y[v],T=k?k.children:void 0;if(l(b,T?T.indexOf(b):void 0,k))return;k=b}if(k)return h(m,y)}function h(m,y){const v=y[y.length-1],k=o[c][0],b=o[c][1];let T=0;const U=v.children.indexOf(m);let D=!1,M=[];k.lastIndex=0;let L=k.exec(m.value);for(;L;){const G=L.index,te={index:L.index,input:L.input,stack:[...y,m]};let _=b(...L,te);if(typeof _=="string"&&(_=_.length>0?{type:"text",value:_}:void 0),_===!1?k.lastIndex=G+1:(T!==G&&M.push({type:"text",value:m.value.slice(T,G)}),Array.isArray(_)?M.push(..._):_&&M.push(_),T=G+L[0].length,D=!0),!k.global)break;L=k.exec(m.value)}return D?(T<m.value.length&&M.push({type:"text",value:m.value.slice(T)}),v.children.splice(U,1,...M)):M=[m],U+M.length}}function Rk(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([Ok(l[0]),_k(l[1])])}return t}function Ok(e){return typeof e=="string"?new RegExp(zk(e),"g"):e}function _k(e){return typeof e=="function"?e:function(){return e}}const Em="phrasing",Nm=["autolink","link","image","label"];function Ik(){return{transforms:[Fk],enter:{literalAutolink:Lk,literalAutolinkEmail:Mm,literalAutolinkHttp:Mm,literalAutolinkWww:Mm},exit:{literalAutolink:$k,literalAutolinkEmail:Hk,literalAutolinkHttp:qk,literalAutolinkWww:Uk}}}function Bk(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Em,notInConstruct:Nm},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Em,notInConstruct:Nm},{character:":",before:"[ps]",after:"\\/",inConstruct:Em,notInConstruct:Nm}]}}function Lk(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Mm(e){this.config.enter.autolinkProtocol.call(this,e)}function qk(e){this.config.exit.autolinkProtocol.call(this,e)}function Uk(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 Hk(e){this.config.exit.autolinkEmail.call(this,e)}function $k(e){this.exit(e)}function Fk(e){Dk(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Pk],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Gk]],{ignore:["link","linkReference"]})}function Pk(e,t,n,a,l){let o="";if(!h6(l)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!Vk(n)))return!1;const c=Yk(n+a);if(!c[0])return!1;const f={type:"link",title:null,url:o+t+c[0],children:[{type:"text",value:t+c[0]}]};return c[1]?[f,{type:"text",value:c[1]}]:f}function Gk(e,t,n,a){return!h6(a,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Vk(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 Yk(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=My(e,"(");let o=My(e,")");for(;a!==-1&&l>o;)e+=n.slice(0,a+1),n=n.slice(a+1),a=n.indexOf(")"),o++;return[e,n]}function h6(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Ks(n)||gf(n))&&(!t||n!==47)}m6.peek=nS;function Wk(){this.buffer()}function Kk(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Xk(){this.buffer()}function Qk(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Zk(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ta(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Jk(e){this.exit(e)}function eS(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ta(this.sliceSerialize(e)).toLowerCase(),n.label=t}function tS(e){this.exit(e)}function nS(){return"["}function m6(e,t,n,a){const l=n.createTracker(a);let o=l.move("[^");const c=n.enter("footnoteReference"),f=n.enter("reference");return o+=l.move(n.safe(n.associationId(e),{after:"]",before:o})),f(),c(),o+=l.move("]"),o}function rS(){return{enter:{gfmFootnoteCallString:Wk,gfmFootnoteCall:Kk,gfmFootnoteDefinitionLabelString:Xk,gfmFootnoteDefinition:Qk},exit:{gfmFootnoteCallString:Zk,gfmFootnoteCall:Jk,gfmFootnoteDefinitionLabelString:eS,gfmFootnoteDefinition:tS}}}function aS(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:m6},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(a,l,o,c){const f=o.createTracker(c);let h=f.move("[^");const m=o.enter("footnoteDefinition"),y=o.enter("label");return h+=f.move(o.safe(o.associationId(a),{before:h,after:"]"})),y(),h+=f.move("]:"),a.children&&a.children.length>0&&(f.shift(4),h+=f.move((t?`
|
|
64
|
-
`:" ")+o.indentLines(o.containerFlow(a,f.current()),t?p6:iS))),m(),h}}function iS(e,t,n){return t===0?e:p6(e,t,n)}function p6(e,t,n){return(n?"":" ")+e}const lS=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];g6.peek=dS;function sS(){return{canContainEols:["delete"],enter:{strikethrough:uS},exit:{strikethrough:cS}}}function oS(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:lS}],handlers:{delete:g6}}}function uS(e){this.enter({type:"delete",children:[]},e)}function cS(e){this.exit(e)}function g6(e,t,n,a){const l=n.createTracker(a),o=n.enter("strikethrough");let c=l.move("~~");return c+=n.containerPhrasing(e,{...l.current(),before:c,after:"~"}),c+=l.move("~~"),o(),c}function dS(){return"~"}function fS(e){return e.length}function hS(e,t){const n=t||{},a=(n.align||[]).concat(),l=n.stringLength||fS,o=[],c=[],f=[],h=[];let m=0,y=-1;for(;++y<e.length;){const N=[],U=[];let D=-1;for(e[y].length>m&&(m=e[y].length);++D<e[y].length;){const M=mS(e[y][D]);if(n.alignDelimiters!==!1){const L=l(M);U[D]=L,(h[D]===void 0||L>h[D])&&(h[D]=L)}N.push(M)}c[y]=N,f[y]=U}let v=-1;if(typeof a=="object"&&"length"in a)for(;++v<m;)o[v]=zy(a[v]);else{const N=zy(a);for(;++v<m;)o[v]=N}v=-1;const k=[],b=[];for(;++v<m;){const N=o[v];let U="",D="";N===99?(U=":",D=":"):N===108?U=":":N===114&&(D=":");let M=n.alignDelimiters===!1?1:Math.max(1,h[v]-U.length-D.length);const L=U+"-".repeat(M)+D;n.alignDelimiters!==!1&&(M=U.length+M+D.length,M>h[v]&&(h[v]=M),b[v]=M),k[v]=L}c.splice(1,0,k),f.splice(1,0,b),y=-1;const T=[];for(;++y<c.length;){const N=c[y],U=f[y];v=-1;const D=[];for(;++v<m;){const M=N[v]||"";let L="",G="";if(n.alignDelimiters!==!1){const te=h[v]-(U[v]||0),_=o[v];_===114?L=" ".repeat(te):_===99?te%2?(L=" ".repeat(te/2+.5),G=" ".repeat(te/2-.5)):(L=" ".repeat(te/2),G=L):G=" ".repeat(te)}n.delimiterStart!==!1&&!v&&D.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&M==="")&&(n.delimiterStart!==!1||v)&&D.push(" "),n.alignDelimiters!==!1&&D.push(L),D.push(M),n.alignDelimiters!==!1&&D.push(G),n.padding!==!1&&D.push(" "),(n.delimiterEnd!==!1||v!==m-1)&&D.push("|")}T.push(n.delimiterEnd===!1?D.join("").replace(/ +$/,""):D.join(""))}return T.join(`
|
|
65
|
-
`)}function mS(e){return e==null?"":String(e)}function zy(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 pS(e,t,n,a){const l=n.enter("blockquote"),o=n.createTracker(a);o.move("> "),o.shift(2);const c=n.indentLines(n.containerFlow(e,o.current()),gS);return l(),c}function gS(e,t,n){return">"+(n?"":" ")+e}function yS(e,t){return Dy(e,t.inConstruct,!0)&&!Dy(e,t.notInConstruct,!1)}function Dy(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 Ry(e,t,n,a){let l=-1;for(;++l<n.unsafe.length;)if(n.unsafe[l].character===`
|
|
66
|
-
`&&yS(n.stack,n.unsafe[l]))return/[ \t]/.test(a.before)?"":" ";return`\\
|
|
67
|
-
`}function y6(e,t){const n=String(e);let a=n.indexOf(t),l=a,o=0,c=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;a!==-1;)a===l?++o>c&&(c=o):o=1,l=a+t.length,a=n.indexOf(t,l);return c}function vS(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 xS(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 bS(e,t,n,a){const l=xS(n),o=e.value||"",c=l==="`"?"GraveAccent":"Tilde";if(vS(e,n)){const v=n.enter("codeIndented"),k=n.indentLines(o,wS);return v(),k}const f=n.createTracker(a),h=l.repeat(Math.max(y6(o,l)+1,3)),m=n.enter("codeFenced");let y=f.move(h);if(e.lang){const v=n.enter(`codeFencedLang${c}`);y+=f.move(n.safe(e.lang,{before:y,after:" ",encode:["`"],...f.current()})),v()}if(e.lang&&e.meta){const v=n.enter(`codeFencedMeta${c}`);y+=f.move(" "),y+=f.move(n.safe(e.meta,{before:y,after:`
|
|
68
|
-
`,encode:["`"],...f.current()})),v()}return y+=f.move(`
|
|
69
|
-
`),o&&(y+=f.move(o+`
|
|
70
|
-
`)),y+=f.move(h),m(),y}function wS(e,t,n){return(n?"":" ")+e}function b1(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 kS(e,t,n,a){const l=b1(n),o=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${o}`),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 SS(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 Xc(e){return"&#x"+e.toString(16).toUpperCase()+";"}function rf(e,t,n){const a=ou(e),l=ou(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}}v6.peek=CS;function v6(e,t,n,a){const l=SS(n),o=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),y=rf(a.before.charCodeAt(a.before.length-1),m,l);y.inside&&(h=Xc(m)+h.slice(1));const v=h.charCodeAt(h.length-1),k=rf(a.after.charCodeAt(0),v,l);k.inside&&(h=h.slice(0,-1)+Xc(v));const b=c.move(l);return o(),n.attentionEncodeSurroundingInfo={after:k.outside,before:y.outside},f+h+b}function CS(e,t,n){return n.options.emphasis||"*"}function jS(e,t){let n=!1;return v1(e,function(a){if("value"in a&&/\r?\n|\r/.test(a.value)||a.type==="break")return n=!0,xp}),!!((!e.depth||e.depth<3)&&c1(e)&&(t.options.setext||n))}function TS(e,t,n,a){const l=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(a);if(jS(e,n)){const y=n.enter("headingSetext"),v=n.enter("phrasing"),k=n.containerPhrasing(e,{...o.current(),before:`
|
|
72
|
-
`,after:`
|
|
73
|
-
`});return v(),y(),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");o.move(c+" ");let m=n.containerPhrasing(e,{before:"# ",after:`
|
|
76
|
-
`,...o.current()});return/^[\t ]/.test(m)&&(m=Xc(m.charCodeAt(0))+m.slice(1)),m=m?c+" "+m:c,n.options.closeAtx&&(m+=" "+c),h(),f(),m}x6.peek=AS;function x6(e){return e.value||""}function AS(){return"<"}b6.peek=ES;function b6(e,t,n,a){const l=b1(n),o=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${o}`),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 ES(){return"!"}w6.peek=NS;function w6(e,t,n,a){const l=e.referenceType,o=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 y=n.stack;n.stack=[],c=n.enter("reference");const v=n.safe(n.associationId(e),{before:h,after:"]",...f.current()});return c(),n.stack=y,o(),l==="full"||!m||m!==v?h+=f.move(v+"]"):l==="shortcut"?h=h.slice(0,-1):h+=f.move("]"),h}function NS(){return"!"}k6.peek=MS;function k6(e,t,n){let a=e.value||"",l="`",o=-1;for(;new RegExp("(^|[^`])"+l+"([^`]|$)").test(a);)l+="`";for(/[^ \r\n]/.test(a)&&(/^[ \r\n]/.test(a)&&/[ \r\n]$/.test(a)||/^`|`$/.test(a))&&(a=" "+a+" ");++o<n.unsafe.length;){const c=n.unsafe[o],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 MS(){return"`"}function S6(e,t){const n=c1(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))}C6.peek=zS;function C6(e,t,n,a){const l=b1(n),o=l==='"'?"Quote":"Apostrophe",c=n.createTracker(a);let f,h;if(S6(e,n)){const y=n.stack;n.stack=[],f=n.enter("autolink");let v=c.move("<");return v+=c.move(n.containerPhrasing(e,{before:v,after:">",...c.current()})),v+=c.move(">"),f(),n.stack=y,v}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${o}`),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 zS(e,t,n){return S6(e,n)?"<":"["}j6.peek=DS;function j6(e,t,n,a){const l=e.referenceType,o=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 y=n.stack;n.stack=[],c=n.enter("reference");const v=n.safe(n.associationId(e),{before:h,after:"]",...f.current()});return c(),n.stack=y,o(),l==="full"||!m||m!==v?h+=f.move(v+"]"):l==="shortcut"?h=h.slice(0,-1):h+=f.move("]"),h}function DS(){return"["}function w1(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 RS(e){const t=w1(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 OS(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 T6(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 _S(e,t,n,a){const l=n.enter("list"),o=n.bulletCurrent;let c=e.ordered?OS(n):w1(n);const f=e.ordered?c==="."?")":".":RS(n);let h=t&&n.bulletLastUsed?c===n.bulletLastUsed:!1;if(!e.ordered){const y=e.children?e.children[0]:void 0;if((c==="*"||c==="-")&&y&&(!y.children||!y.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),T6(n)===c&&y){let v=-1;for(;++v<e.children.length;){const k=e.children[v];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=o,l(),m}function IS(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 BS(e,t,n,a){const l=IS(n);let o=n.bulletCurrent||w1(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let c=o.length+1;(l==="tab"||l==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(c=Math.ceil(c/4)*4);const f=n.createTracker(a);f.move(o+" ".repeat(c-o.length)),f.shift(c);const h=n.enter("listItem"),m=n.indentLines(n.containerFlow(e,f.current()),y);return h(),m;function y(v,k,b){return k?(b?"":" ".repeat(c))+v:(b?o:o+" ".repeat(c-o.length))+v}}function LS(e,t,n,a){const l=n.enter("paragraph"),o=n.enter("phrasing"),c=n.containerPhrasing(e,a);return o(),l(),c}const qS=n0(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function US(e,t,n,a){return(e.children.some(function(c){return qS(c)})?n.containerPhrasing:n.containerFlow).call(n,e,a)}function HS(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}A6.peek=$S;function A6(e,t,n,a){const l=HS(n),o=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),y=rf(a.before.charCodeAt(a.before.length-1),m,l);y.inside&&(h=Xc(m)+h.slice(1));const v=h.charCodeAt(h.length-1),k=rf(a.after.charCodeAt(0),v,l);k.inside&&(h=h.slice(0,-1)+Xc(v));const b=c.move(l+l);return o(),n.attentionEncodeSurroundingInfo={after:k.outside,before:y.outside},f+h+b}function $S(e,t,n){return n.options.strong||"*"}function FS(e,t,n,a){return n.safe(e.value,a)}function PS(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 GS(e,t,n){const a=(T6(n)+(n.options.ruleSpaces?" ":"")).repeat(PS(n));return n.options.ruleSpaces?a.slice(0,-1):a}const E6={blockquote:pS,break:Ry,code:bS,definition:kS,emphasis:v6,hardBreak:Ry,heading:TS,html:x6,image:b6,imageReference:w6,inlineCode:k6,link:C6,linkReference:j6,list:_S,listItem:BS,paragraph:LS,root:US,strong:A6,text:FS,thematicBreak:GS};function VS(){return{enter:{table:YS,tableData:Oy,tableHeader:Oy,tableRow:KS},exit:{codeText:XS,table:WS,tableData:zm,tableHeader:zm,tableRow:zm}}}function YS(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 WS(e){this.exit(e),this.data.inTable=void 0}function KS(e){this.enter({type:"tableRow",children:[]},e)}function zm(e){this.exit(e)}function Oy(e){this.enter({type:"tableCell",children:[]},e)}function XS(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,QS));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function QS(e,t){return t==="|"?t:e}function ZS(e){const t=e||{},n=t.tableCellPadding,a=t.tablePipeAlign,l=t.stringLength,o=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(b,T,N,U){return m(y(b,N,U),b.align)}function f(b,T,N,U){const D=v(b,N,U),M=m([D]);return M.slice(0,M.indexOf(`
|
|
78
|
-
`))}function h(b,T,N,U){const D=N.enter("tableCell"),M=N.enter("phrasing"),L=N.containerPhrasing(b,{...U,before:o,after:o});return M(),D(),L}function m(b,T){return hS(b,{align:T,alignDelimiters:a,padding:n,stringLength:l})}function y(b,T,N){const U=b.children;let D=-1;const M=[],L=T.enter("table");for(;++D<U.length;)M[D]=v(U[D],T,N);return L(),M}function v(b,T,N){const U=b.children;let D=-1;const M=[],L=T.enter("tableRow");for(;++D<U.length;)M[D]=h(U[D],b,T,N);return L(),M}function k(b,T,N){let U=E6.inlineCode(b,T,N);return N.stack.includes("tableCell")&&(U=U.replace(/\|/g,"\\$&")),U}}function JS(){return{exit:{taskListCheckValueChecked:_y,taskListCheckValueUnchecked:_y,paragraph:tC}}}function eC(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:nC}}}function _y(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function tC(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 o=-1,c;for(;++o<l.length;){const f=l[o];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 nC(e,t,n,a){const l=e.children[0],o=typeof e.checked=="boolean"&&l&&l.type==="paragraph",c="["+(e.checked?"x":" ")+"] ",f=n.createTracker(a);o&&f.move(c);let h=E6.listItem(e,t,n,{...a,...f.current()});return o&&(h=h.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,m)),h;function m(y){return y+c}}function rC(){return[Ik(),rS(),sS(),VS(),JS()]}function aC(e){return{extensions:[Bk(),aS(e),oS(),ZS(e),eC()]}}const iC={tokenize:dC,partial:!0},N6={tokenize:fC,partial:!0},M6={tokenize:hC,partial:!0},z6={tokenize:mC,partial:!0},lC={tokenize:pC,partial:!0},D6={name:"wwwAutolink",tokenize:uC,previous:O6},R6={name:"protocolAutolink",tokenize:cC,previous:_6},Hi={name:"emailAutolink",tokenize:oC,previous:I6},Xa={};function sC(){return{text:Xa}}let Ls=48;for(;Ls<123;)Xa[Ls]=Hi,Ls++,Ls===58?Ls=65:Ls===91&&(Ls=97);Xa[43]=Hi;Xa[45]=Hi;Xa[46]=Hi;Xa[95]=Hi;Xa[72]=[Hi,R6];Xa[104]=[Hi,R6];Xa[87]=[Hi,D6];Xa[119]=[Hi,D6];function oC(e,t,n){const a=this;let l,o;return c;function c(v){return!Sp(v)||!I6.call(a,a.previous)||k1(a.events)?n(v):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(v))}function f(v){return Sp(v)?(e.consume(v),f):v===64?(e.consume(v),h):n(v)}function h(v){return v===46?e.check(lC,y,m)(v):v===45||v===95||Vn(v)?(o=!0,e.consume(v),h):y(v)}function m(v){return e.consume(v),l=!0,h}function y(v){return o&&l&&rr(a.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(v)):n(v)}}function uC(e,t,n){const a=this;return l;function l(c){return c!==87&&c!==119||!O6.call(a,a.previous)||k1(a.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(iC,e.attempt(N6,e.attempt(M6,o),n),n)(c))}function o(c){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(c)}}function cC(e,t,n){const a=this;let l="",o=!1;return c;function c(v){return(v===72||v===104)&&_6.call(a,a.previous)&&!k1(a.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),l+=String.fromCodePoint(v),e.consume(v),f):n(v)}function f(v){if(rr(v)&&l.length<5)return l+=String.fromCodePoint(v),e.consume(v),f;if(v===58){const k=l.toLowerCase();if(k==="http"||k==="https")return e.consume(v),h}return n(v)}function h(v){return v===47?(e.consume(v),o?m:(o=!0,h)):n(v)}function m(v){return v===null||ef(v)||Yt(v)||Ks(v)||gf(v)?n(v):e.attempt(N6,e.attempt(M6,y),n)(v)}function y(v){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(v)}}function dC(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),o):n(c)}function o(c){return c===null?n(c):t(c)}}function fC(e,t,n){let a,l,o;return c;function c(m){return m===46||m===95?e.check(z6,h,f)(m):m===null||Yt(m)||Ks(m)||m!==45&&gf(m)?h(m):(o=!0,e.consume(m),c)}function f(m){return m===95?a=!0:(l=a,a=void 0),e.consume(m),c}function h(m){return l||a||!o?n(m):t(m)}}function hC(e,t){let n=0,a=0;return l;function l(c){return c===40?(n++,e.consume(c),l):c===41&&a<n?o(c):c===33||c===34||c===38||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===60||c===63||c===93||c===95||c===126?e.check(z6,t,o)(c):c===null||Yt(c)||Ks(c)?t(c):(e.consume(c),l)}function o(c){return c===41&&a++,e.consume(c),l}}function mC(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),o):f===93?(e.consume(f),l):f===60||f===null||Yt(f)||Ks(f)?t(f):n(f)}function l(f){return f===null||f===40||f===91||Yt(f)||Ks(f)?t(f):a(f)}function o(f){return rr(f)?c(f):n(f)}function c(f){return f===59?(e.consume(f),a):rr(f)?(e.consume(f),c):n(f)}}function pC(e,t,n){return a;function a(o){return e.consume(o),l}function l(o){return Vn(o)?n(o):t(o)}}function O6(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Yt(e)}function _6(e){return!rr(e)}function I6(e){return!(e===47||Sp(e))}function Sp(e){return e===43||e===45||e===46||e===95||Vn(e)}function k1(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 gC={tokenize:CC,partial:!0};function yC(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:wC,continuation:{tokenize:kC},exit:SC}},text:{91:{name:"gfmFootnoteCall",tokenize:bC},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:vC,resolveTo:xC}}}}function vC(e,t,n){const a=this;let l=a.events.length;const o=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let c;for(;l--;){const h=a.events[l][1];if(h.type==="labelImage"){c=h;break}if(h.type==="gfmFootnoteCall"||h.type==="labelLink"||h.type==="label"||h.type==="image"||h.type==="link")break}return f;function f(h){if(!c||!c._balanced)return n(h);const m=Ta(a.sliceSerialize({start:c.end,end:a.now()}));return m.codePointAt(0)!==94||!o.includes(m.slice(1))?n(h):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),t(h))}}function xC(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 o={type:"gfmFootnoteCallString",start:Object.assign({},l.end),end:Object.assign({},e[e.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},f=[e[n+1],e[n+2],["enter",a,t],e[n+3],e[n+4],["enter",l,t],["exit",l,t],["enter",o,t],["enter",c,t],["exit",c,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",a,t]];return e.splice(n,e.length-n+1,...f),e}function bC(e,t,n){const a=this,l=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let o=0,c;return f;function f(v){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(v),e.exit("gfmFootnoteCallLabelMarker"),h}function h(v){return v!==94?n(v):(e.enter("gfmFootnoteCallMarker"),e.consume(v),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",m)}function m(v){if(o>999||v===93&&!c||v===null||v===91||Yt(v))return n(v);if(v===93){e.exit("chunkString");const k=e.exit("gfmFootnoteCallString");return l.includes(Ta(a.sliceSerialize(k)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(v),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(v)}return Yt(v)||(c=!0),o++,e.consume(v),v===92?y:m}function y(v){return v===91||v===92||v===93?(e.consume(v),o++,m):m(v)}}function wC(e,t,n){const a=this,l=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let o,c=0,f;return h;function h(T){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(T),e.exit("gfmFootnoteDefinitionLabelMarker"),m}function m(T){return T===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(T),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",y):n(T)}function y(T){if(c>999||T===93&&!f||T===null||T===91||Yt(T))return n(T);if(T===93){e.exit("chunkString");const N=e.exit("gfmFootnoteDefinitionLabelString");return o=Ta(a.sliceSerialize(N)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(T),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),k}return Yt(T)||(f=!0),c++,e.consume(T),T===92?v:y}function v(T){return T===91||T===92||T===93?(e.consume(T),c++,y):y(T)}function k(T){return T===58?(e.enter("definitionMarker"),e.consume(T),e.exit("definitionMarker"),l.includes(o)||l.push(o),xt(e,b,"gfmFootnoteDefinitionWhitespace")):n(T)}function b(T){return t(T)}}function kC(e,t,n){return e.check(t0,t,e.attempt(gC,t,n))}function SC(e){e.exit("gfmFootnoteDefinition")}function CC(e,t,n){const a=this;return xt(e,l,"gfmFootnoteDefinitionIndent",5);function l(o){const c=a.events[a.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?t(o):n(o)}}function jC(e){let n=(e||{}).singleTilde;const a={name:"strikethrough",tokenize:o,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 y={type:"strikethrough",start:Object.assign({},c[m][1].start),end:Object.assign({},c[h][1].end)},v={type:"strikethroughText",start:Object.assign({},c[m][1].end),end:Object.assign({},c[h][1].start)},k=[["enter",y,f],["enter",c[m][1],f],["exit",c[m][1],f],["enter",v,f]],b=f.parser.constructs.insideSpan.null;b&&Ir(k,k.length,0,yf(b,c.slice(m+1,h),f)),Ir(k,k.length,0,[["exit",v,f],["enter",c[h][1],f],["exit",c[h][1],f],["exit",y,f]]),Ir(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 o(c,f,h){const m=this.previous,y=this.events;let v=0;return k;function k(T){return m===126&&y[y.length-1][1].type!=="characterEscape"?h(T):(c.enter("strikethroughSequenceTemporary"),b(T))}function b(T){const N=ou(m);if(T===126)return v>1?h(T):(c.consume(T),v++,b);if(v<2&&!n)return h(T);const U=c.exit("strikethroughSequenceTemporary"),D=ou(T);return U._open=!D||D===2&&!!N,U._close=!N||N===2&&!!D,f(T)}}}class TC{constructor(){this.map=[]}add(t,n,a){AC(this,t,n,a)}consume(t){if(this.map.sort(function(o,c){return o[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 o of l)t.push(o);l=a.pop()}this.map.length=0}}function AC(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 EC(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 o=a.length-1;a[o]=a[o]==="left"?"center":"right"}}else if(l[1].type==="tableDelimiterRow")break}else l[0]==="enter"&&l[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return a}function NC(){return{flow:{null:{name:"table",tokenize:MC,resolveAll:zC}}}}function MC(e,t,n){const a=this;let l=0,o=0,c;return f;function f(F){let oe=a.events.length-1;for(;oe>-1;){const be=a.events[oe][1].type;if(be==="lineEnding"||be==="linePrefix")oe--;else break}const de=oe>-1?a.events[oe][1].type:null,_e=de==="tableHead"||de==="tableRow"?_:h;return _e===_&&a.parser.lazy[a.now().line]?n(F):_e(F)}function h(F){return e.enter("tableHead"),e.enter("tableRow"),m(F)}function m(F){return F===124||(c=!0,o+=1),y(F)}function y(F){return F===null?n(F):Ke(F)?o>1?(o=0,a.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(F),e.exit("lineEnding"),b):n(F):kt(F)?xt(e,y,"whitespace")(F):(o+=1,c&&(c=!1,l+=1),F===124?(e.enter("tableCellDivider"),e.consume(F),e.exit("tableCellDivider"),c=!0,y):(e.enter("data"),v(F)))}function v(F){return F===null||F===124||Yt(F)?(e.exit("data"),y(F)):(e.consume(F),F===92?k:v)}function k(F){return F===92||F===124?(e.consume(F),v):v(F)}function b(F){return a.interrupt=!1,a.parser.lazy[a.now().line]?n(F):(e.enter("tableDelimiterRow"),c=!1,kt(F)?xt(e,T,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):T(F))}function T(F){return F===45||F===58?U(F):F===124?(c=!0,e.enter("tableCellDivider"),e.consume(F),e.exit("tableCellDivider"),N):te(F)}function N(F){return kt(F)?xt(e,U,"whitespace")(F):U(F)}function U(F){return F===58?(o+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(F),e.exit("tableDelimiterMarker"),D):F===45?(o+=1,D(F)):F===null||Ke(F)?G(F):te(F)}function D(F){return F===45?(e.enter("tableDelimiterFiller"),M(F)):te(F)}function M(F){return F===45?(e.consume(F),M):F===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(F),e.exit("tableDelimiterMarker"),L):(e.exit("tableDelimiterFiller"),L(F))}function L(F){return kt(F)?xt(e,G,"whitespace")(F):G(F)}function G(F){return F===124?T(F):F===null||Ke(F)?!c||l!==o?te(F):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(F)):te(F)}function te(F){return n(F)}function _(F){return e.enter("tableRow"),W(F)}function W(F){return F===124?(e.enter("tableCellDivider"),e.consume(F),e.exit("tableCellDivider"),W):F===null||Ke(F)?(e.exit("tableRow"),t(F)):kt(F)?xt(e,W,"whitespace")(F):(e.enter("data"),ae(F))}function ae(F){return F===null||F===124||Yt(F)?(e.exit("data"),W(F)):(e.consume(F),F===92?Q:ae)}function Q(F){return F===92||F===124?(e.consume(F),ae):ae(F)}}function zC(e,t){let n=-1,a=!0,l=0,o=[0,0,0,0],c=[0,0,0,0],f=!1,h=0,m,y,v;const k=new TC;for(;++n<e.length;){const b=e[n],T=b[1];b[0]==="enter"?T.type==="tableHead"?(f=!1,h!==0&&(Iy(k,t,h,m,y),y=void 0,h=0),m={type:"table",start:Object.assign({},T.start),end:Object.assign({},T.end)},k.add(n,0,[["enter",m,t]])):T.type==="tableRow"||T.type==="tableDelimiterRow"?(a=!0,v=void 0,o=[0,0,0,0],c=[0,n+1,0,0],f&&(f=!1,y={type:"tableBody",start:Object.assign({},T.start),end:Object.assign({},T.end)},k.add(n,0,[["enter",y,t]])),l=T.type==="tableDelimiterRow"?2:y?3:1):l&&(T.type==="data"||T.type==="tableDelimiterMarker"||T.type==="tableDelimiterFiller")?(a=!1,c[2]===0&&(o[1]!==0&&(c[0]=c[1],v=Ed(k,t,o,l,void 0,v),o=[0,0,0,0]),c[2]=n)):T.type==="tableCellDivider"&&(a?a=!1:(o[1]!==0&&(c[0]=c[1],v=Ed(k,t,o,l,void 0,v)),o=c,c=[o[1],n,0,0])):T.type==="tableHead"?(f=!0,h=n):T.type==="tableRow"||T.type==="tableDelimiterRow"?(h=n,o[1]!==0?(c[0]=c[1],v=Ed(k,t,o,l,n,v)):c[1]!==0&&(v=Ed(k,t,c,l,n,v)),l=0):l&&(T.type==="data"||T.type==="tableDelimiterMarker"||T.type==="tableDelimiterFiller")&&(c[3]=n)}for(h!==0&&Iy(k,t,h,m,y),k.consume(t.events),n=-1;++n<t.events.length;){const b=t.events[n];b[0]==="enter"&&b[1].type==="table"&&(b[1]._align=EC(t.events,n))}return e}function Ed(e,t,n,a,l,o){const c=a===1?"tableHeader":a===2?"tableDelimiter":"tableData",f="tableContent";n[0]!==0&&(o.end=Object.assign({},ru(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const h=ru(t.events,n[1]);if(o={type:c,start:Object.assign({},h),end:Object.assign({},h)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const m=ru(t.events,n[2]),y=ru(t.events,n[3]),v={type:f,start:Object.assign({},m),end:Object.assign({},y)};if(e.add(n[2],0,[["enter",v,t]]),a!==2){const k=t.events[n[2]],b=t.events[n[3]];if(k[1].end=Object.assign({},b[1].end),k[1].type="chunkText",k[1].contentType="text",n[3]>n[2]+1){const T=n[2]+1,N=n[3]-n[2]-1;e.add(T,N,[])}}e.add(n[3]+1,0,[["exit",v,t]])}return l!==void 0&&(o.end=Object.assign({},ru(t.events,l)),e.add(l,0,[["exit",o,t]]),o=void 0),o}function Iy(e,t,n,a,l){const o=[],c=ru(t.events,n);l&&(l.end=Object.assign({},c),o.push(["exit",l,t])),a.end=Object.assign({},c),o.push(["exit",a,t]),e.add(n+1,0,o)}function ru(e,t){const n=e[t],a=n[0]==="enter"?"start":"end";return n[1][a]}const DC={name:"tasklistCheck",tokenize:OC};function RC(){return{text:{91:DC}}}function OC(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"),o)}function o(h){return Yt(h)?(e.enter("taskListCheckValueUnchecked"),e.consume(h),e.exit("taskListCheckValueUnchecked"),c):h===88||h===120?(e.enter("taskListCheckValueChecked"),e.consume(h),e.exit("taskListCheckValueChecked"),c):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 Ke(h)?t(h):kt(h)?e.check({tokenize:_C},t,n)(h):n(h)}}function _C(e,t,n){return xt(e,a,"whitespace");function a(l){return l===null?n(l):t(l)}}function IC(e){return G5([sC(),yC(),jC(e),NC(),RC()])}const BC={};function LC(e){const t=this,n=e||BC,a=t.data(),l=a.micromarkExtensions||(a.micromarkExtensions=[]),o=a.fromMarkdownExtensions||(a.fromMarkdownExtensions=[]),c=a.toMarkdownExtensions||(a.toMarkdownExtensions=[]);l.push(IC(n)),o.push(rC()),c.push(aC(n))}function qC(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:o},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,""),y=this.stack[this.stack.length-1];y.type,this.exit(h),y.value=m;const v=y.data.hChildren[0];v.type,v.tagName,v.children.push({type:"text",value:m}),this.data.mathFlowInside=void 0}function o(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(),y=this.stack[this.stack.length-1];y.type,this.exit(h),y.value=m,y.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 UC(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(o,c,f,h){const m=o.value||"",y=f.createTracker(h),v="$".repeat(Math.max(y6(m,"$")+1,2)),k=f.enter("mathFlow");let b=y.move(v);if(o.meta){const T=f.enter("mathFlowMeta");b+=y.move(f.safe(o.meta,{after:`
|
|
80
|
-
`,before:b,encode:["$"],...y.current()})),T()}return b+=y.move(`
|
|
81
|
-
`),m&&(b+=y.move(m+`
|
|
82
|
-
`)),b+=y.move(v),k(),b}function a(o,c,f){let h=o.value||"",m=1;for(t||m++;new RegExp("(^|[^$])"+"\\$".repeat(m)+"([^$]|$)").test(h);)m++;const y="$".repeat(m);/[^ \r\n]/.test(h)&&(/^[ \r\n]/.test(h)&&/[ \r\n]$/.test(h)||/^\$|\$$/.test(h))&&(h=" "+h+" ");let v=-1;for(;++v<f.unsafe.length;){const k=f.unsafe[v];if(!k.atBreak)continue;const b=f.compilePattern(k);let T;for(;T=b.exec(h);){let N=T.index;h.codePointAt(N)===10&&h.codePointAt(N-1)===13&&N--,h=h.slice(0,N)+" "+h.slice(T.index+1)}}return y+h+y}function l(){return"$"}}const HC={tokenize:$C,concrete:!0,name:"mathFlow"},By={tokenize:FC,partial:!0};function $C(e,t,n){const a=this,l=a.events[a.events.length-1],o=l&&l[1].type==="linePrefix"?l[2].sliceSerialize(l[1],!0).length:0;let c=0;return f;function f(M){return e.enter("mathFlow"),e.enter("mathFlowFence"),e.enter("mathFlowFenceSequence"),h(M)}function h(M){return M===36?(e.consume(M),c++,h):c<2?n(M):(e.exit("mathFlowFenceSequence"),xt(e,m,"whitespace")(M))}function m(M){return M===null||Ke(M)?v(M):(e.enter("mathFlowFenceMeta"),e.enter("chunkString",{contentType:"string"}),y(M))}function y(M){return M===null||Ke(M)?(e.exit("chunkString"),e.exit("mathFlowFenceMeta"),v(M)):M===36?n(M):(e.consume(M),y)}function v(M){return e.exit("mathFlowFence"),a.interrupt?t(M):e.attempt(By,k,U)(M)}function k(M){return e.attempt({tokenize:D,partial:!0},U,b)(M)}function b(M){return(o?xt(e,T,"linePrefix",o+1):T)(M)}function T(M){return M===null?U(M):Ke(M)?e.attempt(By,k,U)(M):(e.enter("mathFlowValue"),N(M))}function N(M){return M===null||Ke(M)?(e.exit("mathFlowValue"),T(M)):(e.consume(M),N)}function U(M){return e.exit("mathFlow"),t(M)}function D(M,L,G){let te=0;return xt(M,_,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function _(Q){return M.enter("mathFlowFence"),M.enter("mathFlowFenceSequence"),W(Q)}function W(Q){return Q===36?(te++,M.consume(Q),W):te<c?G(Q):(M.exit("mathFlowFenceSequence"),xt(M,ae,"whitespace")(Q))}function ae(Q){return Q===null||Ke(Q)?(M.exit("mathFlowFence"),L(Q)):G(Q)}}}function FC(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"),o)}function o(c){return a.parser.lazy[a.now().line]?n(c):t(c)}}function PC(e){let n=(e||{}).singleDollarTextMath;return n==null&&(n=!0),{tokenize:a,resolve:GC,previous:VC,name:"mathText"};function a(l,o,c){let f=0,h,m;return y;function y(N){return l.enter("mathText"),l.enter("mathTextSequence"),v(N)}function v(N){return N===36?(l.consume(N),f++,v):f<2&&!n?c(N):(l.exit("mathTextSequence"),k(N))}function k(N){return N===null?c(N):N===36?(m=l.enter("mathTextSequence"),h=0,T(N)):N===32?(l.enter("space"),l.consume(N),l.exit("space"),k):Ke(N)?(l.enter("lineEnding"),l.consume(N),l.exit("lineEnding"),k):(l.enter("mathTextData"),b(N))}function b(N){return N===null||N===32||N===36||Ke(N)?(l.exit("mathTextData"),k(N)):(l.consume(N),b)}function T(N){return N===36?(l.consume(N),h++,T):h===f?(l.exit("mathTextSequence"),l.exit("mathText"),o(N)):(m.type="mathTextData",b(N))}}}function GC(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 VC(e){return e!==36||this.events[this.events.length-1][1].type==="characterEscape"}function YC(e){return{flow:{36:HC},text:{36:PC(e)}}}class je extends Error{constructor(t,n){var a="KaTeX parse error: "+t,l,o,c=n&&n.loc;if(c&&c.start<=c.end){var f=c.lexer.input;l=c.start,o=c.end,l===f.length?a+=" at end of input: ":a+=" at position "+(l+1)+": ";var h=f.slice(l,o).replace(/[^]/g,"$&̲"),m;l>15?m="…"+f.slice(l-15,l):m=f.slice(0,l);var y;o+15<f.length?y=f.slice(o,o+15)+"…":y=f.slice(o),a+=m+h+y}super(a),this.name="ParseError",this.position=void 0,this.length=void 0,this.rawMessage=void 0,Object.setPrototypeOf(this,je.prototype),this.position=l,l!=null&&o!=null&&(this.length=o-l),this.rawMessage=t}}var WC=/([A-Z])/g,KC=e=>e.replace(WC,"-$1").toLowerCase(),XC={"&":"&",">":">","<":"<",'"':""","'":"'"},QC=/[&><"']/g,Yn=e=>String(e).replace(QC,t=>XC[t]),Yd=e=>e.type==="ordgroup"||e.type==="color"?e.body.length===1?Yd(e.body[0]):e:e.type==="font"?Yd(e.body):e,ZC=new Set(["mathord","textord","atom"]),$i=e=>ZC.has(Yd(e).type),JC=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"},af={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 ej(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 tj(e){if(e.default!==void 0)return e.default;var t=Array.isArray(e.type)?e.type[0]:e.type;return ej(t)}function nj(e,t,n,a){var l=n[t];e[t]=l!==void 0?a.processor?a.processor(l):l:tj(a)}class S1{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(af)){var a=af[n];a&&nj(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 je("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=JC(t.url);if(n==null)return!1;t.protocol=n}var a=typeof this.trust=="function"?this.trust(t):this.trust;return!!a}}class Fl{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 Va[rj[this.id]]}sub(){return Va[aj[this.id]]}fracNum(){return Va[ij[this.id]]}fracDen(){return Va[lj[this.id]]}cramp(){return Va[sj[this.id]]}text(){return Va[oj[this.id]]}isTight(){return this.size>=2}}var C1=0,lf=1,lu=2,qi=3,Qc=4,ra=5,uu=6,ar=7,Va=[new Fl(C1,0,!1),new Fl(lf,0,!0),new Fl(lu,1,!1),new Fl(qi,1,!0),new Fl(Qc,2,!1),new Fl(ra,2,!0),new Fl(uu,3,!1),new Fl(ar,3,!0)],rj=[Qc,ra,Qc,ra,uu,ar,uu,ar],aj=[ra,ra,ra,ra,ar,ar,ar,ar],ij=[lu,qi,Qc,ra,uu,ar,uu,ar],lj=[qi,qi,ra,ra,ar,ar,ar,ar],sj=[lf,lf,qi,qi,ra,ra,ar,ar],oj=[C1,lf,lu,qi,lu,qi,lu,qi],lt={DISPLAY:Va[C1],TEXT:Va[lu],SCRIPT:Va[Qc],SCRIPTSCRIPT:Va[uu]},Cp=[{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 uj(e){for(var t=0;t<Cp.length;t++)for(var n=Cp[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 Wd=[];Cp.forEach(e=>e.blocks.forEach(t=>Wd.push(...t)));function B6(e){for(var t=0;t<Wd.length;t+=2)if(e>=Wd[t]&&e<=Wd[t+1])return!0;return!1}var Mn=e=>e+" "+e,nu=80,cj=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"},dj=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"},fj=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"},hj=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"},mj=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"},pj=function(t){var n=t/2;return"M400000 "+t+" H0 L"+n+" 0 l65 45 L145 "+(t-80)+" H400000z"},gj=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"},yj=function(t,n,a){n=1e3*n;var l="";switch(t){case"sqrtMain":l=cj(n,nu);break;case"sqrtSize1":l=dj(n,nu);break;case"sqrtSize2":l=fj(n,nu);break;case"sqrtSize3":l=hj(n,nu);break;case"sqrtSize4":l=mj(n,nu);break;case"sqrtTall":l=gj(n,nu,a)}return l},vj=function(t,n){switch(t){case"⎜":return Mn("M291 0 H417 V"+n+" H291z");case"∣":return Mn("M145 0 H188 V"+n+" H145z");case"∥":return Mn("M145 0 H188 V"+n+" H145z")+Mn("M367 0 H410 V"+n+" H367z");case"⎟":return Mn("M457 0 H583 V"+n+" H457z");case"⎢":return Mn("M319 0 H403 V"+n+" H319z");case"⎥":return Mn("M263 0 H347 V"+n+" H263z");case"⎪":return Mn("M384 0 H504 V"+n+" H384z");case"⏐":return Mn("M312 0 H355 V"+n+" H312z");case"‖":return Mn("M257 0 H300 V"+n+" H257z")+Mn("M478 0 H521 V"+n+" H478z");default:return""}},Ly={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:Mn("M40 281 V428 H0 V94 H40 V241 H400000 v40z"),leftbracketunder:Mn("M0 0 h120 V290 H399995 v120 H0z"),leftbracketover:Mn("M0 440 h120 V150 H399995 v-120 H0z"),leftmapsto:Mn("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:Mn("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:Mn("M399960 241 V94 h40 V428 h-40 V281 H0 v-40z"),rightbracketunder:Mn("M399995 0 h-120 V290 H0 v120 H400000z"),rightbracketover:Mn("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`},xj=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 bj(e){return"toText"in e}class pu{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(bj(t))return t.toText();throw new Error("Expected MathDomNode with toText, got "+t.constructor.name)}).join("")}}var jp={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},wj={ex:!0,em:!0,mu:!0},L6=function(t){return typeof t!="string"&&(t=t.unit),t in jp||t in wj||t==="ex"},ln=function(t,n){var a;if(t.unit in jp)a=jp[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 je("Invalid unit: '"+t.unit+"'");l!==n&&(a*=l.sizeMultiplier/n.sizeMultiplier)}return Math.min(t.number*a,n.maxSize)},ze=function(t){return+t.toFixed(4)+"em"},Wl=function(t){return t.filter(n=>n).join(" ")},j1=function(t){var n="";for(var a of Object.keys(t)){var l=t[a];l!==void 0&&(n+=KC(a)+":"+l+";")}return n},q6=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)}},U6=function(t){var n=document.createElement(t);n.className=Wl(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},kj=/[\s"'>/=\x00-\x1f]/,H6=function(t){var n="<"+t;this.classes.length&&(n+=' class="'+Yn(Wl(this.classes))+'"');var a=j1(this.style);a&&(n+=' style="'+Yn(a)+'"');for(var l of Object.keys(this.attributes)){if(kj.test(l))throw new je("Invalid attribute name '"+l+"'");n+=" "+l+'="'+Yn(this.attributes[l])+'"'}n+=">";for(var o=0;o<this.children.length;o++)n+=this.children[o].toMarkup();return n+="</"+t+">",n};class gu{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,q6.call(this,t,a,l),this.children=n||[]}setAttribute(t,n){this.attributes[t]=n}hasClass(t){return this.classes.includes(t)}toNode(){return U6.call(this,"span")}toMarkup(){return H6.call(this,"span")}}class bf{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,q6.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 U6.call(this,"a")}toMarkup(){return H6.call(this,"a")}}class Sj{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="'+Yn(this.src)+'"'+(' alt="'+Yn(this.alt)+'"'),n=j1(this.style);return n&&(t+=' style="'+Yn(n)+'"'),t+="'/>",t}}var Cj={î:"ı̂",ï:"ı̈",í:"ı́",ì:"ı̀"};class Lr{constructor(t,n,a,l,o,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=o||0,this.width=c||0,this.classes=f||[],this.style=h||{},this.maxFontSize=0;var m=uj(this.text.charCodeAt(0));m&&this.classes.push(m+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=Cj[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=ze(this.italic)),this.classes.length>0&&(n=n||document.createElement("span"),n.className=Wl(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+=Yn(Wl(this.classes)),n+='"');var a="";this.italic>0&&(a+="margin-right:"+ze(this.italic)+";"),a+=j1(this.style),a&&(t=!0,n+=' style="'+Yn(a)+'"');var l=Yn(this.text);return t?(n+=">",n+=l,n+="</span>",n):l}}class Ui{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+'="'+Yn(this.attributes[n])+'"';t+=">";for(var a=0;a<this.children.length;a++)t+=this.children[a].toMarkup();return t+="</svg>",t}}class Kl{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",Ly[this.pathName]),n}toMarkup(){return this.alternate?'<path d="'+Yn(this.alternate)+'"/>':'<path d="'+Yn(Ly[this.pathName])+'"/>'}}class Tp{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+'="'+Yn(this.attributes[n])+'"';return t+="/>",t}}function jj(e){if(e instanceof Lr)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}function Tj(e){if(e instanceof gu)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}var Aj=e=>e instanceof gu||e instanceof bf||e instanceof pu,Ya={"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]}},Nd={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]},qy={Å:"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 $6(e,t){Ya[e]=t}function T1(e,t,n){if(!Ya[t])throw new Error("Font metrics not found for font: "+t+".");var a=e.charCodeAt(0),l=Ya[t][a];if(!l&&e[0]in qy&&(a=qy[e[0]].charCodeAt(0),l=Ya[t][a]),!l&&n==="text"&&B6(a)&&(l=Ya[t][77]),l)return{depth:l[0],height:l[1],italic:l[2],skew:l[3],width:l[4]}}var Dm={};function Ej(e){var t;if(e>=5?t=0:e>=3?t=1:t=2,!Dm[t]){var n=Dm[t]={cssEmPerMu:Nd.quad[t]/18};for(var a in Nd)Nd.hasOwnProperty(a)&&(n[a]=Nd[a][t])}return Dm[t]}var Jt={math:{},text:{}};function w(e,t,n,a,l,o){Jt[e][l]={font:t,group:n,replace:a},o&&a&&(Jt[e][a]=Jt[e][l])}var S="math",xe="text",A="main",$="ams",en="accent-token",He="bin",ir="close",yu="inner",et="mathord",Tn="op-token",qr="open",a0="punct",P="rel",Fi="spacing",X="textord";w(S,A,P,"≡","\\equiv",!0);w(S,A,P,"≺","\\prec",!0);w(S,A,P,"≻","\\succ",!0);w(S,A,P,"∼","\\sim",!0);w(S,A,P,"⊥","\\perp");w(S,A,P,"⪯","\\preceq",!0);w(S,A,P,"⪰","\\succeq",!0);w(S,A,P,"≃","\\simeq",!0);w(S,A,P,"∣","\\mid",!0);w(S,A,P,"≪","\\ll",!0);w(S,A,P,"≫","\\gg",!0);w(S,A,P,"≍","\\asymp",!0);w(S,A,P,"∥","\\parallel");w(S,A,P,"⋈","\\bowtie",!0);w(S,A,P,"⌣","\\smile",!0);w(S,A,P,"⊑","\\sqsubseteq",!0);w(S,A,P,"⊒","\\sqsupseteq",!0);w(S,A,P,"≐","\\doteq",!0);w(S,A,P,"⌢","\\frown",!0);w(S,A,P,"∋","\\ni",!0);w(S,A,P,"∝","\\propto",!0);w(S,A,P,"⊢","\\vdash",!0);w(S,A,P,"⊣","\\dashv",!0);w(S,A,P,"∋","\\owns");w(S,A,a0,".","\\ldotp");w(S,A,a0,"⋅","\\cdotp");w(S,A,a0,"⋅","·");w(xe,A,X,"⋅","·");w(S,A,X,"#","\\#");w(xe,A,X,"#","\\#");w(S,A,X,"&","\\&");w(xe,A,X,"&","\\&");w(S,A,X,"ℵ","\\aleph",!0);w(S,A,X,"∀","\\forall",!0);w(S,A,X,"ℏ","\\hbar",!0);w(S,A,X,"∃","\\exists",!0);w(S,A,X,"∇","\\nabla",!0);w(S,A,X,"♭","\\flat",!0);w(S,A,X,"ℓ","\\ell",!0);w(S,A,X,"♮","\\natural",!0);w(S,A,X,"♣","\\clubsuit",!0);w(S,A,X,"℘","\\wp",!0);w(S,A,X,"♯","\\sharp",!0);w(S,A,X,"♢","\\diamondsuit",!0);w(S,A,X,"ℜ","\\Re",!0);w(S,A,X,"♡","\\heartsuit",!0);w(S,A,X,"ℑ","\\Im",!0);w(S,A,X,"♠","\\spadesuit",!0);w(S,A,X,"§","\\S",!0);w(xe,A,X,"§","\\S");w(S,A,X,"¶","\\P",!0);w(xe,A,X,"¶","\\P");w(S,A,X,"†","\\dag");w(xe,A,X,"†","\\dag");w(xe,A,X,"†","\\textdagger");w(S,A,X,"‡","\\ddag");w(xe,A,X,"‡","\\ddag");w(xe,A,X,"‡","\\textdaggerdbl");w(S,A,ir,"⎱","\\rmoustache",!0);w(S,A,qr,"⎰","\\lmoustache",!0);w(S,A,ir,"⟯","\\rgroup",!0);w(S,A,qr,"⟮","\\lgroup",!0);w(S,A,He,"∓","\\mp",!0);w(S,A,He,"⊖","\\ominus",!0);w(S,A,He,"⊎","\\uplus",!0);w(S,A,He,"⊓","\\sqcap",!0);w(S,A,He,"∗","\\ast");w(S,A,He,"⊔","\\sqcup",!0);w(S,A,He,"◯","\\bigcirc",!0);w(S,A,He,"∙","\\bullet",!0);w(S,A,He,"‡","\\ddagger");w(S,A,He,"≀","\\wr",!0);w(S,A,He,"⨿","\\amalg");w(S,A,He,"&","\\And");w(S,A,P,"⟵","\\longleftarrow",!0);w(S,A,P,"⇐","\\Leftarrow",!0);w(S,A,P,"⟸","\\Longleftarrow",!0);w(S,A,P,"⟶","\\longrightarrow",!0);w(S,A,P,"⇒","\\Rightarrow",!0);w(S,A,P,"⟹","\\Longrightarrow",!0);w(S,A,P,"↔","\\leftrightarrow",!0);w(S,A,P,"⟷","\\longleftrightarrow",!0);w(S,A,P,"⇔","\\Leftrightarrow",!0);w(S,A,P,"⟺","\\Longleftrightarrow",!0);w(S,A,P,"↦","\\mapsto",!0);w(S,A,P,"⟼","\\longmapsto",!0);w(S,A,P,"↗","\\nearrow",!0);w(S,A,P,"↩","\\hookleftarrow",!0);w(S,A,P,"↪","\\hookrightarrow",!0);w(S,A,P,"↘","\\searrow",!0);w(S,A,P,"↼","\\leftharpoonup",!0);w(S,A,P,"⇀","\\rightharpoonup",!0);w(S,A,P,"↙","\\swarrow",!0);w(S,A,P,"↽","\\leftharpoondown",!0);w(S,A,P,"⇁","\\rightharpoondown",!0);w(S,A,P,"↖","\\nwarrow",!0);w(S,A,P,"⇌","\\rightleftharpoons",!0);w(S,$,P,"≮","\\nless",!0);w(S,$,P,"","\\@nleqslant");w(S,$,P,"","\\@nleqq");w(S,$,P,"⪇","\\lneq",!0);w(S,$,P,"≨","\\lneqq",!0);w(S,$,P,"","\\@lvertneqq");w(S,$,P,"⋦","\\lnsim",!0);w(S,$,P,"⪉","\\lnapprox",!0);w(S,$,P,"⊀","\\nprec",!0);w(S,$,P,"⋠","\\npreceq",!0);w(S,$,P,"⋨","\\precnsim",!0);w(S,$,P,"⪹","\\precnapprox",!0);w(S,$,P,"≁","\\nsim",!0);w(S,$,P,"","\\@nshortmid");w(S,$,P,"∤","\\nmid",!0);w(S,$,P,"⊬","\\nvdash",!0);w(S,$,P,"⊭","\\nvDash",!0);w(S,$,P,"⋪","\\ntriangleleft");w(S,$,P,"⋬","\\ntrianglelefteq",!0);w(S,$,P,"⊊","\\subsetneq",!0);w(S,$,P,"","\\@varsubsetneq");w(S,$,P,"⫋","\\subsetneqq",!0);w(S,$,P,"","\\@varsubsetneqq");w(S,$,P,"≯","\\ngtr",!0);w(S,$,P,"","\\@ngeqslant");w(S,$,P,"","\\@ngeqq");w(S,$,P,"⪈","\\gneq",!0);w(S,$,P,"≩","\\gneqq",!0);w(S,$,P,"","\\@gvertneqq");w(S,$,P,"⋧","\\gnsim",!0);w(S,$,P,"⪊","\\gnapprox",!0);w(S,$,P,"⊁","\\nsucc",!0);w(S,$,P,"⋡","\\nsucceq",!0);w(S,$,P,"⋩","\\succnsim",!0);w(S,$,P,"⪺","\\succnapprox",!0);w(S,$,P,"≆","\\ncong",!0);w(S,$,P,"","\\@nshortparallel");w(S,$,P,"∦","\\nparallel",!0);w(S,$,P,"⊯","\\nVDash",!0);w(S,$,P,"⋫","\\ntriangleright");w(S,$,P,"⋭","\\ntrianglerighteq",!0);w(S,$,P,"","\\@nsupseteqq");w(S,$,P,"⊋","\\supsetneq",!0);w(S,$,P,"","\\@varsupsetneq");w(S,$,P,"⫌","\\supsetneqq",!0);w(S,$,P,"","\\@varsupsetneqq");w(S,$,P,"⊮","\\nVdash",!0);w(S,$,P,"⪵","\\precneqq",!0);w(S,$,P,"⪶","\\succneqq",!0);w(S,$,P,"","\\@nsubseteqq");w(S,$,He,"⊴","\\unlhd");w(S,$,He,"⊵","\\unrhd");w(S,$,P,"↚","\\nleftarrow",!0);w(S,$,P,"↛","\\nrightarrow",!0);w(S,$,P,"⇍","\\nLeftarrow",!0);w(S,$,P,"⇏","\\nRightarrow",!0);w(S,$,P,"↮","\\nleftrightarrow",!0);w(S,$,P,"⇎","\\nLeftrightarrow",!0);w(S,$,P,"△","\\vartriangle");w(S,$,X,"ℏ","\\hslash");w(S,$,X,"▽","\\triangledown");w(S,$,X,"◊","\\lozenge");w(S,$,X,"Ⓢ","\\circledS");w(S,$,X,"®","\\circledR");w(xe,$,X,"®","\\circledR");w(S,$,X,"∡","\\measuredangle",!0);w(S,$,X,"∄","\\nexists");w(S,$,X,"℧","\\mho");w(S,$,X,"Ⅎ","\\Finv",!0);w(S,$,X,"⅁","\\Game",!0);w(S,$,X,"‵","\\backprime");w(S,$,X,"▲","\\blacktriangle");w(S,$,X,"▼","\\blacktriangledown");w(S,$,X,"■","\\blacksquare");w(S,$,X,"⧫","\\blacklozenge");w(S,$,X,"★","\\bigstar");w(S,$,X,"∢","\\sphericalangle",!0);w(S,$,X,"∁","\\complement",!0);w(S,$,X,"ð","\\eth",!0);w(xe,A,X,"ð","ð");w(S,$,X,"╱","\\diagup");w(S,$,X,"╲","\\diagdown");w(S,$,X,"□","\\square");w(S,$,X,"□","\\Box");w(S,$,X,"◊","\\Diamond");w(S,$,X,"¥","\\yen",!0);w(xe,$,X,"¥","\\yen",!0);w(S,$,X,"✓","\\checkmark",!0);w(xe,$,X,"✓","\\checkmark");w(S,$,X,"ℶ","\\beth",!0);w(S,$,X,"ℸ","\\daleth",!0);w(S,$,X,"ℷ","\\gimel",!0);w(S,$,X,"ϝ","\\digamma",!0);w(S,$,X,"ϰ","\\varkappa");w(S,$,qr,"┌","\\@ulcorner",!0);w(S,$,ir,"┐","\\@urcorner",!0);w(S,$,qr,"└","\\@llcorner",!0);w(S,$,ir,"┘","\\@lrcorner",!0);w(S,$,P,"≦","\\leqq",!0);w(S,$,P,"⩽","\\leqslant",!0);w(S,$,P,"⪕","\\eqslantless",!0);w(S,$,P,"≲","\\lesssim",!0);w(S,$,P,"⪅","\\lessapprox",!0);w(S,$,P,"≊","\\approxeq",!0);w(S,$,He,"⋖","\\lessdot");w(S,$,P,"⋘","\\lll",!0);w(S,$,P,"≶","\\lessgtr",!0);w(S,$,P,"⋚","\\lesseqgtr",!0);w(S,$,P,"⪋","\\lesseqqgtr",!0);w(S,$,P,"≑","\\doteqdot");w(S,$,P,"≓","\\risingdotseq",!0);w(S,$,P,"≒","\\fallingdotseq",!0);w(S,$,P,"∽","\\backsim",!0);w(S,$,P,"⋍","\\backsimeq",!0);w(S,$,P,"⫅","\\subseteqq",!0);w(S,$,P,"⋐","\\Subset",!0);w(S,$,P,"⊏","\\sqsubset",!0);w(S,$,P,"≼","\\preccurlyeq",!0);w(S,$,P,"⋞","\\curlyeqprec",!0);w(S,$,P,"≾","\\precsim",!0);w(S,$,P,"⪷","\\precapprox",!0);w(S,$,P,"⊲","\\vartriangleleft");w(S,$,P,"⊴","\\trianglelefteq");w(S,$,P,"⊨","\\vDash",!0);w(S,$,P,"⊪","\\Vvdash",!0);w(S,$,P,"⌣","\\smallsmile");w(S,$,P,"⌢","\\smallfrown");w(S,$,P,"≏","\\bumpeq",!0);w(S,$,P,"≎","\\Bumpeq",!0);w(S,$,P,"≧","\\geqq",!0);w(S,$,P,"⩾","\\geqslant",!0);w(S,$,P,"⪖","\\eqslantgtr",!0);w(S,$,P,"≳","\\gtrsim",!0);w(S,$,P,"⪆","\\gtrapprox",!0);w(S,$,He,"⋗","\\gtrdot");w(S,$,P,"⋙","\\ggg",!0);w(S,$,P,"≷","\\gtrless",!0);w(S,$,P,"⋛","\\gtreqless",!0);w(S,$,P,"⪌","\\gtreqqless",!0);w(S,$,P,"≖","\\eqcirc",!0);w(S,$,P,"≗","\\circeq",!0);w(S,$,P,"≜","\\triangleq",!0);w(S,$,P,"∼","\\thicksim");w(S,$,P,"≈","\\thickapprox");w(S,$,P,"⫆","\\supseteqq",!0);w(S,$,P,"⋑","\\Supset",!0);w(S,$,P,"⊐","\\sqsupset",!0);w(S,$,P,"≽","\\succcurlyeq",!0);w(S,$,P,"⋟","\\curlyeqsucc",!0);w(S,$,P,"≿","\\succsim",!0);w(S,$,P,"⪸","\\succapprox",!0);w(S,$,P,"⊳","\\vartriangleright");w(S,$,P,"⊵","\\trianglerighteq");w(S,$,P,"⊩","\\Vdash",!0);w(S,$,P,"∣","\\shortmid");w(S,$,P,"∥","\\shortparallel");w(S,$,P,"≬","\\between",!0);w(S,$,P,"⋔","\\pitchfork",!0);w(S,$,P,"∝","\\varpropto");w(S,$,P,"◀","\\blacktriangleleft");w(S,$,P,"∴","\\therefore",!0);w(S,$,P,"∍","\\backepsilon");w(S,$,P,"▶","\\blacktriangleright");w(S,$,P,"∵","\\because",!0);w(S,$,P,"⋘","\\llless");w(S,$,P,"⋙","\\gggtr");w(S,$,He,"⊲","\\lhd");w(S,$,He,"⊳","\\rhd");w(S,$,P,"≂","\\eqsim",!0);w(S,A,P,"⋈","\\Join");w(S,$,P,"≑","\\Doteq",!0);w(S,$,He,"∔","\\dotplus",!0);w(S,$,He,"∖","\\smallsetminus");w(S,$,He,"⋒","\\Cap",!0);w(S,$,He,"⋓","\\Cup",!0);w(S,$,He,"⩞","\\doublebarwedge",!0);w(S,$,He,"⊟","\\boxminus",!0);w(S,$,He,"⊞","\\boxplus",!0);w(S,$,He,"⋇","\\divideontimes",!0);w(S,$,He,"⋉","\\ltimes",!0);w(S,$,He,"⋊","\\rtimes",!0);w(S,$,He,"⋋","\\leftthreetimes",!0);w(S,$,He,"⋌","\\rightthreetimes",!0);w(S,$,He,"⋏","\\curlywedge",!0);w(S,$,He,"⋎","\\curlyvee",!0);w(S,$,He,"⊝","\\circleddash",!0);w(S,$,He,"⊛","\\circledast",!0);w(S,$,He,"⋅","\\centerdot");w(S,$,He,"⊺","\\intercal",!0);w(S,$,He,"⋒","\\doublecap");w(S,$,He,"⋓","\\doublecup");w(S,$,He,"⊠","\\boxtimes",!0);w(S,$,P,"⇢","\\dashrightarrow",!0);w(S,$,P,"⇠","\\dashleftarrow",!0);w(S,$,P,"⇇","\\leftleftarrows",!0);w(S,$,P,"⇆","\\leftrightarrows",!0);w(S,$,P,"⇚","\\Lleftarrow",!0);w(S,$,P,"↞","\\twoheadleftarrow",!0);w(S,$,P,"↢","\\leftarrowtail",!0);w(S,$,P,"↫","\\looparrowleft",!0);w(S,$,P,"⇋","\\leftrightharpoons",!0);w(S,$,P,"↶","\\curvearrowleft",!0);w(S,$,P,"↺","\\circlearrowleft",!0);w(S,$,P,"↰","\\Lsh",!0);w(S,$,P,"⇈","\\upuparrows",!0);w(S,$,P,"↿","\\upharpoonleft",!0);w(S,$,P,"⇃","\\downharpoonleft",!0);w(S,A,P,"⊶","\\origof",!0);w(S,A,P,"⊷","\\imageof",!0);w(S,$,P,"⊸","\\multimap",!0);w(S,$,P,"↭","\\leftrightsquigarrow",!0);w(S,$,P,"⇉","\\rightrightarrows",!0);w(S,$,P,"⇄","\\rightleftarrows",!0);w(S,$,P,"↠","\\twoheadrightarrow",!0);w(S,$,P,"↣","\\rightarrowtail",!0);w(S,$,P,"↬","\\looparrowright",!0);w(S,$,P,"↷","\\curvearrowright",!0);w(S,$,P,"↻","\\circlearrowright",!0);w(S,$,P,"↱","\\Rsh",!0);w(S,$,P,"⇊","\\downdownarrows",!0);w(S,$,P,"↾","\\upharpoonright",!0);w(S,$,P,"⇂","\\downharpoonright",!0);w(S,$,P,"⇝","\\rightsquigarrow",!0);w(S,$,P,"⇝","\\leadsto");w(S,$,P,"⇛","\\Rrightarrow",!0);w(S,$,P,"↾","\\restriction");w(S,A,X,"‘","`");w(S,A,X,"$","\\$");w(xe,A,X,"$","\\$");w(xe,A,X,"$","\\textdollar");w(S,A,X,"%","\\%");w(xe,A,X,"%","\\%");w(S,A,X,"_","\\_");w(xe,A,X,"_","\\_");w(xe,A,X,"_","\\textunderscore");w(S,A,X,"∠","\\angle",!0);w(S,A,X,"∞","\\infty",!0);w(S,A,X,"′","\\prime");w(S,A,X,"△","\\triangle");w(S,A,X,"Γ","\\Gamma",!0);w(S,A,X,"Δ","\\Delta",!0);w(S,A,X,"Θ","\\Theta",!0);w(S,A,X,"Λ","\\Lambda",!0);w(S,A,X,"Ξ","\\Xi",!0);w(S,A,X,"Π","\\Pi",!0);w(S,A,X,"Σ","\\Sigma",!0);w(S,A,X,"Υ","\\Upsilon",!0);w(S,A,X,"Φ","\\Phi",!0);w(S,A,X,"Ψ","\\Psi",!0);w(S,A,X,"Ω","\\Omega",!0);w(S,A,X,"A","Α");w(S,A,X,"B","Β");w(S,A,X,"E","Ε");w(S,A,X,"Z","Ζ");w(S,A,X,"H","Η");w(S,A,X,"I","Ι");w(S,A,X,"K","Κ");w(S,A,X,"M","Μ");w(S,A,X,"N","Ν");w(S,A,X,"O","Ο");w(S,A,X,"P","Ρ");w(S,A,X,"T","Τ");w(S,A,X,"X","Χ");w(S,A,X,"¬","\\neg",!0);w(S,A,X,"¬","\\lnot");w(S,A,X,"⊤","\\top");w(S,A,X,"⊥","\\bot");w(S,A,X,"∅","\\emptyset");w(S,$,X,"∅","\\varnothing");w(S,A,et,"α","\\alpha",!0);w(S,A,et,"β","\\beta",!0);w(S,A,et,"γ","\\gamma",!0);w(S,A,et,"δ","\\delta",!0);w(S,A,et,"ϵ","\\epsilon",!0);w(S,A,et,"ζ","\\zeta",!0);w(S,A,et,"η","\\eta",!0);w(S,A,et,"θ","\\theta",!0);w(S,A,et,"ι","\\iota",!0);w(S,A,et,"κ","\\kappa",!0);w(S,A,et,"λ","\\lambda",!0);w(S,A,et,"μ","\\mu",!0);w(S,A,et,"ν","\\nu",!0);w(S,A,et,"ξ","\\xi",!0);w(S,A,et,"ο","\\omicron",!0);w(S,A,et,"π","\\pi",!0);w(S,A,et,"ρ","\\rho",!0);w(S,A,et,"σ","\\sigma",!0);w(S,A,et,"τ","\\tau",!0);w(S,A,et,"υ","\\upsilon",!0);w(S,A,et,"ϕ","\\phi",!0);w(S,A,et,"χ","\\chi",!0);w(S,A,et,"ψ","\\psi",!0);w(S,A,et,"ω","\\omega",!0);w(S,A,et,"ε","\\varepsilon",!0);w(S,A,et,"ϑ","\\vartheta",!0);w(S,A,et,"ϖ","\\varpi",!0);w(S,A,et,"ϱ","\\varrho",!0);w(S,A,et,"ς","\\varsigma",!0);w(S,A,et,"φ","\\varphi",!0);w(S,A,He,"∗","*",!0);w(S,A,He,"+","+");w(S,A,He,"−","-",!0);w(S,A,He,"⋅","\\cdot",!0);w(S,A,He,"∘","\\circ",!0);w(S,A,He,"÷","\\div",!0);w(S,A,He,"±","\\pm",!0);w(S,A,He,"×","\\times",!0);w(S,A,He,"∩","\\cap",!0);w(S,A,He,"∪","\\cup",!0);w(S,A,He,"∖","\\setminus",!0);w(S,A,He,"∧","\\land");w(S,A,He,"∨","\\lor");w(S,A,He,"∧","\\wedge",!0);w(S,A,He,"∨","\\vee",!0);w(S,A,X,"√","\\surd");w(S,A,qr,"⟨","\\langle",!0);w(S,A,qr,"∣","\\lvert");w(S,A,qr,"∥","\\lVert");w(S,A,ir,"?","?");w(S,A,ir,"!","!");w(S,A,ir,"⟩","\\rangle",!0);w(S,A,ir,"∣","\\rvert");w(S,A,ir,"∥","\\rVert");w(S,A,P,"=","=");w(S,A,P,":",":");w(S,A,P,"≈","\\approx",!0);w(S,A,P,"≅","\\cong",!0);w(S,A,P,"≥","\\ge");w(S,A,P,"≥","\\geq",!0);w(S,A,P,"←","\\gets");w(S,A,P,">","\\gt",!0);w(S,A,P,"∈","\\in",!0);w(S,A,P,"","\\@not");w(S,A,P,"⊂","\\subset",!0);w(S,A,P,"⊃","\\supset",!0);w(S,A,P,"⊆","\\subseteq",!0);w(S,A,P,"⊇","\\supseteq",!0);w(S,$,P,"⊈","\\nsubseteq",!0);w(S,$,P,"⊉","\\nsupseteq",!0);w(S,A,P,"⊨","\\models");w(S,A,P,"←","\\leftarrow",!0);w(S,A,P,"≤","\\le");w(S,A,P,"≤","\\leq",!0);w(S,A,P,"<","\\lt",!0);w(S,A,P,"→","\\rightarrow",!0);w(S,A,P,"→","\\to");w(S,$,P,"≱","\\ngeq",!0);w(S,$,P,"≰","\\nleq",!0);w(S,A,Fi," ","\\ ");w(S,A,Fi," ","\\space");w(S,A,Fi," ","\\nobreakspace");w(xe,A,Fi," ","\\ ");w(xe,A,Fi," "," ");w(xe,A,Fi," ","\\space");w(xe,A,Fi," ","\\nobreakspace");w(S,A,Fi,"","\\nobreak");w(S,A,Fi,"","\\allowbreak");w(S,A,a0,",",",");w(S,A,a0,";",";");w(S,$,He,"⊼","\\barwedge",!0);w(S,$,He,"⊻","\\veebar",!0);w(S,A,He,"⊙","\\odot",!0);w(S,A,He,"⊕","\\oplus",!0);w(S,A,He,"⊗","\\otimes",!0);w(S,A,X,"∂","\\partial",!0);w(S,A,He,"⊘","\\oslash",!0);w(S,$,He,"⊚","\\circledcirc",!0);w(S,$,He,"⊡","\\boxdot",!0);w(S,A,He,"△","\\bigtriangleup");w(S,A,He,"▽","\\bigtriangledown");w(S,A,He,"†","\\dagger");w(S,A,He,"⋄","\\diamond");w(S,A,He,"⋆","\\star");w(S,A,He,"◃","\\triangleleft");w(S,A,He,"▹","\\triangleright");w(S,A,qr,"{","\\{");w(xe,A,X,"{","\\{");w(xe,A,X,"{","\\textbraceleft");w(S,A,ir,"}","\\}");w(xe,A,X,"}","\\}");w(xe,A,X,"}","\\textbraceright");w(S,A,qr,"{","\\lbrace");w(S,A,ir,"}","\\rbrace");w(S,A,qr,"[","\\lbrack",!0);w(xe,A,X,"[","\\lbrack",!0);w(S,A,ir,"]","\\rbrack",!0);w(xe,A,X,"]","\\rbrack",!0);w(S,A,qr,"(","\\lparen",!0);w(S,A,ir,")","\\rparen",!0);w(xe,A,X,"<","\\textless",!0);w(xe,A,X,">","\\textgreater",!0);w(S,A,qr,"⌊","\\lfloor",!0);w(S,A,ir,"⌋","\\rfloor",!0);w(S,A,qr,"⌈","\\lceil",!0);w(S,A,ir,"⌉","\\rceil",!0);w(S,A,X,"\\","\\backslash");w(S,A,X,"∣","|");w(S,A,X,"∣","\\vert");w(xe,A,X,"|","\\textbar",!0);w(S,A,X,"∥","\\|");w(S,A,X,"∥","\\Vert");w(xe,A,X,"∥","\\textbardbl");w(xe,A,X,"~","\\textasciitilde");w(xe,A,X,"\\","\\textbackslash");w(xe,A,X,"^","\\textasciicircum");w(S,A,P,"↑","\\uparrow",!0);w(S,A,P,"⇑","\\Uparrow",!0);w(S,A,P,"↓","\\downarrow",!0);w(S,A,P,"⇓","\\Downarrow",!0);w(S,A,P,"↕","\\updownarrow",!0);w(S,A,P,"⇕","\\Updownarrow",!0);w(S,A,Tn,"∐","\\coprod");w(S,A,Tn,"⋁","\\bigvee");w(S,A,Tn,"⋀","\\bigwedge");w(S,A,Tn,"⨄","\\biguplus");w(S,A,Tn,"⋂","\\bigcap");w(S,A,Tn,"⋃","\\bigcup");w(S,A,Tn,"∫","\\int");w(S,A,Tn,"∫","\\intop");w(S,A,Tn,"∬","\\iint");w(S,A,Tn,"∭","\\iiint");w(S,A,Tn,"∏","\\prod");w(S,A,Tn,"∑","\\sum");w(S,A,Tn,"⨂","\\bigotimes");w(S,A,Tn,"⨁","\\bigoplus");w(S,A,Tn,"⨀","\\bigodot");w(S,A,Tn,"∮","\\oint");w(S,A,Tn,"∯","\\oiint");w(S,A,Tn,"∰","\\oiiint");w(S,A,Tn,"⨆","\\bigsqcup");w(S,A,Tn,"∫","\\smallint");w(xe,A,yu,"…","\\textellipsis");w(S,A,yu,"…","\\mathellipsis");w(xe,A,yu,"…","\\ldots",!0);w(S,A,yu,"…","\\ldots",!0);w(S,A,yu,"⋯","\\@cdots",!0);w(S,A,yu,"⋱","\\ddots",!0);w(S,A,X,"⋮","\\varvdots");w(xe,A,X,"⋮","\\varvdots");w(S,A,en,"ˊ","\\acute");w(S,A,en,"ˋ","\\grave");w(S,A,en,"¨","\\ddot");w(S,A,en,"~","\\tilde");w(S,A,en,"ˉ","\\bar");w(S,A,en,"˘","\\breve");w(S,A,en,"ˇ","\\check");w(S,A,en,"^","\\hat");w(S,A,en,"⃗","\\vec");w(S,A,en,"˙","\\dot");w(S,A,en,"˚","\\mathring");w(S,A,et,"","\\@imath");w(S,A,et,"","\\@jmath");w(S,A,X,"ı","ı");w(S,A,X,"ȷ","ȷ");w(xe,A,X,"ı","\\i",!0);w(xe,A,X,"ȷ","\\j",!0);w(xe,A,X,"ß","\\ss",!0);w(xe,A,X,"æ","\\ae",!0);w(xe,A,X,"œ","\\oe",!0);w(xe,A,X,"ø","\\o",!0);w(xe,A,X,"Æ","\\AE",!0);w(xe,A,X,"Œ","\\OE",!0);w(xe,A,X,"Ø","\\O",!0);w(xe,A,en,"ˊ","\\'");w(xe,A,en,"ˋ","\\`");w(xe,A,en,"ˆ","\\^");w(xe,A,en,"˜","\\~");w(xe,A,en,"ˉ","\\=");w(xe,A,en,"˘","\\u");w(xe,A,en,"˙","\\.");w(xe,A,en,"¸","\\c");w(xe,A,en,"˚","\\r");w(xe,A,en,"ˇ","\\v");w(xe,A,en,"¨",'\\"');w(xe,A,en,"˝","\\H");w(xe,A,en,"◯","\\textcircled");var F6={"--":!0,"---":!0,"``":!0,"''":!0};w(xe,A,X,"–","--",!0);w(xe,A,X,"–","\\textendash");w(xe,A,X,"—","---",!0);w(xe,A,X,"—","\\textemdash");w(xe,A,X,"‘","`",!0);w(xe,A,X,"‘","\\textquoteleft");w(xe,A,X,"’","'",!0);w(xe,A,X,"’","\\textquoteright");w(xe,A,X,"“","``",!0);w(xe,A,X,"“","\\textquotedblleft");w(xe,A,X,"”","''",!0);w(xe,A,X,"”","\\textquotedblright");w(S,A,X,"°","\\degree",!0);w(xe,A,X,"°","\\degree");w(xe,A,X,"°","\\textdegree",!0);w(S,A,X,"£","\\pounds");w(S,A,X,"£","\\mathsterling",!0);w(xe,A,X,"£","\\pounds");w(xe,A,X,"£","\\textsterling",!0);w(S,$,X,"✠","\\maltese");w(xe,$,X,"✠","\\maltese");var Uy='0123456789/@."';for(var Rm=0;Rm<Uy.length;Rm++){var Hy=Uy.charAt(Rm);w(S,A,X,Hy,Hy)}var $y='0123456789!@*()-=+";:?/.,';for(var Om=0;Om<$y.length;Om++){var Fy=$y.charAt(Om);w(xe,A,X,Fy,Fy)}var sf="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(var _m=0;_m<sf.length;_m++){var Md=sf.charAt(_m);w(S,A,et,Md,Md),w(xe,A,X,Md,Md)}w(S,$,X,"C","ℂ");w(xe,$,X,"C","ℂ");w(S,$,X,"H","ℍ");w(xe,$,X,"H","ℍ");w(S,$,X,"N","ℕ");w(xe,$,X,"N","ℕ");w(S,$,X,"P","ℙ");w(xe,$,X,"P","ℙ");w(S,$,X,"Q","ℚ");w(xe,$,X,"Q","ℚ");w(S,$,X,"R","ℝ");w(xe,$,X,"R","ℝ");w(S,$,X,"Z","ℤ");w(xe,$,X,"Z","ℤ");w(S,A,et,"h","ℎ");w(xe,A,et,"h","ℎ");var at;for(var tr=0;tr<sf.length;tr++){var mn=sf.charAt(tr);at=String.fromCharCode(55349,56320+tr),w(S,A,et,mn,at),w(xe,A,X,mn,at),at=String.fromCharCode(55349,56372+tr),w(S,A,et,mn,at),w(xe,A,X,mn,at),at=String.fromCharCode(55349,56424+tr),w(S,A,et,mn,at),w(xe,A,X,mn,at),at=String.fromCharCode(55349,56580+tr),w(S,A,et,mn,at),w(xe,A,X,mn,at),at=String.fromCharCode(55349,56684+tr),w(S,A,et,mn,at),w(xe,A,X,mn,at),at=String.fromCharCode(55349,56736+tr),w(S,A,et,mn,at),w(xe,A,X,mn,at),at=String.fromCharCode(55349,56788+tr),w(S,A,et,mn,at),w(xe,A,X,mn,at),at=String.fromCharCode(55349,56840+tr),w(S,A,et,mn,at),w(xe,A,X,mn,at),at=String.fromCharCode(55349,56944+tr),w(S,A,et,mn,at),w(xe,A,X,mn,at),tr<26&&(at=String.fromCharCode(55349,56632+tr),w(S,A,et,mn,at),w(xe,A,X,mn,at),at=String.fromCharCode(55349,56476+tr),w(S,A,et,mn,at),w(xe,A,X,mn,at))}at="𝕜";w(S,A,et,"k",at);w(xe,A,X,"k",at);for(var qs=0;qs<10;qs++){var Pl=qs.toString();at=String.fromCharCode(55349,57294+qs),w(S,A,et,Pl,at),w(xe,A,X,Pl,at),at=String.fromCharCode(55349,57314+qs),w(S,A,et,Pl,at),w(xe,A,X,Pl,at),at=String.fromCharCode(55349,57324+qs),w(S,A,et,Pl,at),w(xe,A,X,Pl,at),at=String.fromCharCode(55349,57334+qs),w(S,A,et,Pl,at),w(xe,A,X,Pl,at)}var Ap="ÐÞþ";for(var Im=0;Im<Ap.length;Im++){var zd=Ap.charAt(Im);w(S,A,et,zd,zd),w(xe,A,X,zd,zd)}var Ep={mathClass:"mathbf",textClass:"textbf",font:"Main-Bold"},Py={mathClass:"mathnormal",textClass:"textit",font:"Math-Italic"},Gy={mathClass:"boldsymbol",textClass:"boldsymbol",font:"Main-BoldItalic"},Nj={mathClass:"mathscr",textClass:"textscr",font:"Script-Regular"},Fs={mathClass:"",textClass:"",font:""},Vy={mathClass:"mathfrak",textClass:"textfrak",font:"Fraktur-Regular"},Yy={mathClass:"mathbb",textClass:"textbb",font:"AMS-Regular"},Wy={mathClass:"mathboldfrak",textClass:"textboldfrak",font:"Fraktur-Regular"},Np={mathClass:"mathsf",textClass:"textsf",font:"SansSerif-Regular"},Mp={mathClass:"mathboldsf",textClass:"textboldsf",font:"SansSerif-Bold"},Ky={mathClass:"mathitsf",textClass:"textitsf",font:"SansSerif-Italic"},zp={mathClass:"mathtt",textClass:"texttt",font:"Typewriter-Regular"},Xy=[Ep,Ep,Py,Py,Gy,Gy,Nj,Fs,Fs,Fs,Vy,Vy,Yy,Yy,Wy,Wy,Np,Np,Mp,Mp,Ky,Ky,Fs,Fs,zp,zp],Mj=[Ep,Fs,Np,Mp,zp],zj=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 Xy[l]}else if(120782<=a&&a<=120831){var o=Math.floor((a-120782)/10);return Mj[o]}else{if(a===120485||a===120486)return Xy[0];if(120486<a&&a<120782)return Fs;throw new je("Unsupported character: "+e)}},wf=function(t,n,a){if(Jt[a][t]){var l=Jt[a][t].replace;l&&(t=l)}return{value:t,metrics:T1(t,n,a)}},nr=function(t,n,a,l,o){var c=wf(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 Lr(t,f.height,f.depth,m,f.skew,f.width,o)}else typeof console<"u"&&console.warn("No character metrics "+("for '"+t+"' in style '"+n+"' and mode '"+a+"'")),h=new Lr(t,0,0,0,0,0,o);if(l){h.maxFontSize=l.sizeMultiplier,l.style.isTight()&&h.classes.push("mtight");var y=l.getColor();y&&(h.style.color=y)}return h},A1=function(t,n,a,l){return l===void 0&&(l=[]),a.font==="boldsymbol"&&wf(t,"Main-Bold",n).metrics?nr(t,"Main-Bold",n,a,l.concat(["mathbf"])):t==="\\"||Jt[n][t].font==="main"?nr(t,"Main-Regular",n,a,l):nr(t,"AMS-Regular",n,a,l.concat(["amsrm"]))},Dj=function(t,n,a){return a!=="textord"&&wf(t,"Math-BoldItalic",n).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},kf=function(t,n,a){var l=t.mode,o=t.text,c=["mord"],{font:f,fontFamily:h,fontWeight:m,fontShape:y}=n,v=l==="math"||l==="text"&&!!f,k=v?f:h,b="",T="";if(o.charCodeAt(0)===55349){var N=zj(o);b=N.font,T=N[l+"Class"]}if(b)return nr(o,b,l,n,c.concat(T));if(k){var U,D;if(k==="boldsymbol"){var M=Dj(o,l,a);U=M.fontName,D=[M.fontClass]}else v?(U=Dp[f].fontName,D=[f]):(U=Dd(h,m,y),D=[h,m,y]);if(wf(o,U,l).metrics)return nr(o,U,l,n,c.concat(D));if(F6.hasOwnProperty(o)&&U.slice(0,10)==="Typewriter"){for(var L=[],G=0;G<o.length;G++)L.push(nr(o[G],U,l,n,c.concat(D)));return Pi(L)}}if(a==="mathord")return nr(o,"Math-Italic",l,n,c.concat(["mathnormal"]));if(a==="textord"){var te=Jt[l][o]&&Jt[l][o].font;if(te==="ams"){var _=Dd("amsrm",m,y);return nr(o,_,l,n,c.concat("amsrm",m,y))}else if(te==="main"||!te){var W=Dd("textrm",m,y);return nr(o,W,l,n,c.concat(m,y))}else{var ae=Dd(te,m,y);return nr(o,ae,l,n,c.concat(ae,m,y))}}else throw new Error("unexpected type: "+a+" in makeOrd")},Rj=(e,t)=>{if(Wl(e.classes)!==Wl(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},P6=e=>{for(var t=0;t<e.length-1;t++){var n=e[t],a=e[t+1];n instanceof Lr&&a instanceof Lr&&Rj(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},E1=function(t){for(var n=0,a=0,l=0,o=0;o<t.children.length;o++){var c=t.children[o];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},Ce=function(t,n,a,l){var o=new gu(t,n,a,l);return E1(o),o},Xl=(e,t,n,a)=>new gu(e,t,n,a),cu=function(t,n,a){var l=Ce([t],[],n);return l.height=Math.max(a||n.fontMetrics().defaultRuleThickness,n.minRuleThickness),l.style.borderBottomWidth=ze(l.height),l.maxFontSize=1,l},Oj=function(t,n,a,l){var o=new bf(t,n,a,l);return E1(o),o},Pi=function(t){var n=new pu(t);return E1(n),n},du=function(t,n){return t instanceof pu?Ce([],[t],n):t},_j=function(t){if(t.positionType==="individualShift"){for(var n=t.children,a=[n[0]],l=-n[0].shift-n[0].elem.depth,o=l,c=1;c<n.length;c++){var f=-n[c].shift-o-n[c].elem.depth,h=f-(n[c-1].elem.height+n[c-1].elem.depth);o=o+f,a.push({type:"kern",size:h}),a.push(n[c])}return{children:a,depth:l}}var m;if(t.positionType==="top"){for(var y=t.positionData,v=0;v<t.children.length;v++){var k=t.children[v];y-=k.type==="kern"?k.size:k.elem.height+k.elem.depth}m=y}else if(t.positionType==="bottom")m=-t.positionData;else{var b=t.children[0];if(b.type!=="elem")throw new Error('First child must have type "elem".');if(t.positionType==="shift")m=-b.elem.depth-t.positionData;else if(t.positionType==="firstBaseline")m=-b.elem.depth;else throw new Error("Invalid positionType "+t.positionType+".")}return{children:t.children,depth:m}},Rt=function(t,n){for(var{children:a,depth:l}=_j(t),o=0,c=0;c<a.length;c++){var f=a[c];if(f.type==="elem"){var h=f.elem;o=Math.max(o,h.maxFontSize,h.height)}}o+=2;var m=Ce(["pstrut"],[]);m.style.height=ze(o);for(var y=[],v=l,k=l,b=l,T=0;T<a.length;T++){var N=a[T];if(N.type==="kern")b+=N.size;else{var U=N.elem,D=N.wrapperClasses||[],M=N.wrapperStyle||{},L=Ce(D,[m,U],void 0,M);L.style.top=ze(-o-b-U.depth),N.marginLeft&&(L.style.marginLeft=N.marginLeft),N.marginRight&&(L.style.marginRight=N.marginRight),y.push(L),b+=U.height+U.depth}v=Math.min(v,b),k=Math.max(k,b)}var G=Ce(["vlist"],y);G.style.height=ze(k);var te;if(v<0){var _=Ce([],[]),W=Ce(["vlist"],[_]);W.style.height=ze(-v);var ae=Ce(["vlist-s"],[new Lr("")]);te=[Ce(["vlist-r"],[G,ae]),Ce(["vlist-r"],[W])]}else te=[Ce(["vlist-r"],[G])];var Q=Ce(["vlist-t"],te);return te.length===2&&Q.classes.push("vlist-t2"),Q.height=k,Q.depth=-v,Q},G6=(e,t)=>{var n=Ce(["mspace"],[],t),a=ln(e,t);return n.style.marginRight=ze(a),n},Dd=(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},Dp={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"}},V6={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Y6=function(t,n){var[a,l,o]=V6[t],c=new Kl(a),f=new Ui([c],{width:ze(l),height:ze(o),style:"width:"+ze(l),viewBox:"0 0 "+1e3*l+" "+1e3*o,preserveAspectRatio:"xMinYMin"}),h=Xl(["overlay"],[f],n);return h.height=o,h.style.height=ze(o),h.style.width=ze(l),h},an={number:3,unit:"mu"},Us={number:4,unit:"mu"},Bi={number:5,unit:"mu"},Ij={mord:{mop:an,mbin:Us,mrel:Bi,minner:an},mop:{mord:an,mop:an,mrel:Bi,minner:an},mbin:{mord:Us,mop:Us,mopen:Us,minner:Us},mrel:{mord:Bi,mop:Bi,mopen:Bi,minner:Bi},mopen:{},mclose:{mop:an,mbin:Us,mrel:Bi,minner:an},mpunct:{mord:an,mop:an,mrel:Bi,mopen:an,mclose:an,mpunct:an,minner:an},minner:{mord:an,mop:an,mbin:Us,mrel:Bi,mopen:an,mpunct:an,minner:an}},Bj={mord:{mop:an},mop:{mord:an,mop:an},mbin:{},mrel:{},mopen:{},mclose:{mop:an},mpunct:{},minner:{mop:an}},W6={},of={},uf={};function Ie(e){for(var{type:t,names:n,props:a,handler:l,htmlBuilder:o,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)W6[n[h]]=f;t&&(o&&(of[t]=o),c&&(uf[t]=c))}function eo(e){var{type:t,htmlBuilder:n,mathmlBuilder:a}=e;Ie({type:t,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:n,mathmlBuilder:a})}var cf=function(t){return t.type==="ordgroup"&&t.body.length===1?t.body[0]:t},Cn=function(t){return t.type==="ordgroup"?t.body:[t]},Lj=new Set(["leftmost","mbin","mopen","mrel","mop","mpunct"]),qj=new Set(["rightmost","mrel","mclose","mpunct"]),Uj={display:lt.DISPLAY,text:lt.TEXT,script:lt.SCRIPT,scriptscript:lt.SCRIPTSCRIPT},Hj={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},zn=function(t,n,a,l){l===void 0&&(l=[null,null]);for(var o=[],c=0;c<t.length;c++){var f=Ot(t[c],n);if(f instanceof pu){var h=f.children;o.push(...h)}else o.push(f)}if(P6(o),!a)return o;var m=n;if(t.length===1){var y=t[0];y.type==="sizing"?m=n.havingSize(y.size):y.type==="styling"&&(m=n.havingStyle(Uj[y.style]))}var v=Ce([l[0]||"leftmost"],[],n),k=Ce([l[1]||"rightmost"],[],n),b=a==="root";return Rp(o,(T,N)=>{var U=N.classes[0],D=T.classes[0];U==="mbin"&&qj.has(D)?N.classes[0]="mord":D==="mbin"&&Lj.has(U)&&(T.classes[0]="mord")},{node:v},k,b),Rp(o,(T,N)=>{var U,D,M=_p(N),L=_p(T),G=M&&L?T.hasClass("mtight")?(U=Bj[M])==null?void 0:U[L]:(D=Ij[M])==null?void 0:D[L]:null;if(G)return G6(G,m)},{node:v},k,b),o},Rp=function(t,n,a,l,o){l&&t.push(l);for(var c=0;c<t.length;c++){var f=t[c],h=K6(f);if(h){Rp(h.children,n,a,null,o);continue}var m=!f.hasClass("mspace");if(m){var y=n(f,a.node);y&&(a.insertAfter?a.insertAfter(y):(t.unshift(y),c++))}m?a.node=f:o&&f.hasClass("newline")&&(a.node=Ce(["leftmost"])),a.insertAfter=(v=>k=>{t.splice(v+1,0,k),c++})(c)}l&&t.pop()},K6=function(t){return t instanceof pu||t instanceof bf||t instanceof gu&&t.hasClass("enclosing")?t:null},Op=function(t,n){var a=K6(t);if(a){var l=a.children;if(l.length){if(n==="right")return Op(l[l.length-1],"right");if(n==="left")return Op(l[0],"left")}}return t},_p=function(t,n){if(!t)return null;n&&(t=Op(t,n));var a=t.classes[0];return Hj[a]||null},Zc=function(t,n){var a=["nulldelimiter"].concat(t.baseSizingClasses());return Ce(n.concat(a))},Ot=function(t,n,a){if(!t)return Ce();if(of[t.type]){var l=of[t.type](t,n);if(a&&n.size!==a.size){l=Ce(n.sizingClasses(a),[l],n);var o=n.sizeMultiplier/a.sizeMultiplier;l.height*=o,l.depth*=o}return l}else throw new je("Got group of unknown type: '"+t.type+"'")};function Rd(e,t){var n=Ce(["base"],e,t),a=Ce(["strut"]);return a.style.height=ze(n.height+n.depth),n.depth&&(a.style.verticalAlign=ze(-n.depth)),n.children.unshift(a),n}function Ip(e,t){var n=null;e.length===1&&e[0].type==="tag"&&(n=e[0].tag,e=e[0].body);var a=zn(e,t,"root"),l;a.length===2&&a[1].hasClass("tag")&&(l=a.pop());for(var o=[],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||(o.push(Rd(c,t)),c=[])}else a[f].hasClass("newline")&&(c.pop(),c.length>0&&(o.push(Rd(c,t)),c=[]),o.push(a[f]));c.length>0&&o.push(Rd(c,t));var m;n?(m=Rd(zn(n,t,!0),t),m.classes=["tag"],o.push(m)):l&&o.push(l);var y=Ce(["katex-html"],o);if(y.setAttribute("aria-hidden","true"),m){var v=m.children[0];v.style.height=ze(y.height+y.depth),y.depth&&(v.style.verticalAlign=ze(-y.depth))}return y}function X6(e){return new pu(e)}class Ne{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=Wl(this.classes));for(var a=0;a<this.children.length;a++)if(this.children[a]instanceof jn&&this.children[a+1]instanceof jn){for(var l=this.children[a].toText()+this.children[++a].toText();this.children[a+1]instanceof jn;)l+=this.children[++a].toText();t.appendChild(new jn(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+=Yn(this.attributes[n]),t+='"');this.classes.length>0&&(t+=' class ="'+Yn(Wl(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 jn{constructor(t){this.text=void 0,this.text=t}toNode(){return document.createTextNode(this.text)}toMarkup(){return Yn(this.toText())}toText(){return this.text}}class Q6{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",ze(this.width)),t}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+ze(this.width)+'"/>'}toText(){return this.character?this.character:" "}}var $j=new Set(["\\imath","\\jmath"]),Fj=new Set(["mrow","mtable"]),aa=function(t,n,a){return Jt[n][t]&&Jt[n][t].replace&&t.charCodeAt(0)!==55349&&!(F6.hasOwnProperty(t)&&a&&(a.fontFamily&&a.fontFamily.slice(4,6)==="tt"||a.font&&a.font.slice(4,6)==="tt"))&&(t=Jt[n][t].replace),new jn(t)},N1=function(t){return t.length===1?t[0]:new Ne("mrow",t)},Pj={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"},M1=(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=Pj[n];if(l)return typeof l=="function"?l(e):l;var o=e.text;if($j.has(o))return null;if(Jt[a][o]){var c=Jt[a][o].replace;c&&(o=c)}var f=Dp[n].fontName;return T1(o,f,a)?Dp[n].variant:null};function Bm(e){if(!e)return!1;if(e.type==="mi"&&e.children.length===1){var t=e.children[0];return t instanceof jn&&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 jn&&n.text===","}else return!1}var Ur=function(t,n,a){if(t.length===1){var l=Wt(t[0],n);return a&&l instanceof Ne&&l.type==="mo"&&(l.setAttribute("lspace","0em"),l.setAttribute("rspace","0em")),[l]}for(var o=[],c,f=0;f<t.length;f++){var h=Wt(t[f],n);if(h instanceof Ne&&c instanceof Ne){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(Bm(h)&&c.type==="mn"){c.children.push(...h.children);continue}else if(h.type==="mn"&&Bm(c))h.children=[...c.children,...h.children],o.pop();else if((h.type==="msup"||h.type==="msub")&&h.children.length>=1&&(c.type==="mn"||Bm(c))){var m=h.children[0];m instanceof Ne&&m.type==="mn"&&(m.children=[...c.children,...m.children],o.pop())}else if(c.type==="mi"&&c.children.length===1){var y=c.children[0];if(y instanceof jn&&y.text==="̸"&&(h.type==="mo"||h.type==="mi"||h.type==="mn")){var v=h.children[0];v instanceof jn&&v.text.length>0&&(v.text=v.text.slice(0,1)+"̸"+v.text.slice(1),o.pop())}}}o.push(h),c=h}return o},Ql=function(t,n,a){return N1(Ur(t,n,a))},Wt=function(t,n){if(!t)return new Ne("mrow");if(uf[t.type])return uf[t.type](t,n);throw new je("Got group of unknown type: '"+t.type+"'")};function Qy(e,t,n,a,l){var o=Ur(e,n),c;o.length===1&&o[0]instanceof Ne&&Fj.has(o[0].type)?c=o[0]:c=new Ne("mrow",o);var f=new Ne("annotation",[new jn(t)]);f.setAttribute("encoding","application/x-tex");var h=new Ne("semantics",[c,f]),m=new Ne("math",[h]);m.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),a&&m.setAttribute("display","block");var y=l?"katex":"katex-mathml";return Ce([y],[m])}var Gj=[[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]],Zy=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Jy=function(t,n){return n.size<2?t:Gj[t-1][n.size-1]};class Li{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||Li.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=Zy[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 Li(n)}havingStyle(t){return this.style===t?this:this.extend({style:t,size:Jy(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:Zy[t-1]})}havingBaseStyle(t){t=t||this.style.text();var n=Jy(Li.BASESIZE,t);return this.size===n&&this.textSize===Li.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!==Li.BASESIZE?["sizing","reset-size"+this.size,"size"+Li.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=Ej(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}Li.BASESIZE=6;var Z6=function(t){return new Li({style:t.displayMode?lt.DISPLAY:lt.TEXT,maxSize:t.maxSize,minRuleThickness:t.minRuleThickness})},J6=function(t,n){if(n.displayMode){var a=["katex-display"];n.leqno&&a.push("leqno"),n.fleqn&&a.push("fleqn"),t=Ce(a,[t])}return t},Vj=function(t,n,a){var l=Z6(a),o;if(a.output==="mathml")return Qy(t,n,l,a.displayMode,!0);if(a.output==="html"){var c=Ip(t,l);o=Ce(["katex"],[c])}else{var f=Qy(t,n,l,a.displayMode,!1),h=Ip(t,l);o=Ce(["katex"],[f,h])}return J6(o,a)},Yj=function(t,n,a){var l=Z6(a),o=Ip(t,l),c=Ce(["katex"],[o]);return J6(c,a)},Wj={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":"="},Sf=function(t){var n=new Ne("mo",[new jn(Wj[t.replace(/^\\/,"")])]);return n.setAttribute("stretchy","true"),n},Kj={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]},Xj=new Set(["widehat","widecheck","widetilde","utilde"]),Cf=function(t,n){function a(){var f=4e5,h=t.label.slice(1);if(Xj.has(h)&&"base"in t){var m=t.base.type==="ordgroup"?t.base.body.length:1,y,v,k;if(m>5)h==="widehat"||h==="widecheck"?(y=420,f=2364,k=.42,v=h+"4"):(y=312,f=2340,k=.34,v="tilde4");else{var b=[1,1,2,2,3,3][m];h==="widehat"||h==="widecheck"?(f=[0,1062,2364,2364,2364][b],y=[0,239,300,360,420][b],k=[0,.24,.3,.3,.36,.42][b],v=h+b):(f=[0,600,1033,2339,2340][b],y=[0,260,286,306,312][b],k=[0,.26,.286,.3,.306,.34][b],v="tilde"+b)}var T=new Kl(v),N=new Ui([T],{width:"100%",height:ze(k),viewBox:"0 0 "+f+" "+y,preserveAspectRatio:"none"});return{span:Xl([],[N],n),minWidth:0,height:k}}else{var U=[],D=Kj[h];if(!D)throw new Error('No SVG data for "'+h+'".');var[M,L,G]=D,te=G/1e3,_=M.length,W,ae;if(_===1){if(D.length!==4)throw new Error('Expected 4-tuple for single-path SVG data "'+h+'".');W=["hide-tail"],ae=[D[3]]}else if(_===2)W=["halfarrow-left","halfarrow-right"],ae=["xMinYMin","xMaxYMin"];else if(_===3)W=["brace-left","brace-center","brace-right"],ae=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
|
|
333
|
-
`+_+" children.");for(var Q=0;Q<_;Q++){var F=new Kl(M[Q]),oe=new Ui([F],{width:"400em",height:ze(te),viewBox:"0 0 "+f+" "+G,preserveAspectRatio:ae[Q]+" slice"}),de=Xl([W[Q]],[oe],n);if(_===1)return{span:de,minWidth:L,height:te};de.style.height=ze(te),U.push(de)}return{span:Ce(["stretchy"],U,n),minWidth:L,height:te}}}var{span:l,minWidth:o,height:c}=a();return l.height=c,l.style.height=ze(c),o>0&&(l.style.minWidth=ze(o)),l},Qj=function(t,n,a,l,o){var c,f=t.height+t.depth+a+l;if(/fbox|color|angl/.test(n)){if(c=Ce(["stretchy",n],[],o),n==="fbox"){var h=o.color&&o.getColor();h&&(c.style.borderColor=h)}}else{var m=[];/^[bx]cancel$/.test(n)&&m.push(new Tp({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(n)&&m.push(new Tp({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var y=new Ui(m,{width:"100%",height:ze(f)});c=Xl([],[y],o)}return c.height=f,c.style.height=ze(f),c},Zj={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Jj={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function eT(e){return e in Zj}function mt(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 jf(e){var t=Tf(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 Tf(e){return e&&(e.type==="atom"||Jj.hasOwnProperty(e.type))?e:null}var ev=e=>{if(e instanceof Lr)return e;if(Aj(e)&&e.children.length===1)return ev(e.children[0])},z1=(e,t)=>{var n,a,l;e&&e.type==="supsub"?(a=mt(e.base,"accent"),n=a.base,e.base=n,l=Tj(Ot(e,t)),e.base=a):(a=mt(e,"accent"),n=a.base);var o=Ot(n,t.havingCrampedStyle()),c=a.isShifty&&$i(n),f=0;if(c){var h,m;f=(h=(m=ev(o))==null?void 0:m.skew)!=null?h:0}var y=a.label==="\\c",v=y?o.height+o.depth:Math.min(o.height,t.fontMetrics().xHeight),k;if(a.isStretchy)k=Cf(a,t),k=Rt({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"elem",elem:k,wrapperClasses:["svg-align"],wrapperStyle:f>0?{width:"calc(100% - "+ze(2*f)+")",marginLeft:ze(2*f)}:void 0}]});else{var b,T;a.label==="\\vec"?(b=Y6("vec",t),T=V6.vec[1]):(b=kf({mode:a.mode,text:a.label},t,"textord"),b=jj(b),b.italic=0,T=b.width,y&&(v+=b.depth)),k=Ce(["accent-body"],[b]);var N=a.label==="\\textcircled";N&&(k.classes.push("accent-full"),v=o.height);var U=f;N||(U-=T/2),k.style.left=ze(U),a.label==="\\textcircled"&&(k.style.top=".2em"),k=Rt({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:-v},{type:"elem",elem:k}]})}var D=Ce(["mord","accent"],[k],t);return l?(l.children[0]=D,l.height=Math.max(D.height,l.height),l.classes[0]="mord",l):D},tv=(e,t)=>{var n=e.isStretchy?Sf(e.label):new Ne("mo",[aa(e.label,e.mode)]),a=new Ne("mover",[Wt(e.base,t),n]);return a.setAttribute("accent","true"),a},tT=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));Ie({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=cf(t[0]),a=!tT.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:z1,mathmlBuilder:tv});Ie({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:z1,mathmlBuilder:tv});Ie({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=Ot(e.base,t),a=Cf(e,t),l=e.label==="\\utilde"?.12:0,o=Rt({positionType:"top",positionData:n.height,children:[{type:"elem",elem:a,wrapperClasses:["svg-align"]},{type:"kern",size:l},{type:"elem",elem:n}]});return Ce(["mord","accentunder"],[o],t)},mathmlBuilder:(e,t)=>{var n=Sf(e.label),a=new Ne("munder",[Wt(e.base,t),n]);return a.setAttribute("accentunder","true"),a}});var Od=e=>{var t=new Ne("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};Ie({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=du(Ot(e.body,a,t),t),o=e.label.slice(0,2)==="\\x"?"x":"cd";l.classes.push(o+"-arrow-pad");var c;e.below&&(a=t.havingStyle(n.sub()),c=du(Ot(e.below,a,t),t),c.classes.push(o+"-arrow-pad"));var f=Cf(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 y;if(c){var v=-t.fontMetrics().axisHeight+c.height+.5*f.height+.111;y=Rt({positionType:"individualShift",children:[{type:"elem",elem:l,shift:m},{type:"elem",elem:f,shift:h,wrapperClasses:["svg-align"]},{type:"elem",elem:c,shift:v}]})}else y=Rt({positionType:"individualShift",children:[{type:"elem",elem:l,shift:m},{type:"elem",elem:f,shift:h,wrapperClasses:["svg-align"]}]});return Ce(["mrel","x-arrow"],[y],t)},mathmlBuilder(e,t){var n=Sf(e.label);n.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var a;if(e.body){var l=Od(Wt(e.body,t));if(e.below){var o=Od(Wt(e.below,t));a=new Ne("munderover",[n,o,l])}else a=new Ne("mover",[n,l])}else if(e.below){var c=Od(Wt(e.below,t));a=new Ne("munder",[n,c])}else a=Od(),a=new Ne("mover",[n,a]);return a}});function nv(e,t){var n=zn(e.body,t,!0);return Ce([e.mclass],n,t)}function rv(e,t){var n,a=Ur(e.body,t);return e.mclass==="minner"?n=new Ne("mpadded",a):e.mclass==="mord"?e.isCharacterBox?(n=a[0],n.type="mi"):n=new Ne("mi",a):(e.isCharacterBox?(n=a[0],n.type="mo"):n=new Ne("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}Ie({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:Cn(l),isCharacterBox:$i(l)}},htmlBuilder:nv,mathmlBuilder:rv});var Af=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"};Ie({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:n}=e;return{type:"mclass",mode:n.mode,mclass:Af(t[0]),body:Cn(t[1]),isCharacterBox:$i(t[1])}}});Ie({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var{parser:n,funcName:a}=e,l=t[1],o=t[0],c;a!=="\\stackrel"?c=Af(l):c="mrel";var f={type:"op",mode:l.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:a!=="\\stackrel",body:Cn(l)},h={type:"supsub",mode:o.mode,base:f,sup:a==="\\underset"?null:o,sub:a==="\\underset"?o:null};return{type:"mclass",mode:n.mode,mclass:c,body:[h],isCharacterBox:$i(h)}},htmlBuilder:nv,mathmlBuilder:rv});Ie({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"pmb",mode:n.mode,mclass:Af(t[0]),body:Cn(t[0])}},htmlBuilder(e,t){var n=zn(e.body,t,!0),a=Ce([e.mclass],n,t);return a.style.textShadow="0.02em 0.01em 0.04px",a},mathmlBuilder(e,t){var n=Ur(e.body,t),a=new Ne("mstyle",n);return a.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),a}});var nT={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},e3=()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),t3=e=>e.type==="textord"&&e.text==="@",rT=(e,t)=>(e.type==="mathord"||e.type==="atom")&&e.text===t;function aT(e,t,n){var a=nT[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]],[]),o={type:"atom",text:a,mode:"math",family:"rel"},c=n.callFunction("\\Big",[o],[]),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 iT(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 je("Expected \\\\ or \\cr or \\end",e.nextToken)}for(var a=[],l=[a],o=0;o<t.length;o++){for(var c=t[o],f=e3(),h=0;h<c.length;h++)if(!t3(c[h]))f.body.push(c[h]);else{a.push(f),h+=1;var m=jf(c[h]).text,y=new Array(2);if(y[0]={type:"ordgroup",mode:"math",body:[]},y[1]={type:"ordgroup",mode:"math",body:[]},!"=|.".includes(m))if("<>AV".includes(m))for(var v=0;v<2;v++){for(var k=!0,b=h+1;b<c.length;b++){if(rT(c[b],m)){k=!1,h=b;break}if(t3(c[b]))throw new je("Missing a "+m+" character to complete a CD arrow.",c[b]);y[v].body.push(c[b])}if(k)throw new je("Missing a "+m+" character to complete a CD arrow.",c[h])}else throw new je('Expected one of "<>AV=|." after @',c[h]);var T=aT(m,y,e),N={type:"styling",body:[T],mode:"math",style:"display",resetFont:!0};a.push(N),f=e3()}o%2===0?a.push(f):a.shift(),a=[],l.push(a)}e.gullet.endGroup(),e.gullet.endGroup();var U=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:U,colSeparationType:"CD",hLinesBeforeRow:new Array(l.length+1).fill([])}}Ie({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=du(Ot(e.label,n,t),t);return a.classes.push("cd-label-"+e.side),a.style.bottom=ze(.8-a.depth),a.height=0,a.depth=0,a},mathmlBuilder(e,t){var n=new Ne("mrow",[Wt(e.label,t)]);return n=new Ne("mpadded",[n]),n.setAttribute("width","0"),e.side==="left"&&n.setAttribute("lspace","-1width"),n.setAttribute("voffset","0.7em"),n=new Ne("mstyle",[n]),n.setAttribute("displaystyle","false"),n.setAttribute("scriptlevel","1"),n}});Ie({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=du(Ot(e.fragment,t),t);return n.classes.push("cd-vert-arrow"),n},mathmlBuilder(e,t){return new Ne("mrow",[Wt(e.fragment,t)])}});Ie({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:n}=e,a=mt(t[0],"ordgroup"),l=a.body,o="",c=0;c<l.length;c++){var f=mt(l[c],"textord");o+=f.text}var h=parseInt(o),m;if(isNaN(h))throw new je("\\@char has non-numeric argument "+o);if(h<0||h>=1114111)throw new je("\\@char with invalid code point "+o);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 av=(e,t)=>{var n=zn(e.body,t.withColor(e.color),!1);return Pi(n)},iv=(e,t)=>{var n=Ur(e.body,t.withColor(e.color)),a=new Ne("mstyle",n);return a.setAttribute("mathcolor",e.color),a};Ie({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:n}=e,a=mt(t[0],"color-token").color,l=t[1];return{type:"color",mode:n.mode,color:a,body:Cn(l)}},htmlBuilder:av,mathmlBuilder:iv});Ie({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:n,breakOnTokenText:a}=e,l=mt(t[0],"color-token").color;n.gullet.macros.set("\\current@color",l);var o=n.parseExpression(!0,a);return{type:"color",mode:n.mode,color:l,body:o}},htmlBuilder:av,mathmlBuilder:iv});Ie({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,o=!a.settings.displayMode||!a.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:a.mode,newLine:o,size:l&&mt(l,"size").value}},htmlBuilder(e,t){var n=Ce(["mspace"],[],t);return e.newLine&&(n.classes.push("newline"),e.size&&(n.style.marginTop=ze(ln(e.size,t)))),n},mathmlBuilder(e,t){var n=new Ne("mspace");return e.newLine&&(n.setAttribute("linebreak","newline"),e.size&&n.setAttribute("height",ze(ln(e.size,t)))),n}});var Bp={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},lv=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new je("Expected a control sequence",e);return t},lT=e=>{var t=e.gullet.popToken();return t.text==="="&&(t=e.gullet.popToken(),t.text===" "&&(t=e.gullet.popToken())),t},sv=(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)};Ie({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(Bp[a.text])return(n==="\\global"||n==="\\\\globallong")&&(a.text=Bp[a.text]),mt(t.parseFunction(),"internal");throw new je("Invalid token after macro prefix",a)}});Ie({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 je("Expected a control sequence",a);for(var o=0,c,f=[[]];t.gullet.future().text!=="{";)if(a=t.gullet.popToken(),a.text==="#"){if(t.gullet.future().text==="{"){c=t.gullet.future(),f[o].push("{");break}if(a=t.gullet.popToken(),!/^[1-9]$/.test(a.text))throw new je('Invalid argument number "'+a.text+'"');if(parseInt(a.text)!==o+1)throw new je('Argument number "'+a.text+'" out of order');o++,f.push([])}else{if(a.text==="EOF")throw new je("Expected a macro definition");f[o].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:o,delimiters:f},n===Bp[n]),{type:"internal",mode:t.mode}}});Ie({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,a=lv(t.gullet.popToken());t.gullet.consumeSpaces();var l=lT(t);return sv(t,a,l,n==="\\\\globallet"),{type:"internal",mode:t.mode}}});Ie({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,a=lv(t.gullet.popToken()),l=t.gullet.popToken(),o=t.gullet.popToken();return sv(t,a,o,n==="\\\\globalfuture"),t.gullet.pushToken(o),t.gullet.pushToken(l),{type:"internal",mode:t.mode}}});var Rc=function(t,n,a){var l=Jt.math[t]&&Jt.math[t].replace,o=T1(l||t,n,a);if(!o)throw new Error("Unsupported symbol "+t+" and font size "+n+".");return o},D1=function(t,n,a,l){var o=a.havingBaseStyle(n),c=Ce(l.concat(o.sizingClasses(a)),[t],a),f=o.sizeMultiplier/a.sizeMultiplier;return c.height*=f,c.depth*=f,c.maxFontSize=o.sizeMultiplier,c},ov=function(t,n,a){var l=n.havingBaseStyle(a),o=(1-n.sizeMultiplier/l.sizeMultiplier)*n.fontMetrics().axisHeight;t.classes.push("delimcenter"),t.style.top=ze(o),t.height-=o,t.depth+=o},sT=function(t,n,a,l,o,c){var f=nr(t,"Main-Regular",o,l),h=D1(f,n,l,c);return ov(h,l,n),h},oT=function(t,n,a,l){return nr(t,"Size"+n+"-Regular",a,l)},uv=function(t,n,a,l,o,c){var f=oT(t,n,o,l),h=D1(Ce(["delimsizing","size"+n],[f],l),lt.TEXT,l,c);return a&&ov(h,l,lt.TEXT),h},Lm=function(t,n,a){var l;n==="Size1-Regular"?l="delim-size1":l="delim-size4";var o=Ce(["delimsizinginner",l],[Ce([],[nr(t,n,a)])]);return{type:"elem",elem:o}},qm=function(t,n,a){var l=Ya["Size4-Regular"][t.charCodeAt(0)]?Ya["Size4-Regular"][t.charCodeAt(0)][4]:Ya["Size1-Regular"][t.charCodeAt(0)][4],o=new Kl("inner",vj(t,Math.round(1e3*n))),c=new Ui([o],{width:ze(l),height:ze(n),style:"width:"+ze(l),viewBox:"0 0 "+1e3*l+" "+Math.round(1e3*n),preserveAspectRatio:"xMinYMin"}),f=Xl([],[c],a);return f.height=n,f.style.height=ze(n),f.style.width=ze(l),{type:"elem",elem:f}},Lp=.008,_d={type:"kern",size:-1*Lp},uT=new Set(["|","\\lvert","\\rvert","\\vert"]),cT=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),cv=function(t,n,a,l,o,c){var f,h,m,y,v="",k=0;f=m=y=t,h=null;var b="Size1-Regular";t==="\\uparrow"?m=y="⏐":t==="\\Uparrow"?m=y="‖":t==="\\downarrow"?f=m="⏐":t==="\\Downarrow"?f=m="‖":t==="\\updownarrow"?(f="\\uparrow",m="⏐",y="\\downarrow"):t==="\\Updownarrow"?(f="\\Uparrow",m="‖",y="\\Downarrow"):uT.has(t)?(m="∣",v="vert",k=333):cT.has(t)?(m="∥",v="doublevert",k=556):t==="["||t==="\\lbrack"?(f="⎡",m="⎢",y="⎣",b="Size4-Regular",v="lbrack",k=667):t==="]"||t==="\\rbrack"?(f="⎤",m="⎥",y="⎦",b="Size4-Regular",v="rbrack",k=667):t==="\\lfloor"||t==="⌊"?(m=f="⎢",y="⎣",b="Size4-Regular",v="lfloor",k=667):t==="\\lceil"||t==="⌈"?(f="⎡",m=y="⎢",b="Size4-Regular",v="lceil",k=667):t==="\\rfloor"||t==="⌋"?(m=f="⎥",y="⎦",b="Size4-Regular",v="rfloor",k=667):t==="\\rceil"||t==="⌉"?(f="⎤",m=y="⎥",b="Size4-Regular",v="rceil",k=667):t==="("||t==="\\lparen"?(f="⎛",m="⎜",y="⎝",b="Size4-Regular",v="lparen",k=875):t===")"||t==="\\rparen"?(f="⎞",m="⎟",y="⎠",b="Size4-Regular",v="rparen",k=875):t==="\\{"||t==="\\lbrace"?(f="⎧",h="⎨",y="⎩",m="⎪",b="Size4-Regular"):t==="\\}"||t==="\\rbrace"?(f="⎫",h="⎬",y="⎭",m="⎪",b="Size4-Regular"):t==="\\lgroup"||t==="⟮"?(f="⎧",y="⎩",m="⎪",b="Size4-Regular"):t==="\\rgroup"||t==="⟯"?(f="⎫",y="⎭",m="⎪",b="Size4-Regular"):t==="\\lmoustache"||t==="⎰"?(f="⎧",y="⎭",m="⎪",b="Size4-Regular"):(t==="\\rmoustache"||t==="⎱")&&(f="⎫",y="⎩",m="⎪",b="Size4-Regular");var T=Rc(f,b,o),N=T.height+T.depth,U=Rc(m,b,o),D=U.height+U.depth,M=Rc(y,b,o),L=M.height+M.depth,G=0,te=1;if(h!==null){var _=Rc(h,b,o);G=_.height+_.depth,te=2}var W=N+L+G,ae=Math.max(0,Math.ceil((n-W)/(te*D))),Q=W+ae*te*D,F=l.fontMetrics().axisHeight;a&&(F*=l.sizeMultiplier);var oe=Q/2-F,de=[];if(v.length>0){var _e=Q-N-L,be=Math.round(Q*1e3),ge=xj(v,Math.round(_e*1e3)),Z=new Kl(v,ge),le=ze(k/1e3),Me=ze(be/1e3),We=new Ui([Z],{width:le,height:Me,viewBox:"0 0 "+k+" "+be}),H=Xl([],[We],l);H.height=be/1e3,H.style.width=le,H.style.height=Me,de.push({type:"elem",elem:H})}else{if(de.push(Lm(y,b,o)),de.push(_d),h===null){var I=Q-N-L+2*Lp;de.push(qm(m,I,l))}else{var ee=(Q-N-L-G)/2+2*Lp;de.push(qm(m,ee,l)),de.push(_d),de.push(Lm(h,b,o)),de.push(_d),de.push(qm(m,ee,l))}de.push(_d),de.push(Lm(f,b,o))}var R=l.havingBaseStyle(lt.TEXT),me=Rt({positionType:"bottom",positionData:oe,children:de});return D1(Ce(["delimsizing","mult"],[me],R),lt.TEXT,l,c)},Um=80,Hm=.08,$m=function(t,n,a,l,o){var c=yj(t,l,a),f=new Kl(t,c),h=new Ui([f],{width:"400em",height:ze(n),viewBox:"0 0 400000 "+a,preserveAspectRatio:"xMinYMin slice"});return Xl(["hide-tail"],[h],o)},dT=function(t,n){var a=n.havingBaseSizing(),l=pv("\\surd",t*a.sizeMultiplier,mv,a),o=a.sizeMultiplier,c=Math.max(0,n.minRuleThickness-n.fontMetrics().sqrtRuleThickness),f,h,m,y,v;return l.type==="small"?(y=1e3+1e3*c+Um,t<1?o=1:t<1.4&&(o=.7),h=(1+c+Hm)/o,m=(1+c)/o,f=$m("sqrtMain",h,y,c,n),f.style.minWidth="0.853em",v=.833/o):l.type==="large"?(y=(1e3+Um)*$c[l.size],m=($c[l.size]+c)/o,h=($c[l.size]+c+Hm)/o,f=$m("sqrtSize"+l.size,h,y,c,n),f.style.minWidth="1.02em",v=1/o):(h=t+c+Hm,m=t+c,y=Math.floor(1e3*t+c)+Um,f=$m("sqrtTall",h,y,c,n),f.style.minWidth="0.742em",v=1.056),f.height=m,f.style.height=ze(h),{span:f,advanceWidth:v,ruleWidth:(n.fontMetrics().sqrtRuleThickness+c)*o}},dv=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),fT=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),fv=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),$c=[0,1.2,1.8,2.4,3],hv=function(t,n,a,l,o){if(t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle"),dv.has(t)||fv.has(t))return uv(t,n,!1,a,l,o);if(fT.has(t))return cv(t,$c[n],!1,a,l,o);throw new je("Illegal delimiter: '"+t+"'")},hT=[{type:"small",style:lt.SCRIPTSCRIPT},{type:"small",style:lt.SCRIPT},{type:"small",style:lt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],mT=[{type:"small",style:lt.SCRIPTSCRIPT},{type:"small",style:lt.SCRIPT},{type:"small",style:lt.TEXT},{type:"stack"}],mv=[{type:"small",style:lt.SCRIPTSCRIPT},{type:"small",style:lt.SCRIPT},{type:"small",style:lt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],pT=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.")},pv=function(t,n,a,l){for(var o=Math.min(2,3-l.style.size),c=o;c<a.length;c++){var f=a[c];if(f.type==="stack")break;var h=Rc(t,pT(f),"math"),m=h.height+h.depth;if(f.type==="small"){var y=l.havingBaseStyle(f.style);m*=y.sizeMultiplier}if(m>n)return f}return a[a.length-1]},qp=function(t,n,a,l,o,c){t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle");var f;fv.has(t)?f=hT:dv.has(t)?f=mv:f=mT;var h=pv(t,n,f,l);return h.type==="small"?sT(t,h.style,a,l,o,c):h.type==="large"?uv(t,h.size,a,l,o,c):cv(t,n,a,l,o,c)},Fm=function(t,n,a,l,o,c){var f=l.fontMetrics().axisHeight*l.sizeMultiplier,h=901,m=5/l.fontMetrics().ptPerEm,y=Math.max(n-f,a+f),v=Math.max(y/500*h,2*y-m);return qp(t,v,!0,l,o,c)},n3={"\\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}},gT=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 r3(e){return"isMiddle"in e}function Ef(e,t){var n=Tf(e);if(n&&gT.has(n.text))return n;throw n?new je("Invalid delimiter '"+n.text+"' after '"+t.funcName+"'",e):new je("Invalid delimiter type '"+e.type+"'",e)}Ie({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=Ef(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:n3[e.funcName].size,mclass:n3[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>e.delim==="."?Ce([e.mclass]):hv(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];e.delim!=="."&&t.push(aa(e.delim,e.mode));var n=new Ne("mo",t);e.mclass==="mopen"||e.mclass==="mclose"?n.setAttribute("fence","true"):n.setAttribute("fence","false"),n.setAttribute("stretchy","true");var a=ze($c[e.size]);return n.setAttribute("minsize",a),n.setAttribute("maxsize",a),n}});function a3(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}Ie({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 je("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:Ef(t[0],e).text,color:n}}});Ie({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=Ef(t[0],e),a=e.parser;++a.leftrightDepth;var l=a.parseExpression(!1);--a.leftrightDepth,a.expect("\\right",!1);var o=mt(a.parseFunction(),"leftright-right");return{type:"leftright",mode:a.mode,body:l,left:n.text,right:o.delim,rightColor:o.color}},htmlBuilder:(e,t)=>{a3(e);for(var n=zn(e.body,t,!0,["mopen","mclose"]),a=0,l=0,o=!1,c=0;c<n.length;c++){var f=n[c];r3(f)?o=!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=Zc(t,["mopen"]):h=Fm(e.left,a,l,t,e.mode,["mopen"]),n.unshift(h),o)for(var m=1;m<n.length;m++){var y=n[m];if(r3(y)){var v=y.isMiddle;n[m]=Fm(v.delim,a,l,v.options,e.mode,[])}}var k;if(e.right===".")k=Zc(t,["mclose"]);else{var b=e.rightColor?t.withColor(e.rightColor):t;k=Fm(e.right,a,l,b,e.mode,["mclose"])}return n.push(k),Ce(["minner"],n,t)},mathmlBuilder:(e,t)=>{a3(e);var n=Ur(e.body,t);if(e.left!=="."){var a=new Ne("mo",[aa(e.left,e.mode)]);a.setAttribute("fence","true"),n.unshift(a)}if(e.right!=="."){var l=new Ne("mo",[aa(e.right,e.mode)]);l.setAttribute("fence","true"),e.rightColor&&l.setAttribute("mathcolor",e.rightColor),n.push(l)}return N1(n)}});Ie({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=Ef(t[0],e);if(!e.parser.leftrightDepth)throw new je("\\middle without preceding \\left",n);return{type:"middle",mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{var n;return e.delim==="."?n=Zc(t,[]):(n=hv(e.delim,1,t,e.mode,[]),n.isMiddle={delim:e.delim,options:t}),n},mathmlBuilder:(e,t)=>{var n=e.delim==="\\vert"||e.delim==="|"?aa("|","text"):aa(e.delim,e.mode),a=new Ne("mo",[n]);return a.setAttribute("fence","true"),a.setAttribute("lspace","0.05em"),a.setAttribute("rspace","0.05em"),a}});var Nf=(e,t)=>{var n=du(Ot(e.body,t),t),a=e.label.slice(1),l=t.sizeMultiplier,o,c,f=$i(e.body);if(a==="sout")o=Ce(["stretchy","sout"]),o.height=t.fontMetrics().defaultRuleThickness/l,c=-.5*t.fontMetrics().xHeight;else if(a==="phase"){var h=ln({number:.6,unit:"pt"},t),m=ln({number:.35,unit:"ex"},t),y=t.havingBaseSizing();l=l/y.sizeMultiplier;var v=n.height+n.depth+h+m;n.style.paddingLeft=ze(v/2+h);var k=Math.floor(1e3*v*l),b=pj(k),T=new Ui([new Kl("phase",b)],{width:"400em",height:ze(k/1e3),viewBox:"0 0 400000 "+k,preserveAspectRatio:"xMinYMin slice"});o=Xl(["hide-tail"],[T],t),o.style.height=ze(v),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 N,U,D=0;/box/.test(a)?(D=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),N=t.fontMetrics().fboxsep+(a==="colorbox"?0:D),U=N):a==="angl"?(D=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),N=4*D,U=Math.max(0,.25-n.depth)):(N=f?.2:0,U=N),o=Qj(n,a,N,U,t),/fbox|boxed|fcolorbox/.test(a)?(o.style.borderStyle="solid",o.style.borderWidth=ze(D)):a==="angl"&&D!==.049&&(o.style.borderTopWidth=ze(D),o.style.borderRightWidth=ze(D)),c=n.depth+U,e.backgroundColor&&(o.style.backgroundColor=e.backgroundColor,e.borderColor&&(o.style.borderColor=e.borderColor))}var M;if(e.backgroundColor)M=Rt({positionType:"individualShift",children:[{type:"elem",elem:o,shift:c},{type:"elem",elem:n,shift:0}]});else{var L=/cancel|phase/.test(a)?["svg-align"]:[];M=Rt({positionType:"individualShift",children:[{type:"elem",elem:n,shift:0},{type:"elem",elem:o,shift:c,wrapperClasses:L}]})}return/cancel/.test(a)&&(M.height=n.height,M.depth=n.depth),/cancel/.test(a)&&!f?Ce(["mord","cancel-lap"],[M],t):Ce(["mord"],[M],t)},Mf=(e,t)=>{var n,a=new Ne(e.label.includes("colorbox")?"mpadded":"menclose",[Wt(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: "+ze(l)+" solid "+e.borderColor)}break;case"\\xcancel":a.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&a.setAttribute("mathbackground",e.backgroundColor),a};Ie({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","hbox"]},handler(e,t,n){var{parser:a,funcName:l}=e,o=mt(t[0],"color-token").color,c=t[1];return{type:"enclose",mode:a.mode,label:l,backgroundColor:o,body:c}},htmlBuilder:Nf,mathmlBuilder:Mf});Ie({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"]},handler(e,t,n){var{parser:a,funcName:l}=e,o=mt(t[0],"color-token").color,c=mt(t[1],"color-token").color,f=t[2];return{type:"enclose",mode:a.mode,label:l,backgroundColor:c,borderColor:o,body:f}},htmlBuilder:Nf,mathmlBuilder:Mf});Ie({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]}}});Ie({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:Nf,mathmlBuilder:Mf});Ie({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:Nf,mathmlBuilder:Mf});Ie({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 gv={};function Qa(e){for(var{type:t,names:n,props:a,handler:l,htmlBuilder:o,mathmlBuilder:c}=e,f={type:t,numArgs:a.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:l},h=0;h<n.length;++h)gv[n[h]]=f;o&&(of[t]=o),c&&(uf[t]=c)}var yv={};function O(e,t){yv[e]=t}class Sr{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 Sr(t.loc.lexer,t.loc.start,n.loc.end):t&&t.loc}}class Br{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 Br(n,Sr.range(this,t))}}function i3(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 zf=e=>{var t=e.parser.settings;if(!t.displayMode)throw new je("{"+e.envName+"} can be used only in display mode.")},yT=new Set(["gather","gather*"]);function R1(e){if(!e.includes("ed"))return!e.includes("*")}function ns(e,t,n){var{hskipBeforeAndAfter:a,addJot:l,cols:o,arraystretch:c,colSeparationType:f,autoTag:h,singleRow:m,emptySingleRow:y,maxNumCols:v,leqno:k}=t;if(e.gullet.beginGroup(),m||e.gullet.macros.set("\\cr","\\\\\\relax"),!c){var b=e.gullet.expandMacroAsText("\\arraystretch");if(b==null)c=1;else if(c=parseFloat(b),!c||c<0)throw new je("Invalid \\arraystretch: "+b)}e.gullet.beginGroup();var T=[],N=[T],U=[],D=[],M=h!=null?[]:void 0;function L(){h&&e.gullet.macros.set("\\@eqnsw","1",!0)}function G(){M&&(e.gullet.macros.get("\\df@tag")?(M.push(e.subparse([new Br("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):M.push(!!h&&e.gullet.macros.get("\\@eqnsw")==="1"))}for(L(),D.push(i3(e));;){var te=e.parseExpression(!1,m?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup();var _={type:"ordgroup",mode:e.mode,body:te};n&&(_={type:"styling",mode:e.mode,style:n,resetFont:!0,body:[_]}),T.push(_);var W=e.fetch().text;if(W==="&"){if(v&&T.length===v){if(m||f)throw new je("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else if(W==="\\end"){G(),T.length===1&&_.type==="styling"&&_.body.length===1&&_.body[0].type==="ordgroup"&&_.body[0].body.length===0&&(N.length>1||!y)&&N.pop(),D.length<N.length+1&&D.push([]);break}else if(W==="\\\\"){e.consume();var ae=void 0;e.gullet.future().text!==" "&&(ae=e.parseSizeGroup(!0)),U.push(ae?ae.value:null),G(),D.push(i3(e)),T=[],N.push(T),L()}else throw new je("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:N,cols:o,rowGaps:U,hskipBeforeAndAfter:a,hLinesBeforeRow:D,colSeparationType:f,tags:M,leqno:k}}function O1(e){return e.slice(0,1)==="d"?"display":"text"}var Za=function(t,n){var a,l,o=t.body.length,c=t.hLinesBeforeRow,f=0,h=new Array(o),m=[],y=Math.max(n.fontMetrics().arrayRuleWidth,n.minRuleThickness),v=1/n.fontMetrics().ptPerEm,k=5*v;if(t.colSeparationType&&t.colSeparationType==="small"){var b=n.havingStyle(lt.SCRIPT).sizeMultiplier;k=.2778*(b/n.sizeMultiplier)}var T=t.colSeparationType==="CD"?ln({number:3,unit:"ex"},n):12*v,N=3*v,U=t.arraystretch*T,D=.7*U,M=.3*U,L=0;function G(Fe){for(var rt=0;rt<Fe.length;++rt)rt>0&&(L+=.25),m.push({pos:L,isDashed:Fe[rt]})}for(G(c[0]),a=0;a<t.body.length;++a){var te=t.body[a],_=D,W=M;f<te.length&&(f=te.length);var ae={cells:new Array(te.length),height:0,depth:0,pos:0};for(l=0;l<te.length;++l){var Q=Ot(te[l],n);W<Q.depth&&(W=Q.depth),_<Q.height&&(_=Q.height),ae.cells[l]=Q}var F=t.rowGaps[a],oe=0;F&&(oe=ln(F,n),oe>0&&(oe+=M,W<oe&&(W=oe),oe=0)),t.addJot&&a<t.body.length-1&&(W+=N),ae.height=_,ae.depth=W,L+=_,ae.pos=L,L+=W+oe,h[a]=ae,G(c[a+1])}var de=L/2+n.fontMetrics().axisHeight,_e=t.cols||[],be=[],ge,Z,le=[];if(t.tags&&t.tags.some(Fe=>Fe))for(a=0;a<o;++a){var Me=h[a],We=Me.pos-de,H=t.tags[a],I=void 0;H===!0?I=Ce(["eqn-num"],[],n):H===!1?I=Ce([],[],n):I=Ce([],zn(H,n,!0),n),I.depth=Me.depth,I.height=Me.height,le.push({type:"elem",elem:I,shift:We})}for(l=0,Z=0;l<f||Z<_e.length;++l,++Z){for(var ee,R=_e[Z],me=!0;((Oe=R)==null?void 0:Oe.type)==="separator";){var Oe;if(me||(ge=Ce(["arraycolsep"],[]),ge.style.width=ze(n.fontMetrics().doubleRuleSep),be.push(ge)),R.separator==="|"||R.separator===":"){var Re=R.separator==="|"?"solid":"dashed",Be=Ce(["vertical-separator"],[],n);Be.style.height=ze(L),Be.style.borderRightWidth=ze(y),Be.style.borderRightStyle=Re,Be.style.margin="0 "+ze(-y/2);var ve=L-de;ve&&(Be.style.verticalAlign=ze(-ve)),be.push(Be)}else throw new je("Invalid separator type: "+R.separator);Z++,R=_e[Z],me=!1}if(!(l>=f)){var Xe=void 0;if(l>0||t.hskipBeforeAndAfter){var Ft,pn;Xe=(Ft=(pn=R)==null?void 0:pn.pregap)!=null?Ft:k,Xe!==0&&(ge=Ce(["arraycolsep"],[]),ge.style.width=ze(Xe),be.push(ge))}var tn=[];for(a=0;a<o;++a){var nt=h[a],ue=nt.cells[l];if(ue){var $e=nt.pos-de;ue.depth=nt.depth,ue.height=nt.height,tn.push({type:"elem",elem:ue,shift:$e})}}var Ze=Rt({positionType:"individualShift",children:tn}),Se=Ce(["col-align-"+(((ee=R)==null?void 0:ee.align)||"c")],[Ze]);if(be.push(Se),l<f-1||t.hskipBeforeAndAfter){var gt,st;Xe=(gt=(st=R)==null?void 0:st.postgap)!=null?gt:k,Xe!==0&&(ge=Ce(["arraycolsep"],[]),ge.style.width=ze(Xe),be.push(ge))}}}var pt=Ce(["mtable"],be);if(m.length>0){for(var At=cu("hline",n,y),sn=cu("hdashline",n,y),Kt=[{type:"elem",elem:pt,shift:0}];m.length>0;){var dt=m.pop(),Kn=dt.pos-de;dt.isDashed?Kt.push({type:"elem",elem:sn,shift:Kn}):Kt.push({type:"elem",elem:At,shift:Kn})}pt=Rt({positionType:"individualShift",children:Kt})}if(le.length===0)return Ce(["mord"],[pt],n);var fe=Rt({positionType:"individualShift",children:le}),ke=Ce(["tag"],[fe],n);return Pi([pt,ke])},vT={c:"center ",l:"left ",r:"right "},Ja=function(t,n){for(var a=[],l=new Ne("mtd",[],["mtr-glue"]),o=new Ne("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 Ne("mtd",[Wt(f[m],n)]));t.tags&&t.tags[c]&&(h.unshift(l),h.push(l),t.leqno?h.unshift(o):h.push(o)),a.push(new Ne("mtr",h))}var y=new Ne("mtable",a),v=t.arraystretch===.5?.1:.16+t.arraystretch-1+(t.addJot?.09:0);y.setAttribute("rowspacing",ze(v));var k="",b="";if(t.cols&&t.cols.length>0){var T=t.cols,N="",U=!1,D=0,M=T.length;T[0].type==="separator"&&(k+="top ",D=1),T[T.length-1].type==="separator"&&(k+="bottom ",M-=1);for(var L=D;L<M;L++){var G=T[L];G.type==="align"?(b+=vT[G.align],U&&(N+="none "),U=!0):G.type==="separator"&&U&&(N+=G.separator==="|"?"solid ":"dashed ",U=!1)}y.setAttribute("columnalign",b.trim()),/[sd]/.test(N)&&y.setAttribute("columnlines",N.trim())}if(t.colSeparationType==="align"){for(var te=t.cols||[],_="",W=1;W<te.length;W++)_+=W%2?"0em ":"1em ";y.setAttribute("columnspacing",_.trim())}else t.colSeparationType==="alignat"||t.colSeparationType==="gather"?y.setAttribute("columnspacing","0em"):t.colSeparationType==="small"?y.setAttribute("columnspacing","0.2778em"):t.colSeparationType==="CD"?y.setAttribute("columnspacing","0.5em"):y.setAttribute("columnspacing","1em");var ae="",Q=t.hLinesBeforeRow;k+=Q[0].length>0?"left ":"",k+=Q[Q.length-1].length>0?"right ":"";for(var F=1;F<Q.length-1;F++)ae+=Q[F].length===0?"none ":Q[F][0]?"dashed ":"solid ";return/[sd]/.test(ae)&&y.setAttribute("rowlines",ae.trim()),k!==""&&(y=new Ne("menclose",[y]),y.setAttribute("notation",k.trim())),t.arraystretch&&t.arraystretch<1&&(y=new Ne("mstyle",[y]),y.setAttribute("scriptlevel","1")),y},vv=function(t,n){t.envName.includes("ed")||zf(t);var a=[],l=t.envName.includes("at")?"alignat":"align",o=t.envName==="split",c=ns(t.parser,{cols:a,addJot:!0,autoTag:o?void 0:R1(t.envName),emptySingleRow:!0,colSeparationType:l,maxNumCols:o?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 y="",v=0;v<n[0].body.length;v++){var k=mt(n[0].body[v],"textord");y+=k.text}f=Number(y),h=f*2}var b=!h;c.body.forEach(function(D){for(var M=1;M<D.length;M+=2){var L=mt(D[M],"styling"),G=mt(L.body[0],"ordgroup");G.body.unshift(m)}if(b)h<D.length&&(h=D.length);else{var te=D.length/2;if(f<te)throw new je("Too many math in a row: "+("expected "+f+", but got "+te),D[0])}});for(var T=0;T<h;++T){var N="r",U=0;T%2===1?N="l":T>0&&b&&(U=1),a[T]={type:"align",align:N,pregap:U,postgap:0}}return c.colSeparationType=b?"align":"alignat",c};Qa({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var n=Tf(t[0]),a=n?[t[0]]:mt(t[0],"ordgroup").body,l=a.map(function(c){var f=jf(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 je("Unknown column alignment: "+h,c)}),o={cols:l,hskipBeforeAndAfter:!0,maxNumCols:l.length};return ns(e.parser,o,O1(e.envName))},htmlBuilder:Za,mathmlBuilder:Ja});Qa({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 je("Expected l or c or r",l.nextToken);l.consume(),l.consumeSpaces(),l.expect("]"),l.consume(),a.cols=[{type:"align",align:n}]}}var o=ns(e.parser,a,O1(e.envName)),c=Math.max(0,...o.body.map(f=>f.length));return o.cols=new Array(c).fill({type:"align",align:n}),t?{type:"leftright",mode:e.mode,body:[o],left:t[0],right:t[1],rightColor:void 0}:o},htmlBuilder:Za,mathmlBuilder:Ja});Qa({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t={arraystretch:.5},n=ns(e.parser,t,"script");return n.colSeparationType="small",n},htmlBuilder:Za,mathmlBuilder:Ja});Qa({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var n=Tf(t[0]),a=n?[t[0]]:mt(t[0],"ordgroup").body,l=a.map(function(f){var h=jf(f),m=h.text;if("lc".includes(m))return{type:"align",align:m};throw new je("Unknown column alignment: "+m,f)});if(l.length>1)throw new je("{subarray} can contain only one column");var o={cols:l,hskipBeforeAndAfter:!1,arraystretch:.5},c=ns(e.parser,o,"script");if(c.body.length>0&&c.body[0].length>1)throw new je("{subarray} can contain only one column");return c},htmlBuilder:Za,mathmlBuilder:Ja});Qa({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=ns(e.parser,t,O1(e.envName));return{type:"leftright",mode:e.mode,body:[n],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:Za,mathmlBuilder:Ja});Qa({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:vv,htmlBuilder:Za,mathmlBuilder:Ja});Qa({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){yT.has(e.envName)&&zf(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:R1(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return ns(e.parser,t,"display")},htmlBuilder:Za,mathmlBuilder:Ja});Qa({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:vv,htmlBuilder:Za,mathmlBuilder:Ja});Qa({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){zf(e);var t={autoTag:R1(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return ns(e.parser,t,"display")},htmlBuilder:Za,mathmlBuilder:Ja});Qa({type:"array",names:["CD"],props:{numArgs:0},handler(e){return zf(e),iT(e.parser)},htmlBuilder:Za,mathmlBuilder:Ja});O("\\nonumber","\\gdef\\@eqnsw{0}");O("\\notag","\\nonumber");Ie({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new je(e.funcName+" valid only within array environment")}});var l3=gv;Ie({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 je("Invalid environment name",l);for(var o="",c=0;c<l.body.length;++c)o+=mt(l.body[c],"textord").text;if(a==="\\begin"){if(!l3.hasOwnProperty(o))throw new je("No such environment: "+o,l);var f=l3[o],{args:h,optArgs:m}=n.parseArguments("\\begin{"+o+"}",f),y={mode:n.mode,envName:o,parser:n},v=f.handler(y,h,m);n.expect("\\end",!1);var k=n.nextToken,b=mt(n.parseFunction(),"environment");if(b.name!==o)throw new je("Mismatch: \\begin{"+o+"} matched by \\end{"+b.name+"}",k);return v}return{type:"environment",mode:n.mode,name:o,nameGroup:l}}});var xv=(e,t)=>{var n=e.font,a=t.withFont(n);return Ot(e.body,a)},bv=(e,t)=>{var n=e.font,a=t.withFont(n);return Wt(e.body,a)},s3={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};Ie({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=cf(t[0]),o=a;return o in s3&&(o=s3[o]),{type:"font",mode:n.mode,font:o.slice(1),body:l}},htmlBuilder:xv,mathmlBuilder:bv});Ie({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:Af(a),body:[{type:"font",mode:n.mode,font:"boldsymbol",body:a}],isCharacterBox:$i(a)}}});Ie({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:o}=n,c=n.parseExpression(!0,l);return{type:"font",mode:o,font:"math"+a.slice(1),body:{type:"ordgroup",mode:n.mode,body:c}}},htmlBuilder:xv,mathmlBuilder:bv});var xT=(e,t)=>{var n=t.style,a=n.fracNum(),l=n.fracDen(),o;o=t.havingStyle(a);var c=Ot(e.numer,o,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}o=t.havingStyle(l);var m=Ot(e.denom,o,t),y,v,k;e.hasBarLine?(e.barSize?(v=ln(e.barSize,t),y=cu("frac-line",t,v)):y=cu("frac-line",t),v=y.height,k=y.height):(y=null,v=0,k=t.fontMetrics().defaultRuleThickness);var b,T,N;n.size===lt.DISPLAY.size?(b=t.fontMetrics().num1,v>0?T=3*k:T=7*k,N=t.fontMetrics().denom1):(v>0?(b=t.fontMetrics().num2,T=k):(b=t.fontMetrics().num3,T=3*k),N=t.fontMetrics().denom2);var U;if(y){var M=t.fontMetrics().axisHeight;b-c.depth-(M+.5*v)<T&&(b+=T-(b-c.depth-(M+.5*v))),M-.5*v-(m.height-N)<T&&(N+=T-(M-.5*v-(m.height-N)));var L=-(M-.5*v);U=Rt({positionType:"individualShift",children:[{type:"elem",elem:m,shift:N},{type:"elem",elem:y,shift:L},{type:"elem",elem:c,shift:-b}]})}else{var D=b-c.depth-(m.height-N);D<T&&(b+=.5*(T-D),N+=.5*(T-D)),U=Rt({positionType:"individualShift",children:[{type:"elem",elem:m,shift:N},{type:"elem",elem:c,shift:-b}]})}o=t.havingStyle(n),U.height*=o.sizeMultiplier/t.sizeMultiplier,U.depth*=o.sizeMultiplier/t.sizeMultiplier;var G;n.size===lt.DISPLAY.size?G=t.fontMetrics().delim1:n.size===lt.SCRIPTSCRIPT.size?G=t.havingStyle(lt.SCRIPT).fontMetrics().delim2:G=t.fontMetrics().delim2;var te,_;return e.leftDelim==null?te=Zc(t,["mopen"]):te=qp(e.leftDelim,G,!0,t.havingStyle(n),e.mode,["mopen"]),e.continued?_=Ce([]):e.rightDelim==null?_=Zc(t,["mclose"]):_=qp(e.rightDelim,G,!0,t.havingStyle(n),e.mode,["mclose"]),Ce(["mord"].concat(o.sizingClasses(t)),[te,Ce(["mfrac"],[U]),_],t)},bT=(e,t)=>{var n=new Ne("mfrac",[Wt(e.numer,t),Wt(e.denom,t)]);if(!e.hasBarLine)n.setAttribute("linethickness","0px");else if(e.barSize){var a=ln(e.barSize,t);n.setAttribute("linethickness",ze(a))}if(e.leftDelim!=null||e.rightDelim!=null){var l=[];if(e.leftDelim!=null){var o=new Ne("mo",[new jn(e.leftDelim.replace("\\",""))]);o.setAttribute("fence","true"),l.push(o)}if(l.push(n),e.rightDelim!=null){var c=new Ne("mo",[new jn(e.rightDelim.replace("\\",""))]);c.setAttribute("fence","true"),l.push(c)}return N1(l)}return n},wv=(e,t)=>{if(!t)return e;var n={type:"styling",mode:e.mode,style:t,body:[e]};return n};Ie({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],o=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",y=null;return m||a.startsWith("\\d")?y="display":a.startsWith("\\t")&&(y="text"),wv({type:"genfrac",mode:n.mode,numer:l,denom:o,continued:m,hasBarLine:c,leftDelim:f,rightDelim:h,barSize:null},y)},htmlBuilder:xT,mathmlBuilder:bT});Ie({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 o3=["display","text","script","scriptscript"],u3=function(t){var n=null;return t.length>0&&(n=t,n=n==="."?null:n),n};Ie({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],o=cf(t[0]),c=o.type==="atom"&&o.family==="open"?u3(o.text):null,f=cf(t[1]),h=f.type==="atom"&&f.family==="close"?u3(f.text):null,m=mt(t[2],"size"),y,v=null;m.isBlank?y=!0:(v=m.value,y=v.number>0);var k=null,b=t[3];if(b.type==="ordgroup"){if(b.body.length>0){var T=mt(b.body[0],"textord");k=o3[Number(T.text)]}}else b=mt(b,"textord"),k=o3[Number(b.text)];return wv({type:"genfrac",mode:n.mode,numer:a,denom:l,continued:!1,hasBarLine:y,barSize:v,leftDelim:c,rightDelim:h},k)}});Ie({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:mt(t[0],"size").value,token:l}}});Ie({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:n,funcName:a}=e,l=t[0],o=mt(t[1],"infix").size;if(!o)throw new Error("\\\\abovefrac expected size, but got "+String(o));var c=t[2],f=o.number>0;return{type:"genfrac",mode:n.mode,numer:l,denom:c,continued:!1,hasBarLine:f,barSize:o,leftDelim:null,rightDelim:null}}});var kv=(e,t)=>{var n=t.style,a,l;e.type==="supsub"?(a=e.sup?Ot(e.sup,t.havingStyle(n.sup()),t):Ot(e.sub,t.havingStyle(n.sub()),t),l=mt(e.base,"horizBrace")):l=mt(e,"horizBrace");var o=Ot(l.base,t.havingBaseStyle(lt.DISPLAY)),c=Cf(l,t),f;if(l.isOver?f=Rt({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:c,wrapperClasses:["svg-align"]}]}):f=Rt({positionType:"bottom",positionData:o.depth+.1+c.height,children:[{type:"elem",elem:c,wrapperClasses:["svg-align"]},{type:"kern",size:.1},{type:"elem",elem:o}]}),a){var h=Ce(["minner",l.isOver?"mover":"munder"],[f],t);l.isOver?f=Rt({positionType:"firstBaseline",children:[{type:"elem",elem:h},{type:"kern",size:.2},{type:"elem",elem:a}]}):f=Rt({positionType:"bottom",positionData:h.depth+.2+a.height+a.depth,children:[{type:"elem",elem:a},{type:"kern",size:.2},{type:"elem",elem:h}]})}return Ce(["minner",l.isOver?"mover":"munder"],[f],t)},wT=(e,t)=>{var n=Sf(e.label);return new Ne(e.isOver?"mover":"munder",[Wt(e.base,t),n])};Ie({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:kv,mathmlBuilder:wT});Ie({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,a=t[1],l=mt(t[0],"url").url;return n.settings.isTrusted({command:"\\href",url:l})?{type:"href",mode:n.mode,href:l,body:Cn(a)}:n.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var n=zn(e.body,t,!1);return Oj(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=Ql(e.body,t);return n instanceof Ne||(n=new Ne("mrow",[n])),n.setAttribute("href",e.href),n}});Ie({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,a=mt(t[0],"url").url;if(!n.settings.isTrusted({command:"\\url",url:a}))return n.formatUnsupportedCmd("\\url");for(var l=[],o=0;o<a.length;o++){var c=a[o];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:Cn(f)}}});Ie({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:Cn(t[0])}},htmlBuilder(e,t){var n=zn(e.body,t.withFont(""),!1);return Pi(n)},mathmlBuilder(e,t){return new Ne("mrow",Ur(e.body,t.withFont("")))}});Ie({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,o=mt(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=o,f={command:"\\htmlClass",class:o};break;case"\\htmlId":h.id=o,f={command:"\\htmlId",id:o};break;case"\\htmlStyle":h.style=o,f={command:"\\htmlStyle",style:o};break;case"\\htmlData":{for(var m=o.split(","),y=0;y<m.length;y++){var v=m[y],k=v.indexOf("=");if(k<0)throw new je("\\htmlData key/value '"+v+"' missing equals sign");var b=v.slice(0,k),T=v.slice(k+1);h["data-"+b.trim()]=T}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:Cn(c)}:n.formatUnsupportedCmd(a)},htmlBuilder:(e,t)=>{var n=zn(e.body,t,!1),a=["enclosing"];e.attributes.class&&a.push(...e.attributes.class.trim().split(/\s+/));var l=Ce(a,n,t);for(var o in e.attributes)o!=="class"&&e.attributes.hasOwnProperty(o)&&l.setAttribute(o,e.attributes[o]);return l},mathmlBuilder:(e,t)=>Ql(e.body,t)});Ie({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:Cn(t[0]),mathml:Cn(t[1])}},htmlBuilder:(e,t)=>{var n=zn(e.html,t,!1);return Pi(n)},mathmlBuilder:(e,t)=>Ql(e.mathml,t)});var Pm=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 je("Invalid size: '"+t+"' in \\includegraphics");var a={number:+(n[1]+n[2]),unit:n[3]};if(!L6(a))throw new je("Invalid unit: '"+a.unit+"' in \\includegraphics.");return a};Ie({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"},o={number:.9,unit:"em"},c={number:0,unit:"em"},f="";if(n[0])for(var h=mt(n[0],"raw").string,m=h.split(","),y=0;y<m.length;y++){var v=m[y].split("=");if(v.length===2){var k=v[1].trim();switch(v[0].trim()){case"alt":f=k;break;case"width":l=Pm(k);break;case"height":o=Pm(k);break;case"totalheight":c=Pm(k);break;default:throw new je("Invalid key: '"+v[0]+"' in \\includegraphics.")}}}var b=mt(t[0],"url").url;return f===""&&(f=b,f=f.replace(/^.*[\\/]/,""),f=f.substring(0,f.lastIndexOf("."))),a.settings.isTrusted({command:"\\includegraphics",url:b})?{type:"includegraphics",mode:a.mode,alt:f,width:l,height:o,totalheight:c,src:b}:a.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(e,t)=>{var n=ln(e.height,t),a=0;e.totalheight.number>0&&(a=ln(e.totalheight,t)-n);var l=0;e.width.number>0&&(l=ln(e.width,t));var o={height:ze(n+a)};l>0&&(o.width=ze(l)),a>0&&(o.verticalAlign=ze(-a));var c=new Sj(e.src,e.alt,o);return c.height=n,c.depth=a,c},mathmlBuilder:(e,t)=>{var n=new Ne("mglyph",[]);n.setAttribute("alt",e.alt);var a=ln(e.height,t),l=0;if(e.totalheight.number>0&&(l=ln(e.totalheight,t)-a,n.setAttribute("valign",ze(-l))),n.setAttribute("height",ze(a+l)),e.width.number>0){var o=ln(e.width,t);n.setAttribute("width",ze(o))}return n.setAttribute("src",e.src),n}});Ie({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=mt(t[0],"size");if(n.settings.strict){var o=a[1]==="m",c=l.value.unit==="mu";o?(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 G6(e.dimension,t)},mathmlBuilder(e,t){var n=ln(e.dimension,t);return new Q6(n)}});Ie({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=Ce([],[Ot(e.body,t)]),n=Ce(["inner"],[n],t)):n=Ce(["inner"],[Ot(e.body,t)]);var a=Ce(["fix"],[]),l=Ce([e.alignment],[n,a],t),o=Ce(["strut"]);return o.style.height=ze(l.height+l.depth),l.depth&&(o.style.verticalAlign=ze(-l.depth)),l.children.unshift(o),l=Ce(["thinbox"],[l],t),Ce(["mord","vbox"],[l],t)},mathmlBuilder:(e,t)=>{var n=new Ne("mpadded",[Wt(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}});Ie({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 o=n==="\\("?"\\)":"$",c=a.parseExpression(!1,o);return a.expect(o),a.switchMode(l),{type:"styling",mode:a.mode,style:"text",resetFont:!0,body:c}}});Ie({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new je("Mismatched "+e.funcName)}});var c3=(e,t)=>{switch(t.style.size){case lt.DISPLAY.size:return e.display;case lt.TEXT.size:return e.text;case lt.SCRIPT.size:return e.script;case lt.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};Ie({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:n}=e;return{type:"mathchoice",mode:n.mode,display:Cn(t[0]),text:Cn(t[1]),script:Cn(t[2]),scriptscript:Cn(t[3])}},htmlBuilder:(e,t)=>{var n=c3(e,t),a=zn(n,t,!1);return Pi(a)},mathmlBuilder:(e,t)=>{var n=c3(e,t);return Ql(n,t)}});var Sv=(e,t,n,a,l,o,c)=>{e=Ce([],[e]);var f=n&&$i(n),h,m;if(t){var y=Ot(t,a.havingStyle(l.sup()),a);m={elem:y,kern:Math.max(a.fontMetrics().bigOpSpacing1,a.fontMetrics().bigOpSpacing3-y.depth)}}if(n){var v=Ot(n,a.havingStyle(l.sub()),a);h={elem:v,kern:Math.max(a.fontMetrics().bigOpSpacing2,a.fontMetrics().bigOpSpacing4-v.height)}}var k;if(m&&h){var b=a.fontMetrics().bigOpSpacing5+h.elem.height+h.elem.depth+h.kern+e.depth+c;k=Rt({positionType:"bottom",positionData:b,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:h.elem,marginLeft:ze(-o)},{type:"kern",size:h.kern},{type:"elem",elem:e},{type:"kern",size:m.kern},{type:"elem",elem:m.elem,marginLeft:ze(o)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]})}else if(h){var T=e.height-c;k=Rt({positionType:"top",positionData:T,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:h.elem,marginLeft:ze(-o)},{type:"kern",size:h.kern},{type:"elem",elem:e}]})}else if(m){var N=e.depth+c;k=Rt({positionType:"bottom",positionData:N,children:[{type:"elem",elem:e},{type:"kern",size:m.kern},{type:"elem",elem:m.elem,marginLeft:ze(o)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]})}else return e;var U=[k];if(h&&o!==0&&!f){var D=Ce(["mspace"],[],a);D.style.marginRight=ze(o),U.unshift(D)}return Ce(["mop","op-limits"],U,a)},Cv=new Set(["\\smallint"]),vu=(e,t)=>{var n,a,l=!1,o;e.type==="supsub"?(n=e.sup,a=e.sub,o=mt(e.base,"op"),l=!0):o=mt(e,"op");var c=t.style,f=!1;c.size===lt.DISPLAY.size&&o.symbol&&!Cv.has(o.name)&&(f=!0);var h,m;if(o.symbol){var y=f?"Size2-Regular":"Size1-Regular",v="";if((o.name==="\\oiint"||o.name==="\\oiiint")&&(v=o.name.slice(1),o.name=v==="oiint"?"\\iint":"\\iiint"),h=nr(o.name,y,"math",t,["mop","op-symbol",f?"large-op":"small-op"]),m=h.italic,v.length>0){var k=Y6(v+"Size"+(f?"2":"1"),t);h=Rt({positionType:"individualShift",children:[{type:"elem",elem:h,shift:0},{type:"elem",elem:k,shift:f?.08:0}]}),o.name="\\"+v,h.classes.unshift("mop"),h.italic=m}}else if(o.body){var b=zn(o.body,t,!0);b.length===1&&b[0]instanceof Lr?(h=b[0],h.classes[0]="mop"):h=Ce(["mop"],b,t)}else{for(var T=[],N=1;N<o.name.length;N++)T.push(A1(o.name[N],o.mode,t));h=Ce(["mop"],T,t)}var U=0,D=0;if((h instanceof Lr||o.name==="\\oiint"||o.name==="\\oiiint")&&!o.suppressBaseShift){var M;U=(h.height-h.depth)/2-t.fontMetrics().axisHeight,D=(M=h.italic)!=null?M:0}return l?Sv(h,n,a,t,c,D,U):(U&&(h.style.position="relative",h.style.top=ze(U)),h)},i0=(e,t)=>{var n;if(e.symbol)n=new Ne("mo",[aa(e.name,e.mode)]),Cv.has(e.name)&&n.setAttribute("largeop","false");else if(e.body)n=new Ne("mo",Ur(e.body,t));else{n=new Ne("mi",[new jn(e.name.slice(1))]);var a=new Ne("mo",[aa("","text")]);e.parentIsSupSub?n=new Ne("mrow",[n,a]):n=X6([n,a])}return n},kT={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};Ie({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=kT[l]),{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:l}},htmlBuilder:vu,mathmlBuilder:i0});Ie({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:Cn(a)}},htmlBuilder:vu,mathmlBuilder:i0});var ST={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};Ie({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:vu,mathmlBuilder:i0});Ie({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:vu,mathmlBuilder:i0});Ie({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=ST[a]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:a}},htmlBuilder:vu,mathmlBuilder:i0});var jv=(e,t)=>{var n,a,l=!1,o;e.type==="supsub"?(n=e.sup,a=e.sub,o=mt(e.base,"operatorname"),l=!0):o=mt(e,"operatorname");var c;if(o.body.length>0){for(var f=o.body.map(v=>{var k="text"in v?v.text:void 0;return typeof k=="string"?{type:"textord",mode:v.mode,text:k}:v}),h=zn(f,t.withFont("mathrm"),!0),m=0;m<h.length;m++){var y=h[m];y instanceof Lr&&(y.text=y.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}c=Ce(["mop"],h,t)}else c=Ce(["mop"],[],t);return l?Sv(c,n,a,t,t.style,0,0):c},CT=(e,t)=>{for(var n=Ur(e.body,t.withFont("mathrm")),a=!0,l=0;l<n.length;l++){var o=n[l];if(!(o instanceof Q6))if(o instanceof Ne)switch(o.type){case"mi":case"mn":case"mspace":case"mtext":break;case"mo":{var c=o.children[0];o.children.length===1&&c instanceof jn?c.text=c.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):a=!1;break}default:a=!1}else a=!1}if(a){var f=n.map(y=>y.toText()).join("");n=[new jn(f)]}var h=new Ne("mi",n);h.setAttribute("mathvariant","normal");var m=new Ne("mo",[aa("","text")]);return e.parentIsSupSub?new Ne("mrow",[h,m]):X6([h,m])};Ie({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:Cn(l),alwaysHandleSupSub:a==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:jv,mathmlBuilder:CT});O("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");eo({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?Pi(zn(e.body,t,!1)):Ce(["mord"],zn(e.body,t,!0),t)},mathmlBuilder(e,t){return Ql(e.body,t,!0)}});Ie({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=Ot(e.body,t.havingCrampedStyle()),a=cu("overline-line",t),l=t.fontMetrics().defaultRuleThickness,o=Rt({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"kern",size:3*l},{type:"elem",elem:a},{type:"kern",size:l}]});return Ce(["mord","overline"],[o],t)},mathmlBuilder(e,t){var n=new Ne("mo",[new jn("‾")]);n.setAttribute("stretchy","true");var a=new Ne("mover",[Wt(e.body,t),n]);return a.setAttribute("accent","true"),a}});Ie({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:Cn(a)}},htmlBuilder:(e,t)=>{var n=zn(e.body,t.withPhantom(),!1);return Pi(n)},mathmlBuilder:(e,t)=>{var n=Ur(e.body,t);return new Ne("mphantom",n)}});O("\\hphantom","\\smash{\\phantom{#1}}");Ie({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=Ce(["inner"],[Ot(e.body,t.withPhantom())]),a=Ce(["fix"],[]);return Ce(["mord","rlap"],[n,a],t)},mathmlBuilder:(e,t)=>{var n=Ur(Cn(e.body),t),a=new Ne("mphantom",n),l=new Ne("mpadded",[a]);return l.setAttribute("width","0px"),l}});Ie({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:n}=e,a=mt(t[0],"size").value,l=t[1];return{type:"raisebox",mode:n.mode,dy:a,body:l}},htmlBuilder(e,t){var n=Ot(e.body,t),a=ln(e.dy,t);return Rt({positionType:"shift",positionData:-a,children:[{type:"elem",elem:n}]})},mathmlBuilder(e,t){var n=new Ne("mpadded",[Wt(e.body,t)]),a=e.dy.number+e.dy.unit;return n.setAttribute("voffset",a),n}});Ie({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}});Ie({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],o=mt(t[0],"size"),c=mt(t[1],"size");return{type:"rule",mode:a.mode,shift:l&&mt(l,"size").value,width:o.value,height:c.value}},htmlBuilder(e,t){var n=Ce(["mord","rule"],[],t),a=ln(e.width,t),l=ln(e.height,t),o=e.shift?ln(e.shift,t):0;return n.style.borderRightWidth=ze(a),n.style.borderTopWidth=ze(l),n.style.bottom=ze(o),n.width=a,n.height=l+o,n.depth=-o,n.maxFontSize=l*1.125*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=ln(e.width,t),a=ln(e.height,t),l=e.shift?ln(e.shift,t):0,o=t.color&&t.getColor()||"black",c=new Ne("mspace");c.setAttribute("mathbackground",o),c.setAttribute("width",ze(n)),c.setAttribute("height",ze(a));var f=new Ne("mpadded",[c]);return l>=0?f.setAttribute("height",ze(l)):(f.setAttribute("height",ze(l)),f.setAttribute("depth",ze(-l))),f.setAttribute("voffset",ze(l)),f}});function Tv(e,t,n){for(var a=zn(e,t,!1),l=t.sizeMultiplier/n.sizeMultiplier,o=0;o<a.length;o++){var c=a[o].classes.indexOf("sizing");c<0?Array.prototype.push.apply(a[o].classes,t.sizingClasses(n)):a[o].classes[c+1]==="reset-size"+t.size&&(a[o].classes[c+1]="reset-size"+n.size),a[o].height*=l,a[o].depth*=l}return Pi(a)}var d3=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],jT=(e,t)=>{var n=t.havingSize(e.size);return Tv(e.body,n,t)};Ie({type:"sizing",names:d3,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:n,funcName:a,parser:l}=e,o=l.parseExpression(!1,n);return{type:"sizing",mode:l.mode,size:d3.indexOf(a)+1,body:o}},htmlBuilder:jT,mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),a=Ur(e.body,n),l=new Ne("mstyle",a);return l.setAttribute("mathsize",ze(n.sizeMultiplier)),l}});Ie({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,n)=>{var{parser:a}=e,l=!1,o=!1,c=n[0]&&mt(n[0],"ordgroup");if(c)for(var f,h=0;h<c.body.length;++h){var m=c.body[h];if(f=jf(m).text,f==="t")l=!0;else if(f==="b")o=!0;else{l=!1,o=!1;break}}else l=!0,o=!0;var y=t[0];return{type:"smash",mode:a.mode,body:y,smashHeight:l,smashDepth:o}},htmlBuilder:(e,t)=>{var n=Ce([],[Ot(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 Ce(["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=Rt({positionType:"firstBaseline",children:[{type:"elem",elem:n}]});return Ce(["mord"],[l],t)},mathmlBuilder:(e,t)=>{var n=new Ne("mpadded",[Wt(e.body,t)]);return e.smashHeight&&n.setAttribute("height","0px"),e.smashDepth&&n.setAttribute("depth","0px"),n}});Ie({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:a}=e,l=n[0],o=t[0];return{type:"sqrt",mode:a.mode,body:o,index:l}},htmlBuilder(e,t){var n=Ot(e.body,t.havingCrampedStyle());n.height===0&&(n.height=t.fontMetrics().xHeight),n=du(n,t);var a=t.fontMetrics(),l=a.defaultRuleThickness,o=l;t.style.id<lt.TEXT.id&&(o=t.fontMetrics().xHeight);var c=l+o/4,f=n.height+n.depth+c+l,{span:h,ruleWidth:m,advanceWidth:y}=dT(f,t),v=h.height-m;v>n.height+n.depth+c&&(c=(c+v-n.height-n.depth)/2);var k=h.height-n.height-c-m;n.style.paddingLeft=ze(y);var b=Rt({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 T=t.havingStyle(lt.SCRIPTSCRIPT),N=Ot(e.index,T,t),U=.6*(b.height-b.depth),D=Rt({positionType:"shift",positionData:-U,children:[{type:"elem",elem:N}]}),M=Ce(["root"],[D]);return Ce(["mord","sqrt"],[M,b],t)}else return Ce(["mord","sqrt"],[b],t)},mathmlBuilder(e,t){var{body:n,index:a}=e;return a?new Ne("mroot",[Wt(n,t),Wt(a,t)]):new Ne("msqrt",[Wt(n,t)])}});var Up={display:lt.DISPLAY,text:lt.TEXT,script:lt.SCRIPT,scriptscript:lt.SCRIPTSCRIPT};function TT(e){return e in Up}Ie({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,o=l.parseExpression(!0,n),c=a.slice(1,a.length-5);if(!TT(c))throw new Error("Unknown style: "+c);return{type:"styling",mode:l.mode,style:c,body:o}},htmlBuilder(e,t){var n=Up[e.style],a=t.havingStyle(n);return e.resetFont&&(a=a.withFont("")),Tv(e.body,a,t)},mathmlBuilder(e,t){var n=Up[e.style],a=t.havingStyle(n);e.resetFont&&(a=a.withFont(""));var l=Ur(e.body,a),o=new Ne("mstyle",l),c={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},f=c[e.style];return o.setAttribute("scriptlevel",f[0]),o.setAttribute("displaystyle",f[1]),o}});var AT=function(t,n){var a=t.base;if(a)if(a.type==="op"){var l=a.limits&&(n.style.size===lt.DISPLAY.size||a.alwaysHandleSupSub);return l?vu:null}else if(a.type==="operatorname"){var o=a.alwaysHandleSupSub&&(n.style.size===lt.DISPLAY.size||a.limits);return o?jv:null}else{if(a.type==="accent")return $i(a.base)?z1:null;if(a.type==="horizBrace"){var c=!t.sub;return c===a.isOver?kv:null}else return null}else return null};eo({type:"supsub",htmlBuilder(e,t){var n=AT(e,t);if(n)return n(e,t);var{base:a,sup:l,sub:o}=e,c=Ot(a,t),f,h,m=t.fontMetrics(),y=0,v=0,k=a&&$i(a);if(l){var b=t.havingStyle(t.style.sup());f=Ot(l,b,t),k||(y=c.height-b.fontMetrics().supDrop*b.sizeMultiplier/t.sizeMultiplier)}if(o){var T=t.havingStyle(t.style.sub());h=Ot(o,T,t),k||(v=c.depth+T.fontMetrics().subDrop*T.sizeMultiplier/t.sizeMultiplier)}var N;t.style===lt.DISPLAY?N=m.sup1:t.style.cramped?N=m.sup3:N=m.sup2;var U=t.sizeMultiplier,D=ze(.5/m.ptPerEm/U),M=null;if(h){var L=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");if(c instanceof Lr||L){var G;M=ze(-((G=c.italic)!=null?G:0))}}var te;if(f&&h){y=Math.max(y,N,f.depth+.25*m.xHeight),v=Math.max(v,m.sub2);var _=m.defaultRuleThickness,W=4*_;if(y-f.depth-(h.height-v)<W){v=W-(y-f.depth)+h.height;var ae=.8*m.xHeight-(y-f.depth);ae>0&&(y+=ae,v-=ae)}var Q=[{type:"elem",elem:h,shift:v,marginRight:D,marginLeft:M},{type:"elem",elem:f,shift:-y,marginRight:D}];te=Rt({positionType:"individualShift",children:Q})}else if(h){v=Math.max(v,m.sub1,h.height-.8*m.xHeight);var F=[{type:"elem",elem:h,marginLeft:M,marginRight:D}];te=Rt({positionType:"shift",positionData:v,children:F})}else if(f)y=Math.max(y,N,f.depth+.25*m.xHeight),te=Rt({positionType:"shift",positionData:-y,children:[{type:"elem",elem:f,marginRight:D}]});else throw new Error("supsub must have either sup or sub.");var oe=_p(c,"right")||"mord";return Ce([oe],[c,Ce(["msupsub"],[te])],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 o=[Wt(e.base,t)];e.sub&&o.push(Wt(e.sub,t)),e.sup&&o.push(Wt(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===lt.DISPLAY||m&&m.type==="operatorname"&&m.alwaysHandleSupSub&&(t.style===lt.DISPLAY||m.limits)?c="munderover":c="msubsup"}else{var h=e.base;h&&h.type==="op"&&h.limits&&(t.style===lt.DISPLAY||h.alwaysHandleSupSub)||h&&h.type==="operatorname"&&h.alwaysHandleSupSub&&(h.limits||t.style===lt.DISPLAY)?c="munder":c="msub"}else{var f=e.base;f&&f.type==="op"&&f.limits&&(t.style===lt.DISPLAY||f.alwaysHandleSupSub)||f&&f.type==="operatorname"&&f.alwaysHandleSupSub&&(f.limits||t.style===lt.DISPLAY)?c="mover":c="msup"}return new Ne(c,o)}});eo({type:"atom",htmlBuilder(e,t){return A1(e.text,e.mode,t,["m"+e.family])},mathmlBuilder(e,t){var n=new Ne("mo",[aa(e.text,e.mode)]);if(e.family==="bin"){var a=M1(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 Av={mi:"italic",mn:"normal",mtext:"normal"};eo({type:"mathord",htmlBuilder(e,t){return kf(e,t,"mathord")},mathmlBuilder(e,t){var n=new Ne("mi",[aa(e.text,e.mode,t)]),a=M1(e,t)||"italic";return a!==Av[n.type]&&n.setAttribute("mathvariant",a),n}});eo({type:"textord",htmlBuilder(e,t){return kf(e,t,"textord")},mathmlBuilder(e,t){var n=aa(e.text,e.mode,t),a=M1(e,t)||"normal",l;return e.mode==="text"?l=new Ne("mtext",[n]):/[0-9]/.test(e.text)?l=new Ne("mn",[n]):e.text==="\\prime"?l=new Ne("mo",[n]):l=new Ne("mi",[n]),a!==Av[l.type]&&l.setAttribute("mathvariant",a),l}});var Gm={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Vm={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};eo({type:"spacing",htmlBuilder(e,t){if(Vm.hasOwnProperty(e.text)){var n=Vm[e.text].className||"";if(e.mode==="text"){var a=kf(e,t,"textord");return a.classes.push(n),a}else return Ce(["mspace",n],[A1(e.text,e.mode,t)],t)}else{if(Gm.hasOwnProperty(e.text))return Ce(["mspace",Gm[e.text]],[],t);throw new je('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,t){var n;if(Vm.hasOwnProperty(e.text))n=new Ne("mtext",[new jn(" ")]);else{if(Gm.hasOwnProperty(e.text))return new Ne("mspace");throw new je('Unknown type of space "'+e.text+'"')}return n}});var f3=()=>{var e=new Ne("mtd",[]);return e.setAttribute("width","50%"),e};eo({type:"tag",mathmlBuilder(e,t){var n=new Ne("mtable",[new Ne("mtr",[f3(),new Ne("mtd",[Ql(e.body,t)]),f3(),new Ne("mtd",[Ql(e.tag,t)])])]);return n.setAttribute("width","100%"),n}});var h3={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},m3={"\\textbf":"textbf","\\textmd":"textmd"},ET={"\\textit":"textit","\\textup":"textup"},p3=(e,t)=>{var n=e.font;if(n){if(h3[n])return t.withTextFontFamily(h3[n]);if(m3[n])return t.withTextFontWeight(m3[n]);if(n==="\\emph")return t.fontShape==="textit"?t.withTextFontShape("textup"):t.withTextFontShape("textit")}else return t;return t.withTextFontShape(ET[n])};Ie({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:Cn(l),font:a}},htmlBuilder(e,t){var n=p3(e,t),a=zn(e.body,n,!0);return Ce(["mord","text"],a,n)},mathmlBuilder(e,t){var n=p3(e,t);return Ql(e.body,n)}});Ie({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=Ot(e.body,t),a=cu("underline-line",t),l=t.fontMetrics().defaultRuleThickness,o=Rt({positionType:"top",positionData:n.height,children:[{type:"kern",size:l},{type:"elem",elem:a},{type:"kern",size:3*l},{type:"elem",elem:n}]});return Ce(["mord","underline"],[o],t)},mathmlBuilder(e,t){var n=new Ne("mo",[new jn("‾")]);n.setAttribute("stretchy","true");var a=new Ne("munder",[Wt(e.body,t),n]);return a.setAttribute("accentunder","true"),a}});Ie({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=Ot(e.body,t),a=t.fontMetrics().axisHeight,l=.5*(n.height-a-(n.depth+a));return Rt({positionType:"shift",positionData:l,children:[{type:"elem",elem:n}]})},mathmlBuilder(e,t){var n=new Ne("mpadded",[Wt(e.body,t)],["vcenter"]);return new Ne("mrow",[n])}});Ie({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,n){throw new je("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var n=g3(e),a=[],l=t.havingStyle(t.style.text()),o=0;o<n.length;o++){var c=n[o];c==="~"&&(c="\\textasciitilde"),a.push(nr(c,"Typewriter-Regular",e.mode,l,["mord","texttt"]))}return Ce(["mord","text"].concat(l.sizingClasses(t)),P6(a),l)},mathmlBuilder(e,t){var n=new jn(g3(e)),a=new Ne("mtext",[n]);return a.setAttribute("mathvariant","monospace"),a}});var g3=e=>e.body.replace(/ /g,e.star?"␣":" "),Yl=W6,Ev=`[ \r
|
|
334
|
-
]`,NT="\\\\[a-zA-Z@]+",MT="\\\\[^\uD800-\uDFFF]",zT="("+NT+")"+Ev+"*",DT=`\\\\(
|
|
335
|
-
|[ \r ]+
|
|
336
|
-
?)[ \r ]*`,Hp="[̀-ͯ]",RT=new RegExp(Hp+"+$"),OT="("+Ev+"+)|"+(DT+"|")+"([!-\\[\\]-‧-豈-]"+(Hp+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(Hp+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+zT)+("|"+MT+")");class y3{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(OT,"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 Br("EOF",new Sr(this,n,n));var a=this.tokenRegex.exec(t);if(a===null||a.index!==n)throw new je("Unexpected character: '"+t[n]+"'",new Br(t[n],new Sr(this,n,n+1)));var l=a[6]||a[3]||(a[2]?"\\ ":" ");if(this.catcodes[l]===14){var o=t.indexOf(`
|
|
337
|
-
`,this.tokenRegex.lastIndex);return o===-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=o+1,this.lex()}return new Br(l,new Sr(this,n,this.tokenRegex.lastIndex))}}class _T{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 je("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 o=this.undefStack[this.undefStack.length-1];o&&!o.hasOwnProperty(t)&&(o[t]=this.current[t])}n==null?delete this.current[t]:this.current[t]=n}}var IT=yv;O("\\noexpand",function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}});O("\\expandafter",function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}});O("\\@firstoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[0],numArgs:0}});O("\\@secondoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[1],numArgs:0}});O("\\@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}});O("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");O("\\TextOrMath",function(e){var t=e.consumeArgs(2);return e.mode==="text"?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var v3={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};O("\\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 je("\\char` missing argument");a=t.text.charCodeAt(0)}else n=10;if(n){if(a=v3[t.text],a==null||a>=n)throw new je("Invalid base-"+n+" digit "+t.text);for(var l;(l=v3[e.future().text])!=null&&l<n;)a*=n,a+=l,e.popToken()}return"\\@char{"+a+"}"});var _1=(e,t,n,a)=>{var l=e.consumeArg().tokens;if(l.length!==1)throw new je("\\newcommand's first argument must be a macro name");var o=l[0].text,c=e.isDefined(o);if(c&&!t)throw new je("\\newcommand{"+o+"} attempting to redefine "+(o+"; use \\renewcommand"));if(!c&&!n)throw new je("\\renewcommand{"+o+"} when command "+o+" 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 je("Invalid number of arguments: "+h);f=parseInt(h),l=e.consumeArg().tokens}return c&&a||e.macros.set(o,{tokens:l,numArgs:f}),""};O("\\newcommand",e=>_1(e,!1,!0,!1));O("\\renewcommand",e=>_1(e,!0,!1,!1));O("\\providecommand",e=>_1(e,!0,!0,!0));O("\\message",e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(n=>n.text).join("")),""});O("\\errmessage",e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(n=>n.text).join("")),""});O("\\show",e=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),Yl[n],Jt.math[n],Jt.text[n]),""});O("\\bgroup","{");O("\\egroup","}");O("~","\\nobreakspace");O("\\lq","`");O("\\rq","'");O("\\aa","\\r a");O("\\AA","\\r A");O("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");O("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");O("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");O("ℬ","\\mathscr{B}");O("ℰ","\\mathscr{E}");O("ℱ","\\mathscr{F}");O("ℋ","\\mathscr{H}");O("ℐ","\\mathscr{I}");O("ℒ","\\mathscr{L}");O("ℳ","\\mathscr{M}");O("ℛ","\\mathscr{R}");O("ℭ","\\mathfrak{C}");O("ℌ","\\mathfrak{H}");O("ℨ","\\mathfrak{Z}");O("\\Bbbk","\\Bbb{k}");O("\\llap","\\mathllap{\\textrm{#1}}");O("\\rlap","\\mathrlap{\\textrm{#1}}");O("\\clap","\\mathclap{\\textrm{#1}}");O("\\mathstrut","\\vphantom{(}");O("\\underbar","\\underline{\\text{#1}}");O("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}');O("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");O("\\ne","\\neq");O("≠","\\neq");O("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");O("∉","\\notin");O("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");O("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");O("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");O("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");O("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");O("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");O("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");O("⟂","\\perp");O("‼","\\mathclose{!\\mkern-0.8mu!}");O("∌","\\notni");O("⌜","\\ulcorner");O("⌝","\\urcorner");O("⌞","\\llcorner");O("⌟","\\lrcorner");O("©","\\copyright");O("®","\\textregistered");O("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');O("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');O("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');O("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');O("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");O("⋮","\\vdots");O("\\varGamma","\\mathit{\\Gamma}");O("\\varDelta","\\mathit{\\Delta}");O("\\varTheta","\\mathit{\\Theta}");O("\\varLambda","\\mathit{\\Lambda}");O("\\varXi","\\mathit{\\Xi}");O("\\varPi","\\mathit{\\Pi}");O("\\varSigma","\\mathit{\\Sigma}");O("\\varUpsilon","\\mathit{\\Upsilon}");O("\\varPhi","\\mathit{\\Phi}");O("\\varPsi","\\mathit{\\Psi}");O("\\varOmega","\\mathit{\\Omega}");O("\\substack","\\begin{subarray}{c}#1\\end{subarray}");O("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");O("\\boxed","\\fbox{$\\displaystyle{#1}$}");O("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");O("\\implies","\\DOTSB\\;\\Longrightarrow\\;");O("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");O("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");O("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var x3={",":"\\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"},BT=new Set(["bin","rel"]);O("\\dots",function(e){var t="\\dotso",n=e.expandAfterFuture().text;return n in x3?t=x3[n]:(n.slice(0,4)==="\\not"||n in Jt.math&&BT.has(Jt.math[n].group))&&(t="\\dotsb"),t});var I1={")":!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};O("\\dotso",function(e){var t=e.future().text;return t in I1?"\\ldots\\,":"\\ldots"});O("\\dotsc",function(e){var t=e.future().text;return t in I1&&t!==","?"\\ldots\\,":"\\ldots"});O("\\cdots",function(e){var t=e.future().text;return t in I1?"\\@cdots\\,":"\\@cdots"});O("\\dotsb","\\cdots");O("\\dotsm","\\cdots");O("\\dotsi","\\!\\cdots");O("\\dotsx","\\ldots\\,");O("\\DOTSI","\\relax");O("\\DOTSB","\\relax");O("\\DOTSX","\\relax");O("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");O("\\,","\\tmspace+{3mu}{.1667em}");O("\\thinspace","\\,");O("\\>","\\mskip{4mu}");O("\\:","\\tmspace+{4mu}{.2222em}");O("\\medspace","\\:");O("\\;","\\tmspace+{5mu}{.2777em}");O("\\thickspace","\\;");O("\\!","\\tmspace-{3mu}{.1667em}");O("\\negthinspace","\\!");O("\\negmedspace","\\tmspace-{4mu}{.2222em}");O("\\negthickspace","\\tmspace-{5mu}{.277em}");O("\\enspace","\\kern.5em ");O("\\enskip","\\hskip.5em\\relax");O("\\quad","\\hskip1em\\relax");O("\\qquad","\\hskip2em\\relax");O("\\tag","\\@ifstar\\tag@literal\\tag@paren");O("\\tag@paren","\\tag@literal{({#1})}");O("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new je("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});O("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");O("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");O("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");O("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");O("\\newline","\\\\\\relax");O("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var Nv=ze(Ya["Main-Regular"][84][1]-.7*Ya["Main-Regular"][65][1]);O("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+Nv+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");O("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+Nv+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");O("\\hspace","\\@ifstar\\@hspacer\\@hspace");O("\\@hspace","\\hskip #1\\relax");O("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");O("\\ordinarycolon",":");O("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");O("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');O("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');O("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');O("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');O("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');O("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');O("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');O("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');O("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');O("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');O("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');O("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');O("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');O("∷","\\dblcolon");O("∹","\\eqcolon");O("≔","\\coloneqq");O("≕","\\eqqcolon");O("⩴","\\Coloneqq");O("\\ratio","\\vcentcolon");O("\\coloncolon","\\dblcolon");O("\\colonequals","\\coloneqq");O("\\coloncolonequals","\\Coloneqq");O("\\equalscolon","\\eqqcolon");O("\\equalscoloncolon","\\Eqqcolon");O("\\colonminus","\\coloneq");O("\\coloncolonminus","\\Coloneq");O("\\minuscolon","\\eqcolon");O("\\minuscoloncolon","\\Eqcolon");O("\\coloncolonapprox","\\Colonapprox");O("\\coloncolonsim","\\Colonsim");O("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");O("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");O("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");O("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");O("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");O("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");O("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");O("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");O("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");O("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");O("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");O("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");O("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");O("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");O("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");O("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");O("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");O("\\nleqq","\\html@mathml{\\@nleqq}{≰}");O("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");O("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");O("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");O("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");O("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");O("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");O("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");O("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");O("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");O("\\imath","\\html@mathml{\\@imath}{ı}");O("\\jmath","\\html@mathml{\\@jmath}{ȷ}");O("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");O("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");O("⟦","\\llbracket");O("⟧","\\rrbracket");O("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");O("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");O("⦃","\\lBrace");O("⦄","\\rBrace");O("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");O("⦵","\\minuso");O("\\darr","\\downarrow");O("\\dArr","\\Downarrow");O("\\Darr","\\Downarrow");O("\\lang","\\langle");O("\\rang","\\rangle");O("\\uarr","\\uparrow");O("\\uArr","\\Uparrow");O("\\Uarr","\\Uparrow");O("\\N","\\mathbb{N}");O("\\R","\\mathbb{R}");O("\\Z","\\mathbb{Z}");O("\\alef","\\aleph");O("\\alefsym","\\aleph");O("\\Alpha","\\mathrm{A}");O("\\Beta","\\mathrm{B}");O("\\bull","\\bullet");O("\\Chi","\\mathrm{X}");O("\\clubs","\\clubsuit");O("\\cnums","\\mathbb{C}");O("\\Complex","\\mathbb{C}");O("\\Dagger","\\ddagger");O("\\diamonds","\\diamondsuit");O("\\empty","\\emptyset");O("\\Epsilon","\\mathrm{E}");O("\\Eta","\\mathrm{H}");O("\\exist","\\exists");O("\\harr","\\leftrightarrow");O("\\hArr","\\Leftrightarrow");O("\\Harr","\\Leftrightarrow");O("\\hearts","\\heartsuit");O("\\image","\\Im");O("\\infin","\\infty");O("\\Iota","\\mathrm{I}");O("\\isin","\\in");O("\\Kappa","\\mathrm{K}");O("\\larr","\\leftarrow");O("\\lArr","\\Leftarrow");O("\\Larr","\\Leftarrow");O("\\lrarr","\\leftrightarrow");O("\\lrArr","\\Leftrightarrow");O("\\Lrarr","\\Leftrightarrow");O("\\Mu","\\mathrm{M}");O("\\natnums","\\mathbb{N}");O("\\Nu","\\mathrm{N}");O("\\Omicron","\\mathrm{O}");O("\\plusmn","\\pm");O("\\rarr","\\rightarrow");O("\\rArr","\\Rightarrow");O("\\Rarr","\\Rightarrow");O("\\real","\\Re");O("\\reals","\\mathbb{R}");O("\\Reals","\\mathbb{R}");O("\\Rho","\\mathrm{P}");O("\\sdot","\\cdot");O("\\sect","\\S");O("\\spades","\\spadesuit");O("\\sub","\\subset");O("\\sube","\\subseteq");O("\\supe","\\supseteq");O("\\Tau","\\mathrm{T}");O("\\thetasym","\\vartheta");O("\\weierp","\\wp");O("\\Zeta","\\mathrm{Z}");O("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");O("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");O("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");O("\\bra","\\mathinner{\\langle{#1}|}");O("\\ket","\\mathinner{|{#1}\\rangle}");O("\\braket","\\mathinner{\\langle{#1}\\rangle}");O("\\Bra","\\left\\langle#1\\right|");O("\\Ket","\\left|#1\\right\\rangle");var Mv=e=>t=>{var n=t.consumeArg().tokens,a=t.consumeArg().tokens,l=t.consumeArg().tokens,o=t.consumeArg().tokens,c=t.macros.get("|"),f=t.macros.get("\\|");t.macros.beginGroup();var h=v=>k=>{e&&(k.macros.set("|",c),l.length&&k.macros.set("\\|",f));var b=v;if(!v&&l.length){var T=k.future();T.text==="|"&&(k.popToken(),b=!0)}return{tokens:b?l:a,numArgs:0}};t.macros.set("|",h(!1)),l.length&&t.macros.set("\\|",h(!0));var m=t.consumeArg().tokens,y=t.expandTokens([...o,...m,...n]);return t.macros.endGroup(),{tokens:y.reverse(),numArgs:0}};O("\\bra@ket",Mv(!1));O("\\bra@set",Mv(!0));O("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");O("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");O("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");O("\\angln","{\\angl n}");O("\\blue","\\textcolor{##6495ed}{#1}");O("\\orange","\\textcolor{##ffa500}{#1}");O("\\pink","\\textcolor{##ff00af}{#1}");O("\\red","\\textcolor{##df0030}{#1}");O("\\green","\\textcolor{##28ae7b}{#1}");O("\\gray","\\textcolor{gray}{#1}");O("\\purple","\\textcolor{##9d38bd}{#1}");O("\\blueA","\\textcolor{##ccfaff}{#1}");O("\\blueB","\\textcolor{##80f6ff}{#1}");O("\\blueC","\\textcolor{##63d9ea}{#1}");O("\\blueD","\\textcolor{##11accd}{#1}");O("\\blueE","\\textcolor{##0c7f99}{#1}");O("\\tealA","\\textcolor{##94fff5}{#1}");O("\\tealB","\\textcolor{##26edd5}{#1}");O("\\tealC","\\textcolor{##01d1c1}{#1}");O("\\tealD","\\textcolor{##01a995}{#1}");O("\\tealE","\\textcolor{##208170}{#1}");O("\\greenA","\\textcolor{##b6ffb0}{#1}");O("\\greenB","\\textcolor{##8af281}{#1}");O("\\greenC","\\textcolor{##74cf70}{#1}");O("\\greenD","\\textcolor{##1fab54}{#1}");O("\\greenE","\\textcolor{##0d923f}{#1}");O("\\goldA","\\textcolor{##ffd0a9}{#1}");O("\\goldB","\\textcolor{##ffbb71}{#1}");O("\\goldC","\\textcolor{##ff9c39}{#1}");O("\\goldD","\\textcolor{##e07d10}{#1}");O("\\goldE","\\textcolor{##a75a05}{#1}");O("\\redA","\\textcolor{##fca9a9}{#1}");O("\\redB","\\textcolor{##ff8482}{#1}");O("\\redC","\\textcolor{##f9685d}{#1}");O("\\redD","\\textcolor{##e84d39}{#1}");O("\\redE","\\textcolor{##bc2612}{#1}");O("\\maroonA","\\textcolor{##ffbde0}{#1}");O("\\maroonB","\\textcolor{##ff92c6}{#1}");O("\\maroonC","\\textcolor{##ed5fa6}{#1}");O("\\maroonD","\\textcolor{##ca337c}{#1}");O("\\maroonE","\\textcolor{##9e034e}{#1}");O("\\purpleA","\\textcolor{##ddd7ff}{#1}");O("\\purpleB","\\textcolor{##c6b9fc}{#1}");O("\\purpleC","\\textcolor{##aa87ff}{#1}");O("\\purpleD","\\textcolor{##7854ab}{#1}");O("\\purpleE","\\textcolor{##543b78}{#1}");O("\\mintA","\\textcolor{##f5f9e8}{#1}");O("\\mintB","\\textcolor{##edf2df}{#1}");O("\\mintC","\\textcolor{##e0e5cc}{#1}");O("\\grayA","\\textcolor{##f6f7f7}{#1}");O("\\grayB","\\textcolor{##f0f1f2}{#1}");O("\\grayC","\\textcolor{##e3e5e6}{#1}");O("\\grayD","\\textcolor{##d6d8da}{#1}");O("\\grayE","\\textcolor{##babec2}{#1}");O("\\grayF","\\textcolor{##888d93}{#1}");O("\\grayG","\\textcolor{##626569}{#1}");O("\\grayH","\\textcolor{##3b3e40}{#1}");O("\\grayI","\\textcolor{##21242c}{#1}");O("\\kaBlue","\\textcolor{##314453}{#1}");O("\\kaGreen","\\textcolor{##71B307}{#1}");var zv={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class LT{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 _T(IT,n.macros),this.mode=a,this.stack=[]}feed(t){this.lexer=new y3(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 Br("EOF",a.loc)),this.pushTokens(l),new Br("",Sr.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(),o,c=0,f=0;do{if(o=this.popToken(),n.push(o),o.text==="{")++c;else if(o.text==="}"){if(--c,c===-1)throw new je("Extra }",o)}else if(o.text==="EOF")throw new je("Unexpected end of input in a macro argument, expected '"+(t&&a?t[f]:"}")+"'",o);if(t&&a)if((c===0||c===1&&t[f]==="{")&&o.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:o}}consumeArgs(t,n){if(n){if(n.length!==t+1)throw new je("The length of delimiters doesn't match the number of args!");for(var a=n[0],l=0;l<a.length;l++){var o=this.popToken();if(a[l]!==o.text)throw new je("Use of the macro doesn't match its definition",o)}}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 je("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 je("Undefined control sequence: "+a);return this.pushToken(n),!1}this.countExpansion(1);var o=l.tokens,c=this.consumeArgs(l.numArgs,l.delimiters);if(l.numArgs){o=o.slice();for(var f=o.length-1;f>=0;--f){var h=o[f];if(h.text==="#"){if(f===0)throw new je("Incomplete placeholder at end of macro body",h);if(h=o[--f],h.text==="#")o.splice(f+1,1);else if(/^[1-9]$/.test(h.text))o.splice(f,2,...c[+h.text-1]);else throw new je("Not a valid argument number",h)}}}return this.pushTokens(o),o.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 Br(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 o=0;if(l.includes("#"))for(var c=l.replace(/##/g,"");c.includes("#"+(o+1));)++o;for(var f=new y3(l,this.settings),h=[],m=f.lex();m.text!=="EOF";)h.push(m),m=f.lex();h.reverse();var y={tokens:h,numArgs:o};return y}return l}isDefined(t){return this.macros.has(t)||Yl.hasOwnProperty(t)||Jt.math.hasOwnProperty(t)||Jt.text.hasOwnProperty(t)||zv.hasOwnProperty(t)}isExpandable(t){var n=this.macros.get(t);return n!=null?typeof n=="string"||typeof n=="function"||!n.unexpandable:Yl.hasOwnProperty(t)&&!Yl[t].primitive}}var b3=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Id=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","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),Ym={"́":{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"}},w3={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class Df{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 LT(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 je("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 Br("}")),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(Df.endOfExpression.has(l.text)||n&&l.text===n||t&&Yl[l.text]&&Yl[l.text].infix)break;var o=this.parseAtom(n);if(o){if(o.type==="internal")continue}else break;a.push(o)}return this.mode==="text"&&this.formLigatures(a),this.handleInfixNodes(a)}handleInfixNodes(t){for(var n=-1,a,l=0;l<t.length;l++){var o=t[l];if(o.type==="infix"){if(n!==-1)throw new je("only one infix operator per group",o.token);n=l,a=o.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 y;return a==="\\\\abovefrac"?y=this.callFunction(a,[c,t[n],f],[]):y=this.callFunction(a,[c,f],[]),[y]}else return t}handleSupSubscript(t){var n=this.fetch(),a=n.text;this.consume(),this.consumeSpaces();var l;do{var o;l=this.parseGroup(t)}while(((o=l)==null?void 0:o.type)==="internal");if(!l)throw new je("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},o={type:"color",mode:this.mode,color:this.settings.errorColor,body:[l]};return o}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 o=this.fetch();if(o.text==="\\limits"||o.text==="\\nolimits"){if(n&&n.type==="op"){var c=o.text==="\\limits";n.limits=c,n.alwaysHandleSupSub=!0}else if(n&&n.type==="operatorname")n.alwaysHandleSupSub&&(n.limits=o.text==="\\limits");else throw new je("Limit controls must follow a math operator",o);this.consume()}else if(o.text==="^"){if(a)throw new je("Double superscript",o);a=this.handleSupSubscript("superscript")}else if(o.text==="_"){if(l)throw new je("Double subscript",o);l=this.handleSupSubscript("subscript")}else if(o.text==="'"){if(a)throw new je("Double superscript",o);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(Id[o.text]){var m=b3.test(o.text),y=[];for(y.push(new Br(Id[o.text])),this.consume();;){var v=this.fetch().text;if(!Id[v]||b3.test(v)!==m)break;y.unshift(new Br(Id[v])),this.consume()}var k=this.subparse(y);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,o=Yl[l];if(!o)return null;if(this.consume(),n&&n!=="atom"&&!o.allowedInArgument)throw new je("Got function '"+l+"' with no arguments"+(n?" as "+n:""),a);if(this.mode==="text"&&!o.allowedInText)throw new je("Can't use function '"+l+"' in text mode",a);if(this.mode==="math"&&o.allowedInMath===!1)throw new je("Can't use function '"+l+"' in math mode",a);var{args:c,optArgs:f}=this.parseArguments(l,o);return this.callFunction(l,c,f,a,t)}callFunction(t,n,a,l,o){var c={funcName:t,parser:this,token:l,breakOnTokenText:o},f=Yl[t];if(f&&f.handler)return f.handler(c,n,a);throw new je("No function handler for "+t)}parseArguments(t,n){var a=n.numArgs+n.numOptionalArgs;if(a===0)return{args:[],optArgs:[]};for(var l=[],o=[],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&&o[0]==null)&&(f="primitive");var m=this.parseGroupOfType("argument to '"+t+"'",f,h);if(h)o.push(m);else if(m!=null)l.push(m);else throw new je("Null argument, please report this as a bug")}return{args:l,optArgs:o}}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 o=this.parseStringGroup("raw",a);return o!=null?{type:"raw",mode:"text",string:o.text}:null}case"primitive":{if(a)throw new je("A primitive argument cannot be optional");var c=this.parseGroup(t);if(c==null)throw new je("Expected group as "+t,this.fetch());return c}case"original":case null:case void 0:return this.parseArgumentGroup(a);default:throw new je("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="",o;(o=this.fetch()).text!=="EOF";)l+=o.text,this.consume();return this.consume(),a.text=l,a}parseRegexGroup(t,n){for(var a=this.fetch(),l=a,o="",c;(c=this.fetch()).text!=="EOF"&&t.test(o+c.text);)l=c,o+=l.text,this.consume();if(o==="")throw new je("Invalid "+n+": '"+a.text+"'",a);return a.range(l,o)}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 je("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 je("Invalid size: '"+n.text+"'",n);var o={number:+(l[1]+l[2]),unit:l[3]};if(!L6(o))throw new je("Invalid unit: '"+o.unit+"'",n);return{type:"size",mode:this.mode,value:o,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 o=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var c={type:"ordgroup",mode:this.mode,loc:a.loc,body:o};return n&&this.switchMode(l),c}parseGroup(t,n){var a=this.fetch(),l=a.text,o;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(),o={type:"ordgroup",mode:this.mode,loc:Sr.range(a,h),body:f,semisimple:l==="\\begingroup"||void 0}}else if(o=this.parseFunction(n,t)||this.parseSymbol(),o==null&&l[0]==="\\"&&!zv.hasOwnProperty(l)){if(this.settings.throwOnError)throw new je("Undefined control sequence: "+l,a);o=this.formatUnsupportedCmd(l),this.consume()}return o}formLigatures(t){for(var n=t.length-1,a=0;a<n;++a){var l=t[a];if(l.type==="textord"){var o=l.text,c=t[a+1];if(!(!c||c.type!=="textord")){if(o==="-"&&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:Sr.range(l,f),text:"---"}),n-=2):(t.splice(a,2,{type:"textord",mode:"text",loc:Sr.range(l,c),text:"--"}),n-=1)}(o==="'"||o==="`")&&c.text===o&&(t.splice(a,2,{type:"textord",mode:"text",loc:Sr.range(l,c),text:o+o}),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 je(`\\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}}w3.hasOwnProperty(n[0])&&!Jt[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=w3[n[0]]+n.slice(1));var o=RT.exec(n);o&&(n=n.substring(0,o.index),n==="i"?n="ı":n==="j"&&(n="ȷ"));var c;if(Jt[this.mode][n]){this.settings.strict&&this.mode==="math"&&Ap.includes(n)&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+n[0]+'" used in math mode',t);var f=Jt[this.mode][n].group,h=Sr.range(t),m;eT(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&&(B6(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:Sr.range(t),text:n};else return null;if(this.consume(),o)for(var y=0;y<o[0].length;y++){var v=o[0][y];if(!Ym[v])throw new je("Unknown accent ' "+v+"'",t);var k=Ym[v][this.mode]||Ym[v].text;if(!k)throw new je("Accent "+v+" unsupported in "+this.mode+" mode",t);c={type:"accent",mode:this.mode,loc:Sr.range(t),label:k,isStretchy:!1,isShifty:!0,base:c}}return c}}Df.endOfExpression=new Set(["}","\\endgroup","\\end","\\right","&"]);var B1=function(t,n){if(!(typeof t=="string"||t instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var a=new Df(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 je("\\tag works only in display equations");l=[{type:"tag",mode:"text",body:l,tag:a.subparse([new Br("\\df@tag")])}]}return l},L1=function(t,n,a){n.textContent="";var l=Rf(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."),L1=function(){throw new je("KaTeX doesn't work in quirks mode.")});var Dv=function(t,n){var a=Rf(t,n).toMarkup();return a},Rv=function(t,n){var a=new S1(n);return B1(t,a)},Ov=function(t,n,a){if(a.throwOnError||!(t instanceof je))throw t;var l=Ce(["katex-error"],[new Lr(n)]);return l.setAttribute("title",t.toString()),l.setAttribute("style","color:"+a.errorColor),l},Rf=function(t,n){var a=new S1(n);try{var l=B1(t,a);return Vj(l,t,a)}catch(o){return Ov(o,t,a)}},_v=function(t,n){var a=new S1(n);try{var l=B1(t,a);return Yj(l,t,a)}catch(o){return Ov(o,t,a)}},Iv="0.16.47",Bv={Span:gu,Anchor:bf,SymbolNode:Lr,SvgNode:Ui,PathNode:Kl,LineNode:Tp},$p={version:Iv,render:L1,renderToString:Dv,ParseError:je,SETTINGS_SCHEMA:af,__parse:Rv,__renderToDomTree:Rf,__renderToHTMLTree:_v,__setFontMetrics:$6,__defineSymbol:w,__defineFunction:Ie,__defineMacro:O,__domTree:Bv};const HD=Object.freeze(Object.defineProperty({__proto__:null,ParseError:je,SETTINGS_SCHEMA:af,__defineFunction:Ie,__defineMacro:O,__defineSymbol:w,__domTree:Bv,__parse:Rv,__renderToDomTree:Rf,__renderToHTMLTree:_v,__setFontMetrics:$6,default:$p,get render(){return L1},renderToString:Dv,version:Iv},Symbol.toStringTag,{value:"Module"})),qT={};function UT(e){const t=this,n=e||qT,a=t.data(),l=a.micromarkExtensions||(a.micromarkExtensions=[]),o=a.fromMarkdownExtensions||(a.fromMarkdownExtensions=[]),c=a.toMarkdownExtensions||(a.toMarkdownExtensions=[]);l.push(YC(n)),o.push(qC()),c.push(UC(n))}function HT(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,o,c,f)=>n||l||t==="\\\\"?t:c!==void 0?`$${c}$`:f!==void 0?`
|
|
339
|
-
|
|
340
|
-
$$
|
|
341
|
-
${f.trim()}
|
|
342
|
-
$$
|
|
343
|
-
|
|
344
|
-
`:t)}const k3=/[#.]/g;function $T(e,t){const n=e||"",a={};let l=0,o,c;for(;l<n.length;){k3.lastIndex=l;const f=k3.exec(n),h=n.slice(l,f?f.index:n.length);h&&(o?o==="#"?a.id=h:Array.isArray(a.className)?a.className.push(h):a.className=[h]:c=h,l+=h.length),f&&(o=f[0],l++)}return{type:"element",tagName:c||t||"div",properties:a,children:[]}}function Lv(e,t,n){const a=n?VT(n):void 0;function l(o,c,...f){let h;if(o==null){h={type:"root",children:[]};const m=c;f.unshift(m)}else{h=$T(o,t);const m=h.tagName.toLowerCase(),y=a?a.get(m):void 0;if(h.tagName=y||m,FT(c))f.unshift(c);else for(const[v,k]of Object.entries(c))PT(e,h.properties,v,k)}for(const m of f)Fp(h.children,m);return h.type==="element"&&h.tagName==="template"&&(h.content={type:"root",children:h.children},h.children=[]),h}return l}function FT(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 o=l;for(const c of o)if(typeof c!="number"&&typeof c!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function PT(e,t,n,a){const l=I5(e,n);let o;if(a!=null){if(typeof a=="number"){if(Number.isNaN(a))return;o=a}else typeof a=="boolean"?o=a:typeof a=="string"?l.spaceSeparated?o=Q2(a):l.commaSeparated?o=V2(a):l.commaOrSpaceSeparated?o=Q2(V2(a).join(" ")):o=S3(l,l.property,a):Array.isArray(a)?o=[...a]:o=l.property==="style"?GT(a):String(a);if(Array.isArray(o)){const c=[];for(const f of o)c.push(S3(l,l.property,f));o=c}l.property==="className"&&Array.isArray(t.className)&&(o=t.className.concat(o)),t[l.property]=o}}function Fp(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)Fp(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Fp(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function S3(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Wc(n)===Wc(t)))return!0}return n}function GT(e){const t=[];for(const[n,a]of Object.entries(e))t.push([n,a].join(": "));return t.join("; ")}function VT(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const YT=["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"],WT=Lv(B5,"div"),KT=Lv(pf,"g",YT),Wm={html:"http://www.w3.org/1999/xhtml",svg:"http://www.w3.org/2000/svg"};function XT(e,t){return qv(e,{})||{type:"root",children:[]}}function qv(e,t){const n=QT(e,t);return n&&t.afterTransform&&t.afterTransform(e,n),n}function QT(e,t){switch(e.nodeType){case 1:return tA(e,t);case 3:return JT(e);case 8:return eA(e);case 9:return C3(e,t);case 10:return ZT();case 11:return C3(e,t);default:return}}function C3(e,t){return{type:"root",children:Uv(e,t)}}function ZT(){return{type:"doctype"}}function JT(e){return{type:"text",value:e.nodeValue||""}}function eA(e){return{type:"comment",value:e.nodeValue||""}}function tA(e,t){const n=e.namespaceURI,a=n===Wm.svg?KT:WT,l=n===Wm.html?e.tagName.toLowerCase():e.tagName,o=n===Wm.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,Uv(o,t))}function Uv(e,t){const n=e.childNodes,a=[];let l=-1;for(;++l<n.length;){const o=qv(n[l],t);o!==void 0&&a.push(o)}return a}new DOMParser;function nA(e,t){const n=rA(e);return XT(n)}function rA(e){const t=document.createElement("template");return t.innerHTML=e,t.content}const j3=(function(e,t,n){const a=n0(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]}),to=(function(e){if(e==null)return lA;if(typeof e=="string")return iA(e);if(typeof e=="object")return aA(e);if(typeof e=="function")return q1(e);throw new Error("Expected function, string, or array as `test`")});function aA(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=to(e[n]);return q1(a);function a(...l){let o=-1;for(;++o<t.length;)if(t[o].apply(this,l))return!0;return!1}}function iA(e){return q1(t);function t(n){return n.tagName===e}}function q1(e){return t;function t(n,a,l){return!!(sA(n)&&e.call(this,n,typeof a=="number"?a:void 0,l||void 0))}}function lA(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function sA(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const T3=/\n/g,A3=/[\t ]+/g,Pp=to("br"),E3=to(pA),oA=to("p"),N3=to("tr"),uA=to(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",mA,gA]),Hv=to(["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 cA(e,t){const n=t||{},a="children"in e?e.children:[],l=Hv(e),o=Pv(e,{whitespace:n.whitespace||"normal"}),c=[];(e.type==="text"||e.type==="comment")&&c.push(...Fv(e,{breakBefore:!0,breakAfter:!0}));let f=-1;for(;++f<a.length;)c.push(...$v(a[f],e,{whitespace:o,breakBefore:f?void 0:l,breakAfter:f<a.length-1?Pp(a[f+1]):l}));const h=[];let m;for(f=-1;++f<c.length;){const y=c[f];typeof y=="number"?m!==void 0&&y>m&&(m=y):y&&(m!==void 0&&m>-1&&h.push(`
|
|
345
|
-
`.repeat(m)||" "),m=-1,h.push(y))}return h.join("")}function $v(e,t,n){return e.type==="element"?dA(e,t,n):e.type==="text"?n.whitespace==="normal"?Fv(e,n):fA(e):[]}function dA(e,t,n){const a=Pv(e,n),l=e.children||[];let o=-1,c=[];if(uA(e))return c;let f,h;for(Pp(e)||N3(e)&&j3(t,e,N3)?h=`
|
|
346
|
-
`:oA(e)?(f=2,h=2):Hv(e)&&(f=1,h=1);++o<l.length;)c=c.concat($v(l[o],e,{whitespace:a,breakBefore:o?void 0:f,breakAfter:o<l.length-1?Pp(l[o+1]):h}));return E3(e)&&j3(t,e,E3)&&c.push(" "),f&&c.unshift(f),h&&c.push(h),c}function Fv(e,t){const n=String(e.value),a=[],l=[];let o=0;for(;o<=n.length;){T3.lastIndex=o;const h=T3.exec(n),m=h&&"index"in h?h.index:n.length;a.push(hA(n.slice(o,m).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),o===0?t.breakBefore:!0,m===n.length?t.breakAfter:!0)),o=m+1}let c=-1,f;for(;++c<a.length;)a[c].charCodeAt(a[c].length-1)===8203||c<a.length-1&&a[c+1].charCodeAt(0)===8203?(l.push(a[c]),f=void 0):a[c]?(typeof f=="number"&&l.push(f),l.push(a[c]),f=0):(c===0||c===a.length-1)&&l.push(0);return l}function fA(e){return[String(e.value)]}function hA(e,t,n){const a=[];let l=0,o;for(;l<e.length;){A3.lastIndex=l;const c=A3.exec(e);o=c?c.index:e.length,!l&&!o&&c&&!t&&a.push(""),l!==o&&a.push(e.slice(l,o)),l=c?o+c[0].length:o}return l!==o&&!n&&a.push(""),a.join(" ")}function Pv(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 mA(e){return!!(e.properties||{}).hidden}function pA(e){return e.tagName==="td"||e.tagName==="th"}function gA(e){return e.tagName==="dialog"&&!(e.properties||{}).open}const yA={},vA=[];function xA(e){const t=e||yA;return function(n,a){y1(n,"element",function(l,o){const c=Array.isArray(l.properties.className)?l.properties.className:vA,f=c.includes("language-math"),h=c.includes("math-display"),m=c.includes("math-inline");let y=h;if(!f&&!h&&!m)return;let v=o[o.length-1],k=l;if(l.tagName==="code"&&f&&v&&v.type==="element"&&v.tagName==="pre"&&(k=v,v=o[o.length-2],y=!0),!v)return;const b=cA(k,{whitespace:"pre"});let T;try{T=$p.renderToString(b,{...t,displayMode:y,throwOnError:!0})}catch(U){const D=U,M=D.name.toLowerCase();a.message("Could not render math with KaTeX",{ancestors:[...o,l],cause:D,place:l.position,ruleId:M,source:"rehype-katex"});try{T=$p.renderToString(b,{...t,displayMode:y,strict:"ignore",throwOnError:!1})}catch{T=[{type:"element",tagName:"span",properties:{className:["katex-error"],style:"color:"+(t.errorColor||"#cc0000"),title:String(U)},children:[{type:"text",value:b}]}]}}typeof T=="string"&&(T=nA(T).children);const N=v.children.indexOf(k);return v.children.splice(N,1,...T),c6})}}function bA(e,t,n){return e?t?n==="delta"?e+t:t.startsWith(e)?t:e:e:t}function wA(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(),o=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<o&&(f=c(1)),{date:new Date(f).toISOString().slice(0,10),days:(f-o)/864e5}}function kA({content:e,streaming:t}){const[n,a]=B.useState(!1),l=B.useId();return u.jsxs("section",{className:`message reasoning${t?" is-streaming":""}${n?" is-expanded":""}`,children:[u.jsxs("button",{className:"reasoning-toggle",type:"button","aria-expanded":n,"aria-controls":l,onClick:()=>a(o=>!o),children:[u.jsx("span",{className:"reasoning-indicator","aria-hidden":"true"}),u.jsx("span",{children:t?"思考中":"思考过程"}),u.jsx("span",{className:"reasoning-action",children:n?"收起":"展开"}),u.jsx("svg",{className:"reasoning-chevron",width:"12",height:"12",viewBox:"0 0 12 12","aria-hidden":"true",children:u.jsx("path",{d:"m4 2 4 4-4 4",fill:"none",stroke:"currentColor",strokeWidth:"1.4"})})]}),u.jsx("div",{id:l,hidden:!n&&!t,className:`reasoning-content${n?"":" reasoning-preview"}`,children:u.jsx("div",{className:"message-body",children:n?e:e.slice(-600)})})]})}function SA(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 y=e.get(m.id)??{itemId:m.id,text:new Map,summary:new Map,completed:!1};for(const v of["text","summary"]){const k=m[v];Array.isArray(k)&&k.forEach((b,T)=>{typeof b=="string"&&b&&y[v].set(T,b)})}return y.completed=!0,e.set(m.id,y),y}const l=/^item\/reasoning\/(text|summaryText)(Delta|Snapshot)$/.exec(n??"");if(!l||typeof a.itemId!="string")return null;const o=l[1]==="text"?"text":"summary",c=a[o==="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[o].set(c,l[2]==="Snapshot"?f:(h[o].get(c)??"")+f),e.set(a.itemId,h),h}function CA(e){return[...e.text.size?e.text:e.summary].sort(([n],[a])=>n-a).map(([,n])=>n).join(`
|
|
347
|
-
|
|
348
|
-
`)}function jA({id:e,baseUrl:t,query:n}){var y;const[a,l]=B.useState(null),[o,c]=B.useState(!1),[f,h]=B.useState(!1),m=async()=>{c(!0),h(!1);try{const v=await n(e);v.status==="ok"||v.status==="unsupported"?l(v):(h(!0),l(k=>(k==null?void 0:k.status)==="ok"?k:v))}catch{h(!0)}finally{c(!1)}};return B.useEffect(()=>{let v=!1;return c(!0),n(e).then(k=>{v||l(k)}).catch(()=>{v||h(!0)}).finally(()=>{v||c(!1)}),()=>{v=!0}},[e,n]),u.jsxs("div",{className:"channel-balance-inline",children:[u.jsx("span",{className:"channel-balance-total",title:"Available balance",children:(a==null?void 0:a.status)==="ok"&&a.balance?a.balance.balance_infos.map(v=>`${v.currency} ${v.total_balance}`).join(" / "):o?"Checking…":(a==null?void 0:a.status)==="unsupported"?"Balance —":"Balance unavailable"}),f?u.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?u.jsx("span",{className:"channel-balance-warning",children:"Insufficient"}):null,u.jsx("button",{type:"button","aria-label":"Refresh balance",title:"Refresh balance",disabled:o,onClick:()=>void m(),children:"↻"}),u.jsxs("details",{className:"channel-balance-details",children:[u.jsx("summary",{children:"Details"}),u.jsxs("div",{children:[u.jsxs("p",{className:"channel-endpoint",children:[t," · Responses API"]}),(y=a==null?void 0:a.balance)==null?void 0:y.balance_infos.map(v=>u.jsxs("p",{children:[v.currency," · Granted ",v.granted_balance," · Topped up ",v.topped_up_balance]},v.currency)),a?u.jsxs("small",{children:["Checked ",new Date(a.checkedAt).toLocaleString()]}):null,f?u.jsx("small",{children:"Refresh failed. Any amount shown is the last successful result."}):null,(a==null?void 0:a.status)==="unsupported"?u.jsx("small",{children:"This channel does not support balance queries."}):null,u.jsx("small",{children:"Uses saved credentials; unsaved edits are not queried."})]})]})]})}function Gv(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 TA({load:e,save:t,queryBalance:n}){const[a,l]=B.useState(null),[o,c]=B.useState([]),[f,h]=B.useState(!1),[m,y]=B.useState(""),[v,k]=B.useState(!1),[b,T]=B.useState(null),N=JSON.stringify(o)!==JSON.stringify((a==null?void 0:a.channels.map(M=>({channel:M})))??[]);B.useEffect(()=>{let M=!1;return e().then(L=>{M||(l(L),c(L.channels.map(G=>({channel:G}))))}).catch(()=>{M||y("Unable to load channels. Reopen this panel to retry.")}),()=>{M=!0}},[e]);const U=(M,L)=>{k(!1),c(G=>G.map((te,_)=>_===M?{...te,channel:{...te.channel,...L}}:te))},D=async M=>{if(M.preventDefault(),!(!a||f)){h(!0),y(""),k(!1);try{const L=await t({expectedRevision:a.revision,channels:o.map(G=>({channel:G.channel,...G.apiKey?{apiKey:G.apiKey}:{}}))});l(L),c(L.channels.map(G=>({channel:G}))),k(!0),T(null)}catch{y("Channels were not saved. Check the fields. If another administrator changed them, reopen this panel to load the latest version.")}finally{h(!1)}}};return u.jsxs("section",{children:[u.jsx("header",{className:"settings-section-header",children:u.jsxs("div",{children:[u.jsx("h3",{children:"Custom model channels"}),u.jsx("p",{children:"Select a configured channel in Runtime."})]})}),u.jsxs("form",{className:"settings-form",onSubmit:M=>void D(M),children:[!a&&!m?u.jsx("p",{children:"Loading channels…"}):null,u.jsxs("div",{className:"settings-field-wide channel-summary-list",children:[o.map(M=>u.jsxs("article",{className:"channel-summary-card",children:[u.jsxs("div",{className:"channel-summary-identity",children:[u.jsx("h4",{children:M.channel.name||"New channel"}),u.jsx("p",{children:M.channel.model||"Model not configured"})]}),n&&(a!=null&&a.channels.some(L=>L.id===M.channel.id))?u.jsx(jA,{id:M.channel.id,baseUrl:a.channels.find(L=>L.id===M.channel.id).baseUrl,query:n},`${M.channel.id}:${a.revision}`):u.jsx("small",{children:"Not saved"}),u.jsx("button",{type:"button",disabled:f||b!==null&&b!==M.channel.id,onClick:()=>{T(M.channel.id),k(!1)},children:"Edit channel"})]},M.channel.id)),a&&o.length===0?u.jsx("p",{children:"No custom channels yet. Add a channel to get started."}):null]}),o.map((M,L)=>b===M.channel.id?u.jsxs("fieldset",{disabled:f,className:"settings-field-wide model-channel-card",children:[u.jsx("legend",{children:a!=null&&a.channels.some(G=>G.id===M.channel.id)?"Edit channel":"Add channel"}),u.jsxs("label",{className:"settings-field",children:[u.jsx("span",{children:"Name"}),u.jsx("input",{"aria-label":`Channel ${L+1} name`,required:!0,maxLength:128,value:M.channel.name,onChange:G=>U(L,{name:G.target.value})})]}),u.jsxs("label",{className:"settings-field",children:[u.jsx("span",{children:"Type"}),u.jsx("select",{"aria-label":`Channel ${L+1} type`,value:M.channel.kind,onChange:()=>{},children:u.jsx("option",{value:"responses",children:"Responses API"})})]}),u.jsxs("label",{className:"settings-field",children:[u.jsx("span",{children:"Base URL"}),u.jsx("input",{"aria-label":`Channel ${L+1} URL`,type:"url",required:!0,placeholder:"https://api.example.com/v1",value:M.channel.baseUrl,onChange:G=>U(L,{baseUrl:G.target.value})})]}),u.jsxs("label",{className:"settings-field",children:[u.jsx("span",{children:"Model ID"}),u.jsx("input",{"aria-label":`Channel ${L+1} model`,required:!0,maxLength:256,placeholder:"Model ID from your service",value:M.channel.model,onChange:G=>U(L,{model:G.target.value})})]}),u.jsxs("label",{className:"settings-field",children:[u.jsx("span",{children:"API key"}),u.jsx("input",{"aria-label":`Channel ${L+1} API key`,type:"password",autoComplete:"new-password",required:!(a!=null&&a.channels.some(G=>G.id===M.channel.id)),value:M.apiKey??"",placeholder:a!=null&&a.channels.some(G=>G.id===M.channel.id)?"Configured · leave blank to keep":"Enter API key",onChange:G=>{const te=G.target.value;k(!1),c(_=>_.map((W,ae)=>ae===L?{...W,apiKey:te}:W))}})]}),u.jsx("button",{type:"button",onClick:()=>{c(G=>G.filter((te,_)=>_!==L)),k(!1),T(null)},children:"Remove channel on save"}),u.jsx("small",{children:"Changes take effect only after Save channels. Leave the API key blank to keep the saved key."})]},M.channel.id):null),m?u.jsx("p",{role:"alert",children:m}):null,v?u.jsx("p",{role:"status",children:"Channels saved. New executions use the updated configuration."}):null,u.jsxs("div",{className:"settings-form-actions",children:[u.jsx("button",{type:"button",disabled:!a||f||b!==null||o.length>=100,onClick:()=>{const M=crypto.randomUUID().replaceAll("-","");T(M),k(!1),c(L=>[...L,{channel:{id:M,name:"",kind:"responses",baseUrl:"",model:""}}])},children:"Add channel"}),b||JSON.stringify(o)!==JSON.stringify(a==null?void 0:a.channels.map(M=>({channel:M})))?u.jsx("button",{type:"button",disabled:f,onClick:()=>{c((a==null?void 0:a.channels.map(M=>({channel:M})))??[]),T(null),y("")},children:"Discard changes"}):null,b||N?u.jsx("button",{type:"submit",disabled:!a||f,children:f?"Saving…":"Save channels"}):null]})]})]})}function AA(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=NA(n.data);t.set(n.turnId,typeof a.source=="string"?a.source:"web")}return t}function Fc(e,t){return!!(t&&e.includes(t))}function EA(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 NA(e){return e&&typeof e=="object"?e:{}}const MA=["summary","message","status","instruction","description","reason","error","text"],M3=96,zA=new Set(["codex.dynamic_tool_request","codex.process_exited","codex.protocol_error"]),DA=new Set(["server.item.snapshot","server.status","runtime.worker_stderr","codex.dynamic_tool_request"]),RA=new Set(["agentMessage","commandExecution","contextCompaction","fileChange","mcpToolCall","reasoning","userMessage","webSearch"]),Vv=new Set(["item/commandExecution/terminalInteraction"]),OA=new Map([["server.wakeup.retry_scheduled","Wakeup retry scheduled"],["runtime.worker_exit","Runtime worker exited"]]);function _A(e){if(e.event!=="codex.notification")return!1;const t=Ka(e.data);return typeof t.method=="string"&&Vv.has(t.method)}function IA(e){if(DA.has(e.event))return null;if(e.event.startsWith("server.")||e.event.startsWith("runtime.")||zA.has(e.event))return e.event;if(e.event!=="codex.notification")return null;const t=Ka(e.data),n=typeof t.method=="string"?t.method:"",a=Ka(t.params),l=Ka(a.item),o=typeof l.type=="string"?l.type:"";return!n.startsWith("item/")||Vv.has(n)||/(?:\/delta|Delta)$/.test(n)||RA.has(o)?null:n}function Yv(e,t){const n=t.replace(/^input:/,""),a=(e==null?void 0:e.trim())??"";return!a||a===t||a===n?OA.get(n)??Wv(n):a}function Xs(e,t=[]){const n=Ka(e),l=[...t,...MA.map(o=>Pc(n[o]))].map(o=>(o==null?void 0:o.replace(/\s+/g," ").trim())??"").find(Boolean);return l?l.length<=M3?l:`${l.slice(0,M3-3)}...`:"查看详情"}function Gp(e,t=new Map){const n=Ka(e),a=typeof n.unreadCount=="number"&&n.unreadCount>0?Math.floor(n.unreadCount):0,o=(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):"",o.length>0?`from ${o.join(", ")}`:""].filter(Boolean).join(" ");return{title:c,detail:Xs({},[f])}}function BA(e){const t=Ka(e),n=Array.isArray(t.offers)?t.offers.map(Ka).filter(o=>Object.keys(o).length>0):[],a=n.map(o=>{var c;return(c=Pc(o.previewText))==null?void 0:c.trim()}).filter(o=>!!o),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 LA(e){const t=Ka(e),n=Pc(t.actionType)??"",a=Ka(t.payload);return n==="seele_wakeup"||n==="seele_workspace_schedule_wakeup"?{title:(Pc(a.action)??"schedule")==="cancel"?"Wakeup cancellation requested":"Wakeup requested",detail:Xs(a,[Pc(a.instruction)]),meta:"after turn"}:{title:"Action requested",detail:Xs(a,[Wv(n||"agent action")]),meta:"after turn"}}function Wv(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 Pc(e){if(typeof e=="string")return e;if(typeof e=="number"||typeof e=="boolean")return String(e)}function Ka(e){return e&&typeof e=="object"?e:{}}function Vp(e){const t=Yp(e);return(Array.isArray(t.changes)?t.changes:[]).flatMap(a=>{const l=Yp(a);if(typeof l.path!="string"||!l.path.trim())return[];const o=$A(l.kind),c=typeof l.diff=="string"?l.diff:"",f=HA(c,o);return[{path:l.path,kind:o,additions:f.additions,deletions:f.deletions}]})}function Kv(e,t){const n=D3(e),a=D3(t??"").replace(/\/+$/,"");return a&&(n===a||n.startsWith(`${a}/`))?n.slice(a.length+1)||".":n}function qA(e,t){if(e.length===0)return"File changed";const n=Kv(e[0].path,t);return e.length===1?n:`${n} +${e.length-1}`}function UA(e){return e.reduce((t,n)=>({additions:t.additions+n.additions,deletions:t.deletions+n.deletions}),{additions:0,deletions:0})}function HA(e,t){if(!e)return{additions:0,deletions:0};if(t==="add")return{additions:z3(e),deletions:0};if(t==="delete")return{additions:0,deletions:z3(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 z3(e){const t=e.split(`
|
|
350
|
-
`).length;return e.endsWith(`
|
|
351
|
-
`)?Math.max(0,t-1):t}function $A(e){const t=Yp(e);return t.type==="add"?"add":t.type==="delete"?"delete":t.type==="move"||typeof t.move_path=="string"?"move":"update"}function D3(e){return e.replace(/\\/g,"/").replace(/\/+/g,"/")}function Yp(e){return e&&typeof e=="object"?e:{}}const FA=["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 R3(e,t){const n=Jc(e),a=Jc(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 PA(e,t=""){const n=Jc(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 o=(Xv(e)??FA).filter(c=>!Wp(c));n&&!Wp(n)&&!o.includes(n)&&o.unshift(n);for(const c of o)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 GA(e,t){const n=Jc(e);if(!n)return null;if(Wp(n))return"The configured reasoning effort is not supported. Choose a supported value explicitly.";if(!t)return null;const a=Xv(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 VA(e,t,n){return n||e!==t?e:null}function Xv(e){if(!Array.isArray(e==null?void 0:e.supportedReasoningEfforts))return null;const t=[];for(const n of e.supportedReasoningEfforts){const a=Jc(n==null?void 0:n.reasoningEffort);a&&!t.includes(a)&&t.push(a)}return t}function Jc(e){return typeof e=="string"?e.trim():""}function Wp(e){return e.toLowerCase()==="ultra"}function YA(e,t){return{textareaDisabled:!1,sendDisabled:t||!e.trim()}}function WA(e,t){return e.hasConversation?e.messageSubmitting?"blocked":e.hasActiveTurn||e.hasConfirmedCurrentTurn?t&&!e.complexTaskActive?"queue-turn":"steer-turn":"start-turn":"create-workspace"}function KA(e){return e.key!=="Enter"||!e.metaKey&&!e.ctrlKey||e.isComposing?null:{forceNewTurn:e.shiftKey}}function O3(e,t){return e.conversationId===t.conversationId&&e.version===t.version}function XA(e){return e.status!=="authorized"||!e.configurationReady}function QA(e,t,n){return e===401&&!n&&t==="authentication_required"?"reauthenticate":"ignore"}function Km(e,t){if(!e)return t;const n={...e.accountDetails};for(const a of e.accounts)Object.hasOwn(t.accountDetails,a.id)&&(n[a.id]=t.accountDetails[a.id]);return{...e,accountDetails:n}}const _3=15e3,I3=[1e3,2e3,5e3,1e4,15e3];function ZA(e){return!e.workspaceRunning||e.streamLeaseActive||e.controllerActive?{kind:"none"}:e.currentTurnAbsent?e.retryAt!==null&&e.now>=e.retryAt?{kind:"probe",waitMs:_3}:{kind:"none"}:{kind:"probe",waitMs:_3}}function JA(e){const t=Math.min(Math.max(1,Math.floor(e))-1,I3.length-1);return I3[t]}function eE(e){const t=B3(e),n=B3(t.conversation),a=t.workspaceStatus??t.status??n.status;return a==="idle"||a==="error"||a==="done"||a==="initialization_failed"?a:"done"}function B3(e){return e&&typeof e=="object"?e:{}}function tE(e,t,n){return n?"running":e==="running"||e==="error"?e:t==="scheduled"?"waiting":e}function Hr(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 U1(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 L3(e,t,n){return U1([t,...e.filter(a=>a!==t)],n)}function nE(e,t){return e.filter(n=>n!==t)}function rE(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 Ps(e){return`${e.kind}:${e.id}`}function aE(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 iE(e,t,n,a){if(e.length===0)return null;const l=t?Ps(t):null;let o=l?e.findIndex(c=>Ps(c)===l):-1;return o<0&&n&&(o=e.findIndex(c=>c.kind==="workspace"&&c.id===n)),o<0?a>0?e[0]:e[e.length-1]:e[(o+a+e.length)%e.length]}function lE(e,t){return t??e}function sE(e,t){return e==="saved"||t==="accept"?"saved":"declined"}const oE=/^[a-z][a-z\d+.-]*:/i,uE=/^L([1-9]\d*)(?:C([1-9]\d*))?$/i;function Qv(e){if(!e.startsWith("seele-public:/"))return null;const t=e.slice(13);return t.startsWith("//")||t.includes("\\")?null:t}function cE(e,t){const n=e.trim();if(!n||n.startsWith("#")||n.startsWith("?")||n.startsWith("/api/")||oE.test(n))return null;const a=n.indexOf("#"),l=a>=0?n.slice(0,a):n,o=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=dE(h);if(!m)return null;const y=o.match(uE);return{path:Zv(m,t),...y?{line:Number(y[1])}:{},...y!=null&&y[2]?{column:Number(y[2])}:{}}}function Zv(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 dE(e){const t=e.trim().replace(/^`+|`+$/g,"").replace(/^\.\//,"");return t||null}function q3(){const e=B.useRef(null),t=()=>{e.current&&(clearTimeout(e.current.timer),delete e.current.element.dataset.touchDrag),e.current=null};return B.useEffect(()=>{const n=o=>{e.current&&o.preventDefault()},a=o=>{o.touches.length!==1&&t()},l=o=>{const c=e.current;if(!c)return;if(o.touches.length!==1){t();return}if(c.armed){o.preventDefault();return}const f=o.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 o={x:n.clientX,y:n.clientY,element:l,armed:!1,timer:setTimeout(()=>{e.current===o&&(o.armed=!0,l.dataset.touchDrag="ready",a())},2e3)};e.current=o},allows(n){var a;return n!=="touch"||((a=e.current)==null?void 0:a.armed)===!0},end:t}}const Kp="seele:authentication-required",Xp="seele:deployment-status-required",Jv=12,fE=3e3,e7="activeWorkspaceId",H1="workspaceOrder",t7="workspaceGroupOrder",n7="workspaceDrafts",r7="collapsedWorkspaceGroups",a7="sidebarWidth",U3=5,H3=275,hE=236,mE=420,$3="default",F3=300,pE=3,gE=10,yE=2,vE=13,xE=1.65,bE=20,wE=900;class Qs extends Error{constructor(n,a,l,o){super(n);Cd(this,"detail");Cd(this,"status");Cd(this,"body");this.name="DetailedHttpError",this.detail=a,this.status=l,this.body=o}}const kE=[{value:"workspace-write",label:"Workspace"},{value:"danger-full-access",label:"System"}],Ec={id:null,kind:"source",name:"",description:"",purpose:"",attention:"tracked",refreshPolicy:"manual",status:"draft",sourceCluesText:"",requiredEnvText:""};function $1(){var e;return((e=document.querySelector('meta[name="seele-public-base-path"]'))==null?void 0:e.content.replace(/\/?$/,"/"))??"/"}function Te(e){return`${$1()}api/${e.replace(/^\/+/,"")}`}async function Gn(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 Qs(a,l,e.status,n)}function ht(e){return e instanceof Qs?{message:e.message,detail:e.detail}:e instanceof Error?{message:e.message}:{message:String(e)}}function Hs(e){const t=ht(e);return t.detail?{message:t.message,detail:t.detail}:t.message}async function Ue(e,t){if(!e.ok)throw await Gn(e,t)}function SE(e){return e instanceof Qs&&e.status===410&&e.body.includes('"turn_not_active"')}function CE(e){return e instanceof Qs&&e.status===409&&e.body.includes('"turn_not_running"')}function jE(e){return e instanceof Qs&&e.status===409&&e.body.includes('"thread_capability_upgrade_required"')}function P3(e){return{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:e})}}async function TE(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 F1(e){return Math.max(hE,Math.min(mE,Math.round(e)))}function AE(e){try{const t=window.localStorage.getItem(Hr(e,a7)),n=t?Number.parseInt(t,10):Number.NaN;return Number.isFinite(n)?F1(n):H3}catch{return H3}}function EE(e,t){try{window.localStorage.setItem(Hr(e,a7),String(F1(t)))}catch{}}function Xm(e){i7(e,()=>{e.scrollTop=Math.max(0,e.scrollHeight-e.clientHeight)})}function NE(e,t=48){return e.scrollHeight-e.scrollTop-e.clientHeight<=t}function ME(e){if(!e)return;const t=window.getComputedStyle(e),n=parseFloat(t.lineHeight)||24,a=parseFloat(t.paddingTop)||0,l=parseFloat(t.paddingBottom)||0,o=n*pE+a+l,c=n*gE+a+l;e.style.height="auto";const f=Math.min(Math.max(e.scrollHeight,o),c);e.style.height=`${f}px`,e.style.overflowY=e.scrollHeight>c?"auto":"hidden"}function zE(e){const t=e.split(/\r\n|\r|\n/).length;return Math.min(yE,Math.max(1,t+1))}function DE(e){return Math.ceil(zE(e)*vE*xE+bE)}function i7(e,t){const n=e.style.scrollBehavior;e.style.scrollBehavior="auto",t(),e.style.scrollBehavior=n}function RE(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 o=l.getBoundingClientRect();return{anchorOffset:n-o.top,anchorTurnId:l.dataset.turnId}}function OE(e,t){return t?Array.from(e.querySelectorAll(".turn-group[data-turn-id]")).find(n=>n.dataset.turnId===t)??null:null}function G3(e,t){i7(e,()=>{const n=OE(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 _E(e,t){let n=!1;const a=e.querySelector(".stream-inner")??e,l=typeof ResizeObserver>"u"?null:new ResizeObserver(()=>{n||G3(e,t)});G3(e,t),l==null||l.observe(a);const o=window.setTimeout(c,1200);function c(){n||(n=!0,l==null||l.disconnect(),window.clearTimeout(o))}return c}function IE(e){try{return window.localStorage.getItem(Hr(e,e7))}catch{return null}}function Qm(e,t){const n=Hr(e,e7);try{t?window.localStorage.setItem(n,t):window.localStorage.removeItem(n)}catch{}}function au(e){try{const t=window.localStorage.getItem(Hr(e,H1)),n=t?JSON.parse(t):[];return Array.isArray(n)?n.filter(a=>typeof a=="string"):[]}catch{return[]}}function l7(e){try{const t=window.localStorage.getItem(Hr(e,t7)),n=t?JSON.parse(t):[];return Array.isArray(n)?n.filter(a=>typeof a=="string"):[]}catch{return[]}}function s7(e,t){try{window.localStorage.setItem(Hr(e,t7),JSON.stringify(t))}catch{}}function Oc(e,t){try{window.localStorage.setItem(Hr(e,H1),JSON.stringify(t))}catch{}}function o7(e){try{const t=window.localStorage.getItem(Hr(e,n7)),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 BE(e,t){return t?o7(e)[t]??"":""}function Zm(e,t,n){if(t)try{const a=o7(e);n?a[t]=n:delete a[t],window.localStorage.setItem(Hr(e,n7),JSON.stringify(a))}catch{}}function LE(e){try{const t=window.localStorage.getItem(Hr(e,r7)),n=t?JSON.parse(t):[];return new Set(Array.isArray(n)?n.filter(a=>typeof a=="string"):[])}catch{return new Set}}function Jm(e,t){try{window.localStorage.setItem(Hr(e,r7),JSON.stringify(Array.from(t)))}catch{}}function Gl(e,t){const n=au(e);if(n.length===0)return t;const a=new Map(n.map((l,o)=>[l,o]));return[...t].sort((l,o)=>{const c=a.get(l.id),f=a.get(o.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=l7(e);if(n.length===0)return t;const a=new Map(n.map((l,o)=>[l,o]));return[...t].sort((l,o)=>{const c=a.get(l.id),f=a.get(o.id);return c!==void 0&&f!==void 0?c-f:c!==void 0?-1:f!==void 0?1:l.createdAt.localeCompare(o.createdAt)})}function Ld(e,t){const n=au(e),a=U1(n,t.map(l=>l.id));JSON.stringify(a)!==JSON.stringify(n)&&Oc(e,a)}function ep(e,t){const n=new Set(t.map(o=>o.id)),a=l7(e).filter(o=>n.has(o)),l=t.map(o=>o.id).filter(o=>!a.includes(o));s7(e,[...a,...l])}function qE(e,t){const n=e.getBoundingClientRect(),a=n.top+n.height/2;return t<a?"before":"after"}function UE(e,t,n,a){if(t===n)return e;const l=e.findIndex(y=>y.id===t),o=e.findIndex(y=>y.id===n);if(l===-1||o===-1)return e;const c=[...e],[f]=c.splice(l,1),h=c.findIndex(y=>y.id===n),m=a==="before"?h:h+1;return c.splice(m,0,f),c}function HE(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 o=[...e],[c]=o.splice(a,1),f=o.findIndex(h=>h.id===n);return o.splice(f+1,0,c),o}function $E({authEnabled:e,currentUser:t,deploymentId:n,onLogout:a}){var jl,Ds,Tl,Rs;const l=B.useMemo(()=>({deploymentId:n,userId:t.id}),[n,t.id]),[o,c]=B.useState(""),[f,h]=B.useState(new Set),[m,y]=B.useState([]),[v,k]=B.useState([]),[b,T]=B.useState(null),[N,U]=B.useState(null),[D,M]=B.useState("simple"),[L,G]=B.useState(null),[te,_]=B.useState(null),[W,ae]=B.useState(null),[Q,F]=B.useState(!1),[oe,de]=B.useState(!1),[_e,be]=B.useState({}),[ge,Z]=B.useState({}),[le,Me]=B.useState(null),[We,H]=B.useState([]),[I,ee]=B.useState(null),[R,me]=B.useState(!1),[Oe,Re]=B.useState(null),[Be,ve]=B.useState("checking"),[Xe,Ft]=B.useState(null),[pn,tn]=B.useState(!1),[nt,ue]=B.useState(null),[$e,Ze]=B.useState(!1),[Se,gt]=B.useState(null),[st,pt]=B.useState(!1),[At,sn]=B.useState([]),[Kt,dt]=B.useState([]),[Kn,fe]=B.useState({model:"",reasoningEffort:"",fastMode:!1,sandbox:"workspace-write"}),[ke,Fe]=B.useState({profuseNotificationEnabled:!1,publicUrl:null}),[rt,St]=B.useState([]),[An,$r]=B.useState(null),[Dn,on]=B.useState(null),[Rn,_t]=B.useState(!1),[un,lr]=B.useState(null),[Bf,rs]=B.useState(!1),[ro,ao]=B.useState(null),[ei,as]=B.useState(!1),[Gi,xu]=B.useState({model:"",reasoningEffort:"",fastMode:!1,sandbox:"workspace-write"}),[sr,Aa]=B.useState("global"),[Lt,is]=B.useState(null),[bu,Vi]=B.useState(null),[wu,ti]=B.useState({model:"",reasoningEffort:"",fastMode:!1,sandbox:"workspace-write"}),[ku,Su]=B.useState({memory:"",items:[]}),[l0,ia]=B.useState({memory:"",items:[]}),[En,On]=B.useState({memory:"",items:[]}),[Yi,ni]=B.useState([]),[Wi,Ki]=B.useState(Ec),[ri,Fr]=B.useState({description:"",key:"",value:""}),[ls,la]=B.useState(null),[Xi,sa]=B.useState(()=>new Set),[Ea,cn]=B.useState(!1),[io,lo]=B.useState(!1),[ai,ii]=B.useState(!1),[Na,so]=B.useState(null),[Cu,Lf]=B.useState(!0),[oo,li]=B.useState(!1),[Pr,Ln]=B.useState(!1),[s0,o0]=B.useState(!1),[Gr,Ma]=B.useState(null),[uo,za]=B.useState(null),[_n,co]=B.useState(null),[Vr,Tr]=B.useState(null),[or,ju]=B.useState(null),[Qi,si]=B.useState(null),[fo,u0]=B.useState(()=>new Set),[Zi,Da]=B.useState(null),[Tu,ho]=B.useState(null),[ss,Xn]=B.useState(null),[ur,Ar]=B.useState(null),[Ra,Yr]=B.useState(null),[Ji,os]=B.useState(()=>LE(l)),[nn,oa]=B.useState(null),[ua,us]=B.useState(()=>AE(l)),[el,Oa]=B.useState(230),[ca,mo]=B.useState(()=>Date.now()),[c0,po]=B.useState(0),cs=B.useRef(null),ds=B.useRef(null),qn=B.useRef(null),da=B.useRef(null),fa=B.useRef(null),_a=B.useRef(!0),d0=B.useRef(null),oi=B.useRef(null),fs=B.useRef(null),ui=B.useRef(new Set),tl=B.useRef(!1),go=B.useRef([]),hs=B.useRef(null),f0=B.useRef(null),ms=B.useRef(new Map),ci=B.useRef(new Map),yo=B.useRef(new Set),vo=B.useRef(new Map),ps=B.useRef(new Map),nl=B.useRef(new Map),rl=B.useRef(new Set),ha=B.useRef(null),cr=B.useRef(new Map),dr=B.useRef(new Map),al=B.useRef(new Map),gs=B.useRef(new Set),il=q3(),xo=q3(),bo=B.useRef(null),wo=B.useRef(null),ko=B.useRef(!1),Au=B.useRef(!1),So=B.useRef(!1),Qe=m.find(x=>x.id===b),h0=(Qe==null?void 0:Qe.unreadTurnCount)??0,Wr=m.find(x=>x.id===Na),gn=m.find(x=>x.id===Lt),Eu=m.find(x=>x.id===Zi),di=B.useMemo(()=>{const j=Bd(l,v.length>0?v:[{id:"default",title:"Default",createdAt:"",updatedAt:""}]).map(Y=>({id:Y.id,title:Y.title,conversations:[]})),E=new Map(j.map(Y=>[Y.id,Y])),q=j[0];for(const Y of m)(E.get(Y.groupId)??q).conversations.push(Y);return j.filter(Y=>Y.conversations.length>0||Y.id!=="default")},[m,v]),Co=B.useMemo(()=>aE(di,Ji),[Ji,di]),Et=b!==null?_e[b]:null,Kr=(Et==null?void 0:Et.messages)??[],jo=(Et==null?void 0:Et.events)??[],ll=uD(oD(jo),b?ge[b]:null),sl=H7(ll),To=(Et==null?void 0:Et.status)??(Qe==null?void 0:Qe.status)??"idle",Ia=r1(Qe,To),m0=Na!==null?((jl=_e[Na])==null?void 0:jl.status)??(Wr==null?void 0:Wr.status)??"idle":"idle",ol=r1(Wr,m0),ys=b?dr.current.get(b)??null:null,p0=B.useMemo(()=>new Map(m.map(x=>[x.id,x.title])),[m]),Nu=B.useMemo(()=>IN(Kr,jo,(Et==null?void 0:Et.turns)??[],(Et==null?void 0:Et.timelineNodes)??[],ys,p0),[ys,Et==null?void 0:Et.timelineNodes,Et==null?void 0:Et.turns,jo,Kr,p0]),Ao=B.useMemo(()=>new Set(Kr.filter(x=>x.origin==="clone"&&x.turnId).map(x=>x.turnId)),[Kr]),vs=b!==null&&fo.has(b),xs=b!==null&&f.has(b),ul=YA(o,xs),Mu=ys?(Ds=Nu.find(x=>Fc(x.turnIds,ys)))==null?void 0:Ds.activity:null,fi=Ia==="running"||Ia==="initializing"||vs?Mu&&!Kz(Mu)?Mu:{title:Ia==="initializing"?"Initializing clone":"Thinking",createdAt:new Date().toISOString(),tone:"running"}:null,g0=!fi&&Ia==="waiting"&&(Qe!=null&&Qe.nextWakeup)?{title:"Scheduled wakeup",detail:mf(Qe.nextWakeup,ca),createdAt:Qe.nextWakeup.wakeAt,tone:"waiting"}:null,cl=fi??g0,zu=B.useMemo(()=>sD(Object.values(_e)),[_e]),Du=b5(Oe,zu);B.useEffect(()=>{x0(),w0()},[]),B.useEffect(()=>()=>{fa.current!==null&&window.clearTimeout(fa.current)},[]),B.useEffect(()=>{dl(!1),dl(!0);const x=window.setInterval(()=>{dl(!0)},300*1e3);return()=>window.clearInterval(x)},[]),B.useEffect(()=>{const x=window.setInterval(()=>mo(Date.now()),1e3);return()=>window.clearInterval(x)},[]),B.useEffect(()=>{gs.current=fo},[fo]),B.useEffect(()=>{hs.current=b},[b]),B.useLayoutEffect(()=>{const x=f0.current;if(f0.current=b,!b||x===b)return;const j=window.requestAnimationFrame(()=>{const E=da.current;E&&!E.disabled&&!document.querySelector('[aria-modal="true"]')&&E.focus({preventScroll:!0})});return()=>window.cancelAnimationFrame(j)},[b]),B.useEffect(()=>{go.current=m},[m]),B.useEffect(()=>{const x=Hr(l,H1),j=E=>{E.key===x&&y(q=>Gl(l,q))};return window.addEventListener("storage",j),()=>window.removeEventListener("storage",j)},[l]),B.useEffect(()=>{b&&Qm(l,b)},[b,l]),B.useLayoutEffect(()=>{if(!b||h0<=0)return;let x=!1;const j=async()=>{if(document.visibilityState==="visible"){y(q=>q.map(Y=>Y.id===b?{...Y,unreadTurnCount:0}:Y));try{await FM(b)}catch(q){x||console.error(q)}}},E=()=>void j();return j(),document.addEventListener("visibilitychange",E),()=>{x=!0,document.removeEventListener("visibilitychange",E)}},[b,h0]),B.useEffect(()=>{M("simple"),U(null),b&&(Fn(b),js(b))},[b]),B.useEffect(()=>{const x=window.setInterval(()=>void b0(),fE);return()=>window.clearInterval(x)},[]),B.useEffect(()=>{c(BE(l,b))},[b]),B.useEffect(()=>{if(!b)return;const x=ZA({workspaceRunning:To==="running",streamLeaseActive:vs,controllerActive:cr.current.has(b),currentTurnAbsent:yo.current.has(b),retryAt:ps.current.get(b)??null,now:Date.now()});x.kind==="probe"&&Bo(b,{waitMs:x.waitMs})},[b,vs,c0,To]),B.useEffect(()=>()=>{for(const x of nl.current.values())window.clearTimeout(x);nl.current.clear()},[]),B.useEffect(()=>{if(!b)return;let x=!1;return xz(b).then(j=>{x||Z(E=>({...E,[b]:j}))}).catch(j=>console.error(j)),()=>{x=!0}},[b]),B.useEffect(()=>{!b&&sr==="workspace"&&Aa("global")},[b,sr]),B.useEffect(()=>{var x;if(st){if(!Lt&&b){is(b);return}Lt&&!m.some(j=>j.id===Lt)&&is(b??((x=m[0])==null?void 0:x.id)??null)}},[b,m,st,Lt]),B.useEffect(()=>{if(!st||t.role!=="admin")return;const x=window.setInterval(()=>void zo(),5e3);return()=>window.clearInterval(x)},[t.role,st]),B.useEffect(()=>{!st||sr!=="workspace"||On({memory:(gn==null?void 0:gn.memory)??"",items:(gn==null?void 0:gn.memoryItems)??[]})},[sr,st,gn==null?void 0:gn.id,gn==null?void 0:gn.memory,gn==null?void 0:gn.memoryItems]),B.useEffect(()=>{if(!Ea)return;b&&ks(b);const x=j=>{j.key==="Escape"&&cn(!1)};return window.addEventListener("keydown",x),()=>window.removeEventListener("keydown",x)},[b,Ea]),B.useEffect(()=>{if(!st)return;const x=j=>{j.key==="Escape"&&pt(!1)};return window.addEventListener("keydown",x),()=>window.removeEventListener("keydown",x)},[st]),B.useEffect(()=>{var j;if(!io)return;if(Na&&!m.some(E=>E.id===Na)){so(b??((j=m[0])==null?void 0:j.id)??null);return}const x=E=>{E.key==="Escape"&&(Gr?Ma(null):lo(!1))};return window.addEventListener("keydown",x),()=>window.removeEventListener("keydown",x)},[b,io,Gr,Na,m]),B.useEffect(()=>{if(!Vr)return;ju(null);const x=j=>{j.key==="Escape"&&Tr(null)};return window.addEventListener("keydown",x),()=>window.removeEventListener("keydown",x)},[Vr]),B.useEffect(()=>{const x=Y=>{if(Y.code==="ShiftLeft"){So.current=!0;return}const se=rE({code:Y.code,key:Y.key,metaKey:Y.metaKey,shiftKey:Y.shiftKey,ctrlKey:Y.ctrlKey,altKey:Y.altKey,leftShiftPressed:So.current,repeat:Y.repeat},nn!==null);if((se==null?void 0:se.type)==="move"){Y.preventDefault(),de(!0),oa(we=>iE(Co,we,hs.current,se.direction));return}if((se==null?void 0:se.type)==="cancel"){oa(null);return}if(!((se==null?void 0:se.type)!=="confirm"||!nn||$u(Y.target))){if(Y.preventDefault(),nn.kind==="group"){Qu(nn.id);return}yi(nn.id),oa(null),de(!1)}},j=Y=>{Y.code==="ShiftLeft"&&(So.current=!1)},E=()=>{So.current=!1},q=()=>oa(null);return window.addEventListener("keydown",x,!0),window.addEventListener("keyup",j,!0),window.addEventListener("blur",E),window.addEventListener("pointerdown",q),()=>{window.removeEventListener("keydown",x,!0),window.removeEventListener("keyup",j,!0),window.removeEventListener("blur",E),window.removeEventListener("pointerdown",q)}},[nn,Co]),B.useEffect(()=>{nn&&!Co.some(x=>Ps(x)===Ps(nn))&&oa(null)},[nn,Co]),B.useLayoutEffect(()=>{if(!nn)return;const x=Ps(nn),j=document.querySelector(`[data-keyboard-focus-key="${CSS.escape(x)}"]`);j==null||j.focus({preventScroll:!0}),j==null||j.scrollIntoView({block:"nearest"})},[nn]),B.useLayoutEffect(()=>{ME(da.current)},[o]),B.useLayoutEffect(()=>{const x=qn.current;if(!x)return;const j=()=>{const q=x.getBoundingClientRect();Oa(Math.ceil(q.height+44))};j();const E=typeof ResizeObserver>"u"?null:new ResizeObserver(j);return E==null||E.observe(x),window.addEventListener("resize",j),()=>{E==null||E.disconnect(),window.removeEventListener("resize",j)}},[]),B.useLayoutEffect(()=>{var se,we;const x=ds.current;if(!x)return;const j=d0.current!==b;d0.current=b,j&&((se=ha.current)==null||se.call(ha),ha.current=null);const E=oi.current;if(E&&E.conversationId===b){(we=ha.current)==null||we.call(ha),ha.current=_E(x,E),oi.current=null,_a.current=!1;return}if(!j&&!_a.current)return;_a.current=!0,Xm(x);const q=requestAnimationFrame(()=>Xm(x)),Y=window.setTimeout(()=>Xm(x),120);return()=>{cancelAnimationFrame(q),window.clearTimeout(Y)}},[b,jo.length,Kr.length]);async function y0(){var j;const x=ds.current;x&&(_a.current=NE(x),!(!b||!((j=Et==null?void 0:Et.history)!=null&&j.hasMoreBefore))&&(Et.loadingOlder||ui.current.has(b)||x.scrollTop>96||await gl(b)))}function Eo(x){var E,q;if(x.history)return x.history;const j=((E=x.timelineNodes)==null?void 0:E.filter(Y=>Y.parentId===null).reduce((Y,se)=>Y===null||se.timelineAt<Y.timelineAt||se.timelineAt===Y.timelineAt&&se.sequence<Y.sequence?se:Y,null))??null;return{hasMoreBefore:!1,oldestMessageCreatedAt:((q=x.messages[0])==null?void 0:q.createdAt)??null,oldestTimelineAt:(j==null?void 0:j.timelineAt)??null,oldestTimelineSequence:(j==null?void 0:j.sequence)??null,messageTotal:x.messages.length,eventTotal:x.events.length,loadedMessageCount:x.messages.length,loadedEventCount:x.events.length}}async function Ba(x){const j=new URL(x.url,window.location.href).toString();await navigator.clipboard.writeText(j),ju(x.url)}async function bs(x,j){await navigator.clipboard.writeText(j),si(x),fa.current!==null&&window.clearTimeout(fa.current),fa.current=window.setTimeout(()=>{si(null),fa.current=null},1800)}function Pe(x,j,E){const q=Date.now();co({id:q,tone:x,text:j,detail:E}),window.setTimeout(()=>{co(Y=>(Y==null?void 0:Y.id)===q?null:Y)},E?8e3:2400)}function No(x){const j=nl.current.get(x);j!==void 0&&(window.clearTimeout(j),nl.current.delete(x))}function ws(x){yo.current.delete(x),vo.current.delete(x),ps.current.delete(x),rl.current.delete(x),No(x)}function v0(x){yo.current.add(x),vo.current.delete(x),ps.current.delete(x),rl.current.delete(x),No(x)}function Un(x){yo.current.add(x),rl.current.delete(x);const j=(vo.current.get(x)??0)+1;vo.current.set(x,j);const E=JA(j);ps.current.set(x,Date.now()+E),No(x);const q=window.setTimeout(()=>{nl.current.delete(x),po(Y=>Y+1)},E);nl.current.set(x,q)}function hi(x,j){j!=="running"&&ws(x)}async function x0(){try{const[x,j]=await Promise.all([d5(),h5()]);ve("connected");const E=Bd(l,j);if(k(E),ep(l,E),x.length>0){const q=Gl(l,x),Y=IE(l),se=q.find(we=>we.id===Y)??q[0];y(q),Ld(l,q),T(se.id);return}y([]),Qm(l,null),T(null)}catch(x){console.error(x),ve("error")}}async function In(){const[x,j]=await Promise.all([d5(),h5()]);for(const Y of x)hi(Y.id,Y.status);const E=Gl(l,x),q=Bd(l,j);k(q),ep(l,q),y(E),Ld(l,E)}async function b0(){if(!tl.current){tl.current=!0;try{const x=await qM(),j=go.current,E=new Set(j.map(De=>De.id)),q=new Set(x.map(De=>De.id));if(E.size!==q.size||[...E].some(De=>!q.has(De))){await In(),ve("connected");return}const Y=hs.current;for(const De of x)hi(De.id,De.status);const se=new Map(x.map(De=>[De.id,De])),we=Y?se.get(Y)??null:null,qe=Gl(l,j.map(De=>{const Le=se.get(De.id);return Le?{...De,status:Le.status,statusError:Le.statusError,nextWakeup:Le.nextWakeup,unreadTurnCount:Le.unreadTurnCount,updatedAt:Le.updatedAt}:De}));y(qe),Ld(l,qe),ve("connected"),we&&!gs.current.has(we.id)&&Nt(we.id,De=>({...De,status:we.status}))}catch(x){console.error(x),ve("error")}finally{tl.current=!1}}}async function w0(){try{const x=await qz();ve("connected"),Me(x.version)}catch(x){console.error(x),ve("error")}}async function dl(x){try{const j=await Uz(x);j&&Re(E=>b5(E,j))}catch(j){console.error("runtime rate-limit refresh failed",j)}}async function qf(){try{const x=await YM();sn(x),ve("connected")}catch(x){console.error(x),ve("error")}}async function mi(x){try{const j=await WM(x);dt(j),ve("connected")}catch(j){console.error(j),dt([]),ve("error")}}async function ks(x){try{const j=await KM(x);ni(j),ve("connected")}catch(j){console.error(j),ni([]),ve("error")}}async function Ss(x){try{const j=await ez();fe(j),xu(j),x||(Vi(null),ti(j)),ve("connected")}catch(j){console.error(j),ve("error")}}async function Ru(){if(t.role==="admin")try{Fe(await tz()),ve("connected")}catch(x){console.error(x),ve("error")}}async function Cs(x=!0){try{const j=await cz(x);St(j.models),ve("connected"),j.refreshing&&window.setTimeout(()=>void Cs(!1),1e3)}catch(j){console.error(j),St([]),ve("error")}}async function ma(){try{const x=await rz();$r(x.codexVersion),on(x.codexReleasedAt),ve("connected")}catch(x){console.error(x),$r(null),on(null),ve("error")}}async function La(x=!1){x&&as(!0);try{const j=await dz(x);lr(j.job),ao(j.latest),ve("connected"),j.job&&j.job.status!=="running"&&fs.current===j.job.id&&(fs.current=null,j.job.status==="succeeded"?(await Promise.all([Cs(),ma()]),Pe("success",`Codex CLI updated to ${If(j.job.currentVersion)}`)):Pe("error","Codex CLI update failed",j.job.error??void 0))}catch(j){console.error(j),ve("error")}finally{x&&as(!1)}}async function Ou(){rs(!0);try{const x=await fz();fs.current=x.id,lr(x),ve("connected")}catch(x){console.error(x);const j=ht(x);Pe("error","Unable to start Codex CLI update",j.detail??j.message)}finally{rs(!1)}}B.useEffect(()=>{if(!Rn||(un==null?void 0:un.status)!=="running")return;const x=window.setInterval(()=>void La(),1e3);return()=>window.clearInterval(x)},[Rn,un==null?void 0:un.id,un==null?void 0:un.status]);async function Mo(x){try{const j=await hz(x);Vi(j),ti(j.effective),ve("connected")}catch(j){console.error(j),Vi(null),ve("error")}}async function pi(){try{const x=await mz();Su(x),ia(x),ve("connected")}catch(x){console.error(x),ve("error")}}async function k0(){if(t.role!=="admin"){H([]);return}try{H(await _D()),ve("connected")}catch(x){console.error(x),ve("error")}}async function zo(){if(t.role!=="admin"){ee(null);return}me(!0);try{ee(await nz()),ve("connected")}catch(x){console.error(x),ve("error")}finally{me(!1)}}async function _u(x=Lt){const j=[qf(),Ss(x),ma(),Cs(),pi()];t.role==="admin"&&(j.push(k0()),j.push(zo()),j.push(Ru())),x&&(j.push(Fn(x)),j.push(Mo(x)),j.push(mi(x)),j.push(ks(x))),await Promise.all(j)}function Uf(){var j;const x=b??((j=m[0])==null?void 0:j.id)??null;de(!1),is(x),Aa(t.role==="admin"?"global":x?"workspace":"global"),pt(!0),_u(x)}function Hf(){var j;const x=b??((j=m[0])==null?void 0:j.id)??null;is(x),Aa(x?"workspace":"global"),pt(!0),_u(x)}function S0(){var j;de(!1);const x=b??((j=m[0])==null?void 0:j.id)??null;so(x),za(null),Ma(null),lo(!0),x&&C0(x)}async function C0(x){try{const j=await A7(x);if(!j||j.status!=="running")return;li(!0);const E=await E7(x,j);za(E),await Fn(x),await In(),E.warmupTurnId&&Es(x,E.warmupTurnId),Pe("success","Full-history runtime reset completed")}catch(j){const E=ht(j);Pe("error","Full-history runtime reset failed",E.message)}finally{li(!1)}}function j0(x){is(x),Aa("workspace"),Fn(x),Mo(x),mi(x),ks(x),Ki(Ec)}async function Iu(x){x.preventDefault();try{if(sr==="workspace"&&Lt){const j=(gn==null?void 0:gn.status)==="running",E=await p5(Lt,kz(wu,Kn,bu));Vi(E.settings),ti(E.settings.effective),Jn(E.conversation),Pe("success","Workspace settings saved",j?"The current turn keeps its existing settings. Changes apply from the next turn.":void 0)}else{const j=await pz(Gi);fe(j),xu(j),Lt&&await Mo(Lt),Pe("success","Global settings saved")}ve("connected")}catch(j){console.error(j),ve("error");const E=ht(j);Pe("error","Failed to save runtime settings",E.detail??E.message)}}async function Er(x){try{const j=await gz(x);Fe(j),ve("connected"),Pe("success","Deployment settings saved")}catch(j){console.error(j),ve("error");const E=ht(j);throw Pe("error","Failed to save deployment settings",E.detail??E.message),j}}async function Do(){var E;const x=Wr;if(!x){Pe("error","No workspace selected");return}const j=((E=_e[x.id])==null?void 0:E.status)??x.status;if(j==="running"||j==="initializing"){Pe("error","Stop the running turn before resetting runtime");return}o0(!0),za(null);try{const q=await y5(x.id);Ma(q),ve("connected")}catch(q){console.error(q),ve("error");const Y=ht(q);Pe("error","Failed to preview runtime reset",Y.detail??Y.message)}finally{o0(!1)}}async function fr(x){const j=Wr,E=Gr;if(!j||!E||E.conversationId!==j.id){Pe("error","Reset preview is required");return}Ln(!0),za(null);try{const q=await g5(j.id,{warmup:Cu,previewFingerprint:E.fingerprint,selectedEntryIds:x});za(q),Ma(null),ve("connected"),await Fn(j.id),await In(),q.warmupTurnId&&Es(j.id,q.warmupTurnId),Pe("success","Runtime thread reset")}catch(q){console.error(q),ve("error");const Y=ht(q);Pe("error","Failed to reset runtime thread",Y.detail??Y.message)}finally{Ln(!1)}}async function fl(){var q;const x=Wr;if(!x){Pe("error","No workspace selected");return}const j=((q=_e[x.id])==null?void 0:q.status)??x.status;if(j==="running"||j==="initializing"){Pe("error","Stop the running turn before clearing context");return}if(window.confirm(`Start "${x.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.`)){li(!0),za(null);try{const Y=await y5(x.id),se=await g5(x.id,{warmup:!1,previewFingerprint:Y.fingerprint,selectedEntryIds:[],clearWorkspaceMemory:!0,saveSelection:!1});za(se),Ma(null),Lt===x.id&&On({memory:"",items:[]}),ve("connected"),await Fn(x.id),await In(),Pe("success","Workspace started from blank context")}catch(Y){console.error(Y),ve("error");const se=ht(Y);Pe("error","Failed to clear workspace context",se.detail??se.message)}finally{li(!1)}}}async function Bu(x){const j=Wr,E=Gr;if(!j||!E||E.conversationId!==j.id)throw new Error("Reset preview is no longer current.");try{await yz(j.id,{previewFingerprint:E.fingerprint,selectedEntryIds:x}),ve("connected")}catch(q){console.error(q),ve("error");const Y=ht(q);throw Pe("error","Failed to save reset defaults",Y.detail??Y.message),q}}async function Ro(x,j){try{const E=await p5(x,{[j]:null});Vi(E.settings),ti(E.settings.effective),Jn(E.conversation),ve("connected"),Pe("success","Workspace override reset")}catch(E){console.error(E),ve("error"),Pe("error","Failed to reset workspace override")}}async function Oo(x){try{const j=await Nz({memory:Ez(x),items:x});return Su(j),ia(j),ve("connected"),Pe("success","Base memory saved"),j.items}catch(j){throw console.error(j),ve("error"),Pe("error","Failed to save memory"),j}}async function Lu(x,j){try{const E=await Pd(x,{memoryItems:j});return Jn(E),On({memory:E.memory,items:E.memoryItems}),ve("connected"),Pe("success","Workspace memory saved"),E.memoryItems}catch(E){throw console.error(E),ve("error"),Pe("error","Failed to save memory"),E}}async function gi(x){x.preventDefault();const j=ri.key.trim();if(j)try{if(sr==="workspace"&&Lt){const E=await zz(Lt,j,ri.value,ri.description);dt(q=>[...q.filter(Y=>Y.key!==E.variable.key),E.variable].sort((Y,se)=>Y.key.localeCompare(se.key))),Jn(E.conversation)}else{const E=await Mz(j,ri.value,ri.description);sn(q=>[...q.filter(Y=>Y.key!==E.key),E].sort((Y,se)=>Y.key.localeCompare(se.key)))}Pe("success",sr==="workspace"?"Workspace environment saved":"Base environment saved"),Fr({description:"",key:"",value:""}),la(null),sa(E=>{const q=new Set(E);return q.delete(j),q}),ve("connected")}catch(E){console.error(E),ve("error"),Pe("error","Failed to save environment")}}async function T0(x){try{if(sr==="workspace"&&Lt){const j=await _z(Lt,x);dt(E=>E.filter(q=>q.key!==x)),Jn(j)}else await Oz(x),sn(j=>j.filter(E=>E.key!==x));ls===x&&(Fr({description:"",key:"",value:""}),la(null),sa(j=>{const E=new Set(j);return E.delete(x),E})),ve("connected"),Pe("success",sr==="workspace"?"Workspace environment deleted":"Base environment deleted")}catch(j){console.error(j),ve("error"),Pe("error","Failed to delete environment")}}async function _o(x,j){if(j.preventDefault(),!Wi.name.trim()){Pe("error","Knowledge name is required");return}const E=Sz(Wi);try{const q=Wi.id?await Bz(x,Wi.id,E):await Iz(x,E);ni(Y=>[...Y.filter(se=>se.id!==q.id),q].sort(v5)),Ki(Ec),ve("connected"),Pe("success","Workspace knowledge saved")}catch(q){console.error(q),ve("error"),Pe("error","Failed to save workspace knowledge")}}async function hl(x,j){try{await Lz(x,j),ni(E=>E.filter(q=>q.id!==j)),Wi.id===j&&Ki(Ec),ve("connected"),Pe("success","Workspace knowledge deleted")}catch(E){console.error(E),ve("error"),Pe("error","Failed to delete workspace knowledge")}}function $f(x){Aa("workspace"),Ki(Cz(x))}function Qn(x){Fr({description:x.description,key:x.key,value:""}),la(x.key),sa(j=>{const E=new Set(j);return E.delete(x.key),E}),Uu(x.key,{preserveTypedValue:!0})}function qu(){const x=ls;Fr({description:"",key:"",value:""}),la(null),x&&sa(j=>{const E=new Set(j);return E.delete(x),E})}async function pa(x){await Uu(x)}async function Uu(x,j={}){try{const E=sr==="workspace"&&Lt?await Rz(Lt,x):await Dz(x);Fr(q=>q.key===x&&(!j.preserveTypedValue||q.value.length===0)?{...q,value:E}:q),sa(q=>new Set(q).add(x)),ve("connected")}catch(E){console.error(E),ve("error")}}async function Fn(x){const j=await cp(x);z0(j)}async function qa(x){try{const j=await cp(x);Xu(j)}catch(j){console.warn("Failed to synchronize timeline before turn stream",j)}}async function js(x){try{U(await $z(x))}catch(j){console.error(j)}}async function ml(x){if(b)try{const j=await Pz(b,x);U(x==="end"?null:j),x==="end"&&M("simple"),Pe("success",x==="start"?"Complex task started":`Task ${x} accepted`),(x==="start"||x==="resume")&&Bo(b,{waitMs:15e3}),await In()}catch(j){Pe("error","Complex task control failed",ht(j).detail??ht(j).message)}}async function ga(x){if(b)try{G(await Fz(b,x))}catch(j){const E=ht(j);Pe("error","Failed to load complex task",E.detail??E.message)}}function A0(){Qe&&ae({sourceId:Qe.id,name:`${Qe.title} - Clone`,groupId:Qe.groupId})}async function hr(x){if(x.preventDefault(),!(!W||!W.name.trim())){F(!0);try{const j=await Gz(W.sourceId,W.name.trim(),W.groupId);y(E=>{const q=[j.conversation,...E];return Oc(l,L3(au(l),j.conversation.id,q.map(Y=>Y.id))),Gl(l,q)}),T(j.conversation.id),ae(null),de(!1),Pe(j.error?"error":"success",j.error?"Clone created, initialization failed":"Workspace cloned",j.error??void 0)}catch(j){Pe("error","Clone failed",ht(j).detail??ht(j).message)}finally{F(!1)}}}async function pl(){if(Qe)try{const x=await Vz(Qe.id);Jn(x.conversation),Pe(x.error?"error":"success",x.error?"Clone retry failed":"Clone initialization restarted",x.error??void 0)}catch(x){Pe("error","Clone retry failed",ht(x).detail??ht(x).message)}}async function gl(x,j={}){var De,Le,qt;const E=_e[x],q=(De=E==null?void 0:E.history)==null?void 0:De.oldestTimelineAt,Y=(Le=E==null?void 0:E.history)==null?void 0:Le.oldestTimelineSequence,se=q&&Y!==null&&Y!==void 0?`${q}|${Y}`:Y==null?(qt=E==null?void 0:E.history)==null?void 0:qt.oldestMessageCreatedAt:String(Y),we=ds.current;if(!se||!we)return;if(j.preserveAnchor??!0){const yt=RE(we);oi.current={anchorOffset:yt.anchorOffset,conversationId:x,previousScrollHeight:we.scrollHeight,anchorTurnId:yt.anchorTurnId}}else oi.current=null;ui.current.add(x),Nt(x,yt=>({...yt,loadingOlder:!0}));try{const yt=await cp(x,{before:se,limit:Jv});Si(yt)}catch(yt){console.error(yt),oi.current=null}finally{ui.current.delete(x),Nt(x,yt=>({...yt,loadingOlder:!1}))}}async function Io(x,j){const E=await Hz(x,j||void 0);y(q=>{const Y=[E,...q];return Oc(l,L3(au(l),E.id,Y.map(se=>se.id))),Gl(l,Y)}),T(E.id),de(!1)}function yi(x){x!==hs.current&&(be(j=>{if(!(x in j))return j;const E={...j};return delete E[x],E}),T(x))}function mr(){de(!1),gt({mode:"create",groupId:null,title:""})}function Zn(x){gt({mode:"rename",groupId:x.id,title:x.title})}function ya(){var x;de(!1),Ft({mode:"create",conversationId:null,title:"",groupId:(Qe==null?void 0:Qe.groupId)??((x=v[0])==null?void 0:x.id)})}async function Xr(x){var j;if(x.status!=="running"){Ze(!0);try{await Wz(x.id),be(q=>{const Y={...q};return delete Y[x.id],Y});const E=go.current.filter(q=>q.id!==x.id);if(Oc(l,nE(au(l),x.id)),Zm(l,x.id,""),y(E),b===x.id){const q=((j=E[0])==null?void 0:j.id)??null;Qm(l,q),T(q)}(Xe==null?void 0:Xe.conversationId)===x.id&&vi(),ue(null),Pe("success","Workspace moved to recycle")}catch(E){const q=ht(E);Pe("error","Failed to move workspace to recycle",q.detail??q.message)}finally{Ze(!1)}}}async function Qr(x){if(!(x.id===$3||!window.confirm(`Delete group "${x.title}"?
|
|
355
|
-
|
|
356
|
-
Workspaces in this group will move to Default.`)))try{const E=await VM(x.id),q=Bd(l,E.groups);k(q),ep(l,q);const Y=Gl(l,E.conversations);y(Y),Ld(l,Y),os(se=>{const we=new Set(se);return we.delete(x.id),Jm(l,we),we})}catch(E){console.error(E)}}function va(x){Ft({mode:"rename",conversationId:x.id,title:x.title})}function vi(){tn(!1),Ft(null)}function yl(){gt(null)}async function Hu(x,j){const E=j.trim(),q=m.find(se=>se.id===x);if(!q||!E||E===q.title){vi();return}const Y=await Pd(x,{title:E});Jn(Y),vi()}function $u(x){return x instanceof HTMLInputElement||x instanceof HTMLTextAreaElement}function xn(x){return x instanceof Element&&!!x.closest("input, button")}function Pt(x,j){const E=document.elementFromPoint(x,j);return E instanceof HTMLElement?E.closest(".session-item[data-workspace-id]"):null}function vt(x,j){const E=document.elementFromPoint(x,j);return E instanceof HTMLElement?E.closest(".workspace-group[data-group-id]"):null}function Ua(x,j,E){const q=Pt(j,E),Y=q==null?void 0:q.dataset.workspaceId;if(q&&Y&&Y!==x){Ar({kind:"workspace",id:Y,position:qE(q,E)});return}const se=vt(j,E),we=se==null?void 0:se.dataset.groupId;if(!we){Ar(null);return}Ar({kind:"group",id:we})}function pr(x,j){if(!x.isPrimary||x.button!==0||xn(x.target))return;x.pointerType!=="touch"&&x.currentTarget.setPointerCapture(x.pointerId),bo.current={id:j,pointerId:x.pointerId,startX:x.clientX,startY:x.clientY};const E=x.currentTarget,q=x.pointerId;il.begin(x,()=>{E.isConnected&&(E.setPointerCapture(q),Da(j),Ar(null))})}function Fu(x,j){const E=bo.current;if(!il.allows(x.pointerType)||!E||E.id!==j||E.pointerId!==x.pointerId)return;const q=Math.hypot(x.clientX-E.startX,x.clientY-E.startY);if(Zi!==j){if(q<U3)return;Da(j),Ar(null)}x.preventDefault(),Yr({x:x.clientX,y:x.clientY}),Ua(j,x.clientX,x.clientY)}async function Ha(x,j){var we;il.end(),Zi===j&&x.preventDefault(),x.currentTarget.hasPointerCapture(x.pointerId)&&x.currentTarget.releasePointerCapture(x.pointerId),bo.current=null;const E=Zi===j;E&&(ko.current=!0);const q=ur;if(!E||!q){Da(null),Ar(null),Yr(null);return}const Y=m.find(qe=>qe.id===j),se=q.kind==="group"?q.id:(we=m.find(qe=>qe.id===q.id))==null?void 0:we.groupId;if(!Y||!se){Da(null),Ar(null),Yr(null);return}if(y(qe=>{const De=q.kind==="workspace"?UE(qe.map(Le=>Le.id===j?{...Le,groupId:se}:Le),j,q.id,q.position):[...qe.filter(Le=>Le.id!==j),{...Y,groupId:se}];return Oc(l,U1(De.map(Le=>Le.id),au(l))),De}),Y.groupId!==se)try{const qe=await Pd(j,{groupId:se});Jn(qe)}catch(qe){console.error(qe),await In()}Da(null),Ar(null),Yr(null)}function E0(x){il.end(),x.currentTarget.hasPointerCapture(x.pointerId)&&x.currentTarget.releasePointerCapture(x.pointerId),bo.current=null,Da(null),Ar(null),Yr(null)}function N0(x,j){if(!x.isPrimary||x.button!==0)return;x.pointerType!=="touch"&&x.currentTarget.setPointerCapture(x.pointerId),wo.current={id:j,pointerId:x.pointerId,startX:x.clientX,startY:x.clientY};const E=x.currentTarget,q=x.pointerId;xo.begin(x,()=>{E.isConnected&&(E.setPointerCapture(q),ho(j),Xn(null))})}function vl(x,j){const E=wo.current;if(!xo.allows(x.pointerType)||!E||E.id!==j||E.pointerId!==x.pointerId)return;const q=Math.hypot(x.clientX-E.startX,x.clientY-E.startY);if(Tu!==j){if(q<U3)return;ho(j),Xn(null)}x.preventDefault();const Y=vt(x.clientX,x.clientY),se=Y==null?void 0:Y.dataset.groupId;Xn(se&&se!==j?se:null)}function xi(x,j){xo.end(),x.currentTarget.hasPointerCapture(x.pointerId)&&x.currentTarget.releasePointerCapture(x.pointerId);const E=Tu===j;E&&(x.preventDefault(),Au.current=!0);const q=ss;E&&q&&k(Y=>{const se=HE(Y,j,q);return s7(l,se.map(we=>we.id)),se}),wo.current=null,ho(null),Xn(null)}function Pu(x){xo.end(),x.currentTarget.hasPointerCapture(x.pointerId)&&x.currentTarget.releasePointerCapture(x.pointerId),wo.current=null,ho(null),Xn(null)}function Ts(x){const j=x.target.value;Ft(E=>E&&{...E,title:j})}function Gu(x){const j=x.target.value;Ft(E=>E&&{...E,groupId:j})}function bi(x){const j=x.target.value;gt(E=>E&&{...E,title:j})}async function xa(x){if(x.preventDefault(),!Xe)return;const j=Xe.title.trim();if(j){tn(!0);try{if(Xe.mode==="create"){await Io(j,Xe.groupId),vi();return}Xe.conversationId&&await Hu(Xe.conversationId,j)}catch(E){console.error(E);const q=ht(E);Pe("error",Xe.mode==="create"?"Failed to create workspace":"Failed to rename workspace",q.detail??q.message)}finally{tn(!1)}}}function Nr(x){x.key==="Escape"&&(x.preventDefault(),x.stopPropagation(),vi())}async function ba(x){if(x.preventDefault(),!Se)return;const j=Se.title.trim();if(j)try{if(Se.mode==="rename"){if(!Se.groupId)return;const q=await GM(Se.groupId,{title:j});k(Y=>Y.map(se=>se.id===q.id?q:se)),yl();return}const E=await PM(j);k(q=>[...q,E]),os(q=>{const Y=new Set(q);return Y.delete(E.id),Jm(l,Y),Y}),yl()}catch(E){console.error(E)}}function As(x){x.key==="Escape"&&(x.preventDefault(),x.stopPropagation(),yl())}async function Vu(x){x.preventDefault(),await Yu()}function xl(x){b&&ms.current.set(b,(ms.current.get(b)??0)+1),c(x),Zm(l,b,x)}function $a(x,j,E){const q={conversationId:x,version:E};if(!O3(q,{conversationId:x,version:ms.current.get(x)??0}))return;Zm(l,x,"");const Y=hs.current;Y&&O3(q,{conversationId:Y,version:ms.current.get(Y)??0})&&c(se=>se.trim()===j?"":se)}function wi(x){if(ci.current.has(x))return null;const j=Symbol(x);return ci.current.set(x,j),h(E=>{const q=new Set(E);return q.add(x),q}),j}function Xt(x,j){ci.current.get(x)===j&&(ci.current.delete(x),h(E=>{const q=new Set(E);return q.delete(x),q}))}function bl(x){const j=ht(x);Pe("error","Message was not confirmed",`${j.message}. Your text is still in the composer and can be retried.`)}async function Yu(x={}){const j=o.trim();if(!j)return;const E=b,q=WA({hasConversation:E!==null,messageSubmitting:E!==null&&ci.current.has(E),hasActiveTurn:E!==null&&dr.current.has(E),hasConfirmedCurrentTurn:E!==null&&rl.current.has(E),complexTaskActive:!!N},!!x.forceNewTurn);if(q==="create-workspace"){ya();return}if(q==="blocked"||!E)return;const Y=ms.current.get(E)??0,se=wi(E);if(!se)return;if(q==="queue-turn"){await dn(E,j,Y,se);return}if(q==="steer-turn"){await Wu(E,j,Y,se);return}const we=`local-${Date.now()}`;Nt(E,De=>({...De,messages:[...De.messages,{id:we,role:"user",content:j,createdAt:new Date().toISOString()}],status:"running"})),ka(E,"running"),gr(E,!0);let qe=!1;try{let De=null;const Le=Te(`conversations/${E}/turns`),qt=await fetch(Le,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:j,workMode:D,receiptOnly:!0})});if(qt.ok){const yt=await qt.json();if(yt.inputId&&yt.message){(D==="complex"||N)&&(js(E),M("simple")),wa(E,we,yt.message),qe=!0,$a(E,j,Y),Xt(E,se),gr(E,!1),Bo(E,{waitMs:15e3});return}if(!yt.turnId)throw new Error("Turn did not return a turn id");if(De=yt.turnId,(D==="complex"||N)&&(js(E),M("simple")),!yt.message)throw new Error("Turn did not return the persisted message");wa(E,we,yt.message,De),qe=!0,$a(E,j,Y)}else{const yt=await TE(qt);if(yt){De=yt;const ji=await Ns(E,yt,j);if(!ji.ok)throw await Gn(ji,{method:"POST",url:Te(`conversations/${E}/turns/${yt}/steer`)});const Zu=await ji.json();if(!Zu.message)throw new Error("Steer did not return the persisted message");wa(E,we,Zu.message,yt),qe=!0,$a(E,j,Y)}else throw await Gn(qt,{method:"POST",url:Le})}if(!De)throw await Gn(qt,{method:"POST",url:Le});Es(E,De),Xt(E,se)}catch(De){qe||bl(De);const Le=jE(De);Le&&Pe("error","Reset thread required",N?"End the current complex task, then reset this workspace thread and try again.":"This thread does not support the required Seele tools. Reset this workspace thread and try again."),Nt(E,qt=>({...qt,status:"error",messages:qe?qt.messages:qt.messages.filter(yt=>yt.id!==we),events:[...qt.events,{id:qt.events.length+1,event:"client.error",data:Le?{message:"Reset thread required",detail:N?"End the current complex task, then reset this workspace thread and try again.":"This thread does not support the required Seele tools. Reset this workspace thread and try again."}:Hs(De),createdAt:new Date().toISOString()}]})),ka(E,"error"),gr(E,!1),await In()}finally{Xt(E,se)}}async function M0(x){const j=al.current.get(x)??[];if(j.length===0)return;const[E,...q]=j;al.current.set(x,q),await Es(x,E)}async function Bo(x,j={}){if(gs.current.has(x)||cr.current.has(x))return;No(x),ps.current.delete(x);const E=new AbortController;cr.current.set(x,E),gr(x,!0);try{const q=j.waitMs?`?waitMs=${j.waitMs}`:"",Y=Te(`conversations/${x}/turns/current/events${q}`),se=await fetch(Y,{signal:E.signal});if(!se.ok||!se.body)throw await Gn(se,{method:"GET",url:Y});ws(x),rl.current.add(x),await qa(x),await C5(se.body,we=>{const qe=a5(we,`stream-${Date.now()}-${Math.random().toString(36).slice(2)}`);qe.turnId&&!dr.current.has(x)&&dr.current.set(x,qe.turnId),Nt(x,Le=>({...Le,status:Gd(qe)??Le.status,events:r5(Le.events,qe)}));const De=Gd(qe);De&&ka(x,De)}),await Fn(x),await In()}catch(q){if(!l5(q)){if(CE(q)){cr.current.get(x)===E&&Un(x);return}Nt(x,Y=>({...Y,status:"error",events:[...Y.events,{id:Y.events.length+1,event:"client.error",data:Hs(q),createdAt:new Date().toISOString()}]}))}}finally{cr.current.get(x)===E&&(rl.current.delete(x),dr.current.delete(x),cr.current.delete(x),gr(x,!1),await M0(x))}}async function Es(x,j,E={}){const q=dr.current.get(x);if(q===j)return;if(q||cr.current.has(x)){const se=al.current.get(x)??[];se.includes(j)||al.current.set(x,[...se,j]);return}ws(x);const Y=new AbortController;cr.current.set(x,Y),dr.current.set(x,j),gr(x,!0);try{const se=Te(`conversations/${x}/turns/${j}/events`),we=await fetch(se,{signal:Y.signal});if(!we.ok||!we.body)throw await Gn(we,{method:"GET",url:se});await qa(x),await C5(we.body,qe=>{const De=a5(qe,`stream-${Date.now()}-${Math.random().toString(36).slice(2)}`);Nt(x,qt=>({...qt,status:Gd(De)??qt.status,events:r5(qt.events,De)}));const Le=Gd(De);Le&&ka(x,Le)}),await Fn(x),await In()}catch(se){if(!l5(se)){if(E.recovered&&SE(se)){await Fn(x),await In();return}Nt(x,we=>({...we,status:"error",events:[...we.events,{id:we.events.length+1,event:"client.error",data:Hs(se),createdAt:new Date().toISOString()}]}))}}finally{cr.current.get(x)===Y&&(dr.current.get(x)===j&&dr.current.delete(x),cr.current.delete(x),gr(x,!1),await M0(x))}}async function dn(x,j,E,q){let Y=!1;const se=`local-queued-${Date.now()}`;Nt(x,we=>({...we,messages:[...we.messages,{id:se,role:"user",content:j,createdAt:new Date().toISOString()}]}));try{const we=Te(`conversations/${x}/turns`),qe=await fetch(we,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:j,mode:"queue",workMode:D,receiptOnly:!0})});if(!qe.ok)throw await Gn(qe,{method:"POST",url:we});const De=await qe.json();if(!De.turnId&&!De.inputId)throw new Error("Queued turn did not return a turn id");if(!De.message)throw new Error("Queued turn did not return the persisted message");wa(x,se,De.message,De.turnId),Y=!0,$a(x,j,E),De.turnId?Es(x,De.turnId):Bo(x,{waitMs:15e3}),Xt(x,q),await In(),Pe("success",De.inputId?"Message accepted":De.queuePosition?`Queued as next turn (${De.queuePosition})`:"Started new turn")}catch(we){Y||bl(we),Nt(x,qe=>({...qe,messages:Y?qe.messages:qe.messages.filter(De=>De.id!==se),events:[...qe.events,{id:qe.events.length+1,event:"client.error",data:Hs(we),createdAt:new Date().toISOString()}]}))}finally{Xt(x,q)}}async function Wu(x,j,E,q){const Y=dr.current.get(x);let se=!1;const we=`local-steer-${Date.now()}`;Nt(x,qe=>({...qe,messages:[...qe.messages,{id:we,role:"user",content:j,createdAt:new Date().toISOString(),turnId:Y??null}],status:"running"}));try{const qe=Te(Y?`conversations/${x}/turns/${Y}/steer`:`conversations/${x}/turns/steer`),De=await fetch(qe,P3(j));if(!De.ok)throw await Gn(De,{method:"POST",url:qe});const Le=await De.json();if(!Le.message)throw new Error("Steer did not return the persisted message");wa(x,we,Le.message,Y),se=!0,$a(x,j,E),Xt(x,q)}catch(qe){bl(qe),Nt(x,De=>({...De,messages:se?De.messages:De.messages.filter(Le=>Le.id!==we),events:[...De.events,{id:De.events.length+1,event:"client.error",data:Hs(qe),createdAt:new Date().toISOString()}]}))}finally{Xt(x,q)}}async function Ns(x,j,E){return fetch(Te(`conversations/${x}/turns/${j}/steer`),P3(E))}function wa(x,j,E,q){Nt(x,Y=>({...Y,messages:np(Y.messages.filter(se=>se.id!==j),[{...E,turnId:q??E.turnId??null}])}))}async function Ku(){var q;if(!b||Ia!=="running"&&Ia!=="initializing"&&!vs)return;const x=b,j=Ia,E=`client-stop-${Date.now()}`;v0(x),(q=cr.current.get(x))==null||q.abort(),dr.current.delete(x),al.current.delete(x),gr(x,!1),Nt(x,Y=>({...Y,status:"done",events:[...Y.events,{id:E,event:"server.stop",data:{source:"client"},createdAt:new Date().toISOString()}]})),ka(x,"done");try{const Y=await ki(x);ws(x),Nt(x,se=>({...se,status:Y})),ka(x,Y),Promise.all([Fn(x),In()]).catch(se=>{console.warn("Failed to refresh workspace after Stop",se)})}catch(Y){Un(x),Nt(x,we=>({...we,status:j==="initializing"?"initializing":"running",events:[...we.events.filter(qe=>qe.id!==E),{id:we.events.length+1,event:"client.error",data:Hs(Y),createdAt:new Date().toISOString()}]})),ka(x,j==="initializing"?"initializing":"running");const se=ht(Y);Pe("error","Stop failed",se.detail??se.message);try{await In()}catch(we){console.warn("Failed to refresh workspace after Stop failed",we)}}}async function ki(x){const j=Te(`conversations/${x}/turns/interrupt`),E=await fetch(j,{method:"POST"});if(!E.ok)throw await Gn(E,{method:"POST",url:j});return eE(await E.json().catch(()=>null))}async function wl(){var q;const x=Wr;if(!x){Pe("error","No workspace selected");return}if(!window.confirm(`Force stop and repair "${x.title}"?
|
|
357
|
-
|
|
358
|
-
This cancels every current or queued turn and the active complex task, kills its runtime, and repairs scheduler state. Future scheduled wakeups are preserved.`))return;const E=x.id;Ln(!0),v0(E),(q=cr.current.get(E))==null||q.abort(),dr.current.delete(E),al.current.delete(E),gr(E,!1);try{const Y=await ki(E);ws(E),Nt(E,se=>({...se,status:Y})),ka(E,Y),await Fn(E),await In(),Pe("success","Workspace stopped and repaired")}catch(Y){Un(E);const se=ht(Y);Pe("error","Force stop failed",se.detail??se.message);try{await In()}catch(we){console.warn("Failed to refresh workspace after force Stop failed",we)}}finally{Ln(!1)}}async function Ms(x,j){if(!b||!x.approvalTurnId||x.approvalRequestId===void 0)return;const E=b;try{const q=Te(`conversations/${E}/turns/${x.approvalTurnId}/approvals/${encodeURIComponent(String(x.approvalRequestId))}`),Y=await fetch(q,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({decision:j})});if(!Y.ok)throw await Gn(Y,{method:"POST",url:q});Nt(E,se=>({...se,events:[...se.events,{id:se.events.length+1,event:"server.approval.decision",data:{requestId:x.approvalRequestId,decision:j,source:"client"},createdAt:new Date().toISOString()}]}))}catch(q){Nt(E,se=>({...se,events:[...se.events,{id:se.events.length+1,event:"client.error",data:Hs(q),createdAt:new Date().toISOString()}]}));const Y=ht(q);Pe("error","Failed to respond to approval",Y.detail??Y.message)}}async function kl(x,j,E){const q=b,Y=x.workspaceChangeProposalId??x.responsibilityProposalId;if(!q||!Y)return!1;try{const se=Te(`conversations/${q}/workspace-change-proposals/${encodeURIComponent(Y)}`),we=await fetch(se,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({decision:j,payload:j==="accept"?E??x.workspaceChangePayload:void 0})});if(!we.ok)throw await Gn(we,{method:"POST",url:se});const qe=await we.json(),De=lE(j,qe.decision),Le=De==="accept"?qe.payload??E??x.workspaceChangePayload:null;return Jn(qe.conversation),Nt(q,qt=>({...qt,events:[...qt.events,{id:`${x.id}:${De}`,event:"server.workspace_change.decision",data:{proposalId:Y,changeType:x.workspaceChangeType??"responsibility",decision:De,payload:Le},createdAt:new Date().toISOString()}]})),Pe("success",De==="accept"?"Workspace change applied":"Workspace change declined"),!0}catch(se){console.error(se);const we=ht(se);return Pe("error","Failed to respond to workspace change proposal",we.detail??we.message),!1}}async function zs(x,j,E){const q=b;if(!(!q||!x.knowledgeProposalId))try{let Y;if(j==="accept")try{Y=JSON.parse(E??x.body)}catch{Pe("error","Knowledge proposal JSON is invalid");return}const se=Te(`conversations/${q}/knowledge-proposals/${encodeURIComponent(x.knowledgeProposalId)}`),we=await fetch(se,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({decision:j,knowledge:Y})});if(!we.ok)throw await Gn(we,{method:"POST",url:se});const qe=await we.json();ni([...qe.items??[]].sort(v5)),Nt(q,De=>({...De,events:[...De.events,{id:`${x.id}:${j}`,event:"server.knowledge.decision",data:{proposalId:x.knowledgeProposalId,decision:j,knowledge:j==="accept"?qe.item:null},createdAt:new Date().toISOString()}]})),Pe("success",j==="accept"?"Workspace knowledge saved":"Knowledge proposal declined")}catch(Y){console.error(Y);const se=ht(Y);Pe("error","Failed to respond to knowledge proposal",se.detail??se.message)}}function z0(x){hi(x.id,x.status),Sl(x),be(j=>{const E=j[x.id],q=x.events.map(Y=>({id:Y.id,turnId:Y.turnId,seq:Y.seq,event:Y.event,data:Y.data,createdAt:Y.createdAt}));return{...j,[x.id]:{messages:x.messages,events:Hd(q,(E==null?void 0:E.events)??[]),timelineNodes:ap(x.timelineNodes??[],(E==null?void 0:E.timelineNodes)??[]),turns:rp(x.turns??[],(E==null?void 0:E.turns)??[]),contextVersions:x.contextVersions??[],status:x.status,history:Eo(x),loadingOlder:!1,fullEventTurnIds:(E==null?void 0:E.fullEventTurnIds)??new Set,loadingEventTurnIds:(E==null?void 0:E.loadingEventTurnIds)??new Set}}})}function Si(x){const j=Eo(x);Nt(x.id,E=>{var q,Y,se;return{...E,messages:np(x.messages,E.messages),timelineNodes:ap(x.timelineNodes??[],E.timelineNodes),turns:rp(x.turns??[],E.turns),events:Hd(x.events.map(we=>({id:we.id,turnId:we.turnId,seq:we.seq,event:we.event,data:we.data,createdAt:we.createdAt})),E.events),contextVersions:(((q=x.contextVersions)==null?void 0:q.length)??0)>0?x.contextVersions??[]:E.contextVersions,history:{...j,loadedMessageCount:j.loadedMessageCount+(((Y=E.history)==null?void 0:Y.loadedMessageCount)??E.messages.length),loadedEventCount:j.loadedEventCount+(((se=E.history)==null?void 0:se.loadedEventCount)??E.events.length)},loadingOlder:!1}})}function Xu(x){const j=Eo(x),E=x.events.map(q=>({id:q.id,turnId:q.turnId,seq:q.seq,event:q.event,data:q.data,createdAt:q.createdAt}));Nt(x.id,q=>{var Y,se,we;return{...q,messages:np(q.messages,x.messages),timelineNodes:ap(q.timelineNodes,x.timelineNodes??[]),turns:rp(q.turns,x.turns??[]),events:Hd(E,q.events),contextVersions:(((Y=x.contextVersions)==null?void 0:Y.length)??0)>0?x.contextVersions??[]:q.contextVersions,status:x.status,history:{...q.history??j,messageTotal:j.messageTotal,eventTotal:j.eventTotal,loadedMessageCount:Math.max(((se=q.history)==null?void 0:se.loadedMessageCount)??q.messages.length,q.messages.length,x.messages.length),loadedEventCount:Math.max(((we=q.history)==null?void 0:we.loadedEventCount)??q.events.length,q.events.length,x.events.length)},loadingOlder:!1}})}function Nt(x,j){be(E=>{const q=E[x]??{messages:[],events:[],timelineNodes:[],turns:[],contextVersions:[],status:"idle",history:null,loadingOlder:!1,fullEventTurnIds:new Set,loadingEventTurnIds:new Set};return{...E,[x]:j(q)}})}function ka(x,j){y(E=>E.map(q=>q.id===x?{...q,status:j,updatedAt:new Date().toISOString()}:q))}function Sl(x){Jn(x)}function Jn(x){y(j=>Gl(l,j.map(E=>E.id===x.id?{...E,...x}:E)))}async function Lo(x,j){const E=j.filter(q=>{const Y=_e[x];return Y&&!Y.fullEventTurnIds.has(q)&&!Y.loadingEventTurnIds.has(q)});if(E.length!==0){Nt(x,q=>{const Y=new Set(q.loadingEventTurnIds);for(const se of E)Y.add(se);return{...q,loadingEventTurnIds:Y}});try{const q=await Promise.all(E.map(Y=>Yz(x,Y)));Nt(x,Y=>{const se=new Set(Y.fullEventTurnIds),we=new Set(Y.loadingEventTurnIds),qe=q.flatMap((De,Le)=>{const qt=E[Le];return se.add(qt),we.delete(qt),De.map(yt=>({id:yt.id,turnId:yt.turnId,seq:yt.seq,event:yt.event,data:yt.data,createdAt:yt.createdAt}))});return{...Y,events:Hd(Y.events,qe),fullEventTurnIds:se,loadingEventTurnIds:we}})}catch(q){console.error(q),Nt(x,Y=>{const se=new Set(Y.loadingEventTurnIds);for(const we of E)se.delete(we);return{...Y,loadingEventTurnIds:se}}),Pe("error","Failed to load process details")}}}function gr(x,j){const E=new Set(gs.current);j?E.add(x):E.delete(x),gs.current=E,u0(q=>{const Y=new Set(q);return j?Y.add(x):Y.delete(x),Y})}function D0(x){const j=KA({key:x.key,metaKey:x.metaKey,ctrlKey:x.ctrlKey,shiftKey:x.shiftKey,isComposing:x.nativeEvent.isComposing});j&&(x.preventDefault(),Yu({forceNewTurn:j.forceNewTurn}))}function Qu(x){os(j=>{const E=new Set(j);return E.has(x)?E.delete(x):E.add(x),Jm(l,E),E})}function Ci(x){var j;return tE(x.status,(j=x.nextWakeup)==null?void 0:j.status,fo.has(x.id))}function Sa(x){var q;const j=(q=cs.current)==null?void 0:q.getBoundingClientRect(),E=j?x-j.left:x;return F1(E)}function R0(x){x.preventDefault(),x.currentTarget.setPointerCapture(x.pointerId),us(Sa(x.clientX))}function O0(x){x.currentTarget.hasPointerCapture(x.pointerId)&&(x.preventDefault(),us(Sa(x.clientX)))}function Cl(x){x.currentTarget.hasPointerCapture(x.pointerId)&&x.currentTarget.releasePointerCapture(x.pointerId);const j=Sa(x.clientX);us(j),EE(l,j)}return u.jsxs("main",{className:`shell${oe?" mobile-sidebar-open":""}`,ref:cs,style:{"--sidebar-width":`${ua}px`},children:[u.jsxs("aside",{className:"sidebar",children:[u.jsxs("div",{className:"sidebar-header",children:[u.jsxs("div",{children:[u.jsxs("p",{className:"eyebrow brand-line",children:[u.jsx("span",{children:"Seele"}),le?t.role==="admin"?u.jsxs("a",{"aria-label":`Open Seele Host control for Work v${le}`,className:"work-version-link",href:`${$1()}admin/host`,title:"Open Seele Host control: versions, restart, and logs",children:["v",le,u.jsx("span",{"aria-hidden":"true",children:"↗"})]}):u.jsxs("span",{children:["v",le]}):null,u.jsx("span",{"aria-label":T5(Be),className:`backend-status ${Be}`,"data-label":T5(Be)})]}),u.jsxs("div",{className:"sidebar-title-row",children:[u.jsx("h2",{children:"Workspaces"}),e?u.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]})]}),u.jsxs("div",{className:"sidebar-header-actions",children:[u.jsx("button",{"aria-label":"Close workspace list",className:"mobile-sidebar-dismiss",onClick:()=>de(!1),title:"Close workspace list",type:"button",children:"×"}),u.jsx("button",{"aria-label":"New workspace",className:"new-workspace-button",type:"button",onClick:ya,children:"+"})]})]}),u.jsx("nav",{className:"session-list","aria-label":"Workspaces",children:di.map(x=>u.jsxs("section",{className:["workspace-group",Tu===x.id?"dragging":"",ss===x.id?"drop-after":"",(ur==null?void 0:ur.kind)==="group"&&ur.id===x.id?"drop-into":""].filter(Boolean).join(" "),"data-group-id":x.id,children:[u.jsxs("div",{className:"workspace-group-header",children:[u.jsxs("button",{"aria-expanded":!Ji.has(x.id),className:(nn==null?void 0:nn.kind)==="group"&&nn.id===x.id?"workspace-group-toggle keyboard-focused":"workspace-group-toggle","data-keyboard-focus-key":Ps({kind:"group",id:x.id}),onClick:j=>{if(Au.current){j.preventDefault(),Au.current=!1;return}Qu(x.id)},onDoubleClick:j=>{j.preventDefault(),j.stopPropagation(),Zn(x)},onPointerCancel:Pu,onPointerDown:j=>N0(j,x.id),onPointerMove:j=>vl(j,x.id),onPointerUp:j=>xi(j,x.id),type:"button",children:[u.jsx("span",{className:Ji.has(x.id)?"workspace-group-caret collapsed":"workspace-group-caret","aria-hidden":"true",children:"▾"}),u.jsx("span",{onDoubleClick:j=>{j.preventDefault(),j.stopPropagation(),Zn(x)},title:"Double-click to rename",children:x.title})]}),x.id!==$3?u.jsx("button",{"aria-label":`Delete group ${x.title}`,className:"workspace-group-delete",onClick:j=>{j.stopPropagation(),Qr(x)},title:"Delete group",type:"button",children:"×"}):null]}),Ji.has(x.id)?null:u.jsx("div",{className:"workspace-group-items",children:x.conversations.map(j=>{const E=Ci(j);return u.jsxs("div",{className:["session-item",(nn==null?void 0:nn.kind)==="workspace"&&nn.id===j.id?"keyboard-focused":"",j.id===b?"active":"",j.id===Zi?"dragging":"",(ur==null?void 0:ur.kind)==="workspace"&&ur.id===j.id?`drop-${ur.position}`:""].filter(Boolean).join(" "),"data-keyboard-focus-key":Ps({kind:"workspace",id:j.id}),"data-workspace-id":j.id,onClick:q=>{if(ko.current){q.preventDefault(),ko.current=!1;return}yi(j.id),de(!1)},onDoubleClick:q=>{xn(q.target)||(q.preventDefault(),va(j))},onKeyDown:q=>{$u(q.target)||q.key==="Enter"&&(yi(j.id),de(!1))},onPointerCancel:E0,onPointerDown:q=>pr(q,j.id),onPointerMove:q=>Fu(q,j.id),onPointerUp:q=>Ha(q,j.id),role:"button",tabIndex:0,children:[u.jsxs("span",{className:"session-heading",children:[u.jsx("span",{"aria-label":Jd(E,j.nextWakeup,ca),className:`session-status ${E}`,title:Jd(E,j.nextWakeup,ca)}),u.jsx("span",{className:"session-title",title:"Double-click to rename",children:j.title}),E==="waiting"&&j.nextWakeup?u.jsx("span",{className:"session-countdown",title:Jd(E,j.nextWakeup,ca),children:mf(j.nextWakeup,ca)}):null,j.unreadTurnCount>0?u.jsx("span",{"aria-label":`${j.unreadTurnCount} unread turns`,className:"session-unread",title:`${j.unreadTurnCount} unread turns`,children:j.unreadTurnCount>99?"99+":j.unreadTurnCount}):null,E!=="running"?u.jsx("button",{"aria-label":`Delete ${j.title}`,className:"session-delete",onClick:q=>{q.stopPropagation(),ue(j)},title:"Move workspace to recycle",type:"button",children:"×"}):null]}),u.jsxs("span",{className:"session-workspace",title:j.workspacePath,children:["workspaces/",su(j.id)]})]},j.id)})})]},x.id))}),u.jsx("footer",{className:"sidebar-footer",children:u.jsxs("div",{className:"sidebar-actions","aria-label":"Workspace actions",children:[u.jsx("button",{"aria-label":"Settings",className:"sidebar-action-button",onClick:Uf,type:"button",children:u.jsx(o5,{})}),u.jsx("button",{"aria-label":"New group",className:"sidebar-action-button",onClick:mr,type:"button",children:u.jsx(zM,{})}),u.jsx("button",{"aria-label":"Collaboration topics",className:"sidebar-action-button",onClick:()=>{ii(!0),de(!1)},type:"button",children:u.jsx(Kd,{})}),u.jsx("button",{"aria-label":"Console",className:"sidebar-action-button",onClick:S0,type:"button",children:u.jsx(DM,{})}),u.jsx(ON,{usage:Du})]})})]}),u.jsx("button",{"aria-label":"Close workspace list",className:"mobile-sidebar-backdrop",onClick:()=>de(!1),tabIndex:oe?0:-1,type:"button"}),u.jsx("div",{"aria-label":"Resize sidebar",className:"sidebar-resizer",onPointerDown:R0,onPointerMove:O0,onPointerUp:Cl,role:"separator",tabIndex:0}),Eu&&Ra?u.jsxs("div",{className:"workspace-drag-preview",style:{transform:`translate3d(${Ra.x+12}px, ${Ra.y+10}px, 0)`},children:[u.jsx("span",{className:"workspace-drag-title",children:Eu.title}),u.jsxs("span",{className:"workspace-drag-path",children:["workspaces/",su(Eu.id)]})]}):null,Xe?u.jsx("div",{className:"workspace-editor-overlay",onKeyDown:Nr,role:"presentation",children:u.jsxs("form",{className:"workspace-editor",onKeyDown:Nr,onSubmit:x=>void xa(x),children:[u.jsx("label",{className:"workspace-editor-label",htmlFor:"workspace-title",children:"Workspace name"}),u.jsx("input",{autoFocus:!0,id:"workspace-title",onChange:Ts,onKeyDown:Nr,value:Xe.title}),Xe.mode==="create"?u.jsxs(u.Fragment,{children:[u.jsx("label",{className:"workspace-editor-label",htmlFor:"workspace-group",children:"Group"}),u.jsx("select",{id:"workspace-group",onChange:Gu,onKeyDown:Nr,value:Xe.groupId??((Tl=v[0])==null?void 0:Tl.id)??"",children:v.map(x=>u.jsx("option",{value:x.id,children:x.title},x.id))})]}):null,u.jsxs("div",{className:"workspace-editor-actions",children:[u.jsx("button",{type:"button",onClick:vi,children:"Cancel"}),u.jsx("button",{disabled:pn,type:"submit",children:pn?"Saving...":Xe.mode==="create"?"Create":"Save"})]})]})}):null,Se?u.jsx("div",{className:"workspace-editor-overlay",onKeyDown:As,role:"presentation",children:u.jsxs("form",{className:"workspace-editor",onKeyDown:As,onSubmit:x=>void ba(x),children:[u.jsx("label",{className:"workspace-editor-label",htmlFor:"workspace-group-title",children:"Group name"}),u.jsx("input",{autoFocus:!0,id:"workspace-group-title",onChange:bi,onKeyDown:As,value:Se.title}),u.jsxs("div",{className:"workspace-editor-actions",children:[u.jsx("button",{type:"button",onClick:yl,children:"Cancel"}),u.jsx("button",{type:"submit",children:Se.mode==="create"?"Create":"Save"})]})]})}):null,st?u.jsx(WE,{currentUser:t,conversations:m,editingEnvironmentKey:ls,deploymentSettings:ke,environmentDraft:ri,globalEnvironment:At,workspaceEnvironment:Kt,memorySettings:ku,memorySettingsDraft:l0,workspaceMemoryDraft:En,runtimeSettings:Kn,runtimeModels:rt,runtimeCodexVersion:An,runtimeCodexReleasedAt:Dn,runtimeCodexUpdating:(un==null?void 0:un.status)==="running",runtimeSettingsDraft:Gi,runtimeSettingsScope:sr,settingsWorkspace:gn,settingsWorkspaceId:Lt,systemDiagnostics:I,systemDiagnosticsLoading:R,workspaceGroups:di,workspaceRuntimeSettings:bu,workspaceRuntimeSettingsDraft:wu,managedUsers:We,onCancelEnvironmentEdit:qu,onClose:()=>pt(!1),onCreateUser:async x=>{const j=await ID(x);H(E=>[...E,j]),Pe("success","User created")},onDeleteUser:async x=>{await LD(x),H(j=>j.filter(E=>E.id!==x)),Pe("success","User deleted")},onSaveDeploymentSettings:Er,onDeleteEnvironment:x=>void T0(x),onDraftChange:Fr,onEditEnvironment:Qn,onRevealEnvironmentValue:x=>void pa(x),onSaveBaseMemoryItems:x=>Oo(x),onSaveResponsibility:async(x,j)=>{try{const E=await Pd(x,{responsibility:j});return Jn(E),ve("connected"),Pe("success","Workspace responsibility saved"),E.responsibility}catch(E){throw console.error(E),ve("error"),Pe("error","Failed to save workspace responsibility"),E}},onSaveWorkspaceMemoryItems:x=>Lt?Lu(Lt,x):Promise.reject(new Error("No workspace selected")),onRuntimeDraftChange:xu,onCodexAccountSwitched:async()=>{Pe("success","Codex account selection saved"),(await Y7()).codexAccountsReady&&await Promise.all([dl(!0),Cs(!0),ma()])},onUpdateCodexCli:()=>{_t(!0),La(!0)},onRuntimeScopeChange:Aa,onSettingsWorkspaceChange:j0,onSubmitRuntimeSettings:x=>void Iu(x),onWorkspaceRuntimeDraftChange:ti,onWorkspaceRuntimeReset:x=>Lt?void Ro(Lt,x):void 0,revealedEnvironmentKeys:Xi,onSubmitEnvironment:x=>void gi(x),onRefreshSystemDiagnostics:()=>void zo(),onUpdateUser:async(x,j)=>{const E=await BD(x,j);H(q=>q.map(Y=>Y.id===E.id?E:Y)),Pe("success","User updated")}}):null,Rn?u.jsx(YE,{currentReleasedAt:Dn,currentVersion:An,job:un,latest:ro,latestChecking:ei,starting:Bf,onClose:()=>_t(!1),onRefresh:()=>void La(),onStart:()=>void Ou()}):null,Ea&&Qe?u.jsx(FE,{conversation:Qe,clockNow:ca,knowledgeDraft:Wi,workspaceKnowledge:Yi,tokenUsage:ll,onCancelKnowledgeEdit:()=>Ki(Ec),onDeleteKnowledge:x=>void hl(Qe.id,x),onEditKnowledge:$f,onKnowledgeDraftChange:Ki,onSubmitKnowledge:x=>void _o(Qe.id,x),onClose:()=>cn(!1)}):null,ai?u.jsx(PE,{conversations:m,onClose:()=>ii(!1),workspaceGroups:di}):null,io?u.jsx(GE,{busy:oo||Pr,conversation:Wr??null,conversationId:Na,forceStopBusy:Pr,preview:(Gr==null?void 0:Gr.conversationId)===Na?Gr:null,previewLoading:s0,result:uo,status:ol,warmup:Cu,workspaceGroups:di,onClose:()=>lo(!1),onCancelResetPreview:()=>Ma(null),onForceStop:()=>void wl(),onPreviewReset:()=>void Do(),onStartBlankContext:()=>void fl(),onResetRuntime:x=>void fr(x),onSaveResetSelection:Bu,onWorkspaceChange:x=>{so(x),za(null),Ma(null)},onWarmupChange:Lf}):null,W?u.jsx("div",{className:"dialog-backdrop",role:"presentation",onMouseDown:()=>!Q&&ae(null),children:u.jsxs("form",{className:"dialog-card clone-dialog",onSubmit:hr,onMouseDown:x=>x.stopPropagation(),children:[u.jsxs("header",{children:[u.jsxs("div",{children:[u.jsx("h2",{children:"Clone workspace"}),u.jsx("p",{children:"Copy stable visible history and reusable workspace context into an independent workspace."})]}),u.jsx("button",{"aria-label":"Close",className:"icon-button",onClick:()=>ae(null),type:"button",children:"×"})]}),u.jsxs("label",{children:[u.jsx("span",{children:"Name"}),u.jsx("input",{autoFocus:!0,value:W.name,onChange:x=>ae(j=>j&&{...j,name:x.target.value})})]}),u.jsxs("label",{children:[u.jsx("span",{children:"Group"}),u.jsx("select",{value:W.groupId,onChange:x=>ae(j=>j&&{...j,groupId:x.target.value}),children:di.map(x=>u.jsx("option",{value:x.id,children:x.title},x.id))})]}),u.jsxs("footer",{children:[u.jsx("button",{className:"secondary",disabled:Q,onClick:()=>ae(null),type:"button",children:"Cancel"}),u.jsx("button",{disabled:Q||!W.name.trim(),type:"submit",children:Q?"Cloning...":"Clone"})]})]})}):null,L?u.jsx("div",{className:"dialog-backdrop",role:"presentation",onMouseDown:()=>G(null),children:u.jsxs("section",{"aria-labelledby":"complex-task-detail-title","aria-modal":"true",className:"dialog-card task-detail-dialog",onMouseDown:x=>x.stopPropagation(),role:"dialog",children:[u.jsxs("header",{children:[u.jsxs("div",{children:[u.jsx("h2",{id:"complex-task-detail-title",children:L.title}),u.jsxs("p",{children:[j5(L.status),L.startedAt&&L.finishedAt?` · ${AD(L.startedAt,L.finishedAt)}`:""]})]}),u.jsx("button",{"aria-label":"Close",className:"icon-button",onClick:()=>G(null),type:"button",children:"×"})]}),u.jsxs("div",{className:"complex-task-detail task-record-detail",children:[u.jsxs("div",{children:[u.jsx("small",{children:"Objective"}),u.jsx("p",{children:L.objective??"No objective recorded."})]}),u.jsxs("div",{children:[u.jsx("small",{children:L.status==="completed"?"Final plan":"Current plan"}),L.currentPlan?u.jsx("article",{className:"message assistant complex-task-plan-preview",children:u.jsx("div",{className:"message-main",children:u.jsx("div",{className:"message-body",children:Zl(L.currentPlan.planMarkdown,Qe)})})}):u.jsx("p",{children:"No plan recorded."})]}),u.jsxs("dl",{children:[u.jsxs("div",{children:[u.jsx("dt",{children:"Goal"}),u.jsx("dd",{children:L.codexGoalStatus??"not started"})]}),u.jsxs("div",{children:[u.jsx("dt",{children:"Plan versions"}),u.jsx("dd",{children:L.planVersions.length})]}),u.jsxs("div",{children:[u.jsx("dt",{children:"Started"}),u.jsx("dd",{children:L.startedAt?ut(L.startedAt):"—"})]}),u.jsxs("div",{children:[u.jsx("dt",{children:"Finished"}),u.jsx("dd",{children:L.finishedAt?ut(L.finishedAt):"—"})]})]})]}),u.jsx("footer",{children:u.jsx("button",{className:"secondary",onClick:()=>G(null),type:"button",children:"Close"})})]})}):null,te?u.jsx("div",{className:"dialog-backdrop",role:"presentation",onMouseDown:()=>_(null),children:u.jsxs("section",{"aria-labelledby":"system-event-detail-title","aria-modal":"true",className:"dialog-card system-event-detail-dialog",onMouseDown:x=>x.stopPropagation(),role:"dialog",children:[u.jsxs("header",{children:[u.jsxs("div",{children:[u.jsx("h2",{id:"system-event-detail-title",children:te.title}),u.jsx("p",{children:ut(te.createdAt)})]}),u.jsx("button",{"aria-label":"Close",className:"icon-button",onClick:()=>_(null),type:"button",children:"×"})]}),u.jsx("div",{className:"system-event-detail-content",children:u.jsx(Lc,{content:te.fullDetail??te.detail??"No additional details.",conversation:Qe,streaming:!1,onPreviewArtifact:Tr,onCopyArtifactUrl:Ba,copiedArtifactUrl:or})}),u.jsxs("footer",{children:[te.linkedTaskId?u.jsx("button",{onClick:()=>{const x=te.linkedTaskId;_(null),ga(x)},type:"button",children:"View task"}):null,u.jsx("button",{className:"secondary",onClick:()=>_(null),type:"button",children:"Close"})]})]})}):null,nt?u.jsx("div",{className:"memory-editor-overlay",onClick:()=>{$e||ue(null)},role:"presentation",children:u.jsxs("section",{"aria-label":"Confirm workspace recycle","aria-modal":"true",className:"memory-delete-dialog workspace-delete-dialog",onClick:x=>x.stopPropagation(),role:"dialog",children:[u.jsxs("header",{children:[u.jsx("strong",{children:"Move Workspace to Recycle"}),u.jsx("button",{"aria-label":"Close workspace recycle confirmation",className:"memory-icon-button",disabled:$e,onClick:()=>ue(null),title:"Close",type:"button",children:"×"})]}),u.jsxs("p",{children:["Move ",u.jsx("strong",{children:nt.title})," to recycle?"]}),u.jsx("code",{children:nt.workspacePath}),u.jsxs("div",{className:"memory-delete-actions",children:[u.jsx("button",{className:"memory-dialog-button",disabled:$e,onClick:()=>ue(null),type:"button",children:"Cancel"}),u.jsx("button",{className:"memory-dialog-button danger",disabled:$e,onClick:()=>void Xr(nt),type:"button",children:$e?"Moving...":"Move to recycle"})]})]})}):null,_n?u.jsxs("div",{className:`app-toast ${_n.tone}`,role:"status",children:[u.jsx("strong",{children:_n.text}),_n.detail?u.jsx("pre",{children:_n.detail}):null]}):null,u.jsxs("section",{className:"conversation",children:[u.jsxs("header",{className:"topbar",children:[u.jsxs("div",{className:"topbar-main",children:[u.jsx("button",{"aria-label":"Show workspaces",className:"mobile-workspace-menu",onClick:()=>de(!0),title:"Workspaces",type:"button",children:u.jsx(MM,{})}),u.jsxs("div",{className:"topbar-heading",children:[u.jsx("div",{className:"topbar-title-row",children:u.jsx("h1",{children:(Qe==null?void 0:Qe.title)??"New workspace"})}),Qe?u.jsxs("p",{className:"topbar-workspace",children:["workspaces/",su(Qe.id)]}):null]})]}),u.jsx("div",{className:"topbar-actions",children:Qe?u.jsxs(u.Fragment,{children:[Qe.threadUpgradeRequired?u.jsx("button",{"aria-label":"Reset required for latest thread tools",className:"topbar-icon-button thread-upgrade-button",onClick:S0,title:`当前 Thread 工具集已过期(${Qe.threadCapabilityVersion} / ${Qe.requiredThreadCapabilityVersion}),点击进行 Reset`,type:"button",children:u.jsx(T7,{})}):null,u.jsx("button",{"aria-label":"Clone workspace",className:"topbar-icon-button",onClick:A0,title:"Clone workspace",type:"button",children:u.jsx(NM,{})}),u.jsxs("button",{className:`context-button has-usage ${Q1(sl??0)}`,onClick:()=>cn(!0),style:{"--context-usage":`${_f(sl??0)}%`},title:ll&&sl!==null?`Context ${Math.round(sl)}% · ${Cr(ll.totalTokens)} / ${Qd(ll.modelContextWindow)}`:"Context 0% · no usage recorded yet",type:"button",children:[u.jsx("span",{children:"Context"}),u.jsxs("strong",{children:[Math.round(sl??0),"%"]})]}),u.jsx("button",{"aria-label":"Workspace settings",className:"topbar-icon-button",onClick:Hf,title:"Workspace settings",type:"button",children:u.jsx(o5,{})})]}):null})]}),N?u.jsxs("section",{className:`complex-task-bar ${N.status}`,children:[u.jsxs("button",{className:"complex-task-summary",onClick:()=>void ga(N.id),title:"View complex task details",type:"button",children:[u.jsx("span",{className:"complex-task-kicker",children:"Complex task"}),u.jsx("strong",{children:N.title}),u.jsx("span",{className:"complex-task-state",children:j5(N.status)}),u.jsx("span",{className:"complex-task-duration",children:TD(N,ca)})]}),u.jsxs("div",{className:"complex-task-actions",children:[hp(N.status,"discussing","ready","replanning")?u.jsx("button",{disabled:!N.objective||!N.currentPlan,onClick:()=>void ml("start"),title:N.objective&&N.currentPlan?"Start this complex task":"A complete candidate plan is required before starting",type:"button",children:"Start"}):null,N.status==="active"?u.jsx("button",{onClick:()=>void ml("pause"),type:"button",children:"Pause"}):null,hp(N.status,"paused","waiting","blocked")?u.jsx("button",{onClick:()=>void ml("resume"),type:"button",children:"Resume"}):null,hp(N.status,"active","paused","waiting","blocked")?u.jsx("button",{className:"secondary",onClick:()=>void ml("replan"),type:"button",children:"Replan"}):null,u.jsx("button",{className:"quiet danger",onClick:()=>void ml("end"),type:"button",children:"End task"})]})]}):null,(Qe==null?void 0:Qe.status)==="initialization_failed"&&Qe.cloneLineage?u.jsxs("div",{className:"clone-initialization-error",children:[u.jsxs("div",{children:[u.jsx("strong",{children:"Clone initialization failed"}),u.jsx("span",{children:Qe.cloneLineage.initializationError??"The runtime could not initialize this clone."})]}),u.jsx("button",{onClick:()=>void pl(),type:"button",children:"Retry with a clean thread"})]}):null,u.jsx("div",{className:"stream",onScroll:()=>void y0(),ref:ds,style:{scrollPaddingBottom:el},children:u.jsxs("div",{className:"stream-inner",style:{paddingBottom:el},children:[Kr.length===0?u.jsx("div",{className:"empty-state",children:u.jsx("h2",{children:"Start a workspace"})}):null,u.jsxs("section",{className:"message-log","aria-label":"Conversation messages",children:[Qe!=null&&Qe.cloneLineage&&Ao.size>0?u.jsxs("div",{className:"clone-history-boundary clone-history-source",children:[u.jsxs("strong",{children:["Inherited from ",Qe.cloneLineage.sourceWorkspaceTitle]}),u.jsxs("span",{children:["through ",ut(Qe.cloneLineage.snapshotAt)," · ",Qe.cloneLineage.importedMessageCount," messages"]})]}):null,(Rs=Et==null?void 0:Et.history)!=null&&Rs.hasMoreBefore?u.jsx("div",{className:"history-loader",children:Et.loadingOlder?"Loading earlier messages...":"Scroll up for earlier messages"}):null,Nu.map((x,j)=>{var we,qe,De;const E=((we=x.user)==null?void 0:we.type)==="system",q=x.turnIds.some(Le=>Ao.has(Le)),Y=Nu[j+1],se=q&&(!Y||!Y.turnIds.some(Le=>Ao.has(Le)));return u.jsxs(B.Fragment,{children:[u.jsxs("section",{className:`turn-group${q?" clone-history-turn":""}`,"data-turn-id":x.id,children:[x.user?u.jsxs("div",{className:`turn-panel ${E?"system-turn":"user-turn"}`,children:[_c(x.user,Qe,Tr,Ba,or,Ms,kl,zs,ga,_),u.jsx(Ic,{copied:Qi===`${E?"system":"user"}-${x.id}-bottom`,content:Bc(x.user),id:`${E?"system":"user"}-${x.id}-bottom`,timestamp:x.user.createdAt,variant:"outside",onCopy:bs})]}):null,x.followupUsers.length>0?u.jsx("div",{className:"turn-followup-users","aria-label":"Additional turn input",children:x.followupUsers.map(Le=>u.jsxs("div",{className:"turn-panel user-turn followup-user-turn",children:[u.jsx("span",{className:"followup-user-label",children:"Added while running"}),_c(Le,Qe,Tr,Ba,or,Ms,kl,zs,ga,_),u.jsx(Ic,{copied:Qi===`user-${Le.id}-bottom`,content:Bc(Le),id:`user-${Le.id}-bottom`,timestamp:Le.createdAt,variant:"outside",onCopy:bs})]},Le.id))}):null,(qe=x.acceptedSystemInputs)==null?void 0:qe.map(Le=>u.jsxs("div",{className:"turn-panel system-turn",children:[_c(Le,Qe,Tr,Ba,or,Ms,kl,zs,ga,_),u.jsx(Ic,{copied:Qi===`system-${Le.id}-bottom`,content:Bc(Le),id:`system-${Le.id}-bottom`,timestamp:Le.createdAt,variant:"outside",onCopy:bs})]},Le.id)),x.agentItems.length>0||x.stopped?u.jsx(bN,{group:x,conversation:Qe,allowProcessView:!q,copiedFooter:Qi===`agent-${x.id}-bottom`,copiedArtifactUrl:or,running:!q&&Fc(x.turnIds,ys),onCopyArtifactUrl:Ba,onCopyBubble:bs,onPreviewArtifact:Tr,onLoadProcessDetails:Le=>Qe&&!q?Lo(Qe.id,Le):void 0,onRespondApproval:Ms,onRespondWorkspaceChangeProposal:kl,onRespondKnowledgeProposal:zs,onOpenComplexTask:ga,onOpenSystemEvent:_}):null,(De=x.trailingSystemItems)==null?void 0:De.map(Le=>u.jsxs("div",{className:"turn-panel system-turn",children:[_c(Le,Qe,Tr,Ba,or,Ms,kl,zs,ga,_),u.jsx(Ic,{copied:Qi===`system-${Le.id}-bottom`,content:Bc(Le),id:`system-${Le.id}-bottom`,timestamp:Le.createdAt,variant:"outside",onCopy:bs})]},Le.id))]}),se?u.jsx("div",{className:"clone-history-boundary clone-history-end",children:"Clone starts here"}):null]},x.id)})]})]})}),u.jsxs("form",{className:"composer",onSubmit:Vu,ref:qn,children:[cl?u.jsxs("div",{className:`global-activity ${cl.tone??"running"}`,children:[fi?u.jsx("button",{"aria-label":"Stop current workspace activity",className:"turn-stop activity-stop",onClick:()=>void Ku(),title:"Stop current workspace activity",type:"button",children:u.jsx(SN,{})}):u.jsx("span",{className:"activity-wait-dot","aria-hidden":"true"}),u.jsxs("div",{className:"global-activity-text",children:[u.jsx("span",{children:cl.title}),cl.detail?u.jsx("small",{children:cl.detail}):null]}),fi?u.jsx("span",{className:"activity-spinner","aria-hidden":"true"}):null]}):null,u.jsxs("div",{className:"composer-panel",children:[u.jsxs("button",{"aria-label":N?"Complex task mode is locked while a task is in progress":"Toggle complex task mode","aria-pressed":!!N||D==="complex",className:`complex-mode-button ${N||D==="complex"?"active":""}`,disabled:!!N,onClick:()=>M(x=>x==="complex"?"simple":"complex"),title:N?"End the current complex task before switching back":D==="complex"?"Complex task mode on":"Complex task mode off",type:"button",children:[u.jsx(c7,{}),u.jsx("span",{className:"complex-mode-tooltip",role:"tooltip",children:N?"Complex task active":D==="complex"?"Complex task mode on":"Complex task mode off"})]}),u.jsx("textarea",{disabled:ul.textareaDisabled,onChange:x=>xl(x.target.value),onKeyDown:D0,placeholder:"Cmd/Ctrl + Enter",ref:da,value:o}),u.jsxs("button",{"aria-label":"Send message",className:"composer-send",disabled:ul.sendDisabled,type:"submit",children:[u.jsx(CN,{}),u.jsxs("span",{className:"composer-send-tooltip",role:"tooltip",children:[u.jsxs("span",{children:[u.jsx("kbd",{children:"⌘ / Ctrl + Enter"})," Send or add to running turn"]}),u.jsxs("span",{children:[u.jsx("kbd",{children:"⇧ + ⌘ / Ctrl + Enter"})," New turn or queue"]})]})]})]})]}),Vr?u.jsx("div",{className:"artifact-lightbox",onClick:()=>Tr(null),role:"presentation",children:u.jsxs("figure",{className:"artifact-lightbox-card",onClick:x=>x.stopPropagation(),children:[u.jsx("button",{"aria-label":"Close preview",className:"artifact-lightbox-close",onClick:()=>Tr(null),type:"button",children:"×"}),u.jsx("img",{alt:Vr.name,src:Vr.url}),u.jsxs("figcaption",{children:[u.jsx("span",{children:Vr.name}),u.jsxs("div",{className:"artifact-lightbox-actions",children:[u.jsx("a",{href:Vr.url,rel:"noreferrer",target:"_blank",children:"Open in new tab"}),u.jsx("button",{onClick:()=>void Ba(Vr),type:"button",children:or===Vr.url?"Copied":"Copy URL"})]})]})]})}):null]})]})}function FE({conversation:e,clockNow:t,knowledgeDraft:n,workspaceKnowledge:a,tokenUsage:l,onCancelKnowledgeEdit:o,onDeleteKnowledge:c,onEditKnowledge:f,onKnowledgeDraftChange:h,onSubmitKnowledge:m,onClose:y}){const[v,k]=B.useState("overview"),[b,T]=B.useState(!1),[N,U]=B.useState(!1),[D,M]=B.useState(null),[L,G]=B.useState(null),[te,_]=B.useState(!1),[W,ae]=B.useState(null),[Q,F]=B.useState(null),[oe,de]=B.useState(!1),[_e,be]=B.useState(null),[ge,Z]=B.useState(null),le=H7(l),Me=r1(e,e.status),We=D?hD(D):null;B.useEffect(()=>{T(!1),M(null),G(null),ae(null),F(null),be(null),Z(null)},[e.id]),B.useEffect(()=>{v==="additionalContext"&&!W&&I()},[v,W]),B.useEffect(()=>{v==="compactions"&&!_e&&ee()},[v,_e]);const H=()=>{T(!0),U(!0),G(null),vz(e.id).then(R=>M(R)).catch(R=>{const me=ht(R);G(me.detail?`${me.message}
|
|
359
|
-
${me.detail}`:me.message)}).finally(()=>U(!1))},I=()=>{_(!0),F(null),bz(e.id).then(R=>ae(R)).catch(R=>{const me=ht(R);F(me.detail?`${me.message}
|
|
360
|
-
${me.detail}`:me.message)}).finally(()=>_(!1))},ee=()=>{de(!0),Z(null),wz(e.id).then(R=>be(R)).catch(R=>{const me=ht(R);Z(me.detail?`${me.message}
|
|
361
|
-
${me.detail}`:me.message)}).finally(()=>de(!1))};return u.jsx("div",{className:"context-panel-overlay workspace-context-overlay",onClick:y,role:"presentation",children:u.jsxs("section",{"aria-label":"Workspace context",className:"context-panel workspace-context-panel",onClick:R=>R.stopPropagation(),children:[u.jsxs("header",{className:"context-panel-header workspace-context-header",children:[u.jsxs("div",{children:[u.jsx("h2",{children:"Workspace Context"}),u.jsx("p",{children:"Long-lived context assets and observable state for this workspace."})]}),u.jsx("button",{"aria-label":"Close context panel",onClick:y,type:"button",children:"×"})]}),u.jsxs("div",{className:"workspace-context-body",children:[u.jsxs("nav",{className:"settings-nav workspace-context-nav","aria-label":"Workspace context sections",children:[u.jsxs("button",{className:v==="overview"?"active":void 0,onClick:()=>k("overview"),type:"button",children:[u.jsx("span",{children:"Overview"}),u.jsx("small",{children:"Identity + state"})]}),u.jsxs("button",{className:v==="responsibility"?"active":void 0,onClick:()=>k("responsibility"),type:"button",children:[u.jsx("span",{children:"Responsibility"}),u.jsx("small",{children:"Long-lived role"})]}),u.jsxs("button",{className:v==="knowledge"?"active":void 0,onClick:()=>k("knowledge"),type:"button",children:[u.jsx("span",{children:"Knowledge"}),u.jsx("small",{children:"Sources + skills"})]}),u.jsxs("button",{className:v==="runtime"?"active":void 0,onClick:()=>k("runtime"),type:"button",children:[u.jsx("span",{children:"Runtime View"}),u.jsx("small",{children:"Thread + tokens"})]}),u.jsxs("button",{className:v==="compactions"?"active":void 0,onClick:()=>k("compactions"),type:"button",children:[u.jsx("span",{children:"Compactions"}),u.jsx("small",{children:"Context history"})]}),u.jsxs("button",{className:v==="additionalContext"?"active":void 0,onClick:()=>k("additionalContext"),type:"button",children:[u.jsx("span",{children:"Additional Context"}),u.jsx("small",{children:"Injected keys"})]})]}),u.jsx("div",{className:"workspace-context-content",children:v==="overview"?u.jsxs("div",{className:"workspace-context-grid",children:[u.jsxs("section",{className:`context-card wide workspace-status-detail ${Me}`,children:[u.jsx("h3",{children:"Current Status"}),u.jsx(Tt,{label:"Status",value:Jd(Me,e.nextWakeup,t)}),e.nextWakeup?u.jsxs(u.Fragment,{children:[u.jsx(Tt,{label:"Wakeup state",value:e.nextWakeup.status}),u.jsx(Tt,{label:"Wake at",value:Yc(e.nextWakeup.wakeAt)}),e.nextWakeup.status==="scheduled"?u.jsx(Tt,{label:"Remaining",value:mf(e.nextWakeup,t)}):null,u.jsx(Tt,{label:"Created by",value:e.nextWakeup.createdBy}),u.jsx(Tt,{label:"Attempts",value:`${e.nextWakeup.attemptCount} / ${e.nextWakeup.maxAttempts}`,mono:!0}),u.jsxs("div",{className:"workspace-status-detail-text",children:[u.jsx("span",{children:"Wakeup instruction"}),u.jsx("pre",{children:e.nextWakeup.instruction})]}),e.nextWakeup.error?u.jsxs("div",{className:"workspace-status-detail-text error",children:[u.jsx("span",{children:"Wakeup error"}),u.jsx("pre",{children:e.nextWakeup.error})]}):null]}):null,e.statusError?u.jsxs("div",{className:"workspace-status-detail-text error",children:[u.jsx("span",{children:"Error"}),u.jsx("pre",{children:e.statusError})]}):e.status==="error"||e.status==="initialization_failed"?u.jsx("p",{className:"context-muted",children:"No persisted error detail is available for this status."}):null]}),u.jsxs("section",{className:"context-card",children:[u.jsx("h3",{children:"Workspace"}),u.jsx(Tt,{label:"Name",value:e.title}),u.jsx(Tt,{label:"ID",value:`workspaces/${su(e.id)}`,mono:!0}),u.jsx(Tt,{label:"Path",value:e.workspacePath,mono:!0})]}),u.jsxs("section",{className:"context-card",children:[u.jsx("h3",{children:"Context Assets"}),u.jsx(Tt,{label:"Responsibility",value:e.responsibility.trim()?"configured":"missing"}),u.jsx(Tt,{label:"Memory",value:e.memory.trim()?"configured":"empty"}),u.jsx(Tt,{label:"Knowledge",value:`${a.length} item${a.length===1?"":"s"}`})]}),u.jsxs("section",{className:"context-card wide",children:[u.jsx("h3",{children:"Current Responsibility"}),e.responsibility.trim()?u.jsx("div",{className:"context-markdown-preview",children:Zl(e.responsibility,e)}):u.jsx("p",{className:"context-muted",children:"No approved responsibility is configured yet."})]}),u.jsxs("section",{className:"context-card wide",children:[u.jsx("h3",{children:"Knowledge Index"}),u.jsx(u7,{items:a,onDelete:c,onEdit:R=>{f(R),k("knowledge")}})]})]}):v==="responsibility"?u.jsxs("section",{className:"context-tab-surface",children:[u.jsx("header",{className:"settings-section-header",children:u.jsxs("div",{children:[u.jsx("h3",{children:"Workspace Responsibility"}),u.jsx("p",{children:"User-approved long-lived role for this workspace. Edit it from Settings in workspace scope."})]})}),e.responsibility.trim()?u.jsx("div",{className:"context-card context-markdown-preview",children:Zl(e.responsibility,e)}):u.jsx("p",{className:"context-card context-muted",children:"No approved responsibility is configured yet."})]}):v==="knowledge"?u.jsx(cN,{draft:n,items:a,scope:"workspace",workspaceName:e.title,onCancel:o,onDelete:c,onDraftChange:h,onEdit:f,onSubmit:m}):v==="runtime"?u.jsxs("div",{className:"workspace-context-grid",children:[u.jsxs("section",{className:"context-card",children:[u.jsx("h3",{children:"Runtime"}),u.jsx(Tt,{label:"Runtime thread",value:e.codexThreadId??"not started",mono:!0}),u.jsxs("div",{className:"thread-read-actions",children:[u.jsx("button",{disabled:N,onClick:H,type:"button",children:N?"Reading...":"Read Codex thread"}),b?u.jsx("button",{disabled:N,onClick:()=>T(!1),type:"button",children:"Hide"}):null]})]}),u.jsxs("section",{className:"context-card",children:[u.jsx("h3",{children:"Token Window"}),l?u.jsxs(u.Fragment,{children:[u.jsx(Tt,{label:"Used",value:le===null?"unknown":`${Math.round(le)}%`,mono:!0}),u.jsx(Tt,{label:"Latest usage",value:l.modelContextWindow?`${Cr(l.totalTokens)} / ${Cr(l.modelContextWindow)}`:Cr(l.totalTokens),mono:!0}),le!==null?u.jsx("div",{className:`context-token-bar ${Q1(le)}`,children:u.jsx("span",{style:{width:`${_f(le)}%`}})}):null,u.jsx(Tt,{label:"Input / output",value:`${Qd(l.inputTokens)} / ${Qd(l.outputTokens)}`,mono:!0}),u.jsx(Tt,{label:"Reasoning",value:Qd(l.reasoningOutputTokens),mono:!0}),u.jsxs("p",{className:"context-muted",children:["Updated ",ut(l.createdAt),"."]})]}):u.jsx("p",{className:"context-muted",children:"No token usage event has been observed in the loaded event window yet."})]}),b?u.jsxs("section",{className:"context-card wide thread-read-panel",children:[u.jsx("h3",{children:"Runtime thread profile"}),u.jsx("p",{className:"context-muted",children:"One-time live thread/read response from Codex app-server. Seele does not persist this profile result."}),N?u.jsx("p",{className:"context-muted",children:"Reading Codex thread..."}):L?u.jsx("pre",{className:"thread-read-error",children:L}):D?u.jsxs(u.Fragment,{children:[We?u.jsx(yN,{summary:We}):null,u.jsxs("details",{className:"thread-read-raw",open:!0,children:[u.jsx("summary",{children:"Raw thread/read JSON"}),u.jsx("pre",{className:"thread-read-dump",children:JSON.stringify(D,null,2)})]})]}):u.jsx("p",{className:"context-muted",children:"No thread/read result loaded yet."})]}):null]}):v==="compactions"?u.jsxs("section",{className:"context-tab-surface",children:[u.jsxs("header",{className:"settings-section-header",children:[u.jsxs("div",{children:[u.jsx("h3",{children:"Context Compactions"}),u.jsx("p",{children:"Compaction history recorded for the current runtime thread."})]}),u.jsx("button",{className:"context-refresh-button",disabled:oe,onClick:ee,type:"button",children:oe?"Refreshing...":"Refresh"})]}),ge?u.jsx("pre",{className:"thread-read-error",children:ge}):oe&&!_e?u.jsx("p",{className:"context-card context-muted",children:"Loading compaction history..."}):_e!=null&&_e.length?u.jsx("div",{className:"context-compaction-list",children:_e.map(R=>u.jsxs("article",{className:"context-compaction-item",children:[u.jsxs("div",{className:"context-compaction-heading",children:[u.jsx("time",{children:ut(R.completedAt??R.usageObservedAt??R.startedAt??"")}),u.jsx("span",{className:`context-compaction-status ${R.status}`,children:R.status==="completed"?"Completed":"Running"})]}),u.jsx("dl",{className:"context-compaction-facts",children:lD(R).map(me=>u.jsxs("div",{children:[u.jsx("dt",{children:me.label}),u.jsx("dd",{children:me.value})]},me.label))}),u.jsxs("small",{children:[es(R.id),R.turnId?` · turn ${es(R.turnId)}`:""]})]},R.id))}):u.jsx("p",{className:"context-card context-muted",children:"No compaction records yet."})]}):u.jsxs("section",{className:"context-tab-surface thread-read-panel",children:[u.jsx("header",{className:"settings-section-header",children:u.jsxs("div",{children:[u.jsx("h3",{children:"Additional Context"}),u.jsx("p",{children:"One-time live render of the application additionalContext for this workspace. Seele does not persist this preview result."})]})}),te?u.jsx("p",{className:"context-card context-muted",children:"Rendering additionalContext..."}):Q?u.jsx("pre",{className:"thread-read-error",children:Q}):W?u.jsx(pN,{preview:W,refreshing:te,onRefresh:I}):u.jsx("p",{className:"context-card context-muted",children:"No additionalContext preview loaded yet."})]})})]})]})})}function Nc(e){const t=e instanceof Qs?e.detail:e instanceof Error?e.message:String(e);let n="";if(e instanceof Qs)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 PE({conversations:e,onClose:t,workspaceGroups:n}){var H;const[a,l]=B.useState([]),[o,c]=B.useState("active"),[f,h]=B.useState(null),[m,y]=B.useState([]),[v,k]=B.useState(!0),[b,T]=B.useState(null),[N,U]=B.useState(null),[D,M]=B.useState(!1),[L,G]=B.useState(!1),[te,_]=B.useState(new Set),[W,ae]=B.useState({title:"",publicDescription:"",ownerWorkspaceId:((H=e[0])==null?void 0:H.id)??"",participantWorkspaceIds:[]}),Q=a.find(I=>I.id===f)??null,F=B.useMemo(()=>new Map(e.map(I=>[I.id,I.title])),[e]),oe=a.filter(I=>o==="archived"?I.status==="archived":I.status!=="archived"),de=n.map(I=>({...I,conversations:I.conversations.filter(ee=>ee.id!==W.ownerWorkspaceId)})).filter(I=>I.conversations.length>0),_e=()=>{var I;T(null),ae({title:"",publicDescription:"",ownerWorkspaceId:((I=e[0])==null?void 0:I.id)??"",participantWorkspaceIds:[]}),_(new Set),U("create")},be=()=>{!Q||Q.status!=="active"||(T(null),ae({title:Q.title,publicDescription:Q.publicDescription,ownerWorkspaceId:Q.ownerWorkspaceId,participantWorkspaceIds:Q.members.filter(I=>I.role==="participant"&&I.status==="active").map(I=>I.workspaceId)}),_(new Set),U("edit"))},ge=async(I,ee=o)=>{var R;k(!0),T(null);try{const me=await f5();l(me);const Oe=me.filter(Be=>ee==="archived"?Be.status==="archived":Be.status!=="archived"),Re=(I&&Oe.some(Be=>Be.id===I)?I:null)??(f&&Oe.some(Be=>Be.id===f)?f:((R=Oe[0])==null?void 0:R.id)??null);h(Re),y(Re?await Fd(Re):[])}catch(me){T(Nc(me))}finally{k(!1)}};B.useEffect(()=>{ge()},[]),B.useEffect(()=>{const I=window.setInterval(()=>{(async()=>{try{const ee=await f5();l(ee),f&&ee.some(R=>R.id===f)&&y(await Fd(f))}catch{}})()},1e4);return()=>window.clearInterval(I)},[f]);const Z=async I=>{h(I),T(null);try{y(await Fd(I))}catch(ee){T(Nc(ee))}},le=async I=>{var R;if(I===o)return;c(I),T(null);const ee=((R=a.find(me=>I==="archived"?me.status==="archived":me.status!=="archived"))==null?void 0:R.id)??null;if(h(ee),!ee){y([]);return}try{y(await Fd(ee))}catch(me){T(Nc(me))}},Me=async I=>{var ee;if(I.preventDefault(),!(!W.title.trim()||!W.ownerWorkspaceId)){G(!0),T(null);try{const R=N==="edit"&&Q?await HM(Q.id,{expectedVersion:Q.version,title:W.title.trim(),publicDescription:W.publicDescription.trim(),participantWorkspaceIds:W.participantWorkspaceIds}):await UM({...W,title:W.title.trim(),publicDescription:W.publicDescription.trim()});c("active"),U(null),ae({title:"",publicDescription:"",ownerWorkspaceId:((ee=e[0])==null?void 0:ee.id)??"",participantWorkspaceIds:[]}),await ge(R.id,"active")}catch(R){T(Nc(R))}finally{G(!1)}}},We=async()=>{if(!(!Q||Q.status!=="active")){G(!0),T(null);try{const I=await $M(Q.id,Q.version);M(!1),c("active"),await ge(void 0,"active")}catch(I){T(Nc(I))}finally{G(!1)}}};return u.jsx("div",{className:"context-panel-overlay settings-overlay",onClick:t,role:"presentation",children:u.jsxs("section",{"aria-label":"工作空间协作",className:"context-panel collaboration-panel",onClick:I=>I.stopPropagation(),children:[u.jsxs("header",{className:"context-panel-header collaboration-panel-header",children:[u.jsxs("div",{children:[u.jsx("h2",{children:"协作"}),u.jsx("p",{children:"在明确选择的工作空间之间建立持久、定向的 Topic 通信。"})]}),u.jsxs("div",{className:"collaboration-header-actions",children:[u.jsx("button",{"aria-label":"新建 Topic",className:"memory-icon-button collaboration-new-topic",onClick:_e,title:"新建 Topic",type:"button",children:"+"}),u.jsx("button",{"aria-label":"关闭协作",className:"icon-button",onClick:t,type:"button",children:"×"})]})]}),b&&!N&&!D?u.jsx("div",{className:"collaboration-error",role:"alert",children:b}):null,u.jsxs("div",{className:"collaboration-body",children:[u.jsxs("nav",{className:"collaboration-topic-list","aria-label":"协作 Topics",children:[u.jsxs("div",{className:"collaboration-topic-tabs",role:"tablist","aria-label":"Topic 列表范围",children:[u.jsx("button",{"aria-selected":o==="active",className:o==="active"?"active":void 0,onClick:()=>void le("active"),role:"tab",type:"button",children:"当前"}),u.jsx("button",{"aria-selected":o==="archived",className:o==="archived"?"active":void 0,onClick:()=>void le("archived"),role:"tab",type:"button",children:"已归档"})]}),v?u.jsx("p",{children:"正在加载..."}):oe.length===0?u.jsx("p",{children:o==="archived"?"还没有已归档 Topic。":"还没有当前 Topic。"}):oe.map(I=>u.jsxs("button",{className:`collaboration-topic-entry${I.id===f?" active":""}`,onClick:()=>void Z(I.id),type:"button",children:[u.jsx("span",{children:I.title}),u.jsxs("small",{children:[I.members.length," 个工作空间 · ",I.status]})]},I.id))]}),u.jsx("main",{className:"collaboration-topic-detail",children:Q?u.jsxs(u.Fragment,{children:[u.jsxs("header",{children:[u.jsxs("div",{children:[u.jsx("h3",{children:Q.title}),u.jsx("p",{children:Q.publicDescription||"没有公开描述。"})]}),u.jsxs("div",{className:"collaboration-topic-actions",children:[u.jsx("span",{children:Q.status}),Q.status==="active"?u.jsxs(u.Fragment,{children:[u.jsx("button",{"aria-label":`编辑 Topic ${Q.title}`,className:"memory-icon-button",onClick:be,title:"编辑",type:"button",children:u.jsx(Of,{})}),u.jsx("button",{"aria-label":`归档 Topic ${Q.title}`,className:"memory-icon-button",onClick:()=>M(!0),title:"归档",type:"button",children:u.jsx(RM,{})})]}):null]})]}),u.jsx("div",{className:"collaboration-members",children:Q.members.filter(I=>I.status==="active").map(I=>u.jsxs("span",{children:[I.workspaceTitleSnapshot,u.jsx("small",{children:I.role})]},`${I.workspaceId}-${I.membershipVersion}`))}),u.jsx("div",{className:"collaboration-message-list",children:m.length===0?u.jsx("p",{children:"还没有消息。"}):m.map(I=>u.jsxs("article",{children:[u.jsxs("header",{children:[u.jsx("strong",{children:I.senderTitleSnapshot}),u.jsx("span",{children:I.recipientWorkspaceIds.includes("ALL")?"发给全部参与者":`发给 ${N7(I.recipientWorkspaceIds.map(ee=>F.get(ee)??es(ee)))}`}),u.jsx("time",{children:ut(I.createdAt)})]}),u.jsx("div",{className:"markdown-body",children:Zl(I.contentMarkdown,void 0)})]},I.id))})]}):u.jsx("div",{className:"collaboration-empty",children:"选择或新建一个 Topic。"})})]}),N?u.jsx("div",{className:"collaboration-create-overlay",role:"presentation",onClick:()=>!L&&U(null),children:u.jsxs("form",{className:"dialog-card collaboration-create-dialog",onClick:I=>I.stopPropagation(),onSubmit:Me,children:[u.jsxs("header",{children:[u.jsxs("div",{children:[u.jsx("h3",{children:N==="edit"?"编辑 Topic":"新建 Topic"}),u.jsx("p",{children:N==="edit"?"调整公开信息与参与工作空间。":"明确选择本次通信的 owner 与参与者。"})]}),u.jsx("button",{"aria-label":"关闭 Topic 编辑",className:"icon-button",onClick:()=>U(null),type:"button",children:"×"})]}),u.jsxs("label",{children:["标题",u.jsx("input",{autoFocus:!0,placeholder:"填写 Topic 标题",value:W.title,onChange:I=>ae(ee=>({...ee,title:I.target.value}))})]}),u.jsxs("label",{children:["公开描述",u.jsx("textarea",{placeholder:"填写所有参与工作空间可见的共享背景",value:W.publicDescription,onChange:I=>ae(ee=>({...ee,publicDescription:I.target.value}))})]}),u.jsxs("label",{children:["Owner 工作空间",u.jsx("select",{disabled:N==="edit",value:W.ownerWorkspaceId,onChange:I=>ae(ee=>({...ee,ownerWorkspaceId:I.target.value,participantWorkspaceIds:ee.participantWorkspaceIds.filter(R=>R!==I.target.value)})),children:n.map(I=>u.jsx("optgroup",{label:I.title,children:I.conversations.map(ee=>u.jsx("option",{value:ee.id,children:ee.title},ee.id))},I.id))})]}),u.jsxs("fieldset",{className:"collaboration-participant-groups",children:[u.jsx("legend",{children:"参与工作空间"}),u.jsxs("div",{className:"collaboration-participant-toolbar",children:[u.jsxs("span",{children:[W.participantWorkspaceIds.length," 个已选择"]}),u.jsxs("div",{children:[u.jsx("button",{onClick:()=>_(new Set),type:"button",children:"全部展开"}),u.jsx("button",{onClick:()=>_(new Set(de.map(I=>I.id))),type:"button",children:"全部收起"})]})]}),de.map(I=>{const ee=I.conversations,R=ee.filter(Oe=>W.participantWorkspaceIds.includes(Oe.id)).length,me=te.has(I.id);return u.jsxs("section",{className:"collaboration-participant-group",children:[u.jsxs("header",{children:[u.jsxs("button",{"aria-expanded":!me,className:"collaboration-group-toggle",onClick:()=>_(Oe=>{const Re=new Set(Oe);return Re.has(I.id)?Re.delete(I.id):Re.add(I.id),Re}),type:"button",children:[u.jsx("span",{"aria-hidden":"true",className:me?void 0:"expanded",children:"›"}),u.jsx("strong",{children:I.title}),u.jsxs("small",{children:[R,"/",ee.length]})]}),u.jsxs("label",{title:`选择 ${I.title} 全部工作空间`,children:[u.jsx("input",{checked:R===ee.length,onChange:()=>ae(Oe=>{const Re=ee.map(ve=>ve.id),Be=new Set(Oe.participantWorkspaceIds);return Re.every(ve=>Be.has(ve))?Re.forEach(ve=>Be.delete(ve)):Re.forEach(ve=>Be.add(ve)),{...Oe,participantWorkspaceIds:Array.from(Be)}}),type:"checkbox"}),u.jsx("span",{children:"全选"})]})]}),me?null:u.jsx("div",{children:ee.map(Oe=>u.jsxs("label",{className:"collaboration-participant-option",children:[u.jsx("input",{checked:W.participantWorkspaceIds.includes(Oe.id),onChange:Re=>ae(Be=>({...Be,participantWorkspaceIds:Re.target.checked?[...Be.participantWorkspaceIds,Oe.id]:Be.participantWorkspaceIds.filter(ve=>ve!==Oe.id)})),type:"checkbox"}),u.jsx("span",{children:Oe.title})]},Oe.id))})]},I.id)})]}),u.jsxs("footer",{className:"collaboration-submit-footer",children:[b?u.jsx("div",{className:"collaboration-error",role:"alert",children:b}):null,u.jsxs("div",{children:[u.jsx("button",{className:"secondary",disabled:L,onClick:()=>U(null),type:"button",children:"取消"}),u.jsx("button",{disabled:L||!W.title.trim()||!W.ownerWorkspaceId,type:"submit",children:L?"正在保存...":N==="edit"?"保存":"创建 Topic"})]})]})]})}):null,D&&Q?u.jsx("div",{className:"collaboration-create-overlay",onClick:()=>!L&&M(!1),role:"presentation",children:u.jsxs("section",{"aria-label":"归档 Topic",className:"dialog-card collaboration-archive-dialog",onClick:I=>I.stopPropagation(),children:[u.jsxs("header",{children:[u.jsxs("div",{children:[u.jsx("h3",{children:"归档 Topic"}),u.jsx("p",{children:"归档后保留历史消息,但工作空间不能再向此 Topic 发送新消息。"})]}),u.jsx("button",{"aria-label":"关闭归档确认",className:"icon-button",onClick:()=>M(!1),type:"button",children:"×"})]}),u.jsx("strong",{children:Q.title}),b?u.jsx("div",{className:"collaboration-error",role:"alert",children:b}):null,u.jsxs("footer",{children:[u.jsx("button",{className:"secondary",disabled:L,onClick:()=>M(!1),type:"button",children:"取消"}),u.jsx("button",{className:"danger",disabled:L,onClick:()=>void We(),type:"button",children:L?"正在归档...":"归档"})]})]})}):null]})})}function GE({busy:e,conversation:t,conversationId:n,forceStopBusy:a,preview:l,previewLoading:o,result:c,status:f,warmup:h,workspaceGroups:m,onCancelResetPreview:y,onClose:v,onForceStop:k,onPreviewReset:b,onStartBlankContext:T,onResetRuntime:N,onSaveResetSelection:U,onWorkspaceChange:D,onWarmupChange:M}){const L=!t||e||f==="running"||f==="initializing";return u.jsx("div",{className:"context-panel-overlay settings-overlay",onClick:v,role:"presentation",children:u.jsxs("section",{"aria-label":"Seele console",className:"context-panel console-panel",onClick:G=>G.stopPropagation(),children:[u.jsxs("header",{className:"context-panel-header console-panel-header",children:[u.jsxs("div",{children:[u.jsx("h2",{children:"Console"}),u.jsx("p",{children:"Control actions for the selected workspace runtime."})]}),u.jsxs("div",{className:"console-header-actions",children:[u.jsxs("label",{className:"console-workspace-picker",children:[u.jsx("span",{children:"Workspace"}),u.jsx("select",{disabled:e,onChange:G=>D(G.target.value),value:n??"",children:m.map(G=>u.jsx("optgroup",{label:G.title,children:G.conversations.map(te=>u.jsxs("option",{value:te.id,children:[te.title," · workspaces/",su(te.id)]},te.id))},G.id))})]}),u.jsx("button",{"aria-label":"Close console",onClick:v,type:"button",children:"×"})]})]}),u.jsx("div",{className:"console-body",children:u.jsxs("section",{className:"console-card",children:[u.jsxs("div",{className:"console-card-heading",children:[u.jsxs("div",{children:[u.jsx("h3",{children:"Workspace Runtime"}),u.jsx("p",{children:"Reset only replaces the Codex runtime thread. Seele workspace history, metadata, and files remain intact."})]}),u.jsx("span",{className:`console-status ${f}`,children:f})]}),u.jsxs("dl",{className:"console-facts",children:[u.jsxs("div",{children:[u.jsx("dt",{children:"Workspace"}),u.jsx("dd",{children:(t==null?void 0:t.title)??"No workspace selected"})]}),u.jsxs("div",{children:[u.jsx("dt",{children:"ID"}),u.jsx("dd",{children:t?`workspaces/${su(t.id)}`:"-"})]}),u.jsxs("div",{children:[u.jsx("dt",{children:"Thread"}),u.jsx("dd",{children:(t==null?void 0:t.codexThreadId)??"Not created"})]})]}),u.jsxs("label",{className:"console-toggle",children:[u.jsx("input",{checked:h,onChange:G=>M(G.target.checked),type:"checkbox"}),u.jsxs("span",{children:["Run a warmup turn after reset",u.jsx("small",{children:"The workspace will receive a system wakeup to re-orient itself after the thread is rebuilt."})]})]}),u.jsxs("div",{className:"console-actions",children:[u.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"}),u.jsx("button",{className:"danger",disabled:L||o,onClick:b,type:"button",children:o?"Preparing preview...":"Preview runtime reset"}),u.jsx("button",{disabled:L||o,onClick:T,type:"button",children:"Clear memory & start blank"}),f==="running"||f==="initializing"?u.jsx("span",{children:"Force stop the active workspace operation before resetting."}):null]}),c?u.jsxs("div",{className:"console-result",children:[u.jsx("strong",{children:c.workspaceMemoryCleared?"Blank workspace context ready":"Runtime reset completed"}),u.jsxs("span",{children:[c.injectedItemCount," visible history items injected"]}),c.historyCompactionCount>0?u.jsxs("span",{children:["Full history processed in ",c.historyBatchCount," chronological batches with ",c.historyCompactionCount," native compactions"]}):null,c.workspaceMemoryCleared?u.jsx("span",{children:"Workspace Memory cleared; Base Memory retained"}):null,u.jsxs("span",{children:["New thread: ",c.newThreadId]}),c.warmupTurnId?u.jsxs("span",{children:["Warmup turn: ",c.warmupTurnId]}):null]}):null]})}),l?u.jsx(VE,{busy:e,preview:l,warmup:h,onCancel:y,onConfirm:N,onSaveSelection:U}):null]})})}function VE({busy:e,preview:t,warmup:n,onCancel:a,onConfirm:l,onSaveSelection:o}){const[c,f]=B.useState(()=>new Set(t.entries.filter(F=>F.includedByDefault).map(F=>F.id))),[h,m]=B.useState(!1),[y,v]=B.useState(!1),[k,b]=B.useState(null),T=B.useRef(null),N=t.entries.filter(F=>c.has(F.id)),U=N.filter(F=>F.role==="user").length,D=N.length-U,M=t.entries.filter(F=>F.topicRelation!==null).map(F=>F.id),L=M.filter(F=>c.has(F)).length,G=t.entries.length>0&&c.size===t.entries.length;B.useEffect(()=>{T.current&&(T.current.indeterminate=c.size>0&&c.size<t.entries.length)},[t.entries.length,c.size]);const te=e||y;async function _(F){v(!0),b(null);try{await o(t.entries.filter(oe=>F.has(oe.id)).map(oe=>oe.id)),f(F)}catch(oe){b(ht(oe).message)}finally{v(!1)}}function W(F,oe){const de=new Set(c);oe?de.add(F):de.delete(F),_(de)}function ae(){const F=new Set(c);M.forEach(oe=>F.add(oe)),_(F)}function Q(){const F=new Set(c);M.forEach(oe=>{F.has(oe)?F.delete(oe):F.add(oe)}),_(F)}return u.jsx("div",{className:`reset-preview-overlay ${h?"expanded":""}`,onClick:te?void 0:a,role:"presentation",children:u.jsxs("section",{"aria-label":"Runtime reset preview","aria-modal":"true",className:`reset-preview-dialog ${h?"expanded":""}`,onClick:F=>F.stopPropagation(),role:"dialog",children:[u.jsxs("header",{className:"reset-preview-header",children:[u.jsxs("div",{children:[u.jsx("h3",{children:"Confirm runtime reset"}),u.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."})]}),u.jsxs("div",{className:"reset-preview-header-actions",children:[u.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?"⊡":"⛶"}),u.jsx("button",{"aria-label":"Close reset preview",disabled:te,onClick:a,type:"button",children:"×"})]})]}),u.jsxs("div",{className:"reset-preview-summary",children:[u.jsxs("label",{className:"reset-preview-select-all",children:[u.jsx("input",{checked:G,disabled:te||t.entries.length===0,onChange:F=>void _(F.target.checked?new Set(t.entries.map(oe=>oe.id)):new Set),ref:T,type:"checkbox"}),u.jsxs("span",{children:[c.size," of ",t.entries.length," selected"]})]}),u.jsxs("span",{children:[U," user"]}),u.jsxs("span",{children:[D," assistant"]}),M.length>0?u.jsxs("div",{className:"reset-preview-topic-actions",children:[u.jsxs("span",{children:[L," of ",M.length," Topic input + response"]}),u.jsx("button",{disabled:te||L===M.length,onClick:ae,type:"button",children:"Select Topic turns"}),u.jsx("button",{disabled:te,onClick:Q,type:"button",children:"Invert Topic turns"})]}):null,u.jsxs("span",{children:[t.historyBatchCount," planned batch",t.historyBatchCount===1?"":"es"]}),u.jsxs("span",{children:["~",t.estimatedTokenCount.toLocaleString()," source tokens"]}),u.jsx("span",{children:n?"Warmup enabled":"No warmup"}),y?u.jsx("span",{children:"Saving defaults..."}):null,k?u.jsx("span",{className:"reset-preview-selection-error",children:k}):null]}),u.jsx("div",{className:"reset-preview-list",children:t.entries.length>0?t.entries.map((F,oe)=>u.jsxs("article",{className:`reset-preview-item ${F.role} ${c.has(F.id)?"":"excluded"}`,children:[u.jsxs("header",{children:[u.jsxs("label",{children:[u.jsx("input",{"aria-label":`Include ${F.role} message ${oe+1}`,checked:c.has(F.id),disabled:te,onChange:de=>W(F.id,de.target.checked),type:"checkbox"}),u.jsx("span",{children:oe+1})]}),u.jsx("strong",{children:F.role}),F.topicRelation?u.jsxs("span",{className:"reset-preview-topic-badge",children:["Topic ",F.topicRelation]}):null,u.jsx("time",{dateTime:F.createdAt,children:ut(F.createdAt)})]}),u.jsx("pre",{children:F.content})]},F.id)):u.jsx("p",{className:"reset-preview-empty",children:"No visible history will be injected."})}),u.jsxs("footer",{className:"reset-preview-actions",children:[u.jsxs("small",{children:["Preview fingerprint: ",t.fingerprint.slice(0,12)]}),u.jsxs("div",{children:[u.jsx("button",{disabled:te,onClick:a,type:"button",children:"Cancel"}),u.jsx("button",{className:"danger",disabled:te,onClick:()=>l(t.entries.filter(F=>c.has(F.id)).map(F=>F.id)),type:"button",children:e?"Rebuilding and compacting...":"Confirm full-history reset"})]})]})]})})}function YE({currentReleasedAt:e,currentVersion:t,job:n,latest:a,latestChecking:l,starting:o,onClose:c,onRefresh:f,onStart:h}){const m=(n==null?void 0:n.currentVersion)??t,y=a!=null&&a.version&&bD(a.version,m)?xD(a.version):null;return B.useEffect(()=>{const v=k=>{k.key==="Escape"&&c()};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[c]),u.jsx("div",{className:"codex-update-overlay",onClick:c,role:"presentation",children:u.jsxs("section",{"aria-label":"Codex CLI update",className:"codex-update-panel",onClick:v=>v.stopPropagation(),children:[u.jsxs("header",{children:[u.jsxs("div",{children:[u.jsx("h3",{children:"Codex CLI update"}),u.jsx("p",{children:"Managed by Seele in the instance runtime directory."})]}),u.jsx("button",{"aria-label":"Close Codex CLI update",onClick:c,type:"button",children:"×"})]}),u.jsxs("dl",{className:"codex-update-summary",children:[u.jsxs("div",{children:[u.jsx("dt",{children:"Status"}),u.jsx("dd",{className:n?`status-${n.status}`:void 0,children:(n==null?void 0:n.status)??"Not started"})]}),u.jsxs("div",{children:[u.jsx("dt",{children:"Current"}),u.jsx("dd",{children:n1(m,(n==null?void 0:n.codexReleasedAt)??e)})]}),u.jsxs("div",{children:[u.jsx("dt",{children:"Latest"}),u.jsxs("dd",{title:(a==null?void 0:a.error)??void 0,children:[l?"Checking...":a!=null&&a.version?n1(a.version,a.releasedAt):a!=null&&a.error?"Check failed":"Not checked",y?u.jsx("a",{className:"codex-release-notes-link",href:y,rel:"noreferrer",target:"_blank",children:"Release notes"}):null]})]}),n?u.jsxs("div",{children:[u.jsx("dt",{children:"Started"}),u.jsx("dd",{children:ut(n.startedAt)})]}):null]}),a!=null&&a.error?u.jsxs("p",{className:"codex-latest-error",children:["Latest version check: ",a.error]}):null,u.jsx("div",{className:"codex-update-log",role:"log","aria-live":"polite",children:n!=null&&n.logs.length?n.logs.map((v,k)=>u.jsxs("div",{className:`log-${v.stream}`,children:[u.jsx("time",{children:vD(v.at)}),u.jsx("span",{children:v.text})]},`${v.at}-${k}`)):u.jsx("p",{children:"No update logs yet."})}),u.jsxs("footer",{children:[u.jsx("button",{className:"secondary",onClick:f,type:"button",children:"Refresh"}),u.jsx("button",{disabled:o||(n==null?void 0:n.status)==="running",onClick:h,type:"button",children:o?"Starting...":(n==null?void 0:n.status)==="running"?"Updating...":n?"Run again":"Start update"})]})]})})}function WE({currentUser:e,conversations:t,deploymentSettings:n,editingEnvironmentKey:a,environmentDraft:l,globalEnvironment:o,workspaceEnvironment:c,memorySettings:f,memorySettingsDraft:h,managedUsers:m,workspaceMemoryDraft:y,runtimeSettings:v,runtimeModels:k,runtimeCodexVersion:b,runtimeCodexReleasedAt:T,runtimeCodexUpdating:N,runtimeSettingsDraft:U,runtimeSettingsScope:D,settingsWorkspace:M,settingsWorkspaceId:L,systemDiagnostics:G,systemDiagnosticsLoading:te,workspaceGroups:_,workspaceRuntimeSettings:W,workspaceRuntimeSettingsDraft:ae,onCancelEnvironmentEdit:Q,onClose:F,onCreateUser:oe,onDeleteUser:de,onDeleteEnvironment:_e,onDraftChange:be,onEditEnvironment:ge,onSaveBaseMemoryItems:Z,onSaveDeploymentSettings:le,onSaveResponsibility:Me,onSaveWorkspaceMemoryItems:We,onRevealEnvironmentValue:H,onRuntimeDraftChange:I,onCodexAccountSwitched:ee,onUpdateCodexCli:R,onRuntimeScopeChange:me,onSettingsWorkspaceChange:Oe,onSubmitRuntimeSettings:Re,onSubmitEnvironment:Be,onRefreshSystemDiagnostics:ve,onUpdateUser:Xe,onWorkspaceRuntimeDraftChange:Ft,onWorkspaceRuntimeReset:pn,revealedEnvironmentKeys:tn}){const[nt,ue]=B.useState("model"),[$e,Ze]=B.useState(!1);B.useEffect(()=>{e.role!=="admin"&&["accounts","channels","users","system","deployment"].includes(nt)&&ue("model")},[e.role,nt]);const[Se,gt]=B.useState(null),[st,pt]=B.useState(!1),[At,sn]=B.useState((M==null?void 0:M.responsibility)??""),[Kt,dt]=B.useState(!1),Kn=B.useRef(null),fe=D==="workspace"?Object.values((W==null?void 0:W.sources)??{}).filter(ke=>ke==="workspace").length:0;return B.useEffect(()=>{D==="global"&&pt(!1)},[D]),B.useEffect(()=>{sn((M==null?void 0:M.responsibility)??"")},[M==null?void 0:M.id,M==null?void 0:M.responsibility]),B.useEffect(()=>{if(!st)return;const ke=rt=>{var An;const St=rt.target;St instanceof Node&&((An=Kn.current)!=null&&An.contains(St))||pt(!1)},Fe=rt=>{rt.key==="Escape"&&pt(!1)};return document.addEventListener("pointerdown",ke,!0),document.addEventListener("keydown",Fe,!0),()=>{document.removeEventListener("pointerdown",ke,!0),document.removeEventListener("keydown",Fe,!0)}},[st]),u.jsx("div",{className:"context-panel-overlay settings-overlay",onClick:F,role:"presentation",children:u.jsxs("section",{"aria-label":"Seele settings",className:"context-panel settings-panel",onClick:ke=>ke.stopPropagation(),children:[u.jsxs("header",{className:"context-panel-header settings-panel-header",children:[u.jsxs("div",{className:"settings-panel-title",children:[u.jsx("h2",{children:"Settings"}),nt!=="system"&&nt!=="users"&&nt!=="accounts"&&nt!=="deployment"?u.jsxs("div",{"aria-label":"Configuration scope",className:"settings-scope-segments",role:"radiogroup",children:[e.role==="admin"?u.jsx("button",{"aria-checked":D==="global",className:D==="global"?"active":void 0,onClick:()=>me("global"),role:"radio",type:"button",children:"Global"}):null,u.jsxs("div",{className:"settings-workspace-picker",ref:Kn,children:[u.jsx("button",{"aria-checked":D==="workspace","aria-expanded":D==="workspace"?st:void 0,"aria-label":D==="workspace"?"Settings workspace target":void 0,className:D==="workspace"?"active settings-scope-workspace-trigger":void 0,disabled:t.length===0,onClick:()=>{if(D!=="workspace"){me("workspace");return}pt(ke=>!ke)},role:"radio",type:"button",children:D==="workspace"?u.jsxs(u.Fragment,{children:[u.jsxs("span",{children:["Workspace: ",(M==null?void 0:M.title)??"Select workspace"]}),u.jsx("span",{"aria-hidden":"true",children:"⌄"})]}):"Workspace"}),D==="workspace"&&st?u.jsx("div",{className:"settings-workspace-menu",role:"listbox",children:_.map(ke=>u.jsxs("div",{className:"settings-workspace-menu-group",children:[u.jsx("div",{className:"settings-workspace-menu-heading",children:ke.title}),ke.conversations.map(Fe=>u.jsxs("button",{"aria-selected":Fe.id===L,className:Fe.id===L?"selected":void 0,onClick:()=>{Oe(Fe.id),pt(!1)},role:"option",type:"button",children:[u.jsx("span",{children:Fe.title}),u.jsxs("small",{children:["workspaces/",Fe.id]})]},Fe.id))]},ke.id))}):null]})]}):null]}),u.jsx("div",{className:"settings-header-actions",children:u.jsx("button",{"aria-label":"Close settings panel",onClick:F,type:"button",children:"×"})})]}),u.jsxs("div",{className:"settings-body",children:[u.jsxs("nav",{className:"settings-nav","aria-label":"Settings sections",children:[u.jsxs("button",{className:nt==="model"?"active":void 0,onClick:()=>ue("model"),type:"button",children:[u.jsx("span",{children:"Runtime"}),u.jsx("small",{children:"Effective settings"})]}),u.jsxs("button",{className:nt==="responsibility"?"active":void 0,onClick:()=>ue("responsibility"),type:"button",children:[u.jsx("span",{children:"Responsibility"}),u.jsx("small",{children:"Workspace role"})]}),u.jsxs("button",{className:nt==="memory"?"active":void 0,onClick:()=>ue("memory"),type:"button",children:[u.jsx("span",{children:"Memory"}),u.jsx("small",{children:"Base + workspace context"})]}),u.jsxs("button",{className:nt==="environment"?"active":void 0,onClick:()=>ue("environment"),type:"button",children:[u.jsx("span",{children:"Environment"}),u.jsx("small",{children:"Base + workspace variables"})]}),e.role==="admin"?u.jsxs(u.Fragment,{children:[u.jsxs("button",{className:nt==="accounts"?"active":void 0,onClick:()=>ue("accounts"),type:"button",children:[u.jsx("span",{children:"Codex Accounts"}),u.jsx("small",{children:"Cloud login + active account"})]}),u.jsxs("button",{className:nt==="channels"?"active":void 0,onClick:()=>ue("channels"),type:"button",children:[u.jsx("span",{children:"Custom model channels"}),u.jsx("small",{children:"Endpoint + key + fixed model"})]}),u.jsxs("button",{className:nt==="deployment"?"active":void 0,onClick:()=>ue("deployment"),type:"button",children:[u.jsx("span",{children:"Deployment"}),u.jsx("small",{children:"Local integrations"})]}),u.jsxs("button",{onClick:()=>{window.location.assign(`${$1()}admin/host`)},type:"button",children:[u.jsx("span",{children:"Work Operations"}),u.jsx("small",{children:"Versions, restart, logs"})]}),u.jsxs("button",{className:nt==="system"?"active":void 0,onClick:()=>ue("system"),type:"button",children:[u.jsx("span",{children:"System"}),u.jsx("small",{children:"Runtime + resources"})]}),u.jsxs("button",{className:nt==="users"?"active":void 0,onClick:()=>ue("users"),type:"button",children:[u.jsx("span",{children:"Users"}),u.jsx("small",{children:"Access + roles"})]})]}):null]}),u.jsxs("section",{className:"settings-content",children:[nt!=="system"&&nt!=="users"&&nt!=="accounts"&&nt!=="channels"&&nt!=="deployment"?u.jsxs("div",{className:`settings-scope-banner ${D==="workspace"?"workspace":"global"}`,children:[u.jsx("strong",{children:D==="workspace"?"Editing workspace custom settings":"Editing global settings"}),u.jsx("span",{children:D==="workspace"?`${(M==null?void 0:M.title)??"Selected workspace"} overrides global defaults.`:"These defaults apply to every workspace unless that workspace overrides them."})]}):null,nt==="system"?u.jsx(KE,{conversations:t,diagnostics:G,loading:te,onRefresh:ve}):nt==="users"?u.jsx(rN,{currentUser:e,users:m,onCreate:oe,onDelete:de,onUpdate:Xe}):nt==="channels"?e.role==="admin"?u.jsx(TA,{load:XM,save:JM,queryBalance:ZM}):null:nt==="accounts"?e.role==="admin"?u.jsx(nN,{onSwitched:ee}):null:nt==="deployment"?u.jsx(aN,{settings:n,onSave:le}):nt==="model"?u.jsx(iN,{draft:D==="workspace"?ae:U,globalSettings:v,models:k,codexVersion:b,codexReleasedAt:T,codexUpdating:N,scope:D,workspaceOverrideCount:fe,settings:D==="workspace"?(W==null?void 0:W.effective)??ae:v,workspaceSettings:W,onDraftChange:D==="workspace"?Ft:I,onResetWorkspaceSetting:pn,onSubmit:Re,onUpdateCodexCli:R}):nt==="responsibility"?u.jsx(ZE,{draft:At,saving:Kt,scope:D,workspace:M,onDraftChange:sn,onSubmit:ke=>{ke.preventDefault(),ke.stopPropagation(),!(D!=="workspace"||!M)&&(dt(!0),Me(M.id,At).then(Fe=>sn(Fe)).finally(()=>dt(!1)))}}):nt==="memory"?u.jsx(lN,{baseSettings:f,scope:D,workspaceSettings:y,workspaceName:M==null?void 0:M.title,onSaveBaseItems:Z,onSaveWorkspaceItems:We}):u.jsx(uN,{deleteConfirmKey:Se,editingEnvironmentKey:a,environmentDraft:l,globalEnvironment:o,scope:D,workspaceEnvironment:c,valueVisible:$e,onCancelEnvironmentEdit:Q,onDeleteConfirmChange:gt,onDeleteEnvironment:_e,onDraftChange:be,onEditEnvironment:ge,onRevealEnvironmentValue:H,onSubmitEnvironment:Be,onValueVisibleChange:Ze,revealedEnvironmentKeys:tn})]})]})]})})}function KE({conversations:e,diagnostics:t,loading:n,onRefresh:a}){const l=(t==null?void 0:t.runtime.pool)??null,o=B.useMemo(()=>(t==null?void 0:t.systemLogs)??[],[t]),[c,f]=B.useState(!1),h=B.useMemo(()=>new Map(e.map(b=>[b.id,b.title])),[e]),m=B.useMemo(()=>t?JSON.stringify({generatedAt:t.generatedAt,app:t.app,systemLogs:o},null,2):"",[t,o]),y=async()=>{m&&(await navigator.clipboard.writeText(m),f(!0),window.setTimeout(()=>f(!1),1800))},v=()=>{if(!m||!t)return;const b=URL.createObjectURL(new Blob([m],{type:"application/json"})),T=document.createElement("a");T.href=b,T.download=`seele-system-log-${t.generatedAt.replaceAll(":","-").replaceAll(".","-")}.json`,T.click(),URL.revokeObjectURL(b)},k=()=>{if(!t||!o.length)return;const b=o[0],T=o.slice(0,5).map(L=>`- ${Yc(L.createdAt)} · ${L.level.toUpperCase()} · ${L.event} · ${L.summary}`).join(`
|
|
364
|
-
`),N=JSON.stringify(b,null,2),U=["## Environment","",`- Seele: ${t.app.version}`,`- Runtime: ${t.app.runtime}`,`- Report generated: ${Yc(t.generatedAt)}`,"","## Latest incident","","```json",N.slice(0,2500),"```","","## Recent system log","",T,"","_Generated by Seele System Log. Attach the downloaded JSON report when more history is needed._"].join(`
|
|
365
|
-
`),D=`[System Log] ${b.summary}`.slice(0,180),M=new URL("https://github.com/seele-labs/seele-work/issues/new");M.searchParams.set("title",D),M.searchParams.set("body",U),window.open(M.toString(),"_blank","noopener,noreferrer")};return u.jsxs("section",{className:"system-information-section",children:[u.jsxs("header",{className:"settings-section-header",children:[u.jsxs("div",{children:[u.jsx("h3",{children:"System"}),u.jsx("p",{children:"Read-only runtime and resource information managed by Seele."})]}),u.jsx("button",{className:"system-information-refresh",disabled:n,onClick:a,type:"button",children:n?"Refreshing...":"Refresh"})]}),l?u.jsxs(u.Fragment,{children:[u.jsxs("dl",{className:"system-information-summary",children:[u.jsxs("div",{children:[u.jsx("dt",{children:"LRU pool target"}),u.jsxs("dd",{children:[Cr(l.maxRetainedRuntimes)," runtimes"]}),u.jsx("small",{children:l.capacitySource==="system_memory"?"Idle runtimes are released by least recent use":"Fallback target because system memory was unavailable"})]}),u.jsxs("div",{children:[u.jsx("dt",{children:"Retention policy"}),u.jsxs("dd",{children:["LRU · ",dp(l.maxIdleSeconds*1e3)," max idle"]}),u.jsx("small",{children:"Only idle runtimes are eligible for eviction"})]}),u.jsxs("div",{children:[u.jsx("dt",{children:"Current pool"}),u.jsxs("dd",{children:[l.activeRuntimeCount," active · ",l.idleRuntimeCount," idle"]}),u.jsxs("small",{children:[l.retainedRuntimeCount," retained runtimes"]})]})]}),u.jsxs("section",{className:"system-runtime-list",children:[u.jsxs("header",{children:[u.jsxs("div",{children:[u.jsx("h4",{children:"Workspace runtimes"}),u.jsx("p",{children:"Active workspaces and idle runtimes currently retained for reuse."})]}),u.jsx("time",{dateTime:t==null?void 0:t.generatedAt,children:t?ut(t.generatedAt):""})]}),l.workspaces.length>0?u.jsxs("div",{className:"system-runtime-table",children:[u.jsxs("div",{className:"system-runtime-table-header",children:[u.jsx("span",{children:"Workspace"}),u.jsx("span",{children:"Status"}),u.jsx("span",{children:"Runtime"}),u.jsx("span",{children:"Age"})]}),l.workspaces.map(b=>u.jsxs("div",{className:"system-runtime-row",children:[u.jsxs("div",{children:[u.jsx("strong",{children:h.get(b.workspaceId)??b.workspaceId}),u.jsx("small",{children:b.workspaceId})]}),u.jsx("span",{className:`system-runtime-state ${b.turnId?"active":"idle"}`,children:b.lifecycle==="shutting_down"?"Shutting down":b.turnId?"Active":"Idle"}),u.jsxs("div",{children:[u.jsx("span",{children:b.turnId?b.state:"Retained"}),u.jsx("small",{children:b.pid===null?"PID unavailable":`PID ${b.pid}`})]}),u.jsx("span",{children:b.idleMs===null?dp(b.uptimeMs):`${dp(b.idleMs)} idle`})]},b.workspaceId))]}):u.jsx("div",{className:"system-runtime-empty",children:"No workspace runtimes are currently retained."})]}),u.jsxs("section",{className:"system-runtime-list system-log-list",children:[u.jsxs("header",{children:[u.jsxs("div",{children:[u.jsx("h4",{children:"System log"}),u.jsx("p",{children:"Recent persistent warnings and errors for external diagnostics."})]}),u.jsxs("div",{className:"system-log-actions",children:[u.jsx("button",{"aria-label":"Copy system log report",className:"icon-button",disabled:!o.length,onClick:()=>void y(),title:"Copy system log report",type:"button",children:u.jsx(W1,{})}),u.jsx("button",{"aria-label":"Download system log report",className:"icon-button",disabled:!o.length,onClick:v,title:"Download system log report",type:"button",children:u.jsx(XE,{})}),u.jsx("button",{"aria-label":"Report system log issue",className:"icon-button",disabled:!o.length,onClick:k,title:"Report issue to seele-labs/seele-work",type:"button",children:u.jsx(QE,{})}),c?u.jsx("small",{children:"Copied"}):null]})]}),o.length?u.jsx("div",{className:"system-log-entries",children:o.map(b=>u.jsxs("details",{className:`system-log-entry ${b.level}`,children:[u.jsxs("summary",{children:[u.jsx("span",{className:"system-log-level",children:b.level}),u.jsxs("span",{children:[u.jsx("strong",{children:b.summary}),u.jsxs("small",{children:[b.component," · ",Yc(b.createdAt)]})]})]}),u.jsxs("dl",{children:[u.jsxs("div",{children:[u.jsx("dt",{children:"Event"}),u.jsx("dd",{children:b.event})]}),b.workspaceId?u.jsxs("div",{children:[u.jsx("dt",{children:"Workspace"}),u.jsxs("dd",{children:[h.get(b.workspaceId)??b.workspaceId," · ",b.workspaceId]})]}):null,b.turnId?u.jsxs("div",{children:[u.jsx("dt",{children:"Turn"}),u.jsx("dd",{children:b.turnId})]}):null,b.runtimeId?u.jsxs("div",{children:[u.jsx("dt",{children:"Runtime"}),u.jsx("dd",{children:b.runtimeId})]}):null]}),u.jsx("pre",{children:JSON.stringify(b.detail,null,2)})]},b.id))}):u.jsx("div",{className:"system-runtime-empty",children:"No warnings or errors have been recorded."})]})]}):u.jsx("div",{className:"system-runtime-empty",children:n?"Loading system information...":"System information is unavailable."})]})}function XE(){return u.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",children:u.jsx("path",{d:"M12 3v12m0 0 4-4m-4 4-4-4M5 20h14"})})}function QE(){return u.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",children:[u.jsx("circle",{cx:"12",cy:"12",r:"9"}),u.jsx("path",{d:"M12 7v6m0 4h.01"})]})}function ZE({draft:e,saving:t,scope:n,workspace:a,onDraftChange:l,onSubmit:o}){const c=n==="workspace";return u.jsxs(u.Fragment,{children:[u.jsx("header",{className:"settings-section-header",children:u.jsxs("div",{children:[u.jsx("h3",{children:"Responsibility"}),u.jsx("p",{children:"Workspace-specific long-lived role. This is content context, so it is only editable in workspace scope."})]})}),c&&a?u.jsxs("form",{className:"settings-responsibility-form",onSubmit:o,children:[u.jsxs("label",{children:[u.jsx("span",{children:a.title}),u.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})]}),u.jsx("div",{className:"settings-form-actions",children:u.jsx("button",{disabled:t,type:"submit",children:t?"Saving...":"Save responsibility"})})]}):u.jsx("section",{className:"settings-readonly-block",children:u.jsxs("div",{children:[u.jsx("strong",{children:"Workspace-only setting"}),u.jsx("span",{children:"Switch the header scope to Workspace and choose a workspace to edit its responsibility."})]})})]})}function JE({usage:e}){return u.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=f7(t.windowDurationMins);return u.jsxs("div",{className:"codex-account-usage-window",children:[u.jsx("div",{className:"codex-account-usage-heading",children:u.jsxs("span",{children:[a," used ",u.jsxs("small",{children:["(Resets ",G7(t.resetsAt),")"]})]})}),u.jsxs("div",{className:"codex-account-usage-meter",children:[u.jsx("span",{"aria-hidden":"true",className:"codex-account-usage-track",children:u.jsx("span",{style:{width:`${n}%`}})}),u.jsx("strong",{children:P7(n)})]})]},`${t.windowDurationMins}:${t.resetsAt}`)})})}function eN(e){if(!e)return null;const t=e.toLowerCase();return t==="chatgpt"?"ChatGPT":t==="apikey"||t==="api_key"?"API key":e}function tN(e){return e?e.split(/[_-]/).filter(Boolean).map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" "):null}function nN({onSwitched:e}){var nt;const[t,n]=B.useState(null),[a,l]=B.useState(!0),[o,c]=B.useState(!1),[f,h]=B.useState(!1),[m,y]=B.useState(""),[v,k]=B.useState(!1),[b,T]=B.useState(""),[N,U]=B.useState(null),[D,M]=B.useState(null),[L,G]=B.useState(""),[te,_]=B.useState(()=>new Date);B.useEffect(()=>{const ue=window.setInterval(()=>_(new Date),3e4);return()=>window.clearInterval(ue)},[]);const[W,ae]=B.useState(""),[Q,F]=B.useState(null),[oe,de]=B.useState(""),[_e,be]=B.useState(null),[ge,Z]=B.useState(!1),[le,Me]=B.useState(""),[We,H]=B.useState(null),I=B.useRef(new Map);async function ee(ue,$e){if(f||o||!window.confirm(`Use one reset credit for ${ue.name}? This consumes the credit if an eligible rate-limit window is reset.`))return;const Ze=JSON.stringify([ue.id,$e.id]),Se=I.current.get(Ze)??crypto.randomUUID();I.current.set(Ze,Se),h(!0),y(""),Me("");try{const gt=Te(`settings/runtime/accounts/${encodeURIComponent(ue.id)}/reset-credits/consume`),st=await fetch(gt,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({creditId:$e.id,idempotencyKey:Se})});await Ue(st,{method:"POST",url:gt});const pt=await st.json(),sn={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."}[pt.outcome];if(!sn)throw new Error("Reset outcome is unknown. Refresh details before trying again.");(pt.outcome==="nothingToReset"||pt.outcome==="noCredit")&&I.current.delete(Ze),Me(`${ue.name}: ${sn}`),n(Kt=>{if(!Kt)return Kt;const dt={...Kt.accountDetails};return delete dt[ue.id],{...Kt,accountDetails:dt}});try{const Kt=await up(!0);n(dt=>Km(dt,Kt))}catch{y("The result above is confirmed, but refreshing details failed. Please refresh details.")}}catch(gt){y(`${ht(gt).message} The outcome may be unknown; retrying this credit on this page reuses the same request ID.`)}finally{h(!1)}}async function R(){var $e;const ue=await m5();n(ue),(($e=ue.login)==null?void 0:$e.status)==="pending"&&(U(ue.login),k(!0))}async function me(ue){c(!0),y("");try{const $e=await up(ue);n(Ze=>Km(Ze,$e))}catch($e){y(ht($e).message)}finally{c(!1)}}B.useEffect(()=>{let ue=!1;return m5().then($e=>{var Ze;ue||(n($e),((Ze=$e.login)==null?void 0:Ze.status)==="pending"&&(U($e.login),k(!0)),$e.accounts.length>0&&(c(!0),up(!1).then(Se=>{ue||n(gt=>Km(gt,Se))}).catch(Se=>{ue||y(ht(Se).message)}).finally(()=>{ue||c(!1)})))}).catch($e=>{ue||y(ht($e).message)}).finally(()=>{ue||l(!1)}),()=>{ue=!0}},[]),B.useEffect(()=>{if(!N||N.status!=="pending")return;let ue=!1;const $e=window.setInterval(()=>{iz(N.id).then(async Ze=>{ue||(U(Ze),Ze.status!=="pending"&&(window.clearInterval($e),Ze.status==="succeeded"&&n(Se=>{if(!Se||!Ze.account)return Se;const gt=Se.accounts.some(st=>{var pt;return st.id===((pt=Ze.account)==null?void 0:pt.id)})?Se.accounts.map(st=>{var pt;return st.id===((pt=Ze.account)==null?void 0:pt.id)?Ze.account:st}):[...Se.accounts,Ze.account];return{...Se,accounts:gt}})))}).catch(Ze=>{ue||y(ht(Ze).message)})},1e3);return()=>{ue=!0,window.clearInterval($e)}},[N==null?void 0:N.id,N==null?void 0:N.status]);function Oe(){T(""),U(null),y(""),Z(!1),k(!0)}async function Re(ue){ue.preventDefault(),h(!0),y("");try{U(await az(b.trim()))}catch($e){y(ht($e).message)}finally{h(!1)}}async function Be(){if(!N||N.status!=="pending"){k(!1);return}h(!0),y("");try{const ue=await lz(N.id);U(ue),k(!1)}catch(ue){y(ht(ue).message)}finally{h(!1)}}function ve(ue){M(ue),G(ue.renewalDay==null?"":String(ue.renewalDay)),ae(ue.name),y("")}async function Xe(ue){if(ue.preventDefault(),!D)return;const $e=W.trim();if(!$e){M(null);return}h(!0),y("");try{await sz(D.id,$e,L===""?null:Number(L)),await R(),M(null)}catch(Ze){y(ht(Ze).message)}finally{h(!1)}}async function Ft(){if(Q){h(!0),y("");try{const ue=await uz(Q.id);n(ue),F(null),de("Account selection saved. Each deployment applies it to new requests after syncing; active turns are unchanged."),e().catch(()=>{de("Account selection saved. Refreshing local status failed; deployment synchronization will continue in the background.")})}catch(ue){const $e=ht(ue);y($e.detail??$e.message)}finally{h(!1)}}}async function pn(){if(_e){h(!0),y("");try{await oz(_e.id),await R(),be(null)}catch(ue){y(ht(ue).detail??ht(ue).message)}finally{h(!1)}}}const tn=(t==null?void 0:t.accounts)??[];return u.jsxs("section",{className:"settings-section codex-accounts-section",children:[u.jsxs("header",{className:"settings-section-header",children:[u.jsxs("div",{children:[u.jsx("h3",{children:"Codex Accounts"}),u.jsx("p",{children:"Manage the cloud-owned Codex logins. Every deployment uses the same globally active account; workspaces do not bind to accounts."})]}),u.jsxs("div",{className:"codex-account-toolbar",children:[u.jsx("button",{className:"codex-account-add",disabled:f||o||tn.length===0,onClick:()=>void me(!0),type:"button",children:o?"Refreshing...":"Refresh details"}),u.jsx("button",{className:"codex-account-add",disabled:f||o||(N==null?void 0:N.status)==="pending",onClick:Oe,type:"button",children:"Add account"})]})]}),u.jsxs("div",{className:"codex-account-policy",children:[u.jsx("strong",{children:"Cloud-wide account selection"}),u.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."})]}),oe?u.jsx("p",{className:"settings-note",role:"status",children:oe}):null,m?u.jsx("p",{className:"memory-editor-error",children:m}):null,a?u.jsx("p",{className:"settings-note",children:"Loading Codex accounts..."}):null,!a&&tn.length===0?u.jsx("p",{className:"settings-note",children:"No persisted Codex account. Add one with the official device login flow."}):null,u.jsx("div",{className:"codex-account-list",children:tn.map(ue=>{var sn,Kt;const $e=(t==null?void 0:t.activeAccountId)===ue.id,Ze=wA(ue.renewalDay,te),Se=(sn=t==null?void 0:t.accountDetails)==null?void 0:sn[ue.id],gt=((Kt=t==null?void 0:t.accountIssues)==null?void 0:Kt[ue.id])??[],st=gt.length>0,pt=gt.some(dt=>["missing_credential","invalid_credential","credential_unreadable"].includes(dt.code)),At=[ue.email,eN(ue.accountType),tN(ue.planType)].filter(dt=>!!dt);return u.jsxs("article",{className:`codex-account-card${$e?" active":""}${st?" issue":""}`,children:[u.jsxs("div",{className:"codex-account-main",children:[u.jsxs("div",{className:"codex-account-title",children:[u.jsx("strong",{children:ue.name}),$e?u.jsx("span",{className:"codex-account-active",children:"Selected"}):null,st?u.jsx("span",{className:"codex-account-warning",children:"Needs attention"}):null]}),u.jsxs("small",{children:[At.join(" · ")||`Added ${ut(ue.createdAt)}`,Ze?u.jsxs("span",{title:`按手动设置的每月 ${ue.renewalDay} 日计算(北京时间),下次 ${Ze.date}`,children:[" · ",Ze.days===0?"今日续费":`距续费 ${Ze.days} 天`]}):null]}),st?u.jsx("div",{className:"codex-account-issues",role:"status",children:gt.map(dt=>u.jsx("span",{children:dt.message},dt.code))}):null,Se!=null&&Se.usage?u.jsx(JE,{usage:Se.usage}):u.jsx("span",{className:"codex-account-usage-empty",children:o?"Reading account usage...":"Usage unavailable"}),Se?u.jsx("small",{className:Se.error?"codex-account-detail-error":"codex-account-refreshed",children:Se.error?`Refresh issue: ${Se.error}`:`Updated ${ut(Se.refreshedAt)}`}):null]}),u.jsxs("div",{className:"codex-account-actions",children:[u.jsxs("button",{className:"codex-credit-count",type:"button",disabled:f,"aria-label":`${ue.name}(${Se!=null&&Se.error||!(Se!=null&&Se.rateLimitResetCredits)?"券数量未知":`${Se.rateLimitResetCredits.availableCount} 张可用券`})`,title:`${ue.name}(${Se!=null&&Se.error||!(Se!=null&&Se.rateLimitResetCredits)?"券数量未知":`${Se.rateLimitResetCredits.availableCount} 张可用券`})`,onClick:()=>{H(ue.id),Me(""),y("")},children:[u.jsxs("svg",{"aria-hidden":"true",width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",children:[u.jsx("path",{d:"M3 5h18v5a2 2 0 0 0 0 4v5H3v-5a2 2 0 0 0 0-4V5Z"}),u.jsx("path",{d:"M16 5v3m0 3v2m0 3v3"})]}),u.jsx("span",{children:Se!=null&&Se.error||!(Se!=null&&Se.rateLimitResetCredits)?"—":Se.rateLimitResetCredits.availableCount})]}),u.jsx("button",{disabled:f||o||pt,onClick:()=>ve(ue),title:pt?"Sign in again or delete this account to replace its credential.":void 0,type:"button",children:st?"Repair & edit":"Edit"}),u.jsx("button",{disabled:f||$e||st,onClick:()=>{y(""),F(ue)},type:"button",children:st?"Unavailable":"Switch"}),u.jsx("button",{className:"danger",disabled:f||o||$e,onClick:()=>{y(""),be(ue)},type:"button",children:"Delete"})]})]},ue.id)})}),We&&tn.some(ue=>ue.id===We)?u.jsxs("dialog",{className:"memory-editor-popover codex-credit-dialog","aria-label":"Rate-limit reset credits",ref:ue=>{ue&&!ue.open&&ue.showModal()},onCancel:ue=>{ue.preventDefault(),f||H(null)},children:[u.jsxs("header",{children:[u.jsx("strong",{children:"Rate-limit reset credits"}),u.jsx("button",{autoFocus:!0,className:"memory-icon-button",type:"button","aria-label":"Close reset credits",disabled:f,onClick:()=>H(null),children:"×"})]}),le?u.jsx("p",{className:"settings-note",role:"status",children:le}):null,m?u.jsx("p",{className:"memory-editor-error",role:"alert",children:m}):null,tn.filter(ue=>ue.id===We).map(ue=>{var Se,gt,st,pt;const $e=(Se=t==null?void 0:t.accountDetails)==null?void 0:Se[ue.id],Ze=$e==null?void 0:$e.rateLimitResetCredits;return u.jsxs("article",{className:"codex-credit-group",children:[u.jsxs("div",{className:"codex-credit-group-heading",children:[u.jsx("strong",{children:ue.name}),u.jsx("span",{children:$e!=null&&$e.error?"Unavailable":Ze?`${Ze.availableCount} available`:o?"Loading...":"Unavailable"})]}),Ze?Ze.availableCount===0&&!((gt=Ze.credits)!=null&>.length)?u.jsx("small",{children:"No reset credits available."}):null:u.jsx("small",{children:"Credit details unavailable. Refresh details to try again."}),u.jsx("div",{className:"codex-credit-grid",children:(st=Ze==null?void 0:Ze.credits)==null?void 0:st.map(At=>{var Kn,fe;const sn=At.expiresAt!==null&&At.expiresAt*1e3<=te.getTime(),Kt=At.status==="available"&&!sn,dt=sn&&At.status==="available"?"Expired":At.status;return u.jsxs("article",{className:`codex-credit-ticket${Kt?"":" inactive"}`,"aria-label":`${ue.name}: ${At.title||"Rate-limit reset"}`,children:[u.jsxs("div",{className:"codex-credit-ticket-heading",children:[u.jsx("strong",{title:At.title||"Rate-limit reset",children:At.title||"Rate-limit reset"}),u.jsx("span",{className:"codex-credit-badge",children:Kt?"1 use":dt})]}),u.jsx("small",{children:At.expiresAt===null?"No expiry":`Expires ${ut(new Date(At.expiresAt*1e3).toISOString())}`}),u.jsxs("div",{className:"codex-credit-ticket-actions",children:[u.jsxs("details",{children:[u.jsx("summary",{children:"Details"}),At.description?u.jsx("p",{children:At.description}):null,u.jsxs("p",{children:["Single-use credit · ",dt]}),u.jsxs("p",{children:["Granted ",ut(new Date(At.grantedAt*1e3).toISOString())]}),At.resetType!=="codexRateLimits"?u.jsx("p",{children:"This credit type is not supported."}):null]}),u.jsx("button",{className:"codex-account-add codex-credit-use",type:"button",disabled:f||o||!!($e!=null&&$e.error)||!Kt||At.resetType!=="codexRateLimits"||!!((fe=(Kn=t==null?void 0:t.accountIssues)==null?void 0:Kn[ue.id])!=null&&fe.length),onClick:()=>void ee(ue,At),children:"Use"})]})]},At.id)})}),Ze&&Ze.availableCount>(((pt=Ze.credits)==null?void 0:pt.length)??0)?u.jsx("small",{children:"Credit details unavailable for some credits. Refresh details to use them."}):null,$e!=null&&$e.error?u.jsxs("small",{className:"codex-credit-error",children:["Refresh issue: ",$e.error]}):null]},ue.id)}),u.jsx("footer",{className:"memory-editor-actions",children:u.jsx("button",{type:"button",className:"memory-dialog-button",disabled:f||o,onClick:()=>void me(!0),children:o?"Refreshing...":"Refresh details"})})]}):null,D?u.jsx("div",{className:"memory-editor-overlay",onClick:()=>!f&&M(null),role:"presentation",children:u.jsxs("form",{"aria-label":"Edit Codex account",className:"memory-editor-popover codex-account-login-dialog",onClick:ue=>ue.stopPropagation(),onSubmit:ue=>void Xe(ue),children:[u.jsxs("header",{children:[u.jsx("strong",{children:"Edit Codex Account"}),u.jsx("button",{"aria-label":"Close account editor",className:"memory-icon-button",disabled:f,onClick:()=>M(null),type:"button",children:"×"})]}),u.jsx("p",{className:"settings-note",children:"This name is only a Seele label. It does not change the Codex login or credential."}),u.jsxs("label",{children:[u.jsx("span",{children:"Account name"}),u.jsx("input",{"aria-label":"Codex account name",autoFocus:!0,maxLength:80,onChange:ue=>ae(ue.target.value),value:W})]}),u.jsxs("label",{children:[u.jsx("span",{children:"每月续费日"}),u.jsxs("select",{"aria-label":"每月续费日",value:L,title:"按北京时间计算;不足对应日期的月份按月末计算",onChange:ue=>G(ue.target.value),children:[u.jsx("option",{value:"",children:"未设置"}),Array.from({length:31},(ue,$e)=>$e+1).map(ue=>u.jsxs("option",{value:ue,children:[ue," 日"]},ue))]})]}),m?u.jsx("p",{className:"memory-editor-error",children:m}):null,u.jsxs("div",{className:"memory-editor-actions",children:[u.jsx("button",{className:"memory-dialog-button",disabled:f,onClick:()=>M(null),type:"button",children:"Cancel"}),u.jsx("button",{className:"memory-dialog-button primary",disabled:f||!W.trim(),type:"submit",children:f?"Saving...":"Save"})]})]})}):null,v?u.jsx("div",{className:"memory-editor-overlay",onClick:()=>!f&&!N&&k(!1),role:"presentation",children:N?u.jsxs("section",{"aria-label":"Complete Codex account login",className:"memory-delete-dialog codex-account-login-dialog",onClick:ue=>ue.stopPropagation(),children:[u.jsxs("header",{children:[u.jsx("strong",{children:N.status==="succeeded"?"Account Added":"Complete Codex Login"}),u.jsx("button",{"aria-label":"Close account login",className:"memory-icon-button",disabled:f,onClick:()=>void Be(),type:"button",children:"×"})]}),N.status==="pending"?u.jsxs(u.Fragment,{children:[u.jsx("p",{children:"Open the official Codex device page and enter this one-time code."}),u.jsxs("div",{className:"codex-device-code",children:[u.jsx("strong",{children:N.userCode}),u.jsx("button",{onClick:()=>{navigator.clipboard.writeText(N.userCode),Z(!0),window.setTimeout(()=>Z(!1),1500)},type:"button",children:ge?"Copied":"Copy code"})]}),u.jsx("a",{href:N.verificationUrl,rel:"noreferrer",target:"_blank",children:"Open Codex device login"}),u.jsx("small",{className:"codex-login-waiting",children:"Waiting for Codex to confirm the login..."})]}):N.status==="succeeded"?u.jsxs("p",{children:[u.jsx("strong",{children:((nt=N.account)==null?void 0:nt.name)??N.accountName})," is persisted on the cloud and ready to synchronize. It was not activated automatically."]}):u.jsx("p",{className:"memory-editor-error",children:N.error??"Codex login was cancelled."}),u.jsx("div",{className:"memory-delete-actions",children:u.jsx("button",{className:"memory-dialog-button",disabled:f,onClick:()=>void Be(),type:"button",children:N.status==="pending"?"Cancel login":"Close"})})]}):u.jsxs("form",{"aria-label":"Add Codex account",className:"memory-editor-popover codex-account-login-dialog",onClick:ue=>ue.stopPropagation(),onSubmit:ue=>void Re(ue),children:[u.jsxs("header",{children:[u.jsx("strong",{children:"Add Codex Account"}),u.jsx("button",{"aria-label":"Close account login",className:"memory-icon-button",onClick:()=>k(!1),type:"button",children:"×"})]}),u.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."}),u.jsxs("label",{children:[u.jsx("span",{children:"Account name"}),u.jsx("input",{autoFocus:!0,maxLength:80,onChange:ue=>T(ue.target.value),placeholder:"For example: Codex backup",value:b})]}),m?u.jsx("p",{className:"memory-editor-error",children:m}):null,u.jsxs("div",{className:"memory-editor-actions",children:[u.jsx("button",{className:"memory-dialog-button",onClick:()=>k(!1),type:"button",children:"Cancel"}),u.jsx("button",{className:"memory-dialog-button primary",disabled:f||!b.trim(),type:"submit",children:f?"Starting...":"Continue"})]})]})}):null,Q?u.jsx("div",{className:"memory-editor-overlay",onClick:()=>!f&&F(null),role:"presentation",children:u.jsxs("section",{"aria-label":"Switch Codex account",className:"memory-delete-dialog",onClick:ue=>ue.stopPropagation(),children:[u.jsxs("header",{children:[u.jsx("strong",{children:"Switch Codex Account"}),u.jsx("button",{"aria-label":"Close account switch",className:"memory-icon-button",disabled:f,onClick:()=>F(null),type:"button",children:"×"})]}),u.jsxs("p",{children:["Switch cloud-wide execution to ",u.jsx("strong",{children:Q.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?u.jsx("p",{className:"memory-editor-error",children:m}):null,u.jsxs("div",{className:"memory-delete-actions",children:[u.jsx("button",{className:"memory-dialog-button",disabled:f,onClick:()=>F(null),type:"button",children:"Cancel"}),u.jsx("button",{className:"memory-dialog-button primary",disabled:f,onClick:()=>void Ft(),type:"button",children:f?"Switching...":"Switch account"})]})]})}):null,_e?u.jsx("div",{className:"memory-editor-overlay",onClick:()=>!f&&be(null),role:"presentation",children:u.jsxs("section",{"aria-label":"Delete Codex account",className:"memory-delete-dialog",onClick:ue=>ue.stopPropagation(),children:[u.jsxs("header",{children:[u.jsx("strong",{children:"Delete Codex Account"}),u.jsx("button",{"aria-label":"Close account deletion",className:"memory-icon-button",disabled:f,onClick:()=>be(null),type:"button",children:"×"})]}),u.jsxs("p",{children:["Delete ",u.jsx("strong",{children:_e.name})," and its persisted Codex credential from the cloud and every member mirror? This cannot be undone."]}),m?u.jsx("p",{className:"memory-editor-error",children:m}):null,u.jsxs("div",{className:"memory-delete-actions",children:[u.jsx("button",{className:"memory-dialog-button",disabled:f,onClick:()=>be(null),type:"button",children:"Cancel"}),u.jsx("button",{className:"memory-dialog-button danger",disabled:f,onClick:()=>void pn(),type:"button",children:f?"Deleting...":"Delete"})]})]})}):null]})}function rN({currentUser:e,users:t,onCreate:n,onDelete:a,onUpdate:l}){const o={username:"",password:"",role:"user",active:!0},[c,f]=B.useState(null),[h,m]=B.useState(o),[y,v]=B.useState(!1),[k,b]=B.useState(null),[T,N]=B.useState("");function U(){m(o),N(""),f("new")}function D(G){m({username:G.username,password:"",role:G.role,active:G.active}),N(""),f(G)}function M(){y||(f(null),N(""))}async function L(G){if(G.preventDefault(),!!c){v(!0),N("");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(te){N(ht(te).message)}finally{v(!1)}}}return u.jsxs("section",{className:"settings-section user-management-section",children:[u.jsx("header",{className:"settings-section-header",children:u.jsxs("div",{children:[u.jsx("h3",{children:"Users"}),u.jsx("p",{children:"Manage sign-in access and Seele roles."})]})}),u.jsx("div",{className:"memory-items-editor-header actions-only",children:u.jsx("button",{"aria-label":"Add user",className:"memory-icon-button",onClick:U,title:"Add user",type:"button",children:"+"})}),u.jsxs("div",{className:"user-list",children:[t.map(G=>u.jsxs("div",{className:"user-list-item",children:[u.jsxs("div",{className:"user-list-main",children:[u.jsxs("div",{children:[u.jsx("strong",{children:G.username}),G.id===e.id?u.jsx("span",{className:"user-current-badge",children:"Current"}):null]}),u.jsxs("small",{children:["Created ",ut(G.createdAt)]})]}),u.jsx("span",{className:`user-role-badge role-${G.role}`,children:G.role}),u.jsx("span",{className:`user-status ${G.active?"active":"disabled"}`,children:G.active?"Active":"Disabled"}),u.jsxs("div",{className:"user-row-actions",children:[u.jsx("button",{"aria-label":`Edit user ${G.username}`,className:"memory-icon-button",onClick:()=>D(G),title:"Edit",type:"button",children:u.jsx(Of,{})}),u.jsx("button",{"aria-label":`Delete user ${G.username}`,className:"memory-icon-button memory-item-delete",disabled:G.id===e.id,onClick:()=>{N(""),b(G)},title:"Delete",type:"button",children:"×"})]})]},G.id)),t.length===0?u.jsx("p",{className:"settings-note",children:"No users are configured."}):null]}),c?u.jsx("div",{className:"memory-editor-overlay",onClick:M,role:"presentation",children:u.jsxs("form",{"aria-label":c==="new"?"Add user":"Edit user",className:"memory-editor-popover user-editor-popover",onClick:G=>G.stopPropagation(),onSubmit:G=>void L(G),children:[u.jsxs("header",{children:[u.jsx("strong",{children:c==="new"?"Add User":"Edit User"}),u.jsx("button",{"aria-label":"Close user editor",className:"memory-icon-button",onClick:M,title:"Close",type:"button",children:"×"})]}),u.jsxs("label",{children:[u.jsx("span",{children:"Username"}),u.jsx("input",{autoComplete:"off",autoFocus:!0,onChange:G=>m(te=>({...te,username:G.target.value})),placeholder:"Sign-in username",value:h.username})]}),u.jsxs("label",{children:[u.jsx("span",{children:c==="new"?"Initial password":"New password"}),u.jsx("input",{autoComplete:"new-password",minLength:8,onChange:G=>m(te=>({...te,password:G.target.value})),placeholder:c==="new"?"At least 8 characters":"Leave blank to keep the current password",type:"password",value:h.password})]}),u.jsxs("label",{children:[u.jsx("span",{children:"Role"}),u.jsxs("select",{disabled:c!=="new"&&c.id===e.id,onChange:G=>m(te=>({...te,role:G.target.value==="admin"?"admin":"user"})),value:h.role,children:[u.jsx("option",{value:"user",children:"User"}),u.jsx("option",{value:"admin",children:"Admin"})]})]}),c!=="new"?u.jsxs("label",{className:"user-editor-active",children:[u.jsx("input",{checked:h.active,disabled:c.id===e.id,onChange:G=>m(te=>({...te,active:G.target.checked})),type:"checkbox"}),u.jsx("span",{children:"Account active"})]}):null,T?u.jsx("p",{className:"memory-editor-error",children:T}):null,u.jsxs("div",{className:"memory-editor-actions",children:[u.jsx("button",{className:"memory-dialog-button",onClick:M,type:"button",children:"Cancel"}),u.jsx("button",{className:"memory-dialog-button primary",disabled:y||!h.username.trim()||c==="new"&&h.password.length<8||c!=="new"&&h.password.length>0&&h.password.length<8,type:"submit",children:y?"Saving...":"Save"})]})]})}):null,k?u.jsx("div",{className:"memory-editor-overlay",onClick:()=>b(null),role:"presentation",children:u.jsxs("section",{"aria-label":"Delete user",className:"memory-delete-dialog",onClick:G=>G.stopPropagation(),children:[u.jsxs("header",{children:[u.jsx("strong",{children:"Delete User"}),u.jsx("button",{"aria-label":"Close delete user confirmation",className:"memory-icon-button",onClick:()=>b(null),title:"Close",type:"button",children:"×"})]}),u.jsxs("p",{children:["Delete ",u.jsx("strong",{children:k.username}),". Users that own workspaces must be disabled instead."]}),T?u.jsx("p",{className:"memory-editor-error",children:T}):null,u.jsxs("div",{className:"memory-delete-actions",children:[u.jsx("button",{className:"memory-dialog-button",onClick:()=>b(null),type:"button",children:"Cancel"}),u.jsx("button",{className:"memory-dialog-button danger",onClick:()=>{a(k.id).then(()=>b(null)).catch(G=>N(ht(G).message))},type:"button",children:"Delete"})]})]})}):null]})}function aN({settings:e,onSave:t}){const[n,a]=B.useState(e),[l,o]=B.useState(!1);return B.useEffect(()=>a(e),[e]),u.jsxs(u.Fragment,{children:[u.jsx("header",{className:"settings-section-header",children:u.jsxs("div",{children:[u.jsx("h3",{children:"Deployment"}),u.jsx("p",{children:"Settings stored only on this Seele instance. Cloud synchronization does not copy or overwrite them."})]})}),u.jsxs("form",{className:"settings-form",onSubmit:c=>{c.preventDefault(),o(!0),t(n).finally(()=>o(!1))},children:[u.jsxs("label",{className:"settings-field settings-field-wide",children:[u.jsxs("span",{children:[u.jsx("strong",{children:"Public URL"}),u.jsx("small",{children:"The externally reachable main URL of this deployment. Seele uses it when publishing callback links to external systems."})]}),u.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||""})]}),u.jsxs("label",{className:"settings-toggle-field",children:[u.jsxs("span",{children:[u.jsx("strong",{children:"Profuse notification"}),u.jsx("small",{children:"Send DingTalk notifications from this deployment when a turn finishes or fails. Keep this off where the Profuse endpoint is unreachable."})]}),u.jsx("input",{"aria-label":"Enable Profuse notification on this deployment",checked:n.profuseNotificationEnabled,onChange:c=>a({...n,profuseNotificationEnabled:c.target.checked}),type:"checkbox"})]}),u.jsx("div",{className:"settings-form-actions",children:u.jsx("button",{disabled:l,type:"submit",children:l?"Saving...":"Save deployment settings"})})]})]})}function iN({codexReleasedAt:e,codexVersion:t,codexUpdating:n,draft:a,globalSettings:l,models:o,scope:c,settings:f,workspaceOverrideCount:h,workspaceSettings:m,onDraftChange:y,onResetWorkspaceSetting:v,onSubmit:k,onUpdateCodexCli:b}){var de,_e,be,ge,Z;const T=c==="workspace",N=a.modelSource??{type:"codex"},U=N.type==="codex",D=((de=l.modelSource)==null?void 0:de.type)==="custom"?l.modelSource.channelId:null,M=((_e=f.modelSource)==null?void 0:_e.type)==="custom"?f.modelSource.channelId:null,[L,G]=B.useState(null),[te,_]=B.useState(!1);B.useEffect(()=>{let le=!1;return QM().then(Me=>{le||G(Me)}).catch(()=>{le||_(!0)}),()=>{le=!0}},[]);const W=Zd(a.model,o),ae=Zd(l.model,o),Q=Zd(f.model,o),F=GA(a.reasoningEffort,W),oe=PA(W,a.reasoningEffort);return u.jsxs(u.Fragment,{children:[u.jsxs("header",{className:"settings-section-header",children:[u.jsxs("div",{children:[u.jsx("h3",{children:"Runtime"}),u.jsx("p",{children:"Configure global defaults or override them for the selected workspace. Running turns keep the settings they started with."})]}),T?u.jsx("span",{className:h>0?"section-override-count active":"section-override-count",children:h>0?`${h} custom`:"No custom runtime"}):null]}),u.jsxs("form",{className:"settings-form runtime-form",onSubmit:k,children:[u.jsxs("div",{className:"settings-wide-field",children:[u.jsx(Mc,{label:"Model source",settingKey:"modelSource",isWorkspaceScope:T,globalValue:D?`Custom · ${((be=L==null?void 0:L.channels.find(le=>le.id===D))==null?void 0:be.name)??"Unavailable channel"}`:"Codex official",source:Gv(a.modelSource,l.modelSource)?m==null?void 0:m.sources.modelSource:"workspace",onReset:v}),u.jsx(qd,{"aria-label":"Runtime model source",value:N.type,options:[{value:"codex",label:"Codex official"},{value:"custom",label:"Custom"}],onChange:le=>{var Me;return y({...a,modelSource:le==="custom"?{type:"custom",channelId:((Me=L==null?void 0:L.channels[0])==null?void 0:Me.id)??""}:{type:"codex"}})}}),U?null:u.jsxs(u.Fragment,{children:[u.jsxs("label",{className:"settings-field",children:[u.jsx("span",{children:"Custom channel"}),u.jsxs("select",{"aria-label":"Runtime custom channel",required:!0,value:N.channelId,onChange:le=>y({...a,modelSource:{type:"custom",channelId:le.target.value}}),children:[u.jsx("option",{value:"",disabled:!0,children:"Select a configured channel"}),N.channelId&&!(L!=null&&L.channels.some(le=>le.id===N.channelId))?u.jsx("option",{value:N.channelId,children:"Unavailable channel"}):null,L==null?void 0:L.channels.map(le=>u.jsxs("option",{value:le.id,children:[le.name," · ",le.model]},le.id))]})]}),te?u.jsx("p",{role:"alert",children:"Unable to load custom channels. Reopen Runtime to retry."}):(L==null?void 0:L.channels.length)===0?u.jsx("p",{children:"Add a channel in Custom model channels first."}):null,u.jsx("small",{children:"The channel fixes the model and connection. Codex reasoning effort and Fast mode do not apply."})]})]}),U?u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:Ud(T,Vl(a.model,l.model,m==null?void 0:m.sources.model)),children:[u.jsx(Mc,{globalValue:k5(l.model,o),isWorkspaceScope:T,label:"Model",settingKey:"model",source:Vl(a.model,l.model,m==null?void 0:m.sources.model),onReset:v}),u.jsx(qd,{"aria-label":"Runtime model",onChange:le=>{y({...a,model:le})},options:wD(o,a.model),value:a.model||((ge=o.find(le=>le.isDefault))==null?void 0:ge.model)||""})]}),u.jsxs("div",{className:Ud(T,Vl(a.reasoningEffort,l.reasoningEffort,m==null?void 0:m.sources.reasoningEffort)),children:[u.jsx(Mc,{globalValue:R3(l.reasoningEffort,ae),isWorkspaceScope:T,label:"Reasoning effort",settingKey:"reasoningEffort",source:Vl(a.reasoningEffort,l.reasoningEffort,m==null?void 0:m.sources.reasoningEffort),onReset:v}),u.jsx(qd,{"aria-label":"Runtime reasoning effort",onChange:le=>y({...a,reasoningEffort:le}),options:oe,value:a.reasoningEffort}),F?u.jsx("p",{role:"status",children:F}):null]})]}):null,u.jsxs("div",{className:Ud(T,Vl(a.sandbox,l.sandbox,m==null?void 0:m.sources.sandbox)),children:[u.jsx(Mc,{globalValue:fp(l.sandbox),isWorkspaceScope:T,label:"Permission mode",settingKey:"sandbox",source:Vl(a.sandbox,l.sandbox,m==null?void 0:m.sources.sandbox),onReset:v}),u.jsx(qd,{"aria-label":"Permission mode",onChange:le=>y({...a,sandbox:le}),options:kE,value:a.sandbox})]}),U?u.jsxs("div",{className:Ud(T,Vl(a.fastMode,l.fastMode,m==null?void 0:m.sources.fastMode),"settings-toggle-field"),children:[u.jsxs("span",{children:[u.jsx(Mc,{globalValue:l.fastMode?"On":"Off",isWorkspaceScope:T,label:"Fast mode",settingKey:"fastMode",source:Vl(a.fastMode,l.fastMode,m==null?void 0:m.sources.fastMode),onReset:v}),u.jsx("small",{children:"1.5x speed with higher Codex credit consumption"})]}),u.jsx("input",{"aria-label":"Enable Fast mode",checked:a.fastMode,onChange:le=>y({...a,fastMode:le.target.checked}),type:"checkbox"})]}):null,u.jsxs("dl",{className:"runtime-summary",children:[u.jsxs("div",{children:[u.jsx("dt",{children:"Current"}),u.jsx("dd",{children:M?u.jsxs(u.Fragment,{children:["Custom · ",((Z=L==null?void 0:L.channels.find(le=>le.id===M))==null?void 0:Z.name)??"Unavailable channel"," · ",fp(f.sandbox),"."]}):u.jsxs(u.Fragment,{children:["Model ",k5(f.model,o),", reasoning"," ",R3(f.reasoningEffort,Q),", Fast mode"," ",f.fastMode?"on":"off",", permission"," ",fp(f.sandbox),"."]})})]}),u.jsxs("div",{children:[u.jsx("dt",{children:"Codex CLI"}),u.jsxs("dd",{className:"runtime-version-value",children:[u.jsx("span",{children:n1(t,e)}),u.jsx("button",{className:"runtime-update-button",disabled:n,onClick:b,type:"button",children:n?"Updating...":"Check update"})]})]})]}),u.jsx("div",{className:"settings-form-actions",children:u.jsx("button",{type:"submit",children:T?"Save workspace overrides":"Save global runtime"})})]})]})}function Mc({globalValue:e,isWorkspaceScope:t,label:n,settingKey:a,source:l,onReset:o}){const c=t&&l==="workspace";return u.jsxs("span",{className:"runtime-field-label",children:[u.jsx("span",{children:n}),t?u.jsxs("span",{className:"runtime-field-meta",children:[u.jsx("span",{className:c?"override":"inherited",children:c?"Workspace override":`Inherited: ${e}`}),c?u.jsx("button",{type:"button",onClick:()=>o(a),children:"Reset"}):null]}):null]})}function qd({"aria-label":e,onChange:t,options:n,value:a}){const[l,o]=B.useState(!1),c=B.useRef(null),f=n.find(h=>h.value===a)??n[0]??null;return B.useEffect(()=>{if(!l)return;function h(y){var v;(v=c.current)!=null&&v.contains(y.target)||o(!1)}function m(y){y.key==="Escape"&&o(!1)}return document.addEventListener("pointerdown",h,!0),document.addEventListener("keydown",m,!0),()=>{document.removeEventListener("pointerdown",h,!0),document.removeEventListener("keydown",m,!0)}},[l]),u.jsxs("div",{className:"runtime-select",ref:c,children:[u.jsxs("button",{"aria-expanded":l,"aria-label":e,className:"runtime-select-trigger",onClick:()=>o(h=>!h),type:"button",children:[u.jsx("span",{children:(f==null?void 0:f.label)??a}),u.jsx("span",{"aria-hidden":"true",children:"⌄"})]}),l?u.jsx("div",{className:"runtime-select-menu",role:"listbox",children:n.map(h=>u.jsx("button",{"aria-selected":h.value===a,className:h.value===a?"selected":void 0,onClick:()=>{t(h.value),o(!1)},role:"option",type:"button",children:h.label},h.value||"default"))}):null]})}function Vl(e,t,n){return JSON.stringify(e)!==JSON.stringify(t)?"workspace":n}function Ud(e,t,n="settings-wide-field"){return[n,e?"workspace-scoped":"",e&&t==="workspace"?"workspace-overridden":""].filter(Boolean).join(" ")}function lN({baseSettings:e,scope:t,workspaceSettings:n,workspaceName:a,onSaveBaseItems:l,onSaveWorkspaceItems:o}){const c=t==="workspace",f=c?n.items:e.items,h=c?o:l;return u.jsxs(u.Fragment,{children:[u.jsx("header",{className:"settings-section-header",children:u.jsxs("div",{children:[u.jsx("h3",{children:c?"Workspace Memory":"Base Memory"}),u.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?u.jsxs("section",{className:"settings-readonly-block",children:[u.jsxs("div",{children:[u.jsx("strong",{children:"Base Memory"}),u.jsx("span",{children:"Read-only in workspace scope"})]}),u.jsx(oN,{emptyText:"No base memory is configured.",items:e.items,readonly:!0})]}):null,u.jsx("div",{className:"memory-manager-shell",children:u.jsx(sN,{ariaLabel:c?"Workspace memory":"Base memory",emptyText:"No memory items are configured.",items:f,onSaveItems:h,title:""})})]})}function sN({ariaLabel:e,emptyText:t,items:n,onSaveItems:a,title:l}){var W;const[o,c]=B.useState(Vc(n)),[f,h]=B.useState(null),[m,y]=B.useState({key:"",value:""}),[v,k]=B.useState(null),[b,T]=B.useState(null),[N,U]=B.useState(null);B.useEffect(()=>{c(Vc(n))},[n]),B.useEffect(()=>{if(f===null)return;const ae=Q=>{Q.key==="Escape"&&(G(),T(null))};return document.addEventListener("keydown",ae),()=>document.removeEventListener("keydown",ae)},[f]);async function D(ae,Q){U(Q);try{const F=await a(ae);return c(Vc(F)),F}finally{U(null)}}function M(){T(null),k(null),y({key:"",value:""}),h("new")}function L(ae){const Q=o[ae];Q&&(T(null),k(null),y({...Q}),h(ae))}function G(){h(null),k(null),y({key:"",value:""})}async function te(ae){const Q=o[ae],F=(Q==null?void 0:Q.key)||`${ae}`;await D(o.filter((oe,de)=>de!==ae),`delete:${F}`),T(null)}async function _(ae){ae.preventDefault(),ae.stopPropagation();const Q=m.key.trim(),F=Az(Q);if(F){k(F);return}const oe=m.value.trim();if(!oe){k("Value is required.");return}const de=f==="new"?-1:f;if(o.some((be,ge)=>ge!==de&&be.key.trim()===Q)){k(`Key "${Q}" already exists. Each memory key must be unique.`);return}const _e={...m,key:Q,value:oe};f==="new"?await D([...o,_e],"add"):typeof f=="number"&&await D(o.map((be,ge)=>ge===f?_e:be),`save:${f}`),G()}return u.jsxs("section",{className:"memory-items-manager","aria-label":e,children:[u.jsxs("div",{className:l?"memory-items-editor-header":"memory-items-editor-header actions-only",children:[l?u.jsx("span",{children:l}):null,u.jsx("button",{"aria-label":"Add memory item",className:"memory-icon-button",title:"Add",type:"button",onClick:M,children:"+"})]}),o.length?u.jsx("div",{className:"memory-items-grid",children:o.map((ae,Q)=>u.jsxs("div",{className:"memory-item-display",children:[u.jsxs("pre",{"aria-label":`Memory item ${ae.key}`,children:[u.jsx("span",{className:"memory-tag",children:`<${ae.key}>`}),`
|
|
366
|
-
`,u.jsx("span",{children:ae.value}),`
|
|
367
|
-
`,u.jsx("span",{className:"memory-tag",children:`</${ae.key}>`})]}),u.jsxs("div",{className:"memory-item-actions",children:[u.jsx("button",{"aria-label":`Edit memory item ${ae.key||Q+1}`,className:"memory-icon-button memory-item-edit",disabled:N!==null,title:"Edit",type:"button",onClick:()=>L(Q),children:"✎"}),u.jsx("button",{"aria-label":`Delete memory item ${ae.key||Q+1}`,className:"memory-icon-button memory-item-delete",disabled:N!==null,title:"Delete",type:"button",onClick:()=>T(Q),children:"×"})]})]},`${Q}-${ae.key}`))}):u.jsx("p",{className:"settings-note",children:t}),f!==null?u.jsx("div",{className:"memory-editor-overlay",onClick:G,role:"presentation",children:u.jsxs("form",{"aria-label":f==="new"?"Add memory item":"Edit memory item",className:"memory-editor-popover",onClick:ae=>ae.stopPropagation(),onSubmit:ae=>void _(ae),children:[u.jsxs("header",{children:[u.jsx("strong",{children:f==="new"?"Add Memory":"Edit Memory"}),u.jsx("button",{"aria-label":"Close memory editor",className:"memory-icon-button",title:"Close",type:"button",onClick:G,children:"×"})]}),u.jsxs("label",{children:[u.jsx("span",{children:"Key"}),u.jsx("input",{autoComplete:"off",autoFocus:!0,onChange:ae=>y(Q=>({...Q,key:ae.target.value})),placeholder:"Stable technical key used as the injected tag name",value:m.key})]}),u.jsxs("label",{children:[u.jsx("span",{children:"Value · up to 1000 tokens"}),u.jsx("textarea",{onChange:ae=>y(Q=>({...Q,value:ae.target.value})),placeholder:"Memory content injected under this key",rows:10,value:m.value})]}),v?u.jsx("p",{className:"memory-editor-error",children:v}):null,u.jsxs("div",{className:"memory-editor-actions",children:[u.jsx("button",{"aria-label":"Cancel memory edit",className:"memory-dialog-button",type:"button",onClick:G,children:"Cancel"}),u.jsx("button",{"aria-label":"Save memory item",className:"memory-dialog-button primary",disabled:N!==null,type:"submit",children:N==="add"||N!=null&&N.startsWith("save:")?"Saving...":"Save"})]})]})}):null,b!==null?u.jsx("div",{className:"memory-editor-overlay",onClick:()=>T(null),role:"presentation",children:u.jsxs("section",{"aria-label":"Confirm delete memory item",className:"memory-delete-dialog",onClick:ae=>ae.stopPropagation(),children:[u.jsxs("header",{children:[u.jsx("strong",{children:"Delete Memory"}),u.jsx("button",{"aria-label":"Close delete confirmation",className:"memory-icon-button",title:"Close",type:"button",onClick:()=>T(null),children:"×"})]}),u.jsxs("p",{children:["Delete"," ",u.jsx("code",{children:((W=o[b])==null?void 0:W.key)||`item ${b+1}`}),"?"]}),u.jsxs("div",{className:"memory-delete-actions",children:[u.jsx("button",{"aria-label":"Cancel delete",className:"memory-dialog-button",disabled:N!==null,type:"button",onClick:()=>T(null),children:"Cancel"}),u.jsx("button",{"aria-label":"Confirm delete",className:"memory-dialog-button danger",disabled:N!==null,type:"button",onClick:()=>void te(b),children:"Delete"})]})]})}):null]})}function oN({emptyText:e,items:t}){const n=Vc(t);return n.length?u.jsx("div",{className:"memory-items-list",children:n.map(a=>u.jsx("div",{className:"memory-item-display memory-item-readonly",children:u.jsxs("pre",{"aria-label":`Memory item ${a.key}`,children:[u.jsx("span",{className:"memory-tag",children:`<${a.key}>`}),`
|
|
368
|
-
`,u.jsx("span",{children:a.value}),`
|
|
369
|
-
`,u.jsx("span",{className:"memory-tag",children:`</${a.key}>`})]})},a.key))}):u.jsx("p",{className:"settings-note",children:e})}function uN({deleteConfirmKey:e,editingEnvironmentKey:t,environmentDraft:n,globalEnvironment:a,scope:l,workspaceEnvironment:o,valueVisible:c,onCancelEnvironmentEdit:f,onDeleteConfirmChange:h,onDeleteEnvironment:m,onDraftChange:y,onEditEnvironment:v,onRevealEnvironmentValue:k,onSubmitEnvironment:b,onValueVisibleChange:T,revealedEnvironmentKeys:N}){const U=t!==null&&N.has(t),D=l==="workspace",M=D?o:a,[L,G]=B.useState(!1);function te(){f(),y({description:"",key:"",value:""}),T(!1),G(!0)}function _(Q){v(Q),T(!1),G(!0)}function W(){G(!1),f(),T(!1)}function ae(Q){b(Q),G(!1)}return u.jsxs(u.Fragment,{children:[u.jsx("header",{className:"settings-section-header",children:u.jsxs("div",{children:[u.jsx("h3",{children:D?"Workspace Environment":"Base Environment"}),u.jsx("p",{children:D?"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."})]})}),D?u.jsxs("section",{className:"settings-readonly-block",children:[u.jsxs("div",{children:[u.jsx("strong",{children:"Base Environment"}),u.jsx("span",{children:"Read-only in workspace scope"})]}),u.jsx(V3,{emptyText:"No base environment variables are configured.",readonly:!0,variables:a})]}):null,u.jsxs("section",{className:"environment-manager",children:[u.jsx("div",{className:"memory-items-editor-header actions-only",children:u.jsx("button",{"aria-label":"Add environment variable",className:"memory-icon-button",title:"Add",type:"button",onClick:te,children:"+"})}),u.jsx(V3,{emptyText:D?"No workspace environment variables are configured.":"No base environment variables are configured.",onDelete:Q=>h(Q),onEdit:_,variables:M})]}),L?u.jsx("div",{className:"memory-editor-overlay",onClick:W,role:"presentation",children:u.jsxs("form",{"aria-label":t?"Edit environment variable":"Add environment variable",className:"memory-editor-popover environment-editor-popover",onClick:Q=>Q.stopPropagation(),onSubmit:ae,children:[u.jsxs("header",{children:[u.jsx("strong",{children:t?"Edit Environment":"Add Environment"}),u.jsx("button",{"aria-label":"Close environment editor",className:"memory-icon-button",title:"Close",type:"button",onClick:W,children:"×"})]}),u.jsxs("label",{children:[u.jsx("span",{children:"Key"}),u.jsx("input",{"aria-label":"Environment variable key",autoComplete:"off",autoFocus:!0,disabled:t!==null,onChange:Q=>y({...n,key:Q.target.value}),placeholder:"Environment variable name",spellCheck:!1,value:n.key})]}),u.jsxs("label",{children:[u.jsx("span",{children:"Value"}),u.jsxs("span",{className:"environment-value-field",children:[u.jsx("input",{"aria-label":"Environment variable value",autoComplete:"off",onChange:Q=>y({...n,value:Q.target.value}),placeholder:"Environment variable value",spellCheck:!1,type:c?"text":"password",value:n.value}),u.jsx("button",{"aria-label":c?"Hide value":"Show value",onClick:()=>{if(t&&!U&&!n.value){k(t),T(!0);return}T(!c)},title:c?"Hide value":"Show value",type:"button",children:c?u.jsx(_M,{}):u.jsx(OM,{})})]})]}),u.jsxs("label",{children:[u.jsx("span",{children:"Description"}),u.jsx("input",{"aria-label":"Environment variable description",autoComplete:"off",onChange:Q=>y({...n,description:Q.target.value}),placeholder:"What this variable is for",spellCheck:!1,value:n.description})]}),u.jsxs("div",{className:"memory-editor-actions",children:[u.jsx("button",{className:"memory-dialog-button",type:"button",onClick:W,children:"Cancel"}),u.jsx("button",{className:"memory-dialog-button primary",disabled:!n.key.trim(),type:"submit",children:"Save"})]})]})}):null,e?u.jsx("div",{className:"memory-editor-overlay",onClick:()=>h(null),role:"presentation",children:u.jsxs("section",{"aria-label":"Confirm delete environment variable",className:"memory-delete-dialog",onClick:Q=>Q.stopPropagation(),children:[u.jsxs("header",{children:[u.jsx("strong",{children:"Delete Environment"}),u.jsx("button",{"aria-label":"Close delete confirmation",className:"memory-icon-button",title:"Close",type:"button",onClick:()=>h(null),children:"×"})]}),u.jsxs("p",{children:["Delete ",u.jsx("code",{children:e}),"?"]}),u.jsxs("div",{className:"memory-delete-actions",children:[u.jsx("button",{className:"memory-dialog-button",type:"button",onClick:()=>h(null),children:"Cancel"}),u.jsx("button",{className:"memory-dialog-button danger",type:"button",onClick:()=>{m(e),h(null)},children:"Delete"})]})]})}):null]})}function V3({emptyText:e,onDelete:t,onEdit:n,readonly:a=!1,variables:l}){return l.length===0?u.jsx("p",{className:"settings-note",children:e}):u.jsx("div",{className:a?"environment-list readonly":"environment-list",children:l.map(o=>u.jsxs("div",{className:a?"environment-row readonly":"environment-row",children:[u.jsxs("div",{className:"environment-row-main",children:[u.jsxs("pre",{"aria-label":`Environment variable ${o.key}`,children:[u.jsx("span",{className:"memory-tag",children:o.key}),"=",o.hasValue?"••••••":"",o.description?u.jsx("span",{className:"environment-comment",children:` # ${o.description}`}):null]}),u.jsxs("span",{children:[o.hasValue?"configured":"empty"," · updated"," ",ut(o.updatedAt)]})]}),a?u.jsx("span",{className:"environment-readonly-tag",children:"read-only"}):u.jsxs("div",{className:"environment-row-actions",children:[u.jsx("button",{"aria-label":`Edit ${o.key}`,className:"memory-icon-button memory-item-edit",onClick:()=>n==null?void 0:n(o),title:"Edit",type:"button",children:"✎"}),u.jsx("button",{"aria-label":`Delete ${o.key}`,className:"memory-icon-button memory-item-delete",onClick:()=>t==null?void 0:t(o.key),title:"Delete",type:"button",children:"×"})]})]},o.key))})}function u7({items:e,onDelete:t,onEdit:n}){const[a,l]=B.useState(null),[o,c]=B.useState(null);return e.length===0?u.jsxs("section",{className:"knowledge-empty",children:[u.jsx("h4",{children:"No knowledge registered"}),u.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."})]}):u.jsx("div",{className:"knowledge-list",children:e.map(f=>u.jsxs("article",{className:"knowledge-row",children:[u.jsxs("div",{className:"knowledge-row-main",children:[u.jsxs("header",{children:[u.jsx("strong",{children:f.name}),u.jsx("span",{children:dN(f.kind)}),u.jsx("span",{className:mN(f.status),children:fN(f.status)})]}),u.jsx("p",{children:f.purpose||f.description||"No purpose set."}),u.jsxs("div",{className:"knowledge-paths",children:[u.jsx("code",{children:f.digestPath}),u.jsx("code",{children:f.skillPath}),u.jsx("code",{children:f.fetch.scriptPath})]}),f.fetch.requiredEnv.length>0?u.jsx("div",{className:"knowledge-envs",children:f.fetch.requiredEnv.map(h=>u.jsx("span",{title:h.description||h.key,children:h.key},h.key))}):null,o===f.id?u.jsx("small",{className:"knowledge-row-notice",children:"Refresh/check is not automatic yet. Ask this workspace to review or refresh this knowledge source."}):null,u.jsxs("small",{children:[f.attention," · ",hN(f.refreshPolicy)," · updated ",ut(f.updatedAt)]})]}),u.jsx("div",{className:"environment-row-actions",children:a===f.id?u.jsxs(u.Fragment,{children:[u.jsx("button",{className:"danger",onClick:()=>{t(f.id),l(null)},type:"button",children:"Delete"}),u.jsx("button",{onClick:()=>l(null),type:"button",children:"Cancel"})]}):u.jsxs(u.Fragment,{children:[u.jsx("button",{"aria-label":`Check ${f.name}`,onClick:()=>c(f.id),title:"Check or refresh through workspace",type:"button",children:"↻"}),u.jsx("button",{"aria-label":`Edit ${f.name}`,onClick:()=>n(f),title:"Edit knowledge",type:"button",children:u.jsx(Of,{})}),u.jsx("button",{"aria-label":`Delete ${f.name}`,onClick:()=>l(f.id),title:"Delete knowledge",type:"button",children:"×"})]})})]},f.id))})}function cN({draft:e,items:t,scope:n,workspaceName:a,onCancel:l,onDelete:o,onDraftChange:c,onEdit:f,onSubmit:h}){return n==="workspace"?u.jsxs(u.Fragment,{children:[u.jsx("header",{className:"settings-section-header",children:u.jsxs("div",{children:[u.jsx("h3",{children:"Workspace Knowledge"}),u.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."]})]})}),u.jsx(u7,{items:t,onDelete:o,onEdit:f}),e.id?u.jsxs("form",{className:"settings-form knowledge-form",onSubmit:h,children:[u.jsxs("div",{className:"knowledge-form-header",children:[u.jsxs("div",{children:[u.jsx("strong",{children:"Edit metadata"}),u.jsx("span",{children:"This is mainly for correction. New knowledge should usually be created by the workspace while processing source material."})]}),u.jsx("button",{className:"secondary",onClick:l,type:"button",children:"Close"})]}),u.jsxs("div",{className:"knowledge-form-grid",children:[u.jsxs("label",{children:[u.jsx("span",{children:"Name"}),u.jsx("input",{"aria-label":"Knowledge name",onChange:y=>c({...e,name:y.target.value}),value:e.name})]}),u.jsxs("label",{children:[u.jsx("span",{children:"Kind"}),u.jsxs("select",{"aria-label":"Knowledge kind",onChange:y=>c({...e,kind:y.target.value}),value:e.kind,children:[u.jsx("option",{value:"source",children:"Source"}),u.jsx("option",{value:"skill",children:"Skill"}),u.jsx("option",{value:"reference",children:"Reference"})]})]}),u.jsxs("label",{children:[u.jsx("span",{children:"Status"}),u.jsxs("select",{"aria-label":"Knowledge status",onChange:y=>c({...e,status:y.target.value}),value:e.status,children:[u.jsx("option",{value:"draft",children:"Draft"}),u.jsx("option",{value:"needs_fetch_method",children:"Needs fetch method"}),u.jsx("option",{value:"needs_credentials",children:"Needs credentials"}),u.jsx("option",{value:"invalid_credentials",children:"Invalid credentials"}),u.jsx("option",{value:"ready",children:"Ready"}),u.jsx("option",{value:"stale_signal",children:"Stale signal"})]})]}),u.jsxs("label",{children:[u.jsx("span",{children:"Attention"}),u.jsxs("select",{"aria-label":"Knowledge attention",onChange:y=>c({...e,attention:y.target.value}),value:e.attention,children:[u.jsx("option",{value:"none",children:"None"}),u.jsx("option",{value:"tracked",children:"Tracked"}),u.jsx("option",{value:"watch",children:"Watch"})]})]}),u.jsxs("label",{children:[u.jsx("span",{children:"Refresh"}),u.jsxs("select",{"aria-label":"Knowledge refresh policy",onChange:y=>c({...e,refreshPolicy:y.target.value}),value:e.refreshPolicy,children:[u.jsx("option",{value:"manual",children:"Manual"}),u.jsx("option",{value:"low-frequency-check",children:"Low-frequency check"})]})]})]}),u.jsxs("label",{className:"settings-wide-field",children:[u.jsx("span",{children:"Purpose"}),u.jsx("textarea",{"aria-label":"Knowledge purpose",onChange:y=>c({...e,purpose:y.target.value}),rows:2,value:e.purpose})]}),u.jsxs("label",{className:"settings-wide-field",children:[u.jsx("span",{children:"Content"}),u.jsx("textarea",{"aria-label":"Knowledge content",onChange:y=>c({...e,description:y.target.value}),rows:2,value:e.description})]}),u.jsxs("label",{className:"settings-wide-field",children:[u.jsx("span",{children:"Source clues"}),u.jsx("textarea",{"aria-label":"Knowledge source clues",onChange:y=>c({...e,sourceCluesText:y.target.value}),rows:4,value:e.sourceCluesText})]}),u.jsxs("label",{className:"settings-wide-field",children:[u.jsx("span",{children:"Required environment"}),u.jsx("textarea",{"aria-label":"Knowledge required environment",onChange:y=>c({...e,requiredEnvText:y.target.value}),rows:3,value:e.requiredEnvText})]}),u.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."}),u.jsx("div",{className:"settings-form-actions",children:u.jsx("button",{disabled:!e.name.trim(),type:"submit",children:"Save metadata"})})]}):null]}):u.jsxs("section",{className:"settings-empty-section",children:[u.jsx("h3",{children:"Workspace Knowledge"}),u.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 dN(e){return e==="skill"?"Skill":e==="reference"?"Reference":"Source"}function fN(e){return e.split("_").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}function hN(e){return e==="low-frequency-check"?"low-frequency check":"manual refresh"}function mN(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 Tt({label:e,value:t,mono:n=!1}){return u.jsxs("div",{className:"context-field",children:[u.jsx("span",{children:e}),u.jsx("strong",{className:n?"mono":void 0,title:t,children:t})]})}function pN({onRefresh:e,preview:t,refreshing:n}){const a=["workspace_identity","workspace_environment","rendering"],l=B.useMemo(()=>Object.entries(t.context).map(([c,f])=>[c,gN(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]),o=c=>{var f;(f=document.getElementById(Y3(c)))==null||f.scrollIntoView({behavior:"smooth",block:"start"})};return u.jsxs("div",{className:"additional-context-preview",children:[u.jsx("div",{className:"additional-context-header",children:u.jsxs("div",{className:"additional-context-meta",children:[u.jsxs("span",{children:["Generated ",ut(t.generatedAt)]}),u.jsxs("span",{children:[Cr(l.length)," keys"]}),u.jsx("button",{disabled:n,onClick:e,type:"button",children:n?"Rendering...":"Refresh"})]})}),u.jsxs("div",{className:"additional-context-toc",children:[u.jsx("button",{"aria-label":"Additional context outline",type:"button",children:"☰"}),u.jsx("div",{className:"additional-context-toc-menu",children:l.map(([c])=>u.jsx("button",{onClick:()=>o(c),type:"button",children:c},c))})]}),u.jsx("div",{className:"additional-context-list",children:l.map(([c,f])=>u.jsxs("section",{className:"additional-context-item",id:Y3(c),children:[u.jsxs("header",{children:[u.jsxs("code",{children:["<",c,">"]}),u.jsxs("span",{children:[Cr(f.length)," chars"]})]}),u.jsx("pre",{children:f})]},c))})]})}function Y3(e){return`additional-context-${e.replace(/[^a-zA-Z0-9_-]/g,"-")}`}function gN(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 yN({summary:e}){return u.jsxs("div",{className:"thread-read-summary",children:[u.jsxs("section",{className:"thread-read-summary-grid",children:[u.jsx(Tt,{label:"Thread",value:e.id,mono:!0}),u.jsx(Tt,{label:"Session",value:e.sessionId,mono:!0}),u.jsx(Tt,{label:"Status",value:e.status}),u.jsx(Tt,{label:"Source",value:e.source}),u.jsx(Tt,{label:"Created",value:Dc(e.createdAt)}),u.jsx(Tt,{label:"Updated",value:Dc(e.updatedAt)}),u.jsx(Tt,{label:"Recency",value:Dc(e.recencyAt)}),u.jsx(Tt,{label:"Turns",value:Cr(e.turnCount),mono:!0}),u.jsx(Tt,{label:"Items",value:Cr(e.itemCount),mono:!0}),u.jsx(Tt,{label:"User / agent",value:`${Cr(e.userMessageCount)} / ${Cr(e.agentMessageCount)}`,mono:!0}),u.jsx(Tt,{label:"Compactions",value:`${Cr(e.compactionCount)} / ${Cr(e.contextCompactionCount)} context`,mono:!0}),u.jsx(Tt,{label:"CWD",value:e.cwd,mono:!0}),u.jsx(Tt,{label:"Path",value:e.path,mono:!0})]}),e.preview?u.jsxs("details",{className:"thread-read-preview",children:[u.jsx("summary",{children:"Preview"}),u.jsx("p",{children:e.preview})]}):null,u.jsxs("section",{className:"thread-read-turns",children:[u.jsxs("div",{children:[u.jsx("strong",{children:"Turns"}),u.jsxs("span",{children:[e.turns.length," turn",e.turns.length===1?"":"s"]})]}),u.jsx("div",{className:"thread-read-turn-list",children:e.turns.map((t,n)=>u.jsxs("details",{className:"thread-read-turn",children:[u.jsxs("summary",{children:[u.jsxs("code",{children:["turn ",n+1]}),u.jsx("span",{title:t.id,children:t.id}),u.jsxs("small",{children:[t.status," · ",t.itemCount," item",t.itemCount===1?"":"s"]})]}),u.jsxs("div",{className:"thread-read-turn-detail",children:[u.jsxs("div",{className:"thread-read-turn-fields",children:[u.jsx(Tt,{label:"Status",value:t.status}),u.jsx(Tt,{label:"Items view",value:t.itemsView}),u.jsx(Tt,{label:"Started",value:Dc(t.startedAt)}),u.jsx(Tt,{label:"Completed",value:Dc(t.completedAt)}),u.jsx(Tt,{label:"Duration",value:t.durationMs===null?"unknown":fu(t.durationMs)}),u.jsx(Tt,{label:"Item types",value:t.itemTypes||"none"})]}),t.preview?u.jsx("p",{className:"thread-read-turn-preview",children:t.preview}):null,u.jsxs("details",{className:"thread-read-turn-raw",children:[u.jsx("summary",{children:"Turn raw JSON"}),u.jsx("pre",{children:JSON.stringify(t.raw,null,2)})]})]})]},t.id))})]})]})}function _c(e,t,n,a,l,o,c,f,h,m){var y,v,k,b;if(e.type==="reasoning")return u.jsx(kA,{content:e.content,streaming:e.streaming});if(e.type==="assistantText")return u.jsx("article",{className:`message assistant${e.streaming?" streaming":""}`,"data-hover-time":ut(e.createdAt),children:u.jsxs("div",{className:"message-main",children:[u.jsxs("header",{className:"message-header",children:[u.jsx("span",{children:"Seele"}),u.jsx("time",{dateTime:e.createdAt,children:e.streaming?"streaming":ut(e.createdAt)})]}),u.jsx("div",{className:"message-body",children:u.jsx(Lc,{content:e.content,conversation:t,streaming:e.streaming,onPreviewArtifact:n,onCopyArtifactUrl:a,copiedArtifactUrl:l})})]})});if(e.type==="turnError")return u.jsxs("article",{className:"turn-error-result","data-hover-time":ut(e.createdAt),role:"alert",children:[u.jsx("strong",{children:"Task failed"}),u.jsx(i5,{content:e.content})]});if(e.type==="message")return u.jsx("article",{className:`message ${e.message.role}`,"data-hover-time":ut(e.message.createdAt),children:u.jsxs("div",{className:"message-main",children:[u.jsxs("header",{className:"message-header",children:[u.jsx("span",{children:ND(e.message.role)}),u.jsx("time",{dateTime:e.message.createdAt,children:ut(e.message.createdAt)})]}),u.jsx("div",{className:"message-body",children:e.message.role==="user"?u.jsx(i5,{content:e.message.content}):u.jsx(Lc,{content:e.message.content,conversation:t,streaming:!1,onPreviewArtifact:n,onCopyArtifactUrl:a,copiedArtifactUrl:l})})]})});if(e.type==="system"){if((y=e.topicMessages)!=null&&y.length)return u.jsx("div",{className:"topic-input-list",children:e.topicMessages.map(N=>u.jsx("article",{className:"message topic-input","data-hover-time":ut(N.createdAt),children:u.jsxs("div",{className:"topic-message-bubble topic-input-bubble",children:[u.jsxs("header",{className:"topic-input-header",children:[u.jsxs("span",{className:"topic-input-sender",children:["From ",N.senderName]}),u.jsx("time",{dateTime:N.createdAt,children:ut(N.createdAt)})]}),u.jsx("div",{className:"topic-input-content message-body",children:u.jsx(Lc,{content:N.contentMarkdown,conversation:t,streaming:!1,onPreviewArtifact:n,onCopyArtifactUrl:a,copiedArtifactUrl:l})})]})},N.id))});const T=Xs({},[e.detail]);return u.jsx("article",{className:"message system","data-hover-time":ut(e.createdAt),children:u.jsx("div",{className:"message-main",children:u.jsxs("button",{className:`system-message-body system-message-link${e.visualKind?` ${e.visualKind}`:""}`,onClick:()=>m==null?void 0:m(e),type:"button",children:[e.visualKind==="topic"?u.jsx("span",{className:"system-message-icon",children:u.jsx(Kd,{})}):null,u.jsx("span",{className:"system-message-title",children:e.title}),u.jsx("small",{children:T})]})})})}return e.type==="steerMarker"?u.jsxs("div",{className:"turn-steer-marker","data-message-id":e.messageId,title:e.content,children:[u.jsx("span",{children:"Added while running"}),u.jsx("strong",{children:e.content})]}):e.tool.linkedTaskId&&h?u.jsx(d7,{description:e.tool.body,icon:u.jsx(c7,{}),onClick:()=>void h(e.tool.linkedTaskId),timestamp:e.tool.createdAt,title:"View complex task details",trailing:e.tool.meta,visibleTitle:e.tool.title}):e.tool.kind==="command"?u.jsx(NN,{tool:e.tool,onRespondApproval:o}):e.tool.kind==="file"&&((v=e.tool.fileChanges)!=null&&v.length)?u.jsx(AN,{conversation:t,tool:e.tool}):e.tool.kind==="responsibility"||e.tool.kind==="workspaceChange"?u.jsx(jN,{conversation:t,tool:e.tool,onRespond:c}):e.tool.kind==="knowledge"?u.jsx(TN,{tool:e.tool,onRespond:f}):e.tool.kind==="collaboration"&&e.tool.topicAction==="send"?u.jsxs("details",{className:"tool-card collaboration topic-output","data-hover-time":ut(e.tool.createdAt),title:ut(e.tool.createdAt),children:[u.jsxs("summary",{children:[u.jsxs("span",{className:"tool-card-summary-title",children:[u.jsx("span",{className:"tool-card-kind-icon",children:u.jsx(Kd,{})}),u.jsx("span",{children:e.tool.title})]}),e.tool.meta?u.jsx("small",{children:e.tool.meta}):null]}),u.jsxs("div",{className:"topic-message-bubble topic-output-bubble",children:[u.jsxs("header",{className:"topic-input-header",children:[u.jsxs("span",{className:"topic-input-sender",children:["To ",e.tool.topicRecipientLabel??"Topic"]}),u.jsx("time",{dateTime:e.tool.createdAt,children:ut(e.tool.createdAt)})]}),u.jsx("div",{className:"topic-input-content message-body",children:u.jsx(Lc,{content:e.tool.topicMessageContent??e.tool.output??"",conversation:t,streaming:!1,onPreviewArtifact:n,onCopyArtifactUrl:a,copiedArtifactUrl:l})})]}),(k=e.tool.rawEvents)!=null&&k.length?u.jsxs("details",{className:"tool-raw-details",children:[u.jsx("summary",{children:"Raw events"}),u.jsx("pre",{className:"tool-raw-json",children:JSON.stringify(e.tool.rawEvents,null,2)})]}):null]}):u.jsxs("details",{className:`tool-card ${e.tool.kind}`,"data-hover-time":ut(e.tool.createdAt),title:ut(e.tool.createdAt),children:[u.jsxs("summary",{children:[u.jsxs("span",{className:"tool-card-summary-title",children:[e.tool.kind==="collaboration"?u.jsx("span",{className:"tool-card-kind-icon",children:u.jsx(Kd,{})}):null,u.jsx("span",{children:e.tool.title})]}),e.tool.meta?u.jsx("small",{children:e.tool.meta}):null]}),u.jsx("code",{children:e.tool.body}),e.tool.output?u.jsx("pre",{children:e.tool.output}):null,(b=e.tool.rawEvents)!=null&&b.length?u.jsxs("details",{className:"tool-raw-details",children:[u.jsx("summary",{children:"Raw events"}),u.jsx("pre",{className:"tool-raw-json",children:JSON.stringify(e.tool.rawEvents,null,2)})]}):null]})}function W3(e){return e.type==="message"||e.type==="turnError"||e.type==="assistantText"&&e.pinnedToResult||e.type==="assistantText"&&e.phase==="final_answer"||e.type==="tool"&&vN(e.tool)}function vN(e){return e.kind==="responsibility"||e.kind==="workspaceChange"&&!!(e.workspaceChangeProposalId??e.responsibilityProposalId)||e.kind==="knowledge"||e.kind==="collaboration"&&e.topicAction==="send"||!!e.linkedTaskId||e.meta==="approval"}function xN(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 bN({group:e,conversation:t,allowProcessView:n=!0,copiedFooter:a,copiedArtifactUrl:l,running:o,onCopyArtifactUrl:c,onCopyBubble:f,onLoadProcessDetails:h,onPreviewArtifact:m,onRespondApproval:y,onRespondWorkspaceChangeProposal:v,onRespondKnowledgeProposal:k,onOpenComplexTask:b,onOpenSystemEvent:T}){const N=xN(e.agentItems.filter(W3)),U=e.agentItems.some(oe=>!W3(oe)),D=n&&(U||e.turnIds.length>0),M=o?"process":"result",[L,G]=B.useState(M),[te,_]=B.useState(!1),W=L==="result"?N:e.agentItems,ae=DN(W);B.useEffect(()=>{te||G(M)},[M,te]);const Q=o||D||e.stopped,F=u.jsxs(u.Fragment,{children:[Q?u.jsx("div",{className:"turn-panel-controls",children:o?u.jsx("span",{"aria-label":"Agent run in progress",className:"turn-view-spinner",title:"Agent run in progress"}):D?u.jsx("button",{"aria-label":L==="result"?"Show process":"Show result",className:"turn-view-toggle",title:L==="result"?"Show process":"Show result",type:"button",onClick:()=>{_(!0),G(oe=>oe==="result"?(h(e.turnIds),"process"):"result")},children:L==="result"?u.jsx(wN,{}):u.jsx(kN,{})}):null}):null,W.map(oe=>u.jsx(B.Fragment,{children:_c(oe,t,m,c,l,y,v,k,b,T)},oe.id)),L==="result"&&W.length===0?u.jsx("div",{className:"turn-result-empty",children:e.stopped?"Run stopped by user":U?"No reliable final answer captured":"No result yet"}):null,u.jsx(Ic,{copied:a,content:ae,id:`agent-${e.id}-bottom`,notice:e.notificationFailure,timestamp:RN(W),variant:"outside",onCopy:f})]});return e.stopped?u.jsxs("details",{className:"turn-panel agent-turn stopped","data-collapsed":"true",children:[u.jsxs("summary",{children:[u.jsx("span",{className:"turn-stopped-badge",children:"Stopped"}),u.jsx("span",{children:"Run stopped by user"})]}),u.jsx("div",{className:Q?"stopped-turn-body has-controls":"stopped-turn-body",children:F})]}):u.jsx("div",{className:["turn-panel","agent-turn",e.stopped?"stopped":"",Q?"has-controls":""].filter(Boolean).join(" "),children:F})}function wN(){return u.jsx("svg",{"aria-hidden":"true",fill:"none",height:"14",viewBox:"0 0 24 24",width:"14",children:u.jsx("path",{d:"M8 7h8M6 12h12M8 17h8",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2"})})}function kN(){return u.jsx("svg",{"aria-hidden":"true",fill:"none",height:"14",viewBox:"0 0 24 24",width:"14",children:u.jsx("path",{d:"m7 12 3 3 7-7",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})})}function SN(){return u.jsx("svg",{"aria-hidden":"true",fill:"none",height:"13",viewBox:"0 0 24 24",width:"13",children:u.jsx("rect",{fill:"currentColor",height:"12",rx:"2.6",width:"12",x:"6",y:"6"})})}function c7(){return u.jsxs("svg",{"aria-hidden":"true",fill:"none",height:"15",viewBox:"0 0 24 24",width:"15",children:[u.jsx("circle",{cx:"6",cy:"6",r:"2",stroke:"currentColor",strokeWidth:"1.8"}),u.jsx("circle",{cx:"18",cy:"7",r:"2",stroke:"currentColor",strokeWidth:"1.8"}),u.jsx("circle",{cx:"12",cy:"18",r:"2",stroke:"currentColor",strokeWidth:"1.8"}),u.jsx("path",{d:"m7.8 7 3.1 8.8M16.2 8.2l-3 7.8M8 6.2l8-.1",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.8"})]})}function CN(){return u.jsx("svg",{"aria-hidden":"true",fill:"none",height:"16",viewBox:"0 0 24 24",width:"16",children:u.jsx("path",{d:"M12 19V5m-5 5 5-5 5 5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2.1"})})}function d7({className:e="",description:t,icon:n,onClick:a,timestamp:l,title:o,trailing:c,visibleTitle:f}){return u.jsxs("button",{className:`tool-card file compact-timeline-link ${e}`.trim(),"data-hover-time":ut(l),onClick:a,title:o,type:"button",children:[u.jsx("span",{className:"compact-timeline-link-icon",children:n}),u.jsxs("span",{className:"compact-timeline-link-copy",children:[u.jsx("strong",{children:f}),u.jsx("small",{children:t})]}),c?u.jsx("span",{className:"compact-timeline-link-trailing",children:c}):null]})}function jN({conversation:e,tool:t,onRespond:n}){var U;const a=Ve((U=t.workspaceChangePayload)==null?void 0:U.content)||t.body,[l,o]=B.useState(a),[c,f]=B.useState(null),[h,m]=B.useState("source"),[y,v]=B.useState(!1),k=!!(t.workspaceChangeProposalId??t.responsibilityProposalId),b=t.meta==="saved"||t.meta==="declined"?t.meta:k?"pending":"preparing",T=b==="pending";B.useEffect(()=>{o(a)},[a]);async function N(D){f(D);try{await n(t,D,D==="accept"?{content:l}:void 0)&&v(!1)}finally{f(null)}}return u.jsxs(u.Fragment,{children:[u.jsx(d7,{className:"responsibility-request-link",description:"Workspace responsibility",icon:u.jsx(Of,{}),onClick:()=>v(!0),timestamp:t.createdAt,title:"View workspace change request",trailing:u.jsx("span",{className:`responsibility-request-status ${b}`,children:b}),visibleTitle:t.title}),y?u.jsx("div",{className:"dialog-backdrop",role:"presentation",onMouseDown:()=>!c&&v(!1),children:u.jsxs("section",{"aria-labelledby":`responsibility-proposal-${t.id}`,"aria-modal":"true",className:"dialog-card responsibility-proposal-dialog",onMouseDown:D=>D.stopPropagation(),role:"dialog",children:[u.jsxs("header",{children:[u.jsxs("div",{children:[u.jsx("h2",{id:`responsibility-proposal-${t.id}`,children:t.title}),u.jsxs("p",{children:["Workspace change · ",ut(t.createdAt)]})]}),u.jsx("button",{"aria-label":"Close",className:"icon-button",disabled:!!c,onClick:()=>v(!1),type:"button",children:"×"})]}),u.jsxs("div",{className:"responsibility-proposal-dialog-body",children:[u.jsxs("div",{className:"responsibility-proposal-header",children:[u.jsxs("div",{children:[u.jsx("strong",{children:"Proposed responsibility"}),u.jsx("p",{children:k?"Review or edit the Markdown before applying it to future turns.":"The proposal becomes actionable after the current turn completes."})]}),u.jsx("span",{children:b})]}),t.responsibilityReason?u.jsx("p",{className:"responsibility-proposal-reason",children:t.responsibilityReason}):null,T?u.jsxs("div",{className:"responsibility-proposal-editor",children:[u.jsxs("div",{className:"responsibility-proposal-tabs",role:"tablist",children:[u.jsx("button",{"aria-selected":h==="source",className:h==="source"?"active":"",role:"tab",type:"button",onClick:()=>m("source"),children:"Source"}),u.jsx("button",{"aria-selected":h==="preview",className:h==="preview"?"active":"",role:"tab",type:"button",onClick:()=>m("preview"),children:"Preview"})]}),h==="source"?u.jsx("textarea",{"aria-label":"Proposed workspace responsibility",className:"responsibility-proposal-body",disabled:!!c,onChange:D=>o(D.target.value),rows:12,value:l}):u.jsx("div",{className:"message-body responsibility-markdown-preview",children:Zl(l,e)})]}):u.jsx("div",{className:"message-body responsibility-markdown-preview saved",children:Zl(l,e)})]}),u.jsx("footer",{className:"responsibility-proposal-dialog-actions",children:T?u.jsxs(u.Fragment,{children:[u.jsx("button",{className:"secondary reject",disabled:!!c,type:"button",onClick:()=>void N("decline"),children:c==="decline"?"Rejecting...":"Reject"}),u.jsx("button",{className:"approve",disabled:!!c,type:"button",onClick:()=>void N("accept"),children:c==="accept"?"Saving...":"Save"})]}):u.jsx("button",{className:"secondary",onClick:()=>v(!1),type:"button",children:"Close"})})]})}):null]})}function TN({tool:e,onRespond:t}){const[n,a]=B.useState(e.body),[l,o]=B.useState(null),[c,f]=B.useState("source"),h=e.meta==="saved"||e.meta==="declined"?e.meta:"pending",m=h==="pending",y=K3(n);return B.useEffect(()=>{a(e.body)},[e.body]),u.jsxs("article",{className:"tool-card responsibility knowledge-proposal","data-hover-time":ut(e.createdAt),title:ut(e.createdAt),children:[u.jsxs("div",{className:"responsibility-proposal-header",children:[u.jsxs("div",{children:[u.jsx("strong",{children:e.title}),u.jsx("p",{children:"Long-term knowledge changes require approval. Keep one item as a reusable source or skill, not a tiny note."})]}),u.jsx("span",{children:h})]}),m?u.jsxs("div",{className:"responsibility-proposal-editor",children:[u.jsxs("div",{className:"responsibility-proposal-tabs",role:"tablist",children:[u.jsx("button",{"aria-selected":c==="source",className:c==="source"?"active":"",role:"tab",type:"button",onClick:()=>f("source"),children:"JSON"}),u.jsx("button",{"aria-selected":c==="preview",className:c==="preview"?"active":"",role:"tab",type:"button",onClick:()=>f("preview"),children:"Preview"})]}),c==="source"?u.jsx("textarea",{"aria-label":"Proposed workspace knowledge",className:"responsibility-proposal-body",disabled:!!l,onChange:v=>a(v.target.value),rows:10,value:n}):y?u.jsx(X3,{value:y}):u.jsx("div",{className:"knowledge-proposal-invalid",children:"Invalid JSON. Fix the proposal before saving."})]}):y?u.jsx(X3,{value:y,saved:!0}):u.jsx("pre",{className:"knowledge-proposal-raw",children:n}),m?u.jsxs("div",{className:"tool-approval-actions responsibility-actions",children:[u.jsx("button",{className:"approve",disabled:!!l,type:"button",onClick:()=>{K3(n)&&(o("accept"),Promise.resolve(t(e,"accept",n)).finally(()=>o(null)))},children:l==="accept"?"Saving...":"Save"}),u.jsx("button",{className:"reject",disabled:!!l,type:"button",onClick:()=>{o("decline"),Promise.resolve(t(e,"decline",n)).finally(()=>o(null))},children:l==="decline"?"Rejecting...":"Reject"})]}):null]})}function K3(e){try{const t=JSON.parse(e);return!t||typeof t!="object"||Array.isArray(t)?null:t}catch{return null}}function tp(e){return typeof e=="string"&&e.trim()?e.trim():typeof e=="number"||typeof e=="boolean"?String(e):"-"}function X3({value:e,saved:t}){return u.jsx("div",{className:`knowledge-proposal-preview${t?" saved":""}`,children:u.jsxs("dl",{children:[u.jsxs("div",{children:[u.jsx("dt",{children:"Name"}),u.jsx("dd",{children:tp(e.name)})]}),u.jsxs("div",{children:[u.jsx("dt",{children:"Purpose"}),u.jsx("dd",{children:tp(e.purpose)})]}),u.jsxs("div",{children:[u.jsx("dt",{children:"Content"}),u.jsx("dd",{children:tp(e.content??e.description)})]})]})})}function AN({conversation:e,tool:t}){var c;const n=t.fileChanges??[],a=e==null?void 0:e.workspacePath,l=UA(n),o=t.meta==="started"||t.meta==="running";return u.jsxs("details",{className:`tool-card file${o?" running":" done"}`,"data-hover-time":ut(t.createdAt),title:ut(t.createdAt),children:[u.jsxs("summary",{children:[u.jsxs("span",{className:"tool-card-summary-title",children:[u.jsx("span",{className:"file-change-indicator","aria-hidden":"true"}),u.jsx("span",{className:"file-change-title",children:qA(n,a)})]}),u.jsx(Q3,{additions:l.additions,deletions:l.deletions,running:o})]}),u.jsx("div",{className:"file-change-list",children:n.map((f,h)=>u.jsxs("div",{className:"file-change-row",children:[u.jsx("span",{className:"file-change-kind",children:EN(f.kind)}),u.jsx("code",{title:f.path,children:Kv(f.path,a)}),u.jsx(Q3,{additions:f.additions,deletions:f.deletions})]},`${f.path}:${h}`))}),(c=t.rawEvents)!=null&&c.length?u.jsxs("details",{className:"tool-raw-details",children:[u.jsx("summary",{children:"Raw events"}),u.jsx("pre",{className:"tool-raw-json",children:JSON.stringify(t.rawEvents,null,2)})]}):null]})}function Q3({additions:e,deletions:t,running:n=!1}){return u.jsxs("span",{className:"file-change-stats",children:[n?u.jsx("small",{children:"editing"}):null,e>0?u.jsxs("span",{className:"file-change-additions",children:["+",e]}):null,t>0?u.jsxs("span",{className:"file-change-deletions",children:["-",t]}):null]})}function EN(e){switch(e){case"add":return"A";case"delete":return"D";case"move":return"R";default:return"M"}}function NN({tool:e,onRespondApproval:t}){var k;const n=eD(e),[a,l]=B.useState(!1),[o,c]=B.useState("script"),f=n==="approval"&&e.approvalRequestId!==void 0&&!!e.approvalTurnId,h=ff(e.body)?null:e.body,m=h?iD(h):null,y=m?`${MN(n)} · ${m}`:n==="running"?"Running script":n==="approval"?"Waiting for approval":"Command",v=tD(e,n);return u.jsxs("article",{className:`tool-card command ${n}`,"data-hover-time":ut(e.createdAt),title:ut(e.createdAt),children:[u.jsxs("div",{className:"tool-command-bar",children:[u.jsxs("button",{"aria-expanded":a,className:"tool-command-toggle",type:"button",onClick:()=>l(b=>!b),children:[u.jsx("span",{className:"tool-command-indicator","aria-hidden":"true"}),u.jsx("span",{children:y}),u.jsx("small",{className:"tool-command-badge",children:v})]}),a?u.jsxs("div",{className:"tool-command-tabs",role:"tablist","aria-label":"Command details",children:[u.jsx("button",{"aria-selected":o==="script",role:"tab",type:"button",onClick:()=>c("script"),children:"Script"}),u.jsx("button",{"aria-selected":o==="result",role:"tab",type:"button",onClick:()=>c("result"),children:"Result"}),(k=e.rawEvents)!=null&&k.length?u.jsx("button",{"aria-selected":o==="raw",role:"tab",type:"button",onClick:()=>c("raw"),children:"Raw"}):null]}):null,f?u.jsxs("div",{className:"tool-approval-actions",children:[u.jsx("button",{className:"approve",type:"button",onClick:()=>t(e,"accept"),children:"Approve"}),u.jsx("button",{className:"reject",type:"button",onClick:()=>t(e,"decline"),children:"Reject"})]}):null]}),a?o==="script"?u.jsx("div",{className:"tool-tab-panel",role:"tabpanel",children:h?u.jsx(Z3,{content:h}):u.jsx("p",{className:"tool-output-pending",children:"Script unavailable"})}):o==="result"?u.jsxs("div",{className:"tool-tab-panel result",role:"tabpanel",children:[u.jsx("p",{className:"tool-command-result-meta",children:nD(e,n)}),e.output?u.jsx(Z3,{content:e.output}):u.jsx("p",{className:"tool-output-pending",children:n==="running"?"Waiting for output...":n==="approval"?"Waiting for approval before running.":e.meta??"No output"})]}):u.jsx(zN,{events:e.rawEvents??[]}):null]})}function MN(e){return e==="running"?"Running":e==="approval"?"Approval required":"Command"}function Z3({content:e}){const[t,n]=B.useState(!1),a=aD(e,F3);return u.jsxs("div",{className:"tool-content-block",children:[u.jsx("pre",{className:"tool-content-code",children:t?e:rD(e,F3)}),a?u.jsx("button",{className:"tool-content-toggle",type:"button",onClick:()=>n(l=>!l),children:t?"Collapse":"Show all"}):null]})}function zN({events:e}){return u.jsx("div",{className:"tool-tab-panel raw",role:"tabpanel",children:u.jsx("pre",{className:"tool-raw-json",children:JSON.stringify(e,null,2)})})}function Ic({copied:e,content:t,id:n,notice:a,timestamp:l,variant:o,onCopy:c}){return t.trim()?u.jsxs("footer",{className:`turn-panel-footer ${o}${a?" has-notice":""}`,children:[a?u.jsx("span",{"aria-label":`Notification failed: ${a}`,className:"turn-panel-footer-notice",role:"img",title:a,children:u.jsx(T7,{})}):null,u.jsx("time",{dateTime:l,children:ut(l)}),u.jsx("button",{"aria-label":e?"Copied markdown":"Copy markdown",onClick:()=>c(n,t),title:e?"Copied":"Copy",type:"button",children:e?u.jsx("span",{"aria-hidden":"true",children:"Copied"}):u.jsxs("svg",{"aria-hidden":"true",fill:"none",height:"12",viewBox:"0 0 24 24",width:"12",children:[u.jsx("rect",{height:"14",rx:"2",stroke:"currentColor",strokeWidth:"2",width:"14",x:"8",y:"8"}),u.jsx("path",{d:"M4 16V6a2 2 0 0 1 2-2h10",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2"})]})})]}):null}function Bc(e){return e.type==="message"?e.message.role==="user"?e.message.content:Zs(e.message.content):e.type==="assistantText"?Zs(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 DN(e){return e.map(Bc).filter(t=>t.trim()).join(`
|
|
374
|
-
|
|
375
|
-
`)}function RN(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 ON({usage:e}){return e?u.jsx("div",{className:"usage-indicators","aria-label":"Seele usage",children:e.windows.map(t=>u.jsx(_N,{label:f7(t.windowDurationMins),window:t},`${t.windowDurationMins}:${t.resetsAt}`))}):u.jsx("span",{"aria-label":"Usage pending",className:"usage-indicator muted","data-tooltip":"Usage pending",role:"status",tabIndex:0,children:u.jsx("strong",{children:"--"})})}function f7(e){return e%10080===0?`${e/10080}w`:e%1440===0?`${e/1440}d`:e%60===0?`${e/60}h`:`${e}m`}function _N({label:e,window:t}){const n=_f(t.usedPercent),a=Q1(n),l=`${e} usage ${P7(n)} · resets ${G7(t.resetsAt)}`;return u.jsx("span",{"aria-label":l,className:`usage-indicator ${a}`,"data-tooltip":l,role:"status",style:{"--usage-level":`${n}%`},tabIndex:0,children:u.jsxs("strong",{children:[Math.round(n),"%"]})})}function IN(e,t,n,a,l,o){const c=[...e].sort(Gc),f=new Map(a.filter(_=>_.parentId===null&&_.nodeType==="agent_turn"&&_.turnId!==null).map(_=>[_.turnId,_.sequence])),h=new Map(a.filter(_=>_.parentId===null&&_.nodeType==="agent_turn"&&_.turnId!==null).map(_=>[_.turnId,_.timelineAt])),m=new Map(a.filter(_=>_.nodeType==="user_message"&&_.entityId!==null).map(_=>[_.entityId,_.sequence])),y=new Map(a.filter(_=>_.nodeType==="user_message"&&_.entityId!==null).map(_=>[_.entityId,_.timelineAt])),v=a.filter(_=>_.parentId===null&&_.nodeType==="system_event"),k=v.filter(_=>_.turnId!==null&&_.subtype.startsWith("input:")),b=v.filter(_=>!k.includes(_)),T=new Set(v.flatMap(_=>_.turnId?[_.turnId]:[])),N=AA(t),U=new Map(n.map(_=>[_.id,_])),D=a.filter(_=>_.parentId===null&&_.nodeType==="agent_turn"&&_.turnId!==null).map(_=>_.turnId),L=[...new Set(a.length>0?[...D,...l?[l]:[]]:[...n.map(_=>_.id),...c.flatMap(_=>_.turnId?[_.turnId]:[]),...t.flatMap(_=>_.turnId?[_.turnId]:[])])].map(_=>{var nt,ue,$e,Ze;const W=U.get(_),ae=c.filter(Se=>Se.turnId===_),Q=ae.filter(Se=>Se.role==="user").sort((Se,gt)=>{const st=y.get(Se.id)??Se.createdAt,pt=y.get(gt.id)??gt.createdAt;return st.localeCompare(pt)||Gc(Se,gt)}),F=ae.filter(Se=>Se.role==="assistant"),oe=t.filter(Se=>Se.turnId===_).sort(Gc),de=`turn:${_}`,_e=a.filter(Se=>Se.parentId===de).sort((Se,gt)=>Se.sequence-gt.sequence),be=(W==null?void 0:W.origin)??N.get(_),ge=k.filter(Se=>Se.turnId===_).sort((Se,gt)=>Se.timelineAt.localeCompare(gt.timelineAt)||Se.sequence-gt.sequence).map(Se=>J3(Se,void 0,o)),Z=be==="timeline_event"?[]:a.length>0?GN(_e,oe,Fc([_],l),o):m7(oe,Fc([_],l),o),le=F.map(zc),Me=_e.find(Se=>Se.subtype==="server.complex_task.plan_updated"),We=oe.find(Se=>Se.event==="server.complex_task.plan_updated"),H=(Me==null?void 0:Me.detail)??(We==null?void 0:We.data),I=Ee(Ee(H).task),ee=Ee(I.currentPlan),R=Ve(ee.planMarkdown),me=UN(PN(Z,le),R),Oe=EA(W);Oe&&me.push({id:`turn-error-${Oe.turnId}`,type:"turnError",createdAt:Oe.createdAt,content:Oe.content});const Re=oe.find(Se=>Se.event==="server.wakeup.started"),Be=Ee(Re==null?void 0:Re.data),ve=typeof Be.instruction=="string"?Be.instruction.trim():"",Xe=be==="timeline_event"?oe[0]:void 0,Ft=T.has(_)?null:Xe?h7(Xe,(W==null?void 0:W.startedAt)??new Date(0).toISOString()):HN(be)?{id:`system-${_}`,type:"system",createdAt:(W==null?void 0:W.startedAt)??((nt=oe[0])==null?void 0:nt.createdAt)??new Date(0).toISOString(),title:$N(be??"system"),detail:FN(be??"system",ve),fullDetail:ve||void 0}:null,pn=iM(oe),tn=(Q[0]?y.get(Q[0].id):(ue=k.find(Se=>Se.turnId===_))==null?void 0:ue.timelineAt)??h.get(_)??(W==null?void 0:W.startedAt)??(($e=ae[0])==null?void 0:$e.createdAt)??((Ze=oe[0])==null?void 0:Ze.createdAt)??new Date(0).toISOString();return{id:`turn-${_}`,turnIds:[_],user:Ft??(Q[0]?zc(Q[0]):null),followupUsers:Q.slice(1).map(zc),acceptedSystemInputs:ge,agentItems:me,activity:pn??(Fc([_],l)?{id:-1,title:me.some(Se=>Se.type==="assistantText"&&Se.streaming)?"Writing response":"Working",createdAt:tn,tone:"running"}:null),notificationFailure:aM(oe),stopped:(W==null?void 0:W.status)==="cancelled"||oe.some(g7),trailingSystemItems:[],sortAt:tn,sortSequence:f.get(_)??null}}),G=c.filter(_=>!_.turnId);L.push(...G.map(_=>({id:`message-${_.id}`,turnIds:[],user:_.role==="user"?zc(_):null,followupUsers:[],agentItems:_.role==="assistant"?[zc(_)]:[],activity:null,notificationFailure:null,stopped:!1,sortAt:y.get(_.id)??_.createdAt,sortSequence:m.get(_.id)??null})));const te=new Map(t.map(_=>[String(_.id),_]));return L.push(...b.map(_=>({id:_.id,turnIds:[],user:J3(_,_.entityType==="event"&&_.entityId?te.get(_.entityId):void 0,o),followupUsers:[],agentItems:[],activity:null,notificationFailure:null,stopped:!1,trailingSystemItems:[],sortAt:_.timelineAt,sortSequence:_.sequence}))),L.sort((_,W)=>{const ae=_.sortAt.localeCompare(W.sortAt);return ae!==0?ae:_.sortSequence!==null||W.sortSequence!==null?(_.sortSequence??Number.MAX_SAFE_INTEGER)-(W.sortSequence??Number.MAX_SAFE_INTEGER):0}).map(({sortAt:_,...W})=>W)}function J3(e,t,n){var h,m;if(t||e.entityType==="event")return h7(t??Zp(e),e.createdAt);const a=Ee(e.detail);if(e.subtype==="input:collaboration_notice"||e.subtype==="input:topic_message"){const y=Gp(a,n),v=BN(a.messages,n),k=Array.isArray(a.senderWorkspaceIds)?a.senderWorkspaceIds.filter(T=>typeof T=="string"&&T.trim().length>0):[],b=typeof a.unreadCount=="number"?a.unreadCount:0;return{id:e.id,type:"system",createdAt:e.createdAt,title:y.title,detail:y.detail,visualKind:"topic",topicMessages:v,fullDetail:[`## ${y.title}`,"","**Unread**","",String(b),"","**From**","",k.length>0?k.map(T=>{const N=n.get(T)??T;return`${Ys(N)} (\`${T}\`)`}).join(", "):"Unknown"].join(`
|
|
376
|
-
`)}}const l=Ve(a.complexTaskId)||Ve(Ee(a.task).id)||void 0,o=Yv(e.title,e.subtype),c=Xs(a,[e.summary,e.contentMarkdown]),f=[`## ${Ys(o)}`,"",((h=e.contentMarkdown)==null?void 0:h.trim())||((m=e.summary)==null?void 0:m.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:o,detail:c,fullDetail:f||void 0,linkedTaskId:l}}function BN(e,t){if(!Array.isArray(e))return[];const n=new Set,a=[];for(const l of e){const o=Ee(l),c=Ve(o.id),f=Ve(o.senderWorkspaceId),h=Ve(o.contentMarkdown).trim(),m=Ve(o.createdAt);!c||n.has(c)||!f||!h||!m||(n.add(c),a.push({id:c,senderWorkspaceId:f,senderName:t.get(f)??(Ve(o.senderTitleSnapshot)||f),contentMarkdown:h,createdAt:m}))}return a}function h7(e,t){return e.event==="server.collaboration.topic_created"?LN(e,t):qN(e,t)}function LN(e,t){const n=Ee(Ee(e.data).topic),a=Ve(n.title).trim()||"Untitled Topic",l=Ve(n.publicDescription).trim()||"未填写描述",o=Array.isArray(n.members)?n.members.map(Ee):[],c=Ve(n.ownerWorkspaceId),f=o.find(v=>Ve(v.role)==="owner"||Ve(v.workspaceId)===c),h=Ve(f==null?void 0:f.workspaceTitleSnapshot).trim()||"Unknown workspace",m=o.filter(v=>Ve(v.role)!=="owner"&&Ve(v.status)==="active"),y=m.length?m.map(v=>{const k=Ve(v.workspaceTitleSnapshot).trim()||"Unknown workspace";return`- ${Ys(k)} (\`${Ve(v.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**","",...y].join(`
|
|
379
|
-
`)}}function qN(e,t){const n=Ee(e.data),a=Qp(e.data),l=Yv(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 Qp(e,t=""){return Array.isArray(e)?e.map(n=>Qp(n)):e&&typeof e=="object"?Object.fromEntries(Object.entries(e).map(([n,a])=>[n,Qp(a,n)])):typeof e=="string"&&(t==="wakeAt"||t==="wake_at")&&Yc(e)||e}function UN(e,t){const n=t.trim();return n?e.filter(a=>a.type==="assistantText"?Zs(a.content).trim()!==n:a.type==="message"&&a.message.role==="assistant"?Zs(a.message.content).trim()!==n:!0):e}function HN(e){return e==="system"||e==="wakeup"||e==="runtime-reset"||e==="clone_initialization"}function $N(e){return e==="runtime-reset"?"Runtime reset":e==="clone_initialization"?"Clone initialization":e==="system"?"System action":"Scheduled wakeup"}function FN(e,t){return e==="runtime-reset"?"Thread rebuilt":e==="clone_initialization"?"Activating inherited context":e==="system"?"Workspace runtime action":t?B7(t,20):"Auto resumed"}function PN(e,t){if(e.some(l=>l.type==="assistantText"))return df(e);if(t.length===0)return e;const n=[...t],a=[];for(const l of e)l.type==="tool"&&V1(l.tool)&&G1(n,l.tool)||a.push(l);return df([...a,...n])}function GN(e,t,n,a){var h;const l=new Map(t.filter(m=>m.id!==void 0).map(m=>[String(m.id),m])),o=new Map,c=new Set;for(const m of e){const y=VN(m,t,l);y.length>0&&c.add(m.id);for(const v of y)o.set(Wa(v),v)}if(n)for(const m of t)YN(e,m)||o.set(Wa(m),m);else if(t.length>0&&!e.some(m=>m.phase==="process"))for(const m of t)o.set(Wa(m),m);for(const m of t){const y=Ee(m.data),v=Ee(y.params);(typeof y.method=="string"&&y.method.startsWith("item/reasoning/")||y.method==="item/completed"&&Ee(v.item).type==="reasoning")&&o.set(Wa(m),m)}const f=m7([...o.values()].sort(Gc),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:WN(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:KN(m,a)})}return df(f)}function VN(e,t,n){if(e.entityType==="event"&&e.entityId){const a=n.get(e.entityId);return a&&e.phase==="process"&&e.status==="running"?[a]:[Zp(e)]}if(e.entityType==="codex_item"&&e.entityId){const a=t.filter(l=>P1(l)===e.entityId);return a.length>0?a:[Zp(e)]}return[]}function Zp(e){const t=Ee(e.detail),n=e.subtype==="server.collaboration.message_staged"&&e.phase==="result"?e.status==="failed"?"server.collaboration.message_rejected":Ve(t.messageId)?"server.collaboration.message_sent":e.subtype:e.subtype;return{id:e.entityId??e.id,turnId:e.turnId,seq:e.sequence,event:e.entityType==="codex_item"?"codex.notification":n,data:e.detail,createdAt:e.updatedAt||e.createdAt}}function YN(e,t){const n=t.id===void 0?null:String(t.id),a=P1(t);return e.some(l=>n!==null&&l.entityType==="event"&&l.entityId===n||a!==null&&l.entityType==="codex_item"&&l.entityId===a)}function P1(e){if(e.event!=="codex.notification"&&e.event!=="server.item.snapshot")return null;const t=Ee(e.data),n=Ee(t.params),a=Ee(n.item);return Ve(a.id)||Ve(n.itemId)||null}function WN(e){return e.subtype==="final_answer"?"final_answer":e.phase==="process"?"commentary":"unknown"}function KN(e,t){var a,l;const n=Ee(e.detail);return{id:e.id,kind:e.status==="failed"?"error":"activity",title:e.subtype==="input:collaboration_notice"?Gp(n,t).title:e.title||L7(e.subtype),body:e.subtype==="input:collaboration_notice"?Gp(n,t).detail:((a=e.summary)==null?void 0:a.trim())||((l=e.contentMarkdown)==null?void 0:l.trim())||z7(n),createdAt:e.createdAt,itemId:e.entityType==="codex_item"?e.entityId??void 0:void 0,meta:e.status}}function m7(e,t,n){const a=[],l=new Map,o=new Map,c=new Map,f=new Map,h=new Map;for(const m of e){const y=SA(l,m.data);if(y){const D=CA(y);let M=o.get(y.itemId);!M&&D&&(M={id:`reasoning-${m.id}`,type:"reasoning",createdAt:m.createdAt??new Date().toISOString(),content:D,streaming:!1},o.set(y.itemId,M),a.push(M)),M&&(M.content=D,M.streaming=t&&!y.completed);continue}if(m.event==="server.workspace_change.decision"||m.event==="server.responsibility.decision"){ZN(a,m);continue}if(m.event==="server.knowledge.decision"){JN(a,m);continue}if(g7(m)){rM(a);continue}if(m.event==="server.steer"){const D=Ee(m.data),M=typeof D.message=="string"?D.message.trim():"";a.push({id:`steer-${m.id}`,type:"steerMarker",createdAt:m.createdAt??new Date().toISOString(),content:M||"Additional input",messageId:typeof D.messageId=="string"?D.messageId:void 0});continue}const v=CD(m.data);v!=null&&v.itemId&&h.set(v.itemId,v.phase);const k=SD(m.data);if(k!=null&&k.text){const D=k.itemId?h.get(k.itemId)??k.phase:k.phase,M=k.itemId??`phase:${D}`,L=`${c.get(M)??""}${k.text}`,G=k7(L),te=f.get(M)??"",_=G.startsWith(te)?G.slice(te.length):G;if(c.set(M,L),f.set(M,G),_){const W=a[a.length-1];(W==null?void 0:W.type)==="assistantText"&&tM(W,k.itemId,D)?(W.content+=_,W.itemId=W.itemId??k.itemId,W.streamKey=W.streamKey??M,W.streaming=t):a.push({id:`assistant-event-${m.id}`,type:"assistantText",createdAt:m.createdAt??new Date().toISOString(),content:_,phase:D,itemId:k.itemId,streamKey:M,streaming:t})}continue}const b=jD(m.data);if(b!=null&&b.text){const D=Zs(b.text),M=b.itemId??`phase:${b.phase}`,L=nM(a,b.itemId,b.phase);if(L>=0){const G=a[L];G.type==="assistantText"&&(D?(G.content=D,G.phase=b.phase,G.itemId=G.itemId??b.itemId,G.streamKey=G.streamKey??M,G.streaming=!1,QN(a,L,b.itemId)):a.splice(L,1))}else D&&a.push({id:`assistant-completed-${m.id}`,type:"assistantText",createdAt:m.createdAt??new Date().toISOString(),content:D,phase:b.phase,itemId:b.itemId,streamKey:M,streaming:!1});continue}const T=Xz(m,n);if(T){T.rawEvents=[m];const D=t5(a,T);if(D>=0){n5(a[D],T);continue}if(V1(T)&&G1(a,T)||T.kind==="command"&&T.meta==="running"&&ff(T.body))continue;a.push({id:`tool-${T.id}`,type:"tool",createdAt:T.createdAt,tool:T});continue}const N=Qz(m);if(N){N.rawEvents=[m];const D=t5(a,N);if(D>=0){n5(a[D],N);continue}a.push({id:`tool-${N.id}`,type:"tool",createdAt:N.createdAt,tool:N});continue}if(_A(m)){XN(a,m);continue}const U=Zz(m);U&&(U.rawEvents=[m],a.push({id:`tool-${U.id}`,type:"tool",createdAt:U.createdAt,tool:U}))}return df(a)}function XN(e,t){const n=P1(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:y7(l.tool.rawEvents,[t])};return}}}function QN(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 ZN(e,t){const n=Ee(t.data),a=typeof n.proposalId=="string"?n.proposalId:void 0,l=typeof n.decision=="string"?n.decision:void 0,o=Ee(n.payload),c=Ve(o.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=sE(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(o).length>0?o:h.tool.workspaceChangePayload};return}}}function JN(e,t){const n=Ee(t.data),a=typeof n.proposalId=="string"?n.proposalId:void 0,l=typeof n.decision=="string"?n.decision:void 0,o=Ee(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(o).length>0?JSON.stringify(o,null,2):f.tool.body};return}}}function G1(e,t){const n=p7(t);if(typeof n!="number")return!1;for(let o=0;o<e.length;o+=1){const c=e[o];if(c.type!=="assistantText"||!e5(c,t))continue;const f=Zs(c.content);f!==c.content&&(e[o]={...c,content:f})}let a=0,l=-1;for(let o=0;o<e.length;o+=1){const c=e[o];if(c.type!=="assistantText"||!e5(c,t))continue;l=o;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)),y=c.content.slice(0,m).trimEnd(),v=c.content.slice(m).trimStart(),k=[];return y&&k.push({...c,id:`${c.id}:before-tool-${t.id}`,content:y,pinnedToResult:!0}),k.push({id:`tool-${t.id}`,type:"tool",createdAt:t.createdAt,tool:t}),v&&k.push({...c,id:`${c.id}:after-tool-${t.id}`,content:v,pinnedToResult:!0}),e.splice(o,1,...k),!0}if(l>=0&&n>=a){const o=e[l];return(o==null?void 0:o.type)==="assistantText"&&(e[l]={...o,pinnedToResult:!0}),e.splice(l+1,0,{id:`tool-${t.id}`,type:"tool",createdAt:t.createdAt,tool:t}),!0}return!1}function e5(e,t){return!t.anchorStreamKey||e.streamKey===t.anchorStreamKey}function df(e){const t=[],n=[];for(const o of e){if(o.type==="tool"&&V1(o.tool)){t.push(o.tool);continue}n.push(o)}const a=[...n],l=[];for(const o of t)G1(a,o)||l.push({id:`tool-${o.id}`,type:"tool",createdAt:o.createdAt,tool:o});return eM([...l,...a])}function V1(e){return typeof p7(e)=="number"}function p7(e){if(typeof e.anchorOffset=="number")return e.anchorOffset;if(e.kind==="responsibility")return e.responsibilityAnchorOffset;if(e.kind==="knowledge")return e.knowledgeAnchorOffset}function eM(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 tM(e,t,n){return e.type!=="assistantText"?!1:e.itemId&&t?e.itemId===t:e.itemId||t?!1:e.phase===n}function nM(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 g7(e){return e.event==="server.stop"||e.event==="server.stopped"}function rM(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 aM(e){for(let t=e.length-1;t>=0;t-=1){const n=e[t];if(n.event!=="server.notification.failed")continue;const a=Ee(n.data);return typeof a.message=="string"?a.message:"Notification failed"}return null}function iM(e){for(let t=e.length-1;t>=0;t-=1){const n=q7(e[t]);if(n)return n}return null}function t5(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 n5(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"&&ff(t.body)&&!ff(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?bA(e.tool.output,t.output,t.outputKind):fD(e.tool.output,t.output),topicRecipientLabel:t.topicRecipientLabel??e.tool.topicRecipientLabel,topicMessageContent:t.topicMessageContent??e.tool.topicMessageContent,rawEvents:y7(e.tool.rawEvents,t.rawEvents)}}function y7(e,t){const n=[...e??[],...t??[]];if(n.length===0)return;const a=new Set;return n.filter(l=>{const o=Wa(l);return a.has(o)?!1:(a.add(o),!0)})}function zc(e){return{id:`message-${e.id}`,type:"message",createdAt:e.createdAt,message:e}}function np(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=>v7(l)?!a.some(o=>lM(o,l)):!0)}function rp(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 ap(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 v7(e){return e.id.startsWith("local-")}function lM(e,t){if(v7(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 Hd(e,t){const n=new Map,a=new Map;for(const o of[...e,...t]){const c=Wa(o);a.has(c)||a.set(c,a.size),n.set(c,o)}return[...n.values()].sort((o,c)=>{const f=x7(o,c);return f!==0?f:(a.get(Wa(o))??0)-(a.get(Wa(c))??0)})}function r5(e,t){const n=Wa(t),a=e.findIndex(o=>Wa(o)===n);if(a<0)return[...e,t];if(sM(e[a],t))return e;const l=[...e];return l[a]=t,l}function sM(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 Wa(e){return e.id!==void 0?`${typeof e.id}:${e.id}`:`${e.event}:${e.createdAt??""}:${JSON.stringify(e.data)}`}function Gc(e,t){const n=x7(e,t);return n!==0?n:oM(e.id,t.id)}function x7(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:0}function oM(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 a5(e,t){const n=Ee(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 Lc=B.memo(function({content:t,conversation:n,streaming:a,onPreviewArtifact:l,onCopyArtifactUrl:o,copiedArtifactUrl:c}){const f=a?k7(t):Zs(t),h=n&&!a?gM(f,n):[];return u.jsxs(u.Fragment,{children:[a?u.jsx(dM,{content:f,conversation:n}):Zl(f,n),h.length>0?u.jsx("div",{className:"artifact-preview-list",children:h.map(m=>u.jsx(pM,{artifact:m,onPreview:l,onCopyUrl:o,copied:c===m.url},m.id))}):null]})},uM);function uM(e,t){var n,a,l,o;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)===((o=t.conversation)==null?void 0:o.workspacePath)}function i5({content:e}){return u.jsx("div",{className:"plain-message-content",children:e})}const cM=2;function dM({content:e,conversation:t}){const n=B.useRef(null),[a,l]=B.useState(null),{committedBlocks:o,activeBlock:c}=fM(e);return B.useLayoutEffect(()=>{const f=n.current;if(!f)return;const h=parseFloat(window.getComputedStyle(f).lineHeight)||28,m=f.scrollHeight;l(y=>{const v=h*cM,k=Math.min(m,v);return y!==null&&k<=y?y:k})},[e]),u.jsxs("div",{className:"streaming-message-content",ref:n,style:a===null?void 0:{minHeight:a},children:[o.map((f,h)=>u.jsx(B.Fragment,{children:Zl(f,t)},`${h}:${f.length}`)),c?u.jsx("p",{className:"streaming-active-line",children:c}):null]})}function fM(e){const t=mM(e),n=t>0?e.slice(0,t):"",a=e.slice(t);return{committedBlocks:hM(n),activeBlock:a}}function hM(e){const t=[];let n=0,a=!1,l=!1;const o=e.match(/[^\n]*(?:\n|$)/g)??[];let c=0;for(const f of o){if(!f)continue;const h=f.trim(),m=c;if(c+=f.length,/^\s*(```|~~~)/.test(f)){a=!a,a||($d(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&&($d(t,e.slice(n,m)),n=m,l=!1),h===""&&($d(t,e.slice(n,c)),n=c)}return n<e.length&&$d(t,e.slice(n)),t}function $d(e,t){t.trim()&&e.push(t)}function mM(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 o=e.indexOf(`
|
|
383
|
-
`,l),c=e.slice(l,o===-1?e.length:o);/^\s*(```|~~~)/.test(c)&&(a=a===-1?l:-1)}return a>=0?a:t+1}function pM({artifact:e,onPreview:t,onCopyUrl:n,copied:a}){return e?u.jsxs("figure",{className:"artifact-preview",children:[u.jsx("button",{className:"artifact-preview-media",onClick:()=>t(e),type:"button",children:u.jsx("img",{alt:e.name,src:e.url})}),u.jsxs("figcaption",{children:[u.jsx("span",{children:e.name}),u.jsxs("div",{className:"artifact-preview-actions",children:[u.jsx("button",{onClick:()=>t(e),type:"button",children:"Preview"}),u.jsx("a",{href:e.url,rel:"noreferrer",target:"_blank",children:"Open"}),u.jsx("button",{onClick:()=>n(e),type:"button",children:a?"Copied":"Copy"})]})]})]}):null}function gM(e,t){const n=new Map;for(const a of yM(e)){const l=b7(a);if(l){const o=w7(l).toLowerCase(),c=n.get(o);(!c||bM(l,c))&&n.set(o,l)}}return Array.from(n.values()).map(a=>vM(a,t)).filter(a=>a!==null)}function yM(e){const t=[],n=/!\[[^\]]*]\(([^)]+)\)/g,a=/\[[^\]]+]\(([^)]+)\)/g,l=/(?:artifact|preview|image|file)\s*:\s*(`?[^`\n]+?\.(?:svg|png|jpe?g|webp|gif)`?)/gim;for(const o of[n,a,l]){let c;for(;(c=o.exec(e))!==null;)t.push(c[1])}return t}function vM(e,t){const n=b7(e);if(!n||!xM(n))return null;const a=Zv(n,t.workspacePath);return{id:`${t.id}:${a}`,path:a,name:w7(a),url:Te(`conversations/${t.id}/files?path=${encodeURIComponent(a)}`)}}function b7(e){const t=e.trim().replace(/^`+|`+$/g,"").replace(/[),.;:,。;:]+$/g,"");return t||null}function xM(e){return/\.(?:svg|png|jpe?g|webp|gif)$/i.test(e)}function w7(e){return e.replace(/\\/g,"/").split("/").filter(Boolean).pop()??e}function bM(e,t){return e.startsWith("/")&&!t.startsWith("/")?!0:e.length>t.length}function Zs(e){return e.trim()}function k7(e){return e.trim()}function l5(e){return e instanceof DOMException&&e.name==="AbortError"||e instanceof Error&&e.name==="AbortError"}function wM(e){return{a({children:t,href:n}){if(!n)return u.jsx(u.Fragment,{children:t});const a=/^[a-z][a-z\d+.-]*:/i.test(n),l=Qv(n);if(n.startsWith("seele-public:")&&!l)return u.jsxs("span",{title:"无效的 Seele Public URL 地址",children:[t,"(地址格式无效)"]});const o=!a&&e?kM(n,e):null,c=l?Te(`deployment/public-link?path=${encodeURIComponent(l)}`):o??n,f=a||!!o;return u.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=CM(t);return n?Y1(n.language)==="mermaid"?u.jsx(jM,{code:n.code}):u.jsx(EM,{code:n.code,language:n.language}):u.jsx("pre",{children:t})},table({children:t}){return u.jsx("div",{className:"markdown-table-wrap",children:u.jsx("table",{className:"markdown-table",children:t})})},td({align:t,children:n}){return u.jsx("td",{style:s5(t),children:n})},th({align:t,children:n}){return u.jsx("th",{style:s5(t),children:n})}}}function kM(e,t){if(!e||e.startsWith("#")||e.startsWith("/api/")||e.startsWith("?"))return null;const n=cE(e,t.workspacePath);if(!n)return null;const a=n.line?`#L${n.line}${n.column?`C${n.column}`:""}`:"";return`${Te(`conversations/${t.id}/files?path=${encodeURIComponent(n.path)}`)}${a}`}function s5(e){return e&&e!=="char"?{textAlign:e}:void 0}function Zl(e,t){const n=HT(SM(e));return u.jsx(Ak,{urlTransform:a=>Qv(a)?a:f6(a),components:wM(t),remarkPlugins:[LC,UT],rehypePlugins:[[xA,{trust:!1,strict:"ignore"}]],skipHtml:!0,children:n})}function SM(e){return e.replace(/([^\n])(```[^\n`]*(?:\r?\n|$))/g,`$1
|
|
384
|
-
$2`)}function CM(e){var o;const t=B.Children.toArray(e),n=t.length===1&&B.isValidElement(t[0])?t[0]:null;if(!n||n.type!=="code")return null;const l=((o=(n.props.className??"").match(/(?:^|\s)language-([^\s]+)/))==null?void 0:o[1])??"";return{code:Jp(n.props.children).replace(/\n$/,""),language:l}}function Jp(e){return e==null||typeof e=="boolean"?"":typeof e=="string"||typeof e=="number"||typeof e=="bigint"?String(e):Array.isArray(e)?e.map(Jp).join(""):B.isValidElement(e)?Jp(e.props.children):""}const S7="github-light",ip=new Map,lp=new Map;let sp=null,op=null;const C7=new Set(["bash","css","diff","dockerfile","html","java","javascript","json","jsonc","jsx","markdown","python","shellscript","sql","toml","tsx","typescript","xml","yaml"]);function Y1(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 j7(e){const t=Y1(e);return!t||t==="text"||t==="txt"?"text":C7.has(t)?t:"text"}function jM({code:e}){const n=`seele-mermaid-${B.useId().replace(/[^a-zA-Z0-9_-]/g,"")}`,[a,l]=B.useState(!1),[o,c]=B.useState(()=>lp.get(e)??null),[f,h]=B.useState(null);B.useEffect(()=>{let y=!1,v;const k=lp.get(e);return k?(c(k),h(null),()=>{y=!0}):(h(null),c(null),TM(n,e).then(b=>{y||(v!==void 0&&window.clearTimeout(v),lp.set(e,b),c(b),h(null))},b=>{if(!y){const T=b instanceof Error?b.message:String(b);v=window.setTimeout(()=>{y||h(T)},wE)}}),()=>{y=!0,v!==void 0&&window.clearTimeout(v)})},[e,n]);async function m(){await navigator.clipboard.writeText(e),l(!0),window.setTimeout(()=>l(!1),1200)}return u.jsxs("figure",{className:`mermaid-block${f?" error":""}`,children:[u.jsx("span",{className:"code-block-kind",children:"mermaid"}),u.jsx("div",{className:"code-block-tools",children:u.jsx("button",{"aria-label":a?"Copied Mermaid source":"Copy Mermaid source",className:a?"copied":"",onClick:()=>void m(),title:a?"Copied":"Copy",type:"button",children:u.jsx(W1,{})})}),o?u.jsx("div",{className:"mermaid-diagram",dangerouslySetInnerHTML:{__html:o}}):f?u.jsxs("div",{className:"mermaid-error",children:[u.jsx("strong",{children:"Mermaid render failed"}),u.jsx("pre",{children:f}),u.jsx("code",{children:e})]}):u.jsx("div",{className:"mermaid-loading",children:"Rendering diagram..."})]})}async function TM(e,t){return(await(await AM()).render(e,t)).svg}function AM(){return op||(op=rn(()=>import("./mermaid.core-BAJAVA4f.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})),op}function EM({code:e,language:t,reserveHeight:n=!1}){const[a,l]=B.useState(!1),[o,c]=B.useState(()=>{if(!c5(t))return null;const m=u5(e,t);return ip.get(m)??null}),f=n?{"--code-block-min-height":`${DE(e)}px`}:void 0;B.useEffect(()=>{let m=!1;if(!c5(t))return c(null),()=>{m=!0};const y=u5(e,t),v=ip.get(y);return v?(c(v),()=>{m=!0}):(c(null),IM(e,t).then(k=>{ip.set(y,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 u.jsxs("figure",{className:"code-block",style:f,children:[t?u.jsx("span",{className:"code-block-kind",children:t}):null,u.jsx("div",{className:"code-block-tools",children:u.jsx("button",{"aria-label":a?"Copied code block":"Copy code block",className:a?"copied":"",onClick:()=>void h(),title:a?"Copied":"Copy",type:"button",children:u.jsx(W1,{})})}),o?u.jsx("div",{className:"code-block-shiki",dangerouslySetInnerHTML:{__html:o}}):u.jsx("pre",{children:u.jsx("code",{children:e})})]})}function W1(){return u.jsxs("svg",{"aria-hidden":"true",fill:"none",height:"13",viewBox:"0 0 24 24",width:"13",children:[u.jsx("rect",{height:"14",rx:"2",stroke:"currentColor",strokeWidth:"2",width:"14",x:"8",y:"8"}),u.jsx("path",{d:"M4 16V6a2 2 0 0 1 2-2h10",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2"})]})}function NM(){return u.jsxs("svg",{"aria-hidden":"true",fill:"none",height:"16",viewBox:"0 0 24 24",width:"16",children:[u.jsx("circle",{cx:"6",cy:"5",r:"2",stroke:"currentColor",strokeWidth:"2"}),u.jsx("circle",{cx:"18",cy:"5",r:"2",stroke:"currentColor",strokeWidth:"2"}),u.jsx("circle",{cx:"12",cy:"19",r:"2",stroke:"currentColor",strokeWidth:"2"}),u.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 T7(){return u.jsxs("svg",{"aria-hidden":"true",fill:"none",height:"12",viewBox:"0 0 24 24",width:"12",children:[u.jsx("circle",{cx:"12",cy:"12",r:"9",stroke:"currentColor",strokeWidth:"2.2"}),u.jsx("path",{d:"M12 7v6",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2.4"}),u.jsx("circle",{cx:"12",cy:"17",fill:"currentColor",r:"1.25"})]})}function MM(){return u.jsx("svg",{"aria-hidden":"true",fill:"none",height:"18",viewBox:"0 0 24 24",width:"18",children:u.jsx("path",{d:"M4 7h16M4 12h16M4 17h16",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2"})})}function zM(){return u.jsxs("svg",{"aria-hidden":"true",fill:"none",height:"14",viewBox:"0 0 24 24",width:"14",children:[u.jsx("path",{d:"M7 7h10M7 12h10M7 17h10",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2"}),u.jsx("circle",{cx:"4",cy:"7",fill:"currentColor",r:"1.4"}),u.jsx("circle",{cx:"4",cy:"12",fill:"currentColor",r:"1.4"}),u.jsx("circle",{cx:"4",cy:"17",fill:"currentColor",r:"1.4"})]})}function o5(){return u.jsxs("svg",{"aria-hidden":"true",fill:"none",height:"14",viewBox:"0 0 24 24",width:"14",children:[u.jsx("circle",{cx:"12",cy:"12",r:"3",stroke:"currentColor",strokeWidth:"2"}),u.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 DM(){return u.jsxs("svg",{"aria-hidden":"true",fill:"none",height:"14",viewBox:"0 0 24 24",width:"14",children:[u.jsx("rect",{height:"16",rx:"2.6",stroke:"currentColor",strokeWidth:"1.8",width:"18",x:"3",y:"4"}),u.jsx("path",{d:"m7 9 3 3-3 3M12.5 15h4.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.9"})]})}function Kd(){return u.jsxs("svg",{"aria-hidden":"true",fill:"none",height:"17",viewBox:"0 0 24 24",width:"17",children:[u.jsx("circle",{cx:"7",cy:"12",r:"2.4",stroke:"currentColor",strokeWidth:"1.8"}),u.jsx("circle",{cx:"17",cy:"7",r:"2.4",stroke:"currentColor",strokeWidth:"1.8"}),u.jsx("circle",{cx:"17",cy:"17",r:"2.4",stroke:"currentColor",strokeWidth:"1.8"}),u.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 Of(){return u.jsxs("svg",{"aria-hidden":"true",fill:"none",height:"13",viewBox:"0 0 24 24",width:"13",children:[u.jsx("path",{d:"m4 16-.8 4 4-.8L18.4 8 15.2 4.8 4 16Z",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"2"}),u.jsx("path",{d:"m13.8 6.2 3.2 3.2",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2"})]})}function RM(){return u.jsx("svg",{"aria-hidden":"true",fill:"none",height:"14",viewBox:"0 0 24 24",width:"14",children:u.jsx("path",{d:"M5 8v11h14V8M4 4h16v4H4zM9 12h6",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})})}function OM(){return u.jsxs("svg",{"aria-hidden":"true",fill:"none",height:"14",viewBox:"0 0 24 24",width:"14",children:[u.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"}),u.jsx("circle",{cx:"12",cy:"12",r:"3",stroke:"currentColor",strokeWidth:"2"})]})}function _M(){return u.jsxs("svg",{"aria-hidden":"true",fill:"none",height:"14",viewBox:"0 0 24 24",width:"14",children:[u.jsx("path",{d:"M3 3l18 18",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2"}),u.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 u5(e,t){return`${S7}:${j7(t)}:${e}`}function c5(e){const t=Y1(e);return!!t&&C7.has(t)}async function IM(e,t){return(await BM()).codeToHtml(e,{lang:j7(t),theme:S7})}function BM(){return sp||(sp=LM()),sp}async function LM(){const[{createHighlighterCore:e},{createJavaScriptRegexEngine:t},{default:n},{default:a},{default:l},{default:o},{default:c},{default:f},{default:h},{default:m},{default:y},{default:v},{default:k},{default:b},{default:T},{default:N},{default:U},{default:D},{default:M},{default:L},{default:G},{default:te}]=await Promise.all([rn(()=>import("./core-Cm9kRhNN.js"),[],import.meta.url),rn(()=>import("./engine-javascript-DBd1bXLz.js"),[],import.meta.url),rn(()=>import("./github-light-DAi9KRSo.js"),[],import.meta.url),rn(()=>import("./bash-BELqPA7S.js").then(_=>_.b),[],import.meta.url),rn(()=>import("./css-CLj8gQPS.js"),[],import.meta.url),rn(()=>import("./diff-D97Zzqfu.js"),[],import.meta.url),rn(()=>import("./dockerfile-BcOcwvcX.js"),[],import.meta.url),rn(()=>import("./html-pp8916En.js"),__vite__mapDeps([0,1,2]),import.meta.url),rn(()=>import("./java-CylS5w8V.js"),[],import.meta.url),rn(()=>import("./javascript-wDzz0qaB.js"),[],import.meta.url),rn(()=>import("./json-Cp-IABpG.js"),[],import.meta.url),rn(()=>import("./jsonc-Des-eS-w.js"),[],import.meta.url),rn(()=>import("./jsx-g9-lgVsj.js"),[],import.meta.url),rn(()=>import("./markdown-Cvjx9yec.js"),[],import.meta.url),rn(()=>import("./python-B6aJPvgy.js"),[],import.meta.url),rn(()=>import("./bash-BELqPA7S.js").then(_=>_.s),[],import.meta.url),rn(()=>import("./sql-CRqJ_cUM.js"),[],import.meta.url),rn(()=>import("./toml-vGWfd6FD.js"),[],import.meta.url),rn(()=>import("./tsx-COt5Ahok.js"),[],import.meta.url),rn(()=>import("./typescript-BPQ3VLAy.js"),[],import.meta.url),rn(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([3,4]),import.meta.url),rn(()=>import("./yaml-Buea-lGh.js"),[],import.meta.url)]);return e({engine:t(),themes:[n],langs:[a,l,o,c,f,h,m,y,v,k,b,T,N,U,D,M,L,G,te]})}async function d5(){const e=Te("conversations"),t=await fetch(e);return await Ue(t,{url:e}),(await t.json()).conversations}async function qM(){const e=Te("workspace-states"),t=await fetch(e);return await Ue(t,{url:e}),(await t.json()).workspaces}async function f5(){const e=Te("collaboration/topics"),t=await fetch(e);return await Ue(t,{url:e}),(await t.json()).topics}async function Fd(e){const t=Te(`collaboration/topics/${e}/messages?limit=100`),n=await fetch(t);return await Ue(n,{url:t}),(await n.json()).messages}async function UM(e){const t=Te("collaboration/topics"),n=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return await Ue(n,{method:"POST",url:t}),(await n.json()).topic}async function HM(e,t){const n=Te(`collaboration/topics/${e}`),a=await fetch(n,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return await Ue(a,{method:"PATCH",url:n}),(await a.json()).topic}async function $M(e,t){const n=Te(`collaboration/topics/${e}/archive`),a=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({expectedVersion:t})});return await Ue(a,{method:"POST",url:n}),(await a.json()).topic}async function FM(e){const t=Te(`conversations/${e}/read`),n=await fetch(t,{method:"POST"});await Ue(n,{method:"POST",url:t})}async function h5(){const e=Te("workspace-groups"),t=await fetch(e);return await Ue(t,{url:e}),(await t.json()).groups}async function PM(e){const t=Te("workspace-groups"),n=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:e})});return await Ue(n,{method:"POST",url:t}),(await n.json()).group}async function GM(e,t){const n=Te(`workspace-groups/${e}`),a=await fetch(n,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return await Ue(a,{method:"PATCH",url:n}),(await a.json()).group}async function VM(e){const t=Te(`workspace-groups/${e}`),n=await fetch(t,{method:"DELETE"});return await Ue(n,{method:"DELETE",url:t}),await n.json()}async function YM(){const e=Te("settings/environment"),t=await fetch(e);return await Ue(t,{url:e}),(await t.json()).variables}async function WM(e){const t=Te(`conversations/${e}/settings/environment`),n=await fetch(t);return await Ue(n,{url:t}),(await n.json()).variables}async function KM(e){const t=Te(`conversations/${e}/knowledge`),n=await fetch(t);return await Ue(n,{url:t}),(await n.json()).items}async function XM(){const e=Te("settings/model-providers"),t=await fetch(e);return await Ue(t,{url:e}),t.json()}async function QM(){const e=Te("settings/model-providers/options"),t=await fetch(e);return await Ue(t,{url:e}),t.json()}async function ZM(e){const t=Te(`settings/model-providers/${encodeURIComponent(e)}/balance`),n=await fetch(t);return await Ue(n,{url:t}),n.json()}async function JM(e){const t=Te("settings/model-providers"),n=await fetch(t,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return await Ue(n,{url:t,method:"PUT"}),n.json()}async function ez(){const e=Te("settings/runtime"),t=await fetch(e);return await Ue(t,{url:e}),(await t.json()).settings}async function tz(){const e=Te("settings/deployment"),t=await fetch(e);return await Ue(t,{url:e}),(await t.json()).settings}async function nz(){const e=Te("diagnostics"),t=await fetch(e);return await Ue(t,{url:e}),await t.json()}async function rz(){const e=Te("settings/runtime/codex"),t=await fetch(e);return await Ue(t,{url:e}),await t.json()}async function m5(){const e=Te("settings/runtime/accounts"),t=await fetch(e);await Ue(t,{url:e});const n=await t.json();return no(),n}async function up(e=!1){const t=Te(`settings/runtime/accounts/refresh${e?"?force=1":""}`),n=await fetch(t,{method:"POST"});await Ue(n,{method:"POST",url:t});const a=await n.json();return no(),a}async function az(e){const t=Te("settings/runtime/accounts"),n=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e})});await Ue(n,{method:"POST",url:t});const a=await n.json();return a.login.status==="succeeded"&&no(),a.login}async function iz(e){const t=Te(`settings/runtime/accounts/login/${e}`),n=await fetch(t);return await Ue(n,{url:t}),(await n.json()).login}async function lz(e){const t=Te(`settings/runtime/accounts/login/${e}/cancel`),n=await fetch(t,{method:"POST"});return await Ue(n,{method:"POST",url:t}),(await n.json()).login}async function sz(e,t,n){const a=Te(`settings/runtime/accounts/${e}`),l=await fetch(a,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:t,renewalDay:n})});await Ue(l,{method:"PATCH",url:a});const o=await l.json();return no(),o.account}async function oz(e){const t=Te(`settings/runtime/accounts/${e}`),n=await fetch(t,{method:"DELETE"});await Ue(n,{method:"DELETE",url:t}),no()}async function uz(e){const t=Te(`settings/runtime/accounts/${e}/switch`),n=await fetch(t,{method:"POST"});await Ue(n,{method:"POST",url:t});const a=await n.json();return no(),a}async function cz(e=!0){const t=Te(`settings/runtime/models?refresh=${e?"1":"0"}`),n=await fetch(t);return await Ue(n,{url:t}),await n.json()}async function dz(e=!1){const t=Te(`settings/runtime/codex/update${e?"?refreshLatest=1":""}`),n=await fetch(t);return await Ue(n,{url:t}),await n.json()}async function fz(){const e=Te("settings/runtime/codex/update"),t=await fetch(e,{method:"POST"});return await Ue(t,{method:"POST",url:e}),(await t.json()).job}async function hz(e){const t=Te(`conversations/${e}/settings/runtime`),n=await fetch(t);return await Ue(n,{url:t}),(await n.json()).settings}async function mz(){const e=Te("settings/memory"),t=await fetch(e);return await Ue(t,{url:e}),await t.json()}async function pz(e){const t=Te("settings/runtime"),n=await fetch(t,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return await Ue(n,{method:"PUT",url:t}),(await n.json()).settings}async function gz(e){const t=Te("settings/deployment"),n=await fetch(t,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return await Ue(n,{method:"PUT",url:t}),(await n.json()).settings}async function p5(e,t){const n=Te(`conversations/${e}/settings/runtime`),a=await fetch(n,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return await Ue(a,{method:"PUT",url:n}),await a.json()}async function g5(e,t){const n=Te(`conversations/${e}/runtime/reset`),a=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});await Ue(a,{method:"POST",url:n});const l=(await a.json()).job;return E7(e,l)}async function A7(e){const t=Te(`conversations/${e}/runtime/reset`),n=await fetch(t);return await Ue(n,{url:t}),(await n.json()).job}async function E7(e,t){let n=t;const a=Date.now()+1800*1e3;for(;n.status==="running";){if(Date.now()>=a)throw new Error("Full-history reset is still running after 30 minutes. Reopen Console to check the workspace before retrying.");await new Promise(o=>window.setTimeout(o,1e3));const l=await A7(e);if(!l||l.id!==n.id)throw new Error("The runtime reset job is no longer available.");n=l}if(n.status==="failed"||n.status==="cancelled"||!n.result)throw new Error(n.error??"Full-history reset failed.");return n.result}async function y5(e){const t=Te(`conversations/${e}/runtime/reset-preview`),n=await fetch(t);return await Ue(n,{url:t}),await n.json()}async function yz(e,t){const n=Te(`conversations/${e}/runtime/reset-selection`),a=await fetch(n,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});await Ue(a,{method:"PUT",url:n})}async function vz(e){const t=Te(`conversations/${e}/runtime/thread-read`),n=await fetch(t);return await Ue(n,{url:t}),(await n.json()).result}async function xz(e){const t=Te(`conversations/${e}/runtime/token-usage`),n=await fetch(t);await Ue(n,{url:t});const a=await n.json();return a.event?U7(a.event):null}async function bz(e){const t=Te(`conversations/${e}/runtime/additional-context`),n=await fetch(t);return await Ue(n,{url:t}),await n.json()}async function wz(e){const t=Te(`conversations/${e}/runtime/compactions`),n=await fetch(t);return await Ue(n,{url:t}),(await n.json()).compactions}function kz(e,t,n){return{modelSource:Gv(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:VA(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 Sz(e){return{kind:e.kind,name:e.name,description:e.description,purpose:e.purpose,attention:e.attention,refreshPolicy:e.refreshPolicy,status:e.status,sourceClues:jz(e.sourceCluesText),requiredEnv:Tz(e.requiredEnvText)}}function Cz(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 jz(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 Tz(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 v5(e,t){const n=x5(t.attention)-x5(e.attention);return n!==0?n:t.updatedAt.localeCompare(e.updatedAt)}function x5(e){return e==="watch"?2:e==="tracked"?1:0}function Vc(e){return e.map(t=>({key:t.key??"",value:t.value??"",updatedAt:t.updatedAt}))}function Az(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 Ez(e){return Vc(e).filter(t=>t.key.trim()&&t.value.trim()).map(t=>`${t.key.trim()}: ${t.value.trim()}`).join(`
|
|
387
|
-
`)}async function Nz(e){const t=Te("settings/memory"),n=await fetch(t,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return await Ue(n,{method:"PUT",url:t}),await n.json()}async function Mz(e,t,n){const a=Te("settings/environment"),l=await fetch(a,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({description:n,key:e,value:t})});return await Ue(l,{method:"PUT",url:a}),(await l.json()).variable}async function zz(e,t,n,a){const l=Te(`conversations/${e}/settings/environment`),o=await fetch(l,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({description:a,key:t,value:n})});return await Ue(o,{method:"PUT",url:l}),await o.json()}async function Dz(e){const t=Te(`settings/environment/${encodeURIComponent(e)}/reveal`),n=await fetch(t);return await Ue(n,{url:t}),(await n.json()).variable.value}async function Rz(e,t){const n=Te(`conversations/${e}/settings/environment/${encodeURIComponent(t)}/reveal`),a=await fetch(n);return await Ue(a,{url:n}),(await a.json()).variable.value}async function Oz(e){const t=Te(`settings/environment/${encodeURIComponent(e)}`),n=await fetch(t,{method:"DELETE"});await Ue(n,{method:"DELETE",url:t})}async function _z(e,t){const n=Te(`conversations/${e}/settings/environment/${encodeURIComponent(t)}`),a=await fetch(n,{method:"DELETE"});return await Ue(a,{method:"DELETE",url:n}),(await a.json()).conversation}async function Iz(e,t){const n=Te(`conversations/${e}/knowledge`),a=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return await Ue(a,{method:"POST",url:n}),(await a.json()).item}async function Bz(e,t,n){const a=Te(`conversations/${e}/knowledge/${encodeURIComponent(t)}`),l=await fetch(a,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});return await Ue(l,{method:"PATCH",url:a}),(await l.json()).item}async function Lz(e,t){const n=Te(`conversations/${e}/knowledge/${encodeURIComponent(t)}`),a=await fetch(n,{method:"DELETE"});await Ue(a,{method:"DELETE",url:n})}async function qz(){const e=Te("meta"),t=await fetch(e);return await Ue(t,{url:e}),await t.json()}async function Uz(e){const t=Te(`settings/runtime/rate-limits?refresh=${e?"1":"0"}`),n=await fetch(t);return await Ue(n,{url:t}),(await n.json()).usage??null}async function Hz(e,t){const n=Te("conversations"),a=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:e,groupId:t})});return await Ue(a,{method:"POST",url:n}),(await a.json()).conversation}async function $z(e){const t=Te(`conversations/${e}/complex-task`),n=await fetch(t);return await Ue(n,{url:t}),(await n.json()).task}async function Fz(e,t){const n=Te(`conversations/${e}/complex-tasks/${encodeURIComponent(t)}`),a=await fetch(n);return await Ue(a,{url:n}),(await a.json()).task}async function Pz(e,t){const n=Te(`conversations/${e}/complex-task/${t}`),a=await fetch(n,{method:"POST"});return await Ue(a,{method:"POST",url:n}),(await a.json()).task}async function Gz(e,t,n){const a=Te(`conversations/${e}/clone`),l=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:t,groupId:n})});return await Ue(l,{method:"POST",url:a}),await l.json()}async function Vz(e){const t=Te(`conversations/${e}/clone/retry`),n=await fetch(t,{method:"POST"});return await Ue(n,{method:"POST",url:t}),await n.json()}async function cp(e,t={}){const n=new URLSearchParams;n.set("limit",String(t.limit??Jv)),t.before&&n.set("before",t.before);const a=Te(`conversations/${e}?${n}`),l=await fetch(a);return await Ue(l,{url:a}),(await l.json()).conversation}async function Yz(e,t){const n=Te(`conversations/${e}/turns/${t}/history-events`),a=await fetch(n);return await Ue(a,{url:n}),(await a.json()).events}async function Pd(e,t){const n=Te(`conversations/${e}`),a=await fetch(n,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return await Ue(a,{method:"PATCH",url:n}),(await a.json()).conversation}async function Wz(e){const t=Te(`conversations/${e}`),n=await fetch(t,{method:"DELETE"});await Ue(n,{method:"DELETE",url:t})}function Kz(e){return e.title==="Phase boundary recommended"||e.title==="Long run in progress"}function N7(e){return e.length<=3?e.join(", "):`${e.slice(0,3).join(", ")} +${e.length-3}`}function Xz(e,t){if(e.event==="server.error"||e.event==="client.error")return{id:e.id,kind:"error",title:"Error",body:yD(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 o=Ee(e.data),c=Ve(o.toolCallId),f=typeof o.controlIndex=="number"?o.controlIndex:null;if(c||f!==null){const h=e.event==="server.collaboration.message_staged",m=e.event==="server.collaboration.message_sent",y=Ve(o.audience),v=Ve(o.recipientWorkspaceId),k=v?[v]:Array.isArray(o.recipientWorkspaceIds)?o.recipientWorkspaceIds.filter(U=>typeof U=="string"):Array.isArray(o.recipients)?o.recipients.filter(U=>typeof U=="string"):[],b=k.filter(U=>U!=="ALL").map(U=>t.get(U)).filter(U=>!!U);let T="Topic";b.length>0?T=N7(b):k.length===1?T=k[0]==="ALL"?"Topic participants":es(k[0]):k.length>1?T=`${k.length} workspaces`:y==="public"||y==="all"?T="Topic participants":y==="owner"&&(T="Topic owner");const N=Ve(o.topicId);return{id:e.id,kind:"collaboration",title:`Send to ${T}`,body:N?`Topic ${es(N)}`:"Topic",createdAt:e.createdAt??new Date().toISOString(),itemId:c||`legacy-topic-message:${f}`,meta:h?"pending send":m?"done":"failed",output:h||m?Ve(o.contentMarkdown)||void 0:Ve(o.reason)||void 0,topicAction:"send",topicRecipientLabel:T,topicMessageContent:(h||m)&&Ve(o.contentMarkdown)||void 0}}}if(e.event==="codex.input_request"||e.event==="codex.input_or_approval_request"){const o=Ee(e.data);if(e.event==="codex.input_request"||o.method==="item/tool/requestUserInput"){const c=Ee(o.params),h=(Array.isArray(c.questions)?c.questions:[]).map(m=>{const y=Ee(m),v=typeof y.question=="string"?y.question:"Please provide the missing information.",k=Array.isArray(y.options)?y.options.map(b=>{const T=Ee(b);return typeof T.label=="string"?`- ${T.label}${typeof T.description=="string"?`: ${T.description}`:""}`:""}).filter(Boolean).join(`
|
|
388
|
-
`):"";return k?`${v}
|
|
389
|
-
|
|
390
|
-
${k}`:v}).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 o=Ee(e.data);if(Ve(o.actionType)==="seele_workspace_change"){const f=Ee(o.payload),h=Ee(f.payload),m=Ve(f.type)||"workspace";return{id:e.id,kind:"workspaceChange",title:"Preparing workspace change",body:_7(m,h),createdAt:e.createdAt??new Date().toISOString(),itemId:Ve(o.toolCallId)||void 0,meta:"pending turn",workspaceChangeType:m,workspaceChangePayload:h}}const c=LA(o);return{id:e.id,kind:"activity",title:c.title,body:c.detail,createdAt:e.createdAt??new Date().toISOString(),itemId:Ve(o.toolCallId)||void 0,meta:c.meta}}if(e.event==="server.workspace_inbox.offered"){const o=BA(e.data);return{id:e.id,kind:"activity",title:o.title,body:o.detail,createdAt:e.createdAt??new Date().toISOString(),meta:o.meta}}if(e.event==="codex.dynamic_tool_request"){const o=Ee(e.data),c=Ee(o.params),f=Ve(c.tool)||"dynamic tool",h=Ee(c.arguments);return{id:e.id,kind:f==="seele_topics"?"collaboration":f==="seele_workspace_change"?"workspaceChange":"activity",title:R7(f,!1,h),body:O7(f,h),createdAt:e.createdAt??new Date().toISOString(),itemId:Ve(c.callId)||void 0,meta:"running",topicAction:f==="seele_topics"?M7(h.action):void 0,workspaceChangeType:f==="seele_workspace_change"&&Ve(h.type)||void 0,workspaceChangePayload:f==="seele_workspace_change"?Ee(h.payload):void 0}}if(e.event==="server.workspace_change.proposed"||e.event==="server.responsibility.proposed"){const o=Ee(e.data),c=Ee(o.payload),f=Ve(c.content)||Ve(o.responsibility);return{id:e.id,kind:"workspaceChange",title:"Workspace change proposed",body:f,createdAt:e.createdAt??new Date().toISOString(),itemId:Ve(o.toolCallId)||void 0,meta:"pending",responsibilityProposalId:String(e.id),workspaceChangeProposalId:String(e.id),responsibilityReason:typeof o.reason=="string"?o.reason:void 0,responsibilityAnchorOffset:typeof o.anchorOffset=="number"?o.anchorOffset:void 0,workspaceChangeType:Ve(o.changeType)||"responsibility",workspaceChangePayload:Object.keys(c).length>0?c:{content:f}}}if(e.event==="server.knowledge.proposed"){const o=Ee(e.data),c=Ee(o.knowledge);return{id:e.id,kind:"knowledge",title:o.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 o.anchorOffset=="number"?o.anchorOffset:void 0}}if(e.event==="server.complex_task.plan_updated"){const o=Ee(e.data),c=Ee(o.task),f=Ee(c.currentPlan),h=Ee(o.update),m=Ve(h.operation),y=typeof f.version=="number"?`v${f.version}`:"updated",v=typeof h.changeCount=="number"?h.changeCount:1;return{id:e.id,kind:"file",title:m==="edit"?"Plan updated":"Plan rewritten",body:`${v} change${v===1?"":"s"}`,createdAt:e.createdAt??new Date().toISOString(),linkedTaskId:Ve(c.id)||void 0,meta:y}}if(e.event==="server.complex_task.plan_update_failed"){const o=Ee(e.data);return{id:e.id,kind:"error",title:"Plan update failed",body:Ve(o.reason)||"The proposed Plan change could not be applied.",createdAt:e.createdAt??new Date().toISOString(),meta:"not applied"}}if(e.event==="runtime.command.started"||e.event==="runtime.command.completed"){const o=Ee(e.data),c=e.event==="runtime.command.completed",f=typeof o.exitCode=="number"?o.exitCode:null;return{id:e.id,kind:"command",title:c?f!==null&&f!==0?"Command failed":"Command completed":"Seele ran command",body:typeof o.command=="string"?Xd(o.command):"command",createdAt:e.createdAt??new Date().toISOString(),itemId:typeof o.itemId=="string"?o.itemId:void 0,meta:c?f!==null?`exit ${f}`:"done":"running",output:c&&typeof o.output=="string"&&o.output?o.output:void 0}}if(e.event==="runtime.compaction.started"||e.event==="runtime.compaction.completed"){const o=Ee(e.data),c=e.event==="runtime.compaction.completed";return{id:e.id,kind:"activity",title:c?"Context compacted":"Compacting context",body:e1(o,c),createdAt:e.createdAt??new Date().toISOString(),itemId:typeof o.itemId=="string"?o.itemId:void 0,meta:c?"done":"running"}}if(e.event==="codex.server_request"){const o=Ee(e.data);if(o.method==="item/commandExecution/requestApproval"){const c=gD(o.requestId),f=Ee(o.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=Ee(e.data),a=n.method,l=Ee(n.params);if(a==="item/started"){const o=Ee(l.item);if(o.type==="commandExecution"){const f=o.status==="inProgress"&&o.processId===null;return{id:e.id,kind:"command",title:f?"Command waiting for approval":"Seele ran command",body:Xd(o.command),createdAt:e.createdAt??new Date().toISOString(),itemId:typeof o.id=="string"?o.id:void 0,meta:f?"approval":"running"}}const c=Vp(o);if(c.length>0)return{id:e.id,kind:"file",title:"File change",body:c[0].path,createdAt:e.createdAt??new Date().toISOString(),itemId:Ve(o.id)||void 0,meta:"started",fileChanges:c}}if(a==="item/completed"){const o=Ee(l.item);if(o.type==="commandExecution"){const f=typeof o.exitCode=="number"?o.exitCode:null;return{id:e.id,kind:"command",title:f!==null&&f!==0?"Command failed":"Command completed",body:Xd(o.command),createdAt:e.createdAt??new Date().toISOString(),itemId:typeof o.id=="string"?o.id:void 0,meta:f!==null?`exit ${f}`:"done",outputKind:"complete",output:typeof o.aggregatedOutput=="string"&&o.aggregatedOutput?o.aggregatedOutput:void 0}}const c=Vp(o);if(c.length>0)return{id:e.id,kind:"file",title:"File changed",body:c[0].path,createdAt:e.createdAt??new Date().toISOString(),itemId:Ve(o.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 Qz(e){if(e.event!=="codex.notification")return null;const t=Ee(e.data),n=t.method;if(n!=="item/started"&&n!=="item/completed")return null;const a=Ee(t.params),l=Ee(a.item),o=typeof l.type=="string"?l.type:"item";if(D7(o)||$7(l))return null;const c=n==="item/completed",f=Ee(l.arguments),h=o==="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?R7(h,c,f):c?`Finished ${Jl(o)}`:`Working on ${Jl(o)}`,body:h?O7(h,f):I7(l,o),createdAt:e.createdAt??new Date().toISOString(),itemId:typeof l.id=="string"?l.id:void 0,meta:h==="seele_wakeup"&&c?"after turn":c?Jz(l):"running",topicAction:h==="seele_topics"?M7(f.action):void 0,workspaceChangeType:h==="seele_workspace_change"&&Ve(f.type)||void 0,workspaceChangePayload:h==="seele_workspace_change"?Ee(f.payload):void 0}}function M7(e){return e==="read"||e==="history"||e==="send"?e:void 0}function Zz(e){if(q7(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=IA(e);return t?{id:e.id,kind:"activity",title:L7(t),body:z7(e.data),createdAt:e.createdAt??new Date().toISOString(),meta:"event"}:null}function z7(e){const t=Ee(e);for(const n of["title","message","description","status","reason"])if(typeof t[n]=="string"&&t[n].trim())return B7(t[n].trim(),180);return"Event details are available"}function D7(e){return["agentMessage","assistantMessage","commandExecution","message","reasoning","plan","systemMessage","userMessage"].includes(e)}function Jz(e){return e.status==="failed"||e.status==="error"?"failed":e.status==="cancelled"||e.status==="canceled"?"stopped":"done"}function Jl(e){return e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/[-_]+/g," ").toLowerCase()}function R7(e,t,n){if(e==="seele_topics")switch(Ve(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=Ve(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=Jl(e);return t?`Finished ${a}`:`Running ${a}`}function O7(e,t){if(e==="seele_topics"){const n=Ve(t.topicId);return n?`Topic ${es(n)}`:"Topic"}if(e==="seele_wakeup")return Ve(t.instruction)||(Ve(t.action)==="cancel"?"Cancel the current wakeup":"Schedule the current wakeup");if(e==="seele_workspace_change"){const n=Ve(t.type)||"workspace";return _7(n,Ee(t.payload))}return Jl(e)}function _7(e,t){return e==="responsibility"?Ve(t.content)||"Workspace responsibility":JSON.stringify(t,null,2)}function I7(e,t){for(const n of["title","name","description","text","summary"])if(typeof e[n]=="string"&&e[n].trim())return iu(e[n].trim(),160);return typeof e.id=="string"?`${Jl(t)} ${es(e.id)}`:Jl(t)}function eD(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 tD(e,t){return t==="running"?"running":t==="approval"?"approval":t==="stopped"?"stopped":t==="failed"?e.meta??"failed":"ok"}function nD(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 rD(e,t){const n=e.split(/\r?\n/),l=n.slice(0,t).join(`
|
|
393
|
-
`);return n.length>t?`${l}
|
|
394
|
-
...`:l}function aD(e,t){return e?e.split(/\r?\n/).filter(n=>n.trim()).length>t:!1}function ff(e){return/^call_[A-Za-z0-9]+$/.test(e)||e==="command"}function iD(e){const t=e.trim();return!t||t.includes(`
|
|
395
|
-
`)?null:iu(t,120)}function iu(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 B7(e,t){return e.length<=t?e:`${e.slice(0,Math.max(1,t-3))}...`}function L7(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 q7(e){const t=e.createdAt??new Date().toISOString();if(e.event==="server.status"){const o=Ee(e.data);if(o.status==="initialized")return{id:e.id,title:"Connected to Seele runtime",createdAt:t,tone:"done"};if(o.status==="turn_started")return{id:e.id,title:"Turn started",createdAt:t,tone:"running"};if(o.status==="archived_thread_replaced")return{id:e.id,title:"Started a fresh runtime thread",detail:typeof o.archivedThreadId=="string"?`archived ${es(o.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 o=Ee(e.data);return{id:e.id,title:"Codex compacting context",detail:e1(o,!1),createdAt:t,tone:"running"}}if(e.event==="runtime.compaction.completed"){const o=Ee(e.data);return{id:e.id,title:"Codex context compacted",detail:e1(o,!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 o=Ee(e.data);return{id:e.id,title:"Phase boundary recommended",detail:typeof o.operationCount=="number"?`${o.operationCount} operations in this turn`:"Many operations in this turn",createdAt:t,tone:"warning"}}if(e.event==="server.wakeup.started"){const o=Ee(e.data);return{id:e.id,title:"Scheduled wakeup resumed",detail:typeof o.instruction=="string"?iu(o.instruction,96):void 0,createdAt:t,tone:"running"}}if(e.event==="codex.server_request"){const o=Ee(e.data);if(o.method==="item/commandExecution/requestApproval"){const c=Ee(o.params);return{id:e.id,title:"Waiting for approval",detail:typeof c.command=="string"?iu(c.command,96):"Command needs confirmation",createdAt:t,tone:"warning"}}}if(e.event!=="codex.notification")return null;const n=Ee(e.data),a=n.method,l=Ee(n.params);if(a==="item/started"||a==="item/completed"){const o=Ee(l.item),c=typeof o.type=="string"?o.type:"item",f=a==="item/completed";if(c==="commandExecution")return{id:e.id,title:f?"Command completed":"Running command",detail:iu(Xd(o.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=$7(o);if(h)return{id:e.id,title:f?"File update finished":"Editing file",detail:iu(h,96),createdAt:t,tone:f?"done":"running"};if(!D7(c))return{id:e.id,title:f?`Finished ${Jl(c)}`:`Working on ${Jl(c)}`,detail:I7(o,c),createdAt:t,tone:f?"done":"running"}}if(a==="thread/status/changed"){const o=Ee(l.status),c=Array.isArray(o.activeFlags)?o.activeFlags:[];if(o.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 o=Ee(l.turn);return{id:e.id,title:"Turn completed",detail:typeof o.durationMs=="number"?fu(o.durationMs):void 0,createdAt:t,tone:"done"}}if(a==="hook/started"||a==="hook/completed"){const o=Ee(l.run),c=typeof o.eventName=="string"?o.eventName:"hook";return{id:e.id,title:a==="hook/started"?`Running ${w5(c)}`:`Finished ${w5(c)}`,detail:typeof o.durationMs=="number"?fu(o.durationMs):void 0,createdAt:t,tone:a==="hook/started"?"running":"done"}}return null}function e1(e,t){const n=hf(e.before),a=hf(e.after),l=[];if(t){const o=typeof e.durationMs=="number"?e.durationMs:null;l.push(o===null?"Completed":`Completed in ${fu(o)}`)}else l.push("Codex triggered");if(n&&a){l.push(`context ${Vs(n)} → ${Vs(a)}`);const o=n.totalTokens-a.totalTokens;o>0&&l.push(`released ~${K1(o)} tokens`)}else n&&l.push(`context ${Vs(n)}`);return l.join(" · ")}function lD(e){const t=hf(e.before),n=hf(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":fu(e.durationMs)},{label:"Context",value:l},{label:"Released",value:a===null?"Unavailable":a>0?`~${K1(a)} tokens`:"No decrease observed"}]}function hf(e){const t=Ee(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)}%`:`${K1(e.totalTokens)} tokens`}function K1(e){return new Intl.NumberFormat("en",{notation:"compact",maximumFractionDigits:1}).format(Math.max(0,e))}function sD(e){let t=null;for(const n of e)for(const a of n.events){const l=cD(a);l&&(!t||Date.parse(l.updatedAt)>Date.parse(t.updatedAt))&&(t=l)}return t}function b5(...e){return e.reduce((t,n)=>n&&(!t||Date.parse(n.updatedAt)>Date.parse(t.updatedAt))?n:t,null)}function oD(e){let t=null;for(const n of e){const a=U7(n);a&&(!t||Gc(n,t)>0)&&(t=a)}return t}function U7(e){if(e.event!=="codex.notification")return null;const t=Ee(e.data);if(t.method!=="thread/tokenUsage/updated")return null;const n=Ee(t.params),a=Ee(n.tokenUsage),l=Ee(a.last),o=Ee(a.total),c=Object.keys(l).length>0?l:o,f=na(c.totalTokens);return f===null?null:{totalTokens:f,inputTokens:na(c.inputTokens),cachedInputTokens:na(c.cachedInputTokens),outputTokens:na(c.outputTokens),reasoningOutputTokens:na(c.reasoningOutputTokens),modelContextWindow:na(a.modelContextWindow),createdAt:e.createdAt??new Date().toISOString()}}function uD(...e){return e.reduce((t,n)=>n&&(!t||Date.parse(n.createdAt)>Date.parse(t.createdAt))?n:t,null)}function H7(e){return e!=null&&e.modelContextWindow&&e.modelContextWindow>0?e.totalTokens/e.modelContextWindow*100:null}function cD(e){if(e.event!=="codex.notification")return null;const t=Ee(e.data);if(t.method!=="account/rateLimits/updated")return null;const n=Ee(t.params),a=Ee(n.rateLimits),l=[a.primary,a.secondary].map(o=>dD(o)).filter(o=>o!==null);return l.length===0?null:{windows:l,updatedAt:e.createdAt??new Date().toISOString()}}function dD(e){const t=Ee(e);return typeof t.usedPercent!="number"||typeof t.resetsAt!="number"||typeof t.windowDurationMins!="number"?null:{usedPercent:t.usedPercent,resetsAt:t.resetsAt,windowDurationMins:t.windowDurationMins}}function fD(e,t){return e?!t||e===t?e:t.startsWith(e)?t:`${e}${t}`:t}function Xd(e){return typeof e=="string"?e:Array.isArray(e)?e.map(t=>String(t)).join(" "):"command"}function $7(e){var n;const t=e.path??e.file??e.filename;return typeof t=="string"?t:((n=Vp(e)[0])==null?void 0:n.path)??null}function Ee(e){return e&&typeof e=="object"?e:{}}function na(e){return typeof e=="number"&&Number.isFinite(e)?e:null}function Ve(e){return typeof e=="string"?e:""}function Ys(e){return e.replace(/([\\`*_[\]<>])/g,"\\$1")}function hD(e){const t=Ee(e),n=Ee(t.thread);if(!Object.keys(n).length)return null;const a=Array.isArray(n.turns)?n.turns:[],l=[];let o=0,c=0,f=0,h=0,m=0;return a.forEach((y,v)=>{const k=Ee(y),b=Ve(k.id)||`turn-${v+1}`,T=Array.isArray(k.items)?k.items:[];o+=T.length,l.push(mD(k,b)),T.forEach(N=>{const U=Ee(N),D=Ve(U.type);D==="userMessage"?c+=1:D==="agentMessage"?f+=1:D==="compaction"?h+=1:D==="contextCompaction"&&(m+=1)})}),{id:Ve(n.id),sessionId:Ve(n.sessionId),status:F7(n.status),source:X1(n.source),cwd:Ve(n.cwd),path:Ve(n.path),preview:Ve(n.preview),createdAt:na(n.createdAt),updatedAt:na(n.updatedAt),recencyAt:na(n.recencyAt),turnCount:a.length,itemCount:o,userMessageCount:c,agentMessageCount:f,compactionCount:h,contextCompactionCount:m,turns:l}}function mD(e,t){const n=Array.isArray(e.items)?e.items:[],a=Array.from(new Set(n.map(o=>Ve(Ee(o).type)).filter(o=>o.length>0))).join(", "),l=pD(n.map(o=>t1(o)).filter(Boolean).join(" "),220);return{id:t,status:F7(e.status),itemsView:Ve(e.itemsView)||"unknown",itemCount:n.length,startedAt:na(e.startedAt),completedAt:na(e.completedAt),durationMs:na(e.durationMs),itemTypes:a,preview:l,raw:e}}function t1(e){if(typeof e=="string")return e;if(Array.isArray(e))return e.map(t1).filter(Boolean).join(`
|
|
396
|
-
`);if(!e||typeof e!="object")return"";const t=e,n=Ve(t.text),a=t1(t.content);return[n,a].filter(Boolean).join(`
|
|
397
|
-
`)}function F7(e){const t=Ee(e);return Ve(t.type)||X1(e)}function pD(e,t){const n=e.replace(/\s+/g," ").trim();return n.length>t?`${n.slice(0,t)}...`:n}function Dc(e){return e===null?"unknown":ut(e*1e3)}function gD(e){return typeof e=="number"&&Number.isFinite(e)||typeof e=="string"&&e.trim()?e:null}function X1(e){if(typeof e=="string")return e;const t=JSON.stringify(e);return t.length>180?`${t.slice(0,180)}...`:t}function yD(e){if(typeof e=="string")return e;const t=Ee(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||X1(e)}function w5(e){return e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/[-_]+/g," ").toLowerCase()}function fu(e){return e<1e3?`${e}ms`:`${(e/1e3).toFixed(e<1e4?1:0)}s`}function dp(e){if(e<6e4)return fu(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 P7(e){return`${Math.round(e)}%`}function Cr(e){return new Intl.NumberFormat("en-US").format(e)}function Qd(e){return e===null?"unknown":Cr(e)}function _f(e){return Math.max(0,Math.min(100,Math.round(e)))}function Q1(e){return e>=100?"exhausted":e>=90?"danger":e>=75?"warning":"healthy"}function G7(e){return ut(e*1e3)}function ut(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=o=>{var c;return((c=a.find(f=>f.type===o))==null?void 0:c.value)??""};return`${l("month")}/${l("day")} ${l("hour")}:${l("minute")}:${l("second")}`}function Yc(e){const t=ut(e);return t?`${t} UTC+08:00`:""}function vD(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 k5(e,t){const n=Zd(e,t);return n?`${n.displayName}${n.isDefault?" (default)":""}`:e||"Unavailable"}function Zd(e,t){return e?t.find(n=>n.model===e)??null:t.find(n=>n.isDefault)??t[0]??null}function If(e){return e?e.replace(/^codex-cli\s+/i,""):"Unavailable"}function n1(e,t){const n=If(e);return t?`${n} (${ut(t)})`:n}function xD(e){return`https://github.com/openai/codex/releases/tag/rust-v${encodeURIComponent(If(e))}`}function bD(e,t){const n=S5(e),a=S5(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 S5(e){if(!e)return null;const t=If(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 wD(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 C5(e,t){const n=e.getReader(),a=new TextDecoder;let l="";for(;;){const{done:o,value:c}=await n.read();if(o)break;l+=a.decode(c,{stream:!0});const f=l.split(`
|
|
400
|
-
|
|
401
|
-
`);l=f.pop()??"";for(const h of f){const m=kD(h);m&&t(m)}}}function kD(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),o=a.join(`
|
|
403
|
-
`);try{return{event:l,data:JSON.parse(o)}}catch{return{event:l,data:o}}}function SD(e){var a,l,o,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":((o=t.params)==null?void 0:o.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 CD(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 jD(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 Gd(e){var n,a,l,o;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"?(o=(l=t.params)==null?void 0:l.turn)!=null&&o.error?"error":"done":null}function su(e){return e.length<=6?e:e.slice(0,6)}function es(e){return e.slice(0,8)}function fp(e){switch(e){case"danger-full-access":return"System";case"workspace-write":return"Workspace";case"read-only":return"Read only"}}function j5(e){return{discussing:"Planning",ready:"Planning",active:"Running",paused:"Paused",waiting:"Waiting",replanning:"Planning",blocked:"Blocked",completed:"Completed",cancelled:"Cancelled"}[e]}function hp(e,...t){return t.includes(e)}function TD(e,t){const n=Date.parse(e.startedAt??e.createdAt),a=e.finishedAt?Date.parse(e.finishedAt):t;if(!Number.isFinite(n)||!Number.isFinite(a))return"";const l=Math.max(0,Math.floor((a-n)/1e3));if(l<60)return`${l}s`;const o=Math.floor(l/60);return o<60?`${o}m`:`${Math.floor(o/60)}h ${o%60}m`}function AD(e,t){const n=Date.parse(e),a=Date.parse(t);if(!Number.isFinite(n)||!Number.isFinite(a))return"Goal completed";const l=Math.max(0,Math.floor((a-n)/1e3));if(l<60)return`${l}s`;const o=Math.floor(l/60);return o<60?`${o}m`:`${Math.floor(o/60)}h ${o%60}m`}function r1(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 ED(e,t){return`waiting ${mf(e,t)}`}function mf(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 o=Math.ceil(l/60);return o<24?`${o}h`:`${Math.ceil(o/24)}d`}function Jd(e,t=null,n=Date.now()){if(e==="waiting")return t?ED(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 T5(e){switch(e){case"checking":return"backend checking";case"connected":return"backend connected";case"error":return"backend unavailable"}}function ND(e){return e==="assistant"?"Seele":"You"}const MD=document.getElementById("root"),V7=window.__seeleCodexRoot??vb.createRoot(MD);window.__seeleCodexRoot=V7;qD();V7.render(u.jsx(B.StrictMode,{children:u.jsx(zD,{})}));function zD(){const[e,t]=B.useState(null),[n,a]=B.useState(null),[l,o]=B.useState(""),[c,f]=B.useState(""),[h,m]=B.useState("admin"),[y,v]=B.useState(""),[k,b]=B.useState(!1),[T,N]=B.useState("");B.useEffect(()=>{let M=!1,L=0;const G=async()=>{try{const te=await A5();if(M)return;t(te),f("")}catch{if(M)return;f("Reconnecting to Seele..."),L=window.setTimeout(G,2e3)}};return G(),()=>{M=!0,window.clearTimeout(L)}},[]),B.useEffect(()=>{let M=!1,L=0;const G=async()=>{try{const _=await Y7();if(M)return;a(_),o(""),L=window.setTimeout(G,_.status==="authorized"&&_.configurationReady&&_.codexAccountsReady?3e4:3e3)}catch{if(M)return;o("Unable to reach Seele."),L=window.setTimeout(G,3e3)}},te=()=>{window.clearTimeout(L),G()};return window.addEventListener(Xp,te),G(),()=>{M=!0,window.clearTimeout(L),window.removeEventListener(Xp,te)}},[]),B.useEffect(()=>{const M=()=>{t({enabled:!0,authenticated:!1,user:null}),v(""),N("Your session has expired. Sign in again.")};return window.addEventListener(Kp,M),()=>window.removeEventListener(Kp,M)},[]);async function U(M){M.preventDefault(),b(!0),N("");try{const L=await fetch(Te("auth/login"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:h,password:y})});if(!L.ok){N(L.status===401?"Incorrect username or password.":L.status===429?"Too many failed attempts. Try again later.":"Login failed.");return}v(""),t(await A5())}catch{N("Unable to reach Seele.")}finally{b(!1)}}async function D(){await fetch(Te("auth/logout"),{method:"POST"}).catch(()=>{}),t({enabled:!0,authenticated:!1,user:null})}if(n&&XA(n))return u.jsx(DD,{authorization:n});if(!e||!n)return u.jsx("main",{className:"auth-shell",children:u.jsx("span",{className:"auth-loading",children:l||c||"Loading Seele..."})});if(!e.enabled||e.authenticated){const M=e.user??{id:"local-admin",username:"admin",role:"admin",active:!0,createdAt:"",updatedAt:""};return u.jsx($E,{authEnabled:e.enabled,currentUser:M,deploymentId:n.deploymentId,onLogout:D},`${n.deploymentId}:${M.id}`)}return u.jsx("main",{className:"auth-shell",children:u.jsxs("section",{className:"auth-panel",children:[u.jsxs("header",{children:[u.jsx("p",{children:"Seele"}),u.jsx("h1",{children:"Sign in"})]}),u.jsxs("form",{onSubmit:U,children:[u.jsxs("label",{children:[u.jsx("span",{children:"Username"}),u.jsx("input",{autoComplete:"username",autoFocus:!0,onChange:M=>m(M.target.value),value:h})]}),u.jsxs("label",{children:[u.jsx("span",{children:"Password"}),u.jsx("input",{autoComplete:"current-password",onChange:M=>v(M.target.value),type:"password",value:y})]}),T?u.jsx("p",{className:"auth-error",role:"alert",children:T}):null,u.jsx("button",{disabled:k||!h||!y,type:"submit",children:k?"Signing in...":"Sign in"})]})]})})}function DD({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 u.jsx("main",{className:"deployment-shell",children:u.jsxs("section",{className:"deployment-panel deployment-waiting-panel",children:[u.jsx("div",{className:`deployment-status-mark is-${e.status}`,"aria-hidden":"true"}),u.jsx("p",{className:"deployment-kicker",children:"Seele deployment"}),u.jsx("h1",{children:n.title}),u.jsx("p",{className:"deployment-lead",children:n.body}),u.jsxs("dl",{className:"deployment-facts",children:[u.jsxs("div",{children:[u.jsx("dt",{children:"Deployment ID"}),u.jsx("dd",{children:u.jsx("code",{children:e.deploymentId})})]}),u.jsxs("div",{children:[u.jsx("dt",{children:"Name"}),u.jsx("dd",{children:e.name})]}),u.jsxs("div",{children:[u.jsx("dt",{children:"Cloud"}),u.jsx("dd",{children:e.cloudUrl})]}),u.jsxs("div",{children:[u.jsx("dt",{children:"Last checked"}),u.jsx("dd",{children:e.lastCheckedAt?OD(e.lastCheckedAt):"Starting"})]}),u.jsxs("div",{children:[u.jsx("dt",{children:"Global revision"}),u.jsxs("dd",{children:[e.appliedGlobalRevision," / ",e.requiredGlobalRevision]})]}),u.jsxs("div",{children:[u.jsx("dt",{children:"Codex account revision"}),u.jsxs("dd",{children:[e.appliedCodexAccountRevision," / ",e.requiredCodexAccountRevision]})]})]}),e.lastError||e.configurationError||e.codexAccountError?u.jsx("p",{className:"deployment-error",role:"alert",children:e.lastError||e.configurationError||e.codexAccountError}):null,u.jsx("a",{className:"deployment-primary-link",href:RD(e.cloudUrl),children:"Open cloud deployment management"}),u.jsx("p",{className:"deployment-retry-note",children:"Authorization is checked automatically."})]})})}function RD(e){return`${e.replace(/\/+$/,"")}/admin/deployments`}function OD(e){const t=Date.parse(e);return Number.isNaN(t)?e:new Date(t).toLocaleString()}async function Y7(){const e=await fetch(Te("deployment/authorization"));if(!e.ok)throw new Error(`Deployment authorization request failed: ${e.status}`);return e.json()}async function A5(){const e=await fetch(Te("auth/session"));if(!e.ok)throw new Error(`Auth session request failed: ${e.status}`);return e.json()}async function _D(){const e=Te("admin/users"),t=await fetch(e);if(!t.ok)throw await Gn(t,{url:e});return(await t.json()).users}async function ID(e){const t=Te("admin/users"),n=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!n.ok)throw await Gn(n,{method:"POST",url:t});return(await n.json()).user}async function BD(e,t){const n=Te(`admin/users/${encodeURIComponent(e)}`),a=await fetch(n,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok)throw await Gn(a,{method:"PATCH",url:n});return(await a.json()).user}async function LD(e){const t=Te(`admin/users/${encodeURIComponent(e)}`),n=await fetch(t,{method:"DELETE"});if(!n.ok)throw await Gn(n,{method:"DELETE",url:t})}function qD(){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(o=>o&&typeof o=="object"&&"error"in o?o.error:void 0).catch(()=>{});QA(n.status,l,a.includes("/api/auth/"))==="reauthenticate"&&window.dispatchEvent(new Event(Kp))}return n.status===503&&a.includes("/api/")&&no(),n},window.__seeleAuthFetchInstalled=!0}function no(){window.dispatchEvent(new Event(Xp))}export{rn as _,xb as a,Rb as b,My as c,I5 as f,E5 as g,B5 as h,HD as k,pf as s,Cb as w};
|