@semiont/cli 0.5.1 → 0.5.2
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/dist/cli.mjs +234 -134
- package/dist/frontend/dist/assets/{CookiePreferences-D5wgmVC7.js → CookiePreferences-5feiOAX4.js} +2 -2
- package/dist/frontend/dist/assets/{CookiePreferences-D5wgmVC7.js.map → CookiePreferences-5feiOAX4.js.map} +1 -1
- package/dist/frontend/dist/assets/{PdfAnnotationCanvas.client-5QESNO5H-B7UjwjIX.js → PdfAnnotationCanvas.client-5QESNO5H-Cxm4Es_X.js} +2 -2
- package/dist/frontend/dist/assets/{PdfAnnotationCanvas.client-5QESNO5H-B7UjwjIX.js.map → PdfAnnotationCanvas.client-5QESNO5H-Cxm4Es_X.js.map} +1 -1
- package/dist/frontend/dist/assets/ToolbarPanels-D5L18Wxk.js +2 -0
- package/dist/frontend/dist/assets/ToolbarPanels-D5L18Wxk.js.map +1 -0
- package/dist/frontend/dist/assets/client-BmABw25x.js +2 -0
- package/dist/frontend/dist/assets/client-BmABw25x.js.map +1 -0
- package/dist/frontend/dist/assets/client-CTyYgbIC.js +2 -0
- package/dist/frontend/dist/assets/client-CTyYgbIC.js.map +1 -0
- package/dist/frontend/dist/assets/client-Cjf1Te8y.js +2 -0
- package/dist/frontend/dist/assets/client-Cjf1Te8y.js.map +1 -0
- package/dist/frontend/dist/assets/client-D7w_vlsg.js +2 -0
- package/dist/frontend/dist/assets/client-D7w_vlsg.js.map +1 -0
- package/dist/frontend/dist/assets/index-BVOR3arc.js +169 -0
- package/dist/frontend/dist/assets/index-BVOR3arc.js.map +1 -0
- package/dist/frontend/dist/assets/{layout-BNfHKiGS.js → layout-B1HJjFMW.js} +2 -2
- package/dist/frontend/dist/assets/layout-B1HJjFMW.js.map +1 -0
- package/dist/frontend/dist/assets/layout-B7mIcfJU.js +2 -0
- package/dist/frontend/dist/assets/layout-B7mIcfJU.js.map +1 -0
- package/dist/frontend/dist/assets/{layout-G6HeeKIH.js → layout-BK6OF3Hx.js} +2 -2
- package/dist/frontend/dist/assets/{layout-G6HeeKIH.js.map → layout-BK6OF3Hx.js.map} +1 -1
- package/dist/frontend/dist/assets/{layout-Delbhxmy.js → layout-Cw-T4GPy.js} +2 -2
- package/dist/frontend/dist/assets/{layout-Delbhxmy.js.map → layout-Cw-T4GPy.js.map} +1 -1
- package/dist/frontend/dist/assets/{not-found-CtwZrTVU.js → not-found-uRBdv-bF.js} +2 -2
- package/dist/frontend/dist/assets/{not-found-CtwZrTVU.js.map → not-found-uRBdv-bF.js.map} +1 -1
- package/dist/frontend/dist/assets/{page-DSW3JQF2.js → page-5wC1as95.js} +2 -2
- package/dist/frontend/dist/assets/{page-DSW3JQF2.js.map → page-5wC1as95.js.map} +1 -1
- package/dist/frontend/dist/assets/{page-VPeYeXi6.js → page-B6XEk2Ue.js} +2 -2
- package/dist/frontend/dist/assets/{page-VPeYeXi6.js.map → page-B6XEk2Ue.js.map} +1 -1
- package/dist/frontend/dist/assets/{page-CkiQdVlI.js → page-BLt9SJto.js} +2 -2
- package/dist/frontend/dist/assets/page-BLt9SJto.js.map +1 -0
- package/dist/frontend/dist/assets/{page-DBlue8Rh.js → page-BNaAGnc3.js} +2 -2
- package/dist/frontend/dist/assets/{page-DBlue8Rh.js.map → page-BNaAGnc3.js.map} +1 -1
- package/dist/frontend/dist/assets/{page-CjI_QXry.js → page-Bcljtfsa.js} +2 -2
- package/dist/frontend/dist/assets/{page-CjI_QXry.js.map → page-Bcljtfsa.js.map} +1 -1
- package/dist/frontend/dist/assets/{page-DBYS9qIU.js → page-Bf4MMijQ.js} +2 -2
- package/dist/frontend/dist/assets/{page-DBYS9qIU.js.map → page-Bf4MMijQ.js.map} +1 -1
- package/dist/frontend/dist/assets/page-BlU7QK_-.js +2 -0
- package/dist/frontend/dist/assets/page-BlU7QK_-.js.map +1 -0
- package/dist/frontend/dist/assets/{page-CI8oLbhf.js → page-Bnawjb1Y.js} +2 -2
- package/dist/frontend/dist/assets/{page-CI8oLbhf.js.map → page-Bnawjb1Y.js.map} +1 -1
- package/dist/frontend/dist/assets/page-C7vfVcap.js +2 -0
- package/dist/frontend/dist/assets/{page-DU909Np3.js.map → page-C7vfVcap.js.map} +1 -1
- package/dist/frontend/dist/assets/page-CBL0MuAo.js +2 -0
- package/dist/frontend/dist/assets/page-CBL0MuAo.js.map +1 -0
- package/dist/frontend/dist/assets/page-CKCKmPQO.js +2 -0
- package/dist/frontend/dist/assets/page-CKCKmPQO.js.map +1 -0
- package/dist/frontend/dist/assets/page-CdqGKYBH.js +2 -0
- package/dist/frontend/dist/assets/page-CdqGKYBH.js.map +1 -0
- package/dist/frontend/dist/assets/{page-Bb5SB6_Q.js → page-CfMLSllg.js} +2 -2
- package/dist/frontend/dist/assets/{page-Bb5SB6_Q.js.map → page-CfMLSllg.js.map} +1 -1
- package/dist/frontend/dist/assets/{page-C_fIdKsk.js → page-D7w7NNd7.js} +2 -2
- package/dist/frontend/dist/assets/{page-C_fIdKsk.js.map → page-D7w7NNd7.js.map} +1 -1
- package/dist/frontend/dist/assets/{page-kVSb0jfm.js → page-DAH06BM4.js} +2 -2
- package/dist/frontend/dist/assets/{page-kVSb0jfm.js.map → page-DAH06BM4.js.map} +1 -1
- package/dist/frontend/dist/assets/page-Dgqi9Orl.js +2 -0
- package/dist/frontend/dist/assets/page-Dgqi9Orl.js.map +1 -0
- package/dist/frontend/dist/assets/{page-RgfG8Fre.js → page-SrDV7XYv.js} +2 -2
- package/dist/frontend/dist/assets/{page-RgfG8Fre.js.map → page-SrDV7XYv.js.map} +1 -1
- package/dist/frontend/dist/assets/{page-D_6K1M4j.js → page-wxqWVnqc.js} +2 -2
- package/dist/frontend/dist/assets/page-wxqWVnqc.js.map +1 -0
- package/dist/frontend/dist/assets/{privacy-NaGU1hj4.js → privacy-Kk_oWnpO.js} +2 -2
- package/dist/frontend/dist/assets/{privacy-NaGU1hj4.js.map → privacy-Kk_oWnpO.js.map} +1 -1
- package/dist/frontend/dist/assets/{routing-o1npPvOW.js → routing-CGghUc0N.js} +2 -2
- package/dist/frontend/dist/assets/{routing-o1npPvOW.js.map → routing-CGghUc0N.js.map} +1 -1
- package/dist/frontend/dist/assets/{routing-BybXhU8X.js → routing-CKNCPdYO.js} +2 -2
- package/dist/frontend/dist/assets/{routing-BybXhU8X.js.map → routing-CKNCPdYO.js.map} +1 -1
- package/dist/frontend/dist/assets/{web-DAOI6EsG.js → web-DdXPBk3h.js} +2 -2
- package/dist/frontend/dist/assets/{web-DAOI6EsG.js.map → web-DdXPBk3h.js.map} +1 -1
- package/dist/frontend/dist/index.html +1 -1
- package/dist/frontend/package.json +1 -1
- package/package.json +8 -8
- package/dist/frontend/dist/assets/ToolbarPanels-CjWlSOUC.js +0 -2
- package/dist/frontend/dist/assets/ToolbarPanels-CjWlSOUC.js.map +0 -1
- package/dist/frontend/dist/assets/client-B-MtBLP9.js +0 -2
- package/dist/frontend/dist/assets/client-B-MtBLP9.js.map +0 -1
- package/dist/frontend/dist/assets/client-DX1ckM1P.js +0 -2
- package/dist/frontend/dist/assets/client-DX1ckM1P.js.map +0 -1
- package/dist/frontend/dist/assets/client-Dh9ak8Fa.js +0 -2
- package/dist/frontend/dist/assets/client-Dh9ak8Fa.js.map +0 -1
- package/dist/frontend/dist/assets/client-DsP3tx7D.js +0 -2
- package/dist/frontend/dist/assets/client-DsP3tx7D.js.map +0 -1
- package/dist/frontend/dist/assets/index-DoPpOINE.js +0 -169
- package/dist/frontend/dist/assets/index-DoPpOINE.js.map +0 -1
- package/dist/frontend/dist/assets/layout-BNfHKiGS.js.map +0 -1
- package/dist/frontend/dist/assets/layout-CMpievJ_.js +0 -2
- package/dist/frontend/dist/assets/layout-CMpievJ_.js.map +0 -1
- package/dist/frontend/dist/assets/page-7nyyO6Jy.js +0 -2
- package/dist/frontend/dist/assets/page-7nyyO6Jy.js.map +0 -1
- package/dist/frontend/dist/assets/page-BEhfXGas.js +0 -2
- package/dist/frontend/dist/assets/page-BEhfXGas.js.map +0 -1
- package/dist/frontend/dist/assets/page-CV0h_zZE.js +0 -2
- package/dist/frontend/dist/assets/page-CV0h_zZE.js.map +0 -1
- package/dist/frontend/dist/assets/page-CkiQdVlI.js.map +0 -1
- package/dist/frontend/dist/assets/page-D5qkLwSn.js +0 -2
- package/dist/frontend/dist/assets/page-D5qkLwSn.js.map +0 -1
- package/dist/frontend/dist/assets/page-DU909Np3.js +0 -2
- package/dist/frontend/dist/assets/page-DV9q0oju.js +0 -2
- package/dist/frontend/dist/assets/page-DV9q0oju.js.map +0 -1
- package/dist/frontend/dist/assets/page-D_6K1M4j.js.map +0 -1
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/browser-ponyfill-D2ngVqWO.js","assets/vendor-DJo4KD8w.js","assets/PdfAnnotationCanvas.client-5QESNO5H-B7UjwjIX.js","assets/i18n-BbpF47i1.js","assets/layout-CMpievJ_.js","assets/privacy-NaGU1hj4.js","assets/routing-o1npPvOW.js","assets/page-CjI_QXry.js","assets/page-C_fIdKsk.js","assets/CookiePreferences-D5wgmVC7.js","assets/XMarkIcon-KMKD47CF.js","assets/routing-BybXhU8X.js","assets/page-DBYS9qIU.js","assets/page-DBlue8Rh.js","assets/page-DSW3JQF2.js","assets/page-kVSb0jfm.js","assets/page-RgfG8Fre.js","assets/page-CkiQdVlI.js","assets/layout-BNfHKiGS.js","assets/ToolbarPanels-CjWlSOUC.js","assets/ChevronLeftIcon-BLyRNZuL.js","assets/page-CI8oLbhf.js","assets/page-BEhfXGas.js","assets/page-7nyyO6Jy.js","assets/page-CV0h_zZE.js","assets/layout-G6HeeKIH.js","assets/ArrowsRightLeftIcon-BzLgl5o9.js","assets/CommandLineIcon-Ba4gpk8e.js","assets/page-DU909Np3.js","assets/client-B-MtBLP9.js","assets/client-DsP3tx7D.js","assets/client-DX1ckM1P.js","assets/page-D_6K1M4j.js","assets/layout-Delbhxmy.js","assets/page-Bb5SB6_Q.js","assets/page-D5qkLwSn.js","assets/page-DV9q0oju.js","assets/page-VPeYeXi6.js","assets/client-Dh9ak8Fa.js","assets/not-found-CtwZrTVU.js","assets/web-DAOI6EsG.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
var tz=Object.defineProperty;var Ok=e=>{throw TypeError(e)};var nz=(e,t,n)=>t in e?tz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var pe=(e,t,n)=>nz(e,typeof t!="symbol"?t+"":t,n),Hv=(e,t,n)=>t.has(e)||Ok("Cannot "+n);var ce=(e,t,n)=>(Hv(e,t,"read from private field"),n?n.call(e):t.get(e)),Di=(e,t,n)=>t.has(e)?Ok("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Oi=(e,t,n,r)=>(Hv(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),xt=(e,t,n)=>(Hv(e,t,"access private method"),n);var bk=(e,t,n,r)=>({set _(i){Oi(e,t,i,n)},get _(){return ce(e,t,r)}});import{e as AE,f as rz,g as QE,r as _,R as ue,h as yo,t as yk,c as iz,i as az,j as St,N as PE,b as sz,O as oz,a as lz,B as cz}from"./vendor-DJo4KD8w.js";import{i as uz,a as dz,u as fz}from"./i18n-BbpF47i1.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const s of a.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();const hz="modulepreload",mz=function(e){return"/"+e},xk={},Qe=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let s=function(d){return Promise.all(d.map(f=>Promise.resolve(f).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),c=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));i=s(n.map(d=>{if(d=mz(d),d in xk)return;xk[d]=!0;const f=d.endsWith(".css"),m=f?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${d}"]${m}`))return;const p=document.createElement("link");if(p.rel=f?"stylesheet":hz,f||(p.as="script"),p.crossOrigin="",p.href=d,c&&p.setAttribute("nonce",c),document.head.appendChild(p),f)return new Promise((O,b)=>{p.addEventListener("load",O),p.addEventListener("error",()=>b(new Error(`Unable to preload CSS for ${d}`)))})}))}function a(s){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=s,window.dispatchEvent(l),!l.defaultPrevented)throw s}return i.then(s=>{for(const l of s||[])l.status==="rejected"&&a(l.reason);return t().catch(a)})};var Gv={exports:{}},cu={};/**
|
|
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 Sk;function pz(){if(Sk)return cu;Sk=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,a){var s=null;if(a!==void 0&&(s=""+a),i.key!==void 0&&(s=""+i.key),"key"in i){a={};for(var l in i)l!=="key"&&(a[l]=i[l])}else a=i;return i=a.ref,{$$typeof:e,type:r,key:s,ref:i!==void 0?i:null,props:a}}return cu.Fragment=t,cu.jsx=n,cu.jsxs=n,cu}var wk;function gz(){return wk||(wk=1,Gv.exports=pz()),Gv.exports}var g=gz(),Kv={exports:{}},uu={},Jv={exports:{}},eO={};/**
|
|
11
|
-
* @license React
|
|
12
|
-
* scheduler.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 _k;function vz(){return _k||(_k=1,(function(e){function t(I,z){var ee=I.length;I.push(z);e:for(;0<ee;){var le=ee-1>>>1,q=I[le];if(0<i(q,z))I[le]=z,I[ee]=q,ee=le;else break e}}function n(I){return I.length===0?null:I[0]}function r(I){if(I.length===0)return null;var z=I[0],ee=I.pop();if(ee!==z){I[0]=ee;e:for(var le=0,q=I.length,G=q>>>1;le<G;){var re=2*(le+1)-1,M=I[re],he=re+1,ye=I[he];if(0>i(M,ee))he<q&&0>i(ye,M)?(I[le]=ye,I[he]=ee,le=he):(I[le]=M,I[re]=ee,le=re);else if(he<q&&0>i(ye,ee))I[le]=ye,I[he]=ee,le=he;else break e}}return z}function i(I,z){var ee=I.sortIndex-z.sortIndex;return ee!==0?ee:I.id-z.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var c=[],d=[],f=1,m=null,p=3,O=!1,b=!1,x=!1,w=!1,k=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;function E(I){for(var z=n(d);z!==null;){if(z.callback===null)r(d);else if(z.startTime<=I)r(d),z.sortIndex=z.expirationTime,t(c,z);else break;z=n(d)}}function Q(I){if(x=!1,E(I),!b)if(n(c)!==null)b=!0,P||(P=!0,Z());else{var z=n(d);z!==null&&W(Q,z.startTime-I)}}var P=!1,N=-1,D=5,L=-1;function A(){return w?!0:!(e.unstable_now()-L<D)}function X(){if(w=!1,P){var I=e.unstable_now();L=I;var z=!0;try{e:{b=!1,x&&(x=!1,T(N),N=-1),O=!0;var ee=p;try{t:{for(E(I),m=n(c);m!==null&&!(m.expirationTime>I&&A());){var le=m.callback;if(typeof le=="function"){m.callback=null,p=m.priorityLevel;var q=le(m.expirationTime<=I);if(I=e.unstable_now(),typeof q=="function"){m.callback=q,E(I),z=!0;break t}m===n(c)&&r(c),E(I)}else r(c);m=n(c)}if(m!==null)z=!0;else{var G=n(d);G!==null&&W(Q,G.startTime-I),z=!1}}break e}finally{m=null,p=ee,O=!1}z=void 0}}finally{z?Z():P=!1}}}var Z;if(typeof j=="function")Z=function(){j(X)};else if(typeof MessageChannel<"u"){var V=new MessageChannel,$=V.port2;V.port1.onmessage=X,Z=function(){$.postMessage(null)}}else Z=function(){k(X,0)};function W(I,z){N=k(function(){I(e.unstable_now())},z)}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(I){I.callback=null},e.unstable_forceFrameRate=function(I){0>I||125<I?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<I?Math.floor(1e3/I):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_next=function(I){switch(p){case 1:case 2:case 3:var z=3;break;default:z=p}var ee=p;p=z;try{return I()}finally{p=ee}},e.unstable_requestPaint=function(){w=!0},e.unstable_runWithPriority=function(I,z){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var ee=p;p=I;try{return z()}finally{p=ee}},e.unstable_scheduleCallback=function(I,z,ee){var le=e.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?le+ee:le):ee=le,I){case 1:var q=-1;break;case 2:q=250;break;case 5:q=1073741823;break;case 4:q=1e4;break;default:q=5e3}return q=ee+q,I={id:f++,callback:z,priorityLevel:I,startTime:ee,expirationTime:q,sortIndex:-1},ee>le?(I.sortIndex=ee,t(d,I),n(c)===null&&I===n(d)&&(x?(T(N),N=-1):x=!0,W(Q,ee-le))):(I.sortIndex=q,t(c,I),b||O||(b=!0,P||(P=!0,Z()))),I},e.unstable_shouldYield=A,e.unstable_wrapCallback=function(I){var z=p;return function(){var ee=p;p=z;try{return I.apply(this,arguments)}finally{p=ee}}}})(eO)),eO}var kk;function Oz(){return kk||(kk=1,Jv.exports=vz()),Jv.exports}/**
|
|
19
|
-
* @license React
|
|
20
|
-
* react-dom-client.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 jk;function bz(){if(jk)return uu;jk=1;var e=Oz(),t=AE(),n=rz();function r(o){var u="https://react.dev/errors/"+o;if(1<arguments.length){u+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)u+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+o+"; visit "+u+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)}function a(o){var u=o,h=o;if(o.alternate)for(;u.return;)u=u.return;else{o=u;do u=o,(u.flags&4098)!==0&&(h=u.return),o=u.return;while(o)}return u.tag===3?h:null}function s(o){if(o.tag===13){var u=o.memoizedState;if(u===null&&(o=o.alternate,o!==null&&(u=o.memoizedState)),u!==null)return u.dehydrated}return null}function l(o){if(o.tag===31){var u=o.memoizedState;if(u===null&&(o=o.alternate,o!==null&&(u=o.memoizedState)),u!==null)return u.dehydrated}return null}function c(o){if(a(o)!==o)throw Error(r(188))}function d(o){var u=o.alternate;if(!u){if(u=a(o),u===null)throw Error(r(188));return u!==o?null:o}for(var h=o,v=u;;){var y=h.return;if(y===null)break;var S=y.alternate;if(S===null){if(v=y.return,v!==null){h=v;continue}break}if(y.child===S.child){for(S=y.child;S;){if(S===h)return c(y),o;if(S===v)return c(y),u;S=S.sibling}throw Error(r(188))}if(h.return!==v.return)h=y,v=S;else{for(var C=!1,R=y.child;R;){if(R===h){C=!0,h=y,v=S;break}if(R===v){C=!0,v=y,h=S;break}R=R.sibling}if(!C){for(R=S.child;R;){if(R===h){C=!0,h=S,v=y;break}if(R===v){C=!0,v=S,h=y;break}R=R.sibling}if(!C)throw Error(r(189))}}if(h.alternate!==v)throw Error(r(190))}if(h.tag!==3)throw Error(r(188));return h.stateNode.current===h?o:u}function f(o){var u=o.tag;if(u===5||u===26||u===27||u===6)return o;for(o=o.child;o!==null;){if(u=f(o),u!==null)return u;o=o.sibling}return null}var m=Object.assign,p=Symbol.for("react.element"),O=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),T=Symbol.for("react.consumer"),j=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),Q=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),L=Symbol.for("react.activity"),A=Symbol.for("react.memo_cache_sentinel"),X=Symbol.iterator;function Z(o){return o===null||typeof o!="object"?null:(o=X&&o[X]||o["@@iterator"],typeof o=="function"?o:null)}var V=Symbol.for("react.client.reference");function $(o){if(o==null)return null;if(typeof o=="function")return o.$$typeof===V?null:o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case x:return"Fragment";case k:return"Profiler";case w:return"StrictMode";case Q:return"Suspense";case P:return"SuspenseList";case L:return"Activity"}if(typeof o=="object")switch(o.$$typeof){case b:return"Portal";case j:return o.displayName||"Context";case T:return(o._context.displayName||"Context")+".Consumer";case E:var u=o.render;return o=o.displayName,o||(o=u.displayName||u.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case N:return u=o.displayName||null,u!==null?u:$(o.type)||"Memo";case D:u=o._payload,o=o._init;try{return $(o(u))}catch{}}return null}var W=Array.isArray,I=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,z=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},le=[],q=-1;function G(o){return{current:o}}function re(o){0>q||(o.current=le[q],le[q]=null,q--)}function M(o,u){q++,le[q]=o.current,o.current=u}var he=G(null),ye=G(null),Oe=G(null),Be=G(null);function Re(o,u){switch(M(Oe,u),M(ye,o),M(he,null),u.nodeType){case 9:case 11:o=(o=u.documentElement)&&(o=o.namespaceURI)?q1(o):0;break;default:if(o=u.tagName,u=u.namespaceURI)u=q1(u),o=X1(u,o);else switch(o){case"svg":o=1;break;case"math":o=2;break;default:o=0}}re(he),M(he,o)}function Xe(){re(he),re(ye),re(Oe)}function be(o){o.memoizedState!==null&&M(Be,o);var u=he.current,h=X1(u,o.type);u!==h&&(M(ye,o),M(he,h))}function Fe(o){ye.current===o&&(re(he),re(ye)),Be.current===o&&(re(Be),au._currentValue=ee)}var we,Ve;function st(o){if(we===void 0)try{throw Error()}catch(h){var u=h.stack.trim().match(/\n( *(at )?)/);we=u&&u[1]||"",Ve=-1<h.stack.indexOf(`
|
|
27
|
-
at`)?" (<anonymous>)":-1<h.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
28
|
-
`+we+o+Ve}var gt=!1;function Je(o,u){if(!o||gt)return"";gt=!0;var h=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var v={DetermineComponentFrameRoot:function(){try{if(u){var oe=function(){throw Error()};if(Object.defineProperty(oe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(oe,[])}catch(ne){var te=ne}Reflect.construct(o,[],oe)}else{try{oe.call()}catch(ne){te=ne}o.call(oe.prototype)}}else{try{throw Error()}catch(ne){te=ne}(oe=o())&&typeof oe.catch=="function"&&oe.catch(function(){})}}catch(ne){if(ne&&te&&typeof ne.stack=="string")return[ne.stack,te.stack]}return[null,null]}};v.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var y=Object.getOwnPropertyDescriptor(v.DetermineComponentFrameRoot,"name");y&&y.configurable&&Object.defineProperty(v.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var S=v.DetermineComponentFrameRoot(),C=S[0],R=S[1];if(C&&R){var U=C.split(`
|
|
29
|
-
`),J=R.split(`
|
|
30
|
-
`);for(y=v=0;v<U.length&&!U[v].includes("DetermineComponentFrameRoot");)v++;for(;y<J.length&&!J[y].includes("DetermineComponentFrameRoot");)y++;if(v===U.length||y===J.length)for(v=U.length-1,y=J.length-1;1<=v&&0<=y&&U[v]!==J[y];)y--;for(;1<=v&&0<=y;v--,y--)if(U[v]!==J[y]){if(v!==1||y!==1)do if(v--,y--,0>y||U[v]!==J[y]){var ae=`
|
|
31
|
-
`+U[v].replace(" at new "," at ");return o.displayName&&ae.includes("<anonymous>")&&(ae=ae.replace("<anonymous>",o.displayName)),ae}while(1<=v&&0<=y);break}}}finally{gt=!1,Error.prepareStackTrace=h}return(h=o?o.displayName||o.name:"")?st(h):""}function yn(o,u){switch(o.tag){case 26:case 27:case 5:return st(o.type);case 16:return st("Lazy");case 13:return o.child!==u&&u!==null?st("Suspense Fallback"):st("Suspense");case 19:return st("SuspenseList");case 0:case 15:return Je(o.type,!1);case 11:return Je(o.type.render,!1);case 1:return Je(o.type,!0);case 31:return st("Activity");default:return""}}function Ce(o){try{var u="",h=null;do u+=yn(o,h),h=o,o=o.return;while(o);return u}catch(v){return`
|
|
32
|
-
Error generating stack: `+v.message+`
|
|
33
|
-
`+v.stack}}var ot=Object.prototype.hasOwnProperty,ge=e.unstable_scheduleCallback,vt=e.unstable_cancelCallback,Dt=e.unstable_shouldYield,Yt=e.unstable_requestPaint,et=e.unstable_now,Un=e.unstable_getCurrentPriorityLevel,ie=e.unstable_ImmediatePriority,de=e.unstable_UserBlockingPriority,Pe=e.unstable_NormalPriority,Ze=e.unstable_LowPriority,tt=e.unstable_IdlePriority,Lt=e.log,zn=e.unstable_setDisableYieldValue,rn=null,Xt=null;function Kt(o){if(typeof Lt=="function"&&zn(o),Xt&&typeof Xt.setStrictMode=="function")try{Xt.setStrictMode(rn,o)}catch{}}var ht=Math.clz32?Math.clz32:Bs,ir=Math.log,kn=Math.LN2;function Bs(o){return o>>>=0,o===0?32:31-(ir(o)/kn|0)|0}var Qi=256,mi=262144,zt=4194304;function Zt(o){var u=o&42;if(u!==0)return u;switch(o&-o){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 o&261888;case 262144:case 524288:case 1048576:case 2097152:return o&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return o&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return o}}function Qt(o,u,h){var v=o.pendingLanes;if(v===0)return 0;var y=0,S=o.suspendedLanes,C=o.pingedLanes;o=o.warmLanes;var R=v&134217727;return R!==0?(v=R&~S,v!==0?y=Zt(v):(C&=R,C!==0?y=Zt(C):h||(h=R&~o,h!==0&&(y=Zt(h))))):(R=v&~S,R!==0?y=Zt(R):C!==0?y=Zt(C):h||(h=v&~o,h!==0&&(y=Zt(h)))),y===0?0:u!==0&&u!==y&&(u&S)===0&&(S=y&-y,h=u&-u,S>=h||S===32&&(h&4194048)!==0)?u:y}function jn(o,u){return(o.pendingLanes&~(o.suspendedLanes&~o.pingedLanes)&u)===0}function Tn(o,u){switch(o){case 1:case 2:case 4:case 8:case 64:return u+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 u+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 an(){var o=zt;return zt<<=1,(zt&62914560)===0&&(zt=4194304),o}function Cn(o){for(var u=[],h=0;31>h;h++)u.push(o);return u}function $n(o,u){o.pendingLanes|=u,u!==268435456&&(o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0)}function Ht(o,u,h,v,y,S){var C=o.pendingLanes;o.pendingLanes=h,o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0,o.expiredLanes&=h,o.entangledLanes&=h,o.errorRecoveryDisabledLanes&=h,o.shellSuspendCounter=0;var R=o.entanglements,U=o.expirationTimes,J=o.hiddenUpdates;for(h=C&~h;0<h;){var ae=31-ht(h),oe=1<<ae;R[ae]=0,U[ae]=-1;var te=J[ae];if(te!==null)for(J[ae]=null,ae=0;ae<te.length;ae++){var ne=te[ae];ne!==null&&(ne.lane&=-536870913)}h&=~oe}v!==0&&Yn(o,v,0),S!==0&&y===0&&o.tag!==0&&(o.suspendedLanes|=S&~(C&~u))}function Yn(o,u,h){o.pendingLanes|=u,o.suspendedLanes&=~u;var v=31-ht(u);o.entangledLanes|=u,o.entanglements[v]=o.entanglements[v]|1073741824|h&261930}function je(o,u){var h=o.entangledLanes|=u;for(o=o.entanglements;h;){var v=31-ht(h),y=1<<v;y&u|o[v]&u&&(o[v]|=u),h&=~y}}function Ke(o,u){var h=u&-u;return h=(h&42)!==0?1:un(h),(h&(o.suspendedLanes|u))!==0?0:h}function un(o){switch(o){case 2:o=1;break;case 8:o=4;break;case 32:o=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:o=128;break;case 268435456:o=134217728;break;default:o=0}return o}function _r(o){return o&=-o,2<o?8<o?(o&134217727)!==0?32:268435456:8:2}function Wn(){var o=z.p;return o!==0?o:(o=window.event,o===void 0?32:dk(o.type))}function qr(o,u){var h=z.p;try{return z.p=o,u()}finally{z.p=h}}var ar=Math.random().toString(36).slice(2),xn="__reactFiber$"+ar,In="__reactProps$"+ar,Ia="__reactContainer$"+ar,yc="__reactEvents$"+ar,Ip="__reactListeners$"+ar,qp="__reactHandles$"+ar,ef="__reactResources$"+ar,Vs="__reactMarker$"+ar;function xc(o){delete o[xn],delete o[In],delete o[yc],delete o[Ip],delete o[qp]}function qa(o){var u=o[xn];if(u)return u;for(var h=o.parentNode;h;){if(u=h[Ia]||h[xn]){if(h=u.alternate,u.child!==null||h!==null&&h.child!==null)for(o=F1(o);o!==null;){if(h=o[xn])return h;o=F1(o)}return u}o=h,h=o.parentNode}return null}function Xa(o){if(o=o[xn]||o[Ia]){var u=o.tag;if(u===5||u===6||u===13||u===31||u===26||u===27||u===3)return o}return null}function Us(o){var u=o.tag;if(u===5||u===26||u===27||u===6)return o.stateNode;throw Error(r(33))}function Za(o){var u=o[ef];return u||(u=o[ef]={hoistableStyles:new Map,hoistableScripts:new Map}),u}function dn(o){o[Vs]=!0}var tf=new Set,nf={};function ra(o,u){Ba(o,u),Ba(o+"Capture",u)}function Ba(o,u){for(nf[o]=u,o=0;o<u.length;o++)tf.add(u[o])}var Xp=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]*$"),QS={},PS={};function YD(o){return ot.call(PS,o)?!0:ot.call(QS,o)?!1:Xp.test(o)?PS[o]=!0:(QS[o]=!0,!1)}function rf(o,u,h){if(YD(u))if(h===null)o.removeAttribute(u);else{switch(typeof h){case"undefined":case"function":case"symbol":o.removeAttribute(u);return;case"boolean":var v=u.toLowerCase().slice(0,5);if(v!=="data-"&&v!=="aria-"){o.removeAttribute(u);return}}o.setAttribute(u,""+h)}}function af(o,u,h){if(h===null)o.removeAttribute(u);else{switch(typeof h){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(u);return}o.setAttribute(u,""+h)}}function ia(o,u,h,v){if(v===null)o.removeAttribute(h);else{switch(typeof v){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(h);return}o.setAttributeNS(u,h,""+v)}}function Xr(o){switch(typeof o){case"bigint":case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function NS(o){var u=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(u==="checkbox"||u==="radio")}function WD(o,u,h){var v=Object.getOwnPropertyDescriptor(o.constructor.prototype,u);if(!o.hasOwnProperty(u)&&typeof v<"u"&&typeof v.get=="function"&&typeof v.set=="function"){var y=v.get,S=v.set;return Object.defineProperty(o,u,{configurable:!0,get:function(){return y.call(this)},set:function(C){h=""+C,S.call(this,C)}}),Object.defineProperty(o,u,{enumerable:v.enumerable}),{getValue:function(){return h},setValue:function(C){h=""+C},stopTracking:function(){o._valueTracker=null,delete o[u]}}}}function Zp(o){if(!o._valueTracker){var u=NS(o)?"checked":"value";o._valueTracker=WD(o,u,""+o[u])}}function RS(o){if(!o)return!1;var u=o._valueTracker;if(!u)return!0;var h=u.getValue(),v="";return o&&(v=NS(o)?o.checked?"true":"false":o.value),o=v,o!==h?(u.setValue(o),!0):!1}function sf(o){if(o=o||(typeof document<"u"?document:void 0),typeof o>"u")return null;try{return o.activeElement||o.body}catch{return o.body}}var FD=/[\n"\\]/g;function Zr(o){return o.replace(FD,function(u){return"\\"+u.charCodeAt(0).toString(16)+" "})}function Bp(o,u,h,v,y,S,C,R){o.name="",C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"?o.type=C:o.removeAttribute("type"),u!=null?C==="number"?(u===0&&o.value===""||o.value!=u)&&(o.value=""+Xr(u)):o.value!==""+Xr(u)&&(o.value=""+Xr(u)):C!=="submit"&&C!=="reset"||o.removeAttribute("value"),u!=null?Vp(o,C,Xr(u)):h!=null?Vp(o,C,Xr(h)):v!=null&&o.removeAttribute("value"),y==null&&S!=null&&(o.defaultChecked=!!S),y!=null&&(o.checked=y&&typeof y!="function"&&typeof y!="symbol"),R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"?o.name=""+Xr(R):o.removeAttribute("name")}function MS(o,u,h,v,y,S,C,R){if(S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(o.type=S),u!=null||h!=null){if(!(S!=="submit"&&S!=="reset"||u!=null)){Zp(o);return}h=h!=null?""+Xr(h):"",u=u!=null?""+Xr(u):h,R||u===o.value||(o.value=u),o.defaultValue=u}v=v??y,v=typeof v!="function"&&typeof v!="symbol"&&!!v,o.checked=R?o.checked:!!v,o.defaultChecked=!!v,C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"&&(o.name=C),Zp(o)}function Vp(o,u,h){u==="number"&&sf(o.ownerDocument)===o||o.defaultValue===""+h||(o.defaultValue=""+h)}function Yo(o,u,h,v){if(o=o.options,u){u={};for(var y=0;y<h.length;y++)u["$"+h[y]]=!0;for(h=0;h<o.length;h++)y=u.hasOwnProperty("$"+o[h].value),o[h].selected!==y&&(o[h].selected=y),y&&v&&(o[h].defaultSelected=!0)}else{for(h=""+Xr(h),u=null,y=0;y<o.length;y++){if(o[y].value===h){o[y].selected=!0,v&&(o[y].defaultSelected=!0);return}u!==null||o[y].disabled||(u=o[y])}u!==null&&(u.selected=!0)}}function DS(o,u,h){if(u!=null&&(u=""+Xr(u),u!==o.value&&(o.value=u),h==null)){o.defaultValue!==u&&(o.defaultValue=u);return}o.defaultValue=h!=null?""+Xr(h):""}function LS(o,u,h,v){if(u==null){if(v!=null){if(h!=null)throw Error(r(92));if(W(v)){if(1<v.length)throw Error(r(93));v=v[0]}h=v}h==null&&(h=""),u=h}h=Xr(u),o.defaultValue=h,v=o.textContent,v===h&&v!==""&&v!==null&&(o.value=v),Zp(o)}function Wo(o,u){if(u){var h=o.firstChild;if(h&&h===o.lastChild&&h.nodeType===3){h.nodeValue=u;return}}o.textContent=u}var HD=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 zS(o,u,h){var v=u.indexOf("--")===0;h==null||typeof h=="boolean"||h===""?v?o.setProperty(u,""):u==="float"?o.cssFloat="":o[u]="":v?o.setProperty(u,h):typeof h!="number"||h===0||HD.has(u)?u==="float"?o.cssFloat=h:o[u]=(""+h).trim():o[u]=h+"px"}function $S(o,u,h){if(u!=null&&typeof u!="object")throw Error(r(62));if(o=o.style,h!=null){for(var v in h)!h.hasOwnProperty(v)||u!=null&&u.hasOwnProperty(v)||(v.indexOf("--")===0?o.setProperty(v,""):v==="float"?o.cssFloat="":o[v]="");for(var y in u)v=u[y],u.hasOwnProperty(y)&&h[y]!==v&&zS(o,y,v)}else for(var S in u)u.hasOwnProperty(S)&&zS(o,S,u[S])}function Up(o){if(o.indexOf("-")===-1)return!1;switch(o){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 GD=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"]]),KD=/^[\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 of(o){return KD.test(""+o)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":o}function aa(){}var Yp=null;function Wp(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var Fo=null,Ho=null;function IS(o){var u=Xa(o);if(u&&(o=u.stateNode)){var h=o[In]||null;e:switch(o=u.stateNode,u.type){case"input":if(Bp(o,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name),u=h.name,h.type==="radio"&&u!=null){for(h=o;h.parentNode;)h=h.parentNode;for(h=h.querySelectorAll('input[name="'+Zr(""+u)+'"][type="radio"]'),u=0;u<h.length;u++){var v=h[u];if(v!==o&&v.form===o.form){var y=v[In]||null;if(!y)throw Error(r(90));Bp(v,y.value,y.defaultValue,y.defaultValue,y.checked,y.defaultChecked,y.type,y.name)}}for(u=0;u<h.length;u++)v=h[u],v.form===o.form&&RS(v)}break e;case"textarea":DS(o,h.value,h.defaultValue);break e;case"select":u=h.value,u!=null&&Yo(o,!!h.multiple,u,!1)}}}var Fp=!1;function qS(o,u,h){if(Fp)return o(u,h);Fp=!0;try{var v=o(u);return v}finally{if(Fp=!1,(Fo!==null||Ho!==null)&&(Wf(),Fo&&(u=Fo,o=Ho,Ho=Fo=null,IS(u),o)))for(u=0;u<o.length;u++)IS(o[u])}}function Sc(o,u){var h=o.stateNode;if(h===null)return null;var v=h[In]||null;if(v===null)return null;h=v[u];e:switch(u){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(v=!v.disabled)||(o=o.type,v=!(o==="button"||o==="input"||o==="select"||o==="textarea")),o=!v;break e;default:o=!1}if(o)return null;if(h&&typeof h!="function")throw Error(r(231,u,typeof h));return h}var sa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Hp=!1;if(sa)try{var wc={};Object.defineProperty(wc,"passive",{get:function(){Hp=!0}}),window.addEventListener("test",wc,wc),window.removeEventListener("test",wc,wc)}catch{Hp=!1}var Va=null,Gp=null,lf=null;function XS(){if(lf)return lf;var o,u=Gp,h=u.length,v,y="value"in Va?Va.value:Va.textContent,S=y.length;for(o=0;o<h&&u[o]===y[o];o++);var C=h-o;for(v=1;v<=C&&u[h-v]===y[S-v];v++);return lf=y.slice(o,1<v?1-v:void 0)}function cf(o){var u=o.keyCode;return"charCode"in o?(o=o.charCode,o===0&&u===13&&(o=13)):o=u,o===10&&(o=13),32<=o||o===13?o:0}function uf(){return!0}function ZS(){return!1}function sr(o){function u(h,v,y,S,C){this._reactName=h,this._targetInst=y,this.type=v,this.nativeEvent=S,this.target=C,this.currentTarget=null;for(var R in o)o.hasOwnProperty(R)&&(h=o[R],this[R]=h?h(S):S[R]);return this.isDefaultPrevented=(S.defaultPrevented!=null?S.defaultPrevented:S.returnValue===!1)?uf:ZS,this.isPropagationStopped=ZS,this}return m(u.prototype,{preventDefault:function(){this.defaultPrevented=!0;var h=this.nativeEvent;h&&(h.preventDefault?h.preventDefault():typeof h.returnValue!="unknown"&&(h.returnValue=!1),this.isDefaultPrevented=uf)},stopPropagation:function(){var h=this.nativeEvent;h&&(h.stopPropagation?h.stopPropagation():typeof h.cancelBubble!="unknown"&&(h.cancelBubble=!0),this.isPropagationStopped=uf)},persist:function(){},isPersistent:uf}),u}var Ys={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(o){return o.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},df=sr(Ys),_c=m({},Ys,{view:0,detail:0}),JD=sr(_c),Kp,Jp,kc,ff=m({},_c,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:tg,button:0,buttons:0,relatedTarget:function(o){return o.relatedTarget===void 0?o.fromElement===o.srcElement?o.toElement:o.fromElement:o.relatedTarget},movementX:function(o){return"movementX"in o?o.movementX:(o!==kc&&(kc&&o.type==="mousemove"?(Kp=o.screenX-kc.screenX,Jp=o.screenY-kc.screenY):Jp=Kp=0,kc=o),Kp)},movementY:function(o){return"movementY"in o?o.movementY:Jp}}),BS=sr(ff),eL=m({},ff,{dataTransfer:0}),tL=sr(eL),nL=m({},_c,{relatedTarget:0}),eg=sr(nL),rL=m({},Ys,{animationName:0,elapsedTime:0,pseudoElement:0}),iL=sr(rL),aL=m({},Ys,{clipboardData:function(o){return"clipboardData"in o?o.clipboardData:window.clipboardData}}),sL=sr(aL),oL=m({},Ys,{data:0}),VS=sr(oL),lL={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},cL={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"},uL={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function dL(o){var u=this.nativeEvent;return u.getModifierState?u.getModifierState(o):(o=uL[o])?!!u[o]:!1}function tg(){return dL}var fL=m({},_c,{key:function(o){if(o.key){var u=lL[o.key]||o.key;if(u!=="Unidentified")return u}return o.type==="keypress"?(o=cf(o),o===13?"Enter":String.fromCharCode(o)):o.type==="keydown"||o.type==="keyup"?cL[o.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:tg,charCode:function(o){return o.type==="keypress"?cf(o):0},keyCode:function(o){return o.type==="keydown"||o.type==="keyup"?o.keyCode:0},which:function(o){return o.type==="keypress"?cf(o):o.type==="keydown"||o.type==="keyup"?o.keyCode:0}}),hL=sr(fL),mL=m({},ff,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),US=sr(mL),pL=m({},_c,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:tg}),gL=sr(pL),vL=m({},Ys,{propertyName:0,elapsedTime:0,pseudoElement:0}),OL=sr(vL),bL=m({},ff,{deltaX:function(o){return"deltaX"in o?o.deltaX:"wheelDeltaX"in o?-o.wheelDeltaX:0},deltaY:function(o){return"deltaY"in o?o.deltaY:"wheelDeltaY"in o?-o.wheelDeltaY:"wheelDelta"in o?-o.wheelDelta:0},deltaZ:0,deltaMode:0}),yL=sr(bL),xL=m({},Ys,{newState:0,oldState:0}),SL=sr(xL),wL=[9,13,27,32],ng=sa&&"CompositionEvent"in window,jc=null;sa&&"documentMode"in document&&(jc=document.documentMode);var _L=sa&&"TextEvent"in window&&!jc,YS=sa&&(!ng||jc&&8<jc&&11>=jc),WS=" ",FS=!1;function HS(o,u){switch(o){case"keyup":return wL.indexOf(u.keyCode)!==-1;case"keydown":return u.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function GS(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var Go=!1;function kL(o,u){switch(o){case"compositionend":return GS(u);case"keypress":return u.which!==32?null:(FS=!0,WS);case"textInput":return o=u.data,o===WS&&FS?null:o;default:return null}}function jL(o,u){if(Go)return o==="compositionend"||!ng&&HS(o,u)?(o=XS(),lf=Gp=Va=null,Go=!1,o):null;switch(o){case"paste":return null;case"keypress":if(!(u.ctrlKey||u.altKey||u.metaKey)||u.ctrlKey&&u.altKey){if(u.char&&1<u.char.length)return u.char;if(u.which)return String.fromCharCode(u.which)}return null;case"compositionend":return YS&&u.locale!=="ko"?null:u.data;default:return null}}var TL={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 KS(o){var u=o&&o.nodeName&&o.nodeName.toLowerCase();return u==="input"?!!TL[o.type]:u==="textarea"}function JS(o,u,h,v){Fo?Ho?Ho.push(v):Ho=[v]:Fo=v,u=th(u,"onChange"),0<u.length&&(h=new df("onChange","change",null,h,v),o.push({event:h,listeners:u}))}var Tc=null,Cc=null;function CL(o){M1(o,0)}function hf(o){var u=Us(o);if(RS(u))return o}function ew(o,u){if(o==="change")return u}var tw=!1;if(sa){var rg;if(sa){var ig="oninput"in document;if(!ig){var nw=document.createElement("div");nw.setAttribute("oninput","return;"),ig=typeof nw.oninput=="function"}rg=ig}else rg=!1;tw=rg&&(!document.documentMode||9<document.documentMode)}function rw(){Tc&&(Tc.detachEvent("onpropertychange",iw),Cc=Tc=null)}function iw(o){if(o.propertyName==="value"&&hf(Cc)){var u=[];JS(u,Cc,o,Wp(o)),qS(CL,u)}}function EL(o,u,h){o==="focusin"?(rw(),Tc=u,Cc=h,Tc.attachEvent("onpropertychange",iw)):o==="focusout"&&rw()}function AL(o){if(o==="selectionchange"||o==="keyup"||o==="keydown")return hf(Cc)}function QL(o,u){if(o==="click")return hf(u)}function PL(o,u){if(o==="input"||o==="change")return hf(u)}function NL(o,u){return o===u&&(o!==0||1/o===1/u)||o!==o&&u!==u}var kr=typeof Object.is=="function"?Object.is:NL;function Ec(o,u){if(kr(o,u))return!0;if(typeof o!="object"||o===null||typeof u!="object"||u===null)return!1;var h=Object.keys(o),v=Object.keys(u);if(h.length!==v.length)return!1;for(v=0;v<h.length;v++){var y=h[v];if(!ot.call(u,y)||!kr(o[y],u[y]))return!1}return!0}function aw(o){for(;o&&o.firstChild;)o=o.firstChild;return o}function sw(o,u){var h=aw(o);o=0;for(var v;h;){if(h.nodeType===3){if(v=o+h.textContent.length,o<=u&&v>=u)return{node:h,offset:u-o};o=v}e:{for(;h;){if(h.nextSibling){h=h.nextSibling;break e}h=h.parentNode}h=void 0}h=aw(h)}}function ow(o,u){return o&&u?o===u?!0:o&&o.nodeType===3?!1:u&&u.nodeType===3?ow(o,u.parentNode):"contains"in o?o.contains(u):o.compareDocumentPosition?!!(o.compareDocumentPosition(u)&16):!1:!1}function lw(o){o=o!=null&&o.ownerDocument!=null&&o.ownerDocument.defaultView!=null?o.ownerDocument.defaultView:window;for(var u=sf(o.document);u instanceof o.HTMLIFrameElement;){try{var h=typeof u.contentWindow.location.href=="string"}catch{h=!1}if(h)o=u.contentWindow;else break;u=sf(o.document)}return u}function ag(o){var u=o&&o.nodeName&&o.nodeName.toLowerCase();return u&&(u==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||u==="textarea"||o.contentEditable==="true")}var RL=sa&&"documentMode"in document&&11>=document.documentMode,Ko=null,sg=null,Ac=null,og=!1;function cw(o,u,h){var v=h.window===h?h.document:h.nodeType===9?h:h.ownerDocument;og||Ko==null||Ko!==sf(v)||(v=Ko,"selectionStart"in v&&ag(v)?v={start:v.selectionStart,end:v.selectionEnd}:(v=(v.ownerDocument&&v.ownerDocument.defaultView||window).getSelection(),v={anchorNode:v.anchorNode,anchorOffset:v.anchorOffset,focusNode:v.focusNode,focusOffset:v.focusOffset}),Ac&&Ec(Ac,v)||(Ac=v,v=th(sg,"onSelect"),0<v.length&&(u=new df("onSelect","select",null,u,h),o.push({event:u,listeners:v}),u.target=Ko)))}function Ws(o,u){var h={};return h[o.toLowerCase()]=u.toLowerCase(),h["Webkit"+o]="webkit"+u,h["Moz"+o]="moz"+u,h}var Jo={animationend:Ws("Animation","AnimationEnd"),animationiteration:Ws("Animation","AnimationIteration"),animationstart:Ws("Animation","AnimationStart"),transitionrun:Ws("Transition","TransitionRun"),transitionstart:Ws("Transition","TransitionStart"),transitioncancel:Ws("Transition","TransitionCancel"),transitionend:Ws("Transition","TransitionEnd")},lg={},uw={};sa&&(uw=document.createElement("div").style,"AnimationEvent"in window||(delete Jo.animationend.animation,delete Jo.animationiteration.animation,delete Jo.animationstart.animation),"TransitionEvent"in window||delete Jo.transitionend.transition);function Fs(o){if(lg[o])return lg[o];if(!Jo[o])return o;var u=Jo[o],h;for(h in u)if(u.hasOwnProperty(h)&&h in uw)return lg[o]=u[h];return o}var dw=Fs("animationend"),fw=Fs("animationiteration"),hw=Fs("animationstart"),ML=Fs("transitionrun"),DL=Fs("transitionstart"),LL=Fs("transitioncancel"),mw=Fs("transitionend"),pw=new Map,cg="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(" ");cg.push("scrollEnd");function pi(o,u){pw.set(o,u),ra(u,[o])}var mf=typeof reportError=="function"?reportError:function(o){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var u=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof o=="object"&&o!==null&&typeof o.message=="string"?String(o.message):String(o),error:o});if(!window.dispatchEvent(u))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",o);return}console.error(o)},Br=[],el=0,ug=0;function pf(){for(var o=el,u=ug=el=0;u<o;){var h=Br[u];Br[u++]=null;var v=Br[u];Br[u++]=null;var y=Br[u];Br[u++]=null;var S=Br[u];if(Br[u++]=null,v!==null&&y!==null){var C=v.pending;C===null?y.next=y:(y.next=C.next,C.next=y),v.pending=y}S!==0&&gw(h,y,S)}}function gf(o,u,h,v){Br[el++]=o,Br[el++]=u,Br[el++]=h,Br[el++]=v,ug|=v,o.lanes|=v,o=o.alternate,o!==null&&(o.lanes|=v)}function dg(o,u,h,v){return gf(o,u,h,v),vf(o)}function Hs(o,u){return gf(o,null,null,u),vf(o)}function gw(o,u,h){o.lanes|=h;var v=o.alternate;v!==null&&(v.lanes|=h);for(var y=!1,S=o.return;S!==null;)S.childLanes|=h,v=S.alternate,v!==null&&(v.childLanes|=h),S.tag===22&&(o=S.stateNode,o===null||o._visibility&1||(y=!0)),o=S,S=S.return;return o.tag===3?(S=o.stateNode,y&&u!==null&&(y=31-ht(h),o=S.hiddenUpdates,v=o[y],v===null?o[y]=[u]:v.push(u),u.lane=h|536870912),S):null}function vf(o){if(50<Kc)throw Kc=0,yv=null,Error(r(185));for(var u=o.return;u!==null;)o=u,u=o.return;return o.tag===3?o.stateNode:null}var tl={};function zL(o,u,h,v){this.tag=o,this.key=h,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=u,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=v,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function jr(o,u,h,v){return new zL(o,u,h,v)}function fg(o){return o=o.prototype,!(!o||!o.isReactComponent)}function oa(o,u){var h=o.alternate;return h===null?(h=jr(o.tag,u,o.key,o.mode),h.elementType=o.elementType,h.type=o.type,h.stateNode=o.stateNode,h.alternate=o,o.alternate=h):(h.pendingProps=u,h.type=o.type,h.flags=0,h.subtreeFlags=0,h.deletions=null),h.flags=o.flags&65011712,h.childLanes=o.childLanes,h.lanes=o.lanes,h.child=o.child,h.memoizedProps=o.memoizedProps,h.memoizedState=o.memoizedState,h.updateQueue=o.updateQueue,u=o.dependencies,h.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext},h.sibling=o.sibling,h.index=o.index,h.ref=o.ref,h.refCleanup=o.refCleanup,h}function vw(o,u){o.flags&=65011714;var h=o.alternate;return h===null?(o.childLanes=0,o.lanes=u,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=h.childLanes,o.lanes=h.lanes,o.child=h.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=h.memoizedProps,o.memoizedState=h.memoizedState,o.updateQueue=h.updateQueue,o.type=h.type,u=h.dependencies,o.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext}),o}function Of(o,u,h,v,y,S){var C=0;if(v=o,typeof o=="function")fg(o)&&(C=1);else if(typeof o=="string")C=Z3(o,h,he.current)?26:o==="html"||o==="head"||o==="body"?27:5;else e:switch(o){case L:return o=jr(31,h,u,y),o.elementType=L,o.lanes=S,o;case x:return Gs(h.children,y,S,u);case w:C=8,y|=24;break;case k:return o=jr(12,h,u,y|2),o.elementType=k,o.lanes=S,o;case Q:return o=jr(13,h,u,y),o.elementType=Q,o.lanes=S,o;case P:return o=jr(19,h,u,y),o.elementType=P,o.lanes=S,o;default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case j:C=10;break e;case T:C=9;break e;case E:C=11;break e;case N:C=14;break e;case D:C=16,v=null;break e}C=29,h=Error(r(130,o===null?"null":typeof o,"")),v=null}return u=jr(C,h,u,y),u.elementType=o,u.type=v,u.lanes=S,u}function Gs(o,u,h,v){return o=jr(7,o,v,u),o.lanes=h,o}function hg(o,u,h){return o=jr(6,o,null,u),o.lanes=h,o}function Ow(o){var u=jr(18,null,null,0);return u.stateNode=o,u}function mg(o,u,h){return u=jr(4,o.children!==null?o.children:[],o.key,u),u.lanes=h,u.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},u}var bw=new WeakMap;function Vr(o,u){if(typeof o=="object"&&o!==null){var h=bw.get(o);return h!==void 0?h:(u={value:o,source:u,stack:Ce(u)},bw.set(o,u),u)}return{value:o,source:u,stack:Ce(u)}}var nl=[],rl=0,bf=null,Qc=0,Ur=[],Yr=0,Ua=null,Pi=1,Ni="";function la(o,u){nl[rl++]=Qc,nl[rl++]=bf,bf=o,Qc=u}function yw(o,u,h){Ur[Yr++]=Pi,Ur[Yr++]=Ni,Ur[Yr++]=Ua,Ua=o;var v=Pi;o=Ni;var y=32-ht(v)-1;v&=~(1<<y),h+=1;var S=32-ht(u)+y;if(30<S){var C=y-y%5;S=(v&(1<<C)-1).toString(32),v>>=C,y-=C,Pi=1<<32-ht(u)+y|h<<y|v,Ni=S+o}else Pi=1<<S|h<<y|v,Ni=o}function pg(o){o.return!==null&&(la(o,1),yw(o,1,0))}function gg(o){for(;o===bf;)bf=nl[--rl],nl[rl]=null,Qc=nl[--rl],nl[rl]=null;for(;o===Ua;)Ua=Ur[--Yr],Ur[Yr]=null,Ni=Ur[--Yr],Ur[Yr]=null,Pi=Ur[--Yr],Ur[Yr]=null}function xw(o,u){Ur[Yr++]=Pi,Ur[Yr++]=Ni,Ur[Yr++]=Ua,Pi=u.id,Ni=u.overflow,Ua=o}var Pn=null,Bt=null,ut=!1,Ya=null,Wr=!1,vg=Error(r(519));function Wa(o){var u=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Pc(Vr(u,o)),vg}function Sw(o){var u=o.stateNode,h=o.type,v=o.memoizedProps;switch(u[xn]=o,u[In]=v,h){case"dialog":rt("cancel",u),rt("close",u);break;case"iframe":case"object":case"embed":rt("load",u);break;case"video":case"audio":for(h=0;h<eu.length;h++)rt(eu[h],u);break;case"source":rt("error",u);break;case"img":case"image":case"link":rt("error",u),rt("load",u);break;case"details":rt("toggle",u);break;case"input":rt("invalid",u),MS(u,v.value,v.defaultValue,v.checked,v.defaultChecked,v.type,v.name,!0);break;case"select":rt("invalid",u);break;case"textarea":rt("invalid",u),LS(u,v.value,v.defaultValue,v.children)}h=v.children,typeof h!="string"&&typeof h!="number"&&typeof h!="bigint"||u.textContent===""+h||v.suppressHydrationWarning===!0||$1(u.textContent,h)?(v.popover!=null&&(rt("beforetoggle",u),rt("toggle",u)),v.onScroll!=null&&rt("scroll",u),v.onScrollEnd!=null&&rt("scrollend",u),v.onClick!=null&&(u.onclick=aa),u=!0):u=!1,u||Wa(o,!0)}function ww(o){for(Pn=o.return;Pn;)switch(Pn.tag){case 5:case 31:case 13:Wr=!1;return;case 27:case 3:Wr=!0;return;default:Pn=Pn.return}}function il(o){if(o!==Pn)return!1;if(!ut)return ww(o),ut=!0,!1;var u=o.tag,h;if((h=u!==3&&u!==27)&&((h=u===5)&&(h=o.type,h=!(h!=="form"&&h!=="button")||Mv(o.type,o.memoizedProps)),h=!h),h&&Bt&&Wa(o),ww(o),u===13){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));Bt=W1(o)}else if(u===31){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));Bt=W1(o)}else u===27?(u=Bt,ls(o.type)?(o=Iv,Iv=null,Bt=o):Bt=u):Bt=Pn?Hr(o.stateNode.nextSibling):null;return!0}function Ks(){Bt=Pn=null,ut=!1}function Og(){var o=Ya;return o!==null&&(ur===null?ur=o:ur.push.apply(ur,o),Ya=null),o}function Pc(o){Ya===null?Ya=[o]:Ya.push(o)}var bg=G(null),Js=null,ca=null;function Fa(o,u,h){M(bg,u._currentValue),u._currentValue=h}function ua(o){o._currentValue=bg.current,re(bg)}function yg(o,u,h){for(;o!==null;){var v=o.alternate;if((o.childLanes&u)!==u?(o.childLanes|=u,v!==null&&(v.childLanes|=u)):v!==null&&(v.childLanes&u)!==u&&(v.childLanes|=u),o===h)break;o=o.return}}function xg(o,u,h,v){var y=o.child;for(y!==null&&(y.return=o);y!==null;){var S=y.dependencies;if(S!==null){var C=y.child;S=S.firstContext;e:for(;S!==null;){var R=S;S=y;for(var U=0;U<u.length;U++)if(R.context===u[U]){S.lanes|=h,R=S.alternate,R!==null&&(R.lanes|=h),yg(S.return,h,o),v||(C=null);break e}S=R.next}}else if(y.tag===18){if(C=y.return,C===null)throw Error(r(341));C.lanes|=h,S=C.alternate,S!==null&&(S.lanes|=h),yg(C,h,o),C=null}else C=y.child;if(C!==null)C.return=y;else for(C=y;C!==null;){if(C===o){C=null;break}if(y=C.sibling,y!==null){y.return=C.return,C=y;break}C=C.return}y=C}}function al(o,u,h,v){o=null;for(var y=u,S=!1;y!==null;){if(!S){if((y.flags&524288)!==0)S=!0;else if((y.flags&262144)!==0)break}if(y.tag===10){var C=y.alternate;if(C===null)throw Error(r(387));if(C=C.memoizedProps,C!==null){var R=y.type;kr(y.pendingProps.value,C.value)||(o!==null?o.push(R):o=[R])}}else if(y===Be.current){if(C=y.alternate,C===null)throw Error(r(387));C.memoizedState.memoizedState!==y.memoizedState.memoizedState&&(o!==null?o.push(au):o=[au])}y=y.return}o!==null&&xg(u,o,h,v),u.flags|=262144}function yf(o){for(o=o.firstContext;o!==null;){if(!kr(o.context._currentValue,o.memoizedValue))return!0;o=o.next}return!1}function eo(o){Js=o,ca=null,o=o.dependencies,o!==null&&(o.firstContext=null)}function Nn(o){return _w(Js,o)}function xf(o,u){return Js===null&&eo(o),_w(o,u)}function _w(o,u){var h=u._currentValue;if(u={context:u,memoizedValue:h,next:null},ca===null){if(o===null)throw Error(r(308));ca=u,o.dependencies={lanes:0,firstContext:u},o.flags|=524288}else ca=ca.next=u;return h}var $L=typeof AbortController<"u"?AbortController:function(){var o=[],u=this.signal={aborted:!1,addEventListener:function(h,v){o.push(v)}};this.abort=function(){u.aborted=!0,o.forEach(function(h){return h()})}},IL=e.unstable_scheduleCallback,qL=e.unstable_NormalPriority,fn={$$typeof:j,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Sg(){return{controller:new $L,data:new Map,refCount:0}}function Nc(o){o.refCount--,o.refCount===0&&IL(qL,function(){o.controller.abort()})}var Rc=null,wg=0,sl=0,ol=null;function XL(o,u){if(Rc===null){var h=Rc=[];wg=0,sl=jv(),ol={status:"pending",value:void 0,then:function(v){h.push(v)}}}return wg++,u.then(kw,kw),u}function kw(){if(--wg===0&&Rc!==null){ol!==null&&(ol.status="fulfilled");var o=Rc;Rc=null,sl=0,ol=null;for(var u=0;u<o.length;u++)(0,o[u])()}}function ZL(o,u){var h=[],v={status:"pending",value:null,reason:null,then:function(y){h.push(y)}};return o.then(function(){v.status="fulfilled",v.value=u;for(var y=0;y<h.length;y++)(0,h[y])(u)},function(y){for(v.status="rejected",v.reason=y,y=0;y<h.length;y++)(0,h[y])(void 0)}),v}var jw=I.S;I.S=function(o,u){c1=et(),typeof u=="object"&&u!==null&&typeof u.then=="function"&&XL(o,u),jw!==null&&jw(o,u)};var to=G(null);function _g(){var o=to.current;return o!==null?o:Pt.pooledCache}function Sf(o,u){u===null?M(to,to.current):M(to,u.pool)}function Tw(){var o=_g();return o===null?null:{parent:fn._currentValue,pool:o}}var ll=Error(r(460)),kg=Error(r(474)),wf=Error(r(542)),_f={then:function(){}};function Cw(o){return o=o.status,o==="fulfilled"||o==="rejected"}function Ew(o,u,h){switch(h=o[h],h===void 0?o.push(u):h!==u&&(u.then(aa,aa),u=h),u.status){case"fulfilled":return u.value;case"rejected":throw o=u.reason,Qw(o),o;default:if(typeof u.status=="string")u.then(aa,aa);else{if(o=Pt,o!==null&&100<o.shellSuspendCounter)throw Error(r(482));o=u,o.status="pending",o.then(function(v){if(u.status==="pending"){var y=u;y.status="fulfilled",y.value=v}},function(v){if(u.status==="pending"){var y=u;y.status="rejected",y.reason=v}})}switch(u.status){case"fulfilled":return u.value;case"rejected":throw o=u.reason,Qw(o),o}throw ro=u,ll}}function no(o){try{var u=o._init;return u(o._payload)}catch(h){throw h!==null&&typeof h=="object"&&typeof h.then=="function"?(ro=h,ll):h}}var ro=null;function Aw(){if(ro===null)throw Error(r(459));var o=ro;return ro=null,o}function Qw(o){if(o===ll||o===wf)throw Error(r(483))}var cl=null,Mc=0;function kf(o){var u=Mc;return Mc+=1,cl===null&&(cl=[]),Ew(cl,o,u)}function Dc(o,u){u=u.props.ref,o.ref=u!==void 0?u:null}function jf(o,u){throw u.$$typeof===p?Error(r(525)):(o=Object.prototype.toString.call(u),Error(r(31,o==="[object Object]"?"object with keys {"+Object.keys(u).join(", ")+"}":o)))}function Pw(o){function u(H,Y){if(o){var K=H.deletions;K===null?(H.deletions=[Y],H.flags|=16):K.push(Y)}}function h(H,Y){if(!o)return null;for(;Y!==null;)u(H,Y),Y=Y.sibling;return null}function v(H){for(var Y=new Map;H!==null;)H.key!==null?Y.set(H.key,H):Y.set(H.index,H),H=H.sibling;return Y}function y(H,Y){return H=oa(H,Y),H.index=0,H.sibling=null,H}function S(H,Y,K){return H.index=K,o?(K=H.alternate,K!==null?(K=K.index,K<Y?(H.flags|=67108866,Y):K):(H.flags|=67108866,Y)):(H.flags|=1048576,Y)}function C(H){return o&&H.alternate===null&&(H.flags|=67108866),H}function R(H,Y,K,se){return Y===null||Y.tag!==6?(Y=hg(K,H.mode,se),Y.return=H,Y):(Y=y(Y,K),Y.return=H,Y)}function U(H,Y,K,se){var Le=K.type;return Le===x?ae(H,Y,K.props.children,se,K.key):Y!==null&&(Y.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===D&&no(Le)===Y.type)?(Y=y(Y,K.props),Dc(Y,K),Y.return=H,Y):(Y=Of(K.type,K.key,K.props,null,H.mode,se),Dc(Y,K),Y.return=H,Y)}function J(H,Y,K,se){return Y===null||Y.tag!==4||Y.stateNode.containerInfo!==K.containerInfo||Y.stateNode.implementation!==K.implementation?(Y=mg(K,H.mode,se),Y.return=H,Y):(Y=y(Y,K.children||[]),Y.return=H,Y)}function ae(H,Y,K,se,Le){return Y===null||Y.tag!==7?(Y=Gs(K,H.mode,se,Le),Y.return=H,Y):(Y=y(Y,K),Y.return=H,Y)}function oe(H,Y,K){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return Y=hg(""+Y,H.mode,K),Y.return=H,Y;if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case O:return K=Of(Y.type,Y.key,Y.props,null,H.mode,K),Dc(K,Y),K.return=H,K;case b:return Y=mg(Y,H.mode,K),Y.return=H,Y;case D:return Y=no(Y),oe(H,Y,K)}if(W(Y)||Z(Y))return Y=Gs(Y,H.mode,K,null),Y.return=H,Y;if(typeof Y.then=="function")return oe(H,kf(Y),K);if(Y.$$typeof===j)return oe(H,xf(H,Y),K);jf(H,Y)}return null}function te(H,Y,K,se){var Le=Y!==null?Y.key:null;if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return Le!==null?null:R(H,Y,""+K,se);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case O:return K.key===Le?U(H,Y,K,se):null;case b:return K.key===Le?J(H,Y,K,se):null;case D:return K=no(K),te(H,Y,K,se)}if(W(K)||Z(K))return Le!==null?null:ae(H,Y,K,se,null);if(typeof K.then=="function")return te(H,Y,kf(K),se);if(K.$$typeof===j)return te(H,Y,xf(H,K),se);jf(H,K)}return null}function ne(H,Y,K,se,Le){if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return H=H.get(K)||null,R(Y,H,""+se,Le);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case O:return H=H.get(se.key===null?K:se.key)||null,U(Y,H,se,Le);case b:return H=H.get(se.key===null?K:se.key)||null,J(Y,H,se,Le);case D:return se=no(se),ne(H,Y,K,se,Le)}if(W(se)||Z(se))return H=H.get(K)||null,ae(Y,H,se,Le,null);if(typeof se.then=="function")return ne(H,Y,K,kf(se),Le);if(se.$$typeof===j)return ne(H,Y,K,xf(Y,se),Le);jf(Y,se)}return null}function ke(H,Y,K,se){for(var Le=null,Ot=null,Ee=Y,Ye=Y=0,ct=null;Ee!==null&&Ye<K.length;Ye++){Ee.index>Ye?(ct=Ee,Ee=null):ct=Ee.sibling;var bt=te(H,Ee,K[Ye],se);if(bt===null){Ee===null&&(Ee=ct);break}o&&Ee&&bt.alternate===null&&u(H,Ee),Y=S(bt,Y,Ye),Ot===null?Le=bt:Ot.sibling=bt,Ot=bt,Ee=ct}if(Ye===K.length)return h(H,Ee),ut&&la(H,Ye),Le;if(Ee===null){for(;Ye<K.length;Ye++)Ee=oe(H,K[Ye],se),Ee!==null&&(Y=S(Ee,Y,Ye),Ot===null?Le=Ee:Ot.sibling=Ee,Ot=Ee);return ut&&la(H,Ye),Le}for(Ee=v(Ee);Ye<K.length;Ye++)ct=ne(Ee,H,Ye,K[Ye],se),ct!==null&&(o&&ct.alternate!==null&&Ee.delete(ct.key===null?Ye:ct.key),Y=S(ct,Y,Ye),Ot===null?Le=ct:Ot.sibling=ct,Ot=ct);return o&&Ee.forEach(function(hs){return u(H,hs)}),ut&&la(H,Ye),Le}function qe(H,Y,K,se){if(K==null)throw Error(r(151));for(var Le=null,Ot=null,Ee=Y,Ye=Y=0,ct=null,bt=K.next();Ee!==null&&!bt.done;Ye++,bt=K.next()){Ee.index>Ye?(ct=Ee,Ee=null):ct=Ee.sibling;var hs=te(H,Ee,bt.value,se);if(hs===null){Ee===null&&(Ee=ct);break}o&&Ee&&hs.alternate===null&&u(H,Ee),Y=S(hs,Y,Ye),Ot===null?Le=hs:Ot.sibling=hs,Ot=hs,Ee=ct}if(bt.done)return h(H,Ee),ut&&la(H,Ye),Le;if(Ee===null){for(;!bt.done;Ye++,bt=K.next())bt=oe(H,bt.value,se),bt!==null&&(Y=S(bt,Y,Ye),Ot===null?Le=bt:Ot.sibling=bt,Ot=bt);return ut&&la(H,Ye),Le}for(Ee=v(Ee);!bt.done;Ye++,bt=K.next())bt=ne(Ee,H,Ye,bt.value,se),bt!==null&&(o&&bt.alternate!==null&&Ee.delete(bt.key===null?Ye:bt.key),Y=S(bt,Y,Ye),Ot===null?Le=bt:Ot.sibling=bt,Ot=bt);return o&&Ee.forEach(function(ez){return u(H,ez)}),ut&&la(H,Ye),Le}function Et(H,Y,K,se){if(typeof K=="object"&&K!==null&&K.type===x&&K.key===null&&(K=K.props.children),typeof K=="object"&&K!==null){switch(K.$$typeof){case O:e:{for(var Le=K.key;Y!==null;){if(Y.key===Le){if(Le=K.type,Le===x){if(Y.tag===7){h(H,Y.sibling),se=y(Y,K.props.children),se.return=H,H=se;break e}}else if(Y.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===D&&no(Le)===Y.type){h(H,Y.sibling),se=y(Y,K.props),Dc(se,K),se.return=H,H=se;break e}h(H,Y);break}else u(H,Y);Y=Y.sibling}K.type===x?(se=Gs(K.props.children,H.mode,se,K.key),se.return=H,H=se):(se=Of(K.type,K.key,K.props,null,H.mode,se),Dc(se,K),se.return=H,H=se)}return C(H);case b:e:{for(Le=K.key;Y!==null;){if(Y.key===Le)if(Y.tag===4&&Y.stateNode.containerInfo===K.containerInfo&&Y.stateNode.implementation===K.implementation){h(H,Y.sibling),se=y(Y,K.children||[]),se.return=H,H=se;break e}else{h(H,Y);break}else u(H,Y);Y=Y.sibling}se=mg(K,H.mode,se),se.return=H,H=se}return C(H);case D:return K=no(K),Et(H,Y,K,se)}if(W(K))return ke(H,Y,K,se);if(Z(K)){if(Le=Z(K),typeof Le!="function")throw Error(r(150));return K=Le.call(K),qe(H,Y,K,se)}if(typeof K.then=="function")return Et(H,Y,kf(K),se);if(K.$$typeof===j)return Et(H,Y,xf(H,K),se);jf(H,K)}return typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint"?(K=""+K,Y!==null&&Y.tag===6?(h(H,Y.sibling),se=y(Y,K),se.return=H,H=se):(h(H,Y),se=hg(K,H.mode,se),se.return=H,H=se),C(H)):h(H,Y)}return function(H,Y,K,se){try{Mc=0;var Le=Et(H,Y,K,se);return cl=null,Le}catch(Ee){if(Ee===ll||Ee===wf)throw Ee;var Ot=jr(29,Ee,null,H.mode);return Ot.lanes=se,Ot.return=H,Ot}finally{}}}var io=Pw(!0),Nw=Pw(!1),Ha=!1;function jg(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Tg(o,u){o=o.updateQueue,u.updateQueue===o&&(u.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,callbacks:null})}function Ga(o){return{lane:o,tag:0,payload:null,callback:null,next:null}}function Ka(o,u,h){var v=o.updateQueue;if(v===null)return null;if(v=v.shared,(yt&2)!==0){var y=v.pending;return y===null?u.next=u:(u.next=y.next,y.next=u),v.pending=u,u=vf(o),gw(o,null,h),u}return gf(o,v,u,h),vf(o)}function Lc(o,u,h){if(u=u.updateQueue,u!==null&&(u=u.shared,(h&4194048)!==0)){var v=u.lanes;v&=o.pendingLanes,h|=v,u.lanes=h,je(o,h)}}function Cg(o,u){var h=o.updateQueue,v=o.alternate;if(v!==null&&(v=v.updateQueue,h===v)){var y=null,S=null;if(h=h.firstBaseUpdate,h!==null){do{var C={lane:h.lane,tag:h.tag,payload:h.payload,callback:null,next:null};S===null?y=S=C:S=S.next=C,h=h.next}while(h!==null);S===null?y=S=u:S=S.next=u}else y=S=u;h={baseState:v.baseState,firstBaseUpdate:y,lastBaseUpdate:S,shared:v.shared,callbacks:v.callbacks},o.updateQueue=h;return}o=h.lastBaseUpdate,o===null?h.firstBaseUpdate=u:o.next=u,h.lastBaseUpdate=u}var Eg=!1;function zc(){if(Eg){var o=ol;if(o!==null)throw o}}function $c(o,u,h,v){Eg=!1;var y=o.updateQueue;Ha=!1;var S=y.firstBaseUpdate,C=y.lastBaseUpdate,R=y.shared.pending;if(R!==null){y.shared.pending=null;var U=R,J=U.next;U.next=null,C===null?S=J:C.next=J,C=U;var ae=o.alternate;ae!==null&&(ae=ae.updateQueue,R=ae.lastBaseUpdate,R!==C&&(R===null?ae.firstBaseUpdate=J:R.next=J,ae.lastBaseUpdate=U))}if(S!==null){var oe=y.baseState;C=0,ae=J=U=null,R=S;do{var te=R.lane&-536870913,ne=te!==R.lane;if(ne?(lt&te)===te:(v&te)===te){te!==0&&te===sl&&(Eg=!0),ae!==null&&(ae=ae.next={lane:0,tag:R.tag,payload:R.payload,callback:null,next:null});e:{var ke=o,qe=R;te=u;var Et=h;switch(qe.tag){case 1:if(ke=qe.payload,typeof ke=="function"){oe=ke.call(Et,oe,te);break e}oe=ke;break e;case 3:ke.flags=ke.flags&-65537|128;case 0:if(ke=qe.payload,te=typeof ke=="function"?ke.call(Et,oe,te):ke,te==null)break e;oe=m({},oe,te);break e;case 2:Ha=!0}}te=R.callback,te!==null&&(o.flags|=64,ne&&(o.flags|=8192),ne=y.callbacks,ne===null?y.callbacks=[te]:ne.push(te))}else ne={lane:te,tag:R.tag,payload:R.payload,callback:R.callback,next:null},ae===null?(J=ae=ne,U=oe):ae=ae.next=ne,C|=te;if(R=R.next,R===null){if(R=y.shared.pending,R===null)break;ne=R,R=ne.next,ne.next=null,y.lastBaseUpdate=ne,y.shared.pending=null}}while(!0);ae===null&&(U=oe),y.baseState=U,y.firstBaseUpdate=J,y.lastBaseUpdate=ae,S===null&&(y.shared.lanes=0),rs|=C,o.lanes=C,o.memoizedState=oe}}function Rw(o,u){if(typeof o!="function")throw Error(r(191,o));o.call(u)}function Mw(o,u){var h=o.callbacks;if(h!==null)for(o.callbacks=null,o=0;o<h.length;o++)Rw(h[o],u)}var ul=G(null),Tf=G(0);function Dw(o,u){o=ba,M(Tf,o),M(ul,u),ba=o|u.baseLanes}function Ag(){M(Tf,ba),M(ul,ul.current)}function Qg(){ba=Tf.current,re(ul),re(Tf)}var Tr=G(null),Fr=null;function Ja(o){var u=o.alternate;M(sn,sn.current&1),M(Tr,o),Fr===null&&(u===null||ul.current!==null||u.memoizedState!==null)&&(Fr=o)}function Pg(o){M(sn,sn.current),M(Tr,o),Fr===null&&(Fr=o)}function Lw(o){o.tag===22?(M(sn,sn.current),M(Tr,o),Fr===null&&(Fr=o)):es()}function es(){M(sn,sn.current),M(Tr,Tr.current)}function Cr(o){re(Tr),Fr===o&&(Fr=null),re(sn)}var sn=G(0);function Cf(o){for(var u=o;u!==null;){if(u.tag===13){var h=u.memoizedState;if(h!==null&&(h=h.dehydrated,h===null||zv(h)||$v(h)))return u}else if(u.tag===19&&(u.memoizedProps.revealOrder==="forwards"||u.memoizedProps.revealOrder==="backwards"||u.memoizedProps.revealOrder==="unstable_legacy-backwards"||u.memoizedProps.revealOrder==="together")){if((u.flags&128)!==0)return u}else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===o)break;for(;u.sibling===null;){if(u.return===null||u.return===o)return null;u=u.return}u.sibling.return=u.return,u=u.sibling}return null}var da=0,Ue=null,Tt=null,hn=null,Ef=!1,dl=!1,ao=!1,Af=0,Ic=0,fl=null,BL=0;function Jt(){throw Error(r(321))}function Ng(o,u){if(u===null)return!1;for(var h=0;h<u.length&&h<o.length;h++)if(!kr(o[h],u[h]))return!1;return!0}function Rg(o,u,h,v,y,S){return da=S,Ue=u,u.memoizedState=null,u.updateQueue=null,u.lanes=0,I.H=o===null||o.memoizedState===null?y_:Fg,ao=!1,S=h(v,y),ao=!1,dl&&(S=$w(u,h,v,y)),zw(o),S}function zw(o){I.H=Zc;var u=Tt!==null&&Tt.next!==null;if(da=0,hn=Tt=Ue=null,Ef=!1,Ic=0,fl=null,u)throw Error(r(300));o===null||mn||(o=o.dependencies,o!==null&&yf(o)&&(mn=!0))}function $w(o,u,h,v){Ue=o;var y=0;do{if(dl&&(fl=null),Ic=0,dl=!1,25<=y)throw Error(r(301));if(y+=1,hn=Tt=null,o.updateQueue!=null){var S=o.updateQueue;S.lastEffect=null,S.events=null,S.stores=null,S.memoCache!=null&&(S.memoCache.index=0)}I.H=x_,S=u(h,v)}while(dl);return S}function VL(){var o=I.H,u=o.useState()[0];return u=typeof u.then=="function"?qc(u):u,o=o.useState()[0],(Tt!==null?Tt.memoizedState:null)!==o&&(Ue.flags|=1024),u}function Mg(){var o=Af!==0;return Af=0,o}function Dg(o,u,h){u.updateQueue=o.updateQueue,u.flags&=-2053,o.lanes&=~h}function Lg(o){if(Ef){for(o=o.memoizedState;o!==null;){var u=o.queue;u!==null&&(u.pending=null),o=o.next}Ef=!1}da=0,hn=Tt=Ue=null,dl=!1,Ic=Af=0,fl=null}function Fn(){var o={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return hn===null?Ue.memoizedState=hn=o:hn=hn.next=o,hn}function on(){if(Tt===null){var o=Ue.alternate;o=o!==null?o.memoizedState:null}else o=Tt.next;var u=hn===null?Ue.memoizedState:hn.next;if(u!==null)hn=u,Tt=o;else{if(o===null)throw Ue.alternate===null?Error(r(467)):Error(r(310));Tt=o,o={memoizedState:Tt.memoizedState,baseState:Tt.baseState,baseQueue:Tt.baseQueue,queue:Tt.queue,next:null},hn===null?Ue.memoizedState=hn=o:hn=hn.next=o}return hn}function Qf(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function qc(o){var u=Ic;return Ic+=1,fl===null&&(fl=[]),o=Ew(fl,o,u),u=Ue,(hn===null?u.memoizedState:hn.next)===null&&(u=u.alternate,I.H=u===null||u.memoizedState===null?y_:Fg),o}function Pf(o){if(o!==null&&typeof o=="object"){if(typeof o.then=="function")return qc(o);if(o.$$typeof===j)return Nn(o)}throw Error(r(438,String(o)))}function zg(o){var u=null,h=Ue.updateQueue;if(h!==null&&(u=h.memoCache),u==null){var v=Ue.alternate;v!==null&&(v=v.updateQueue,v!==null&&(v=v.memoCache,v!=null&&(u={data:v.data.map(function(y){return y.slice()}),index:0})))}if(u==null&&(u={data:[],index:0}),h===null&&(h=Qf(),Ue.updateQueue=h),h.memoCache=u,h=u.data[u.index],h===void 0)for(h=u.data[u.index]=Array(o),v=0;v<o;v++)h[v]=A;return u.index++,h}function fa(o,u){return typeof u=="function"?u(o):u}function Nf(o){var u=on();return $g(u,Tt,o)}function $g(o,u,h){var v=o.queue;if(v===null)throw Error(r(311));v.lastRenderedReducer=h;var y=o.baseQueue,S=v.pending;if(S!==null){if(y!==null){var C=y.next;y.next=S.next,S.next=C}u.baseQueue=y=S,v.pending=null}if(S=o.baseState,y===null)o.memoizedState=S;else{u=y.next;var R=C=null,U=null,J=u,ae=!1;do{var oe=J.lane&-536870913;if(oe!==J.lane?(lt&oe)===oe:(da&oe)===oe){var te=J.revertLane;if(te===0)U!==null&&(U=U.next={lane:0,revertLane:0,gesture:null,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null}),oe===sl&&(ae=!0);else if((da&te)===te){J=J.next,te===sl&&(ae=!0);continue}else oe={lane:0,revertLane:J.revertLane,gesture:null,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null},U===null?(R=U=oe,C=S):U=U.next=oe,Ue.lanes|=te,rs|=te;oe=J.action,ao&&h(S,oe),S=J.hasEagerState?J.eagerState:h(S,oe)}else te={lane:oe,revertLane:J.revertLane,gesture:J.gesture,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null},U===null?(R=U=te,C=S):U=U.next=te,Ue.lanes|=oe,rs|=oe;J=J.next}while(J!==null&&J!==u);if(U===null?C=S:U.next=R,!kr(S,o.memoizedState)&&(mn=!0,ae&&(h=ol,h!==null)))throw h;o.memoizedState=S,o.baseState=C,o.baseQueue=U,v.lastRenderedState=S}return y===null&&(v.lanes=0),[o.memoizedState,v.dispatch]}function Ig(o){var u=on(),h=u.queue;if(h===null)throw Error(r(311));h.lastRenderedReducer=o;var v=h.dispatch,y=h.pending,S=u.memoizedState;if(y!==null){h.pending=null;var C=y=y.next;do S=o(S,C.action),C=C.next;while(C!==y);kr(S,u.memoizedState)||(mn=!0),u.memoizedState=S,u.baseQueue===null&&(u.baseState=S),h.lastRenderedState=S}return[S,v]}function Iw(o,u,h){var v=Ue,y=on(),S=ut;if(S){if(h===void 0)throw Error(r(407));h=h()}else h=u();var C=!kr((Tt||y).memoizedState,h);if(C&&(y.memoizedState=h,mn=!0),y=y.queue,Zg(Zw.bind(null,v,y,o),[o]),y.getSnapshot!==u||C||hn!==null&&hn.memoizedState.tag&1){if(v.flags|=2048,hl(9,{destroy:void 0},Xw.bind(null,v,y,h,u),null),Pt===null)throw Error(r(349));S||(da&127)!==0||qw(v,u,h)}return h}function qw(o,u,h){o.flags|=16384,o={getSnapshot:u,value:h},u=Ue.updateQueue,u===null?(u=Qf(),Ue.updateQueue=u,u.stores=[o]):(h=u.stores,h===null?u.stores=[o]:h.push(o))}function Xw(o,u,h,v){u.value=h,u.getSnapshot=v,Bw(u)&&Vw(o)}function Zw(o,u,h){return h(function(){Bw(u)&&Vw(o)})}function Bw(o){var u=o.getSnapshot;o=o.value;try{var h=u();return!kr(o,h)}catch{return!0}}function Vw(o){var u=Hs(o,2);u!==null&&dr(u,o,2)}function qg(o){var u=Fn();if(typeof o=="function"){var h=o;if(o=h(),ao){Kt(!0);try{h()}finally{Kt(!1)}}}return u.memoizedState=u.baseState=o,u.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:fa,lastRenderedState:o},u}function Uw(o,u,h,v){return o.baseState=h,$g(o,Tt,typeof v=="function"?v:fa)}function UL(o,u,h,v,y){if(Df(o))throw Error(r(485));if(o=u.action,o!==null){var S={payload:y,action:o,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(C){S.listeners.push(C)}};I.T!==null?h(!0):S.isTransition=!1,v(S),h=u.pending,h===null?(S.next=u.pending=S,Yw(u,S)):(S.next=h.next,u.pending=h.next=S)}}function Yw(o,u){var h=u.action,v=u.payload,y=o.state;if(u.isTransition){var S=I.T,C={};I.T=C;try{var R=h(y,v),U=I.S;U!==null&&U(C,R),Ww(o,u,R)}catch(J){Xg(o,u,J)}finally{S!==null&&C.types!==null&&(S.types=C.types),I.T=S}}else try{S=h(y,v),Ww(o,u,S)}catch(J){Xg(o,u,J)}}function Ww(o,u,h){h!==null&&typeof h=="object"&&typeof h.then=="function"?h.then(function(v){Fw(o,u,v)},function(v){return Xg(o,u,v)}):Fw(o,u,h)}function Fw(o,u,h){u.status="fulfilled",u.value=h,Hw(u),o.state=h,u=o.pending,u!==null&&(h=u.next,h===u?o.pending=null:(h=h.next,u.next=h,Yw(o,h)))}function Xg(o,u,h){var v=o.pending;if(o.pending=null,v!==null){v=v.next;do u.status="rejected",u.reason=h,Hw(u),u=u.next;while(u!==v)}o.action=null}function Hw(o){o=o.listeners;for(var u=0;u<o.length;u++)(0,o[u])()}function Gw(o,u){return u}function Kw(o,u){if(ut){var h=Pt.formState;if(h!==null){e:{var v=Ue;if(ut){if(Bt){t:{for(var y=Bt,S=Wr;y.nodeType!==8;){if(!S){y=null;break t}if(y=Hr(y.nextSibling),y===null){y=null;break t}}S=y.data,y=S==="F!"||S==="F"?y:null}if(y){Bt=Hr(y.nextSibling),v=y.data==="F!";break e}}Wa(v)}v=!1}v&&(u=h[0])}}return h=Fn(),h.memoizedState=h.baseState=u,v={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Gw,lastRenderedState:u},h.queue=v,h=v_.bind(null,Ue,v),v.dispatch=h,v=qg(!1),S=Wg.bind(null,Ue,!1,v.queue),v=Fn(),y={state:u,dispatch:null,action:o,pending:null},v.queue=y,h=UL.bind(null,Ue,y,S,h),y.dispatch=h,v.memoizedState=o,[u,h,!1]}function Jw(o){var u=on();return e_(u,Tt,o)}function e_(o,u,h){if(u=$g(o,u,Gw)[0],o=Nf(fa)[0],typeof u=="object"&&u!==null&&typeof u.then=="function")try{var v=qc(u)}catch(C){throw C===ll?wf:C}else v=u;u=on();var y=u.queue,S=y.dispatch;return h!==u.memoizedState&&(Ue.flags|=2048,hl(9,{destroy:void 0},YL.bind(null,y,h),null)),[v,S,o]}function YL(o,u){o.action=u}function t_(o){var u=on(),h=Tt;if(h!==null)return e_(u,h,o);on(),u=u.memoizedState,h=on();var v=h.queue.dispatch;return h.memoizedState=o,[u,v,!1]}function hl(o,u,h,v){return o={tag:o,create:h,deps:v,inst:u,next:null},u=Ue.updateQueue,u===null&&(u=Qf(),Ue.updateQueue=u),h=u.lastEffect,h===null?u.lastEffect=o.next=o:(v=h.next,h.next=o,o.next=v,u.lastEffect=o),o}function n_(){return on().memoizedState}function Rf(o,u,h,v){var y=Fn();Ue.flags|=o,y.memoizedState=hl(1|u,{destroy:void 0},h,v===void 0?null:v)}function Mf(o,u,h,v){var y=on();v=v===void 0?null:v;var S=y.memoizedState.inst;Tt!==null&&v!==null&&Ng(v,Tt.memoizedState.deps)?y.memoizedState=hl(u,S,h,v):(Ue.flags|=o,y.memoizedState=hl(1|u,S,h,v))}function r_(o,u){Rf(8390656,8,o,u)}function Zg(o,u){Mf(2048,8,o,u)}function WL(o){Ue.flags|=4;var u=Ue.updateQueue;if(u===null)u=Qf(),Ue.updateQueue=u,u.events=[o];else{var h=u.events;h===null?u.events=[o]:h.push(o)}}function i_(o){var u=on().memoizedState;return WL({ref:u,nextImpl:o}),function(){if((yt&2)!==0)throw Error(r(440));return u.impl.apply(void 0,arguments)}}function a_(o,u){return Mf(4,2,o,u)}function s_(o,u){return Mf(4,4,o,u)}function o_(o,u){if(typeof u=="function"){o=o();var h=u(o);return function(){typeof h=="function"?h():u(null)}}if(u!=null)return o=o(),u.current=o,function(){u.current=null}}function l_(o,u,h){h=h!=null?h.concat([o]):null,Mf(4,4,o_.bind(null,u,o),h)}function Bg(){}function c_(o,u){var h=on();u=u===void 0?null:u;var v=h.memoizedState;return u!==null&&Ng(u,v[1])?v[0]:(h.memoizedState=[o,u],o)}function u_(o,u){var h=on();u=u===void 0?null:u;var v=h.memoizedState;if(u!==null&&Ng(u,v[1]))return v[0];if(v=o(),ao){Kt(!0);try{o()}finally{Kt(!1)}}return h.memoizedState=[v,u],v}function Vg(o,u,h){return h===void 0||(da&1073741824)!==0&&(lt&261930)===0?o.memoizedState=u:(o.memoizedState=h,o=d1(),Ue.lanes|=o,rs|=o,h)}function d_(o,u,h,v){return kr(h,u)?h:ul.current!==null?(o=Vg(o,h,v),kr(o,u)||(mn=!0),o):(da&42)===0||(da&1073741824)!==0&&(lt&261930)===0?(mn=!0,o.memoizedState=h):(o=d1(),Ue.lanes|=o,rs|=o,u)}function f_(o,u,h,v,y){var S=z.p;z.p=S!==0&&8>S?S:8;var C=I.T,R={};I.T=R,Wg(o,!1,u,h);try{var U=y(),J=I.S;if(J!==null&&J(R,U),U!==null&&typeof U=="object"&&typeof U.then=="function"){var ae=ZL(U,v);Xc(o,u,ae,Qr(o))}else Xc(o,u,v,Qr(o))}catch(oe){Xc(o,u,{then:function(){},status:"rejected",reason:oe},Qr())}finally{z.p=S,C!==null&&R.types!==null&&(C.types=R.types),I.T=C}}function FL(){}function Ug(o,u,h,v){if(o.tag!==5)throw Error(r(476));var y=h_(o).queue;f_(o,y,u,ee,h===null?FL:function(){return m_(o),h(v)})}function h_(o){var u=o.memoizedState;if(u!==null)return u;u={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fa,lastRenderedState:ee},next:null};var h={};return u.next={memoizedState:h,baseState:h,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fa,lastRenderedState:h},next:null},o.memoizedState=u,o=o.alternate,o!==null&&(o.memoizedState=u),u}function m_(o){var u=h_(o);u.next===null&&(u=o.alternate.memoizedState),Xc(o,u.next.queue,{},Qr())}function Yg(){return Nn(au)}function p_(){return on().memoizedState}function g_(){return on().memoizedState}function HL(o){for(var u=o.return;u!==null;){switch(u.tag){case 24:case 3:var h=Qr();o=Ga(h);var v=Ka(u,o,h);v!==null&&(dr(v,u,h),Lc(v,u,h)),u={cache:Sg()},o.payload=u;return}u=u.return}}function GL(o,u,h){var v=Qr();h={lane:v,revertLane:0,gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null},Df(o)?O_(u,h):(h=dg(o,u,h,v),h!==null&&(dr(h,o,v),b_(h,u,v)))}function v_(o,u,h){var v=Qr();Xc(o,u,h,v)}function Xc(o,u,h,v){var y={lane:v,revertLane:0,gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null};if(Df(o))O_(u,y);else{var S=o.alternate;if(o.lanes===0&&(S===null||S.lanes===0)&&(S=u.lastRenderedReducer,S!==null))try{var C=u.lastRenderedState,R=S(C,h);if(y.hasEagerState=!0,y.eagerState=R,kr(R,C))return gf(o,u,y,0),Pt===null&&pf(),!1}catch{}finally{}if(h=dg(o,u,y,v),h!==null)return dr(h,o,v),b_(h,u,v),!0}return!1}function Wg(o,u,h,v){if(v={lane:2,revertLane:jv(),gesture:null,action:v,hasEagerState:!1,eagerState:null,next:null},Df(o)){if(u)throw Error(r(479))}else u=dg(o,h,v,2),u!==null&&dr(u,o,2)}function Df(o){var u=o.alternate;return o===Ue||u!==null&&u===Ue}function O_(o,u){dl=Ef=!0;var h=o.pending;h===null?u.next=u:(u.next=h.next,h.next=u),o.pending=u}function b_(o,u,h){if((h&4194048)!==0){var v=u.lanes;v&=o.pendingLanes,h|=v,u.lanes=h,je(o,h)}}var Zc={readContext:Nn,use:Pf,useCallback:Jt,useContext:Jt,useEffect:Jt,useImperativeHandle:Jt,useLayoutEffect:Jt,useInsertionEffect:Jt,useMemo:Jt,useReducer:Jt,useRef:Jt,useState:Jt,useDebugValue:Jt,useDeferredValue:Jt,useTransition:Jt,useSyncExternalStore:Jt,useId:Jt,useHostTransitionStatus:Jt,useFormState:Jt,useActionState:Jt,useOptimistic:Jt,useMemoCache:Jt,useCacheRefresh:Jt};Zc.useEffectEvent=Jt;var y_={readContext:Nn,use:Pf,useCallback:function(o,u){return Fn().memoizedState=[o,u===void 0?null:u],o},useContext:Nn,useEffect:r_,useImperativeHandle:function(o,u,h){h=h!=null?h.concat([o]):null,Rf(4194308,4,o_.bind(null,u,o),h)},useLayoutEffect:function(o,u){return Rf(4194308,4,o,u)},useInsertionEffect:function(o,u){Rf(4,2,o,u)},useMemo:function(o,u){var h=Fn();u=u===void 0?null:u;var v=o();if(ao){Kt(!0);try{o()}finally{Kt(!1)}}return h.memoizedState=[v,u],v},useReducer:function(o,u,h){var v=Fn();if(h!==void 0){var y=h(u);if(ao){Kt(!0);try{h(u)}finally{Kt(!1)}}}else y=u;return v.memoizedState=v.baseState=y,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:y},v.queue=o,o=o.dispatch=GL.bind(null,Ue,o),[v.memoizedState,o]},useRef:function(o){var u=Fn();return o={current:o},u.memoizedState=o},useState:function(o){o=qg(o);var u=o.queue,h=v_.bind(null,Ue,u);return u.dispatch=h,[o.memoizedState,h]},useDebugValue:Bg,useDeferredValue:function(o,u){var h=Fn();return Vg(h,o,u)},useTransition:function(){var o=qg(!1);return o=f_.bind(null,Ue,o.queue,!0,!1),Fn().memoizedState=o,[!1,o]},useSyncExternalStore:function(o,u,h){var v=Ue,y=Fn();if(ut){if(h===void 0)throw Error(r(407));h=h()}else{if(h=u(),Pt===null)throw Error(r(349));(lt&127)!==0||qw(v,u,h)}y.memoizedState=h;var S={value:h,getSnapshot:u};return y.queue=S,r_(Zw.bind(null,v,S,o),[o]),v.flags|=2048,hl(9,{destroy:void 0},Xw.bind(null,v,S,h,u),null),h},useId:function(){var o=Fn(),u=Pt.identifierPrefix;if(ut){var h=Ni,v=Pi;h=(v&~(1<<32-ht(v)-1)).toString(32)+h,u="_"+u+"R_"+h,h=Af++,0<h&&(u+="H"+h.toString(32)),u+="_"}else h=BL++,u="_"+u+"r_"+h.toString(32)+"_";return o.memoizedState=u},useHostTransitionStatus:Yg,useFormState:Kw,useActionState:Kw,useOptimistic:function(o){var u=Fn();u.memoizedState=u.baseState=o;var h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return u.queue=h,u=Wg.bind(null,Ue,!0,h),h.dispatch=u,[o,u]},useMemoCache:zg,useCacheRefresh:function(){return Fn().memoizedState=HL.bind(null,Ue)},useEffectEvent:function(o){var u=Fn(),h={impl:o};return u.memoizedState=h,function(){if((yt&2)!==0)throw Error(r(440));return h.impl.apply(void 0,arguments)}}},Fg={readContext:Nn,use:Pf,useCallback:c_,useContext:Nn,useEffect:Zg,useImperativeHandle:l_,useInsertionEffect:a_,useLayoutEffect:s_,useMemo:u_,useReducer:Nf,useRef:n_,useState:function(){return Nf(fa)},useDebugValue:Bg,useDeferredValue:function(o,u){var h=on();return d_(h,Tt.memoizedState,o,u)},useTransition:function(){var o=Nf(fa)[0],u=on().memoizedState;return[typeof o=="boolean"?o:qc(o),u]},useSyncExternalStore:Iw,useId:p_,useHostTransitionStatus:Yg,useFormState:Jw,useActionState:Jw,useOptimistic:function(o,u){var h=on();return Uw(h,Tt,o,u)},useMemoCache:zg,useCacheRefresh:g_};Fg.useEffectEvent=i_;var x_={readContext:Nn,use:Pf,useCallback:c_,useContext:Nn,useEffect:Zg,useImperativeHandle:l_,useInsertionEffect:a_,useLayoutEffect:s_,useMemo:u_,useReducer:Ig,useRef:n_,useState:function(){return Ig(fa)},useDebugValue:Bg,useDeferredValue:function(o,u){var h=on();return Tt===null?Vg(h,o,u):d_(h,Tt.memoizedState,o,u)},useTransition:function(){var o=Ig(fa)[0],u=on().memoizedState;return[typeof o=="boolean"?o:qc(o),u]},useSyncExternalStore:Iw,useId:p_,useHostTransitionStatus:Yg,useFormState:t_,useActionState:t_,useOptimistic:function(o,u){var h=on();return Tt!==null?Uw(h,Tt,o,u):(h.baseState=o,[o,h.queue.dispatch])},useMemoCache:zg,useCacheRefresh:g_};x_.useEffectEvent=i_;function Hg(o,u,h,v){u=o.memoizedState,h=h(v,u),h=h==null?u:m({},u,h),o.memoizedState=h,o.lanes===0&&(o.updateQueue.baseState=h)}var Gg={enqueueSetState:function(o,u,h){o=o._reactInternals;var v=Qr(),y=Ga(v);y.payload=u,h!=null&&(y.callback=h),u=Ka(o,y,v),u!==null&&(dr(u,o,v),Lc(u,o,v))},enqueueReplaceState:function(o,u,h){o=o._reactInternals;var v=Qr(),y=Ga(v);y.tag=1,y.payload=u,h!=null&&(y.callback=h),u=Ka(o,y,v),u!==null&&(dr(u,o,v),Lc(u,o,v))},enqueueForceUpdate:function(o,u){o=o._reactInternals;var h=Qr(),v=Ga(h);v.tag=2,u!=null&&(v.callback=u),u=Ka(o,v,h),u!==null&&(dr(u,o,h),Lc(u,o,h))}};function S_(o,u,h,v,y,S,C){return o=o.stateNode,typeof o.shouldComponentUpdate=="function"?o.shouldComponentUpdate(v,S,C):u.prototype&&u.prototype.isPureReactComponent?!Ec(h,v)||!Ec(y,S):!0}function w_(o,u,h,v){o=u.state,typeof u.componentWillReceiveProps=="function"&&u.componentWillReceiveProps(h,v),typeof u.UNSAFE_componentWillReceiveProps=="function"&&u.UNSAFE_componentWillReceiveProps(h,v),u.state!==o&&Gg.enqueueReplaceState(u,u.state,null)}function so(o,u){var h=u;if("ref"in u){h={};for(var v in u)v!=="ref"&&(h[v]=u[v])}if(o=o.defaultProps){h===u&&(h=m({},h));for(var y in o)h[y]===void 0&&(h[y]=o[y])}return h}function __(o){mf(o)}function k_(o){console.error(o)}function j_(o){mf(o)}function Lf(o,u){try{var h=o.onUncaughtError;h(u.value,{componentStack:u.stack})}catch(v){setTimeout(function(){throw v})}}function T_(o,u,h){try{var v=o.onCaughtError;v(h.value,{componentStack:h.stack,errorBoundary:u.tag===1?u.stateNode:null})}catch(y){setTimeout(function(){throw y})}}function Kg(o,u,h){return h=Ga(h),h.tag=3,h.payload={element:null},h.callback=function(){Lf(o,u)},h}function C_(o){return o=Ga(o),o.tag=3,o}function E_(o,u,h,v){var y=h.type.getDerivedStateFromError;if(typeof y=="function"){var S=v.value;o.payload=function(){return y(S)},o.callback=function(){T_(u,h,v)}}var C=h.stateNode;C!==null&&typeof C.componentDidCatch=="function"&&(o.callback=function(){T_(u,h,v),typeof y!="function"&&(is===null?is=new Set([this]):is.add(this));var R=v.stack;this.componentDidCatch(v.value,{componentStack:R!==null?R:""})})}function KL(o,u,h,v,y){if(h.flags|=32768,v!==null&&typeof v=="object"&&typeof v.then=="function"){if(u=h.alternate,u!==null&&al(u,h,y,!0),h=Tr.current,h!==null){switch(h.tag){case 31:case 13:return Fr===null?Ff():h.alternate===null&&en===0&&(en=3),h.flags&=-257,h.flags|=65536,h.lanes=y,v===_f?h.flags|=16384:(u=h.updateQueue,u===null?h.updateQueue=new Set([v]):u.add(v),wv(o,v,y)),!1;case 22:return h.flags|=65536,v===_f?h.flags|=16384:(u=h.updateQueue,u===null?(u={transitions:null,markerInstances:null,retryQueue:new Set([v])},h.updateQueue=u):(h=u.retryQueue,h===null?u.retryQueue=new Set([v]):h.add(v)),wv(o,v,y)),!1}throw Error(r(435,h.tag))}return wv(o,v,y),Ff(),!1}if(ut)return u=Tr.current,u!==null?((u.flags&65536)===0&&(u.flags|=256),u.flags|=65536,u.lanes=y,v!==vg&&(o=Error(r(422),{cause:v}),Pc(Vr(o,h)))):(v!==vg&&(u=Error(r(423),{cause:v}),Pc(Vr(u,h))),o=o.current.alternate,o.flags|=65536,y&=-y,o.lanes|=y,v=Vr(v,h),y=Kg(o.stateNode,v,y),Cg(o,y),en!==4&&(en=2)),!1;var S=Error(r(520),{cause:v});if(S=Vr(S,h),Gc===null?Gc=[S]:Gc.push(S),en!==4&&(en=2),u===null)return!0;v=Vr(v,h),h=u;do{switch(h.tag){case 3:return h.flags|=65536,o=y&-y,h.lanes|=o,o=Kg(h.stateNode,v,o),Cg(h,o),!1;case 1:if(u=h.type,S=h.stateNode,(h.flags&128)===0&&(typeof u.getDerivedStateFromError=="function"||S!==null&&typeof S.componentDidCatch=="function"&&(is===null||!is.has(S))))return h.flags|=65536,y&=-y,h.lanes|=y,y=C_(y),E_(y,o,h,v),Cg(h,y),!1}h=h.return}while(h!==null);return!1}var Jg=Error(r(461)),mn=!1;function Rn(o,u,h,v){u.child=o===null?Nw(u,null,h,v):io(u,o.child,h,v)}function A_(o,u,h,v,y){h=h.render;var S=u.ref;if("ref"in v){var C={};for(var R in v)R!=="ref"&&(C[R]=v[R])}else C=v;return eo(u),v=Rg(o,u,h,C,S,y),R=Mg(),o!==null&&!mn?(Dg(o,u,y),ha(o,u,y)):(ut&&R&&pg(u),u.flags|=1,Rn(o,u,v,y),u.child)}function Q_(o,u,h,v,y){if(o===null){var S=h.type;return typeof S=="function"&&!fg(S)&&S.defaultProps===void 0&&h.compare===null?(u.tag=15,u.type=S,P_(o,u,S,v,y)):(o=Of(h.type,null,v,u,u.mode,y),o.ref=u.ref,o.return=u,u.child=o)}if(S=o.child,!ov(o,y)){var C=S.memoizedProps;if(h=h.compare,h=h!==null?h:Ec,h(C,v)&&o.ref===u.ref)return ha(o,u,y)}return u.flags|=1,o=oa(S,v),o.ref=u.ref,o.return=u,u.child=o}function P_(o,u,h,v,y){if(o!==null){var S=o.memoizedProps;if(Ec(S,v)&&o.ref===u.ref)if(mn=!1,u.pendingProps=v=S,ov(o,y))(o.flags&131072)!==0&&(mn=!0);else return u.lanes=o.lanes,ha(o,u,y)}return ev(o,u,h,v,y)}function N_(o,u,h,v){var y=v.children,S=o!==null?o.memoizedState:null;if(o===null&&u.stateNode===null&&(u.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),v.mode==="hidden"){if((u.flags&128)!==0){if(S=S!==null?S.baseLanes|h:h,o!==null){for(v=u.child=o.child,y=0;v!==null;)y=y|v.lanes|v.childLanes,v=v.sibling;v=y&~S}else v=0,u.child=null;return R_(o,u,S,h,v)}if((h&536870912)!==0)u.memoizedState={baseLanes:0,cachePool:null},o!==null&&Sf(u,S!==null?S.cachePool:null),S!==null?Dw(u,S):Ag(),Lw(u);else return v=u.lanes=536870912,R_(o,u,S!==null?S.baseLanes|h:h,h,v)}else S!==null?(Sf(u,S.cachePool),Dw(u,S),es(),u.memoizedState=null):(o!==null&&Sf(u,null),Ag(),es());return Rn(o,u,y,h),u.child}function Bc(o,u){return o!==null&&o.tag===22||u.stateNode!==null||(u.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.sibling}function R_(o,u,h,v,y){var S=_g();return S=S===null?null:{parent:fn._currentValue,pool:S},u.memoizedState={baseLanes:h,cachePool:S},o!==null&&Sf(u,null),Ag(),Lw(u),o!==null&&al(o,u,v,!0),u.childLanes=y,null}function zf(o,u){return u=If({mode:u.mode,children:u.children},o.mode),u.ref=o.ref,o.child=u,u.return=o,u}function M_(o,u,h){return io(u,o.child,null,h),o=zf(u,u.pendingProps),o.flags|=2,Cr(u),u.memoizedState=null,o}function JL(o,u,h){var v=u.pendingProps,y=(u.flags&128)!==0;if(u.flags&=-129,o===null){if(ut){if(v.mode==="hidden")return o=zf(u,v),u.lanes=536870912,Bc(null,o);if(Pg(u),(o=Bt)?(o=Y1(o,Wr),o=o!==null&&o.data==="&"?o:null,o!==null&&(u.memoizedState={dehydrated:o,treeContext:Ua!==null?{id:Pi,overflow:Ni}:null,retryLane:536870912,hydrationErrors:null},h=Ow(o),h.return=u,u.child=h,Pn=u,Bt=null)):o=null,o===null)throw Wa(u);return u.lanes=536870912,null}return zf(u,v)}var S=o.memoizedState;if(S!==null){var C=S.dehydrated;if(Pg(u),y)if(u.flags&256)u.flags&=-257,u=M_(o,u,h);else if(u.memoizedState!==null)u.child=o.child,u.flags|=128,u=null;else throw Error(r(558));else if(mn||al(o,u,h,!1),y=(h&o.childLanes)!==0,mn||y){if(v=Pt,v!==null&&(C=Ke(v,h),C!==0&&C!==S.retryLane))throw S.retryLane=C,Hs(o,C),dr(v,o,C),Jg;Ff(),u=M_(o,u,h)}else o=S.treeContext,Bt=Hr(C.nextSibling),Pn=u,ut=!0,Ya=null,Wr=!1,o!==null&&xw(u,o),u=zf(u,v),u.flags|=4096;return u}return o=oa(o.child,{mode:v.mode,children:v.children}),o.ref=u.ref,u.child=o,o.return=u,o}function $f(o,u){var h=u.ref;if(h===null)o!==null&&o.ref!==null&&(u.flags|=4194816);else{if(typeof h!="function"&&typeof h!="object")throw Error(r(284));(o===null||o.ref!==h)&&(u.flags|=4194816)}}function ev(o,u,h,v,y){return eo(u),h=Rg(o,u,h,v,void 0,y),v=Mg(),o!==null&&!mn?(Dg(o,u,y),ha(o,u,y)):(ut&&v&&pg(u),u.flags|=1,Rn(o,u,h,y),u.child)}function D_(o,u,h,v,y,S){return eo(u),u.updateQueue=null,h=$w(u,v,h,y),zw(o),v=Mg(),o!==null&&!mn?(Dg(o,u,S),ha(o,u,S)):(ut&&v&&pg(u),u.flags|=1,Rn(o,u,h,S),u.child)}function L_(o,u,h,v,y){if(eo(u),u.stateNode===null){var S=tl,C=h.contextType;typeof C=="object"&&C!==null&&(S=Nn(C)),S=new h(v,S),u.memoizedState=S.state!==null&&S.state!==void 0?S.state:null,S.updater=Gg,u.stateNode=S,S._reactInternals=u,S=u.stateNode,S.props=v,S.state=u.memoizedState,S.refs={},jg(u),C=h.contextType,S.context=typeof C=="object"&&C!==null?Nn(C):tl,S.state=u.memoizedState,C=h.getDerivedStateFromProps,typeof C=="function"&&(Hg(u,h,C,v),S.state=u.memoizedState),typeof h.getDerivedStateFromProps=="function"||typeof S.getSnapshotBeforeUpdate=="function"||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(C=S.state,typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount(),C!==S.state&&Gg.enqueueReplaceState(S,S.state,null),$c(u,v,S,y),zc(),S.state=u.memoizedState),typeof S.componentDidMount=="function"&&(u.flags|=4194308),v=!0}else if(o===null){S=u.stateNode;var R=u.memoizedProps,U=so(h,R);S.props=U;var J=S.context,ae=h.contextType;C=tl,typeof ae=="object"&&ae!==null&&(C=Nn(ae));var oe=h.getDerivedStateFromProps;ae=typeof oe=="function"||typeof S.getSnapshotBeforeUpdate=="function",R=u.pendingProps!==R,ae||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(R||J!==C)&&w_(u,S,v,C),Ha=!1;var te=u.memoizedState;S.state=te,$c(u,v,S,y),zc(),J=u.memoizedState,R||te!==J||Ha?(typeof oe=="function"&&(Hg(u,h,oe,v),J=u.memoizedState),(U=Ha||S_(u,h,U,v,te,J,C))?(ae||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount()),typeof S.componentDidMount=="function"&&(u.flags|=4194308)):(typeof S.componentDidMount=="function"&&(u.flags|=4194308),u.memoizedProps=v,u.memoizedState=J),S.props=v,S.state=J,S.context=C,v=U):(typeof S.componentDidMount=="function"&&(u.flags|=4194308),v=!1)}else{S=u.stateNode,Tg(o,u),C=u.memoizedProps,ae=so(h,C),S.props=ae,oe=u.pendingProps,te=S.context,J=h.contextType,U=tl,typeof J=="object"&&J!==null&&(U=Nn(J)),R=h.getDerivedStateFromProps,(J=typeof R=="function"||typeof S.getSnapshotBeforeUpdate=="function")||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(C!==oe||te!==U)&&w_(u,S,v,U),Ha=!1,te=u.memoizedState,S.state=te,$c(u,v,S,y),zc();var ne=u.memoizedState;C!==oe||te!==ne||Ha||o!==null&&o.dependencies!==null&&yf(o.dependencies)?(typeof R=="function"&&(Hg(u,h,R,v),ne=u.memoizedState),(ae=Ha||S_(u,h,ae,v,te,ne,U)||o!==null&&o.dependencies!==null&&yf(o.dependencies))?(J||typeof S.UNSAFE_componentWillUpdate!="function"&&typeof S.componentWillUpdate!="function"||(typeof S.componentWillUpdate=="function"&&S.componentWillUpdate(v,ne,U),typeof S.UNSAFE_componentWillUpdate=="function"&&S.UNSAFE_componentWillUpdate(v,ne,U)),typeof S.componentDidUpdate=="function"&&(u.flags|=4),typeof S.getSnapshotBeforeUpdate=="function"&&(u.flags|=1024)):(typeof S.componentDidUpdate!="function"||C===o.memoizedProps&&te===o.memoizedState||(u.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||C===o.memoizedProps&&te===o.memoizedState||(u.flags|=1024),u.memoizedProps=v,u.memoizedState=ne),S.props=v,S.state=ne,S.context=U,v=ae):(typeof S.componentDidUpdate!="function"||C===o.memoizedProps&&te===o.memoizedState||(u.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||C===o.memoizedProps&&te===o.memoizedState||(u.flags|=1024),v=!1)}return S=v,$f(o,u),v=(u.flags&128)!==0,S||v?(S=u.stateNode,h=v&&typeof h.getDerivedStateFromError!="function"?null:S.render(),u.flags|=1,o!==null&&v?(u.child=io(u,o.child,null,y),u.child=io(u,null,h,y)):Rn(o,u,h,y),u.memoizedState=S.state,o=u.child):o=ha(o,u,y),o}function z_(o,u,h,v){return Ks(),u.flags|=256,Rn(o,u,h,v),u.child}var tv={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function nv(o){return{baseLanes:o,cachePool:Tw()}}function rv(o,u,h){return o=o!==null?o.childLanes&~h:0,u&&(o|=Ar),o}function $_(o,u,h){var v=u.pendingProps,y=!1,S=(u.flags&128)!==0,C;if((C=S)||(C=o!==null&&o.memoizedState===null?!1:(sn.current&2)!==0),C&&(y=!0,u.flags&=-129),C=(u.flags&32)!==0,u.flags&=-33,o===null){if(ut){if(y?Ja(u):es(),(o=Bt)?(o=Y1(o,Wr),o=o!==null&&o.data!=="&"?o:null,o!==null&&(u.memoizedState={dehydrated:o,treeContext:Ua!==null?{id:Pi,overflow:Ni}:null,retryLane:536870912,hydrationErrors:null},h=Ow(o),h.return=u,u.child=h,Pn=u,Bt=null)):o=null,o===null)throw Wa(u);return $v(o)?u.lanes=32:u.lanes=536870912,null}var R=v.children;return v=v.fallback,y?(es(),y=u.mode,R=If({mode:"hidden",children:R},y),v=Gs(v,y,h,null),R.return=u,v.return=u,R.sibling=v,u.child=R,v=u.child,v.memoizedState=nv(h),v.childLanes=rv(o,C,h),u.memoizedState=tv,Bc(null,v)):(Ja(u),iv(u,R))}var U=o.memoizedState;if(U!==null&&(R=U.dehydrated,R!==null)){if(S)u.flags&256?(Ja(u),u.flags&=-257,u=av(o,u,h)):u.memoizedState!==null?(es(),u.child=o.child,u.flags|=128,u=null):(es(),R=v.fallback,y=u.mode,v=If({mode:"visible",children:v.children},y),R=Gs(R,y,h,null),R.flags|=2,v.return=u,R.return=u,v.sibling=R,u.child=v,io(u,o.child,null,h),v=u.child,v.memoizedState=nv(h),v.childLanes=rv(o,C,h),u.memoizedState=tv,u=Bc(null,v));else if(Ja(u),$v(R)){if(C=R.nextSibling&&R.nextSibling.dataset,C)var J=C.dgst;C=J,v=Error(r(419)),v.stack="",v.digest=C,Pc({value:v,source:null,stack:null}),u=av(o,u,h)}else if(mn||al(o,u,h,!1),C=(h&o.childLanes)!==0,mn||C){if(C=Pt,C!==null&&(v=Ke(C,h),v!==0&&v!==U.retryLane))throw U.retryLane=v,Hs(o,v),dr(C,o,v),Jg;zv(R)||Ff(),u=av(o,u,h)}else zv(R)?(u.flags|=192,u.child=o.child,u=null):(o=U.treeContext,Bt=Hr(R.nextSibling),Pn=u,ut=!0,Ya=null,Wr=!1,o!==null&&xw(u,o),u=iv(u,v.children),u.flags|=4096);return u}return y?(es(),R=v.fallback,y=u.mode,U=o.child,J=U.sibling,v=oa(U,{mode:"hidden",children:v.children}),v.subtreeFlags=U.subtreeFlags&65011712,J!==null?R=oa(J,R):(R=Gs(R,y,h,null),R.flags|=2),R.return=u,v.return=u,v.sibling=R,u.child=v,Bc(null,v),v=u.child,R=o.child.memoizedState,R===null?R=nv(h):(y=R.cachePool,y!==null?(U=fn._currentValue,y=y.parent!==U?{parent:U,pool:U}:y):y=Tw(),R={baseLanes:R.baseLanes|h,cachePool:y}),v.memoizedState=R,v.childLanes=rv(o,C,h),u.memoizedState=tv,Bc(o.child,v)):(Ja(u),h=o.child,o=h.sibling,h=oa(h,{mode:"visible",children:v.children}),h.return=u,h.sibling=null,o!==null&&(C=u.deletions,C===null?(u.deletions=[o],u.flags|=16):C.push(o)),u.child=h,u.memoizedState=null,h)}function iv(o,u){return u=If({mode:"visible",children:u},o.mode),u.return=o,o.child=u}function If(o,u){return o=jr(22,o,null,u),o.lanes=0,o}function av(o,u,h){return io(u,o.child,null,h),o=iv(u,u.pendingProps.children),o.flags|=2,u.memoizedState=null,o}function I_(o,u,h){o.lanes|=u;var v=o.alternate;v!==null&&(v.lanes|=u),yg(o.return,u,h)}function sv(o,u,h,v,y,S){var C=o.memoizedState;C===null?o.memoizedState={isBackwards:u,rendering:null,renderingStartTime:0,last:v,tail:h,tailMode:y,treeForkCount:S}:(C.isBackwards=u,C.rendering=null,C.renderingStartTime=0,C.last=v,C.tail=h,C.tailMode=y,C.treeForkCount=S)}function q_(o,u,h){var v=u.pendingProps,y=v.revealOrder,S=v.tail;v=v.children;var C=sn.current,R=(C&2)!==0;if(R?(C=C&1|2,u.flags|=128):C&=1,M(sn,C),Rn(o,u,v,h),v=ut?Qc:0,!R&&o!==null&&(o.flags&128)!==0)e:for(o=u.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&I_(o,h,u);else if(o.tag===19)I_(o,h,u);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===u)break e;for(;o.sibling===null;){if(o.return===null||o.return===u)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}switch(y){case"forwards":for(h=u.child,y=null;h!==null;)o=h.alternate,o!==null&&Cf(o)===null&&(y=h),h=h.sibling;h=y,h===null?(y=u.child,u.child=null):(y=h.sibling,h.sibling=null),sv(u,!1,y,h,S,v);break;case"backwards":case"unstable_legacy-backwards":for(h=null,y=u.child,u.child=null;y!==null;){if(o=y.alternate,o!==null&&Cf(o)===null){u.child=y;break}o=y.sibling,y.sibling=h,h=y,y=o}sv(u,!0,h,null,S,v);break;case"together":sv(u,!1,null,null,void 0,v);break;default:u.memoizedState=null}return u.child}function ha(o,u,h){if(o!==null&&(u.dependencies=o.dependencies),rs|=u.lanes,(h&u.childLanes)===0)if(o!==null){if(al(o,u,h,!1),(h&u.childLanes)===0)return null}else return null;if(o!==null&&u.child!==o.child)throw Error(r(153));if(u.child!==null){for(o=u.child,h=oa(o,o.pendingProps),u.child=h,h.return=u;o.sibling!==null;)o=o.sibling,h=h.sibling=oa(o,o.pendingProps),h.return=u;h.sibling=null}return u.child}function ov(o,u){return(o.lanes&u)!==0?!0:(o=o.dependencies,!!(o!==null&&yf(o)))}function e3(o,u,h){switch(u.tag){case 3:Re(u,u.stateNode.containerInfo),Fa(u,fn,o.memoizedState.cache),Ks();break;case 27:case 5:be(u);break;case 4:Re(u,u.stateNode.containerInfo);break;case 10:Fa(u,u.type,u.memoizedProps.value);break;case 31:if(u.memoizedState!==null)return u.flags|=128,Pg(u),null;break;case 13:var v=u.memoizedState;if(v!==null)return v.dehydrated!==null?(Ja(u),u.flags|=128,null):(h&u.child.childLanes)!==0?$_(o,u,h):(Ja(u),o=ha(o,u,h),o!==null?o.sibling:null);Ja(u);break;case 19:var y=(o.flags&128)!==0;if(v=(h&u.childLanes)!==0,v||(al(o,u,h,!1),v=(h&u.childLanes)!==0),y){if(v)return q_(o,u,h);u.flags|=128}if(y=u.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),M(sn,sn.current),v)break;return null;case 22:return u.lanes=0,N_(o,u,h,u.pendingProps);case 24:Fa(u,fn,o.memoizedState.cache)}return ha(o,u,h)}function X_(o,u,h){if(o!==null)if(o.memoizedProps!==u.pendingProps)mn=!0;else{if(!ov(o,h)&&(u.flags&128)===0)return mn=!1,e3(o,u,h);mn=(o.flags&131072)!==0}else mn=!1,ut&&(u.flags&1048576)!==0&&yw(u,Qc,u.index);switch(u.lanes=0,u.tag){case 16:e:{var v=u.pendingProps;if(o=no(u.elementType),u.type=o,typeof o=="function")fg(o)?(v=so(o,v),u.tag=1,u=L_(null,u,o,v,h)):(u.tag=0,u=ev(null,u,o,v,h));else{if(o!=null){var y=o.$$typeof;if(y===E){u.tag=11,u=A_(null,u,o,v,h);break e}else if(y===N){u.tag=14,u=Q_(null,u,o,v,h);break e}}throw u=$(o)||o,Error(r(306,u,""))}}return u;case 0:return ev(o,u,u.type,u.pendingProps,h);case 1:return v=u.type,y=so(v,u.pendingProps),L_(o,u,v,y,h);case 3:e:{if(Re(u,u.stateNode.containerInfo),o===null)throw Error(r(387));v=u.pendingProps;var S=u.memoizedState;y=S.element,Tg(o,u),$c(u,v,null,h);var C=u.memoizedState;if(v=C.cache,Fa(u,fn,v),v!==S.cache&&xg(u,[fn],h,!0),zc(),v=C.element,S.isDehydrated)if(S={element:v,isDehydrated:!1,cache:C.cache},u.updateQueue.baseState=S,u.memoizedState=S,u.flags&256){u=z_(o,u,v,h);break e}else if(v!==y){y=Vr(Error(r(424)),u),Pc(y),u=z_(o,u,v,h);break e}else{switch(o=u.stateNode.containerInfo,o.nodeType){case 9:o=o.body;break;default:o=o.nodeName==="HTML"?o.ownerDocument.body:o}for(Bt=Hr(o.firstChild),Pn=u,ut=!0,Ya=null,Wr=!0,h=Nw(u,null,v,h),u.child=h;h;)h.flags=h.flags&-3|4096,h=h.sibling}else{if(Ks(),v===y){u=ha(o,u,h);break e}Rn(o,u,v,h)}u=u.child}return u;case 26:return $f(o,u),o===null?(h=J1(u.type,null,u.pendingProps,null))?u.memoizedState=h:ut||(h=u.type,o=u.pendingProps,v=nh(Oe.current).createElement(h),v[xn]=u,v[In]=o,Mn(v,h,o),dn(v),u.stateNode=v):u.memoizedState=J1(u.type,o.memoizedProps,u.pendingProps,o.memoizedState),null;case 27:return be(u),o===null&&ut&&(v=u.stateNode=H1(u.type,u.pendingProps,Oe.current),Pn=u,Wr=!0,y=Bt,ls(u.type)?(Iv=y,Bt=Hr(v.firstChild)):Bt=y),Rn(o,u,u.pendingProps.children,h),$f(o,u),o===null&&(u.flags|=4194304),u.child;case 5:return o===null&&ut&&((y=v=Bt)&&(v=A3(v,u.type,u.pendingProps,Wr),v!==null?(u.stateNode=v,Pn=u,Bt=Hr(v.firstChild),Wr=!1,y=!0):y=!1),y||Wa(u)),be(u),y=u.type,S=u.pendingProps,C=o!==null?o.memoizedProps:null,v=S.children,Mv(y,S)?v=null:C!==null&&Mv(y,C)&&(u.flags|=32),u.memoizedState!==null&&(y=Rg(o,u,VL,null,null,h),au._currentValue=y),$f(o,u),Rn(o,u,v,h),u.child;case 6:return o===null&&ut&&((o=h=Bt)&&(h=Q3(h,u.pendingProps,Wr),h!==null?(u.stateNode=h,Pn=u,Bt=null,o=!0):o=!1),o||Wa(u)),null;case 13:return $_(o,u,h);case 4:return Re(u,u.stateNode.containerInfo),v=u.pendingProps,o===null?u.child=io(u,null,v,h):Rn(o,u,v,h),u.child;case 11:return A_(o,u,u.type,u.pendingProps,h);case 7:return Rn(o,u,u.pendingProps,h),u.child;case 8:return Rn(o,u,u.pendingProps.children,h),u.child;case 12:return Rn(o,u,u.pendingProps.children,h),u.child;case 10:return v=u.pendingProps,Fa(u,u.type,v.value),Rn(o,u,v.children,h),u.child;case 9:return y=u.type._context,v=u.pendingProps.children,eo(u),y=Nn(y),v=v(y),u.flags|=1,Rn(o,u,v,h),u.child;case 14:return Q_(o,u,u.type,u.pendingProps,h);case 15:return P_(o,u,u.type,u.pendingProps,h);case 19:return q_(o,u,h);case 31:return JL(o,u,h);case 22:return N_(o,u,h,u.pendingProps);case 24:return eo(u),v=Nn(fn),o===null?(y=_g(),y===null&&(y=Pt,S=Sg(),y.pooledCache=S,S.refCount++,S!==null&&(y.pooledCacheLanes|=h),y=S),u.memoizedState={parent:v,cache:y},jg(u),Fa(u,fn,y)):((o.lanes&h)!==0&&(Tg(o,u),$c(u,null,null,h),zc()),y=o.memoizedState,S=u.memoizedState,y.parent!==v?(y={parent:v,cache:v},u.memoizedState=y,u.lanes===0&&(u.memoizedState=u.updateQueue.baseState=y),Fa(u,fn,v)):(v=S.cache,Fa(u,fn,v),v!==y.cache&&xg(u,[fn],h,!0))),Rn(o,u,u.pendingProps.children,h),u.child;case 29:throw u.pendingProps}throw Error(r(156,u.tag))}function ma(o){o.flags|=4}function lv(o,u,h,v,y){if((u=(o.mode&32)!==0)&&(u=!1),u){if(o.flags|=16777216,(y&335544128)===y)if(o.stateNode.complete)o.flags|=8192;else if(p1())o.flags|=8192;else throw ro=_f,kg}else o.flags&=-16777217}function Z_(o,u){if(u.type!=="stylesheet"||(u.state.loading&4)!==0)o.flags&=-16777217;else if(o.flags|=16777216,!ik(u))if(p1())o.flags|=8192;else throw ro=_f,kg}function qf(o,u){u!==null&&(o.flags|=4),o.flags&16384&&(u=o.tag!==22?an():536870912,o.lanes|=u,vl|=u)}function Vc(o,u){if(!ut)switch(o.tailMode){case"hidden":u=o.tail;for(var h=null;u!==null;)u.alternate!==null&&(h=u),u=u.sibling;h===null?o.tail=null:h.sibling=null;break;case"collapsed":h=o.tail;for(var v=null;h!==null;)h.alternate!==null&&(v=h),h=h.sibling;v===null?u||o.tail===null?o.tail=null:o.tail.sibling=null:v.sibling=null}}function Vt(o){var u=o.alternate!==null&&o.alternate.child===o.child,h=0,v=0;if(u)for(var y=o.child;y!==null;)h|=y.lanes|y.childLanes,v|=y.subtreeFlags&65011712,v|=y.flags&65011712,y.return=o,y=y.sibling;else for(y=o.child;y!==null;)h|=y.lanes|y.childLanes,v|=y.subtreeFlags,v|=y.flags,y.return=o,y=y.sibling;return o.subtreeFlags|=v,o.childLanes=h,u}function t3(o,u,h){var v=u.pendingProps;switch(gg(u),u.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Vt(u),null;case 1:return Vt(u),null;case 3:return h=u.stateNode,v=null,o!==null&&(v=o.memoizedState.cache),u.memoizedState.cache!==v&&(u.flags|=2048),ua(fn),Xe(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(o===null||o.child===null)&&(il(u)?ma(u):o===null||o.memoizedState.isDehydrated&&(u.flags&256)===0||(u.flags|=1024,Og())),Vt(u),null;case 26:var y=u.type,S=u.memoizedState;return o===null?(ma(u),S!==null?(Vt(u),Z_(u,S)):(Vt(u),lv(u,y,null,v,h))):S?S!==o.memoizedState?(ma(u),Vt(u),Z_(u,S)):(Vt(u),u.flags&=-16777217):(o=o.memoizedProps,o!==v&&ma(u),Vt(u),lv(u,y,o,v,h)),null;case 27:if(Fe(u),h=Oe.current,y=u.type,o!==null&&u.stateNode!=null)o.memoizedProps!==v&&ma(u);else{if(!v){if(u.stateNode===null)throw Error(r(166));return Vt(u),null}o=he.current,il(u)?Sw(u):(o=H1(y,v,h),u.stateNode=o,ma(u))}return Vt(u),null;case 5:if(Fe(u),y=u.type,o!==null&&u.stateNode!=null)o.memoizedProps!==v&&ma(u);else{if(!v){if(u.stateNode===null)throw Error(r(166));return Vt(u),null}if(S=he.current,il(u))Sw(u);else{var C=nh(Oe.current);switch(S){case 1:S=C.createElementNS("http://www.w3.org/2000/svg",y);break;case 2:S=C.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;default:switch(y){case"svg":S=C.createElementNS("http://www.w3.org/2000/svg",y);break;case"math":S=C.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;case"script":S=C.createElement("div"),S.innerHTML="<script><\/script>",S=S.removeChild(S.firstChild);break;case"select":S=typeof v.is=="string"?C.createElement("select",{is:v.is}):C.createElement("select"),v.multiple?S.multiple=!0:v.size&&(S.size=v.size);break;default:S=typeof v.is=="string"?C.createElement(y,{is:v.is}):C.createElement(y)}}S[xn]=u,S[In]=v;e:for(C=u.child;C!==null;){if(C.tag===5||C.tag===6)S.appendChild(C.stateNode);else if(C.tag!==4&&C.tag!==27&&C.child!==null){C.child.return=C,C=C.child;continue}if(C===u)break e;for(;C.sibling===null;){if(C.return===null||C.return===u)break e;C=C.return}C.sibling.return=C.return,C=C.sibling}u.stateNode=S;e:switch(Mn(S,y,v),y){case"button":case"input":case"select":case"textarea":v=!!v.autoFocus;break e;case"img":v=!0;break e;default:v=!1}v&&ma(u)}}return Vt(u),lv(u,u.type,o===null?null:o.memoizedProps,u.pendingProps,h),null;case 6:if(o&&u.stateNode!=null)o.memoizedProps!==v&&ma(u);else{if(typeof v!="string"&&u.stateNode===null)throw Error(r(166));if(o=Oe.current,il(u)){if(o=u.stateNode,h=u.memoizedProps,v=null,y=Pn,y!==null)switch(y.tag){case 27:case 5:v=y.memoizedProps}o[xn]=u,o=!!(o.nodeValue===h||v!==null&&v.suppressHydrationWarning===!0||$1(o.nodeValue,h)),o||Wa(u,!0)}else o=nh(o).createTextNode(v),o[xn]=u,u.stateNode=o}return Vt(u),null;case 31:if(h=u.memoizedState,o===null||o.memoizedState!==null){if(v=il(u),h!==null){if(o===null){if(!v)throw Error(r(318));if(o=u.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(557));o[xn]=u}else Ks(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;Vt(u),o=!1}else h=Og(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=h),o=!0;if(!o)return u.flags&256?(Cr(u),u):(Cr(u),null);if((u.flags&128)!==0)throw Error(r(558))}return Vt(u),null;case 13:if(v=u.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if(y=il(u),v!==null&&v.dehydrated!==null){if(o===null){if(!y)throw Error(r(318));if(y=u.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(r(317));y[xn]=u}else Ks(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;Vt(u),y=!1}else y=Og(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=y),y=!0;if(!y)return u.flags&256?(Cr(u),u):(Cr(u),null)}return Cr(u),(u.flags&128)!==0?(u.lanes=h,u):(h=v!==null,o=o!==null&&o.memoizedState!==null,h&&(v=u.child,y=null,v.alternate!==null&&v.alternate.memoizedState!==null&&v.alternate.memoizedState.cachePool!==null&&(y=v.alternate.memoizedState.cachePool.pool),S=null,v.memoizedState!==null&&v.memoizedState.cachePool!==null&&(S=v.memoizedState.cachePool.pool),S!==y&&(v.flags|=2048)),h!==o&&h&&(u.child.flags|=8192),qf(u,u.updateQueue),Vt(u),null);case 4:return Xe(),o===null&&Av(u.stateNode.containerInfo),Vt(u),null;case 10:return ua(u.type),Vt(u),null;case 19:if(re(sn),v=u.memoizedState,v===null)return Vt(u),null;if(y=(u.flags&128)!==0,S=v.rendering,S===null)if(y)Vc(v,!1);else{if(en!==0||o!==null&&(o.flags&128)!==0)for(o=u.child;o!==null;){if(S=Cf(o),S!==null){for(u.flags|=128,Vc(v,!1),o=S.updateQueue,u.updateQueue=o,qf(u,o),u.subtreeFlags=0,o=h,h=u.child;h!==null;)vw(h,o),h=h.sibling;return M(sn,sn.current&1|2),ut&&la(u,v.treeForkCount),u.child}o=o.sibling}v.tail!==null&&et()>Uf&&(u.flags|=128,y=!0,Vc(v,!1),u.lanes=4194304)}else{if(!y)if(o=Cf(S),o!==null){if(u.flags|=128,y=!0,o=o.updateQueue,u.updateQueue=o,qf(u,o),Vc(v,!0),v.tail===null&&v.tailMode==="hidden"&&!S.alternate&&!ut)return Vt(u),null}else 2*et()-v.renderingStartTime>Uf&&h!==536870912&&(u.flags|=128,y=!0,Vc(v,!1),u.lanes=4194304);v.isBackwards?(S.sibling=u.child,u.child=S):(o=v.last,o!==null?o.sibling=S:u.child=S,v.last=S)}return v.tail!==null?(o=v.tail,v.rendering=o,v.tail=o.sibling,v.renderingStartTime=et(),o.sibling=null,h=sn.current,M(sn,y?h&1|2:h&1),ut&&la(u,v.treeForkCount),o):(Vt(u),null);case 22:case 23:return Cr(u),Qg(),v=u.memoizedState!==null,o!==null?o.memoizedState!==null!==v&&(u.flags|=8192):v&&(u.flags|=8192),v?(h&536870912)!==0&&(u.flags&128)===0&&(Vt(u),u.subtreeFlags&6&&(u.flags|=8192)):Vt(u),h=u.updateQueue,h!==null&&qf(u,h.retryQueue),h=null,o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(h=o.memoizedState.cachePool.pool),v=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(v=u.memoizedState.cachePool.pool),v!==h&&(u.flags|=2048),o!==null&&re(to),null;case 24:return h=null,o!==null&&(h=o.memoizedState.cache),u.memoizedState.cache!==h&&(u.flags|=2048),ua(fn),Vt(u),null;case 25:return null;case 30:return null}throw Error(r(156,u.tag))}function n3(o,u){switch(gg(u),u.tag){case 1:return o=u.flags,o&65536?(u.flags=o&-65537|128,u):null;case 3:return ua(fn),Xe(),o=u.flags,(o&65536)!==0&&(o&128)===0?(u.flags=o&-65537|128,u):null;case 26:case 27:case 5:return Fe(u),null;case 31:if(u.memoizedState!==null){if(Cr(u),u.alternate===null)throw Error(r(340));Ks()}return o=u.flags,o&65536?(u.flags=o&-65537|128,u):null;case 13:if(Cr(u),o=u.memoizedState,o!==null&&o.dehydrated!==null){if(u.alternate===null)throw Error(r(340));Ks()}return o=u.flags,o&65536?(u.flags=o&-65537|128,u):null;case 19:return re(sn),null;case 4:return Xe(),null;case 10:return ua(u.type),null;case 22:case 23:return Cr(u),Qg(),o!==null&&re(to),o=u.flags,o&65536?(u.flags=o&-65537|128,u):null;case 24:return ua(fn),null;case 25:return null;default:return null}}function B_(o,u){switch(gg(u),u.tag){case 3:ua(fn),Xe();break;case 26:case 27:case 5:Fe(u);break;case 4:Xe();break;case 31:u.memoizedState!==null&&Cr(u);break;case 13:Cr(u);break;case 19:re(sn);break;case 10:ua(u.type);break;case 22:case 23:Cr(u),Qg(),o!==null&&re(to);break;case 24:ua(fn)}}function Uc(o,u){try{var h=u.updateQueue,v=h!==null?h.lastEffect:null;if(v!==null){var y=v.next;h=y;do{if((h.tag&o)===o){v=void 0;var S=h.create,C=h.inst;v=S(),C.destroy=v}h=h.next}while(h!==y)}}catch(R){jt(u,u.return,R)}}function ts(o,u,h){try{var v=u.updateQueue,y=v!==null?v.lastEffect:null;if(y!==null){var S=y.next;v=S;do{if((v.tag&o)===o){var C=v.inst,R=C.destroy;if(R!==void 0){C.destroy=void 0,y=u;var U=h,J=R;try{J()}catch(ae){jt(y,U,ae)}}}v=v.next}while(v!==S)}}catch(ae){jt(u,u.return,ae)}}function V_(o){var u=o.updateQueue;if(u!==null){var h=o.stateNode;try{Mw(u,h)}catch(v){jt(o,o.return,v)}}}function U_(o,u,h){h.props=so(o.type,o.memoizedProps),h.state=o.memoizedState;try{h.componentWillUnmount()}catch(v){jt(o,u,v)}}function Yc(o,u){try{var h=o.ref;if(h!==null){switch(o.tag){case 26:case 27:case 5:var v=o.stateNode;break;case 30:v=o.stateNode;break;default:v=o.stateNode}typeof h=="function"?o.refCleanup=h(v):h.current=v}}catch(y){jt(o,u,y)}}function Ri(o,u){var h=o.ref,v=o.refCleanup;if(h!==null)if(typeof v=="function")try{v()}catch(y){jt(o,u,y)}finally{o.refCleanup=null,o=o.alternate,o!=null&&(o.refCleanup=null)}else if(typeof h=="function")try{h(null)}catch(y){jt(o,u,y)}else h.current=null}function Y_(o){var u=o.type,h=o.memoizedProps,v=o.stateNode;try{e:switch(u){case"button":case"input":case"select":case"textarea":h.autoFocus&&v.focus();break e;case"img":h.src?v.src=h.src:h.srcSet&&(v.srcset=h.srcSet)}}catch(y){jt(o,o.return,y)}}function cv(o,u,h){try{var v=o.stateNode;_3(v,o.type,h,u),v[In]=u}catch(y){jt(o,o.return,y)}}function W_(o){return o.tag===5||o.tag===3||o.tag===26||o.tag===27&&ls(o.type)||o.tag===4}function uv(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||W_(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.tag===27&&ls(o.type)||o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function dv(o,u,h){var v=o.tag;if(v===5||v===6)o=o.stateNode,u?(h.nodeType===9?h.body:h.nodeName==="HTML"?h.ownerDocument.body:h).insertBefore(o,u):(u=h.nodeType===9?h.body:h.nodeName==="HTML"?h.ownerDocument.body:h,u.appendChild(o),h=h._reactRootContainer,h!=null||u.onclick!==null||(u.onclick=aa));else if(v!==4&&(v===27&&ls(o.type)&&(h=o.stateNode,u=null),o=o.child,o!==null))for(dv(o,u,h),o=o.sibling;o!==null;)dv(o,u,h),o=o.sibling}function Xf(o,u,h){var v=o.tag;if(v===5||v===6)o=o.stateNode,u?h.insertBefore(o,u):h.appendChild(o);else if(v!==4&&(v===27&&ls(o.type)&&(h=o.stateNode),o=o.child,o!==null))for(Xf(o,u,h),o=o.sibling;o!==null;)Xf(o,u,h),o=o.sibling}function F_(o){var u=o.stateNode,h=o.memoizedProps;try{for(var v=o.type,y=u.attributes;y.length;)u.removeAttributeNode(y[0]);Mn(u,v,h),u[xn]=o,u[In]=h}catch(S){jt(o,o.return,S)}}var pa=!1,pn=!1,fv=!1,H_=typeof WeakSet=="function"?WeakSet:Set,En=null;function r3(o,u){if(o=o.containerInfo,Nv=ch,o=lw(o),ag(o)){if("selectionStart"in o)var h={start:o.selectionStart,end:o.selectionEnd};else e:{h=(h=o.ownerDocument)&&h.defaultView||window;var v=h.getSelection&&h.getSelection();if(v&&v.rangeCount!==0){h=v.anchorNode;var y=v.anchorOffset,S=v.focusNode;v=v.focusOffset;try{h.nodeType,S.nodeType}catch{h=null;break e}var C=0,R=-1,U=-1,J=0,ae=0,oe=o,te=null;t:for(;;){for(var ne;oe!==h||y!==0&&oe.nodeType!==3||(R=C+y),oe!==S||v!==0&&oe.nodeType!==3||(U=C+v),oe.nodeType===3&&(C+=oe.nodeValue.length),(ne=oe.firstChild)!==null;)te=oe,oe=ne;for(;;){if(oe===o)break t;if(te===h&&++J===y&&(R=C),te===S&&++ae===v&&(U=C),(ne=oe.nextSibling)!==null)break;oe=te,te=oe.parentNode}oe=ne}h=R===-1||U===-1?null:{start:R,end:U}}else h=null}h=h||{start:0,end:0}}else h=null;for(Rv={focusedElem:o,selectionRange:h},ch=!1,En=u;En!==null;)if(u=En,o=u.child,(u.subtreeFlags&1028)!==0&&o!==null)o.return=u,En=o;else for(;En!==null;){switch(u=En,S=u.alternate,o=u.flags,u.tag){case 0:if((o&4)!==0&&(o=u.updateQueue,o=o!==null?o.events:null,o!==null))for(h=0;h<o.length;h++)y=o[h],y.ref.impl=y.nextImpl;break;case 11:case 15:break;case 1:if((o&1024)!==0&&S!==null){o=void 0,h=u,y=S.memoizedProps,S=S.memoizedState,v=h.stateNode;try{var ke=so(h.type,y);o=v.getSnapshotBeforeUpdate(ke,S),v.__reactInternalSnapshotBeforeUpdate=o}catch(qe){jt(h,h.return,qe)}}break;case 3:if((o&1024)!==0){if(o=u.stateNode.containerInfo,h=o.nodeType,h===9)Lv(o);else if(h===1)switch(o.nodeName){case"HEAD":case"HTML":case"BODY":Lv(o);break;default:o.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((o&1024)!==0)throw Error(r(163))}if(o=u.sibling,o!==null){o.return=u.return,En=o;break}En=u.return}}function G_(o,u,h){var v=h.flags;switch(h.tag){case 0:case 11:case 15:va(o,h),v&4&&Uc(5,h);break;case 1:if(va(o,h),v&4)if(o=h.stateNode,u===null)try{o.componentDidMount()}catch(C){jt(h,h.return,C)}else{var y=so(h.type,u.memoizedProps);u=u.memoizedState;try{o.componentDidUpdate(y,u,o.__reactInternalSnapshotBeforeUpdate)}catch(C){jt(h,h.return,C)}}v&64&&V_(h),v&512&&Yc(h,h.return);break;case 3:if(va(o,h),v&64&&(o=h.updateQueue,o!==null)){if(u=null,h.child!==null)switch(h.child.tag){case 27:case 5:u=h.child.stateNode;break;case 1:u=h.child.stateNode}try{Mw(o,u)}catch(C){jt(h,h.return,C)}}break;case 27:u===null&&v&4&&F_(h);case 26:case 5:va(o,h),u===null&&v&4&&Y_(h),v&512&&Yc(h,h.return);break;case 12:va(o,h);break;case 31:va(o,h),v&4&&e1(o,h);break;case 13:va(o,h),v&4&&t1(o,h),v&64&&(o=h.memoizedState,o!==null&&(o=o.dehydrated,o!==null&&(h=f3.bind(null,h),P3(o,h))));break;case 22:if(v=h.memoizedState!==null||pa,!v){u=u!==null&&u.memoizedState!==null||pn,y=pa;var S=pn;pa=v,(pn=u)&&!S?Oa(o,h,(h.subtreeFlags&8772)!==0):va(o,h),pa=y,pn=S}break;case 30:break;default:va(o,h)}}function K_(o){var u=o.alternate;u!==null&&(o.alternate=null,K_(u)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(u=o.stateNode,u!==null&&xc(u)),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}var Wt=null,or=!1;function ga(o,u,h){for(h=h.child;h!==null;)J_(o,u,h),h=h.sibling}function J_(o,u,h){if(Xt&&typeof Xt.onCommitFiberUnmount=="function")try{Xt.onCommitFiberUnmount(rn,h)}catch{}switch(h.tag){case 26:pn||Ri(h,u),ga(o,u,h),h.memoizedState?h.memoizedState.count--:h.stateNode&&(h=h.stateNode,h.parentNode.removeChild(h));break;case 27:pn||Ri(h,u);var v=Wt,y=or;ls(h.type)&&(Wt=h.stateNode,or=!1),ga(o,u,h),nu(h.stateNode),Wt=v,or=y;break;case 5:pn||Ri(h,u);case 6:if(v=Wt,y=or,Wt=null,ga(o,u,h),Wt=v,or=y,Wt!==null)if(or)try{(Wt.nodeType===9?Wt.body:Wt.nodeName==="HTML"?Wt.ownerDocument.body:Wt).removeChild(h.stateNode)}catch(S){jt(h,u,S)}else try{Wt.removeChild(h.stateNode)}catch(S){jt(h,u,S)}break;case 18:Wt!==null&&(or?(o=Wt,V1(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,h.stateNode),kl(o)):V1(Wt,h.stateNode));break;case 4:v=Wt,y=or,Wt=h.stateNode.containerInfo,or=!0,ga(o,u,h),Wt=v,or=y;break;case 0:case 11:case 14:case 15:ts(2,h,u),pn||ts(4,h,u),ga(o,u,h);break;case 1:pn||(Ri(h,u),v=h.stateNode,typeof v.componentWillUnmount=="function"&&U_(h,u,v)),ga(o,u,h);break;case 21:ga(o,u,h);break;case 22:pn=(v=pn)||h.memoizedState!==null,ga(o,u,h),pn=v;break;default:ga(o,u,h)}}function e1(o,u){if(u.memoizedState===null&&(o=u.alternate,o!==null&&(o=o.memoizedState,o!==null))){o=o.dehydrated;try{kl(o)}catch(h){jt(u,u.return,h)}}}function t1(o,u){if(u.memoizedState===null&&(o=u.alternate,o!==null&&(o=o.memoizedState,o!==null&&(o=o.dehydrated,o!==null))))try{kl(o)}catch(h){jt(u,u.return,h)}}function i3(o){switch(o.tag){case 31:case 13:case 19:var u=o.stateNode;return u===null&&(u=o.stateNode=new H_),u;case 22:return o=o.stateNode,u=o._retryCache,u===null&&(u=o._retryCache=new H_),u;default:throw Error(r(435,o.tag))}}function Zf(o,u){var h=i3(o);u.forEach(function(v){if(!h.has(v)){h.add(v);var y=h3.bind(null,o,v);v.then(y,y)}})}function lr(o,u){var h=u.deletions;if(h!==null)for(var v=0;v<h.length;v++){var y=h[v],S=o,C=u,R=C;e:for(;R!==null;){switch(R.tag){case 27:if(ls(R.type)){Wt=R.stateNode,or=!1;break e}break;case 5:Wt=R.stateNode,or=!1;break e;case 3:case 4:Wt=R.stateNode.containerInfo,or=!0;break e}R=R.return}if(Wt===null)throw Error(r(160));J_(S,C,y),Wt=null,or=!1,S=y.alternate,S!==null&&(S.return=null),y.return=null}if(u.subtreeFlags&13886)for(u=u.child;u!==null;)n1(u,o),u=u.sibling}var gi=null;function n1(o,u){var h=o.alternate,v=o.flags;switch(o.tag){case 0:case 11:case 14:case 15:lr(u,o),cr(o),v&4&&(ts(3,o,o.return),Uc(3,o),ts(5,o,o.return));break;case 1:lr(u,o),cr(o),v&512&&(pn||h===null||Ri(h,h.return)),v&64&&pa&&(o=o.updateQueue,o!==null&&(v=o.callbacks,v!==null&&(h=o.shared.hiddenCallbacks,o.shared.hiddenCallbacks=h===null?v:h.concat(v))));break;case 26:var y=gi;if(lr(u,o),cr(o),v&512&&(pn||h===null||Ri(h,h.return)),v&4){var S=h!==null?h.memoizedState:null;if(v=o.memoizedState,h===null)if(v===null)if(o.stateNode===null){e:{v=o.type,h=o.memoizedProps,y=y.ownerDocument||y;t:switch(v){case"title":S=y.getElementsByTagName("title")[0],(!S||S[Vs]||S[xn]||S.namespaceURI==="http://www.w3.org/2000/svg"||S.hasAttribute("itemprop"))&&(S=y.createElement(v),y.head.insertBefore(S,y.querySelector("head > title"))),Mn(S,v,h),S[xn]=o,dn(S),v=S;break e;case"link":var C=nk("link","href",y).get(v+(h.href||""));if(C){for(var R=0;R<C.length;R++)if(S=C[R],S.getAttribute("href")===(h.href==null||h.href===""?null:h.href)&&S.getAttribute("rel")===(h.rel==null?null:h.rel)&&S.getAttribute("title")===(h.title==null?null:h.title)&&S.getAttribute("crossorigin")===(h.crossOrigin==null?null:h.crossOrigin)){C.splice(R,1);break t}}S=y.createElement(v),Mn(S,v,h),y.head.appendChild(S);break;case"meta":if(C=nk("meta","content",y).get(v+(h.content||""))){for(R=0;R<C.length;R++)if(S=C[R],S.getAttribute("content")===(h.content==null?null:""+h.content)&&S.getAttribute("name")===(h.name==null?null:h.name)&&S.getAttribute("property")===(h.property==null?null:h.property)&&S.getAttribute("http-equiv")===(h.httpEquiv==null?null:h.httpEquiv)&&S.getAttribute("charset")===(h.charSet==null?null:h.charSet)){C.splice(R,1);break t}}S=y.createElement(v),Mn(S,v,h),y.head.appendChild(S);break;default:throw Error(r(468,v))}S[xn]=o,dn(S),v=S}o.stateNode=v}else rk(y,o.type,o.stateNode);else o.stateNode=tk(y,v,o.memoizedProps);else S!==v?(S===null?h.stateNode!==null&&(h=h.stateNode,h.parentNode.removeChild(h)):S.count--,v===null?rk(y,o.type,o.stateNode):tk(y,v,o.memoizedProps)):v===null&&o.stateNode!==null&&cv(o,o.memoizedProps,h.memoizedProps)}break;case 27:lr(u,o),cr(o),v&512&&(pn||h===null||Ri(h,h.return)),h!==null&&v&4&&cv(o,o.memoizedProps,h.memoizedProps);break;case 5:if(lr(u,o),cr(o),v&512&&(pn||h===null||Ri(h,h.return)),o.flags&32){y=o.stateNode;try{Wo(y,"")}catch(ke){jt(o,o.return,ke)}}v&4&&o.stateNode!=null&&(y=o.memoizedProps,cv(o,y,h!==null?h.memoizedProps:y)),v&1024&&(fv=!0);break;case 6:if(lr(u,o),cr(o),v&4){if(o.stateNode===null)throw Error(r(162));v=o.memoizedProps,h=o.stateNode;try{h.nodeValue=v}catch(ke){jt(o,o.return,ke)}}break;case 3:if(ah=null,y=gi,gi=rh(u.containerInfo),lr(u,o),gi=y,cr(o),v&4&&h!==null&&h.memoizedState.isDehydrated)try{kl(u.containerInfo)}catch(ke){jt(o,o.return,ke)}fv&&(fv=!1,r1(o));break;case 4:v=gi,gi=rh(o.stateNode.containerInfo),lr(u,o),cr(o),gi=v;break;case 12:lr(u,o),cr(o);break;case 31:lr(u,o),cr(o),v&4&&(v=o.updateQueue,v!==null&&(o.updateQueue=null,Zf(o,v)));break;case 13:lr(u,o),cr(o),o.child.flags&8192&&o.memoizedState!==null!=(h!==null&&h.memoizedState!==null)&&(Vf=et()),v&4&&(v=o.updateQueue,v!==null&&(o.updateQueue=null,Zf(o,v)));break;case 22:y=o.memoizedState!==null;var U=h!==null&&h.memoizedState!==null,J=pa,ae=pn;if(pa=J||y,pn=ae||U,lr(u,o),pn=ae,pa=J,cr(o),v&8192)e:for(u=o.stateNode,u._visibility=y?u._visibility&-2:u._visibility|1,y&&(h===null||U||pa||pn||oo(o)),h=null,u=o;;){if(u.tag===5||u.tag===26){if(h===null){U=h=u;try{if(S=U.stateNode,y)C=S.style,typeof C.setProperty=="function"?C.setProperty("display","none","important"):C.display="none";else{R=U.stateNode;var oe=U.memoizedProps.style,te=oe!=null&&oe.hasOwnProperty("display")?oe.display:null;R.style.display=te==null||typeof te=="boolean"?"":(""+te).trim()}}catch(ke){jt(U,U.return,ke)}}}else if(u.tag===6){if(h===null){U=u;try{U.stateNode.nodeValue=y?"":U.memoizedProps}catch(ke){jt(U,U.return,ke)}}}else if(u.tag===18){if(h===null){U=u;try{var ne=U.stateNode;y?U1(ne,!0):U1(U.stateNode,!1)}catch(ke){jt(U,U.return,ke)}}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===o)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===o)break e;for(;u.sibling===null;){if(u.return===null||u.return===o)break e;h===u&&(h=null),u=u.return}h===u&&(h=null),u.sibling.return=u.return,u=u.sibling}v&4&&(v=o.updateQueue,v!==null&&(h=v.retryQueue,h!==null&&(v.retryQueue=null,Zf(o,h))));break;case 19:lr(u,o),cr(o),v&4&&(v=o.updateQueue,v!==null&&(o.updateQueue=null,Zf(o,v)));break;case 30:break;case 21:break;default:lr(u,o),cr(o)}}function cr(o){var u=o.flags;if(u&2){try{for(var h,v=o.return;v!==null;){if(W_(v)){h=v;break}v=v.return}if(h==null)throw Error(r(160));switch(h.tag){case 27:var y=h.stateNode,S=uv(o);Xf(o,S,y);break;case 5:var C=h.stateNode;h.flags&32&&(Wo(C,""),h.flags&=-33);var R=uv(o);Xf(o,R,C);break;case 3:case 4:var U=h.stateNode.containerInfo,J=uv(o);dv(o,J,U);break;default:throw Error(r(161))}}catch(ae){jt(o,o.return,ae)}o.flags&=-3}u&4096&&(o.flags&=-4097)}function r1(o){if(o.subtreeFlags&1024)for(o=o.child;o!==null;){var u=o;r1(u),u.tag===5&&u.flags&1024&&u.stateNode.reset(),o=o.sibling}}function va(o,u){if(u.subtreeFlags&8772)for(u=u.child;u!==null;)G_(o,u.alternate,u),u=u.sibling}function oo(o){for(o=o.child;o!==null;){var u=o;switch(u.tag){case 0:case 11:case 14:case 15:ts(4,u,u.return),oo(u);break;case 1:Ri(u,u.return);var h=u.stateNode;typeof h.componentWillUnmount=="function"&&U_(u,u.return,h),oo(u);break;case 27:nu(u.stateNode);case 26:case 5:Ri(u,u.return),oo(u);break;case 22:u.memoizedState===null&&oo(u);break;case 30:oo(u);break;default:oo(u)}o=o.sibling}}function Oa(o,u,h){for(h=h&&(u.subtreeFlags&8772)!==0,u=u.child;u!==null;){var v=u.alternate,y=o,S=u,C=S.flags;switch(S.tag){case 0:case 11:case 15:Oa(y,S,h),Uc(4,S);break;case 1:if(Oa(y,S,h),v=S,y=v.stateNode,typeof y.componentDidMount=="function")try{y.componentDidMount()}catch(J){jt(v,v.return,J)}if(v=S,y=v.updateQueue,y!==null){var R=v.stateNode;try{var U=y.shared.hiddenCallbacks;if(U!==null)for(y.shared.hiddenCallbacks=null,y=0;y<U.length;y++)Rw(U[y],R)}catch(J){jt(v,v.return,J)}}h&&C&64&&V_(S),Yc(S,S.return);break;case 27:F_(S);case 26:case 5:Oa(y,S,h),h&&v===null&&C&4&&Y_(S),Yc(S,S.return);break;case 12:Oa(y,S,h);break;case 31:Oa(y,S,h),h&&C&4&&e1(y,S);break;case 13:Oa(y,S,h),h&&C&4&&t1(y,S);break;case 22:S.memoizedState===null&&Oa(y,S,h),Yc(S,S.return);break;case 30:break;default:Oa(y,S,h)}u=u.sibling}}function hv(o,u){var h=null;o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(h=o.memoizedState.cachePool.pool),o=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(o=u.memoizedState.cachePool.pool),o!==h&&(o!=null&&o.refCount++,h!=null&&Nc(h))}function mv(o,u){o=null,u.alternate!==null&&(o=u.alternate.memoizedState.cache),u=u.memoizedState.cache,u!==o&&(u.refCount++,o!=null&&Nc(o))}function vi(o,u,h,v){if(u.subtreeFlags&10256)for(u=u.child;u!==null;)i1(o,u,h,v),u=u.sibling}function i1(o,u,h,v){var y=u.flags;switch(u.tag){case 0:case 11:case 15:vi(o,u,h,v),y&2048&&Uc(9,u);break;case 1:vi(o,u,h,v);break;case 3:vi(o,u,h,v),y&2048&&(o=null,u.alternate!==null&&(o=u.alternate.memoizedState.cache),u=u.memoizedState.cache,u!==o&&(u.refCount++,o!=null&&Nc(o)));break;case 12:if(y&2048){vi(o,u,h,v),o=u.stateNode;try{var S=u.memoizedProps,C=S.id,R=S.onPostCommit;typeof R=="function"&&R(C,u.alternate===null?"mount":"update",o.passiveEffectDuration,-0)}catch(U){jt(u,u.return,U)}}else vi(o,u,h,v);break;case 31:vi(o,u,h,v);break;case 13:vi(o,u,h,v);break;case 23:break;case 22:S=u.stateNode,C=u.alternate,u.memoizedState!==null?S._visibility&2?vi(o,u,h,v):Wc(o,u):S._visibility&2?vi(o,u,h,v):(S._visibility|=2,ml(o,u,h,v,(u.subtreeFlags&10256)!==0||!1)),y&2048&&hv(C,u);break;case 24:vi(o,u,h,v),y&2048&&mv(u.alternate,u);break;default:vi(o,u,h,v)}}function ml(o,u,h,v,y){for(y=y&&((u.subtreeFlags&10256)!==0||!1),u=u.child;u!==null;){var S=o,C=u,R=h,U=v,J=C.flags;switch(C.tag){case 0:case 11:case 15:ml(S,C,R,U,y),Uc(8,C);break;case 23:break;case 22:var ae=C.stateNode;C.memoizedState!==null?ae._visibility&2?ml(S,C,R,U,y):Wc(S,C):(ae._visibility|=2,ml(S,C,R,U,y)),y&&J&2048&&hv(C.alternate,C);break;case 24:ml(S,C,R,U,y),y&&J&2048&&mv(C.alternate,C);break;default:ml(S,C,R,U,y)}u=u.sibling}}function Wc(o,u){if(u.subtreeFlags&10256)for(u=u.child;u!==null;){var h=o,v=u,y=v.flags;switch(v.tag){case 22:Wc(h,v),y&2048&&hv(v.alternate,v);break;case 24:Wc(h,v),y&2048&&mv(v.alternate,v);break;default:Wc(h,v)}u=u.sibling}}var Fc=8192;function pl(o,u,h){if(o.subtreeFlags&Fc)for(o=o.child;o!==null;)a1(o,u,h),o=o.sibling}function a1(o,u,h){switch(o.tag){case 26:pl(o,u,h),o.flags&Fc&&o.memoizedState!==null&&B3(h,gi,o.memoizedState,o.memoizedProps);break;case 5:pl(o,u,h);break;case 3:case 4:var v=gi;gi=rh(o.stateNode.containerInfo),pl(o,u,h),gi=v;break;case 22:o.memoizedState===null&&(v=o.alternate,v!==null&&v.memoizedState!==null?(v=Fc,Fc=16777216,pl(o,u,h),Fc=v):pl(o,u,h));break;default:pl(o,u,h)}}function s1(o){var u=o.alternate;if(u!==null&&(o=u.child,o!==null)){u.child=null;do u=o.sibling,o.sibling=null,o=u;while(o!==null)}}function Hc(o){var u=o.deletions;if((o.flags&16)!==0){if(u!==null)for(var h=0;h<u.length;h++){var v=u[h];En=v,l1(v,o)}s1(o)}if(o.subtreeFlags&10256)for(o=o.child;o!==null;)o1(o),o=o.sibling}function o1(o){switch(o.tag){case 0:case 11:case 15:Hc(o),o.flags&2048&&ts(9,o,o.return);break;case 3:Hc(o);break;case 12:Hc(o);break;case 22:var u=o.stateNode;o.memoizedState!==null&&u._visibility&2&&(o.return===null||o.return.tag!==13)?(u._visibility&=-3,Bf(o)):Hc(o);break;default:Hc(o)}}function Bf(o){var u=o.deletions;if((o.flags&16)!==0){if(u!==null)for(var h=0;h<u.length;h++){var v=u[h];En=v,l1(v,o)}s1(o)}for(o=o.child;o!==null;){switch(u=o,u.tag){case 0:case 11:case 15:ts(8,u,u.return),Bf(u);break;case 22:h=u.stateNode,h._visibility&2&&(h._visibility&=-3,Bf(u));break;default:Bf(u)}o=o.sibling}}function l1(o,u){for(;En!==null;){var h=En;switch(h.tag){case 0:case 11:case 15:ts(8,h,u);break;case 23:case 22:if(h.memoizedState!==null&&h.memoizedState.cachePool!==null){var v=h.memoizedState.cachePool.pool;v!=null&&v.refCount++}break;case 24:Nc(h.memoizedState.cache)}if(v=h.child,v!==null)v.return=h,En=v;else e:for(h=o;En!==null;){v=En;var y=v.sibling,S=v.return;if(K_(v),v===h){En=null;break e}if(y!==null){y.return=S,En=y;break e}En=S}}}var a3={getCacheForType:function(o){var u=Nn(fn),h=u.data.get(o);return h===void 0&&(h=o(),u.data.set(o,h)),h},cacheSignal:function(){return Nn(fn).controller.signal}},s3=typeof WeakMap=="function"?WeakMap:Map,yt=0,Pt=null,nt=null,lt=0,kt=0,Er=null,ns=!1,gl=!1,pv=!1,ba=0,en=0,rs=0,lo=0,gv=0,Ar=0,vl=0,Gc=null,ur=null,vv=!1,Vf=0,c1=0,Uf=1/0,Yf=null,is=null,Sn=0,as=null,Ol=null,ya=0,Ov=0,bv=null,u1=null,Kc=0,yv=null;function Qr(){return(yt&2)!==0&<!==0?lt&-lt:I.T!==null?jv():Wn()}function d1(){if(Ar===0)if((lt&536870912)===0||ut){var o=mi;mi<<=1,(mi&3932160)===0&&(mi=262144),Ar=o}else Ar=536870912;return o=Tr.current,o!==null&&(o.flags|=32),Ar}function dr(o,u,h){(o===Pt&&(kt===2||kt===9)||o.cancelPendingCommit!==null)&&(bl(o,0),ss(o,lt,Ar,!1)),$n(o,h),((yt&2)===0||o!==Pt)&&(o===Pt&&((yt&2)===0&&(lo|=h),en===4&&ss(o,lt,Ar,!1)),Mi(o))}function f1(o,u,h){if((yt&6)!==0)throw Error(r(327));var v=!h&&(u&127)===0&&(u&o.expiredLanes)===0||jn(o,u),y=v?c3(o,u):Sv(o,u,!0),S=v;do{if(y===0){gl&&!v&&ss(o,u,0,!1);break}else{if(h=o.current.alternate,S&&!o3(h)){y=Sv(o,u,!1),S=!1;continue}if(y===2){if(S=u,o.errorRecoveryDisabledLanes&S)var C=0;else C=o.pendingLanes&-536870913,C=C!==0?C:C&536870912?536870912:0;if(C!==0){u=C;e:{var R=o;y=Gc;var U=R.current.memoizedState.isDehydrated;if(U&&(bl(R,C).flags|=256),C=Sv(R,C,!1),C!==2){if(pv&&!U){R.errorRecoveryDisabledLanes|=S,lo|=S,y=4;break e}S=ur,ur=y,S!==null&&(ur===null?ur=S:ur.push.apply(ur,S))}y=C}if(S=!1,y!==2)continue}}if(y===1){bl(o,0),ss(o,u,0,!0);break}e:{switch(v=o,S=y,S){case 0:case 1:throw Error(r(345));case 4:if((u&4194048)!==u)break;case 6:ss(v,u,Ar,!ns);break e;case 2:ur=null;break;case 3:case 5:break;default:throw Error(r(329))}if((u&62914560)===u&&(y=Vf+300-et(),10<y)){if(ss(v,u,Ar,!ns),Qt(v,0,!0)!==0)break e;ya=u,v.timeoutHandle=Z1(h1.bind(null,v,h,ur,Yf,vv,u,Ar,lo,vl,ns,S,"Throttled",-0,0),y);break e}h1(v,h,ur,Yf,vv,u,Ar,lo,vl,ns,S,null,-0,0)}}break}while(!0);Mi(o)}function h1(o,u,h,v,y,S,C,R,U,J,ae,oe,te,ne){if(o.timeoutHandle=-1,oe=u.subtreeFlags,oe&8192||(oe&16785408)===16785408){oe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:aa},a1(u,S,oe);var ke=(S&62914560)===S?Vf-et():(S&4194048)===S?c1-et():0;if(ke=V3(oe,ke),ke!==null){ya=S,o.cancelPendingCommit=ke(x1.bind(null,o,u,S,h,v,y,C,R,U,ae,oe,null,te,ne)),ss(o,S,C,!J);return}}x1(o,u,S,h,v,y,C,R,U)}function o3(o){for(var u=o;;){var h=u.tag;if((h===0||h===11||h===15)&&u.flags&16384&&(h=u.updateQueue,h!==null&&(h=h.stores,h!==null)))for(var v=0;v<h.length;v++){var y=h[v],S=y.getSnapshot;y=y.value;try{if(!kr(S(),y))return!1}catch{return!1}}if(h=u.child,u.subtreeFlags&16384&&h!==null)h.return=u,u=h;else{if(u===o)break;for(;u.sibling===null;){if(u.return===null||u.return===o)return!0;u=u.return}u.sibling.return=u.return,u=u.sibling}}return!0}function ss(o,u,h,v){u&=~gv,u&=~lo,o.suspendedLanes|=u,o.pingedLanes&=~u,v&&(o.warmLanes|=u),v=o.expirationTimes;for(var y=u;0<y;){var S=31-ht(y),C=1<<S;v[S]=-1,y&=~C}h!==0&&Yn(o,h,u)}function Wf(){return(yt&6)===0?(Jc(0),!1):!0}function xv(){if(nt!==null){if(kt===0)var o=nt.return;else o=nt,ca=Js=null,Lg(o),cl=null,Mc=0,o=nt;for(;o!==null;)B_(o.alternate,o),o=o.return;nt=null}}function bl(o,u){var h=o.timeoutHandle;h!==-1&&(o.timeoutHandle=-1,T3(h)),h=o.cancelPendingCommit,h!==null&&(o.cancelPendingCommit=null,h()),ya=0,xv(),Pt=o,nt=h=oa(o.current,null),lt=u,kt=0,Er=null,ns=!1,gl=jn(o,u),pv=!1,vl=Ar=gv=lo=rs=en=0,ur=Gc=null,vv=!1,(u&8)!==0&&(u|=u&32);var v=o.entangledLanes;if(v!==0)for(o=o.entanglements,v&=u;0<v;){var y=31-ht(v),S=1<<y;u|=o[y],v&=~S}return ba=u,pf(),h}function m1(o,u){Ue=null,I.H=Zc,u===ll||u===wf?(u=Aw(),kt=3):u===kg?(u=Aw(),kt=4):kt=u===Jg?8:u!==null&&typeof u=="object"&&typeof u.then=="function"?6:1,Er=u,nt===null&&(en=1,Lf(o,Vr(u,o.current)))}function p1(){var o=Tr.current;return o===null?!0:(lt&4194048)===lt?Fr===null:(lt&62914560)===lt||(lt&536870912)!==0?o===Fr:!1}function g1(){var o=I.H;return I.H=Zc,o===null?Zc:o}function v1(){var o=I.A;return I.A=a3,o}function Ff(){en=4,ns||(lt&4194048)!==lt&&Tr.current!==null||(gl=!0),(rs&134217727)===0&&(lo&134217727)===0||Pt===null||ss(Pt,lt,Ar,!1)}function Sv(o,u,h){var v=yt;yt|=2;var y=g1(),S=v1();(Pt!==o||lt!==u)&&(Yf=null,bl(o,u)),u=!1;var C=en;e:do try{if(kt!==0&&nt!==null){var R=nt,U=Er;switch(kt){case 8:xv(),C=6;break e;case 3:case 2:case 9:case 6:Tr.current===null&&(u=!0);var J=kt;if(kt=0,Er=null,yl(o,R,U,J),h&&gl){C=0;break e}break;default:J=kt,kt=0,Er=null,yl(o,R,U,J)}}l3(),C=en;break}catch(ae){m1(o,ae)}while(!0);return u&&o.shellSuspendCounter++,ca=Js=null,yt=v,I.H=y,I.A=S,nt===null&&(Pt=null,lt=0,pf()),C}function l3(){for(;nt!==null;)O1(nt)}function c3(o,u){var h=yt;yt|=2;var v=g1(),y=v1();Pt!==o||lt!==u?(Yf=null,Uf=et()+500,bl(o,u)):gl=jn(o,u);e:do try{if(kt!==0&&nt!==null){u=nt;var S=Er;t:switch(kt){case 1:kt=0,Er=null,yl(o,u,S,1);break;case 2:case 9:if(Cw(S)){kt=0,Er=null,b1(u);break}u=function(){kt!==2&&kt!==9||Pt!==o||(kt=7),Mi(o)},S.then(u,u);break e;case 3:kt=7;break e;case 4:kt=5;break e;case 7:Cw(S)?(kt=0,Er=null,b1(u)):(kt=0,Er=null,yl(o,u,S,7));break;case 5:var C=null;switch(nt.tag){case 26:C=nt.memoizedState;case 5:case 27:var R=nt;if(C?ik(C):R.stateNode.complete){kt=0,Er=null;var U=R.sibling;if(U!==null)nt=U;else{var J=R.return;J!==null?(nt=J,Hf(J)):nt=null}break t}}kt=0,Er=null,yl(o,u,S,5);break;case 6:kt=0,Er=null,yl(o,u,S,6);break;case 8:xv(),en=6;break e;default:throw Error(r(462))}}u3();break}catch(ae){m1(o,ae)}while(!0);return ca=Js=null,I.H=v,I.A=y,yt=h,nt!==null?0:(Pt=null,lt=0,pf(),en)}function u3(){for(;nt!==null&&!Dt();)O1(nt)}function O1(o){var u=X_(o.alternate,o,ba);o.memoizedProps=o.pendingProps,u===null?Hf(o):nt=u}function b1(o){var u=o,h=u.alternate;switch(u.tag){case 15:case 0:u=D_(h,u,u.pendingProps,u.type,void 0,lt);break;case 11:u=D_(h,u,u.pendingProps,u.type.render,u.ref,lt);break;case 5:Lg(u);default:B_(h,u),u=nt=vw(u,ba),u=X_(h,u,ba)}o.memoizedProps=o.pendingProps,u===null?Hf(o):nt=u}function yl(o,u,h,v){ca=Js=null,Lg(u),cl=null,Mc=0;var y=u.return;try{if(KL(o,y,u,h,lt)){en=1,Lf(o,Vr(h,o.current)),nt=null;return}}catch(S){if(y!==null)throw nt=y,S;en=1,Lf(o,Vr(h,o.current)),nt=null;return}u.flags&32768?(ut||v===1?o=!0:gl||(lt&536870912)!==0?o=!1:(ns=o=!0,(v===2||v===9||v===3||v===6)&&(v=Tr.current,v!==null&&v.tag===13&&(v.flags|=16384))),y1(u,o)):Hf(u)}function Hf(o){var u=o;do{if((u.flags&32768)!==0){y1(u,ns);return}o=u.return;var h=t3(u.alternate,u,ba);if(h!==null){nt=h;return}if(u=u.sibling,u!==null){nt=u;return}nt=u=o}while(u!==null);en===0&&(en=5)}function y1(o,u){do{var h=n3(o.alternate,o);if(h!==null){h.flags&=32767,nt=h;return}if(h=o.return,h!==null&&(h.flags|=32768,h.subtreeFlags=0,h.deletions=null),!u&&(o=o.sibling,o!==null)){nt=o;return}nt=o=h}while(o!==null);en=6,nt=null}function x1(o,u,h,v,y,S,C,R,U){o.cancelPendingCommit=null;do Gf();while(Sn!==0);if((yt&6)!==0)throw Error(r(327));if(u!==null){if(u===o.current)throw Error(r(177));if(S=u.lanes|u.childLanes,S|=ug,Ht(o,h,S,C,R,U),o===Pt&&(nt=Pt=null,lt=0),Ol=u,as=o,ya=h,Ov=S,bv=y,u1=v,(u.subtreeFlags&10256)!==0||(u.flags&10256)!==0?(o.callbackNode=null,o.callbackPriority=0,m3(Pe,function(){return j1(),null})):(o.callbackNode=null,o.callbackPriority=0),v=(u.flags&13878)!==0,(u.subtreeFlags&13878)!==0||v){v=I.T,I.T=null,y=z.p,z.p=2,C=yt,yt|=4;try{r3(o,u,h)}finally{yt=C,z.p=y,I.T=v}}Sn=1,S1(),w1(),_1()}}function S1(){if(Sn===1){Sn=0;var o=as,u=Ol,h=(u.flags&13878)!==0;if((u.subtreeFlags&13878)!==0||h){h=I.T,I.T=null;var v=z.p;z.p=2;var y=yt;yt|=4;try{n1(u,o);var S=Rv,C=lw(o.containerInfo),R=S.focusedElem,U=S.selectionRange;if(C!==R&&R&&R.ownerDocument&&ow(R.ownerDocument.documentElement,R)){if(U!==null&&ag(R)){var J=U.start,ae=U.end;if(ae===void 0&&(ae=J),"selectionStart"in R)R.selectionStart=J,R.selectionEnd=Math.min(ae,R.value.length);else{var oe=R.ownerDocument||document,te=oe&&oe.defaultView||window;if(te.getSelection){var ne=te.getSelection(),ke=R.textContent.length,qe=Math.min(U.start,ke),Et=U.end===void 0?qe:Math.min(U.end,ke);!ne.extend&&qe>Et&&(C=Et,Et=qe,qe=C);var H=sw(R,qe),Y=sw(R,Et);if(H&&Y&&(ne.rangeCount!==1||ne.anchorNode!==H.node||ne.anchorOffset!==H.offset||ne.focusNode!==Y.node||ne.focusOffset!==Y.offset)){var K=oe.createRange();K.setStart(H.node,H.offset),ne.removeAllRanges(),qe>Et?(ne.addRange(K),ne.extend(Y.node,Y.offset)):(K.setEnd(Y.node,Y.offset),ne.addRange(K))}}}}for(oe=[],ne=R;ne=ne.parentNode;)ne.nodeType===1&&oe.push({element:ne,left:ne.scrollLeft,top:ne.scrollTop});for(typeof R.focus=="function"&&R.focus(),R=0;R<oe.length;R++){var se=oe[R];se.element.scrollLeft=se.left,se.element.scrollTop=se.top}}ch=!!Nv,Rv=Nv=null}finally{yt=y,z.p=v,I.T=h}}o.current=u,Sn=2}}function w1(){if(Sn===2){Sn=0;var o=as,u=Ol,h=(u.flags&8772)!==0;if((u.subtreeFlags&8772)!==0||h){h=I.T,I.T=null;var v=z.p;z.p=2;var y=yt;yt|=4;try{G_(o,u.alternate,u)}finally{yt=y,z.p=v,I.T=h}}Sn=3}}function _1(){if(Sn===4||Sn===3){Sn=0,Yt();var o=as,u=Ol,h=ya,v=u1;(u.subtreeFlags&10256)!==0||(u.flags&10256)!==0?Sn=5:(Sn=0,Ol=as=null,k1(o,o.pendingLanes));var y=o.pendingLanes;if(y===0&&(is=null),_r(h),u=u.stateNode,Xt&&typeof Xt.onCommitFiberRoot=="function")try{Xt.onCommitFiberRoot(rn,u,void 0,(u.current.flags&128)===128)}catch{}if(v!==null){u=I.T,y=z.p,z.p=2,I.T=null;try{for(var S=o.onRecoverableError,C=0;C<v.length;C++){var R=v[C];S(R.value,{componentStack:R.stack})}}finally{I.T=u,z.p=y}}(ya&3)!==0&&Gf(),Mi(o),y=o.pendingLanes,(h&261930)!==0&&(y&42)!==0?o===yv?Kc++:(Kc=0,yv=o):Kc=0,Jc(0)}}function k1(o,u){(o.pooledCacheLanes&=u)===0&&(u=o.pooledCache,u!=null&&(o.pooledCache=null,Nc(u)))}function Gf(){return S1(),w1(),_1(),j1()}function j1(){if(Sn!==5)return!1;var o=as,u=Ov;Ov=0;var h=_r(ya),v=I.T,y=z.p;try{z.p=32>h?32:h,I.T=null,h=bv,bv=null;var S=as,C=ya;if(Sn=0,Ol=as=null,ya=0,(yt&6)!==0)throw Error(r(331));var R=yt;if(yt|=4,o1(S.current),i1(S,S.current,C,h),yt=R,Jc(0,!1),Xt&&typeof Xt.onPostCommitFiberRoot=="function")try{Xt.onPostCommitFiberRoot(rn,S)}catch{}return!0}finally{z.p=y,I.T=v,k1(o,u)}}function T1(o,u,h){u=Vr(h,u),u=Kg(o.stateNode,u,2),o=Ka(o,u,2),o!==null&&($n(o,2),Mi(o))}function jt(o,u,h){if(o.tag===3)T1(o,o,h);else for(;u!==null;){if(u.tag===3){T1(u,o,h);break}else if(u.tag===1){var v=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof v.componentDidCatch=="function"&&(is===null||!is.has(v))){o=Vr(h,o),h=C_(2),v=Ka(u,h,2),v!==null&&(E_(h,v,u,o),$n(v,2),Mi(v));break}}u=u.return}}function wv(o,u,h){var v=o.pingCache;if(v===null){v=o.pingCache=new s3;var y=new Set;v.set(u,y)}else y=v.get(u),y===void 0&&(y=new Set,v.set(u,y));y.has(h)||(pv=!0,y.add(h),o=d3.bind(null,o,u,h),u.then(o,o))}function d3(o,u,h){var v=o.pingCache;v!==null&&v.delete(u),o.pingedLanes|=o.suspendedLanes&h,o.warmLanes&=~h,Pt===o&&(lt&h)===h&&(en===4||en===3&&(lt&62914560)===lt&&300>et()-Vf?(yt&2)===0&&bl(o,0):gv|=h,vl===lt&&(vl=0)),Mi(o)}function C1(o,u){u===0&&(u=an()),o=Hs(o,u),o!==null&&($n(o,u),Mi(o))}function f3(o){var u=o.memoizedState,h=0;u!==null&&(h=u.retryLane),C1(o,h)}function h3(o,u){var h=0;switch(o.tag){case 31:case 13:var v=o.stateNode,y=o.memoizedState;y!==null&&(h=y.retryLane);break;case 19:v=o.stateNode;break;case 22:v=o.stateNode._retryCache;break;default:throw Error(r(314))}v!==null&&v.delete(u),C1(o,h)}function m3(o,u){return ge(o,u)}var Kf=null,xl=null,_v=!1,Jf=!1,kv=!1,os=0;function Mi(o){o!==xl&&o.next===null&&(xl===null?Kf=xl=o:xl=xl.next=o),Jf=!0,_v||(_v=!0,g3())}function Jc(o,u){if(!kv&&Jf){kv=!0;do for(var h=!1,v=Kf;v!==null;){if(o!==0){var y=v.pendingLanes;if(y===0)var S=0;else{var C=v.suspendedLanes,R=v.pingedLanes;S=(1<<31-ht(42|o)+1)-1,S&=y&~(C&~R),S=S&201326741?S&201326741|1:S?S|2:0}S!==0&&(h=!0,P1(v,S))}else S=lt,S=Qt(v,v===Pt?S:0,v.cancelPendingCommit!==null||v.timeoutHandle!==-1),(S&3)===0||jn(v,S)||(h=!0,P1(v,S));v=v.next}while(h);kv=!1}}function p3(){E1()}function E1(){Jf=_v=!1;var o=0;os!==0&&j3()&&(o=os);for(var u=et(),h=null,v=Kf;v!==null;){var y=v.next,S=A1(v,u);S===0?(v.next=null,h===null?Kf=y:h.next=y,y===null&&(xl=h)):(h=v,(o!==0||(S&3)!==0)&&(Jf=!0)),v=y}Sn!==0&&Sn!==5||Jc(o),os!==0&&(os=0)}function A1(o,u){for(var h=o.suspendedLanes,v=o.pingedLanes,y=o.expirationTimes,S=o.pendingLanes&-62914561;0<S;){var C=31-ht(S),R=1<<C,U=y[C];U===-1?((R&h)===0||(R&v)!==0)&&(y[C]=Tn(R,u)):U<=u&&(o.expiredLanes|=R),S&=~R}if(u=Pt,h=lt,h=Qt(o,o===u?h:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),v=o.callbackNode,h===0||o===u&&(kt===2||kt===9)||o.cancelPendingCommit!==null)return v!==null&&v!==null&&vt(v),o.callbackNode=null,o.callbackPriority=0;if((h&3)===0||jn(o,h)){if(u=h&-h,u===o.callbackPriority)return u;switch(v!==null&&vt(v),_r(h)){case 2:case 8:h=de;break;case 32:h=Pe;break;case 268435456:h=tt;break;default:h=Pe}return v=Q1.bind(null,o),h=ge(h,v),o.callbackPriority=u,o.callbackNode=h,u}return v!==null&&v!==null&&vt(v),o.callbackPriority=2,o.callbackNode=null,2}function Q1(o,u){if(Sn!==0&&Sn!==5)return o.callbackNode=null,o.callbackPriority=0,null;var h=o.callbackNode;if(Gf()&&o.callbackNode!==h)return null;var v=lt;return v=Qt(o,o===Pt?v:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),v===0?null:(f1(o,v,u),A1(o,et()),o.callbackNode!=null&&o.callbackNode===h?Q1.bind(null,o):null)}function P1(o,u){if(Gf())return null;f1(o,u,!0)}function g3(){C3(function(){(yt&6)!==0?ge(ie,p3):E1()})}function jv(){if(os===0){var o=sl;o===0&&(o=Qi,Qi<<=1,(Qi&261888)===0&&(Qi=256)),os=o}return os}function N1(o){return o==null||typeof o=="symbol"||typeof o=="boolean"?null:typeof o=="function"?o:of(""+o)}function R1(o,u){var h=u.ownerDocument.createElement("input");return h.name=u.name,h.value=u.value,o.id&&h.setAttribute("form",o.id),u.parentNode.insertBefore(h,u),o=new FormData(o),h.parentNode.removeChild(h),o}function v3(o,u,h,v,y){if(u==="submit"&&h&&h.stateNode===y){var S=N1((y[In]||null).action),C=v.submitter;C&&(u=(u=C[In]||null)?N1(u.formAction):C.getAttribute("formAction"),u!==null&&(S=u,C=null));var R=new df("action","action",null,v,y);o.push({event:R,listeners:[{instance:null,listener:function(){if(v.defaultPrevented){if(os!==0){var U=C?R1(y,C):new FormData(y);Ug(h,{pending:!0,data:U,method:y.method,action:S},null,U)}}else typeof S=="function"&&(R.preventDefault(),U=C?R1(y,C):new FormData(y),Ug(h,{pending:!0,data:U,method:y.method,action:S},S,U))},currentTarget:y}]})}}for(var Tv=0;Tv<cg.length;Tv++){var Cv=cg[Tv],O3=Cv.toLowerCase(),b3=Cv[0].toUpperCase()+Cv.slice(1);pi(O3,"on"+b3)}pi(dw,"onAnimationEnd"),pi(fw,"onAnimationIteration"),pi(hw,"onAnimationStart"),pi("dblclick","onDoubleClick"),pi("focusin","onFocus"),pi("focusout","onBlur"),pi(ML,"onTransitionRun"),pi(DL,"onTransitionStart"),pi(LL,"onTransitionCancel"),pi(mw,"onTransitionEnd"),Ba("onMouseEnter",["mouseout","mouseover"]),Ba("onMouseLeave",["mouseout","mouseover"]),Ba("onPointerEnter",["pointerout","pointerover"]),Ba("onPointerLeave",["pointerout","pointerover"]),ra("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ra("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ra("onBeforeInput",["compositionend","keypress","textInput","paste"]),ra("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ra("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ra("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var eu="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(" "),y3=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(eu));function M1(o,u){u=(u&4)!==0;for(var h=0;h<o.length;h++){var v=o[h],y=v.event;v=v.listeners;e:{var S=void 0;if(u)for(var C=v.length-1;0<=C;C--){var R=v[C],U=R.instance,J=R.currentTarget;if(R=R.listener,U!==S&&y.isPropagationStopped())break e;S=R,y.currentTarget=J;try{S(y)}catch(ae){mf(ae)}y.currentTarget=null,S=U}else for(C=0;C<v.length;C++){if(R=v[C],U=R.instance,J=R.currentTarget,R=R.listener,U!==S&&y.isPropagationStopped())break e;S=R,y.currentTarget=J;try{S(y)}catch(ae){mf(ae)}y.currentTarget=null,S=U}}}}function rt(o,u){var h=u[yc];h===void 0&&(h=u[yc]=new Set);var v=o+"__bubble";h.has(v)||(D1(u,o,2,!1),h.add(v))}function Ev(o,u,h){var v=0;u&&(v|=4),D1(h,o,v,u)}var eh="_reactListening"+Math.random().toString(36).slice(2);function Av(o){if(!o[eh]){o[eh]=!0,tf.forEach(function(h){h!=="selectionchange"&&(y3.has(h)||Ev(h,!1,o),Ev(h,!0,o))});var u=o.nodeType===9?o:o.ownerDocument;u===null||u[eh]||(u[eh]=!0,Ev("selectionchange",!1,u))}}function D1(o,u,h,v){switch(dk(u)){case 2:var y=W3;break;case 8:y=F3;break;default:y=Vv}h=y.bind(null,u,h,o),y=void 0,!Hp||u!=="touchstart"&&u!=="touchmove"&&u!=="wheel"||(y=!0),v?y!==void 0?o.addEventListener(u,h,{capture:!0,passive:y}):o.addEventListener(u,h,!0):y!==void 0?o.addEventListener(u,h,{passive:y}):o.addEventListener(u,h,!1)}function Qv(o,u,h,v,y){var S=v;if((u&1)===0&&(u&2)===0&&v!==null)e:for(;;){if(v===null)return;var C=v.tag;if(C===3||C===4){var R=v.stateNode.containerInfo;if(R===y)break;if(C===4)for(C=v.return;C!==null;){var U=C.tag;if((U===3||U===4)&&C.stateNode.containerInfo===y)return;C=C.return}for(;R!==null;){if(C=qa(R),C===null)return;if(U=C.tag,U===5||U===6||U===26||U===27){v=S=C;continue e}R=R.parentNode}}v=v.return}qS(function(){var J=S,ae=Wp(h),oe=[];e:{var te=pw.get(o);if(te!==void 0){var ne=df,ke=o;switch(o){case"keypress":if(cf(h)===0)break e;case"keydown":case"keyup":ne=hL;break;case"focusin":ke="focus",ne=eg;break;case"focusout":ke="blur",ne=eg;break;case"beforeblur":case"afterblur":ne=eg;break;case"click":if(h.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ne=BS;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ne=tL;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ne=gL;break;case dw:case fw:case hw:ne=iL;break;case mw:ne=OL;break;case"scroll":case"scrollend":ne=JD;break;case"wheel":ne=yL;break;case"copy":case"cut":case"paste":ne=sL;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ne=US;break;case"toggle":case"beforetoggle":ne=SL}var qe=(u&4)!==0,Et=!qe&&(o==="scroll"||o==="scrollend"),H=qe?te!==null?te+"Capture":null:te;qe=[];for(var Y=J,K;Y!==null;){var se=Y;if(K=se.stateNode,se=se.tag,se!==5&&se!==26&&se!==27||K===null||H===null||(se=Sc(Y,H),se!=null&&qe.push(tu(Y,se,K))),Et)break;Y=Y.return}0<qe.length&&(te=new ne(te,ke,null,h,ae),oe.push({event:te,listeners:qe}))}}if((u&7)===0){e:{if(te=o==="mouseover"||o==="pointerover",ne=o==="mouseout"||o==="pointerout",te&&h!==Yp&&(ke=h.relatedTarget||h.fromElement)&&(qa(ke)||ke[Ia]))break e;if((ne||te)&&(te=ae.window===ae?ae:(te=ae.ownerDocument)?te.defaultView||te.parentWindow:window,ne?(ke=h.relatedTarget||h.toElement,ne=J,ke=ke?qa(ke):null,ke!==null&&(Et=a(ke),qe=ke.tag,ke!==Et||qe!==5&&qe!==27&&qe!==6)&&(ke=null)):(ne=null,ke=J),ne!==ke)){if(qe=BS,se="onMouseLeave",H="onMouseEnter",Y="mouse",(o==="pointerout"||o==="pointerover")&&(qe=US,se="onPointerLeave",H="onPointerEnter",Y="pointer"),Et=ne==null?te:Us(ne),K=ke==null?te:Us(ke),te=new qe(se,Y+"leave",ne,h,ae),te.target=Et,te.relatedTarget=K,se=null,qa(ae)===J&&(qe=new qe(H,Y+"enter",ke,h,ae),qe.target=K,qe.relatedTarget=Et,se=qe),Et=se,ne&&ke)t:{for(qe=x3,H=ne,Y=ke,K=0,se=H;se;se=qe(se))K++;se=0;for(var Le=Y;Le;Le=qe(Le))se++;for(;0<K-se;)H=qe(H),K--;for(;0<se-K;)Y=qe(Y),se--;for(;K--;){if(H===Y||Y!==null&&H===Y.alternate){qe=H;break t}H=qe(H),Y=qe(Y)}qe=null}else qe=null;ne!==null&&L1(oe,te,ne,qe,!1),ke!==null&&Et!==null&&L1(oe,Et,ke,qe,!0)}}e:{if(te=J?Us(J):window,ne=te.nodeName&&te.nodeName.toLowerCase(),ne==="select"||ne==="input"&&te.type==="file")var Ot=ew;else if(KS(te))if(tw)Ot=PL;else{Ot=AL;var Ee=EL}else ne=te.nodeName,!ne||ne.toLowerCase()!=="input"||te.type!=="checkbox"&&te.type!=="radio"?J&&Up(J.elementType)&&(Ot=ew):Ot=QL;if(Ot&&(Ot=Ot(o,J))){JS(oe,Ot,h,ae);break e}Ee&&Ee(o,te,J),o==="focusout"&&J&&te.type==="number"&&J.memoizedProps.value!=null&&Vp(te,"number",te.value)}switch(Ee=J?Us(J):window,o){case"focusin":(KS(Ee)||Ee.contentEditable==="true")&&(Ko=Ee,sg=J,Ac=null);break;case"focusout":Ac=sg=Ko=null;break;case"mousedown":og=!0;break;case"contextmenu":case"mouseup":case"dragend":og=!1,cw(oe,h,ae);break;case"selectionchange":if(RL)break;case"keydown":case"keyup":cw(oe,h,ae)}var Ye;if(ng)e:{switch(o){case"compositionstart":var ct="onCompositionStart";break e;case"compositionend":ct="onCompositionEnd";break e;case"compositionupdate":ct="onCompositionUpdate";break e}ct=void 0}else Go?HS(o,h)&&(ct="onCompositionEnd"):o==="keydown"&&h.keyCode===229&&(ct="onCompositionStart");ct&&(YS&&h.locale!=="ko"&&(Go||ct!=="onCompositionStart"?ct==="onCompositionEnd"&&Go&&(Ye=XS()):(Va=ae,Gp="value"in Va?Va.value:Va.textContent,Go=!0)),Ee=th(J,ct),0<Ee.length&&(ct=new VS(ct,o,null,h,ae),oe.push({event:ct,listeners:Ee}),Ye?ct.data=Ye:(Ye=GS(h),Ye!==null&&(ct.data=Ye)))),(Ye=_L?kL(o,h):jL(o,h))&&(ct=th(J,"onBeforeInput"),0<ct.length&&(Ee=new VS("onBeforeInput","beforeinput",null,h,ae),oe.push({event:Ee,listeners:ct}),Ee.data=Ye)),v3(oe,o,J,h,ae)}M1(oe,u)})}function tu(o,u,h){return{instance:o,listener:u,currentTarget:h}}function th(o,u){for(var h=u+"Capture",v=[];o!==null;){var y=o,S=y.stateNode;if(y=y.tag,y!==5&&y!==26&&y!==27||S===null||(y=Sc(o,h),y!=null&&v.unshift(tu(o,y,S)),y=Sc(o,u),y!=null&&v.push(tu(o,y,S))),o.tag===3)return v;o=o.return}return[]}function x3(o){if(o===null)return null;do o=o.return;while(o&&o.tag!==5&&o.tag!==27);return o||null}function L1(o,u,h,v,y){for(var S=u._reactName,C=[];h!==null&&h!==v;){var R=h,U=R.alternate,J=R.stateNode;if(R=R.tag,U!==null&&U===v)break;R!==5&&R!==26&&R!==27||J===null||(U=J,y?(J=Sc(h,S),J!=null&&C.unshift(tu(h,J,U))):y||(J=Sc(h,S),J!=null&&C.push(tu(h,J,U)))),h=h.return}C.length!==0&&o.push({event:u,listeners:C})}var S3=/\r\n?/g,w3=/\u0000|\uFFFD/g;function z1(o){return(typeof o=="string"?o:""+o).replace(S3,`
|
|
34
|
-
`).replace(w3,"")}function $1(o,u){return u=z1(u),z1(o)===u}function Ct(o,u,h,v,y,S){switch(h){case"children":typeof v=="string"?u==="body"||u==="textarea"&&v===""||Wo(o,v):(typeof v=="number"||typeof v=="bigint")&&u!=="body"&&Wo(o,""+v);break;case"className":af(o,"class",v);break;case"tabIndex":af(o,"tabindex",v);break;case"dir":case"role":case"viewBox":case"width":case"height":af(o,h,v);break;case"style":$S(o,v,S);break;case"data":if(u!=="object"){af(o,"data",v);break}case"src":case"href":if(v===""&&(u!=="a"||h!=="href")){o.removeAttribute(h);break}if(v==null||typeof v=="function"||typeof v=="symbol"||typeof v=="boolean"){o.removeAttribute(h);break}v=of(""+v),o.setAttribute(h,v);break;case"action":case"formAction":if(typeof v=="function"){o.setAttribute(h,"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 S=="function"&&(h==="formAction"?(u!=="input"&&Ct(o,u,"name",y.name,y,null),Ct(o,u,"formEncType",y.formEncType,y,null),Ct(o,u,"formMethod",y.formMethod,y,null),Ct(o,u,"formTarget",y.formTarget,y,null)):(Ct(o,u,"encType",y.encType,y,null),Ct(o,u,"method",y.method,y,null),Ct(o,u,"target",y.target,y,null)));if(v==null||typeof v=="symbol"||typeof v=="boolean"){o.removeAttribute(h);break}v=of(""+v),o.setAttribute(h,v);break;case"onClick":v!=null&&(o.onclick=aa);break;case"onScroll":v!=null&&rt("scroll",o);break;case"onScrollEnd":v!=null&&rt("scrollend",o);break;case"dangerouslySetInnerHTML":if(v!=null){if(typeof v!="object"||!("__html"in v))throw Error(r(61));if(h=v.__html,h!=null){if(y.children!=null)throw Error(r(60));o.innerHTML=h}}break;case"multiple":o.multiple=v&&typeof v!="function"&&typeof v!="symbol";break;case"muted":o.muted=v&&typeof v!="function"&&typeof v!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(v==null||typeof v=="function"||typeof v=="boolean"||typeof v=="symbol"){o.removeAttribute("xlink:href");break}h=of(""+v),o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",h);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":v!=null&&typeof v!="function"&&typeof v!="symbol"?o.setAttribute(h,""+v):o.removeAttribute(h);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":v&&typeof v!="function"&&typeof v!="symbol"?o.setAttribute(h,""):o.removeAttribute(h);break;case"capture":case"download":v===!0?o.setAttribute(h,""):v!==!1&&v!=null&&typeof v!="function"&&typeof v!="symbol"?o.setAttribute(h,v):o.removeAttribute(h);break;case"cols":case"rows":case"size":case"span":v!=null&&typeof v!="function"&&typeof v!="symbol"&&!isNaN(v)&&1<=v?o.setAttribute(h,v):o.removeAttribute(h);break;case"rowSpan":case"start":v==null||typeof v=="function"||typeof v=="symbol"||isNaN(v)?o.removeAttribute(h):o.setAttribute(h,v);break;case"popover":rt("beforetoggle",o),rt("toggle",o),rf(o,"popover",v);break;case"xlinkActuate":ia(o,"http://www.w3.org/1999/xlink","xlink:actuate",v);break;case"xlinkArcrole":ia(o,"http://www.w3.org/1999/xlink","xlink:arcrole",v);break;case"xlinkRole":ia(o,"http://www.w3.org/1999/xlink","xlink:role",v);break;case"xlinkShow":ia(o,"http://www.w3.org/1999/xlink","xlink:show",v);break;case"xlinkTitle":ia(o,"http://www.w3.org/1999/xlink","xlink:title",v);break;case"xlinkType":ia(o,"http://www.w3.org/1999/xlink","xlink:type",v);break;case"xmlBase":ia(o,"http://www.w3.org/XML/1998/namespace","xml:base",v);break;case"xmlLang":ia(o,"http://www.w3.org/XML/1998/namespace","xml:lang",v);break;case"xmlSpace":ia(o,"http://www.w3.org/XML/1998/namespace","xml:space",v);break;case"is":rf(o,"is",v);break;case"innerText":case"textContent":break;default:(!(2<h.length)||h[0]!=="o"&&h[0]!=="O"||h[1]!=="n"&&h[1]!=="N")&&(h=GD.get(h)||h,rf(o,h,v))}}function Pv(o,u,h,v,y,S){switch(h){case"style":$S(o,v,S);break;case"dangerouslySetInnerHTML":if(v!=null){if(typeof v!="object"||!("__html"in v))throw Error(r(61));if(h=v.__html,h!=null){if(y.children!=null)throw Error(r(60));o.innerHTML=h}}break;case"children":typeof v=="string"?Wo(o,v):(typeof v=="number"||typeof v=="bigint")&&Wo(o,""+v);break;case"onScroll":v!=null&&rt("scroll",o);break;case"onScrollEnd":v!=null&&rt("scrollend",o);break;case"onClick":v!=null&&(o.onclick=aa);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!nf.hasOwnProperty(h))e:{if(h[0]==="o"&&h[1]==="n"&&(y=h.endsWith("Capture"),u=h.slice(2,y?h.length-7:void 0),S=o[In]||null,S=S!=null?S[h]:null,typeof S=="function"&&o.removeEventListener(u,S,y),typeof v=="function")){typeof S!="function"&&S!==null&&(h in o?o[h]=null:o.hasAttribute(h)&&o.removeAttribute(h)),o.addEventListener(u,v,y);break e}h in o?o[h]=v:v===!0?o.setAttribute(h,""):rf(o,h,v)}}}function Mn(o,u,h){switch(u){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":rt("error",o),rt("load",o);var v=!1,y=!1,S;for(S in h)if(h.hasOwnProperty(S)){var C=h[S];if(C!=null)switch(S){case"src":v=!0;break;case"srcSet":y=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,u));default:Ct(o,u,S,C,h,null)}}y&&Ct(o,u,"srcSet",h.srcSet,h,null),v&&Ct(o,u,"src",h.src,h,null);return;case"input":rt("invalid",o);var R=S=C=y=null,U=null,J=null;for(v in h)if(h.hasOwnProperty(v)){var ae=h[v];if(ae!=null)switch(v){case"name":y=ae;break;case"type":C=ae;break;case"checked":U=ae;break;case"defaultChecked":J=ae;break;case"value":S=ae;break;case"defaultValue":R=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(r(137,u));break;default:Ct(o,u,v,ae,h,null)}}MS(o,S,R,U,J,C,y,!1);return;case"select":rt("invalid",o),v=C=S=null;for(y in h)if(h.hasOwnProperty(y)&&(R=h[y],R!=null))switch(y){case"value":S=R;break;case"defaultValue":C=R;break;case"multiple":v=R;default:Ct(o,u,y,R,h,null)}u=S,h=C,o.multiple=!!v,u!=null?Yo(o,!!v,u,!1):h!=null&&Yo(o,!!v,h,!0);return;case"textarea":rt("invalid",o),S=y=v=null;for(C in h)if(h.hasOwnProperty(C)&&(R=h[C],R!=null))switch(C){case"value":v=R;break;case"defaultValue":y=R;break;case"children":S=R;break;case"dangerouslySetInnerHTML":if(R!=null)throw Error(r(91));break;default:Ct(o,u,C,R,h,null)}LS(o,v,y,S);return;case"option":for(U in h)if(h.hasOwnProperty(U)&&(v=h[U],v!=null))switch(U){case"selected":o.selected=v&&typeof v!="function"&&typeof v!="symbol";break;default:Ct(o,u,U,v,h,null)}return;case"dialog":rt("beforetoggle",o),rt("toggle",o),rt("cancel",o),rt("close",o);break;case"iframe":case"object":rt("load",o);break;case"video":case"audio":for(v=0;v<eu.length;v++)rt(eu[v],o);break;case"image":rt("error",o),rt("load",o);break;case"details":rt("toggle",o);break;case"embed":case"source":case"link":rt("error",o),rt("load",o);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(J in h)if(h.hasOwnProperty(J)&&(v=h[J],v!=null))switch(J){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,u));default:Ct(o,u,J,v,h,null)}return;default:if(Up(u)){for(ae in h)h.hasOwnProperty(ae)&&(v=h[ae],v!==void 0&&Pv(o,u,ae,v,h,void 0));return}}for(R in h)h.hasOwnProperty(R)&&(v=h[R],v!=null&&Ct(o,u,R,v,h,null))}function _3(o,u,h,v){switch(u){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var y=null,S=null,C=null,R=null,U=null,J=null,ae=null;for(ne in h){var oe=h[ne];if(h.hasOwnProperty(ne)&&oe!=null)switch(ne){case"checked":break;case"value":break;case"defaultValue":U=oe;default:v.hasOwnProperty(ne)||Ct(o,u,ne,null,v,oe)}}for(var te in v){var ne=v[te];if(oe=h[te],v.hasOwnProperty(te)&&(ne!=null||oe!=null))switch(te){case"type":S=ne;break;case"name":y=ne;break;case"checked":J=ne;break;case"defaultChecked":ae=ne;break;case"value":C=ne;break;case"defaultValue":R=ne;break;case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(r(137,u));break;default:ne!==oe&&Ct(o,u,te,ne,v,oe)}}Bp(o,C,R,U,J,ae,S,y);return;case"select":ne=C=R=te=null;for(S in h)if(U=h[S],h.hasOwnProperty(S)&&U!=null)switch(S){case"value":break;case"multiple":ne=U;default:v.hasOwnProperty(S)||Ct(o,u,S,null,v,U)}for(y in v)if(S=v[y],U=h[y],v.hasOwnProperty(y)&&(S!=null||U!=null))switch(y){case"value":te=S;break;case"defaultValue":R=S;break;case"multiple":C=S;default:S!==U&&Ct(o,u,y,S,v,U)}u=R,h=C,v=ne,te!=null?Yo(o,!!h,te,!1):!!v!=!!h&&(u!=null?Yo(o,!!h,u,!0):Yo(o,!!h,h?[]:"",!1));return;case"textarea":ne=te=null;for(R in h)if(y=h[R],h.hasOwnProperty(R)&&y!=null&&!v.hasOwnProperty(R))switch(R){case"value":break;case"children":break;default:Ct(o,u,R,null,v,y)}for(C in v)if(y=v[C],S=h[C],v.hasOwnProperty(C)&&(y!=null||S!=null))switch(C){case"value":te=y;break;case"defaultValue":ne=y;break;case"children":break;case"dangerouslySetInnerHTML":if(y!=null)throw Error(r(91));break;default:y!==S&&Ct(o,u,C,y,v,S)}DS(o,te,ne);return;case"option":for(var ke in h)if(te=h[ke],h.hasOwnProperty(ke)&&te!=null&&!v.hasOwnProperty(ke))switch(ke){case"selected":o.selected=!1;break;default:Ct(o,u,ke,null,v,te)}for(U in v)if(te=v[U],ne=h[U],v.hasOwnProperty(U)&&te!==ne&&(te!=null||ne!=null))switch(U){case"selected":o.selected=te&&typeof te!="function"&&typeof te!="symbol";break;default:Ct(o,u,U,te,v,ne)}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 qe in h)te=h[qe],h.hasOwnProperty(qe)&&te!=null&&!v.hasOwnProperty(qe)&&Ct(o,u,qe,null,v,te);for(J in v)if(te=v[J],ne=h[J],v.hasOwnProperty(J)&&te!==ne&&(te!=null||ne!=null))switch(J){case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(r(137,u));break;default:Ct(o,u,J,te,v,ne)}return;default:if(Up(u)){for(var Et in h)te=h[Et],h.hasOwnProperty(Et)&&te!==void 0&&!v.hasOwnProperty(Et)&&Pv(o,u,Et,void 0,v,te);for(ae in v)te=v[ae],ne=h[ae],!v.hasOwnProperty(ae)||te===ne||te===void 0&&ne===void 0||Pv(o,u,ae,te,v,ne);return}}for(var H in h)te=h[H],h.hasOwnProperty(H)&&te!=null&&!v.hasOwnProperty(H)&&Ct(o,u,H,null,v,te);for(oe in v)te=v[oe],ne=h[oe],!v.hasOwnProperty(oe)||te===ne||te==null&&ne==null||Ct(o,u,oe,te,v,ne)}function I1(o){switch(o){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function k3(){if(typeof performance.getEntriesByType=="function"){for(var o=0,u=0,h=performance.getEntriesByType("resource"),v=0;v<h.length;v++){var y=h[v],S=y.transferSize,C=y.initiatorType,R=y.duration;if(S&&R&&I1(C)){for(C=0,R=y.responseEnd,v+=1;v<h.length;v++){var U=h[v],J=U.startTime;if(J>R)break;var ae=U.transferSize,oe=U.initiatorType;ae&&I1(oe)&&(U=U.responseEnd,C+=ae*(U<R?1:(R-J)/(U-J)))}if(--v,u+=8*(S+C)/(y.duration/1e3),o++,10<o)break}}if(0<o)return u/o/1e6}return navigator.connection&&(o=navigator.connection.downlink,typeof o=="number")?o:5}var Nv=null,Rv=null;function nh(o){return o.nodeType===9?o:o.ownerDocument}function q1(o){switch(o){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function X1(o,u){if(o===0)switch(u){case"svg":return 1;case"math":return 2;default:return 0}return o===1&&u==="foreignObject"?0:o}function Mv(o,u){return o==="textarea"||o==="noscript"||typeof u.children=="string"||typeof u.children=="number"||typeof u.children=="bigint"||typeof u.dangerouslySetInnerHTML=="object"&&u.dangerouslySetInnerHTML!==null&&u.dangerouslySetInnerHTML.__html!=null}var Dv=null;function j3(){var o=window.event;return o&&o.type==="popstate"?o===Dv?!1:(Dv=o,!0):(Dv=null,!1)}var Z1=typeof setTimeout=="function"?setTimeout:void 0,T3=typeof clearTimeout=="function"?clearTimeout:void 0,B1=typeof Promise=="function"?Promise:void 0,C3=typeof queueMicrotask=="function"?queueMicrotask:typeof B1<"u"?function(o){return B1.resolve(null).then(o).catch(E3)}:Z1;function E3(o){setTimeout(function(){throw o})}function ls(o){return o==="head"}function V1(o,u){var h=u,v=0;do{var y=h.nextSibling;if(o.removeChild(h),y&&y.nodeType===8)if(h=y.data,h==="/$"||h==="/&"){if(v===0){o.removeChild(y),kl(u);return}v--}else if(h==="$"||h==="$?"||h==="$~"||h==="$!"||h==="&")v++;else if(h==="html")nu(o.ownerDocument.documentElement);else if(h==="head"){h=o.ownerDocument.head,nu(h);for(var S=h.firstChild;S;){var C=S.nextSibling,R=S.nodeName;S[Vs]||R==="SCRIPT"||R==="STYLE"||R==="LINK"&&S.rel.toLowerCase()==="stylesheet"||h.removeChild(S),S=C}}else h==="body"&&nu(o.ownerDocument.body);h=y}while(h);kl(u)}function U1(o,u){var h=o;o=0;do{var v=h.nextSibling;if(h.nodeType===1?u?(h._stashedDisplay=h.style.display,h.style.display="none"):(h.style.display=h._stashedDisplay||"",h.getAttribute("style")===""&&h.removeAttribute("style")):h.nodeType===3&&(u?(h._stashedText=h.nodeValue,h.nodeValue=""):h.nodeValue=h._stashedText||""),v&&v.nodeType===8)if(h=v.data,h==="/$"){if(o===0)break;o--}else h!=="$"&&h!=="$?"&&h!=="$~"&&h!=="$!"||o++;h=v}while(h)}function Lv(o){var u=o.firstChild;for(u&&u.nodeType===10&&(u=u.nextSibling);u;){var h=u;switch(u=u.nextSibling,h.nodeName){case"HTML":case"HEAD":case"BODY":Lv(h),xc(h);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(h.rel.toLowerCase()==="stylesheet")continue}o.removeChild(h)}}function A3(o,u,h,v){for(;o.nodeType===1;){var y=h;if(o.nodeName.toLowerCase()!==u.toLowerCase()){if(!v&&(o.nodeName!=="INPUT"||o.type!=="hidden"))break}else if(v){if(!o[Vs])switch(u){case"meta":if(!o.hasAttribute("itemprop"))break;return o;case"link":if(S=o.getAttribute("rel"),S==="stylesheet"&&o.hasAttribute("data-precedence"))break;if(S!==y.rel||o.getAttribute("href")!==(y.href==null||y.href===""?null:y.href)||o.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin)||o.getAttribute("title")!==(y.title==null?null:y.title))break;return o;case"style":if(o.hasAttribute("data-precedence"))break;return o;case"script":if(S=o.getAttribute("src"),(S!==(y.src==null?null:y.src)||o.getAttribute("type")!==(y.type==null?null:y.type)||o.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin))&&S&&o.hasAttribute("async")&&!o.hasAttribute("itemprop"))break;return o;default:return o}}else if(u==="input"&&o.type==="hidden"){var S=y.name==null?null:""+y.name;if(y.type==="hidden"&&o.getAttribute("name")===S)return o}else return o;if(o=Hr(o.nextSibling),o===null)break}return null}function Q3(o,u,h){if(u==="")return null;for(;o.nodeType!==3;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!h||(o=Hr(o.nextSibling),o===null))return null;return o}function Y1(o,u){for(;o.nodeType!==8;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!u||(o=Hr(o.nextSibling),o===null))return null;return o}function zv(o){return o.data==="$?"||o.data==="$~"}function $v(o){return o.data==="$!"||o.data==="$?"&&o.ownerDocument.readyState!=="loading"}function P3(o,u){var h=o.ownerDocument;if(o.data==="$~")o._reactRetry=u;else if(o.data!=="$?"||h.readyState!=="loading")u();else{var v=function(){u(),h.removeEventListener("DOMContentLoaded",v)};h.addEventListener("DOMContentLoaded",v),o._reactRetry=v}}function Hr(o){for(;o!=null;o=o.nextSibling){var u=o.nodeType;if(u===1||u===3)break;if(u===8){if(u=o.data,u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"||u==="F!"||u==="F")break;if(u==="/$"||u==="/&")return null}}return o}var Iv=null;function W1(o){o=o.nextSibling;for(var u=0;o;){if(o.nodeType===8){var h=o.data;if(h==="/$"||h==="/&"){if(u===0)return Hr(o.nextSibling);u--}else h!=="$"&&h!=="$!"&&h!=="$?"&&h!=="$~"&&h!=="&"||u++}o=o.nextSibling}return null}function F1(o){o=o.previousSibling;for(var u=0;o;){if(o.nodeType===8){var h=o.data;if(h==="$"||h==="$!"||h==="$?"||h==="$~"||h==="&"){if(u===0)return o;u--}else h!=="/$"&&h!=="/&"||u++}o=o.previousSibling}return null}function H1(o,u,h){switch(u=nh(h),o){case"html":if(o=u.documentElement,!o)throw Error(r(452));return o;case"head":if(o=u.head,!o)throw Error(r(453));return o;case"body":if(o=u.body,!o)throw Error(r(454));return o;default:throw Error(r(451))}}function nu(o){for(var u=o.attributes;u.length;)o.removeAttributeNode(u[0]);xc(o)}var Gr=new Map,G1=new Set;function rh(o){return typeof o.getRootNode=="function"?o.getRootNode():o.nodeType===9?o:o.ownerDocument}var xa=z.d;z.d={f:N3,r:R3,D:M3,C:D3,L:L3,m:z3,X:I3,S:$3,M:q3};function N3(){var o=xa.f(),u=Wf();return o||u}function R3(o){var u=Xa(o);u!==null&&u.tag===5&&u.type==="form"?m_(u):xa.r(o)}var Sl=typeof document>"u"?null:document;function K1(o,u,h){var v=Sl;if(v&&typeof u=="string"&&u){var y=Zr(u);y='link[rel="'+o+'"][href="'+y+'"]',typeof h=="string"&&(y+='[crossorigin="'+h+'"]'),G1.has(y)||(G1.add(y),o={rel:o,crossOrigin:h,href:u},v.querySelector(y)===null&&(u=v.createElement("link"),Mn(u,"link",o),dn(u),v.head.appendChild(u)))}}function M3(o){xa.D(o),K1("dns-prefetch",o,null)}function D3(o,u){xa.C(o,u),K1("preconnect",o,u)}function L3(o,u,h){xa.L(o,u,h);var v=Sl;if(v&&o&&u){var y='link[rel="preload"][as="'+Zr(u)+'"]';u==="image"&&h&&h.imageSrcSet?(y+='[imagesrcset="'+Zr(h.imageSrcSet)+'"]',typeof h.imageSizes=="string"&&(y+='[imagesizes="'+Zr(h.imageSizes)+'"]')):y+='[href="'+Zr(o)+'"]';var S=y;switch(u){case"style":S=wl(o);break;case"script":S=_l(o)}Gr.has(S)||(o=m({rel:"preload",href:u==="image"&&h&&h.imageSrcSet?void 0:o,as:u},h),Gr.set(S,o),v.querySelector(y)!==null||u==="style"&&v.querySelector(ru(S))||u==="script"&&v.querySelector(iu(S))||(u=v.createElement("link"),Mn(u,"link",o),dn(u),v.head.appendChild(u)))}}function z3(o,u){xa.m(o,u);var h=Sl;if(h&&o){var v=u&&typeof u.as=="string"?u.as:"script",y='link[rel="modulepreload"][as="'+Zr(v)+'"][href="'+Zr(o)+'"]',S=y;switch(v){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":S=_l(o)}if(!Gr.has(S)&&(o=m({rel:"modulepreload",href:o},u),Gr.set(S,o),h.querySelector(y)===null)){switch(v){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(h.querySelector(iu(S)))return}v=h.createElement("link"),Mn(v,"link",o),dn(v),h.head.appendChild(v)}}}function $3(o,u,h){xa.S(o,u,h);var v=Sl;if(v&&o){var y=Za(v).hoistableStyles,S=wl(o);u=u||"default";var C=y.get(S);if(!C){var R={loading:0,preload:null};if(C=v.querySelector(ru(S)))R.loading=5;else{o=m({rel:"stylesheet",href:o,"data-precedence":u},h),(h=Gr.get(S))&&qv(o,h);var U=C=v.createElement("link");dn(U),Mn(U,"link",o),U._p=new Promise(function(J,ae){U.onload=J,U.onerror=ae}),U.addEventListener("load",function(){R.loading|=1}),U.addEventListener("error",function(){R.loading|=2}),R.loading|=4,ih(C,u,v)}C={type:"stylesheet",instance:C,count:1,state:R},y.set(S,C)}}}function I3(o,u){xa.X(o,u);var h=Sl;if(h&&o){var v=Za(h).hoistableScripts,y=_l(o),S=v.get(y);S||(S=h.querySelector(iu(y)),S||(o=m({src:o,async:!0},u),(u=Gr.get(y))&&Xv(o,u),S=h.createElement("script"),dn(S),Mn(S,"link",o),h.head.appendChild(S)),S={type:"script",instance:S,count:1,state:null},v.set(y,S))}}function q3(o,u){xa.M(o,u);var h=Sl;if(h&&o){var v=Za(h).hoistableScripts,y=_l(o),S=v.get(y);S||(S=h.querySelector(iu(y)),S||(o=m({src:o,async:!0,type:"module"},u),(u=Gr.get(y))&&Xv(o,u),S=h.createElement("script"),dn(S),Mn(S,"link",o),h.head.appendChild(S)),S={type:"script",instance:S,count:1,state:null},v.set(y,S))}}function J1(o,u,h,v){var y=(y=Oe.current)?rh(y):null;if(!y)throw Error(r(446));switch(o){case"meta":case"title":return null;case"style":return typeof h.precedence=="string"&&typeof h.href=="string"?(u=wl(h.href),h=Za(y).hoistableStyles,v=h.get(u),v||(v={type:"style",instance:null,count:0,state:null},h.set(u,v)),v):{type:"void",instance:null,count:0,state:null};case"link":if(h.rel==="stylesheet"&&typeof h.href=="string"&&typeof h.precedence=="string"){o=wl(h.href);var S=Za(y).hoistableStyles,C=S.get(o);if(C||(y=y.ownerDocument||y,C={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},S.set(o,C),(S=y.querySelector(ru(o)))&&!S._p&&(C.instance=S,C.state.loading=5),Gr.has(o)||(h={rel:"preload",as:"style",href:h.href,crossOrigin:h.crossOrigin,integrity:h.integrity,media:h.media,hrefLang:h.hrefLang,referrerPolicy:h.referrerPolicy},Gr.set(o,h),S||X3(y,o,h,C.state))),u&&v===null)throw Error(r(528,""));return C}if(u&&v!==null)throw Error(r(529,""));return null;case"script":return u=h.async,h=h.src,typeof h=="string"&&u&&typeof u!="function"&&typeof u!="symbol"?(u=_l(h),h=Za(y).hoistableScripts,v=h.get(u),v||(v={type:"script",instance:null,count:0,state:null},h.set(u,v)),v):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,o))}}function wl(o){return'href="'+Zr(o)+'"'}function ru(o){return'link[rel="stylesheet"]['+o+"]"}function ek(o){return m({},o,{"data-precedence":o.precedence,precedence:null})}function X3(o,u,h,v){o.querySelector('link[rel="preload"][as="style"]['+u+"]")?v.loading=1:(u=o.createElement("link"),v.preload=u,u.addEventListener("load",function(){return v.loading|=1}),u.addEventListener("error",function(){return v.loading|=2}),Mn(u,"link",h),dn(u),o.head.appendChild(u))}function _l(o){return'[src="'+Zr(o)+'"]'}function iu(o){return"script[async]"+o}function tk(o,u,h){if(u.count++,u.instance===null)switch(u.type){case"style":var v=o.querySelector('style[data-href~="'+Zr(h.href)+'"]');if(v)return u.instance=v,dn(v),v;var y=m({},h,{"data-href":h.href,"data-precedence":h.precedence,href:null,precedence:null});return v=(o.ownerDocument||o).createElement("style"),dn(v),Mn(v,"style",y),ih(v,h.precedence,o),u.instance=v;case"stylesheet":y=wl(h.href);var S=o.querySelector(ru(y));if(S)return u.state.loading|=4,u.instance=S,dn(S),S;v=ek(h),(y=Gr.get(y))&&qv(v,y),S=(o.ownerDocument||o).createElement("link"),dn(S);var C=S;return C._p=new Promise(function(R,U){C.onload=R,C.onerror=U}),Mn(S,"link",v),u.state.loading|=4,ih(S,h.precedence,o),u.instance=S;case"script":return S=_l(h.src),(y=o.querySelector(iu(S)))?(u.instance=y,dn(y),y):(v=h,(y=Gr.get(S))&&(v=m({},h),Xv(v,y)),o=o.ownerDocument||o,y=o.createElement("script"),dn(y),Mn(y,"link",v),o.head.appendChild(y),u.instance=y);case"void":return null;default:throw Error(r(443,u.type))}else u.type==="stylesheet"&&(u.state.loading&4)===0&&(v=u.instance,u.state.loading|=4,ih(v,h.precedence,o));return u.instance}function ih(o,u,h){for(var v=h.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),y=v.length?v[v.length-1]:null,S=y,C=0;C<v.length;C++){var R=v[C];if(R.dataset.precedence===u)S=R;else if(S!==y)break}S?S.parentNode.insertBefore(o,S.nextSibling):(u=h.nodeType===9?h.head:h,u.insertBefore(o,u.firstChild))}function qv(o,u){o.crossOrigin==null&&(o.crossOrigin=u.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=u.referrerPolicy),o.title==null&&(o.title=u.title)}function Xv(o,u){o.crossOrigin==null&&(o.crossOrigin=u.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=u.referrerPolicy),o.integrity==null&&(o.integrity=u.integrity)}var ah=null;function nk(o,u,h){if(ah===null){var v=new Map,y=ah=new Map;y.set(h,v)}else y=ah,v=y.get(h),v||(v=new Map,y.set(h,v));if(v.has(o))return v;for(v.set(o,null),h=h.getElementsByTagName(o),y=0;y<h.length;y++){var S=h[y];if(!(S[Vs]||S[xn]||o==="link"&&S.getAttribute("rel")==="stylesheet")&&S.namespaceURI!=="http://www.w3.org/2000/svg"){var C=S.getAttribute(u)||"";C=o+C;var R=v.get(C);R?R.push(S):v.set(C,[S])}}return v}function rk(o,u,h){o=o.ownerDocument||o,o.head.insertBefore(h,u==="title"?o.querySelector("head > title"):null)}function Z3(o,u,h){if(h===1||u.itemProp!=null)return!1;switch(o){case"meta":case"title":return!0;case"style":if(typeof u.precedence!="string"||typeof u.href!="string"||u.href==="")break;return!0;case"link":if(typeof u.rel!="string"||typeof u.href!="string"||u.href===""||u.onLoad||u.onError)break;switch(u.rel){case"stylesheet":return o=u.disabled,typeof u.precedence=="string"&&o==null;default:return!0}case"script":if(u.async&&typeof u.async!="function"&&typeof u.async!="symbol"&&!u.onLoad&&!u.onError&&u.src&&typeof u.src=="string")return!0}return!1}function ik(o){return!(o.type==="stylesheet"&&(o.state.loading&3)===0)}function B3(o,u,h,v){if(h.type==="stylesheet"&&(typeof v.media!="string"||matchMedia(v.media).matches!==!1)&&(h.state.loading&4)===0){if(h.instance===null){var y=wl(v.href),S=u.querySelector(ru(y));if(S){u=S._p,u!==null&&typeof u=="object"&&typeof u.then=="function"&&(o.count++,o=sh.bind(o),u.then(o,o)),h.state.loading|=4,h.instance=S,dn(S);return}S=u.ownerDocument||u,v=ek(v),(y=Gr.get(y))&&qv(v,y),S=S.createElement("link"),dn(S);var C=S;C._p=new Promise(function(R,U){C.onload=R,C.onerror=U}),Mn(S,"link",v),h.instance=S}o.stylesheets===null&&(o.stylesheets=new Map),o.stylesheets.set(h,u),(u=h.state.preload)&&(h.state.loading&3)===0&&(o.count++,h=sh.bind(o),u.addEventListener("load",h),u.addEventListener("error",h))}}var Zv=0;function V3(o,u){return o.stylesheets&&o.count===0&&lh(o,o.stylesheets),0<o.count||0<o.imgCount?function(h){var v=setTimeout(function(){if(o.stylesheets&&lh(o,o.stylesheets),o.unsuspend){var S=o.unsuspend;o.unsuspend=null,S()}},6e4+u);0<o.imgBytes&&Zv===0&&(Zv=62500*k3());var y=setTimeout(function(){if(o.waitingForImages=!1,o.count===0&&(o.stylesheets&&lh(o,o.stylesheets),o.unsuspend)){var S=o.unsuspend;o.unsuspend=null,S()}},(o.imgBytes>Zv?50:800)+u);return o.unsuspend=h,function(){o.unsuspend=null,clearTimeout(v),clearTimeout(y)}}:null}function sh(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)lh(this,this.stylesheets);else if(this.unsuspend){var o=this.unsuspend;this.unsuspend=null,o()}}}var oh=null;function lh(o,u){o.stylesheets=null,o.unsuspend!==null&&(o.count++,oh=new Map,u.forEach(U3,o),oh=null,sh.call(o))}function U3(o,u){if(!(u.state.loading&4)){var h=oh.get(o);if(h)var v=h.get(null);else{h=new Map,oh.set(o,h);for(var y=o.querySelectorAll("link[data-precedence],style[data-precedence]"),S=0;S<y.length;S++){var C=y[S];(C.nodeName==="LINK"||C.getAttribute("media")!=="not all")&&(h.set(C.dataset.precedence,C),v=C)}v&&h.set(null,v)}y=u.instance,C=y.getAttribute("data-precedence"),S=h.get(C)||v,S===v&&h.set(null,y),h.set(C,y),this.count++,v=sh.bind(this),y.addEventListener("load",v),y.addEventListener("error",v),S?S.parentNode.insertBefore(y,S.nextSibling):(o=o.nodeType===9?o.head:o,o.insertBefore(y,o.firstChild)),u.state.loading|=4}}var au={$$typeof:j,Provider:null,Consumer:null,_currentValue:ee,_currentValue2:ee,_threadCount:0};function Y3(o,u,h,v,y,S,C,R,U){this.tag=1,this.containerInfo=o,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=Cn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Cn(0),this.hiddenUpdates=Cn(null),this.identifierPrefix=v,this.onUncaughtError=y,this.onCaughtError=S,this.onRecoverableError=C,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=U,this.incompleteTransitions=new Map}function ak(o,u,h,v,y,S,C,R,U,J,ae,oe){return o=new Y3(o,u,h,C,U,J,ae,oe,R),u=1,S===!0&&(u|=24),S=jr(3,null,null,u),o.current=S,S.stateNode=o,u=Sg(),u.refCount++,o.pooledCache=u,u.refCount++,S.memoizedState={element:v,isDehydrated:h,cache:u},jg(S),o}function sk(o){return o?(o=tl,o):tl}function ok(o,u,h,v,y,S){y=sk(y),v.context===null?v.context=y:v.pendingContext=y,v=Ga(u),v.payload={element:h},S=S===void 0?null:S,S!==null&&(v.callback=S),h=Ka(o,v,u),h!==null&&(dr(h,o,u),Lc(h,o,u))}function lk(o,u){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var h=o.retryLane;o.retryLane=h!==0&&h<u?h:u}}function Bv(o,u){lk(o,u),(o=o.alternate)&&lk(o,u)}function ck(o){if(o.tag===13||o.tag===31){var u=Hs(o,67108864);u!==null&&dr(u,o,67108864),Bv(o,67108864)}}function uk(o){if(o.tag===13||o.tag===31){var u=Qr();u=un(u);var h=Hs(o,u);h!==null&&dr(h,o,u),Bv(o,u)}}var ch=!0;function W3(o,u,h,v){var y=I.T;I.T=null;var S=z.p;try{z.p=2,Vv(o,u,h,v)}finally{z.p=S,I.T=y}}function F3(o,u,h,v){var y=I.T;I.T=null;var S=z.p;try{z.p=8,Vv(o,u,h,v)}finally{z.p=S,I.T=y}}function Vv(o,u,h,v){if(ch){var y=Uv(v);if(y===null)Qv(o,u,v,uh,h),fk(o,v);else if(G3(y,o,u,h,v))v.stopPropagation();else if(fk(o,v),u&4&&-1<H3.indexOf(o)){for(;y!==null;){var S=Xa(y);if(S!==null)switch(S.tag){case 3:if(S=S.stateNode,S.current.memoizedState.isDehydrated){var C=Zt(S.pendingLanes);if(C!==0){var R=S;for(R.pendingLanes|=2,R.entangledLanes|=2;C;){var U=1<<31-ht(C);R.entanglements[1]|=U,C&=~U}Mi(S),(yt&6)===0&&(Uf=et()+500,Jc(0))}}break;case 31:case 13:R=Hs(S,2),R!==null&&dr(R,S,2),Wf(),Bv(S,2)}if(S=Uv(v),S===null&&Qv(o,u,v,uh,h),S===y)break;y=S}y!==null&&v.stopPropagation()}else Qv(o,u,v,null,h)}}function Uv(o){return o=Wp(o),Yv(o)}var uh=null;function Yv(o){if(uh=null,o=qa(o),o!==null){var u=a(o);if(u===null)o=null;else{var h=u.tag;if(h===13){if(o=s(u),o!==null)return o;o=null}else if(h===31){if(o=l(u),o!==null)return o;o=null}else if(h===3){if(u.stateNode.current.memoizedState.isDehydrated)return u.tag===3?u.stateNode.containerInfo:null;o=null}else u!==o&&(o=null)}}return uh=o,null}function dk(o){switch(o){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(Un()){case ie:return 2;case de:return 8;case Pe:case Ze:return 32;case tt:return 268435456;default:return 32}default:return 32}}var Wv=!1,cs=null,us=null,ds=null,su=new Map,ou=new Map,fs=[],H3="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 fk(o,u){switch(o){case"focusin":case"focusout":cs=null;break;case"dragenter":case"dragleave":us=null;break;case"mouseover":case"mouseout":ds=null;break;case"pointerover":case"pointerout":su.delete(u.pointerId);break;case"gotpointercapture":case"lostpointercapture":ou.delete(u.pointerId)}}function lu(o,u,h,v,y,S){return o===null||o.nativeEvent!==S?(o={blockedOn:u,domEventName:h,eventSystemFlags:v,nativeEvent:S,targetContainers:[y]},u!==null&&(u=Xa(u),u!==null&&ck(u)),o):(o.eventSystemFlags|=v,u=o.targetContainers,y!==null&&u.indexOf(y)===-1&&u.push(y),o)}function G3(o,u,h,v,y){switch(u){case"focusin":return cs=lu(cs,o,u,h,v,y),!0;case"dragenter":return us=lu(us,o,u,h,v,y),!0;case"mouseover":return ds=lu(ds,o,u,h,v,y),!0;case"pointerover":var S=y.pointerId;return su.set(S,lu(su.get(S)||null,o,u,h,v,y)),!0;case"gotpointercapture":return S=y.pointerId,ou.set(S,lu(ou.get(S)||null,o,u,h,v,y)),!0}return!1}function hk(o){var u=qa(o.target);if(u!==null){var h=a(u);if(h!==null){if(u=h.tag,u===13){if(u=s(h),u!==null){o.blockedOn=u,qr(o.priority,function(){uk(h)});return}}else if(u===31){if(u=l(h),u!==null){o.blockedOn=u,qr(o.priority,function(){uk(h)});return}}else if(u===3&&h.stateNode.current.memoizedState.isDehydrated){o.blockedOn=h.tag===3?h.stateNode.containerInfo:null;return}}}o.blockedOn=null}function dh(o){if(o.blockedOn!==null)return!1;for(var u=o.targetContainers;0<u.length;){var h=Uv(o.nativeEvent);if(h===null){h=o.nativeEvent;var v=new h.constructor(h.type,h);Yp=v,h.target.dispatchEvent(v),Yp=null}else return u=Xa(h),u!==null&&ck(u),o.blockedOn=h,!1;u.shift()}return!0}function mk(o,u,h){dh(o)&&h.delete(u)}function K3(){Wv=!1,cs!==null&&dh(cs)&&(cs=null),us!==null&&dh(us)&&(us=null),ds!==null&&dh(ds)&&(ds=null),su.forEach(mk),ou.forEach(mk)}function fh(o,u){o.blockedOn===u&&(o.blockedOn=null,Wv||(Wv=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,K3)))}var hh=null;function pk(o){hh!==o&&(hh=o,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){hh===o&&(hh=null);for(var u=0;u<o.length;u+=3){var h=o[u],v=o[u+1],y=o[u+2];if(typeof v!="function"){if(Yv(v||h)===null)continue;break}var S=Xa(h);S!==null&&(o.splice(u,3),u-=3,Ug(S,{pending:!0,data:y,method:h.method,action:v},v,y))}}))}function kl(o){function u(U){return fh(U,o)}cs!==null&&fh(cs,o),us!==null&&fh(us,o),ds!==null&&fh(ds,o),su.forEach(u),ou.forEach(u);for(var h=0;h<fs.length;h++){var v=fs[h];v.blockedOn===o&&(v.blockedOn=null)}for(;0<fs.length&&(h=fs[0],h.blockedOn===null);)hk(h),h.blockedOn===null&&fs.shift();if(h=(o.ownerDocument||o).$$reactFormReplay,h!=null)for(v=0;v<h.length;v+=3){var y=h[v],S=h[v+1],C=y[In]||null;if(typeof S=="function")C||pk(h);else if(C){var R=null;if(S&&S.hasAttribute("formAction")){if(y=S,C=S[In]||null)R=C.formAction;else if(Yv(y)!==null)continue}else R=C.action;typeof R=="function"?h[v+1]=R:(h.splice(v,3),v-=3),pk(h)}}}function gk(){function o(S){S.canIntercept&&S.info==="react-transition"&&S.intercept({handler:function(){return new Promise(function(C){return y=C})},focusReset:"manual",scroll:"manual"})}function u(){y!==null&&(y(),y=null),v||setTimeout(h,20)}function h(){if(!v&&!navigation.transition){var S=navigation.currentEntry;S&&S.url!=null&&navigation.navigate(S.url,{state:S.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var v=!1,y=null;return navigation.addEventListener("navigate",o),navigation.addEventListener("navigatesuccess",u),navigation.addEventListener("navigateerror",u),setTimeout(h,100),function(){v=!0,navigation.removeEventListener("navigate",o),navigation.removeEventListener("navigatesuccess",u),navigation.removeEventListener("navigateerror",u),y!==null&&(y(),y=null)}}}function Fv(o){this._internalRoot=o}mh.prototype.render=Fv.prototype.render=function(o){var u=this._internalRoot;if(u===null)throw Error(r(409));var h=u.current,v=Qr();ok(h,v,o,u,null,null)},mh.prototype.unmount=Fv.prototype.unmount=function(){var o=this._internalRoot;if(o!==null){this._internalRoot=null;var u=o.containerInfo;ok(o.current,2,null,o,null,null),Wf(),u[Ia]=null}};function mh(o){this._internalRoot=o}mh.prototype.unstable_scheduleHydration=function(o){if(o){var u=Wn();o={blockedOn:null,target:o,priority:u};for(var h=0;h<fs.length&&u!==0&&u<fs[h].priority;h++);fs.splice(h,0,o),h===0&&hk(o)}};var vk=t.version;if(vk!=="19.2.4")throw Error(r(527,vk,"19.2.4"));z.findDOMNode=function(o){var u=o._reactInternals;if(u===void 0)throw typeof o.render=="function"?Error(r(188)):(o=Object.keys(o).join(","),Error(r(268,o)));return o=d(u),o=o!==null?f(o):null,o=o===null?null:o.stateNode,o};var J3={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:I,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ph=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ph.isDisabled&&ph.supportsFiber)try{rn=ph.inject(J3),Xt=ph}catch{}}return uu.createRoot=function(o,u){if(!i(o))throw Error(r(299));var h=!1,v="",y=__,S=k_,C=j_;return u!=null&&(u.unstable_strictMode===!0&&(h=!0),u.identifierPrefix!==void 0&&(v=u.identifierPrefix),u.onUncaughtError!==void 0&&(y=u.onUncaughtError),u.onCaughtError!==void 0&&(S=u.onCaughtError),u.onRecoverableError!==void 0&&(C=u.onRecoverableError)),u=ak(o,1,!1,null,null,h,v,null,y,S,C,gk),o[Ia]=u.current,Av(o),new Fv(u)},uu.hydrateRoot=function(o,u,h){if(!i(o))throw Error(r(299));var v=!1,y="",S=__,C=k_,R=j_,U=null;return h!=null&&(h.unstable_strictMode===!0&&(v=!0),h.identifierPrefix!==void 0&&(y=h.identifierPrefix),h.onUncaughtError!==void 0&&(S=h.onUncaughtError),h.onCaughtError!==void 0&&(C=h.onCaughtError),h.onRecoverableError!==void 0&&(R=h.onRecoverableError),h.formState!==void 0&&(U=h.formState)),u=ak(o,1,!0,u,h??null,v,y,U,S,C,R,gk),u.context=sk(null),h=u.current,v=Qr(),v=un(v),y=Ga(v),y.callback=null,Ka(h,y,v),h=v,u.current.lanes=h,$n(u,h),Mi(u),o[Ia]=u.current,Av(o),new mh(u)},uu.version="19.2.4",uu}var Tk;function yz(){if(Tk)return Kv.exports;Tk=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(),Kv.exports=bz(),Kv.exports}var xz=yz();const Sz=QE(xz);function Cb(e){"@babel/helpers - typeof";return Cb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cb(e)}function NE(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":Cb(XMLHttpRequest))==="object"}function wz(e){return!!e&&typeof e.then=="function"}function _z(e){return wz(e)?e:Promise.resolve(e)}function Ck(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ek(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ck(Object(n),!0).forEach(function(r){kz(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ck(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kz(e,t,n){return(t=jz(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jz(e){var t=Tz(e,"string");return Eo(t)=="symbol"?t:t+""}function Tz(e,t){if(Eo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Eo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Eo(e){"@babel/helpers - typeof";return Eo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Eo(e)}var Ps=typeof fetch=="function"?fetch:void 0;typeof global<"u"&&global.fetch?Ps=global.fetch:typeof window<"u"&&window.fetch&&(Ps=window.fetch);var td;NE()&&(typeof global<"u"&&global.XMLHttpRequest?td=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(td=window.XMLHttpRequest));var bm;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?bm=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(bm=window.ActiveXObject));typeof Ps!="function"&&(Ps=void 0);if(!Ps&&!td&&!bm)try{Qe(()=>import("./browser-ponyfill-D2ngVqWO.js").then(e=>e.b),__vite__mapDeps([0,1])).then(function(e){Ps=e.default}).catch(function(){})}catch{}var Eb=function(t,n){if(n&&Eo(n)==="object"){var r="";for(var i in n)r+="&"+encodeURIComponent(i)+"="+encodeURIComponent(n[i]);if(!r)return t;t=t+(t.indexOf("?")!==-1?"&":"?")+r.slice(1)}return t},Ak=function(t,n,r,i){var a=function(c){if(!c.ok)return r(c.statusText||"Error",{status:c.status});c.text().then(function(d){r(null,{status:c.status,data:d})}).catch(r)};if(i){var s=i(t,n);if(s instanceof Promise){s.then(a).catch(r);return}}typeof fetch=="function"?fetch(t,n).then(a).catch(r):Ps(t,n).then(a).catch(r)},Qk=!1,Cz=function(t,n,r,i){t.queryStringParams&&(n=Eb(n,t.queryStringParams));var a=Ek({},typeof t.customHeaders=="function"?t.customHeaders():t.customHeaders);typeof window>"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(a["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),r&&(a["Content-Type"]="application/json");var s=typeof t.requestOptions=="function"?t.requestOptions(r):t.requestOptions,l=Ek({method:r?"POST":"GET",body:r?t.stringify(r):void 0,headers:a},Qk?{}:s),c=typeof t.alternateFetch=="function"&&t.alternateFetch.length>=1?t.alternateFetch:void 0;try{Ak(n,l,i,c)}catch(d){if(!s||Object.keys(s).length===0||!d.message||d.message.indexOf("not implemented")<0)return i(d);try{Object.keys(s).forEach(function(f){delete l[f]}),Ak(n,l,i,c),Qk=!0}catch(f){i(f)}}},Ez=function(t,n,r,i){r&&Eo(r)==="object"&&(r=Eb("",r).slice(1)),t.queryStringParams&&(n=Eb(n,t.queryStringParams));try{var a=td?new td:new bm("MSXML2.XMLHTTP.3.0");a.open(r?"POST":"GET",n,1),t.crossDomain||a.setRequestHeader("X-Requested-With","XMLHttpRequest"),a.withCredentials=!!t.withCredentials,r&&a.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),a.overrideMimeType&&a.overrideMimeType("application/json");var s=t.customHeaders;if(s=typeof s=="function"?s():s,s)for(var l in s)a.setRequestHeader(l,s[l]);a.onreadystatechange=function(){a.readyState>3&&i(a.status>=400?a.statusText:null,{status:a.status,data:a.responseText})},a.send(r)}catch(c){console&&console.log(c)}},Az=function(t,n,r,i){if(typeof r=="function"&&(i=r,r=void 0),i=i||function(){},Ps&&n.indexOf("file:")!==0)return Cz(t,n,r,i);if(NE()||typeof ActiveXObject=="function")return Ez(t,n,r,i);i(new Error("No fetch and no xhr implementation found!"))};function Vl(e){"@babel/helpers - typeof";return Vl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vl(e)}function Pk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function tO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Pk(Object(n),!0).forEach(function(r){RE(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Qz(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Pz(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ME(r.key),r)}}function Nz(e,t,n){return t&&Pz(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function RE(e,t,n){return(t=ME(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ME(e){var t=Rz(e,"string");return Vl(t)=="symbol"?t:t+""}function Rz(e,t){if(Vl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Vl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Mz=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:function(n){return JSON.parse(n)},stringify:JSON.stringify,parsePayload:function(n,r,i){return RE({},r,i||"")},parseLoadPayload:function(n,r){},request:Az,reloadInterval:typeof window<"u"?!1:3600*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},DE=(function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Qz(this,e),this.services=t,this.options=n,this.allOptions=r,this.type="backend",this.init(t,n,r)}return Nz(e,[{key:"init",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=n,this.options=tO(tO(tO({},Mz()),this.options||{}),i),this.allOptions=a,this.services&&this.options.reloadInterval){var s=setInterval(function(){return r.reload()},this.options.reloadInterval);Vl(s)==="object"&&typeof s.unref=="function"&&s.unref()}}},{key:"readMulti",value:function(n,r,i){this._readAny(n,n,r,r,i)}},{key:"read",value:function(n,r,i){this._readAny([n],n,[r],r,i)}},{key:"_readAny",value:function(n,r,i,a,s){var l=this,c=this.options.loadPath;typeof this.options.loadPath=="function"&&(c=this.options.loadPath(n,i)),c=_z(c),c.then(function(d){if(!d)return s(null,{});var f=l.services.interpolator.interpolate(d,{lng:n.join("+"),ns:i.join("+")});l.loadUrl(f,s,r,a)})}},{key:"loadUrl",value:function(n,r,i,a){var s=this,l=typeof i=="string"?[i]:i,c=typeof a=="string"?[a]:a,d=this.options.parseLoadPayload(l,c);this.options.request(this.options,n,d,function(f,m){if(m&&(m.status>=500&&m.status<600||!m.status))return r("failed loading "+n+"; status code: "+m.status,!0);if(m&&m.status>=400&&m.status<500)return r("failed loading "+n+"; status code: "+m.status,!1);if(!m&&f&&f.message){var p=f.message.toLowerCase(),O=["failed","fetch","network","load"].find(function(w){return p.indexOf(w)>-1});if(O)return r("failed loading "+n+": "+f.message,!0)}if(f)return r(f,!1);var b,x;try{typeof m.data=="string"?b=s.options.parse(m.data,i,a):b=m.data}catch{x="failed parsing "+n+" to json"}if(x)return r(x,!1);r(null,b)})}},{key:"create",value:function(n,r,i,a,s){var l=this;if(this.options.addPath){typeof n=="string"&&(n=[n]);var c=this.options.parsePayload(r,i,a),d=0,f=[],m=[];n.forEach(function(p){var O=l.options.addPath;typeof l.options.addPath=="function"&&(O=l.options.addPath(p,r));var b=l.services.interpolator.interpolate(O,{lng:p,ns:r});l.options.request(l.options,b,c,function(x,w){d+=1,f.push(x),m.push(w),d===n.length&&typeof s=="function"&&s(f,m)})})}}},{key:"reload",value:function(){var n=this,r=this.services,i=r.backendConnector,a=r.languageUtils,s=r.logger,l=i.language;if(!(l&&l.toLowerCase()==="cimode")){var c=[],d=function(m){var p=a.toResolveHierarchy(m);p.forEach(function(O){c.indexOf(O)<0&&c.push(O)})};d(l),this.allOptions.preload&&this.allOptions.preload.forEach(function(f){return d(f)}),c.forEach(function(f){n.allOptions.ns.forEach(function(m){i.read(f,m,"read",null,null,function(p,O){p&&s.warn("loading namespace ".concat(m," for language ").concat(f," failed"),p),!p&&O&&s.log("loaded namespace ".concat(m," for language ").concat(f),O),i.loaded("".concat(f,"|").concat(m),p,O)})})})}}}])})();DE.type="backend";const LE=["ar","bn","cs","da","de","el","en","es","fa","fi","fr","he","hi","id","it","ja","ko","ms","nl","no","pl","pt","ro","sv","th","tr","uk","vi","zh"],Ul="en";function Ab(e){return LE.includes(e)}uz.use(DE).use(dz).init({ns:["translation"],defaultNS:"translation",fallbackLng:Ul,supportedLngs:[...LE],backend:{loadPath:"/messages/{{lng}}.json"},interpolation:{escapeValue:!1},initImmediate:!1});var zE={annotations:"Annotations",history:"History",resourceInfo:"Resource Info",collaboration:"Collaboration",userAccount:"User Account",settings:"Settings",knowledgeBase:"Knowledge Base"},$E={title:"Resource Info",locale:"Locale",notSpecified:"Not specified",entityTypeTags:"Entity Type Tags",representation:"Representation",mediaType:"Media Type",byteSize:"Size",storageUri:"Storage",clone:"Clone",cloneDescription:"Generate a shareable clone link for this resource",archive:"Archive",archiveDescription:"Move this resource to archived status",unarchive:"Unarchive",unarchiveDescription:"Restore this resource to active status",provenance:"Provenance",createdAt:"Created",modifiedAt:"Modified",creationMethod:"How created",attributedTo:"Attributed to",derivedFrom:"Derived from",generatedBy:"Generated by"},IE={title:"Collaboration",connectionStatus:"Connection Status",live:"Live",disconnected:"Disconnected",events:"{{count}} events",lastSync:"Last sync:",noActivity:"No activity yet",justNow:"Just now",secondsAgo:"{{count}} seconds ago",minuteAgo:"1 minute ago",minutesAgo:"{{count}} minutes ago",hourAgo:"1 hour ago",hoursAgo:"{{count}} hours ago",realtimeActive:"Real-time updates are active",reconnecting:"Reconnecting to server...",sharing:"Sharing",collaborationComingSoon:"Collaboration features coming soon"},qE={history:"History",loading:"Loading...",user:"User",method:"Method",viewOriginal:"View original",viewAnnotation:"View annotation: {{content}}",resourceCreated:"Created Resource",resourceCloned:"Cloned",resourceArchived:"Archived",resourceUnarchived:"Unarchived",highlightAdded:"Highlight Added",highlightRemoved:"Highlight Removed",referenceCreated:"Reference Created",referenceResolved:"Reference Resolved",referenceDeleted:"Reference Deleted",entitytagAdded:"Tag Added",entitytagRemoved:"Tag Removed",assessmentAdded:"Assessment Added",assessmentRemoved:"Assessment Removed",annotationAdded:"Annotation Added",annotationRemoved:"Annotation Removed",annotationBodyUpdated:"Annotation Updated",jobEvent:"Job Event",embeddingComputed:"Embedding Computed",justNow:"just now",minutesAgo:"{{count}}m ago",hoursAgo:"{{count}}h ago",daysAgo:"{{count}}d ago"},XE={title:"Comments",noComments:"No comments yet. Select text and click Comment to add one.",commentPlaceholder:"Type your comment here...",save:"Save",cancel:"Cancel",edit:"Edit",annotateComments:"Annotate Comments",instructions:"Instructions",optional:"(optional)",instructionsPlaceholder:"e.g., Focus on technical terminology...",annotate:"Annotate",annotating:"Annotating...",toneLabel:"Tone",toneOptional:"(optional)",toneScholarly:"Scholarly",toneExplanatory:"Explanatory",toneConversational:"Conversational",toneTechnical:"Technical",densityLabel:"Density",densitySparse:"Sparse",densityDense:"Dense",fragmentSelected:"Fragment selected",imageRegionSelected:"Image region selected",closeProgress:"Close"},ZE={title:"Highlights",noHighlights:"No highlights yet. Use AI annotation to find important passages.",annotateHighlights:"Annotate Highlights",instructions:"Instructions",optional:"(optional)",instructionsPlaceholder:"e.g., Focus on key technical concepts...",annotate:"Annotate",annotating:"Annotating...",cancel:"Cancel",densityLabel:"Density",densitySparse:"Sparse",densityDense:"Dense",closeProgress:"Close"},BE={title:"Assessments",noAssessments:"No assessments yet. Use AI annotation to evaluate passages.",assessmentPlaceholder:"Type your assessment here...",save:"Save",cancel:"Cancel",annotateAssessments:"Annotate Assessments",instructions:"Instructions",optional:"(optional)",instructionsPlaceholder:"e.g., Evaluate claims for accuracy and evidence...",annotate:"Annotate",annotating:"Annotating...",toneLabel:"Tone",toneOptional:"(optional)",toneAnalytical:"Analytical",toneCritical:"Critical",toneBalanced:"Balanced",toneConstructive:"Constructive",densityLabel:"Density",densitySparse:"Sparse",densityDense:"Dense",fragmentSelected:"Fragment selected",imageRegionSelected:"Image region selected",closeProgress:"Close"},VE={title:"Tags",noTags:"No tags yet. Use AI annotation to identify structural roles.",annotateTags:"Annotate Tags",selectSchema:"Select Framework",schemaLegal:"Legal Analysis (IRAC)",schemaScientific:"Scientific Paper (IMRAD)",schemaArgument:"Argument Structure (Toulmin)",selectCategories:"Select Categories",categoryIssue:"Issue",categoryRule:"Rule",categoryApplication:"Application",categoryConclusion:"Conclusion",categoryIntroduction:"Introduction",categoryMethods:"Methods",categoryResults:"Results",categoryDiscussion:"Discussion",categoryClaim:"Claim",categoryEvidence:"Evidence",categoryWarrant:"Warrant",categoryCounterargument:"Counterargument",categoryRebuttal:"Rebuttal",annotate:"Annotate",annotating:"Annotating...",cancel:"Cancel",selectAll:"Select All",deselectAll:"Deselect All",categoriesSelected:"{count, plural, =0 {No categories selected} =1 {1 category selected} other {# categories selected}}",createTagForSelection:"Create Tag for Selection",selectCategory:"Select Category",chooseCategory:"Choose a category...",fragmentSelected:"Fragment selected",imageRegionSelected:"Image region selected"},UE={title:"Annotations",statistics:"Statistics",highlight:"Highlights",reference:"References",assessment:"Assessments",comment:"Comments",tag:"Tags"},YE={title:"Statistics",highlights:"Highlights",comments:"Comments",assessments:"Assessments",tags:"Tags",references:"References",stub:"Stub",resolved:"Resolved",entityTypes:"Entity Types"},WE={title:"References",noReferences:"No references yet. Select text to create references to other resources.",outgoingReferences:"Outgoing References",incomingReferences:"Incoming References",noIncomingReferences:"No incoming references",stub:"Stub reference (not linked)",resolved:"Resolved reference (linked)",open:"Open",unlink:"Unlink",resolve:"Resolve Reference",cancel:"Cancel",createReference:"Create Reference",entityTypesOptional:"Entity Types (Optional)",fragmentSelected:"Fragment selected",imageRegionSelected:"Image region selected",annotateReferences:"Annotate References",selectEntityTypes:"Entity types:",select:"Select",deselect:"Deselect",noEntityTypes:"No entity types available",typesSelected:"{count, plural, =1 {1 type selected} other {# types selected}}",annotate:"Annotate",annotating:"Annotating...",includeDescriptiveReferences:"Include descriptive references",descriptiveReferencesTooltip:"Also find phrases like 'the CEO', 'the tech giant', 'the physicist' (in addition to names)",annotationProgressTitle:"Annotating Entity References",cancelAnnotation:"Cancel annotation",found:"{{count}} found",complete:"Annotation complete!",failed:"Annotation failed",current:"Current: {{entityType}}",closeProgress:"Close",loading:"loading...",loadingEllipsis:"Loading...",untitledResource:"Untitled Resource",noText:"No text"},FE={title:"Keyboard Shortcuts",closeDialog:"Close dialog",or:"or",navigationTitle:"Navigation",navOpenSearch:"Open global search",navOpenSearchAlt:"Open global search (alternative)",navCreateResource:"Create new resource",navCloseOverlays:"Close all overlays (double press)",navShowHelp:"Show keyboard shortcuts help",sidebarTitle:"Knowledge Sidebar",sidebarCollapse:"Collapse sidebar",sidebarExpand:"Expand sidebar",sidebarPickup:"Pick up resource tab (when focused)",sidebarMove:"Move resource tab (when dragging)",sidebarDrop:"Drop resource tab (when dragging)",sidebarCancel:"Cancel drag operation",annotationsTitle:"Resource Annotations",annotHighlight:"Create highlight from annotation (direct)",annotReference:"Open reference popup for annotation",annotDelete:"Delete focused annotation",annotNavigate:"Navigate through annotations",annotNavigateBack:"Navigate annotations backward",listsTitle:"Lists & Grids",listsFilterNav:"Navigate entity type filters",listsGridNav:"Navigate resource grid",listsJumpFirst:"Jump to first item",listsJumpLast:"Jump to last item",searchModalTitle:"In Search Modal",searchNav:"Navigate search results",searchSelect:"Select result",searchClose:"Close search",modalTitle:"Modal Controls",modalClose:"Close active modal",modalNavForward:"Navigate forward through buttons",modalNavBackward:"Navigate backward through buttons",modalActivate:"Activate focused button",accessibilityTitle:"Accessibility",a11ySkipLinks:"Navigate to skip links (when at page start)",a11yFollowLink:"Follow skip link",macNote:"Using Mac keyboard shortcuts. ⌘ is the Command key.",windowsNote:"Using Windows/Linux keyboard shortcuts. Ctrl is the Control key.",footerHint:"Press {{key}} anytime to show this help",close:"Close"},HE={modeGroup:"Mode",browse:"Browse",annotate:"Annotate",selectionGroup:"Motivation",clickGroup:"Click",shapeGroup:"Shape",none:"None",linking:"Reference",highlighting:"Highlight",assessing:"Assess",commenting:"Comment",tagging:"Tag",detail:"Detail",follow:"Follow",deleting:"Delete",jsonld:"JSON-LD",rectangle:"Rectangle",circle:"Circle",polygon:"Polygon"},GE={title:"Navigation",collapseSidebar:"Collapse sidebar",expandSidebar:"Expand sidebar",dragToReorder:"Drag to reorder",dragToReorderDoc:"Drag to reorder {{name}}",closeResource:"Close resource",dragInstructions:"To reorder resources: Use Tab to navigate to a resource. Press Alt+Up arrow to move up or Alt+Down arrow to move down. For drag and drop: Press space bar to pick up the item. Use arrow keys to move it. Press space bar again to drop."},KE={deleteConfirmationTitle:"Delete Annotation",deleteConfirmationMessage:"Are you sure you want to delete this annotation? This action cannot be undone.",deleteConfirmationCancel:"Cancel",deleteConfirmationDelete:"Delete"},JE={title:"Settings",lineNumbers:"Line Numbers",lineNumbersVisible:"Visible",lineNumbersHidden:"Hidden",theme:"Theme",themeLight:"Light",themeDark:"Dark",themeSystem:"System",themeSystemActive:"System ({{mode}})",themeModeActive:"Using {{mode}} mode",language:"Language",languageHint:"Change language in the main navigation",languageChanging:"Changing language...",hoverDelay:"Hover Delay",hoverDelayFast:"Fast",hoverDelaySlow:"Slow",hoverDelayDescription:"{{delay}}ms delay before hover effects appear"},eA={},tA={gatherTitle:"Gathered Context",configureGenerationTitle:"Configure Generation",configureSearchTitle:"Configure Search",searchResultsTitle:"Search Results",sourceContextLabel:"Annotation context in resource",connectionsLabel:"Peer Annotations",citedByLabel:"Resource Cited By",userHintLabel:"Hint",userHintPlaceholder:"Describe what this annotation refers to...",loadingContext:"Gathering context...",failedContext:"Failed to gather context",cancel:"Cancel",generate:"Generate",compose:"Compose",resolutionStrategyLabel:"Resolution Strategy",back:"Back",link:"Link",score:"Score",noResults:"No results found",resourceTitle:"Resource Title",resourceTitlePlaceholder:"Enter resource title...",additionalInstructions:"Additional Instructions",additionalInstructionsPlaceholder:"Enter additional instructions...",language:"Language",languageHelp:"Language for generated content",creativity:"Creativity",creativityFocused:"Focused",creativityCreative:"Creative",maxLength:"Max Length",maxLengthHelp:"Maximum number of tokens",maxResults:"Max Results",semanticScoring:"Semantic Scoring",semanticScoringHelp:"Use AI to score results by semantic relevance",searching:"Searching...",search:"Search"},ko={Toolbar:zE,ResourceInfoPanel:$E,CollaborationPanel:IE,AnnotationHistory:qE,CommentsPanel:XE,HighlightPanel:ZE,AssessmentPanel:BE,TaggingPanel:VE,UnifiedAnnotationsPanel:UE,StatisticsPanel:YE,ReferencesPanel:WE,KeyboardShortcuts:FE,AnnotateToolbar:HE,CollapsibleResourceNavigation:GE,ResourceViewer:KE,Settings:JE,AnnotateView:eA,ReferenceWizard:tA},Dz=Object.create,A0=Object.defineProperty,Lz=Object.getOwnPropertyDescriptor,nA=Object.getOwnPropertyNames,zz=Object.getPrototypeOf,$z=Object.prototype.hasOwnProperty,Iz=e=>t=>{var n=e[t];if(n)return n();throw new Error("Module not found in bundle: "+t)},F=(e,t)=>function(){return t||(0,e[nA(e)[0]])((t={exports:{}}).exports,t),t.exports},rA=(e,t)=>{for(var n in t)A0(e,n,{get:t[n],enumerable:!0})},qz=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of nA(t))!$z.call(e,i)&&i!==n&&A0(e,i,{get:()=>t[i],enumerable:!(r=Lz(t,i))||r.enumerable});return e},tp=(e,t,n)=>(n=e!=null?Dz(zz(e)):{},qz(t||!e||!e.__esModule?A0(n,"default",{value:e,enumerable:!0}):n,e)),Qb=function(e,t){return Qb=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},Qb(e,t)};function Ma(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Qb(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function Xz(e,t,n,r){function i(a){return a instanceof n?a:new n(function(s){s(a)})}return new(n||(n=Promise))(function(a,s){function l(f){try{d(r.next(f))}catch(m){s(m)}}function c(f){try{d(r.throw(f))}catch(m){s(m)}}function d(f){f.done?a(f.value):i(f.value).then(l,c)}d((r=r.apply(e,t||[])).next())})}function iA(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,s=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return s.next=l(0),s.throw=l(1),s.return=l(2),typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(d){return function(f){return c([d,f])}}function c(d){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,d[0]&&(n=0)),n;)try{if(r=1,i&&(a=d[0]&2?i.return:d[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,d[1])).done)return a;switch(i=0,a&&(d=[d[0]&2,a.value]),d[0]){case 0:case 1:a=d;break;case 4:return n.label++,{value:d[1],done:!1};case 5:n.label++,i=d[1],d=[0];continue;case 7:d=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!a||d[1]>a[0]&&d[1]<a[3])){n.label=d[1];break}if(d[0]===6&&n.label<a[1]){n.label=a[1],a=d;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(d);break}a[2]&&n.ops.pop(),n.trys.pop();continue}d=t.call(e,n)}catch(f){d=[6,f],i=0}finally{r=a=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}}function Yl(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function nd(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(l){s={error:l}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return a}function rd(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}function Pl(e){return this instanceof Pl?(this.v=e,this):new Pl(e)}function Zz(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),i,a=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),l("next"),l("throw"),l("return",s),i[Symbol.asyncIterator]=function(){return this},i;function s(O){return function(b){return Promise.resolve(b).then(O,m)}}function l(O,b){r[O]&&(i[O]=function(x){return new Promise(function(w,k){a.push([O,x,w,k])>1||c(O,x)})},b&&(i[O]=b(i[O])))}function c(O,b){try{d(r[O](b))}catch(x){p(a[0][3],x)}}function d(O){O.value instanceof Pl?Promise.resolve(O.value.v).then(f,m):p(a[0][2],O)}function f(O){c("next",O)}function m(O){c("throw",O)}function p(O,b){O(b),a.shift(),a.length&&c(a[0][0],a[0][1])}}function Bz(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof Yl=="function"?Yl(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(a){n[a]=e[a]&&function(s){return new Promise(function(l,c){s=e[a](s),i(l,c,s.done,s.value)})}}function i(a,s,l,c){Promise.resolve(c).then(function(d){a({value:d,done:l})},s)}}function bn(e){return typeof e=="function"}function np(e){var t=function(r){Error.call(r),r.stack=new Error().stack},n=e(t);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var nO=np(function(e){return function(n){e(this),this.message=n?n.length+` errors occurred during unsubscription:
|
|
35
|
-
`+n.map(function(r,i){return i+1+") "+r.toString()}).join(`
|
|
36
|
-
`):"",this.name="UnsubscriptionError",this.errors=n}});function ym(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var ac=(function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,n,r,i,a;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var l=Yl(s),c=l.next();!c.done;c=l.next()){var d=c.value;d.remove(this)}}catch(x){t={error:x}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(t)throw t.error}}else s.remove(this);var f=this.initialTeardown;if(bn(f))try{f()}catch(x){a=x instanceof nO?x.errors:[x]}var m=this._finalizers;if(m){this._finalizers=null;try{for(var p=Yl(m),O=p.next();!O.done;O=p.next()){var b=O.value;try{Nk(b)}catch(x){a=a??[],x instanceof nO?a=rd(rd([],nd(a)),nd(x.errors)):a.push(x)}}}catch(x){r={error:x}}finally{try{O&&!O.done&&(i=p.return)&&i.call(p)}finally{if(r)throw r.error}}}if(a)throw new nO(a)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)Nk(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(t)}},e.prototype._hasParent=function(t){var n=this._parentage;return n===t||Array.isArray(n)&&n.includes(t)},e.prototype._addParent=function(t){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t},e.prototype._removeParent=function(t){var n=this._parentage;n===t?this._parentage=null:Array.isArray(n)&&ym(n,t)},e.prototype.remove=function(t){var n=this._finalizers;n&&ym(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})(),aA=ac.EMPTY;function sA(e){return e instanceof ac||e&&"closed"in e&&bn(e.remove)&&bn(e.add)&&bn(e.unsubscribe)}function Nk(e){bn(e)?e():e.unsubscribe()}var Vz={Promise:void 0},Uz={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,rd([e,t],nd(n)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function oA(e){Uz.setTimeout(function(){throw e})}function Pb(){}function Hh(e){e()}var Q0=(function(e){Ma(t,e);function t(n){var r=e.call(this)||this;return r.isStopped=!1,n?(r.destination=n,sA(n)&&n.add(r)):r.destination=Fz,r}return t.create=function(n,r,i){return new Wl(n,r,i)},t.prototype.next=function(n){this.isStopped||this._next(n)},t.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(n){this.destination.next(n)},t.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t})(ac),Yz=(function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var n=this.partialObserver;if(n.next)try{n.next(t)}catch(r){gh(r)}},e.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(r){gh(r)}else gh(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(n){gh(n)}},e})(),Wl=(function(e){Ma(t,e);function t(n,r,i){var a=e.call(this)||this,s;return bn(n)||!n?s={next:n??void 0,error:r??void 0,complete:i??void 0}:s=n,a.destination=new Yz(s),a}return t})(Q0);function gh(e){oA(e)}function Wz(e){throw e}var Fz={closed:!0,next:Pb,error:Wz,complete:Pb},P0=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function N0(e){return e}function Hz(e){return e.length===0?N0:e.length===1?e[0]:function(n){return e.reduce(function(r,i){return i(r)},n)}}var tr=(function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(t,n,r){var i=this,a=Kz(t)?t:new Wl(t,n,r);return Hh(function(){var s=i,l=s.operator,c=s.source;a.add(l?l.call(a,c):c?i._subscribe(a):i._trySubscribe(a))}),a},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(n){t.error(n)}},e.prototype.forEach=function(t,n){var r=this;return n=Rk(n),new n(function(i,a){var s=new Wl({next:function(l){try{t(l)}catch(c){a(c),s.unsubscribe()}},error:a,complete:i});r.subscribe(s)})},e.prototype._subscribe=function(t){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(t)},e.prototype[P0]=function(){return this},e.prototype.pipe=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return Hz(t)(this)},e.prototype.toPromise=function(t){var n=this;return t=Rk(t),new t(function(r,i){var a;n.subscribe(function(s){return a=s},function(s){return i(s)},function(){return r(a)})})},e.create=function(t){return new e(t)},e})();function Rk(e){var t;return(t=e??Vz.Promise)!==null&&t!==void 0?t:Promise}function Gz(e){return e&&bn(e.next)&&bn(e.error)&&bn(e.complete)}function Kz(e){return e&&e instanceof Q0||Gz(e)&&sA(e)}function Jz(e){return bn(e==null?void 0:e.lift)}function vr(e){return function(t){if(Jz(t))return t.lift(function(n){try{return e(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function $r(e,t,n,r,i){return new e$(e,t,n,r,i)}var e$=(function(e){Ma(t,e);function t(n,r,i,a,s,l){var c=e.call(this,n)||this;return c.onFinalize=s,c.shouldUnsubscribe=l,c._next=r?function(d){try{r(d)}catch(f){n.error(f)}}:e.prototype._next,c._error=a?function(d){try{a(d)}catch(f){n.error(f)}finally{this.unsubscribe()}}:e.prototype._error,c._complete=i?function(){try{i()}catch(d){n.error(d)}finally{this.unsubscribe()}}:e.prototype._complete,c}return t.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},t})(Q0),t$=np(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Ls=(function(e){Ma(t,e);function t(){var n=e.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return t.prototype.lift=function(n){var r=new Mk(this,this);return r.operator=n,r},t.prototype._throwIfClosed=function(){if(this.closed)throw new t$},t.prototype.next=function(n){var r=this;Hh(function(){var i,a;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var s=Yl(r.currentObservers),l=s.next();!l.done;l=s.next()){var c=l.value;c.next(n)}}catch(d){i={error:d}}finally{try{l&&!l.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}}})},t.prototype.error=function(n){var r=this;Hh(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var i=r.observers;i.length;)i.shift().error(n)}})},t.prototype.complete=function(){var n=this;Hh(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(n){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,n)},t.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},t.prototype._innerSubscribe=function(n){var r=this,i=this,a=i.hasError,s=i.isStopped,l=i.observers;return a||s?aA:(this.currentObservers=null,l.push(n),new ac(function(){r.currentObservers=null,ym(l,n)}))},t.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,a=r.thrownError,s=r.isStopped;i?n.error(a):s&&n.complete()},t.prototype.asObservable=function(){var n=new tr;return n.source=this,n},t.create=function(n,r){return new Mk(n,r)},t})(tr),Mk=(function(e){Ma(t,e);function t(n,r){var i=e.call(this)||this;return i.destination=n,i.source=r,i}return t.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},t.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},t.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},t.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:aA},t})(Ls),Te=(function(e){Ma(t,e);function t(n){var r=e.call(this)||this;return r._value=n,r}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(n){var r=e.prototype._subscribe.call(this,n);return!r.closed&&n.next(this._value),r},t.prototype.getValue=function(){var n=this,r=n.hasError,i=n.thrownError,a=n._value;if(r)throw i;return this._throwIfClosed(),a},t.prototype.next=function(n){e.prototype.next.call(this,this._value=n)},t})(Ls),n$={now:function(){return Date.now()}},r$=(function(e){Ma(t,e);function t(n,r){return e.call(this)||this}return t.prototype.schedule=function(n,r){return this},t})(ac),Dk={setInterval:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,rd([e,t],nd(n)))},clearInterval:function(e){return clearInterval(e)},delegate:void 0},i$=(function(e){Ma(t,e);function t(n,r){var i=e.call(this,n,r)||this;return i.scheduler=n,i.work=r,i.pending=!1,i}return t.prototype.schedule=function(n,r){var i;if(r===void 0&&(r=0),this.closed)return this;this.state=n;var a=this.id,s=this.scheduler;return a!=null&&(this.id=this.recycleAsyncId(s,a,r)),this.pending=!0,this.delay=r,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(s,this.id,r),this},t.prototype.requestAsyncId=function(n,r,i){return i===void 0&&(i=0),Dk.setInterval(n.flush.bind(n,this),i)},t.prototype.recycleAsyncId=function(n,r,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return r;r!=null&&Dk.clearInterval(r)},t.prototype.execute=function(n,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(n,r);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(n,r){var i=!1,a;try{this.work(n)}catch(s){i=!0,a=s||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),a},t.prototype.unsubscribe=function(){if(!this.closed){var n=this,r=n.id,i=n.scheduler,a=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,ym(a,this),r!=null&&(this.id=this.recycleAsyncId(i,r,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t})(r$),Lk=(function(){function e(t,n){n===void 0&&(n=e.now),this.schedulerActionCtor=t,this.now=n}return e.prototype.schedule=function(t,n,r){return n===void 0&&(n=0),new this.schedulerActionCtor(this,t).schedule(r,n)},e.now=n$.now,e})(),a$=(function(e){Ma(t,e);function t(n,r){r===void 0&&(r=Lk.now);var i=e.call(this,n,r)||this;return i.actions=[],i._active=!1,i}return t.prototype.flush=function(n){var r=this.actions;if(this._active){r.push(n);return}var i;this._active=!0;do if(i=n.execute(n.state,n.delay))break;while(n=r.shift());if(this._active=!1,i){for(;n=r.shift();)n.unsubscribe();throw i}},t})(Lk),lA=new a$(i$),cA=new tr(function(e){return e.complete()});function s$(e){return e&&bn(e.schedule)}function uA(e){return e[e.length-1]}function rp(e){return s$(uA(e))?e.pop():void 0}function o$(e,t){return typeof uA(e)=="number"?e.pop():t}var dA=(function(e){return e&&typeof e.length=="number"&&typeof e!="function"});function fA(e){return bn(e==null?void 0:e.then)}function hA(e){return bn(e[P0])}function mA(e){return Symbol.asyncIterator&&bn(e==null?void 0:e[Symbol.asyncIterator])}function pA(e){return new TypeError("You provided "+(e!==null&&typeof e=="object"?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function l$(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var gA=l$();function vA(e){return bn(e==null?void 0:e[gA])}function OA(e){return Zz(this,arguments,function(){var n,r,i,a;return iA(this,function(s){switch(s.label){case 0:n=e.getReader(),s.label=1;case 1:s.trys.push([1,,9,10]),s.label=2;case 2:return[4,Pl(n.read())];case 3:return r=s.sent(),i=r.value,a=r.done,a?[4,Pl(void 0)]:[3,5];case 4:return[2,s.sent()];case 5:return[4,Pl(i)];case 6:return[4,s.sent()];case 7:return s.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function bA(e){return bn(e==null?void 0:e.getReader)}function ui(e){if(e instanceof tr)return e;if(e!=null){if(hA(e))return c$(e);if(dA(e))return u$(e);if(fA(e))return d$(e);if(mA(e))return yA(e);if(vA(e))return f$(e);if(bA(e))return h$(e)}throw pA(e)}function c$(e){return new tr(function(t){var n=e[P0]();if(bn(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function u$(e){return new tr(function(t){for(var n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function d$(e){return new tr(function(t){e.then(function(n){t.closed||(t.next(n),t.complete())},function(n){return t.error(n)}).then(null,oA)})}function f$(e){return new tr(function(t){var n,r;try{for(var i=Yl(e),a=i.next();!a.done;a=i.next()){var s=a.value;if(t.next(s),t.closed)return}}catch(l){n={error:l}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}t.complete()})}function yA(e){return new tr(function(t){m$(e,t).catch(function(n){return t.error(n)})})}function h$(e){return yA(OA(e))}function m$(e,t){var n,r,i,a;return Xz(this,void 0,void 0,function(){var s,l;return iA(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=Bz(e),c.label=1;case 1:return[4,n.next()];case 2:if(r=c.sent(),!!r.done)return[3,4];if(s=r.value,t.next(s),t.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return l=c.sent(),i={error:l},[3,11];case 6:return c.trys.push([6,,9,10]),r&&!r.done&&(a=n.return)?[4,a.call(n)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function Es(e,t,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var a=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(a),!i)return a}function xA(e,t){return t===void 0&&(t=0),vr(function(n,r){n.subscribe($r(r,function(i){return Es(r,e,function(){return r.next(i)},t)},function(){return Es(r,e,function(){return r.complete()},t)},function(i){return Es(r,e,function(){return r.error(i)},t)}))})}function SA(e,t){return t===void 0&&(t=0),vr(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}function p$(e,t){return ui(e).pipe(SA(t),xA(t))}function g$(e,t){return ui(e).pipe(SA(t),xA(t))}function v$(e,t){return new tr(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function O$(e,t){return new tr(function(n){var r;return Es(n,t,function(){r=e[gA](),Es(n,t,function(){var i,a,s;try{i=r.next(),a=i.value,s=i.done}catch(l){n.error(l);return}s?n.complete():n.next(a)},0,!0)}),function(){return bn(r==null?void 0:r.return)&&r.return()}})}function wA(e,t){if(!e)throw new Error("Iterable cannot be null");return new tr(function(n){Es(n,t,function(){var r=e[Symbol.asyncIterator]();Es(n,t,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function b$(e,t){return wA(OA(e),t)}function y$(e,t){if(e!=null){if(hA(e))return p$(e,t);if(dA(e))return v$(e,t);if(fA(e))return g$(e,t);if(mA(e))return wA(e,t);if(vA(e))return O$(e,t);if(bA(e))return b$(e,t)}throw pA(e)}function R0(e,t){return t?y$(e,t):ui(e)}function x$(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=rp(e);return R0(e,n)}function zk(e,t){var n=bn(e)?e:function(){return e},r=function(i){return i.error(n())};return new tr(r)}var _A=np(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function S$(e,t){return new Promise(function(n,r){var i=!1,a;e.subscribe({next:function(s){a=s,i=!0},error:r,complete:function(){i?n(a):r(new _A)}})})}function kA(e,t){return new Promise(function(n,r){var i=new Wl({next:function(a){n(a),i.unsubscribe()},error:r,complete:function(){r(new _A)}});e.subscribe(i)})}function w$(e){return e instanceof Date&&!isNaN(e)}var jA=np(function(e){return function(n){n===void 0&&(n=null),e(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=n}});function Pd(e,t){var n=w$(e)?{first:e}:typeof e=="number"?{each:e}:e,r=n.first,i=n.each,a=n.with,s=a===void 0?_$:a,l=n.scheduler,c=l===void 0?lA:l,d=n.meta,f=d===void 0?null:d;if(r==null&&i==null)throw new TypeError("No timeout provided.");return vr(function(m,p){var O,b,x=null,w=0,k=function(T){b=Es(p,c,function(){try{O.unsubscribe(),ui(s({meta:f,lastValue:x,seen:w})).subscribe(p)}catch(j){p.error(j)}},T)};O=m.subscribe($r(p,function(T){b==null||b.unsubscribe(),w++,p.next(x=T),i>0&&k(i)},void 0,void 0,function(){b!=null&&b.closed||b==null||b.unsubscribe(),x=null})),!w&&k(r!=null?typeof r=="number"?r:+r-c.now():i)})}function _$(e){throw new jA(e)}function ln(e,t){return vr(function(n,r){var i=0;n.subscribe($r(r,function(a){r.next(e.call(t,a,i++))}))})}function k$(e,t,n,r,i,a,s,l){var c=[],d=0,f=0,m=!1,p=function(){m&&!c.length&&!d&&t.complete()},O=function(x){return d<r?b(x):c.push(x)},b=function(x){d++;var w=!1;ui(n(x,f++)).subscribe($r(t,function(k){t.next(k)},function(){w=!0},void 0,function(){if(w)try{d--;for(var k=function(){var T=c.shift();s||b(T)};c.length&&d<r;)k();p()}catch(T){t.error(T)}}))};return e.subscribe($r(t,O,function(){m=!0,p()})),function(){}}function TA(e,t,n){return n===void 0&&(n=1/0),bn(t)?TA(function(r,i){return ln(function(a,s){return t(r,a,i,s)})(ui(e(r,i)))},n):(typeof t=="number"&&(n=t),vr(function(r,i){return k$(r,i,e,n)}))}function CA(e){return e===void 0&&(e=1/0),TA(N0,e)}function j$(){return CA(1)}function $k(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return j$()(R0(e,rp(e)))}function id(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=rp(e),r=o$(e,1/0),i=e;return i.length?i.length===1?ui(i[0]):CA(r)(R0(i,n)):cA}function Jn(e,t){return vr(function(n,r){var i=0;n.subscribe($r(r,function(a){return e.call(t,a,i++)&&r.next(a)}))})}function EA(e){return vr(function(t,n){var r=null,i=!1,a;r=t.subscribe($r(n,void 0,void 0,function(s){a=ui(e(s,EA(e)(t))),r?(r.unsubscribe(),r=null,a.subscribe(n)):i=!0})),i&&(r.unsubscribe(),r=null,a.subscribe(n))})}function T$(e,t){return t===void 0&&(t=lA),vr(function(n,r){var i=null,a=null,s=null,l=function(){if(i){i.unsubscribe(),i=null;var d=a;a=null,r.next(d)}};function c(){var d=s+e,f=t.now();if(f<d){i=this.schedule(void 0,d-f),r.add(i);return}l()}n.subscribe($r(r,function(d){a=d,s=t.now(),i||(i=t.schedule(c,e),r.add(i))},function(){l(),r.complete()},void 0,function(){a=i=null}))})}function C$(e){return e<=0?function(){return cA}:vr(function(t,n){var r=0;t.subscribe($r(n,function(i){++r<=e&&(n.next(i),e<=r&&n.complete())}))})}function AA(e,t){return t===void 0&&(t=N0),e=e??E$,vr(function(n,r){var i,a=!0;n.subscribe($r(r,function(s){var l=t(s);(a||!e(i,l))&&(a=!1,i=l,r.next(s))}))})}function E$(e,t){return e===t}function A$(e){e===void 0&&(e={});var t=e.connector,n=t===void 0?function(){return new Ls}:t,r=e.resetOnError,i=r===void 0?!0:r,a=e.resetOnComplete,s=a===void 0?!0:a,l=e.resetOnRefCountZero,c=l===void 0?!0:l;return function(d){var f,m,p,O=0,b=!1,x=!1,w=function(){m==null||m.unsubscribe(),m=void 0},k=function(){w(),f=p=void 0,b=x=!1},T=function(){var j=f;k(),j==null||j.unsubscribe()};return vr(function(j,E){O++,!x&&!b&&w();var Q=p=p??n();E.add(function(){O--,O===0&&!x&&!b&&(m=rO(T,c))}),Q.subscribe(E),!f&&O>0&&(f=new Wl({next:function(P){return Q.next(P)},error:function(P){x=!0,w(),m=rO(k,i,P),Q.error(P)},complete:function(){b=!0,w(),m=rO(k,s),Q.complete()}}),ui(j).subscribe(f))})(d)}}function rO(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(t===!0){e();return}if(t!==!1){var i=new Wl({next:function(){i.unsubscribe(),e()}});return ui(t.apply(void 0,rd([],nd(n)))).subscribe(i)}}function iO(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=rp(e);return vr(function(r,i){(n?$k(e,r,n):$k(e,r)).subscribe(i)})}function Q$(e,t){return vr(function(n,r){var i=null,a=0,s=!1,l=function(){return s&&!i&&r.complete()};n.subscribe($r(r,function(c){i==null||i.unsubscribe();var d=0,f=a++;ui(e(c,f)).subscribe(i=$r(r,function(m){return r.next(t?t(c,m,f,d++):m)},function(){i=null,l()}))},function(){s=!0,l()}))})}function M0(e){return vr(function(t,n){ui(e).subscribe($r(n,function(){return n.complete()},Pb)),!n.closed&&t.subscribe(n)})}var aO={};function Eae(e){return e}function ki(e){if(e.includes("/"))throw new TypeError(`Expected ResourceId, got URI: ${e}`);return e}function Bn(e){if(e.includes("/"))throw new TypeError(`Expected AnnotationId, got URI: ${e}`);return e}var P$=["yield:created","yield:cloned","yield:updated","yield:moved","yield:representation-added","yield:representation-removed","mark:added","mark:removed","mark:body-updated","mark:archived","mark:unarchived","mark:entity-tag-added","mark:entity-tag-removed","mark:entity-type-added","job:started","job:progress","job:completed","job:failed"],N$=["job:complete","job:fail"];function QA(e){var n;const t=e.payload;if(e.type==="mark:added")return((n=t==null?void 0:t.annotation)==null?void 0:n.id)||null;if((e.type==="mark:removed"||e.type==="mark:body-updated")&&t!=null&&t.annotationId&&e.resourceId)try{const r=e.resourceId;return`${r.substring(0,r.lastIndexOf("/resources/"))}/annotations/${t.annotationId}`}catch{return null}return null}var PA=class{constructor(){pe(this,"subjects");pe(this,"isDestroyed");this.subjects=new Map,this.isDestroyed=!1}get(e){if(this.isDestroyed)throw new Error(`Cannot access event '${String(e)}' on destroyed bus`);return this.subjects.has(e)||this.subjects.set(e,new Ls),this.subjects.get(e)}getDomainEvent(e){return this.get(e)}destroy(){if(!this.isDestroyed){for(const e of this.subjects.values())e.complete();this.subjects.clear(),this.isDestroyed=!0}}get destroyed(){return this.isDestroyed}scope(e){return new R$(this,e)}},R$=class NA{constructor(t,n){this.parent=t,this.scopePrefix=n}get(t){const n=`${this.scopePrefix}:${t}`,r=this.parent.subjects;return r.has(n)||r.set(n,new Ls),r.get(n)}getDomainEvent(t){return this.get(t)}scope(t){return new NA(this.parent,`${this.scopePrefix}:${t}`)}},M$=typeof process<"u"&&!!(aO!=null&&aO.SEMIONT_BUS_LOG);function D$(){return globalThis.__SEMIONT_BUS_LOG__?!0:M$}var Nb;function L$(e){Nb=e}function Qu(e,t,n,r){if(!D$())return;const i=n==null?void 0:n.correlationId,a=typeof i=="string"?i.slice(0,8):void 0;let s;if(Nb)try{s=Nb()}catch{}const l=`[bus ${e}] ${t}`+(r?` scope=${r}`:"")+(a?` cid=${a}`:"")+(s?` trace=${s.slice(0,8)}`:"");console.debug(l,n)}function oi(e){if(!e)return null;const n=(Array.isArray(e)?e:[e]).find(r=>r.type==="TextPositionSelector");return n&&n.type==="TextPositionSelector"?n:null}function RA(e){if(!e)return null;const n=(Array.isArray(e)?e:[e]).find(r=>r.type==="SvgSelector");return n&&n.type==="SvgSelector"?n:null}function z$(e){if(!e)return null;const n=(Array.isArray(e)?e:[e]).find(r=>r.type==="FragmentSelector");return n&&n.type==="FragmentSelector"?n:null}function Aa(e){if(Array.isArray(e)){for(const t of e)if(typeof t=="object"&&t!==null&&"type"in t&&"source"in t){const n=t.type,r=t.source;if(n==="SpecificResource"&&typeof r=="string")return r}return null}if(typeof e=="object"&&e!==null&&"type"in e&&"source"in e){const t=e.type,n=e.source;if(t==="SpecificResource"&&typeof n=="string")return n}return null}function ad(e){return Aa(e)!==null}function Qn(e){if(typeof e!="string")return e.selector}function Mo(e){return e.motivation==="highlighting"}function li(e){return e.motivation==="linking"}function sc(e){return e.motivation==="assessing"}function zs(e){return e.motivation==="commenting"}function Do(e){return e.motivation==="tagging"}function $$(e){if(!zs(e))return;const t=Array.isArray(e.body)?e.body[0]:e.body;if(t&&"value"in t)return t.value}function D0(e){return li(e)&&ad(e.body)}function _s(e){if(!e)return"";const n=(Array.isArray(e)?e:[e]).find(r=>r.type==="TextQuoteSelector");return n?n.exact:""}function Nd(e){const t=Qn(e.target);return _s(t)}function I$(e){const n=(Array.isArray(e)?e:[e]).find(r=>r.type==="TextQuoteSelector");return n&&n.type==="TextQuoteSelector"?n:null}function Rb(e){if(e)return e["@id"]||void 0}function L0(e){return e!=null&&e.representations?(Array.isArray(e.representations)?e.representations:[e.representations])[0]:void 0}function xm(e){var t;return(t=L0(e))==null?void 0:t.mediaType}function Ik(e){var t;return(t=L0(e))==null?void 0:t.language}var qk=["browse:resources-result","browse:resources-failed","browse:resource-result","browse:resource-failed","browse:annotations-result","browse:annotations-failed","browse:annotation-result","browse:annotation-failed","browse:annotation-history-result","browse:annotation-history-failed","browse:events-result","browse:events-failed","browse:referenced-by-result","browse:referenced-by-failed","browse:entity-types-result","browse:entity-types-failed","browse:directory-result","browse:directory-failed","browse:annotation-context-result","browse:annotation-context-failed","mark:delete-ok","mark:delete-failed","mark:create-ok","mark:create-failed","match:search-results","match:search-failed","gather:complete","gather:failed","gather:annotation-progress","gather:annotation-finished","gather:summary-result","gather:summary-failed","bind:body-updated","bind:body-update-failed","job:report-progress","job:complete","job:fail","job:status-result","job:status-failed","job:created","job:create-failed","job:claimed","job:claim-failed","yield:clone-token-generated","yield:clone-token-failed","yield:clone-resource-result","yield:clone-resource-failed","yield:clone-created","yield:clone-create-failed","mark:entity-type-added","beckon:focus","beckon:sparkle","bus:resume-gap"];function Mb(e){return e.replace(/\s+/g," ").replace(/[\u2018\u2019]/g,"'").replace(/[\u201C\u201D]/g,'"').replace(/\u2014/g,"--").replace(/\u2013/g,"-").trim()}function q$(e,t){const n=e.length,r=t.length,i=[];for(let a=0;a<=n;a++)i[a]=[a];for(let a=0;a<=r;a++)i[0][a]=a;for(let a=1;a<=n;a++)for(let s=1;s<=r;s++){const l=e[a-1]===t[s-1]?0:1,c=i[a-1][s]+1,d=i[a][s-1]+1,f=i[a-1][s-1]+l;i[a][s]=Math.min(c,d,f)}return i[n][r]}function X$(e){return{normalizedContent:Mb(e),lowerContent:e.toLowerCase()}}function Z$(e,t,n,r){const i=Math.max(5,Math.floor(t.length*.05)),a=e.indexOf(t);if(a!==-1)return{start:a,end:a+t.length,matchQuality:"exact"};const s=Mb(t),l=r.normalizedContent.indexOf(s);if(l!==-1){let x=0,w=0;for(;w<l&&x<e.length;){const k=e[x],T=Mb(k);T&&(w+=T.length),x++}return{start:x,end:x+t.length,matchQuality:"normalized"}}const c=t.toLowerCase(),d=r.lowerContent.indexOf(c);if(d!==-1)return{start:d,end:d+t.length,matchQuality:"case-insensitive"};const f=t.length,m=Math.min(500,e.length),p=n!==void 0?Math.max(0,n-m):0,O=n!==void 0?Math.min(e.length,n+m):e.length;let b=null;for(let x=p;x<=O-f;x++){const w=e.substring(x,x+f),k=q$(t,w);k<=i&&(!b||k<b.distance)&&(b={start:x,distance:k})}return b?{start:b.start,end:b.start+f,matchQuality:"fuzzy"}:null}function B$(e,t,n,r,i,a){if(!t)return null;if(i!==void 0&&i>=0&&i+t.length<=e.length&&e.substring(i,i+t.length)===t)return{start:i,end:i+t.length};const s=[];let l=e.indexOf(t);for(;l!==-1;)s.push(l),l=e.indexOf(t,l+1);if(s.length===0){const d=Z$(e,t,i,a);return d?{start:d.start,end:d.end}:null}if(s.length===1){const d=s[0];return{start:d,end:d+t.length}}if(n||r){for(const d of s){const f=Math.max(0,d-((n==null?void 0:n.length)||0)),m=e.substring(f,d),p=Math.min(e.length,d+t.length+((r==null?void 0:r.length)||0)),O=e.substring(d+t.length,p),b=!n||m.endsWith(n),x=!r||O.startsWith(r);if(b&&x)return{start:d,end:d+t.length}}for(const d of s){const f=e.substring(Math.max(0,d-((n==null?void 0:n.length)||0)),d),m=e.substring(d+t.length,d+t.length+((r==null?void 0:r.length)||0)),p=!n||f.includes(n.trim()),O=!r||m.includes(r.trim());if(p&&O)return{start:d,end:d+t.length}}}const c=s[0];return{start:c,end:c+t.length}}var Nl=[{code:"ar",nativeName:"العربية",englishName:"Arabic"},{code:"bn",nativeName:"বাংলা",englishName:"Bengali"},{code:"cs",nativeName:"Čeština",englishName:"Czech"},{code:"da",nativeName:"Dansk",englishName:"Danish"},{code:"de",nativeName:"Deutsch",englishName:"German"},{code:"el",nativeName:"Ελληνικά",englishName:"Greek"},{code:"en",nativeName:"English",englishName:"English"},{code:"es",nativeName:"Español",englishName:"Spanish"},{code:"fa",nativeName:"فارسی",englishName:"Persian"},{code:"fi",nativeName:"Suomi",englishName:"Finnish"},{code:"fr",nativeName:"Français",englishName:"French"},{code:"he",nativeName:"עברית",englishName:"Hebrew"},{code:"hi",nativeName:"हिन्दी",englishName:"Hindi"},{code:"id",nativeName:"Bahasa Indonesia",englishName:"Indonesian"},{code:"it",nativeName:"Italiano",englishName:"Italian"},{code:"ja",nativeName:"日本語",englishName:"Japanese"},{code:"ko",nativeName:"한국어",englishName:"Korean"},{code:"ms",nativeName:"Bahasa Melayu",englishName:"Malay"},{code:"nl",nativeName:"Nederlands",englishName:"Dutch"},{code:"no",nativeName:"Norsk",englishName:"Norwegian"},{code:"pl",nativeName:"Polski",englishName:"Polish"},{code:"pt",nativeName:"Português",englishName:"Portuguese"},{code:"ro",nativeName:"Română",englishName:"Romanian"},{code:"sv",nativeName:"Svenska",englishName:"Swedish"},{code:"th",nativeName:"ไทย",englishName:"Thai"},{code:"tr",nativeName:"Türkçe",englishName:"Turkish"},{code:"uk",nativeName:"Українська",englishName:"Ukrainian"},{code:"vi",nativeName:"Tiếng Việt",englishName:"Vietnamese"},{code:"zh",nativeName:"中文",englishName:"Chinese"}],V$=new Map(Nl.map(e=>[e.code.toLowerCase(),e]));function U$(e){if(e)return V$.get(e.toLowerCase())}function Y$(e){if(!e)return;const t=U$(e);return t?`${t.nativeName} (${e.toLowerCase()})`:e}function MA(e,t){const n=Math.min(e.x,t.x),r=Math.min(e.y,t.y),i=Math.abs(t.x-e.x),a=Math.abs(t.y-e.y);return`<svg xmlns="http://www.w3.org/2000/svg"><rect x="${n}" y="${r}" width="${i}" height="${a}"/></svg>`}function DA(e){if(e.length<3)throw new Error("Polygon requires at least 3 points");return`<svg xmlns="http://www.w3.org/2000/svg"><polygon points="${e.map(n=>`${n.x},${n.y}`).join(" ")}"/></svg>`}function LA(e,t){if(t<=0)throw new Error("Circle radius must be positive");return`<svg xmlns="http://www.w3.org/2000/svg"><circle cx="${e.x}" cy="${e.y}" r="${t}"/></svg>`}function z0(e){var i,a,s,l,c,d,f;const t=e.match(/<rect\s+([^>]+)\/>/);if(t&&t[1]){const m=t[1],p=parseFloat(((i=m.match(/x="([^"]+)"/))==null?void 0:i[1])||"0"),O=parseFloat(((a=m.match(/y="([^"]+)"/))==null?void 0:a[1])||"0"),b=parseFloat(((s=m.match(/width="([^"]+)"/))==null?void 0:s[1])||"0"),x=parseFloat(((l=m.match(/height="([^"]+)"/))==null?void 0:l[1])||"0");return{type:"rect",data:{x:p,y:O,width:b,height:x}}}const n=e.match(/<polygon\s+points="([^"]+)"/);if(n&&n[1])return{type:"polygon",data:{points:n[1].split(/\s+/).map(O=>{const[b,x]=O.split(",").map(parseFloat);return{x:b,y:x}})}};const r=e.match(/<circle\s+([^>]+)\/>/);if(r&&r[1]){const m=r[1],p=parseFloat(((c=m.match(/cx="([^"]+)"/))==null?void 0:c[1])||"0"),O=parseFloat(((d=m.match(/cy="([^"]+)"/))==null?void 0:d[1])||"0"),b=parseFloat(((f=m.match(/r="([^"]+)"/))==null?void 0:f[1])||"0");return{type:"circle",data:{cx:p,cy:O,r:b}}}return null}function W$(e,t,n,r,i){const a=z0(e);if(!a)return e;const s=r/t,l=i/n;switch(a.type){case"rect":{const{x:c,y:d,width:f,height:m}=a.data;return MA({x:c*s,y:d*l},{x:(c+f)*s,y:(d+m)*l})}case"circle":{const{cx:c,cy:d,r:f}=a.data;return LA({x:c*s,y:d*l},f*Math.min(s,l))}case"polygon":{const c=a.data.points.map(d=>({x:d.x*s,y:d.y*l}));return DA(c)}}return e}function F$(e,t,n){let a;if(t>0){let l=Math.max(0,t-64),c=0;for(;l>0&&c<32;){const d=e[l-1];if(!d||/[\s.,;:!?'"()\[\]{}<>\/\\]/.test(d))break;l--,c++}a=e.substring(l,t)}let s;if(n<e.length){let l=Math.min(e.length,n+64),c=0;for(;l<e.length&&c<32;){const d=e[l];if(!d||/[\s.,;:!?'"()\[\]{}<>\/\\]/.test(d))break;l++,c++}s=e.substring(n,l)}return{prefix:a,suffix:s}}function H$(e){const t=e.match(/charset=([^\s;]+)/i);return((t==null?void 0:t[1])||"utf-8").toLowerCase()}function $0(e,t){const n=H$(t);return new TextDecoder(n).decode(e)}function Db(e){return e==="image/png"||e==="image/jpeg"}function G$(e){return e==="text/plain"||e==="text/markdown"}function oc(e){return e==="application/pdf"}function I0(e){return G$(e)?"text":Db(e)||oc(e)?"image":"unsupported"}var q0=class extends Error{constructor(e,t,n){super(e),this.code=t,this.details=n,this.name="SemiontError",Error.captureStackTrace(this,this.constructor)}};class Sm extends Error{constructor(n,r,i){const a=n.status||n.status===0?n.status:"",s=n.statusText??"",l=`${a} ${s}`.trim(),c=l?`status code ${l}`:"an unknown error";super(`Request failed with ${c}: ${r.method} ${r.url}`);pe(this,"response");pe(this,"request");pe(this,"options");this.name="HTTPError",this.response=n,this.request=r,this.options=i}}class zA extends Error{constructor(n){let r="Non-error value was thrown";try{typeof n=="string"?r=n:n&&typeof n=="object"&&"message"in n&&typeof n.message=="string"&&(r=n.message)}catch{}super(r);pe(this,"name","NonError");pe(this,"value");this.value=n}}class sO extends Error{constructor(n){const r=n!=null&&n.cause?n.cause instanceof Error?n.cause:new zA(n.cause):void 0;super(n!=null&&n.code?`Forced retry: ${n.code}`:"Forced retry",r?{cause:r}:void 0);pe(this,"name","ForceRetryError");pe(this,"customDelay");pe(this,"code");pe(this,"customRequest");this.customDelay=n==null?void 0:n.delay,this.code=n==null?void 0:n.code,this.customRequest=n==null?void 0:n.request}}const Xk=(()=>{let e=!1,t=!1;const n=typeof globalThis.ReadableStream=="function",r=typeof globalThis.Request=="function";if(n&&r)try{t=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type")}catch(i){if(i instanceof Error&&i.message==="unsupported BodyInit type")return!1;throw i}return e&&!t})(),K$=typeof globalThis.AbortController=="function",$A=typeof globalThis.AbortSignal=="function"&&typeof globalThis.AbortSignal.any=="function",J$=typeof globalThis.ReadableStream=="function",eI=typeof globalThis.FormData=="function",IA=["get","post","put","patch","head","delete"],tI={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*",bytes:"*/*"},oO=2147483647,nI=new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,qA=Symbol("stop");class XA{constructor(t){pe(this,"options");this.options=t}}const rI=e=>new XA(e),iI={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0,context:!0},aI={next:!0},sI={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,duplex:!0},oI=e=>{if(!e)return 0;if(e instanceof FormData){let t=0;for(const[n,r]of e)t+=nI,t+=new TextEncoder().encode(`Content-Disposition: form-data; name="${n}"`).length,t+=typeof r=="string"?new TextEncoder().encode(r).length:r.size;return t}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength;if(typeof e=="string")return new TextEncoder().encode(e).length;if(e instanceof URLSearchParams)return new TextEncoder().encode(e.toString()).length;if("byteLength"in e)return e.byteLength;if(typeof e=="object"&&e!==null)try{const t=JSON.stringify(e);return new TextEncoder().encode(t).length}catch{return 0}return 0},ZA=(e,t,n)=>{let r,i=0;return e.pipeThrough(new TransformStream({transform(a,s){if(s.enqueue(a),r){i+=r.byteLength;let l=t===0?0:i/t;l>=1&&(l=1-Number.EPSILON),n==null||n({percent:l,totalBytes:Math.max(t,i),transferredBytes:i},r)}r=a},flush(){r&&(i+=r.byteLength,n==null||n({percent:1,totalBytes:Math.max(t,i),transferredBytes:i},r))}}))},lI=(e,t)=>{if(!e.body)return e;if(e.status===204)return new Response(null,{status:e.status,statusText:e.statusText,headers:e.headers});const n=Math.max(0,Number(e.headers.get("content-length"))||0);return new Response(ZA(e.body,n,t),{status:e.status,statusText:e.statusText,headers:e.headers})},cI=(e,t,n)=>{if(!e.body)return e;const r=oI(n??e.body);return new Request(e,{duplex:"half",body:ZA(e.body,r,t)})},go=e=>e!==null&&typeof e=="object",vh=(...e)=>{for(const t of e)if((!go(t)||Array.isArray(t))&&t!==void 0)throw new TypeError("The `options` argument must be an object");return X0({},...e)},BA=(e={},t={})=>{const n=new globalThis.Headers(e),r=t instanceof globalThis.Headers,i=new globalThis.Headers(t);for(const[a,s]of i.entries())r&&s==="undefined"||s===void 0?n.delete(a):n.set(a,s);return n};function Oh(e,t,n){return Object.hasOwn(t,n)&&t[n]===void 0?[]:X0(e[n]??[],t[n]??[])}const VA=(e={},t={})=>({beforeRequest:Oh(e,t,"beforeRequest"),beforeRetry:Oh(e,t,"beforeRetry"),afterResponse:Oh(e,t,"afterResponse"),beforeError:Oh(e,t,"beforeError")}),uI=(e,t)=>{const n=new URLSearchParams;for(const r of[e,t])if(r!==void 0)if(r instanceof URLSearchParams)for(const[i,a]of r.entries())n.append(i,a);else if(Array.isArray(r))for(const i of r){if(!Array.isArray(i)||i.length!==2)throw new TypeError("Array search parameters must be provided in [[key, value], ...] format");n.append(String(i[0]),String(i[1]))}else if(go(r))for(const[i,a]of Object.entries(r))a!==void 0&&n.append(i,String(a));else{const i=new URLSearchParams(r);for(const[a,s]of i.entries())n.append(a,s)}return n},X0=(...e)=>{let t={},n={},r={},i;const a=[];for(const s of e)if(Array.isArray(s))Array.isArray(t)||(t=[]),t=[...t,...s];else if(go(s)){for(let[l,c]of Object.entries(s)){if(l==="signal"&&c instanceof globalThis.AbortSignal){a.push(c);continue}if(l==="context"){if(c!=null&&(!go(c)||Array.isArray(c)))throw new TypeError("The `context` option must be an object");t={...t,context:c==null?{}:{...t.context,...c}};continue}if(l==="searchParams"){c==null?i=void 0:i=i===void 0?c:uI(i,c);continue}go(c)&&l in t&&(c=X0(t[l],c)),t={...t,[l]:c}}go(s.hooks)&&(r=VA(r,s.hooks),t.hooks=r),go(s.headers)&&(n=BA(n,s.headers),t.headers=n)}return i!==void 0&&(t.searchParams=i),a.length>0&&(a.length===1?t.signal=a[0]:$A?t.signal=AbortSignal.any(a):t.signal=a.at(-1)),t},dI=e=>IA.includes(e)?e.toUpperCase():e,fI=["get","put","head","delete","options","trace"],hI=[408,413,429,500,502,503,504],mI=[413,429,503],Zk={limit:2,methods:fI,statusCodes:hI,afterStatusCodes:mI,maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:e=>.3*2**(e-1)*1e3,jitter:void 0,retryOnTimeout:!1},pI=(e={})=>{if(typeof e=="number")return{...Zk,limit:e};if(e.methods&&!Array.isArray(e.methods))throw new Error("retry.methods must be an array");if(e.methods&&(e.methods=e.methods.map(n=>n.toLowerCase())),e.statusCodes&&!Array.isArray(e.statusCodes))throw new Error("retry.statusCodes must be an array");const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!==void 0));return{...Zk,...t}};class Lb extends Error{constructor(n){super(`Request timed out: ${n.method} ${n.url}`);pe(this,"request");this.name="TimeoutError",this.request=n}}async function gI(e,t,n,r){return new Promise((i,a)=>{const s=setTimeout(()=>{n&&n.abort(),a(new Lb(e))},r.timeout);r.fetch(e,t).then(i).catch(a).then(()=>{clearTimeout(s)})})}async function vI(e,{signal:t}){return new Promise((n,r)=>{t&&(t.throwIfAborted(),t.addEventListener("abort",i,{once:!0}));function i(){clearTimeout(a),r(t.reason)}const a=setTimeout(()=>{t==null||t.removeEventListener("abort",i),n()},e)})}const OI=(e,t)=>{const n={};for(const r in t)Object.hasOwn(t,r)&&!(r in sI)&&!(r in iI)&&(!(r in e)||r in aI)&&(n[r]=t[r]);return n},bI=e=>e===void 0?!1:Array.isArray(e)?e.length>0:e instanceof URLSearchParams?e.size>0:typeof e=="object"?Object.keys(e).length>0:typeof e=="string"?e.trim().length>0:!!e;function yI(e){return e instanceof Sm||(e==null?void 0:e.name)===Sm.name}function xI(e){return e instanceof Lb||(e==null?void 0:e.name)===Lb.name}var ep,UA,xi,ei,qn,Se,ws,Vi,_o,He,Gh,YA,zb,Kh,gs,$b,WA,xu,Jh,Ib;const ed=class ed{constructor(t,n={}){Di(this,He);pe(this,"request");Di(this,xi);Di(this,ei,0);Di(this,qn);Di(this,Se);Di(this,ws);Di(this,Vi);Di(this,_o);var i,a,s;if(Oi(this,qn,t),Oi(this,Se,{...n,headers:BA(ce(this,qn).headers,n.headers),hooks:VA({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},n.hooks),method:dI(n.method??ce(this,qn).method??"GET"),prefixUrl:String(n.prefixUrl||""),retry:pI(n.retry),throwHttpErrors:n.throwHttpErrors??!0,timeout:n.timeout??1e4,fetch:n.fetch??globalThis.fetch.bind(globalThis),context:n.context??{}}),typeof ce(this,qn)!="string"&&!(ce(this,qn)instanceof URL||ce(this,qn)instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(ce(this,Se).prefixUrl&&typeof ce(this,qn)=="string"){if(ce(this,qn).startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");ce(this,Se).prefixUrl.endsWith("/")||(ce(this,Se).prefixUrl+="/"),Oi(this,qn,ce(this,Se).prefixUrl+ce(this,qn))}K$&&$A&&(Oi(this,Vi,ce(this,Se).signal??ce(this,qn).signal),Oi(this,xi,new globalThis.AbortController),ce(this,Se).signal=ce(this,Vi)?AbortSignal.any([ce(this,Vi),ce(this,xi).signal]):ce(this,xi).signal),Xk&&(ce(this,Se).duplex="half"),ce(this,Se).json!==void 0&&(ce(this,Se).body=((a=(i=ce(this,Se)).stringifyJson)==null?void 0:a.call(i,ce(this,Se).json))??JSON.stringify(ce(this,Se).json),ce(this,Se).headers.set("content-type",ce(this,Se).headers.get("content-type")??"application/json"));const r=n.headers&&new globalThis.Headers(n.headers).has("content-type");if(ce(this,qn)instanceof globalThis.Request&&(eI&&ce(this,Se).body instanceof globalThis.FormData||ce(this,Se).body instanceof URLSearchParams)&&!r&&ce(this,Se).headers.delete("content-type"),this.request=new globalThis.Request(ce(this,qn),ce(this,Se)),bI(ce(this,Se).searchParams)){const c="?"+(typeof ce(this,Se).searchParams=="string"?ce(this,Se).searchParams.replace(/^\?/,""):new URLSearchParams(xt(s=ed,ep,UA).call(s,ce(this,Se).searchParams)).toString()),d=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,c);this.request=new globalThis.Request(d,ce(this,Se))}if(ce(this,Se).onUploadProgress){if(typeof ce(this,Se).onUploadProgress!="function")throw new TypeError("The `onUploadProgress` option must be a function");if(!Xk)throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request=xt(this,He,Ib).call(this,this.request,ce(this,Se).body??void 0)}}static create(t,n){var s,l,c;const r=new ed(t,n),i=async()=>{var f,m,p,O,b,x,w,k,T,j,E,Q;if(typeof ce(r,Se).timeout=="number"&&ce(r,Se).timeout>oO)throw new RangeError(`The \`timeout\` option cannot be greater than ${oO}`);await Promise.resolve();let d=await xt(f=r,He,WA).call(f);for(const P of ce(r,Se).hooks.afterResponse){const N=xt(m=r,He,zb).call(m,d.clone());let D;try{D=await P(r.request,xt(p=r,He,xu).call(p),N,{retryCount:ce(r,ei)})}catch(A){throw xt(O=r,He,gs).call(O,N),xt(b=r,He,gs).call(b,d),A}if(D instanceof XA)throw xt(x=r,He,gs).call(x,N),xt(w=r,He,gs).call(w,d),new sO(D.options);const L=D instanceof globalThis.Response?D:d;N!==L&&xt(k=r,He,gs).call(k,N),d!==L&&xt(T=r,He,gs).call(T,d),d=L}if(xt(j=r,He,zb).call(j,d),!d.ok&&(typeof ce(r,Se).throwHttpErrors=="function"?ce(r,Se).throwHttpErrors(d.status):ce(r,Se).throwHttpErrors)){let P=new Sm(d,r.request,xt(E=r,He,xu).call(E));for(const N of ce(r,Se).hooks.beforeError)P=await N(P,{retryCount:ce(r,ei)});throw P}if(ce(r,Se).onDownloadProgress){if(typeof ce(r,Se).onDownloadProgress!="function")throw new TypeError("The `onDownloadProgress` option must be a function");if(!J$)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");const P=d.clone();return xt(Q=r,He,gs).call(Q,d),lI(P,ce(r,Se).onDownloadProgress)}return d},a=xt(s=r,He,$b).call(s,i).finally(()=>{var f,m;const d=ce(r,ws);xt(f=r,He,Kh).call(f,(d==null?void 0:d.body)??void 0),xt(m=r,He,Kh).call(m,r.request.body??void 0)});for(const[d,f]of Object.entries(tI))d==="bytes"&&typeof((c=(l=globalThis.Response)==null?void 0:l.prototype)==null?void 0:c.bytes)!="function"||(a[d]=async()=>{r.request.headers.set("accept",r.request.headers.get("accept")||f);const m=await a;if(d==="json"){if(m.status===204)return"";const p=await m.text();return p===""?"":n.parseJson?n.parseJson(p):JSON.parse(p)}return m[d]()});return a}};ep=new WeakSet,UA=function(t){return t&&typeof t=="object"&&!Array.isArray(t)&&!(t instanceof URLSearchParams)?Object.fromEntries(Object.entries(t).filter(([,n])=>n!==void 0)):t},xi=new WeakMap,ei=new WeakMap,qn=new WeakMap,Se=new WeakMap,ws=new WeakMap,Vi=new WeakMap,_o=new WeakMap,He=new WeakSet,Gh=function(){const t=ce(this,Se).retry.delay(ce(this,ei));let n=t;ce(this,Se).retry.jitter===!0?n=Math.random()*t:typeof ce(this,Se).retry.jitter=="function"&&(n=ce(this,Se).retry.jitter(t),(!Number.isFinite(n)||n<0)&&(n=t));const r=ce(this,Se).retry.backoffLimit??Number.POSITIVE_INFINITY;return Math.min(r,n)},YA=async function(t){if(bk(this,ei)._++,ce(this,ei)>ce(this,Se).retry.limit)throw t;const n=t instanceof Error?t:new zA(t);if(n instanceof sO)return n.customDelay??xt(this,He,Gh).call(this);if(!ce(this,Se).retry.methods.includes(this.request.method.toLowerCase()))throw t;if(ce(this,Se).retry.shouldRetry!==void 0){const r=await ce(this,Se).retry.shouldRetry({error:n,retryCount:ce(this,ei)});if(r===!1)throw t;if(r===!0)return xt(this,He,Gh).call(this)}if(xI(t)&&!ce(this,Se).retry.retryOnTimeout)throw t;if(yI(t)){if(!ce(this,Se).retry.statusCodes.includes(t.response.status))throw t;const r=t.response.headers.get("Retry-After")??t.response.headers.get("RateLimit-Reset")??t.response.headers.get("X-RateLimit-Retry-After")??t.response.headers.get("X-RateLimit-Reset")??t.response.headers.get("X-Rate-Limit-Reset");if(r&&ce(this,Se).retry.afterStatusCodes.includes(t.response.status)){let i=Number(r)*1e3;Number.isNaN(i)?i=Date.parse(r)-Date.now():i>=Date.parse("2024-01-01")&&(i-=Date.now());const a=ce(this,Se).retry.maxRetryAfter??i;return i<a?i:a}if(t.response.status===413)throw t}return xt(this,He,Gh).call(this)},zb=function(t){return ce(this,Se).parseJson&&(t.json=async()=>ce(this,Se).parseJson(await t.text())),t},Kh=function(t){t&&t.cancel().catch(()=>{})},gs=function(t){xt(this,He,Kh).call(this,t.body??void 0)},$b=async function(t){try{return await t()}catch(n){const r=Math.min(await xt(this,He,YA).call(this,n),oO);if(ce(this,ei)<1)throw n;if(await vI(r,ce(this,Vi)?{signal:ce(this,Vi)}:{}),n instanceof sO&&n.customRequest){const i=ce(this,Se).signal?new globalThis.Request(n.customRequest,{signal:ce(this,Se).signal}):new globalThis.Request(n.customRequest);xt(this,He,Jh).call(this,i)}for(const i of ce(this,Se).hooks.beforeRetry){const a=await i({request:this.request,options:xt(this,He,xu).call(this),error:n,retryCount:ce(this,ei)});if(a instanceof globalThis.Request){xt(this,He,Jh).call(this,a);break}if(a instanceof globalThis.Response)return a;if(a===qA)return}return xt(this,He,$b).call(this,t)}},WA=async function(){var n;(n=ce(this,xi))!=null&&n.signal.aborted&&(Oi(this,xi,new globalThis.AbortController),ce(this,Se).signal=ce(this,Vi)?AbortSignal.any([ce(this,Vi),ce(this,xi).signal]):ce(this,xi).signal,this.request=new globalThis.Request(this.request,{signal:ce(this,Se).signal}));for(const r of ce(this,Se).hooks.beforeRequest){const i=await r(this.request,xt(this,He,xu).call(this),{retryCount:ce(this,ei)});if(i instanceof Response)return i;if(i instanceof globalThis.Request){xt(this,He,Jh).call(this,i);break}}const t=OI(this.request,ce(this,Se));return Oi(this,ws,this.request),this.request=ce(this,ws).clone(),ce(this,Se).timeout===!1?ce(this,Se).fetch(ce(this,ws),t):gI(ce(this,ws),t,ce(this,xi),ce(this,Se))},xu=function(){if(!ce(this,_o)){const{hooks:t,...n}=ce(this,Se);Oi(this,_o,Object.freeze(n))}return ce(this,_o)},Jh=function(t){Oi(this,_o,void 0),this.request=xt(this,He,Ib).call(this,t)},Ib=function(t,n){return!ce(this,Se).onUploadProgress||!t.body?t:cI(t,ce(this,Se).onUploadProgress,n??ce(this,Se).body??void 0)},Di(ed,ep);let wm=ed;/*! MIT License © Sindre Sorhus */const qb=e=>{const t=(n,r)=>wm.create(n,vh(e,r));for(const n of IA)t[n]=(r,i)=>wm.create(r,vh(e,i,{method:n}));return t.create=n=>qb(vh(n)),t.extend=n=>(typeof n=="function"&&(n=n(e??{})),qb(vh(e,n))),t.stop=qA,t.retry=rI,t},lO=qb();var SI=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},xo="1.9.0",Bk=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function wI(e){var t=new Set([e]),n=new Set,r=e.match(Bk);if(!r)return function(){return!1};var i={major:+r[1],minor:+r[2],patch:+r[3],prerelease:r[4]};if(i.prerelease!=null)return function(c){return c===e};function a(l){return n.add(l),!1}function s(l){return t.add(l),!0}return function(c){if(t.has(c))return!0;if(n.has(c))return!1;var d=c.match(Bk);if(!d)return a(c);var f={major:+d[1],minor:+d[2],patch:+d[3],prerelease:d[4]};return f.prerelease!=null||i.major!==f.major?a(c):i.major===0?i.minor===f.minor&&i.patch<=f.patch?s(c):a(c):i.minor<=f.minor?s(c):a(c)}}var _I=wI(xo),kI=xo.split(".")[0],sd=Symbol.for("opentelemetry.js.api."+kI),od=SI;function Rd(e,t,n,r){var i;r===void 0&&(r=!1);var a=od[sd]=(i=od[sd])!==null&&i!==void 0?i:{version:xo};if(!r&&a[e]){var s=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+e);return n.error(s.stack||s.message),!1}if(a.version!==xo){var s=new Error("@opentelemetry/api: Registration of version v"+a.version+" for "+e+" does not match previously registered API v"+xo);return n.error(s.stack||s.message),!1}return a[e]=t,n.debug("@opentelemetry/api: Registered a global for "+e+" v"+xo+"."),!0}function Ao(e){var t,n,r=(t=od[sd])===null||t===void 0?void 0:t.version;if(!(!r||!_I(r)))return(n=od[sd])===null||n===void 0?void 0:n[e]}function Md(e,t){t.debug("@opentelemetry/api: Unregistering a global for "+e+" v"+xo+".");var n=od[sd];n&&delete n[e]}var jI=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(l){s={error:l}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return a},TI=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))},CI=(function(){function e(t){this._namespace=t.namespace||"DiagComponentLogger"}return e.prototype.debug=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return du("debug",this._namespace,t)},e.prototype.error=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return du("error",this._namespace,t)},e.prototype.info=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return du("info",this._namespace,t)},e.prototype.warn=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return du("warn",this._namespace,t)},e.prototype.verbose=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return du("verbose",this._namespace,t)},e})();function du(e,t,n){var r=Ao("diag");if(r)return n.unshift(t),r[e].apply(r,TI([],jI(n),!1))}var Dr;(function(e){e[e.NONE=0]="NONE",e[e.ERROR=30]="ERROR",e[e.WARN=50]="WARN",e[e.INFO=60]="INFO",e[e.DEBUG=70]="DEBUG",e[e.VERBOSE=80]="VERBOSE",e[e.ALL=9999]="ALL"})(Dr||(Dr={}));function EI(e,t){e<Dr.NONE?e=Dr.NONE:e>Dr.ALL&&(e=Dr.ALL),t=t||{};function n(r,i){var a=t[r];return typeof a=="function"&&e>=i?a.bind(t):function(){}}return{error:n("error",Dr.ERROR),warn:n("warn",Dr.WARN),info:n("info",Dr.INFO),debug:n("debug",Dr.DEBUG),verbose:n("verbose",Dr.VERBOSE)}}var AI=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(l){s={error:l}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return a},QI=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))},PI="diag",Pa=(function(){function e(){function t(i){return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];var l=Ao("diag");if(l)return l[i].apply(l,QI([],AI(a),!1))}}var n=this,r=function(i,a){var s,l,c;if(a===void 0&&(a={logLevel:Dr.INFO}),i===n){var d=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return n.error((s=d.stack)!==null&&s!==void 0?s:d.message),!1}typeof a=="number"&&(a={logLevel:a});var f=Ao("diag"),m=EI((l=a.logLevel)!==null&&l!==void 0?l:Dr.INFO,i);if(f&&!a.suppressOverrideMessage){var p=(c=new Error().stack)!==null&&c!==void 0?c:"<failed to generate stacktrace>";f.warn("Current logger will be overwritten from "+p),m.warn("Current logger will overwrite one already registered from "+p)}return Rd("diag",m,n,!0)};n.setLogger=r,n.disable=function(){Md(PI,n)},n.createComponentLogger=function(i){return new CI(i)},n.verbose=t("verbose"),n.debug=t("debug"),n.info=t("info"),n.warn=t("warn"),n.error=t("error")}return e.instance=function(){return this._instance||(this._instance=new e),this._instance},e})(),NI=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(l){s={error:l}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return a},RI=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},MI=(function(){function e(t){this._entries=t?new Map(t):new Map}return e.prototype.getEntry=function(t){var n=this._entries.get(t);if(n)return Object.assign({},n)},e.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map(function(t){var n=NI(t,2),r=n[0],i=n[1];return[r,i]})},e.prototype.setEntry=function(t,n){var r=new e(this._entries);return r._entries.set(t,n),r},e.prototype.removeEntry=function(t){var n=new e(this._entries);return n._entries.delete(t),n},e.prototype.removeEntries=function(){for(var t,n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var a=new e(this._entries);try{for(var s=RI(r),l=s.next();!l.done;l=s.next()){var c=l.value;a._entries.delete(c)}}catch(d){t={error:d}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return a},e.prototype.clear=function(){return new e},e})(),DI=Symbol("BaggageEntryMetadata"),LI=Pa.instance();function zI(e){return e===void 0&&(e={}),new MI(new Map(Object.entries(e)))}function Aae(e){return typeof e!="string"&&(LI.error("Cannot create baggage metadata from unknown type: "+typeof e),e=""),{__TYPE__:DI,toString:function(){return e}}}function FA(e){return Symbol.for(e)}var $I=(function(){function e(t){var n=this;n._currentContext=t?new Map(t):new Map,n.getValue=function(r){return n._currentContext.get(r)},n.setValue=function(r,i){var a=new e(n._currentContext);return a._currentContext.set(r,i),a},n.deleteValue=function(r){var i=new e(n._currentContext);return i._currentContext.delete(r),i}}return e})(),II=new $I,Lo=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),qI=(function(){function e(){}return e.prototype.createGauge=function(t,n){return HI},e.prototype.createHistogram=function(t,n){return GI},e.prototype.createCounter=function(t,n){return FI},e.prototype.createUpDownCounter=function(t,n){return KI},e.prototype.createObservableGauge=function(t,n){return eq},e.prototype.createObservableCounter=function(t,n){return JI},e.prototype.createObservableUpDownCounter=function(t,n){return tq},e.prototype.addBatchObservableCallback=function(t,n){},e.prototype.removeBatchObservableCallback=function(t){},e})(),ip=(function(){function e(){}return e})(),XI=(function(e){Lo(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(n,r){},t})(ip),ZI=(function(e){Lo(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(n,r){},t})(ip),BI=(function(e){Lo(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(n,r){},t})(ip),VI=(function(e){Lo(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(n,r){},t})(ip),Z0=(function(){function e(){}return e.prototype.addCallback=function(t){},e.prototype.removeCallback=function(t){},e})(),UI=(function(e){Lo(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t})(Z0),YI=(function(e){Lo(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t})(Z0),WI=(function(e){Lo(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t})(Z0),HA=new qI,FI=new XI,HI=new BI,GI=new VI,KI=new ZI,JI=new UI,eq=new YI,tq=new WI;function Qae(){return HA}var nq={get:function(e,t){if(e!=null)return e[t]},keys:function(e){return e==null?[]:Object.keys(e)}},rq={set:function(e,t,n){e!=null&&(e[t]=n)}},iq=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(l){s={error:l}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return a},aq=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))},sq=(function(){function e(){}return e.prototype.active=function(){return II},e.prototype.with=function(t,n,r){for(var i=[],a=3;a<arguments.length;a++)i[a-3]=arguments[a];return n.call.apply(n,aq([r],iq(i),!1))},e.prototype.bind=function(t,n){return n},e.prototype.enable=function(){return this},e.prototype.disable=function(){return this},e})(),oq=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(l){s={error:l}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return a},lq=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))},cO="context",cq=new sq,ap=(function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalContextManager=function(t){return Rd(cO,t,Pa.instance())},e.prototype.active=function(){return this._getContextManager().active()},e.prototype.with=function(t,n,r){for(var i,a=[],s=3;s<arguments.length;s++)a[s-3]=arguments[s];return(i=this._getContextManager()).with.apply(i,lq([t,n,r],oq(a),!1))},e.prototype.bind=function(t,n){return this._getContextManager().bind(t,n)},e.prototype._getContextManager=function(){return Ao(cO)||cq},e.prototype.disable=function(){this._getContextManager().disable(),Md(cO,Pa.instance())},e})(),Xb;(function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"})(Xb||(Xb={}));var GA="0000000000000000",KA="00000000000000000000000000000000",uq={traceId:KA,spanId:GA,traceFlags:Xb.NONE},Pu=(function(){function e(t){t===void 0&&(t=uq),this._spanContext=t}return e.prototype.spanContext=function(){return this._spanContext},e.prototype.setAttribute=function(t,n){return this},e.prototype.setAttributes=function(t){return this},e.prototype.addEvent=function(t,n){return this},e.prototype.addLink=function(t){return this},e.prototype.addLinks=function(t){return this},e.prototype.setStatus=function(t){return this},e.prototype.updateName=function(t){return this},e.prototype.end=function(t){},e.prototype.isRecording=function(){return!1},e.prototype.recordException=function(t,n){},e})(),B0=FA("OpenTelemetry Context Key SPAN");function V0(e){return e.getValue(B0)||void 0}function dq(){return V0(ap.getInstance().active())}function U0(e,t){return e.setValue(B0,t)}function fq(e){return e.deleteValue(B0)}function hq(e,t){return U0(e,new Pu(t))}function JA(e){var t;return(t=V0(e))===null||t===void 0?void 0:t.spanContext()}var mq=/^([0-9a-f]{32})$/i,pq=/^[0-9a-f]{16}$/i;function gq(e){return mq.test(e)&&e!==KA}function vq(e){return pq.test(e)&&e!==GA}function Y0(e){return gq(e.traceId)&&vq(e.spanId)}function Oq(e){return new Pu(e)}var uO=ap.getInstance(),eQ=(function(){function e(){}return e.prototype.startSpan=function(t,n,r){r===void 0&&(r=uO.active());var i=!!(n!=null&&n.root);if(i)return new Pu;var a=r&&JA(r);return bq(a)&&Y0(a)?new Pu(a):new Pu},e.prototype.startActiveSpan=function(t,n,r,i){var a,s,l;if(!(arguments.length<2)){arguments.length===2?l=n:arguments.length===3?(a=n,l=r):(a=n,s=r,l=i);var c=s??uO.active(),d=this.startSpan(t,a,c),f=U0(c,d);return uO.with(f,l,void 0,d)}},e})();function bq(e){return typeof e=="object"&&typeof e.spanId=="string"&&typeof e.traceId=="string"&&typeof e.traceFlags=="number"}var yq=new eQ,xq=(function(){function e(t,n,r,i){this._provider=t,this.name=n,this.version=r,this.options=i}return e.prototype.startSpan=function(t,n,r){return this._getTracer().startSpan(t,n,r)},e.prototype.startActiveSpan=function(t,n,r,i){var a=this._getTracer();return Reflect.apply(a.startActiveSpan,a,arguments)},e.prototype._getTracer=function(){if(this._delegate)return this._delegate;var t=this._provider.getDelegateTracer(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):yq},e})(),Sq=(function(){function e(){}return e.prototype.getTracer=function(t,n,r){return new eQ},e})(),wq=new Sq,Vk=(function(){function e(){}return e.prototype.getTracer=function(t,n,r){var i;return(i=this.getDelegateTracer(t,n,r))!==null&&i!==void 0?i:new xq(this,t,n,r)},e.prototype.getDelegate=function(){var t;return(t=this._delegate)!==null&&t!==void 0?t:wq},e.prototype.setDelegate=function(t){this._delegate=t},e.prototype.getDelegateTracer=function(t,n,r){var i;return(i=this._delegate)===null||i===void 0?void 0:i.getTracer(t,n,r)},e})(),As;(function(e){e[e.INTERNAL=0]="INTERNAL",e[e.SERVER=1]="SERVER",e[e.CLIENT=2]="CLIENT",e[e.PRODUCER=3]="PRODUCER",e[e.CONSUMER=4]="CONSUMER"})(As||(As={}));var Zb;(function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"})(Zb||(Zb={}));var ld=ap.getInstance(),_q=(function(){function e(){}return e.prototype.getMeter=function(t,n,r){return HA},e})(),kq=new _q,dO="metrics",jq=(function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalMeterProvider=function(t){return Rd(dO,t,Pa.instance())},e.prototype.getMeterProvider=function(){return Ao(dO)||kq},e.prototype.getMeter=function(t,n,r){return this.getMeterProvider().getMeter(t,n,r)},e.prototype.disable=function(){Md(dO,Pa.instance())},e})(),Tq=jq.getInstance(),Cq=(function(){function e(){}return e.prototype.inject=function(t,n){},e.prototype.extract=function(t,n){return t},e.prototype.fields=function(){return[]},e})(),W0=FA("OpenTelemetry Baggage Key");function tQ(e){return e.getValue(W0)||void 0}function Eq(){return tQ(ap.getInstance().active())}function Aq(e,t){return e.setValue(W0,t)}function Qq(e){return e.deleteValue(W0)}var fO="propagation",Pq=new Cq,Nq=(function(){function e(){this.createBaggage=zI,this.getBaggage=tQ,this.getActiveBaggage=Eq,this.setBaggage=Aq,this.deleteBaggage=Qq}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalPropagator=function(t){return Rd(fO,t,Pa.instance())},e.prototype.inject=function(t,n,r){return r===void 0&&(r=rq),this._getGlobalPropagator().inject(t,n,r)},e.prototype.extract=function(t,n,r){return r===void 0&&(r=nq),this._getGlobalPropagator().extract(t,n,r)},e.prototype.fields=function(){return this._getGlobalPropagator().fields()},e.prototype.disable=function(){Md(fO,Pa.instance())},e.prototype._getGlobalPropagator=function(){return Ao(fO)||Pq},e})(),nQ=Nq.getInstance(),hO="trace",Rq=(function(){function e(){this._proxyTracerProvider=new Vk,this.wrapSpanContext=Oq,this.isSpanContextValid=Y0,this.deleteSpan=fq,this.getSpan=V0,this.getActiveSpan=dq,this.getSpanContext=JA,this.setSpan=U0,this.setSpanContext=hq}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalTracerProvider=function(t){var n=Rd(hO,this._proxyTracerProvider,Pa.instance());return n&&this._proxyTracerProvider.setDelegate(t),n},e.prototype.getTracerProvider=function(){return Ao(hO)||this._proxyTracerProvider},e.prototype.getTracer=function(t,n){return this.getTracerProvider().getTracer(t,n)},e.prototype.disable=function(){Md(hO,Pa.instance()),this._proxyTracerProvider=new Vk},e})(),F0=Rq.getInstance();L$(()=>{const e=F0.getActiveSpan();if(!e)return;const t=e.spanContext();if(Y0(t))return t.traceId});var Mq="semiont",Dq=()=>F0.getTracer(Mq);async function Nu(e,t,n){const r=Dq().startSpan(e,{kind:(n==null?void 0:n.kind)??As.INTERNAL,...n!=null&&n.attrs?{attributes:n.attrs}:{}});try{return await ld.with(F0.setSpan(ld.active(),r),()=>t(r))}catch(i){throw r.recordException(i),r.setStatus({code:Zb.ERROR,message:i instanceof Error?i.message:String(i)}),i}finally{r.end()}}var Uk="_trace";function rQ(){const e={};nQ.inject(ld.active(),e);const t=e.traceparent;if(t)return e.tracestate?{traceparent:t,tracestate:e.tracestate}:{traceparent:t}}function Lq(e){const t=e[Uk];if(t!==void 0&&delete e[Uk],!(!t||typeof t.traceparent!="string"))return t}function zq(e,t){if(!e)return t();const n={traceparent:e.traceparent};e.tracestate&&(n.tracestate=e.tracestate);const r=nQ.extract(ld.active(),n);return ld.with(r,t)}var $q="semiont",Iq=()=>Tq.getMeter($q),mO;function qq(){return mO||(mO=Iq().createCounter("semiont.bus.emit",{description:"Bus emits by channel and scope"})),mO}function Xq(e,t){qq().add(1,{"bus.channel":e,...t?{"bus.scope":t}:{}})}var Zq=3e3,Bq={initial:["connecting","closed"],connecting:["open","reconnecting","closed"],open:["reconnecting","closed"],reconnecting:["connecting","degraded","closed"],degraded:["connecting","closed"],closed:[]};function Vq(e){const{baseUrl:t,token:n,channels:r,scope:i,reconnectMs:a=5e3}=e,s=typeof n=="function"?n:()=>n,l=new Set(r),c=new Set;let d=i;const f=new Ls,m=new Te("initial");let p="initial",O=null;const b=A=>{if(p===A)return;if(!Bq[p].includes(A))throw new Error(`Invalid connection state transition: ${p} → ${A}`);const Z=p;p=A,A==="reconnecting"&&Z!=="reconnecting"&&(O&&clearTimeout(O),O=setTimeout(()=>{p==="reconnecting"&&b("degraded")},Zq)),Z==="reconnecting"&&A!=="reconnecting"&&O&&(clearTimeout(O),O=null),m.next(A)};let x=!1;const w=new Set;let k=null,T=null;const j=f.pipe(A$()),E=()=>{for(const A of w)try{A.abort()}catch{}w.clear(),k&&(clearTimeout(k),k=null)},Q=async()=>{b("connecting");for(const V of w)try{V.abort()}catch{}w.clear();const A=new URLSearchParams;for(const V of l)A.append("channel",V);if(d&&c.size>0){A.append("scope",d);for(const V of c)A.append("scoped",V)}const X=`${t}/bus/subscribe?${A.toString()}`,Z=new AbortController;w.add(Z);try{const V={Authorization:`Bearer ${s()}`};T&&(V["Last-Event-ID"]=T);const $=await fetch(X,{headers:V,signal:Z.signal});if(!$.ok||!$.body)throw new Error(`SSE connect failed: ${$.status}`);b("open");const W=$.body.getReader(),I=new TextDecoder;let z="",ee="",le="",q;for(;x&&w.has(Z);){const{done:G,value:re}=await W.read();if(G)break;z+=I.decode(re,{stream:!0});const M=z.split(`
|
|
37
|
-
`);z=M.pop()??"";for(const he of M)if(he.startsWith("event: "))ee=he.slice(7);else if(he.startsWith("data: "))le=he.slice(6);else if(he.startsWith("id: "))q=he.slice(4);else if(he===""){if(ee==="bus-event"&&le){q!==void 0&&(T=q);const ye=JSON.parse(le);Qu("RECV",ye.channel,ye.payload,ye.scope);const Oe=Lq(ye.payload);await zq(Oe,()=>Nu(`bus.recv:${ye.channel}`,()=>{f.next(ye)},{kind:As.CONSUMER,attrs:{"bus.channel":ye.channel,...ye.scope?{"bus.scope":ye.scope}:{}}}))}ee="",le="",q=void 0}}}catch(V){if(V.name==="AbortError")return}finally{w.delete(Z)}x&&(b("reconnecting"),k=setTimeout(()=>{x&&Q()},a))},P=()=>{x&&((p==="open"||p==="connecting"||p==="degraded")&&b("reconnecting"),E(),Q())};let N=null;const D=100,L=()=>{N&&clearTimeout(N),N=setTimeout(()=>{N=null,P()},D)};return{on$(A){return j.pipe(Jn(X=>X.channel===A),ln(X=>X.payload))},emit:async(A,X,Z)=>{const V={channel:A,payload:X};Z&&(V.scope=Z);const $={"Content-Type":"application/json",Authorization:`Bearer ${s()}`},W=rQ();W&&($.traceparent=W.traceparent,W.tracestate&&($.tracestate=W.tracestate)),await fetch(`${t}/bus/emit`,{method:"POST",headers:$,body:JSON.stringify(V)})},state$:m.asObservable(),addChannels:(A,X)=>{let Z=!1;if(X!==void 0){for(const V of A)c.has(V)||(c.add(V),Z=!0);X!==d&&(d=X,Z=!0)}else for(const V of A)l.has(V)||(l.add(V),Z=!0);Z&&L()},removeChannels:A=>{let X=!1;for(const Z of A)c.delete(Z)&&(X=!0),l.delete(Z)&&(X=!0);c.size===0&&(d=void 0),X&&L()},start:()=>{x||(x=!0,Q())},stop:()=>{x=!1,p!=="closed"&&b("closed"),N&&(clearTimeout(N),N=null),O&&(clearTimeout(O),O=null),E()},dispose:()=>{x=!1,p!=="closed"&&b("closed"),N&&(clearTimeout(N),N=null),O&&(clearTimeout(O),O=null),E(),f.complete(),m.complete()}}}var pO=[...P$.filter(e=>e!=="mark:entity-type-added"),...N$];function Uq(e){return e===400?"api.bad-request":e===401?"api.unauthorized":e===403?"api.forbidden":e===404?"api.not-found":e===409?"api.conflict":e>=500?"api.server-error":"api.error"}var iQ=class extends q0{constructor(t,n,r,i){super(t,Uq(n),{status:n,statusText:r,body:i});pe(this,"status");pe(this,"statusText");this.name="APIError",this.status=n,this.statusText=r}},jo=class{constructor(e){pe(this,"baseUrl");pe(this,"http");pe(this,"token$");pe(this,"logger");pe(this,"_actor",null);pe(this,"_actorStarted",!1);pe(this,"disposed",!1);pe(this,"activeResource",null);pe(this,"bridges",[]);const{baseUrl:t,timeout:n=3e4,retry:r=2,logger:i,tokenRefresher:a}=e;this.baseUrl=t.endsWith("/")?t.slice(0,-1):t,this.token$=e.token$??new Te(null),this.logger=i;const s=a?{limit:1,methods:["get","post","put","patch","delete","head","options"],statusCodes:[401,408,413,429,500,502,503,504]}:r;this.http=lO.create({timeout:n,retry:s,credentials:"include",hooks:{beforeRequest:[l=>{this.logger&&this.logger.debug("HTTP Request",{type:"http_request",url:l.url,method:l.method,timestamp:Date.now(),hasAuth:l.headers.has("Authorization")})}],beforeRetry:a?[async({request:l,error:c})=>{if(!(!(c instanceof Sm)||c.response.status!==401))try{const d=await a();if(!d)return lO.stop;l.headers.set("Authorization",`Bearer ${d}`);return}catch{return lO.stop}}]:[],afterResponse:[(l,c,d)=>(this.logger&&this.logger.debug("HTTP Response",{type:"http_response",url:l.url,method:l.method,status:d.status,statusText:d.statusText}),d)],beforeError:[async l=>{const{response:c,request:d}=l;if(c){const f=await c.json().catch(()=>({}));throw this.logger&&this.logger.error("HTTP Request Failed",{type:"http_error",url:d.url,method:d.method,status:c.status,statusText:c.statusText,error:f.message||`HTTP ${c.status}: ${c.statusText}`}),new iQ(f.message||`HTTP ${c.status}: ${c.statusText}`,c.status,c.statusText,f)}return l}]}}),this.token$.subscribe(l=>{l&&!this._actorStarted&&!this.disposed&&(this._actorStarted=!0,this.actor.start())})}get actor(){if(!this._actor){this._actor=Vq({baseUrl:this.baseUrl,token:()=>this.token$.getValue()??"",channels:[...qk]});for(const e of qk)this._actor.on$(e).subscribe(t=>{for(const n of this.bridges)n.get(e).next(t)})}return this._actor}async emit(e,t,n){Qu("EMIT",e,t,n),Xq(e,n),await Nu(`bus.emit:${e}`,async()=>{n!==void 0?await this.actor.emit(e,t,n):await this.actor.emit(e,t)},{kind:As.PRODUCER,attrs:{"bus.channel":e,...n?{"bus.scope":n}:{}}})}on(e,t){const n=this.actor.on$(e).subscribe(t);return()=>n.unsubscribe()}stream(e){return this.actor.on$(e)}bridgeInto(e){this.bridges.push(e)}subscribeToResource(e){if(this.activeResource){if(this.activeResource.resourceId!==e)throw new Error(`HttpTransport already subscribed to resource ${this.activeResource.resourceId}; call the unsubscribe returned from the previous subscribeToResource before subscribing to ${e}.`);return this.activeResource.refCount++,this.makeUnsubscriber()}this.actor.addChannels([...pO],e);const t=[];for(const n of pO)t.push(this.actor.on$(n).subscribe(r=>{for(const i of this.bridges)i.get(n).next(r)}));return this.activeResource={resourceId:e,refCount:1,bridgeSubs:t},this.makeUnsubscriber()}makeUnsubscriber(){let e=!1;return()=>{if(!e&&(e=!0,!!this.activeResource&&(this.activeResource.refCount--,!(this.activeResource.refCount>0)))){for(const t of this.activeResource.bridgeSubs)t.unsubscribe();this.actor.removeChannels([...pO]),this.activeResource=null}}}get state$(){return this.actor.state$}dispose(){if(!this.disposed){if(this.disposed=!0,this.activeResource){for(const e of this.activeResource.bridgeSubs)e.unsubscribe();this.activeResource=null}this._actor&&(this._actor.dispose(),this._actor=null)}}authHeaders(){const e=this.token$.getValue()??void 0;return e?{Authorization:`Bearer ${e}`}:{}}async authenticatePassword(e,t){return this.http.post(`${this.baseUrl}/api/tokens/password`,{json:{email:e,password:t},headers:this.authHeaders()}).json()}async authenticateGoogle(e){return this.http.post(`${this.baseUrl}/api/tokens/google`,{json:{credential:e},headers:this.authHeaders()}).json()}async refreshAccessToken(e){return this.http.post(`${this.baseUrl}/api/tokens/refresh`,{json:{refreshToken:e},headers:this.authHeaders()}).json()}async logout(){await this.http.post(`${this.baseUrl}/api/users/logout`,{headers:this.authHeaders()}).json()}async acceptTerms(){await this.http.post(`${this.baseUrl}/api/users/accept-terms`,{headers:this.authHeaders()}).json()}async getCurrentUser(){return this.http.get(`${this.baseUrl}/api/users/me`,{headers:this.authHeaders()}).json()}async generateMcpToken(){return this.http.post(`${this.baseUrl}/api/tokens/mcp-generate`,{headers:this.authHeaders()}).json()}async getMediaToken(e){return this.http.post(`${this.baseUrl}/api/tokens/media`,{json:{resourceId:e},headers:this.authHeaders()}).json()}async listUsers(){return this.http.get(`${this.baseUrl}/api/admin/users`,{headers:this.authHeaders()}).json()}async getUserStats(){return this.http.get(`${this.baseUrl}/api/admin/users/stats`,{headers:this.authHeaders()}).json()}async updateUser(e,t){return this.http.patch(`${this.baseUrl}/api/admin/users/${e}`,{json:t,headers:this.authHeaders()}).json()}async getOAuthConfig(){return this.http.get(`${this.baseUrl}/api/admin/oauth/config`,{headers:this.authHeaders()}).json()}async backupKnowledgeBase(){return this.http.post(`${this.baseUrl}/api/admin/exchange/backup`,{headers:this.authHeaders()})}async restoreKnowledgeBase(e,t){const n=new FormData;n.append("file",e);const r=await this.http.post(`${this.baseUrl}/api/admin/exchange/restore`,{body:n,headers:this.authHeaders()});return this.parseSSEStream(r,t)}async exportKnowledgeBase(e){const t=e!=null&&e.includeArchived?new URLSearchParams({includeArchived:"true"}):void 0;return this.http.post(`${this.baseUrl}/api/moderate/exchange/export`,{headers:this.authHeaders(),...t?{searchParams:t}:{}})}async importKnowledgeBase(e,t){const n=new FormData;n.append("file",e);const r=await this.http.post(`${this.baseUrl}/api/moderate/exchange/import`,{body:n,headers:this.authHeaders()});return this.parseSSEStream(r,t)}async parseSSEStream(e,t){const n=e.body.getReader(),r=new TextDecoder;let i="",a={phase:"unknown"};for(;;){const{done:s,value:l}=await n.read();if(s)break;i+=r.decode(l,{stream:!0});const c=i.split(`
|
|
38
|
-
`);i=c.pop();for(const d of c)if(d.startsWith("data: ")){const f=JSON.parse(d.slice(6));t==null||t(f),(f.phase==="complete"||f.phase==="error"||f.phase==="failed")&&(a=f)}}return a}async healthCheck(){return this.http.get(`${this.baseUrl}/api/health`,{headers:this.authHeaders()}).json()}async getStatus(){return this.http.get(`${this.baseUrl}/api/status`,{headers:this.authHeaders()}).json()}get rawHttp(){return this.http}getToken(){return this.token$.getValue()??void 0}},To=class{constructor(e){this.transport=e}async putBinary(e,t){const n=e.file instanceof File?e.file.size:e.file.length;return Qu("PUT","content",{name:e.name,format:e.format,storageUri:e.storageUri,sizeBytes:n}),Nu("content.put",async()=>{const r=new FormData;if(r.append("name",e.name),r.append("format",e.format),r.append("storageUri",e.storageUri),e.file instanceof File)r.append("file",e.file);else if(Buffer.isBuffer(e.file)){const a=new Blob([new Uint8Array(e.file)],{type:e.format});r.append("file",a,e.name)}else throw new Error("file must be a File or Buffer");return e.entityTypes&&e.entityTypes.length>0&&r.append("entityTypes",JSON.stringify(e.entityTypes)),e.language&&r.append("language",e.language),e.creationMethod&&r.append("creationMethod",String(e.creationMethod)),e.sourceAnnotationId&&r.append("sourceAnnotationId",String(e.sourceAnnotationId)),e.sourceResourceId&&r.append("sourceResourceId",String(e.sourceResourceId)),e.generationPrompt&&r.append("generationPrompt",e.generationPrompt),e.generator&&r.append("generator",JSON.stringify(e.generator)),e.isDraft!==void 0&&r.append("isDraft",String(e.isDraft)),{resourceId:(await this.transport.rawHttp.post(`${this.transport.baseUrl}/resources`,{body:r,headers:this.requestHeaders(t==null?void 0:t.auth)}).json()).resourceId}},{kind:As.CLIENT,attrs:{"content.format":e.format,"content.size_bytes":n}})}async getBinary(e,t){return Qu("GET","content",{resourceId:e,accept:t==null?void 0:t.accept}),Nu("content.get",async()=>{const n=await this.transport.rawHttp.get(`${this.transport.baseUrl}/resources/${e}`,{headers:{Accept:(t==null?void 0:t.accept)??"text/plain",...this.requestHeaders(t==null?void 0:t.auth)}}),r=n.headers.get("content-type")||"application/octet-stream";return{data:await n.arrayBuffer(),contentType:r}},{kind:As.CLIENT,attrs:{"resource.id":e}})}async getBinaryStream(e,t){return Qu("GET","content",{resourceId:e,accept:t==null?void 0:t.accept,stream:!0}),Nu("content.get",async()=>{const n=await this.transport.rawHttp.get(`${this.transport.baseUrl}/resources/${e}`,{headers:{Accept:(t==null?void 0:t.accept)??"text/plain",...this.requestHeaders(t==null?void 0:t.auth)}}),r=n.headers.get("content-type")||"application/octet-stream";if(!n.body)throw new Error("Response body is null - cannot create stream");return{stream:n.body,contentType:r}},{kind:As.CLIENT,attrs:{"resource.id":e,"content.stream":!0}})}dispose(){}requestHeaders(e){const t=e??this.transport.getToken(),n=t?{Authorization:`Bearer ${t}`}:{},r=rQ();return r&&(n.traceparent=r.traceparent,r.tracestate&&(n.tracestate=r.tracestate)),n}},sp=class aQ extends tr{then(t,n){return S$(this).then(t,n)}static from(t){return new aQ(n=>t.subscribe(n))}},co=class sQ extends tr{then(t,n){return kA(this.pipe(Jn(r=>r!==void 0))).then(t,n)}static from(t){let n=Yk.get(t);return n||(n=new sQ(r=>t.subscribe(r)),Yk.set(t,n)),n}},Yk=new WeakMap,Wk=class extends q0{constructor(e,t,n){super(e,t,n),this.name="BusRequestError"}};async function wn(e,t,n,r,i,a=3e4){const s=crypto.randomUUID(),l={...n,correlationId:s},c=id(e.stream(r).pipe(Jn(m=>m.correlationId===s),ln(m=>({ok:!0,response:m.response}))),e.stream(i).pipe(Jn(m=>m.correlationId===s),ln(m=>({ok:!1,error:new Wk(m.message??"Bus request rejected","bus.rejected",{channel:i,correlationId:s,payload:m})})))).pipe(C$(1),Pd(a),EA(m=>m instanceof jA?zk(()=>new Wk(`Bus request timed out after ${a}ms on ${r}`,"bus.timeout",{channel:t,resultChannel:r,correlationId:s,timeoutMs:a})):zk(()=>m))),d=kA(c);await e.emit(t,l);const f=await d;if(!f.ok)throw f.error;return f.response}function uo(e){const t=new Te(new Map),n=new Set,r=new Map,i=async a=>{if(!n.has(a)){n.add(a);try{const s=await e(a),l=new Map(t.value);l.set(a,s),t.next(l)}catch{}finally{n.delete(a)}}};return{observe(a){!t.value.has(a)&&!n.has(a)&&i(a);let s=r.get(a);return s||(s=t.pipe(ln(l=>l.get(a)),AA()),r.set(a,s)),s},get(a){return t.value.get(a)},keys(){return[...t.value.keys()]},invalidate(a){n.delete(a),i(a)},remove(a){const s=new Map(t.value);s.delete(a),t.next(s),n.delete(a)},set(a,s){const l=new Map(t.value);l.set(a,s),t.next(l)},invalidateAll(){for(const a of t.value.keys())n.delete(a),i(a)},dispose(){t.complete(),r.clear(),n.clear()}}}var Fk="_",Yq=class{constructor(e,t,n){pe(this,"resourceCache");pe(this,"resourceListCache");pe(this,"annotationListCache");pe(this,"annotationDetailCache");pe(this,"annotationResources",new Map);pe(this,"entityTypesCache");pe(this,"referencedByCache");pe(this,"resourceEventsCache");pe(this,"resourceListFilters",new Map);pe(this,"annotationListObs",new Map);pe(this,"onEntityTagChanged",e=>{e.resourceId&&(this.invalidateAnnotationList(e.resourceId),this.invalidateResourceDetail(e.resourceId),this.invalidateResourceEvents(e.resourceId))});pe(this,"onArchiveToggled",e=>{e.resourceId&&(this.invalidateResourceDetail(e.resourceId),this.invalidateResourceLists())});pe(this,"onYieldResourceMutated",e=>{const t=ki(e.resourceId);this.invalidateResourceDetail(t),this.invalidateResourceLists()});this.transport=e,this.bus=t,this.content=n,this.resourceCache=uo(async r=>(await wn(this.transport,"browse:resource-requested",{resourceId:r},"browse:resource-result","browse:resource-failed")).resource),this.resourceListCache=uo(async r=>{const i=this.resourceListFilters.get(r)??{},a=i.search?i.search:void 0;return(await wn(this.transport,"browse:resources-requested",{search:a,archived:i.archived,limit:i.limit??100,offset:0},"browse:resources-result","browse:resources-failed")).resources}),this.annotationListCache=uo(async r=>wn(this.transport,"browse:annotations-requested",{resourceId:r},"browse:annotations-result","browse:annotations-failed")),this.annotationDetailCache=uo(async r=>{const i=this.annotationResources.get(r);if(!i)throw new Error(`Cannot fetch annotation ${r}: no resourceId known`);return(await wn(this.transport,"browse:annotation-requested",{resourceId:i,annotationId:r},"browse:annotation-result","browse:annotation-failed")).annotation}),this.entityTypesCache=uo(async()=>(await wn(this.transport,"browse:entity-types-requested",{},"browse:entity-types-result","browse:entity-types-failed")).entityTypes),this.referencedByCache=uo(async r=>(await wn(this.transport,"browse:referenced-by-requested",{resourceId:r},"browse:referenced-by-result","browse:referenced-by-failed")).referencedBy),this.resourceEventsCache=uo(async r=>(await wn(this.transport,"browse:events-requested",{resourceId:r},"browse:events-result","browse:events-failed")).events),this.subscribeToEvents()}resource(e){return co.from(this.resourceCache.observe(e))}resources(e){const t=JSON.stringify(e??{});return this.resourceListFilters.set(t,e??{}),co.from(this.resourceListCache.observe(t))}annotations(e){let t=this.annotationListObs.get(e);return t||(t=this.annotationListCache.observe(e).pipe(ln(n=>n==null?void 0:n.annotations)),this.annotationListObs.set(e,t)),co.from(t)}annotation(e,t){return this.annotationResources.set(t,e),co.from(this.annotationDetailCache.observe(t))}entityTypes(){return co.from(this.entityTypesCache.observe(Fk))}referencedBy(e){return co.from(this.referencedByCache.observe(e))}events(e){return co.from(this.resourceEventsCache.observe(e))}async resourceContent(e){const t=await this.content.getBinary(e,{accept:"text/plain"});return new TextDecoder().decode(t.data)}async resourceRepresentation(e,t){return this.content.getBinary(e,t!=null&&t.accept?{accept:t.accept}:void 0)}async resourceRepresentationStream(e,t){return this.content.getBinaryStream(e,t!=null&&t.accept?{accept:t.accept}:void 0)}async resourceEvents(e){return(await wn(this.transport,"browse:events-requested",{resourceId:e},"browse:events-result","browse:events-failed")).events}async annotationHistory(e,t){return wn(this.transport,"browse:annotation-history-requested",{resourceId:e,annotationId:t},"browse:annotation-history-result","browse:annotation-history-failed")}async connections(e){throw new Error("Not implemented: connections endpoint does not exist yet")}async backlinks(e){throw new Error("Not implemented: backlinks endpoint does not exist yet")}async resourcesByName(e,t){throw new Error("Not implemented: resourcesByName endpoint does not exist yet")}async files(e,t){return wn(this.transport,"browse:directory-requested",{path:e??".",sort:t??"name"},"browse:directory-result","browse:directory-failed")}click(e,t){this.bus.get("browse:click").next({annotationId:e,motivation:t})}navigateReference(e){this.bus.get("browse:reference-navigate").next({resourceId:e})}invalidateAnnotationList(e){this.annotationListCache.invalidate(e)}removeAnnotationDetail(e){this.annotationDetailCache.remove(e),this.annotationResources.delete(e)}invalidateResourceDetail(e){this.resourceCache.invalidate(e)}invalidateResourceLists(){this.resourceListCache.invalidateAll()}invalidateEntityTypes(){this.entityTypesCache.invalidate(Fk)}invalidateReferencedBy(e){this.referencedByCache.invalidate(e)}invalidateResourceEvents(e){this.resourceEventsCache.invalidate(e)}updateAnnotationInPlace(e,t){const n=this.annotationListCache.get(e);if(n){const i=n.annotations.findIndex(s=>s.id===t.id),a=i>=0?n.annotations.map((s,l)=>l===i?t:s):[...n.annotations,t];this.annotationListCache.set(e,{...n,annotations:a})}const r=Bn(t.id);this.annotationResources.set(r,e),this.annotationDetailCache.set(r,t)}on(e,t){this.bus.get(e).subscribe(t)}subscribeToEvents(){this.on("bus:resume-gap",e=>{const t=e.scope;if(t){const n=t;this.invalidateAnnotationList(n),this.invalidateResourceDetail(n),this.invalidateResourceEvents(n),this.invalidateReferencedBy(n)}else{this.invalidateResourceLists();for(const n of this.annotationListCache.keys())this.invalidateAnnotationList(n);for(const n of this.resourceCache.keys())this.invalidateResourceDetail(n);for(const n of this.resourceEventsCache.keys())this.invalidateResourceEvents(n);for(const n of this.referencedByCache.keys())this.invalidateReferencedBy(n)}this.invalidateEntityTypes()}),this.on("mark:delete-ok",e=>{this.removeAnnotationDetail(Bn(e.annotationId))}),this.on("mark:added",e=>{e.resourceId&&(this.invalidateAnnotationList(e.resourceId),this.invalidateResourceEvents(e.resourceId))}),this.on("mark:removed",e=>{e.resourceId&&(this.invalidateAnnotationList(e.resourceId),this.invalidateResourceEvents(e.resourceId)),this.removeAnnotationDetail(Bn(e.payload.annotationId))}),this.on("mark:body-updated",e=>{const t=e;!t.resourceId||!t.annotation||(this.updateAnnotationInPlace(t.resourceId,t.annotation),this.invalidateResourceEvents(t.resourceId))}),this.on("mark:entity-tag-added",this.onEntityTagChanged),this.on("mark:entity-tag-removed",this.onEntityTagChanged),this.on("replay-window-exceeded",e=>{e.resourceId&&this.invalidateAnnotationList(e.resourceId)}),this.on("yield:create-ok",this.onYieldResourceMutated),this.on("yield:update-ok",this.onYieldResourceMutated),this.on("mark:archived",this.onArchiveToggled),this.on("mark:unarchived",this.onArchiveToggled),this.on("mark:entity-type-added",()=>this.invalidateEntityTypes())}},Wq=class{constructor(e,t){this.transport=e,this.bus=t}async annotation(e,t){const n=await wn(this.transport,"mark:create-request",{resourceId:e,request:t},"mark:create-ok","mark:create-failed");return{annotationId:Bn(n.annotationId)}}async delete(e,t){await this.transport.emit("mark:delete",{annotationId:t,resourceId:e})}async entityType(e){await this.transport.emit("mark:add-entity-type",{tag:e})}async entityTypes(e){for(const t of e)await this.transport.emit("mark:add-entity-type",{tag:t})}async archive(e){await this.transport.emit("mark:archive",{resourceId:e})}async unarchive(e){await this.transport.emit("mark:unarchive",{resourceId:e})}assist(e,t,n){return new sp(r=>{let i=!1,a=null,s=null;const l=()=>{i=!0,a&&(clearTimeout(a),a=null),s&&(clearInterval(s),s=null)},c=w=>{a&&clearTimeout(a),s&&(clearInterval(s),s=null),a=setTimeout(()=>{i||(s=setInterval(()=>{i||wn(this.transport,"job:status-requested",{jobId:w},"job:status-result","job:status-failed").then(k=>{i||(k.status==="complete"?(l(),r.next({kind:"complete",data:{jobId:w,jobType:k.jobType??"annotation",resourceId:e,result:k.result}}),r.complete()):k.status==="failed"&&(l(),r.error(new Error(k.error??"Job failed"))))}).catch(()=>{})},5e3))},1e4)};let d=null;const f=this.bus.get("job:report-progress").pipe(Jn(w=>w.jobId===d)),m=this.bus.get("job:complete").pipe(Jn(w=>w.jobId===d)),p=this.bus.get("job:fail").pipe(Jn(w=>w.jobId===d)),O=f.pipe(M0(id(m,p))).subscribe(w=>{w.progress&&r.next({kind:"progress",data:w.progress}),d&&c(d)}),b=m.subscribe(w=>{l(),r.next({kind:"complete",data:w}),r.complete()}),x=p.subscribe(w=>{l(),r.error(new Error(w.error))});return this.dispatchAssist(e,t,n).then(({jobId:w})=>{w&&!i&&(d=w,c(w))}).catch(w=>{l(),r.error(w)}),()=>{l(),O.unsubscribe(),b.unsubscribe(),x.unsubscribe()}})}request(e,t){this.bus.get("mark:requested").next({selector:e,motivation:t})}requestAssist(e,t,n){this.bus.get("mark:assist-request").next({motivation:e,options:t,...n?{correlationId:n}:{}})}submit(e){this.bus.get("mark:submit").next(e)}cancelPending(){this.bus.get("mark:cancel-pending").next(void 0)}dismissProgress(){this.bus.get("mark:progress-dismiss").next(void 0)}changeSelection(e){this.bus.get("mark:selection-changed").next({motivation:e})}changeClick(e){this.bus.get("mark:click-changed").next({action:e})}changeShape(e){this.bus.get("mark:shape-changed").next({shape:e})}toggleMode(){this.bus.get("mark:mode-toggled").next(void 0)}async dispatchAssist(e,t,n){var s,l;const i={tagging:"tag-annotation",linking:"reference-annotation",highlighting:"highlight-annotation",assessing:"assessment-annotation",commenting:"comment-annotation"}[t];if(!i)throw new Error(`Unsupported motivation: ${t}`);if(t==="tagging"){if(!n.schemaId||!((s=n.categories)!=null&&s.length))throw new Error("Tag assist requires schemaId and categories")}else if(t==="linking"&&!((l=n.entityTypes)!=null&&l.length))throw new Error("Reference assist requires entityTypes");const a={};return n.entityTypes&&(a.entityTypes=n.entityTypes),n.includeDescriptiveReferences!==void 0&&(a.includeDescriptiveReferences=n.includeDescriptiveReferences),n.instructions!==void 0&&(a.instructions=n.instructions),n.density!==void 0&&(a.density=n.density),n.tone!==void 0&&(a.tone=n.tone),n.language!==void 0&&(a.language=n.language),n.schemaId!==void 0&&(a.schemaId=n.schemaId),n.categories!==void 0&&(a.categories=n.categories),wn(this.transport,"job:create",{jobType:i,resourceId:e,params:a},"job:created","job:create-failed")}},Fq=class{constructor(e,t){this.transport=e,this.bus=t}async body(e,t,n){await this.transport.emit("bind:update-body",{correlationId:crypto.randomUUID(),annotationId:t,resourceId:e,operations:n})}initiate(e){this.bus.get("bind:initiate").next(e)}},Hq=class{constructor(e,t){this.transport=e,this.bus=t}annotation(e,t,n){return new sp(r=>{const i=crypto.randomUUID(),a=this.bus.get("gather:complete").pipe(Jn(f=>f.correlationId===i)),s=this.bus.get("gather:failed").pipe(Jn(f=>f.correlationId===i)),l=id(this.bus.get("gather:annotation-progress").pipe(Jn(f=>f.annotationId===e),ln(f=>f)),a.pipe(ln(f=>f))).pipe(M0(id(a,s))).subscribe({next:f=>r.next(f),error:f=>r.error(f)}),c=a.subscribe(f=>{r.next(f),r.complete()}),d=s.subscribe(f=>{r.error(new Error(f.message))});return this.transport.emit("gather:requested",{correlationId:i,annotationId:e,resourceId:t,options:{contextWindow:(n==null?void 0:n.contextWindow)??2e3}}).catch(f=>{r.error(f)}),()=>{l.unsubscribe(),c.unsubscribe(),d.unsubscribe()}})}resource(e,t){throw new Error("Not implemented: gather.resource() — no backend route yet")}},Gq=class{constructor(e,t){this.transport=e,this.bus=t}requestSearch(e){this.bus.get("match:search-requested").next(e)}search(e,t,n,r){return new sp(i=>{const a=crypto.randomUUID(),s=this.bus.get("match:search-results").pipe(Jn(f=>f.correlationId===a)),l=this.bus.get("match:search-failed").pipe(Jn(f=>f.correlationId===a)),c=s.subscribe(f=>{i.next(f),i.complete()}),d=l.subscribe(f=>{i.error(new Error(f.error))});return this.transport.emit("match:search-requested",{correlationId:a,resourceId:e,referenceId:t,context:n,limit:(r==null?void 0:r.limit)??10,useSemanticScoring:(r==null?void 0:r.useSemanticScoring)??!0}).catch(f=>{i.error(f)}),()=>{c.unsubscribe(),d.unsubscribe()}})}},Kq=class{constructor(e,t,n){this.transport=e,this.bus=t,this.content=n}async resource(e){return{resourceId:(await this.content.putBinary({name:e.name,file:e.file,format:e.format,storageUri:e.storageUri,...e.entityTypes?{entityTypes:e.entityTypes}:{},...e.language?{language:e.language}:{},...e.creationMethod?{creationMethod:e.creationMethod}:{},...e.sourceAnnotationId?{sourceAnnotationId:e.sourceAnnotationId}:{},...e.sourceResourceId?{sourceResourceId:e.sourceResourceId}:{},...e.generationPrompt?{generationPrompt:e.generationPrompt}:{},...e.generator?{generator:e.generator}:{},...e.isDraft!==void 0?{isDraft:e.isDraft}:{}})).resourceId}}fromAnnotation(e,t,n){return new sp(r=>{let i=!1,a=null,s=null;const l=()=>{i=!0,a&&(clearTimeout(a),a=null),s&&(clearInterval(s),s=null)},c=w=>{a&&clearTimeout(a),s&&(clearInterval(s),s=null),a=setTimeout(()=>{i||(s=setInterval(()=>{i||wn(this.transport,"job:status-requested",{jobId:w},"job:status-result","job:status-failed").then(k=>{i||(k.status==="complete"?(l(),r.next({kind:"complete",data:{jobId:w,jobType:k.jobType??"generation",resourceId:e,result:k.result}}),r.complete()):k.status==="failed"&&(l(),r.error(new Error(k.error??"Generation failed"))))}).catch(()=>{})},5e3))},1e4)};let d=null;const f=this.bus.get("job:report-progress").pipe(Jn(w=>w.jobId===d)),m=this.bus.get("job:complete").pipe(Jn(w=>w.jobId===d)),p=this.bus.get("job:fail").pipe(Jn(w=>w.jobId===d)),O=f.pipe(M0(id(m,p))).subscribe(w=>{w.progress&&r.next({kind:"progress",data:w.progress}),d&&c(d)}),b=m.subscribe(w=>{l(),r.next({kind:"complete",data:w}),r.complete()}),x=p.subscribe(w=>{l(),r.error(new Error(w.error))});return wn(this.transport,"job:create",{jobType:"generation",resourceId:e,params:{referenceId:t,title:n.title,prompt:n.prompt,language:n.language,temperature:n.temperature,maxTokens:n.maxTokens,storageUri:n.storageUri,context:n.context}},"job:created","job:create-failed").then(({jobId:w})=>{w&&!i&&(d=w,c(w))}).catch(w=>{l(),r.error(w)}),()=>{l(),O.unsubscribe(),b.unsubscribe(),x.unsubscribe()}})}async cloneToken(e){return wn(this.transport,"yield:clone-token-requested",{resourceId:e},"yield:clone-token-generated","yield:clone-token-failed")}async fromToken(e){return(await wn(this.transport,"yield:clone-resource-requested",{token:e},"yield:clone-resource-result","yield:clone-resource-failed")).sourceResource}async createFromToken(e){return wn(this.transport,"yield:clone-create",e,"yield:clone-created","yield:clone-create-failed")}clone(){this.bus.get("yield:clone").next(void 0)}},Jq=class{constructor(e,t){this.transport=e,this.bus=t}attention(e,t){this.transport.emit("beckon:focus",{annotationId:e,resourceId:t})}hover(e){this.bus.get("beckon:hover").next({annotationId:e})}sparkle(e){this.bus.get("beckon:sparkle").next({annotationId:e})}},eX=class{constructor(e,t){this.transport=e,this.bus=t}get queued$(){return this.bus.get("job:queued")}get progress$(){return this.bus.get("job:report-progress")}get complete$(){return this.bus.get("job:complete")}get fail$(){return this.bus.get("job:fail")}async status(e){return wn(this.transport,"job:status-requested",{jobId:e},"job:status-result","job:status-failed")}async pollUntilComplete(e,t){const n=(t==null?void 0:t.interval)??1e3,r=(t==null?void 0:t.timeout)??6e4,i=Date.now();for(;;){const a=await this.status(e);if(t!=null&&t.onProgress&&t.onProgress(a),a.status==="complete"||a.status==="failed"||a.status==="cancelled")return a;if(Date.now()-i>r)throw new Error(`Job polling timeout after ${r}ms`);await new Promise(s=>setTimeout(s,n))}}async cancel(e,t){await this.transport.emit("job:cancel-requested",{jobType:t==="generation"?"generation":"annotation"})}cancelRequest(e){this.bus.get("job:cancel-requested").next({jobType:e})}},tX=class{constructor(e){this.transport=e}async password(e,t){return this.transport.authenticatePassword(e,t)}async google(e){return this.transport.authenticateGoogle(e)}async refresh(e){return this.transport.refreshAccessToken(e)}async logout(){await this.transport.logout()}async me(){return this.transport.getCurrentUser()}async acceptTerms(){await this.transport.acceptTerms()}async mcpToken(){return this.transport.generateMcpToken()}async mediaToken(e){return this.transport.getMediaToken(e)}},nX=class{constructor(e){this.transport=e}async users(){return(await this.transport.listUsers()).users}async userStats(){return this.transport.getUserStats()}async updateUser(e,t){return(await this.transport.updateUser(e,t)).user}async oauthConfig(){return this.transport.getOAuthConfig()}async healthCheck(){return this.transport.healthCheck()}async status(){return this.transport.getStatus()}async backup(){return this.transport.backupKnowledgeBase()}async restore(e,t){return this.transport.restoreKnowledgeBase(e,t)}async exportKnowledgeBase(e){return this.transport.exportKnowledgeBase(e)}async importKnowledgeBase(e,t){return this.transport.importKnowledgeBase(e,t)}},Ru=class Bb{constructor(t,n){pe(this,"transport");pe(this,"content");pe(this,"bus");pe(this,"baseUrl");pe(this,"browse");pe(this,"mark");pe(this,"bind");pe(this,"gather");pe(this,"match");pe(this,"yield");pe(this,"beckon");pe(this,"job");pe(this,"auth");pe(this,"admin");this.transport=t,this.content=n,this.baseUrl=t.baseUrl,this.bus=new PA,this.transport.bridgeInto(this.bus),this.browse=new Yq(this.transport,this.bus,this.content),this.mark=new Wq(this.transport,this.bus),this.bind=new Fq(this.transport,this.bus),this.gather=new Hq(this.transport,this.bus),this.match=new Gq(this.transport,this.bus),this.yield=new Kq(this.transport,this.bus,this.content),this.beckon=new Jq(this.transport,this.bus),this.job=new eX(this.transport,this.bus),this.auth=new tX(this.transport),this.admin=new nX(this.transport)}get state$(){return this.transport.state$}subscribeToResource(t){return this.transport.subscribeToResource(t)}dispose(){this.transport.dispose(),this.content.dispose()}static fromHttp(t){const n=typeof t.baseUrl=="string"?t.baseUrl:t.baseUrl,r=t.token==null?null:typeof t.token=="string"?t.token:t.token,i=new Te(r),a=new jo({baseUrl:n,token$:i}),s=new To(a);return new Bb(a,s)}static async signIn(t){const n=typeof t.baseUrl=="string"?t.baseUrl:t.baseUrl,r=new Te(null),i=new jo({baseUrl:n,token$:r}),a=new To(i),s=new Bb(i,a);try{const l=await s.auth.password(t.email,t.password);return r.next(l.token),s}catch(l){throw s.dispose(),l}}},rX="semiont.session.",oQ="semiont.knowledgeBases",gO="semiont.activeKnowledgeBaseId",iX=300*1e3;function op(e){return`${rX}${e}`}function _m(e,t){const n=e.get(op(t));if(!n)return null;try{const r=JSON.parse(n);if(r&&typeof r.access=="string"&&typeof r.refresh=="string")return{access:r.access,refresh:r.refresh}}catch{}return null}function em(e,t,n){e.set(op(t),JSON.stringify(n))}function Mu(e,t){e.delete(op(t))}function Vb(e){try{const t=e.split(".");if(t.length!==3||!t[1])return null;const n=JSON.parse(atob(t[1]));return n.exp?new Date(n.exp*1e3):null}catch{return null}}function tm(e){const t=Vb(e);return t?t.getTime()<Date.now():!0}function aX(e){if(e.host!==void 0)return e;try{const t=new URL(e.backendUrl);return{id:e.id,label:e.label,host:t.hostname,port:parseInt(t.port,10)||(t.protocol==="https:"?443:80),protocol:t.protocol==="https:"?"https":"http",email:""}}catch{return{id:e.id,label:e.label||"Unknown",host:"localhost",port:4e3,protocol:"http",email:""}}}function sX(e){try{const t=e.get(oQ);return t?JSON.parse(t).map(aX):[]}catch{return[]}}function oX(e,t){e.set(oQ,JSON.stringify(t))}function Pae(e){return e==="localhost"||e==="127.0.0.1"?"http":"https"}var lX=/^(([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)*[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?|localhost|\d{1,3}(\.\d{1,3}){3})$/;function cX(e){return lX.test(e)}function vO(e){if(!cX(e.host))throw new Error(`Invalid KB hostname: "${e.host}"`);const t=new URL("http://x");return t.protocol=e.protocol+":",t.hostname=e.host,t.port=String(e.port),`${e.protocol}://${t.hostname}:${e.port}`}function uX(){return crypto.randomUUID()}var Ub=class extends q0{constructor(t,n,r=null){super(n,t,{kbId:r});pe(this,"kbId");this.name="SemiontSessionError",this.kbId=r}},dX=class Yb{constructor(t){pe(this,"kb");pe(this,"client");pe(this,"token$");pe(this,"user$");pe(this,"streamState$");pe(this,"ready");pe(this,"storage");pe(this,"doRefresh");pe(this,"doValidate");pe(this,"onAuthFailed");pe(this,"onError");pe(this,"refreshTimer",null);pe(this,"unsubscribeStorage",null);pe(this,"disposed",!1);var i,a;this.kb=t.kb,this.storage=t.storage,this.doRefresh=t.refresh,this.doValidate=t.validate,this.onAuthFailed=t.onAuthFailed??(()=>{}),this.onError=t.onError??(()=>{}),this.client=t.client,this.token$=t.token$,this.user$=new Te(null);const n=_m(this.storage,this.kb.id);n&&!tm(n.access)&&this.token$.getValue()===null&&this.token$.next(n.access);const r=this.token$.getValue();this.streamState$=this.client.state$,r&&this.scheduleProactiveRefresh(r),this.unsubscribeStorage=((a=(i=this.storage).subscribe)==null?void 0:a.call(i,(s,l)=>{this.handleStorageChange(s,l)}))??null,this.ready=this.validate(n)}async validate(t){if(!t)return;const n=tm(t.access)?this.doRefresh?await this.doRefresh():null:t.access;if(!n){tm(t.access)&&Mu(this.storage,this.kb.id);return}if(n!==t.access&&(this.token$.next(n),this.scheduleProactiveRefresh(n)),!this.doValidate)return;const r=async i=>{if(!this.disposed)try{const a=await this.doValidate(i);if(this.disposed)return;this.user$.next(a)}catch(a){if(this.disposed)return;if(a instanceof iQ&&a.status===401){const s=this.doRefresh?await this.doRefresh():null;if(this.disposed)return;if(s){this.token$.next(s),this.scheduleProactiveRefresh(s),await r(s);return}Mu(this.storage,this.kb.id),this.token$.next(null),this.onAuthFailed("Your session has expired. Please sign in again.")}else this.onError(new Ub("session.auth-failed",a instanceof Error?a.message:String(a),this.kb.id))}};await r(n)}async refresh(){if(this.disposed||!this.doRefresh)return null;const t=await this.doRefresh();if(this.disposed)return null;if(t){const n=t;return this.token$.next(n),this.scheduleProactiveRefresh(t),n}return this.token$.next(null),Mu(this.storage,this.kb.id),this.onAuthFailed("Your session has expired. Please sign in again."),this.onError(new Ub("session.refresh-exhausted","Token refresh failed",this.kb.id)),null}scheduleProactiveRefresh(t){this.clearRefreshTimer();const n=Vb(t);if(!n)return;const r=n.getTime()-iX,i=Math.max(0,r-Date.now());this.refreshTimer=setTimeout(()=>{this.refreshTimer=null,this.disposed||this.refresh()},i)}clearRefreshTimer(){this.refreshTimer&&(clearTimeout(this.refreshTimer),this.refreshTimer=null)}handleStorageChange(t,n){if(!this.disposed&&t===op(this.kb.id)){if(!n){this.token$.next(null),this.user$.next(null),this.clearRefreshTimer();return}try{const r=JSON.parse(n);typeof r.access=="string"&&(this.token$.next(r.access),this.scheduleProactiveRefresh(r.access))}catch{}}}get expiresAt(){const t=this.token$.getValue();return t?Vb(t):null}subscribe(t,n){const r=this.client.bus.get(t).subscribe(n);return()=>r.unsubscribe()}async dispose(){this.disposed||(this.disposed=!0,this.clearRefreshTimer(),this.unsubscribeStorage&&(this.unsubscribeStorage(),this.unsubscribeStorage=null),this.client.dispose(),this.token$.complete(),this.user$.complete())}static fromHttp(t){const n=typeof t.baseUrl=="string"?t.baseUrl:t.baseUrl,r=t.token==null?null:typeof t.token=="string"?t.token:t.token,i=new Te(r),a=new jo({baseUrl:n,token$:i}),s=new To(a),l=new Ru(a,s),c={kb:t.kb,storage:t.storage,client:l,token$:i};return t.refresh&&(c.refresh=t.refresh),t.validate&&(c.validate=t.validate),t.onAuthFailed&&(c.onAuthFailed=t.onAuthFailed),t.onError&&(c.onError=t.onError),new Yb(c)}static async signIn(t){const n=typeof t.baseUrl=="string"?t.baseUrl:t.baseUrl,r=new Te(null),i=new jo({baseUrl:n,token$:r}),a=new To(i),s=new Ru(i,a);let l;try{l=await s.auth.password(t.email,t.password)}catch(m){throw s.dispose(),m}em(t.storage,t.kb.id,{access:l.token,refresh:l.refreshToken}),r.next(l.token);const c=async()=>{const m=_m(t.storage,t.kb.id);if(!m)return null;try{return(await s.auth.refresh(m.refresh)).access_token}catch{return null}},d={kb:t.kb,storage:t.storage,client:s,token$:r,refresh:c};t.validate&&(d.validate=t.validate),t.onAuthFailed&&(d.onAuthFailed=t.onAuthFailed),t.onError&&(d.onError=t.onError);const f=new Yb(d);return await f.ready,f}};function fX(e){return()=>{}}var hX=class{constructor(){pe(this,"sessionExpiredAt$");pe(this,"sessionExpiredMessage$");pe(this,"permissionDeniedAt$");pe(this,"permissionDeniedMessage$");this.sessionExpiredAt$=new Te(null),this.sessionExpiredMessage$=new Te(null),this.permissionDeniedAt$=new Te(null),this.permissionDeniedMessage$=new Te(null)}notifySessionExpired(e){this.sessionExpiredMessage$.next(e??"Your session has expired. Please sign in again."),this.sessionExpiredAt$.next(Date.now())}notifyPermissionDenied(e){this.permissionDeniedMessage$.next(e??"You do not have permission to perform this action."),this.permissionDeniedAt$.next(Date.now())}acknowledgeSessionExpired(){this.sessionExpiredAt$.next(null),this.sessionExpiredMessage$.next(null)}acknowledgePermissionDenied(){this.permissionDeniedAt$.next(null),this.permissionDeniedMessage$.next(null)}dispose(){this.sessionExpiredAt$.complete(),this.sessionExpiredMessage$.complete(),this.permissionDeniedAt$.complete(),this.permissionDeniedMessage$.complete()}},Wb="openDocuments";function lQ(e){return[...e].sort((t,n)=>t.order!==void 0&&n.order!==void 0?t.order-n.order:t.openedAt-n.openedAt)}function mX(e){try{const t=e.get(Wb);if(t)return lQ(JSON.parse(t))}catch{}return[]}var pX=class{constructor(e){pe(this,"kbs$");pe(this,"activeKbId$");pe(this,"activeSession$");pe(this,"activeSignals$");pe(this,"sessionActivating$");pe(this,"openResources$");pe(this,"error$");pe(this,"identityToken$");pe(this,"storage");pe(this,"eventBus",new PA);pe(this,"unregisterNotify",null);pe(this,"unsubscribeStorage",null);pe(this,"disposed",!1);pe(this,"activating",null);pe(this,"inFlightRefreshes",new Map);var i,a,s;this.storage=e.storage;const t=sX(this.storage),n=this.storage.get(gO),r=n&&t.some(l=>l.id===n)?n:((i=t[0])==null?void 0:i.id)??null;this.kbs$=new Te(t),this.activeKbId$=new Te(r),this.activeSession$=new Te(null),this.activeSignals$=new Te(null),this.sessionActivating$=new Te(!1),this.openResources$=new Te(mX(this.storage)),this.error$=new Ls,this.identityToken$=new Te(null),this.kbs$.subscribe(l=>oX(this.storage,l)),this.activeKbId$.subscribe(l=>{l?this.storage.set(gO,l):this.storage.delete(gO)}),this.openResources$.subscribe(l=>{this.storage.set(Wb,JSON.stringify(l))}),this.unsubscribeStorage=((s=(a=this.storage).subscribe)==null?void 0:s.call(a,(l,c)=>{if(!(l!==Wb||!c))try{this.openResources$.next(lQ(JSON.parse(c)))}catch{}}))??null,this.unregisterNotify=fX(),r&&this.setActiveKb(r)}emit(e,t){this.disposed||this.eventBus.get(e).next(t)}on(e,t){const n=this.eventBus.get(e).subscribe(t);return()=>n.unsubscribe()}stream(e){return this.eventBus.get(e).asObservable()}setIdentityToken(e){this.disposed||this.identityToken$.next(e)}addKb(e,t,n){const r={id:uX(),...e};return em(this.storage,r.id,{access:t,refresh:n}),this.kbs$.next([...this.kbs$.getValue(),r]),this.setActiveKb(r.id),r}removeKb(e){var n;Mu(this.storage,e);const t=this.kbs$.getValue().filter(r=>r.id!==e);this.kbs$.next(t),this.activeKbId$.getValue()===e&&this.setActiveKb(((n=t[0])==null?void 0:n.id)??null)}updateKb(e,t){this.kbs$.next(this.kbs$.getValue().map(n=>n.id===e?{...n,...t}:n))}getKbSessionStatus(e){const t=_m(this.storage,e);return t?tm(t.access)?"expired":"authenticated":"signed-out"}async setActiveKb(e){if(this.disposed)return;const t=this.activeKbId$.getValue(),n=this.activeSession$.getValue();if(e===t&&n)return;for(t!==e&&this.activeKbId$.next(e),n&&(this.activeSession$.next(null),this.activeSignals$.next(null));this.activating;)if(await this.activating,this.disposed||this.activeKbId$.getValue()!==e)return;const r=(async()=>{const i=this.activeSession$.getValue(),a=this.activeSignals$.getValue();if(i&&(this.activeSession$.next(null),this.activeSignals$.next(null),await i.dispose(),a==null||a.dispose()),!e)return;const s=this.kbs$.getValue().find(O=>O.id===e);if(!s)return;const l=new hX,c=new Te(null);let d;const f=new jo({baseUrl:vO(s),token$:c,tokenRefresher:()=>d.refresh().then(O=>O??null)}),m=new To(f),p=new Ru(f,m);d=new dX({kb:s,storage:this.storage,client:p,token$:c,refresh:()=>this.performRefresh(s),validate:O=>this.performValidate(s,O),onAuthFailed:O=>l.notifySessionExpired(O),onError:O=>this.error$.next(O)});try{await d.ready}catch(O){this.error$.next(new Ub("session.construct-failed",O instanceof Error?O.message:String(O),e)),await d.dispose(),l.dispose();return}if(this.disposed||this.activeKbId$.getValue()!==e){await d.dispose(),l.dispose();return}this.activeSession$.next(d),this.activeSignals$.next(l)})();this.activating=r,this.sessionActivating$.next(!0);try{await r}finally{this.activating===r&&(this.activating=null,this.sessionActivating$.next(!1))}}async signIn(e,t,n){if(!this.disposed){if(em(this.storage,e,{access:t,refresh:n}),this.activeKbId$.getValue()===e){const r=this.activeSession$.getValue(),i=this.activeSignals$.getValue();this.activeSession$.next(null),this.activeSignals$.next(null),r&&await r.dispose(),i==null||i.dispose(),await this.setActiveKb(e);return}await this.setActiveKb(e)}}async signOut(e){if(!this.disposed&&(Mu(this.storage,e),this.kbs$.next([...this.kbs$.getValue()]),this.activeKbId$.getValue()===e)){const t=this.activeSession$.getValue(),n=this.activeSignals$.getValue();this.activeSession$.next(null),this.activeSignals$.next(null),t&&await t.dispose(),n==null||n.dispose()}}addOpenResource(e,t,n,r){const i=this.openResources$.getValue(),a=i.findIndex(l=>l.id===e);if(a>=0){const c={...i[a],name:t,...n!==void 0?{mediaType:n}:{},...r!==void 0?{storageUri:r}:{}},d=[...i];d[a]=c,this.openResources$.next(d);return}const s={id:e,name:t,openedAt:Date.now(),order:i.length,...n!==void 0?{mediaType:n}:{},...r!==void 0?{storageUri:r}:{}};this.openResources$.next([...i,s])}removeOpenResource(e){this.openResources$.next(this.openResources$.getValue().filter(t=>t.id!==e))}updateOpenResourceName(e,t){this.openResources$.next(this.openResources$.getValue().map(n=>n.id===e?{...n,name:t}:n))}reorderOpenResources(e,t){const n=[...this.openResources$.getValue()];if(e<0||e>=n.length||t<0||t>=n.length)return;const[r]=n.splice(e,1);r&&n.splice(t,0,r),this.openResources$.next(n)}async performRefresh(e){const t=this.inFlightRefreshes.get(e.id);if(t)return t;const n=(async()=>{const r=_m(this.storage,e.id);if(!r)return null;const i=new jo({baseUrl:vO(e)}),a=new Ru(i,new To(i));try{const l=(await a.auth.refresh(r.refresh)).access_token;return l?(em(this.storage,e.id,{access:l,refresh:r.refresh}),l):null}catch{return null}finally{a.dispose()}})();this.inFlightRefreshes.set(e.id,n);try{return await n}finally{this.inFlightRefreshes.delete(e.id)}}async performValidate(e,t){const n=new Te(t),r=new jo({baseUrl:vO(e),token$:n}),i=new Ru(r,new To(r));try{return await i.auth.me()}finally{i.dispose(),n.complete()}}async dispose(){var n;if(this.disposed)return;this.disposed=!0,(n=this.unregisterNotify)==null||n.call(this),this.unregisterNotify=null,this.unsubscribeStorage&&(this.unsubscribeStorage(),this.unsubscribeStorage=null);const e=this.activeSession$.getValue(),t=this.activeSignals$.getValue();this.activeSession$.next(null),this.activeSignals$.next(null),e&&await e.dispose(),t==null||t.dispose(),this.kbs$.complete(),this.activeKbId$.complete(),this.activeSession$.complete(),this.activeSignals$.complete(),this.openResources$.complete(),this.error$.complete(),this.identityToken$.complete(),this.eventBus.destroy()}},OO=null;function gX(e){return OO||(OO=new pX({storage:e.storage})),OO}function $s(){const e=new ac;return{add:t=>e.add(typeof t=="function"?t:()=>t.dispose()),dispose:()=>e.unsubscribe()}}function cQ(e,t={}){const n=t.debounceMs??250,r=t.initialQuery??"",i=new Ls,a=i.pipe(iO(r)),s=i.pipe(iO(r),T$(n),AA(),Q$(l=>{const c=l.trim();return c?e(c).pipe(ln(d=>({results:d??[],isSearching:d===void 0})),iO({results:[],isSearching:!0})):x$({results:[],isSearching:!1})}));return{query$:a,state$:s,setQuery:l=>i.next(l),dispose:()=>i.complete()}}function vX(e){const t=[],n=new Te(null);return t.push(e.bus.get("beckon:hover").subscribe(({annotationId:r})=>{n.next(r),r&&e.bus.get("beckon:sparkle").next({annotationId:r})})),t.push(e.bus.get("browse:click").subscribe(({annotationId:r})=>{e.bus.get("beckon:focus").next({annotationId:r})})),{hoveredAnnotationId$:n.asObservable(),hover:r=>e.bus.get("beckon:hover").next({annotationId:r}),focus:r=>e.bus.get("beckon:focus").next({annotationId:r}),sparkle:r=>e.bus.get("beckon:sparkle").next({annotationId:r}),dispose(){t.forEach(r=>r.unsubscribe()),n.complete()}}}var Fb=150;function H0(e,t){let n=null,r=null;const i=()=>{r!==null&&(clearTimeout(r),r=null)};return{handleMouseEnter:l=>{n!==l&&(i(),r=setTimeout(()=>{r=null,n=l,e(l)},t))},handleMouseLeave:()=>{i(),n!==null&&(n=null,e(null))},cleanup:i}}var ea=["knowledge-base","user","settings"],OX={linking:"reference",commenting:"comment",tagging:"tag",highlighting:"highlight",assessing:"assessment"},bX=0;function yX(e,t){const n=[],r=new Te((t==null?void 0:t.initialPanel)??null),i=new Te(null),a=new Te(null);if(t!=null&&t.onPanelChange){const s=t.onPanelChange;n.push(r.subscribe(s))}return n.push(e.stream("panel:toggle").subscribe(({panel:s})=>{const l=r.getValue();r.next(l===s?null:s)})),n.push(e.stream("panel:open").subscribe(({panel:s,scrollToAnnotationId:l,motivation:c})=>{if(l&&i.next(l),c){const d=OX[c]||"highlight";a.next({tab:d,generation:++bX})}r.next(s)})),n.push(e.stream("panel:close").subscribe(()=>{r.next(null)})),{activePanel$:r.asObservable(),scrollToAnnotationId$:i.asObservable(),panelInitialTab$:a.asObservable(),openPanel:s=>e.emit("panel:open",{panel:s}),closePanel:()=>e.emit("panel:close",void 0),togglePanel:s=>e.emit("panel:toggle",{panel:s}),onScrollCompleted:()=>i.next(null),dispose(){n.forEach(s=>s.unsubscribe()),r.complete(),i.complete(),a.complete()}}}function xX(e,t){const n=[],r=new Te(null),i=new Te(!1),a=new Te(null),s=new Te(null);return n.push(e.bus.get("gather:requested").subscribe(l=>{var d;i.next(!0),a.next(null),r.next(null),s.next(Bn(l.annotationId));const c=e.gather.annotation(Bn(l.annotationId),t,{contextWindow:((d=l.options)==null?void 0:d.contextWindow)??2e3}).pipe(Pd(6e4)).subscribe({next:f=>{"response"in f&&f.response&&(r.next(f.response.context??null),i.next(!1))},error:f=>{a.next(f instanceof Error?f:new Error(String(f))),i.next(!1)},complete:()=>{i.next(!1)}});n.push(c)})),{context$:r.asObservable(),loading$:i.asObservable(),error$:a.asObservable(),annotationId$:s.asObservable(),dispose(){n.forEach(l=>l.unsubscribe()),r.complete(),i.complete(),a.complete(),s.complete()}}}function SX(e,t){const n=[];return n.push(e.bus.get("match:search-requested").subscribe(r=>{const i=e.match.search(ki(r.resourceId),Bn(r.referenceId),r.context,{limit:r.limit,useSemanticScoring:r.useSemanticScoring}).pipe(Pd(6e4)).subscribe({next:a=>e.bus.get("match:search-results").next(a),error:a=>e.bus.get("match:search-failed").next({correlationId:r.correlationId,referenceId:r.referenceId,error:a instanceof Error?a.message:String(a)})});n.push(i)})),{dispose(){n.forEach(r=>r.unsubscribe())}}}function wX(e,t,n){const r=[],i=new Te(!1),a=new Te(null);let s=null;const l=(c,d)=>{const f=e.yield.fromAnnotation(ki(t),Bn(c),{...d,language:d.language||n}).pipe(Pd({each:3e5})).subscribe({next:m=>{m.kind==="progress"&&(a.next(m.data),i.next(!0))},complete:()=>{i.next(!1),s&&clearTimeout(s),s=setTimeout(()=>{a.next(null),s=null},2e3)},error:()=>{a.next(null),i.next(!1)}});r.push(f)};return{isGenerating$:i.asObservable(),progress$:a.asObservable(),generate:l,dispose(){r.forEach(c=>c.unsubscribe()),s&&clearTimeout(s),i.complete(),a.complete()}}}function bh(e){if(e.svgSelector)return{type:"SvgSelector",value:e.svgSelector};if(e.fragmentSelector){const t=[{type:"FragmentSelector",value:e.fragmentSelector,...e.conformsTo&&{conformsTo:e.conformsTo}}];return e.exact&&t.push({type:"TextQuoteSelector",exact:e.exact,...e.prefix&&{prefix:e.prefix},...e.suffix&&{suffix:e.suffix}}),t}return{type:"TextQuoteSelector",exact:e.exact,...e.prefix&&{prefix:e.prefix},...e.suffix&&{suffix:e.suffix}}}function _X(e,t){const n=[],r=new Te(null),i=new Te(null),a=new Te(null);let s=null;const l=()=>{s&&(clearTimeout(s),s=null)},c=d=>{r.next(d)};return n.push(e.bus.get("mark:requested").subscribe(c)),n.push(e.bus.get("mark:select-comment").subscribe(d=>c({selector:bh(d),motivation:"commenting"}))),n.push(e.bus.get("mark:select-tag").subscribe(d=>c({selector:bh(d),motivation:"tagging"}))),n.push(e.bus.get("mark:select-assessment").subscribe(d=>c({selector:bh(d),motivation:"assessing"}))),n.push(e.bus.get("mark:select-reference").subscribe(d=>c({selector:bh(d),motivation:"linking"}))),n.push(e.bus.get("mark:cancel-pending").subscribe(()=>r.next(null))),n.push(e.bus.get("mark:create-ok").subscribe(()=>r.next(null))),n.push(e.bus.get("mark:submit").subscribe(async d=>{try{const f=await e.mark.annotation(t,{motivation:d.motivation,target:{source:t,selector:d.selector},body:d.body});e.bus.get("mark:create-ok").next({annotationId:f.annotationId})}catch(f){e.bus.get("mark:create-failed").next({message:f instanceof Error?f.message:String(f)})}})),n.push(e.bus.get("mark:delete").subscribe(async d=>{try{await e.mark.delete(t,d.annotationId),e.bus.get("mark:delete-ok").next({annotationId:d.annotationId})}catch(f){e.bus.get("mark:delete-failed").next({message:f instanceof Error?f.message:String(f)})}})),n.push(e.bus.get("mark:assist-request").subscribe(d=>{l(),i.next(d.motivation),a.next(null);const f=e.mark.assist(t,d.motivation,d.options).pipe(Pd({each:18e4})).subscribe({next:m=>{m.kind==="progress"&&a.next(m.data)},complete:()=>{i.next(null),l(),s=setTimeout(()=>{a.next(null),s=null},5e3)},error:()=>{l(),i.next(null),a.next(null)}});n.push(f)})),n.push(e.bus.get("mark:progress-dismiss").subscribe(()=>{l(),a.next(null)})),{pendingAnnotation$:r.asObservable(),assistingMotivation$:i.asObservable(),progress$:a.asObservable(),dispose(){n.forEach(d=>d.unsubscribe()),l(),r.complete(),i.complete(),a.complete()}}}var kX=10,jX=20;function Nae(e,t){const n=$s(),r=cQ(c=>e.browse.resources({search:c,limit:jX}));n.add(r),n.add(t);const i=e.browse.resources({limit:kX,archived:!1}),a=i.pipe(ln(c=>c??[])),s=i.pipe(ln(c=>c===void 0)),l=e.browse.entityTypes().pipe(ln(c=>c??[]));return{browse:t,search:r,recentResources$:a,entityTypes$:l,isLoadingRecent$:s,dispose:()=>n.dispose()}}function Rae(e,t){const n=$s();n.add(t);const r=new Te(""),i=new Te(""),a=new Te(!1),s=e.browse.entityTypes(),l=s.pipe(ln(f=>f??[])),c=s.pipe(ln(f=>f===void 0)),d=async()=>{const f=r.getValue().trim();if(f){i.next(""),a.next(!0);try{await e.mark.entityType(f),r.next("")}catch(m){i.next(m instanceof Error?m.message:"Failed to add entity type")}finally{a.next(!1)}}};return{browse:t,entityTypes$:l,isLoading$:c,newTag$:r.asObservable(),error$:i.asObservable(),isAdding$:a.asObservable(),setNewTag:f=>r.next(f),addTag:d,dispose:()=>{r.complete(),i.complete(),a.complete(),n.dispose()}}}function Mae(e,t,n){const r=$s();r.add(e);const i=new Te(null),a=new Te(null),s=new Te(null),l=new Te(void 0),c=new Te(void 0),d=new Te(!1),f=new Te(!1),m=x=>{i.next(x),s.next(null),l.next(void 0),c.next(void 0),a.next({format:x.name.endsWith(".tar.gz")||x.name.endsWith(".gz")?"semiont-linked-data":"unknown",version:1,sourceUrl:"",stats:{}})},p=()=>{i.next(null),a.next(null),s.next(null),l.next(void 0),c.next(void 0)},O=async()=>{var x;d.next(!0);try{const w=await t();if(!w.ok)throw new Error(`Export failed: ${w.status} ${w.statusText}`);const k=await w.blob(),T=w.headers.get("Content-Disposition"),j=((x=T==null?void 0:T.match(/filename="(.+?)"/))==null?void 0:x[1])??`semiont-export-${Date.now()}.tar.gz`;return{blob:k,filename:j}}finally{d.next(!1)}},b=async()=>{const x=i.getValue();if(x){f.next(!0),s.next("started"),l.next(void 0),c.next(void 0);try{await n(x,{onProgress:w=>{s.next(w.phase),l.next(w.message),w.result&&c.next(w.result)}})}finally{f.next(!1)}}};return{browse:e,selectedFile$:i.asObservable(),preview$:a.asObservable(),importPhase$:s.asObservable(),importMessage$:l.asObservable(),importResult$:c.asObservable(),isExporting$:d.asObservable(),isImporting$:f.asObservable(),selectFile:m,cancelImport:p,doExport:O,doImport:b,dispose:()=>{i.complete(),a.complete(),s.complete(),l.complete(),c.complete(),d.complete(),f.complete(),r.dispose()}}}function Dae(e,t){const n=$s();n.add(t);const r=new Te([]),i=new Te(null),a=new Te(!0),s=new Te(!0),l=()=>{a.next(!0),e.admin.users().then(f=>{r.next(f.users??[]),a.next(!1)}).catch(()=>a.next(!1))},c=()=>{s.next(!0),e.admin.userStats().then(f=>{i.next(f.stats??null),s.next(!1)}).catch(()=>s.next(!1))};l(),c();const d=async(f,m)=>{await e.admin.updateUser(f,m),l(),c()};return{browse:t,users$:r.asObservable(),stats$:i.asObservable(),usersLoading$:a.asObservable(),statsLoading$:s.asObservable(),updateUser:d,dispose:()=>{r.complete(),i.complete(),a.complete(),s.complete(),n.dispose()}}}function Lae(e,t){const n=$s();n.add(t);const r=new Te([]),i=new Te([]),a=new Te(!0);return e.admin.oauthConfig().then(s=>{const l=s;r.next(l.providers??[]),i.next(l.allowedDomains??[]),a.next(!1)}).catch(()=>a.next(!1)),{browse:t,providers$:r.asObservable(),allowedDomains$:i.asObservable(),isLoading$:a.asObservable(),dispose:()=>{r.complete(),i.complete(),a.complete(),n.dispose()}}}function zae(e){const t=$s(),n=new Te(null),r=new Te(!1);e.auth.me().then(a=>n.next(a)).catch(()=>{});const i=async()=>{r.next(!0);try{await e.auth.acceptTerms(),n.next({...n.getValue(),termsAcceptedAt:new Date().toISOString()})}finally{r.next(!1)}};return{userData$:n.asObservable(),isProcessing$:r.asObservable(),acceptTerms:i,dispose:()=>{n.complete(),r.complete(),t.dispose()}}}function $ae(e,t){const n=e.browse.resource(t),r=n,i=n.pipe(ln(a=>a===void 0));return{resource$:r,isLoading$:i,invalidate:()=>e.browse.invalidateResourceDetail(t),dispose:()=>{}}}function Iae(e){const t=new Te(!1),n=async()=>{t.next(!0);try{await e.auth.logout()}catch{}finally{t.next(!1)}};return{isLoggingOut$:t.asObservable(),logout:n,dispose:()=>{t.complete()}}}var Hk={open:!1,annotationId:null,resourceId:null,defaultTitle:"",entityTypes:[]};function TX(e,t,n,r,i){const a=$s(),s=vX(e),l=_X(e,t),c=xX(e,t),d=SX(e),f=wX(e,t,n);a.add(s),a.add(r),a.add(l),a.add(c),a.add(d),a.add(f);const m=e.browse.annotations(t).pipe(ln(D=>D??[])),p=m.pipe(ln(D=>{const L={highlights:[],comments:[],assessments:[],references:[],tags:[]};for(const A of D)Mo(A)?L.highlights.push(A):zs(A)?L.comments.push(A):sc(A)?L.assessments.push(A):li(A)?L.references.push(A):Do(A)&&L.tags.push(A);return L})),O=e.browse.entityTypes().pipe(ln(D=>D??[])),b=e.browse.events(t).pipe(ln(D=>D??[])),x=e.browse.referencedBy(t).pipe(ln(D=>D??[])),w=new Te(""),k=new Te(!1),T=new Te(null),j="text/plain",E=j.startsWith("image/")||j==="application/pdf";!E&&j&&(k.next(!0),e.browse.resourceRepresentation(t,{accept:j}).then(({data:D})=>{w.next($0(D,j)),k.next(!1)}).catch(()=>{k.next(!1)})),E&&e.auth.mediaToken(t).then(({token:D})=>T.next(D)).catch(()=>{});const Q=new Te(Hk),P=e.subscribeToResource(t);a.add(P);const N=e.bus.get("bind:initiate").subscribe(D=>{Q.next({open:!0,annotationId:D.annotationId,resourceId:D.resourceId,defaultTitle:D.defaultTitle,entityTypes:D.entityTypes}),e.bus.get("gather:requested").next({correlationId:crypto.randomUUID(),annotationId:D.annotationId,resourceId:D.resourceId,options:{contextWindow:2e3}})});return a.add(()=>N.unsubscribe()),{beckon:s,browse:r,mark:l,gather:c,yield:f,annotations$:m,annotationGroups$:p,entityTypes$:O,events$:b,referencedBy$:x,content$:w.asObservable(),contentLoading$:k.asObservable(),mediaToken$:T.asObservable(),wizard$:Q.asObservable(),closeWizard:()=>Q.next(Hk),dispose:()=>{Q.complete(),w.complete(),k.complete(),T.complete(),a.dispose()}}}function qae(e,t,n,r){const i=$s();i.add(t);const a=!!(n.annotationUri&&n.sourceDocumentId&&n.name),s=n.mode==="clone"&&!!n.token,l=s?"clone":a?"reference":"new",c=new Te(l),d=new Te(!0),f=new Te(null),m=new Te(null),p=new Te(null),O=e.browse.entityTypes().pipe(ln(x=>x??[]));if(a){const x=n.entityTypes?n.entityTypes.split(","):[];if(m.next({annotationUri:n.annotationUri,sourceDocumentId:n.sourceDocumentId,name:n.name,entityTypes:x}),n.storedContext)try{p.next(JSON.parse(n.storedContext))}catch{}d.next(!1)}else s?(async()=>{try{const x=await e.yield.fromToken(n.token);if(x&&r){const w=ki(x["@id"]),k=xm(x)||"text/plain",{data:T}=await e.browse.resourceRepresentation(w,{accept:k}),j=$0(T,k);f.next({sourceResource:x,sourceContent:j})}}catch{}d.next(!1)})():d.next(!1);const b=async x=>{if(x.mode==="clone")return(await e.yield.createFromToken({token:n.token,name:x.name,content:x.content,archiveOriginal:x.archiveOriginal??!0})).resourceId;let w,k;if(x.file)w=x.file,k=x.format??"application/octet-stream";else{const Q=new Blob([x.content||""],{type:x.format??"application/octet-stream"}),P=x.format==="text/plain"?".txt":x.format==="text/html"?".html":".md";w=new File([Q],x.name+P,{type:x.format??"application/octet-stream"}),k=x.format??"application/octet-stream"}const T=x.charset&&!x.file?`${k}; charset=${x.charset}`:k,E=(await e.yield.resource({name:x.name,file:w,format:T,entityTypes:x.entityTypes||[],language:x.language,creationMethod:"ui",storageUri:x.storageUri})).resourceId;return x.mode==="reference"&&x.annotationUri&&x.sourceDocumentId&&await e.bind.body(ki(x.sourceDocumentId),Bn(x.annotationUri),[{op:"add",item:{type:"SpecificResource",source:E,purpose:"linking"}}]),E};return{browse:t,mode$:c.asObservable(),loading$:d.asObservable(),cloneData$:f.asObservable(),referenceData$:m.asObservable(),gatheredContext$:p.asObservable(),entityTypes$:O,save:b,dispose:()=>{c.complete(),d.complete(),f.complete(),m.complete(),p.complete(),i.dispose()}}}var zo=F({"../../node_modules/rxjs/dist/cjs/internal/util/createErrorClass.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createErrorClass=void 0;function t(n){var r=function(a){Error.call(a),a.stack=new Error().stack},i=n(r);return i.prototype=Object.create(Error.prototype),i.prototype.constructor=i,i}e.createErrorClass=t}}),CX=F({"../../node_modules/rxjs/dist/cjs/internal/util/UnsubscriptionError.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.UnsubscriptionError=void 0;var t=zo();e.UnsubscriptionError=t.createErrorClass(function(n){return function(i){n(this),this.message=i?i.length+` errors occurred during unsubscription:
|
|
39
|
-
`+i.map(function(a,s){return s+1+") "+a.toString()}).join(`
|
|
40
|
-
`):"",this.name="UnsubscriptionError",this.errors=i}})}}),Ut=F({"../../node_modules/rxjs/dist/cjs/internal/util/isFunction.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isFunction=void 0;function t(n){return typeof n=="function"}e.isFunction=t}}),Is=F({"../../node_modules/rxjs/dist/cjs/internal/util/arrRemove.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.arrRemove=void 0;function t(n,r){if(n){var i=n.indexOf(r);0<=i&&n.splice(i,1)}}e.arrRemove=t}}),Da=F({"../../node_modules/rxjs/dist/cjs/internal/Subscription.js"(e){var t=e&&e.__values||function(f){var m=typeof Symbol=="function"&&Symbol.iterator,p=m&&f[m],O=0;if(p)return p.call(f);if(f&&typeof f.length=="number")return{next:function(){return f&&O>=f.length&&(f=void 0),{value:f&&f[O++],done:!f}}};throw new TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")},n=e&&e.__read||function(f,m){var p=typeof Symbol=="function"&&f[Symbol.iterator];if(!p)return f;var O=p.call(f),b,x=[],w;try{for(;(m===void 0||m-- >0)&&!(b=O.next()).done;)x.push(b.value)}catch(k){w={error:k}}finally{try{b&&!b.done&&(p=O.return)&&p.call(O)}finally{if(w)throw w.error}}return x},r=e&&e.__spreadArray||function(f,m){for(var p=0,O=m.length,b=f.length;p<O;p++,b++)f[b]=m[p];return f};Object.defineProperty(e,"__esModule",{value:!0}),e.isSubscription=e.EMPTY_SUBSCRIPTION=e.Subscription=void 0;var i=Ut(),a=CX(),s=Is(),l=(function(){function f(m){this.initialTeardown=m,this.closed=!1,this._parentage=null,this._finalizers=null}return f.prototype.unsubscribe=function(){var m,p,O,b,x;if(!this.closed){this.closed=!0;var w=this._parentage;if(w)if(this._parentage=null,Array.isArray(w))try{for(var k=t(w),T=k.next();!T.done;T=k.next()){var j=T.value;j.remove(this)}}catch(L){m={error:L}}finally{try{T&&!T.done&&(p=k.return)&&p.call(k)}finally{if(m)throw m.error}}else w.remove(this);var E=this.initialTeardown;if(i.isFunction(E))try{E()}catch(L){x=L instanceof a.UnsubscriptionError?L.errors:[L]}var Q=this._finalizers;if(Q){this._finalizers=null;try{for(var P=t(Q),N=P.next();!N.done;N=P.next()){var D=N.value;try{d(D)}catch(L){x=x??[],L instanceof a.UnsubscriptionError?x=r(r([],n(x)),n(L.errors)):x.push(L)}}}catch(L){O={error:L}}finally{try{N&&!N.done&&(b=P.return)&&b.call(P)}finally{if(O)throw O.error}}}if(x)throw new a.UnsubscriptionError(x)}},f.prototype.add=function(m){var p;if(m&&m!==this)if(this.closed)d(m);else{if(m instanceof f){if(m.closed||m._hasParent(this))return;m._addParent(this)}(this._finalizers=(p=this._finalizers)!==null&&p!==void 0?p:[]).push(m)}},f.prototype._hasParent=function(m){var p=this._parentage;return p===m||Array.isArray(p)&&p.includes(m)},f.prototype._addParent=function(m){var p=this._parentage;this._parentage=Array.isArray(p)?(p.push(m),p):p?[p,m]:m},f.prototype._removeParent=function(m){var p=this._parentage;p===m?this._parentage=null:Array.isArray(p)&&s.arrRemove(p,m)},f.prototype.remove=function(m){var p=this._finalizers;p&&s.arrRemove(p,m),m instanceof f&&m._removeParent(this)},f.EMPTY=(function(){var m=new f;return m.closed=!0,m})(),f})();e.Subscription=l,e.EMPTY_SUBSCRIPTION=l.EMPTY;function c(f){return f instanceof l||f&&"closed"in f&&i.isFunction(f.remove)&&i.isFunction(f.add)&&i.isFunction(f.unsubscribe)}e.isSubscription=c;function d(f){i.isFunction(f)?f():f.unsubscribe()}}}),lp=F({"../../node_modules/rxjs/dist/cjs/internal/config.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.config=void 0,e.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}}}),Or=F({"../../node_modules/rxjs/dist/cjs/internal/util/noop.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.noop=void 0;function t(){}e.noop=t}}),uQ=F({"../../node_modules/rxjs/dist/cjs/internal/scheduler/timeoutProvider.js"(e){var t=e&&e.__read||function(r,i){var a=typeof Symbol=="function"&&r[Symbol.iterator];if(!a)return r;var s=a.call(r),l,c=[],d;try{for(;(i===void 0||i-- >0)&&!(l=s.next()).done;)c.push(l.value)}catch(f){d={error:f}}finally{try{l&&!l.done&&(a=s.return)&&a.call(s)}finally{if(d)throw d.error}}return c},n=e&&e.__spreadArray||function(r,i){for(var a=0,s=i.length,l=r.length;a<s;a++,l++)r[l]=i[a];return r};Object.defineProperty(e,"__esModule",{value:!0}),e.timeoutProvider=void 0,e.timeoutProvider={setTimeout:function(r,i){for(var a=[],s=2;s<arguments.length;s++)a[s-2]=arguments[s];var l=e.timeoutProvider.delegate;return l!=null&&l.setTimeout?l.setTimeout.apply(l,n([r,i],t(a))):setTimeout.apply(void 0,n([r,i],t(a)))},clearTimeout:function(r){var i=e.timeoutProvider.delegate;return((i==null?void 0:i.clearTimeout)||clearTimeout)(r)},delegate:void 0}}}),dQ=F({"../../node_modules/rxjs/dist/cjs/internal/util/reportUnhandledError.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.reportUnhandledError=void 0;var t=lp(),n=uQ();function r(i){n.timeoutProvider.setTimeout(function(){var a=t.config.onUnhandledError;if(a)a(i);else throw i})}e.reportUnhandledError=r}}),EX=F({"../../node_modules/rxjs/dist/cjs/internal/NotificationFactories.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createNotification=e.nextNotification=e.errorNotification=e.COMPLETE_NOTIFICATION=void 0,e.COMPLETE_NOTIFICATION=(function(){return r("C",void 0,void 0)})();function t(i){return r("E",void 0,i)}e.errorNotification=t;function n(i){return r("N",i,void 0)}e.nextNotification=n;function r(i,a,s){return{kind:i,value:a,error:s}}e.createNotification=r}}),G0=F({"../../node_modules/rxjs/dist/cjs/internal/util/errorContext.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.captureError=e.errorContext=void 0;var t=lp(),n=null;function r(a){if(t.config.useDeprecatedSynchronousErrorHandling){var s=!n;if(s&&(n={errorThrown:!1,error:null}),a(),s){var l=n,c=l.errorThrown,d=l.error;if(n=null,c)throw d}}else a()}e.errorContext=r;function i(a){t.config.useDeprecatedSynchronousErrorHandling&&n&&(n.errorThrown=!0,n.error=a)}e.captureError=i}}),K0=F({"../../node_modules/rxjs/dist/cjs/internal/Subscriber.js"(e){var t=e&&e.__extends||(function(){var T=function(j,E){return T=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Q,P){Q.__proto__=P}||function(Q,P){for(var N in P)Object.prototype.hasOwnProperty.call(P,N)&&(Q[N]=P[N])},T(j,E)};return function(j,E){if(typeof E!="function"&&E!==null)throw new TypeError("Class extends value "+String(E)+" is not a constructor or null");T(j,E);function Q(){this.constructor=j}j.prototype=E===null?Object.create(E):(Q.prototype=E.prototype,new Q)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.EMPTY_OBSERVER=e.SafeSubscriber=e.Subscriber=void 0;var n=Ut(),r=Da(),i=lp(),a=dQ(),s=Or(),l=EX(),c=uQ(),d=G0(),f=(function(T){t(j,T);function j(E){var Q=T.call(this)||this;return Q.isStopped=!1,E?(Q.destination=E,r.isSubscription(E)&&E.add(Q)):Q.destination=e.EMPTY_OBSERVER,Q}return j.create=function(E,Q,P){return new b(E,Q,P)},j.prototype.next=function(E){this.isStopped?k(l.nextNotification(E),this):this._next(E)},j.prototype.error=function(E){this.isStopped?k(l.errorNotification(E),this):(this.isStopped=!0,this._error(E))},j.prototype.complete=function(){this.isStopped?k(l.COMPLETE_NOTIFICATION,this):(this.isStopped=!0,this._complete())},j.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,T.prototype.unsubscribe.call(this),this.destination=null)},j.prototype._next=function(E){this.destination.next(E)},j.prototype._error=function(E){try{this.destination.error(E)}finally{this.unsubscribe()}},j.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},j})(r.Subscription);e.Subscriber=f;var m=Function.prototype.bind;function p(T,j){return m.call(T,j)}var O=(function(){function T(j){this.partialObserver=j}return T.prototype.next=function(j){var E=this.partialObserver;if(E.next)try{E.next(j)}catch(Q){x(Q)}},T.prototype.error=function(j){var E=this.partialObserver;if(E.error)try{E.error(j)}catch(Q){x(Q)}else x(j)},T.prototype.complete=function(){var j=this.partialObserver;if(j.complete)try{j.complete()}catch(E){x(E)}},T})(),b=(function(T){t(j,T);function j(E,Q,P){var N=T.call(this)||this,D;if(n.isFunction(E)||!E)D={next:E??void 0,error:Q??void 0,complete:P??void 0};else{var L;N&&i.config.useDeprecatedNextContext?(L=Object.create(E),L.unsubscribe=function(){return N.unsubscribe()},D={next:E.next&&p(E.next,L),error:E.error&&p(E.error,L),complete:E.complete&&p(E.complete,L)}):D=E}return N.destination=new O(D),N}return j})(f);e.SafeSubscriber=b;function x(T){i.config.useDeprecatedSynchronousErrorHandling?d.captureError(T):a.reportUnhandledError(T)}function w(T){throw T}function k(T,j){var E=i.config.onStoppedNotification;E&&c.timeoutProvider.setTimeout(function(){return E(T,j)})}e.EMPTY_OBSERVER={closed:!0,next:s.noop,error:w,complete:s.noop}}}),J0=F({"../../node_modules/rxjs/dist/cjs/internal/symbol/observable.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.observable=void 0,e.observable=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})()}}),br=F({"../../node_modules/rxjs/dist/cjs/internal/util/identity.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.identity=void 0;function t(n){return n}e.identity=t}}),ex=F({"../../node_modules/rxjs/dist/cjs/internal/util/pipe.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.pipeFromArray=e.pipe=void 0;var t=br();function n(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];return r(i)}e.pipe=n;function r(i){return i.length===0?t.identity:i.length===1?i[0]:function(s){return i.reduce(function(l,c){return c(l)},s)}}e.pipeFromArray=r}}),rr=F({"../../node_modules/rxjs/dist/cjs/internal/Observable.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Observable=void 0;var t=K0(),n=Da(),r=J0(),i=ex(),a=lp(),s=Ut(),l=G0(),c=(function(){function p(O){O&&(this._subscribe=O)}return p.prototype.lift=function(O){var b=new p;return b.source=this,b.operator=O,b},p.prototype.subscribe=function(O,b,x){var w=this,k=m(O)?O:new t.SafeSubscriber(O,b,x);return l.errorContext(function(){var T=w,j=T.operator,E=T.source;k.add(j?j.call(k,E):E?w._subscribe(k):w._trySubscribe(k))}),k},p.prototype._trySubscribe=function(O){try{return this._subscribe(O)}catch(b){O.error(b)}},p.prototype.forEach=function(O,b){var x=this;return b=d(b),new b(function(w,k){var T=new t.SafeSubscriber({next:function(j){try{O(j)}catch(E){k(E),T.unsubscribe()}},error:k,complete:w});x.subscribe(T)})},p.prototype._subscribe=function(O){var b;return(b=this.source)===null||b===void 0?void 0:b.subscribe(O)},p.prototype[r.observable]=function(){return this},p.prototype.pipe=function(){for(var O=[],b=0;b<arguments.length;b++)O[b]=arguments[b];return i.pipeFromArray(O)(this)},p.prototype.toPromise=function(O){var b=this;return O=d(O),new O(function(x,w){var k;b.subscribe(function(T){return k=T},function(T){return w(T)},function(){return x(k)})})},p.create=function(O){return new p(O)},p})();e.Observable=c;function d(p){var O;return(O=p??a.config.Promise)!==null&&O!==void 0?O:Promise}function f(p){return p&&s.isFunction(p.next)&&s.isFunction(p.error)&&s.isFunction(p.complete)}function m(p){return p&&p instanceof t.Subscriber||f(p)&&n.isSubscription(p)}}}),xe=F({"../../node_modules/rxjs/dist/cjs/internal/util/lift.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.operate=e.hasLift=void 0;var t=Ut();function n(i){return t.isFunction(i==null?void 0:i.lift)}e.hasLift=n;function r(i){return function(a){if(n(a))return a.lift(function(s){try{return i(s,this)}catch(l){this.error(l)}});throw new TypeError("Unable to lift unknown Observable type")}}e.operate=r}}),fQ=F({"../../node_modules/rxjs/dist/cjs/internal/util/isArrayLike.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isArrayLike=void 0,e.isArrayLike=(function(t){return t&&typeof t.length=="number"&&typeof t!="function"})}}),hQ=F({"../../node_modules/rxjs/dist/cjs/internal/util/isPromise.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isPromise=void 0;var t=Ut();function n(r){return t.isFunction(r==null?void 0:r.then)}e.isPromise=n}}),mQ=F({"../../node_modules/rxjs/dist/cjs/internal/util/isInteropObservable.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isInteropObservable=void 0;var t=J0(),n=Ut();function r(i){return n.isFunction(i[t.observable])}e.isInteropObservable=r}}),pQ=F({"../../node_modules/rxjs/dist/cjs/internal/util/isAsyncIterable.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isAsyncIterable=void 0;var t=Ut();function n(r){return Symbol.asyncIterator&&t.isFunction(r==null?void 0:r[Symbol.asyncIterator])}e.isAsyncIterable=n}}),gQ=F({"../../node_modules/rxjs/dist/cjs/internal/util/throwUnobservableError.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createInvalidObservableTypeError=void 0;function t(n){return new TypeError("You provided "+(n!==null&&typeof n=="object"?"an invalid object":"'"+n+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}e.createInvalidObservableTypeError=t}}),vQ=F({"../../node_modules/rxjs/dist/cjs/internal/symbol/iterator.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.iterator=e.getSymbolIterator=void 0;function t(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}e.getSymbolIterator=t,e.iterator=t()}}),OQ=F({"../../node_modules/rxjs/dist/cjs/internal/util/isIterable.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isIterable=void 0;var t=vQ(),n=Ut();function r(i){return n.isFunction(i==null?void 0:i[t.iterator])}e.isIterable=r}}),tx=F({"../../node_modules/rxjs/dist/cjs/internal/util/isReadableStreamLike.js"(e){var t=e&&e.__generator||function(l,c){var d={label:0,sent:function(){if(p[0]&1)throw p[1];return p[1]},trys:[],ops:[]},f,m,p,O;return O={next:b(0),throw:b(1),return:b(2)},typeof Symbol=="function"&&(O[Symbol.iterator]=function(){return this}),O;function b(w){return function(k){return x([w,k])}}function x(w){if(f)throw new TypeError("Generator is already executing.");for(;d;)try{if(f=1,m&&(p=w[0]&2?m.return:w[0]?m.throw||((p=m.return)&&p.call(m),0):m.next)&&!(p=p.call(m,w[1])).done)return p;switch(m=0,p&&(w=[w[0]&2,p.value]),w[0]){case 0:case 1:p=w;break;case 4:return d.label++,{value:w[1],done:!1};case 5:d.label++,m=w[1],w=[0];continue;case 7:w=d.ops.pop(),d.trys.pop();continue;default:if(p=d.trys,!(p=p.length>0&&p[p.length-1])&&(w[0]===6||w[0]===2)){d=0;continue}if(w[0]===3&&(!p||w[1]>p[0]&&w[1]<p[3])){d.label=w[1];break}if(w[0]===6&&d.label<p[1]){d.label=p[1],p=w;break}if(p&&d.label<p[2]){d.label=p[2],d.ops.push(w);break}p[2]&&d.ops.pop(),d.trys.pop();continue}w=c.call(l,d)}catch(k){w=[6,k],m=0}finally{f=p=0}if(w[0]&5)throw w[1];return{value:w[0]?w[1]:void 0,done:!0}}},n=e&&e.__await||function(l){return this instanceof n?(this.v=l,this):new n(l)},r=e&&e.__asyncGenerator||function(l,c,d){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var f=d.apply(l,c||[]),m,p=[];return m={},O("next"),O("throw"),O("return"),m[Symbol.asyncIterator]=function(){return this},m;function O(j){f[j]&&(m[j]=function(E){return new Promise(function(Q,P){p.push([j,E,Q,P])>1||b(j,E)})})}function b(j,E){try{x(f[j](E))}catch(Q){T(p[0][3],Q)}}function x(j){j.value instanceof n?Promise.resolve(j.value.v).then(w,k):T(p[0][2],j)}function w(j){b("next",j)}function k(j){b("throw",j)}function T(j,E){j(E),p.shift(),p.length&&b(p[0][0],p[0][1])}};Object.defineProperty(e,"__esModule",{value:!0}),e.isReadableStreamLike=e.readableStreamLikeToAsyncGenerator=void 0;var i=Ut();function a(l){return r(this,arguments,function(){var d,f,m,p;return t(this,function(O){switch(O.label){case 0:d=l.getReader(),O.label=1;case 1:O.trys.push([1,,9,10]),O.label=2;case 2:return[4,n(d.read())];case 3:return f=O.sent(),m=f.value,p=f.done,p?[4,n(void 0)]:[3,5];case 4:return[2,O.sent()];case 5:return[4,n(m)];case 6:return[4,O.sent()];case 7:return O.sent(),[3,2];case 8:return[3,10];case 9:return d.releaseLock(),[7];case 10:return[2]}})})}e.readableStreamLikeToAsyncGenerator=a;function s(l){return i.isFunction(l==null?void 0:l.getReader)}e.isReadableStreamLike=s}}),ft=F({"../../node_modules/rxjs/dist/cjs/internal/observable/innerFrom.js"(e){var t=e&&e.__awaiter||function(D,L,A,X){function Z(V){return V instanceof A?V:new A(function($){$(V)})}return new(A||(A=Promise))(function(V,$){function W(ee){try{z(X.next(ee))}catch(le){$(le)}}function I(ee){try{z(X.throw(ee))}catch(le){$(le)}}function z(ee){ee.done?V(ee.value):Z(ee.value).then(W,I)}z((X=X.apply(D,L||[])).next())})},n=e&&e.__generator||function(D,L){var A={label:0,sent:function(){if(V[0]&1)throw V[1];return V[1]},trys:[],ops:[]},X,Z,V,$;return $={next:W(0),throw:W(1),return:W(2)},typeof Symbol=="function"&&($[Symbol.iterator]=function(){return this}),$;function W(z){return function(ee){return I([z,ee])}}function I(z){if(X)throw new TypeError("Generator is already executing.");for(;A;)try{if(X=1,Z&&(V=z[0]&2?Z.return:z[0]?Z.throw||((V=Z.return)&&V.call(Z),0):Z.next)&&!(V=V.call(Z,z[1])).done)return V;switch(Z=0,V&&(z=[z[0]&2,V.value]),z[0]){case 0:case 1:V=z;break;case 4:return A.label++,{value:z[1],done:!1};case 5:A.label++,Z=z[1],z=[0];continue;case 7:z=A.ops.pop(),A.trys.pop();continue;default:if(V=A.trys,!(V=V.length>0&&V[V.length-1])&&(z[0]===6||z[0]===2)){A=0;continue}if(z[0]===3&&(!V||z[1]>V[0]&&z[1]<V[3])){A.label=z[1];break}if(z[0]===6&&A.label<V[1]){A.label=V[1],V=z;break}if(V&&A.label<V[2]){A.label=V[2],A.ops.push(z);break}V[2]&&A.ops.pop(),A.trys.pop();continue}z=L.call(D,A)}catch(ee){z=[6,ee],Z=0}finally{X=V=0}if(z[0]&5)throw z[1];return{value:z[0]?z[1]:void 0,done:!0}}},r=e&&e.__asyncValues||function(D){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var L=D[Symbol.asyncIterator],A;return L?L.call(D):(D=typeof i=="function"?i(D):D[Symbol.iterator](),A={},X("next"),X("throw"),X("return"),A[Symbol.asyncIterator]=function(){return this},A);function X(V){A[V]=D[V]&&function($){return new Promise(function(W,I){$=D[V]($),Z(W,I,$.done,$.value)})}}function Z(V,$,W,I){Promise.resolve(I).then(function(z){V({value:z,done:W})},$)}},i=e&&e.__values||function(D){var L=typeof Symbol=="function"&&Symbol.iterator,A=L&&D[L],X=0;if(A)return A.call(D);if(D&&typeof D.length=="number")return{next:function(){return D&&X>=D.length&&(D=void 0),{value:D&&D[X++],done:!D}}};throw new TypeError(L?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.fromReadableStreamLike=e.fromAsyncIterable=e.fromIterable=e.fromPromise=e.fromArrayLike=e.fromInteropObservable=e.innerFrom=void 0;var a=fQ(),s=hQ(),l=rr(),c=mQ(),d=pQ(),f=gQ(),m=OQ(),p=tx(),O=Ut(),b=dQ(),x=J0();function w(D){if(D instanceof l.Observable)return D;if(D!=null){if(c.isInteropObservable(D))return k(D);if(a.isArrayLike(D))return T(D);if(s.isPromise(D))return j(D);if(d.isAsyncIterable(D))return Q(D);if(m.isIterable(D))return E(D);if(p.isReadableStreamLike(D))return P(D)}throw f.createInvalidObservableTypeError(D)}e.innerFrom=w;function k(D){return new l.Observable(function(L){var A=D[x.observable]();if(O.isFunction(A.subscribe))return A.subscribe(L);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}e.fromInteropObservable=k;function T(D){return new l.Observable(function(L){for(var A=0;A<D.length&&!L.closed;A++)L.next(D[A]);L.complete()})}e.fromArrayLike=T;function j(D){return new l.Observable(function(L){D.then(function(A){L.closed||(L.next(A),L.complete())},function(A){return L.error(A)}).then(null,b.reportUnhandledError)})}e.fromPromise=j;function E(D){return new l.Observable(function(L){var A,X;try{for(var Z=i(D),V=Z.next();!V.done;V=Z.next()){var $=V.value;if(L.next($),L.closed)return}}catch(W){A={error:W}}finally{try{V&&!V.done&&(X=Z.return)&&X.call(Z)}finally{if(A)throw A.error}}L.complete()})}e.fromIterable=E;function Q(D){return new l.Observable(function(L){N(D,L).catch(function(A){return L.error(A)})})}e.fromAsyncIterable=Q;function P(D){return Q(p.readableStreamLikeToAsyncGenerator(D))}e.fromReadableStreamLike=P;function N(D,L){var A,X,Z,V;return t(this,void 0,void 0,function(){var $,W;return n(this,function(I){switch(I.label){case 0:I.trys.push([0,5,6,11]),A=r(D),I.label=1;case 1:return[4,A.next()];case 2:if(X=I.sent(),!!X.done)return[3,4];if($=X.value,L.next($),L.closed)return[2];I.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return W=I.sent(),Z={error:W},[3,11];case 6:return I.trys.push([6,,9,10]),X&&!X.done&&(V=A.return)?[4,V.call(A)]:[3,8];case 7:I.sent(),I.label=8;case 8:return[3,10];case 9:if(Z)throw Z.error;return[7];case 10:return[7];case 11:return L.complete(),[2]}})})}}}),Me=F({"../../node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js"(e){var t=e&&e.__extends||(function(){var a=function(s,l){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,d){c.__proto__=d}||function(c,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(c[f]=d[f])},a(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");a(s,l);function c(){this.constructor=s}s.prototype=l===null?Object.create(l):(c.prototype=l.prototype,new c)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.OperatorSubscriber=e.createOperatorSubscriber=void 0;var n=K0();function r(a,s,l,c,d){return new i(a,s,l,c,d)}e.createOperatorSubscriber=r;var i=(function(a){t(s,a);function s(l,c,d,f,m,p){var O=a.call(this,l)||this;return O.onFinalize=m,O.shouldUnsubscribe=p,O._next=c?function(b){try{c(b)}catch(x){l.error(x)}}:a.prototype._next,O._error=f?function(b){try{f(b)}catch(x){l.error(x)}finally{this.unsubscribe()}}:a.prototype._error,O._complete=d?function(){try{d()}catch(b){l.error(b)}finally{this.unsubscribe()}}:a.prototype._complete,O}return s.prototype.unsubscribe=function(){var l;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var c=this.closed;a.prototype.unsubscribe.call(this),!c&&((l=this.onFinalize)===null||l===void 0||l.call(this))}},s})(n.Subscriber);e.OperatorSubscriber=i}}),bQ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/audit.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.audit=void 0;var t=xe(),n=ft(),r=Me();function i(a){return t.operate(function(s,l){var c=!1,d=null,f=null,m=!1,p=function(){if(f==null||f.unsubscribe(),f=null,c){c=!1;var b=d;d=null,l.next(b)}m&&l.complete()},O=function(){f=null,m&&l.complete()};s.subscribe(r.createOperatorSubscriber(l,function(b){c=!0,d=b,f||n.innerFrom(a(b)).subscribe(f=r.createOperatorSubscriber(l,p,O))},function(){m=!0,(!c||!f||f.closed)&&l.complete()}))})}e.audit=i}}),nx=F({"../../node_modules/rxjs/dist/cjs/internal/scheduler/dateTimestampProvider.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.dateTimestampProvider=void 0,e.dateTimestampProvider={now:function(){return(e.dateTimestampProvider.delegate||Date).now()},delegate:void 0}}}),AX=F({"../../node_modules/rxjs/dist/cjs/internal/Scheduler.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Scheduler=void 0;var t=nx(),n=(function(){function r(i,a){a===void 0&&(a=r.now),this.schedulerActionCtor=i,this.now=a}return r.prototype.schedule=function(i,a,s){return a===void 0&&(a=0),new this.schedulerActionCtor(this,i).schedule(s,a)},r.now=t.dateTimestampProvider.now,r})();e.Scheduler=n}}),QX=F({"../../node_modules/rxjs/dist/cjs/internal/scheduler/Action.js"(e){var t=e&&e.__extends||(function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,c){l.__proto__=c}||function(l,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(l[d]=c[d])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.Action=void 0;var n=Da(),r=(function(i){t(a,i);function a(s,l){return i.call(this)||this}return a.prototype.schedule=function(s,l){return this},a})(n.Subscription);e.Action=r}}),PX=F({"../../node_modules/rxjs/dist/cjs/internal/scheduler/intervalProvider.js"(e){var t=e&&e.__read||function(r,i){var a=typeof Symbol=="function"&&r[Symbol.iterator];if(!a)return r;var s=a.call(r),l,c=[],d;try{for(;(i===void 0||i-- >0)&&!(l=s.next()).done;)c.push(l.value)}catch(f){d={error:f}}finally{try{l&&!l.done&&(a=s.return)&&a.call(s)}finally{if(d)throw d.error}}return c},n=e&&e.__spreadArray||function(r,i){for(var a=0,s=i.length,l=r.length;a<s;a++,l++)r[l]=i[a];return r};Object.defineProperty(e,"__esModule",{value:!0}),e.intervalProvider=void 0,e.intervalProvider={setInterval:function(r,i){for(var a=[],s=2;s<arguments.length;s++)a[s-2]=arguments[s];var l=e.intervalProvider.delegate;return l!=null&&l.setInterval?l.setInterval.apply(l,n([r,i],t(a))):setInterval.apply(void 0,n([r,i],t(a)))},clearInterval:function(r){var i=e.intervalProvider.delegate;return((i==null?void 0:i.clearInterval)||clearInterval)(r)},delegate:void 0}}}),NX=F({"../../node_modules/rxjs/dist/cjs/internal/scheduler/AsyncAction.js"(e){var t=e&&e.__extends||(function(){var s=function(l,c){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var m in f)Object.prototype.hasOwnProperty.call(f,m)&&(d[m]=f[m])},s(l,c)};return function(l,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");s(l,c);function d(){this.constructor=l}l.prototype=c===null?Object.create(c):(d.prototype=c.prototype,new d)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.AsyncAction=void 0;var n=QX(),r=PX(),i=Is(),a=(function(s){t(l,s);function l(c,d){var f=s.call(this,c,d)||this;return f.scheduler=c,f.work=d,f.pending=!1,f}return l.prototype.schedule=function(c,d){var f;if(d===void 0&&(d=0),this.closed)return this;this.state=c;var m=this.id,p=this.scheduler;return m!=null&&(this.id=this.recycleAsyncId(p,m,d)),this.pending=!0,this.delay=d,this.id=(f=this.id)!==null&&f!==void 0?f:this.requestAsyncId(p,this.id,d),this},l.prototype.requestAsyncId=function(c,d,f){return f===void 0&&(f=0),r.intervalProvider.setInterval(c.flush.bind(c,this),f)},l.prototype.recycleAsyncId=function(c,d,f){if(f===void 0&&(f=0),f!=null&&this.delay===f&&this.pending===!1)return d;d!=null&&r.intervalProvider.clearInterval(d)},l.prototype.execute=function(c,d){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var f=this._execute(c,d);if(f)return f;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},l.prototype._execute=function(c,d){var f=!1,m;try{this.work(c)}catch(p){f=!0,m=p||new Error("Scheduled action threw falsy error")}if(f)return this.unsubscribe(),m},l.prototype.unsubscribe=function(){if(!this.closed){var c=this,d=c.id,f=c.scheduler,m=f.actions;this.work=this.state=this.scheduler=null,this.pending=!1,i.arrRemove(m,this),d!=null&&(this.id=this.recycleAsyncId(f,d,null)),this.delay=null,s.prototype.unsubscribe.call(this)}},l})(n.Action);e.AsyncAction=a}}),RX=F({"../../node_modules/rxjs/dist/cjs/internal/scheduler/AsyncScheduler.js"(e){var t=e&&e.__extends||(function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,c){l.__proto__=c}||function(l,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(l[d]=c[d])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.AsyncScheduler=void 0;var n=AX(),r=(function(i){t(a,i);function a(s,l){l===void 0&&(l=n.Scheduler.now);var c=i.call(this,s,l)||this;return c.actions=[],c._active=!1,c}return a.prototype.flush=function(s){var l=this.actions;if(this._active){l.push(s);return}var c;this._active=!0;do if(c=s.execute(s.state,s.delay))break;while(s=l.shift());if(this._active=!1,c){for(;s=l.shift();)s.unsubscribe();throw c}},a})(n.Scheduler);e.AsyncScheduler=r}}),di=F({"../../node_modules/rxjs/dist/cjs/internal/scheduler/async.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.async=e.asyncScheduler=void 0;var t=NX(),n=RX();e.asyncScheduler=new n.AsyncScheduler(t.AsyncAction),e.async=e.asyncScheduler}}),yQ=F({"../../node_modules/rxjs/dist/cjs/internal/util/isScheduler.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isScheduler=void 0;var t=Ut();function n(r){return r&&t.isFunction(r.schedule)}e.isScheduler=n}}),rx=F({"../../node_modules/rxjs/dist/cjs/internal/util/isDate.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isValidDate=void 0;function t(n){return n instanceof Date&&!isNaN(n)}e.isValidDate=t}}),lc=F({"../../node_modules/rxjs/dist/cjs/internal/observable/timer.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.timer=void 0;var t=rr(),n=di(),r=yQ(),i=rx();function a(s,l,c){s===void 0&&(s=0),c===void 0&&(c=n.async);var d=-1;return l!=null&&(r.isScheduler(l)?c=l:d=l),new t.Observable(function(f){var m=i.isValidDate(s)?+s-c.now():s;m<0&&(m=0);var p=0;return c.schedule(function(){f.closed||(f.next(p++),0<=d?this.schedule(void 0,d):f.complete())},m)})}e.timer=a}}),MX=F({"../../node_modules/rxjs/dist/cjs/internal/operators/auditTime.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.auditTime=void 0;var t=di(),n=bQ(),r=lc();function i(a,s){return s===void 0&&(s=t.asyncScheduler),n.audit(function(){return r.timer(a,s)})}e.auditTime=i}}),DX=F({"../../node_modules/rxjs/dist/cjs/internal/operators/buffer.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.buffer=void 0;var t=xe(),n=Or(),r=Me(),i=ft();function a(s){return t.operate(function(l,c){var d=[];return l.subscribe(r.createOperatorSubscriber(c,function(f){return d.push(f)},function(){c.next(d),c.complete()})),i.innerFrom(s).subscribe(r.createOperatorSubscriber(c,function(){var f=d;d=[],c.next(f)},n.noop)),function(){d=null}})}e.buffer=a}}),LX=F({"../../node_modules/rxjs/dist/cjs/internal/operators/bufferCount.js"(e){var t=e&&e.__values||function(s){var l=typeof Symbol=="function"&&Symbol.iterator,c=l&&s[l],d=0;if(c)return c.call(s);if(s&&typeof s.length=="number")return{next:function(){return s&&d>=s.length&&(s=void 0),{value:s&&s[d++],done:!s}}};throw new TypeError(l?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.bufferCount=void 0;var n=xe(),r=Me(),i=Is();function a(s,l){return l===void 0&&(l=null),l=l??s,n.operate(function(c,d){var f=[],m=0;c.subscribe(r.createOperatorSubscriber(d,function(p){var O,b,x,w,k=null;m++%l===0&&f.push([]);try{for(var T=t(f),j=T.next();!j.done;j=T.next()){var E=j.value;E.push(p),s<=E.length&&(k=k??[],k.push(E))}}catch(N){O={error:N}}finally{try{j&&!j.done&&(b=T.return)&&b.call(T)}finally{if(O)throw O.error}}if(k)try{for(var Q=t(k),P=Q.next();!P.done;P=Q.next()){var E=P.value;i.arrRemove(f,E),d.next(E)}}catch(N){x={error:N}}finally{try{P&&!P.done&&(w=Q.return)&&w.call(Q)}finally{if(x)throw x.error}}},function(){var p,O;try{for(var b=t(f),x=b.next();!x.done;x=b.next()){var w=x.value;d.next(w)}}catch(k){p={error:k}}finally{try{x&&!x.done&&(O=b.return)&&O.call(b)}finally{if(p)throw p.error}}d.complete()},void 0,function(){f=null}))})}e.bufferCount=a}}),Ai=F({"../../node_modules/rxjs/dist/cjs/internal/util/args.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.popNumber=e.popScheduler=e.popResultSelector=void 0;var t=Ut(),n=yQ();function r(l){return l[l.length-1]}function i(l){return t.isFunction(r(l))?l.pop():void 0}e.popResultSelector=i;function a(l){return n.isScheduler(r(l))?l.pop():void 0}e.popScheduler=a;function s(l,c){return typeof r(l)=="number"?l.pop():c}e.popNumber=s}}),qs=F({"../../node_modules/rxjs/dist/cjs/internal/util/executeSchedule.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.executeSchedule=void 0;function t(n,r,i,a,s){a===void 0&&(a=0),s===void 0&&(s=!1);var l=r.schedule(function(){i(),s?n.add(this.schedule(null,a)):this.unsubscribe()},a);if(n.add(l),!s)return l}e.executeSchedule=t}}),zX=F({"../../node_modules/rxjs/dist/cjs/internal/operators/bufferTime.js"(e){var t=e&&e.__values||function(f){var m=typeof Symbol=="function"&&Symbol.iterator,p=m&&f[m],O=0;if(p)return p.call(f);if(f&&typeof f.length=="number")return{next:function(){return f&&O>=f.length&&(f=void 0),{value:f&&f[O++],done:!f}}};throw new TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.bufferTime=void 0;var n=Da(),r=xe(),i=Me(),a=Is(),s=di(),l=Ai(),c=qs();function d(f){for(var m,p,O=[],b=1;b<arguments.length;b++)O[b-1]=arguments[b];var x=(m=l.popScheduler(O))!==null&&m!==void 0?m:s.asyncScheduler,w=(p=O[0])!==null&&p!==void 0?p:null,k=O[1]||1/0;return r.operate(function(T,j){var E=[],Q=!1,P=function(L){var A=L.buffer,X=L.subs;X.unsubscribe(),a.arrRemove(E,L),j.next(A),Q&&N()},N=function(){if(E){var L=new n.Subscription;j.add(L);var A=[],X={buffer:A,subs:L};E.push(X),c.executeSchedule(L,x,function(){return P(X)},f)}};w!==null&&w>=0?c.executeSchedule(j,x,N,w,!0):Q=!0,N();var D=i.createOperatorSubscriber(j,function(L){var A,X,Z=E.slice();try{for(var V=t(Z),$=V.next();!$.done;$=V.next()){var W=$.value,I=W.buffer;I.push(L),k<=I.length&&P(W)}}catch(z){A={error:z}}finally{try{$&&!$.done&&(X=V.return)&&X.call(V)}finally{if(A)throw A.error}}},function(){for(;E!=null&&E.length;)j.next(E.shift().buffer);D==null||D.unsubscribe(),j.complete(),j.unsubscribe()},void 0,function(){return E=null});T.subscribe(D)})}e.bufferTime=d}}),$X=F({"../../node_modules/rxjs/dist/cjs/internal/operators/bufferToggle.js"(e){var t=e&&e.__values||function(d){var f=typeof Symbol=="function"&&Symbol.iterator,m=f&&d[f],p=0;if(m)return m.call(d);if(d&&typeof d.length=="number")return{next:function(){return d&&p>=d.length&&(d=void 0),{value:d&&d[p++],done:!d}}};throw new TypeError(f?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.bufferToggle=void 0;var n=Da(),r=xe(),i=ft(),a=Me(),s=Or(),l=Is();function c(d,f){return r.operate(function(m,p){var O=[];i.innerFrom(d).subscribe(a.createOperatorSubscriber(p,function(b){var x=[];O.push(x);var w=new n.Subscription,k=function(){l.arrRemove(O,x),p.next(x),w.unsubscribe()};w.add(i.innerFrom(f(b)).subscribe(a.createOperatorSubscriber(p,k,s.noop)))},s.noop)),m.subscribe(a.createOperatorSubscriber(p,function(b){var x,w;try{for(var k=t(O),T=k.next();!T.done;T=k.next()){var j=T.value;j.push(b)}}catch(E){x={error:E}}finally{try{T&&!T.done&&(w=k.return)&&w.call(k)}finally{if(x)throw x.error}}},function(){for(;O.length>0;)p.next(O.shift());p.complete()}))})}e.bufferToggle=c}}),IX=F({"../../node_modules/rxjs/dist/cjs/internal/operators/bufferWhen.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.bufferWhen=void 0;var t=xe(),n=Or(),r=Me(),i=ft();function a(s){return t.operate(function(l,c){var d=null,f=null,m=function(){f==null||f.unsubscribe();var p=d;d=[],p&&c.next(p),i.innerFrom(s()).subscribe(f=r.createOperatorSubscriber(c,m,n.noop))};m(),l.subscribe(r.createOperatorSubscriber(c,function(p){return d==null?void 0:d.push(p)},function(){d&&c.next(d),c.complete()},void 0,function(){return d=f=null}))})}e.bufferWhen=a}}),qX=F({"../../node_modules/rxjs/dist/cjs/internal/operators/catchError.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.catchError=void 0;var t=ft(),n=Me(),r=xe();function i(a){return r.operate(function(s,l){var c=null,d=!1,f;c=s.subscribe(n.createOperatorSubscriber(l,void 0,void 0,function(m){f=t.innerFrom(a(m,i(a)(s))),c?(c.unsubscribe(),c=null,f.subscribe(l)):d=!0})),d&&(c.unsubscribe(),c=null,f.subscribe(l))})}e.catchError=i}}),ix=F({"../../node_modules/rxjs/dist/cjs/internal/operators/observeOn.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.observeOn=void 0;var t=qs(),n=xe(),r=Me();function i(a,s){return s===void 0&&(s=0),n.operate(function(l,c){l.subscribe(r.createOperatorSubscriber(c,function(d){return t.executeSchedule(c,a,function(){return c.next(d)},s)},function(){return t.executeSchedule(c,a,function(){return c.complete()},s)},function(d){return t.executeSchedule(c,a,function(){return c.error(d)},s)}))})}e.observeOn=i}}),ax=F({"../../node_modules/rxjs/dist/cjs/internal/operators/subscribeOn.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.subscribeOn=void 0;var t=xe();function n(r,i){return i===void 0&&(i=0),t.operate(function(a,s){s.add(r.schedule(function(){return a.subscribe(s)},i))})}e.subscribeOn=n}}),XX=F({"../../node_modules/rxjs/dist/cjs/internal/scheduled/scheduleObservable.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.scheduleObservable=void 0;var t=ft(),n=ix(),r=ax();function i(a,s){return t.innerFrom(a).pipe(r.subscribeOn(s),n.observeOn(s))}e.scheduleObservable=i}}),ZX=F({"../../node_modules/rxjs/dist/cjs/internal/scheduled/schedulePromise.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.schedulePromise=void 0;var t=ft(),n=ix(),r=ax();function i(a,s){return t.innerFrom(a).pipe(r.subscribeOn(s),n.observeOn(s))}e.schedulePromise=i}}),BX=F({"../../node_modules/rxjs/dist/cjs/internal/scheduled/scheduleArray.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.scheduleArray=void 0;var t=rr();function n(r,i){return new t.Observable(function(a){var s=0;return i.schedule(function(){s===r.length?a.complete():(a.next(r[s++]),a.closed||this.schedule())})})}e.scheduleArray=n}}),VX=F({"../../node_modules/rxjs/dist/cjs/internal/scheduled/scheduleIterable.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.scheduleIterable=void 0;var t=rr(),n=vQ(),r=Ut(),i=qs();function a(s,l){return new t.Observable(function(c){var d;return i.executeSchedule(c,l,function(){d=s[n.iterator](),i.executeSchedule(c,l,function(){var f,m,p;try{f=d.next(),m=f.value,p=f.done}catch(O){c.error(O);return}p?c.complete():c.next(m)},0,!0)}),function(){return r.isFunction(d==null?void 0:d.return)&&d.return()}})}e.scheduleIterable=a}}),xQ=F({"../../node_modules/rxjs/dist/cjs/internal/scheduled/scheduleAsyncIterable.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.scheduleAsyncIterable=void 0;var t=rr(),n=qs();function r(i,a){if(!i)throw new Error("Iterable cannot be null");return new t.Observable(function(s){n.executeSchedule(s,a,function(){var l=i[Symbol.asyncIterator]();n.executeSchedule(s,a,function(){l.next().then(function(c){c.done?s.complete():s.next(c.value)})},0,!0)})})}e.scheduleAsyncIterable=r}}),UX=F({"../../node_modules/rxjs/dist/cjs/internal/scheduled/scheduleReadableStreamLike.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.scheduleReadableStreamLike=void 0;var t=xQ(),n=tx();function r(i,a){return t.scheduleAsyncIterable(n.readableStreamLikeToAsyncGenerator(i),a)}e.scheduleReadableStreamLike=r}}),YX=F({"../../node_modules/rxjs/dist/cjs/internal/scheduled/scheduled.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.scheduled=void 0;var t=XX(),n=ZX(),r=BX(),i=VX(),a=xQ(),s=mQ(),l=hQ(),c=fQ(),d=OQ(),f=pQ(),m=gQ(),p=tx(),O=UX();function b(x,w){if(x!=null){if(s.isInteropObservable(x))return t.scheduleObservable(x,w);if(c.isArrayLike(x))return r.scheduleArray(x,w);if(l.isPromise(x))return n.schedulePromise(x,w);if(f.isAsyncIterable(x))return a.scheduleAsyncIterable(x,w);if(d.isIterable(x))return i.scheduleIterable(x,w);if(p.isReadableStreamLike(x))return O.scheduleReadableStreamLike(x,w)}throw m.createInvalidObservableTypeError(x)}e.scheduled=b}}),Dd=F({"../../node_modules/rxjs/dist/cjs/internal/observable/from.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.from=void 0;var t=YX(),n=ft();function r(i,a){return a?t.scheduled(i,a):n.innerFrom(i)}e.from=r}}),$o=F({"../../node_modules/rxjs/dist/cjs/internal/operators/map.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.map=void 0;var t=xe(),n=Me();function r(i,a){return t.operate(function(s,l){var c=0;s.subscribe(n.createOperatorSubscriber(l,function(d){l.next(i.call(a,d,c++))}))})}e.map=r}}),WX=F({"../../node_modules/rxjs/dist/cjs/internal/util/argsArgArrayOrObject.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.argsArgArrayOrObject=void 0;var t=Array.isArray,n=Object.getPrototypeOf,r=Object.prototype,i=Object.keys;function a(l){if(l.length===1){var c=l[0];if(t(c))return{args:c,keys:null};if(s(c)){var d=i(c);return{args:d.map(function(f){return c[f]}),keys:d}}}return{args:l,keys:null}}e.argsArgArrayOrObject=a;function s(l){return l&&typeof l=="object"&&n(l)===r}}}),sx=F({"../../node_modules/rxjs/dist/cjs/internal/util/mapOneOrManyArgs.js"(e){var t=e&&e.__read||function(l,c){var d=typeof Symbol=="function"&&l[Symbol.iterator];if(!d)return l;var f=d.call(l),m,p=[],O;try{for(;(c===void 0||c-- >0)&&!(m=f.next()).done;)p.push(m.value)}catch(b){O={error:b}}finally{try{m&&!m.done&&(d=f.return)&&d.call(f)}finally{if(O)throw O.error}}return p},n=e&&e.__spreadArray||function(l,c){for(var d=0,f=c.length,m=l.length;d<f;d++,m++)l[m]=c[d];return l};Object.defineProperty(e,"__esModule",{value:!0}),e.mapOneOrManyArgs=void 0;var r=$o(),i=Array.isArray;function a(l,c){return i(c)?l.apply(void 0,n([],t(c))):l(c)}function s(l){return r.map(function(c){return a(l,c)})}e.mapOneOrManyArgs=s}}),FX=F({"../../node_modules/rxjs/dist/cjs/internal/util/createObject.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createObject=void 0;function t(n,r){return n.reduce(function(i,a,s){return i[a]=r[s],i},{})}e.createObject=t}}),SQ=F({"../../node_modules/rxjs/dist/cjs/internal/observable/combineLatest.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.combineLatestInit=e.combineLatest=void 0;var t=rr(),n=WX(),r=Dd(),i=br(),a=sx(),s=Ai(),l=FX(),c=Me(),d=qs();function f(){for(var O=[],b=0;b<arguments.length;b++)O[b]=arguments[b];var x=s.popScheduler(O),w=s.popResultSelector(O),k=n.argsArgArrayOrObject(O),T=k.args,j=k.keys;if(T.length===0)return r.from([],x);var E=new t.Observable(m(T,x,j?function(Q){return l.createObject(j,Q)}:i.identity));return w?E.pipe(a.mapOneOrManyArgs(w)):E}e.combineLatest=f;function m(O,b,x){return x===void 0&&(x=i.identity),function(w){p(b,function(){for(var k=O.length,T=new Array(k),j=k,E=k,Q=function(N){p(b,function(){var D=r.from(O[N],b),L=!1;D.subscribe(c.createOperatorSubscriber(w,function(A){T[N]=A,L||(L=!0,E--),E||w.next(x(T.slice()))},function(){--j||w.complete()}))},w)},P=0;P<k;P++)Q(P)},w)}}e.combineLatestInit=m;function p(O,b,x){O?d.executeSchedule(x,O,b):b()}}}),ox=F({"../../node_modules/rxjs/dist/cjs/internal/operators/mergeInternals.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.mergeInternals=void 0;var t=ft(),n=qs(),r=Me();function i(a,s,l,c,d,f,m,p){var O=[],b=0,x=0,w=!1,k=function(){w&&!O.length&&!b&&s.complete()},T=function(E){return b<c?j(E):O.push(E)},j=function(E){f&&s.next(E),b++;var Q=!1;t.innerFrom(l(E,x++)).subscribe(r.createOperatorSubscriber(s,function(P){d==null||d(P),f?T(P):s.next(P)},function(){Q=!0},void 0,function(){if(Q)try{b--;for(var P=function(){var N=O.shift();m?n.executeSchedule(s,m,function(){return j(N)}):j(N)};O.length&&b<c;)P();k()}catch(N){s.error(N)}}))};return a.subscribe(r.createOperatorSubscriber(s,T,function(){w=!0,k()})),function(){p==null||p()}}e.mergeInternals=i}}),Io=F({"../../node_modules/rxjs/dist/cjs/internal/operators/mergeMap.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.mergeMap=void 0;var t=$o(),n=ft(),r=xe(),i=ox(),a=Ut();function s(l,c,d){return d===void 0&&(d=1/0),a.isFunction(c)?s(function(f,m){return t.map(function(p,O){return c(f,p,m,O)})(n.innerFrom(l(f,m)))},d):(typeof c=="number"&&(d=c),r.operate(function(f,m){return i.mergeInternals(f,m,l,d)}))}e.mergeMap=s}}),wQ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/scanInternals.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.scanInternals=void 0;var t=Me();function n(r,i,a,s,l){return function(c,d){var f=a,m=i,p=0;c.subscribe(t.createOperatorSubscriber(d,function(O){var b=p++;m=f?r(m,O,b):(f=!0,O),s&&d.next(m)},l&&(function(){f&&d.next(m),d.complete()})))}}e.scanInternals=n}}),Ld=F({"../../node_modules/rxjs/dist/cjs/internal/operators/reduce.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.reduce=void 0;var t=wQ(),n=xe();function r(i,a){return n.operate(t.scanInternals(i,a,arguments.length>=2,!1,!0))}e.reduce=r}}),_Q=F({"../../node_modules/rxjs/dist/cjs/internal/operators/toArray.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.toArray=void 0;var t=Ld(),n=xe(),r=function(a,s){return a.push(s),a};function i(){return n.operate(function(a,s){t.reduce(r,[])(a).subscribe(s)})}e.toArray=i}}),kQ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/joinAllInternals.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.joinAllInternals=void 0;var t=br(),n=sx(),r=ex(),i=Io(),a=_Q();function s(l,c){return r.pipe(a.toArray(),i.mergeMap(function(d){return l(d)}),c?n.mapOneOrManyArgs(c):t.identity)}e.joinAllInternals=s}}),jQ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/combineLatestAll.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.combineLatestAll=void 0;var t=SQ(),n=kQ();function r(i){return n.joinAllInternals(t.combineLatest,i)}e.combineLatestAll=r}}),HX=F({"../../node_modules/rxjs/dist/cjs/internal/operators/combineAll.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.combineAll=void 0;var t=jQ();e.combineAll=t.combineLatestAll}}),cc=F({"../../node_modules/rxjs/dist/cjs/internal/util/argsOrArgArray.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.argsOrArgArray=void 0;var t=Array.isArray;function n(r){return r.length===1&&t(r[0])?r[0]:r}e.argsOrArgArray=n}}),TQ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/combineLatest.js"(e){var t=e&&e.__read||function(f,m){var p=typeof Symbol=="function"&&f[Symbol.iterator];if(!p)return f;var O=p.call(f),b,x=[],w;try{for(;(m===void 0||m-- >0)&&!(b=O.next()).done;)x.push(b.value)}catch(k){w={error:k}}finally{try{b&&!b.done&&(p=O.return)&&p.call(O)}finally{if(w)throw w.error}}return x},n=e&&e.__spreadArray||function(f,m){for(var p=0,O=m.length,b=f.length;p<O;p++,b++)f[b]=m[p];return f};Object.defineProperty(e,"__esModule",{value:!0}),e.combineLatest=void 0;var r=SQ(),i=xe(),a=cc(),s=sx(),l=ex(),c=Ai();function d(){for(var f=[],m=0;m<arguments.length;m++)f[m]=arguments[m];var p=c.popResultSelector(f);return p?l.pipe(d.apply(void 0,n([],t(f))),s.mapOneOrManyArgs(p)):i.operate(function(O,b){r.combineLatestInit(n([O],t(a.argsOrArgArray(f))))(b)})}e.combineLatest=d}}),GX=F({"../../node_modules/rxjs/dist/cjs/internal/operators/combineLatestWith.js"(e){var t=e&&e.__read||function(a,s){var l=typeof Symbol=="function"&&a[Symbol.iterator];if(!l)return a;var c=l.call(a),d,f=[],m;try{for(;(s===void 0||s-- >0)&&!(d=c.next()).done;)f.push(d.value)}catch(p){m={error:p}}finally{try{d&&!d.done&&(l=c.return)&&l.call(c)}finally{if(m)throw m.error}}return f},n=e&&e.__spreadArray||function(a,s){for(var l=0,c=s.length,d=a.length;l<c;l++,d++)a[d]=s[l];return a};Object.defineProperty(e,"__esModule",{value:!0}),e.combineLatestWith=void 0;var r=TQ();function i(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return r.combineLatest.apply(void 0,n([],t(a)))}e.combineLatestWith=i}}),lx=F({"../../node_modules/rxjs/dist/cjs/internal/operators/mergeAll.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.mergeAll=void 0;var t=Io(),n=br();function r(i){return i===void 0&&(i=1/0),t.mergeMap(n.identity,i)}e.mergeAll=r}}),cx=F({"../../node_modules/rxjs/dist/cjs/internal/operators/concatAll.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.concatAll=void 0;var t=lx();function n(){return t.mergeAll(1)}e.concatAll=n}}),CQ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/concatMap.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.concatMap=void 0;var t=Io(),n=Ut();function r(i,a){return n.isFunction(a)?t.mergeMap(i,a,1):t.mergeMap(i,1)}e.concatMap=r}}),KX=F({"../../node_modules/rxjs/dist/cjs/internal/operators/concatMapTo.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.concatMapTo=void 0;var t=CQ(),n=Ut();function r(i,a){return n.isFunction(a)?t.concatMap(function(){return i},a):t.concatMap(function(){return i})}e.concatMapTo=r}}),EQ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/concat.js"(e){var t=e&&e.__read||function(c,d){var f=typeof Symbol=="function"&&c[Symbol.iterator];if(!f)return c;var m=f.call(c),p,O=[],b;try{for(;(d===void 0||d-- >0)&&!(p=m.next()).done;)O.push(p.value)}catch(x){b={error:x}}finally{try{p&&!p.done&&(f=m.return)&&f.call(m)}finally{if(b)throw b.error}}return O},n=e&&e.__spreadArray||function(c,d){for(var f=0,m=d.length,p=c.length;f<m;f++,p++)c[p]=d[f];return c};Object.defineProperty(e,"__esModule",{value:!0}),e.concat=void 0;var r=xe(),i=cx(),a=Ai(),s=Dd();function l(){for(var c=[],d=0;d<arguments.length;d++)c[d]=arguments[d];var f=a.popScheduler(c);return r.operate(function(m,p){i.concatAll()(s.from(n([m],t(c)),f)).subscribe(p)})}e.concat=l}}),JX=F({"../../node_modules/rxjs/dist/cjs/internal/operators/concatWith.js"(e){var t=e&&e.__read||function(a,s){var l=typeof Symbol=="function"&&a[Symbol.iterator];if(!l)return a;var c=l.call(a),d,f=[],m;try{for(;(s===void 0||s-- >0)&&!(d=c.next()).done;)f.push(d.value)}catch(p){m={error:p}}finally{try{d&&!d.done&&(l=c.return)&&l.call(c)}finally{if(m)throw m.error}}return f},n=e&&e.__spreadArray||function(a,s){for(var l=0,c=s.length,d=a.length;l<c;l++,d++)a[d]=s[l];return a};Object.defineProperty(e,"__esModule",{value:!0}),e.concatWith=void 0;var r=EQ();function i(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return r.concat.apply(void 0,n([],t(a)))}e.concatWith=i}}),e2=F({"../../node_modules/rxjs/dist/cjs/internal/util/ObjectUnsubscribedError.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ObjectUnsubscribedError=void 0;var t=zo();e.ObjectUnsubscribedError=t.createErrorClass(function(n){return function(){n(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})}}),yr=F({"../../node_modules/rxjs/dist/cjs/internal/Subject.js"(e){var t=e&&e.__extends||(function(){var f=function(m,p){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(O,b){O.__proto__=b}||function(O,b){for(var x in b)Object.prototype.hasOwnProperty.call(b,x)&&(O[x]=b[x])},f(m,p)};return function(m,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");f(m,p);function O(){this.constructor=m}m.prototype=p===null?Object.create(p):(O.prototype=p.prototype,new O)}})(),n=e&&e.__values||function(f){var m=typeof Symbol=="function"&&Symbol.iterator,p=m&&f[m],O=0;if(p)return p.call(f);if(f&&typeof f.length=="number")return{next:function(){return f&&O>=f.length&&(f=void 0),{value:f&&f[O++],done:!f}}};throw new TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.AnonymousSubject=e.Subject=void 0;var r=rr(),i=Da(),a=e2(),s=Is(),l=G0(),c=(function(f){t(m,f);function m(){var p=f.call(this)||this;return p.closed=!1,p.currentObservers=null,p.observers=[],p.isStopped=!1,p.hasError=!1,p.thrownError=null,p}return m.prototype.lift=function(p){var O=new d(this,this);return O.operator=p,O},m.prototype._throwIfClosed=function(){if(this.closed)throw new a.ObjectUnsubscribedError},m.prototype.next=function(p){var O=this;l.errorContext(function(){var b,x;if(O._throwIfClosed(),!O.isStopped){O.currentObservers||(O.currentObservers=Array.from(O.observers));try{for(var w=n(O.currentObservers),k=w.next();!k.done;k=w.next()){var T=k.value;T.next(p)}}catch(j){b={error:j}}finally{try{k&&!k.done&&(x=w.return)&&x.call(w)}finally{if(b)throw b.error}}}})},m.prototype.error=function(p){var O=this;l.errorContext(function(){if(O._throwIfClosed(),!O.isStopped){O.hasError=O.isStopped=!0,O.thrownError=p;for(var b=O.observers;b.length;)b.shift().error(p)}})},m.prototype.complete=function(){var p=this;l.errorContext(function(){if(p._throwIfClosed(),!p.isStopped){p.isStopped=!0;for(var O=p.observers;O.length;)O.shift().complete()}})},m.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(m.prototype,"observed",{get:function(){var p;return((p=this.observers)===null||p===void 0?void 0:p.length)>0},enumerable:!1,configurable:!0}),m.prototype._trySubscribe=function(p){return this._throwIfClosed(),f.prototype._trySubscribe.call(this,p)},m.prototype._subscribe=function(p){return this._throwIfClosed(),this._checkFinalizedStatuses(p),this._innerSubscribe(p)},m.prototype._innerSubscribe=function(p){var O=this,b=this,x=b.hasError,w=b.isStopped,k=b.observers;return x||w?i.EMPTY_SUBSCRIPTION:(this.currentObservers=null,k.push(p),new i.Subscription(function(){O.currentObservers=null,s.arrRemove(k,p)}))},m.prototype._checkFinalizedStatuses=function(p){var O=this,b=O.hasError,x=O.thrownError,w=O.isStopped;b?p.error(x):w&&p.complete()},m.prototype.asObservable=function(){var p=new r.Observable;return p.source=this,p},m.create=function(p,O){return new d(p,O)},m})(r.Observable);e.Subject=c;var d=(function(f){t(m,f);function m(p,O){var b=f.call(this)||this;return b.destination=p,b.source=O,b}return m.prototype.next=function(p){var O,b;(b=(O=this.destination)===null||O===void 0?void 0:O.next)===null||b===void 0||b.call(O,p)},m.prototype.error=function(p){var O,b;(b=(O=this.destination)===null||O===void 0?void 0:O.error)===null||b===void 0||b.call(O,p)},m.prototype.complete=function(){var p,O;(O=(p=this.destination)===null||p===void 0?void 0:p.complete)===null||O===void 0||O.call(p)},m.prototype._subscribe=function(p){var O,b;return(b=(O=this.source)===null||O===void 0?void 0:O.subscribe(p))!==null&&b!==void 0?b:i.EMPTY_SUBSCRIPTION},m})(c);e.AnonymousSubject=d}}),t2=F({"../../node_modules/rxjs/dist/cjs/internal/observable/fromSubscribable.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.fromSubscribable=void 0;var t=rr();function n(r){return new t.Observable(function(i){return r.subscribe(i)})}e.fromSubscribable=n}}),ux=F({"../../node_modules/rxjs/dist/cjs/internal/operators/connect.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.connect=void 0;var t=yr(),n=ft(),r=xe(),i=t2(),a={connector:function(){return new t.Subject}};function s(l,c){c===void 0&&(c=a);var d=c.connector;return r.operate(function(f,m){var p=d();n.innerFrom(l(i.fromSubscribable(p))).subscribe(m),m.add(f.subscribe(p))})}e.connect=s}}),n2=F({"../../node_modules/rxjs/dist/cjs/internal/operators/count.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.count=void 0;var t=Ld();function n(r){return t.reduce(function(i,a,s){return!r||r(a,s)?i+1:i},0)}e.count=n}}),r2=F({"../../node_modules/rxjs/dist/cjs/internal/operators/debounce.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.debounce=void 0;var t=xe(),n=Or(),r=Me(),i=ft();function a(s){return t.operate(function(l,c){var d=!1,f=null,m=null,p=function(){if(m==null||m.unsubscribe(),m=null,d){d=!1;var O=f;f=null,c.next(O)}};l.subscribe(r.createOperatorSubscriber(c,function(O){m==null||m.unsubscribe(),d=!0,f=O,m=r.createOperatorSubscriber(c,p,n.noop),i.innerFrom(s(O)).subscribe(m)},function(){p(),c.complete()},void 0,function(){f=m=null}))})}e.debounce=a}}),i2=F({"../../node_modules/rxjs/dist/cjs/internal/operators/debounceTime.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.debounceTime=void 0;var t=di(),n=xe(),r=Me();function i(a,s){return s===void 0&&(s=t.asyncScheduler),n.operate(function(l,c){var d=null,f=null,m=null,p=function(){if(d){d.unsubscribe(),d=null;var b=f;f=null,c.next(b)}};function O(){var b=m+a,x=s.now();if(x<b){d=this.schedule(void 0,b-x),c.add(d);return}p()}l.subscribe(r.createOperatorSubscriber(c,function(b){f=b,m=s.now(),d||(d=s.schedule(O,a),c.add(d))},function(){p(),c.complete()},void 0,function(){f=d=null}))})}e.debounceTime=i}}),cp=F({"../../node_modules/rxjs/dist/cjs/internal/operators/defaultIfEmpty.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.defaultIfEmpty=void 0;var t=xe(),n=Me();function r(i){return t.operate(function(a,s){var l=!1;a.subscribe(n.createOperatorSubscriber(s,function(c){l=!0,s.next(c)},function(){l||s.next(i),s.complete()}))})}e.defaultIfEmpty=r}}),dx=F({"../../node_modules/rxjs/dist/cjs/internal/observable/concat.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.concat=void 0;var t=cx(),n=Ai(),r=Dd();function i(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return t.concatAll()(r.from(a,n.popScheduler(a)))}e.concat=i}}),zd=F({"../../node_modules/rxjs/dist/cjs/internal/observable/empty.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.empty=e.EMPTY=void 0;var t=rr();e.EMPTY=new t.Observable(function(i){return i.complete()});function n(i){return i?r(i):e.EMPTY}e.empty=n;function r(i){return new t.Observable(function(a){return i.schedule(function(){return a.complete()})})}}}),up=F({"../../node_modules/rxjs/dist/cjs/internal/operators/take.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.take=void 0;var t=zd(),n=xe(),r=Me();function i(a){return a<=0?function(){return t.EMPTY}:n.operate(function(s,l){var c=0;s.subscribe(r.createOperatorSubscriber(l,function(d){++c<=a&&(l.next(d),a<=c&&l.complete())}))})}e.take=i}}),AQ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/ignoreElements.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ignoreElements=void 0;var t=xe(),n=Me(),r=Or();function i(){return t.operate(function(a,s){a.subscribe(n.createOperatorSubscriber(s,r.noop))})}e.ignoreElements=i}}),QQ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/mapTo.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.mapTo=void 0;var t=$o();function n(r){return t.map(function(){return r})}e.mapTo=n}}),PQ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/delayWhen.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.delayWhen=void 0;var t=dx(),n=up(),r=AQ(),i=QQ(),a=Io(),s=ft();function l(c,d){return d?function(f){return t.concat(d.pipe(n.take(1),r.ignoreElements()),f.pipe(l(c)))}:a.mergeMap(function(f,m){return s.innerFrom(c(f,m)).pipe(n.take(1),i.mapTo(f))})}e.delayWhen=l}}),a2=F({"../../node_modules/rxjs/dist/cjs/internal/operators/delay.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.delay=void 0;var t=di(),n=PQ(),r=lc();function i(a,s){s===void 0&&(s=t.asyncScheduler);var l=r.timer(a,s);return n.delayWhen(function(){return l})}e.delay=i}}),NQ=F({"../../node_modules/rxjs/dist/cjs/internal/observable/of.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.of=void 0;var t=Ai(),n=Dd();function r(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];var s=t.popScheduler(i);return n.from(i,s)}e.of=r}}),s2=F({"../../node_modules/rxjs/dist/cjs/internal/observable/throwError.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.throwError=void 0;var t=rr(),n=Ut();function r(i,a){var s=n.isFunction(i)?i:function(){return i},l=function(c){return c.error(s())};return new t.Observable(a?function(c){return a.schedule(l,0,c)}:l)}e.throwError=r}}),RQ=F({"../../node_modules/rxjs/dist/cjs/internal/Notification.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.observeNotification=e.Notification=e.NotificationKind=void 0;var t=zd(),n=NQ(),r=s2(),i=Ut();(function(l){l.NEXT="N",l.ERROR="E",l.COMPLETE="C"})(e.NotificationKind||(e.NotificationKind={}));var a=(function(){function l(c,d,f){this.kind=c,this.value=d,this.error=f,this.hasValue=c==="N"}return l.prototype.observe=function(c){return s(this,c)},l.prototype.do=function(c,d,f){var m=this,p=m.kind,O=m.value,b=m.error;return p==="N"?c==null?void 0:c(O):p==="E"?d==null?void 0:d(b):f==null?void 0:f()},l.prototype.accept=function(c,d,f){var m;return i.isFunction((m=c)===null||m===void 0?void 0:m.next)?this.observe(c):this.do(c,d,f)},l.prototype.toObservable=function(){var c=this,d=c.kind,f=c.value,m=c.error,p=d==="N"?n.of(f):d==="E"?r.throwError(function(){return m}):d==="C"?t.EMPTY:0;if(!p)throw new TypeError("Unexpected notification kind "+d);return p},l.createNext=function(c){return new l("N",c)},l.createError=function(c){return new l("E",void 0,c)},l.createComplete=function(){return l.completeNotification},l.completeNotification=new l("C"),l})();e.Notification=a;function s(l,c){var d,f,m,p=l,O=p.kind,b=p.value,x=p.error;if(typeof O!="string")throw new TypeError('Invalid notification, missing "kind"');O==="N"?(d=c.next)===null||d===void 0||d.call(c,b):O==="E"?(f=c.error)===null||f===void 0||f.call(c,x):(m=c.complete)===null||m===void 0||m.call(c)}e.observeNotification=s}}),o2=F({"../../node_modules/rxjs/dist/cjs/internal/operators/dematerialize.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.dematerialize=void 0;var t=RQ(),n=xe(),r=Me();function i(){return n.operate(function(a,s){a.subscribe(r.createOperatorSubscriber(s,function(l){return t.observeNotification(l,s)}))})}e.dematerialize=i}}),l2=F({"../../node_modules/rxjs/dist/cjs/internal/operators/distinct.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.distinct=void 0;var t=xe(),n=Me(),r=Or(),i=ft();function a(s,l){return t.operate(function(c,d){var f=new Set;c.subscribe(n.createOperatorSubscriber(d,function(m){var p=s?s(m):m;f.has(p)||(f.add(p),d.next(m))})),l&&i.innerFrom(l).subscribe(n.createOperatorSubscriber(d,function(){return f.clear()},r.noop))})}e.distinct=a}}),MQ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/distinctUntilChanged.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.distinctUntilChanged=void 0;var t=br(),n=xe(),r=Me();function i(s,l){return l===void 0&&(l=t.identity),s=s??a,n.operate(function(c,d){var f,m=!0;c.subscribe(r.createOperatorSubscriber(d,function(p){var O=l(p);(m||!s(f,O))&&(m=!1,f=O,d.next(p))}))})}e.distinctUntilChanged=i;function a(s,l){return s===l}}}),c2=F({"../../node_modules/rxjs/dist/cjs/internal/operators/distinctUntilKeyChanged.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.distinctUntilKeyChanged=void 0;var t=MQ();function n(r,i){return t.distinctUntilChanged(function(a,s){return i?i(a[r],s[r]):a[r]===s[r]})}e.distinctUntilKeyChanged=n}}),u2=F({"../../node_modules/rxjs/dist/cjs/internal/util/ArgumentOutOfRangeError.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ArgumentOutOfRangeError=void 0;var t=zo();e.ArgumentOutOfRangeError=t.createErrorClass(function(n){return function(){n(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}})}}),uc=F({"../../node_modules/rxjs/dist/cjs/internal/operators/filter.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.filter=void 0;var t=xe(),n=Me();function r(i,a){return t.operate(function(s,l){var c=0;s.subscribe(n.createOperatorSubscriber(l,function(d){return i.call(a,d,c++)&&l.next(d)}))})}e.filter=r}}),dp=F({"../../node_modules/rxjs/dist/cjs/internal/util/EmptyError.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmptyError=void 0;var t=zo();e.EmptyError=t.createErrorClass(function(n){return function(){n(this),this.name="EmptyError",this.message="no elements in sequence"}})}}),fp=F({"../../node_modules/rxjs/dist/cjs/internal/operators/throwIfEmpty.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.throwIfEmpty=void 0;var t=dp(),n=xe(),r=Me();function i(s){return s===void 0&&(s=a),n.operate(function(l,c){var d=!1;l.subscribe(r.createOperatorSubscriber(c,function(f){d=!0,c.next(f)},function(){return d?c.complete():c.error(s())}))})}e.throwIfEmpty=i;function a(){return new t.EmptyError}}}),d2=F({"../../node_modules/rxjs/dist/cjs/internal/operators/elementAt.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.elementAt=void 0;var t=u2(),n=uc(),r=fp(),i=cp(),a=up();function s(l,c){if(l<0)throw new t.ArgumentOutOfRangeError;var d=arguments.length>=2;return function(f){return f.pipe(n.filter(function(m,p){return p===l}),a.take(1),d?i.defaultIfEmpty(c):r.throwIfEmpty(function(){return new t.ArgumentOutOfRangeError}))}}e.elementAt=s}}),f2=F({"../../node_modules/rxjs/dist/cjs/internal/operators/endWith.js"(e){var t=e&&e.__read||function(s,l){var c=typeof Symbol=="function"&&s[Symbol.iterator];if(!c)return s;var d=c.call(s),f,m=[],p;try{for(;(l===void 0||l-- >0)&&!(f=d.next()).done;)m.push(f.value)}catch(O){p={error:O}}finally{try{f&&!f.done&&(c=d.return)&&c.call(d)}finally{if(p)throw p.error}}return m},n=e&&e.__spreadArray||function(s,l){for(var c=0,d=l.length,f=s.length;c<d;c++,f++)s[f]=l[c];return s};Object.defineProperty(e,"__esModule",{value:!0}),e.endWith=void 0;var r=dx(),i=NQ();function a(){for(var s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];return function(c){return r.concat(c,i.of.apply(void 0,n([],t(s))))}}e.endWith=a}}),h2=F({"../../node_modules/rxjs/dist/cjs/internal/operators/every.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.every=void 0;var t=xe(),n=Me();function r(i,a){return t.operate(function(s,l){var c=0;s.subscribe(n.createOperatorSubscriber(l,function(d){i.call(a,d,c++,s)||(l.next(!1),l.complete())},function(){l.next(!0),l.complete()}))})}e.every=r}}),DQ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/exhaustMap.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.exhaustMap=void 0;var t=$o(),n=ft(),r=xe(),i=Me();function a(s,l){return l?function(c){return c.pipe(a(function(d,f){return n.innerFrom(s(d,f)).pipe(t.map(function(m,p){return l(d,m,f,p)}))}))}:r.operate(function(c,d){var f=0,m=null,p=!1;c.subscribe(i.createOperatorSubscriber(d,function(O){m||(m=i.createOperatorSubscriber(d,void 0,function(){m=null,p&&d.complete()}),n.innerFrom(s(O,f++)).subscribe(m))},function(){p=!0,!m&&d.complete()}))})}e.exhaustMap=a}}),LQ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/exhaustAll.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.exhaustAll=void 0;var t=DQ(),n=br();function r(){return t.exhaustMap(n.identity)}e.exhaustAll=r}}),m2=F({"../../node_modules/rxjs/dist/cjs/internal/operators/exhaust.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.exhaust=void 0;var t=LQ();e.exhaust=t.exhaustAll}}),p2=F({"../../node_modules/rxjs/dist/cjs/internal/operators/expand.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.expand=void 0;var t=xe(),n=ox();function r(i,a,s){return a===void 0&&(a=1/0),a=(a||0)<1?1/0:a,t.operate(function(l,c){return n.mergeInternals(l,c,i,a,void 0,!0,s)})}e.expand=r}}),g2=F({"../../node_modules/rxjs/dist/cjs/internal/operators/finalize.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.finalize=void 0;var t=xe();function n(r){return t.operate(function(i,a){try{i.subscribe(a)}finally{a.add(r)}})}e.finalize=n}}),zQ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/find.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFind=e.find=void 0;var t=xe(),n=Me();function r(a,s){return t.operate(i(a,s,"value"))}e.find=r;function i(a,s,l){var c=l==="index";return function(d,f){var m=0;d.subscribe(n.createOperatorSubscriber(f,function(p){var O=m++;a.call(s,p,O,d)&&(f.next(c?O:p),f.complete())},function(){f.next(c?-1:void 0),f.complete()}))}}e.createFind=i}}),v2=F({"../../node_modules/rxjs/dist/cjs/internal/operators/findIndex.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.findIndex=void 0;var t=xe(),n=zQ();function r(i,a){return t.operate(n.createFind(i,a,"index"))}e.findIndex=r}}),O2=F({"../../node_modules/rxjs/dist/cjs/internal/operators/first.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.first=void 0;var t=dp(),n=uc(),r=up(),i=cp(),a=fp(),s=br();function l(c,d){var f=arguments.length>=2;return function(m){return m.pipe(c?n.filter(function(p,O){return c(p,O,m)}):s.identity,r.take(1),f?i.defaultIfEmpty(d):a.throwIfEmpty(function(){return new t.EmptyError}))}}e.first=l}}),b2=F({"../../node_modules/rxjs/dist/cjs/internal/operators/groupBy.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.groupBy=void 0;var t=rr(),n=ft(),r=yr(),i=xe(),a=Me();function s(l,c,d,f){return i.operate(function(m,p){var O;!c||typeof c=="function"?O=c:(d=c.duration,O=c.element,f=c.connector);var b=new Map,x=function(Q){b.forEach(Q),Q(p)},w=function(Q){return x(function(P){return P.error(Q)})},k=0,T=!1,j=new a.OperatorSubscriber(p,function(Q){try{var P=l(Q),N=b.get(P);if(!N){b.set(P,N=f?f():new r.Subject);var D=E(P,N);if(p.next(D),d){var L=a.createOperatorSubscriber(N,function(){N.complete(),L==null||L.unsubscribe()},void 0,void 0,function(){return b.delete(P)});j.add(n.innerFrom(d(D)).subscribe(L))}}N.next(O?O(Q):Q)}catch(A){w(A)}},function(){return x(function(Q){return Q.complete()})},w,function(){return b.clear()},function(){return T=!0,k===0});m.subscribe(j);function E(Q,P){var N=new t.Observable(function(D){k++;var L=P.subscribe(D);return function(){L.unsubscribe(),--k===0&&T&&j.unsubscribe()}});return N.key=Q,N}})}e.groupBy=s}}),y2=F({"../../node_modules/rxjs/dist/cjs/internal/operators/isEmpty.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isEmpty=void 0;var t=xe(),n=Me();function r(){return t.operate(function(i,a){i.subscribe(n.createOperatorSubscriber(a,function(){a.next(!1),a.complete()},function(){a.next(!0),a.complete()}))})}e.isEmpty=r}}),$Q=F({"../../node_modules/rxjs/dist/cjs/internal/operators/takeLast.js"(e){var t=e&&e.__values||function(s){var l=typeof Symbol=="function"&&Symbol.iterator,c=l&&s[l],d=0;if(c)return c.call(s);if(s&&typeof s.length=="number")return{next:function(){return s&&d>=s.length&&(s=void 0),{value:s&&s[d++],done:!s}}};throw new TypeError(l?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.takeLast=void 0;var n=zd(),r=xe(),i=Me();function a(s){return s<=0?function(){return n.EMPTY}:r.operate(function(l,c){var d=[];l.subscribe(i.createOperatorSubscriber(c,function(f){d.push(f),s<d.length&&d.shift()},function(){var f,m;try{for(var p=t(d),O=p.next();!O.done;O=p.next()){var b=O.value;c.next(b)}}catch(x){f={error:x}}finally{try{O&&!O.done&&(m=p.return)&&m.call(p)}finally{if(f)throw f.error}}c.complete()},void 0,function(){d=null}))})}e.takeLast=a}}),x2=F({"../../node_modules/rxjs/dist/cjs/internal/operators/last.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.last=void 0;var t=dp(),n=uc(),r=$Q(),i=fp(),a=cp(),s=br();function l(c,d){var f=arguments.length>=2;return function(m){return m.pipe(c?n.filter(function(p,O){return c(p,O,m)}):s.identity,r.takeLast(1),f?a.defaultIfEmpty(d):i.throwIfEmpty(function(){return new t.EmptyError}))}}e.last=l}}),S2=F({"../../node_modules/rxjs/dist/cjs/internal/operators/materialize.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.materialize=void 0;var t=RQ(),n=xe(),r=Me();function i(){return n.operate(function(a,s){a.subscribe(r.createOperatorSubscriber(s,function(l){s.next(t.Notification.createNext(l))},function(){s.next(t.Notification.createComplete()),s.complete()},function(l){s.next(t.Notification.createError(l)),s.complete()}))})}e.materialize=i}}),w2=F({"../../node_modules/rxjs/dist/cjs/internal/operators/max.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.max=void 0;var t=Ld(),n=Ut();function r(i){return t.reduce(n.isFunction(i)?function(a,s){return i(a,s)>0?a:s}:function(a,s){return a>s?a:s})}e.max=r}}),_2=F({"../../node_modules/rxjs/dist/cjs/internal/operators/flatMap.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.flatMap=void 0;var t=Io();e.flatMap=t.mergeMap}}),k2=F({"../../node_modules/rxjs/dist/cjs/internal/operators/mergeMapTo.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.mergeMapTo=void 0;var t=Io(),n=Ut();function r(i,a,s){return s===void 0&&(s=1/0),n.isFunction(a)?t.mergeMap(function(){return i},a,s):(typeof a=="number"&&(s=a),t.mergeMap(function(){return i},s))}e.mergeMapTo=r}}),j2=F({"../../node_modules/rxjs/dist/cjs/internal/operators/mergeScan.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.mergeScan=void 0;var t=xe(),n=ox();function r(i,a,s){return s===void 0&&(s=1/0),t.operate(function(l,c){var d=a;return n.mergeInternals(l,c,function(f,m){return i(d,f,m)},s,function(f){d=f},!1,void 0,function(){return d=null})})}e.mergeScan=r}}),IQ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/merge.js"(e){var t=e&&e.__read||function(c,d){var f=typeof Symbol=="function"&&c[Symbol.iterator];if(!f)return c;var m=f.call(c),p,O=[],b;try{for(;(d===void 0||d-- >0)&&!(p=m.next()).done;)O.push(p.value)}catch(x){b={error:x}}finally{try{p&&!p.done&&(f=m.return)&&f.call(m)}finally{if(b)throw b.error}}return O},n=e&&e.__spreadArray||function(c,d){for(var f=0,m=d.length,p=c.length;f<m;f++,p++)c[p]=d[f];return c};Object.defineProperty(e,"__esModule",{value:!0}),e.merge=void 0;var r=xe(),i=lx(),a=Ai(),s=Dd();function l(){for(var c=[],d=0;d<arguments.length;d++)c[d]=arguments[d];var f=a.popScheduler(c),m=a.popNumber(c,1/0);return r.operate(function(p,O){i.mergeAll(m)(s.from(n([p],t(c)),f)).subscribe(O)})}e.merge=l}}),T2=F({"../../node_modules/rxjs/dist/cjs/internal/operators/mergeWith.js"(e){var t=e&&e.__read||function(a,s){var l=typeof Symbol=="function"&&a[Symbol.iterator];if(!l)return a;var c=l.call(a),d,f=[],m;try{for(;(s===void 0||s-- >0)&&!(d=c.next()).done;)f.push(d.value)}catch(p){m={error:p}}finally{try{d&&!d.done&&(l=c.return)&&l.call(c)}finally{if(m)throw m.error}}return f},n=e&&e.__spreadArray||function(a,s){for(var l=0,c=s.length,d=a.length;l<c;l++,d++)a[d]=s[l];return a};Object.defineProperty(e,"__esModule",{value:!0}),e.mergeWith=void 0;var r=IQ();function i(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return r.merge.apply(void 0,n([],t(a)))}e.mergeWith=i}}),C2=F({"../../node_modules/rxjs/dist/cjs/internal/operators/min.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.min=void 0;var t=Ld(),n=Ut();function r(i){return t.reduce(n.isFunction(i)?function(a,s){return i(a,s)<0?a:s}:function(a,s){return a<s?a:s})}e.min=r}}),qQ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/refCount.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.refCount=void 0;var t=xe(),n=Me();function r(){return t.operate(function(i,a){var s=null;i._refCount++;var l=n.createOperatorSubscriber(a,void 0,void 0,void 0,function(){if(!i||i._refCount<=0||0<--i._refCount){s=null;return}var c=i._connection,d=s;s=null,c&&(!d||c===d)&&c.unsubscribe(),a.unsubscribe()});i.subscribe(l),l.closed||(s=i.connect())})}e.refCount=r}}),fx=F({"../../node_modules/rxjs/dist/cjs/internal/observable/ConnectableObservable.js"(e){var t=e&&e.__extends||(function(){var c=function(d,f){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,p){m.__proto__=p}||function(m,p){for(var O in p)Object.prototype.hasOwnProperty.call(p,O)&&(m[O]=p[O])},c(d,f)};return function(d,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");c(d,f);function m(){this.constructor=d}d.prototype=f===null?Object.create(f):(m.prototype=f.prototype,new m)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.ConnectableObservable=void 0;var n=rr(),r=Da(),i=qQ(),a=Me(),s=xe(),l=(function(c){t(d,c);function d(f,m){var p=c.call(this)||this;return p.source=f,p.subjectFactory=m,p._subject=null,p._refCount=0,p._connection=null,s.hasLift(f)&&(p.lift=f.lift),p}return d.prototype._subscribe=function(f){return this.getSubject().subscribe(f)},d.prototype.getSubject=function(){var f=this._subject;return(!f||f.isStopped)&&(this._subject=this.subjectFactory()),this._subject},d.prototype._teardown=function(){this._refCount=0;var f=this._connection;this._subject=this._connection=null,f==null||f.unsubscribe()},d.prototype.connect=function(){var f=this,m=this._connection;if(!m){m=this._connection=new r.Subscription;var p=this.getSubject();m.add(this.source.subscribe(a.createOperatorSubscriber(p,void 0,function(){f._teardown(),p.complete()},function(O){f._teardown(),p.error(O)},function(){return f._teardown()}))),m.closed&&(this._connection=null,m=r.Subscription.EMPTY)}return m},d.prototype.refCount=function(){return i.refCount()(this)},d})(n.Observable);e.ConnectableObservable=l}}),hx=F({"../../node_modules/rxjs/dist/cjs/internal/operators/multicast.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.multicast=void 0;var t=fx(),n=Ut(),r=ux();function i(a,s){var l=n.isFunction(a)?a:function(){return a};return n.isFunction(s)?r.connect(s,{connector:l}):function(c){return new t.ConnectableObservable(c,l)}}e.multicast=i}}),E2=F({"../../node_modules/rxjs/dist/cjs/internal/observable/onErrorResumeNext.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.onErrorResumeNext=void 0;var t=rr(),n=cc(),r=Me(),i=Or(),a=ft();function s(){for(var l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];var d=n.argsOrArgArray(l);return new t.Observable(function(f){var m=0,p=function(){if(m<d.length){var O=void 0;try{O=a.innerFrom(d[m++])}catch{p();return}var b=new r.OperatorSubscriber(f,void 0,i.noop,i.noop);O.subscribe(b),b.add(p)}else f.complete()};p()})}e.onErrorResumeNext=s}}),A2=F({"../../node_modules/rxjs/dist/cjs/internal/operators/onErrorResumeNextWith.js"(e){var t=e&&e.__read||function(s,l){var c=typeof Symbol=="function"&&s[Symbol.iterator];if(!c)return s;var d=c.call(s),f,m=[],p;try{for(;(l===void 0||l-- >0)&&!(f=d.next()).done;)m.push(f.value)}catch(O){p={error:O}}finally{try{f&&!f.done&&(c=d.return)&&c.call(d)}finally{if(p)throw p.error}}return m},n=e&&e.__spreadArray||function(s,l){for(var c=0,d=l.length,f=s.length;c<d;c++,f++)s[f]=l[c];return s};Object.defineProperty(e,"__esModule",{value:!0}),e.onErrorResumeNext=e.onErrorResumeNextWith=void 0;var r=cc(),i=E2();function a(){for(var s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];var c=r.argsOrArgArray(s);return function(d){return i.onErrorResumeNext.apply(void 0,n([d],t(c)))}}e.onErrorResumeNextWith=a,e.onErrorResumeNext=a}}),Q2=F({"../../node_modules/rxjs/dist/cjs/internal/operators/pairwise.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.pairwise=void 0;var t=xe(),n=Me();function r(){return t.operate(function(i,a){var s,l=!1;i.subscribe(n.createOperatorSubscriber(a,function(c){var d=s;s=c,l&&a.next([d,c]),l=!0}))})}e.pairwise=r}}),P2=F({"../../node_modules/rxjs/dist/cjs/internal/operators/pluck.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.pluck=void 0;var t=$o();function n(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var a=r.length;if(a===0)throw new Error("list of properties cannot be empty.");return t.map(function(s){for(var l=s,c=0;c<a;c++){var d=l==null?void 0:l[r[c]];if(typeof d<"u")l=d;else return}return l})}e.pluck=n}}),N2=F({"../../node_modules/rxjs/dist/cjs/internal/operators/publish.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.publish=void 0;var t=yr(),n=hx(),r=ux();function i(a){return a?function(s){return r.connect(a)(s)}:function(s){return n.multicast(new t.Subject)(s)}}e.publish=i}}),R2=F({"../../node_modules/rxjs/dist/cjs/internal/BehaviorSubject.js"(e){var t=e&&e.__extends||(function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,c){l.__proto__=c}||function(l,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(l[d]=c[d])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.BehaviorSubject=void 0;var n=yr(),r=(function(i){t(a,i);function a(s){var l=i.call(this)||this;return l._value=s,l}return Object.defineProperty(a.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),a.prototype._subscribe=function(s){var l=i.prototype._subscribe.call(this,s);return!l.closed&&s.next(this._value),l},a.prototype.getValue=function(){var s=this,l=s.hasError,c=s.thrownError,d=s._value;if(l)throw c;return this._throwIfClosed(),d},a.prototype.next=function(s){i.prototype.next.call(this,this._value=s)},a})(n.Subject);e.BehaviorSubject=r}}),M2=F({"../../node_modules/rxjs/dist/cjs/internal/operators/publishBehavior.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.publishBehavior=void 0;var t=R2(),n=fx();function r(i){return function(a){var s=new t.BehaviorSubject(i);return new n.ConnectableObservable(a,function(){return s})}}e.publishBehavior=r}}),D2=F({"../../node_modules/rxjs/dist/cjs/internal/AsyncSubject.js"(e){var t=e&&e.__extends||(function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,c){l.__proto__=c}||function(l,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(l[d]=c[d])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.AsyncSubject=void 0;var n=yr(),r=(function(i){t(a,i);function a(){var s=i!==null&&i.apply(this,arguments)||this;return s._value=null,s._hasValue=!1,s._isComplete=!1,s}return a.prototype._checkFinalizedStatuses=function(s){var l=this,c=l.hasError,d=l._hasValue,f=l._value,m=l.thrownError,p=l.isStopped,O=l._isComplete;c?s.error(m):(p||O)&&(d&&s.next(f),s.complete())},a.prototype.next=function(s){this.isStopped||(this._value=s,this._hasValue=!0)},a.prototype.complete=function(){var s=this,l=s._hasValue,c=s._value,d=s._isComplete;d||(this._isComplete=!0,l&&i.prototype.next.call(this,c),i.prototype.complete.call(this))},a})(n.Subject);e.AsyncSubject=r}}),L2=F({"../../node_modules/rxjs/dist/cjs/internal/operators/publishLast.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.publishLast=void 0;var t=D2(),n=fx();function r(){return function(i){var a=new t.AsyncSubject;return new n.ConnectableObservable(i,function(){return a})}}e.publishLast=r}}),XQ=F({"../../node_modules/rxjs/dist/cjs/internal/ReplaySubject.js"(e){var t=e&&e.__extends||(function(){var a=function(s,l){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,d){c.__proto__=d}||function(c,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(c[f]=d[f])},a(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");a(s,l);function c(){this.constructor=s}s.prototype=l===null?Object.create(l):(c.prototype=l.prototype,new c)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.ReplaySubject=void 0;var n=yr(),r=nx(),i=(function(a){t(s,a);function s(l,c,d){l===void 0&&(l=1/0),c===void 0&&(c=1/0),d===void 0&&(d=r.dateTimestampProvider);var f=a.call(this)||this;return f._bufferSize=l,f._windowTime=c,f._timestampProvider=d,f._buffer=[],f._infiniteTimeWindow=!0,f._infiniteTimeWindow=c===1/0,f._bufferSize=Math.max(1,l),f._windowTime=Math.max(1,c),f}return s.prototype.next=function(l){var c=this,d=c.isStopped,f=c._buffer,m=c._infiniteTimeWindow,p=c._timestampProvider,O=c._windowTime;d||(f.push(l),!m&&f.push(p.now()+O)),this._trimBuffer(),a.prototype.next.call(this,l)},s.prototype._subscribe=function(l){this._throwIfClosed(),this._trimBuffer();for(var c=this._innerSubscribe(l),d=this,f=d._infiniteTimeWindow,m=d._buffer,p=m.slice(),O=0;O<p.length&&!l.closed;O+=f?1:2)l.next(p[O]);return this._checkFinalizedStatuses(l),c},s.prototype._trimBuffer=function(){var l=this,c=l._bufferSize,d=l._timestampProvider,f=l._buffer,m=l._infiniteTimeWindow,p=(m?1:2)*c;if(c<1/0&&p<f.length&&f.splice(0,f.length-p),!m){for(var O=d.now(),b=0,x=1;x<f.length&&f[x]<=O;x+=2)b=x;b&&f.splice(0,b+1)}},s})(n.Subject);e.ReplaySubject=i}}),z2=F({"../../node_modules/rxjs/dist/cjs/internal/operators/publishReplay.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.publishReplay=void 0;var t=XQ(),n=hx(),r=Ut();function i(a,s,l,c){l&&!r.isFunction(l)&&(c=l);var d=r.isFunction(l)?l:void 0;return function(f){return n.multicast(new t.ReplaySubject(a,s,c),d)(f)}}e.publishReplay=i}}),$2=F({"../../node_modules/rxjs/dist/cjs/internal/observable/race.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.raceInit=e.race=void 0;var t=rr(),n=ft(),r=cc(),i=Me();function a(){for(var l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];return l=r.argsOrArgArray(l),l.length===1?n.innerFrom(l[0]):new t.Observable(s(l))}e.race=a;function s(l){return function(c){for(var d=[],f=function(p){d.push(n.innerFrom(l[p]).subscribe(i.createOperatorSubscriber(c,function(O){if(d){for(var b=0;b<d.length;b++)b!==p&&d[b].unsubscribe();d=null}c.next(O)})))},m=0;d&&!c.closed&&m<l.length;m++)f(m)}}e.raceInit=s}}),ZQ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/raceWith.js"(e){var t=e&&e.__read||function(l,c){var d=typeof Symbol=="function"&&l[Symbol.iterator];if(!d)return l;var f=d.call(l),m,p=[],O;try{for(;(c===void 0||c-- >0)&&!(m=f.next()).done;)p.push(m.value)}catch(b){O={error:b}}finally{try{m&&!m.done&&(d=f.return)&&d.call(f)}finally{if(O)throw O.error}}return p},n=e&&e.__spreadArray||function(l,c){for(var d=0,f=c.length,m=l.length;d<f;d++,m++)l[m]=c[d];return l};Object.defineProperty(e,"__esModule",{value:!0}),e.raceWith=void 0;var r=$2(),i=xe(),a=br();function s(){for(var l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];return l.length?i.operate(function(d,f){r.raceInit(n([d],t(l)))(f)}):a.identity}e.raceWith=s}}),I2=F({"../../node_modules/rxjs/dist/cjs/internal/operators/repeat.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.repeat=void 0;var t=zd(),n=xe(),r=Me(),i=ft(),a=lc();function s(l){var c,d=1/0,f;return l!=null&&(typeof l=="object"?(c=l.count,d=c===void 0?1/0:c,f=l.delay):d=l),d<=0?function(){return t.EMPTY}:n.operate(function(m,p){var O=0,b,x=function(){if(b==null||b.unsubscribe(),b=null,f!=null){var k=typeof f=="number"?a.timer(f):i.innerFrom(f(O)),T=r.createOperatorSubscriber(p,function(){T.unsubscribe(),w()});k.subscribe(T)}else w()},w=function(){var k=!1;b=m.subscribe(r.createOperatorSubscriber(p,void 0,function(){++O<d?b?x():k=!0:p.complete()})),k&&x()};w()})}e.repeat=s}}),q2=F({"../../node_modules/rxjs/dist/cjs/internal/operators/repeatWhen.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.repeatWhen=void 0;var t=ft(),n=yr(),r=xe(),i=Me();function a(s){return r.operate(function(l,c){var d,f=!1,m,p=!1,O=!1,b=function(){return O&&p&&(c.complete(),!0)},x=function(){return m||(m=new n.Subject,t.innerFrom(s(m)).subscribe(i.createOperatorSubscriber(c,function(){d?w():f=!0},function(){p=!0,b()}))),m},w=function(){O=!1,d=l.subscribe(i.createOperatorSubscriber(c,void 0,function(){O=!0,!b()&&x().next()})),f&&(d.unsubscribe(),d=null,f=!1,w())};w()})}e.repeatWhen=a}}),X2=F({"../../node_modules/rxjs/dist/cjs/internal/operators/retry.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.retry=void 0;var t=xe(),n=Me(),r=br(),i=lc(),a=ft();function s(l){l===void 0&&(l=1/0);var c;l&&typeof l=="object"?c=l:c={count:l};var d=c.count,f=d===void 0?1/0:d,m=c.delay,p=c.resetOnSuccess,O=p===void 0?!1:p;return f<=0?r.identity:t.operate(function(b,x){var w=0,k,T=function(){var j=!1;k=b.subscribe(n.createOperatorSubscriber(x,function(E){O&&(w=0),x.next(E)},void 0,function(E){if(w++<f){var Q=function(){k?(k.unsubscribe(),k=null,T()):j=!0};if(m!=null){var P=typeof m=="number"?i.timer(m):a.innerFrom(m(E,w)),N=n.createOperatorSubscriber(x,function(){N.unsubscribe(),Q()},function(){x.complete()});P.subscribe(N)}else Q()}else x.error(E)})),j&&(k.unsubscribe(),k=null,T())};T()})}e.retry=s}}),Z2=F({"../../node_modules/rxjs/dist/cjs/internal/operators/retryWhen.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.retryWhen=void 0;var t=ft(),n=yr(),r=xe(),i=Me();function a(s){return r.operate(function(l,c){var d,f=!1,m,p=function(){d=l.subscribe(i.createOperatorSubscriber(c,void 0,void 0,function(O){m||(m=new n.Subject,t.innerFrom(s(m)).subscribe(i.createOperatorSubscriber(c,function(){return d?p():f=!0}))),m&&m.next(O)})),f&&(d.unsubscribe(),d=null,f=!1,p())};p()})}e.retryWhen=a}}),BQ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/sample.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sample=void 0;var t=ft(),n=xe(),r=Or(),i=Me();function a(s){return n.operate(function(l,c){var d=!1,f=null;l.subscribe(i.createOperatorSubscriber(c,function(m){d=!0,f=m})),t.innerFrom(s).subscribe(i.createOperatorSubscriber(c,function(){if(d){d=!1;var m=f;f=null,c.next(m)}},r.noop))})}e.sample=a}}),B2=F({"../../node_modules/rxjs/dist/cjs/internal/observable/interval.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.interval=void 0;var t=di(),n=lc();function r(i,a){return i===void 0&&(i=0),a===void 0&&(a=t.asyncScheduler),i<0&&(i=0),n.timer(i,i,a)}e.interval=r}}),V2=F({"../../node_modules/rxjs/dist/cjs/internal/operators/sampleTime.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sampleTime=void 0;var t=di(),n=BQ(),r=B2();function i(a,s){return s===void 0&&(s=t.asyncScheduler),n.sample(r.interval(a,s))}e.sampleTime=i}}),U2=F({"../../node_modules/rxjs/dist/cjs/internal/operators/scan.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.scan=void 0;var t=xe(),n=wQ();function r(i,a){return t.operate(n.scanInternals(i,a,arguments.length>=2,!0))}e.scan=r}}),Y2=F({"../../node_modules/rxjs/dist/cjs/internal/operators/sequenceEqual.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sequenceEqual=void 0;var t=xe(),n=Me(),r=ft();function i(s,l){return l===void 0&&(l=function(c,d){return c===d}),t.operate(function(c,d){var f=a(),m=a(),p=function(b){d.next(b),d.complete()},O=function(b,x){var w=n.createOperatorSubscriber(d,function(k){var T=x.buffer,j=x.complete;T.length===0?j?p(!1):b.buffer.push(k):!l(k,T.shift())&&p(!1)},function(){b.complete=!0;var k=x.complete,T=x.buffer;k&&p(T.length===0),w==null||w.unsubscribe()});return w};c.subscribe(O(f,m)),r.innerFrom(s).subscribe(O(m,f))})}e.sequenceEqual=i;function a(){return{buffer:[],complete:!1}}}}),VQ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/share.js"(e){var t=e&&e.__read||function(d,f){var m=typeof Symbol=="function"&&d[Symbol.iterator];if(!m)return d;var p=m.call(d),O,b=[],x;try{for(;(f===void 0||f-- >0)&&!(O=p.next()).done;)b.push(O.value)}catch(w){x={error:w}}finally{try{O&&!O.done&&(m=p.return)&&m.call(p)}finally{if(x)throw x.error}}return b},n=e&&e.__spreadArray||function(d,f){for(var m=0,p=f.length,O=d.length;m<p;m++,O++)d[O]=f[m];return d};Object.defineProperty(e,"__esModule",{value:!0}),e.share=void 0;var r=ft(),i=yr(),a=K0(),s=xe();function l(d){d===void 0&&(d={});var f=d.connector,m=f===void 0?function(){return new i.Subject}:f,p=d.resetOnError,O=p===void 0?!0:p,b=d.resetOnComplete,x=b===void 0?!0:b,w=d.resetOnRefCountZero,k=w===void 0?!0:w;return function(T){var j,E,Q,P=0,N=!1,D=!1,L=function(){E==null||E.unsubscribe(),E=void 0},A=function(){L(),j=Q=void 0,N=D=!1},X=function(){var Z=j;A(),Z==null||Z.unsubscribe()};return s.operate(function(Z,V){P++,!D&&!N&&L();var $=Q=Q??m();V.add(function(){P--,P===0&&!D&&!N&&(E=c(X,k))}),$.subscribe(V),!j&&P>0&&(j=new a.SafeSubscriber({next:function(W){return $.next(W)},error:function(W){D=!0,L(),E=c(A,O,W),$.error(W)},complete:function(){N=!0,L(),E=c(A,x),$.complete()}}),r.innerFrom(Z).subscribe(j))})(T)}}e.share=l;function c(d,f){for(var m=[],p=2;p<arguments.length;p++)m[p-2]=arguments[p];if(f===!0){d();return}if(f!==!1){var O=new a.SafeSubscriber({next:function(){O.unsubscribe(),d()}});return r.innerFrom(f.apply(void 0,n([],t(m)))).subscribe(O)}}}}),W2=F({"../../node_modules/rxjs/dist/cjs/internal/operators/shareReplay.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.shareReplay=void 0;var t=XQ(),n=VQ();function r(i,a,s){var l,c,d,f,m=!1;return i&&typeof i=="object"?(l=i.bufferSize,f=l===void 0?1/0:l,c=i.windowTime,a=c===void 0?1/0:c,d=i.refCount,m=d===void 0?!1:d,s=i.scheduler):f=i??1/0,n.share({connector:function(){return new t.ReplaySubject(f,a,s)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:m})}e.shareReplay=r}}),F2=F({"../../node_modules/rxjs/dist/cjs/internal/util/SequenceError.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SequenceError=void 0;var t=zo();e.SequenceError=t.createErrorClass(function(n){return function(i){n(this),this.name="SequenceError",this.message=i}})}}),H2=F({"../../node_modules/rxjs/dist/cjs/internal/util/NotFoundError.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NotFoundError=void 0;var t=zo();e.NotFoundError=t.createErrorClass(function(n){return function(i){n(this),this.name="NotFoundError",this.message=i}})}}),G2=F({"../../node_modules/rxjs/dist/cjs/internal/operators/single.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.single=void 0;var t=dp(),n=F2(),r=H2(),i=xe(),a=Me();function s(l){return i.operate(function(c,d){var f=!1,m,p=!1,O=0;c.subscribe(a.createOperatorSubscriber(d,function(b){p=!0,(!l||l(b,O++,c))&&(f&&d.error(new n.SequenceError("Too many matching values")),f=!0,m=b)},function(){f?(d.next(m),d.complete()):d.error(p?new r.NotFoundError("No matching values"):new t.EmptyError)}))})}e.single=s}}),K2=F({"../../node_modules/rxjs/dist/cjs/internal/operators/skip.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.skip=void 0;var t=uc();function n(r){return t.filter(function(i,a){return r<=a})}e.skip=n}}),J2=F({"../../node_modules/rxjs/dist/cjs/internal/operators/skipLast.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.skipLast=void 0;var t=br(),n=xe(),r=Me();function i(a){return a<=0?t.identity:n.operate(function(s,l){var c=new Array(a),d=0;return s.subscribe(r.createOperatorSubscriber(l,function(f){var m=d++;if(m<a)c[m]=f;else{var p=m%a,O=c[p];c[p]=f,l.next(O)}})),function(){c=null}})}e.skipLast=i}}),eZ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/skipUntil.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.skipUntil=void 0;var t=xe(),n=Me(),r=ft(),i=Or();function a(s){return t.operate(function(l,c){var d=!1,f=n.createOperatorSubscriber(c,function(){f==null||f.unsubscribe(),d=!0},i.noop);r.innerFrom(s).subscribe(f),l.subscribe(n.createOperatorSubscriber(c,function(m){return d&&c.next(m)}))})}e.skipUntil=a}}),tZ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/skipWhile.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.skipWhile=void 0;var t=xe(),n=Me();function r(i){return t.operate(function(a,s){var l=!1,c=0;a.subscribe(n.createOperatorSubscriber(s,function(d){return(l||(l=!i(d,c++)))&&s.next(d)}))})}e.skipWhile=r}}),nZ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/startWith.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.startWith=void 0;var t=dx(),n=Ai(),r=xe();function i(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];var l=n.popScheduler(a);return r.operate(function(c,d){(l?t.concat(a,c,l):t.concat(a,c)).subscribe(d)})}e.startWith=i}}),hp=F({"../../node_modules/rxjs/dist/cjs/internal/operators/switchMap.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.switchMap=void 0;var t=ft(),n=xe(),r=Me();function i(a,s){return n.operate(function(l,c){var d=null,f=0,m=!1,p=function(){return m&&!d&&c.complete()};l.subscribe(r.createOperatorSubscriber(c,function(O){d==null||d.unsubscribe();var b=0,x=f++;t.innerFrom(a(O,x)).subscribe(d=r.createOperatorSubscriber(c,function(w){return c.next(s?s(O,w,x,b++):w)},function(){d=null,p()}))},function(){m=!0,p()}))})}e.switchMap=i}}),rZ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/switchAll.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.switchAll=void 0;var t=hp(),n=br();function r(){return t.switchMap(n.identity)}e.switchAll=r}}),iZ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/switchMapTo.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.switchMapTo=void 0;var t=hp(),n=Ut();function r(i,a){return n.isFunction(a)?t.switchMap(function(){return i},a):t.switchMap(function(){return i})}e.switchMapTo=r}}),aZ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/switchScan.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.switchScan=void 0;var t=hp(),n=xe();function r(i,a){return n.operate(function(s,l){var c=a;return t.switchMap(function(d,f){return i(c,d,f)},function(d,f){return c=f,f})(s).subscribe(l),function(){c=null}})}e.switchScan=r}}),sZ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/takeUntil.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.takeUntil=void 0;var t=xe(),n=Me(),r=ft(),i=Or();function a(s){return t.operate(function(l,c){r.innerFrom(s).subscribe(n.createOperatorSubscriber(c,function(){return c.complete()},i.noop)),!c.closed&&l.subscribe(c)})}e.takeUntil=a}}),oZ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/takeWhile.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.takeWhile=void 0;var t=xe(),n=Me();function r(i,a){return a===void 0&&(a=!1),t.operate(function(s,l){var c=0;s.subscribe(n.createOperatorSubscriber(l,function(d){var f=i(d,c++);(f||a)&&l.next(d),!f&&l.complete()}))})}e.takeWhile=r}}),lZ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/tap.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.tap=void 0;var t=Ut(),n=xe(),r=Me(),i=br();function a(s,l,c){var d=t.isFunction(s)||l||c?{next:s,error:l,complete:c}:s;return d?n.operate(function(f,m){var p;(p=d.subscribe)===null||p===void 0||p.call(d);var O=!0;f.subscribe(r.createOperatorSubscriber(m,function(b){var x;(x=d.next)===null||x===void 0||x.call(d,b),m.next(b)},function(){var b;O=!1,(b=d.complete)===null||b===void 0||b.call(d),m.complete()},function(b){var x;O=!1,(x=d.error)===null||x===void 0||x.call(d,b),m.error(b)},function(){var b,x;O&&((b=d.unsubscribe)===null||b===void 0||b.call(d)),(x=d.finalize)===null||x===void 0||x.call(d)}))}):i.identity}e.tap=a}}),UQ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/throttle.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.throttle=void 0;var t=xe(),n=Me(),r=ft();function i(a,s){return t.operate(function(l,c){var d=s??{},f=d.leading,m=f===void 0?!0:f,p=d.trailing,O=p===void 0?!1:p,b=!1,x=null,w=null,k=!1,T=function(){w==null||w.unsubscribe(),w=null,O&&(Q(),k&&c.complete())},j=function(){w=null,k&&c.complete()},E=function(P){return w=r.innerFrom(a(P)).subscribe(n.createOperatorSubscriber(c,T,j))},Q=function(){if(b){b=!1;var P=x;x=null,c.next(P),!k&&E(P)}};l.subscribe(n.createOperatorSubscriber(c,function(P){b=!0,x=P,!(w&&!w.closed)&&(m?Q():E(P))},function(){k=!0,!(O&&b&&w&&!w.closed)&&c.complete()}))})}e.throttle=i}}),cZ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/throttleTime.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.throttleTime=void 0;var t=di(),n=UQ(),r=lc();function i(a,s,l){s===void 0&&(s=t.asyncScheduler);var c=r.timer(a,s);return n.throttle(function(){return c},l)}e.throttleTime=i}}),uZ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/timeInterval.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TimeInterval=e.timeInterval=void 0;var t=di(),n=xe(),r=Me();function i(s){return s===void 0&&(s=t.asyncScheduler),n.operate(function(l,c){var d=s.now();l.subscribe(r.createOperatorSubscriber(c,function(f){var m=s.now(),p=m-d;d=m,c.next(new a(f,p))}))})}e.timeInterval=i;var a=(function(){function s(l,c){this.value=l,this.interval=c}return s})();e.TimeInterval=a}}),YQ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/timeout.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.timeout=e.TimeoutError=void 0;var t=di(),n=rx(),r=xe(),i=ft(),a=zo(),s=Me(),l=qs();e.TimeoutError=a.createErrorClass(function(f){return function(p){p===void 0&&(p=null),f(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=p}});function c(f,m){var p=n.isValidDate(f)?{first:f}:typeof f=="number"?{each:f}:f,O=p.first,b=p.each,x=p.with,w=x===void 0?d:x,k=p.scheduler,T=k===void 0?m??t.asyncScheduler:k,j=p.meta,E=j===void 0?null:j;if(O==null&&b==null)throw new TypeError("No timeout provided.");return r.operate(function(Q,P){var N,D,L=null,A=0,X=function(Z){D=l.executeSchedule(P,T,function(){try{N.unsubscribe(),i.innerFrom(w({meta:E,lastValue:L,seen:A})).subscribe(P)}catch(V){P.error(V)}},Z)};N=Q.subscribe(s.createOperatorSubscriber(P,function(Z){D==null||D.unsubscribe(),A++,P.next(L=Z),b>0&&X(b)},void 0,void 0,function(){D!=null&&D.closed||D==null||D.unsubscribe(),L=null})),!A&&X(O!=null?typeof O=="number"?O:+O-T.now():b)})}e.timeout=c;function d(f){throw new e.TimeoutError(f)}}}),dZ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/timeoutWith.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.timeoutWith=void 0;var t=di(),n=rx(),r=YQ();function i(a,s,l){var c,d,f;if(l=l??t.async,n.isValidDate(a)?c=a:typeof a=="number"&&(d=a),s)f=function(){return s};else throw new TypeError("No observable provided to switch to");if(c==null&&d==null)throw new TypeError("No timeout provided.");return r.timeout({first:c,each:d,scheduler:l,with:f})}e.timeoutWith=i}}),fZ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/timestamp.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.timestamp=void 0;var t=nx(),n=$o();function r(i){return i===void 0&&(i=t.dateTimestampProvider),n.map(function(a){return{value:a,timestamp:i.now()}})}e.timestamp=r}}),hZ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/window.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.window=void 0;var t=yr(),n=xe(),r=Me(),i=Or(),a=ft();function s(l){return n.operate(function(c,d){var f=new t.Subject;d.next(f.asObservable());var m=function(p){f.error(p),d.error(p)};return c.subscribe(r.createOperatorSubscriber(d,function(p){return f==null?void 0:f.next(p)},function(){f.complete(),d.complete()},m)),a.innerFrom(l).subscribe(r.createOperatorSubscriber(d,function(){f.complete(),d.next(f=new t.Subject)},i.noop,m)),function(){f==null||f.unsubscribe(),f=null}})}e.window=s}}),mZ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/windowCount.js"(e){var t=e&&e.__values||function(s){var l=typeof Symbol=="function"&&Symbol.iterator,c=l&&s[l],d=0;if(c)return c.call(s);if(s&&typeof s.length=="number")return{next:function(){return s&&d>=s.length&&(s=void 0),{value:s&&s[d++],done:!s}}};throw new TypeError(l?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.windowCount=void 0;var n=yr(),r=xe(),i=Me();function a(s,l){l===void 0&&(l=0);var c=l>0?l:s;return r.operate(function(d,f){var m=[new n.Subject],p=0;f.next(m[0].asObservable()),d.subscribe(i.createOperatorSubscriber(f,function(O){var b,x;try{for(var w=t(m),k=w.next();!k.done;k=w.next()){var T=k.value;T.next(O)}}catch(Q){b={error:Q}}finally{try{k&&!k.done&&(x=w.return)&&x.call(w)}finally{if(b)throw b.error}}var j=p-s+1;if(j>=0&&j%c===0&&m.shift().complete(),++p%c===0){var E=new n.Subject;m.push(E),f.next(E.asObservable())}},function(){for(;m.length>0;)m.shift().complete();f.complete()},function(O){for(;m.length>0;)m.shift().error(O);f.error(O)},function(){m=null}))})}e.windowCount=a}}),pZ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/windowTime.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.windowTime=void 0;var t=yr(),n=di(),r=Da(),i=xe(),a=Me(),s=Is(),l=Ai(),c=qs();function d(f){for(var m,p,O=[],b=1;b<arguments.length;b++)O[b-1]=arguments[b];var x=(m=l.popScheduler(O))!==null&&m!==void 0?m:n.asyncScheduler,w=(p=O[0])!==null&&p!==void 0?p:null,k=O[1]||1/0;return i.operate(function(T,j){var E=[],Q=!1,P=function(A){var X=A.window,Z=A.subs;X.complete(),Z.unsubscribe(),s.arrRemove(E,A),Q&&N()},N=function(){if(E){var A=new r.Subscription;j.add(A);var X=new t.Subject,Z={window:X,subs:A,seen:0};E.push(Z),j.next(X.asObservable()),c.executeSchedule(A,x,function(){return P(Z)},f)}};w!==null&&w>=0?c.executeSchedule(j,x,N,w,!0):Q=!0,N();var D=function(A){return E.slice().forEach(A)},L=function(A){D(function(X){var Z=X.window;return A(Z)}),A(j),j.unsubscribe()};return T.subscribe(a.createOperatorSubscriber(j,function(A){D(function(X){X.window.next(A),k<=++X.seen&&P(X)})},function(){return L(function(A){return A.complete()})},function(A){return L(function(X){return X.error(A)})})),function(){E=null}})}e.windowTime=d}}),gZ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/windowToggle.js"(e){var t=e&&e.__values||function(f){var m=typeof Symbol=="function"&&Symbol.iterator,p=m&&f[m],O=0;if(p)return p.call(f);if(f&&typeof f.length=="number")return{next:function(){return f&&O>=f.length&&(f=void 0),{value:f&&f[O++],done:!f}}};throw new TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.windowToggle=void 0;var n=yr(),r=Da(),i=xe(),a=ft(),s=Me(),l=Or(),c=Is();function d(f,m){return i.operate(function(p,O){var b=[],x=function(w){for(;0<b.length;)b.shift().error(w);O.error(w)};a.innerFrom(f).subscribe(s.createOperatorSubscriber(O,function(w){var k=new n.Subject;b.push(k);var T=new r.Subscription,j=function(){c.arrRemove(b,k),k.complete(),T.unsubscribe()},E;try{E=a.innerFrom(m(w))}catch(Q){x(Q);return}O.next(k.asObservable()),T.add(E.subscribe(s.createOperatorSubscriber(O,j,l.noop,x)))},l.noop)),p.subscribe(s.createOperatorSubscriber(O,function(w){var k,T,j=b.slice();try{for(var E=t(j),Q=E.next();!Q.done;Q=E.next()){var P=Q.value;P.next(w)}}catch(N){k={error:N}}finally{try{Q&&!Q.done&&(T=E.return)&&T.call(E)}finally{if(k)throw k.error}}},function(){for(;0<b.length;)b.shift().complete();O.complete()},x,function(){for(;0<b.length;)b.shift().unsubscribe()}))})}e.windowToggle=d}}),vZ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/windowWhen.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.windowWhen=void 0;var t=yr(),n=xe(),r=Me(),i=ft();function a(s){return n.operate(function(l,c){var d,f,m=function(O){d.error(O),c.error(O)},p=function(){f==null||f.unsubscribe(),d==null||d.complete(),d=new t.Subject,c.next(d.asObservable());var O;try{O=i.innerFrom(s())}catch(b){m(b);return}O.subscribe(f=r.createOperatorSubscriber(c,p,p,m))};p(),l.subscribe(r.createOperatorSubscriber(c,function(O){return d.next(O)},function(){d.complete(),c.complete()},m,function(){f==null||f.unsubscribe(),d=null}))})}e.windowWhen=a}}),OZ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/withLatestFrom.js"(e){var t=e&&e.__read||function(f,m){var p=typeof Symbol=="function"&&f[Symbol.iterator];if(!p)return f;var O=p.call(f),b,x=[],w;try{for(;(m===void 0||m-- >0)&&!(b=O.next()).done;)x.push(b.value)}catch(k){w={error:k}}finally{try{b&&!b.done&&(p=O.return)&&p.call(O)}finally{if(w)throw w.error}}return x},n=e&&e.__spreadArray||function(f,m){for(var p=0,O=m.length,b=f.length;p<O;p++,b++)f[b]=m[p];return f};Object.defineProperty(e,"__esModule",{value:!0}),e.withLatestFrom=void 0;var r=xe(),i=Me(),a=ft(),s=br(),l=Or(),c=Ai();function d(){for(var f=[],m=0;m<arguments.length;m++)f[m]=arguments[m];var p=c.popResultSelector(f);return r.operate(function(O,b){for(var x=f.length,w=new Array(x),k=f.map(function(){return!1}),T=!1,j=function(Q){a.innerFrom(f[Q]).subscribe(i.createOperatorSubscriber(b,function(P){w[Q]=P,!T&&!k[Q]&&(k[Q]=!0,(T=k.every(s.identity))&&(k=null))},l.noop))},E=0;E<x;E++)j(E);O.subscribe(i.createOperatorSubscriber(b,function(Q){if(T){var P=n([Q],t(w));b.next(p?p.apply(void 0,n([],t(P))):P)}}))})}e.withLatestFrom=d}}),WQ=F({"../../node_modules/rxjs/dist/cjs/internal/observable/zip.js"(e){var t=e&&e.__read||function(f,m){var p=typeof Symbol=="function"&&f[Symbol.iterator];if(!p)return f;var O=p.call(f),b,x=[],w;try{for(;(m===void 0||m-- >0)&&!(b=O.next()).done;)x.push(b.value)}catch(k){w={error:k}}finally{try{b&&!b.done&&(p=O.return)&&p.call(O)}finally{if(w)throw w.error}}return x},n=e&&e.__spreadArray||function(f,m){for(var p=0,O=m.length,b=f.length;p<O;p++,b++)f[b]=m[p];return f};Object.defineProperty(e,"__esModule",{value:!0}),e.zip=void 0;var r=rr(),i=ft(),a=cc(),s=zd(),l=Me(),c=Ai();function d(){for(var f=[],m=0;m<arguments.length;m++)f[m]=arguments[m];var p=c.popResultSelector(f),O=a.argsOrArgArray(f);return O.length?new r.Observable(function(b){var x=O.map(function(){return[]}),w=O.map(function(){return!1});b.add(function(){x=w=null});for(var k=function(j){i.innerFrom(O[j]).subscribe(l.createOperatorSubscriber(b,function(E){if(x[j].push(E),x.every(function(P){return P.length})){var Q=x.map(function(P){return P.shift()});b.next(p?p.apply(void 0,n([],t(Q))):Q),x.some(function(P,N){return!P.length&&w[N]})&&b.complete()}},function(){w[j]=!0,!x[j].length&&b.complete()}))},T=0;!b.closed&&T<O.length;T++)k(T);return function(){x=w=null}}):s.EMPTY}e.zip=d}}),bZ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/zipAll.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.zipAll=void 0;var t=WQ(),n=kQ();function r(i){return n.joinAllInternals(t.zip,i)}e.zipAll=r}}),FQ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/zip.js"(e){var t=e&&e.__read||function(s,l){var c=typeof Symbol=="function"&&s[Symbol.iterator];if(!c)return s;var d=c.call(s),f,m=[],p;try{for(;(l===void 0||l-- >0)&&!(f=d.next()).done;)m.push(f.value)}catch(O){p={error:O}}finally{try{f&&!f.done&&(c=d.return)&&c.call(d)}finally{if(p)throw p.error}}return m},n=e&&e.__spreadArray||function(s,l){for(var c=0,d=l.length,f=s.length;c<d;c++,f++)s[f]=l[c];return s};Object.defineProperty(e,"__esModule",{value:!0}),e.zip=void 0;var r=WQ(),i=xe();function a(){for(var s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];return i.operate(function(c,d){r.zip.apply(void 0,n([c],t(s))).subscribe(d)})}e.zip=a}}),yZ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/zipWith.js"(e){var t=e&&e.__read||function(a,s){var l=typeof Symbol=="function"&&a[Symbol.iterator];if(!l)return a;var c=l.call(a),d,f=[],m;try{for(;(s===void 0||s-- >0)&&!(d=c.next()).done;)f.push(d.value)}catch(p){m={error:p}}finally{try{d&&!d.done&&(l=c.return)&&l.call(c)}finally{if(m)throw m.error}}return f},n=e&&e.__spreadArray||function(a,s){for(var l=0,c=s.length,d=a.length;l<c;l++,d++)a[d]=s[l];return a};Object.defineProperty(e,"__esModule",{value:!0}),e.zipWith=void 0;var r=FQ();function i(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return r.zip.apply(void 0,n([],t(a)))}e.zipWith=i}}),xZ=F({"../../node_modules/rxjs/dist/cjs/internal/util/not.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.not=void 0;function t(n,r){return function(i,a){return!n.call(r,i,a)}}e.not=t}}),SZ=class{constructor(){if(typeof window>"u")throw new Error('WebBrowserStorage is client-only. It must not be constructed on the server — a single process-wide instance would leak tokens between HTTP requests. Wrap any code path that constructs this in "use client".')}get(e){return localStorage.getItem(e)}set(e,t){localStorage.setItem(e,t)}delete(e){localStorage.removeItem(e)}subscribe(e){const t=n=>{n.key!==null&&e(n.key,n.newValue)};return window.addEventListener("storage",t),()=>{window.removeEventListener("storage",t)}}},HQ=_.createContext(null);function Xae({browser:e,children:t}){const n=_.useMemo(()=>e??gX({storage:new SZ}),[e]);return g.jsx(HQ.Provider,{value:n,children:t})}function at(){const e=_.useContext(HQ);if(!e)throw new Error("useSemiont must be used within a <SemiontProvider>");return e}var wZ={success:g.jsx("svg",{className:"semiont-toast-icon",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),error:g.jsx("svg",{className:"semiont-toast-icon",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),warning:g.jsx("svg",{className:"semiont-toast-icon",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),info:g.jsx("svg",{className:"semiont-toast-icon",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})};function _Z({toast:e,onClose:t}){return _.useEffect(()=>{const n=setTimeout(()=>{t(e.id)},e.duration||3e3);return()=>clearTimeout(n)},[e,t]),g.jsxs("div",{className:"semiont-toast","data-variant":e.type,role:"alert",children:[g.jsx("div",{className:"semiont-toast-icon-wrapper",children:wZ[e.type]}),g.jsx("p",{className:"semiont-toast-message",children:e.message}),g.jsx("button",{onClick:()=>t(e.id),className:"semiont-toast-close","aria-label":"Close",children:g.jsx("svg",{className:"semiont-toast-close-icon",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})}function kZ({toasts:e,onClose:t}){const[n,r]=_.useState(!1);return _.useEffect(()=>(r(!0),()=>r(!1)),[]),n?yo.createPortal(g.jsx("div",{className:"semiont-toast-container",children:e.map(i=>g.jsx(_Z,{toast:i,onClose:t},i.id))}),document.body):null}var GQ=ue.createContext(void 0);function Zae({children:e}){const[t,n]=_.useState([]),r=ue.useCallback((f,m="info",p)=>{const O=Date.now().toString(),b=p!==void 0?{id:O,message:f,type:m,duration:p}:{id:O,message:f,type:m};n(x=>[...x,b])},[]),i=ue.useCallback((f,m)=>r(f,"success",m),[r]),a=ue.useCallback((f,m)=>r(f,"error",m),[r]),s=ue.useCallback((f,m)=>r(f,"warning",m),[r]),l=ue.useCallback((f,m)=>r(f,"info",m),[r]),c=ue.useCallback(f=>{n(m=>m.filter(p=>p.id!==f))},[]),d=ue.useMemo(()=>({showToast:r,showSuccess:i,showError:a,showWarning:s,showInfo:l}),[r,i,a,s,l]);return g.jsxs(GQ.Provider,{value:d,children:[e,g.jsx(kZ,{toasts:t,onClose:c})]})}function KQ(){const e=ue.useContext(GQ);if(e===void 0)throw new Error("useToast must be used within a ToastProvider");return e}var jZ=Iz({"../../translations/ar.json":()=>Qe(()=>import("./ar-3W37O3R3-BJ1fDUvB.js"),[]),"../../translations/bn.json":()=>Qe(()=>import("./bn-JZTJLMVE-k1gI6ffq.js"),[]),"../../translations/cs.json":()=>Qe(()=>import("./cs-XYHH7HNE-BqQWIWM9.js"),[]),"../../translations/da.json":()=>Qe(()=>import("./da-MZKIECVT-pufSb0d_.js"),[]),"../../translations/de.json":()=>Qe(()=>import("./de-AYXTMRQW-BRMduIa0.js"),[]),"../../translations/el.json":()=>Qe(()=>import("./el-A6CVQWAW-DycBhXUi.js"),[]),"../../translations/en.json":()=>Qe(()=>Promise.resolve().then(()=>kae),void 0),"../../translations/es.json":()=>Qe(()=>import("./es-M2HXLJGT-BFQ6WIpw.js"),[]),"../../translations/fa.json":()=>Qe(()=>import("./fa-V6JZJDYP-C8CwCeSd.js"),[]),"../../translations/fi.json":()=>Qe(()=>import("./fi-ONDTZ5H7-aby5--Ip.js"),[]),"../../translations/fr.json":()=>Qe(()=>import("./fr-PAPV4H4G-D9SFT8MA.js"),[]),"../../translations/he.json":()=>Qe(()=>import("./he-F6VTLJLW-B8Rc1C-m.js"),[]),"../../translations/hi.json":()=>Qe(()=>import("./hi-CFUAV4BF-CuWy2y7I.js"),[]),"../../translations/id.json":()=>Qe(()=>import("./id-NBKLCCI7-DnMwKKq7.js"),[]),"../../translations/it.json":()=>Qe(()=>import("./it-SLSOWVVU-hrlm8f9F.js"),[]),"../../translations/ja.json":()=>Qe(()=>import("./ja-L5IG4ECE-BvMVB5sy.js"),[]),"../../translations/ko.json":()=>Qe(()=>import("./ko-QYMTULKK-CNEZe0oy.js"),[]),"../../translations/ms.json":()=>Qe(()=>import("./ms-5DGSFKM2-BlyezW6W.js"),[]),"../../translations/nl.json":()=>Qe(()=>import("./nl-VZPCGONO-BJ0llUPS.js"),[]),"../../translations/no.json":()=>Qe(()=>import("./no-MF6F352I-Wf2ZNjHx.js"),[]),"../../translations/pl.json":()=>Qe(()=>import("./pl-WIK72JUO-wOGg7Me5.js"),[]),"../../translations/pt.json":()=>Qe(()=>import("./pt-RRP5ZF6A-C32Vedhv.js"),[]),"../../translations/ro.json":()=>Qe(()=>import("./ro-XHQLC3T7-uGs3uHRp.js"),[]),"../../translations/sv.json":()=>Qe(()=>import("./sv-EWULDN6E-CkRBfwt9.js"),[]),"../../translations/th.json":()=>Qe(()=>import("./th-TGOBHFG4-BGt_aO5K.js"),[]),"../../translations/tr.json":()=>Qe(()=>import("./tr-LMMPBMV7-CrGE1PKA.js"),[]),"../../translations/uk.json":()=>Qe(()=>import("./uk-IPGRRJY6-CPaxgpd8.js"),[]),"../../translations/vi.json":()=>Qe(()=>import("./vi-Q676OJQS-DpyIm6R1.js"),[]),"../../translations/zh.json":()=>Qe(()=>import("./zh-F3MTWQDX-C09t_PFf.js"),[])}),nm=_.createContext(null),yh=new Map;function mx(e,t){const n=e.match(/\{(\w+),\s*plural,\s*/);if(!n)return e;const r=n[1],i=t[r];if(i===void 0)return e;let a=n[0].length,s=1,l=a;for(let b=a;b<e.length;b++)if(e[b]==="{")s++;else if(e[b]==="}"&&(s--,s===0)){l=b;break}const c=e.substring(a,l),d={},f=/(?:=(\d+)|(\w+))\s*\{([^}]+)\}/g;let m;for(;(m=f.exec(c))!==null;){const[,b,x,w]=m,k=b!==void 0?`=${b}`:x;d[k]=w}const p=d[`=${i}`];if(p!==void 0){const b=p.replace(/#/g,String(i));return e.substring(0,n.index)+b+e.substring(l+1)}const O=d.other;if(O!==void 0){const b=O.replace(/#/g,String(i));return e.substring(0,n.index)+b+e.substring(l+1)}return e}async function TZ(e){if(yh.has(e))return yh.get(e);if(e==="en")return yh.set("en",ko),ko;try{const t=await jZ(`../../translations/${e}.json`),n=t.default||t;return yh.set(e,n),n}catch(t){return console.error(`Failed to load translations for locale: ${e}`,t),ko}}var CZ={t:(e,t,n)=>{var a;const i=(a=ko[e])==null?void 0:a[t];if(!i)return console.warn(`Translation not found for ${e}.${t}`),`${e}.${t}`;if(n&&typeof i=="string"){let s=i;return s=mx(s,n),Object.entries(n).forEach(([l,c])=>{s=s.replace(new RegExp(`\\{\\{${l}\\}\\}`,"g"),String(c))}),s}return i}};function Bae({translationManager:e,locale:t,loadingComponent:n=null,children:r}){const[i,a]=_.useState(null),[s,l]=_.useState(!1);_.useEffect(()=>{t&&!e&&(l(!0),TZ(t).then(d=>{a(d),l(!1)}).catch(d=>{console.error("Failed to load translations:",d),a(ko),l(!1)}))},[t,e]);const c=_.useMemo(()=>i?{t:(d,f,m)=>{var O;const p=(O=i[d])==null?void 0:O[f];if(!p)return console.warn(`Translation not found for ${d}.${f} in locale ${t}`),`${d}.${f}`;if(m&&typeof p=="string"){let b=p;return b=mx(b,m),Object.entries(m).forEach(([x,w])=>{b=b.replace(new RegExp(`\\{\\{${x}\\}\\}`,"g"),String(w))}),b}return p}}:null,[i,t]);return e?g.jsx(nm.Provider,{value:e,children:r}):t&&s?g.jsx(g.Fragment,{children:n}):t&&c?g.jsx(nm.Provider,{value:c,children:r}):g.jsx(nm.Provider,{value:CZ,children:r})}function cn(e){const t=_.useContext(nm);return t?(n,r)=>t.t(e,n,r):(n,r)=>{var s;const a=(s=ko[e])==null?void 0:s[n];if(!a)return console.warn(`Translation not found for ${e}.${n}`),`${e}.${n}`;if(r&&typeof a=="string"){let l=a;return l=mx(l,r),Object.entries(r).forEach(([c,d])=>{l=l.replace(new RegExp(`\\{\\{${c}\\}\\}`,"g"),String(d))}),l}return a}}const EZ=_.createContext(null),bO={didCatch:!1,error:null};let AZ=class extends _.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=bO}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var n,r,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];(n=(r=this.props).onReset)===null||n===void 0||n.call(r,{args:a,reason:"imperative-api"}),this.setState(bO)}}componentDidCatch(t,n){var r,i;(r=(i=this.props).onError)===null||r===void 0||r.call(i,t,n)}componentDidUpdate(t,n){const{didCatch:r}=this.state,{resetKeys:i}=this.props;if(r&&n.error!==null&&QZ(t.resetKeys,i)){var a,s;(a=(s=this.props).onReset)===null||a===void 0||a.call(s,{next:i,prev:t.resetKeys,reason:"keys"}),this.setState(bO)}}render(){const{children:t,fallbackRender:n,FallbackComponent:r,fallback:i}=this.props,{didCatch:a,error:s}=this.state;let l=t;if(a){const c={error:s,resetErrorBoundary:this.resetErrorBoundary};if(typeof n=="function")l=n(c);else if(r)l=_.createElement(r,c);else if(i!==void 0)l=i;else throw s}return _.createElement(EZ.Provider,{value:{didCatch:a,error:s,resetErrorBoundary:this.resetErrorBoundary}},l)}};function QZ(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((n,r)=>!Object.is(n,t[r]))}var yO={exports:{}},xO={};/**
|
|
41
|
-
* @license React
|
|
42
|
-
* use-sync-external-store-with-selector.production.js
|
|
43
|
-
*
|
|
44
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
45
|
-
*
|
|
46
|
-
* This source code is licensed under the MIT license found in the
|
|
47
|
-
* LICENSE file in the root directory of this source tree.
|
|
48
|
-
*/var Gk;function PZ(){if(Gk)return xO;Gk=1;var e=AE();function t(c,d){return c===d&&(c!==0||1/c===1/d)||c!==c&&d!==d}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;return xO.useSyncExternalStoreWithSelector=function(c,d,f,m,p){var O=i(null);if(O.current===null){var b={hasValue:!1,value:null};O.current=b}else b=O.current;O=s(function(){function w(Q){if(!k){if(k=!0,T=Q,Q=m(Q),p!==void 0&&b.hasValue){var P=b.value;if(p(P,Q))return j=P}return j=Q}if(P=j,n(T,Q))return P;var N=m(Q);return p!==void 0&&p(P,N)?(T=Q,P):(T=Q,j=N)}var k=!1,T,j,E=f===void 0?null:f;return[function(){return w(d())},E===null?void 0:function(){return w(E())}]},[d,f,m,p]);var x=r(c,O[0],O[1]);return a(function(){b.hasValue=!0,b.value=x},[x]),l(x),x},xO}var Kk;function NZ(){return Kk||(Kk=1,yO.exports=PZ()),yO.exports}var RZ=NZ();const Zi={};var SO={exports:{}},Jk;function MZ(){if(Jk)return SO.exports;Jk=1;var e=SO.exports={},t,n;function r(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?t=setTimeout:t=r}catch{t=r}try{typeof clearTimeout=="function"?n=clearTimeout:n=i}catch{n=i}})();function a(x){if(t===setTimeout)return setTimeout(x,0);if((t===r||!t)&&setTimeout)return t=setTimeout,setTimeout(x,0);try{return t(x,0)}catch{try{return t.call(null,x,0)}catch{return t.call(this,x,0)}}}function s(x){if(n===clearTimeout)return clearTimeout(x);if((n===i||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(x);try{return n(x)}catch{try{return n.call(null,x)}catch{return n.call(this,x)}}}var l=[],c=!1,d,f=-1;function m(){!c||!d||(c=!1,d.length?l=d.concat(l):f=-1,l.length&&p())}function p(){if(!c){var x=a(m);c=!0;for(var w=l.length;w;){for(d=l,l=[];++f<w;)d&&d[f].run();f=-1,w=l.length}d=null,c=!1,s(x)}}e.nextTick=function(x){var w=new Array(arguments.length-1);if(arguments.length>1)for(var k=1;k<arguments.length;k++)w[k-1]=arguments[k];l.push(new O(x,w)),l.length===1&&!c&&a(p)};function O(x,w){this.fun=x,this.array=w}O.prototype.run=function(){this.fun.apply(null,this.array)},e.title="browser",e.browser=!0,e.env={},e.argv=[],e.version="",e.versions={};function b(){}return e.on=b,e.addListener=b,e.once=b,e.off=b,e.removeListener=b,e.removeAllListeners=b,e.emit=b,e.prependListener=b,e.prependOnceListener=b,e.listeners=function(x){return[]},e.binding=function(x){throw new Error("process.binding is not supported")},e.cwd=function(){return"/"},e.chdir=function(x){throw new Error("process.chdir is not supported")},e.umask=function(){return 0},SO.exports}var DZ=MZ();const LZ=QE(DZ);function zZ(e){return e.replace(/^file:\/\//,"")}var Hb={},$Z=F({"../../node_modules/inline-style-parser/cjs/index.js"(e,t){var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,d=/^\s+|\s+$/g,f=`
|
|
49
|
-
`,m="/",p="*",O="",b="comment",x="declaration";function w(T,j){if(typeof T!="string")throw new TypeError("First argument must be a string");if(!T)return[];j=j||{};var E=1,Q=1;function P(I){var z=I.match(r);z&&(E+=z.length);var ee=I.lastIndexOf(f);Q=~ee?I.length-ee:Q+I.length}function N(){var I={line:E,column:Q};return function(z){return z.position=new D(I),X(),z}}function D(I){this.start=I,this.end={line:E,column:Q},this.source=j.source}D.prototype.content=T;function L(I){var z=new Error(j.source+":"+E+":"+Q+": "+I);if(z.reason=I,z.filename=j.source,z.line=E,z.column=Q,z.source=T,!j.silent)throw z}function A(I){var z=I.exec(T);if(z){var ee=z[0];return P(ee),T=T.slice(ee.length),z}}function X(){A(i)}function Z(I){var z;for(I=I||[];z=V();)z!==!1&&I.push(z);return I}function V(){var I=N();if(!(m!=T.charAt(0)||p!=T.charAt(1))){for(var z=2;O!=T.charAt(z)&&(p!=T.charAt(z)||m!=T.charAt(z+1));)++z;if(z+=2,O===T.charAt(z-1))return L("End of comment missing");var ee=T.slice(2,z-2);return Q+=2,P(ee),T=T.slice(z),Q+=2,I({type:b,comment:ee})}}function $(){var I=N(),z=A(a);if(z){if(V(),!A(s))return L("property missing ':'");var ee=A(l),le=I({type:x,property:k(z[0].replace(n,O)),value:ee?k(ee[0].replace(n,O)):O});return A(c),le}}function W(){var I=[];Z(I);for(var z;z=$();)z!==!1&&(I.push(z),Z(I));return I}return X(),W()}function k(T){return T?T.replace(d,O):O}t.exports=w}}),IZ=F({"../../node_modules/style-to-object/cjs/index.js"(e){var t=e&&e.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t($Z());function r(i,a){let s=null;if(!i||typeof i!="string")return s;const l=(0,n.default)(i),c=typeof a=="function";return l.forEach(d=>{if(d.type!=="declaration")return;const{property:f,value:m}=d;c?a(f,m,d):m&&(s=s||{},s[f]=m)}),s}}}),qZ=F({"../../node_modules/style-to-js/cjs/utilities.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,s=function(f){return!f||r.test(f)||t.test(f)},l=function(f,m){return m.toUpperCase()},c=function(f,m){return"".concat(m,"-")},d=function(f,m){return m===void 0&&(m={}),s(f)?f:(f=f.toLowerCase(),m.reactCompat?f=f.replace(a,c):f=f.replace(i,c),f.replace(n,l))};e.camelCase=d}}),XZ=F({"../../node_modules/style-to-js/cjs/index.js"(e,t){var n=e&&e.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},r=n(IZ()),i=qZ();function a(s,l){var c={};return!s||typeof s!="string"||(0,r.default)(s,function(d,f){d&&f&&(c[(0,i.camelCase)(d,l)]=f)}),c}a.default=a,t.exports=a}}),ZZ=F({"../../node_modules/extend/index.js"(e,t){var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(m){return typeof Array.isArray=="function"?Array.isArray(m):r.call(m)==="[object Array]"},l=function(m){if(!m||r.call(m)!=="[object Object]")return!1;var p=n.call(m,"constructor"),O=m.constructor&&m.constructor.prototype&&n.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!p&&!O)return!1;var b;for(b in m);return typeof b>"u"||n.call(m,b)},c=function(m,p){i&&p.name==="__proto__"?i(m,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):m[p.name]=p.newValue},d=function(m,p){if(p==="__proto__")if(n.call(m,p)){if(a)return a(m,p).value}else return;return m[p]};t.exports=function f(){var m,p,O,b,x,w,k=arguments[0],T=1,j=arguments.length,E=!1;for(typeof k=="boolean"&&(E=k,k=arguments[1]||{},T=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});T<j;++T)if(m=arguments[T],m!=null)for(p in m)O=d(k,p),b=d(m,p),k!==b&&(E&&b&&(l(b)||(x=s(b)))?(x?(x=!1,w=O&&s(O)?O:[]):w=O&&l(O)?O:{},c(k,{name:p,newValue:f(E,w,b)})):typeof b<"u"&&c(k,{name:p,newValue:b}));return k}}}),BZ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/partition.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.partition=void 0;var t=xZ(),n=uc();function r(i,a){return function(s){return[n.filter(i,a)(s),n.filter(t.not(i,a))(s)]}}e.partition=r}}),VZ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/race.js"(e){var t=e&&e.__read||function(s,l){var c=typeof Symbol=="function"&&s[Symbol.iterator];if(!c)return s;var d=c.call(s),f,m=[],p;try{for(;(l===void 0||l-- >0)&&!(f=d.next()).done;)m.push(f.value)}catch(O){p={error:O}}finally{try{f&&!f.done&&(c=d.return)&&c.call(d)}finally{if(p)throw p.error}}return m},n=e&&e.__spreadArray||function(s,l){for(var c=0,d=l.length,f=s.length;c<d;c++,f++)s[f]=l[c];return s};Object.defineProperty(e,"__esModule",{value:!0}),e.race=void 0;var r=cc(),i=ZQ();function a(){for(var s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];return i.raceWith.apply(void 0,n([],t(r.argsOrArgArray(s))))}e.race=a}}),JQ=F({"../../node_modules/rxjs/dist/cjs/operators/index.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.mergeAll=e.merge=e.max=e.materialize=e.mapTo=e.map=e.last=e.isEmpty=e.ignoreElements=e.groupBy=e.first=e.findIndex=e.find=e.finalize=e.filter=e.expand=e.exhaustMap=e.exhaustAll=e.exhaust=e.every=e.endWith=e.elementAt=e.distinctUntilKeyChanged=e.distinctUntilChanged=e.distinct=e.dematerialize=e.delayWhen=e.delay=e.defaultIfEmpty=e.debounceTime=e.debounce=e.count=e.connect=e.concatWith=e.concatMapTo=e.concatMap=e.concatAll=e.concat=e.combineLatestWith=e.combineLatest=e.combineLatestAll=e.combineAll=e.catchError=e.bufferWhen=e.bufferToggle=e.bufferTime=e.bufferCount=e.buffer=e.auditTime=e.audit=void 0,e.timeInterval=e.throwIfEmpty=e.throttleTime=e.throttle=e.tap=e.takeWhile=e.takeUntil=e.takeLast=e.take=e.switchScan=e.switchMapTo=e.switchMap=e.switchAll=e.subscribeOn=e.startWith=e.skipWhile=e.skipUntil=e.skipLast=e.skip=e.single=e.shareReplay=e.share=e.sequenceEqual=e.scan=e.sampleTime=e.sample=e.refCount=e.retryWhen=e.retry=e.repeatWhen=e.repeat=e.reduce=e.raceWith=e.race=e.publishReplay=e.publishLast=e.publishBehavior=e.publish=e.pluck=e.partition=e.pairwise=e.onErrorResumeNext=e.observeOn=e.multicast=e.min=e.mergeWith=e.mergeScan=e.mergeMapTo=e.mergeMap=e.flatMap=void 0,e.zipWith=e.zipAll=e.zip=e.withLatestFrom=e.windowWhen=e.windowToggle=e.windowTime=e.windowCount=e.window=e.toArray=e.timestamp=e.timeoutWith=e.timeout=void 0;var t=bQ();Object.defineProperty(e,"audit",{enumerable:!0,get:function(){return t.audit}});var n=MX();Object.defineProperty(e,"auditTime",{enumerable:!0,get:function(){return n.auditTime}});var r=DX();Object.defineProperty(e,"buffer",{enumerable:!0,get:function(){return r.buffer}});var i=LX();Object.defineProperty(e,"bufferCount",{enumerable:!0,get:function(){return i.bufferCount}});var a=zX();Object.defineProperty(e,"bufferTime",{enumerable:!0,get:function(){return a.bufferTime}});var s=$X();Object.defineProperty(e,"bufferToggle",{enumerable:!0,get:function(){return s.bufferToggle}});var l=IX();Object.defineProperty(e,"bufferWhen",{enumerable:!0,get:function(){return l.bufferWhen}});var c=qX();Object.defineProperty(e,"catchError",{enumerable:!0,get:function(){return c.catchError}});var d=HX();Object.defineProperty(e,"combineAll",{enumerable:!0,get:function(){return d.combineAll}});var f=jQ();Object.defineProperty(e,"combineLatestAll",{enumerable:!0,get:function(){return f.combineLatestAll}});var m=TQ();Object.defineProperty(e,"combineLatest",{enumerable:!0,get:function(){return m.combineLatest}});var p=GX();Object.defineProperty(e,"combineLatestWith",{enumerable:!0,get:function(){return p.combineLatestWith}});var O=EQ();Object.defineProperty(e,"concat",{enumerable:!0,get:function(){return O.concat}});var b=cx();Object.defineProperty(e,"concatAll",{enumerable:!0,get:function(){return b.concatAll}});var x=CQ();Object.defineProperty(e,"concatMap",{enumerable:!0,get:function(){return x.concatMap}});var w=KX();Object.defineProperty(e,"concatMapTo",{enumerable:!0,get:function(){return w.concatMapTo}});var k=JX();Object.defineProperty(e,"concatWith",{enumerable:!0,get:function(){return k.concatWith}});var T=ux();Object.defineProperty(e,"connect",{enumerable:!0,get:function(){return T.connect}});var j=n2();Object.defineProperty(e,"count",{enumerable:!0,get:function(){return j.count}});var E=r2();Object.defineProperty(e,"debounce",{enumerable:!0,get:function(){return E.debounce}});var Q=i2();Object.defineProperty(e,"debounceTime",{enumerable:!0,get:function(){return Q.debounceTime}});var P=cp();Object.defineProperty(e,"defaultIfEmpty",{enumerable:!0,get:function(){return P.defaultIfEmpty}});var N=a2();Object.defineProperty(e,"delay",{enumerable:!0,get:function(){return N.delay}});var D=PQ();Object.defineProperty(e,"delayWhen",{enumerable:!0,get:function(){return D.delayWhen}});var L=o2();Object.defineProperty(e,"dematerialize",{enumerable:!0,get:function(){return L.dematerialize}});var A=l2();Object.defineProperty(e,"distinct",{enumerable:!0,get:function(){return A.distinct}});var X=MQ();Object.defineProperty(e,"distinctUntilChanged",{enumerable:!0,get:function(){return X.distinctUntilChanged}});var Z=c2();Object.defineProperty(e,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return Z.distinctUntilKeyChanged}});var V=d2();Object.defineProperty(e,"elementAt",{enumerable:!0,get:function(){return V.elementAt}});var $=f2();Object.defineProperty(e,"endWith",{enumerable:!0,get:function(){return $.endWith}});var W=h2();Object.defineProperty(e,"every",{enumerable:!0,get:function(){return W.every}});var I=m2();Object.defineProperty(e,"exhaust",{enumerable:!0,get:function(){return I.exhaust}});var z=LQ();Object.defineProperty(e,"exhaustAll",{enumerable:!0,get:function(){return z.exhaustAll}});var ee=DQ();Object.defineProperty(e,"exhaustMap",{enumerable:!0,get:function(){return ee.exhaustMap}});var le=p2();Object.defineProperty(e,"expand",{enumerable:!0,get:function(){return le.expand}});var q=uc();Object.defineProperty(e,"filter",{enumerable:!0,get:function(){return q.filter}});var G=g2();Object.defineProperty(e,"finalize",{enumerable:!0,get:function(){return G.finalize}});var re=zQ();Object.defineProperty(e,"find",{enumerable:!0,get:function(){return re.find}});var M=v2();Object.defineProperty(e,"findIndex",{enumerable:!0,get:function(){return M.findIndex}});var he=O2();Object.defineProperty(e,"first",{enumerable:!0,get:function(){return he.first}});var ye=b2();Object.defineProperty(e,"groupBy",{enumerable:!0,get:function(){return ye.groupBy}});var Oe=AQ();Object.defineProperty(e,"ignoreElements",{enumerable:!0,get:function(){return Oe.ignoreElements}});var Be=y2();Object.defineProperty(e,"isEmpty",{enumerable:!0,get:function(){return Be.isEmpty}});var Re=x2();Object.defineProperty(e,"last",{enumerable:!0,get:function(){return Re.last}});var Xe=$o();Object.defineProperty(e,"map",{enumerable:!0,get:function(){return Xe.map}});var be=QQ();Object.defineProperty(e,"mapTo",{enumerable:!0,get:function(){return be.mapTo}});var Fe=S2();Object.defineProperty(e,"materialize",{enumerable:!0,get:function(){return Fe.materialize}});var we=w2();Object.defineProperty(e,"max",{enumerable:!0,get:function(){return we.max}});var Ve=IQ();Object.defineProperty(e,"merge",{enumerable:!0,get:function(){return Ve.merge}});var st=lx();Object.defineProperty(e,"mergeAll",{enumerable:!0,get:function(){return st.mergeAll}});var gt=_2();Object.defineProperty(e,"flatMap",{enumerable:!0,get:function(){return gt.flatMap}});var Je=Io();Object.defineProperty(e,"mergeMap",{enumerable:!0,get:function(){return Je.mergeMap}});var yn=k2();Object.defineProperty(e,"mergeMapTo",{enumerable:!0,get:function(){return yn.mergeMapTo}});var Ce=j2();Object.defineProperty(e,"mergeScan",{enumerable:!0,get:function(){return Ce.mergeScan}});var ot=T2();Object.defineProperty(e,"mergeWith",{enumerable:!0,get:function(){return ot.mergeWith}});var ge=C2();Object.defineProperty(e,"min",{enumerable:!0,get:function(){return ge.min}});var vt=hx();Object.defineProperty(e,"multicast",{enumerable:!0,get:function(){return vt.multicast}});var Dt=ix();Object.defineProperty(e,"observeOn",{enumerable:!0,get:function(){return Dt.observeOn}});var Yt=A2();Object.defineProperty(e,"onErrorResumeNext",{enumerable:!0,get:function(){return Yt.onErrorResumeNext}});var et=Q2();Object.defineProperty(e,"pairwise",{enumerable:!0,get:function(){return et.pairwise}});var Un=BZ();Object.defineProperty(e,"partition",{enumerable:!0,get:function(){return Un.partition}});var ie=P2();Object.defineProperty(e,"pluck",{enumerable:!0,get:function(){return ie.pluck}});var de=N2();Object.defineProperty(e,"publish",{enumerable:!0,get:function(){return de.publish}});var Pe=M2();Object.defineProperty(e,"publishBehavior",{enumerable:!0,get:function(){return Pe.publishBehavior}});var Ze=L2();Object.defineProperty(e,"publishLast",{enumerable:!0,get:function(){return Ze.publishLast}});var tt=z2();Object.defineProperty(e,"publishReplay",{enumerable:!0,get:function(){return tt.publishReplay}});var Lt=VZ();Object.defineProperty(e,"race",{enumerable:!0,get:function(){return Lt.race}});var zn=ZQ();Object.defineProperty(e,"raceWith",{enumerable:!0,get:function(){return zn.raceWith}});var rn=Ld();Object.defineProperty(e,"reduce",{enumerable:!0,get:function(){return rn.reduce}});var Xt=I2();Object.defineProperty(e,"repeat",{enumerable:!0,get:function(){return Xt.repeat}});var Kt=q2();Object.defineProperty(e,"repeatWhen",{enumerable:!0,get:function(){return Kt.repeatWhen}});var ht=X2();Object.defineProperty(e,"retry",{enumerable:!0,get:function(){return ht.retry}});var ir=Z2();Object.defineProperty(e,"retryWhen",{enumerable:!0,get:function(){return ir.retryWhen}});var kn=qQ();Object.defineProperty(e,"refCount",{enumerable:!0,get:function(){return kn.refCount}});var Bs=BQ();Object.defineProperty(e,"sample",{enumerable:!0,get:function(){return Bs.sample}});var Qi=V2();Object.defineProperty(e,"sampleTime",{enumerable:!0,get:function(){return Qi.sampleTime}});var mi=U2();Object.defineProperty(e,"scan",{enumerable:!0,get:function(){return mi.scan}});var zt=Y2();Object.defineProperty(e,"sequenceEqual",{enumerable:!0,get:function(){return zt.sequenceEqual}});var Zt=VQ();Object.defineProperty(e,"share",{enumerable:!0,get:function(){return Zt.share}});var Qt=W2();Object.defineProperty(e,"shareReplay",{enumerable:!0,get:function(){return Qt.shareReplay}});var jn=G2();Object.defineProperty(e,"single",{enumerable:!0,get:function(){return jn.single}});var Tn=K2();Object.defineProperty(e,"skip",{enumerable:!0,get:function(){return Tn.skip}});var an=J2();Object.defineProperty(e,"skipLast",{enumerable:!0,get:function(){return an.skipLast}});var Cn=eZ();Object.defineProperty(e,"skipUntil",{enumerable:!0,get:function(){return Cn.skipUntil}});var $n=tZ();Object.defineProperty(e,"skipWhile",{enumerable:!0,get:function(){return $n.skipWhile}});var Ht=nZ();Object.defineProperty(e,"startWith",{enumerable:!0,get:function(){return Ht.startWith}});var Yn=ax();Object.defineProperty(e,"subscribeOn",{enumerable:!0,get:function(){return Yn.subscribeOn}});var je=rZ();Object.defineProperty(e,"switchAll",{enumerable:!0,get:function(){return je.switchAll}});var Ke=hp();Object.defineProperty(e,"switchMap",{enumerable:!0,get:function(){return Ke.switchMap}});var un=iZ();Object.defineProperty(e,"switchMapTo",{enumerable:!0,get:function(){return un.switchMapTo}});var _r=aZ();Object.defineProperty(e,"switchScan",{enumerable:!0,get:function(){return _r.switchScan}});var Wn=up();Object.defineProperty(e,"take",{enumerable:!0,get:function(){return Wn.take}});var qr=$Q();Object.defineProperty(e,"takeLast",{enumerable:!0,get:function(){return qr.takeLast}});var ar=sZ();Object.defineProperty(e,"takeUntil",{enumerable:!0,get:function(){return ar.takeUntil}});var xn=oZ();Object.defineProperty(e,"takeWhile",{enumerable:!0,get:function(){return xn.takeWhile}});var In=lZ();Object.defineProperty(e,"tap",{enumerable:!0,get:function(){return In.tap}});var Ia=UQ();Object.defineProperty(e,"throttle",{enumerable:!0,get:function(){return Ia.throttle}});var yc=cZ();Object.defineProperty(e,"throttleTime",{enumerable:!0,get:function(){return yc.throttleTime}});var Ip=fp();Object.defineProperty(e,"throwIfEmpty",{enumerable:!0,get:function(){return Ip.throwIfEmpty}});var qp=uZ();Object.defineProperty(e,"timeInterval",{enumerable:!0,get:function(){return qp.timeInterval}});var ef=YQ();Object.defineProperty(e,"timeout",{enumerable:!0,get:function(){return ef.timeout}});var Vs=dZ();Object.defineProperty(e,"timeoutWith",{enumerable:!0,get:function(){return Vs.timeoutWith}});var xc=fZ();Object.defineProperty(e,"timestamp",{enumerable:!0,get:function(){return xc.timestamp}});var qa=_Q();Object.defineProperty(e,"toArray",{enumerable:!0,get:function(){return qa.toArray}});var Xa=hZ();Object.defineProperty(e,"window",{enumerable:!0,get:function(){return Xa.window}});var Us=mZ();Object.defineProperty(e,"windowCount",{enumerable:!0,get:function(){return Us.windowCount}});var Za=pZ();Object.defineProperty(e,"windowTime",{enumerable:!0,get:function(){return Za.windowTime}});var dn=gZ();Object.defineProperty(e,"windowToggle",{enumerable:!0,get:function(){return dn.windowToggle}});var tf=vZ();Object.defineProperty(e,"windowWhen",{enumerable:!0,get:function(){return tf.windowWhen}});var nf=OZ();Object.defineProperty(e,"withLatestFrom",{enumerable:!0,get:function(){return nf.withLatestFrom}});var ra=FQ();Object.defineProperty(e,"zip",{enumerable:!0,get:function(){return ra.zip}});var Ba=bZ();Object.defineProperty(e,"zipAll",{enumerable:!0,get:function(){return Ba.zipAll}});var Xp=yZ();Object.defineProperty(e,"zipWith",{enumerable:!0,get:function(){return Xp.zipWith}})}}),er={highlight:{motivation:"highlighting",internalType:"highlight",displayName:"Highlight",description:"Mark text for attention",className:"annotation-highlight",iconEmoji:"🟡",isClickable:!0,hasHoverInteraction:!0,hasSidePanel:!0,matchesAnnotation:e=>Mo(e),announceOnCreate:"Highlight created",create:{bodyBuilder:"empty",refetchAfter:!1},detection:{sseMethod:"detectHighlights",countField:"createdCount",displayNamePlural:"highlights",displayNameSingular:"highlight",formatRequestParams:e=>{const t=[];return typeof e[0]=="string"&&e[0]&&t.push({label:"Instructions",value:e[0]}),typeof e[2]=="number"&&t.push({label:"Density",value:`${e[2]} per 2000 words`}),t}}},comment:{motivation:"commenting",internalType:"comment",displayName:"Comment",description:"Add a comment about the text",className:"annotation-comment",iconEmoji:"💬",isClickable:!0,hasHoverInteraction:!0,hasSidePanel:!0,matchesAnnotation:e=>zs(e),announceOnCreate:"Comment created",create:{bodyBuilder:"text",refetchAfter:!1},detection:{sseMethod:"detectComments",countField:"createdCount",displayNamePlural:"comments",displayNameSingular:"comment",formatRequestParams:e=>{const t=[];return typeof e[0]=="string"&&e[0]&&t.push({label:"Instructions",value:e[0]}),typeof e[1]=="string"&&e[1]&&t.push({label:"Tone",value:e[1]}),typeof e[2]=="number"&&t.push({label:"Density",value:`${e[2]} per 2000 words`}),t}}},assessment:{motivation:"assessing",internalType:"assessment",displayName:"Assessment",description:"Provide evaluation or assessment",className:"annotation-assessment",iconEmoji:"🔴",isClickable:!0,hasHoverInteraction:!0,hasSidePanel:!0,matchesAnnotation:e=>e.motivation==="assessing",announceOnCreate:"Assessment created",create:{bodyBuilder:"text",refetchAfter:!1},detection:{sseMethod:"detectAssessments",countField:"createdCount",displayNamePlural:"assessments",displayNameSingular:"assessment",formatRequestParams:e=>{const t=[];return typeof e[0]=="string"&&e[0]&&t.push({label:"Instructions",value:e[0]}),typeof e[1]=="string"&&e[1]&&t.push({label:"Tone",value:e[1]}),typeof e[2]=="number"&&t.push({label:"Density",value:`${e[2]} per 2000 words`}),t}}},reference:{motivation:"linking",internalType:"reference",displayName:"Reference",description:"Link to another resource",className:"annotation-reference",iconEmoji:"🔵",isClickable:!0,hasHoverInteraction:!0,hasSidePanel:!0,matchesAnnotation:e=>li(e),announceOnCreate:"Reference created",create:{bodyBuilder:"entityTag",refetchAfter:!0},detection:{sseMethod:"detectReferences",countField:"foundCount",displayNamePlural:"entity references",displayNameSingular:"entity reference",formatRequestParams:e=>{const t=[],n=e[0];return Array.isArray(n)&&n.length>0&&t.push({label:"Entity Types",value:n.join(", ")}),e[1]===!0&&t.push({label:"Include Descriptive References",value:"Yes"}),t}}},tag:{motivation:"tagging",internalType:"tag",displayName:"Tag",description:"Structural role annotation",className:"annotation-tag",iconEmoji:"🏷️",isClickable:!0,hasHoverInteraction:!0,hasSidePanel:!0,matchesAnnotation:e=>Do(e),announceOnCreate:"Tag created",create:{bodyBuilder:"dualTag",refetchAfter:!1,successMessage:'Tag "{value}" created'},detection:{sseMethod:"detectTags",countField:"tagsCreated",displayNamePlural:"tags",displayNameSingular:"tag",formatRequestParams:e=>{const t=[];if(typeof e[0]=="string"&&e[0]){const r={"legal-irac":"Legal (IRAC)","scientific-imrad":"Scientific (IMRAD)","argument-toulmin":"Argument (Toulmin)"};t.push({label:"Schema",value:r[e[0]]||e[0]})}const n=e[1];return Array.isArray(n)&&n.length>0&&t.push({label:"Categories",value:n.join(", ")}),t}}}},Du={primary:{base:"semiont-button semiont-button--primary",large:"semiont-button semiont-button--primary semiont-button--large"},secondary:{base:"semiont-button semiont-button--secondary",withScale:"semiont-button semiont-button--secondary semiont-button--scale"},tertiary:{base:"semiont-button semiont-button--tertiary"},danger:{base:"semiont-button semiont-button--danger"},warning:{base:"semiont-button semiont-button--warning"},combine:(...e)=>e.filter(Boolean).join(" ")},Gb=[],eP=[];(()=>{let e="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(t=>t?parseInt(t,36):1);for(let t=0,n=0;t<e.length;t++)(t%2?eP:Gb).push(n=n+e[t])})();function UZ(e){if(e<768)return!1;for(let t=0,n=Gb.length;;){let r=t+n>>1;if(e<Gb[r])n=r;else if(e>=eP[r])t=r+1;else return!0;if(t==n)return!1}}function ej(e){return e>=127462&&e<=127487}var tj=8205;function YZ(e,t,n=!0,r=!0){return(n?tP:WZ)(e,t,r)}function tP(e,t,n){if(t==e.length)return t;t&&nP(e.charCodeAt(t))&&rP(e.charCodeAt(t-1))&&t--;let r=wO(e,t);for(t+=nj(r);t<e.length;){let i=wO(e,t);if(r==tj||i==tj||n&&UZ(i))t+=nj(i),r=i;else if(ej(i)){let a=0,s=t-2;for(;s>=0&&ej(wO(e,s));)a++,s-=2;if(a%2==0)break;t+=2}else break}return t}function WZ(e,t,n){for(;t>0;){let r=tP(e,t-2,n);if(r<t)return r;t--}return 0}function wO(e,t){let n=e.charCodeAt(t);if(!rP(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return nP(r)?(n-55296<<10)+(r-56320)+65536:n}function nP(e){return e>=56320&&e<57344}function rP(e){return e>=55296&&e<56320}function nj(e){return e<65536?1:2}var _t=class iP{lineAt(t){if(t<0||t>this.length)throw new RangeError(`Invalid position ${t} in document of length ${this.length}`);return this.lineInner(t,!1,1,0)}line(t){if(t<1||t>this.lines)throw new RangeError(`Invalid line number ${t} in ${this.lines}-line document`);return this.lineInner(t,!0,1,0)}replace(t,n,r){[t,n]=Fl(this,t,n);let i=[];return this.decompose(0,t,i,2),r.length&&r.decompose(0,r.length,i,3),this.decompose(n,this.length,i,1),rm.from(i,this.length-(n-t)+r.length)}append(t){return this.replace(this.length,this.length,t)}slice(t,n=this.length){[t,n]=Fl(this,t,n);let r=[];return this.decompose(t,n,r,0),rm.from(r,n-t)}eq(t){if(t==this)return!0;if(t.length!=this.length||t.lines!=this.lines)return!1;let n=this.scanIdentical(t,1),r=this.length-this.scanIdentical(t,-1),i=new Lu(this),a=new Lu(t);for(let s=n,l=n;;){if(i.next(s),a.next(s),s=0,i.lineBreak!=a.lineBreak||i.done!=a.done||i.value!=a.value)return!1;if(l+=i.value.length,i.done||l>=r)return!0}}iter(t=1){return new Lu(this,t)}iterRange(t,n=this.length){return new aP(this,t,n)}iterLines(t,n){let r;if(t==null)r=this.iter();else{n==null&&(n=this.lines+1);let i=this.line(t).from;r=this.iterRange(i,Math.max(i,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new sP(r)}toString(){return this.sliceString(0)}toJSON(){let t=[];return this.flatten(t),t}constructor(){}static of(t){if(t.length==0)throw new RangeError("A document must have at least one line");return t.length==1&&!t[0]?iP.empty:t.length<=32?new Si(t):rm.from(Si.split(t,[]))}},Si=class Ii extends _t{constructor(t,n=FZ(t)){super(),this.text=t,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(t,n,r,i){for(let a=0;;a++){let s=this.text[a],l=i+s.length;if((n?r:l)>=t)return new HZ(i,l,r,s);i=l+1,r++}}decompose(t,n,r,i){let a=t<=0&&n>=this.length?this:new Ii(rj(this.text,t,n),Math.min(n,this.length)-Math.max(0,t));if(i&1){let s=r.pop(),l=im(a.text,s.text.slice(),0,a.length);if(l.length<=32)r.push(new Ii(l,s.length+a.length));else{let c=l.length>>1;r.push(new Ii(l.slice(0,c)),new Ii(l.slice(c)))}}else r.push(a)}replace(t,n,r){if(!(r instanceof Ii))return super.replace(t,n,r);[t,n]=Fl(this,t,n);let i=im(this.text,im(r.text,rj(this.text,0,t)),n),a=this.length+r.length-(n-t);return i.length<=32?new Ii(i,a):rm.from(Ii.split(i,[]),a)}sliceString(t,n=this.length,r=`
|
|
50
|
-
`){[t,n]=Fl(this,t,n);let i="";for(let a=0,s=0;a<=n&&s<this.text.length;s++){let l=this.text[s],c=a+l.length;a>t&&s&&(i+=r),t<c&&n>a&&(i+=l.slice(Math.max(0,t-a),n-a)),a=c+1}return i}flatten(t){for(let n of this.text)t.push(n)}scanIdentical(){return 0}static split(t,n){let r=[],i=-1;for(let a of t)r.push(a),i+=a.length+1,r.length==32&&(n.push(new Ii(r,i)),r=[],i=-1);return i>-1&&n.push(new Ii(r,i)),n}},rm=class Tl extends _t{constructor(t,n){super(),this.children=t,this.length=n,this.lines=0;for(let r of t)this.lines+=r.lines}lineInner(t,n,r,i){for(let a=0;;a++){let s=this.children[a],l=i+s.length,c=r+s.lines-1;if((n?c:l)>=t)return s.lineInner(t,n,r,i);i=l+1,r=c+1}}decompose(t,n,r,i){for(let a=0,s=0;s<=n&&a<this.children.length;a++){let l=this.children[a],c=s+l.length;if(t<=c&&n>=s){let d=i&((s<=t?1:0)|(c>=n?2:0));s>=t&&c<=n&&!d?r.push(l):l.decompose(t-s,n-s,r,d)}s=c+1}}replace(t,n,r){if([t,n]=Fl(this,t,n),r.lines<this.lines)for(let i=0,a=0;i<this.children.length;i++){let s=this.children[i],l=a+s.length;if(t>=a&&n<=l){let c=s.replace(t-a,n-a,r),d=this.lines-s.lines+c.lines;if(c.lines<d>>4&&c.lines>d>>6){let f=this.children.slice();return f[i]=c,new Tl(f,this.length-(n-t)+r.length)}return super.replace(a,l,c)}a=l+1}return super.replace(t,n,r)}sliceString(t,n=this.length,r=`
|
|
51
|
-
`){[t,n]=Fl(this,t,n);let i="";for(let a=0,s=0;a<this.children.length&&s<=n;a++){let l=this.children[a],c=s+l.length;s>t&&a&&(i+=r),t<c&&n>s&&(i+=l.sliceString(t-s,n-s,r)),s=c+1}return i}flatten(t){for(let n of this.children)n.flatten(t)}scanIdentical(t,n){if(!(t instanceof Tl))return 0;let r=0,[i,a,s,l]=n>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;i+=n,a+=n){if(i==s||a==l)return r;let c=this.children[i],d=t.children[a];if(c!=d)return r+c.scanIdentical(d,n);r+=c.length+1}}static from(t,n=t.reduce((r,i)=>r+i.length+1,-1)){let r=0;for(let O of t)r+=O.lines;if(r<32){let O=[];for(let b of t)b.flatten(O);return new Si(O,n)}let i=Math.max(32,r>>5),a=i<<1,s=i>>1,l=[],c=0,d=-1,f=[];function m(O){let b;if(O.lines>a&&O instanceof Tl)for(let x of O.children)m(x);else O.lines>s&&(c>s||!c)?(p(),l.push(O)):O instanceof Si&&c&&(b=f[f.length-1])instanceof Si&&O.lines+b.lines<=32?(c+=O.lines,d+=O.length+1,f[f.length-1]=new Si(b.text.concat(O.text),b.length+1+O.length)):(c+O.lines>i&&p(),c+=O.lines,d+=O.length+1,f.push(O))}function p(){c!=0&&(l.push(f.length==1?f[0]:Tl.from(f,d)),d=-1,c=f.length=0)}for(let O of t)m(O);return p(),l.length==1?l[0]:new Tl(l,n)}};_t.empty=new Si([""],0);function FZ(e){let t=-1;for(let n of e)t+=n.length+1;return t}function im(e,t,n=0,r=1e9){for(let i=0,a=0,s=!0;a<e.length&&i<=r;a++){let l=e[a],c=i+l.length;c>=n&&(c>r&&(l=l.slice(0,r-i)),i<n&&(l=l.slice(n-i)),s?(t[t.length-1]+=l,s=!1):t.push(l)),i=c+1}return t}function rj(e,t,n){return im(e,[""],t,n)}var Lu=class{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof Si?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,r=this.nodes[n],i=this.offsets[n],a=i>>1,s=r instanceof Si?r.text.length:r.children.length;if(a==(t>0?s:0)){if(n==0)return this.done=!0,this.value="",this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((i&1)==(t>0?0:1)){if(this.offsets[n]+=t,e==0)return this.lineBreak=!0,this.value=`
|
|
52
|
-
`,this;e--}else if(r instanceof Si){let l=r.text[a+(t<0?-1:0)];if(this.offsets[n]+=t,l.length>Math.max(0,e))return this.value=e==0?l:t>0?l.slice(e):l.slice(0,l.length-e),this;e-=l.length}else{let l=r.children[a+(t<0?-1:0)];e>l.length?(e-=l.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(l),this.offsets.push(t>0?1:(l instanceof Si?l.text.length:l.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}},aP=class{constructor(e,t,n){this.value="",this.done=!1,this.cursor=new Lu(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*t,this.value=r.length<=n?r:t<0?r.slice(r.length-n):r.slice(0,n),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}},sP=class{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:n,value:r}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):n?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}};typeof Symbol<"u"&&(_t.prototype[Symbol.iterator]=function(){return this.iter()},Lu.prototype[Symbol.iterator]=aP.prototype[Symbol.iterator]=sP.prototype[Symbol.iterator]=function(){return this});var HZ=class{constructor(e,t,n,r){this.from=e,this.to=t,this.number=n,this.text=r}get length(){return this.to-this.from}};function Fl(e,t,n){return t=Math.max(0,Math.min(e.length,t)),[t,Math.max(t,Math.min(e.length,n))]}function wi(e,t,n=!0,r=!0){return YZ(e,t,n,r)}function GZ(e){return e>=56320&&e<57344}function KZ(e){return e>=55296&&e<56320}function JZ(e,t){let n=e.charCodeAt(t);if(!KZ(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return GZ(r)?(n-55296<<10)+(r-56320)+65536:n}function eB(e){return e<65536?1:2}var Kb=/\r\n?|\n/,Gn=(function(e){return e[e.Simple=0]="Simple",e[e.TrackDel=1]="TrackDel",e[e.TrackBefore=2]="TrackBefore",e[e.TrackAfter=3]="TrackAfter",e})(Gn||(Gn={})),zu=class am{constructor(t){this.sections=t}get length(){let t=0;for(let n=0;n<this.sections.length;n+=2)t+=this.sections[n];return t}get newLength(){let t=0;for(let n=0;n<this.sections.length;n+=2){let r=this.sections[n+1];t+=r<0?this.sections[n]:r}return t}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(t){for(let n=0,r=0,i=0;n<this.sections.length;){let a=this.sections[n++],s=this.sections[n++];s<0?(t(r,i,a),i+=a):i+=s,r+=a}}iterChangedRanges(t,n=!1){Jb(this,t,n)}get invertedDesc(){let t=[];for(let n=0;n<this.sections.length;){let r=this.sections[n++],i=this.sections[n++];i<0?t.push(r,i):t.push(i,r)}return new am(t)}composeDesc(t){return this.empty?t:t.empty?this:oP(this,t)}mapDesc(t,n=!1){return t.empty?this:ey(this,t,n)}mapPos(t,n=-1,r=Gn.Simple){let i=0,a=0;for(let s=0;s<this.sections.length;){let l=this.sections[s++],c=this.sections[s++],d=i+l;if(c<0){if(d>t)return a+(t-i);a+=l}else{if(r!=Gn.Simple&&d>=t&&(r==Gn.TrackDel&&i<t&&d>t||r==Gn.TrackBefore&&i<t||r==Gn.TrackAfter&&d>t))return null;if(d>t||d==t&&n<0&&!l)return t==i||n<0?a:a+c;a+=c}i=d}if(t>i)throw new RangeError(`Position ${t} is out of range for changeset of length ${i}`);return a}touchesRange(t,n=t){for(let r=0,i=0;r<this.sections.length&&i<=n;){let a=this.sections[r++],s=this.sections[r++],l=i+a;if(s>=0&&i<=n&&l>=t)return i<t&&l>n?"cover":!0;i=l}return!1}toString(){let t="";for(let n=0;n<this.sections.length;){let r=this.sections[n++],i=this.sections[n++];t+=(t?" ":"")+r+(i>=0?":"+i:"")}return t}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new am(t)}static create(t){return new am(t)}},Ki=class vs extends zu{constructor(t,n){super(t),this.inserted=n}apply(t){if(this.length!=t.length)throw new RangeError("Applying change set to a document with the wrong length");return Jb(this,(n,r,i,a,s)=>t=t.replace(i,i+(r-n),s),!1),t}mapDesc(t,n=!1){return ey(this,t,n,!0)}invert(t){let n=this.sections.slice(),r=[];for(let i=0,a=0;i<n.length;i+=2){let s=n[i],l=n[i+1];if(l>=0){n[i]=l,n[i+1]=s;let c=i>>1;for(;r.length<c;)r.push(_t.empty);r.push(s?t.slice(a,a+s):_t.empty)}a+=s}return new vs(n,r)}compose(t){return this.empty?t:t.empty?this:oP(this,t,!0)}map(t,n=!1){return t.empty?this:ey(this,t,n,!0)}iterChanges(t,n=!1){Jb(this,t,n)}get desc(){return zu.create(this.sections)}filter(t){let n=[],r=[],i=[],a=new cd(this);e:for(let s=0,l=0;;){let c=s==t.length?1e9:t[s++];for(;l<c||l==c&&a.len==0;){if(a.done)break e;let f=Math.min(a.len,c-l);Xn(i,f,-1);let m=a.ins==-1?-1:a.off==0?a.ins:0;Xn(n,f,m),m>0&&ks(r,n,a.text),a.forward(f),l+=f}let d=t[s++];for(;l<d;){if(a.done)break e;let f=Math.min(a.len,d-l);Xn(n,f,-1),Xn(i,f,a.ins==-1?-1:a.off==0?a.ins:0),a.forward(f),l+=f}}return{changes:new vs(n,r),filtered:zu.create(i)}}toJSON(){let t=[];for(let n=0;n<this.sections.length;n+=2){let r=this.sections[n],i=this.sections[n+1];i<0?t.push(r):i==0?t.push([r]):t.push([r].concat(this.inserted[n>>1].toJSON()))}return t}static of(t,n,r){let i=[],a=[],s=0,l=null;function c(f=!1){if(!f&&!i.length)return;s<n&&Xn(i,n-s,-1);let m=new vs(i,a);l=l?l.compose(m.map(l)):m,i=[],a=[],s=0}function d(f){if(Array.isArray(f))for(let m of f)d(m);else if(f instanceof vs){if(f.length!=n)throw new RangeError(`Mismatched change set length (got ${f.length}, expected ${n})`);c(),l=l?l.compose(f.map(l)):f}else{let{from:m,to:p=m,insert:O}=f;if(m>p||m<0||p>n)throw new RangeError(`Invalid change range ${m} to ${p} (in doc of length ${n})`);let b=O?typeof O=="string"?_t.of(O.split(r||Kb)):O:_t.empty,x=b.length;if(m==p&&x==0)return;m<s&&c(),m>s&&Xn(i,m-s,-1),Xn(i,p-m,x),ks(a,i,b),s=p}}return d(t),c(!l),l}static empty(t){return new vs(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],r=[];for(let i=0;i<t.length;i++){let a=t[i];if(typeof a=="number")n.push(a,-1);else{if(!Array.isArray(a)||typeof a[0]!="number"||a.some((s,l)=>l&&typeof s!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(a.length==1)n.push(a[0],0);else{for(;r.length<i;)r.push(_t.empty);r[i]=_t.of(a.slice(1)),n.push(a[0],r[i].length)}}}return new vs(n,r)}static createSet(t,n){return new vs(t,n)}};function Xn(e,t,n,r=!1){if(t==0&&n<=0)return;let i=e.length-2;i>=0&&n<=0&&n==e[i+1]?e[i]+=t:i>=0&&t==0&&e[i]==0?e[i+1]+=n:r?(e[i]+=t,e[i+1]+=n):e.push(t,n)}function ks(e,t,n){if(n.length==0)return;let r=t.length-2>>1;if(r<e.length)e[e.length-1]=e[e.length-1].append(n);else{for(;e.length<r;)e.push(_t.empty);e.push(n)}}function Jb(e,t,n){let r=e.inserted;for(let i=0,a=0,s=0;s<e.sections.length;){let l=e.sections[s++],c=e.sections[s++];if(c<0)i+=l,a+=l;else{let d=i,f=a,m=_t.empty;for(;d+=l,f+=c,c&&r&&(m=m.append(r[s-2>>1])),!(n||s==e.sections.length||e.sections[s+1]<0);)l=e.sections[s++],c=e.sections[s++];t(i,d,a,f,m),i=d,a=f}}}function ey(e,t,n,r=!1){let i=[],a=r?[]:null,s=new cd(e),l=new cd(t);for(let c=-1;;){if(s.done&&l.len||l.done&&s.len)throw new Error("Mismatched change set lengths");if(s.ins==-1&&l.ins==-1){let d=Math.min(s.len,l.len);Xn(i,d,-1),s.forward(d),l.forward(d)}else if(l.ins>=0&&(s.ins<0||c==s.i||s.off==0&&(l.len<s.len||l.len==s.len&&!n))){let d=l.len;for(Xn(i,l.ins,-1);d;){let f=Math.min(s.len,d);s.ins>=0&&c<s.i&&s.len<=f&&(Xn(i,0,s.ins),a&&ks(a,i,s.text),c=s.i),s.forward(f),d-=f}l.next()}else if(s.ins>=0){let d=0,f=s.len;for(;f;)if(l.ins==-1){let m=Math.min(f,l.len);d+=m,f-=m,l.forward(m)}else if(l.ins==0&&l.len<f)f-=l.len,l.next();else break;Xn(i,d,c<s.i?s.ins:0),a&&c<s.i&&ks(a,i,s.text),c=s.i,s.forward(s.len-f)}else{if(s.done&&l.done)return a?Ki.createSet(i,a):zu.create(i);throw new Error("Mismatched change set lengths")}}}function oP(e,t,n=!1){let r=[],i=n?[]:null,a=new cd(e),s=new cd(t);for(let l=!1;;){if(a.done&&s.done)return i?Ki.createSet(r,i):zu.create(r);if(a.ins==0)Xn(r,a.len,0,l),a.next();else if(s.len==0&&!s.done)Xn(r,0,s.ins,l),i&&ks(i,r,s.text),s.next();else{if(a.done||s.done)throw new Error("Mismatched change set lengths");{let c=Math.min(a.len2,s.len),d=r.length;if(a.ins==-1){let f=s.ins==-1?-1:s.off?0:s.ins;Xn(r,c,f,l),i&&f&&ks(i,r,s.text)}else s.ins==-1?(Xn(r,a.off?0:a.len,c,l),i&&ks(i,r,a.textBit(c))):(Xn(r,a.off?0:a.len,s.off?0:s.ins,l),i&&!s.off&&ks(i,r,s.text));l=(a.ins>c||s.ins>=0&&s.len>c)&&(l||r.length>d),a.forward2(c),s.forward(c)}}}}var cd=class{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?_t.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?_t.empty:t[n].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}},xh=class ty{constructor(t,n,r){this.from=t,this.to=n,this.flags=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let t=this.flags&7;return t==7?null:t}get goalColumn(){let t=this.flags>>6;return t==16777215?void 0:t}map(t,n=-1){let r,i;return this.empty?r=i=t.mapPos(this.from,n):(r=t.mapPos(this.from,1),i=t.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new ty(r,i,this.flags)}extend(t,n=t,r=0){if(t<=this.anchor&&n>=this.anchor)return Ae.range(t,n,void 0,void 0,r);let i=Math.abs(t-this.anchor)>Math.abs(n-this.anchor)?t:n;return Ae.range(this.anchor,i,void 0,void 0,r)}eq(t,n=!1){return this.anchor==t.anchor&&this.head==t.head&&this.goalColumn==t.goalColumn&&(!n||!this.empty||this.assoc==t.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(t){if(!t||typeof t.anchor!="number"||typeof t.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return Ae.range(t.anchor,t.head)}static create(t,n,r){return new ty(t,n,r)}},Ae=class Rr{constructor(t,n){this.ranges=t,this.mainIndex=n}map(t,n=-1){return t.empty?this:Rr.create(this.ranges.map(r=>r.map(t,n)),this.mainIndex)}eq(t,n=!1){if(this.ranges.length!=t.ranges.length||this.mainIndex!=t.mainIndex)return!1;for(let r=0;r<this.ranges.length;r++)if(!this.ranges[r].eq(t.ranges[r],n))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new Rr([this.main],0)}addRange(t,n=!0){return Rr.create([t].concat(this.ranges),n?0:this.mainIndex+1)}replaceRange(t,n=this.mainIndex){let r=this.ranges.slice();return r[n]=t,Rr.create(r,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(t=>t.toJSON()),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||typeof t.main!="number"||t.main>=t.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new Rr(t.ranges.map(n=>xh.fromJSON(n)),t.main)}static single(t,n=t){return new Rr([Rr.range(t,n)],0)}static create(t,n=0){if(t.length==0)throw new RangeError("A selection needs at least one range");for(let r=0,i=0;i<t.length;i++){let a=t[i];if(a.empty?a.from<=r:a.from<r)return Rr.normalized(t.slice(),n);r=a.to}return new Rr(t,n)}static cursor(t,n=0,r,i){return xh.create(t,t,(n==0?0:n<0?8:16)|(r==null?7:Math.min(6,r))|(i??16777215)<<6)}static range(t,n,r,i,a){let s=(r??16777215)<<6|(i==null?7:Math.min(6,i));return!a&&t!=n&&(a=n<t?1:-1),n<t?xh.create(n,t,48|s):xh.create(t,n,(a?a<0?8:16:0)|s)}static normalized(t,n=0){let r=t[n];t.sort((i,a)=>i.from-a.from),n=t.indexOf(r);for(let i=1;i<t.length;i++){let a=t[i],s=t[i-1];if(a.empty?a.from<=s.to:a.from<s.to){let l=s.from,c=Math.max(a.to,s.to);i<=n&&n--,t.splice(--i,2,a.anchor>a.head?Rr.range(c,l):Rr.range(l,c))}}return new Rr(t,n)}};function lP(e,t){for(let n of e.ranges)if(n.to>t)throw new RangeError("Selection points outside of document")}var px=0,Ie=class cP{constructor(t,n,r,i,a){this.combine=t,this.compareInput=n,this.compare=r,this.isStatic=i,this.id=px++,this.default=t([]),this.extensions=typeof a=="function"?a(this):a}get reader(){return this}static define(t={}){return new cP(t.combine||(n=>n),t.compareInput||((n,r)=>n===r),t.compare||(t.combine?(n,r)=>n===r:gx),!!t.static,t.enables)}of(t){return new sm([],this,0,t)}compute(t,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new sm(t,this,1,n)}computeN(t,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new sm(t,this,2,n)}from(t,n){return n||(n=r=>r),this.compute([t],r=>n(r.field(t)))}};function gx(e,t){return e==t||e.length==t.length&&e.every((n,r)=>n===t[r])}var sm=class{constructor(e,t,n,r){this.dependencies=e,this.facet=t,this.type=n,this.value=r,this.id=px++}dynamicSlot(e){var t;let n=this.value,r=this.facet.compareInput,i=this.id,a=e[i]>>1,s=this.type==2,l=!1,c=!1,d=[];for(let f of this.dependencies)f=="doc"?l=!0:f=="selection"?c=!0:(((t=e[f.id])!==null&&t!==void 0?t:1)&1)==0&&d.push(e[f.id]);return{create(f){return f.values[a]=n(f),1},update(f,m){if(l&&m.docChanged||c&&(m.docChanged||m.selection)||ny(f,d)){let p=n(f);if(s?!ij(p,f.values[a],r):!r(p,f.values[a]))return f.values[a]=p,1}return 0},reconfigure:(f,m)=>{let p,O=m.config.address[i];if(O!=null){let b=km(m,O);if(this.dependencies.every(x=>x instanceof Ie?m.facet(x)===f.facet(x):x instanceof Xs?m.field(x,!1)==f.field(x,!1):!0)||(s?ij(p=n(f),b,r):r(p=n(f),b)))return f.values[a]=b,0}else p=n(f);return f.values[a]=p,1}}}};function ij(e,t,n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function ny(e,t){let n=!1;for(let r of t)$u(e,r)&1&&(n=!0);return n}function tB(e,t,n){let r=n.map(c=>e[c.id]),i=n.map(c=>c.type),a=r.filter(c=>!(c&1)),s=e[t.id]>>1;function l(c){let d=[];for(let f=0;f<r.length;f++){let m=km(c,r[f]);if(i[f]==2)for(let p of m)d.push(p);else d.push(m)}return t.combine(d)}return{create(c){for(let d of r)$u(c,d);return c.values[s]=l(c),1},update(c,d){if(!ny(c,a))return 0;let f=l(c);return t.compare(f,c.values[s])?0:(c.values[s]=f,1)},reconfigure(c,d){let f=ny(c,r),m=d.config.facets[t.id],p=d.facet(t);if(m&&!f&&gx(n,m))return c.values[s]=p,0;let O=l(c);return t.compare(O,p)?(c.values[s]=p,0):(c.values[s]=O,1)}}}var Sh=Ie.define({static:!0}),Xs=class uP{constructor(t,n,r,i,a){this.id=t,this.createF=n,this.updateF=r,this.compareF=i,this.spec=a,this.provides=void 0}static define(t){let n=new uP(px++,t.create,t.update,t.compare||((r,i)=>r===i),t);return t.provide&&(n.provides=t.provide(n)),n}create(t){let n=t.facet(Sh).find(r=>r.field==this);return((n==null?void 0:n.create)||this.createF)(t)}slot(t){let n=t[this.id]>>1;return{create:r=>(r.values[n]=this.create(r),1),update:(r,i)=>{let a=r.values[n],s=this.updateF(a,i);return this.compareF(a,s)?0:(r.values[n]=s,1)},reconfigure:(r,i)=>{let a=r.facet(Sh),s=i.facet(Sh),l;return(l=a.find(c=>c.field==this))&&l!=s.find(c=>c.field==this)?(r.values[n]=l.create(r),1):i.config.address[this.id]!=null?(r.values[n]=i.field(this),0):(r.values[n]=this.create(r),1)}}}init(t){return[this,Sh.of({field:this,create:t})]}get extension(){return this}},vo={lowest:4,low:3,default:2,high:1,highest:0};function fu(e){return t=>new dP(t,e)}var $d={highest:fu(vo.highest),high:fu(vo.high),default:fu(vo.default),low:fu(vo.low),lowest:fu(vo.lowest)},dP=class{constructor(e,t){this.inner=e,this.prec=t}},vx=class fP{of(t){return new ry(this,t)}reconfigure(t){return fP.reconfigure.of({compartment:this,extension:t})}get(t){return t.config.compartments.get(this)}},ry=class{constructor(e,t){this.compartment=e,this.inner=t}},aj=class hP{constructor(t,n,r,i,a,s){for(this.base=t,this.compartments=n,this.dynamicSlots=r,this.address=i,this.staticValues=a,this.facets=s,this.statusTemplate=[];this.statusTemplate.length<r.length;)this.statusTemplate.push(0)}staticFacet(t){let n=this.address[t.id];return n==null?t.default:this.staticValues[n>>1]}static resolve(t,n,r){let i=[],a=Object.create(null),s=new Map;for(let p of nB(t,n,s))p instanceof Xs?i.push(p):(a[p.facet.id]||(a[p.facet.id]=[])).push(p);let l=Object.create(null),c=[],d=[];for(let p of i)l[p.id]=d.length<<1,d.push(O=>p.slot(O));let f=r==null?void 0:r.config.facets;for(let p in a){let O=a[p],b=O[0].facet,x=f&&f[p]||[];if(O.every(w=>w.type==0))if(l[b.id]=c.length<<1|1,gx(x,O))c.push(r.facet(b));else{let w=b.combine(O.map(k=>k.value));c.push(r&&b.compare(w,r.facet(b))?r.facet(b):w)}else{for(let w of O)w.type==0?(l[w.id]=c.length<<1|1,c.push(w.value)):(l[w.id]=d.length<<1,d.push(k=>w.dynamicSlot(k)));l[b.id]=d.length<<1,d.push(w=>tB(w,b,O))}}let m=d.map(p=>p(l));return new hP(t,s,m,l,c,a)}};function nB(e,t,n){let r=[[],[],[],[],[]],i=new Map;function a(s,l){let c=i.get(s);if(c!=null){if(c<=l)return;let d=r[c].indexOf(s);d>-1&&r[c].splice(d,1),s instanceof ry&&n.delete(s.compartment)}if(i.set(s,l),Array.isArray(s))for(let d of s)a(d,l);else if(s instanceof ry){if(n.has(s.compartment))throw new RangeError("Duplicate use of compartment in extensions");let d=t.get(s.compartment)||s.inner;n.set(s.compartment,d),a(d,l)}else if(s instanceof dP)a(s.inner,s.prec);else if(s instanceof Xs)r[l].push(s),s.provides&&a(s.provides,l);else if(s instanceof sm)r[l].push(s),s.facet.extensions&&a(s.facet.extensions,vo.default);else{let d=s.extension;if(!d)throw new Error(`Unrecognized extension value in extension set (${s}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);a(d,l)}}return a(e,vo.default),r.reduce((s,l)=>s.concat(l))}function $u(e,t){if(t&1)return 2;let n=t>>1,r=e.status[n];if(r==4)throw new Error("Cyclic dependency between fields and/or facets");if(r&2)return r;e.status[n]=4;let i=e.computeSlot(e,e.config.dynamicSlots[n]);return e.status[n]=2|i}function km(e,t){return t&1?e.config.staticValues[t>>1]:e.values[t>>1]}var mP=Ie.define(),iy=Ie.define({combine:e=>e.some(t=>t),static:!0}),pP=Ie.define({combine:e=>e.length?e[0]:void 0,static:!0}),gP=Ie.define(),vP=Ie.define(),OP=Ie.define(),bP=Ie.define({combine:e=>e.length?e[0]:!1}),qo=class{constructor(e,t){this.type=e,this.value=t}static define(){return new rB}},rB=class{of(e){return new qo(this,e)}},iB=class{constructor(e){this.map=e}of(e){return new tn(this,e)}},tn=class yP{constructor(t,n){this.type=t,this.value=n}map(t){let n=this.type.map(this.value,t);return n===void 0?void 0:n==this.value?this:new yP(this.type,n)}is(t){return this.type==t}static define(t={}){return new iB(t.map||(n=>n))}static mapEffects(t,n){if(!t.length)return t;let r=[];for(let i of t){let a=i.map(n);a&&r.push(a)}return r}};tn.reconfigure=tn.define();tn.appendConfig=tn.define();var si=class Su{constructor(t,n,r,i,a,s){this.startState=t,this.changes=n,this.selection=r,this.effects=i,this.annotations=a,this.scrollIntoView=s,this._doc=null,this._state=null,r&&lP(r,n.newLength),a.some(l=>l.type==Su.time)||(this.annotations=a.concat(Su.time.of(Date.now())))}static create(t,n,r,i,a,s){return new Su(t,n,r,i,a,s)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(t){for(let n of this.annotations)if(n.type==t)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let n=this.annotation(Su.userEvent);return!!(n&&(n==t||n.length>t.length&&n.slice(0,t.length)==t&&n[t.length]=="."))}};si.time=qo.define();si.userEvent=qo.define();si.addToHistory=qo.define();si.remote=qo.define();function aB(e,t){let n=[];for(let r=0,i=0;;){let a,s;if(r<e.length&&(i==t.length||t[i]>=e[r]))a=e[r++],s=e[r++];else if(i<t.length)a=t[i++],s=t[i++];else return n;!n.length||n[n.length-1]<a?n.push(a,s):n[n.length-1]<s&&(n[n.length-1]=s)}}function xP(e,t,n){var r;let i,a,s;return n?(i=t.changes,a=Ki.empty(t.changes.length),s=e.changes.compose(t.changes)):(i=t.changes.map(e.changes),a=e.changes.mapDesc(t.changes,!0),s=e.changes.compose(i)),{changes:s,selection:t.selection?t.selection.map(a):(r=e.selection)===null||r===void 0?void 0:r.map(i),effects:tn.mapEffects(e.effects,i).concat(tn.mapEffects(t.effects,a)),annotations:e.annotations.length?e.annotations.concat(t.annotations):t.annotations,scrollIntoView:e.scrollIntoView||t.scrollIntoView}}function ay(e,t,n){let r=t.selection,i=Rl(t.annotations);return t.userEvent&&(i=i.concat(si.userEvent.of(t.userEvent))),{changes:t.changes instanceof Ki?t.changes:Ki.of(t.changes||[],n,e.facet(pP)),selection:r&&(r instanceof Ae?r:Ae.single(r.anchor,r.head)),effects:Rl(t.effects),annotations:i,scrollIntoView:!!t.scrollIntoView}}function SP(e,t,n){let r=ay(e,t.length?t[0]:{},e.doc.length);t.length&&t[0].filter===!1&&(n=!1);for(let a=1;a<t.length;a++){t[a].filter===!1&&(n=!1);let s=!!t[a].sequential;r=xP(r,ay(e,t[a],s?r.changes.newLength:e.doc.length),s)}let i=si.create(e,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return oB(n?sB(i):i)}function sB(e){let t=e.startState,n=!0;for(let i of t.facet(gP)){let a=i(e);if(a===!1){n=!1;break}Array.isArray(a)&&(n=n===!0?a:aB(n,a))}if(n!==!0){let i,a;if(n===!1)a=e.changes.invertedDesc,i=Ki.empty(t.doc.length);else{let s=e.changes.filter(n);i=s.changes,a=s.filtered.mapDesc(s.changes).invertedDesc}e=si.create(t,i,e.selection&&e.selection.map(a),tn.mapEffects(e.effects,a),e.annotations,e.scrollIntoView)}let r=t.facet(vP);for(let i=r.length-1;i>=0;i--){let a=r[i](e);a instanceof si?e=a:Array.isArray(a)&&a.length==1&&a[0]instanceof si?e=a[0]:e=SP(t,Rl(a),!1)}return e}function oB(e){let t=e.startState,n=t.facet(OP),r=e;for(let i=n.length-1;i>=0;i--){let a=n[i](e);a&&Object.keys(a).length&&(r=xP(r,ay(t,a,e.changes.newLength),!0))}return r==e?e:si.create(t,e.changes,e.selection,r.effects,r.annotations,r.scrollIntoView)}var lB=[];function Rl(e){return e==null?lB:Array.isArray(e)?e:[e]}var Ca=(function(e){return e[e.Word=0]="Word",e[e.Space=1]="Space",e[e.Other=2]="Other",e})(Ca||(Ca={})),cB=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,sy;try{sy=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function uB(e){if(sy)return sy.test(e);for(let t=0;t<e.length;t++){let n=e[t];if(/\w/.test(n)||n>""&&(n.toUpperCase()!=n.toLowerCase()||cB.test(n)))return!0}return!1}function dB(e){return t=>{if(!/\S/.test(t))return Ca.Space;if(uB(t))return Ca.Word;for(let n=0;n<e.length;n++)if(t.indexOf(e[n])>-1)return Ca.Word;return Ca.Other}}var Gt=class bi{constructor(t,n,r,i,a,s){this.config=t,this.doc=n,this.selection=r,this.values=i,this.status=t.statusTemplate.slice(),this.computeSlot=a,s&&(s._state=this);for(let l=0;l<this.config.dynamicSlots.length;l++)$u(this,l<<1);this.computeSlot=null}field(t,n=!0){let r=this.config.address[t.id];if(r==null){if(n)throw new RangeError("Field is not present in this state");return}return $u(this,r),km(this,r)}update(...t){return SP(this,t,!0)}applyTransaction(t){let n=this.config,{base:r,compartments:i}=n;for(let l of t.effects)l.is(vx.reconfigure)?(n&&(i=new Map,n.compartments.forEach((c,d)=>i.set(d,c)),n=null),i.set(l.value.compartment,l.value.extension)):l.is(tn.reconfigure)?(n=null,r=l.value):l.is(tn.appendConfig)&&(n=null,r=Rl(r).concat(l.value));let a;n?a=t.startState.values.slice():(n=aj.resolve(r,i,this),a=new bi(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(c,d)=>d.reconfigure(c,this),null).values);let s=t.startState.facet(iy)?t.newSelection:t.newSelection.asSingle();new bi(n,t.newDoc,s,a,(l,c)=>c.update(l,t),t)}replaceSelection(t){return typeof t=="string"&&(t=this.toText(t)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:t},range:Ae.cursor(n.from+t.length)}))}changeByRange(t){let n=this.selection,r=t(n.ranges[0]),i=this.changes(r.changes),a=[r.range],s=Rl(r.effects);for(let l=1;l<n.ranges.length;l++){let c=t(n.ranges[l]),d=this.changes(c.changes),f=d.map(i);for(let p=0;p<l;p++)a[p]=a[p].map(f);let m=i.mapDesc(d,!0);a.push(c.range.map(m)),i=i.compose(f),s=tn.mapEffects(s,f).concat(tn.mapEffects(Rl(c.effects),m))}return{changes:i,selection:Ae.create(a,n.mainIndex),effects:s}}changes(t=[]){return t instanceof Ki?t:Ki.of(t,this.doc.length,this.facet(bi.lineSeparator))}toText(t){return _t.of(t.split(this.facet(bi.lineSeparator)||Kb))}sliceDoc(t=0,n=this.doc.length){return this.doc.sliceString(t,n,this.lineBreak)}facet(t){let n=this.config.address[t.id];return n==null?t.default:($u(this,n),km(this,n))}toJSON(t){let n={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(t)for(let r in t){let i=t[r];i instanceof Xs&&this.config.address[i.id]!=null&&(n[r]=i.spec.toJSON(this.field(t[r]),this))}return n}static fromJSON(t,n={},r){if(!t||typeof t.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let i=[];if(r){for(let a in r)if(Object.prototype.hasOwnProperty.call(t,a)){let s=r[a],l=t[a];i.push(s.init(c=>s.spec.fromJSON(l,c)))}}return bi.create({doc:t.doc,selection:Ae.fromJSON(t.selection),extensions:n.extensions?i.concat([n.extensions]):i})}static create(t={}){let n=aj.resolve(t.extensions||[],new Map),r=t.doc instanceof _t?t.doc:_t.of((t.doc||"").split(n.staticFacet(bi.lineSeparator)||Kb)),i=t.selection?t.selection instanceof Ae?t.selection:Ae.single(t.selection.anchor,t.selection.head):Ae.single(0);return lP(i,r.length),n.staticFacet(iy)||(i=i.asSingle()),new bi(n,r,i,n.dynamicSlots.map(()=>null),(a,s)=>s.create(a),null)}get tabSize(){return this.facet(bi.tabSize)}get lineBreak(){return this.facet(bi.lineSeparator)||`
|
|
53
|
-
`}get readOnly(){return this.facet(bP)}phrase(t,...n){for(let r of this.facet(bi.phrases))if(Object.prototype.hasOwnProperty.call(r,t)){t=r[t];break}return n.length&&(t=t.replace(/\$(\$|\d*)/g,(r,i)=>{if(i=="$")return"$";let a=+(i||1);return!a||a>n.length?r:n[a-1]})),t}languageDataAt(t,n,r=-1){let i=[];for(let a of this.facet(mP))for(let s of a(this,n,r))Object.prototype.hasOwnProperty.call(s,t)&&i.push(s[t]);return i}charCategorizer(t){let n=this.languageDataAt("wordChars",t);return dB(n.length?n[0]:"")}wordAt(t){let{text:n,from:r,length:i}=this.doc.lineAt(t),a=this.charCategorizer(t),s=t-r,l=t-r;for(;s>0;){let c=wi(n,s,!1);if(a(n.slice(c,s))!=Ca.Word)break;s=c}for(;l<i;){let c=wi(n,l);if(a(n.slice(l,c))!=Ca.Word)break;l=c}return s==l?null:Ae.range(s+r,l+r)}};Gt.allowMultipleSelections=iy;Gt.tabSize=Ie.define({combine:e=>e.length?e[0]:4});Gt.lineSeparator=pP;Gt.readOnly=bP;Gt.phrases=Ie.define({compare(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length==r.length&&n.every(i=>e[i]==t[i])}});Gt.languageData=mP;Gt.changeFilter=gP;Gt.transactionFilter=vP;Gt.transactionExtender=OP;vx.reconfigure=tn.define();function fB(e,t,n={}){let r={};for(let i of e)for(let a of Object.keys(i)){let s=i[a],l=r[a];if(l===void 0)r[a]=s;else if(!(l===s||s===void 0))if(Object.hasOwnProperty.call(n,a))r[a]=n[a](l,s);else throw new Error("Config merge conflict for field "+a)}for(let i in t)r[i]===void 0&&(r[i]=t[i]);return r}var Ns=class{eq(e){return this==e}range(e,t=e){return oy.create(e,t,this)}};Ns.prototype.startSide=Ns.prototype.endSide=0;Ns.prototype.point=!1;Ns.prototype.mapMode=Gn.TrackDel;function Ox(e,t){return e==t||e.constructor==t.constructor&&e.eq(t)}var oy=class wP{constructor(t,n,r){this.from=t,this.to=n,this.value=r}static create(t,n,r){return new wP(t,n,r)}};function ly(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}var hB=class _P{constructor(t,n,r,i){this.from=t,this.to=n,this.value=r,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(t,n,r,i=0){let a=r?this.to:this.from;for(let s=i,l=a.length;;){if(s==l)return s;let c=s+l>>1,d=a[c]-t||(r?this.value[c].endSide:this.value[c].startSide)-n;if(c==s)return d>=0?s:l;d>=0?l=c:s=c+1}}between(t,n,r,i){for(let a=this.findIndex(n,-1e9,!0),s=this.findIndex(r,1e9,!1,a);a<s;a++)if(i(this.from[a]+t,this.to[a]+t,this.value[a])===!1)return!1}map(t,n){let r=[],i=[],a=[],s=-1,l=-1;for(let c=0;c<this.value.length;c++){let d=this.value[c],f=this.from[c]+t,m=this.to[c]+t,p,O;if(f==m){let b=n.mapPos(f,d.startSide,d.mapMode);if(b==null||(p=O=b,d.startSide!=d.endSide&&(O=n.mapPos(f,d.endSide),O<p)))continue}else if(p=n.mapPos(f,d.startSide),O=n.mapPos(m,d.endSide),p>O||p==O&&d.startSide>0&&d.endSide<=0)continue;(O-p||d.endSide-d.startSide)<0||(s<0&&(s=p),d.point&&(l=Math.max(l,O-p)),r.push(d),i.push(p-s),a.push(O-s))}return{mapped:r.length?new _P(i,a,r,l):null,pos:s}}},Ft=class wa{constructor(t,n,r,i){this.chunkPos=t,this.chunk=n,this.nextLayer=r,this.maxPoint=i}static create(t,n,r,i){return new wa(t,n,r,i)}get length(){let t=this.chunk.length-1;return t<0?0:Math.max(this.chunkEnd(t),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let t=this.nextLayer.size;for(let n of this.chunk)t+=n.value.length;return t}chunkEnd(t){return this.chunkPos[t]+this.chunk[t].length}update(t){let{add:n=[],sort:r=!1,filterFrom:i=0,filterTo:a=this.length}=t,s=t.filter;if(n.length==0&&!s)return this;if(r&&(n=n.slice().sort(ly)),this.isEmpty)return n.length?wa.of(n):this;let l=new jP(this,null,-1).goto(0),c=0,d=[],f=new ud;for(;l.value||c<n.length;)if(c<n.length&&(l.from-n[c].from||l.startSide-n[c].value.startSide)>=0){let m=n[c++];f.addInner(m.from,m.to,m.value)||d.push(m)}else l.rangeIndex==1&&l.chunkIndex<this.chunk.length&&(c==n.length||this.chunkEnd(l.chunkIndex)<n[c].from)&&(!s||i>this.chunkEnd(l.chunkIndex)||a<this.chunkPos[l.chunkIndex])&&f.addChunk(this.chunkPos[l.chunkIndex],this.chunk[l.chunkIndex])?l.nextChunk():((!s||i>l.to||a<l.from||s(l.from,l.to,l.value))&&(f.addInner(l.from,l.to,l.value)||d.push(oy.create(l.from,l.to,l.value))),l.next());return f.finishInner(this.nextLayer.isEmpty&&!d.length?wa.empty:this.nextLayer.update({add:d,filter:s,filterFrom:i,filterTo:a}))}map(t){if(t.empty||this.isEmpty)return this;let n=[],r=[],i=-1;for(let s=0;s<this.chunk.length;s++){let l=this.chunkPos[s],c=this.chunk[s],d=t.touchesRange(l,l+c.length);if(d===!1)i=Math.max(i,c.maxPoint),n.push(c),r.push(t.mapPos(l));else if(d===!0){let{mapped:f,pos:m}=c.map(l,t);f&&(i=Math.max(i,f.maxPoint),n.push(f),r.push(m))}}let a=this.nextLayer.map(t);return n.length==0?a:new wa(r,n,a||wa.empty,i)}between(t,n,r){if(!this.isEmpty){for(let i=0;i<this.chunk.length;i++){let a=this.chunkPos[i],s=this.chunk[i];if(n>=a&&t<=a+s.length&&s.between(a,t-a,n-a,r)===!1)return}this.nextLayer.between(t,n,r)}}iter(t=0){return cy.from([this]).goto(t)}get isEmpty(){return this.nextLayer==this}static iter(t,n=0){return cy.from(t).goto(n)}static compare(t,n,r,i,a=-1){let s=t.filter(m=>m.maxPoint>0||!m.isEmpty&&m.maxPoint>=a),l=n.filter(m=>m.maxPoint>0||!m.isEmpty&&m.maxPoint>=a),c=sj(s,l,r),d=new hu(s,c,a),f=new hu(l,c,a);r.iterGaps((m,p,O)=>oj(d,m,f,p,O,i)),r.empty&&r.length==0&&oj(d,0,f,0,0,i)}static eq(t,n,r=0,i){i==null&&(i=999999999);let a=t.filter(f=>!f.isEmpty&&n.indexOf(f)<0),s=n.filter(f=>!f.isEmpty&&t.indexOf(f)<0);if(a.length!=s.length)return!1;if(!a.length)return!0;let l=sj(a,s),c=new hu(a,l,0).goto(r),d=new hu(s,l,0).goto(r);for(;;){if(c.to!=d.to||!uy(c.active,d.active)||c.point&&(!d.point||!Ox(c.point,d.point)))return!1;if(c.to>i)return!0;c.next(),d.next()}}static spans(t,n,r,i,a=-1){let s=new hu(t,null,a).goto(n),l=n,c=s.openStart;for(;;){let d=Math.min(s.to,r);if(s.point){let f=s.activeForPoint(s.to),m=s.pointFrom<n?f.length+1:s.point.startSide<0?f.length:Math.min(f.length,c);i.point(l,d,s.point,f,m,s.pointRank),c=Math.min(s.openEnd(d),f.length)}else d>l&&(i.span(l,d,s.active,c),c=s.openEnd(d));if(s.to>r)return c+(s.point&&s.to>r?1:0);l=s.to,s.next()}}static of(t,n=!1){let r=new ud;for(let i of t instanceof oy?[t]:n?mB(t):t)r.add(i.from,i.to,i.value);return r.finish()}static join(t){if(!t.length)return wa.empty;let n=t[t.length-1];for(let r=t.length-2;r>=0;r--)for(let i=t[r];i!=wa.empty;i=i.nextLayer)n=new wa(i.chunkPos,i.chunk,n,Math.max(i.maxPoint,n.maxPoint));return n}};Ft.empty=new Ft([],[],null,-1);function mB(e){if(e.length>1)for(let t=e[0],n=1;n<e.length;n++){let r=e[n];if(ly(t,r)>0)return e.slice().sort(ly);t=r}return e}Ft.empty.nextLayer=Ft.empty;var ud=class kP{finishChunk(t){this.chunks.push(new hB(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,t&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(t,n,r){this.addInner(t,n,r)||(this.nextLayer||(this.nextLayer=new kP)).add(t,n,r)}addInner(t,n,r){let i=t-this.lastTo||r.startSide-this.last.endSide;if(i<=0&&(t-this.lastFrom||r.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return i<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=t),this.from.push(t-this.chunkStart),this.to.push(n-this.chunkStart),this.last=r,this.lastFrom=t,this.lastTo=n,this.value.push(r),r.point&&(this.maxPoint=Math.max(this.maxPoint,n-t)),!0)}addChunk(t,n){if((t-this.lastTo||n.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,n.maxPoint),this.chunks.push(n),this.chunkPos.push(t);let r=n.value.length-1;return this.last=n.value[r],this.lastFrom=n.from[r]+t,this.lastTo=n.to[r]+t,!0}finish(){return this.finishInner(Ft.empty)}finishInner(t){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return t;let n=Ft.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(t):t,this.setMaxPoint);return this.from=null,n}};function sj(e,t,n){let r=new Map;for(let a of e)for(let s=0;s<a.chunk.length;s++)a.chunk[s].maxPoint<=0&&r.set(a.chunk[s],a.chunkPos[s]);let i=new Set;for(let a of t)for(let s=0;s<a.chunk.length;s++){let l=r.get(a.chunk[s]);l!=null&&(n?n.mapPos(l):l)==a.chunkPos[s]&&!(n!=null&&n.touchesRange(l,l+a.chunk[s].length))&&i.add(a.chunk[s])}return i}var jP=class{constructor(e,t,n,r=0){this.layer=e,this.skip=t,this.minPoint=n,this.rank=r}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,n){for(;this.chunkIndex<this.layer.chunk.length;){let r=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(r)||this.layer.chunkEnd(this.chunkIndex)<e||r.maxPoint<this.minPoint))break;this.chunkIndex++,n=!1}if(this.chunkIndex<this.layer.chunk.length){let r=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!n||this.rangeIndex<r)&&this.setRangeIndex(r)}this.next()}forward(e,t){(this.to-e||this.endSide-t)<0&&this.gotoInner(e,t,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex],n=e+t.from[this.rangeIndex];if(this.from=n,this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}},cy=class TP{constructor(t){this.heap=t}static from(t,n=null,r=-1){let i=[];for(let a=0;a<t.length;a++)for(let s=t[a];!s.isEmpty;s=s.nextLayer)s.maxPoint>=r&&i.push(new jP(s,n,r,a));return i.length==1?i[0]:new TP(i)}get startSide(){return this.value?this.value.startSide:0}goto(t,n=-1e9){for(let r of this.heap)r.goto(t,n);for(let r=this.heap.length>>1;r>=0;r--)_O(this.heap,r);return this.next(),this}forward(t,n){for(let r of this.heap)r.forward(t,n);for(let r=this.heap.length>>1;r>=0;r--)_O(this.heap,r);(this.to-t||this.value.endSide-n)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let t=this.heap[0];this.from=t.from,this.to=t.to,this.value=t.value,this.rank=t.rank,t.value&&t.next(),_O(this.heap,0)}}};function _O(e,t){for(let n=e[t];;){let r=(t<<1)+1;if(r>=e.length)break;let i=e[r];if(r+1<e.length&&i.compare(e[r+1])>=0&&(i=e[r+1],r++),n.compare(i)<0)break;e[r]=n,e[t]=i,t=r}}var hu=class{constructor(e,t,n){this.minPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=cy.from(e,t,n)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){wh(this.active,e),wh(this.activeTo,e),wh(this.activeRank,e),this.minActive=lj(this.active,this.activeTo)}addActive(e){let t=0,{value:n,to:r,rank:i}=this.cursor;for(;t<this.activeRank.length&&(i-this.activeRank[t]||r-this.activeTo[t])>0;)t++;_h(this.active,t,n),_h(this.activeTo,t,r),_h(this.activeRank,t,i),e&&_h(e,t,this.cursor.from),this.minActive=lj(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let n=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),n&&wh(n,r)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let i=this.cursor.value;if(!i.point)this.addActive(n),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=i,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=i.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(n){this.openStart=0;for(let r=n.length-1;r>=0&&n[r]<e;r--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let n=this.active.length-1;n>=0&&!(this.activeRank[n]<this.pointRank);n--)(this.activeTo[n]>e||this.activeTo[n]==e&&this.active[n].endSide>=this.point.endSide)&&t.push(this.active[n]);return t.reverse()}openEnd(e){let t=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)t++;return t}};function oj(e,t,n,r,i,a){e.goto(t),n.goto(r);let s=r+i,l=r,c=r-t,d=!!a.boundChange;for(let f=!1;;){let m=e.to+c-n.to,p=m||e.endSide-n.endSide,O=p<0?e.to+c:n.to,b=Math.min(O,s);if(e.point||n.point?(e.point&&n.point&&Ox(e.point,n.point)&&uy(e.activeForPoint(e.to),n.activeForPoint(n.to))||a.comparePoint(l,b,e.point,n.point),f=!1):(f&&a.boundChange(l),b>l&&!uy(e.active,n.active)&&a.compareRange(l,b,e.active,n.active),d&&b<s&&(m||e.openEnd(O)!=n.openEnd(O))&&(f=!0)),O>s)break;l=O,p<=0&&e.next(),p>=0&&n.next()}}function uy(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n]&&!Ox(e[n],t[n]))return!1;return!0}function wh(e,t){for(let n=t,r=e.length-1;n<r;n++)e[n]=e[n+1];e.pop()}function _h(e,t,n){for(let r=e.length-1;r>=t;r--)e[r+1]=e[r];e[t]=n}function lj(e,t){let n=-1,r=1e9;for(let i=0;i<t.length;i++)(t[i]-r||e[i].endSide-e[n].endSide)<0&&(n=i,r=t[i]);return n}function dd(e,t,n=e.length){let r=0;for(let i=0;i<n&&i<e.length;)e.charCodeAt(i)==9?(r+=t-r%t,i++):(r++,i=wi(e,i));return r}function pB(e,t,n,r){for(let i=0,a=0;;){if(a>=t)return i;if(i==e.length)break;a+=e.charCodeAt(i)==9?n-a%n:1,i=wi(e,i)}return e.length}var dy="ͼ",cj=typeof Symbol>"u"?"__"+dy:Symbol.for(dy),fy=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),uj=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{},Rs=class{constructor(e,t){this.rules=[];let{finish:n}=t||{};function r(a){return/^@/.test(a)?[a]:a.split(/,\s*/)}function i(a,s,l,c){let d=[],f=/^@(\w+)\b/.exec(a[0]),m=f&&f[1]=="keyframes";if(f&&s==null)return l.push(a[0]+";");for(let p in s){let O=s[p];if(/&/.test(p))i(p.split(/,\s*/).map(b=>a.map(x=>b.replace(/&/,x))).reduce((b,x)=>b.concat(x)),O,l);else if(O&&typeof O=="object"){if(!f)throw new RangeError("The value of a property ("+p+") should be a primitive value.");i(r(p),O,d,m)}else O!=null&&d.push(p.replace(/_.*/,"").replace(/[A-Z]/g,b=>"-"+b.toLowerCase())+": "+O+";")}(d.length||m)&&l.push((n&&!f&&!c?a.map(n):a).join(", ")+" {"+d.join(" ")+"}")}for(let a in e)i(r(a),e[a],this.rules)}getRules(){return this.rules.join(`
|
|
54
|
-
`)}static newName(){let e=uj[cj]||1;return uj[cj]=e+1,dy+e.toString(36)}static mount(e,t,n){let r=e[fy],i=n&&n.nonce;r?i&&r.setNonce(i):r=new gB(e,i),r.mount(Array.isArray(t)?t:[t],e)}},dj=new Map,gB=class{constructor(e,t){let n=e.ownerDocument||e,r=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let i=dj.get(n);if(i)return e[fy]=i;this.sheet=new r.CSSStyleSheet,dj.set(n,this)}else this.styleTag=n.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[fy]=this}mount(e,t){let n=this.sheet,r=0,i=0;for(let a=0;a<e.length;a++){let s=e[a],l=this.modules.indexOf(s);if(l<i&&l>-1&&(this.modules.splice(l,1),i--,l=-1),l==-1){if(this.modules.splice(i++,0,s),n)for(let c=0;c<s.rules.length;c++)n.insertRule(s.rules[c],r++)}else{for(;i<l;)r+=this.modules[i++].rules.length;r+=s.rules.length,i++}}if(n)t.adoptedStyleSheets.indexOf(this.sheet)<0&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{let a="";for(let l=0;l<this.modules.length;l++)a+=this.modules[l].getRules()+`
|
|
55
|
-
`;this.styleTag.textContent=a;let s=t.head||t;this.styleTag.parentNode!=s&&s.insertBefore(this.styleTag,s.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}},Ms={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},fd={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},vB=typeof navigator<"u"&&/Mac/.test(navigator.platform),OB=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(vn=0;vn<10;vn++)Ms[48+vn]=Ms[96+vn]=String(vn);var vn;for(vn=1;vn<=24;vn++)Ms[vn+111]="F"+vn;var vn;for(vn=65;vn<=90;vn++)Ms[vn]=String.fromCharCode(vn+32),fd[vn]=String.fromCharCode(vn);var vn;for(kh in Ms)fd.hasOwnProperty(kh)||(fd[kh]=Ms[kh]);var kh;function bB(e){var t=vB&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||OB&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",n=!t&&e.key||(e.shiftKey?fd:Ms)[e.keyCode]||e.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}var Hn=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},hy=typeof document<"u"?document:{documentElement:{style:{}}},my=/Edge\/(\d+)/.exec(Hn.userAgent),CP=/MSIE \d/.test(Hn.userAgent),py=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Hn.userAgent),mp=!!(CP||py||my),fj=!mp&&/gecko\/(\d+)/i.test(Hn.userAgent),kO=!mp&&/Chrome\/(\d+)/.exec(Hn.userAgent),yB="webkitFontSmoothing"in hy.documentElement.style,gy=!mp&&/Apple Computer/.test(Hn.vendor),hj=gy&&(/Mobile\/\w+/.test(Hn.userAgent)||Hn.maxTouchPoints>2),_e={mac:hj||/Mac/.test(Hn.platform),windows:/Win/.test(Hn.platform),linux:/Linux|X11/.test(Hn.platform),ie:mp,ie_version:CP?hy.documentMode||6:py?+py[1]:my?+my[1]:0,gecko:fj,gecko_version:fj?+(/Firefox\/(\d+)/.exec(Hn.userAgent)||[0,0])[1]:0,chrome:!!kO,chrome_version:kO?+kO[1]:0,ios:hj,android:/Android\b/.test(Hn.userAgent),webkit_version:yB?+(/\bAppleWebKit\/(\d+)/.exec(Hn.userAgent)||[0,0])[1]:0,safari:gy,safari_version:gy?+(/\bVersion\/(\d+(\.\d+)?)/.exec(Hn.userAgent)||[0,0])[1]:0,tabSize:hy.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};function bx(e,t){for(let n in e)n=="class"&&t.class?t.class+=" "+e.class:n=="style"&&t.style?t.style+=";"+e.style:t[n]=e[n];return t}var jm=Object.create(null);function yx(e,t,n){if(e==t)return!0;e||(e=jm),t||(t=jm);let r=Object.keys(e),i=Object.keys(t);if(r.length-0!=i.length-0)return!1;for(let a of r)if(a!=n&&(i.indexOf(a)==-1||e[a]!==t[a]))return!1;return!0}function xB(e,t){for(let n=e.attributes.length-1;n>=0;n--){let r=e.attributes[n].name;t[r]==null&&e.removeAttribute(r)}for(let n in t){let r=t[n];n=="style"?e.style.cssText=r:e.getAttribute(n)!=r&&e.setAttribute(n,r)}}function mj(e,t,n){let r=!1;if(t)for(let i in t)n&&i in n||(r=!0,i=="style"?e.style.cssText="":e.removeAttribute(i));if(n)for(let i in n)t&&t[i]==n[i]||(r=!0,i=="style"?e.style.cssText=n[i]:e.setAttribute(i,n[i]));return r}function SB(e){let t=Object.create(null);for(let n=0;n<e.attributes.length;n++){let r=e.attributes[n];t[r.name]=r.value}return t}var dc=class{eq(e){return!1}updateDOM(e,t,n){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,n){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}},mr=(function(e){return e[e.Text=0]="Text",e[e.WidgetBefore=1]="WidgetBefore",e[e.WidgetAfter=2]="WidgetAfter",e[e.WidgetRange=3]="WidgetRange",e})(mr||(mr={})),qt=class extends Ns{constructor(e,t,n,r){super(),this.startSide=e,this.endSide=t,this.widget=n,this.spec=r}get heightRelevant(){return!1}static mark(e){return new xx(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),n=!!e.block;return t+=n&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new hd(e,t,t,n,e.widget||null,!1)}static replace(e){let t=!!e.block,n,r;if(e.isBlockGap)n=-5e8,r=4e8;else{let{start:i,end:a}=PP(e,t);n=(i?t?-3e8:-1:5e8)-1,r=(a?t?2e8:1:-6e8)+1}return new hd(e,n,r,t,e.widget||null,!0)}static line(e){return new Sx(e)}static set(e,t=!1){return Ft.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}};qt.none=Ft.empty;var xx=class EP extends qt{constructor(t){let{start:n,end:r}=PP(t);super(n?-1:5e8,r?1:-6e8,null,t),this.tagName=t.tagName||"span",this.attrs=t.class&&t.attributes?bx(t.attributes,{class:t.class}):t.class?{class:t.class}:t.attributes||jm}eq(t){return this==t||t instanceof EP&&this.tagName==t.tagName&&yx(this.attrs,t.attrs)}range(t,n=t){if(t>=n)throw new RangeError("Mark decorations may not be empty");return super.range(t,n)}};xx.prototype.point=!1;var Sx=class AP extends qt{constructor(t){super(-2e8,-2e8,null,t)}eq(t){return t instanceof AP&&this.spec.class==t.spec.class&&yx(this.spec.attributes,t.spec.attributes)}range(t,n=t){if(n!=t)throw new RangeError("Line decoration ranges must be zero-length");return super.range(t,n)}};Sx.prototype.mapMode=Gn.TrackBefore;Sx.prototype.point=!0;var hd=class QP extends qt{constructor(t,n,r,i,a,s){super(n,r,a,t),this.block=i,this.isReplace=s,this.mapMode=i?n<=0?Gn.TrackBefore:Gn.TrackAfter:Gn.TrackDel}get type(){return this.startSide!=this.endSide?mr.WidgetRange:this.startSide<=0?mr.WidgetBefore:mr.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(t){return t instanceof QP&&wB(this.widget,t.widget)&&this.block==t.block&&this.startSide==t.startSide&&this.endSide==t.endSide}range(t,n=t){if(this.isReplace&&(t>n||t==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=t)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(t,n)}};hd.prototype.point=!0;function PP(e,t=!1){let{inclusiveStart:n,inclusiveEnd:r}=e;return n==null&&(n=e.inclusive),r==null&&(r=e.inclusive),{start:n??t,end:r??t}}function wB(e,t){return e==t||!!(e&&t&&e.compare(t))}function Ml(e,t,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=e?n[i]=Math.max(n[i],t):n.push(e,t)}var pj=class vy extends Ns{constructor(t,n){super(),this.tagName=t,this.attributes=n}eq(t){return t==this||t instanceof vy&&this.tagName==t.tagName&&yx(this.attributes,t.attributes)}static create(t){return new vy(t.tagName,t.attributes||jm)}static set(t,n=!1){return Ft.of(t,n)}};pj.prototype.startSide=pj.prototype.endSide=-1;function md(e){let t;return e.nodeType==11?t=e.getSelection?e:e.ownerDocument:t=e,t.getSelection()}function Oy(e,t){return t?e==t||e.contains(t.nodeType!=1?t.parentNode:t):!1}function Iu(e,t){if(!t.anchorNode)return!1;try{return Oy(e,t.anchorNode)}catch{return!1}}function om(e){return e.nodeType==3?pd(e,0,e.nodeValue.length).getClientRects():e.nodeType==1?e.getClientRects():[]}function qu(e,t,n,r){return n?gj(e,t,n,r,-1)||gj(e,t,n,r,1):!1}function Ds(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t}function Tm(e){return e.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e.nodeName)}function gj(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:Na(e))){if(e.nodeName=="DIV")return!1;let a=e.parentNode;if(!a||a.nodeType!=1)return!1;t=Ds(e)+(i<0?0:1),e=a}else if(e.nodeType==1){if(e=e.childNodes[t+(i<0?-1:0)],e.nodeType==1&&e.contentEditable=="false")return!1;t=i<0?Na(e):0}else return!1}}function Na(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function Cm(e,t){let n=t?e.left:e.right;return{left:n,right:n,top:e.top,bottom:e.bottom}}function _B(e){let t=e.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}function NP(e,t){let n=t.width/e.offsetWidth,r=t.height/e.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(t.width-e.offsetWidth)<1)&&(n=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(t.height-e.offsetHeight)<1)&&(r=1),{scaleX:n,scaleY:r}}function kB(e,t,n,r,i,a,s,l){let c=e.ownerDocument,d=c.defaultView||window;for(let f=e,m=!1;f&&!m;)if(f.nodeType==1){let p,O=f==c.body,b=1,x=1;if(O)p=_B(d);else{if(/^(fixed|sticky)$/.test(getComputedStyle(f).position)&&(m=!0),f.scrollHeight<=f.clientHeight&&f.scrollWidth<=f.clientWidth){f=f.assignedSlot||f.parentNode;continue}let T=f.getBoundingClientRect();({scaleX:b,scaleY:x}=NP(f,T)),p={left:T.left,right:T.left+f.clientWidth*b,top:T.top,bottom:T.top+f.clientHeight*x}}let w=0,k=0;if(i=="nearest")t.top<p.top?(k=t.top-(p.top+s),n>0&&t.bottom>p.bottom+k&&(k=t.bottom-p.bottom+s)):t.bottom>p.bottom&&(k=t.bottom-p.bottom+s,n<0&&t.top-k<p.top&&(k=t.top-(p.top+s)));else{let T=t.bottom-t.top,j=p.bottom-p.top;k=(i=="center"&&T<=j?t.top+T/2-j/2:i=="start"||i=="center"&&n<0?t.top-s:t.bottom-j+s)-p.top}if(r=="nearest"?t.left<p.left?(w=t.left-(p.left+a),n>0&&t.right>p.right+w&&(w=t.right-p.right+a)):t.right>p.right&&(w=t.right-p.right+a,n<0&&t.left<p.left+w&&(w=t.left-(p.left+a))):w=(r=="center"?t.left+(t.right-t.left)/2-(p.right-p.left)/2:r=="start"==l?t.left-a:t.right-(p.right-p.left)+a)-p.left,w||k)if(O)d.scrollBy(w,k);else{let T=0,j=0;if(k){let E=f.scrollTop;f.scrollTop+=k/x,j=(f.scrollTop-E)*x}if(w){let E=f.scrollLeft;f.scrollLeft+=w/b,T=(f.scrollLeft-E)*b}t={left:t.left-T,top:t.top-j,right:t.right-T,bottom:t.bottom-j},T&&Math.abs(T-w)<1&&(r="nearest"),j&&Math.abs(j-k)<1&&(i="nearest")}if(O)break;(t.top<p.top||t.bottom>p.bottom||t.left<p.left||t.right>p.right)&&(t={left:Math.max(t.left,p.left),right:Math.min(t.right,p.right),top:Math.max(t.top,p.top),bottom:Math.min(t.bottom,p.bottom)}),f=f.assignedSlot||f.parentNode}else if(f.nodeType==11)f=f.host;else break}function RP(e,t=!0){let n=e.ownerDocument,r=null,i=null;for(let a=e.parentNode;a&&!(a==n.body||(!t||r)&&i);)if(a.nodeType==1)!i&&a.scrollHeight>a.clientHeight&&(i=a),t&&!r&&a.scrollWidth>a.clientWidth&&(r=a),a=a.assignedSlot||a.parentNode;else if(a.nodeType==11)a=a.host;else break;return{x:r,y:i}}var jB=class{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:n}=e;this.set(t,Math.min(e.anchorOffset,t?Na(t):0),n,Math.min(e.focusOffset,n?Na(n):0))}set(e,t,n,r){this.anchorNode=e,this.anchorOffset=t,this.focusNode=n,this.focusOffset=r}},mo=null;_e.safari&&_e.safari_version>=26&&(mo=!1);function MP(e){if(e.setActive)return e.setActive();if(mo)return e.focus(mo);let t=[];for(let n=e;n&&(t.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(e.focus(mo==null?{get preventScroll(){return mo={preventScroll:!0},!0}}:void 0),!mo){mo=!1;for(let n=0;n<t.length;){let r=t[n++],i=t[n++],a=t[n++];r.scrollTop!=i&&(r.scrollTop=i),r.scrollLeft!=a&&(r.scrollLeft=a)}}}var vj;function pd(e,t,n=t){let r=vj||(vj=document.createRange());return r.setEnd(e,n),r.setStart(e,t),r}function Dl(e,t,n,r){let i={key:t,code:t,keyCode:n,which:n,cancelable:!0};r&&({altKey:i.altKey,ctrlKey:i.ctrlKey,shiftKey:i.shiftKey,metaKey:i.metaKey}=r);let a=new KeyboardEvent("keydown",i);a.synthetic=!0,e.dispatchEvent(a);let s=new KeyboardEvent("keyup",i);return s.synthetic=!0,e.dispatchEvent(s),a.defaultPrevented||s.defaultPrevented}function TB(e){for(;e;){if(e&&(e.nodeType==9||e.nodeType==11&&e.host))return e;e=e.assignedSlot||e.parentNode}return null}function CB(e,t){let n=t.focusNode,r=t.focusOffset;if(!n||t.anchorNode!=n||t.anchorOffset!=r)return!1;for(r=Math.min(r,Na(n));;)if(r){if(n.nodeType!=1)return!1;let i=n.childNodes[r-1];i.contentEditable=="false"?r--:(n=i,r=Na(n))}else{if(n==e)return!0;r=Ds(n),n=n.parentNode}}function DP(e){return e instanceof Window?e.pageYOffset>Math.max(0,e.document.documentElement.scrollHeight-e.innerHeight-4):e.scrollTop>Math.max(1,e.scrollHeight-e.clientHeight-4)}function LP(e,t){for(let n=e,r=t;;){if(n.nodeType==3&&r>0)return{node:n,offset:r};if(n.nodeType==1&&r>0){if(n.contentEditable=="false")return null;n=n.childNodes[r-1],r=Na(n)}else if(n.parentNode&&!Tm(n))r=Ds(n),n=n.parentNode;else return null}}function zP(e,t){for(let n=e,r=t;;){if(n.nodeType==3&&r<n.nodeValue.length)return{node:n,offset:r};if(n.nodeType==1&&r<n.childNodes.length){if(n.contentEditable=="false")return null;n=n.childNodes[r],r=0}else if(n.parentNode&&!Tm(n))r=Ds(n)+1,n=n.parentNode;else return null}}var js=class by{constructor(t,n,r=!0){this.node=t,this.offset=n,this.precise=r}static before(t,n){return new by(t.parentNode,Ds(t),n)}static after(t,n){return new by(t.parentNode,Ds(t)+1,n)}},On=(function(e){return e[e.LTR=0]="LTR",e[e.RTL=1]="RTL",e})(On||(On={})),Qo=On.LTR,wx=On.RTL;function $P(e){let t=[];for(let n=0;n<e.length;n++)t.push(1<<+e[n]);return t}var EB=$P("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),AB=$P("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),yy=Object.create(null),Li=[];for(let e of["()","[]","{}"]){let t=e.charCodeAt(0),n=e.charCodeAt(1);yy[t]=n,yy[n]=-t}function IP(e){return e<=247?EB[e]:1424<=e&&e<=1524?2:1536<=e&&e<=1785?AB[e-1536]:1774<=e&&e<=2220?4:8192<=e&&e<=8204?256:64336<=e&&e<=65023?4:1}var QB=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/,Wi=class{get dir(){return this.level%2?wx:Qo}constructor(e,t,n){this.from=e,this.to=t,this.level=n}side(e,t){return this.dir==t==e?this.to:this.from}forward(e,t){return e==(this.dir==t)}static find(e,t,n,r){let i=-1;for(let a=0;a<e.length;a++){let s=e[a];if(s.from<=t&&s.to>=t){if(s.level==n)return a;(i<0||(r!=0?r<0?s.from<t:s.to>t:e[i].level>s.level))&&(i=a)}}if(i<0)throw new RangeError("Index out of range");return i}};function qP(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.from!=i.from||r.to!=i.to||r.direction!=i.direction||!qP(r.inner,i.inner))return!1}return!0}var Nt=[];function PB(e,t,n,r,i){for(let a=0;a<=r.length;a++){let s=a?r[a-1].to:t,l=a<r.length?r[a].from:n,c=a?256:i;for(let d=s,f=c,m=c;d<l;d++){let p=IP(e.charCodeAt(d));p==512?p=f:p==8&&m==4&&(p=16),Nt[d]=p==4?2:p,p&7&&(m=p),f=p}for(let d=s,f=c,m=c;d<l;d++){let p=Nt[d];if(p==128)d<l-1&&f==Nt[d+1]&&f&24?p=Nt[d]=f:Nt[d]=256;else if(p==64){let O=d+1;for(;O<l&&Nt[O]==64;)O++;let b=d&&f==8||O<n&&Nt[O]==8?m==1?1:8:256;for(let x=d;x<O;x++)Nt[x]=b;d=O-1}else p==8&&m==1&&(Nt[d]=1);f=p,p&7&&(m=p)}}}function NB(e,t,n,r,i){let a=i==1?2:1;for(let s=0,l=0,c=0;s<=r.length;s++){let d=s?r[s-1].to:t,f=s<r.length?r[s].from:n;for(let m=d,p,O,b;m<f;m++)if(O=yy[p=e.charCodeAt(m)])if(O<0){for(let x=l-3;x>=0;x-=3)if(Li[x+1]==-O){let w=Li[x+2],k=w&2?i:w&4?w&1?a:i:0;k&&(Nt[m]=Nt[Li[x]]=k),l=x;break}}else{if(Li.length==189)break;Li[l++]=m,Li[l++]=p,Li[l++]=c}else if((b=Nt[m])==2||b==1){let x=b==i;c=x?0:1;for(let w=l-3;w>=0;w-=3){let k=Li[w+2];if(k&2)break;if(x)Li[w+2]|=2;else{if(k&4)break;Li[w+2]|=4}}}}}function RB(e,t,n,r){for(let i=0,a=r;i<=n.length;i++){let s=i?n[i-1].to:e,l=i<n.length?n[i].from:t;for(let c=s;c<l;){let d=Nt[c];if(d==256){let f=c+1;for(;;)if(f==l){if(i==n.length)break;f=n[i++].to,l=i<n.length?n[i].from:t}else if(Nt[f]==256)f++;else break;let m=a==1,p=(f<t?Nt[f]:r)==1,O=m==p?m?1:2:r;for(let b=f,x=i,w=x?n[x-1].to:e;b>c;)b==w&&(b=n[--x].from,w=x?n[x-1].to:e),Nt[--b]=O;c=f}else a=d,c++}}}function xy(e,t,n,r,i,a,s){let l=r%2?2:1;if(r%2==i%2)for(let c=t,d=0;c<n;){let f=!0,m=!1;if(d==a.length||c<a[d].from){let x=Nt[c];x!=l&&(f=!1,m=x==16)}let p=!f&&l==1?[]:null,O=f?r:r+1,b=c;e:for(;;)if(d<a.length&&b==a[d].from){if(m)break e;let x=a[d];if(!f)for(let w=x.to,k=d+1;;){if(w==n)break e;if(k<a.length&&a[k].from==w)w=a[k++].to;else{if(Nt[w]==l)break e;break}}if(d++,p)p.push(x);else{x.from>c&&s.push(new Wi(c,x.from,O));let w=x.direction==Qo!=!(O%2);Sy(e,w?r+1:r,i,x.inner,x.from,x.to,s),c=x.to}b=x.to}else{if(b==n||(f?Nt[b]!=l:Nt[b]==l))break;b++}p?xy(e,c,b,r+1,i,p,s):c<b&&s.push(new Wi(c,b,O)),c=b}else for(let c=n,d=a.length;c>t;){let f=!0,m=!1;if(!d||c>a[d-1].to){let x=Nt[c-1];x!=l&&(f=!1,m=x==16)}let p=!f&&l==1?[]:null,O=f?r:r+1,b=c;e:for(;;)if(d&&b==a[d-1].to){if(m)break e;let x=a[--d];if(!f)for(let w=x.from,k=d;;){if(w==t)break e;if(k&&a[k-1].to==w)w=a[--k].from;else{if(Nt[w-1]==l)break e;break}}if(p)p.push(x);else{x.to<c&&s.push(new Wi(x.to,c,O));let w=x.direction==Qo!=!(O%2);Sy(e,w?r+1:r,i,x.inner,x.from,x.to,s),c=x.from}b=x.from}else{if(b==t||(f?Nt[b-1]!=l:Nt[b-1]==l))break;b--}p?xy(e,b,c,r+1,i,p,s):b<c&&s.push(new Wi(b,c,O)),c=b}}function Sy(e,t,n,r,i,a,s){let l=t%2?2:1;PB(e,i,a,r,l),NB(e,i,a,r,l),RB(i,a,r,l),xy(e,i,a,t,n,r,s)}function MB(e,t,n){if(!e)return[new Wi(0,0,t==wx?1:0)];if(t==Qo&&!n.length&&!QB.test(e))return XP(e.length);if(n.length)for(;e.length>Nt.length;)Nt[Nt.length]=256;let r=[],i=t==Qo?0:1;return Sy(e,i,i,n,0,e.length,r),r}function XP(e){return[new Wi(0,e,0)]}var ZP="";function DB(e,t,n,r,i){var a;let s=r.head-e.from,l=Wi.find(t,s,(a=r.bidiLevel)!==null&&a!==void 0?a:-1,r.assoc),c=t[l],d=c.side(i,n);if(s==d){let p=l+=i?1:-1;if(p<0||p>=t.length)return null;c=t[l=p],s=c.side(!i,n),d=c.side(i,n)}let f=wi(e.text,s,c.forward(i,n));(f<c.from||f>c.to)&&(f=d),ZP=e.text.slice(Math.min(s,f),Math.max(s,f));let m=l==(i?t.length-1:0)?null:t[l+(i?1:-1)];return m&&f==d&&m.level+(i?0:1)<c.level?Ae.cursor(m.side(!i,n)+e.from,m.forward(i,n)?1:-1,m.level):Ae.cursor(f+e.from,c.forward(i,n)?-1:1,c.level)}function LB(e,t,n){for(let r=t;r<n;r++){let i=IP(e.charCodeAt(r));if(i==1)return Qo;if(i==2||i==4)return wx}return Qo}var BP=Ie.define(),VP=Ie.define(),UP=Ie.define(),YP=Ie.define(),wy=Ie.define(),WP=Ie.define(),FP=Ie.define(),_x=Ie.define(),kx=Ie.define(),HP=Ie.define({combine:e=>e.some(t=>t)}),zB=Ie.define({combine:e=>e.some(t=>t)}),GP=Ie.define(),jO=class _y{constructor(t,n="nearest",r="nearest",i=5,a=5,s=!1){this.range=t,this.y=n,this.x=r,this.yMargin=i,this.xMargin=a,this.isSnapshot=s}map(t){return t.empty?this:new _y(this.range.map(t),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(t){return this.range.to<=t.doc.length?this:new _y(Ae.cursor(t.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}},jh=tn.define({map:(e,t)=>e.map(t)}),KP=tn.define();function Fi(e,t,n){let r=e.facet(YP);r.length?r[0](t):window.onerror&&window.onerror(String(t),n,void 0,void 0,t)||(n?console.error(n+":",t):console.error(t))}var ka=Ie.define({combine:e=>e.length?e[0]:!0}),$B=0,Al=Ie.define({combine(e){return e.filter((t,n)=>{for(let r=0;r<n;r++)if(e[r].plugin==t.plugin)return!1;return!0})}}),gd=class ky{constructor(t,n,r,i,a){this.id=t,this.create=n,this.domEventHandlers=r,this.domEventObservers=i,this.baseExtensions=a(this),this.extension=this.baseExtensions.concat(Al.of({plugin:this,arg:void 0}))}of(t){return this.baseExtensions.concat(Al.of({plugin:this,arg:t}))}static define(t,n){const{eventHandlers:r,eventObservers:i,provide:a,decorations:s}=n||{};return new ky($B++,t,r,i,l=>{let c=[];return s&&c.push(pp.of(d=>{let f=d.plugin(l);return f?s(f):qt.none})),a&&c.push(a(l)),c})}static fromClass(t,n){return ky.define((r,i)=>new t(r,i),n)}},TO=class{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(n){if(Fi(t.state,n,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(t){Fi(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(!((t=this.value)===null||t===void 0)&&t.destroy)try{this.value.destroy()}catch(n){Fi(e.state,n,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}},JP=Ie.define(),jx=Ie.define(),pp=Ie.define(),eN=Ie.define(),Tx=Ie.define(),Id=Ie.define(),tN=Ie.define();function Oj(e,t){let n=e.state.facet(tN);if(!n.length)return n;let r=n.map(a=>a instanceof Function?a(e):a),i=[];return Ft.spans(r,t.from,t.to,{point(){},span(a,s,l,c){let d=a-t.from,f=s-t.from,m=i;for(let p=l.length-1;p>=0;p--,c--){let O=l[p].spec.bidiIsolate,b;if(O==null&&(O=LB(t.text,d,f)),c>0&&m.length&&(b=m[m.length-1]).to==d&&b.direction==O)b.to=f,m=b.inner;else{let x={from:d,to:f,direction:O,inner:[]};m.push(x),m=x.inner}}}}),i}var nN=Ie.define();function rN(e){let t=0,n=0,r=0,i=0;for(let a of e.state.facet(nN)){let s=a(e);s&&(s.left!=null&&(t=Math.max(t,s.left)),s.right!=null&&(n=Math.max(n,s.right)),s.top!=null&&(r=Math.max(r,s.top)),s.bottom!=null&&(i=Math.max(i,s.bottom)))}return{left:t,right:n,top:r,bottom:i}}var wu=Ie.define(),Ea=class jy{constructor(t,n,r,i){this.fromA=t,this.toA=n,this.fromB=r,this.toB=i}join(t){return new jy(Math.min(this.fromA,t.fromA),Math.max(this.toA,t.toA),Math.min(this.fromB,t.fromB),Math.max(this.toB,t.toB))}addToSet(t){let n=t.length,r=this;for(;n>0;n--){let i=t[n-1];if(!(i.fromA>r.toA)){if(i.toA<r.fromA)break;r=r.join(i),t.splice(n-1,1)}}return t.splice(n,0,r),t}static extendWithRanges(t,n){if(n.length==0)return t;let r=[];for(let i=0,a=0,s=0;;){let l=i<t.length?t[i].fromB:1e9,c=a<n.length?n[a]:1e9,d=Math.min(l,c);if(d==1e9)break;let f=d+s,m=d,p=f;for(;;)if(a<n.length&&n[a]<=m){let O=n[a+1];a+=2,m=Math.max(m,O);for(let b=i;b<t.length&&t[b].fromB<=m;b++)s=t[b].toA-t[b].toB;p=Math.max(p,O+s)}else if(i<t.length&&t[i].fromB<=m){let O=t[i++];m=Math.max(m,O.toB),p=Math.max(p,O.toA),s=O.toA-O.toB}else break;r.push(new jy(f,p,d,m))}return r}},bj=class iN{constructor(t,n,r){this.view=t,this.state=n,this.transactions=r,this.flags=0,this.startState=t.state,this.changes=Ki.empty(this.startState.doc.length);for(let a of r)this.changes=this.changes.compose(a.changes);let i=[];this.changes.iterChangedRanges((a,s,l,c)=>i.push(new Ea(a,s,l,c))),this.changedRanges=i}static create(t,n,r){return new iN(t,n,r)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(t=>t.selection)}get empty(){return this.flags==0&&this.transactions.length==0}},IB=[],nn=class{constructor(e,t,n=0){this.dom=e,this.length=t,this.flags=n,this.parent=null,e.cmTile=this}get breakAfter(){return this.flags&1}get children(){return IB}isWidget(){return!1}get isHidden(){return!1}isComposite(){return!1}isLine(){return!1}isText(){return!1}isBlock(){return!1}get domAttrs(){return null}sync(e){if(this.flags|=2,this.flags&4){this.flags&=-5;let t=this.domAttrs;t&&xB(this.dom,t)}}toString(){return this.constructor.name+(this.children.length?`(${this.children})`:"")+(this.breakAfter?"#":"")}destroy(){this.parent=null}setDOM(e){this.dom=e,e.cmTile=this}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e,t=this.posAtStart){let n=t;for(let r of this.children){if(r==e)return n;n+=r.length+r.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}covers(e){return!0}coordsIn(e,t){return null}domPosFor(e,t){let n=Ds(this.dom),r=this.length?e>0:t>0;return new js(this.parent.dom,n+(r?1:0),e==0||e==this.length)}markDirty(e){this.flags&=-3,e&&(this.flags|=4),this.parent&&this.parent.flags&2&&this.parent.markDirty(!1)}get overrideDOMText(){return null}get root(){for(let e=this;e;e=e.parent)if(e instanceof vp)return e;return null}static get(e){return e.cmTile}},gp=class extends nn{constructor(e){super(e,0),this._children=[]}isComposite(){return!0}get children(){return this._children}get lastChild(){return this.children.length?this.children[this.children.length-1]:null}append(e){this.children.push(e),e.parent=this}sync(e){if(this.flags&2)return;super.sync(e);let t=this.dom,n=null,r,i=(e==null?void 0:e.node)==t?e:null,a=0;for(let s of this.children){if(s.sync(e),a+=s.length+s.breakAfter,r=n?n.nextSibling:t.firstChild,i&&r!=s.dom&&(i.written=!0),s.dom.parentNode==t)for(;r&&r!=s.dom;)r=yj(r);else t.insertBefore(s.dom,r);n=s.dom}for(r=n?n.nextSibling:t.firstChild,i&&r&&(i.written=!0);r;)r=yj(r);this.length=a}};function yj(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}var vp=class extends gp{constructor(e,t){super(t),this.view=e}owns(e){for(;e;e=e.parent)if(e==this)return!0;return!1}isBlock(){return!0}nearest(e){for(;;){if(!e)return null;let t=nn.get(e);if(t&&this.owns(t))return t;e=e.parentNode}}blockTiles(e){for(let t=[],n=this,r=0,i=0;;)if(r==n.children.length){if(!t.length)return;n=n.parent,n.breakAfter&&i++,r=t.pop()}else{let a=n.children[r++];if(a instanceof Co)t.push(r),n=a,r=0;else{let s=i+a.length,l=e(a,i);if(l!==void 0)return l;i=s+a.breakAfter}}}resolveBlock(e,t){let n,r=-1,i,a=-1;if(this.blockTiles((s,l)=>{let c=l+s.length;if(e>=l&&e<=c){if(s.isWidget()&&t>=-1&&t<=1){if(s.flags&32)return!0;s.flags&16&&(n=void 0)}(l<e||e==c&&(t<-1?s.length:s.covers(1)))&&(!n||!s.isWidget()&&n.isWidget())&&(n=s,r=e-l),(c>e||e==l&&(t>1?s.length:s.covers(-1)))&&(!i||!s.isWidget()&&i.isWidget())&&(i=s,a=e-l)}}),!n&&!i)throw new Error("No tile at position "+e);return n&&t<0||!i?{tile:n,offset:r}:{tile:i,offset:a}}},Co=class aN extends gp{constructor(t,n){super(t),this.wrapper=n}isBlock(){return!0}covers(t){return this.children.length?t<0?this.children[0].covers(-1):this.lastChild.covers(1):!1}get domAttrs(){return this.wrapper.attributes}static of(t,n){let r=new aN(n||document.createElement(t.tagName),t);return n||(r.flags|=4),r}},Em=class sN extends gp{constructor(t,n){super(t),this.attrs=n}isLine(){return!0}static start(t,n,r){let i=new sN(n||document.createElement("div"),t);return(!n||!r)&&(i.flags|=4),i}get domAttrs(){return this.attrs}resolveInline(t,n,r){let i=null,a=-1,s=null,l=-1;function c(f,m){for(let p=0,O=0;p<f.children.length&&O<=m;p++){let b=f.children[p],x=O+b.length;x>=m&&(b.isComposite()?c(b,m-O):(!s||s.isHidden&&(n>0||r&&XB(s,b)))&&(x>m||b.flags&32)?(s=b,l=m-O):(O<m||b.flags&16&&!b.isHidden)&&(i=b,a=m-O)),O=x}}c(this,t);let d=(n<0?i:s)||i||s;return d?{tile:d,offset:d==i?a:l}:null}coordsIn(t,n){let r=this.resolveInline(t,n,!0);return r?r.tile.coordsIn(Math.max(0,r.offset),n):qB(this)}domIn(t,n){let r=this.resolveInline(t,n);if(r){let{tile:i,offset:a}=r;if(this.dom.contains(i.dom))return i.isText()?new js(i.dom,Math.min(i.dom.nodeValue.length,a)):i.domPosFor(a,i.flags&16?1:i.flags&32?-1:n);let s=r.tile.parent,l=!1;for(let c of s.children){if(l)return new js(c.dom,0);c==r.tile&&(l=!0)}}return new js(this.dom,0)}};function qB(e){let t=e.dom.lastChild;if(!t)return e.dom.getBoundingClientRect();let n=om(t);return n[n.length-1]||null}function XB(e,t){let n=e.coordsIn(0,1),r=t.coordsIn(0,1);return n&&r&&r.top<n.bottom}var ri=class oN extends gp{constructor(t,n){super(t),this.mark=n}get domAttrs(){return this.mark.attrs}static of(t,n){let r=new oN(n||document.createElement(t.tagName),t);return n||(r.flags|=4),r}},_u=class lN extends nn{constructor(t,n){super(t,n.length),this.text=n}sync(t){this.flags&2||(super.sync(t),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text))}isText(){return!0}toString(){return JSON.stringify(this.text)}coordsIn(t,n){let r=this.dom.nodeValue.length;t>r&&(t=r);let i=t,a=t,s=0;t==0&&n<0||t==r&&n>=0?_e.chrome||_e.gecko||(t?(i--,s=1):a<r&&(a++,s=-1)):n<0?i--:a<r&&a++;let l=pd(this.dom,i,a).getClientRects();if(!l.length)return null;let c=l[(s?s<0:n>=0)?0:l.length-1];return _e.safari&&!s&&c.width==0&&(c=Array.prototype.find.call(l,d=>d.width)||c),s?Cm(c,s<0):c||null}static of(t,n){let r=new lN(n||document.createTextNode(t),t);return n||(r.flags|=2),r}},vd=class cN extends nn{constructor(t,n,r,i){super(t,n,i),this.widget=r}isWidget(){return!0}get isHidden(){return this.widget.isHidden}covers(t){return this.flags&48?!1:(this.flags&(t<0?64:128))>0}coordsIn(t,n){return this.coordsInWidget(t,n,!1)}coordsInWidget(t,n,r){let i=this.widget.coordsAt(this.dom,t,n);if(i)return i;if(r)return Cm(this.dom.getBoundingClientRect(),this.length?t==0:n<=0);{let a=this.dom.getClientRects(),s=null;if(!a.length)return null;let l=this.flags&16?!0:this.flags&32?!1:t>0;for(let c=l?a.length-1:0;s=a[c],!(t>0?c==0:c==a.length-1||s.top<s.bottom);c+=l?-1:1);return Cm(s,!l)}}get overrideDOMText(){if(!this.length)return _t.empty;let{root:t}=this;if(!t)return _t.empty;let n=this.posAtStart;return t.view.state.doc.slice(n,n+this.length)}destroy(){super.destroy(),this.widget.destroy(this.dom)}static of(t,n,r,i,a){return a||(a=t.toDOM(n),t.editable||(a.contentEditable="false")),new cN(a,r,t,i)}},Am=class extends nn{constructor(e){let t=document.createElement("img");t.className="cm-widgetBuffer",t.setAttribute("aria-hidden","true"),super(t,0,e)}get isHidden(){return!0}get overrideDOMText(){return _t.empty}coordsIn(e){return this.dom.getBoundingClientRect()}},ZB=class{constructor(e){this.index=0,this.beforeBreak=!1,this.parents=[],this.tile=e}advance(e,t,n){let{tile:r,index:i,beforeBreak:a,parents:s}=this;for(;e||t>0;)if(r.isComposite())if(a){if(!e)break;n&&n.break(),e--,a=!1}else if(i==r.children.length){if(!e&&!s.length)break;n&&n.leave(r),a=!!r.breakAfter,{tile:r,index:i}=s.pop(),i++}else{let l=r.children[i],c=l.breakAfter;(t>0?l.length<=e:l.length<e)&&(!n||n.skip(l,0,l.length)!==!1||!l.isComposite)?(a=!!c,i++,e-=l.length):(s.push({tile:r,index:i}),r=l,i=0,n&&l.isComposite()&&n.enter(l))}else if(i==r.length)a=!!r.breakAfter,{tile:r,index:i}=s.pop(),i++;else if(e){let l=Math.min(e,r.length-i);n&&n.skip(r,i,i+l),e-=l,i+=l}else break;return this.tile=r,this.index=i,this.beforeBreak=a,this}get root(){return this.parents.length?this.parents[0].tile:this.tile}},BB=class{constructor(e,t,n,r){this.from=e,this.to=t,this.wrapper=n,this.rank=r}},VB=class{constructor(e,t,n){this.cache=e,this.root=t,this.blockWrappers=n,this.curLine=null,this.lastBlock=null,this.afterWidget=null,this.pos=0,this.wrappers=[],this.wrapperPos=0}addText(e,t,n,r){var i;this.flushBuffer();let a=this.ensureMarks(t,n),s=a.lastChild;if(s&&s.isText()&&!(s.flags&8)&&s.length+e.length<512){this.cache.reused.set(s,2);let l=a.children[a.children.length-1]=new _u(s.dom,s.text+e);l.parent=a}else a.append(r||_u.of(e,(i=this.cache.find(_u))===null||i===void 0?void 0:i.dom));this.pos+=e.length,this.afterWidget=null}addComposition(e,t){let n=this.curLine;n.dom!=t.line.dom&&(n.setDOM(this.cache.reused.has(t.line)?CO(t.line.dom):t.line.dom),this.cache.reused.set(t.line,2));let r=n;for(let s=t.marks.length-1;s>=0;s--){let l=t.marks[s],c=r.lastChild;if(c instanceof ri&&c.mark.eq(l.mark))c.dom!=l.dom&&c.setDOM(CO(l.dom)),r=c;else{if(this.cache.reused.get(l)){let f=nn.get(l.dom);f&&f.setDOM(CO(l.dom))}let d=ri.of(l.mark,l.dom);r.append(d),r=d}this.cache.reused.set(l,2)}let i=nn.get(e.text);i&&this.cache.reused.set(i,2);let a=new _u(e.text,e.text.nodeValue);a.flags|=8,r.append(a)}addInlineWidget(e,t,n){let r=this.afterWidget&&e.flags&48&&(this.afterWidget.flags&48)==(e.flags&48);r||this.flushBuffer();let i=this.ensureMarks(t,n);!r&&!(e.flags&16)&&i.append(this.getBuffer(1)),i.append(e),this.pos+=e.length,this.afterWidget=e}addMark(e,t,n){this.flushBuffer(),this.ensureMarks(t,n).append(e),this.pos+=e.length,this.afterWidget=null}addBlockWidget(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}continueWidget(e){let t=this.afterWidget||this.lastBlock;t.length+=e,this.pos+=e}addLineStart(e,t){var n;e||(e=uN);let r=Em.start(e,t||((n=this.cache.find(Em))===null||n===void 0?void 0:n.dom),!!t);this.getBlockPos().append(this.lastBlock=this.curLine=r)}addLine(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}addBreak(){this.lastBlock.flags|=1,this.endLine(),this.pos++}addLineStartIfNotCovered(e){this.blockPosCovered()||this.addLineStart(e)}ensureLine(e){this.curLine||this.addLineStart(e)}ensureMarks(e,t){var n;let r=this.curLine;for(let i=e.length-1;i>=0;i--){let a=e[i],s;if(t>0&&(s=r.lastChild)&&s instanceof ri&&s.mark.eq(a))r=s,t--;else{let l=ri.of(a,(n=this.cache.find(ri,c=>c.mark.eq(a)))===null||n===void 0?void 0:n.dom);r.append(l),r=l,t=0}}return r}endLine(){if(this.curLine){this.flushBuffer();let e=this.curLine.lastChild;(!e||!xj(this.curLine,!1)||e.dom.nodeName!="BR"&&e.isWidget()&&!(_e.ios&&xj(this.curLine,!0)))&&this.curLine.append(this.cache.findWidget(EO,0,32)||new vd(EO.toDOM(),0,EO,32)),this.curLine=this.afterWidget=null}}updateBlockWrappers(){this.wrapperPos>this.pos+1e4&&(this.blockWrappers.goto(this.pos),this.wrappers.length=0);for(let e=this.wrappers.length-1;e>=0;e--)this.wrappers[e].to<this.pos&&this.wrappers.splice(e,1);for(let e=this.blockWrappers;e.value&&e.from<=this.pos;e.next())if(e.to>=this.pos){let t=new BB(e.from,e.to,e.value,e.rank),n=this.wrappers.length;for(;n>0&&(this.wrappers[n-1].rank-t.rank||this.wrappers[n-1].to-t.to)<0;)n--;this.wrappers.splice(n,0,t)}this.wrapperPos=this.pos}getBlockPos(){var e;this.updateBlockWrappers();let t=this.root;for(let n of this.wrappers){let r=t.lastChild;if(n.from<this.pos&&r instanceof Co&&r.wrapper.eq(n.wrapper))t=r;else{let i=Co.of(n.wrapper,(e=this.cache.find(Co,a=>a.wrapper.eq(n.wrapper)))===null||e===void 0?void 0:e.dom);t.append(i),t=i}}return t}blockPosCovered(){let e=this.lastBlock;return e!=null&&!e.breakAfter&&(!e.isWidget()||(e.flags&160)>0)}getBuffer(e){let t=2|(e<0?16:32),n=this.cache.find(Am,void 0,1);return n&&(n.flags=t),n||new Am(t)}flushBuffer(){this.afterWidget&&!(this.afterWidget.flags&32)&&(this.afterWidget.parent.append(this.getBuffer(-1)),this.afterWidget=null)}},UB=class{constructor(e){this.skipCount=0,this.text="",this.textOff=0,this.cursor=e.iter()}skip(e){this.textOff+e<=this.text.length?this.textOff+=e:(this.skipCount+=e-(this.text.length-this.textOff),this.text="",this.textOff=0)}next(e){if(this.textOff==this.text.length){let{value:r,lineBreak:i,done:a}=this.cursor.next(this.skipCount);if(this.skipCount=0,a)throw new Error("Ran out of text content when drawing inline views");this.text=r;let s=this.textOff=Math.min(e,r.length);return i?null:r.slice(0,s)}let t=Math.min(this.text.length,this.textOff+e),n=this.text.slice(this.textOff,t);return this.textOff=t,n}},Qm=[vd,Em,_u,ri,Am,Co,vp];for(let e=0;e<Qm.length;e++)Qm[e].bucket=e;var YB=class{constructor(e){this.view=e,this.buckets=Qm.map(()=>[]),this.index=Qm.map(()=>0),this.reused=new Map}add(e){let t=e.constructor.bucket,n=this.buckets[t];n.length<6?n.push(e):n[this.index[t]=(this.index[t]+1)%6]=e}find(e,t,n=2){let r=e.bucket,i=this.buckets[r],a=this.index[r];for(let s=i.length-1;s>=0;s--){let l=(s+a)%i.length,c=i[l];if((!t||t(c))&&!this.reused.has(c))return i.splice(l,1),l<a&&this.index[r]--,this.reused.set(c,n),c}return null}findWidget(e,t,n){let r=this.buckets[0];if(r.length)for(let i=0,a=0;;i++){if(i==r.length){if(a)return null;a=1,i=0}let s=r[i];if(!this.reused.has(s)&&(a==0?s.widget.compare(e):s.widget.constructor==e.constructor&&e.updateDOM(s.dom,this.view,s.widget)))return r.splice(i,1),i<this.index[0]&&this.index[0]--,s.widget==e&&s.length==t&&(s.flags&497)==n?(this.reused.set(s,1),s):(this.reused.set(s,2),new vd(s.dom,t,e,s.flags&-498|n))}}reuse(e){return this.reused.set(e,1),e}maybeReuse(e,t=2){if(!this.reused.has(e))return this.reused.set(e,t),e.dom}clear(){for(let e=0;e<this.buckets.length;e++)this.buckets[e].length=this.index[e]=0}},WB=class{constructor(e,t,n,r,i){this.view=e,this.decorations=r,this.disallowBlockEffectsFor=i,this.openWidget=!1,this.openMarks=0,this.cache=new YB(e),this.text=new UB(e.state.doc),this.builder=new VB(this.cache,new vp(e,e.contentDOM),Ft.iter(n)),this.cache.reused.set(t,2),this.old=new ZB(t),this.reuseWalker={skip:(a,s,l)=>{if(this.cache.add(a),a.isComposite())return!1},enter:a=>this.cache.add(a),leave:()=>{},break:()=>{}}}run(e,t){let n=t&&this.getCompositionContext(t.text);for(let r=0,i=0,a=0;;){let s=a<e.length?e[a++]:null,l=s?s.fromA:this.old.root.length;if(l>r){let c=l-r;this.preserve(c,!a,!s),r=l,i+=c}if(!s)break;t&&s.fromA<=t.range.fromA&&s.toA>=t.range.toA?(this.forward(s.fromA,t.range.fromA,t.range.fromA<t.range.toA?1:-1),this.emit(i,t.range.fromB),this.cache.clear(),this.builder.addComposition(t,n),this.text.skip(t.range.toB-t.range.fromB),this.forward(t.range.fromA,s.toA),this.emit(t.range.toB,s.toB)):(this.forward(s.fromA,s.toA),this.emit(i,s.toB)),i=s.toB,r=s.toA}return this.builder.curLine&&this.builder.endLine(),this.builder.root}preserve(e,t,n){let r=GB(this.old),i=this.openMarks;this.old.advance(e,n?1:-1,{skip:(a,s,l)=>{if(a.isWidget())if(this.openWidget)this.builder.continueWidget(l-s);else{let c=l>0||s<a.length?vd.of(a.widget,this.view,l-s,a.flags&496,this.cache.maybeReuse(a)):this.cache.reuse(a);c.flags&256?(c.flags&=-2,this.builder.addBlockWidget(c)):(this.builder.ensureLine(null),this.builder.addInlineWidget(c,r,i),i=r.length)}else if(a.isText())this.builder.ensureLine(null),!s&&l==a.length&&!this.cache.reused.has(a)?this.builder.addText(a.text,r,i,this.cache.reuse(a)):(this.cache.add(a),this.builder.addText(a.text.slice(s,l),r,i)),i=r.length;else if(a.isLine())a.flags&=-2,this.cache.reused.set(a,1),this.builder.addLine(a);else if(a instanceof Am)this.cache.add(a);else if(a instanceof ri)this.builder.ensureLine(null),this.builder.addMark(a,r,i),this.cache.reused.set(a,1),i=r.length;else return!1;this.openWidget=!1},enter:a=>{a.isLine()?this.builder.addLineStart(a.attrs,this.cache.maybeReuse(a)):(this.cache.add(a),a instanceof ri&&r.unshift(a.mark)),this.openWidget=!1},leave:a=>{a.isLine()?r.length&&(r.length=i=0):a instanceof ri&&(r.shift(),i=Math.min(i,r.length))},break:()=>{this.builder.addBreak(),this.openWidget=!1}}),this.text.skip(e)}emit(e,t){let n=null,r=this.builder,i=0,a=Ft.spans(this.decorations,e,t,{point:(s,l,c,d,f,m)=>{if(c instanceof hd){if(this.disallowBlockEffectsFor[m]){if(c.block)throw new RangeError("Block decorations may not be specified via plugins");if(l>this.view.state.doc.lineAt(s).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}if(i=d.length,f>d.length)r.continueWidget(l-s);else{let p=c.widget||(c.block?Hl.block:Hl.inline),O=FB(c),b=this.cache.findWidget(p,l-s,O)||vd.of(p,this.view,l-s,O);c.block?(c.startSide>0&&r.addLineStartIfNotCovered(n),r.addBlockWidget(b)):(r.ensureLine(n),r.addInlineWidget(b,d,f))}n=null}else n=HB(n,c);l>s&&this.text.skip(l-s)},span:(s,l,c,d)=>{for(let f=s;f<l;){let m=this.text.next(Math.min(512,l-f));m==null?(r.addLineStartIfNotCovered(n),r.addBreak(),f++):(r.ensureLine(n),r.addText(m,c,f==s?d:c.length),f+=m.length),n=null}}});r.addLineStartIfNotCovered(n),this.openWidget=a>i,this.openMarks=a}forward(e,t,n=1){t-e<=10?this.old.advance(t-e,n,this.reuseWalker):(this.old.advance(5,-1,this.reuseWalker),this.old.advance(t-e-10,-1),this.old.advance(5,n,this.reuseWalker))}getCompositionContext(e){let t=[],n=null;for(let r=e.parentNode;;r=r.parentNode){let i=nn.get(r);if(r==this.view.contentDOM)break;i instanceof ri?t.push(i):i!=null&&i.isLine()?n=i:i instanceof Co||(r.nodeName=="DIV"&&!n&&r!=this.view.contentDOM?n=new Em(r,uN):n||t.push(ri.of(new xx({tagName:r.nodeName.toLowerCase(),attributes:SB(r)}),r)))}return{line:n,marks:t}}};function xj(e,t){let n=r=>{for(let i of r.children)if((t?i.isText():i.length)||n(i))return!0;return!1};return n(e)}function FB(e){let t=e.isReplace?(e.startSide<0?64:0)|(e.endSide>0?128:0):e.startSide>0?32:16;return e.block&&(t|=256),t}var uN={class:"cm-line"};function HB(e,t){let n=t.spec.attributes,r=t.spec.class;return!n&&!r||(e||(e={class:"cm-line"}),n&&bx(n,e),r&&(e.class+=" "+r)),e}function GB(e){let t=[];for(let n=e.parents.length;n>1;n--){let r=n==e.parents.length?e.tile:e.parents[n].tile;r instanceof ri&&t.push(r.mark)}return t}function CO(e){let t=nn.get(e);return t&&t.setDOM(e.cloneNode()),e}var Hl=class extends dc{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}};Hl.inline=new Hl("span");Hl.block=new Hl("div");var EO=new class extends dc{toDOM(){return document.createElement("br")}get isHidden(){return!0}get editable(){return!0}},Sj=class{constructor(e){this.view=e,this.decorations=[],this.blockWrappers=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.editContextFormatting=qt.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.updateDeco(),this.tile=new vp(e,e.contentDOM),this.updateInner([new Ea(0,0,0,e.state.doc.length)],null)}update(e){var t;let n=e.changedRanges;this.minWidth>0&&n.length&&(n.every(({fromA:d,toA:f})=>f<this.minWidthFrom||d>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let r=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((t=this.domChanged)===null||t===void 0)&&t.newSel?r=this.domChanged.newSel.head:!s9(e.changes,this.hasComposition)&&!e.selectionSet&&(r=e.state.selection.main.head));let i=r>-1?JB(this.view,e.changes,r):null;if(this.domChanged=null,this.hasComposition){let{from:d,to:f}=this.hasComposition;n=new Ea(d,f,e.changes.mapPos(d,-1),e.changes.mapPos(f,1)).addToSet(n.slice())}this.hasComposition=i?{from:i.range.fromB,to:i.range.toB}:null,(_e.ie||_e.chrome)&&!i&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let a=this.decorations,s=this.blockWrappers;this.updateDeco();let l=n9(a,this.decorations,e.changes);l.length&&(n=Ea.extendWithRanges(n,l));let c=i9(s,this.blockWrappers,e.changes);return c.length&&(n=Ea.extendWithRanges(n,c)),i&&!n.some(d=>d.fromA<=i.range.fromA&&d.toA>=i.range.toA)&&(n=i.range.addToSet(n.slice())),this.tile.flags&2&&n.length==0?!1:(this.updateInner(n,i),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t){this.view.viewState.mustMeasureContent=!0;let{observer:n}=this.view;n.ignore(()=>{if(t||e.length){let a=this.tile,s=new WB(this.view,a,this.blockWrappers,this.decorations,this.dynamicDecorationMap);t&&nn.get(t.text)&&s.cache.reused.set(nn.get(t.text),2),this.tile=s.run(e,t),Ty(a,s.cache.reused)}this.tile.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.tile.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let i=_e.chrome||_e.ios?{node:n.selectionRange.focusNode,written:!1}:void 0;this.tile.sync(i),i&&(i.written||n.selectionRange.focusNode!=i.node||!this.tile.dom.contains(i.node))&&(this.forceSelection=!0),this.tile.dom.style.height=""});let r=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let i of this.tile.children)i.isWidget()&&i.widget instanceof AO&&r.push(i.dom);n.updateGaps(r)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let n of t.effects)n.is(KP)&&(this.editContextFormatting=n.value)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let{dom:n}=this.tile,r=this.view.root.activeElement,i=r==n,a=!i&&!(this.view.state.facet(ka)||n.tabIndex>-1)&&Iu(n,this.view.observer.selectionRange)&&!(r&&n.contains(r));if(!(i||t||a))return;let s=this.forceSelection;this.forceSelection=!1;let l=this.view.state.selection.main,c,d;if(l.empty?d=c=this.inlineDOMNearPos(l.anchor,l.assoc||1):(d=this.inlineDOMNearPos(l.head,l.head==l.from?1:-1),c=this.inlineDOMNearPos(l.anchor,l.anchor==l.from?1:-1)),_e.gecko&&l.empty&&!this.hasComposition&&KB(c)){let m=document.createTextNode("");this.view.observer.ignore(()=>c.node.insertBefore(m,c.node.childNodes[c.offset]||null)),c=d=new js(m,0),s=!0}let f=this.view.observer.selectionRange;(s||!f.focusNode||(!qu(c.node,c.offset,f.anchorNode,f.anchorOffset)||!qu(d.node,d.offset,f.focusNode,f.focusOffset))&&!this.suppressWidgetCursorChange(f,l))&&(this.view.observer.ignore(()=>{_e.android&&_e.chrome&&n.contains(f.focusNode)&&a9(f.focusNode,n)&&(n.blur(),n.focus({preventScroll:!0}));let m=md(this.view.root);if(m)if(l.empty){if(_e.gecko){let p=e9(c.node,c.offset);if(p&&p!=3){let O=(p==1?LP:zP)(c.node,c.offset);O&&(c=new js(O.node,O.offset))}}m.collapse(c.node,c.offset),l.bidiLevel!=null&&m.caretBidiLevel!==void 0&&(m.caretBidiLevel=l.bidiLevel)}else if(m.extend){m.collapse(c.node,c.offset);try{m.extend(d.node,d.offset)}catch{}}else{let p=document.createRange();l.anchor>l.head&&([c,d]=[d,c]),p.setEnd(d.node,d.offset),p.setStart(c.node,c.offset),m.removeAllRanges(),m.addRange(p)}a&&this.view.root.activeElement==n&&(n.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(c,d)),this.impreciseAnchor=c.precise?null:new js(f.anchorNode,f.anchorOffset),this.impreciseHead=d.precise?null:new js(f.focusNode,f.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&qu(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,n=md(e.root),{anchorNode:r,anchorOffset:i}=e.observer.selectionRange;if(!n||!t.empty||!t.assoc||!n.modify)return;let a=this.lineAt(t.head,t.assoc);if(!a)return;let s=a.posAtStart;if(t.head==s||t.head==s+a.length)return;let l=this.coordsAt(t.head,-1),c=this.coordsAt(t.head,1);if(!l||!c||l.bottom>c.top)return;let d=this.domAtPos(t.head+t.assoc,t.assoc);n.collapse(d.node,d.offset),n.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let f=e.observer.selectionRange;e.docView.posFromDOM(f.anchorNode,f.anchorOffset)!=t.from&&n.collapse(r,i)}posFromDOM(e,t){let n=this.tile.nearest(e);if(!n)return this.tile.dom.compareDocumentPosition(e)&2?0:this.view.state.doc.length;let r=n.posAtStart;if(n.isComposite()){let i;if(e==n.dom)i=n.dom.childNodes[t];else{let a=Na(e)==0?0:t==0?-1:1;for(;;){let s=e.parentNode;if(s==n.dom)break;a==0&&s.firstChild!=s.lastChild&&(e==s.firstChild?a=-1:a=1),e=s}a<0?i=e:i=e.nextSibling}if(i==n.dom.firstChild)return r;for(;i&&!nn.get(i);)i=i.nextSibling;if(!i)return r+n.length;for(let a=0,s=r;;a++){let l=n.children[a];if(l.dom==i)return s;s+=l.length+l.breakAfter}}else return n.isText()?e==n.dom?r+t:r+(t?n.length:0):r}domAtPos(e,t){let{tile:n,offset:r}=this.tile.resolveBlock(e,t);return n.isWidget()?n.domPosFor(e,t):n.domIn(r,t)}inlineDOMNearPos(e,t){let n,r=-1,i=!1,a,s=-1,l=!1;return this.tile.blockTiles((c,d)=>{if(c.isWidget()){if(c.flags&32&&d>=e)return!0;c.flags&16&&(i=!0)}else{let f=d+c.length;if(d<=e&&(n=c,r=e-d,i=f<e),f>=e&&!a&&(a=c,s=e-d,l=d>e),d>e&&a)return!0}}),!n&&!a?this.domAtPos(e,t):(i&&a?n=null:l&&n&&(a=null),n&&t<0||!a?n.domIn(r,t):a.domIn(s,t))}coordsAt(e,t){let{tile:n,offset:r}=this.tile.resolveBlock(e,t);return n.isWidget()?n.widget instanceof AO?null:n.coordsInWidget(r,t,!0):n.coordsIn(r,t)}lineAt(e,t){let{tile:n}=this.tile.resolveBlock(e,t);return n.isLine()?n:null}coordsForChar(e){let{tile:t,offset:n}=this.tile.resolveBlock(e,1);if(!t.isLine())return null;function r(i,a){if(i.isComposite())for(let s of i.children){if(s.length>=a){let l=r(s,a);if(l)return l}if(a-=s.length,a<0)break}else if(i.isText()&&a<i.length){let s=wi(i.text,a);if(s==a)return null;let l=pd(i.dom,a,s).getClientRects();for(let c=0;c<l.length;c++){let d=l[c];if(c==l.length-1||d.top<d.bottom&&d.left<d.right)return d}}return null}return r(t,n)}measureVisibleLineHeights(e){let t=[],{from:n,to:r}=e,i=this.view.contentDOM.clientWidth,a=i>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,s=-1,l=this.view.textDirection==On.LTR,c=0,d=(f,m,p)=>{for(let O=0;O<f.children.length&&!(m>r);O++){let b=f.children[O],x=m+b.length,w=b.dom.getBoundingClientRect(),{height:k}=w;if(p&&!O&&(c+=w.top-p.top),b instanceof Co)x>n&&d(b,m,w);else if(m>=n&&(c>0&&t.push(-c),t.push(k+c),c=0,a)){let T=b.dom.lastChild,j=T?om(T):[];if(j.length){let E=j[j.length-1],Q=l?E.right-w.left:w.right-E.left;Q>s&&(s=Q,this.minWidth=i,this.minWidthFrom=m,this.minWidthTo=x)}}p&&O==f.children.length-1&&(c+=p.bottom-w.bottom),m=x+b.breakAfter}};return d(this.tile,0,null),t}textDirectionAt(e){let{tile:t}=this.tile.resolveBlock(e,1);return getComputedStyle(t.dom).direction=="rtl"?On.RTL:On.LTR}measureTextSize(){let e=this.tile.blockTiles(a=>{if(a.isLine()&&a.children.length&&a.length<=20){let s=0,l;for(let c of a.children){if(!c.isText()||/[^ -~]/.test(c.text))return;let d=om(c.dom);if(d.length!=1)return;s+=d[0].width,l=d[0].height}if(s)return{lineHeight:a.dom.getBoundingClientRect().height,charWidth:s/a.length,textHeight:l}}});if(e)return e;let t=document.createElement("div"),n,r,i;return t.className="cm-line",t.style.width="99999px",t.style.position="absolute",t.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.tile.dom.appendChild(t);let a=om(t.firstChild)[0];n=t.getBoundingClientRect().height,r=a&&a.width?a.width/27:7,i=a&&a.height?a.height:n,t.remove()}),{lineHeight:n,charWidth:r,textHeight:i}}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let n=0,r=0;;r++){let i=r==t.viewports.length?null:t.viewports[r],a=i?i.from-1:this.view.state.doc.length;if(a>n){let s=(t.lineBlockAt(a).bottom-t.lineBlockAt(n).top)/this.view.scaleY;e.push(qt.replace({widget:new AO(s),block:!0,inclusive:!0,isBlockGap:!0}).range(n,a))}if(!i)break;n=i.to+1}return qt.set(e)}updateDeco(){let e=1,t=this.view.state.facet(pp).map(i=>(this.dynamicDecorationMap[e++]=typeof i=="function")?i(this.view):i),n=!1,r=this.view.state.facet(Tx).map((i,a)=>{let s=typeof i=="function";return s&&(n=!0),s?i(this.view):i});for(r.length&&(this.dynamicDecorationMap[e++]=n,t.push(Ft.join(r))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;this.blockWrappers=this.view.state.facet(eN).map(i=>typeof i=="function"?i(this.view):i)}scrollIntoView(e){var t;if(e.isSnapshot){let d=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=d.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let d of this.view.state.facet(GP))try{if(d(this.view,e.range,e))return!0}catch(f){Fi(this.view.state,f,"scroll handler")}let{range:n}=e,r=this.coordsAt(n.head,(t=n.assoc)!==null&&t!==void 0?t:n.empty?0:n.head>n.anchor?-1:1),i;if(!r)return;!n.empty&&(i=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(r={left:Math.min(r.left,i.left),top:Math.min(r.top,i.top),right:Math.max(r.right,i.right),bottom:Math.max(r.bottom,i.bottom)});let a=rN(this.view),s={left:r.left-a.left,top:r.top-a.top,right:r.right+a.right,bottom:r.bottom+a.bottom},{offsetWidth:l,offsetHeight:c}=this.view.scrollDOM;if(kB(this.view.scrollDOM,s,n.head<n.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,l),-l),Math.max(Math.min(e.yMargin,c),-c),this.view.textDirection==On.LTR),window.visualViewport&&window.innerHeight-window.visualViewport.height>1&&(r.top>window.pageYOffset+window.visualViewport.offsetTop+window.visualViewport.height||r.bottom<window.pageYOffset+window.visualViewport.offsetTop)){let d=this.view.docView.lineAt(n.head,1);d&&d.dom.scrollIntoView({block:"nearest"})}}lineHasWidget(e){let t=n=>n.isWidget()||n.children.some(t);return t(this.tile.resolveBlock(e,1).tile)}destroy(){Ty(this.tile)}};function Ty(e,t){let n=t==null?void 0:t.get(e);if(n!=1){n==null&&e.destroy();for(let r of e.children)Ty(r,t)}}function KB(e){return e.node.nodeType==1&&e.node.firstChild&&(e.offset==0||e.node.childNodes[e.offset-1].contentEditable=="false")&&(e.offset==e.node.childNodes.length||e.node.childNodes[e.offset].contentEditable=="false")}function dN(e,t){let n=e.observer.selectionRange;if(!n.focusNode)return null;let r=LP(n.focusNode,n.focusOffset),i=zP(n.focusNode,n.focusOffset),a=r||i;if(i&&r&&i.node!=r.node){let l=nn.get(i.node);if(!l||l.isText()&&l.text!=i.node.nodeValue)a=i;else if(e.docView.lastCompositionAfterCursor){let c=nn.get(r.node);!c||c.isText()&&c.text!=r.node.nodeValue||(a=i)}}if(e.docView.lastCompositionAfterCursor=a!=r,!a)return null;let s=t-a.offset;return{from:s,to:s+a.node.nodeValue.length,node:a.node}}function JB(e,t,n){let r=dN(e,n);if(!r)return null;let{node:i,from:a,to:s}=r,l=i.nodeValue;if(/[\n\r]/.test(l)||e.state.doc.sliceString(r.from,r.to)!=l)return null;let c=t.invertedDesc;return{range:new Ea(c.mapPos(a),c.mapPos(s),a,s),text:i}}function e9(e,t){return e.nodeType!=1?0:(t&&e.childNodes[t-1].contentEditable=="false"?1:0)|(t<e.childNodes.length&&e.childNodes[t].contentEditable=="false"?2:0)}var t9=class{constructor(){this.changes=[]}compareRange(t,n){Ml(t,n,this.changes)}comparePoint(t,n){Ml(t,n,this.changes)}boundChange(t){Ml(t,t,this.changes)}};function n9(e,t,n){let r=new t9;return Ft.compare(e,t,n,r),r.changes}var r9=class{constructor(){this.changes=[]}compareRange(e,t){Ml(e,t,this.changes)}comparePoint(){}boundChange(e){Ml(e,e,this.changes)}};function i9(e,t,n){let r=new r9;return Ft.compare(e,t,n,r),r.changes}function a9(e,t){for(let n=e;n&&n!=t;n=n.assignedSlot||n.parentNode)if(n.nodeType==1&&n.contentEditable=="false")return!0;return!1}function s9(e,t){let n=!1;return t&&e.iterChangedRanges((r,i)=>{r<t.to&&i>t.from&&(n=!0)}),n}var AO=class extends dc{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}};function o9(e,t,n=1){let r=e.charCategorizer(t),i=e.doc.lineAt(t),a=t-i.from;if(i.length==0)return Ae.cursor(t);a==0?n=1:a==i.length&&(n=-1);let s=a,l=a;n<0?s=wi(i.text,a,!1):l=wi(i.text,a);let c=r(i.text.slice(s,l));for(;s>0;){let d=wi(i.text,s,!1);if(r(i.text.slice(d,s))!=c)break;s=d}for(;l<i.length;){let d=wi(i.text,l);if(r(i.text.slice(l,d))!=c)break;l=d}return Ae.range(s+i.from,l+i.from)}function l9(e,t,n,r,i){let a=Math.round((r-t.left)*e.defaultCharacterWidth);if(e.lineWrapping&&n.height>e.defaultLineHeight*1.5){let l=e.viewState.heightOracle.textHeight,c=Math.floor((i-n.top-(e.defaultLineHeight-l)*.5)/l);a+=c*e.viewState.heightOracle.lineLength}let s=e.state.sliceDoc(n.from,n.to);return n.from+pB(s,a,e.state.tabSize)}function c9(e,t,n){let r=e.lineBlockAt(t);if(Array.isArray(r.type)){let i;for(let a of r.type){if(a.from>t)break;if(!(a.to<t)){if(a.from<t&&a.to>t)return a;(!i||a.type==mr.Text&&(i.type!=a.type||(n<0?a.from<t:a.to>t)))&&(i=a)}}return i||r}return r}function u9(e,t,n,r){let i=c9(e,t.head,t.assoc||-1),a=!r||i.type!=mr.Text||!(e.lineWrapping||i.widgetLineBreaks)?null:e.coordsAtPos(t.assoc<0&&t.head>i.from?t.head-1:t.head);if(a){let s=e.dom.getBoundingClientRect(),l=e.textDirectionAt(i.from),c=e.posAtCoords({x:n==(l==On.LTR)?s.right-1:s.left+1,y:(a.top+a.bottom)/2});if(c!=null)return Ae.cursor(c,n?-1:1)}return Ae.cursor(n?i.to:i.from,n?-1:1)}function wj(e,t,n,r){let i=e.state.doc.lineAt(t.head),a=e.bidiSpans(i),s=e.textDirectionAt(i.from);for(let l=t,c=null;;){let d=DB(i,a,s,l,n),f=ZP;if(!d){if(i.number==(n?e.state.doc.lines:1))return l;f=`
|
|
56
|
-
`,i=e.state.doc.line(i.number+(n?1:-1)),a=e.bidiSpans(i),d=e.visualLineSide(i,!n)}if(c){if(!c(f))return l}else{if(!r)return d;c=r(f)}l=d}}function d9(e,t,n){let r=e.state.charCategorizer(t),i=r(n);return a=>{let s=r(a);return i==Ca.Space&&(i=s),i==s}}function f9(e,t,n,r){let i=t.head,a=n?1:-1;if(i==(n?e.state.doc.length:0))return Ae.cursor(i,t.assoc);let s=t.goalColumn,l,c=e.contentDOM.getBoundingClientRect(),d=e.coordsAtPos(i,t.assoc||((t.empty?n:t.head==t.from)?1:-1)),f=e.documentTop;if(d)s==null&&(s=d.left-c.left),l=a<0?d.top:d.bottom;else{let b=e.viewState.lineBlockAt(i);s==null&&(s=Math.min(c.right-c.left,e.defaultCharacterWidth*(i-b.from))),l=(a<0?b.top:b.bottom)+f}let m=c.left+s,p=e.viewState.heightOracle.textHeight>>1,O=r??p;for(let b=0;;b+=p){let x=l+(O+b)*a,w=Cy(e,{x:m,y:x},!1,a);if(n?x>c.bottom:x<c.top)return Ae.cursor(w.pos,w.assoc);let k=e.coordsAtPos(w.pos,w.assoc),T=k?(k.top+k.bottom)/2:0;if(!k||(n?T>l:T<l))return Ae.cursor(w.pos,w.assoc,void 0,s)}}function Xu(e,t,n){for(;;){let r=0;for(let i of e)i.between(t-1,t+1,(a,s,l)=>{if(t>a&&t<s){let c=r||n||(t-a<s-t?-1:1);t=c<0?a:s,r=c}});if(!r)return t}}function fN(e,t){let n=null;for(let r=0;r<t.ranges.length;r++){let i=t.ranges[r],a=null;if(i.empty){let s=Xu(e,i.from,0);s!=i.from&&(a=Ae.cursor(s,-1))}else{let s=Xu(e,i.from,-1),l=Xu(e,i.to,1);(s!=i.from||l!=i.to)&&(a=Ae.range(i.from==i.anchor?s:l,i.from==i.head?s:l))}a&&(n||(n=t.ranges.slice()),n[r]=a)}return n?Ae.create(n,t.mainIndex):t}function QO(e,t,n){let r=Xu(e.state.facet(Id).map(i=>i(e)),n.from,t.head>n.from?-1:1);return r==n.from?n:Ae.cursor(r,r<n.from?1:-1)}var Yi=class{constructor(e,t){this.pos=e,this.assoc=t}};function Cy(e,t,n,r){let i=e.contentDOM.getBoundingClientRect(),a=i.top+e.viewState.paddingTop,{x:s,y:l}=t,c=l-a,d;for(;;){if(c<0)return new Yi(0,1);if(c>e.viewState.docHeight)return new Yi(e.state.doc.length,-1);if(d=e.elementAtHeight(c),r==null)break;if(d.type==mr.Text){if(r<0?d.to<e.viewport.from:d.from>e.viewport.to)break;let p=e.docView.coordsAt(r<0?d.from:d.to,r>0?-1:1);if(p&&(r<0?p.top<=c+a:p.bottom>=c+a))break}let m=e.viewState.heightOracle.textHeight/2;c=r>0?d.bottom+m:d.top-m}if(e.viewport.from>=d.to||e.viewport.to<=d.from){if(n)return null;if(d.type==mr.Text){let m=l9(e,i,d,s,l);return new Yi(m,m==d.from?1:-1)}}if(d.type!=mr.Text)return c<(d.top+d.bottom)/2?new Yi(d.from,1):new Yi(d.to,-1);let f=e.docView.lineAt(d.from,2);return(!f||f.length!=d.length)&&(f=e.docView.lineAt(d.from,-2)),new h9(e,s,l,e.textDirectionAt(d.from)).scanTile(f,d.from)}var h9=class{constructor(e,t,n,r){this.view=e,this.x=t,this.y=n,this.baseDir=r,this.line=null,this.spans=null}bidiSpansAt(e){return(!this.line||this.line.from>e||this.line.to<e)&&(this.line=this.view.state.doc.lineAt(e),this.spans=this.view.bidiSpans(this.line)),this}baseDirAt(e,t){let{line:n,spans:r}=this.bidiSpansAt(e);return r[Wi.find(r,e-n.from,-1,t)].level==this.baseDir}dirAt(e,t){let{line:n,spans:r}=this.bidiSpansAt(e);return r[Wi.find(r,e-n.from,-1,t)].dir}bidiIn(e,t){let{spans:n,line:r}=this.bidiSpansAt(e);return n.length>1||n.length&&(n[0].level!=this.baseDir||n[0].to+r.from<t)}scan(e,t){let n=0,r=e.length-1,i=new Set,a=this.bidiIn(e[0],e[r]),s,l,c=-1,d=1e9,f;e:for(;n<r;){let p=r-n,O=n+r>>1;t:if(i.has(O)){let x=n+Math.floor(Math.random()*p);for(let w=0;w<p;w++){if(!i.has(x)){O=x;break t}x++,x==r&&(x=n)}break e}i.add(O);let b=t(O);if(b)for(let x=0;x<b.length;x++){let w=b[x],k=0;if(!(w.width==0&&b.length>1)){if(w.bottom<this.y)(!s||s.bottom<w.bottom)&&(s=w),k=1;else if(w.top>this.y)(!l||l.top>w.top)&&(l=w),k=-1;else{let T=w.left>this.x?this.x-w.left:w.right<this.x?this.x-w.right:0,j=Math.abs(T);j<d&&(c=O,d=j,f=w),T&&(k=T<0==(this.baseDir==On.LTR)?-1:1)}k==-1&&(!a||this.baseDirAt(e[O],1))?r=O:k==1&&(!a||this.baseDirAt(e[O+1],-1))&&(n=O+1)}}}if(!f){let p=s&&(!l||this.y-s.bottom<l.top-this.y)?s:l;return this.y=(p.top+p.bottom)/2,this.scan(e,t)}let m=(a?this.dirAt(e[c],1):this.baseDir)==On.LTR;return{i:c,after:this.x>(f.left+f.right)/2==m}}scanText(e,t){let n=[];for(let i=0;i<e.length;i=wi(e.text,i))n.push(t+i);n.push(t+e.length);let r=this.scan(n,i=>{let a=n[i]-t,s=n[i+1]-t;return pd(e.dom,a,s).getClientRects()});return r.after?new Yi(n[r.i+1],-1):new Yi(n[r.i],1)}scanTile(e,t){if(!e.length)return new Yi(t,1);if(e.children.length==1){let s=e.children[0];if(s.isText())return this.scanText(s,t);if(s.isComposite())return this.scanTile(s,t)}let n=[t];for(let s=0,l=t;s<e.children.length;s++)n.push(l+=e.children[s].length);let r=this.scan(n,s=>{let l=e.children[s];return l.flags&48?null:(l.dom.nodeType==1?l.dom:pd(l.dom,0,l.length)).getClientRects()}),i=e.children[r.i],a=n[r.i];return i.isText()?this.scanText(i,a):i.isComposite()?this.scanTile(i,a):r.after?new Yi(n[r.i+1],-1):new Yi(a,1)}},Cl="",m9=class{constructor(e,t){this.points=e,this.view=t,this.text="",this.lineSeparator=t.state.facet(Gt.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=Cl}readRange(e,t){if(!e)return this;let n=e.parentNode;for(let r=e;;){this.findPointBefore(n,r);let i=this.text.length;this.readNode(r);let a=nn.get(r),s=r.nextSibling;if(s==t){a!=null&&a.breakAfter&&!s&&n!=this.view.contentDOM&&this.lineBreak();break}let l=nn.get(s);(a&&l?a.breakAfter:(a?a.breakAfter:Tm(r))||Tm(s)&&(r.nodeName!="BR"||a!=null&&a.isWidget())&&this.text.length>i)&&!g9(s,t)&&this.lineBreak(),r=s}return this.findPointBefore(n,t),this}readTextNode(e){let t=e.nodeValue;for(let n of this.points)n.node==e&&(n.pos=this.text.length+Math.min(n.offset,t.length));for(let n=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let i=-1,a=1,s;if(this.lineSeparator?(i=t.indexOf(this.lineSeparator,n),a=this.lineSeparator.length):(s=r.exec(t))&&(i=s.index,a=s[0].length),this.append(t.slice(n,i<0?t.length:i)),i<0)break;if(this.lineBreak(),a>1)for(let l of this.points)l.node==e&&l.pos>this.text.length&&(l.pos-=a-1);n=i+a}}readNode(e){let t=nn.get(e),n=t&&t.overrideDOMText;if(n!=null){this.findPointInside(e,n.length);for(let r=n.iter();!r.next().done;)r.lineBreak?this.lineBreak():this.append(r.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let n of this.points)n.node==e&&e.childNodes[n.offset]==t&&(n.pos=this.text.length)}findPointInside(e,t){for(let n of this.points)(e.nodeType==3?n.node==e:e.contains(n.node))&&(n.pos=this.text.length+(p9(e,n.node,n.offset)?t:0))}};function p9(e,t,n){for(;;){if(!t||n<Na(t))return!1;if(t==e)return!0;n=Ds(t)+1,t=t.parentNode}}function g9(e,t){let n;for(;!(e==t||!e);e=e.nextSibling){let r=nn.get(e);if(!(r!=null&&r.isWidget()))return!1;r&&(n||(n=[])).push(r)}if(n)for(let r of n){let i=r.overrideDOMText;if(i!=null&&i.length)return!1}return!0}var _j=class{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}},v9=class{constructor(e,t,n,r){this.typeOver=r,this.bounds=null,this.text="",this.domChanged=t>-1;let{impreciseHead:i,impreciseAnchor:a}=e.docView,s=e.state.selection;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=hN(e.docView.tile,t,n,0))){let l=i||a?[]:b9(e),c=new m9(l,e);c.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=c.text,this.newSel=y9(l,this.bounds.from)}else{let l=e.observer.selectionRange,c=i&&i.node==l.focusNode&&i.offset==l.focusOffset||!Oy(e.contentDOM,l.focusNode)?s.main.head:e.docView.posFromDOM(l.focusNode,l.focusOffset),d=a&&a.node==l.anchorNode&&a.offset==l.anchorOffset||!Oy(e.contentDOM,l.anchorNode)?s.main.anchor:e.docView.posFromDOM(l.anchorNode,l.anchorOffset),f=e.viewport;if((_e.ios||_e.chrome)&&s.main.empty&&c!=d&&(f.from>0||f.to<e.state.doc.length)){let m=Math.min(c,d),p=Math.max(c,d),O=f.from-m,b=f.to-p;(O==0||O==1||m==0)&&(b==0||b==-1||p==e.state.doc.length)&&(c=0,d=e.state.doc.length)}if(e.inputState.composing>-1&&s.ranges.length>1)this.newSel=s.replaceRange(Ae.range(d,c));else if(e.lineWrapping&&d==c&&!(s.main.empty&&s.main.head==c)&&e.inputState.lastTouchTime>Date.now()-100){let m=e.coordsAtPos(c,-1),p=0;m&&(p=e.inputState.lastTouchY<=m.bottom?-1:1),this.newSel=Ae.create([Ae.cursor(c,p)])}else this.newSel=Ae.single(d,c)}}};function hN(e,t,n,r){if(e.isComposite()){let i=-1,a=-1,s=-1,l=-1;for(let c=0,d=r,f=r;c<e.children.length;c++){let m=e.children[c],p=d+m.length;if(d<t&&p>n)return hN(m,t,n,d);if(p>=t&&i==-1&&(i=c,a=d),d>n&&m.dom.parentNode==e.dom){s=c,l=f;break}f=p,d=p+m.breakAfter}return{from:a,to:l<0?r+e.length:l,startDOM:(i?e.children[i-1].dom.nextSibling:null)||e.dom.firstChild,endDOM:s<e.children.length&&s>=0?e.children[s].dom:null}}else return e.isText()?{from:r,to:r+e.length,startDOM:e.dom,endDOM:e.dom.nextSibling}:null}function mN(e,t){let n,{newSel:r}=t,{state:i}=e,a=i.selection.main,s=e.inputState.lastKeyTime>Date.now()-100?e.inputState.lastKeyCode:-1;if(t.bounds){let{from:l,to:c}=t.bounds,d=a.from,f=null;(s===8||_e.android&&t.text.length<c-l)&&(d=a.to,f="end");let m=i.doc.sliceString(l,c,Cl),p,O;!a.empty&&a.from>=l&&a.to<=c&&(t.typeOver||m!=t.text)&&m.slice(0,a.from-l)==t.text.slice(0,a.from-l)&&m.slice(a.to-l)==t.text.slice(p=t.text.length-(m.length-(a.to-l)))?n={from:a.from,to:a.to,insert:_t.of(t.text.slice(a.from-l,p).split(Cl))}:(O=pN(m,t.text,d-l,f))&&(_e.chrome&&s==13&&O.toB==O.from+2&&t.text.slice(O.from,O.toB)==Cl+Cl&&O.toB--,n={from:l+O.from,to:l+O.toA,insert:_t.of(t.text.slice(O.from,O.toB).split(Cl))})}else r&&(!e.hasFocus&&i.facet(ka)||Pm(r,a))&&(r=null);if(!n&&!r)return!1;if((_e.mac||_e.android)&&n&&n.from==n.to&&n.from==a.head-1&&/^\. ?$/.test(n.insert.toString())&&e.contentDOM.getAttribute("autocorrect")=="off"?(r&&n.insert.length==2&&(r=Ae.single(r.main.anchor-1,r.main.head-1)),n={from:n.from,to:n.to,insert:_t.of([n.insert.toString().replace("."," ")])}):i.doc.lineAt(a.from).to<a.to&&e.docView.lineHasWidget(a.to)&&e.inputState.insertingTextAt>Date.now()-50?n={from:a.from,to:a.to,insert:i.toText(e.inputState.insertingText)}:_e.chrome&&n&&n.from==n.to&&n.from==a.head&&n.insert.toString()==`
|
|
57
|
-
`&&e.lineWrapping&&(r&&(r=Ae.single(r.main.anchor-1,r.main.head-1)),n={from:a.from,to:a.to,insert:_t.of([" "])}),n)return Cx(e,n,r,s);if(r&&!Pm(r,a)){let l=!1,c="select";return e.inputState.lastSelectionTime>Date.now()-50&&(e.inputState.lastSelectionOrigin=="select"&&(l=!0),c=e.inputState.lastSelectionOrigin,c=="select.pointer"&&(r=fN(i.facet(Id).map(d=>d(e)),r))),e.dispatch({selection:r,scrollIntoView:l,userEvent:c}),!0}else return!1}function Cx(e,t,n,r=-1){if(_e.ios&&e.inputState.flushIOSKey(t))return!0;let i=e.state.selection.main;if(_e.android&&(t.to==i.to&&(t.from==i.from||t.from==i.from-1&&e.state.sliceDoc(t.from,i.from)==" ")&&t.insert.length==1&&t.insert.lines==2&&Dl(e.contentDOM,"Enter",13)||(t.from==i.from-1&&t.to==i.to&&t.insert.length==0||r==8&&t.insert.length<t.to-t.from&&t.to>i.head)&&Dl(e.contentDOM,"Backspace",8)||t.from==i.from&&t.to==i.to+1&&t.insert.length==0&&Dl(e.contentDOM,"Delete",46)))return!0;let a=t.insert.toString();e.inputState.composing>=0&&e.inputState.composing++;let s,l=()=>s||(s=O9(e,t,n));return e.state.facet(WP).some(c=>c(e,t.from,t.to,a,l))||e.dispatch(l()),!0}function O9(e,t,n){let r,i=e.state,a=i.selection.main,s=-1;if(t.from==t.to&&t.from<a.from||t.from>a.to){let c=t.from<a.from?-1:1,d=c<0?a.from:a.to,f=Xu(i.facet(Id).map(m=>m(e)),d,c);t.from==f&&(s=f)}if(s>-1)r={changes:t,selection:Ae.cursor(t.from+t.insert.length,-1)};else if(t.from>=a.from&&t.to<=a.to&&t.to-t.from>=(a.to-a.from)/3&&(!n||n.main.empty&&n.main.from==t.from+t.insert.length)&&e.inputState.composing<0){let c=a.from<t.from?i.sliceDoc(a.from,t.from):"",d=a.to>t.to?i.sliceDoc(t.to,a.to):"";r=i.replaceSelection(e.state.toText(c+t.insert.sliceString(0,void 0,e.state.lineBreak)+d))}else{let c=i.changes(t),d=n&&n.main.to<=c.newLength?n.main:void 0;if(i.selection.ranges.length>1&&(e.inputState.composing>=0||e.inputState.compositionPendingChange)&&t.to<=a.to+10&&t.to>=a.to-10){let f=e.state.sliceDoc(t.from,t.to),m,p=n&&dN(e,n.main.head);if(p){let b=t.insert.length-(t.to-t.from);m={from:p.from,to:p.to-b}}else m=e.state.doc.lineAt(a.head);let O=a.to-t.to;r=i.changeByRange(b=>{if(b.from==a.from&&b.to==a.to)return{changes:c,range:d||b.map(c)};let x=b.to-O,w=x-f.length;if(e.state.sliceDoc(w,x)!=f||x>=m.from&&w<=m.to)return{range:b};let k=i.changes({from:w,to:x,insert:t.insert}),T=b.to-a.to;return{changes:k,range:d?Ae.range(Math.max(0,d.anchor+T),Math.max(0,d.head+T)):b.map(k)}})}else r={changes:c,selection:d&&i.selection.replaceRange(d)}}let l="input.type";return(e.composing||e.inputState.compositionPendingChange&&e.inputState.compositionEndedAt>Date.now()-50)&&(e.inputState.compositionPendingChange=!1,l+=".compose",e.inputState.compositionFirstChange&&(l+=".start",e.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:l,scrollIntoView:!0})}function pN(e,t,n,r){let i=Math.min(e.length,t.length),a=0;for(;a<i&&e.charCodeAt(a)==t.charCodeAt(a);)a++;if(a==i&&e.length==t.length)return null;let s=e.length,l=t.length;for(;s>0&&l>0&&e.charCodeAt(s-1)==t.charCodeAt(l-1);)s--,l--;if(r=="end"){let c=Math.max(0,a-Math.min(s,l));n-=s+c-a}if(s<a&&e.length<t.length){let c=n<=a&&n>=s?a-n:0;a-=c,l=a+(l-s),s=a}else if(l<a){let c=n<=a&&n>=l?a-n:0;a-=c,s=a+(s-l),l=a}return{from:a,toA:s,toB:l}}function b9(e){let t=[];if(e.root.activeElement!=e.contentDOM)return t;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:a}=e.observer.selectionRange;return n&&(t.push(new _j(n,r)),(i!=n||a!=r)&&t.push(new _j(i,a))),t}function y9(e,t){if(e.length==0)return null;let n=e[0].pos,r=e.length==2?e[1].pos:n;return n>-1&&r>-1?Ae.single(n+t,r+t):null}function Pm(e,t){return t.head==e.main.head&&t.anchor==e.main.anchor}var x9=class{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastTouchX=0,this.lastTouchY=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.lastWheelEvent=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText="",this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,_e.safari&&e.contentDOM.addEventListener("input",()=>null),_e.gecko&&D9(e.contentDOM.ownerDocument)}handleEvent(e){!E9(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||(this.view.updateState!=0?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e))}runHandlers(e,t){let n=this.handlers[e];if(n){for(let r of n.observers)r(this.view,t);for(let r of n.handlers){if(t.defaultPrevented)break;if(r(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=S9(e),n=this.handlers,r=this.view.contentDOM;for(let i in t)if(i!="scroll"){let a=!t[i].handlers.length,s=n[i];s&&a!=!s.handlers.length&&(r.removeEventListener(i,this.handleEvent),s=null),s||r.addEventListener(i,this.handleEvent,{passive:a})}for(let i in n)i!="scroll"&&!t[i]&&r.removeEventListener(i,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&vN.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),_e.android&&_e.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return _e.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&!e.shiftKey&&((t=gN.find(n=>n.keyCode==e.keyCode))&&!e.ctrlKey||w9.indexOf(e.key)>-1&&e.ctrlKey)?(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let t=this.pendingIOSKey;return!t||t.key=="Enter"&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,Dl(this.view.contentDOM,t.key,t.keyCode,t instanceof KeyboardEvent?t:void 0))}ignoreDuringComposition(e){return!/^key/.test(e.type)||e.synthetic?!1:this.composing>0?!0:_e.safari&&!_e.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}};function kj(e,t){return(n,r)=>{try{return t.call(e,r,n)}catch(i){Fi(n.state,i)}}}function S9(e){let t=Object.create(null);function n(r){return t[r]||(t[r]={observers:[],handlers:[]})}for(let r of e){let i=r.spec,a=i&&i.plugin.domEventHandlers,s=i&&i.plugin.domEventObservers;if(a)for(let l in a){let c=a[l];c&&n(l).handlers.push(kj(r.value,c))}if(s)for(let l in s){let c=s[l];c&&n(l).observers.push(kj(r.value,c))}}for(let r in Ci)n(r).handlers.push(Ci[r]);for(let r in gr)n(r).observers.push(gr[r]);return t}var gN=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],w9="dthko",vN=[16,17,18,20,91,92,224,225],Th=6;function Ch(e){return Math.max(0,e)*.7+8}function _9(e,t){return Math.max(Math.abs(e.clientX-t.clientX),Math.abs(e.clientY-t.clientY))}var k9=class{constructor(e,t,n,r){this.view=e,this.startEvent=t,this.style=n,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=RP(e.contentDOM),this.atoms=e.state.facet(Id).map(a=>a(e));let i=e.contentDOM.ownerDocument;i.addEventListener("mousemove",this.move=this.move.bind(this)),i.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(Gt.allowMultipleSelections)&&j9(e,t),this.dragging=C9(e,t)&&yN(t)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&_9(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,n=0,r=0,i=0,a=this.view.win.innerWidth,s=this.view.win.innerHeight;this.scrollParents.x&&({left:r,right:a}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:i,bottom:s}=this.scrollParents.y.getBoundingClientRect());let l=rN(this.view);e.clientX-l.left<=r+Th?t=-Ch(r-e.clientX):e.clientX+l.right>=a-Th&&(t=Ch(e.clientX-a)),e.clientY-l.top<=i+Th?n=-Ch(i-e.clientY):e.clientY+l.bottom>=s-Th&&(n=Ch(e.clientY-s)),this.setScrollSpeed(t,n)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),this.dragging===!1&&this.select(this.lastEvent)}select(e){let{view:t}=this,n=fN(this.atoms,this.style.get(e,this.extend,this.multiple));(this.mustSelect||!n.eq(t.state.selection,this.dragging===!1))&&this.view.dispatch({selection:n,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(t=>t.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}};function j9(e,t){let n=e.state.facet(BP);return n.length?n[0](t):_e.mac?t.metaKey:t.ctrlKey}function T9(e,t){let n=e.state.facet(VP);return n.length?n[0](t):_e.mac?!t.altKey:!t.ctrlKey}function C9(e,t){let{main:n}=e.state.selection;if(n.empty)return!1;let r=md(e.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let a=0;a<i.length;a++){let s=i[a];if(s.left<=t.clientX&&s.right>=t.clientX&&s.top<=t.clientY&&s.bottom>=t.clientY)return!0}return!1}function E9(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target,r;n!=e.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(r=nn.get(n))&&r.isWidget()&&!r.isHidden&&r.widget.ignoreEvent(t))return!1;return!0}var Ci=Object.create(null),gr=Object.create(null),ON=_e.ie&&_e.ie_version<15||_e.ios&&_e.webkit_version<604;function A9(e){let t=e.dom.parentNode;if(!t)return;let n=t.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{e.focus(),n.remove(),bN(e,n.value)},50)}function Op(e,t,n){for(let r of e.facet(t))n=r(n,e);return n}function bN(e,t){t=Op(e.state,_x,t);let{state:n}=e,r,i=1,a=n.toText(t),s=a.lines==n.selection.ranges.length;if(Ey!=null&&n.selection.ranges.every(c=>c.empty)&&Ey==a.toString()){let c=-1;r=n.changeByRange(d=>{let f=n.doc.lineAt(d.from);if(f.from==c)return{range:d};c=f.from;let m=n.toText((s?a.line(i++).text:t)+n.lineBreak);return{changes:{from:f.from,insert:m},range:Ae.cursor(d.from+m.length)}})}else s?r=n.changeByRange(c=>{let d=a.line(i++);return{changes:{from:c.from,to:c.to,insert:d.text},range:Ae.cursor(c.from+d.length)}}):r=n.replaceSelection(a);e.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}gr.scroll=e=>{e.inputState.lastScrollTop=e.scrollDOM.scrollTop,e.inputState.lastScrollLeft=e.scrollDOM.scrollLeft};gr.wheel=gr.mousewheel=e=>{e.inputState.lastWheelEvent=Date.now()};Ci.keydown=(e,t)=>(e.inputState.setSelectionOrigin("select"),t.keyCode==27&&e.inputState.tabFocusMode!=0&&(e.inputState.tabFocusMode=Date.now()+2e3),!1);gr.touchstart=(e,t)=>{let n=e.inputState,r=t.targetTouches[0];n.lastTouchTime=Date.now(),r&&(n.lastTouchX=r.clientX,n.lastTouchY=r.clientY),n.setSelectionOrigin("select.pointer")};gr.touchmove=e=>{e.inputState.setSelectionOrigin("select.pointer")};Ci.mousedown=(e,t)=>{if(e.observer.flush(),e.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let r of e.state.facet(UP))if(n=r(e,t),n)break;if(!n&&t.button==0&&(n=P9(e,t)),n){let r=!e.hasFocus;e.inputState.startMouseSelection(new k9(e,t,n,r)),r&&e.observer.ignore(()=>{MP(e.contentDOM);let a=e.root.activeElement;a&&!a.contains(e.contentDOM)&&a.blur()});let i=e.inputState.mouseSelection;if(i)return i.start(t),i.dragging===!1}else e.inputState.setSelectionOrigin("select.pointer");return!1};function jj(e,t,n,r){if(r==1)return Ae.cursor(t,n);if(r==2)return o9(e.state,t,n);{let i=e.docView.lineAt(t,n),a=e.state.doc.lineAt(i?i.posAtEnd:t),s=i?i.posAtStart:a.from,l=i?i.posAtEnd:a.to;return l<e.state.doc.length&&l==a.to&&l++,Ae.range(s,l)}}var Q9=_e.ie&&_e.ie_version<=11,Tj=null,Cj=0,Ej=0;function yN(e){if(!Q9)return e.detail;let t=Tj,n=Ej;return Tj=e,Ej=Date.now(),Cj=!t||n>Date.now()-400&&Math.abs(t.clientX-e.clientX)<2&&Math.abs(t.clientY-e.clientY)<2?(Cj+1)%3:1}function P9(e,t){let n=e.posAndSideAtCoords({x:t.clientX,y:t.clientY},!1),r=yN(t),i=e.state.selection;return{update(a){a.docChanged&&(n.pos=a.changes.mapPos(n.pos),i=i.map(a.changes))},get(a,s,l){let c=e.posAndSideAtCoords({x:a.clientX,y:a.clientY},!1),d,f=jj(e,c.pos,c.assoc,r);if(n.pos!=c.pos&&!s){let m=jj(e,n.pos,n.assoc,r),p=Math.min(m.from,f.from),O=Math.max(m.to,f.to);f=p<f.from?Ae.range(p,O,f.assoc):Ae.range(O,p,f.assoc)}return s?i.replaceRange(i.main.extend(f.from,f.to,f.assoc)):l&&r==1&&i.ranges.length>1&&(d=N9(i,c.pos))?d:l?i.addRange(f):Ae.create([f])}}}function N9(e,t){for(let n=0;n<e.ranges.length;n++){let{from:r,to:i}=e.ranges[n];if(r<=t&&i>=t)return Ae.create(e.ranges.slice(0,n).concat(e.ranges.slice(n+1)),e.mainIndex==n?0:e.mainIndex-(e.mainIndex>n?1:0))}return null}Ci.dragstart=(e,t)=>{let{selection:{main:n}}=e.state;if(t.target.draggable){let i=e.docView.tile.nearest(t.target);if(i&&i.isWidget()){let a=i.posAtStart,s=a+i.length;(a>=n.to||s<=n.from)&&(n=Ae.range(a,s))}}let{inputState:r}=e;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,t.dataTransfer&&(t.dataTransfer.setData("Text",Op(e.state,kx,e.state.sliceDoc(n.from,n.to))),t.dataTransfer.effectAllowed="copyMove"),!1};Ci.dragend=e=>(e.inputState.draggedContent=null,!1);function Aj(e,t,n,r){if(n=Op(e.state,_x,n),!n)return;let i=e.posAtCoords({x:t.clientX,y:t.clientY},!1),{draggedContent:a}=e.inputState,s=r&&a&&T9(e,t)?{from:a.from,to:a.to}:null,l={from:i,insert:n},c=e.state.changes(s?[s,l]:l);e.focus(),e.dispatch({changes:c,selection:{anchor:c.mapPos(i,-1),head:c.mapPos(i,1)},userEvent:s?"move.drop":"input.drop"}),e.inputState.draggedContent=null}Ci.drop=(e,t)=>{if(!t.dataTransfer)return!1;if(e.state.readOnly)return!0;let n=t.dataTransfer.files;if(n&&n.length){let r=Array(n.length),i=0,a=()=>{++i==n.length&&Aj(e,t,r.filter(s=>s!=null).join(e.state.lineBreak),!1)};for(let s=0;s<n.length;s++){let l=new FileReader;l.onerror=a,l.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(l.result)||(r[s]=l.result),a()},l.readAsText(n[s])}return!0}else{let r=t.dataTransfer.getData("Text");if(r)return Aj(e,t,r,!0),!0}return!1};Ci.paste=(e,t)=>{if(e.state.readOnly)return!0;e.observer.flush();let n=ON?null:t.clipboardData;return n?(bN(e,n.getData("text/plain")||n.getData("text/uri-list")),!0):(A9(e),!1)};function R9(e,t){let n=e.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=t,r.focus(),r.selectionEnd=t.length,r.selectionStart=0,setTimeout(()=>{r.remove(),e.focus()},50)}function M9(e){let t=[],n=[],r=!1;for(let i of e.selection.ranges)i.empty||(t.push(e.sliceDoc(i.from,i.to)),n.push(i));if(!t.length){let i=-1;for(let{from:a}of e.selection.ranges){let s=e.doc.lineAt(a);s.number>i&&(t.push(s.text),n.push({from:s.from,to:Math.min(e.doc.length,s.to+1)})),i=s.number}r=!0}return{text:Op(e,kx,t.join(e.lineBreak)),ranges:n,linewise:r}}var Ey=null;Ci.copy=Ci.cut=(e,t)=>{if(!Iu(e.contentDOM,e.observer.selectionRange))return!1;let{text:n,ranges:r,linewise:i}=M9(e.state);if(!n&&!i)return!1;Ey=i?n:null,t.type=="cut"&&!e.state.readOnly&&e.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let a=ON?null:t.clipboardData;return a?(a.clearData(),a.setData("text/plain",n),!0):(R9(e,n),!1)};var xN=qo.define();function SN(e,t){let n=[];for(let r of e.facet(FP)){let i=r(e,t);i&&n.push(i)}return n.length?e.update({effects:n,annotations:xN.of(!0)}):null}function wN(e){setTimeout(()=>{let t=e.hasFocus;if(t!=e.inputState.notifiedFocused){let n=SN(e.state,t);n?e.dispatch(n):e.update([])}},10)}gr.focus=e=>{e.inputState.lastFocusTime=Date.now(),!e.scrollDOM.scrollTop&&(e.inputState.lastScrollTop||e.inputState.lastScrollLeft)&&(e.scrollDOM.scrollTop=e.inputState.lastScrollTop,e.scrollDOM.scrollLeft=e.inputState.lastScrollLeft),wN(e)};gr.blur=e=>{e.observer.clearSelectionRange(),wN(e)};gr.compositionstart=gr.compositionupdate=e=>{e.observer.editContext||(e.inputState.compositionFirstChange==null&&(e.inputState.compositionFirstChange=!0),e.inputState.composing<0&&(e.inputState.composing=0))};gr.compositionend=e=>{e.observer.editContext||(e.inputState.composing=-1,e.inputState.compositionEndedAt=Date.now(),e.inputState.compositionPendingKey=!0,e.inputState.compositionPendingChange=e.observer.pendingRecords().length>0,e.inputState.compositionFirstChange=null,_e.chrome&&_e.android?e.observer.flushSoon():e.inputState.compositionPendingChange?Promise.resolve().then(()=>e.observer.flush()):setTimeout(()=>{e.inputState.composing<0&&e.docView.hasComposition&&e.update([])},50))};gr.contextmenu=e=>{e.inputState.lastContextMenu=Date.now()};Ci.beforeinput=(e,t)=>{var n,r;if((t.inputType=="insertText"||t.inputType=="insertCompositionText")&&(e.inputState.insertingText=t.data,e.inputState.insertingTextAt=Date.now()),t.inputType=="insertReplacementText"&&e.observer.editContext){let a=(n=t.dataTransfer)===null||n===void 0?void 0:n.getData("text/plain"),s=t.getTargetRanges();if(a&&s.length){let l=s[0],c=e.posAtDOM(l.startContainer,l.startOffset),d=e.posAtDOM(l.endContainer,l.endOffset);return Cx(e,{from:c,to:d,insert:e.state.toText(a)},null),!0}}let i;if(_e.chrome&&_e.android&&(i=gN.find(a=>a.inputType==t.inputType))&&(e.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let a=((r=window.visualViewport)===null||r===void 0?void 0:r.height)||0;setTimeout(()=>{var s;(((s=window.visualViewport)===null||s===void 0?void 0:s.height)||0)>a+10&&e.hasFocus&&(e.contentDOM.blur(),e.focus())},100)}return _e.ios&&t.inputType=="deleteContentForward"&&e.observer.flushSoon(),_e.safari&&t.inputType=="insertText"&&e.inputState.composing>=0&&setTimeout(()=>gr.compositionend(e,t),20),!1};var Qj=new Set;function D9(e){Qj.has(e)||(Qj.add(e),e.addEventListener("copy",()=>{}),e.addEventListener("cut",()=>{}))}var Pj=["pre-wrap","normal","pre-line","break-spaces"],Gl=!1;function Nj(){Gl=!1}var L9=class{constructor(e){this.lineWrapping=e,this.doc=_t.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let n=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((t-e-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return Pj.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];r<0?n++:this.heightSamples[Math.floor(r*10)]||(t=!0,this.heightSamples[Math.floor(r*10)]=!0)}return t}refresh(e,t,n,r,i,a){let s=Pj.indexOf(e)>-1,l=Math.abs(t-this.lineHeight)>.3||this.lineWrapping!=s||Math.abs(n-this.charWidth)>.1;if(this.lineWrapping=s,this.lineHeight=t,this.charWidth=n,this.textHeight=r,this.lineLength=i,l){this.heightSamples={};for(let c=0;c<a.length;c++){let d=a[c];d<0?c++:this.heightSamples[Math.floor(d*10)]=!0}}return l}},z9=class{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}},ja=class _N{constructor(t,n,r,i,a){this.from=t,this.length=n,this.top=r,this.height=i,this._content=a}get type(){return typeof this._content=="number"?mr.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof hd?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(t){let n=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(t._content)?t._content:[t]);return new _N(this.from,this.length+t.length,this.top,this.height+t.height,n)}},It=(function(e){return e[e.ByPos=0]="ByPos",e[e.ByHeight=1]="ByHeight",e[e.ByPosNoHeight=2]="ByPosNoHeight",e})(It||(It={})),lm=.001,ji=class cm{constructor(t,n,r=2){this.length=t,this.height=n,this.flags=r}get outdated(){return(this.flags&2)>0}set outdated(t){this.flags=(t?2:0)|this.flags&-3}setHeight(t){this.height!=t&&(Math.abs(this.height-t)>lm&&(Gl=!0),this.height=t)}replace(t,n,r){return cm.of(r)}decomposeLeft(t,n){n.push(this)}decomposeRight(t,n){n.push(this)}applyChanges(t,n,r,i){let a=this,s=r.doc;for(let l=i.length-1;l>=0;l--){let{fromA:c,toA:d,fromB:f,toB:m}=i[l],p=a.lineAt(c,It.ByPosNoHeight,r.setDoc(n),0,0),O=p.to>=d?p:a.lineAt(d,It.ByPosNoHeight,r,0,0);for(m+=O.to-d,d=O.to;l>0&&p.from<=i[l-1].toA;)c=i[l-1].fromA,f=i[l-1].fromB,l--,c<p.from&&(p=a.lineAt(c,It.ByPosNoHeight,r,0,0));f+=p.from-c,c=p.from;let b=X9.build(r.setDoc(s),t,f,m);a=Nm(a,a.replace(c,d,b))}return a.updateHeight(r,0)}static empty(){return new Bi(0,0,0)}static of(t){if(t.length==1)return t[0];let n=0,r=t.length,i=0,a=0;for(;;)if(n==r)if(i>a*2){let l=t[n-1];l.break?t.splice(--n,1,l.left,null,l.right):t.splice(--n,1,l.left,l.right),r+=1+l.break,i-=l.size}else if(a>i*2){let l=t[r];l.break?t.splice(r,1,l.left,null,l.right):t.splice(r,1,l.left,l.right),r+=2+l.break,a-=l.size}else break;else if(i<a){let l=t[n++];l&&(i+=l.size)}else{let l=t[--r];l&&(a+=l.size)}let s=0;return t[n-1]==null?(s=1,n--):t[n]==null&&(s=1,r++),new I9(cm.of(t.slice(0,n)),s,cm.of(t.slice(r)))}};function Nm(e,t){return e==t?e:(e.constructor!=t.constructor&&(Gl=!0),t)}ji.prototype.size=1;var $9=qt.replace({}),kN=class extends ji{constructor(e,t,n){super(e,t),this.deco=n,this.spaceAbove=0}mainBlock(e,t){return new ja(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.deco||0)}blockAt(e,t,n,r){return this.spaceAbove&&e<n+this.spaceAbove?new ja(r,0,n,this.spaceAbove,$9):this.mainBlock(n,r)}lineAt(e,t,n,r,i){let a=this.mainBlock(r,i);return this.spaceAbove?this.blockAt(0,n,r,i).join(a):a}forEachLine(e,t,n,r,i,a){e<=i+this.length&&t>=i&&a(this.lineAt(0,It.ByPos,n,r,i))}setMeasuredHeight(e){let t=e.heights[e.index++];t<0?(this.spaceAbove=-t,t=e.heights[e.index++]):this.spaceAbove=0,this.setHeight(t)}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more&&this.setMeasuredHeight(r),this.outdated=!1,this}toString(){return`block(${this.length})`}},Bi=class Ay extends kN{constructor(t,n,r){super(t,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0,this.spaceAbove=r}mainBlock(t,n){return new ja(n,this.length,t+this.spaceAbove,this.height-this.spaceAbove,this.breaks)}replace(t,n,r){let i=r[0];return r.length==1&&(i instanceof Ay||i instanceof Ll&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof Ll?i=new Ay(i.length,this.height,this.spaceAbove):i.height=this.height,this.outdated||(i.outdated=!1),i):ji.of(r)}updateHeight(t,n=0,r=!1,i){return i&&i.from<=n&&i.more?this.setMeasuredHeight(i):(r||this.outdated)&&(this.spaceAbove=0,this.setHeight(Math.max(this.widgetHeight,t.heightForLine(this.length-this.collapsed))+this.breaks*t.lineHeight)),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}},Ll=class yi extends ji{constructor(t){super(t,0)}heightMetrics(t,n){let r=t.doc.lineAt(n).number,i=t.doc.lineAt(n+this.length).number,a=i-r+1,s,l=0;if(t.lineWrapping){let c=Math.min(this.height,t.lineHeight*a);s=c/a,this.length>a+1&&(l=(this.height-c)/(this.length-a-1))}else s=this.height/a;return{firstLine:r,lastLine:i,perLine:s,perChar:l}}blockAt(t,n,r,i){let{firstLine:a,lastLine:s,perLine:l,perChar:c}=this.heightMetrics(n,i);if(n.lineWrapping){let d=i+(t<n.lineHeight?0:Math.round(Math.max(0,Math.min(1,(t-r)/this.height))*this.length)),f=n.doc.lineAt(d),m=l+f.length*c,p=Math.max(r,t-m/2);return new ja(f.from,f.length,p,m,0)}else{let d=Math.max(0,Math.min(s-a,Math.floor((t-r)/l))),{from:f,length:m}=n.doc.line(a+d);return new ja(f,m,r+l*d,l,0)}}lineAt(t,n,r,i,a){if(n==It.ByHeight)return this.blockAt(t,r,i,a);if(n==It.ByPosNoHeight){let{from:O,to:b}=r.doc.lineAt(t);return new ja(O,b-O,0,0,0)}let{firstLine:s,perLine:l,perChar:c}=this.heightMetrics(r,a),d=r.doc.lineAt(t),f=l+d.length*c,m=d.number-s,p=i+l*m+c*(d.from-a-m);return new ja(d.from,d.length,Math.max(i,Math.min(p,i+this.height-f)),f,0)}forEachLine(t,n,r,i,a,s){t=Math.max(t,a),n=Math.min(n,a+this.length);let{firstLine:l,perLine:c,perChar:d}=this.heightMetrics(r,a);for(let f=t,m=i;f<=n;){let p=r.doc.lineAt(f);if(f==t){let b=p.number-l;m+=c*b+d*(t-a-b)}let O=c+d*p.length;s(new ja(p.from,p.length,m,O,0)),m+=O,f=p.to+1}}replace(t,n,r){let i=this.length-n;if(i>0){let a=r[r.length-1];a instanceof yi?r[r.length-1]=new yi(a.length+i):r.push(null,new yi(i-1))}if(t>0){let a=r[0];a instanceof yi?r[0]=new yi(t+a.length):r.unshift(new yi(t-1),null)}return ji.of(r)}decomposeLeft(t,n){n.push(new yi(t-1),null)}decomposeRight(t,n){n.push(null,new yi(this.length-t-1))}updateHeight(t,n=0,r=!1,i){let a=n+this.length;if(i&&i.from<=n+this.length&&i.more){let s=[],l=Math.max(n,i.from),c=-1;for(i.from>n&&s.push(new yi(i.from-n-1).updateHeight(t,n));l<=a&&i.more;){let f=t.doc.lineAt(l).length;s.length&&s.push(null);let m=i.heights[i.index++],p=0;m<0&&(p=-m,m=i.heights[i.index++]),c==-1?c=m:Math.abs(m-c)>=lm&&(c=-2);let O=new Bi(f,m,p);O.outdated=!1,s.push(O),l+=f+1}l<=a&&s.push(null,new yi(a-l).updateHeight(t,l));let d=ji.of(s);return(c<0||Math.abs(d.height-this.height)>=lm||Math.abs(c-this.heightMetrics(t,n).perLine)>=lm)&&(Gl=!0),Nm(this,d)}else(r||this.outdated)&&(this.setHeight(t.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}},I9=class extends ji{constructor(e,t,n){super(e.length+t+n.length,e.height+n.height,t|(e.outdated||n.outdated?2:0)),this.left=e,this.right=n,this.size=e.size+n.size}get break(){return this.flags&1}blockAt(e,t,n,r){let i=n+this.left.height;return e<i?this.left.blockAt(e,t,n,r):this.right.blockAt(e,t,i,r+this.left.length+this.break)}lineAt(e,t,n,r,i){let a=r+this.left.height,s=i+this.left.length+this.break,l=t==It.ByHeight?e<a:e<s,c=l?this.left.lineAt(e,t,n,r,i):this.right.lineAt(e,t,n,a,s);if(this.break||(l?c.to<s:c.from>s))return c;let d=t==It.ByPosNoHeight?It.ByPosNoHeight:It.ByPos;return l?c.join(this.right.lineAt(s,d,n,a,s)):this.left.lineAt(s,d,n,r,i).join(c)}forEachLine(e,t,n,r,i,a){let s=r+this.left.height,l=i+this.left.length+this.break;if(this.break)e<l&&this.left.forEachLine(e,t,n,r,i,a),t>=l&&this.right.forEachLine(e,t,n,s,l,a);else{let c=this.lineAt(l,It.ByPos,n,r,i);e<c.from&&this.left.forEachLine(e,c.from-1,n,r,i,a),c.to>=e&&c.from<=t&&a(c),t>c.to&&this.right.forEachLine(c.to+1,t,n,s,l,a)}}replace(e,t,n){let r=this.left.length+this.break;if(t<r)return this.balanced(this.left.replace(e,t,n),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-r,t-r,n));let i=[];e>0&&this.decomposeLeft(e,i);let a=i.length;for(let s of n)i.push(s);if(e>0&&Rj(i,a-1),t<this.length){let s=i.length;this.decomposeRight(t,i),Rj(i,s)}return ji.of(i)}decomposeLeft(e,t){let n=this.left.length;if(e<=n)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&(n++,e>=n&&t.push(null)),e>n&&this.right.decomposeLeft(e-n,t)}decomposeRight(e,t){let n=this.left.length,r=n+this.break;if(e>=r)return this.right.decomposeRight(e-r,t);e<n&&this.left.decomposeRight(e,t),this.break&&e<r&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*t.size||t.size>2*e.size?ji.of(this.break?[e,null,t]:[e,t]):(this.left=Nm(this.left,e),this.right=Nm(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,n=!1,r){let{left:i,right:a}=this,s=t+i.length+this.break,l=null;return r&&r.from<=t+i.length&&r.more?l=i=i.updateHeight(e,t,n,r):i.updateHeight(e,t,n),r&&r.from<=s+a.length&&r.more?l=a=a.updateHeight(e,s,n,r):a.updateHeight(e,s,n),l?this.balanced(i,a):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}};function Rj(e,t){let n,r;e[t]==null&&(n=e[t-1])instanceof Ll&&(r=e[t+1])instanceof Ll&&e.splice(t-1,3,new Ll(n.length+1+r.length))}var q9=5,X9=class jN{constructor(t,n){this.pos=t,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=t}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(t,n){if(this.lineStart>-1){let r=Math.min(n,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof Bi?i.length+=r-this.pos:(r>this.pos||!this.isCovered)&&this.nodes.push(new Bi(r-this.pos,-1,0)),this.writtenTo=r,n>r&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(t,n,r){if(t<n||r.heightRelevant){let i=r.widget?r.widget.estimatedHeight:0,a=r.widget?r.widget.lineBreaks:0;i<0&&(i=this.oracle.lineHeight);let s=n-t;r.block?this.addBlock(new kN(s,i,r)):(s||a||i>=q9)&&this.addLineDeco(i,a,s)}else n>t&&this.span(t,n);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:t,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=t,this.lineEnd=n,this.writtenTo<t&&((this.writtenTo<t-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,t-1)),this.nodes.push(null)),this.pos>t&&this.nodes.push(new Bi(this.pos-t,-1,0)),this.writtenTo=this.pos}blankContent(t,n){let r=new Ll(n-t);return this.oracle.doc.lineAt(t).to==n&&(r.flags|=4),r}ensureLine(){this.enterLine();let t=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(t instanceof Bi)return t;let n=new Bi(0,-1,0);return this.nodes.push(n),n}addBlock(t){this.enterLine();let n=t.deco;n&&n.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(t),this.writtenTo=this.pos=this.pos+t.length,n&&n.endSide>0&&(this.covering=t)}addLineDeco(t,n,r){let i=this.ensureLine();i.length+=r,i.collapsed+=r,i.widgetHeight=Math.max(i.widgetHeight,t),i.breaks+=n,this.writtenTo=this.pos=this.pos+r}finish(t){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof Bi)&&!this.isCovered?this.nodes.push(new Bi(0,-1,0)):(this.writtenTo<this.pos||n==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let r=t;for(let i of this.nodes)i instanceof Bi&&i.updateHeight(this.oracle,r),r+=i?i.length:1;return this.nodes}static build(t,n,r,i){let a=new jN(r,t);return Ft.spans(n,r,i,a,0),a.finish(r)}};function Z9(e,t,n){let r=new B9;return Ft.compare(e,t,n,r,0),r.changes}var B9=class{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,n,r){(e<t||n&&n.heightRelevant||r&&r.heightRelevant)&&Ml(e,t,this.changes,5)}};function V9(e,t){let n=e.getBoundingClientRect(),r=e.ownerDocument,i=r.defaultView||window,a=Math.max(0,n.left),s=Math.min(i.innerWidth,n.right),l=Math.max(0,n.top),c=Math.min(i.innerHeight,n.bottom);for(let d=e.parentNode;d&&d!=r.body;)if(d.nodeType==1){let f=d,m=window.getComputedStyle(f);if((f.scrollHeight>f.clientHeight||f.scrollWidth>f.clientWidth)&&m.overflow!="visible"){let p=f.getBoundingClientRect();a=Math.max(a,p.left),s=Math.min(s,p.right),l=Math.max(l,p.top),c=Math.min(d==e.parentNode?i.innerHeight:c,p.bottom)}d=m.position=="absolute"||m.position=="fixed"?f.offsetParent:f.parentNode}else if(d.nodeType==11)d=d.host;else break;return{left:a-n.left,right:Math.max(a,s)-n.left,top:l-(n.top+t),bottom:Math.max(l,c)-(n.top+t)}}function U9(e){let t=e.getBoundingClientRect(),n=e.ownerDocument.defaultView||window;return t.left<n.innerWidth&&t.right>0&&t.top<n.innerHeight&&t.bottom>0}function Y9(e,t){let n=e.getBoundingClientRect();return{left:0,right:n.right-n.left,top:t,bottom:n.bottom-(n.top+t)}}var PO=class{constructor(e,t,n,r){this.from=e,this.to=t,this.size=n,this.displaySize=r}static same(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.from!=i.from||r.to!=i.to||r.size!=i.size)return!1}return!0}draw(e,t){return qt.replace({widget:new W9(this.displaySize*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}},W9=class extends dc{constructor(e,t){super(),this.size=e,this.vertical=t}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}},Mj=class{constructor(e,t){this.view=e,this.state=t,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scaleX=1,this.scaleY=1,this.scrollOffset=0,this.scrolledToBottom=!1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=Dj,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=On.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let n=t.facet(jx).some(r=>typeof r!="function"&&r.class=="cm-lineWrapping");this.heightOracle=new L9(n),this.stateDeco=Lj(t),this.heightMap=ji.empty().applyChanges(this.stateDeco,_t.empty,this.heightOracle.setDoc(t.doc),[new Ea(0,0,0,t.doc.length)]);for(let r=0;r<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());r++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=qt.set(this.lineGaps.map(r=>r.draw(this,!1))),this.scrollParent=e.scrollDOM,this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let n=0;n<=1;n++){let r=n?t.head:t.anchor;if(!e.some(({from:i,to:a})=>r>=i&&r<=a)){let{from:i,to:a}=this.lineBlockAt(r);e.push(new Eh(i,a))}}return this.viewports=e.sort((n,r)=>n.from-r.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?Dj:new G9(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(ku(e,this.scaler))})}update(e,t=null){this.state=e.state;let n=this.stateDeco;this.stateDeco=Lj(this.state);let r=e.changedRanges,i=Ea.extendWithRanges(r,Z9(n,this.stateDeco,e?e.changes:Ki.empty(this.state.doc.length))),a=this.heightMap.height,s=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollOffset);Nj(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),i),(this.heightMap.height!=a||Gl)&&(e.flags|=2),s?(this.scrollAnchorPos=e.changes.mapPos(s.from,-1),this.scrollAnchorHeight=s.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=a);let l=i.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<l.from||t.range.head>l.to)||!this.viewportIsAppropriate(l))&&(l=this.getViewport(0,t));let c=l.from!=this.viewport.from||l.to!=this.viewport.to;this.viewport=l,e.flags|=this.updateForViewport(),(c||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&(e.selectionSet||e.focusChanged)&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(zB)&&(this.mustEnforceCursorAssoc=!0)}measure(){let{view:e}=this,t=e.contentDOM,n=window.getComputedStyle(t),r=this.heightOracle,i=n.whiteSpace;this.defaultTextDirection=n.direction=="rtl"?On.RTL:On.LTR;let a=this.heightOracle.mustRefreshForWrapping(i)||this.mustMeasureContent==="refresh",s=t.getBoundingClientRect(),l=a||this.mustMeasureContent||this.contentDOMHeight!=s.height;this.contentDOMHeight=s.height,this.mustMeasureContent=!1;let c=0,d=0;if(s.width&&s.height){let{scaleX:E,scaleY:Q}=NP(t,s);(E>.005&&Math.abs(this.scaleX-E)>.005||Q>.005&&Math.abs(this.scaleY-Q)>.005)&&(this.scaleX=E,this.scaleY=Q,c|=16,a=l=!0)}let f=(parseInt(n.paddingTop)||0)*this.scaleY,m=(parseInt(n.paddingBottom)||0)*this.scaleY;(this.paddingTop!=f||this.paddingBottom!=m)&&(this.paddingTop=f,this.paddingBottom=m,c|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(l=!0),this.editorWidth=e.scrollDOM.clientWidth,c|=16);let p=RP(this.view.contentDOM,!1).y;p!=this.scrollParent&&(this.scrollParent=p,this.scrollAnchorHeight=-1,this.scrollOffset=0);let O=this.getScrollOffset();this.scrollOffset!=O&&(this.scrollAnchorHeight=-1,this.scrollOffset=O),this.scrolledToBottom=DP(this.scrollParent||e.win);let b=(this.printing?Y9:V9)(t,this.paddingTop),x=b.top-this.pixelViewport.top,w=b.bottom-this.pixelViewport.bottom;this.pixelViewport=b;let k=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(k!=this.inView&&(this.inView=k,k&&(l=!0)),!this.inView&&!this.scrollTarget&&!U9(e.dom))return 0;let T=s.width;if((this.contentDOMWidth!=T||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=s.width,this.editorHeight=e.scrollDOM.clientHeight,c|=16),l){let E=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(E)&&(a=!0),a||r.lineWrapping&&Math.abs(T-this.contentDOMWidth)>r.charWidth){let{lineHeight:Q,charWidth:P,textHeight:N}=e.docView.measureTextSize();a=Q>0&&r.refresh(i,Q,P,N,Math.max(5,T/P),E),a&&(e.docView.minWidth=0,c|=16)}x>0&&w>0?d=Math.max(x,w):x<0&&w<0&&(d=Math.min(x,w)),Nj();for(let Q of this.viewports){let P=Q.from==this.viewport.from?E:e.docView.measureVisibleLineHeights(Q);this.heightMap=(a?ji.empty().applyChanges(this.stateDeco,_t.empty,this.heightOracle,[new Ea(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,a,new z9(Q.from,P))}Gl&&(c|=2)}let j=!this.viewportIsAppropriate(this.viewport,d)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return j&&(c&2&&(c|=this.updateScaler()),this.viewport=this.getViewport(d,this.scrollTarget),c|=this.updateForViewport()),(c&2||j)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(a?[]:this.lineGaps,e)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),c}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let n=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,i=this.heightOracle,{visibleTop:a,visibleBottom:s}=this,l=new Eh(r.lineAt(a-n*1e3,It.ByHeight,i,0,0).from,r.lineAt(s+(1-n)*1e3,It.ByHeight,i,0,0).to);if(t){let{head:c}=t.range;if(c<l.from||c>l.to){let d=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),f=r.lineAt(c,It.ByPos,i,0,0),m;t.y=="center"?m=(f.top+f.bottom)/2-d/2:t.y=="start"||t.y=="nearest"&&c<l.from?m=f.top:m=f.bottom-d,l=new Eh(r.lineAt(m-1e3/2,It.ByHeight,i,0,0).from,r.lineAt(m+d+1e3/2,It.ByHeight,i,0,0).to)}}return l}mapViewport(e,t){let n=t.mapPos(e.from,-1),r=t.mapPos(e.to,1);return new Eh(this.heightMap.lineAt(n,It.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(r,It.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},n=0){if(!this.inView)return!0;let{top:r}=this.heightMap.lineAt(e,It.ByPos,this.heightOracle,0,0),{bottom:i}=this.heightMap.lineAt(t,It.ByPos,this.heightOracle,0,0),{visibleTop:a,visibleBottom:s}=this;return(e==0||r<=a-Math.max(10,Math.min(-n,250)))&&(t==this.state.doc.length||i>=s+Math.max(10,Math.min(n,250)))&&r>a-2*1e3&&i<s+2*1e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let n=[];for(let r of e)t.touchesRange(r.from,r.to)||n.push(new PO(t.mapPos(r.from),t.mapPos(r.to),r.size,r.displaySize));return n}ensureLineGaps(e,t){let n=this.heightOracle.lineWrapping,r=n?1e4:2e3,i=r>>1,a=r<<1;if(this.defaultTextDirection!=On.LTR&&!n)return[];let s=[],l=(d,f,m,p)=>{if(f-d<i)return;let O=this.state.selection.main,b=[O.from];O.empty||b.push(O.to);for(let w of b)if(w>d&&w<f){l(d,w-10,m,p),l(w+10,f,m,p);return}let x=H9(e,w=>w.from>=m.from&&w.to<=m.to&&Math.abs(w.from-d)<i&&Math.abs(w.to-f)<i&&!b.some(k=>w.from<k&&w.to>k));if(!x){if(f<m.to&&t&&n&&t.visibleRanges.some(T=>T.from<=f&&T.to>=f)){let T=t.moveToLineBoundary(Ae.cursor(f),!1,!0).head;T>d&&(f=T)}let w=this.gapSize(m,d,f,p),k=n||w<2e6?w:2e6;x=new PO(d,f,w,k)}s.push(x)},c=d=>{if(d.length<a||d.type!=mr.Text)return;let f=F9(d.from,d.to,this.stateDeco);if(f.total<a)return;let m=this.scrollTarget?this.scrollTarget.range.head:null,p,O;if(n){let b=r/this.heightOracle.lineLength*this.heightOracle.lineHeight,x,w;if(m!=null){let k=Qh(f,m),T=((this.visibleBottom-this.visibleTop)/2+b)/d.height;x=k-T,w=k+T}else x=(this.visibleTop-d.top-b)/d.height,w=(this.visibleBottom-d.top+b)/d.height;p=Ah(f,x),O=Ah(f,w)}else{let b=f.total*this.heightOracle.charWidth,x=r*this.heightOracle.charWidth,w=0;if(b>2e6)for(let Q of e)Q.from>=d.from&&Q.from<d.to&&Q.size!=Q.displaySize&&Q.from*this.heightOracle.charWidth+w<this.pixelViewport.left&&(w=Q.size-Q.displaySize);let k=this.pixelViewport.left+w,T=this.pixelViewport.right+w,j,E;if(m!=null){let Q=Qh(f,m),P=((T-k)/2+x)/b;j=Q-P,E=Q+P}else j=(k-x)/b,E=(T+x)/b;p=Ah(f,j),O=Ah(f,E)}p>d.from&&l(d.from,p,d,f),O<d.to&&l(O,d.to,d,f)};for(let d of this.viewportLines)Array.isArray(d.type)?d.type.forEach(c):c(d);return s}gapSize(e,t,n,r){let i=Qh(r,n)-Qh(r,t);return this.heightOracle.lineWrapping?e.height*i:r.total*this.heightOracle.charWidth*i}updateLineGaps(e){PO.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=qt.set(e.map(t=>t.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let n=[];Ft.spans(t,this.viewport.from,this.viewport.to,{span(i,a){n.push({from:i,to:a})},point(){}},20);let r=0;if(n.length!=this.visibleRanges.length)r=12;else for(let i=0;i<n.length&&!(r&8);i++){let a=this.visibleRanges[i],s=n[i];(a.from!=s.from||a.to!=s.to)&&(r|=4,e&&e.mapPos(a.from,-1)==s.from&&e.mapPos(a.to,1)==s.to||(r|=8))}return this.visibleRanges=n,r}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||ku(this.heightMap.lineAt(e,It.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||ku(this.heightMap.lineAt(this.scaler.fromDOM(e),It.ByHeight,this.heightOracle,0,0),this.scaler)}getScrollOffset(){return(this.scrollParent==this.view.scrollDOM?this.scrollParent.scrollTop:(this.scrollParent?this.scrollParent.getBoundingClientRect().top:0)-this.view.contentDOM.getBoundingClientRect().top)*this.scaleY}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return ku(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}},Eh=class{constructor(e,t){this.from=e,this.to=t}};function F9(e,t,n){let r=[],i=e,a=0;return Ft.spans(n,e,t,{span(){},point(s,l){s>i&&(r.push({from:i,to:s}),a+=s-i),i=l}},20),i<t&&(r.push({from:i,to:t}),a+=t-i),{total:a,ranges:r}}function Ah({total:e,ranges:t},n){if(n<=0)return t[0].from;if(n>=1)return t[t.length-1].to;let r=Math.floor(e*n);for(let i=0;;i++){let{from:a,to:s}=t[i],l=s-a;if(r<=l)return a+r;r-=l}}function Qh(e,t){let n=0;for(let{from:r,to:i}of e.ranges){if(t<=i){n+=t-r;break}n+=i-r}return n/e.total}function H9(e,t){for(let n of e)if(t(n))return n}var Dj={toDOM(e){return e},fromDOM(e){return e},scale:1,eq(e){return e==this}};function Lj(e){let t=e.facet(pp).filter(r=>typeof r!="function"),n=e.facet(Tx).filter(r=>typeof r!="function");return n.length&&t.push(Ft.join(n)),t}var G9=class TN{constructor(t,n,r){let i=0,a=0,s=0;this.viewports=r.map(({from:l,to:c})=>{let d=n.lineAt(l,It.ByPos,t,0,0).top,f=n.lineAt(c,It.ByPos,t,0,0).bottom;return i+=f-d,{from:l,to:c,top:d,bottom:f,domTop:0,domBottom:0}}),this.scale=(7e6-i)/(n.height-i);for(let l of this.viewports)l.domTop=s+(l.top-a)*this.scale,s=l.domBottom=l.domTop+(l.bottom-l.top),a=l.bottom}toDOM(t){for(let n=0,r=0,i=0;;n++){let a=n<this.viewports.length?this.viewports[n]:null;if(!a||t<a.top)return i+(t-r)*this.scale;if(t<=a.bottom)return a.domTop+(t-a.top);r=a.bottom,i=a.domBottom}}fromDOM(t){for(let n=0,r=0,i=0;;n++){let a=n<this.viewports.length?this.viewports[n]:null;if(!a||t<a.domTop)return r+(t-i)/this.scale;if(t<=a.domBottom)return a.top+(t-a.domTop);r=a.bottom,i=a.domBottom}}eq(t){return t instanceof TN?this.scale==t.scale&&this.viewports.length==t.viewports.length&&this.viewports.every((n,r)=>n.from==t.viewports[r].from&&n.to==t.viewports[r].to):!1}};function ku(e,t){if(t.scale==1)return e;let n=t.toDOM(e.top),r=t.toDOM(e.bottom);return new ja(e.from,e.length,n,r-n,Array.isArray(e._content)?e._content.map(i=>ku(i,t)):e._content)}var Ph=Ie.define({combine:e=>e.join(" ")}),Qy=Ie.define({combine:e=>e.indexOf(!0)>-1}),Py=Rs.newName(),CN=Rs.newName(),EN=Rs.newName(),AN={"&light":"."+CN,"&dark":"."+EN};function Ny(e,t,n){return new Rs(t,{finish(r){return/&/.test(r)?r.replace(/&\w*/,i=>{if(i=="&")return e;if(!n||!n[i])throw new RangeError(`Unsupported selector: ${i}`);return n[i]}):e+" "+r}})}var K9=Ny("."+Py,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-selectionHandle":{backgroundColor:"currentColor",width:"1.5px"},".cm-selectionHandle-start::before, .cm-selectionHandle-end::before":{content:'""',backgroundColor:"inherit",borderRadius:"50%",width:"8px",height:"8px",position:"absolute",left:"-3.25px"},".cm-selectionHandle-start::before":{top:"-8px"},".cm-selectionHandle-end::before":{bottom:"-8px"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},AN),J9={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},NO=_e.ie&&_e.ie_version<=11,e6=class{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new jB,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let n of t)this.queue.push(n);(_e.ie&&_e.ie_version<=11||_e.ios&&e.composing)&&t.some(n=>n.type=="childList"&&n.removedNodes.length||n.type=="characterData"&&n.oldValue.length>n.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&_e.android&&e.constructor.EDIT_CONTEXT!==!1&&!(_e.chrome&&_e.chrome_version<126)&&(this.editContext=new n6(e),e.state.facet(ka)&&(e.contentDOM.editContext=this.editContext.editContext)),NO&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var t;((t=this.view.docView)===null||t===void 0?void 0:t.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(t=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,n)=>t!=e[n]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:n}=this,r=this.selectionRange;if(n.state.facet(ka)?n.root.activeElement!=this.dom:!Iu(this.dom,r))return;let i=r.anchorNode&&n.docView.tile.nearest(r.anchorNode);if(i&&i.isWidget()&&i.widget.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(_e.ie&&_e.ie_version<=11||_e.android&&_e.chrome)&&!n.state.selection.main.empty&&r.focusNode&&qu(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=md(e.root);if(!t)return!1;let n=_e.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&t6(this.view,t)||t;if(!n||this.selectionRange.eq(n))return!1;let r=Iu(this.dom,n);return r&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&CB(this.dom,n)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(n),r&&(this.selectionChanged=!0),!0)}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let n=this.dom;n;)if(n.nodeType==1)!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==n?e++:t||(t=this.scrollTargets.slice(0,e)),t&&t.push(n),n=n.assignedSlot||n.parentNode;else if(n.nodeType==11)n=n.host;else break;if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let n of this.scrollTargets)n.removeEventListener("scroll",this.onScroll);for(let n of this.scrollTargets=t)n.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,J9),NO&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),NO&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){var n;if(!this.delayedAndroidKey){let r=()=>{let i=this.delayedAndroidKey;i&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=i.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&i.force&&Dl(this.dom,i.key,i.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(r)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!(!((n=this.delayedAndroidKey)===null||n===void 0)&&n.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,n=-1,r=!1;for(let i of e){let a=this.readMutation(i);a&&(a.typeOver&&(r=!0),t==-1?{from:t,to:n}=a:(t=Math.min(a.from,t),n=Math.max(a.to,n)))}return{from:t,to:n,typeOver:r}}readChange(){let{from:e,to:t,typeOver:n}=this.processRecords(),r=this.selectionChanged&&Iu(this.dom,this.selectionRange);if(e<0&&!r)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let i=new v9(this.view,e,t,n);return this.view.docView.domChanged={newSel:i.newSel?i.newSel.main:null},i}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let n=this.view.state,r=mN(this.view,t);return this.view.state==n&&(t.domChanged||t.newSel&&!Pm(this.view.state.selection,t.newSel.main))&&this.view.update([]),r}readMutation(e){let t=this.view.docView.tile.nearest(e.target);if(!t||t.isWidget())return null;if(t.markDirty(e.type=="attributes"),e.type=="childList"){let n=zj(t,e.previousSibling||e.target.previousSibling,-1),r=zj(t,e.nextSibling||e.target.nextSibling,1);return{from:n?t.posAfter(n):t.posAtStart,to:r?t.posBefore(r):t.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(ka)!=e.state.facet(ka)&&(e.view.contentDOM.editContext=e.state.facet(ka)?this.editContext.editContext:null))}destroy(){var e,t,n;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(t=this.gapIntersection)===null||t===void 0||t.disconnect(),(n=this.resizeScroll)===null||n===void 0||n.disconnect();for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}};function zj(e,t,n){for(;t;){let r=nn.get(t);if(r&&r.parent==e)return r;let i=t.parentNode;t=i!=e.dom?i:n>0?t.nextSibling:t.previousSibling}return null}function $j(e,t){let n=t.startContainer,r=t.startOffset,i=t.endContainer,a=t.endOffset,s=e.docView.domAtPos(e.state.selection.main.anchor,1);return qu(s.node,s.offset,i,a)&&([n,r,i,a]=[i,a,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:a}}function t6(e,t){if(t.getComposedRanges){let i=t.getComposedRanges(e.root)[0];if(i)return $j(e,i)}let n=null;function r(i){i.preventDefault(),i.stopImmediatePropagation(),n=i.getTargetRanges()[0]}return e.contentDOM.addEventListener("beforeinput",r,!0),e.dom.ownerDocument.execCommand("indent"),e.contentDOM.removeEventListener("beforeinput",r,!0),n?$j(e,n):null}var n6=class{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=n=>{let r=e.state.selection.main,{anchor:i,head:a}=r,s=this.toEditorPos(n.updateRangeStart),l=this.toEditorPos(n.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:n.updateRangeStart,editorBase:s,drifted:!1});let c=l-s>n.text.length;s==this.from&&i<this.from?s=i:l==this.to&&i>this.to&&(l=i);let d=pN(e.state.sliceDoc(s,l),n.text,(c?r.from:r.to)-s,c?"end":null);if(!d){let m=Ae.single(this.toEditorPos(n.selectionStart),this.toEditorPos(n.selectionEnd));Pm(m,r)||e.dispatch({selection:m,userEvent:"select"});return}let f={from:d.from+s,to:d.toA+s,insert:_t.of(n.text.slice(d.from,d.toB).split(`
|
|
58
|
-
`))};if((_e.mac||_e.android)&&f.from==a-1&&/^\. ?$/.test(n.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(f={from:s,to:l,insert:_t.of([n.text.replace("."," ")])}),this.pendingContextChange=f,!e.state.readOnly){let m=this.to-this.from+(f.to-f.from+f.insert.length);Cx(e,f,Ae.single(this.toEditorPos(n.selectionStart,m),this.toEditorPos(n.selectionEnd,m)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),f.from<f.to&&!f.insert.length&&e.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(t.text.slice(Math.max(0,n.updateRangeStart-1),Math.min(t.text.length,n.updateRangeStart+1)))&&this.handlers.compositionend(n)},this.handlers.characterboundsupdate=n=>{let r=[],i=null;for(let a=this.toEditorPos(n.rangeStart),s=this.toEditorPos(n.rangeEnd);a<s;a++){let l=e.coordsForChar(a);i=l&&new DOMRect(l.left,l.top,l.right-l.left,l.bottom-l.top)||i||new DOMRect,r.push(i)}t.updateCharacterBounds(n.rangeStart,r)},this.handlers.textformatupdate=n=>{let r=[];for(let i of n.getTextFormats()){let a=i.underlineStyle,s=i.underlineThickness;if(!/none/i.test(a)&&!/none/i.test(s)){let l=this.toEditorPos(i.rangeStart),c=this.toEditorPos(i.rangeEnd);if(l<c){let d=`text-decoration: underline ${/^[a-z]/.test(a)?a+" ":a=="Dashed"?"dashed ":a=="Squiggle"?"wavy ":""}${/thin/i.test(s)?1:2}px`;r.push(qt.mark({attributes:{style:d}}).range(l,c))}}}e.dispatch({effects:KP.of(qt.set(r))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:n}=this.composing;this.composing=null,n&&this.reset(e.state)}};for(let n in this.handlers)t.addEventListener(n,this.handlers[n]);this.measureReq={read:n=>{this.editContext.updateControlBounds(n.contentDOM.getBoundingClientRect());let r=md(n.root);r&&r.rangeCount&&this.editContext.updateSelectionBounds(r.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,n=!1,r=this.pendingContextChange;return e.changes.iterChanges((i,a,s,l,c)=>{if(n)return;let d=c.length-(a-i);if(r&&a>=r.to)if(r.from==i&&r.to==a&&r.insert.eq(c)){r=this.pendingContextChange=null,t+=d,this.to+=d;return}else r=null,this.revertPending(e.state);if(i+=t,a+=t,a<=this.from)this.from+=d,this.to+=d;else if(i<this.to){if(i<this.from||a>this.to||this.to-this.from+c.length>3e4){n=!0;return}this.editContext.updateText(this.toContextPos(i),this.toContextPos(a),c.toString()),this.to+=d}t+=d}),r&&!n&&this.revertPending(e.state),!n}update(e){let t=this.pendingContextChange,n=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(n.from,n.to)&&e.transactions.some(r=>!r.isUserEvent("input.type")&&r.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,n=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),r=this.toContextPos(t.head);(this.editContext.selectionStart!=n||this.editContext.selectionEnd!=r)&&this.editContext.updateSelection(n,r)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to<e.doc.length&&this.to-t<500||this.to-this.from>1e4*3)}toEditorPos(e,t=this.to-this.from){e=Math.min(e,t);let n=this.composing;return n&&n.drifted?n.editorBase+(e-n.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}},$e=class Ry{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(t={}){var n;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),t.parent&&t.parent.appendChild(this.dom);let{dispatch:r}=t;this.dispatchTransactions=t.dispatchTransactions||r&&(i=>i.forEach(a=>r(a,this)))||(i=>this.update(i)),this.dispatch=this.dispatch.bind(this),this._root=t.root||TB(t.parent)||document,this.viewState=new Mj(this,t.state||Gt.create(t)),t.scrollTo&&t.scrollTo.is(jh)&&(this.viewState.scrollTarget=t.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Al).map(i=>new TO(i));for(let i of this.plugins)i.update(this);this.observer=new e6(this),this.inputState=new x9(this),this.inputState.ensureHandlers(this.plugins),this.docView=new Sj(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((n=document.fonts)===null||n===void 0)&&n.ready&&document.fonts.ready.then(()=>{this.viewState.mustMeasureContent="refresh",this.requestMeasure()})}dispatch(...t){let n=t.length==1&&t[0]instanceof si?t:t.length==1&&Array.isArray(t[0])?t[0]:[this.state.update(...t)];this.dispatchTransactions(n,this)}update(t){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!1,r=!1,i,a=this.state;for(let p of t){if(p.startState!=a)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");a=p.state}if(this.destroyed){this.viewState.state=a;return}let s=this.hasFocus,l=0,c=null;t.some(p=>p.annotation(xN))?(this.inputState.notifiedFocused=s,l=1):s!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=s,c=SN(a,s),c||(l=1));let d=this.observer.delayedAndroidKey,f=null;if(d?(this.observer.clearDelayedAndroidKey(),f=this.observer.readChange(),(f&&!this.state.doc.eq(a.doc)||!this.state.selection.eq(a.selection))&&(f=null)):this.observer.clear(),a.facet(Gt.phrases)!=this.state.facet(Gt.phrases))return this.setState(a);i=bj.create(this,a,t),i.flags|=l;let m=this.viewState.scrollTarget;try{this.updateState=2;for(let p of t){if(m&&(m=m.map(p.changes)),p.scrollIntoView){let{main:O}=p.state.selection;m=new jO(O.empty?O:Ae.cursor(O.head,O.head>O.anchor?-1:1))}for(let O of p.effects)O.is(jh)&&(m=O.value.clip(this.state))}this.viewState.update(i,m),this.bidiCache=qj.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),n=this.docView.update(i),this.state.facet(wu)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(t),this.docView.updateSelection(n,t.some(p=>p.isUserEvent("select.pointer")))}finally{this.updateState=0}if(i.startState.facet(Ph)!=i.state.facet(Ph)&&(this.viewState.mustMeasureContent=!0),(n||r||m||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!i.empty)for(let p of this.state.facet(wy))try{p(i)}catch(O){Fi(this.state,O,"update listener")}(c||f)&&Promise.resolve().then(()=>{c&&this.state==c.startState&&this.dispatch(c),f&&!mN(this,f)&&d.force&&Dl(this.contentDOM,d.key,d.keyCode)})}setState(t){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=t;return}this.updateState=2;let n=this.hasFocus;try{for(let r of this.plugins)r.destroy(this);this.viewState=new Mj(this,t),this.plugins=t.facet(Al).map(r=>new TO(r)),this.pluginMap.clear();for(let r of this.plugins)r.update(this);this.docView.destroy(),this.docView=new Sj(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(t){let n=t.startState.facet(Al),r=t.state.facet(Al);if(n!=r){let i=[];for(let a of r){let s=n.indexOf(a);if(s<0)i.push(new TO(a));else{let l=this.plugins[s];l.mustUpdate=t,i.push(l)}}for(let a of this.plugins)a.mustUpdate!=t&&a.destroy(this);this.plugins=i,this.pluginMap.clear()}else for(let i of this.plugins)i.mustUpdate=t;for(let i=0;i<this.plugins.length;i++)this.plugins[i].update(this);n!=r&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let t of this.plugins){let n=t.value;if(n&&n.docViewUpdate)try{n.docViewUpdate(this)}catch(r){Fi(this.state,r,"doc view update listener")}}}measure(t=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,t&&this.observer.forceFlush();let n=null,r=this.viewState.scrollParent,i=this.viewState.getScrollOffset(),{scrollAnchorPos:a,scrollAnchorHeight:s}=this.viewState;Math.abs(i-this.viewState.scrollOffset)>1&&(s=-1),this.viewState.scrollAnchorHeight=-1;try{for(let l=0;;l++){if(s<0)if(DP(r||this.win))a=-1,s=this.viewState.heightMap.height;else{let O=this.viewState.scrollAnchorAt(i);a=O.from,s=O.top}this.updateState=1;let c=this.viewState.measure();if(!c&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(l>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let d=[];c&4||([this.measureRequests,d]=[d,this.measureRequests]);let f=d.map(O=>{try{return O.read(this)}catch(b){return Fi(this.state,b),Ij}}),m=bj.create(this,this.state,[]),p=!1;m.flags|=c,n?n.flags|=c:n=m,this.updateState=2,m.empty||(this.updatePlugins(m),this.inputState.update(m),this.updateAttrs(),p=this.docView.update(m),p&&this.docViewUpdate());for(let O=0;O<d.length;O++)if(f[O]!=Ij)try{let b=d[O];b.write&&b.write(f[O],this)}catch(b){Fi(this.state,b)}if(p&&this.docView.updateSelection(!0),!m.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,s=-1;continue}else{let b=((a<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(a).top)-s)/this.scaleY;if((b>1||b<-1)&&(r==this.scrollDOM||this.hasFocus||Math.max(this.inputState.lastWheelEvent,this.inputState.lastTouchTime)>Date.now()-100)){i=i+b,r?r.scrollTop+=b:this.win.scrollBy(0,b),s=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let l of this.state.facet(wy))l(n)}get themeClasses(){return Py+" "+(this.state.facet(Qy)?EN:CN)+" "+this.state.facet(Ph)}updateAttrs(){let t=Xj(this,JP,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(ka)?"true":"false",class:"cm-content",style:`${_e.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),Xj(this,jx,n);let r=this.observer.ignore(()=>{let i=mj(this.contentDOM,this.contentAttrs,n),a=mj(this.dom,this.editorAttrs,t);return i||a});return this.editorAttrs=t,this.contentAttrs=n,r}showAnnouncements(t){let n=!0;for(let r of t)for(let i of r.effects)if(i.is(Ry.announce)){n&&(this.announceDOM.textContent=""),n=!1;let a=this.announceDOM.appendChild(document.createElement("div"));a.textContent=i.value}}mountStyles(){this.styleModules=this.state.facet(wu);let t=this.state.facet(Ry.cspNonce);Rs.mount(this.root,this.styleModules.concat(K9).reverse(),t?{nonce:t}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(t){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),t){if(this.measureRequests.indexOf(t)>-1)return;if(t.key!=null){for(let n=0;n<this.measureRequests.length;n++)if(this.measureRequests[n].key===t.key){this.measureRequests[n]=t;return}}this.measureRequests.push(t)}}plugin(t){let n=this.pluginMap.get(t);return(n===void 0||n&&n.plugin!=t)&&this.pluginMap.set(t,n=this.plugins.find(r=>r.plugin==t)||null),n&&n.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(t){return this.readMeasured(),this.viewState.elementAtHeight(t)}lineBlockAtHeight(t){return this.readMeasured(),this.viewState.lineBlockAtHeight(t)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(t){return this.viewState.lineBlockAt(t)}get contentHeight(){return this.viewState.contentHeight}moveByChar(t,n,r){return QO(this,t,wj(this,t,n,r))}moveByGroup(t,n){return QO(this,t,wj(this,t,n,r=>d9(this,t.head,r)))}visualLineSide(t,n){let r=this.bidiSpans(t),i=this.textDirectionAt(t.from),a=r[n?r.length-1:0];return Ae.cursor(a.side(n,i)+t.from,a.forward(!n,i)?1:-1)}moveToLineBoundary(t,n,r=!0){return u9(this,t,n,r)}moveVertically(t,n,r){return QO(this,t,f9(this,t,n,r))}domAtPos(t,n=1){return this.docView.domAtPos(t,n)}posAtDOM(t,n=0){return this.docView.posFromDOM(t,n)}posAtCoords(t,n=!0){this.readMeasured();let r=Cy(this,t,n);return r&&r.pos}posAndSideAtCoords(t,n=!0){return this.readMeasured(),Cy(this,t,n)}coordsAtPos(t,n=1){this.readMeasured();let r=this.docView.coordsAt(t,n);if(!r||r.left==r.right)return r;let i=this.state.doc.lineAt(t),a=this.bidiSpans(i),s=a[Wi.find(a,t-i.from,-1,n)];return Cm(r,s.dir==On.LTR==n>0)}coordsForChar(t){return this.readMeasured(),this.docView.coordsForChar(t)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(t){return!this.state.facet(HP)||t<this.viewport.from||t>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(t))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(t){if(t.length>r6)return XP(t.length);let n=this.textDirectionAt(t.from),r;for(let a of this.bidiCache)if(a.from==t.from&&a.dir==n&&(a.fresh||qP(a.isolates,r=Oj(this,t))))return a.order;r||(r=Oj(this,t));let i=MB(t.text,n,r);return this.bidiCache.push(new qj(t.from,t.to,n,r,!0,i)),i}get hasFocus(){var t;return(this.dom.ownerDocument.hasFocus()||_e.safari&&((t=this.inputState)===null||t===void 0?void 0:t.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{MP(this.contentDOM),this.docView.updateSelection()})}setRoot(t){this._root!=t&&(this._root=t,this.observer.setWindow((t.nodeType==9?t:t.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let t of this.plugins)t.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(t,n={}){return jh.of(new jO(typeof t=="number"?Ae.cursor(t):t,n.y,n.x,n.yMargin,n.xMargin))}scrollSnapshot(){let{scrollTop:t,scrollLeft:n}=this.scrollDOM,r=this.viewState.scrollAnchorAt(t);return jh.of(new jO(Ae.cursor(r.from),"start","start",r.top-t,n,!0))}setTabFocusMode(t){t==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof t=="boolean"?this.inputState.tabFocusMode=t?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+t)}static domEventHandlers(t){return gd.define(()=>({}),{eventHandlers:t})}static domEventObservers(t){return gd.define(()=>({}),{eventObservers:t})}static theme(t,n){let r=Rs.newName(),i=[Ph.of(r),wu.of(Ny(`.${r}`,t))];return n&&n.dark&&i.push(Qy.of(!0)),i}static baseTheme(t){return $d.lowest(wu.of(Ny("."+Py,t,AN)))}static findFromDOM(t){var n;let r=t.querySelector(".cm-content"),i=r&&nn.get(r)||nn.get(t);return((n=i==null?void 0:i.root)===null||n===void 0?void 0:n.view)||null}};$e.styleModule=wu;$e.inputHandler=WP;$e.clipboardInputFilter=_x;$e.clipboardOutputFilter=kx;$e.scrollHandler=GP;$e.focusChangeEffect=FP;$e.perLineTextDirection=HP;$e.exceptionSink=YP;$e.updateListener=wy;$e.editable=ka;$e.mouseSelectionStyle=UP;$e.dragMovesSelection=VP;$e.clickAddsSelectionRange=BP;$e.decorations=pp;$e.blockWrappers=eN;$e.outerDecorations=Tx;$e.atomicRanges=Id;$e.bidiIsolatedRanges=tN;$e.scrollMargins=nN;$e.darkTheme=Qy;$e.cspNonce=Ie.define({combine:e=>e.length?e[0]:""});$e.contentAttributes=jx;$e.editorAttributes=JP;$e.lineWrapping=$e.contentAttributes.of({class:"cm-lineWrapping"});$e.announce=tn.define();var r6=4096,Ij={},qj=class QN{constructor(t,n,r,i,a,s){this.from=t,this.to=n,this.dir=r,this.isolates=i,this.fresh=a,this.order=s}static update(t,n){if(n.empty&&!t.some(a=>a.fresh))return t;let r=[],i=t.length?t[t.length-1].dir:On.LTR;for(let a=Math.max(0,t.length-10);a<t.length;a++){let s=t[a];s.dir==i&&!n.touchesRange(s.from,s.to)&&r.push(new QN(n.mapPos(s.from,1),n.mapPos(s.to,-1),s.dir,s.isolates,!1,s.order))}return r}};function Xj(e,t,n){for(let r=e.state.facet(t),i=r.length-1;i>=0;i--){let a=r[i],s=typeof a=="function"?a(e):a;s&&bx(s,n)}return n}var i6=_e.mac?"mac":_e.windows?"win":_e.linux?"linux":"key";function a6(e,t){const n=e.split(/-(?!$)/);let r=n[n.length-1];r=="Space"&&(r=" ");let i,a,s,l;for(let c=0;c<n.length-1;++c){const d=n[c];if(/^(cmd|meta|m)$/i.test(d))l=!0;else if(/^a(lt)?$/i.test(d))i=!0;else if(/^(c|ctrl|control)$/i.test(d))a=!0;else if(/^s(hift)?$/i.test(d))s=!0;else if(/^mod$/i.test(d))t=="mac"?l=!0:a=!0;else throw new Error("Unrecognized modifier name: "+d)}return i&&(r="Alt-"+r),a&&(r="Ctrl-"+r),l&&(r="Meta-"+r),s&&(r="Shift-"+r),r}function Nh(e,t,n){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),n!==!1&&t.shiftKey&&(e="Shift-"+e),e}var s6=$d.default($e.domEventHandlers({keydown(e,t){return u6(o6(t.state),e,t,"editor")}})),Ex=Ie.define({enables:s6}),Zj=new WeakMap;function o6(e){let t=e.facet(Ex),n=Zj.get(t);return n||Zj.set(t,n=c6(t.reduce((r,i)=>r.concat(i),[]))),n}var xs=null,l6=4e3;function c6(e,t=i6){let n=Object.create(null),r=Object.create(null),i=(s,l)=>{let c=r[s];if(c==null)r[s]=l;else if(c!=l)throw new Error("Key binding "+s+" is used both as a regular binding and as a multi-stroke prefix")},a=(s,l,c,d,f)=>{var m,p;let O=n[s]||(n[s]=Object.create(null)),b=l.split(/ (?!$)/).map(k=>a6(k,t));for(let k=1;k<b.length;k++){let T=b.slice(0,k).join(" ");i(T,!0),O[T]||(O[T]={preventDefault:!0,stopPropagation:!1,run:[j=>{let E=xs={view:j,prefix:T,scope:s};return setTimeout(()=>{xs==E&&(xs=null)},l6),!0}]})}let x=b.join(" ");i(x,!1);let w=O[x]||(O[x]={preventDefault:!1,stopPropagation:!1,run:((p=(m=O._any)===null||m===void 0?void 0:m.run)===null||p===void 0?void 0:p.slice())||[]});c&&w.run.push(c),d&&(w.preventDefault=!0),f&&(w.stopPropagation=!0)};for(let s of e){let l=s.scope?s.scope.split(" "):["editor"];if(s.any)for(let d of l){let f=n[d]||(n[d]=Object.create(null));f._any||(f._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:m}=s;for(let p in f)f[p].run.push(O=>m(O,My))}let c=s[t]||s.key;if(c)for(let d of l)a(d,c,s.run,s.preventDefault,s.stopPropagation),s.shift&&a(d,"Shift-"+c,s.shift,s.preventDefault,s.stopPropagation)}return n}var My=null;function u6(e,t,n,r){My=t;let i=bB(t),a=JZ(i,0),s=eB(a)==i.length&&i!=" ",l="",c=!1,d=!1,f=!1;xs&&xs.view==n&&xs.scope==r&&(l=xs.prefix+" ",vN.indexOf(t.keyCode)<0&&(d=!0,xs=null));let m=new Set,p=w=>{if(w){for(let k of w.run)if(!m.has(k)&&(m.add(k),k(n)))return w.stopPropagation&&(f=!0),!0;w.preventDefault&&(w.stopPropagation&&(f=!0),d=!0)}return!1},O=e[r],b,x;return O&&(p(O[l+Nh(i,t,!s)])?c=!0:s&&(t.altKey||t.metaKey||t.ctrlKey)&&!(_e.windows&&t.ctrlKey&&t.altKey)&&!(_e.mac&&t.altKey&&!(t.ctrlKey||t.metaKey))&&(b=Ms[t.keyCode])&&b!=i?(p(O[l+Nh(b,t,!0)])||t.shiftKey&&(x=fd[t.keyCode])!=i&&x!=b&&p(O[l+Nh(x,t,!1)]))&&(c=!0):s&&t.shiftKey&&p(O[l+Nh(i,t,!0)])&&(c=!0),!c&&p(O._any)&&(c=!0)),d&&(c=!0),c&&f&&t.stopPropagation(),My=null,c}var Po=class extends Ns{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}};Po.prototype.elementClass="";Po.prototype.toDOM=void 0;Po.prototype.mapMode=Gn.TrackBefore;Po.prototype.startSide=Po.prototype.endSide=-1;Po.prototype.point=!0;var RO=Ie.define(),d6=Ie.define(),um=Ie.define(),Bj=Ie.define({combine:e=>e.some(t=>t)});function f6(e){return[h6]}var h6=gd.fromClass(class{constructor(e){this.view=e,this.domAfter=null,this.prevViewport=e.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters cm-gutters-before",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=e.state.facet(um).map(t=>new Uj(e,t)),this.fixed=!e.state.facet(Bj);for(let t of this.gutters)t.config.side=="after"?this.getDOMAfter().appendChild(t.dom):this.dom.appendChild(t.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),e.scrollDOM.insertBefore(this.dom,e.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement("div"),this.domAfter.className="cm-gutters cm-gutters-after",this.domAfter.setAttribute("aria-hidden","true"),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.domAfter.style.position=this.fixed?"sticky":"",this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(e){if(this.updateGutters(e)){let t=this.prevViewport,n=e.view.viewport,r=Math.min(t.to,n.to)-Math.max(t.from,n.from);this.syncGutters(r<(n.to-n.from)*.8)}if(e.geometryChanged){let t=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=t,this.domAfter&&(this.domAfter.style.minHeight=t)}this.view.state.facet(Bj)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=e.view.viewport}syncGutters(e){let t=this.dom.nextSibling;e&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let n=Ft.iter(this.view.state.facet(RO),this.view.viewport.from),r=[],i=this.gutters.map(a=>new m6(a,this.view.viewport,-this.view.documentPadding.top));for(let a of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(a.type)){let s=!0;for(let l of a.type)if(l.type==mr.Text&&s){Dy(n,r,l.from);for(let c of i)c.line(this.view,l,r);s=!1}else if(l.widget)for(let c of i)c.widget(this.view,l)}else if(a.type==mr.Text){Dy(n,r,a.from);for(let s of i)s.line(this.view,a,r)}else if(a.widget)for(let s of i)s.widget(this.view,a);for(let a of i)a.finish();e&&(this.view.scrollDOM.insertBefore(this.dom,t),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(e){let t=e.startState.facet(um),n=e.state.facet(um),r=e.docChanged||e.heightChanged||e.viewportChanged||!Ft.eq(e.startState.facet(RO),e.state.facet(RO),e.view.viewport.from,e.view.viewport.to);if(t==n)for(let i of this.gutters)i.update(e)&&(r=!0);else{r=!0;let i=[];for(let a of n){let s=t.indexOf(a);s<0?i.push(new Uj(this.view,a)):(this.gutters[s].update(e),i.push(this.gutters[s]))}for(let a of this.gutters)a.dom.remove(),i.indexOf(a)<0&&a.destroy();for(let a of i)a.config.side=="after"?this.getDOMAfter().appendChild(a.dom):this.dom.appendChild(a.dom);this.gutters=i}return r}destroy(){for(let e of this.gutters)e.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:e=>$e.scrollMargins.of(t=>{let n=t.plugin(e);if(!n||n.gutters.length==0||!n.fixed)return null;let r=n.dom.offsetWidth*t.scaleX,i=n.domAfter?n.domAfter.offsetWidth*t.scaleX:0;return t.textDirection==On.LTR?{left:r,right:i}:{right:r,left:i}})});function Vj(e){return Array.isArray(e)?e:[e]}function Dy(e,t,n){for(;e.value&&e.from<=n;)e.from==n&&t.push(e.value),e.next()}var m6=class{constructor(e,t,n){this.gutter=e,this.height=n,this.i=0,this.cursor=Ft.iter(e.markers,t.from)}addElement(e,t,n){let{gutter:r}=this,i=(t.top-this.height)/e.scaleY,a=t.height/e.scaleY;if(this.i==r.elements.length){let s=new PN(e,a,i,n);r.elements.push(s),r.dom.appendChild(s.dom)}else r.elements[this.i].update(e,a,i,n);this.height=t.bottom,this.i++}line(e,t,n){let r=[];Dy(this.cursor,r,t.from),n.length&&(r=r.concat(n));let i=this.gutter.config.lineMarker(e,t,r);i&&r.unshift(i);let a=this.gutter;r.length==0&&!a.config.renderEmptyElements||this.addElement(e,t,r)}widget(e,t){let n=this.gutter.config.widgetMarker(e,t.widget,t),r=n?[n]:null;for(let i of e.state.facet(d6)){let a=i(e,t.widget,t);a&&(r||(r=[])).push(a)}r&&this.addElement(e,t,r)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}},Uj=class{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let n in t.domEventHandlers)this.dom.addEventListener(n,r=>{let i=r.target,a;if(i!=this.dom&&this.dom.contains(i)){for(;i.parentNode!=this.dom;)i=i.parentNode;let l=i.getBoundingClientRect();a=(l.top+l.bottom)/2}else a=r.clientY;let s=e.lineBlockAtHeight(a-e.documentTop);t.domEventHandlers[n](e,s,r)&&r.preventDefault()});this.markers=Vj(t.markers(e)),t.initialSpacer&&(this.spacer=new PN(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=Vj(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let r=this.config.updateSpacer(this.spacer.markers[0],e);r!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[r])}let n=e.view.viewport;return!Ft.eq(this.markers,t,n.from,n.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}},PN=class{constructor(e,t,n,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,n,r)}update(e,t,n,r){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=n&&(this.dom.style.marginTop=(this.above=n)?n+"px":""),p6(this.markers,r)||this.setMarkers(e,r)}setMarkers(e,t){let n="cm-gutterElement",r=this.dom.firstChild;for(let i=0,a=0;;){let s=a,l=i<t.length?t[i++]:null,c=!1;if(l){let d=l.elementClass;d&&(n+=" "+d);for(let f=a;f<this.markers.length;f++)if(this.markers[f].compare(l)){s=f,c=!0;break}}else s=this.markers.length;for(;a<s;){let d=this.markers[a++];if(d.toDOM){d.destroy(r);let f=r.nextSibling;r.remove(),r=f}}if(!l)break;l.toDOM&&(c?r=r.nextSibling:this.dom.insertBefore(l.toDOM(e),r)),c&&a++}this.dom.className=n,this.markers=t}destroy(){this.setMarkers(null,[])}};function p6(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].compare(t[n]))return!1;return!0}var g6=Ie.define(),v6=Ie.define(),Ql=Ie.define({combine(e){return fB(e,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(t,n){let r=Object.assign({},t);for(let i in n){let a=r[i],s=n[i];r[i]=a?(l,c,d)=>a(l,c,d)||s(l,c,d):s}return r}})}}),MO=class extends Po{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}};function DO(e,t){return e.state.facet(Ql).formatNumber(t,e.state)}var O6=um.compute([Ql],e=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(t){return t.state.facet(g6)},lineMarker(t,n,r){return r.some(i=>i.toDOM)?null:new MO(DO(t,t.state.doc.lineAt(n.from).number))},widgetMarker:(t,n,r)=>{for(let i of t.state.facet(v6)){let a=i(t,n,r);if(a)return a}return null},lineMarkerChange:t=>t.startState.facet(Ql)!=t.state.facet(Ql),initialSpacer(t){return new MO(DO(t,Yj(t.state.doc.lines)))},updateSpacer(t,n){let r=DO(n.view,Yj(n.view.state.doc.lines));return r==t.number?t:new MO(r)},domEventHandlers:e.facet(Ql).domEventHandlers,side:"before"}));function Rm(e={}){return[Ql.of(e),f6(),O6]}function Yj(e){let t=9;for(;t<e;)t=t*10+9;return t}var NN=1024,b6=0,ii=class{constructor(e,t){this.from=e,this.to=t}},Ge=class{constructor(e={}){this.id=b6++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")}),this.combine=e.combine||null}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=Dn.match(e)),t=>{let n=e(t);return n===void 0?null:[this,n]}}};Ge.closedBy=new Ge({deserialize:e=>e.split(" ")});Ge.openedBy=new Ge({deserialize:e=>e.split(" ")});Ge.group=new Ge({deserialize:e=>e.split(" ")});Ge.isolate=new Ge({deserialize:e=>{if(e&&e!="rtl"&&e!="ltr"&&e!="auto")throw new RangeError("Invalid value for isolate: "+e);return e||"auto"}});Ge.contextHash=new Ge({perNode:!0});Ge.lookAhead=new Ge({perNode:!0});Ge.mounted=new Ge({perNode:!0});var zl=class{constructor(e,t,n,r=!1){this.tree=e,this.overlay=t,this.parser=n,this.bracketed=r}static get(e){return e&&e.props&&e.props[Ge.mounted.id]}},y6=Object.create(null),Dn=class RN{constructor(t,n,r,i=0){this.name=t,this.props=n,this.id=r,this.flags=i}static define(t){let n=t.props&&t.props.length?Object.create(null):y6,r=(t.top?1:0)|(t.skipped?2:0)|(t.error?4:0)|(t.name==null?8:0),i=new RN(t.name||"",n,t.id,r);if(t.props){for(let a of t.props)if(Array.isArray(a)||(a=a(i)),a){if(a[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[a[0].id]=a[1]}}return i}prop(t){return this.props[t.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(t){if(typeof t=="string"){if(this.name==t)return!0;let n=this.prop(Ge.group);return n?n.indexOf(t)>-1:!1}return this.id==t}static match(t){let n=Object.create(null);for(let r in t)for(let i of r.split(" "))n[i]=t[r];return r=>{for(let i=r.prop(Ge.group),a=-1;a<(i?i.length:0);a++){let s=n[a<0?r.name:i[a]];if(s)return s}}}};Dn.none=new Dn("",Object.create(null),0,8);var Ax=class MN{constructor(t){this.types=t;for(let n=0;n<t.length;n++)if(t[n].id!=n)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...t){let n=[];for(let r of this.types){let i=null;for(let a of t){let s=a(r);if(s){i||(i=Object.assign({},r.props));let l=s[1],c=s[0];c.combine&&c.id in i&&(l=c.combine(i[c.id],l)),i[c.id]=l}}n.push(i?new Dn(r.name,i,r.id,r.flags):r)}return new MN(n)}},Rh=new WeakMap,Wj=new WeakMap,wt;(function(e){e[e.ExcludeBuffers=1]="ExcludeBuffers",e[e.IncludeAnonymous=2]="IncludeAnonymous",e[e.IgnoreMounts=4]="IgnoreMounts",e[e.IgnoreOverlays=8]="IgnoreOverlays",e[e.EnterBracketed=16]="EnterBracketed"})(wt||(wt={}));var At=class Ly{constructor(t,n,r,i,a){if(this.type=t,this.children=n,this.positions=r,this.length=i,this.props=null,a&&a.length){this.props=Object.create(null);for(let[s,l]of a)this.props[typeof s=="number"?s:s.id]=l}}toString(){let t=zl.get(this);if(t&&!t.overlay)return t.tree.toString();let n="";for(let r of this.children){let i=r.toString();i&&(n&&(n+=","),n+=i)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(n.length?"("+n+")":""):n}cursor(t=0){return new Mm(this.topNode,t)}cursorAt(t,n=0,r=0){let i=Rh.get(this)||this.topNode,a=new Mm(i);return a.moveTo(t,n),Rh.set(this,a._tree),a}get topNode(){return new ci(this,0,0,null)}resolve(t,n=0){let r=Od(Rh.get(this)||this.topNode,t,n,!1);return Rh.set(this,r),r}resolveInner(t,n=0){let r=Od(Wj.get(this)||this.topNode,t,n,!0);return Wj.set(this,r),r}resolveStack(t,n=0){return _6(this,t,n)}iterate(t){let{enter:n,leave:r,from:i=0,to:a=this.length}=t,s=t.mode||0,l=(s&wt.IncludeAnonymous)>0;for(let c=this.cursor(s|wt.IncludeAnonymous);;){let d=!1;if(c.from<=a&&c.to>=i&&(!l&&c.type.isAnonymous||n(c)!==!1)){if(c.firstChild())continue;d=!0}for(;d&&r&&(l||!c.type.isAnonymous)&&r(c),!c.nextSibling();){if(!c.parent())return;d=!0}}}prop(t){return t.perNode?this.props?this.props[t.id]:void 0:this.type.prop(t)}get propValues(){let t=[];if(this.props)for(let n in this.props)t.push([+n,this.props[n]]);return t}balance(t={}){return this.children.length<=8?this:Px(Dn.none,this.children,this.positions,0,this.children.length,0,this.length,(n,r,i)=>new Ly(this.type,n,r,i,this.propValues),t.makeTree||((n,r,i)=>new Ly(Dn.none,n,r,i)))}static build(t){return k6(t)}};At.empty=new At(Dn.none,[],[],0);var x6=class DN{constructor(t,n){this.buffer=t,this.index=n}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new DN(this.buffer,this.index)}},Kl=class LN{constructor(t,n,r){this.buffer=t,this.length=n,this.set=r}get type(){return Dn.none}toString(){let t=[];for(let n=0;n<this.buffer.length;)t.push(this.childString(n)),n=this.buffer[n+3];return t.join(",")}childString(t){let n=this.buffer[t],r=this.buffer[t+3],i=this.set.types[n],a=i.name;if(/\W/.test(a)&&!i.isError&&(a=JSON.stringify(a)),t+=4,r==t)return a;let s=[];for(;t<r;)s.push(this.childString(t)),t=this.buffer[t+3];return a+"("+s.join(",")+")"}findChild(t,n,r,i,a){let{buffer:s}=this,l=-1;for(let c=t;c!=n&&!(zN(a,i,s[c+1],s[c+2])&&(l=c,r>0));c=s[c+3]);return l}slice(t,n,r){let i=this.buffer,a=new Uint16Array(n-t),s=0;for(let l=t,c=0;l<n;){a[c++]=i[l++],a[c++]=i[l++]-r;let d=a[c++]=i[l++]-r;a[c++]=i[l++]-t,s=Math.max(s,d)}return new LN(a,s,this.set)}};function zN(e,t,n,r){switch(e){case-2:return n<t;case-1:return r>=t&&n<t;case 0:return n<t&&r>t;case 1:return n<=t&&r>t;case 2:return r>t;case 4:return!0}}function Od(e,t,n,r){for(var i;e.from==e.to||(n<1?e.from>=t:e.from>t)||(n>-1?e.to<=t:e.to<t);){let s=!r&&e instanceof ci&&e.index<0?null:e.parent;if(!s)return e;e=s}let a=r?0:wt.IgnoreOverlays;if(r)for(let s=e,l=s.parent;l;s=l,l=s.parent)s instanceof ci&&s.index<0&&((i=l.enter(t,n,a))===null||i===void 0?void 0:i.from)!=s.from&&(e=l);for(;;){let s=e.enter(t,n,a);if(!s)return e;e=s}}var $N=class{cursor(e=0){return new Mm(this,e)}getChild(e,t=null,n=null){let r=Fj(this,e,t,n);return r.length?r[0]:null}getChildren(e,t=null,n=null){return Fj(this,e,t,n)}resolve(e,t=0){return Od(this,e,t,!1)}resolveInner(e,t=0){return Od(this,e,t,!0)}matchContext(e){return zy(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),n=this;for(;t;){let r=t.lastChild;if(!r||r.to!=t.to)break;r.type.isError&&r.from==r.to?(n=t,t=r.prevSibling):t=r}return n}get node(){return this}get next(){return this.parent}},ci=class dm extends $N{constructor(t,n,r,i){super(),this._tree=t,this.from=n,this.index=r,this._parent=i}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(t,n,r,i,a=0){for(let s=this;;){for(let{children:l,positions:c}=s._tree,d=n>0?l.length:-1;t!=d;t+=n){let f=l[t],m=c[t]+s.from,p;if(!(!(a&wt.EnterBracketed&&f instanceof At&&(p=zl.get(f))&&!p.overlay&&p.bracketed&&r>=m&&r<=m+f.length)&&!zN(i,r,m,m+f.length))){if(f instanceof Kl){if(a&wt.ExcludeBuffers)continue;let O=f.findChild(0,f.buffer.length,n,r-m,i);if(O>-1)return new bd(new S6(s,f,t,m),null,O)}else if(a&wt.IncludeAnonymous||!f.type.isAnonymous||Qx(f)){let O;if(!(a&wt.IgnoreMounts)&&(O=zl.get(f))&&!O.overlay)return new dm(O.tree,m,t,s);let b=new dm(f,m,t,s);return a&wt.IncludeAnonymous||!b.type.isAnonymous?b:b.nextChild(n<0?f.children.length-1:0,n,r,i,a)}}}if(a&wt.IncludeAnonymous||!s.type.isAnonymous||(s.index>=0?t=s.index+n:t=n<0?-1:s._parent._tree.children.length,s=s._parent,!s))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(t){return this.nextChild(0,1,t,2)}childBefore(t){return this.nextChild(this._tree.children.length-1,-1,t,-2)}prop(t){return this._tree.prop(t)}enter(t,n,r=0){let i;if(!(r&wt.IgnoreOverlays)&&(i=zl.get(this._tree))&&i.overlay){let a=t-this.from,s=r&wt.EnterBracketed&&i.bracketed;for(let{from:l,to:c}of i.overlay)if((n>0||s?l<=a:l<a)&&(n<0||s?c>=a:c>a))return new dm(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,t,n,r)}nextSignificantParent(){let t=this;for(;t.type.isAnonymous&&t._parent;)t=t._parent;return t}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}};function Fj(e,t,n,r){let i=e.cursor(),a=[];if(!i.firstChild())return a;if(n!=null){for(let s=!1;!s;)if(s=i.type.is(n),!i.nextSibling())return a}for(;;){if(r!=null&&i.type.is(r))return a;if(i.type.is(t)&&a.push(i.node),!i.nextSibling())return r==null?a:[]}}function zy(e,t,n=t.length-1){for(let r=e;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(t[n]&&t[n]!=r.name)return!1;n--}}return!0}var S6=class{constructor(e,t,n,r){this.parent=e,this.buffer=t,this.index=n,this.start=r}},bd=class ju extends $N{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(t,n,r){super(),this.context=t,this._parent=n,this.index=r,this.type=t.buffer.set.types[t.buffer.buffer[r]]}child(t,n,r){let{buffer:i}=this.context,a=i.findChild(this.index+4,i.buffer[this.index+3],t,n-this.context.start,r);return a<0?null:new ju(this.context,this,a)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(t){return this.child(1,t,2)}childBefore(t){return this.child(-1,t,-2)}prop(t){return this.type.prop(t)}enter(t,n,r=0){if(r&wt.ExcludeBuffers)return null;let{buffer:i}=this.context,a=i.findChild(this.index+4,i.buffer[this.index+3],n>0?1:-1,t-this.context.start,n);return a<0?null:new ju(this.context,this,a)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(t){return this._parent?null:this.context.parent.nextChild(this.context.index+t,t,0,4)}get nextSibling(){let{buffer:t}=this.context,n=t.buffer[this.index+3];return n<(this._parent?t.buffer[this._parent.index+3]:t.buffer.length)?new ju(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:t}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new ju(this.context,this._parent,t.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let t=[],n=[],{buffer:r}=this.context,i=this.index+4,a=r.buffer[this.index+3];if(a>i){let s=r.buffer[this.index+1];t.push(r.slice(i,a,s)),n.push(0)}return new At(this.type,t,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}};function IN(e){if(!e.length)return null;let t=0,n=e[0];for(let a=1;a<e.length;a++){let s=e[a];(s.from>n.from||s.to<n.to)&&(n=s,t=a)}let r=n instanceof ci&&n.index<0?null:n.parent,i=e.slice();return r?i[t]=r:i.splice(t,1),new w6(i,n)}var w6=class{constructor(e,t){this.heads=e,this.node=t}get next(){return IN(this.heads)}};function _6(e,t,n){let r=e.resolveInner(t,n),i=null;for(let a=r instanceof ci?r:r.context.parent;a;a=a.parent)if(a.index<0){let s=a.parent;(i||(i=[r])).push(s.resolve(t,n)),a=s}else{let s=zl.get(a.tree);if(s&&s.overlay&&s.overlay[0].from<=t&&s.overlay[s.overlay.length-1].to>=t){let l=new ci(s.tree,s.overlay[0].from+a.from,-1,a);(i||(i=[r])).push(Od(l,t,n,!1))}}return i?IN(i):r}var Mm=class{get name(){return this.type.name}constructor(e,t=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=t&~wt.EnterBracketed,e instanceof ci)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let n=e._parent;n;n=n._parent)this.stack.unshift(n.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:n,buffer:r}=this.buffer;return this.type=t||r.set.types[r.buffer[e]],this.from=n+r.buffer[e+1],this.to=n+r.buffer[e+2],!0}yield(e){return e?e instanceof ci?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,n,this.mode));let{buffer:r}=this.buffer,i=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.buffer.start,n);return i<0?!1:(this.stack.push(this.index),this.yieldBuf(i))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,n=this.mode){return this.buffer?n&wt.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&wt.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&wt.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,n=this.stack.length-1;if(e<0){let r=n<0?0:this.stack[n]+4;if(this.index!=r)return this.yieldBuf(t.findChild(r,this.index,-1,0,4))}else{let r=t.buffer[this.index+3];if(r<(n<0?t.buffer.length:t.buffer[this.stack[n]+3]))return this.yieldBuf(r)}return n<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,n,{buffer:r}=this;if(r){if(e>0){if(this.index<r.buffer.buffer.length)return!1}else for(let i=0;i<this.index;i++)if(r.buffer.buffer[i+3]<this.index)return!1;({index:t,parent:n}=r)}else({index:t,_parent:n}=this._tree);for(;n;{index:t,_parent:n}=n)if(t>-1)for(let i=t+e,a=e<0?-1:n._tree.children.length;i!=a;i+=e){let s=n._tree.children[i];if(this.mode&wt.IncludeAnonymous||s instanceof Kl||!s.type.isAnonymous||Qx(s))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,n=0;if(e&&e.context==this.buffer)e:for(let r=this.index,i=this.stack.length;i>=0;){for(let a=e;a;a=a._parent)if(a.index==r){if(r==this.index)return a;t=a,n=i+1;break e}r=this.stack[--i]}for(let r=n;r<this.stack.length;r++)t=new bd(this.buffer,t,this.stack[r]);return this.bufferNode=new bd(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let n=0;;){let r=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){n++;continue}this.type.isAnonymous||(r=!0)}for(;;){if(r&&t&&t(this),r=this.type.isAnonymous,!n)return;if(this.nextSibling())break;this.parent(),n--,r=!0}}}matchContext(e){if(!this.buffer)return zy(this.node.parent,e);let{buffer:t}=this.buffer,{types:n}=t.set;for(let r=e.length-1,i=this.stack.length-1;r>=0;i--){if(i<0)return zy(this._tree,e,r);let a=n[t.buffer[this.stack[i]]];if(!a.isAnonymous){if(e[r]&&e[r]!=a.name)return!1;r--}}return!0}};function Qx(e){return e.children.some(t=>t instanceof Kl||!t.type.isAnonymous||Qx(t))}function k6(e){var t;let{buffer:n,nodeSet:r,maxBufferLength:i=NN,reused:a=[],minRepeatType:s=r.types.length}=e,l=Array.isArray(n)?new x6(n,n.length):n,c=r.types,d=0,f=0;function m(Q,P,N,D,L,A){let{id:X,start:Z,end:V,size:$}=l,W=f,I=d;if($<0)if(l.next(),$==-1){let G=a[X];N.push(G),D.push(Z-Q);return}else if($==-3){d=X;return}else if($==-4){f=X;return}else throw new RangeError(`Unrecognized record size: ${$}`);let z=c[X],ee,le,q=Z-Q;if(V-Z<=i&&(le=w(l.pos-P,L))){let G=new Uint16Array(le.size-le.skip),re=l.pos-le.size,M=G.length;for(;l.pos>re;)M=k(le.start,G,M);ee=new Kl(G,V-le.start,r),q=le.start-Q}else{let G=l.pos-$;l.next();let re=[],M=[],he=X>=s?X:-1,ye=0,Oe=V;for(;l.pos>G;)he>=0&&l.id==he&&l.size>=0?(l.end<=Oe-i&&(b(re,M,Z,ye,l.end,Oe,he,W,I),ye=re.length,Oe=l.end),l.next()):A>2500?p(Z,G,re,M):m(Z,G,re,M,he,A+1);if(he>=0&&ye>0&&ye<re.length&&b(re,M,Z,ye,Z,Oe,he,W,I),re.reverse(),M.reverse(),he>-1&&ye>0){let Be=O(z,I);ee=Px(z,re,M,0,re.length,0,V-Z,Be,Be)}else ee=x(z,re,M,V-Z,W-V,I)}N.push(ee),D.push(q)}function p(Q,P,N,D){let L=[],A=0,X=-1;for(;l.pos>P;){let{id:Z,start:V,end:$,size:W}=l;if(W>4)l.next();else{if(X>-1&&V<X)break;X<0&&(X=$-i),L.push(Z,V,$),A++,l.next()}}if(A){let Z=new Uint16Array(A*4),V=L[L.length-2];for(let $=L.length-3,W=0;$>=0;$-=3)Z[W++]=L[$],Z[W++]=L[$+1]-V,Z[W++]=L[$+2]-V,Z[W++]=W;N.push(new Kl(Z,L[2]-V,r)),D.push(V-Q)}}function O(Q,P){return(N,D,L)=>{let A=0,X=N.length-1,Z,V;if(X>=0&&(Z=N[X])instanceof At){if(!X&&Z.type==Q&&Z.length==L)return Z;(V=Z.prop(Ge.lookAhead))&&(A=D[X]+Z.length+V)}return x(Q,N,D,L,A,P)}}function b(Q,P,N,D,L,A,X,Z,V){let $=[],W=[];for(;Q.length>D;)$.push(Q.pop()),W.push(P.pop()+N-L);Q.push(x(r.types[X],$,W,A-L,Z-A,V)),P.push(L-N)}function x(Q,P,N,D,L,A,X){if(A){let Z=[Ge.contextHash,A];X=X?[Z].concat(X):[Z]}if(L>25){let Z=[Ge.lookAhead,L];X=X?[Z].concat(X):[Z]}return new At(Q,P,N,D,X)}function w(Q,P){let N=l.fork(),D=0,L=0,A=0,X=N.end-i,Z={size:0,start:0,skip:0};e:for(let V=N.pos-Q;N.pos>V;){let $=N.size;if(N.id==P&&$>=0){Z.size=D,Z.start=L,Z.skip=A,A+=4,D+=4,N.next();continue}let W=N.pos-$;if($<0||W<V||N.start<X)break;let I=N.id>=s?4:0,z=N.start;for(N.next();N.pos>W;){if(N.size<0)if(N.size==-3||N.size==-4)I+=4;else break e;else N.id>=s&&(I+=4);N.next()}L=z,D+=$,A+=I}return(P<0||D==Q)&&(Z.size=D,Z.start=L,Z.skip=A),Z.size>4?Z:void 0}function k(Q,P,N){let{id:D,start:L,end:A,size:X}=l;if(l.next(),X>=0&&D<s){let Z=N;if(X>4){let V=l.pos-(X-4);for(;l.pos>V;)N=k(Q,P,N)}P[--N]=Z,P[--N]=A-Q,P[--N]=L-Q,P[--N]=D}else X==-3?d=D:X==-4&&(f=D);return N}let T=[],j=[];for(;l.pos>0;)m(e.start||0,e.bufferStart||0,T,j,-1,0);let E=(t=e.length)!==null&&t!==void 0?t:T.length?j[0]+T[0].length:0;return new At(c[e.topID],T.reverse(),j.reverse(),E)}var Hj=new WeakMap;function fm(e,t){if(!e.isAnonymous||t instanceof Kl||t.type!=e)return 1;let n=Hj.get(t);if(n==null){n=1;for(let r of t.children){if(r.type!=e||!(r instanceof At)){n=1;break}n+=fm(e,r)}Hj.set(t,n)}return n}function Px(e,t,n,r,i,a,s,l,c){let d=0;for(let b=r;b<i;b++)d+=fm(e,t[b]);let f=Math.ceil(d*1.5/8),m=[],p=[];function O(b,x,w,k,T){for(let j=w;j<k;){let E=j,Q=x[j],P=fm(e,b[j]);for(j++;j<k;j++){let N=fm(e,b[j]);if(P+N>=f)break;P+=N}if(j==E+1){if(P>f){let N=b[E];O(N.children,N.positions,0,N.children.length,x[E]+T);continue}m.push(b[E])}else{let N=x[j-1]+b[j-1].length-Q;m.push(Px(e,b,x,E,j,Q,N,null,c))}p.push(Q+T-a)}}return O(t,n,r,i,0),(l||c)(m,p,s)}var qN=class{constructor(){this.map=new WeakMap}setBuffer(e,t,n){let r=this.map.get(e);r||this.map.set(e,r=new Map),r.set(t,n)}getBuffer(e,t){let n=this.map.get(e);return n&&n.get(t)}set(e,t){e instanceof bd?this.setBuffer(e.context.buffer,e.index,t):e instanceof ci&&this.map.set(e.tree,t)}get(e){return e instanceof bd?this.getBuffer(e.context.buffer,e.index):e instanceof ci?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}},$l=class $y{constructor(t,n,r,i,a=!1,s=!1){this.from=t,this.to=n,this.tree=r,this.offset=i,this.open=(a?1:0)|(s?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(t,n=[],r=!1){let i=[new $y(0,t.length,t,0,!1,r)];for(let a of n)a.to>t.length&&i.push(a);return i}static applyChanges(t,n,r=128){if(!n.length)return t;let i=[],a=1,s=t.length?t[0]:null;for(let l=0,c=0,d=0;;l++){let f=l<n.length?n[l]:null,m=f?f.fromA:1e9;if(m-c>=r)for(;s&&s.from<m;){let p=s;if(c>=p.from||m<=p.to||d){let O=Math.max(p.from,c)-d,b=Math.min(p.to,m)-d;p=O>=b?null:new $y(O,b,p.tree,p.offset+d,l>0,!!f)}if(p&&i.push(p),s.to>m)break;s=a<t.length?t[a++]:null}if(!f)break;c=f.toA,d=f.toA-f.toB}return i}},Nx=class{startParse(e,t,n){return typeof e=="string"&&(e=new j6(e)),n=n?n.length?n.map(r=>new ii(r.from,r.to)):[new ii(0,0)]:[new ii(0,e.length)],this.createParse(e,t||[],n)}parse(e,t,n){let r=this.startParse(e,t,n);for(;;){let i=r.advance();if(i)return i}}},j6=class{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}};function XN(e){return(t,n,r,i)=>new C6(t,e,n,r,i)}var Gj=class{constructor(e,t,n,r,i,a){this.parser=e,this.parse=t,this.overlay=n,this.bracketed=r,this.target=i,this.from=a}};function Kj(e){if(!e.length||e.some(t=>t.from>=t.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(e))}var T6=class{constructor(e,t,n,r,i,a,s,l){this.parser=e,this.predicate=t,this.mounts=n,this.index=r,this.start=i,this.bracketed=a,this.target=s,this.prev=l,this.depth=0,this.ranges=[]}},Iy=new Ge({perNode:!0}),C6=class{constructor(e,t,n,r,i){this.nest=t,this.input=n,this.fragments=r,this.ranges=i,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let n=this.baseParse.advance();if(!n)return null;if(this.baseParse=null,this.baseTree=n,this.startInner(),this.stoppedAt!=null)for(let r of this.inner)r.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let n=this.baseTree;return this.stoppedAt!=null&&(n=new At(n.type,n.children,n.positions,n.length,n.propValues.concat([[Iy,this.stoppedAt]]))),n}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let n=Object.assign(Object.create(null),e.target.props);n[Ge.mounted.id]=new zl(t,e.overlay,e.parser,e.bracketed),e.target.props=n}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].from<e&&(e=Math.min(e,this.inner[t].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].parse.stopAt(e)}startInner(){let e=new Q6(this.fragments),t=null,n=null,r=new Mm(new ci(this.baseTree,this.ranges[0].from,0,null),wt.IncludeAnonymous|wt.IgnoreMounts);e:for(let i,a;;){let s=!0,l;if(this.stoppedAt!=null&&r.from>=this.stoppedAt)s=!1;else if(e.hasNode(r)){if(t){let c=t.mounts.find(d=>d.frag.from<=r.from&&d.frag.to>=r.to&&d.mount.overlay);if(c)for(let d of c.mount.overlay){let f=d.from+c.pos,m=d.to+c.pos;f>=r.from&&m<=r.to&&!t.ranges.some(p=>p.from<m&&p.to>f)&&t.ranges.push({from:f,to:m})}}s=!1}else if(n&&(a=E6(n.ranges,r.from,r.to)))s=a!=2;else if(!r.type.isAnonymous&&(i=this.nest(r,this.input))&&(r.from<r.to||!i.overlay)){r.tree||(A6(r),t&&t.depth++,n&&n.depth++);let c=e.findMounts(r.from,i.parser);if(typeof i.overlay=="function")t=new T6(i.parser,i.overlay,c,this.inner.length,r.from,!!i.bracketed,r.tree,t);else{let d=tT(this.ranges,i.overlay||(r.from<r.to?[new ii(r.from,r.to)]:[]));d.length&&Kj(d),(d.length||!i.overlay)&&this.inner.push(new Gj(i.parser,d.length?i.parser.startParse(this.input,nT(c,d),d):i.parser.startParse(""),i.overlay?i.overlay.map(f=>new ii(f.from-r.from,f.to-r.from)):null,!!i.bracketed,r.tree,d.length?d[0].from:r.from)),i.overlay?d.length&&(n={ranges:d,depth:0,prev:n}):s=!1}}else if(t&&(l=t.predicate(r))&&(l===!0&&(l=new ii(r.from,r.to)),l.from<l.to)){let c=t.ranges.length-1;c>=0&&t.ranges[c].to==l.from?t.ranges[c]={from:t.ranges[c].from,to:l.to}:t.ranges.push(l)}if(s&&r.firstChild())t&&t.depth++,n&&n.depth++;else for(;!r.nextSibling();){if(!r.parent())break e;if(t&&!--t.depth){let c=tT(this.ranges,t.ranges);c.length&&(Kj(c),this.inner.splice(t.index,0,new Gj(t.parser,t.parser.startParse(this.input,nT(t.mounts,c),c),t.ranges.map(d=>new ii(d.from-t.start,d.to-t.start)),t.bracketed,t.target,c[0].from))),t=t.prev}n&&!--n.depth&&(n=n.prev)}}}};function E6(e,t,n){for(let r of e){if(r.from>=n)break;if(r.to>t)return r.from<=t&&r.to>=n?2:1}return 0}function Jj(e,t,n,r,i,a){if(t<n){let s=e.buffer[t+1];r.push(e.slice(t,n,s)),i.push(s-a)}}function A6(e){let{node:t}=e,n=[],r=t.context.buffer;do n.push(e.index),e.parent();while(!e.tree);let i=e.tree,a=i.children.indexOf(r),s=i.children[a],l=s.buffer,c=[a];function d(f,m,p,O,b,x){let w=n[x],k=[],T=[];Jj(s,f,w,k,T,O);let j=l[w+1],E=l[w+2];c.push(k.length);let Q=x?d(w+4,l[w+3],s.set.types[l[w]],j,E-j,x-1):t.toTree();return k.push(Q),T.push(j-O),Jj(s,l[w+3],m,k,T,O),new At(p,k,T,b)}i.children[a]=d(0,l.length,Dn.none,0,s.length,n.length-1);for(let f of c){let m=e.tree.children[f],p=e.tree.positions[f];e.yield(new ci(m,p+e.from,f,e._tree))}}var eT=class{constructor(e,t){this.offset=t,this.done=!1,this.cursor=e.cursor(wt.IncludeAnonymous|wt.IgnoreMounts)}moveTo(e){let{cursor:t}=this,n=e-this.offset;for(;!this.done&&t.from<n;)t.to>=e&&t.enter(n,1,wt.IgnoreOverlays|wt.ExcludeBuffers)||t.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let t=this.cursor.tree;;){if(t==e.tree)return!0;if(t.children.length&&t.positions[0]==0&&t.children[0]instanceof At)t=t.children[0];else break}return!1}},Q6=class{constructor(e){var t;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let n=this.curFrag=e[0];this.curTo=(t=n.tree.prop(Iy))!==null&&t!==void 0?t:n.to,this.inner=new eT(n.tree,-n.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let t=this.curFrag=this.fragments[this.fragI];this.curTo=(e=t.tree.prop(Iy))!==null&&e!==void 0?e:t.to,this.inner=new eT(t.tree,-t.offset)}}findMounts(e,t){var n;let r=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let i=this.inner.cursor.node;i;i=i.parent){let a=(n=i.tree)===null||n===void 0?void 0:n.prop(Ge.mounted);if(a&&a.parser==t)for(let s=this.fragI;s<this.fragments.length;s++){let l=this.fragments[s];if(l.from>=i.to)break;l.tree==this.curFrag.tree&&r.push({frag:l,pos:i.from-l.offset,mount:a})}}}return r}};function tT(e,t){let n=null,r=t;for(let i=1,a=0;i<e.length;i++){let s=e[i-1].to,l=e[i].from;for(;a<r.length;a++){let c=r[a];if(c.from>=l)break;c.to<=s||(n||(r=n=t.slice()),c.from<s?(n[a]=new ii(c.from,s),c.to>l&&n.splice(a+1,0,new ii(l,c.to))):c.to>l?n[a--]=new ii(l,c.to):n.splice(a--,1))}}return r}function P6(e,t,n,r){let i=0,a=0,s=!1,l=!1,c=-1e9,d=[];for(;;){let f=i==e.length?1e9:s?e[i].to:e[i].from,m=a==t.length?1e9:l?t[a].to:t[a].from;if(s!=l){let p=Math.max(c,n),O=Math.min(f,m,r);p<O&&d.push(new ii(p,O))}if(c=Math.min(f,m),c==1e9)break;f==c&&(s?(s=!1,i++):s=!0),m==c&&(l?(l=!1,a++):l=!0)}return d}function nT(e,t){let n=[];for(let{pos:r,mount:i,frag:a}of e){let s=r+(i.overlay?i.overlay[0].from:0),l=s+i.tree.length,c=Math.max(a.from,s),d=Math.min(a.to,l);if(i.overlay){let f=i.overlay.map(p=>new ii(p.from+r,p.to+r)),m=P6(t,f,c,d);for(let p=0,O=c;;p++){let b=p==m.length,x=b?d:m[p].from;if(x>O&&n.push(new $l(O,x,i.tree,-s,a.from>=O||a.openStart,a.to<=x||a.openEnd)),b)break;O=m[p].to}}else n.push(new $l(c,d,i.tree,-s,a.from>=s||a.openStart,a.to<=l||a.openEnd))}return n}var N6=0,Ui=class qy{constructor(t,n,r,i){this.name=t,this.set=n,this.base=r,this.modified=i,this.id=N6++}toString(){let{name:t}=this;for(let n of this.modified)n.name&&(t=`${n.name}(${t})`);return t}static define(t,n){let r=typeof t=="string"?t:"?";if(t instanceof qy&&(n=t),n!=null&&n.base)throw new Error("Can not derive from a modified tag");let i=new qy(r,[],null,[]);if(i.set.push(i),n)for(let a of n.set)i.set.push(a);return i}static defineModifier(t){let n=new rT(t);return r=>r.modified.indexOf(n)>-1?r:rT.get(r.base||r,r.modified.concat(n).sort((i,a)=>i.id-a.id))}},R6=0,rT=class ZN{constructor(t){this.name=t,this.instances=[],this.id=R6++}static get(t,n){if(!n.length)return t;let r=n[0].instances.find(l=>l.base==t&&M6(n,l.modified));if(r)return r;let i=[],a=new Ui(t.name,i,t,n);for(let l of n)l.instances.push(a);let s=D6(n);for(let l of t.set)if(!l.modified.length)for(let c of s)i.push(ZN.get(l,c));return a}};function M6(e,t){return e.length==t.length&&e.every((n,r)=>n==t[r])}function D6(e){let t=[[]];for(let n=0;n<e.length;n++)for(let r=0,i=t.length;r<i;r++)t.push(t[r].concat(e[n]));return t.sort((n,r)=>r.length-n.length)}function Xo(e){let t=Object.create(null);for(let n in e){let r=e[n];Array.isArray(r)||(r=[r]);for(let i of n.split(" "))if(i){let a=[],s=2,l=i;for(let m=0;;){if(l=="..."&&m>0&&m+3==i.length){s=1;break}let p=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(l);if(!p)throw new RangeError("Invalid path: "+i);if(a.push(p[0]=="*"?"":p[0][0]=='"'?JSON.parse(p[0]):p[0]),m+=p[0].length,m==i.length)break;let O=i[m++];if(m==i.length&&O=="!"){s=0;break}if(O!="/")throw new RangeError("Invalid path: "+i);l=i.slice(m)}let c=a.length-1,d=a[c];if(!d)throw new RangeError("Invalid path: "+i);let f=new yd(r,s,c>0?a.slice(0,c):null);t[d]=f.sort(t[d])}}return BN.add(t)}var BN=new Ge({combine(e,t){let n,r,i;for(;e||t;){if(!e||t&&e.depth>=t.depth?(i=t,t=t.next):(i=e,e=e.next),n&&n.mode==i.mode&&!i.context&&!n.context)continue;let a=new yd(i.tags,i.mode,i.context);n?n.next=a:r=a,n=a}return r}}),yd=class{constructor(e,t,n,r){this.tags=e,this.mode=t,this.context=n,this.next=r}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}};yd.empty=new yd([],2,null);function VN(e,t){let n=Object.create(null);for(let a of e)if(!Array.isArray(a.tag))n[a.tag.id]=a.class;else for(let s of a.tag)n[s.id]=a.class;let{scope:r,all:i=null}=t||{};return{style:a=>{let s=i;for(let l of a)for(let c of l.set){let d=n[c.id];if(d){s=s?s+" "+d:d;break}}return s},scope:r}}function L6(e,t){let n=null;for(let r of e){let i=r.style(t);i&&(n=n?n+" "+i:i)}return n}function z6(e,t,n,r=0,i=e.length){let a=new $6(r,Array.isArray(t)?t:[t],n);a.highlightRange(e.cursor(),r,i,"",a.highlighters),a.flush(i)}var $6=class{constructor(e,t,n){this.at=e,this.highlighters=t,this.span=n,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,n,r,i){let{type:a,from:s,to:l}=e;if(s>=n||l<=t)return;a.isTop&&(i=this.highlighters.filter(p=>!p.scope||p.scope(a)));let c=r,d=I6(e)||yd.empty,f=L6(i,d.tags);if(f&&(c&&(c+=" "),c+=f,d.mode==1&&(r+=(r?" ":"")+f)),this.startSpan(Math.max(t,s),c),d.opaque)return;let m=e.tree&&e.tree.prop(Ge.mounted);if(m&&m.overlay){let p=e.node.enter(m.overlay[0].from+s,1),O=this.highlighters.filter(x=>!x.scope||x.scope(m.tree.type)),b=e.firstChild();for(let x=0,w=s;;x++){let k=x<m.overlay.length?m.overlay[x]:null,T=k?k.from+s:l,j=Math.max(t,w),E=Math.min(n,T);if(j<E&&b)for(;e.from<E&&(this.highlightRange(e,j,E,r,i),this.startSpan(Math.min(E,e.to),c),!(e.to>=T||!e.nextSibling())););if(!k||T>n)break;w=k.to+s,w>t&&(this.highlightRange(p.cursor(),Math.max(t,k.from+s),Math.min(n,w),"",O),this.startSpan(Math.min(n,w),c))}b&&e.parent()}else if(e.firstChild()){m&&(r="");do if(!(e.to<=t)){if(e.from>=n)break;this.highlightRange(e,t,n,r,i),this.startSpan(Math.min(n,e.to),c)}while(e.nextSibling());e.parent()}}};function I6(e){let t=e.type.prop(BN);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}var ve=Ui.define,Mh=ve(),Os=ve(),iT=ve(Os),aT=ve(Os),bs=ve(),Dh=ve(bs),LO=ve(bs),qi=ve(),fo=ve(qi),zi=ve(),$i=ve(),Xy=ve(),mu=ve(Xy),Lh=ve(),B={comment:Mh,lineComment:ve(Mh),blockComment:ve(Mh),docComment:ve(Mh),name:Os,variableName:ve(Os),typeName:iT,tagName:ve(iT),propertyName:aT,attributeName:ve(aT),className:ve(Os),labelName:ve(Os),namespace:ve(Os),macroName:ve(Os),literal:bs,string:Dh,docString:ve(Dh),character:ve(Dh),attributeValue:ve(Dh),number:LO,integer:ve(LO),float:ve(LO),bool:ve(bs),regexp:ve(bs),escape:ve(bs),color:ve(bs),url:ve(bs),keyword:zi,self:ve(zi),null:ve(zi),atom:ve(zi),unit:ve(zi),modifier:ve(zi),operatorKeyword:ve(zi),controlKeyword:ve(zi),definitionKeyword:ve(zi),moduleKeyword:ve(zi),operator:$i,derefOperator:ve($i),arithmeticOperator:ve($i),logicOperator:ve($i),bitwiseOperator:ve($i),compareOperator:ve($i),updateOperator:ve($i),definitionOperator:ve($i),typeOperator:ve($i),controlOperator:ve($i),punctuation:Xy,separator:ve(Xy),bracket:mu,angleBracket:ve(mu),squareBracket:ve(mu),paren:ve(mu),brace:ve(mu),content:qi,heading:fo,heading1:ve(fo),heading2:ve(fo),heading3:ve(fo),heading4:ve(fo),heading5:ve(fo),heading6:ve(fo),contentSeparator:ve(qi),list:ve(qi),quote:ve(qi),emphasis:ve(qi),strong:ve(qi),link:ve(qi),monospace:ve(qi),strikethrough:ve(qi),inserted:ve(),deleted:ve(),changed:ve(),invalid:ve(),meta:Lh,documentMeta:ve(Lh),annotation:ve(Lh),processingInstruction:ve(Lh),definition:Ui.defineModifier("definition"),constant:Ui.defineModifier("constant"),function:Ui.defineModifier("function"),standard:Ui.defineModifier("standard"),local:Ui.defineModifier("local"),special:Ui.defineModifier("special")};for(let e in B){let t=B[e];t instanceof Ui&&(t.name=e)}VN([{tag:B.link,class:"tok-link"},{tag:B.heading,class:"tok-heading"},{tag:B.emphasis,class:"tok-emphasis"},{tag:B.strong,class:"tok-strong"},{tag:B.keyword,class:"tok-keyword"},{tag:B.atom,class:"tok-atom"},{tag:B.bool,class:"tok-bool"},{tag:B.url,class:"tok-url"},{tag:B.labelName,class:"tok-labelName"},{tag:B.inserted,class:"tok-inserted"},{tag:B.deleted,class:"tok-deleted"},{tag:B.literal,class:"tok-literal"},{tag:B.string,class:"tok-string"},{tag:B.number,class:"tok-number"},{tag:[B.regexp,B.escape,B.special(B.string)],class:"tok-string2"},{tag:B.variableName,class:"tok-variableName"},{tag:B.local(B.variableName),class:"tok-variableName tok-local"},{tag:B.definition(B.variableName),class:"tok-variableName tok-definition"},{tag:B.special(B.variableName),class:"tok-variableName2"},{tag:B.definition(B.propertyName),class:"tok-propertyName tok-definition"},{tag:B.typeName,class:"tok-typeName"},{tag:B.namespace,class:"tok-namespace"},{tag:B.className,class:"tok-className"},{tag:B.macroName,class:"tok-macroName"},{tag:B.propertyName,class:"tok-propertyName"},{tag:B.operator,class:"tok-operator"},{tag:B.comment,class:"tok-comment"},{tag:B.meta,class:"tok-meta"},{tag:B.invalid,class:"tok-invalid"},{tag:B.punctuation,class:"tok-punctuation"}]);var zO,So=new Ge;function Rx(e){return Ie.define({combine:e?t=>t.concat(e):void 0})}var Mx=new Ge,ai=class{constructor(e,t,n=[],r=""){this.data=e,this.name=r,Gt.prototype.hasOwnProperty("tree")||Object.defineProperty(Gt.prototype,"tree",{get(){return Ln(this)}}),this.parser=t,this.extension=[Jl.of(this),Gt.languageData.of((i,a,s)=>{let l=sT(i,a,s),c=l.type.prop(So);if(!c)return[];let d=i.facet(c),f=l.type.prop(Mx);if(f){let m=l.resolve(a-l.from,s);for(let p of f)if(p.test(m,i)){let O=i.facet(p.facet);return p.type=="replace"?O:O.concat(d)}}return d})].concat(n)}isActiveAt(e,t,n=-1){return sT(e,t,n).type.prop(So)==this.data}findRegions(e){let t=e.facet(Jl);if((t==null?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let n=[],r=(i,a)=>{if(i.prop(So)==this.data){n.push({from:a,to:a+i.length});return}let s=i.prop(Ge.mounted);if(s){if(s.tree.prop(So)==this.data){if(s.overlay)for(let l of s.overlay)n.push({from:l.from+a,to:l.to+a});else n.push({from:a,to:a+i.length});return}else if(s.overlay){let l=n.length;if(r(s.tree,s.overlay[0].from+a),n.length>l)return}}for(let l=0;l<i.children.length;l++){let c=i.children[l];c instanceof At&&r(c,i.positions[l]+a)}};return r(Ln(e),0),n}get allowsNesting(){return!0}};ai.setState=tn.define();function sT(e,t,n){let r=e.facet(Jl),i=Ln(e).topNode;if(!r||r.allowsNesting)for(let a=i;a;a=a.enter(t,n,wt.ExcludeBuffers|wt.EnterBracketed))a.type.isTop&&(i=a);return i}var bp=class Zy extends ai{constructor(t,n,r){super(t,n,[],r),this.parser=n}static define(t){let n=Rx(t.languageData);return new Zy(n,t.parser.configure({props:[So.add(r=>r.isTop?n:void 0)]}),t.name)}configure(t,n){return new Zy(this.data,this.parser.configure(t),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}};function Ln(e){let t=e.field(ai.state,!1);return t?t.tree:At.empty}var q6=class{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let n=this.cursorPos-this.string.length;return e<n||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}},pu=null,UN=class By{constructor(t,n,r=[],i,a,s,l,c){this.parser=t,this.state=n,this.fragments=r,this.tree=i,this.treeLen=a,this.viewport=s,this.skipped=l,this.scheduleOn=c,this.parse=null,this.tempSkipped=[]}static create(t,n,r){return new By(t,n,[],At.empty,0,r,[],null)}startParse(){return this.parser.startParse(new q6(this.state.doc),this.fragments)}work(t,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=At.empty&&this.isDone(n??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var r;if(typeof t=="number"){let i=Date.now()+t;t=()=>Date.now()>i}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n<this.state.doc.length&&this.parse.stopAt(n);;){let i=this.parse.advance();if(i)if(this.fragments=this.withoutTempSkipped($l.addTree(i,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(r=this.parse.stoppedAt)!==null&&r!==void 0?r:this.state.doc.length,this.tree=i,this.parse=null,this.treeLen<(n??this.state.doc.length))this.parse=this.startParse();else return!0;if(t())return!1}})}takeTree(){let t,n;this.parse&&(t=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&this.parse.stopAt(t),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=t,this.tree=n,this.fragments=this.withoutTempSkipped($l.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(t){let n=pu;pu=this;try{return t()}finally{pu=n}}withoutTempSkipped(t){for(let n;n=this.tempSkipped.pop();)t=oT(t,n.from,n.to);return t}changes(t,n){let{fragments:r,tree:i,treeLen:a,viewport:s,skipped:l}=this;if(this.takeTree(),!t.empty){let c=[];if(t.iterChangedRanges((d,f,m,p)=>c.push({fromA:d,toA:f,fromB:m,toB:p})),r=$l.applyChanges(r,c),i=At.empty,a=0,s={from:t.mapPos(s.from,-1),to:t.mapPos(s.to,1)},this.skipped.length){l=[];for(let d of this.skipped){let f=t.mapPos(d.from,1),m=t.mapPos(d.to,-1);f<m&&l.push({from:f,to:m})}}}return new By(this.parser,n,r,i,a,s,l,this.scheduleOn)}updateViewport(t){if(this.viewport.from==t.from&&this.viewport.to==t.to)return!1;this.viewport=t;let n=this.skipped.length;for(let r=0;r<this.skipped.length;r++){let{from:i,to:a}=this.skipped[r];i<t.to&&a>t.from&&(this.fragments=oT(this.fragments,i,a),this.skipped.splice(r--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(t,n){this.skipped.push({from:t,to:n})}static getSkippingParser(t){return new class extends Nx{createParse(n,r,i){let a=i[0].from,s=i[i.length-1].to;return{parsedPos:a,advance(){let c=pu;if(c){for(let d of i)c.tempSkipped.push(d);t&&(c.scheduleOn=c.scheduleOn?Promise.all([c.scheduleOn,t]):t)}return this.parsedPos=s,new At(Dn.none,[],[],s-a)},stoppedAt:null,stopAt(){}}}}}isDone(t){t=Math.min(t,this.state.doc.length);let n=this.fragments;return this.treeLen>=t&&n.length&&n[0].from==0&&n[0].to>=t}static get(){return pu}};function oT(e,t,n){return $l.applyChanges(e,[{fromA:t,toA:n,fromB:t,toB:n}])}var Vy=class Uy{constructor(t){this.context=t,this.tree=t.tree}apply(t){if(!t.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(t.changes,t.state),r=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,r)||n.takeTree(),new Uy(n)}static init(t){let n=Math.min(3e3,t.doc.length),r=UN.create(t.facet(Jl).parser,t,{from:0,to:n});return r.work(20,n)||r.takeTree(),new Uy(r)}};ai.state=Xs.define({create:Vy.init,update(e,t){for(let n of t.effects)if(n.is(ai.setState))return n.value;return t.startState.facet(Jl)!=t.state.facet(Jl)?Vy.init(t.state):e.apply(t)}});var YN=e=>{let t=setTimeout(()=>e(),500);return()=>clearTimeout(t)};typeof requestIdleCallback<"u"&&(YN=e=>{let t=-1,n=setTimeout(()=>{t=requestIdleCallback(e,{timeout:400})},100);return()=>t<0?clearTimeout(n):cancelIdleCallback(t)});var $O=typeof navigator<"u"&&(!((zO=navigator.scheduling)===null||zO===void 0)&&zO.isInputPending)?()=>navigator.scheduling.isInputPending():null,X6=gd.fromClass(class{constructor(t){this.view=t,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(t){let n=this.view.state.field(ai.state).context;(n.updateViewport(t.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),(t.docChanged||t.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:t}=this.view,n=t.field(ai.state);(n.tree!=n.context.tree||!n.context.isDone(t.doc.length))&&(this.working=YN(this.work))}work(t){this.working=null;let n=Date.now();if(this.chunkEnd<n&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=n+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:r,viewport:{to:i}}=this.view,a=r.field(ai.state);if(a.tree==a.context.tree&&a.context.isDone(i+1e5))return;let s=Date.now()+Math.min(this.chunkBudget,100,t&&!$O?Math.max(25,t.timeRemaining()-5):1e9),l=a.context.treeLen<i&&r.doc.length>i+1e3,c=a.context.work(()=>$O&&$O()||Date.now()>s,i+(l?0:1e5));this.chunkBudget-=Date.now()-n,(c||this.chunkBudget<=0)&&(a.context.takeTree(),this.view.dispatch({effects:ai.setState.of(new Vy(a.context))})),this.chunkBudget>0&&!(c&&!l)&&this.scheduleWork(),this.checkAsyncSchedule(a.context)}checkAsyncSchedule(t){t.scheduleOn&&(this.workScheduled++,t.scheduleOn.then(()=>this.scheduleWork()).catch(n=>Fi(this.view.state,n)).then(()=>this.workScheduled--),t.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Jl=Ie.define({combine(e){return e.length?e[0]:null},enables:e=>[ai.state,X6,$e.contentAttributes.compute([e],t=>{let n=t.facet(e);return n&&n.name?{"data-language":n.name}:{}})]}),ec=class{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}},lT=class WN{constructor(t,n,r,i,a,s=void 0){this.name=t,this.alias=n,this.extensions=r,this.filename=i,this.loadFunc=a,this.support=s,this.loading=null}load(){return this.loading||(this.loading=this.loadFunc().then(t=>this.support=t,t=>{throw this.loading=null,t}))}static of(t){let{load:n,support:r}=t;if(!n){if(!r)throw new RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");n=()=>Promise.resolve(r)}return new WN(t.name,(t.alias||[]).concat(t.name).map(i=>i.toLowerCase()),t.extensions||[],t.filename,n,r)}static matchFilename(t,n){for(let i of t)if(i.filename&&i.filename.test(n))return i;let r=/\.([^.]+)$/.exec(n);if(r){for(let i of t)if(i.extensions.indexOf(r[1])>-1)return i}return null}static matchLanguageName(t,n,r=!0){n=n.toLowerCase();for(let i of t)if(i.alias.some(a=>a==n))return i;if(r)for(let i of t)for(let a of i.alias){let s=n.indexOf(a);if(s>-1&&(a.length>2||!/\w/.test(n[s-1])&&!/\w/.test(n[s+a.length])))return i}return null}},FN=Ie.define({combine:e=>{if(!e.length)return" ";let t=e[0];if(!t||/\S/.test(t)||Array.from(t).some(n=>n!=t[0]))throw new Error("Invalid indent unit: "+JSON.stringify(e[0]));return t}}),qd=new Ge;function Z6(e){let t=e.node,n=t.childAfter(t.from),r=t.lastChild;if(!n)return null;let i=e.options.simulateBreak,a=e.state.doc.lineAt(n.from),s=i==null||i<=a.from?a.to:Math.min(a.to,i);for(let l=n.to;;){let c=t.childAfter(l);if(!c||c==r)return null;if(!c.type.isSkipped){if(c.from>=s)return null;let d=/^ */.exec(a.text.slice(n.to-a.from))[0].length;return{from:n.from,to:n.to+d}}l=c.to}}function B6({closing:e,align:t=!0,units:n=1}){return r=>V6(r,t,n,e)}function V6(e,t,n,r,i){let a=e.textAfter,s=a.match(/^\s*/)[0].length,l=a.slice(s,s+r.length)==r||i==e.pos+s,c=t?Z6(e):null;return c?l?e.column(c.from):e.column(c.to):e.baseIndent+(l?0:e.unit*n)}var U6=e=>e.baseIndent;function Il({except:e,units:t=1}={}){return n=>{let r=e&&e.test(n.textAfter);return n.baseIndent+(r?0:t*n.unit)}}var Y6=Ie.define(),fc=new Ge;function Dx(e){let t=e.firstChild,n=e.lastChild;return t&&t.to<n.from?{from:t.to,to:n.type.isError?e.to:n.from}:null}var Lx=class HN{constructor(t,n){this.specs=t;let r;function i(l){let c=Rs.newName();return(r||(r=Object.create(null)))["."+c]=l,c}const a=typeof n.all=="string"?n.all:n.all?i(n.all):void 0,s=n.scope;this.scope=s instanceof ai?l=>l.prop(So)==s.data:s?l=>l==s:void 0,this.style=VN(t.map(l=>({tag:l.tag,class:l.class||i(Object.assign({},l,{tag:null}))})),{all:a}).style,this.module=r?new Rs(r):null,this.themeType=n.themeType}static define(t,n){return new HN(t,n||{})}},Yy=Ie.define(),W6=Ie.define({combine(e){return e.length?[e[0]]:null}});function IO(e){let t=e.facet(Yy);return t.length?t:e.facet(W6)}function zx(e,t){let n=[H6],r;return e instanceof Lx&&(e.module&&n.push($e.styleModule.of(e.module)),r=e.themeType),r?n.push(Yy.computeN([$e.darkTheme],i=>i.facet($e.darkTheme)==(r=="dark")?[e]:[])):n.push(Yy.of(e)),n}var F6=class{constructor(e){this.markCache=Object.create(null),this.tree=Ln(e.state),this.decorations=this.buildDeco(e,IO(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=Ln(e.state),n=IO(e.state),r=n!=IO(e.startState),{viewport:i}=e.view,a=e.changes.mapPos(this.decoratedTo,1);t.length<i.to&&!r&&t.type==this.tree.type&&a>=i.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=a):(t!=this.tree||e.viewportChanged||r)&&(this.tree=t,this.decorations=this.buildDeco(e.view,n),this.decoratedTo=i.to)}buildDeco(e,t){if(!t||!this.tree.length)return qt.none;let n=new ud;for(let{from:r,to:i}of e.visibleRanges)z6(this.tree,t,(a,s,l)=>{n.add(a,s,this.markCache[l]||(this.markCache[l]=qt.mark({class:l})))},r,i);return n.finish()}},H6=$d.high(gd.fromClass(F6,{decorations:e=>e.decorations})),G6=new Ge,K6=Object.create(null),cT=[Dn.none],uT=[],dT=Object.create(null),J6=Object.create(null);for(let[e,t]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])J6[e]=e7(K6,t);function qO(e,t){uT.indexOf(e)>-1||(uT.push(e),console.warn(t))}function e7(e,t){let n=[];for(let l of t.split(" ")){let c=[];for(let d of l.split(".")){let f=e[d]||B[d];f?typeof f=="function"?c.length?c=c.map(f):qO(d,`Modifier ${d} used at start of tag`):c.length?qO(d,`Tag ${d} used as modifier`):c=Array.isArray(f)?f:[f]:qO(d,`Unknown highlighting tag ${d}`)}for(let d of c)n.push(d)}if(!n.length)return 0;let r=t.replace(/ /g,"_"),i=r+" "+n.map(l=>l.id),a=dT[i];if(a)return a.id;let s=dT[i]=Dn.define({id:cT.length,name:r,props:[Xo({[r]:n})]});return cT.push(s),s.id}On.RTL,On.LTR;var GN=$e.theme({"&":{backgroundColor:"#ffffff",color:"#24292e"},".cm-content":{caretColor:"#0550ae"},".cm-cursor, .cm-dropCursor":{borderLeftColor:"#0550ae"},"&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:"#b3d7ff"},".cm-gutters":{backgroundColor:"#f6f8fa",color:"#57606a",border:"none"}},{dark:!1}),KN=Lx.define([{tag:B.string,color:"#0a3069"},{tag:B.number,color:"#0550ae"},{tag:B.bool,color:"#8250df"},{tag:B.null,color:"#cf222e"},{tag:B.keyword,color:"#cf222e"},{tag:B.propertyName,color:"#116329"},{tag:B.punctuation,color:"#57606a"},{tag:B.bracket,color:"#6e7781"}]),t7=class extends dc{constructor(e,t,n){super(),this.annotation=e,this.targetDocumentName=t,this.isGenerating=n}eq(e){const t=Aa(this.annotation.body),n=Aa(e.annotation.body);return e.annotation.id===this.annotation.id&&n===t&&e.targetDocumentName===this.targetDocumentName&&e.isGenerating===this.isGenerating}toDOM(){const e=document.createElement("span");e.className="reference-preview-widget",e.style.cssText=`
|
|
59
|
-
display: inline-flex;
|
|
60
|
-
align-items: center;
|
|
61
|
-
margin-left: 4px;
|
|
62
|
-
position: relative;
|
|
63
|
-
`;const t=D0(this.annotation),n=Aa(this.annotation.body);e.dataset.widgetAnnotationId=this.annotation.id,e.dataset.widgetMotivation=this.annotation.motivation,e.dataset.widgetResolved=t?"true":"false",n&&(e.dataset.widgetBodySource=n),this.targetDocumentName&&(e.dataset.widgetTargetName=this.targetDocumentName),this.isGenerating&&(e.dataset.widgetGenerating="true");const r=document.createElement("button");if(r.className="reference-indicator",r.type="button",t)r.innerHTML='<span aria-hidden="true">🔗</span>',r.setAttribute("aria-label",this.targetDocumentName?`Reference link to ${this.targetDocumentName}`:"Reference link to document"),r.title=this.targetDocumentName?`Links to: ${this.targetDocumentName}`:"Links to document",r.style.cssText=`
|
|
64
|
-
font-size: 10px;
|
|
65
|
-
cursor: pointer;
|
|
66
|
-
opacity: 0.6;
|
|
67
|
-
transition: opacity 0.2s ease;
|
|
68
|
-
background: none;
|
|
69
|
-
border: none;
|
|
70
|
-
padding: 0;
|
|
71
|
-
margin: 0;
|
|
72
|
-
vertical-align: baseline;
|
|
73
|
-
`;else if(this.isGenerating){if(r.innerHTML=`
|
|
74
|
-
<span style="position: relative; display: inline-flex; align-items: center; justify-content: center;" aria-hidden="true">
|
|
75
|
-
<span style="position: absolute; inset: 0; border-radius: 9999px; background: rgb(250, 204, 21); opacity: 0.75; animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;"></span>
|
|
76
|
-
<span style="position: relative; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 9999px; background: white; box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); border: 2px solid rgb(250, 204, 21);">
|
|
77
|
-
<span style="font-size: 14px;">✨</span>
|
|
78
|
-
</span>
|
|
79
|
-
</span>
|
|
80
|
-
`,r.setAttribute("aria-label","Generating document"),r.setAttribute("aria-busy","true"),r.title="Generating document...",r.disabled=!0,r.style.cssText=`
|
|
81
|
-
cursor: default;
|
|
82
|
-
display: inline-flex;
|
|
83
|
-
vertical-align: middle;
|
|
84
|
-
background: none;
|
|
85
|
-
border: none;
|
|
86
|
-
padding: 0;
|
|
87
|
-
margin: 0;
|
|
88
|
-
`,document.documentElement.classList.contains("dark")){const i=r.querySelector("span > span:last-child");i&&(i.style.background="rgb(31, 41, 55)",i.style.borderColor="rgb(234, 179, 8)");const a=r.querySelector("span > span:first-child");a&&(a.style.background="rgb(234, 179, 8)")}}else r.innerHTML='<span aria-hidden="true">❓</span>',r.setAttribute("aria-label","Stub reference - click to resolve"),r.title="Stub reference. Click to resolve.",r.style.cssText=`
|
|
89
|
-
font-size: 10px;
|
|
90
|
-
cursor: pointer;
|
|
91
|
-
opacity: 0.6;
|
|
92
|
-
transition: opacity 0.2s ease;
|
|
93
|
-
background: none;
|
|
94
|
-
border: none;
|
|
95
|
-
padding: 0;
|
|
96
|
-
margin: 0;
|
|
97
|
-
vertical-align: baseline;
|
|
98
|
-
`;return e.appendChild(r),e}ignoreEvent(e){return e.type==="click"}};function n7(e,t){if(!t||t.trim()==="")return;const n=document.createElement("div");n.className="reference-tooltip",n.textContent=`→ ${t}`,n.style.cssText=`
|
|
99
|
-
position: absolute;
|
|
100
|
-
bottom: 100%;
|
|
101
|
-
left: 50%;
|
|
102
|
-
transform: translateX(-50%) translateY(-4px);
|
|
103
|
-
padding: 4px 8px;
|
|
104
|
-
background: rgba(0, 0, 0, 0.8);
|
|
105
|
-
color: white;
|
|
106
|
-
border-radius: 4px;
|
|
107
|
-
font-size: 11px;
|
|
108
|
-
white-space: nowrap;
|
|
109
|
-
pointer-events: none;
|
|
110
|
-
z-index: 1000;
|
|
111
|
-
animation: fadeIn 0.2s ease;
|
|
112
|
-
`,e.appendChild(n)}function r7(e){const t=e.querySelector(".reference-tooltip");t&&t.remove()}function i7(e){return e?oc(e)?["rectangle"]:e.startsWith("image/")?["rectangle","circle","polygon"]:["rectangle","circle","polygon"]:["rectangle","circle","polygon"]}function a7(e){return e?oc(e)?"fragment":e.startsWith("image/")?"svg":"text":"text"}function fT(e){if(e==="fragment"||e==="text")return"rectangle";if(typeof window<"u"){const t=localStorage.getItem("semiont-toolbar-shape-svg");if(t&&["rectangle","circle","polygon"].includes(t))return t}return"rectangle"}function s7(e,t){e==="svg"&&typeof window<"u"&&localStorage.setItem("semiont-toolbar-shape-svg",t)}function o7(e,t){const n=document.createTreeWalker(t,NodeFilter.SHOW_TEXT);let r="";for(;n.nextNode();)r+=n.currentNode.textContent??"";const i=new Map;let a=0,s=0;for(;s<e.length&&a<r.length;)e[s]===r[a]&&(i.set(s,a),a++),s++;for(;s<e.length;)i.set(s,a),s++;return i}function l7(e){var i;const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);let r=0;for(;n.nextNode();){const a=n.currentNode,s=((i=a.textContent)==null?void 0:i.length)??0;t.push({node:a,start:r,end:r+s}),r+=s}return t}function hT(e,t){let n=0,r=e.length-1;for(;n<=r;){const i=n+r>>>1,a=e[i];if(t<a.start)r=i-1;else if(t>=a.end)n=i+1;else return{node:a.node,localOffset:t-a.start}}return null}function c7(e,t,n){const r=new Map;for(const i of e){const a=t.get(i.offset),s=t.get(i.offset+i.length-1);if(a===void 0||s===void 0)continue;const l=hT(n,a),c=hT(n,s+1);if(!l||!c)continue;const d=document.createRange();d.setStart(l.node,l.localOffset),d.setEnd(c.node,c.localOffset),r.set(i.id,{range:d,annotation:i})}return r}function u7(e){for(const[t,{range:n,annotation:r}]of e){const i=`annotation-${r.type}`;if(n.startContainer===n.endContainer){const a=document.createElement("span");a.className=i,a.dataset.annotationId=t,a.dataset.annotationType=r.type;try{n.surroundContents(a)}catch{mT(n,t,r)}continue}mT(n,t,r)}}function mT(e,t,n){const r=`annotation-${n.type}`,i=document.createTreeWalker(e.commonAncestorContainer,NodeFilter.SHOW_TEXT),a=[];for(;i.nextNode();){const s=i.currentNode;e.intersectsNode(s)&&a.push(s)}for(const s of a){const l=document.createRange();l.selectNodeContents(s),s===e.startContainer&&l.setStart(s,e.startOffset),s===e.endContainer&&l.setEnd(s,e.endOffset);const c=document.createElement("span");c.className=r,c.dataset.annotationId=t,c.dataset.annotationType=n.type;try{l.surroundContents(c)}catch{}}}function d7(e){const t=e.querySelectorAll("[data-annotation-id]");for(const n of t){const r=n.parentNode;if(r){for(;n.firstChild;)r.insertBefore(n.firstChild,n);r.removeChild(n),r.normalize()}}}function f7(e){return e.map(t=>{var l;const n=Qn(t.target),r=oi(n),i=(r==null?void 0:r.start)??0,a=(r==null?void 0:r.end)??0,s=((l=Object.values(er).find(c=>c.matchesAnnotation(t)))==null?void 0:l.internalType)||"highlight";return{id:t.id,exact:_s(n),offset:i,length:a-i,type:s,source:Aa(t.body)}})}function JN(e){var n;if(!e)return"📄";const t=((n=e.split(";")[0])==null?void 0:n.trim().toLowerCase())||"";if(t.startsWith("image/"))return"🖼️";switch(t){case"text/markdown":return"📝";case"text/html":return"🌐";case"text/plain":return"📄";default:return"📄"}}var eR={"legal-irac":{id:"legal-irac",name:"Legal Analysis (IRAC)",description:"Issue, Rule, Application, Conclusion framework for legal reasoning",domain:"legal",tags:[{name:"Issue",description:"The legal question or problem to be resolved",examples:["What is the central legal question?","What must the court decide?","What is the dispute about?"]},{name:"Rule",description:"The relevant law, statute, or legal principle",examples:["What law applies?","What is the legal standard?","What statute governs this case?"]},{name:"Application",description:"How the rule applies to the specific facts",examples:["How does the law apply to these facts?","Analysis of the case","How do the facts satisfy the legal standard?"]},{name:"Conclusion",description:"The resolution or outcome based on the analysis",examples:["What is the court's decision?","What is the final judgment?","What is the holding?"]}]},"scientific-imrad":{id:"scientific-imrad",name:"Scientific Paper (IMRAD)",description:"Introduction, Methods, Results, Discussion structure for research papers",domain:"scientific",tags:[{name:"Introduction",description:"Background, context, and research question",examples:["What is the research question?","Why is this important?","What is the hypothesis?"]},{name:"Methods",description:"Experimental design and procedures",examples:["How was the study conducted?","What methods were used?","What was the experimental design?"]},{name:"Results",description:"Findings and observations",examples:["What did the study find?","What are the data?","What were the observations?"]},{name:"Discussion",description:"Interpretation and implications of results",examples:["What do the results mean?","What are the implications?","How do these findings relate to prior work?"]}]},"argument-toulmin":{id:"argument-toulmin",name:"Argument Structure (Toulmin)",description:"Claim, Evidence, Warrant, Counterargument, Rebuttal framework for argumentation",domain:"general",tags:[{name:"Claim",description:"The main assertion or thesis",examples:["What is being argued?","What is the main point?","What position is being taken?"]},{name:"Evidence",description:"Data or facts supporting the claim",examples:["What supports this claim?","What are the facts?","What data is provided?"]},{name:"Warrant",description:"Reasoning connecting evidence to claim",examples:["Why does this evidence support the claim?","What is the logic?","How does this reasoning work?"]},{name:"Counterargument",description:"Opposing viewpoints or objections",examples:["What are the objections?","What do critics say?","What are alternative views?"]},{name:"Rebuttal",description:"Response to counterarguments",examples:["How is the objection addressed?","Why is the counterargument wrong?","How is the criticism answered?"]}]}};function h7(e){return eR[e]||null}function m7(){return Object.values(eR)}function tR(e){if(Array.isArray(e.body)){const t=[];for(const n of e.body)if(typeof n=="object"&&n!==null&&"type"in n&&"value"in n&&"purpose"in n){const r=n.type,i=n.value,a=n.purpose;r==="TextualBody"&&a==="tagging"&&typeof i=="string"&&i.length>0&&t.push(i)}return t}return[]}function nR(e){return e.motivation==="tagging"}function p7(e){if(!nR(e))return;const n=(Array.isArray(e.body)?e.body:[e.body]).find(r=>r!==null&&typeof r=="object"&&"purpose"in r&&r.purpose==="tagging");if(n&&"value"in n)return n.value}function g7(e){if(!nR(e))return;const n=(Array.isArray(e.body)?e.body:[e.body]).find(r=>r!==null&&typeof r=="object"&&"purpose"in r&&r.purpose==="classifying");if(n&&"value"in n)return n.value}var v7={parse(e){if(typeof e!="string")throw new Error("URL must be a string");let t;try{t=new URL(e)}catch{throw new Error("Invalid image URL")}if(t.hostname!=="localhost"&&t.protocol!=="https:")throw new Error("External images must use HTTPS");const n=["javascript:","data:text/html","<script","onerror=","onload=","onclick="],r=e.toLowerCase();if(n.some(l=>r.includes(l)))throw new Error("Invalid or potentially unsafe image URL");const a=[".jpg",".jpeg",".png",".gif",".webp",".svg",".ico"].some(l=>r.includes(l)),s=r.includes("googleusercontent.com")||r.includes("avatars.githubusercontent.com");if(!a&&!s)throw new Error("URL must point to an image file");return e},safeParse(e){try{return{success:!0,data:this.parse(e)}}catch(t){return{success:!1,error:t instanceof Error?t.message:"Invalid image URL"}}}};function Wae(e){try{const t=v7.safeParse(e);if(!t.success)return console.warn("Invalid image URL:",t.error),null;const n=new URL(e);return`${n.protocol}//${n.hostname}${n.pathname}${n.search}`}catch(t){return console.error("Error sanitizing image URL:",t),null}}function rR(e){const[t]=_.useState(e);return _.useEffect(()=>()=>t.dispose(),[t]),t}function Fae(e){if(!e||e<=0)return null;const t=Math.floor(e/36e5),n=Math.floor(e%36e5/6e4),r=Math.floor(e%6e4/1e3);return t>0?`${t}h ${n}m`:n>0?`${n}m`:r>30?"1m":"Less than 1m"}var O7=typeof window<"u"&&navigator.platform.toUpperCase().indexOf("MAC")>=0;function Hae(e){const t=_.useRef(e);t.current=e;const n=_.useCallback(r=>{if(!r.key)return;const i=r.target;if(i.tagName==="INPUT"||i.tagName==="TEXTAREA"||i.contentEditable==="true")return;const a=t.current.filter(s=>s.enabled!==!1);for(const s of a){if(r.key.toLowerCase()!==s.key.toLowerCase())continue;const l=O7?r.metaKey:r.ctrlKey;if(!(s.ctrlOrCmd&&!l)&&!(!s.ctrlOrCmd&&l)&&!(s.shift&&!r.shiftKey)&&!(!s.shift&&r.shiftKey)&&!(s.alt&&!r.altKey)&&!(!s.alt&&r.altKey)){r.preventDefault(),r.stopPropagation(),s.handler(r);break}}},[]);_.useEffect(()=>(window.addEventListener("keydown",n),()=>{window.removeEventListener("keydown",n)}),[n])}function Gae(e,t,n=300){const r=_.useRef(0),i=_.useRef(t);i.current=t;const a=_.useCallback(s=>{if(s.key!==e)return;const l=Date.now();l-r.current<n?(i.current(),r.current=0):r.current=l},[e,n]);_.useEffect(()=>(window.addEventListener("keydown",a),()=>{window.removeEventListener("keydown",a)}),[a])}function $x(){const[e,t]=_.useState(()=>typeof window<"u"?localStorage.getItem("showLineNumbers")==="true":!1),n=_.useCallback(()=>{const r=!e;t(r),typeof window<"u"&&localStorage.setItem("showLineNumbers",r.toString())},[e]);return{showLineNumbers:e,toggleLineNumbers:n}}function De(e){const[t,n]=_.useState(()=>{if(!e)return;const r=e.getValue;return typeof r=="function"?r.call(e):void 0});return _.useEffect(()=>{if(!e)return;const r=e.subscribe(n);return()=>r.unsubscribe()},[e]),t}function Xd(e,t=Fb){const n=De(at().activeSession$),r=_.useRef(null),i=_.useRef(null),a=_.useCallback(()=>{r.current!==e&&(i.current!==null&&clearTimeout(i.current),i.current=setTimeout(()=>{i.current=null,r.current=e,n==null||n.client.beckon.hover(e)},t))},[e,t,n]),s=_.useCallback(()=>{i.current!==null&&(clearTimeout(i.current),i.current=null),r.current!==null&&(r.current=null,n==null||n.client.beckon.hover(null))},[n]);return _.useEffect(()=>()=>{i.current!==null&&(clearTimeout(i.current),i.current=null)},[]),{onMouseEnter:a,onMouseLeave:s}}function iR(){const[e,t]=_.useState(()=>{if(typeof window<"u"){const r=localStorage.getItem("hoverDelayMs");return r?Number(r):Fb}return Fb}),n=_.useCallback(r=>{t(r),typeof window<"u"&&localStorage.setItem("hoverDelayMs",r.toString())},[]);return{hoverDelayMs:e,setHoverDelayMs:n}}function aR(){const e=at();return _.useCallback((t,n)=>{const r=setTimeout(()=>{console.warn("[Observable Navigation] No handler cancelled nav:external fallback. Falling back to window.location.href. For better UX, subscribe to this event in your app, call cancelFallback(), and use client-side routing."),window.location.href=t},10);e.emit("nav:external",{url:t,resourceId:n==null?void 0:n.resourceId,cancelFallback:()=>clearTimeout(r)})},[e])}function b7({defaultWidth:e=384,minWidth:t=256,maxWidth:n=800,storageKey:r="semiont-panel-width"}={}){const[i,a]=_.useState(e),s=_.useRef(!1);_.useEffect(()=>{if(typeof window>"u")return;const c=localStorage.getItem(r);if(c){const d=parseInt(c,10),f=Math.max(t,Math.min(n,d));a(f)}},[]);const l=c=>{const d=Math.max(t,Math.min(n,c));s.current=!0,a(d)};return _.useEffect(()=>{s.current&&localStorage.setItem(r,i.toString())},[i,r]),{width:i,setWidth:l,minWidth:t,maxWidth:n}}function pT(e,t={}){const{orientation:n="horizontal",loop:r=!0,cols:i=1}=t,a=_.useRef(null),s=_.useRef(0),l=_.useCallback(()=>a.current?Array.from(a.current.querySelectorAll('[role="button"]:not([disabled]), button:not([disabled]), [tabindex]:not([tabindex="-1"])')):[],[]),c=_.useCallback(f=>{var O;const m=l();if(m.length===0)return;let p=f;r?p=(f%m.length+m.length)%m.length:p=Math.max(0,Math.min(f,m.length-1)),m.forEach((b,x)=>{b.setAttribute("tabindex",x===p?"0":"-1")}),(O=m[p])==null||O.focus(),s.current=p},[l,r]),d=_.useCallback(f=>{const m=l();if(m.length===0)return;const p=s.current;let O=p;switch(f.key){case"ArrowRight":(n==="horizontal"||n==="grid")&&(f.preventDefault(),O=p+1);break;case"ArrowLeft":(n==="horizontal"||n==="grid")&&(f.preventDefault(),O=p-1);break;case"ArrowDown":n==="vertical"?(f.preventDefault(),O=p+1):n==="grid"&&(f.preventDefault(),O=p+i);break;case"ArrowUp":n==="vertical"?(f.preventDefault(),O=p-1):n==="grid"&&(f.preventDefault(),O=p-i);break;case"Home":f.preventDefault(),O=0;break;case"End":f.preventDefault(),O=m.length-1;break;default:return}c(O)},[n,i,l,c]);return _.useEffect(()=>{const f=l();if(f.length===0)return;f.forEach((O,b)=>{O.setAttribute("tabindex",b===0?"0":"-1")});const m=O=>()=>{s.current=O,l().forEach((x,w)=>{x.setAttribute("tabindex",w===O?"0":"-1")})},p=f.map((O,b)=>{const x=m(b);return O.addEventListener("click",x),x});return()=>{f.forEach((O,b)=>{const x=p[b];x&&O.removeEventListener("click",x)})}},[e,l]),{containerRef:a,handleKeyDown:d,focusItem:c}}function Kae(){const e=De(at().activeSession$);De(e==null?void 0:e.token$);const t=(e==null?void 0:e.expiresAt)??null,[n,r]=_.useState(null),[i,a]=_.useState(!1);return _.useEffect(()=>{if(!t){r(null),a(!1);return}const s=()=>{const c=t.getTime()-Date.now();r(c>0?c:0),a(c<300*1e3&&c>0)};s();const l=setInterval(s,1e3);return()=>clearInterval(l)},[t]),{timeRemaining:n,isExpiringSoon:i}}var sR=_.createContext(null);function Jae({children:e}){const[t,n]=_.useState(()=>typeof window<"u"&&localStorage.getItem("theme")||"system"),[r,i]=_.useState(()=>typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),a=t==="system"?r:t;_.useEffect(()=>{window.document.documentElement.setAttribute("data-theme",a)},[a]),_.useEffect(()=>{const l=window.matchMedia("(prefers-color-scheme: dark)"),c=d=>{i(d.matches?"dark":"light")};return l.addEventListener("change",c),()=>l.removeEventListener("change",c)},[]);const s=l=>{n(l),typeof window<"u"&&localStorage.setItem("theme",l)};return g.jsx(sR.Provider,{value:{theme:t,setTheme:s,resolvedTheme:a,systemTheme:r},children:e})}function y7(){const e=_.useContext(sR);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e}function x7(){const[e,t]=_.useState(!1),n=_.useRef(null),r=_.useCallback(()=>{t(s=>!s)},[]),i=_.useCallback(()=>{t(!0)},[]),a=_.useCallback(()=>{t(!1)},[]);return _.useEffect(()=>{function s(l){n.current&&!n.current.contains(l.target)&&a()}if(e)return document.addEventListener("mousedown",s),()=>document.removeEventListener("mousedown",s)},[e,a]),_.useEffect(()=>{function s(l){l.key==="Escape"&&a()}if(e)return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[e,a]),{isOpen:e,toggle:r,open:i,close:a,dropdownRef:n}}function S7(e,t,n=!0){var f;const{showError:r}=KQ(),i=(f=De(at().activeSession$))==null?void 0:f.client,a=n?xm(t)||"text/plain":"",[s,l]=_.useState(""),[c,d]=_.useState(!1);return _.useEffect(()=>{if(!i||!n||!a)return;let m=!1;return d(!0),i.browse.resourceRepresentation(e,{accept:a}).then(({data:p})=>{m||(l($0(p,a)),d(!1))}).catch(p=>{m||(console.error("Failed to fetch representation:",p),r("Failed to load resource representation"),d(!1))}),()=>{m=!0}},[i,e,a,n,r]),{content:s,loading:c}}_.createContext(void 0);function w7(e,t){const n=at(),r=De(n.activeSession$),i=_.useRef(t);_.useEffect(()=>{i.current=t}),_.useEffect(()=>{const a=[];return a.push(n.on(e,s=>i.current(s))),r&&a.push(r.subscribe(e,s=>i.current(s))),()=>{for(const s of a)s()}},[e,n,r])}function La(e){const t=at(),n=De(t.activeSession$),r=_.useRef(e);_.useEffect(()=>{r.current=e});const i=_.useMemo(()=>Object.keys(e).sort(),[Object.keys(e).sort().join(",")]);_.useEffect(()=>{const a=[];for(const s of i){const l=s,c=d=>{const f=r.current[l];f&&f(d)};a.push(t.on(l,c)),n&&a.push(n.subscribe(l,c))}return()=>{for(const s of a)s()}},[i,t,n])}var oR=_.createContext(null);function hc(){const e=_.useContext(oR);return e||{announce:()=>{}}}function ese({children:e}){const[t,n]=_.useState(""),[r,i]=_.useState(""),a=_.useCallback((s,l="polite")=>{l==="assertive"?(i(s),setTimeout(()=>i(""),1e3)):(n(s),setTimeout(()=>n(""),1e3))},[]);return g.jsxs(oR.Provider,{value:{announce:a},children:[e,g.jsx("div",{role:"status","aria-live":"polite","aria-atomic":"true",className:"semiont-sr-only",children:t}),g.jsx("div",{role:"alert","aria-live":"assertive","aria-atomic":"true",className:"semiont-sr-only",children:r})]})}function _7(){const{announce:e}=hc(),t=_.useCallback(a=>{const s=a?`Loading ${a}...`:"Loading resource...";e(s,"polite")},[e]),n=_.useCallback(a=>{e(`${a} loaded successfully`,"polite")},[e]),r=_.useCallback(a=>{const s=a?`Failed to load ${a}`:"Failed to load resource";e(s,"assertive")},[e]),i=_.useCallback(a=>{e(`Updating ${a}...`,"polite")},[e]);return{announceResourceLoading:t,announceResourceLoaded:n,announceResourceLoadError:r,announceResourceUpdating:i}}function k7(){const{announce:e}=hc(),t=_.useCallback(()=>{e("Submitting form...","polite")},[e]),n=_.useCallback(a=>{e(a||"Form submitted successfully","polite")},[e]),r=_.useCallback(a=>{e(a||"Form submission failed. Please check your entries and try again.","assertive")},[e]),i=_.useCallback(a=>{const s=a===1?"There is 1 field with an error":`There are ${a} fields with errors`;e(s,"assertive")},[e]);return{announceFormSubmitting:t,announceFormSuccess:n,announceFormError:r,announceFormValidationError:i}}function j7(){const{announce:e}=hc(),t=_.useCallback(r=>{e(`Changing language to ${r}...`,"polite")},[e]),n=_.useCallback(r=>{e(`Language changed to ${r}`,"polite")},[e]);return{announceLanguageChanging:t,announceLanguageChanged:n}}var lR=_.createContext(void 0);function tse({children:e}){var d;const[t,n]=_.useState(new Set),{announce:r}=hc(),i=(d=De(at().activeSession$))==null?void 0:d.client,a=_.useCallback(async(f,m,p,O=[])=>{if(!i)throw new Error("Not authenticated");try{const b={motivation:m,target:{source:f,selector:p},body:O},x=await i.mark.annotation(f,b);return x.annotationId&&(n(w=>new Set(w).add(x.annotationId)),setTimeout(()=>{n(w=>{const k=new Set(w);return k.delete(x.annotationId),k})},6e3),r("Annotation created","polite")),x.annotationId}catch(b){throw console.error("Failed to create annotation:",b),r("Failed to create annotation","assertive"),b}},[i,r]),s=_.useCallback(f=>{n(m=>{const p=new Set(m);return p.delete(f),p})},[]),l=_.useCallback(f=>{n(m=>new Set(m).add(f)),setTimeout(()=>{n(m=>{const p=new Set(m);return p.delete(f),p})},6e3)},[]),c=_.useMemo(()=>({newAnnotationIds:t,markAnnotation:a,clearNewAnnotationId:s,triggerSparkleAnimation:l}),[t,a,s,l]);return g.jsx(lR.Provider,{value:c,children:e})}function Ix(){const e=_.useContext(lR);if(!e)throw new Error("useResourceAnnotations must be used within ResourceAnnotationsProvider");return e}var T7=class{constructor(e,t,n,r){this.state=e,this.pos=t,this.explicit=n,this.view=r,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=Ln(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),n=Math.max(t.from,this.pos-250),r=t.text.slice(n-t.from,this.pos-t.from),i=r.search(Q7(e));return i<0?null:{from:n+i,to:this.pos,text:r.slice(i)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,n){e=="abort"&&this.abortListeners&&(this.abortListeners.push(t),n&&n.onDocChange&&(this.abortOnDocChange=!0))}};function gT(e){let t=Object.keys(e).join(""),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,"")),`[${n?"\\w":""}${t.replace(/[^\w\s]/g,"\\$&")}]`}function C7(e){let t=Object.create(null),n=Object.create(null);for(let{label:i}of e){t[i[0]]=!0;for(let a=1;a<i.length;a++)n[i[a]]=!0}let r=gT(t)+gT(n)+"*$";return[new RegExp("^"+r),new RegExp(r)]}function E7(e){let t=e.map(i=>typeof i=="string"?{label:i}:i),[n,r]=t.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:C7(t);return i=>{let a=i.matchBefore(r);return a||i.explicit?{from:a?a.from:i.pos,options:t,validFor:n}:null}}function A7(e,t){return n=>{for(let r=Ln(n.state).resolveInner(n.pos,-1);r;r=r.parent){if(e.indexOf(r.name)>-1)return null;if(r.type.isTop)break}return t(n)}}function Q7(e,t){var n;let{source:r}=e,i=r[r.length-1]!="$";return i?new RegExp(`(?:${r})${i?"$":""}`,(n=e.flags)!==null&&n!==void 0?n:e.ignoreCase?"i":""):e}var P7=qo.define(),N7=$e.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}}),R7=class{constructor(e,t,n,r){this.field=e,this.line=t,this.from=n,this.to=r}},M7=class cR{constructor(t,n,r){this.field=t,this.from=n,this.to=r}map(t){let n=t.mapPos(this.from,-1,Gn.TrackDel),r=t.mapPos(this.to,1,Gn.TrackDel);return n==null||r==null?null:new cR(this.field,n,r)}},D7=class uR{constructor(t,n){this.lines=t,this.fieldPositions=n}instantiate(t,n){let r=[],i=[n],a=t.doc.lineAt(n),s=/^\s*/.exec(a.text)[0];for(let c of this.lines){if(r.length){let d=s,f=/^\t*/.exec(c)[0].length;for(let m=0;m<f;m++)d+=t.facet(FN);i.push(n+d.length-f),c=d+c.slice(f)}r.push(c),n+=c.length+1}let l=this.fieldPositions.map(c=>new M7(c.field,i[c.line]+c.from,i[c.line]+c.to));return{text:r,ranges:l}}static parse(t){let n=[],r=[],i=[],a;for(let s of t.split(/\r\n?|\n/)){for(;a=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(s);){let l=a[1]?+a[1]:null,c=a[2]||a[3]||"",d=-1,f=c.replace(/\\[{}]/g,m=>m[1]);for(let m=0;m<n.length;m++)(l!=null?n[m].seq==l:f&&n[m].name==f)&&(d=m);if(d<0){let m=0;for(;m<n.length&&(l==null||n[m].seq!=null&&n[m].seq<l);)m++;n.splice(m,0,{seq:l,name:f}),d=m;for(let p of i)p.field>=d&&p.field++}for(let m of i)if(m.line==r.length&&m.from>a.index){let p=a[2]?3+(a[1]||"").length:2;m.from-=p,m.to-=p}i.push(new R7(d,r.length,a.index,a.index+f.length)),s=s.slice(0,a.index)+c+s.slice(a.index+a[0].length)}s=s.replace(/\\([{}])/g,(l,c,d)=>{for(let f of i)f.line==r.length&&f.from>d&&(f.from--,f.to--);return c}),r.push(s)}return new uR(r,i)}},L7=qt.widget({widget:new class extends dc{toDOM(){let e=document.createElement("span");return e.className="cm-snippetFieldPosition",e}ignoreEvent(){return!1}}}),z7=qt.mark({class:"cm-snippetField"}),yp=class dR{constructor(t,n){this.ranges=t,this.active=n,this.deco=qt.set(t.map(r=>(r.from==r.to?L7:z7).range(r.from,r.to)),!0)}map(t){let n=[];for(let r of this.ranges){let i=r.map(t);if(!i)return null;n.push(i)}return new dR(n,this.active)}selectionInsideField(t){return t.ranges.every(n=>this.ranges.some(r=>r.field==this.active&&r.from<=n.from&&r.to>=n.to))}},Zd=tn.define({map(e,t){return e&&e.map(t)}}),$7=tn.define(),xd=Xs.define({create(){return null},update(e,t){for(let n of t.effects){if(n.is(Zd))return n.value;if(n.is($7)&&e)return new yp(e.ranges,n.value)}return e&&t.docChanged&&(e=e.map(t.changes)),e&&t.selection&&!e.selectionInsideField(t.selection)&&(e=null),e},provide:e=>$e.decorations.from(e,t=>t?t.deco:qt.none)});function qx(e,t){return Ae.create(e.filter(n=>n.field==t).map(n=>Ae.range(n.from,n.to)))}function I7(e){let t=D7.parse(e);return(n,r,i,a)=>{let{text:s,ranges:l}=t.instantiate(n.state,i),{main:c}=n.state.selection,d={changes:{from:i,to:a==c.from?c.to:a,insert:_t.of(s)},scrollIntoView:!0,annotations:r?[P7.of(r),si.userEvent.of("input.complete")]:void 0};if(l.length&&(d.selection=qx(l,0)),l.some(f=>f.field>0)){let f=new yp(l,0),m=d.effects=[Zd.of(f)];n.state.field(xd,!1)===void 0&&m.push(tn.appendConfig.of([xd,V7,U7,N7]))}n.dispatch(n.state.update(d))}}function fR(e){return({state:t,dispatch:n})=>{let r=t.field(xd,!1);if(!r||e<0&&r.active==0)return!1;let i=r.active+e,a=e>0&&!r.ranges.some(s=>s.field==i+e);return n(t.update({selection:qx(r.ranges,i),effects:Zd.of(a?null:new yp(r.ranges,i)),scrollIntoView:!0})),!0}}var q7=({state:e,dispatch:t})=>e.field(xd,!1)?(t(e.update({effects:Zd.of(null)})),!0):!1,X7=fR(1),Z7=fR(-1),B7=[{key:"Tab",run:X7,shift:Z7},{key:"Escape",run:q7}],vT=Ie.define({combine(e){return e.length?e[0]:B7}}),V7=$d.highest(Ex.compute([vT],e=>e.facet(vT)));function hr(e,t){return{...t,apply:I7(e)}}var U7=$e.domEventHandlers({mousedown(e,t){let n=t.state.field(xd,!1),r;if(!n||(r=t.posAtCoords({x:e.clientX,y:e.clientY}))==null)return!1;let i=n.ranges.find(a=>a.from<=r&&a.to>=r);return!i||i.field==n.active?!1:(t.dispatch({selection:qx(n.ranges,i.field),effects:Zd.of(n.ranges.some(a=>a.field>i.field)?new yp(n.ranges,i.field):null),scrollIntoView:!0}),!0)}}),hR=new class extends Ns{};hR.startSide=1;hR.endSide=-1;var OT=class mR{static create(t,n,r,i,a){let s=i+(i<<8)+t+(n<<4)|0;return new mR(t,n,r,s,a,[],[])}constructor(t,n,r,i,a,s,l){this.type=t,this.value=n,this.from=r,this.hash=i,this.end=a,this.children=s,this.positions=l,this.hashProp=[[Ge.contextHash,i]]}addChild(t,n){t.prop(Ge.contextHash)!=this.hash&&(t=new At(t.type,t.children,t.positions,t.length,this.hashProp)),this.children.push(t),this.positions.push(n)}toTree(t,n=this.end){let r=this.children.length-1;return r>=0&&(n=Math.max(n,this.positions[r]+this.children[r].length+this.from)),new At(t.types[this.type],this.children,this.positions,n-this.from).balance({makeTree:(i,a,s)=>new At(Dn.none,i,a,s,this.hashProp)})}},me;(function(e){e[e.Document=1]="Document",e[e.CodeBlock=2]="CodeBlock",e[e.FencedCode=3]="FencedCode",e[e.Blockquote=4]="Blockquote",e[e.HorizontalRule=5]="HorizontalRule",e[e.BulletList=6]="BulletList",e[e.OrderedList=7]="OrderedList",e[e.ListItem=8]="ListItem",e[e.ATXHeading1=9]="ATXHeading1",e[e.ATXHeading2=10]="ATXHeading2",e[e.ATXHeading3=11]="ATXHeading3",e[e.ATXHeading4=12]="ATXHeading4",e[e.ATXHeading5=13]="ATXHeading5",e[e.ATXHeading6=14]="ATXHeading6",e[e.SetextHeading1=15]="SetextHeading1",e[e.SetextHeading2=16]="SetextHeading2",e[e.HTMLBlock=17]="HTMLBlock",e[e.LinkReference=18]="LinkReference",e[e.Paragraph=19]="Paragraph",e[e.CommentBlock=20]="CommentBlock",e[e.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",e[e.Escape=22]="Escape",e[e.Entity=23]="Entity",e[e.HardBreak=24]="HardBreak",e[e.Emphasis=25]="Emphasis",e[e.StrongEmphasis=26]="StrongEmphasis",e[e.Link=27]="Link",e[e.Image=28]="Image",e[e.InlineCode=29]="InlineCode",e[e.HTMLTag=30]="HTMLTag",e[e.Comment=31]="Comment",e[e.ProcessingInstruction=32]="ProcessingInstruction",e[e.Autolink=33]="Autolink",e[e.HeaderMark=34]="HeaderMark",e[e.QuoteMark=35]="QuoteMark",e[e.ListMark=36]="ListMark",e[e.LinkMark=37]="LinkMark",e[e.EmphasisMark=38]="EmphasisMark",e[e.CodeMark=39]="CodeMark",e[e.CodeText=40]="CodeText",e[e.CodeInfo=41]="CodeInfo",e[e.LinkTitle=42]="LinkTitle",e[e.LinkLabel=43]="LinkLabel",e[e.URL=44]="URL"})(me||(me={}));var Y7=class{constructor(e,t){this.start=e,this.content=t,this.marks=[],this.parsers=[]}},W7=class{constructor(){this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return Zu(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,t=0,n=0){for(let r=t;r<e;r++)n+=this.text.charCodeAt(r)==9?4-n%4:1;return n}findColumn(e){let t=0;for(let n=0;t<this.text.length&&n<e;t++)n+=this.text.charCodeAt(t)==9?4-n%4:1;return t}scrub(){if(!this.baseIndent)return this.text;let e="";for(let t=0;t<this.basePos;t++)e+=" ";return e+this.text.slice(this.basePos)}};function bT(e,t,n){if(n.pos==n.text.length||e!=t.block&&n.indent>=t.stack[n.depth+1].value+n.baseIndent)return!0;if(n.indent>=n.baseIndent+4)return!1;let r=(e.type==me.OrderedList?Bx:Zx)(n,t,!1);return r>0&&(e.type!=me.BulletList||Xx(n,t,!1)<0)&&n.text.charCodeAt(n.pos+r-1)==e.value}var pR={[me.Blockquote](e,t,n){return n.next!=62?!1:(n.markers.push(mt(me.QuoteMark,t.lineStart+n.pos,t.lineStart+n.pos+1)),n.moveBase(n.pos+(fi(n.text.charCodeAt(n.pos+1))?2:1)),e.end=t.lineStart+n.text.length,!0)},[me.ListItem](e,t,n){return n.indent<n.baseIndent+e.value&&n.next>-1?!1:(n.moveBaseColumn(n.baseIndent+e.value),!0)},[me.OrderedList]:bT,[me.BulletList]:bT,[me.Document](){return!0}};function fi(e){return e==32||e==9||e==10||e==13}function Zu(e,t=0){for(;t<e.length&&fi(e.charCodeAt(t));)t++;return t}function yT(e,t,n){for(;t>n&&fi(e.charCodeAt(t-1));)t--;return t}function gR(e){if(e.next!=96&&e.next!=126)return-1;let t=e.pos+1;for(;t<e.text.length&&e.text.charCodeAt(t)==e.next;)t++;if(t<e.pos+3)return-1;if(e.next==96){for(let n=t;n<e.text.length;n++)if(e.text.charCodeAt(n)==96)return-1}return t}function vR(e){return e.next!=62?-1:e.text.charCodeAt(e.pos+1)==32?2:1}function Xx(e,t,n){if(e.next!=42&&e.next!=45&&e.next!=95)return-1;let r=1;for(let i=e.pos+1;i<e.text.length;i++){let a=e.text.charCodeAt(i);if(a==e.next)r++;else if(!fi(a))return-1}return n&&e.next==45&&yR(e)>-1&&e.depth==t.stack.length&&t.parser.leafBlockParsers.indexOf(_R.SetextHeading)>-1||r<3?-1:1}function OR(e,t){for(let n=e.stack.length-1;n>=0;n--)if(e.stack[n].type==t)return!0;return!1}function Zx(e,t,n){return(e.next==45||e.next==43||e.next==42)&&(e.pos==e.text.length-1||fi(e.text.charCodeAt(e.pos+1)))&&(!n||OR(t,me.BulletList)||e.skipSpace(e.pos+2)<e.text.length)?1:-1}function Bx(e,t,n){let r=e.pos,i=e.next;for(;i>=48&&i<=57;){r++;if(r==e.text.length)return-1;i=e.text.charCodeAt(r)}return r==e.pos||r>e.pos+9||i!=46&&i!=41||r<e.text.length-1&&!fi(e.text.charCodeAt(r+1))||n&&!OR(t,me.OrderedList)&&(e.skipSpace(r+1)==e.text.length||r>e.pos+1||e.next!=49)?-1:r+1-e.pos}function bR(e){if(e.next!=35)return-1;let t=e.pos+1;for(;t<e.text.length&&e.text.charCodeAt(t)==35;)t++;if(t<e.text.length&&e.text.charCodeAt(t)!=32)return-1;let n=t-e.pos;return n>6?-1:n}function yR(e){if(e.next!=45&&e.next!=61||e.indent>=e.baseIndent+4)return-1;let t=e.pos+1;for(;t<e.text.length&&e.text.charCodeAt(t)==e.next;)t++;let n=t;for(;t<e.text.length&&fi(e.text.charCodeAt(t));)t++;return t==e.text.length?n:-1}var Wy=/^[ \t]*$/,xR=/-->/,SR=/\?>/,Fy=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*<!--/,xR],[/^\s*<\?/,SR],[/^\s*<![A-Z]/,/>/],[/^\s*<!\[CDATA\[/,/\]\]>/],[/^\s*<\/?(?: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|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|\/?>|$)/i,Wy],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,Wy]];function wR(e,t,n){if(e.next!=60)return-1;let r=e.text.slice(e.pos);for(let i=0,a=Fy.length-(n?1:0);i<a;i++)if(Fy[i][0].test(r))return i;return-1}function xT(e,t){let n=e.countIndent(t,e.pos,e.indent),r=e.countIndent(e.skipSpace(t),t,n);return r>=n+5?n+1:r}function ms(e,t,n){let r=e.length-1;r>=0&&e[r].to==t&&e[r].type==me.CodeText?e[r].to=n:e.push(mt(me.CodeText,t,n))}var zh={LinkReference:void 0,IndentedCode(e,t){let n=t.baseIndent+4;if(t.indent<n)return!1;let r=t.findColumn(n),i=e.lineStart+r,a=e.lineStart+t.text.length,s=[],l=[];for(ms(s,i,a);e.nextLine()&&t.depth>=e.stack.length;)if(t.pos==t.text.length){ms(l,e.lineStart-1,e.lineStart);for(let c of t.markers)l.push(c)}else{if(t.indent<n)break;{if(l.length){for(let d of l)d.type==me.CodeText?ms(s,d.from,d.to):s.push(d);l=[]}ms(s,e.lineStart-1,e.lineStart);for(let d of t.markers)s.push(d);a=e.lineStart+t.text.length;let c=e.lineStart+t.findColumn(t.baseIndent+4);c<a&&ms(s,c,a)}}return l.length&&(l=l.filter(c=>c.type!=me.CodeText),l.length&&(t.markers=l.concat(t.markers))),e.addNode(e.buffer.writeElements(s,-i).finish(me.CodeBlock,a-i),i),!0},FencedCode(e,t){let n=gR(t);if(n<0)return!1;let r=e.lineStart+t.pos,i=t.next,a=n-t.pos,s=t.skipSpace(n),l=yT(t.text,t.text.length,s),c=[mt(me.CodeMark,r,r+a)];s<l&&c.push(mt(me.CodeInfo,e.lineStart+s,e.lineStart+l));for(let d=!0,f=!0,m=!1;e.nextLine()&&t.depth>=e.stack.length;d=!1){let p=t.pos;if(t.indent-t.baseIndent<4)for(;p<t.text.length&&t.text.charCodeAt(p)==i;)p++;if(p-t.pos>=a&&t.skipSpace(p)==t.text.length){for(let O of t.markers)c.push(O);f&&m&&ms(c,e.lineStart-1,e.lineStart),c.push(mt(me.CodeMark,e.lineStart+t.pos,e.lineStart+p)),e.nextLine();break}else{m=!0,d||(ms(c,e.lineStart-1,e.lineStart),f=!1);for(let x of t.markers)c.push(x);let O=e.lineStart+t.basePos,b=e.lineStart+t.text.length;O<b&&(ms(c,O,b),f=!1)}}return e.addNode(e.buffer.writeElements(c,-r).finish(me.FencedCode,e.prevLineEnd()-r),r),!0},Blockquote(e,t){let n=vR(t);return n<0?!1:(e.startContext(me.Blockquote,t.pos),e.addNode(me.QuoteMark,e.lineStart+t.pos,e.lineStart+t.pos+1),t.moveBase(t.pos+n),null)},HorizontalRule(e,t){if(Xx(t,e,!1)<0)return!1;let n=e.lineStart+t.pos;return e.nextLine(),e.addNode(me.HorizontalRule,n),!0},BulletList(e,t){let n=Zx(t,e,!1);if(n<0)return!1;e.block.type!=me.BulletList&&e.startContext(me.BulletList,t.basePos,t.next);let r=xT(t,t.pos+1);return e.startContext(me.ListItem,t.basePos,r-t.baseIndent),e.addNode(me.ListMark,e.lineStart+t.pos,e.lineStart+t.pos+n),t.moveBaseColumn(r),null},OrderedList(e,t){let n=Bx(t,e,!1);if(n<0)return!1;e.block.type!=me.OrderedList&&e.startContext(me.OrderedList,t.basePos,t.text.charCodeAt(t.pos+n-1));let r=xT(t,t.pos+n);return e.startContext(me.ListItem,t.basePos,r-t.baseIndent),e.addNode(me.ListMark,e.lineStart+t.pos,e.lineStart+t.pos+n),t.moveBaseColumn(r),null},ATXHeading(e,t){let n=bR(t);if(n<0)return!1;let r=t.pos,i=e.lineStart+r,a=yT(t.text,t.text.length,r),s=a;for(;s>r&&t.text.charCodeAt(s-1)==t.next;)s--;(s==a||s==r||!fi(t.text.charCodeAt(s-1)))&&(s=t.text.length);let l=e.buffer.write(me.HeaderMark,0,n).writeElements(e.parser.parseInline(t.text.slice(r+n+1,s),i+n+1),-i);s<t.text.length&&l.write(me.HeaderMark,s-r,a-r);let c=l.finish(me.ATXHeading1-1+n,t.text.length-r);return e.nextLine(),e.addNode(c,i),!0},HTMLBlock(e,t){let n=wR(t,e,!1);if(n<0)return!1;let r=e.lineStart+t.pos,i=Fy[n][1],a=[],s=i!=Wy;for(;!i.test(t.text)&&e.nextLine();){if(t.depth<e.stack.length){s=!1;break}for(let d of t.markers)a.push(d)}s&&e.nextLine();let l=i==xR?me.CommentBlock:i==SR?me.ProcessingInstructionBlock:me.HTMLBlock,c=e.prevLineEnd();return e.addNode(e.buffer.writeElements(a,-r).finish(l,c-r),r),!0},SetextHeading:void 0},F7=class{constructor(e){this.stage=0,this.elts=[],this.pos=0,this.start=e.start,this.advance(e.content)}nextLine(e,t,n){if(this.stage==-1)return!1;let r=n.content+`
|
|
113
|
-
`+t.scrub(),i=this.advance(r);return i>-1&&i<r.length?this.complete(e,n,i):!1}finish(e,t){return(this.stage==2||this.stage==3)&&Zu(t.content,this.pos)==t.content.length?this.complete(e,t,t.content.length):!1}complete(e,t,n){return e.addLeafElement(t,mt(me.LinkReference,this.start,this.start+n,this.elts)),!0}nextStage(e){return e?(this.pos=e.to-this.start,this.elts.push(e),this.stage++,!0):(e===!1&&(this.stage=-1),!1)}advance(e){for(;;){if(this.stage==-1)return-1;if(this.stage==0){if(!this.nextStage(MR(e,this.pos,this.start,!0)))return-1;if(e.charCodeAt(this.pos)!=58)return this.stage=-1;this.elts.push(mt(me.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else if(this.stage==1){if(!this.nextStage(NR(e,Zu(e,this.pos),this.start)))return-1}else if(this.stage==2){let t=Zu(e,this.pos),n=0;if(t>this.pos){let r=RR(e,t,this.start);if(r){let i=XO(e,r.to-this.start);i>0&&(this.nextStage(r),n=i)}}return n||(n=XO(e,this.pos)),n>0&&n<e.length?n:-1}else return XO(e,this.pos)}}};function XO(e,t){for(;t<e.length;t++){let n=e.charCodeAt(t);if(n==10)break;if(!fi(n))return-1}return t}var H7=class{nextLine(e,t,n){let r=t.depth<e.stack.length?-1:yR(t),i=t.next;if(r<0)return!1;let a=mt(me.HeaderMark,e.lineStart+t.pos,e.lineStart+r);return e.nextLine(),e.addLeafElement(n,mt(i==61?me.SetextHeading1:me.SetextHeading2,n.start,e.prevLineEnd(),[...e.parser.parseInline(n.content,n.start),a])),!0}finish(){return!1}},_R={LinkReference(e,t){return t.content.charCodeAt(0)==91?new F7(t):null},SetextHeading(){return new H7}},G7=[(e,t)=>bR(t)>=0,(e,t)=>gR(t)>=0,(e,t)=>vR(t)>=0,(e,t)=>Zx(t,e,!0)>=0,(e,t)=>Bx(t,e,!0)>=0,(e,t)=>Xx(t,e,!0)>=0,(e,t)=>wR(t,e,!0)>=0],K7={text:"",end:0},J7=class{constructor(e,t,n,r){this.parser=e,this.input=t,this.ranges=r,this.line=new W7,this.atEnd=!1,this.reusePlaceholders=new Map,this.stoppedAt=null,this.rangeI=0,this.to=r[r.length-1].to,this.lineStart=this.absoluteLineStart=this.absoluteLineEnd=r[0].from,this.block=OT.create(me.Document,0,this.lineStart,0,0),this.stack=[this.block],this.fragments=n.length?new nV(n,t):null,this.readLine()}get parsedPos(){return this.absoluteLineStart}advance(){if(this.stoppedAt!=null&&this.absoluteLineStart>this.stoppedAt)return this.finish();let{line:e}=this;for(;;){for(let n=0;;){let r=e.depth<this.stack.length?this.stack[this.stack.length-1]:null;for(;n<e.markers.length&&(!r||e.markers[n].from<r.end);){let i=e.markers[n++];this.addNode(i.type,i.from,i.to)}if(!r)break;this.finishContext()}if(e.pos<e.text.length)break;if(!this.nextLine())return this.finish()}if(this.fragments&&this.reuseFragment(e.basePos))return null;e:for(;;){for(let n of this.parser.blockParsers)if(n){let r=n(this,e);if(r!=!1){if(r==!0)return null;e.forward();continue e}}break}let t=new Y7(this.lineStart+e.pos,e.text.slice(e.pos));for(let n of this.parser.leafBlockParsers)if(n){let r=n(this,t);r&&t.parsers.push(r)}e:for(;this.nextLine()&&e.pos!=e.text.length;){if(e.indent<e.baseIndent+4){for(let n of this.parser.endLeafBlock)if(n(this,e,t))break e}for(let n of t.parsers)if(n.nextLine(this,e,t))return null;t.content+=`
|
|
114
|
-
`+e.scrub();for(let n of e.markers)t.marks.push(n)}return this.finishLeaf(t),null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}reuseFragment(e){if(!this.fragments.moveTo(this.absoluteLineStart+e,this.absoluteLineStart)||!this.fragments.matches(this.block.hash))return!1;let t=this.fragments.takeNodes(this);return t?(this.absoluteLineStart+=t,this.lineStart=DR(this.absoluteLineStart,this.ranges),this.moveRangeI(),this.absoluteLineStart<this.to?(this.lineStart++,this.absoluteLineStart++,this.readLine()):(this.atEnd=!0,this.readLine()),!0):!1}get depth(){return this.stack.length}parentType(e=this.depth-1){return this.parser.nodeSet.types[this.stack[e].type]}nextLine(){return this.lineStart+=this.line.text.length,this.absoluteLineEnd>=this.to?(this.absoluteLineStart=this.absoluteLineEnd,this.atEnd=!0,this.readLine(),!1):(this.lineStart++,this.absoluteLineStart=this.absoluteLineEnd+1,this.moveRangeI(),this.readLine(),!0)}peekLine(){return this.scanLine(this.absoluteLineEnd+1).text}moveRangeI(){for(;this.rangeI<this.ranges.length-1&&this.absoluteLineStart>=this.ranges[this.rangeI].to;)this.rangeI++,this.absoluteLineStart=Math.max(this.absoluteLineStart,this.ranges[this.rangeI].from)}scanLine(e){let t=K7;if(t.end=e,e>=this.to)t.text="";else if(t.text=this.lineChunkAt(e),t.end+=t.text.length,this.ranges.length>1){let n=this.absoluteLineStart,r=this.rangeI;for(;this.ranges[r].to<t.end;){r++;let i=this.ranges[r].from,a=this.lineChunkAt(i);t.end=i+a.length,t.text=t.text.slice(0,this.ranges[r-1].to-n)+a,n=t.end-t.text.length}}return t}readLine(){let{line:e}=this,{text:t,end:n}=this.scanLine(this.absoluteLineStart);for(this.absoluteLineEnd=n,e.reset(t);e.depth<this.stack.length;e.depth++){let r=this.stack[e.depth],i=this.parser.skipContextMarkup[r.type];if(!i)throw new Error("Unhandled block context "+me[r.type]);let a=this.line.markers.length;if(!i(r,this,e)){this.line.markers.length>a&&(r.end=this.line.markers[this.line.markers.length-1].to),e.forward();break}e.forward()}}lineChunkAt(e){let t=this.input.chunk(e),n;if(this.input.lineChunks)n=t==`
|
|
115
|
-
`?"":t;else{let r=t.indexOf(`
|
|
116
|
-
`);n=r<0?t:t.slice(0,r)}return e+n.length>this.to?n.slice(0,this.to-e):n}prevLineEnd(){return this.atEnd?this.lineStart:this.lineStart-1}startContext(e,t,n=0){this.block=OT.create(e,n,this.lineStart+t,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(e,t,n=0){this.startContext(this.parser.getNodeType(e),t,n)}addNode(e,t,n){typeof e=="number"&&(e=new At(this.parser.nodeSet.types[e],tc,tc,(n??this.prevLineEnd())-t)),this.block.addChild(e,t-this.block.from)}addElement(e){this.block.addChild(e.toTree(this.parser.nodeSet),e.from-this.block.from)}addLeafElement(e,t){this.addNode(this.buffer.writeElements(Gy(t.children,e.marks),-t.from).finish(t.type,t.to-t.from),t.from)}finishContext(){let e=this.stack.pop(),t=this.stack[this.stack.length-1];t.addChild(e.toTree(this.parser.nodeSet),e.from-t.from),this.block=t}finish(){for(;this.stack.length>1;)this.finishContext();return this.addGaps(this.block.toTree(this.parser.nodeSet,this.lineStart))}addGaps(e){return this.ranges.length>1?kR(this.ranges,0,e.topNode,this.ranges[0].from,this.reusePlaceholders):e}finishLeaf(e){for(let n of e.parsers)if(n.finish(this,e))return;let t=Gy(this.parser.parseInline(e.content,e.start),e.marks);this.addNode(this.buffer.writeElements(t,-e.start).finish(me.Paragraph,e.content.length),e.start)}elt(e,t,n,r){return typeof e=="string"?mt(this.parser.getNodeType(e),t,n,r):new AR(e,t)}get buffer(){return new ER(this.parser.nodeSet)}};function kR(e,t,n,r,i){let a=e[t].to,s=[],l=[],c=n.from+r;function d(f,m){for(;m?f>=a:f>a;){let p=e[t+1].from-a;r+=p,f+=p,t++,a=e[t].to}}for(let f=n.firstChild;f;f=f.nextSibling){d(f.from+r,!0);let m=f.from+r,p,O=i.get(f.tree);O?p=O:f.to+r>a?(p=kR(e,t,f,r,i),d(f.to+r,!1)):p=f.toTree(),s.push(p),l.push(m-c)}return d(n.to+r,!1),new At(n.type,s,l,n.to+r-c,n.tree?n.tree.propValues:void 0)}var jR=class TR extends Nx{constructor(t,n,r,i,a,s,l,c,d){super(),this.nodeSet=t,this.blockParsers=n,this.leafBlockParsers=r,this.blockNames=i,this.endLeafBlock=a,this.skipContextMarkup=s,this.inlineParsers=l,this.inlineNames=c,this.wrappers=d,this.nodeTypes=Object.create(null);for(let f of t.types)this.nodeTypes[f.name]=f.id}createParse(t,n,r){let i=new J7(this,t,n,r);for(let a of this.wrappers)i=a(i,t,n,r);return i}configure(t){let n=Hy(t);if(!n)return this;let{nodeSet:r,skipContextMarkup:i}=this,a=this.blockParsers.slice(),s=this.leafBlockParsers.slice(),l=this.blockNames.slice(),c=this.inlineParsers.slice(),d=this.inlineNames.slice(),f=this.endLeafBlock.slice(),m=this.wrappers;if(gu(n.defineNodes)){i=Object.assign({},i);let p=r.types.slice(),O;for(let b of n.defineNodes){let{name:x,block:w,composite:k,style:T}=typeof b=="string"?{name:b}:b;if(p.some(Q=>Q.name==x))continue;k&&(i[p.length]=(Q,P,N)=>k(P,N,Q.value));let j=p.length,E=k?["Block","BlockContext"]:w?j>=me.ATXHeading1&&j<=me.SetextHeading2?["Block","LeafBlock","Heading"]:["Block","LeafBlock"]:void 0;p.push(Dn.define({id:j,name:x,props:E&&[[Ge.group,E]]})),T&&(O||(O={}),Array.isArray(T)||T instanceof Ui?O[x]=T:Object.assign(O,T))}r=new Ax(p),O&&(r=r.extend(Xo(O)))}if(gu(n.props)&&(r=r.extend(...n.props)),gu(n.remove))for(let p of n.remove){let O=this.blockNames.indexOf(p),b=this.inlineNames.indexOf(p);O>-1&&(a[O]=s[O]=void 0),b>-1&&(c[b]=void 0)}if(gu(n.parseBlock))for(let p of n.parseBlock){let O=l.indexOf(p.name);if(O>-1)a[O]=p.parse,s[O]=p.leaf;else{let b=p.before?$h(l,p.before):p.after?$h(l,p.after)+1:l.length-1;a.splice(b,0,p.parse),s.splice(b,0,p.leaf),l.splice(b,0,p.name)}p.endLeaf&&f.push(p.endLeaf)}if(gu(n.parseInline))for(let p of n.parseInline){let O=d.indexOf(p.name);if(O>-1)c[O]=p.parse;else{let b=p.before?$h(d,p.before):p.after?$h(d,p.after)+1:d.length-1;c.splice(b,0,p.parse),d.splice(b,0,p.name)}}return n.wrap&&(m=m.concat(n.wrap)),new TR(r,a,s,l,f,i,c,d,m)}getNodeType(t){let n=this.nodeTypes[t];if(n==null)throw new RangeError(`Unknown node type '${t}'`);return n}parseInline(t,n){let r=new Vx(this,t,n);e:for(let i=n;i<r.end;){let a=r.char(i);for(let s of this.inlineParsers)if(s){let l=s(r,a,i);if(l>=0){i=l;continue e}}i++}return r.resolveMarkers(0)}};function gu(e){return e!=null&&e.length>0}function Hy(e){if(!Array.isArray(e))return e;if(e.length==0)return null;let t=Hy(e[0]);if(e.length==1)return t;let n=Hy(e.slice(1));if(!n||!t)return t||n;let r=(s,l)=>(s||tc).concat(l||tc),i=t.wrap,a=n.wrap;return{props:r(t.props,n.props),defineNodes:r(t.defineNodes,n.defineNodes),parseBlock:r(t.parseBlock,n.parseBlock),parseInline:r(t.parseInline,n.parseInline),remove:r(t.remove,n.remove),wrap:i?a?(s,l,c,d)=>i(a(s,l,c,d),l,c,d):i:a}}function $h(e,t){let n=e.indexOf(t);if(n<0)throw new RangeError(`Position specified relative to unknown parser ${t}`);return n}var CR=[Dn.none];for(let e=1,t;t=me[e];e++)CR[e]=Dn.define({id:e,name:t,props:e>=me.Escape?[]:[[Ge.group,e in pR?["Block","BlockContext"]:["Block","LeafBlock"]]],top:t=="Document"});var tc=[],ER=class{constructor(t){this.nodeSet=t,this.content=[],this.nodes=[]}write(t,n,r,i=0){return this.content.push(t,n,r,4+i*4),this}writeElements(t,n=0){for(let r of t)r.writeTo(this,n);return this}finish(t,n){return At.build({buffer:this.content,nodeSet:this.nodeSet,reused:this.nodes,topID:t,length:n})}},Sd=class{constructor(e,t,n,r=tc){this.type=e,this.from=t,this.to=n,this.children=r}writeTo(e,t){let n=e.content.length;e.writeElements(this.children,t),e.content.push(this.type,this.from+t,this.to+t,e.content.length+4-n)}toTree(e){return new ER(e).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}},AR=class{constructor(e,t){this.tree=e,this.from=t}get to(){return this.from+this.tree.length}get type(){return this.tree.type.id}get children(){return tc}writeTo(e,t){e.nodes.push(this.tree),e.content.push(e.nodes.length-1,this.from+t,this.to+t,-1)}toTree(){return this.tree}};function mt(e,t,n,r){return new Sd(e,t,n,r)}var QR={resolve:"Emphasis",mark:"EmphasisMark"},PR={resolve:"Emphasis",mark:"EmphasisMark"},Oo={},Dm={},Lr=class{constructor(e,t,n,r){this.type=e,this.from=t,this.to=n,this.side=r}},ST="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~",wd=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{wd=new RegExp("[\\p{S}|\\p{P}]","u")}catch{}var ZO={Escape(e,t,n){if(t!=92||n==e.end-1)return-1;let r=e.char(n+1);for(let i=0;i<ST.length;i++)if(ST.charCodeAt(i)==r)return e.append(mt(me.Escape,n,n+2));return-1},Entity(e,t,n){if(t!=38)return-1;let r=/^(?:#\d+|#x[a-f\d]+|\w+);/i.exec(e.slice(n+1,n+31));return r?e.append(mt(me.Entity,n,n+1+r[0].length)):-1},InlineCode(e,t,n){if(t!=96||n&&e.char(n-1)==96)return-1;let r=n+1;for(;r<e.end&&e.char(r)==96;)r++;let i=r-n,a=0;for(;r<e.end;r++)if(e.char(r)==96){if(a++,a==i&&e.char(r+1)!=96)return e.append(mt(me.InlineCode,n,r+1,[mt(me.CodeMark,n,n+i),mt(me.CodeMark,r+1-i,r+1)]))}else a=0;return-1},HTMLTag(e,t,n){if(t!=60||n==e.end-1)return-1;let r=e.slice(n+1,e.end),i=/^(?:[a-z][-\w+.]+:[^\s>]+|[a-z\d.!#$%&'*+/=?^_`{|}~-]+@[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?(?:\.[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?)*)>/i.exec(r);if(i)return e.append(mt(me.Autolink,n,n+1+i[0].length,[mt(me.LinkMark,n,n+1),mt(me.URL,n+1,n+i[0].length),mt(me.LinkMark,n+i[0].length,n+1+i[0].length)]));let a=/^!--[^>](?:-[^-]|[^-])*?-->/i.exec(r);if(a)return e.append(mt(me.Comment,n,n+1+a[0].length));let s=/^\?[^]*?\?>/.exec(r);if(s)return e.append(mt(me.ProcessingInstruction,n,n+1+s[0].length));let l=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(r);return l?e.append(mt(me.HTMLTag,n,n+1+l[0].length)):-1},Emphasis(e,t,n){if(t!=95&&t!=42)return-1;let r=n+1;for(;e.char(r)==t;)r++;let i=e.slice(n-1,n),a=e.slice(r,r+1),s=wd.test(i),l=wd.test(a),c=/\s|^$/.test(i),d=/\s|^$/.test(a),f=!d&&(!l||c||s),m=!c&&(!s||d||l),p=f&&(t==42||!m||s),O=m&&(t==42||!f||l);return e.append(new Lr(t==95?QR:PR,n,r,(p?1:0)|(O?2:0)))},HardBreak(e,t,n){if(t==92&&e.char(n+1)==10)return e.append(mt(me.HardBreak,n,n+2));if(t==32){let r=n+1;for(;e.char(r)==32;)r++;if(e.char(r)==10&&r>=n+2)return e.append(mt(me.HardBreak,n,r+1))}return-1},Link(e,t,n){return t==91?e.append(new Lr(Oo,n,n+1,1)):-1},Image(e,t,n){return t==33&&e.char(n+1)==91?e.append(new Lr(Dm,n,n+2,1)):-1},LinkEnd(e,t,n){if(t!=93)return-1;for(let r=e.parts.length-1;r>=0;r--){let i=e.parts[r];if(i instanceof Lr&&(i.type==Oo||i.type==Dm)){if(!i.side||e.skipSpace(i.to)==n&&!/[(\[]/.test(e.slice(n+1,n+2)))return e.parts[r]=null,-1;let a=e.takeContent(r),s=e.parts[r]=eV(e,a,i.type==Oo?me.Link:me.Image,i.from,n+1);if(i.type==Oo)for(let l=0;l<r;l++){let c=e.parts[l];c instanceof Lr&&c.type==Oo&&(c.side=0)}return s.to}}return-1}};function eV(e,t,n,r,i){let{text:a}=e,s=e.char(i),l=i;if(t.unshift(mt(me.LinkMark,r,r+(n==me.Image?2:1))),t.push(mt(me.LinkMark,i-1,i)),s==40){let c=e.skipSpace(i+1),d=NR(a,c-e.offset,e.offset),f;d&&(c=e.skipSpace(d.to),c!=d.to&&(f=RR(a,c-e.offset,e.offset),f&&(c=e.skipSpace(f.to)))),e.char(c)==41&&(t.push(mt(me.LinkMark,i,i+1)),l=c+1,d&&t.push(d),f&&t.push(f),t.push(mt(me.LinkMark,c,l)))}else if(s==91){let c=MR(a,i-e.offset,e.offset,!1);c&&(t.push(c),l=c.to)}return mt(n,r,l,t)}function NR(e,t,n){if(e.charCodeAt(t)==60){for(let i=t+1;i<e.length;i++){let a=e.charCodeAt(i);if(a==62)return mt(me.URL,t+n,i+1+n);if(a==60||a==10)return!1}return null}else{let i=0,a=t;for(let s=!1;a<e.length;a++){let l=e.charCodeAt(a);if(fi(l))break;if(s)s=!1;else if(l==40)i++;else if(l==41){if(!i)break;i--}else l==92&&(s=!0)}return a>t?mt(me.URL,t+n,a+n):a==e.length?null:!1}}function RR(e,t,n){let r=e.charCodeAt(t);if(r!=39&&r!=34&&r!=40)return!1;let i=r==40?41:r;for(let a=t+1,s=!1;a<e.length;a++){let l=e.charCodeAt(a);if(s)s=!1;else{if(l==i)return mt(me.LinkTitle,t+n,a+1+n);l==92&&(s=!0)}}return null}function MR(e,t,n,r){for(let i=!1,a=t+1,s=Math.min(e.length,a+999);a<s;a++){let l=e.charCodeAt(a);if(i)i=!1;else{if(l==93)return r?!1:mt(me.LinkLabel,t+n,a+1+n);if(r&&!fi(l)&&(r=!1),l==91)return!1;l==92&&(i=!0)}}return null}var Vx=class{constructor(e,t,n){this.parser=e,this.text=t,this.offset=n,this.parts=[]}char(e){return e>=this.end?-1:this.text.charCodeAt(e-this.offset)}get end(){return this.offset+this.text.length}slice(e,t){return this.text.slice(e-this.offset,t-this.offset)}append(e){return this.parts.push(e),e.to}addDelimiter(e,t,n,r,i){return this.append(new Lr(e,t,n,(r?1:0)|(i?2:0)))}get hasOpenLink(){for(let e=this.parts.length-1;e>=0;e--){let t=this.parts[e];if(t instanceof Lr&&(t.type==Oo||t.type==Dm))return!0}return!1}addElement(e){return this.append(e)}resolveMarkers(e){for(let n=e;n<this.parts.length;n++){let r=this.parts[n];if(!(r instanceof Lr&&r.type.resolve&&r.side&2))continue;let i=r.type==QR||r.type==PR,a=r.to-r.from,s,l=n-1;for(;l>=e;l--){let b=this.parts[l];if(b instanceof Lr&&b.side&1&&b.type==r.type&&!(i&&(r.side&1||b.side&2)&&(b.to-b.from+a)%3==0&&((b.to-b.from)%3||a%3))){s=b;break}}if(!s)continue;let c=r.type.resolve,d=[],f=s.from,m=r.to;if(i){let b=Math.min(2,s.to-s.from,a);f=s.to-b,m=r.from+b,c=b==1?"Emphasis":"StrongEmphasis"}s.type.mark&&d.push(this.elt(s.type.mark,f,s.to));for(let b=l+1;b<n;b++)this.parts[b]instanceof Sd&&d.push(this.parts[b]),this.parts[b]=null;r.type.mark&&d.push(this.elt(r.type.mark,r.from,m));let p=this.elt(c,f,m,d);this.parts[l]=i&&s.from!=f?new Lr(s.type,s.from,f,s.side):null,(this.parts[n]=i&&r.to!=m?new Lr(r.type,m,r.to,r.side):null)?this.parts.splice(n,0,p):this.parts[n]=p}let t=[];for(let n=e;n<this.parts.length;n++){let r=this.parts[n];r instanceof Sd&&t.push(r)}return t}findOpeningDelimiter(e){for(let t=this.parts.length-1;t>=0;t--){let n=this.parts[t];if(n instanceof Lr&&n.type==e&&n.side&1)return t}return null}takeContent(e){let t=this.resolveMarkers(e);return this.parts.length=e,t}getDelimiterAt(e){let t=this.parts[e];return t instanceof Lr?t:null}skipSpace(e){return Zu(this.text,e-this.offset)+this.offset}elt(e,t,n,r){return typeof e=="string"?mt(this.parser.getNodeType(e),t,n,r):new AR(e,t)}};Vx.linkStart=Oo;Vx.imageStart=Dm;function Gy(e,t){if(!t.length)return e;if(!e.length)return t;let n=e.slice(),r=0;for(let i of t){for(;r<n.length&&n[r].to<i.to;)r++;if(r<n.length&&n[r].from<i.from){let a=n[r];a instanceof Sd&&(n[r]=new Sd(a.type,a.from,a.to,Gy(a.children,[i])))}else n.splice(r++,0,i)}return n}var tV=[me.CodeBlock,me.ListItem,me.OrderedList,me.BulletList],nV=class{constructor(e,t){this.fragments=e,this.input=t,this.i=0,this.fragment=null,this.fragmentEnd=-1,this.cursor=null,e.length&&(this.fragment=e[this.i++])}nextFragment(){this.fragment=this.i<this.fragments.length?this.fragments[this.i++]:null,this.cursor=null,this.fragmentEnd=-1}moveTo(e,t){for(;this.fragment&&this.fragment.to<=e;)this.nextFragment();if(!this.fragment||this.fragment.from>(e?e-1:0))return!1;if(this.fragmentEnd<0){let i=this.fragment.to;for(;i>0&&this.input.read(i-1,i)!=`
|
|
117
|
-
`;)i--;this.fragmentEnd=i?i-1:0}let n=this.cursor;n||(n=this.cursor=this.fragment.tree.cursor(),n.firstChild());let r=e+this.fragment.offset;for(;n.to<=r;)if(!n.parent())return!1;for(;;){if(n.from>=r)return this.fragment.from<=t;if(!n.childAfter(r))return!1}}matches(e){let t=this.cursor.tree;return t&&t.prop(Ge.contextHash)==e}takeNodes(e){let t=this.cursor,n=this.fragment.offset,r=this.fragmentEnd-(this.fragment.openEnd?1:0),i=e.absoluteLineStart,a=i,s=e.block.children.length,l=a,c=s;for(;;){if(t.to-n>r){if(t.type.isAnonymous&&t.firstChild())continue;break}let d=DR(t.from-n,e.ranges);if(t.to-n<=e.ranges[e.rangeI].to)e.addNode(t.tree,d);else{let f=new At(e.parser.nodeSet.types[me.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(f,t.tree),e.addNode(f,d)}if(t.type.is("Block")&&(tV.indexOf(t.type.id)<0?(a=t.to-n,s=e.block.children.length):(a=l,s=c),l=t.to-n,c=e.block.children.length),!t.nextSibling())break}for(;e.block.children.length>s;)e.block.children.pop(),e.block.positions.pop();return a-i}};function DR(e,t){let n=e;for(let r=1;r<t.length;r++){let i=t[r-1].to,a=t[r].from;i<e&&(n-=a-i)}return n}var rV=Xo({"Blockquote/...":B.quote,HorizontalRule:B.contentSeparator,"ATXHeading1/... SetextHeading1/...":B.heading1,"ATXHeading2/... SetextHeading2/...":B.heading2,"ATXHeading3/...":B.heading3,"ATXHeading4/...":B.heading4,"ATXHeading5/...":B.heading5,"ATXHeading6/...":B.heading6,"Comment CommentBlock":B.comment,Escape:B.escape,Entity:B.character,"Emphasis/...":B.emphasis,"StrongEmphasis/...":B.strong,"Link/... Image/...":B.link,"OrderedList/... BulletList/...":B.list,"BlockQuote/...":B.quote,"InlineCode CodeText":B.monospace,"URL Autolink":B.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":B.processingInstruction,"CodeInfo LinkLabel":B.labelName,LinkTitle:B.string,Paragraph:B.content}),iV=new jR(new Ax(CR).extend(rV),Object.keys(zh).map(e=>zh[e]),Object.keys(zh).map(e=>_R[e]),Object.keys(zh),G7,pR,Object.keys(ZO).map(e=>ZO[e]),Object.keys(ZO),[]);function aV(e,t,n){let r=[];for(let i=e.firstChild,a=t;;i=i.nextSibling){let s=i?i.from:n;if(s>a&&r.push({from:a,to:s}),!i)break;a=i.to}return r}function sV(e){let{codeParser:t,htmlParser:n}=e;return{wrap:XN((i,a)=>{let s=i.type.id;if(t&&(s==me.CodeBlock||s==me.FencedCode)){let l="";if(s==me.FencedCode){let d=i.node.getChild(me.CodeInfo);d&&(l=a.read(d.from,d.to))}let c=t(l);if(c)return{parser:c,overlay:d=>d.type.id==me.CodeText,bracketed:s==me.FencedCode}}else if(n&&(s==me.HTMLBlock||s==me.HTMLTag||s==me.CommentBlock))return{parser:n,overlay:aV(i.node,i.from,i.to)};return null})}}var oV={resolve:"Strikethrough",mark:"StrikethroughMark"},lV={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":B.strikethrough}},{name:"StrikethroughMark",style:B.processingInstruction}],parseInline:[{name:"Strikethrough",parse(e,t,n){if(t!=126||e.char(n+1)!=126||e.char(n+2)==126)return-1;let r=e.slice(n-1,n),i=e.slice(n+2,n+3),a=/\s|^$/.test(r),s=/\s|^$/.test(i),l=wd.test(r),c=wd.test(i);return e.addDelimiter(oV,n,n+2,!s&&(!c||a||l),!a&&(!l||s||c))},after:"Emphasis"}]};function Bu(e,t,n=0,r,i=0){let a=0,s=!0,l=-1,c=-1,d=!1,f=()=>{r.push(e.elt("TableCell",i+l,i+c,e.parser.parseInline(t.slice(l,c),i+l)))};for(let m=n;m<t.length;m++){let p=t.charCodeAt(m);p==124&&!d?((!s||l>-1)&&a++,s=!1,r&&(l>-1&&f(),r.push(e.elt("TableDelimiter",m+i,m+i+1))),l=c=-1):(d||p!=32&&p!=9)&&(l<0&&(l=m),c=m+1),d=!d&&p==92}return l>-1&&(a++,r&&f()),a}function wT(e,t){for(let n=t;n<e.length;n++){let r=e.charCodeAt(n);if(r==124)return!0;r==92&&n++}return!1}var LR=/^\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/,_T=class{constructor(){this.rows=null}nextLine(e,t,n){if(this.rows==null){this.rows=!1;let r;if((t.next==45||t.next==58||t.next==124)&&LR.test(r=t.text.slice(t.pos))){let i=[];Bu(e,n.content,0,i,n.start)==Bu(e,r,t.pos)&&(this.rows=[e.elt("TableHeader",n.start,n.start+n.content.length,i),e.elt("TableDelimiter",e.lineStart+t.pos,e.lineStart+t.text.length)])}}else if(this.rows){let r=[];Bu(e,t.text,t.pos,r,e.lineStart),this.rows.push(e.elt("TableRow",e.lineStart+t.pos,e.lineStart+t.text.length,r))}return!1}finish(e,t){return this.rows?(e.addLeafElement(t,e.elt("Table",t.start,t.start+t.content.length,this.rows)),!0):!1}},cV={defineNodes:[{name:"Table",block:!0},{name:"TableHeader",style:{"TableHeader/...":B.heading}},"TableRow",{name:"TableCell",style:B.content},{name:"TableDelimiter",style:B.processingInstruction}],parseBlock:[{name:"Table",leaf(e,t){return wT(t.content,0)?new _T:null},endLeaf(e,t,n){if(n.parsers.some(i=>i instanceof _T)||!wT(t.text,t.basePos))return!1;let r=e.peekLine();return LR.test(r)&&Bu(e,t.text,t.basePos)==Bu(e,r,t.basePos)},before:"SetextHeading"}]},uV=class{nextLine(){return!1}finish(e,t){return e.addLeafElement(t,e.elt("Task",t.start,t.start+t.content.length,[e.elt("TaskMarker",t.start,t.start+3),...e.parser.parseInline(t.content.slice(3),t.start+3)])),!0}},dV={defineNodes:[{name:"Task",block:!0,style:B.list},{name:"TaskMarker",style:B.atom}],parseBlock:[{name:"TaskList",leaf(e,t){return/^\[[ xX]\][ \t]/.test(t.content)&&e.parentType().name=="ListItem"?new uV:null},after:"SetextHeading"}]},kT=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,jT=/[\w-]+(\.[\w-]+)+(\/[^\s<]*)?/gy,fV=/[\w-]+\.[\w-]+($|\/)/,TT=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,CT=/\/[a-zA-Z\d@.]+/gy;function ET(e,t,n,r){let i=0;for(let a=t;a<n;a++)e[a]==r&&i++;return i}function hV(e,t){jT.lastIndex=t;let n=jT.exec(e);if(!n||fV.exec(n[0])[0].indexOf("_")>-1)return-1;let r=t+n[0].length;for(;;){let i=e[r-1],a;if(/[?!.,:*_~]/.test(i)||i==")"&&ET(e,t,r,")")>ET(e,t,r,"("))r--;else if(i==";"&&(a=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(e.slice(t,r))))r=t+a.index;else break}return r}function AT(e,t){TT.lastIndex=t;let n=TT.exec(e);if(!n)return-1;let r=n[0][n[0].length-1];return r=="_"||r=="-"?-1:t+n[0].length-(r=="."?1:0)}var mV={parseInline:[{name:"Autolink",parse(e,t,n){let r=n-e.offset;if(r&&/\w/.test(e.text[r-1]))return-1;kT.lastIndex=r;let i=kT.exec(e.text),a=-1;if(!i)return-1;if(i[1]||i[2]){if(a=hV(e.text,r+i[0].length),a>-1&&e.hasOpenLink){let s=/([^\[\]]|\[[^\]]*\])*/.exec(e.text.slice(r,a));a=r+s[0].length}}else i[3]?a=AT(e.text,r):(a=AT(e.text,r+i[0].length),a>-1&&i[0]=="xmpp:"&&(CT.lastIndex=a,i=CT.exec(e.text),i&&(a=i.index+i[0].length)));return a<0?-1:(e.addElement(e.elt("URL",n,a+e.offset)),a+e.offset)}}]},pV=[cV,dV,lV,mV];function zR(e,t,n){return(r,i,a)=>{if(i!=e||r.char(a+1)==e)return-1;let s=[r.elt(n,a,a+1)];for(let l=a+1;l<r.end;l++){let c=r.char(l);if(c==e)return r.addElement(r.elt(t,a,l+1,s.concat(r.elt(n,l,l+1))));if(c==92&&s.push(r.elt("Escape",l,l+++2)),fi(c))break}return-1}}var gV={defineNodes:[{name:"Superscript",style:B.special(B.content)},{name:"SuperscriptMark",style:B.processingInstruction}],parseInline:[{name:"Superscript",parse:zR(94,"Superscript","SuperscriptMark")}]},vV={defineNodes:[{name:"Subscript",style:B.special(B.content)},{name:"SubscriptMark",style:B.processingInstruction}],parseInline:[{name:"Subscript",parse:zR(126,"Subscript","SubscriptMark")}]},OV={defineNodes:[{name:"Emoji",style:B.character}],parseInline:[{name:"Emoji",parse(e,t,n){let r;return t!=58||!(r=/^[a-zA-Z_0-9]+:/.exec(e.slice(n+1,e.end)))?-1:e.addElement(e.elt("Emoji",n,n+1+r[0].length))}}]},bV=class Ky{constructor(t,n,r,i,a,s,l,c,d,f=0,m){this.p=t,this.stack=n,this.state=r,this.reducePos=i,this.pos=a,this.score=s,this.buffer=l,this.bufferBase=c,this.curContext=d,this.lookAhead=f,this.parent=m}toString(){return`[${this.stack.filter((t,n)=>n%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(t,n,r=0){let i=t.parser.context;return new Ky(t,[],n,r,r,0,[],0,i?new QT(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(t,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=t}reduce(t){var n;let r=t>>19,i=t&65535,{parser:a}=this.p,s=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),l=a.dynamicPrecedence(i);if(l&&(this.score+=l),r==0){this.pushState(a.getGoto(this.state,i,!0),this.reducePos),i<a.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,s?8:4,!0),this.reduceContext(i,this.reducePos);return}let c=this.stack.length-(r-1)*3-(t&262144?6:0),d=c?this.stack[c-2]:this.p.ranges[0].from,f=this.reducePos-d;f>=2e3&&!(!((n=this.p.parser.nodeSet.types[i])===null||n===void 0)&&n.isAnonymous)&&(d==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=f):this.p.lastBigReductionSize<f&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=d,this.p.lastBigReductionSize=f));let m=c?this.stack[c-1]:0,p=this.bufferBase+this.buffer.length-m;if(i<a.minRepeatTerm||t&131072){let O=a.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,d,O,p+4,!0)}if(t&262144)this.state=this.stack[c];else{let O=this.stack[c-3];this.state=a.getGoto(O,i,!0)}for(;this.stack.length>c;)this.stack.pop();this.reduceContext(i,d)}storeNode(t,n,r,i=4,a=!1){if(t==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let s=this,l=this.buffer.length;if(l==0&&s.parent&&(l=s.bufferBase-s.parent.bufferBase,s=s.parent),l>0&&s.buffer[l-4]==0&&s.buffer[l-1]>-1){if(n==r)return;if(s.buffer[l-2]>=n){s.buffer[l-2]=r;return}}}if(!a||this.pos==r)this.buffer.push(t,n,r,i);else{let s=this.buffer.length;if(s>0&&(this.buffer[s-4]!=0||this.buffer[s-1]<0)){let l=!1;for(let c=s;c>0&&this.buffer[c-2]>r;c-=4)if(this.buffer[c-1]>=0){l=!0;break}if(l)for(;s>0&&this.buffer[s-2]>r;)this.buffer[s]=this.buffer[s-4],this.buffer[s+1]=this.buffer[s-3],this.buffer[s+2]=this.buffer[s-2],this.buffer[s+3]=this.buffer[s-1],s-=4,i>4&&(i-=4)}this.buffer[s]=t,this.buffer[s+1]=n,this.buffer[s+2]=r,this.buffer[s+3]=i}}shift(t,n,r,i){if(t&131072)this.pushState(t&65535,this.pos);else if((t&262144)==0){let a=t,{parser:s}=this.p;this.pos=i;let l=s.stateFlag(a,1);!l&&(i>r||n<=s.maxNode)&&(this.reducePos=i),this.pushState(a,l?r:Math.min(r,this.reducePos)),this.shiftContext(n,r),n<=s.maxNode&&this.buffer.push(n,r,i,4)}else this.pos=i,this.shiftContext(n,r),n<=this.p.parser.maxNode&&this.buffer.push(n,r,i,4)}apply(t,n,r,i){t&65536?this.reduce(t):this.shift(t,n,r,i)}useNode(t,n){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=t)&&(this.p.reused.push(t),r++);let i=this.pos;this.reducePos=this.pos=i+t.length,this.pushState(n,i),this.buffer.push(r,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,t,this,this.p.stream.reset(this.pos-t.length)))}split(){let t=this,n=t.buffer.length;for(;n>0&&t.buffer[n-2]>t.reducePos;)n-=4;let r=t.buffer.slice(n),i=t.bufferBase+n;for(;t&&i==t.bufferBase;)t=t.parent;return new Ky(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,t)}recoverByDelete(t,n){let r=t<=this.p.parser.maxNode;r&&this.storeNode(t,this.pos,n,4),this.storeNode(0,this.pos,n,r?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(t){for(let n=new yV(this);;){let r=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,t);if(r==0)return!1;if((r&65536)==0)return!0;n.reduce(r)}}recoverByInsert(t){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let i=[];for(let a=0,s;a<n.length;a+=2)(s=n[a+1])!=this.state&&this.p.parser.hasAction(s,t)&&i.push(n[a],s);if(this.stack.length<120)for(let a=0;i.length<8&&a<n.length;a+=2){let s=n[a+1];i.some((l,c)=>c&1&&l==s)||i.push(n[a],s)}n=i}let r=[];for(let i=0;i<n.length&&r.length<4;i+=2){let a=n[i+1];if(a==this.state)continue;let s=this.split();s.pushState(a,this.pos),s.storeNode(0,s.pos,s.pos,4,!0),s.shiftContext(n[i],this.pos),s.reducePos=this.pos,s.score-=200,r.push(s)}return r}forceReduce(){let{parser:t}=this.p,n=t.stateSlot(this.state,5);if((n&65536)==0)return!1;if(!t.validAction(this.state,n)){let r=n>>19,i=n&65535,a=this.stack.length-r*3;if(a<0||t.getGoto(this.stack[a],i,!1)<0){let s=this.findForcedReduction();if(s==null)return!1;n=s}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:t}=this.p,n=[],r=(i,a)=>{if(!n.includes(i))return n.push(i),t.allActions(i,s=>{if(!(s&393216))if(s&65536){let l=(s>>19)-a;if(l>1){let c=s&65535,d=this.stack.length-l*3;if(d>=0&&t.getGoto(this.stack[d],c,!1)>=0)return l<<19|65536|c}}else{let l=r(s,a+1);if(l!=null)return l}})};return r(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:t}=this.p;return t.data[t.stateSlot(this.state,1)]==65535&&!t.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(t){if(this.state!=t.state||this.stack.length!=t.stack.length)return!1;for(let n=0;n<this.stack.length;n+=3)if(this.stack[n]!=t.stack[n])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(t){return this.p.parser.dialect.flags[t]}shiftContext(t,n){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,t,this,this.p.stream.reset(n)))}reduceContext(t,n){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,t,this,this.p.stream.reset(n)))}emitContext(){let t=this.buffer.length-1;(t<0||this.buffer[t]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let t=this.buffer.length-1;(t<0||this.buffer[t]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(t){if(t!=this.curContext.context){let n=new QT(this.curContext.tracker,t);n.hash!=this.curContext.hash&&this.emitContext(),this.curContext=n}}setLookAhead(t){return t<=this.lookAhead?!1:(this.emitLookAhead(),this.lookAhead=t,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}},QT=class{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}},yV=class{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,n=e>>19;n==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(n-1)*3;let r=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=r}},xV=class Jy{constructor(t,n,r){this.stack=t,this.pos=n,this.index=r,this.buffer=t.buffer,this.index==0&&this.maybeNext()}static create(t,n=t.bufferBase+t.buffer.length){return new Jy(t,n,n-t.bufferBase)}maybeNext(){let t=this.stack.parent;t!=null&&(this.index=this.stack.bufferBase-t.bufferBase,this.stack=t,this.buffer=t.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new Jy(this.stack,this.pos,this.index)}};function Tu(e,t=Uint16Array){if(typeof e!="string")return e;let n=null;for(let r=0,i=0;r<e.length;){let a=0;for(;;){let s=e.charCodeAt(r++),l=!1;if(s==126){a=65535;break}s>=92&&s--,s>=34&&s--;let c=s-32;if(c>=46&&(c-=46,l=!0),a+=c,l)break;a*=46}n?n[i++]=a:n=new t(a)}return n}var hm=class{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}},PT=new hm,SV=class{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=PT,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let n=this.range,r=this.rangeIndex,i=this.pos+e;for(;i<n.from;){if(!r)return null;let a=this.ranges[--r];i-=n.from-a.to,n=a}for(;t<0?i>n.to:i>=n.to;){if(r==this.ranges.length-1)return null;let a=this.ranges[++r];i+=a.from-n.to,n=a}return i}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,n,r;if(t>=0&&t<this.chunk.length)n=this.pos+e,r=this.chunk.charCodeAt(t);else{let i=this.resolveOffset(e,1);if(i==null)return-1;if(n=i,n>=this.chunk2Pos&&n<this.chunk2Pos+this.chunk2.length)r=this.chunk2.charCodeAt(n-this.chunk2Pos);else{let a=this.rangeIndex,s=this.range;for(;s.to<=n;)s=this.ranges[++a];this.chunk2=this.input.chunk(this.chunk2Pos=n),n+this.chunk2.length>s.to&&(this.chunk2=this.chunk2.slice(0,s.to-n)),r=this.chunk2.charCodeAt(0)}}return n>=this.token.lookAhead&&(this.token.lookAhead=n+1),r}acceptToken(e,t=0){let n=t?this.resolveOffset(t,-1):this.pos;if(n==null||n<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=n}acceptTokenTo(e,t){this.token.value=e,this.token.end=t}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),t=this.pos+e.length;this.chunk=t>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=PT,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let n="";for(let r of this.ranges){if(r.from>=t)break;r.to>e&&(n+=this.input.read(Math.max(r.from,e),Math.min(r.to,t)))}return n}},ql=class{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:n}=t.p;$R(this.data,e,t,this.id,n.data,n.tokenPrecTable)}};ql.prototype.contextual=ql.prototype.fallback=ql.prototype.extend=!1;var Lm=class{constructor(e,t,n){this.precTable=t,this.elseToken=n,this.data=typeof e=="string"?Tu(e):e}token(e,t){let n=e.pos,r=0;for(;;){let i=e.next<0,a=e.resolveOffset(1,1);if($R(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(i||r++,a==null)break;e.reset(a,e.token)}r&&(e.reset(n,e.token),e.acceptToken(this.elseToken,r))}};Lm.prototype.contextual=ql.prototype.fallback=ql.prototype.extend=!1;var Ir=class{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}};function $R(e,t,n,r,i,a){let s=0,l=1<<r,{dialect:c}=n.p.parser;e:for(;(l&e[s])!=0;){let d=e[s+1];for(let O=s+3;O<d;O+=2)if((e[O+1]&l)>0){let b=e[O];if(c.allows(b)&&(t.token.value==-1||t.token.value==b||wV(b,t.token.value,i,a))){t.acceptToken(b);break}}let f=t.next,m=0,p=e[s+2];if(t.next<0&&p>m&&e[d+p*3-3]==65535){s=e[d+p*3-1];continue e}for(;m<p;){let O=m+p>>1,b=d+O+(O<<1),x=e[b],w=e[b+1]||65536;if(f<x)p=O;else if(f>=w)m=O+1;else{s=e[b+2],t.advance();continue e}}break}}function NT(e,t,n){for(let r=t,i;(i=e[r])!=65535;r++)if(i==n)return r-t;return-1}function wV(e,t,n,r){let i=NT(n,r,t);return i<0||NT(n,r,e)<i}var Pr=typeof process<"u"&&Hb&&/\bparse\b/.test(Hb.LOG),BO=null;function RT(e,t,n){let r=e.cursor(wt.IncludeAnonymous);for(r.moveTo(t);;)if(!(n<0?r.childBefore(t):r.childAfter(t)))for(;;){if((n<0?r.to<t:r.from>t)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,t-25)):Math.min(e.length,Math.max(r.from+1,t+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:e.length}}var _V=class{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?RT(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?RT(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let t=this.trees.length-1;if(t<0)return this.nextFragment(),null;let n=this.trees[t],r=this.index[t];if(r==n.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let i=n.children[r],a=this.start[t]+n.positions[r];if(a>e)return this.nextStart=a,null;if(i instanceof At){if(a==e){if(a<this.safeFrom)return null;let s=a+i.length;if(s<=this.safeTo){let l=i.prop(Ge.lookAhead);if(!l||s+l<this.fragment.to)return i}}this.index[t]++,a+i.length>=Math.max(this.safeFrom,e)&&(this.trees.push(i),this.start.push(a),this.index.push(0))}else this.index[t]++,this.nextStart=a+i.length}}},kV=class{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(n=>new hm)}getActions(e){let t=0,n=null,{parser:r}=e.p,{tokenizers:i}=r,a=r.stateSlot(e.state,3),s=e.curContext?e.curContext.hash:0,l=0;for(let c=0;c<i.length;c++){if((1<<c&a)==0)continue;let d=i[c],f=this.tokens[c];if(!(n&&!d.fallback)&&((d.contextual||f.start!=e.pos||f.mask!=a||f.context!=s)&&(this.updateCachedToken(f,d,e),f.mask=a,f.context=s),f.lookAhead>f.end+25&&(l=Math.max(f.lookAhead,l)),f.value!=0)){let m=t;if(f.extended>-1&&(t=this.addActions(e,f.extended,f.end,t)),t=this.addActions(e,f.value,f.end,t),!d.extend&&(n=f,t>m))break}}for(;this.actions.length>t;)this.actions.pop();return l&&e.setLookAhead(l),!n&&e.pos==this.stream.end&&(n=new hm,n.value=e.p.parser.eofTerm,n.start=n.end=e.pos,t=this.addActions(e,n.value,n.end,t)),this.mainToken=n,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new hm,{pos:n,p:r}=e;return t.start=n,t.end=Math.min(n+1,r.stream.end),t.value=n==r.stream.end?r.parser.eofTerm:0,t}updateCachedToken(e,t,n){let r=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(r,e),n),e.value>-1){let{parser:i}=n.p;for(let a=0;a<i.specialized.length;a++)if(i.specialized[a]==e.value){let s=i.specializers[a](this.stream.read(e.start,e.end),n);if(s>=0&&n.p.parser.dialect.allows(s>>1)){(s&1)==0?e.value=s>>1:e.extended=s>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,t,n,r){for(let i=0;i<r;i+=3)if(this.actions[i]==e)return r;return this.actions[r++]=e,this.actions[r++]=t,this.actions[r++]=n,r}addActions(e,t,n,r){let{state:i}=e,{parser:a}=e.p,{data:s}=a;for(let l=0;l<2;l++)for(let c=a.stateSlot(i,l?2:1);;c+=3){if(s[c]==65535)if(s[c+1]==1)c=_a(s,c+2);else{r==0&&s[c+1]==2&&(r=this.putAction(_a(s,c+2),t,n,r));break}s[c]==t&&(r=this.putAction(_a(s,c+1),t,n,r))}return r}},jV=class{constructor(e,t,n,r){this.parser=e,this.input=t,this.ranges=r,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new SV(t,r),this.tokens=new kV(e,this.stream),this.topTerm=e.top[1];let{from:i}=r[0];this.stacks=[bV.start(this,e.top[0],i)],this.fragments=n.length&&this.stream.end-i>e.bufferLength*4?new _V(n,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,n=this.stacks=[],r,i;if(this.bigReductionCount>300&&e.length==1){let[a]=e;for(;a.forceReduce()&&a.stack.length&&a.stack[a.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let a=0;a<e.length;a++){let s=e[a];for(;;){if(this.tokens.mainToken=null,s.pos>t)n.push(s);else{if(this.advanceStack(s,n,e))continue;{r||(r=[],i=[]),r.push(s);let l=this.tokens.getMainToken(s);i.push(l.value,l.end)}}break}}if(!n.length){let a=r&&CV(r);if(a)return Pr&&console.log("Finish with "+this.stackID(a)),this.stackToTree(a);if(this.parser.strict)throw Pr&&r&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+t);this.recovering||(this.recovering=5)}if(this.recovering&&r){let a=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,i,n);if(a)return Pr&&console.log("Force-finish "+this.stackID(a)),this.stackToTree(a.forceAll())}if(this.recovering){let a=this.recovering==1?1:this.recovering*3;if(n.length>a)for(n.sort((s,l)=>l.score-s.score);n.length>a;)n.pop();n.some(s=>s.reducePos>t)&&this.recovering--}else if(n.length>1){e:for(let a=0;a<n.length-1;a++){let s=n[a];for(let l=a+1;l<n.length;l++){let c=n[l];if(s.sameState(c)||s.buffer.length>500&&c.buffer.length>500)if((s.score-c.score||s.buffer.length-c.buffer.length)>0)n.splice(l--,1);else{n.splice(a--,1);continue e}}}n.length>12&&(n.sort((a,s)=>s.score-a.score),n.splice(12,n.length-12))}this.minStackPos=n[0].pos;for(let a=1;a<n.length;a++)n[a].pos<this.minStackPos&&(this.minStackPos=n[a].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,t,n){let r=e.pos,{parser:i}=this,a=Pr?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let c=e.curContext&&e.curContext.tracker.strict,d=c?e.curContext.hash:0;for(let f=this.fragments.nodeAt(r);f;){let m=this.parser.nodeSet.types[f.type.id]==f.type?i.getGoto(e.state,f.type.id):-1;if(m>-1&&f.length&&(!c||(f.prop(Ge.contextHash)||0)==d))return e.useNode(f,m),Pr&&console.log(a+this.stackID(e)+` (via reuse of ${i.getName(f.type.id)})`),!0;if(!(f instanceof At)||f.children.length==0||f.positions[0]>0)break;let p=f.children[0];if(p instanceof At&&f.positions[0]==0)f=p;else break}}let s=i.stateSlot(e.state,4);if(s>0)return e.reduce(s),Pr&&console.log(a+this.stackID(e)+` (via always-reduce ${i.getName(s&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let l=this.tokens.getActions(e);for(let c=0;c<l.length;){let d=l[c++],f=l[c++],m=l[c++],p=c==l.length||!n,O=p?e:e.split(),b=this.tokens.mainToken;if(O.apply(d,f,b?b.start:O.pos,m),Pr&&console.log(a+this.stackID(O)+` (via ${(d&65536)==0?"shift":`reduce of ${i.getName(d&65535)}`} for ${i.getName(f)} @ ${r}${O==e?"":", split"})`),p)return!0;O.pos>r?t.push(O):n.push(O)}return!1}advanceFully(e,t){let n=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return MT(e,t),!0}}runRecovery(e,t,n){let r=null,i=!1;for(let a=0;a<e.length;a++){let s=e[a],l=t[a<<1],c=t[(a<<1)+1],d=Pr?this.stackID(s)+" -> ":"";if(s.deadEnd&&(i||(i=!0,s.restart(),Pr&&console.log(d+this.stackID(s)+" (restarted)"),this.advanceFully(s,n))))continue;let f=s.split(),m=d;for(let p=0;p<10&&f.forceReduce()&&(Pr&&console.log(m+this.stackID(f)+" (via force-reduce)"),!this.advanceFully(f,n));p++)Pr&&(m=this.stackID(f)+" -> ");for(let p of s.recoverByInsert(l))Pr&&console.log(d+this.stackID(p)+" (via recover-insert)"),this.advanceFully(p,n);this.stream.end>s.pos?(c==s.pos&&(c++,l=0),s.recoverByDelete(l,c),Pr&&console.log(d+this.stackID(s)+` (via recover-delete ${this.parser.getName(l)})`),MT(s,n)):(!r||r.score<f.score)&&(r=f)}return r}stackToTree(e){return e.close(),At.build({buffer:xV.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let t=(BO||(BO=new WeakMap)).get(e);return t||BO.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}};function MT(e,t){for(let n=0;n<t.length;n++){let r=t[n];if(r.pos==e.pos&&r.sameState(e)){t[n].score<e.score&&(t[n]=e);return}}t.push(e)}var TV=class{constructor(e,t,n){this.source=e,this.flags=t,this.disabled=n}allows(e){return!this.disabled||this.disabled[e]==0}},VO=e=>e,IR=class{constructor(e){this.start=e.start,this.shift=e.shift||VO,this.reduce=e.reduce||VO,this.reuse=e.reuse||VO,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}},xp=class e0 extends Nx{constructor(t){if(super(),this.wrappers=[],t.version!=14)throw new RangeError(`Parser version (${t.version}) doesn't match runtime version (14)`);let n=t.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let l=0;l<t.repeatNodeCount;l++)n.push("");let r=Object.keys(t.topRules).map(l=>t.topRules[l][1]),i=[];for(let l=0;l<n.length;l++)i.push([]);function a(l,c,d){i[l].push([c,c.deserialize(String(d))])}if(t.nodeProps)for(let l of t.nodeProps){let c=l[0];typeof c=="string"&&(c=Ge[c]);for(let d=1;d<l.length;){let f=l[d++];if(f>=0)a(f,c,l[d++]);else{let m=l[d+-f];for(let p=-f;p>0;p--)a(l[d++],c,m);d++}}}this.nodeSet=new Ax(n.map((l,c)=>Dn.define({name:c>=this.minRepeatTerm?void 0:l,id:c,props:i[c],top:r.indexOf(c)>-1,error:c==0,skipped:t.skippedNodes&&t.skippedNodes.indexOf(c)>-1}))),t.propSources&&(this.nodeSet=this.nodeSet.extend(...t.propSources)),this.strict=!1,this.bufferLength=NN;let s=Tu(t.tokenData);this.context=t.context,this.specializerSpecs=t.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let l=0;l<this.specializerSpecs.length;l++)this.specialized[l]=this.specializerSpecs[l].term;this.specializers=this.specializerSpecs.map(DT),this.states=Tu(t.states,Uint32Array),this.data=Tu(t.stateData),this.goto=Tu(t.goto),this.maxTerm=t.maxTerm,this.tokenizers=t.tokenizers.map(l=>typeof l=="number"?new ql(s,l):l),this.topRules=t.topRules,this.dialects=t.dialects||{},this.dynamicPrecedences=t.dynamicPrecedences||null,this.tokenPrecTable=t.tokenPrec,this.termNames=t.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(t,n,r){let i=new jV(this,t,n,r);for(let a of this.wrappers)i=a(i,t,n,r);return i}getGoto(t,n,r=!1){let i=this.goto;if(n>=i[0])return-1;for(let a=i[n+1];;){let s=i[a++],l=s&1,c=i[a++];if(l&&r)return c;for(let d=a+(s>>1);a<d;a++)if(i[a]==t)return c;if(l)return-1}}hasAction(t,n){let r=this.data;for(let i=0;i<2;i++)for(let a=this.stateSlot(t,i?2:1),s;;a+=3){if((s=r[a])==65535)if(r[a+1]==1)s=r[a=_a(r,a+2)];else{if(r[a+1]==2)return _a(r,a+2);break}if(s==n||s==0)return _a(r,a+1)}return 0}stateSlot(t,n){return this.states[t*6+n]}stateFlag(t,n){return(this.stateSlot(t,0)&n)>0}validAction(t,n){return!!this.allActions(t,r=>r==n?!0:null)}allActions(t,n){let r=this.stateSlot(t,4),i=r?n(r):void 0;for(let a=this.stateSlot(t,1);i==null;a+=3){if(this.data[a]==65535)if(this.data[a+1]==1)a=_a(this.data,a+2);else break;i=n(_a(this.data,a+1))}return i}nextStates(t){let n=[];for(let r=this.stateSlot(t,1);;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=_a(this.data,r+2);else break;if((this.data[r+2]&1)==0){let i=this.data[r+1];n.some((a,s)=>s&1&&a==i)||n.push(this.data[r],i)}}return n}configure(t){let n=Object.assign(Object.create(e0.prototype),this);if(t.props&&(n.nodeSet=this.nodeSet.extend(...t.props)),t.top){let r=this.topRules[t.top];if(!r)throw new RangeError(`Invalid top rule name ${t.top}`);n.top=r}return t.tokenizers&&(n.tokenizers=this.tokenizers.map(r=>{let i=t.tokenizers.find(a=>a.from==r);return i?i.to:r})),t.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((r,i)=>{let a=t.specializers.find(l=>l.from==r.external);if(!a)return r;let s=Object.assign(Object.assign({},r),{external:a.to});return n.specializers[i]=DT(s),s})),t.contextTracker&&(n.context=t.contextTracker),t.dialect&&(n.dialect=this.parseDialect(t.dialect)),t.strict!=null&&(n.strict=t.strict),t.wrap&&(n.wrappers=n.wrappers.concat(t.wrap)),t.bufferLength!=null&&(n.bufferLength=t.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(t){return this.termNames?this.termNames[t]:String(t<=this.maxNode&&this.nodeSet.types[t].name||t)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(t){let n=this.dynamicPrecedences;return n==null?0:n[t]||0}parseDialect(t){let n=Object.keys(this.dialects),r=n.map(()=>!1);if(t)for(let a of t.split(" ")){let s=n.indexOf(a);s>=0&&(r[s]=!0)}let i=null;for(let a=0;a<n.length;a++)if(!r[a])for(let s=this.dialects[n[a]],l;(l=this.data[s++])!=65535;)(i||(i=new Uint8Array(this.maxTerm+1)))[l]=1;return new TV(t,r,i)}static deserialize(t){return new e0(t)}};function _a(e,t){return e[t]|e[t+1]<<16}function CV(e){let t=null;for(let n of e){let r=n.p.stoppedAt;(n.pos==n.p.stream.end||r!=null&&n.pos>r)&&n.p.parser.stateFlag(n.state,2)&&(!t||t.score<n.score)&&(t=n)}return t}function DT(e){if(e.external){let t=e.extend?1:0;return(n,r)=>e.external(n,r)<<1|t}return e.get}var EV=55,AV=1,QV=56,PV=2,NV=57,RV=3,LT=4,MV=5,Ux=6,qR=7,XR=8,ZR=9,BR=10,DV=11,LV=12,zV=13,UO=58,$V=14,IV=15,zT=59,VR=21,qV=23,UR=24,XV=25,t0=27,YR=28,ZV=29,BV=32,VV=35,UV=37,YV=38,WV=0,FV=1,HV={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},GV={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},$T={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function KV(e){return e==45||e==46||e==58||e>=65&&e<=90||e==95||e>=97&&e<=122||e>=161}var IT=null,qT=null,XT=0;function n0(e,t){let n=e.pos+t;if(XT==n&&qT==e)return IT;let r=e.peek(t),i="";for(;KV(r);)i+=String.fromCharCode(r),r=e.peek(++t);return qT=e,XT=n,IT=i?i.toLowerCase():r==JV||r==eU?void 0:null}var WR=60,zm=62,Yx=47,JV=63,eU=33,tU=45;function ZT(e,t){this.name=e,this.parent=t}var nU=[Ux,BR,qR,XR,ZR],rU=new IR({start:null,shift(e,t,n,r){return nU.indexOf(t)>-1?new ZT(n0(r,1)||"",e):e},reduce(e,t){return t==VR&&e?e.parent:e},reuse(e,t,n,r){let i=t.type.id;return i==Ux||i==UV?new ZT(n0(r,1)||"",e):e},strict:!1}),iU=new Ir((e,t)=>{if(e.next!=WR){e.next<0&&t.context&&e.acceptToken(UO);return}e.advance();let n=e.next==Yx;n&&e.advance();let r=n0(e,0);if(r===void 0)return;if(!r)return e.acceptToken(n?IV:$V);let i=t.context?t.context.name:null;if(n){if(r==i)return e.acceptToken(DV);if(i&&GV[i])return e.acceptToken(UO,-2);if(t.dialectEnabled(WV))return e.acceptToken(LV);for(let a=t.context;a;a=a.parent)if(a.name==r)return;e.acceptToken(zV)}else{if(r=="script")return e.acceptToken(qR);if(r=="style")return e.acceptToken(XR);if(r=="textarea")return e.acceptToken(ZR);if(HV.hasOwnProperty(r))return e.acceptToken(BR);i&&$T[i]&&$T[i][r]?e.acceptToken(UO,-1):e.acceptToken(Ux)}},{contextual:!0}),aU=new Ir(e=>{for(let t=0,n=0;;n++){if(e.next<0){n&&e.acceptToken(zT);break}if(e.next==tU)t++;else if(e.next==zm&&t>=2){n>=3&&e.acceptToken(zT,-2);break}else t=0;e.advance()}});function sU(e){for(;e;e=e.parent)if(e.name=="svg"||e.name=="math")return!0;return!1}var oU=new Ir((e,t)=>{if(e.next==Yx&&e.peek(1)==zm){let n=t.dialectEnabled(FV)||sU(t.context);e.acceptToken(n?MV:LT,2)}else e.next==zm&&e.acceptToken(LT,1)});function Wx(e,t,n){let r=2+e.length;return new Ir(i=>{for(let a=0,s=0,l=0;;l++){if(i.next<0){l&&i.acceptToken(t);break}if(a==0&&i.next==WR||a==1&&i.next==Yx||a>=2&&a<r&&i.next==e.charCodeAt(a-2))a++,s++;else if(a==r&&i.next==zm){l>s?i.acceptToken(t,-s):i.acceptToken(n,-(s-2));break}else if((i.next==10||i.next==13)&&l){i.acceptToken(t,1);break}else a=s=0;i.advance()}})}var lU=Wx("script",EV,AV),cU=Wx("style",QV,PV),uU=Wx("textarea",NV,RV),dU=Xo({"Text RawText IncompleteTag IncompleteCloseTag":B.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":B.angleBracket,TagName:B.tagName,"MismatchedCloseTag/TagName":[B.tagName,B.invalid],AttributeName:B.attributeName,"AttributeValue UnquotedAttributeValue":B.attributeValue,Is:B.definitionOperator,"EntityReference CharacterReference":B.character,Comment:B.blockComment,ProcessingInst:B.processingInstruction,DoctypeDecl:B.documentMeta}),fU=xp.deserialize({version:14,states:",xOVO!rOOO!ZQ#tO'#CrO!`Q#tO'#C{O!eQ#tO'#DOO!jQ#tO'#DRO!oQ#tO'#DTO!tOaO'#CqO#PObO'#CqO#[OdO'#CqO$kO!rO'#CqOOO`'#Cq'#CqO$rO$fO'#DUO$zQ#tO'#DWO%PQ#tO'#DXOOO`'#Dl'#DlOOO`'#DZ'#DZQVO!rOOO%UQ&rO,59^O%aQ&rO,59gO%lQ&rO,59jO%wQ&rO,59mO&SQ&rO,59oOOOa'#D_'#D_O&_OaO'#CyO&jOaO,59]OOOb'#D`'#D`O&rObO'#C|O&}ObO,59]OOOd'#Da'#DaO'VOdO'#DPO'bOdO,59]OOO`'#Db'#DbO'jO!rO,59]O'qQ#tO'#DSOOO`,59],59]OOOp'#Dc'#DcO'vO$fO,59pOOO`,59p,59pO(OQ#|O,59rO(TQ#|O,59sOOO`-E7X-E7XO(YQ&rO'#CtOOQW'#D['#D[O(hQ&rO1G.xOOOa1G.x1G.xOOO`1G/Z1G/ZO(sQ&rO1G/ROOOb1G/R1G/RO)OQ&rO1G/UOOOd1G/U1G/UO)ZQ&rO1G/XOOO`1G/X1G/XO)fQ&rO1G/ZOOOa-E7]-E7]O)qQ#tO'#CzOOO`1G.w1G.wOOOb-E7^-E7^O)vQ#tO'#C}OOOd-E7_-E7_O){Q#tO'#DQOOO`-E7`-E7`O*QQ#|O,59nOOOp-E7a-E7aOOO`1G/[1G/[OOO`1G/^1G/^OOO`1G/_1G/_O*VQ,UO,59`OOQW-E7Y-E7YOOOa7+$d7+$dOOO`7+$u7+$uOOOb7+$m7+$mOOOd7+$p7+$pOOO`7+$s7+$sO*bQ#|O,59fO*gQ#|O,59iO*lQ#|O,59lOOO`1G/Y1G/YO*qO7[O'#CwO+SOMhO'#CwOOQW1G.z1G.zOOO`1G/Q1G/QOOO`1G/T1G/TOOO`1G/W1G/WOOOO'#D]'#D]O+eO7[O,59cOOQW,59c,59cOOOO'#D^'#D^O+vOMhO,59cOOOO-E7Z-E7ZOOQW1G.}1G.}OOOO-E7[-E7[",stateData:",c~O!_OS~OUSOVPOWQOXROYTO[]O][O^^O_^Oa^Ob^Oc^Od^Oy^O|_O!eZO~OgaO~OgbO~OgcO~OgdO~OgeO~O!XfOPmP![mP~O!YiOQpP![pP~O!ZlORsP![sP~OUSOVPOWQOXROYTOZqO[]O][O^^O_^Oa^Ob^Oc^Od^Oy^O!eZO~O![rO~P#gO!]sO!fuO~OgvO~OgwO~OS|OT}OiyO~OS!POT}OiyO~OS!ROT}OiyO~OS!TOT}OiyO~OS}OT}OiyO~O!XfOPmX![mX~OP!WO![!XO~O!YiOQpX![pX~OQ!ZO![!XO~O!ZlORsX![sX~OR!]O![!XO~O![!XO~P#gOg!_O~O!]sO!f!aO~OS!bO~OS!cO~Oj!dOShXThXihX~OS!fOT!gOiyO~OS!hOT!gOiyO~OS!iOT!gOiyO~OS!jOT!gOiyO~OS!gOT!gOiyO~Og!kO~Og!lO~Og!mO~OS!nO~Ol!qO!a!oO!c!pO~OS!rO~OS!sO~OS!tO~Ob!uOc!uOd!uO!a!wO!b!uO~Ob!xOc!xOd!xO!c!wO!d!xO~Ob!uOc!uOd!uO!a!{O!b!uO~Ob!xOc!xOd!xO!c!{O!d!xO~OT~cbd!ey|!e~",goto:"%q!aPPPPPPPPPPPPPPPPPPPPP!b!hP!nPP!zP!}#Q#T#Z#^#a#g#j#m#s#y!bP!b!bP$P$V$m$s$y%P%V%]%cPPPPPPPP%iX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:68,context:rU,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,22,31,34,37,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,30,33,36,38,"OpenTag"],["group",-10,14,15,18,19,20,21,40,41,42,43,"Entity",17,"Entity TextContent",-3,29,32,35,"TextContent Entity"],["isolate",-11,22,30,31,33,34,36,37,38,39,42,43,"ltr",-3,27,28,40,""]],propSources:[dU],skippedNodes:[0],repeatNodeCount:9,tokenData:"!<p!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs3_sv-_vw3}wxHYx}-_}!OH{!O!P-_!P!Q$q!Q![-_![!]Mz!]!^-_!^!_!$S!_!`!;x!`!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4U-_4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!Z$|caPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr$qrs&}sv$qvw+Pwx(tx!^$q!^!_*V!_!a&X!a#S$q#S#T&X#T;'S$q;'S;=`+z<%lO$q!R&bXaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&Xq'UVaP!dpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}P'pTaPOv'kw!^'k!_;'S'k;'S;=`(P<%lO'kP(SP;=`<%l'kp([S!dpOv(Vx;'S(V;'S;=`(h<%lO(Vp(kP;=`<%l(Vq(qP;=`<%l&}a({WaP!b`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t`)jT!b`Or)esv)ew;'S)e;'S;=`)y<%lO)e`)|P;=`<%l)ea*SP;=`<%l(t!Q*^V!b`!dpOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!Q*vP;=`<%l*V!R*|P;=`<%l&XW+UYlWOX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+PW+wP;=`<%l+P!Z+}P;=`<%l$q!a,]`aP!b`!dp!_^OX&XXY,QYZ,QZ]&X]^,Q^p&Xpq,Qqr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!_-ljiSaPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx!P-_!P!Q$q!Q!^-_!^!_*V!_!a&X!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q[/ebiSlWOX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+PS0rXiSqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0mS1bP;=`<%l0m[1hP;=`<%l/^!V1vciSaP!b`!dpOq&Xqr1krs&}sv1kvw0mwx(tx!P1k!P!Q&X!Q!^1k!^!_*V!_!a&X!a#s1k#s$f&X$f;'S1k;'S;=`3R<%l?Ah1k?Ah?BY&X?BY?Mn1k?MnO&X!V3UP;=`<%l1k!_3[P;=`<%l-_!Z3hV!ahaP!dpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}!_4WiiSlWd!ROX5uXZ7SZ[5u[^7S^p5uqr8trs7Sst>]tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^/^!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!Z5zblWOX5uXZ7SZ[5u[^7S^p5uqr5urs7Sst+Ptw5uwx7Sx!]5u!]!^7w!^!a7S!a#S5u#S#T7S#T;'S5u;'S;=`8n<%lO5u!R7VVOp7Sqs7St!]7S!]!^7l!^;'S7S;'S;=`7q<%lO7S!R7qOb!R!R7tP;=`<%l7S!Z8OYlWb!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!Z8qP;=`<%l5u!_8{iiSlWOX5uXZ7SZ[5u[^7S^p5uqr8trs7Sst/^tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^:j!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!_:sbiSlWb!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!V<QciSOp7Sqr;{rs7Sst0mtw;{wx7Sx!P;{!P!Q7S!Q!];{!]!^=]!^!a7S!a#s;{#s$f7S$f;'S;{;'S;=`>P<%l?Ah;{?Ah?BY7S?BY?Mn;{?MnO7S!V=dXiSb!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!V>SP;=`<%l;{!_>YP;=`<%l8t!_>dhiSlWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^/^!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!Z@TalWOX@OXZAYZ[@O[^AY^p@Oqr@OrsAYsw@OwxAYx!]@O!]!^Az!^!aAY!a#S@O#S#TAY#T;'S@O;'S;=`Bq<%lO@O!RA]UOpAYq!]AY!]!^Ao!^;'SAY;'S;=`At<%lOAY!RAtOc!R!RAwP;=`<%lAY!ZBRYlWc!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!ZBtP;=`<%l@O!_COhiSlWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^Dj!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!_DsbiSlWc!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!VFQbiSOpAYqrE{rsAYswE{wxAYx!PE{!P!QAY!Q!]E{!]!^GY!^!aAY!a#sE{#s$fAY$f;'SE{;'S;=`G|<%l?AhE{?Ah?BYAY?BY?MnE{?MnOAY!VGaXiSc!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!VHPP;=`<%lE{!_HVP;=`<%lBw!ZHcW!cxaP!b`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t!aIYliSaPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OKQ!O!P-_!P!Q$q!Q!^-_!^!_*V!_!a&X!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!aK_kiSaPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx!P-_!P!Q$q!Q!^-_!^!_*V!_!`&X!`!aMS!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!TM_XaP!b`!dp!fQOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!aNZ!ZiSgQaPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OMz!O!PMz!P!Q$q!Q![Mz![!]Mz!]!^-_!^!_*V!_!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f$}-_$}%OMz%O%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4UMz4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Je-_$Je$JgMz$Jg$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!a!$PP;=`<%lMz!R!$ZY!b`!dpOq*Vqr!$yrs(Vsv*Vwx)ex!a*V!a!b!4t!b;'S*V;'S;=`*s<%lO*V!R!%Q]!b`!dpOr*Vrs(Vsv*Vwx)ex}*V}!O!%y!O!f*V!f!g!']!g#W*V#W#X!0`#X;'S*V;'S;=`*s<%lO*V!R!&QX!b`!dpOr*Vrs(Vsv*Vwx)ex}*V}!O!&m!O;'S*V;'S;=`*s<%lO*V!R!&vV!b`!dp!ePOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!'dX!b`!dpOr*Vrs(Vsv*Vwx)ex!q*V!q!r!(P!r;'S*V;'S;=`*s<%lO*V!R!(WX!b`!dpOr*Vrs(Vsv*Vwx)ex!e*V!e!f!(s!f;'S*V;'S;=`*s<%lO*V!R!(zX!b`!dpOr*Vrs(Vsv*Vwx)ex!v*V!v!w!)g!w;'S*V;'S;=`*s<%lO*V!R!)nX!b`!dpOr*Vrs(Vsv*Vwx)ex!{*V!{!|!*Z!|;'S*V;'S;=`*s<%lO*V!R!*bX!b`!dpOr*Vrs(Vsv*Vwx)ex!r*V!r!s!*}!s;'S*V;'S;=`*s<%lO*V!R!+UX!b`!dpOr*Vrs(Vsv*Vwx)ex!g*V!g!h!+q!h;'S*V;'S;=`*s<%lO*V!R!+xY!b`!dpOr!+qrs!,hsv!+qvw!-Swx!.[x!`!+q!`!a!/j!a;'S!+q;'S;=`!0Y<%lO!+qq!,mV!dpOv!,hvx!-Sx!`!,h!`!a!-q!a;'S!,h;'S;=`!.U<%lO!,hP!-VTO!`!-S!`!a!-f!a;'S!-S;'S;=`!-k<%lO!-SP!-kO|PP!-nP;=`<%l!-Sq!-xS!dp|POv(Vx;'S(V;'S;=`(h<%lO(Vq!.XP;=`<%l!,ha!.aX!b`Or!.[rs!-Ssv!.[vw!-Sw!`!.[!`!a!.|!a;'S!.[;'S;=`!/d<%lO!.[a!/TT!b`|POr)esv)ew;'S)e;'S;=`)y<%lO)ea!/gP;=`<%l!.[!R!/sV!b`!dp|POr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!0]P;=`<%l!+q!R!0gX!b`!dpOr*Vrs(Vsv*Vwx)ex#c*V#c#d!1S#d;'S*V;'S;=`*s<%lO*V!R!1ZX!b`!dpOr*Vrs(Vsv*Vwx)ex#V*V#V#W!1v#W;'S*V;'S;=`*s<%lO*V!R!1}X!b`!dpOr*Vrs(Vsv*Vwx)ex#h*V#h#i!2j#i;'S*V;'S;=`*s<%lO*V!R!2qX!b`!dpOr*Vrs(Vsv*Vwx)ex#m*V#m#n!3^#n;'S*V;'S;=`*s<%lO*V!R!3eX!b`!dpOr*Vrs(Vsv*Vwx)ex#d*V#d#e!4Q#e;'S*V;'S;=`*s<%lO*V!R!4XX!b`!dpOr*Vrs(Vsv*Vwx)ex#X*V#X#Y!+q#Y;'S*V;'S;=`*s<%lO*V!R!4{Y!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!a!4t!a!b!:]!b;'S!4t;'S;=`!;r<%lO!4tq!5pV!dpOv!5kvx!6Vx!a!5k!a!b!7W!b;'S!5k;'S;=`!8V<%lO!5kP!6YTO!a!6V!a!b!6i!b;'S!6V;'S;=`!7Q<%lO!6VP!6lTO!`!6V!`!a!6{!a;'S!6V;'S;=`!7Q<%lO!6VP!7QOyPP!7TP;=`<%l!6Vq!7]V!dpOv!5kvx!6Vx!`!5k!`!a!7r!a;'S!5k;'S;=`!8V<%lO!5kq!7yS!dpyPOv(Vx;'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!b`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!b`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!b`yPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!b`!dpyPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!<TXjSaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[lU,cU,uU,oU,iU,aU,0,1,2,3,4,5],topRules:{Document:[0,16]},dialects:{noMatch:0,selfClosing:515},tokenPrec:517});function FR(e,t){let n=Object.create(null);for(let r of e.getChildren(UR)){let i=r.getChild(XV),a=r.getChild(t0)||r.getChild(YR);i&&(n[t.read(i.from,i.to)]=a?a.type.id==t0?t.read(a.from+1,a.to-1):t.read(a.from,a.to):"")}return n}function BT(e,t){let n=e.getChild(qV);return n?t.read(n.from,n.to):" "}function YO(e,t,n){let r;for(let i of n)if(!i.attrs||i.attrs(r||(r=FR(e.node.parent.firstChild,t))))return{parser:i.parser,bracketed:!0};return null}function HR(e=[],t=[]){let n=[],r=[],i=[],a=[];for(let l of e)(l.tag=="script"?n:l.tag=="style"?r:l.tag=="textarea"?i:a).push(l);let s=t.length?Object.create(null):null;for(let l of t)(s[l.name]||(s[l.name]=[])).push(l);return XN((l,c)=>{let d=l.type.id;if(d==ZV)return YO(l,c,n);if(d==BV)return YO(l,c,r);if(d==VV)return YO(l,c,i);if(d==VR&&a.length){let f=l.node,m=f.firstChild,p=m&&BT(m,c),O;if(p){for(let b of a)if(b.tag==p&&(!b.attrs||b.attrs(O||(O=FR(m,c))))){let x=f.lastChild,w=x.type.id==YV?x.from:f.to;if(w>m.to)return{parser:b.parser,overlay:[{from:m.to,to:w}]}}}}if(s&&d==UR){let f=l.node,m;if(m=f.firstChild){let p=s[c.read(m.from,m.to)];if(p)for(let O of p){if(O.tagName&&O.tagName!=BT(f.parent,c))continue;let b=f.lastChild;if(b.type.id==t0){let x=b.from+1,w=b.lastChild,k=b.to-(w&&w.isError?0:1);if(k>x)return{parser:O.parser,overlay:[{from:x,to:k}],bracketed:!0}}else if(b.type.id==YR)return{parser:O.parser,overlay:[{from:b.from,to:b.to}]}}}}return null})}var hU=122,VT=1,mU=123,pU=124,GR=2,gU=125,vU=3,OU=4,KR=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],bU=58,yU=40,JR=95,xU=91,mm=45,SU=46,wU=35,_U=37,kU=38,jU=92,TU=10,CU=42;function _d(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}function Fx(e){return e>=48&&e<=57}function UT(e){return Fx(e)||e>=97&&e<=102||e>=65&&e<=70}var eM=(e,t,n)=>(r,i)=>{for(let a=!1,s=0,l=0;;l++){let{next:c}=r;if(_d(c)||c==mm||c==JR||a&&Fx(c))!a&&(c!=mm||l>0)&&(a=!0),s===l&&c==mm&&s++,r.advance();else if(c==jU&&r.peek(1)!=TU){if(r.advance(),UT(r.next)){do r.advance();while(UT(r.next));r.next==32&&r.advance()}else r.next>-1&&r.advance();a=!0}else{a&&r.acceptToken(s==2&&i.canShift(GR)?t:c==yU?n:e);break}}},EU=new Ir(eM(mU,GR,pU)),AU=new Ir(eM(gU,vU,OU)),QU=new Ir(e=>{if(KR.includes(e.peek(-1))){let{next:t}=e;(_d(t)||t==JR||t==wU||t==SU||t==CU||t==xU||t==bU&&_d(e.peek(1))||t==mm||t==kU)&&e.acceptToken(hU)}}),PU=new Ir(e=>{if(!KR.includes(e.peek(-1))){let{next:t}=e;if(t==_U&&(e.advance(),e.acceptToken(VT)),_d(t)){do e.advance();while(_d(e.next)||Fx(e.next));e.acceptToken(VT)}}}),NU=Xo({"AtKeyword import charset namespace keyframes media supports":B.definitionKeyword,"from to selector":B.keyword,NamespaceName:B.namespace,KeyframeName:B.labelName,KeyframeRangeName:B.operatorKeyword,TagName:B.tagName,ClassName:B.className,PseudoClassName:B.constant(B.className),IdName:B.labelName,"FeatureName PropertyName":B.propertyName,AttributeName:B.attributeName,NumberLiteral:B.number,KeywordQuery:B.keyword,UnaryQueryOp:B.operatorKeyword,"CallTag ValueName":B.atom,VariableName:B.variableName,Callee:B.operatorKeyword,Unit:B.unit,"UniversalSelector NestingSelector":B.definitionOperator,"MatchOp CompareOp":B.compareOperator,"ChildOp SiblingOp, LogicOp":B.logicOperator,BinOp:B.arithmeticOperator,Important:B.modifier,Comment:B.blockComment,ColorLiteral:B.color,"ParenthesizedContent StringLiteral":B.string,":":B.punctuation,"PseudoOp #":B.derefOperator,"; ,":B.separator,"( )":B.paren,"[ ]":B.squareBracket,"{ }":B.brace}),RU={__proto__:null,lang:38,"nth-child":38,"nth-last-child":38,"nth-of-type":38,"nth-last-of-type":38,dir:38,"host-context":38,if:84,url:124,"url-prefix":124,domain:124,regexp:124},MU={__proto__:null,or:98,and:98,not:106,only:106,layer:170},DU={__proto__:null,selector:112,layer:166},LU={__proto__:null,"@import":162,"@media":174,"@charset":178,"@namespace":182,"@keyframes":188,"@supports":200,"@scope":204},zU={__proto__:null,to:207},$U=xp.deserialize({version:14,states:"EbQYQdOOO#qQdOOP#xO`OOOOQP'#Cf'#CfOOQP'#Ce'#CeO#}QdO'#ChO$nQaO'#CcO$xQdO'#CkO%TQdO'#DpO%YQdO'#DrO%_QdO'#DuO%_QdO'#DxOOQP'#FV'#FVO&eQhO'#EhOOQS'#FU'#FUOOQS'#Ek'#EkQYQdOOO&lQdO'#EOO&PQhO'#EUO&lQdO'#EWO'aQdO'#EYO'lQdO'#E]O'tQhO'#EcO(VQdO'#EeO(bQaO'#CfO)VQ`O'#D{O)[Q`O'#F`O)gQdO'#F`QOQ`OOP)qO&jO'#CaPOOO)C@t)C@tOOQP'#Cj'#CjOOQP,59S,59SO#}QdO,59SO)|QdO,59VO%TQdO,5:[O%YQdO,5:^O%_QdO,5:aO%_QdO,5:cO%_QdO,5:dO%_QdO'#ErO*XQ`O,58}O*aQdO'#DzOOQS,58},58}OOQP'#Cn'#CnOOQO'#Dn'#DnOOQP,59V,59VO*hQ`O,59VO*mQ`O,59VOOQP'#Dq'#DqOOQP,5:[,5:[OOQO'#Ds'#DsO*rQpO,5:^O+]QaO,5:aO+sQaO,5:dOOQW'#DZ'#DZO,ZQhO'#DdO,xQhO'#FaO'tQhO'#DbO-WQ`O'#DhOOQW'#F['#F[O-]Q`O,5;SO-eQ`O'#DeOOQS-E8i-E8iOOQ['#Cs'#CsO-jQdO'#CtO.QQdO'#CzO.hQdO'#C}O/OQ!pO'#DPO1RQ!jO,5:jOOQO'#DU'#DUO*mQ`O'#DTO1cQ!nO'#FXO3`Q`O'#DVO3eQ`O'#DkOOQ['#FX'#FXO-`Q`O,5:pO3jQ!bO,5:rOOQS'#E['#E[O3rQ`O,5:tO3wQdO,5:tOOQO'#E_'#E_O4PQ`O,5:wO4UQhO,5:}O%_QdO'#DgOOQS,5;P,5;PO-eQ`O,5;PO4^QdO,5;PO4fQdO,5:gO4vQdO'#EtO5TQ`O,5;zO5TQ`O,5;zPOOO'#Ej'#EjP5`O&jO,58{POOO,58{,58{OOQP1G.n1G.nOOQP1G.q1G.qO*hQ`O1G.qO*mQ`O1G.qOOQP1G/v1G/vO5kQpO1G/xO5sQaO1G/{O6ZQaO1G/}O6qQaO1G0OO7XQaO,5;^OOQO-E8p-E8pOOQS1G.i1G.iO7cQ`O,5:fO7hQdO'#DoO7oQdO'#CrOOQP1G/x1G/xO&lQdO1G/xO7vQ!jO'#DZO8UQ!bO,59vO8^QhO,5:OOOQO'#F]'#F]O8XQ!bO,59zO'tQhO,59xO8fQhO'#EvO8sQ`O,5;{O9OQhO,59|O9uQhO'#DiOOQW,5:S,5:SOOQS1G0n1G0nOOQW,5:P,5:PO9|Q!fO'#FYOOQS'#FY'#FYOOQS'#Em'#EmO;^QdO,59`OOQ[,59`,59`O;tQdO,59fOOQ[,59f,59fO<[QdO,59iOOQ[,59i,59iOOQ[,59k,59kO&lQdO,59mO<rQhO'#EQOOQW'#EQ'#EQO=WQ`O1G0UO1[QhO1G0UOOQ[,59o,59oO'tQhO'#DXOOQ[,59q,59qO=]Q#tO,5:VOOQS1G0[1G0[OOQS1G0^1G0^OOQS1G0`1G0`O=hQ`O1G0`O=mQdO'#E`OOQS1G0c1G0cOOQS1G0i1G0iO=xQaO,5:RO-`Q`O1G0kOOQS1G0k1G0kO-eQ`O1G0kO>PQ!fO1G0ROOQO1G0R1G0ROOQO,5;`,5;`O>gQdO,5;`OOQO-E8r-E8rO>tQ`O1G1fPOOO-E8h-E8hPOOO1G.g1G.gOOQP7+$]7+$]OOQP7+%d7+%dO&lQdO7+%dOOQS1G0Q1G0QO?PQaO'#F_O?ZQ`O,5:ZO?`Q!fO'#ElO@^QdO'#FWO@hQ`O,59^O@mQ!bO7+%dO&lQdO1G/bO@uQhO1G/fOOQW1G/j1G/jOOQW1G/d1G/dOAWQhO,5;bOOQO-E8t-E8tOAfQhO'#DZOAtQhO'#F^OBPQ`O'#F^OBUQ`O,5:TOOQS-E8k-E8kOOQ[1G.z1G.zOOQ[1G/Q1G/QOOQ[1G/T1G/TOOQ[1G/X1G/XOBZQdO,5:lOOQS7+%p7+%pOB`Q`O7+%pOBeQhO'#DYOBmQ`O,59sO'tQhO,59sOOQ[1G/q1G/qOBuQ`O1G/qOOQS7+%z7+%zOBzQbO'#DPOOQO'#Eb'#EbOCYQ`O'#EaOOQO'#Ea'#EaOCeQ`O'#EwOCmQdO,5:zOOQS,5:z,5:zOOQ[1G/m1G/mOOQS7+&V7+&VO-`Q`O7+&VOCxQ!fO'#EsO&lQdO'#EsOEPQdO7+%mOOQO7+%m7+%mOOQO1G0z1G0zOEdQ!bO<<IOOElQdO'#EqOEvQ`O,5;yOOQP1G/u1G/uOOQS-E8j-E8jOFOQdO'#EpOFYQ`O,5;rOOQ]1G.x1G.xOOQP<<IO<<IOOFbQdO7+$|OOQO'#D]'#D]OFiQ!bO7+%QOFqQhO'#EoOF{Q`O,5;xO&lQdO,5;xOOQW1G/o1G/oOOQO'#ES'#ESOGTQ`O1G0WOOQS<<I[<<I[O&lQdO,59tOGnQhO1G/_OOQ[1G/_1G/_OGuQ`O1G/_OOQW-E8l-E8lOOQ[7+%]7+%]OOQO,5:{,5:{O=pQdO'#ExOCeQ`O,5;cOOQS,5;c,5;cOOQS-E8u-E8uOOQS1G0f1G0fOOQS<<Iq<<IqOG}Q!fO,5;_OOQS-E8q-E8qOOQO<<IX<<IXOOQPAN>jAN>jOIUQaO,5;]OOQO-E8o-E8oOI`QdO,5;[OOQO-E8n-E8nOOQW<<Hh<<HhOOQW<<Hl<<HlOIjQhO<<HlOI{QhO,5;ZOJWQ`O,5;ZOOQO-E8m-E8mOJ]QdO1G1dOBZQdO'#EuOJgQ`O7+%rOOQW7+%r7+%rOJoQ!bO1G/`OOQ[7+$y7+$yOJzQhO7+$yPKRQ`O'#EnOOQO,5;d,5;dOOQO-E8v-E8vOOQS1G0}1G0}OKWQ`OAN>WO&lQdO1G0uOK]Q`O7+'OOOQO,5;a,5;aOOQO-E8s-E8sOOQW<<I^<<I^OOQ[<<He<<HePOQW,5;Y,5;YOOQWG23rG23rOKeQdO7+&a",stateData:"Kx~O#sOS#tQQ~OW[OZ[O]TO`VOaVOi]OjWOmXO!jYO!mZO!saO!ybO!{cO!}dO#QeO#WfO#YgO#oRO~OQiOW[OZ[O]TO`VOaVOi]OjWOmXO!jYO!mZO!saO!ybO!{cO!}dO#QeO#WfO#YgO#ohO~O#m$SP~P!dO#tmO~O#ooO~O]qO`rOarOjsOmtO!juO!mwO#nvO~OpzO!^xO~P$SOc!QO#o|O#p}O~O#o!RO~O#o!TO~OW[OZ[O]TO`VOaVOjWOmXO!jYO!mZO#oRO~OS!]Oe!YO!V![O!Y!`O#q!XOp$TP~Ok$TP~P&POQ!jOe!cOm!dOp!eOr!mOt!mOz!kO!`!lO#o!bO#p!hO#}!fO~Ot!qO!`!lO#o!pO~Ot!sO#o!sO~OS!]Oe!YO!V![O!Y!`O#q!XO~Oe!vOpzO#Z!xO~O]YX`YX`!pXaYXjYXmYXpYX!^YX!jYX!mYX#nYX~O`!zO~Ok!{O#m$SXo$SX~O#m$SXo$SX~P!dO#u#OO#v#OO#w#QO~Oc#UO#o|O#p}O~OpzO!^xO~Oo$SP~P!dOe#`O~Oe#aO~Ol#bO!h#cO~O]qO`rOarOjsOmtO~Op!ia!^!ia!j!ia!m!ia#n!iad!ia~P*zOp!la!^!la!j!la!m!la#n!lad!la~P*zOR#gOS!]Oe!YOr#gOt#gO!V![O!Y!`O#q#dO#}!fO~O!R#iO!^#jOk$TXp$TX~Oe#mO~Ok#oOpzO~Oe!vO~O]#rO`#rOd#uOi#rOj#rOk#rO~P&lO]#rO`#rOi#rOj#rOk#rOl#wO~P&lO]#rO`#rOi#rOj#rOk#rOo#yO~P&lOP#zOSsXesXksXvsX!VsX!YsX!usX!wsX#qsX!TsXQsX]sX`sXdsXisXjsXmsXpsXrsXtsXzsX!`sX#osX#psX#}sXlsXosX!^sX!qsX#msX~Ov#{O!u#|O!w#}Ok$TP~P'tOe#aOS#{Xk#{Xv#{X!V#{X!Y#{X!u#{X!w#{X#q#{XQ#{X]#{X`#{Xd#{Xi#{Xj#{Xm#{Xp#{Xr#{Xt#{Xz#{X!`#{X#o#{X#p#{X#}#{Xl#{Xo#{X!^#{X!q#{X#m#{X~Oe$RO~Oe$TO~Ok$VOv#{O~Ok$WO~Ot$XO!`!lO~Op$YO~OpzO!R#iO~OpzO#Z$`O~O!q$bOk!oa#m!oao!oa~P&lOk#hX#m#hXo#hX~P!dOk!{O#m$Sao$Sa~O#u#OO#v#OO#w$hO~Ol$jO!h$kO~Op!ii!^!ii!j!ii!m!ii#n!iid!ii~P*zOp!ki!^!ki!j!ki!m!ki#n!kid!ki~P*zOp!li!^!li!j!li!m!li#n!lid!li~P*zOp#fa!^#fa~P$SOo$lO~Od$RP~P%_Od#zP~P&lO`!PXd}X!R}X!T!PX~O`$sO!T$tO~Od$uO!R#iO~Ok#jXp#jX!^#jX~P'tO!^#jOk$Tap$Ta~O!R#iOk!Uap!Ua!^!Uad!Ua`!Ua~OS!]Oe!YO!V![O!Y!`O#q$yO~Od$QP~P9dOv#{OQ#|X]#|X`#|Xd#|Xe#|Xi#|Xj#|Xk#|Xm#|Xp#|Xr#|Xt#|Xz#|X!`#|X#o#|X#p#|X#}#|Xl#|Xo#|X~O]#rO`#rOd%OOi#rOj#rOk#rO~P&lO]#rO`#rOi#rOj#rOk#rOl%PO~P&lO]#rO`#rOi#rOj#rOk#rOo%QO~P&lOe%SOS!tXk!tX!V!tX!Y!tX#q!tX~Ok%TO~Od%YOt%ZO!a%ZO~Ok%[O~Oo%cO#o%^O#}%]O~Od%dO~P$SOv#{O!^%hO!q%jOk!oi#m!oio!oi~P&lOk#ha#m#hao#ha~P!dOk!{O#m$Sio$Si~O!^%mOd$RX~P$SOd%oO~Ov#{OQ#`Xd#`Xe#`Xm#`Xp#`Xr#`Xt#`Xz#`X!^#`X!`#`X#o#`X#p#`X#}#`X~O!^%qOd#zX~P&lOd%sO~Ol%tOv#{O~OR#gOr#gOt#gO#q%vO#}!fO~O!R#iOk#jap#ja!^#ja~O`!PXd}X!R}X!^}X~O!R#iO!^%xOd$QX~O`%zO~Od%{O~O#o%|O~Ok&OO~O`&PO!R#iO~Od&ROk&QO~Od&UO~OP#zOpsX!^sXdsX~O#}%]Op#TX!^#TX~OpzO!^&WO~Oo&[O#o%^O#}%]O~Ov#{OQ#gXe#gXk#gXm#gXp#gXr#gXt#gXz#gX!^#gX!`#gX!q#gX#m#gX#o#gX#p#gX#}#gXo#gX~O!^%hO!q&`Ok!oq#m!oqo!oq~P&lOl&aOv#{O~Od#eX!^#eX~P%_O!^%mOd$Ra~Od#dX!^#dX~P&lO!^%qOd#za~Od&fO~P&lOd&gO!T&hO~Od#cX!^#cX~P9dO!^%xOd$Qa~O]&mOd&oO~OS#bae#ba!V#ba!Y#ba#q#ba~Od&qO~PG]Od&qOk&rO~Ov#{OQ#gae#gak#gam#gap#gar#gat#gaz#ga!^#ga!`#ga!q#ga#m#ga#o#ga#p#ga#}#gao#ga~Od#ea!^#ea~P$SOd#da!^#da~P&lOR#gOr#gOt#gO#q%vO#}%]O~O!R#iOd#ca!^#ca~O`&xO~O!^%xOd$Qi~P&lO]&mOd&|O~Ov#{Od|ik|i~Od&}O~PG]Ok'OO~Od'PO~O!^%xOd$Qq~Od#cq!^#cq~P&lO#s!a#t#}]#}v!m~",goto:"2h$UPPPPP$VP$YP$c$uP$cP%X$cPP%_PPP%e%o%oPPPPP%oPP%oP&]P%oP%o'W%oP't'w'}'}(^'}P'}P'}P'}'}P(m'}(yP(|PP)p)v$c)|$c*SP$cP$c$cP*Y*{+YP$YP+aP+dP$YP$YP$YP+j$YP+m+p+s+z$YP$YPP$YP,P,V,f,|-[-b-l-r-x.O.U.`.f.l.rPPPPPPPPPPP.x/R/w/z0|P1U1u2O2R2U2[RnQ_^OP`kz!{$dq[OPYZ`kuvwxz!v!{#`$d%mqSOPYZ`kuvwxz!v!{#`$d%mQpTR#RqQ!OVR#SrQ#S!QS$Q!i!jR$i#U!V!mac!c!d!e!z#a#c#t#v#x#{$a$k$p$s%h%i%q%u%z&P&d&l&x'Q!U!mac!c!d!e!z#a#c#t#v#x#{$a$k$p$s%h%i%q%u%z&P&d&l&x'QU#g!Y$t&hU%`$Y%b&WR&V%_!V!iac!c!d!e!z#a#c#t#v#x#{$a$k$p$s%h%i%q%u%z&P&d&l&x'QR$S!kQ%W$RR&S%Xk!^]bf!Y![!g#i#j#m$P$R%X%xQ#e!YQ${#mQ%w$tQ&j%xR&w&hQ!ygQ#p!`Q$^!xR%f$`R#n!]!U!mac!c!d!e!z#a#c#t#v#x#{$a$k$p$s%h%i%q%u%z&P&d&l&x'QQ!qdR$X!rQ!PVR#TrQ#S!PR$i#TQ!SWR#VsQ!UXR#WtQ{UQ!wgQ#^yQ#o!_Q$U!nQ$[!uQ$_!yQ%e$^Q&Y%aQ&]%fR&v&XSjPzQ!}kQ$c!{R%k$dZiPkz!{$dR$P!gQ%}%SR&z&mR!rdR!teR$Z!tS%a$Y%bR&t&WV%_$Y%b&WQ#PmR$g#PQ`OSkPzU!a`k$dR$d!{Q$p#aY%p$p%u&d&l'QQ%u$sQ&d%qQ&l%zR'Q&xQ#t!cQ#v!dQ#x!eV$}#t#v#xQ%X$RR&T%XQ%y$zS&k%y&yR&y&lQ%r$pR&e%rQ%n$mR&c%nQyUR#]yQ%i$aR&_%iQ!|jS$e!|$fR$f!}Q&n%}R&{&nQ#k!ZR$x#kQ%b$YR&Z%bQ&X%aR&u&X__OP`kz!{$d^UOP`kz!{$dQ!VYQ!WZQ#XuQ#YvQ#ZwQ#[xQ$]!vQ$m#`R&b%mR$q#aQ!gaQ!oc[#q!c!d!e#t#v#xQ$a!zd$o#a$p$s%q%u%z&d&l&x'QQ$r#cQ%R#{S%g$a%iQ%l$kQ&^%hR&p&P]#s!c!d!e#t#v#xW!Z]b!g$PQ!ufQ#f!YQ#l![Q$v#iQ$w#jQ$z#mS%V$R%XR&i%xQ#h!YQ%w$tR&w&hR$|#mR$n#`QlPR#_zQ!_]Q!nbQ$O!gR%U$P",nodeNames:"⚠ Unit VariableName VariableName QueryCallee Comment StyleSheet RuleSet UniversalSelector TagSelector TagName NestingSelector ClassSelector . ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue AtKeyword # ; ] [ BracketedValue } { BracedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee IfExpression if ArgList IfBranch KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp ComparisonQuery CompareOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector ParenthesizedSelector CallQuery ArgList , CallLiteral CallTag ParenthesizedContent PseudoClassName ArgList IdSelector IdName AttributeSelector AttributeName MatchOp ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp Block Declaration PropertyName Important ImportStatement import Layer layer LayerName layer MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports ScopeStatement scope to AtRule Styles",maxTerm:143,nodeProps:[["isolate",-2,5,36,""],["openedBy",20,"(",28,"[",31,"{"],["closedBy",21,")",29,"]",32,"}"]],propSources:[NU],skippedNodes:[0,5,106],repeatNodeCount:15,tokenData:"JQ~R!YOX$qX^%i^p$qpq%iqr({rs-ust/itu6Wuv$qvw7Qwx7cxy9Qyz9cz{9h{|:R|}>t}!O?V!O!P?t!P!Q@]!Q![AU![!]BP!]!^B{!^!_C^!_!`DY!`!aDm!a!b$q!b!cEn!c!}$q!}#OG{#O#P$q#P#QH^#Q#R6W#R#o$q#o#pHo#p#q6W#q#rIQ#r#sIc#s#y$q#y#z%i#z$f$q$f$g%i$g#BY$q#BY#BZ%i#BZ$IS$q$IS$I_%i$I_$I|$q$I|$JO%i$JO$JT$q$JT$JU%i$JU$KV$q$KV$KW%i$KW&FU$q&FU&FV%i&FV;'S$q;'S;=`Iz<%lO$q`$tSOy%Qz;'S%Q;'S;=`%c<%lO%Q`%VS!a`Oy%Qz;'S%Q;'S;=`%c<%lO%Q`%fP;=`<%l%Q~%nh#s~OX%QX^'Y^p%Qpq'Yqy%Qz#y%Q#y#z'Y#z$f%Q$f$g'Y$g#BY%Q#BY#BZ'Y#BZ$IS%Q$IS$I_'Y$I_$I|%Q$I|$JO'Y$JO$JT%Q$JT$JU'Y$JU$KV%Q$KV$KW'Y$KW&FU%Q&FU&FV'Y&FV;'S%Q;'S;=`%c<%lO%Q~'ah#s~!a`OX%QX^'Y^p%Qpq'Yqy%Qz#y%Q#y#z'Y#z$f%Q$f$g'Y$g#BY%Q#BY#BZ'Y#BZ$IS%Q$IS$I_'Y$I_$I|%Q$I|$JO'Y$JO$JT%Q$JT$JU'Y$JU$KV%Q$KV$KW'Y$KW&FU%Q&FU&FV'Y&FV;'S%Q;'S;=`%c<%lO%Qj)OUOy%Qz#]%Q#]#^)b#^;'S%Q;'S;=`%c<%lO%Qj)gU!a`Oy%Qz#a%Q#a#b)y#b;'S%Q;'S;=`%c<%lO%Qj*OU!a`Oy%Qz#d%Q#d#e*b#e;'S%Q;'S;=`%c<%lO%Qj*gU!a`Oy%Qz#c%Q#c#d*y#d;'S%Q;'S;=`%c<%lO%Qj+OU!a`Oy%Qz#f%Q#f#g+b#g;'S%Q;'S;=`%c<%lO%Qj+gU!a`Oy%Qz#h%Q#h#i+y#i;'S%Q;'S;=`%c<%lO%Qj,OU!a`Oy%Qz#T%Q#T#U,b#U;'S%Q;'S;=`%c<%lO%Qj,gU!a`Oy%Qz#b%Q#b#c,y#c;'S%Q;'S;=`%c<%lO%Qj-OU!a`Oy%Qz#h%Q#h#i-b#i;'S%Q;'S;=`%c<%lO%Qj-iS!qY!a`Oy%Qz;'S%Q;'S;=`%c<%lO%Q~-xWOY-uZr-urs.bs#O-u#O#P.g#P;'S-u;'S;=`/c<%lO-u~.gOt~~.jRO;'S-u;'S;=`.s;=`O-u~.vXOY-uZr-urs.bs#O-u#O#P.g#P;'S-u;'S;=`/c;=`<%l-u<%lO-u~/fP;=`<%l-uj/nYjYOy%Qz!Q%Q!Q![0^![!c%Q!c!i0^!i#T%Q#T#Z0^#Z;'S%Q;'S;=`%c<%lO%Qj0cY!a`Oy%Qz!Q%Q!Q![1R![!c%Q!c!i1R!i#T%Q#T#Z1R#Z;'S%Q;'S;=`%c<%lO%Qj1WY!a`Oy%Qz!Q%Q!Q![1v![!c%Q!c!i1v!i#T%Q#T#Z1v#Z;'S%Q;'S;=`%c<%lO%Qj1}YrY!a`Oy%Qz!Q%Q!Q![2m![!c%Q!c!i2m!i#T%Q#T#Z2m#Z;'S%Q;'S;=`%c<%lO%Qj2tYrY!a`Oy%Qz!Q%Q!Q![3d![!c%Q!c!i3d!i#T%Q#T#Z3d#Z;'S%Q;'S;=`%c<%lO%Qj3iY!a`Oy%Qz!Q%Q!Q![4X![!c%Q!c!i4X!i#T%Q#T#Z4X#Z;'S%Q;'S;=`%c<%lO%Qj4`YrY!a`Oy%Qz!Q%Q!Q![5O![!c%Q!c!i5O!i#T%Q#T#Z5O#Z;'S%Q;'S;=`%c<%lO%Qj5TY!a`Oy%Qz!Q%Q!Q![5s![!c%Q!c!i5s!i#T%Q#T#Z5s#Z;'S%Q;'S;=`%c<%lO%Qj5zSrY!a`Oy%Qz;'S%Q;'S;=`%c<%lO%Qd6ZUOy%Qz!_%Q!_!`6m!`;'S%Q;'S;=`%c<%lO%Qd6tS!hS!a`Oy%Qz;'S%Q;'S;=`%c<%lO%Qb7VSZQOy%Qz;'S%Q;'S;=`%c<%lO%Q~7fWOY7cZw7cwx.bx#O7c#O#P8O#P;'S7c;'S;=`8z<%lO7c~8RRO;'S7c;'S;=`8[;=`O7c~8_XOY7cZw7cwx.bx#O7c#O#P8O#P;'S7c;'S;=`8z;=`<%l7c<%lO7c~8}P;=`<%l7cj9VSeYOy%Qz;'S%Q;'S;=`%c<%lO%Q~9hOd~n9oUWQvWOy%Qz!_%Q!_!`6m!`;'S%Q;'S;=`%c<%lO%Qj:YWvW!mQOy%Qz!O%Q!O!P:r!P!Q%Q!Q![=w![;'S%Q;'S;=`%c<%lO%Qj:wU!a`Oy%Qz!Q%Q!Q![;Z![;'S%Q;'S;=`%c<%lO%Qj;bY!a`#}YOy%Qz!Q%Q!Q![;Z![!g%Q!g!h<Q!h#X%Q#X#Y<Q#Y;'S%Q;'S;=`%c<%lO%Qj<VY!a`Oy%Qz{%Q{|<u|}%Q}!O<u!O!Q%Q!Q![=^![;'S%Q;'S;=`%c<%lO%Qj<zU!a`Oy%Qz!Q%Q!Q![=^![;'S%Q;'S;=`%c<%lO%Qj=eU!a`#}YOy%Qz!Q%Q!Q![=^![;'S%Q;'S;=`%c<%lO%Qj>O[!a`#}YOy%Qz!O%Q!O!P;Z!P!Q%Q!Q![=w![!g%Q!g!h<Q!h#X%Q#X#Y<Q#Y;'S%Q;'S;=`%c<%lO%Qj>yS!^YOy%Qz;'S%Q;'S;=`%c<%lO%Qj?[WvWOy%Qz!O%Q!O!P:r!P!Q%Q!Q![=w![;'S%Q;'S;=`%c<%lO%Qj?yU]YOy%Qz!Q%Q!Q![;Z![;'S%Q;'S;=`%c<%lO%Q~@bTvWOy%Qz{@q{;'S%Q;'S;=`%c<%lO%Q~@xS!a`#t~Oy%Qz;'S%Q;'S;=`%c<%lO%QjAZ[#}YOy%Qz!O%Q!O!P;Z!P!Q%Q!Q![=w![!g%Q!g!h<Q!h#X%Q#X#Y<Q#Y;'S%Q;'S;=`%c<%lO%QjBUU`YOy%Qz![%Q![!]Bh!];'S%Q;'S;=`%c<%lO%QbBoSaQ!a`Oy%Qz;'S%Q;'S;=`%c<%lO%QjCQSkYOy%Qz;'S%Q;'S;=`%c<%lO%QhCcU!TWOy%Qz!_%Q!_!`Cu!`;'S%Q;'S;=`%c<%lO%QhC|S!TW!a`Oy%Qz;'S%Q;'S;=`%c<%lO%QlDaS!TW!hSOy%Qz;'S%Q;'S;=`%c<%lO%QjDtV!jQ!TWOy%Qz!_%Q!_!`Cu!`!aEZ!a;'S%Q;'S;=`%c<%lO%QbEbS!jQ!a`Oy%Qz;'S%Q;'S;=`%c<%lO%QjEqYOy%Qz}%Q}!OFa!O!c%Q!c!}GO!}#T%Q#T#oGO#o;'S%Q;'S;=`%c<%lO%QjFfW!a`Oy%Qz!c%Q!c!}GO!}#T%Q#T#oGO#o;'S%Q;'S;=`%c<%lO%QjGV[iY!a`Oy%Qz}%Q}!OGO!O!Q%Q!Q![GO![!c%Q!c!}GO!}#T%Q#T#oGO#o;'S%Q;'S;=`%c<%lO%QjHQSmYOy%Qz;'S%Q;'S;=`%c<%lO%QnHcSl^Oy%Qz;'S%Q;'S;=`%c<%lO%QjHtSpYOy%Qz;'S%Q;'S;=`%c<%lO%QjIVSoYOy%Qz;'S%Q;'S;=`%c<%lO%QfIhU!mQOy%Qz!_%Q!_!`6m!`;'S%Q;'S;=`%c<%lO%Q`I}P;=`<%l$q",tokenizers:[QU,PU,EU,AU,1,2,3,4,new Lm("m~RRYZ[z{a~~g~aO#v~~dP!P!Qg~lO#w~~",28,129)],topRules:{StyleSheet:[0,6],Styles:[1,105]},dynamicPrecedences:{76:1},specialized:[{term:124,get:e=>RU[e]||-1},{term:125,get:e=>MU[e]||-1},{term:4,get:e=>DU[e]||-1},{term:25,get:e=>LU[e]||-1},{term:123,get:e=>zU[e]||-1}],tokenPrec:1963}),WO=null;function FO(){if(!WO&&typeof document=="object"&&document.body){let{style:e}=document.body,t=[],n=new Set;for(let r in e)r!="cssText"&&r!="cssFloat"&&typeof e[r]=="string"&&(/[A-Z]/.test(r)&&(r=r.replace(/[A-Z]/g,i=>"-"+i.toLowerCase())),n.has(r)||(t.push(r),n.add(r)));WO=t.sort().map(r=>({type:"property",label:r,apply:r+": "}))}return WO||[]}var YT=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(e=>({type:"class",label:e})),WT=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(e=>({type:"keyword",label:e})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(e=>({type:"constant",label:e}))),IU=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(e=>({type:"type",label:e})),qU=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map(e=>({type:"keyword",label:e})),Sa=/^(\w[\w-]*|-\w[\w-]*|)$/,XU=/^-(-[\w-]*)?$/;function ZU(e,t){var n;if((e.name=="("||e.type.isError)&&(e=e.parent||e),e.name!="ArgList")return!1;let r=(n=e.parent)===null||n===void 0?void 0:n.firstChild;return(r==null?void 0:r.name)!="Callee"?!1:t.sliceString(r.from,r.to)=="var"}var FT=new qN,BU=["Declaration"];function VU(e){for(let t=e;;){if(t.type.isTop)return t;if(!(t=t.parent))return e}}function tM(e,t,n){if(t.to-t.from>4096){let r=FT.get(t);if(r)return r;let i=[],a=new Set,s=t.cursor(wt.IncludeAnonymous);if(s.firstChild())do for(let l of tM(e,s.node,n))a.has(l.label)||(a.add(l.label),i.push(l));while(s.nextSibling());return FT.set(t,i),i}else{let r=[],i=new Set;return t.cursor().iterate(a=>{var s;if(n(a)&&a.matchContext(BU)&&((s=a.node.nextSibling)===null||s===void 0?void 0:s.name)==":"){let l=e.sliceString(a.from,a.to);i.has(l)||(i.add(l),r.push({label:l,type:"variable"}))}}),r}}var UU=e=>t=>{let{state:n,pos:r}=t,i=Ln(n).resolveInner(r,-1),a=i.type.isError&&i.from==i.to-1&&n.doc.sliceString(i.from,i.to)=="-";if(i.name=="PropertyName"||(a||i.name=="TagName")&&/^(Block|Styles)$/.test(i.resolve(i.to).name))return{from:i.from,options:FO(),validFor:Sa};if(i.name=="ValueName")return{from:i.from,options:WT,validFor:Sa};if(i.name=="PseudoClassName")return{from:i.from,options:YT,validFor:Sa};if(e(i)||(t.explicit||a)&&ZU(i,n.doc))return{from:e(i)||a?i.from:r,options:tM(n.doc,VU(i),e),validFor:XU};if(i.name=="TagName"){for(let{parent:c}=i;c;c=c.parent)if(c.name=="Block")return{from:i.from,options:FO(),validFor:Sa};return{from:i.from,options:IU,validFor:Sa}}if(i.name=="AtKeyword")return{from:i.from,options:qU,validFor:Sa};if(!t.explicit)return null;let s=i.resolve(r),l=s.childBefore(r);return l&&l.name==":"&&s.name=="PseudoClassSelector"?{from:r,options:YT,validFor:Sa}:l&&l.name==":"&&s.name=="Declaration"||s.name=="ArgList"?{from:r,options:WT,validFor:Sa}:s.name=="Block"||s.name=="Styles"?{from:r,options:FO(),validFor:Sa}:null},YU=UU(e=>e.name=="VariableName"),$m=bp.define({name:"css",parser:$U.configure({props:[qd.add({Declaration:Il()}),fc.add({"Block KeyframeList":Dx})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function WU(){return new ec($m,$m.data.of({autocomplete:YU}))}var FU=316,HU=317,HT=1,GU=2,KU=3,JU=4,e8=318,t8=320,n8=321,r8=5,i8=6,a8=0,r0=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],nM=125,s8=59,i0=47,o8=42,l8=43,c8=45,u8=60,d8=44,f8=63,h8=46,m8=91,p8=new IR({start:!1,shift(e,t){return t==r8||t==i8||t==t8?e:t==n8},strict:!1}),g8=new Ir((e,t)=>{let{next:n}=e;(n==nM||n==-1||t.context)&&e.acceptToken(e8)},{contextual:!0,fallback:!0}),v8=new Ir((e,t)=>{let{next:n}=e,r;r0.indexOf(n)>-1||n==i0&&((r=e.peek(1))==i0||r==o8)||n!=nM&&n!=s8&&n!=-1&&!t.context&&e.acceptToken(FU)},{contextual:!0}),O8=new Ir((e,t)=>{e.next==m8&&!t.context&&e.acceptToken(HU)},{contextual:!0}),b8=new Ir((e,t)=>{let{next:n}=e;if(n==l8||n==c8){if(e.advance(),n==e.next){e.advance();let r=!t.context&&t.canShift(HT);e.acceptToken(r?HT:GU)}}else n==f8&&e.peek(1)==h8&&(e.advance(),e.advance(),(e.next<48||e.next>57)&&e.acceptToken(KU))},{contextual:!0});function HO(e,t){return e>=65&&e<=90||e>=97&&e<=122||e==95||e>=192||!t&&e>=48&&e<=57}var y8=new Ir((e,t)=>{if(e.next!=u8||!t.dialectEnabled(a8)||(e.advance(),e.next==i0))return;let n=0;for(;r0.indexOf(e.next)>-1;)e.advance(),n++;if(HO(e.next,!0)){for(e.advance(),n++;HO(e.next,!1);)e.advance(),n++;for(;r0.indexOf(e.next)>-1;)e.advance(),n++;if(e.next==d8)return;for(let r=0;;r++){if(r==7){if(!HO(e.next,!0))return;break}if(e.next!="extends".charCodeAt(r))break;e.advance(),n++}}e.acceptToken(JU,-n)}),x8=Xo({"get set async static":B.modifier,"for while do if else switch try catch finally return throw break continue default case defer":B.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":B.operatorKeyword,"let var const using function class extends":B.definitionKeyword,"import export from":B.moduleKeyword,"with debugger new":B.keyword,TemplateString:B.special(B.string),super:B.atom,BooleanLiteral:B.bool,this:B.self,null:B.null,Star:B.modifier,VariableName:B.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":B.function(B.variableName),VariableDefinition:B.definition(B.variableName),Label:B.labelName,PropertyName:B.propertyName,PrivatePropertyName:B.special(B.propertyName),"CallExpression/MemberExpression/PropertyName":B.function(B.propertyName),"FunctionDeclaration/VariableDefinition":B.function(B.definition(B.variableName)),"ClassDeclaration/VariableDefinition":B.definition(B.className),"NewExpression/VariableName":B.className,PropertyDefinition:B.definition(B.propertyName),PrivatePropertyDefinition:B.definition(B.special(B.propertyName)),UpdateOp:B.updateOperator,"LineComment Hashbang":B.lineComment,BlockComment:B.blockComment,Number:B.number,String:B.string,Escape:B.escape,ArithOp:B.arithmeticOperator,LogicOp:B.logicOperator,BitOp:B.bitwiseOperator,CompareOp:B.compareOperator,RegExp:B.regexp,Equals:B.definitionOperator,Arrow:B.function(B.punctuation),": Spread":B.punctuation,"( )":B.paren,"[ ]":B.squareBracket,"{ }":B.brace,"InterpolationStart InterpolationEnd":B.special(B.brace),".":B.derefOperator,", ;":B.separator,"@":B.meta,TypeName:B.typeName,TypeDefinition:B.definition(B.typeName),"type enum interface implements namespace module declare":B.definitionKeyword,"abstract global Privacy readonly override":B.modifier,"is keyof unique infer asserts":B.operatorKeyword,JSXAttributeValue:B.attributeValue,JSXText:B.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":B.angleBracket,"JSXIdentifier JSXNameSpacedName":B.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":B.attributeName,"JSXBuiltin/JSXIdentifier":B.standard(B.tagName)}),S8={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,in:52,out:55,const:56,extends:60,this:64,true:72,false:72,null:84,void:88,typeof:92,super:108,new:142,delete:154,yield:163,await:167,class:172,public:235,private:235,protected:235,readonly:237,instanceof:256,satisfies:259,import:292,keyof:349,unique:353,infer:359,asserts:395,is:397,abstract:417,implements:419,type:421,let:424,var:426,using:429,interface:435,enum:439,namespace:445,module:447,declare:451,global:455,defer:471,for:476,of:485,while:488,with:492,do:496,if:500,else:502,switch:506,case:512,try:518,catch:522,finally:526,return:530,throw:534,break:538,continue:542,debugger:546},w8={__proto__:null,async:129,get:131,set:133,declare:195,public:197,private:197,protected:197,static:199,abstract:201,override:203,readonly:209,accessor:211,new:401},_8={__proto__:null,"<":193},k8=xp.deserialize({version:14,states:"$F|Q%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#DaO.QQlO'#DgO.bQlO'#DrO%[QlO'#DzO0fQlO'#ESOOQ!0Lf'#E['#E[O1PQ`O'#EXOOQO'#Ep'#EpOOQO'#Il'#IlO1XQ`O'#GsO1dQ`O'#EoO1iQ`O'#EoO3hQ!0MxO'#JrO6[Q!0MxO'#JsO6uQ`O'#F]O6zQ,UO'#FtOOQ!0Lf'#Ff'#FfO7VO7dO'#FfO9XQMhO'#F|O9`Q`O'#F{OOQ!0Lf'#Js'#JsOOQ!0Lb'#Jr'#JrO9eQ`O'#GwOOQ['#K_'#K_O9pQ`O'#IYO9uQ!0LrO'#IZOOQ['#J`'#J`OOQ['#I_'#I_Q`QlOOQ`QlOOO9}Q!L^O'#DvO:UQlO'#EOO:]QlO'#EQO9kQ`O'#GsO:dQMhO'#CoO:rQ`O'#EnO:}Q`O'#EyO;hQMhO'#FeO;xQ`O'#GsOOQO'#K`'#K`O;}Q`O'#K`O<]Q`O'#G{O<]Q`O'#G|O<]Q`O'#HOO9kQ`O'#HRO=SQ`O'#HUO>kQ`O'#CeO>{Q`O'#HcO?TQ`O'#HiO?TQ`O'#HkO`QlO'#HmO?TQ`O'#HoO?TQ`O'#HrO?YQ`O'#HxO?_Q!0LsO'#IOO%[QlO'#IQO?jQ!0LsO'#ISO?uQ!0LsO'#IUO9uQ!0LrO'#IWO@QQ!0MxO'#CiOASQpO'#DlQOQ`OOO%[QlO'#EQOAjQ`O'#ETO:dQMhO'#EnOAuQ`O'#EnOBQQ!bO'#FeOOQ['#Cg'#CgOOQ!0Lb'#Dq'#DqOOQ!0Lb'#Jv'#JvO%[QlO'#JvOOQO'#Jy'#JyOOQO'#Ih'#IhOCQQpO'#EgOOQ!0Lb'#Ef'#EfOOQ!0Lb'#J}'#J}OC|Q!0MSO'#EgODWQpO'#EWOOQO'#Jx'#JxODlQpO'#JyOEyQpO'#EWODWQpO'#EgPFWO&2DjO'#CbPOOO)CD})CD}OOOO'#I`'#I`OFcO#tO,59UOOQ!0Lh,59U,59UOOOO'#Ia'#IaOFqO&jO,59UOGPQ!L^O'#DcOOOO'#Ic'#IcOGWO#@ItO,59{OOQ!0Lf,59{,59{OGfQlO'#IdOGyQ`O'#JtOIxQ!fO'#JtO+}QlO'#JtOJPQ`O,5:ROJgQ`O'#EpOJtQ`O'#KTOKPQ`O'#KSOKPQ`O'#KSOKXQ`O,5;^OK^Q`O'#KROOQ!0Ln,5:^,5:^OKeQlO,5:^OMcQ!0MxO,5:fONSQ`O,5:nONmQ!0LrO'#KQONtQ`O'#KPO9eQ`O'#KPO! YQ`O'#KPO! bQ`O,5;]O! gQ`O'#KPO!#lQ!fO'#JsOOQ!0Lh'#Ci'#CiO%[QlO'#ESO!$[Q!fO,5:sOOQS'#Jz'#JzOOQO-E<j-E<jO9kQ`O,5=_O!$rQ`O,5=_O!$wQlO,5;ZO!&zQMhO'#EkO!(eQ`O,5;ZO!(jQlO'#DyO!(tQpO,5;dO!(|QpO,5;dO%[QlO,5;dOOQ['#FT'#FTOOQ['#FV'#FVO%[QlO,5;eO%[QlO,5;eO%[QlO,5;eO%[QlO,5;eO%[QlO,5;eO%[QlO,5;eO%[QlO,5;eO%[QlO,5;eO%[QlO,5;eO%[QlO,5;eOOQ['#FZ'#FZO!)[QlO,5;tOOQ!0Lf,5;y,5;yOOQ!0Lf,5;z,5;zOOQ!0Lf,5;|,5;|O%[QlO'#IpO!+_Q!0LrO,5<iO%[QlO,5;eO!&zQMhO,5;eO!+|QMhO,5;eO!-nQMhO'#E^O%[QlO,5;wOOQ!0Lf,5;{,5;{O!-uQ,UO'#FjO!.rQ,UO'#KXO!.^Q,UO'#KXO!.yQ,UO'#KXOOQO'#KX'#KXO!/_Q,UO,5<SOOOW,5<`,5<`O!/pQlO'#FvOOOW'#Io'#IoO7VO7dO,5<QO!/wQ,UO'#FxOOQ!0Lf,5<Q,5<QO!0hQ$IUO'#CyOOQ!0Lh'#C}'#C}O!0{O#@ItO'#DRO!1iQMjO,5<eO!1pQ`O,5<hO!3YQ(CWO'#GXO!3jQ`O'#GYO!3oQ`O'#GYO!5_Q(CWO'#G^O!6dQpO'#GbOOQO'#Gn'#GnO!,TQMhO'#GmOOQO'#Gp'#GpO!,TQMhO'#GoO!7VQ$IUO'#JlOOQ!0Lh'#Jl'#JlO!7aQ`O'#JkO!7oQ`O'#JjO!7wQ`O'#CuOOQ!0Lh'#C{'#C{O!8YQ`O'#C}OOQ!0Lh'#DV'#DVOOQ!0Lh'#DX'#DXO!8_Q`O,5<eO1SQ`O'#DZO!,TQMhO'#GPO!,TQMhO'#GRO!8gQ`O'#GTO!8lQ`O'#GUO!3oQ`O'#G[O!,TQMhO'#GaO<]Q`O'#JkO!8qQ`O'#EqO!9`Q`O,5<gOOQ!0Lb'#Cr'#CrO!9hQ`O'#ErO!:bQpO'#EsOOQ!0Lb'#KR'#KRO!:iQ!0LrO'#KaO9uQ!0LrO,5=cO`QlO,5>tOOQ['#Jh'#JhOOQ[,5>u,5>uOOQ[-E<]-E<]O!<hQ!0MxO,5:bO!:]QpO,5:`O!?RQ!0MxO,5:jO%[QlO,5:jO!AiQ!0MxO,5:lOOQO,5@z,5@zO!BYQMhO,5=_O!BhQ!0LrO'#JiO9`Q`O'#JiO!ByQ!0LrO,59ZO!CUQpO,59ZO!C^QMhO,59ZO:dQMhO,59ZO!CiQ`O,5;ZO!CqQ`O'#HbO!DVQ`O'#KdO%[QlO,5;}O!:]QpO,5<PO!D_Q`O,5=zO!DdQ`O,5=zO!DiQ`O,5=zO!DwQ`O,5=zO9uQ!0LrO,5=zO<]Q`O,5=jOOQO'#Cy'#CyO!EOQpO,5=gO!EWQMhO,5=hO!EcQ`O,5=jO!EhQ!bO,5=mO!EpQ`O'#K`O?YQ`O'#HWO9kQ`O'#HYO!EuQ`O'#HYO:dQMhO'#H[O!EzQ`O'#H[OOQ[,5=p,5=pO!FPQ`O'#H]O!FbQ`O'#CoO!FgQ`O,59PO!FqQ`O,59PO!HvQlO,59POOQ[,59P,59PO!IWQ!0LrO,59PO%[QlO,59PO!KcQlO'#HeOOQ['#Hf'#HfOOQ['#Hg'#HgO`QlO,5=}O!KyQ`O,5=}O`QlO,5>TO`QlO,5>VO!LOQ`O,5>XO`QlO,5>ZO!LTQ`O,5>^O!LYQlO,5>dOOQ[,5>j,5>jO%[QlO,5>jO9uQ!0LrO,5>lOOQ[,5>n,5>nO#!dQ`O,5>nOOQ[,5>p,5>pO#!dQ`O,5>pOOQ[,5>r,5>rO##QQpO'#D_O%[QlO'#JvO##sQpO'#JvO##}QpO'#DmO#$`QpO'#DmO#&qQlO'#DmO#&xQ`O'#JuO#'QQ`O,5:WO#'VQ`O'#EtO#'eQ`O'#KUO#'mQ`O,5;_O#'rQpO'#DmO#(PQpO'#EVOOQ!0Lf,5:o,5:oO%[QlO,5:oO#(WQ`O,5:oO?YQ`O,5;YO!CUQpO,5;YO!C^QMhO,5;YO:dQMhO,5;YO#(`Q`O,5@bO#(eQ07dO,5:sOOQO-E<f-E<fO#)kQ!0MSO,5;RODWQpO,5:rO#)uQpO,5:rODWQpO,5;RO!ByQ!0LrO,5:rOOQ!0Lb'#Ej'#EjOOQO,5;R,5;RO%[QlO,5;RO#*SQ!0LrO,5;RO#*_Q!0LrO,5;RO!CUQpO,5:rOOQO,5;X,5;XO#*mQ!0LrO,5;RPOOO'#I^'#I^P#+RO&2DjO,58|POOO,58|,58|OOOO-E<^-E<^OOQ!0Lh1G.p1G.pOOOO-E<_-E<_OOOO,59},59}O#+^Q!bO,59}OOOO-E<a-E<aOOQ!0Lf1G/g1G/gO#+cQ!fO,5?OO+}QlO,5?OOOQO,5?U,5?UO#+mQlO'#IdOOQO-E<b-E<bO#+zQ`O,5@`O#,SQ!fO,5@`O#,ZQ`O,5@nOOQ!0Lf1G/m1G/mO%[QlO,5@oO#,cQ`O'#IjOOQO-E<h-E<hO#,ZQ`O,5@nOOQ!0Lb1G0x1G0xOOQ!0Ln1G/x1G/xOOQ!0Ln1G0Y1G0YO%[QlO,5@lO#,wQ!0LrO,5@lO#-YQ!0LrO,5@lO#-aQ`O,5@kO9eQ`O,5@kO#-iQ`O,5@kO#-wQ`O'#ImO#-aQ`O,5@kOOQ!0Lb1G0w1G0wO!(tQpO,5:uO!)PQpO,5:uOOQS,5:w,5:wO#.iQdO,5:wO#.qQMhO1G2yO9kQ`O1G2yOOQ!0Lf1G0u1G0uO#/PQ!0MxO1G0uO#0UQ!0MvO,5;VOOQ!0Lh'#GW'#GWO#0rQ!0MzO'#JlO!$wQlO1G0uO#2}Q!fO'#JwO%[QlO'#JwO#3XQ`O,5:eOOQ!0Lh'#D_'#D_OOQ!0Lf1G1O1G1OO%[QlO1G1OOOQ!0Lf1G1f1G1fO#3^Q`O1G1OO#5rQ!0MxO1G1PO#5yQ!0MxO1G1PO#8aQ!0MxO1G1PO#8hQ!0MxO1G1PO#;OQ!0MxO1G1PO#=fQ!0MxO1G1PO#=mQ!0MxO1G1PO#=tQ!0MxO1G1PO#@[Q!0MxO1G1PO#@cQ!0MxO1G1PO#BpQ?MtO'#CiO#DkQ?MtO1G1`O#DrQ?MtO'#JsO#EVQ!0MxO,5?[OOQ!0Lb-E<n-E<nO#GdQ!0MxO1G1PO#HaQ!0MzO1G1POOQ!0Lf1G1P1G1PO#IdQMjO'#J|O#InQ`O,5:xO#IsQ!0MxO1G1cO#JgQ,UO,5<WO#JoQ,UO,5<XO#JwQ,UO'#FoO#K`Q`O'#FnOOQO'#KY'#KYOOQO'#In'#InO#KeQ,UO1G1nOOQ!0Lf1G1n1G1nOOOW1G1y1G1yO#KvQ?MtO'#JrO#LQQ`O,5<bO!)[QlO,5<bOOOW-E<m-E<mOOQ!0Lf1G1l1G1lO#LVQpO'#KXOOQ!0Lf,5<d,5<dO#L_QpO,5<dO#LdQMhO'#DTOOOO'#Ib'#IbO#LkO#@ItO,59mOOQ!0Lh,59m,59mO%[QlO1G2PO!8lQ`O'#IrO#LvQ`O,5<zOOQ!0Lh,5<w,5<wO!,TQMhO'#IuO#MdQMjO,5=XO!,TQMhO'#IwO#NVQMjO,5=ZO!&zQMhO,5=]OOQO1G2S1G2SO#NaQ!dO'#CrO#NtQ(CWO'#ErO$ |QpO'#GbO$!dQ!dO,5<sO$!kQ`O'#K[O9eQ`O'#K[O$!yQ`O,5<uO$#aQ!dO'#C{O!,TQMhO,5<tO$#kQ`O'#GZO$$PQ`O,5<tO$$UQ!dO'#GWO$$cQ!dO'#K]O$$mQ`O'#K]O!&zQMhO'#K]O$$rQ`O,5<xO$$wQlO'#JvO$%RQpO'#GcO#$`QpO'#GcO$%dQ`O'#GgO!3oQ`O'#GkO$%iQ!0LrO'#ItO$%tQpO,5<|OOQ!0Lp,5<|,5<|O$%{QpO'#GcO$&YQpO'#GdO$&kQpO'#GdO$&pQMjO,5=XO$'QQMjO,5=ZOOQ!0Lh,5=^,5=^O!,TQMhO,5@VO!,TQMhO,5@VO$'bQ`O'#IyO$'vQ`O,5@UO$(OQ`O,59aOOQ!0Lh,59i,59iO$(TQ`O,5@VO$)TQ$IYO,59uOOQ!0Lh'#Jp'#JpO$)vQMjO,5<kO$*iQMjO,5<mO@zQ`O,5<oOOQ!0Lh,5<p,5<pO$*sQ`O,5<vO$*xQMjO,5<{O$+YQ`O'#KPO!$wQlO1G2RO$+_Q`O1G2RO9eQ`O'#KSO9eQ`O'#EtO%[QlO'#EtO9eQ`O'#I{O$+dQ!0LrO,5@{OOQ[1G2}1G2}OOQ[1G4`1G4`OOQ!0Lf1G/|1G/|OOQ!0Lf1G/z1G/zO$-fQ!0MxO1G0UOOQ[1G2y1G2yO!&zQMhO1G2yO%[QlO1G2yO#.tQ`O1G2yO$/jQMhO'#EkOOQ!0Lb,5@T,5@TO$/wQ!0LrO,5@TOOQ[1G.u1G.uO!ByQ!0LrO1G.uO!CUQpO1G.uO!C^QMhO1G.uO$0YQ`O1G0uO$0_Q`O'#CiO$0jQ`O'#KeO$0rQ`O,5=|O$0wQ`O'#KeO$0|Q`O'#KeO$1[Q`O'#JRO$1jQ`O,5AOO$1rQ!fO1G1iOOQ!0Lf1G1k1G1kO9kQ`O1G3fO@zQ`O1G3fO$1yQ`O1G3fO$2OQ`O1G3fO!DiQ`O1G3fO9uQ!0LrO1G3fOOQ[1G3f1G3fO!EcQ`O1G3UO!&zQMhO1G3RO$2TQ`O1G3ROOQ[1G3S1G3SO!&zQMhO1G3SO$2YQ`O1G3SO$2bQpO'#HQOOQ[1G3U1G3UO!6_QpO'#I}O!EhQ!bO1G3XOOQ[1G3X1G3XOOQ[,5=r,5=rO$2jQMhO,5=tO9kQ`O,5=tO$%dQ`O,5=vO9`Q`O,5=vO!CUQpO,5=vO!C^QMhO,5=vO:dQMhO,5=vO$2xQ`O'#KcO$3TQ`O,5=wOOQ[1G.k1G.kO$3YQ!0LrO1G.kO@zQ`O1G.kO$3eQ`O1G.kO9uQ!0LrO1G.kO$5mQ!fO,5AQO$5zQ`O,5AQO9eQ`O,5AQO$6VQlO,5>PO$6^Q`O,5>POOQ[1G3i1G3iO`QlO1G3iOOQ[1G3o1G3oOOQ[1G3q1G3qO?TQ`O1G3sO$6cQlO1G3uO$:gQlO'#HtOOQ[1G3x1G3xO$:tQ`O'#HzO?YQ`O'#H|OOQ[1G4O1G4OO$:|QlO1G4OO9uQ!0LrO1G4UOOQ[1G4W1G4WOOQ!0Lb'#G_'#G_O9uQ!0LrO1G4YO9uQ!0LrO1G4[O$?TQ`O,5@bO!)[QlO,5;`O9eQ`O,5;`O?YQ`O,5:XO!)[QlO,5:XO!CUQpO,5:XO$?YQ?MtO,5:XOOQO,5;`,5;`O$?dQpO'#IeO$?zQ`O,5@aOOQ!0Lf1G/r1G/rO$@SQpO'#IkO$@^Q`O,5@pOOQ!0Lb1G0y1G0yO#$`QpO,5:XOOQO'#Ig'#IgO$@fQpO,5:qOOQ!0Ln,5:q,5:qO#(ZQ`O1G0ZOOQ!0Lf1G0Z1G0ZO%[QlO1G0ZOOQ!0Lf1G0t1G0tO?YQ`O1G0tO!CUQpO1G0tO!C^QMhO1G0tOOQ!0Lb1G5|1G5|O!ByQ!0LrO1G0^OOQO1G0m1G0mO%[QlO1G0mO$@mQ!0LrO1G0mO$@xQ!0LrO1G0mO!CUQpO1G0^ODWQpO1G0^O$AWQ!0LrO1G0mOOQO1G0^1G0^O$AlQ!0MxO1G0mPOOO-E<[-E<[POOO1G.h1G.hOOOO1G/i1G/iO$AvQ!bO,5<iO$BOQ!fO1G4jOOQO1G4p1G4pO%[QlO,5?OO$BYQ`O1G5zO$BbQ`O1G6YO$BjQ!fO1G6ZO9eQ`O,5?UO$BtQ!0MxO1G6WO%[QlO1G6WO$CUQ!0LrO1G6WO$CgQ`O1G6VO$CgQ`O1G6VO9eQ`O1G6VO$CoQ`O,5?XO9eQ`O,5?XOOQO,5?X,5?XO$DTQ`O,5?XO$+YQ`O,5?XOOQO-E<k-E<kOOQS1G0a1G0aOOQS1G0c1G0cO#.lQ`O1G0cOOQ[7+(e7+(eO!&zQMhO7+(eO%[QlO7+(eO$DcQ`O7+(eO$DnQMhO7+(eO$D|Q!0MzO,5=XO$GXQ!0MzO,5=ZO$IdQ!0MzO,5=XO$KuQ!0MzO,5=ZO$NWQ!0MzO,59uO%!]Q!0MzO,5<kO%$hQ!0MzO,5<mO%&sQ!0MzO,5<{OOQ!0Lf7+&a7+&aO%)UQ!0MxO7+&aO%)xQlO'#IfO%*VQ`O,5@cO%*_Q!fO,5@cOOQ!0Lf1G0P1G0PO%*iQ`O7+&jOOQ!0Lf7+&j7+&jO%*nQ?MtO,5:fO%[QlO7+&zO%*xQ?MtO,5:bO%+VQ?MtO,5:jO%+aQ?MtO,5:lO%+kQMhO'#IiO%+uQ`O,5@hOOQ!0Lh1G0d1G0dOOQO1G1r1G1rOOQO1G1s1G1sO%+}Q!jO,5<ZO!)[QlO,5<YOOQO-E<l-E<lOOQ!0Lf7+'Y7+'YOOOW7+'e7+'eOOOW1G1|1G1|O%,YQ`O1G1|OOQ!0Lf1G2O1G2OOOOO,59o,59oO%,_Q!dO,59oOOOO-E<`-E<`OOQ!0Lh1G/X1G/XO%,fQ!0MxO7+'kOOQ!0Lh,5?^,5?^O%-YQMhO1G2fP%-aQ`O'#IrPOQ!0Lh-E<p-E<pO%-}QMjO,5?aOOQ!0Lh-E<s-E<sO%.pQMjO,5?cOOQ!0Lh-E<u-E<uO%.zQ!dO1G2wO%/RQ!dO'#CrO%/iQMhO'#KSO$$wQlO'#JvOOQ!0Lh1G2_1G2_O%/sQ`O'#IqO%0[Q`O,5@vO%0[Q`O,5@vO%0dQ`O,5@vO%0oQ`O,5@vOOQO1G2a1G2aO%0}QMjO1G2`O$+YQ`O'#K[O!,TQMhO1G2`O%1_Q(CWO'#IsO%1lQ`O,5@wO!&zQMhO,5@wO%1tQ!dO,5@wOOQ!0Lh1G2d1G2dO%4UQ!fO'#CiO%4`Q`O,5=POOQ!0Lb,5<},5<}O%4hQpO,5<}OOQ!0Lb,5=O,5=OOCwQ`O,5<}O%4sQpO,5<}OOQ!0Lb,5=R,5=RO$+YQ`O,5=VOOQO,5?`,5?`OOQO-E<r-E<rOOQ!0Lp1G2h1G2hO#$`QpO,5<}O$$wQlO,5=PO%5RQ`O,5=OO%5^QpO,5=OO!,TQMhO'#IuO%6WQMjO1G2sO!,TQMhO'#IwO%6yQMjO1G2uO%7TQMjO1G5qO%7_QMjO1G5qOOQO,5?e,5?eOOQO-E<w-E<wOOQO1G.{1G.{O!,TQMhO1G5qO!,TQMhO1G5qO!:]QpO,59wO%[QlO,59wOOQ!0Lh,5<j,5<jO%7lQ`O1G2ZO!,TQMhO1G2bO%7qQ!0MxO7+'mOOQ!0Lf7+'m7+'mO!$wQlO7+'mO%8eQ`O,5;`OOQ!0Lb,5?g,5?gOOQ!0Lb-E<y-E<yO%8jQ!dO'#K^O#(ZQ`O7+(eO4UQ!fO7+(eO$DfQ`O7+(eO%8tQ!0MvO'#CiO%9XQ!0MvO,5=SO%9lQ`O,5=SO%9tQ`O,5=SOOQ!0Lb1G5o1G5oOOQ[7+$a7+$aO!ByQ!0LrO7+$aO!CUQpO7+$aO!$wQlO7+&aO%9yQ`O'#JQO%:bQ`O,5APOOQO1G3h1G3hO9kQ`O,5APO%:bQ`O,5APO%:jQ`O,5APOOQO,5?m,5?mOOQO-E=P-E=POOQ!0Lf7+'T7+'TO%:oQ`O7+)QO9uQ!0LrO7+)QO9kQ`O7+)QO@zQ`O7+)QO%:tQ`O7+)QOOQ[7+)Q7+)QOOQ[7+(p7+(pO%:yQ!0MvO7+(mO!&zQMhO7+(mO!E^Q`O7+(nOOQ[7+(n7+(nO!&zQMhO7+(nO%;TQ`O'#KbO%;`Q`O,5=lOOQO,5?i,5?iOOQO-E<{-E<{OOQ[7+(s7+(sO%<rQpO'#HZOOQ[1G3`1G3`O!&zQMhO1G3`O%[QlO1G3`O%<yQ`O1G3`O%=UQMhO1G3`O9uQ!0LrO1G3bO$%dQ`O1G3bO9`Q`O1G3bO!CUQpO1G3bO!C^QMhO1G3bO%=dQ`O'#JPO%=xQ`O,5@}O%>QQpO,5@}OOQ!0Lb1G3c1G3cOOQ[7+$V7+$VO@zQ`O7+$VO9uQ!0LrO7+$VO%>]Q`O7+$VO%[QlO1G6lO%[QlO1G6mO%>bQ!0LrO1G6lO%>lQlO1G3kO%>sQ`O1G3kO%>xQlO1G3kOOQ[7+)T7+)TO9uQ!0LrO7+)_O`QlO7+)aOOQ['#Kh'#KhOOQ['#JS'#JSO%?PQlO,5>`OOQ[,5>`,5>`O%[QlO'#HuO%?^Q`O'#HwOOQ[,5>f,5>fO9eQ`O,5>fOOQ[,5>h,5>hOOQ[7+)j7+)jOOQ[7+)p7+)pOOQ[7+)t7+)tOOQ[7+)v7+)vO%?cQpO1G5|O%?}Q?MtO1G0zO%@XQ`O1G0zOOQO1G/s1G/sO%@dQ?MtO1G/sO?YQ`O1G/sO!)[QlO'#DmOOQO,5?P,5?POOQO-E<c-E<cOOQO,5?V,5?VOOQO-E<i-E<iO!CUQpO1G/sOOQO-E<e-E<eOOQ!0Ln1G0]1G0]OOQ!0Lf7+%u7+%uO#(ZQ`O7+%uOOQ!0Lf7+&`7+&`O?YQ`O7+&`O!CUQpO7+&`OOQO7+%x7+%xO$AlQ!0MxO7+&XOOQO7+&X7+&XO%[QlO7+&XO%@nQ!0LrO7+&XO!ByQ!0LrO7+%xO!CUQpO7+%xO%@yQ!0LrO7+&XO%AXQ!0MxO7++rO%[QlO7++rO%AiQ`O7++qO%AiQ`O7++qOOQO1G4s1G4sO9eQ`O1G4sO%AqQ`O1G4sOOQS7+%}7+%}O#(ZQ`O<<LPO4UQ!fO<<LPO%BPQ`O<<LPOOQ[<<LP<<LPO!&zQMhO<<LPO%[QlO<<LPO%BXQ`O<<LPO%BdQ!0MzO,5?aO%DoQ!0MzO,5?cO%FzQ!0MzO1G2`O%I]Q!0MzO1G2sO%KhQ!0MzO1G2uO%MsQ!fO,5?QO%[QlO,5?QOOQO-E<d-E<dO%M}Q`O1G5}OOQ!0Lf<<JU<<JUO%NVQ?MtO1G0uO&!^Q?MtO1G1PO&!eQ?MtO1G1PO&$fQ?MtO1G1PO&$mQ?MtO1G1PO&&nQ?MtO1G1PO&(oQ?MtO1G1PO&(vQ?MtO1G1PO&(}Q?MtO1G1PO&+OQ?MtO1G1PO&+VQ?MtO1G1PO&+^Q!0MxO<<JfO&-UQ?MtO1G1PO&.RQ?MvO1G1PO&/UQ?MvO'#JlO&1[Q?MtO1G1cO&1iQ?MtO1G0UO&1sQMjO,5?TOOQO-E<g-E<gO!)[QlO'#FqOOQO'#KZ'#KZOOQO1G1u1G1uO&1}Q`O1G1tO&2SQ?MtO,5?[OOOW7+'h7+'hOOOO1G/Z1G/ZO&2^Q!dO1G4xOOQ!0Lh7+(Q7+(QP!&zQMhO,5?^O!,TQMhO7+(cO&2eQ`O,5?]O9eQ`O,5?]O$+YQ`O,5?]OOQO-E<o-E<oO&2sQ`O1G6bO&2sQ`O1G6bO&2{Q`O1G6bO&3WQMjO7+'zO&3hQ!dO,5?_O&3rQ`O,5?_O!&zQMhO,5?_OOQO-E<q-E<qO&3wQ!dO1G6cO&4RQ`O1G6cO&4ZQ`O1G2kO!&zQMhO1G2kOOQ!0Lb1G2i1G2iOOQ!0Lb1G2j1G2jO%4hQpO1G2iO!CUQpO1G2iOCwQ`O1G2iOOQ!0Lb1G2q1G2qO&4`QpO1G2iO&4nQ`O1G2kO$+YQ`O1G2jOCwQ`O1G2jO$$wQlO1G2kO&4vQ`O1G2jO&5jQMjO,5?aOOQ!0Lh-E<t-E<tO&6]QMjO,5?cOOQ!0Lh-E<v-E<vO!,TQMhO7++]O&6gQMjO7++]O&6qQMjO7++]OOQ!0Lh1G/c1G/cO&7OQ`O1G/cOOQ!0Lh7+'u7+'uO&7TQMjO7+'|O&7eQ!0MxO<<KXOOQ!0Lf<<KX<<KXO&8XQ`O1G0zO!&zQMhO'#IzO&8^Q`O,5@xO&:`Q!fO<<LPO!&zQMhO1G2nO&:gQ!0LrO1G2nOOQ[<<G{<<G{O!ByQ!0LrO<<G{O&:xQ!0MxO<<I{OOQ!0Lf<<I{<<I{OOQO,5?l,5?lO&;lQ`O,5?lO&;qQ`O,5?lOOQO-E=O-E=OO&<PQ`O1G6kO&<PQ`O1G6kO9kQ`O1G6kO@zQ`O<<LlOOQ[<<Ll<<LlO&<XQ`O<<LlO9uQ!0LrO<<LlO9kQ`O<<LlOOQ[<<LX<<LXO%:yQ!0MvO<<LXOOQ[<<LY<<LYO!E^Q`O<<LYO&<^QpO'#I|O&<iQ`O,5@|O!)[QlO,5@|OOQ[1G3W1G3WOOQO'#JO'#JOO9uQ!0LrO'#JOO&<qQpO,5=uOOQ[,5=u,5=uO&<xQpO'#EgO&=PQpO'#GeO&=UQ`O7+(zO&=ZQ`O7+(zOOQ[7+(z7+(zO!&zQMhO7+(zO%[QlO7+(zO&=cQ`O7+(zOOQ[7+(|7+(|O9uQ!0LrO7+(|O$%dQ`O7+(|O9`Q`O7+(|O!CUQpO7+(|O&=nQ`O,5?kOOQO-E<}-E<}OOQO'#H^'#H^O&=yQ`O1G6iO9uQ!0LrO<<GqOOQ[<<Gq<<GqO@zQ`O<<GqO&>RQ`O7+,WO&>WQ`O7+,XO%[QlO7+,WO%[QlO7+,XOOQ[7+)V7+)VO&>]Q`O7+)VO&>bQlO7+)VO&>iQ`O7+)VOOQ[<<Ly<<LyOOQ[<<L{<<L{OOQ[-E=Q-E=QOOQ[1G3z1G3zO&>nQ`O,5>aOOQ[,5>c,5>cO&>sQ`O1G4QO9eQ`O7+&fO!)[QlO7+&fOOQO7+%_7+%_O&>xQ?MtO1G6ZO?YQ`O7+%_OOQ!0Lf<<Ia<<IaOOQ!0Lf<<Iz<<IzO?YQ`O<<IzOOQO<<Is<<IsO$AlQ!0MxO<<IsO%[QlO<<IsOOQO<<Id<<IdO!ByQ!0LrO<<IdO&?SQ!0LrO<<IsO&?_Q!0MxO<= ^O&?oQ`O<= ]OOQO7+*_7+*_O9eQ`O7+*_OOQ[ANAkANAkO&?wQ!fOANAkO!&zQMhOANAkO#(ZQ`OANAkO4UQ!fOANAkO&@OQ`OANAkO%[QlOANAkO&@WQ!0MzO7+'zO&BiQ!0MzO,5?aO&DtQ!0MzO,5?cO&GPQ!0MzO7+'|O&IbQ!fO1G4lO&IlQ?MtO7+&aO&KpQ?MvO,5=XO&MwQ?MvO,5=ZO&NXQ?MvO,5=XO&NiQ?MvO,5=ZO&NyQ?MvO,59uO'#PQ?MvO,5<kO'%SQ?MvO,5<mO''hQ?MvO,5<{O')^Q?MtO7+'kO')kQ?MtO7+'mO')xQ`O,5<]OOQO7+'`7+'`OOQ!0Lh7+*d7+*dO')}QMjO<<K}OOQO1G4w1G4wO'*UQ`O1G4wO'*aQ`O1G4wO'*oQ`O7++|O'*oQ`O7++|O!&zQMhO1G4yO'*wQ!dO1G4yO'+RQ`O7++}O'+ZQ`O7+(VO'+fQ!dO7+(VOOQ!0Lb7+(T7+(TOOQ!0Lb7+(U7+(UO!CUQpO7+(TOCwQ`O7+(TO'+pQ`O7+(VO!&zQMhO7+(VO$+YQ`O7+(UO'+uQ`O7+(VOCwQ`O7+(UO'+}QMjO<<NwO!,TQMhO<<NwOOQ!0Lh7+$}7+$}O',XQ!dO,5?fOOQO-E<x-E<xO',cQ!0MvO7+(YO!&zQMhO7+(YOOQ[AN=gAN=gO9kQ`O1G5WOOQO1G5W1G5WO',sQ`O1G5WO',xQ`O7+,VO',xQ`O7+,VO9uQ!0LrOANBWO@zQ`OANBWOOQ[ANBWANBWO'-QQ`OANBWOOQ[ANAsANAsOOQ[ANAtANAtO'-VQ`O,5?hOOQO-E<z-E<zO'-bQ?MtO1G6hOOQO,5?j,5?jOOQO-E<|-E<|OOQ[1G3a1G3aO'-lQ`O,5=POOQ[<<Lf<<LfO!&zQMhO<<LfO&=UQ`O<<LfO'-qQ`O<<LfO%[QlO<<LfOOQ[<<Lh<<LhO9uQ!0LrO<<LhO$%dQ`O<<LhO9`Q`O<<LhO'-yQpO1G5VO'.UQ`O7+,TOOQ[AN=]AN=]O9uQ!0LrOAN=]OOQ[<= r<= rOOQ[<= s<= sO'.^Q`O<= rO'.cQ`O<= sOOQ[<<Lq<<LqO'.hQ`O<<LqO'.mQlO<<LqOOQ[1G3{1G3{O?YQ`O7+)lO'.tQ`O<<JQO'/PQ?MtO<<JQOOQO<<Hy<<HyOOQ!0LfAN?fAN?fOOQOAN?_AN?_O$AlQ!0MxOAN?_OOQOAN?OAN?OO%[QlOAN?_OOQO<<My<<MyOOQ[G27VG27VO!&zQMhOG27VO#(ZQ`OG27VO'/ZQ!fOG27VO4UQ!fOG27VO'/bQ`OG27VO'/jQ?MtO<<JfO'/wQ?MvO1G2`O'1mQ?MvO,5?aO'3pQ?MvO,5?cO'5sQ?MvO1G2sO'7vQ?MvO1G2uO'9yQ?MtO<<KXO':WQ?MtO<<I{OOQO1G1w1G1wO!,TQMhOANAiOOQO7+*c7+*cO':eQ`O7+*cO':pQ`O<= hO':xQ!dO7+*eOOQ!0Lb<<Kq<<KqO$+YQ`O<<KqOCwQ`O<<KqO';SQ`O<<KqO!&zQMhO<<KqOOQ!0Lb<<Ko<<KoO!CUQpO<<KoO';_Q!dO<<KqOOQ!0Lb<<Kp<<KpO';iQ`O<<KqO!&zQMhO<<KqO$+YQ`O<<KpO';nQMjOANDcO';xQ!0MvO<<KtOOQO7+*r7+*rO9kQ`O7+*rO'<YQ`O<= qOOQ[G27rG27rO9uQ!0LrOG27rO@zQ`OG27rO!)[QlO1G5SO'<bQ`O7+,SO'<jQ`O1G2kO&=UQ`OANBQOOQ[ANBQANBQO!&zQMhOANBQO'<oQ`OANBQOOQ[ANBSANBSO9uQ!0LrOANBSO$%dQ`OANBSOOQO'#H_'#H_OOQO7+*q7+*qOOQ[G22wG22wOOQ[ANE^ANE^OOQ[ANE_ANE_OOQ[ANB]ANB]O'<wQ`OANB]OOQ[<<MW<<MWO!)[QlOAN?lOOQOG24yG24yO$AlQ!0MxOG24yO#(ZQ`OLD,qOOQ[LD,qLD,qO!&zQMhOLD,qO'<|Q!fOLD,qO'=TQ?MvO7+'zO'>yQ?MvO,5?aO'@|Q?MvO,5?cO'CPQ?MvO7+'|O'DuQMjOG27TOOQO<<M}<<M}OOQ!0LbANA]ANA]O$+YQ`OANA]OCwQ`OANA]O'EVQ!dOANA]OOQ!0LbANAZANAZO'E^Q`OANA]O!&zQMhOANA]O'EiQ!dOANA]OOQ!0LbANA[ANA[OOQO<<N^<<N^OOQ[LD-^LD-^O9uQ!0LrOLD-^O'EsQ?MtO7+*nOOQO'#Gf'#GfOOQ[G27lG27lO&=UQ`OG27lO!&zQMhOG27lOOQ[G27nG27nO9uQ!0LrOG27nOOQ[G27wG27wO'E}Q?MtOG25WOOQOLD*eLD*eOOQ[!$(!]!$(!]O#(ZQ`O!$(!]O!&zQMhO!$(!]O'FXQ!0MzOG27TOOQ!0LbG26wG26wO$+YQ`OG26wO'HjQ`OG26wOCwQ`OG26wO'HuQ!dOG26wO!&zQMhOG26wOOQ[!$(!x!$(!xOOQ[LD-WLD-WO&=UQ`OLD-WOOQ[LD-YLD-YOOQ[!)9Ew!)9EwO#(ZQ`O!)9EwOOQ!0LbLD,cLD,cO$+YQ`OLD,cOCwQ`OLD,cO'H|Q`OLD,cO'IXQ!dOLD,cOOQ[!$(!r!$(!rOOQ[!.K;c!.K;cO'I`Q?MvOG27TOOQ!0Lb!$( }!$( }O$+YQ`O!$( }OCwQ`O!$( }O'KUQ`O!$( }OOQ!0Lb!)9Ei!)9EiO$+YQ`O!)9EiOCwQ`O!)9EiOOQ!0Lb!.K;T!.K;TO$+YQ`O!.K;TOOQ!0Lb!4/0o!4/0oO!)[QlO'#DzO1PQ`O'#EXO'KaQ!fO'#JrO'KhQ!L^O'#DvO'KoQlO'#EOO'KvQ!fO'#CiO'N^Q!fO'#CiO!)[QlO'#EQO'NnQlO,5;ZO!)[QlO,5;eO!)[QlO,5;eO!)[QlO,5;eO!)[QlO,5;eO!)[QlO,5;eO!)[QlO,5;eO!)[QlO,5;eO!)[QlO,5;eO!)[QlO,5;eO!)[QlO,5;eO!)[QlO'#IpO(!qQ`O,5<iO!)[QlO,5;eO(!yQMhO,5;eO($dQMhO,5;eO!)[QlO,5;wO!&zQMhO'#GmO(!yQMhO'#GmO!&zQMhO'#GoO(!yQMhO'#GoO1SQ`O'#DZO1SQ`O'#DZO!&zQMhO'#GPO(!yQMhO'#GPO!&zQMhO'#GRO(!yQMhO'#GRO!&zQMhO'#GaO(!yQMhO'#GaO!)[QlO,5:jO($kQpO'#D_O($uQpO'#JvO!)[QlO,5@oO'NnQlO1G0uO(%PQ?MtO'#CiO!)[QlO1G2PO!&zQMhO'#IuO(!yQMhO'#IuO!&zQMhO'#IwO(!yQMhO'#IwO(%ZQ!dO'#CrO!&zQMhO,5<tO(!yQMhO,5<tO'NnQlO1G2RO!)[QlO7+&zO!&zQMhO1G2`O(!yQMhO1G2`O!&zQMhO'#IuO(!yQMhO'#IuO!&zQMhO'#IwO(!yQMhO'#IwO!&zQMhO1G2bO(!yQMhO1G2bO'NnQlO7+'mO'NnQlO7+&aO!&zQMhOANAiO(!yQMhOANAiO(%nQ`O'#EoO(%sQ`O'#EoO(%{Q`O'#F]O(&QQ`O'#EyO(&VQ`O'#KTO(&bQ`O'#KRO(&mQ`O,5;ZO(&rQMjO,5<eO(&yQ`O'#GYO('OQ`O'#GYO('TQ`O,5<eO(']Q`O,5<gO('eQ`O,5;ZO('mQ?MtO1G1`O('tQ`O,5<tO('yQ`O,5<tO((OQ`O,5<vO((TQ`O,5<vO((YQ`O1G2RO((_Q`O1G0uO((dQMjO<<K}O((kQMjO<<K}O((rQMhO'#F|O9`Q`O'#F{OAuQ`O'#EnO!)[QlO,5;tO!3oQ`O'#GYO!3oQ`O'#GYO!3oQ`O'#G[O!3oQ`O'#G[O!,TQMhO7+(cO!,TQMhO7+(cO%.zQ!dO1G2wO%.zQ!dO1G2wO!&zQMhO,5=]O!&zQMhO,5=]",stateData:"()x~O'|OS'}OSTOS(ORQ~OPYOQYOSfOY!VOaqOdzOeyOl!POpkOrYOskOtkOzkO|YO!OYO!SWO!WkO!XkO!_XO!iuO!lZO!oYO!pYO!qYO!svO!uwO!xxO!|]O$W|O$niO%h}O%j!QO%l!OO%m!OO%n!OO%q!RO%s!SO%v!TO%w!TO%y!UO&W!WO&^!XO&`!YO&b!ZO&d![O&g!]O&m!^O&s!_O&u!`O&w!aO&y!bO&{!cO(TSO(VTO(YUO(aVO(o[O~OWtO~P`OPYOQYOSfOd!jOe!iOpkOrYOskOtkOzkO|YO!OYO!SWO!WkO!XkO!_!eO!iuO!lZO!oYO!pYO!qYO!svO!u!gO!x!hO$W!kO$niO(T!dO(VTO(YUO(aVO(o[O~Oa!wOs!nO!S!oO!b!yO!c!vO!d!vO!|<VO#T!pO#U!pO#V!xO#W!pO#X!pO#[!zO#]!zO(U!lO(VTO(YUO(e!mO(o!sO~O(O!{O~OP]XR]X[]Xa]Xj]Xr]X!Q]X!S]X!]]X!l]X!p]X#R]X#S]X#`]X#kfX#n]X#o]X#p]X#q]X#r]X#s]X#t]X#u]X#v]X#x]X#z]X#{]X$Q]X'z]X(a]X(r]X(y]X(z]X~O!g%RX~P(qO_!}O(V#PO(W!}O(X#PO~O_#QO(X#PO(Y#PO(Z#QO~Ox#SO!U#TO(b#TO(c#VO~OPYOQYOSfOd!jOe!iOpkOrYOskOtkOzkO|YO!OYO!SWO!WkO!XkO!_!eO!iuO!lZO!oYO!pYO!qYO!svO!u!gO!x!hO$W!kO$niO(T<ZO(VTO(YUO(aVO(o[O~O![#ZO!]#WO!Y(hP!Y(vP~P+}O!^#cO~P`OPYOQYOSfOd!jOe!iOrYOskOtkOzkO|YO!OYO!SWO!WkO!XkO!_!eO!iuO!lZO!oYO!pYO!qYO!svO!u!gO!x!hO$W!kO$niO(VTO(YUO(aVO(o[O~Op#mO![#iO!|]O#i#lO#j#iO(T<[O!k(sP~P.iO!l#oO(T#nO~O!x#sO!|]O%h#tO~O#k#uO~O!g#vO#k#uO~OP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!]$_O!l#xO!p$[O#R$RO#n$OO#o$PO#p$PO#q$PO#r$QO#s$RO#t$RO#u$bO#v$SO#x$UO#z$WO#{$XO(aVO(r$YO(y#|O(z#}O~Oa(fX'z(fX'w(fX!k(fX!Y(fX!_(fX%i(fX!g(fX~P1qO#S$dO#`$eO$Q$eOP(gXR(gX[(gXj(gXr(gX!Q(gX!S(gX!](gX!l(gX!p(gX#R(gX#n(gX#o(gX#p(gX#q(gX#r(gX#s(gX#t(gX#u(gX#v(gX#x(gX#z(gX#{(gX(a(gX(r(gX(y(gX(z(gX!_(gX%i(gX~Oa(gX'z(gX'w(gX!Y(gX!k(gXv(gX!g(gX~P4UO#`$eO~O$]$hO$_$gO$f$mO~OSfO!_$nO$i$oO$k$qO~Oh%VOj%dOk%dOp%WOr%XOs$tOt$tOz%YO|%ZO!O%]O!S${O!_$|O!i%bO!l$xO#j%cO$W%`O$t%^O$v%_O$y%aO(T$sO(VTO(YUO(a$uO(y$}O(z%POg(^P~Ol%[O~P7eO!l%eO~O!S%hO!_%iO(T%gO~O!g%mO~Oa%nO'z%nO~O!Q%rO~P%[O(U!lO~P%[O%n%vO~P%[Oh%VO!l%eO(T%gO(U!lO~Oe%}O!l%eO(T%gO~Oj$RO~O!_&PO(T%gO(U!lO(VTO(YUO`)WP~O!Q&SO!l&RO%j&VO&T&WO~P;SO!x#sO~O%s&YO!S)SX!_)SX(T)SX~O(T&ZO~Ol!PO!u&`O%j!QO%l!OO%m!OO%n!OO%q!RO%s!SO%v!TO%w!TO~Od&eOe&dO!x&bO%h&cO%{&aO~P<bOd&hOeyOl!PO!_&gO!u&`O!xxO!|]O%h}O%l!OO%m!OO%n!OO%q!RO%s!SO%v!TO%w!TO%y!UO~Ob&kO#`&nO%j&iO(U!lO~P=gO!l&oO!u&sO~O!l#oO~O!_XO~Oa%nO'x&{O'z%nO~Oa%nO'x'OO'z%nO~Oa%nO'x'QO'z%nO~O'w]X!Y]Xv]X!k]X&[]X!_]X%i]X!g]X~P(qO!b'_O!c'WO!d'WO(U!lO(VTO(YUO~Os'UO!S'TO!['XO(e'SO!^(iP!^(xP~P@nOn'bO!_'`O(T%gO~Oe'gO!l%eO(T%gO~O!Q&SO!l&RO~Os!nO!S!oO!|<VO#T!pO#U!pO#W!pO#X!pO(U!lO(VTO(YUO(e!mO(o!sO~O!b'mO!c'lO!d'lO#V!pO#['nO#]'nO~PBYOa%nOh%VO!g#vO!l%eO'z%nO(r'pO~O!p'tO#`'rO~PChOs!nO!S!oO(VTO(YUO(e!mO(o!sO~O!_XOs(mX!S(mX!b(mX!c(mX!d(mX!|(mX#T(mX#U(mX#V(mX#W(mX#X(mX#[(mX#](mX(U(mX(V(mX(Y(mX(e(mX(o(mX~O!c'lO!d'lO(U!lO~PDWO(P'xO(Q'xO(R'zO~O_!}O(V'|O(W!}O(X'|O~O_#QO(X'|O(Y'|O(Z#QO~Ov(OO~P%[Ox#SO!U#TO(b#TO(c(RO~O![(TO!Y'WX!Y'^X!]'WX!]'^X~P+}O!](VO!Y(hX~OP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!](VO!l#xO!p$[O#R$RO#n$OO#o$PO#p$PO#q$PO#r$QO#s$RO#t$RO#u$bO#v$SO#x$UO#z$WO#{$XO(aVO(r$YO(y#|O(z#}O~O!Y(hX~PHRO!Y([O~O!Y(uX!](uX!g(uX!k(uX(r(uX~O#`(uX#k#dX!^(uX~PJUO#`(]O!Y(wX!](wX~O!](^O!Y(vX~O!Y(aO~O#`$eO~PJUO!^(bO~P`OR#zO!Q#yO!S#{O!l#xO(aVOP!na[!naj!nar!na!]!na!p!na#R!na#n!na#o!na#p!na#q!na#r!na#s!na#t!na#u!na#v!na#x!na#z!na#{!na(r!na(y!na(z!na~Oa!na'z!na'w!na!Y!na!k!nav!na!_!na%i!na!g!na~PKlO!k(cO~O!g#vO#`(dO(r'pO!](tXa(tX'z(tX~O!k(tX~PNXO!S%hO!_%iO!|]O#i(iO#j(hO(T%gO~O!](jO!k(sX~O!k(lO~O!S%hO!_%iO#j(hO(T%gO~OP(gXR(gX[(gXj(gXr(gX!Q(gX!S(gX!](gX!l(gX!p(gX#R(gX#n(gX#o(gX#p(gX#q(gX#r(gX#s(gX#t(gX#u(gX#v(gX#x(gX#z(gX#{(gX(a(gX(r(gX(y(gX(z(gX~O!g#vO!k(gX~P! uOR(nO!Q(mO!l#xO#S$dO!|!{a!S!{a~O!x!{a%h!{a!_!{a#i!{a#j!{a(T!{a~P!#vO!x(rO~OPYOQYOSfOd!jOe!iOpkOrYOskOtkOzkO|YO!OYO!SWO!WkO!XkO!_XO!iuO!lZO!oYO!pYO!qYO!svO!u!gO!x!hO$W!kO$niO(T!dO(VTO(YUO(aVO(o[O~Oh%VOp%WOr%XOs$tOt$tOz%YO|%ZO!O<sO!S${O!_$|O!i>VO!l$xO#j<yO$W%`O$t<uO$v<wO$y%aO(T(vO(VTO(YUO(a$uO(y$}O(z%PO~O#k(xO~O![(zO!k(kP~P%[O(e(|O(o[O~O!S)OO!l#xO(e(|O(o[O~OP<UOQ<UOSfOd>ROe!iOpkOr<UOskOtkOzkO|<UO!O<UO!SWO!WkO!XkO!_!eO!i<XO!lZO!o<UO!p<UO!q<UO!s<YO!u<]O!x!hO$W!kO$n>PO(T)]O(VTO(YUO(aVO(o[O~O!]$_Oa$qa'z$qa'w$qa!k$qa!Y$qa!_$qa%i$qa!g$qa~Ol)dO~P!&zOh%VOp%WOr%XOs$tOt$tOz%YO|%ZO!O%]O!S${O!_$|O!i%bO!l$xO#j%cO$W%`O$t%^O$v%_O$y%aO(T(vO(VTO(YUO(a$uO(y$}O(z%PO~Og(pP~P!,TO!Q)iO!g)hO!_$^X$Z$^X$]$^X$_$^X$f$^X~O!g)hO!_({X$Z({X$]({X$_({X$f({X~O!Q)iO~P!.^O!Q)iO!_({X$Z({X$]({X$_({X$f({X~O!_)kO$Z)oO$])jO$_)jO$f)pO~O![)sO~P!)[O$]$hO$_$gO$f)wO~On$zX!Q$zX#S$zX'y$zX(y$zX(z$zX~OgmXg$zXnmX!]mX#`mX~P!0SOx)yO(b)zO(c)|O~On*VO!Q*OO'y*PO(y$}O(z%PO~Og)}O~P!1WOg*WO~Oh%VOr%XOs$tOt$tOz%YO|%ZO!O<sO!S*YO!_*ZO!i>VO!l$xO#j<yO$W%`O$t<uO$v<wO$y%aO(VTO(YUO(a$uO(y$}O(z%PO~Op*`O}O(T&ZO~O!l+SO~O(T(vO~Op+WO!S%hO![#iO!_%iO!|]O#i#lO#j#iO(T%gO!k(sP~O!g#vO#k+XO~O!S%hOTX'z)TX~OP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!l#xO!p$[O#R$RO#n$OO#o$PO#p$PO#q$PO#r$QO#s$RO#t$RO#u$bO#v$SO#x$UO#z$WO#{$XO(aVO(r$YO(y#|O(z#}O~Oa!ja!]!ja'z!ja'w!ja!Y!ja!k!jav!ja!_!ja%i!ja!g!ja~P!:tOR#zO!Q#yO!S#{O!l#xO(aVOP!ra[!raj!rar!ra!]!ra!p!ra#R!ra#n!ra#o!ra#p!ra#q!ra#r!ra#s!ra#t!ra#u!ra#v!ra#x!ra#z!ra#{!ra(r!ra(y!ra(z!ra~Oa!ra'z!ra'w!ra!Y!ra!k!rav!ra!_!ra%i!ra!g!ra~P!=[OR#zO!Q#yO!S#{O!l#xO(aVOP!ta[!taj!tar!ta!]!ta!p!ta#R!ta#n!ta#o!ta#p!ta#q!ta#r!ta#s!ta#t!ta#u!ta#v!ta#x!ta#z!ta#{!ta(r!ta(y!ta(z!ta~Oa!ta'z!ta'w!ta!Y!ta!k!tav!ta!_!ta%i!ta!g!ta~P!?rOh%VOn+gO!_'`O%i+fO~O!g+iOa(]X!_(]X'z(]X!](]X~Oa%nO!_XO'z%nO~Oh%VO!l%eO~Oh%VO!l%eO(T%gO~O!g#vO#k(xO~Ob+tO%j+uO(T+qO(VTO(YUO!^)XP~O!]+vO`)WX~O[+zO~O`+{O~O!_&PO(T%gO(U!lO`)WP~O%j,OO~P;SOh%VO#`,SO~Oh%VOn,VO!_$|O~O!_,XO~O!Q,ZO!_XO~O%n%vO~O!x,`O~Oe,eO~Ob,fO(T#nO(VTO(YUO!^)VP~Oe%}O~O%j!QO(T&ZO~P=gO[,kO`,jO~OPYOQYOSfOdzOeyOpkOrYOskOtkOzkO|YO!OYO!SWO!WkO!XkO!iuO!lZO!oYO!pYO!qYO!svO!xxO!|]O$niO%h}O(VTO(YUO(aVO(o[O~O!_!eO!u!gO$W!kO(T!dO~P!FyO`,jOa%nO'z%nO~OPYOQYOSfOd!jOe!iOpkOrYOskOtkOzkO|YO!OYO!SWO!WkO!XkO!_!eO!iuO!lZO!oYO!pYO!qYO!svO!x!hO$W!kO$niO(T!dO(VTO(YUO(aVO(o[O~Oa,pOl!OO!uwO%l!OO%m!OO%n!OO~P!IcO!l&oO~O&^,vO~O!_,xO~O&o,zO&q,{OP&laQ&laS&laY&laa&lad&lae&lal&lap&lar&las&lat&laz&la|&la!O&la!S&la!W&la!X&la!_&la!i&la!l&la!o&la!p&la!q&la!s&la!u&la!x&la!|&la$W&la$n&la%h&la%j&la%l&la%m&la%n&la%q&la%s&la%v&la%w&la%y&la&W&la&^&la&`&la&b&la&d&la&g&la&m&la&s&la&u&la&w&la&y&la&{&la'w&la(T&la(V&la(Y&la(a&la(o&la!^&la&e&lab&la&j&la~O(T-QO~Oh!eX!]!RX!^!RX!g!RX!g!eX!l!eX#`!RX~O!]!eX!^!eX~P#!iO!g-VO#`-UOh(jX!]#hX!^#hX!g(jX!l(jX~O!](jX!^(jX~P##[Oh%VO!g-XO!l%eO!]!aX!^!aX~Os!nO!S!oO(VTO(YUO(e!mO~OP<UOQ<UOSfOd>ROe!iOpkOr<UOskOtkOzkO|<UO!O<UO!SWO!WkO!XkO!_!eO!i<XO!lZO!o<UO!p<UO!q<UO!s<YO!u<]O!x!hO$W!kO$n>PO(VTO(YUO(aVO(o[O~O(T=QO~P#$qO!]-]O!^(iX~O!^-_O~O!g-VO#`-UO!]#hX!^#hX~O!]-`O!^(xX~O!^-bO~O!c-cO!d-cO(U!lO~P#$`O!^-fO~P'_On-iO!_'`O~O!Y-nO~Os!{a!b!{a!c!{a!d!{a#T!{a#U!{a#V!{a#W!{a#X!{a#[!{a#]!{a(U!{a(V!{a(Y!{a(e!{a(o!{a~P!#vO!p-sO#`-qO~PChO!c-uO!d-uO(U!lO~PDWOa%nO#`-qO'z%nO~Oa%nO!g#vO#`-qO'z%nO~Oa%nO!g#vO!p-sO#`-qO'z%nO(r'pO~O(P'xO(Q'xO(R-zO~Ov-{O~O!Y'Wa!]'Wa~P!:tO![.PO!Y'WX!]'WX~P%[O!](VO!Y(ha~O!Y(ha~PHRO!](^O!Y(va~O!S%hO![.TO!_%iO(T%gO!Y'^X!]'^X~O#`.VO!](ta!k(taa(ta'z(ta~O!g#vO~P#,wO!](jO!k(sa~O!S%hO!_%iO#j.ZO(T%gO~Op.`O!S%hO![.]O!_%iO!|]O#i._O#j.]O(T%gO!]'aX!k'aX~OR.dO!l#xO~Oh%VOn.gO!_'`O%i.fO~Oa#ci!]#ci'z#ci'w#ci!Y#ci!k#civ#ci!_#ci%i#ci!g#ci~P!:tOn>]O!Q*OO'y*PO(y$}O(z%PO~O#k#_aa#_a#`#_a'z#_a!]#_a!k#_a!_#_a!Y#_a~P#/sO#k(`XP(`XR(`X[(`Xa(`Xj(`Xr(`X!S(`X!l(`X!p(`X#R(`X#n(`X#o(`X#p(`X#q(`X#r(`X#s(`X#t(`X#u(`X#v(`X#x(`X#z(`X#{(`X'z(`X(a(`X(r(`X!k(`X!Y(`X'w(`Xv(`X!_(`X%i(`X!g(`X~P!6kO!].tO!k(kX~P!:tO!k.wO~O!Y.yO~OP$[OR#zO!Q#yO!S#{O!l#xO!p$[O(aVO[#mia#mij#mir#mi!]#mi#R#mi#o#mi#p#mi#q#mi#r#mi#s#mi#t#mi#u#mi#v#mi#x#mi#z#mi#{#mi'z#mi(r#mi(y#mi(z#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#n#mi~P#3cO#n$OO~P#3cOP$[OR#zOr$aO!Q#yO!S#{O!l#xO!p$[O#n$OO#o$PO#p$PO#q$PO(aVO[#mia#mij#mi!]#mi#R#mi#s#mi#t#mi#u#mi#v#mi#x#mi#z#mi#{#mi'z#mi(r#mi(y#mi(z#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#r#mi~P#6QO#r$QO~P#6QOP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!l#xO!p$[O#R$RO#n$OO#o$PO#p$PO#q$PO#r$QO#s$RO#t$RO#u$bO(aVOa#mi!]#mi#x#mi#z#mi#{#mi'z#mi(r#mi(y#mi(z#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#v#mi~P#8oOP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!l#xO!p$[O#R$RO#n$OO#o$PO#p$PO#q$PO#r$QO#s$RO#t$RO#u$bO#v$SO(aVO(z#}Oa#mi!]#mi#z#mi#{#mi'z#mi(r#mi(y#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#x$UO~P#;VO#x#mi~P#;VO#v$SO~P#8oOP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!l#xO!p$[O#R$RO#n$OO#o$PO#p$PO#q$PO#r$QO#s$RO#t$RO#u$bO#v$SO#x$UO(aVO(y#|O(z#}Oa#mi!]#mi#{#mi'z#mi(r#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#z#mi~P#={O#z$WO~P#={OP]XR]X[]Xj]Xr]X!Q]X!S]X!l]X!p]X#R]X#S]X#`]X#kfX#n]X#o]X#p]X#q]X#r]X#s]X#t]X#u]X#v]X#x]X#z]X#{]X$Q]X(a]X(r]X(y]X(z]X!]]X!^]X~O$O]X~P#@jOP$[OR#zO[<mOj<bOr<kO!Q#yO!S#{O!l#xO!p$[O#R<bO#n<_O#o<`O#p<`O#q<`O#r<aO#s<bO#t<bO#u<lO#v<cO#x<eO#z<gO#{<hO(aVO(r$YO(y#|O(z#}O~O$O.{O~P#BwO#S$dO#`<nO$Q<nO$O(gX!^(gX~P! uOa'da!]'da'z'da'w'da!k'da!Y'dav'da!_'da%i'da!g'da~P!:tO[#mia#mij#mir#mi!]#mi#R#mi#r#mi#s#mi#t#mi#u#mi#v#mi#x#mi#z#mi#{#mi'z#mi(r#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~OP$[OR#zO!Q#yO!S#{O!l#xO!p$[O#n$OO#o$PO#p$PO#q$PO(aVO(y#mi(z#mi~P#EyOn>]O!Q*OO'y*PO(y$}O(z%POP#miR#mi!S#mi!l#mi!p#mi#n#mi#o#mi#p#mi#q#mi(a#mi~P#EyO!]/POg(pX~P!1WOg/RO~Oa$Pi!]$Pi'z$Pi'w$Pi!Y$Pi!k$Piv$Pi!_$Pi%i$Pi!g$Pi~P!:tO$]/SO$_/SO~O$]/TO$_/TO~O!g)hO#`/UO!_$cX$Z$cX$]$cX$_$cX$f$cX~O![/VO~O!_)kO$Z/XO$])jO$_)jO$f/YO~O!]<iO!^(fX~P#BwO!^/ZO~O!g)hO$f({X~O$f/]O~Ov/^O~P!&zOx)yO(b)zO(c/aO~O!S/dO~O(y$}On%aa!Q%aa'y%aa(z%aa!]%aa#`%aa~Og%aa$O%aa~P#L{O(z%POn%ca!Q%ca'y%ca(y%ca!]%ca#`%ca~Og%ca$O%ca~P#MnO!]fX!gfX!kfX!k$zX(rfX~P!0SOp%WOPP~P!1uOr*sO!b*qO!c*kO!d*kO!l*bO#[*rO%`*mO(U!lO(VTO(YUO~Os<}O!S/nO![+[O!^*pO(e<|O!^(xP~P$ [O!k/oO~P#/sO!]/pO!g#vO(r'pO!k)OX~O!k/uO~OnoX!QoX'yoX(yoX(zoX~O!g#vO!koX~P$#OOp/wO!S%hO![*^O!_%iO(T%gO!k)OP~O#k/xO~O!Y$zX!]$zX!g%RX~P!0SO!]/yO!Y)PX~P#/sO!g/{O~O!Y/}O~OpkO(T0OO~P.iOh%VOr0TO!g#vO!l%eO(r'pO~O!g+iO~Oa%nO!]0XO'z%nO~O!^0ZO~P!5iO!c0[O!d0[O(U!lO~P#$`Os!nO!S0]O(VTO(YUO(e!mO~O#[0_O~Og%aa!]%aa#`%aa$O%aa~P!1WOg%ca!]%ca#`%ca$O%ca~P!1WOj%dOk%dOl%dO(T&ZOg'mX!]'mX~O!]*yOg(^a~Og0hO~On0jO#`0iOg(_a!](_a~OR0kO!Q0kO!S0lO#S$dOn}a'y}a(y}a(z}a!]}a#`}a~Og}a$O}a~P$(cO!Q*OO'y*POn$sa(y$sa(z$sa!]$sa#`$sa~Og$sa$O$sa~P$)_O!Q*OO'y*POn$ua(y$ua(z$ua!]$ua#`$ua~Og$ua$O$ua~P$*QO#k0oO~Og%Ta!]%Ta#`%Ta$O%Ta~P!1WO!g#vO~O#k0rO~O!]+^Oa)Ta'z)Ta~OR#zO!Q#yO!S#{O!l#xO(aVOP!ri[!rij!rir!ri!]!ri!p!ri#R!ri#n!ri#o!ri#p!ri#q!ri#r!ri#s!ri#t!ri#u!ri#v!ri#x!ri#z!ri#{!ri(r!ri(y!ri(z!ri~Oa!ri'z!ri'w!ri!Y!ri!k!riv!ri!_!ri%i!ri!g!ri~P$+oOh%VOr%XOs$tOt$tOz%YO|%ZO!O<sO!S${O!_$|O!i>VO!l$xO#j<yO$W%`O$t<uO$v<wO$y%aO(VTO(YUO(a$uO(y$}O(z%PO~Op0{O%]0|O(T0zO~P$.VO!g+iOa(]a!_(]a'z(]a!](]a~O#k1SO~O[]X!]fX!^fX~O!]1TO!^)XX~O!^1VO~O[1WO~Ob1YO(T+qO(VTO(YUO~O!_&PO(T%gO`'uX!]'uX~O!]+vO`)Wa~O!k1]O~P!:tO[1`O~O`1aO~O#`1fO~On1iO!_$|O~O(e(|O!^)UP~Oh%VOn1rO!_1oO%i1qO~O[1|O!]1zO!^)VX~O!^1}O~O`2POa%nO'z%nO~O(T#nO(VTO(YUO~O#S$dO#`$eO$Q$eOP(gXR(gX[(gXr(gX!Q(gX!S(gX!](gX!l(gX!p(gX#R(gX#n(gX#o(gX#p(gX#q(gX#r(gX#s(gX#t(gX#u(gX#v(gX#x(gX#z(gX#{(gX(a(gX(r(gX(y(gX(z(gX~Oj2SO&[2TOa(gX~P$3pOj2SO#`$eO&[2TO~Oa2VO~P%[Oa2XO~O&e2[OP&ciQ&ciS&ciY&cia&cid&cie&cil&cip&cir&cis&cit&ciz&ci|&ci!O&ci!S&ci!W&ci!X&ci!_&ci!i&ci!l&ci!o&ci!p&ci!q&ci!s&ci!u&ci!x&ci!|&ci$W&ci$n&ci%h&ci%j&ci%l&ci%m&ci%n&ci%q&ci%s&ci%v&ci%w&ci%y&ci&W&ci&^&ci&`&ci&b&ci&d&ci&g&ci&m&ci&s&ci&u&ci&w&ci&y&ci&{&ci'w&ci(T&ci(V&ci(Y&ci(a&ci(o&ci!^&cib&ci&j&ci~Ob2bO!^2`O&j2aO~P`O!_XO!l2dO~O&q,{OP&liQ&liS&liY&lia&lid&lie&lil&lip&lir&lis&lit&liz&li|&li!O&li!S&li!W&li!X&li!_&li!i&li!l&li!o&li!p&li!q&li!s&li!u&li!x&li!|&li$W&li$n&li%h&li%j&li%l&li%m&li%n&li%q&li%s&li%v&li%w&li%y&li&W&li&^&li&`&li&b&li&d&li&g&li&m&li&s&li&u&li&w&li&y&li&{&li'w&li(T&li(V&li(Y&li(a&li(o&li!^&li&e&lib&li&j&li~O!Y2jO~O!]!aa!^!aa~P#BwOs!nO!S!oO![2pO(e!mO!]'XX!^'XX~P@nO!]-]O!^(ia~O!]'_X!^'_X~P!9|O!]-`O!^(xa~O!^2wO~P'_Oa%nO#`3QO'z%nO~Oa%nO!g#vO#`3QO'z%nO~Oa%nO!g#vO!p3UO#`3QO'z%nO(r'pO~Oa%nO'z%nO~P!:tO!]$_Ov$qa~O!Y'Wi!]'Wi~P!:tO!](VO!Y(hi~O!](^O!Y(vi~O!Y(wi!](wi~P!:tO!](ti!k(tia(ti'z(ti~P!:tO#`3WO!](ti!k(tia(ti'z(ti~O!](jO!k(si~O!S%hO!_%iO!|]O#i3]O#j3[O(T%gO~O!S%hO!_%iO#j3[O(T%gO~On3dO!_'`O%i3cO~Oh%VOn3dO!_'`O%i3cO~O#k%aaP%aaR%aa[%aaa%aaj%aar%aa!S%aa!l%aa!p%aa#R%aa#n%aa#o%aa#p%aa#q%aa#r%aa#s%aa#t%aa#u%aa#v%aa#x%aa#z%aa#{%aa'z%aa(a%aa(r%aa!k%aa!Y%aa'w%aav%aa!_%aa%i%aa!g%aa~P#L{O#k%caP%caR%ca[%caa%caj%car%ca!S%ca!l%ca!p%ca#R%ca#n%ca#o%ca#p%ca#q%ca#r%ca#s%ca#t%ca#u%ca#v%ca#x%ca#z%ca#{%ca'z%ca(a%ca(r%ca!k%ca!Y%ca'w%cav%ca!_%ca%i%ca!g%ca~P#MnO#k%aaP%aaR%aa[%aaa%aaj%aar%aa!S%aa!]%aa!l%aa!p%aa#R%aa#n%aa#o%aa#p%aa#q%aa#r%aa#s%aa#t%aa#u%aa#v%aa#x%aa#z%aa#{%aa'z%aa(a%aa(r%aa!k%aa!Y%aa'w%aa#`%aav%aa!_%aa%i%aa!g%aa~P#/sO#k%caP%caR%ca[%caa%caj%car%ca!S%ca!]%ca!l%ca!p%ca#R%ca#n%ca#o%ca#p%ca#q%ca#r%ca#s%ca#t%ca#u%ca#v%ca#x%ca#z%ca#{%ca'z%ca(a%ca(r%ca!k%ca!Y%ca'w%ca#`%cav%ca!_%ca%i%ca!g%ca~P#/sO#k}aP}a[}aa}aj}ar}a!l}a!p}a#R}a#n}a#o}a#p}a#q}a#r}a#s}a#t}a#u}a#v}a#x}a#z}a#{}a'z}a(a}a(r}a!k}a!Y}a'w}av}a!_}a%i}a!g}a~P$(cO#k$saP$saR$sa[$saa$saj$sar$sa!S$sa!l$sa!p$sa#R$sa#n$sa#o$sa#p$sa#q$sa#r$sa#s$sa#t$sa#u$sa#v$sa#x$sa#z$sa#{$sa'z$sa(a$sa(r$sa!k$sa!Y$sa'w$sav$sa!_$sa%i$sa!g$sa~P$)_O#k$uaP$uaR$ua[$uaa$uaj$uar$ua!S$ua!l$ua!p$ua#R$ua#n$ua#o$ua#p$ua#q$ua#r$ua#s$ua#t$ua#u$ua#v$ua#x$ua#z$ua#{$ua'z$ua(a$ua(r$ua!k$ua!Y$ua'w$uav$ua!_$ua%i$ua!g$ua~P$*QO#k%TaP%TaR%Ta[%Taa%Taj%Tar%Ta!S%Ta!]%Ta!l%Ta!p%Ta#R%Ta#n%Ta#o%Ta#p%Ta#q%Ta#r%Ta#s%Ta#t%Ta#u%Ta#v%Ta#x%Ta#z%Ta#{%Ta'z%Ta(a%Ta(r%Ta!k%Ta!Y%Ta'w%Ta#`%Tav%Ta!_%Ta%i%Ta!g%Ta~P#/sOa#cq!]#cq'z#cq'w#cq!Y#cq!k#cqv#cq!_#cq%i#cq!g#cq~P!:tO![3lO!]'YX!k'YX~P%[O!].tO!k(ka~O!].tO!k(ka~P!:tO!Y3oO~O$O!na!^!na~PKlO$O!ja!]!ja!^!ja~P#BwO$O!ra!^!ra~P!=[O$O!ta!^!ta~P!?rOg']X!]']X~P!,TO!]/POg(pa~OSfO!_4TO$d4UO~O!^4YO~Ov4ZO~P#/sOa$mq!]$mq'z$mq'w$mq!Y$mq!k$mqv$mq!_$mq%i$mq!g$mq~P!:tO!Y4]O~P!&zO!S4^O~O!Q*OO'y*PO(z%POn'ia(y'ia!]'ia#`'ia~Og'ia$O'ia~P%-fO!Q*OO'y*POn'ka(y'ka(z'ka!]'ka#`'ka~Og'ka$O'ka~P%.XO(r$YO~P#/sO!YfX!Y$zX!]fX!]$zX!g%RX#`fX~P!0SOp%WO(T=WO~P!1uOp4bO!S%hO![4aO!_%iO(T%gO!]'eX!k'eX~O!]/pO!k)Oa~O!]/pO!g#vO!k)Oa~O!]/pO!g#vO(r'pO!k)Oa~Og$|i!]$|i#`$|i$O$|i~P!1WO![4jO!Y'gX!]'gX~P!3tO!]/yO!Y)Pa~O!]/yO!Y)Pa~P#/sOP]XR]X[]Xj]Xr]X!Q]X!S]X!Y]X!]]X!l]X!p]X#R]X#S]X#`]X#kfX#n]X#o]X#p]X#q]X#r]X#s]X#t]X#u]X#v]X#x]X#z]X#{]X$Q]X(a]X(r]X(y]X(z]X~Oj%YX!g%YX~P%2OOj4oO!g#vO~Oh%VO!g#vO!l%eO~Oh%VOr4tO!l%eO(r'pO~Or4yO!g#vO(r'pO~Os!nO!S4zO(VTO(YUO(e!mO~O(y$}On%ai!Q%ai'y%ai(z%ai!]%ai#`%ai~Og%ai$O%ai~P%5oO(z%POn%ci!Q%ci'y%ci(y%ci!]%ci#`%ci~Og%ci$O%ci~P%6bOg(_i!](_i~P!1WO#`5QOg(_i!](_i~P!1WO!k5VO~Oa$oq!]$oq'z$oq'w$oq!Y$oq!k$oqv$oq!_$oq%i$oq!g$oq~P!:tO!Y5ZO~O!]5[O!_)QX~P#/sOa$zX!_$zX%^]X'z$zX!]$zX~P!0SO%^5_OaoX!_oX'zoX!]oX~P$#OOp5`O(T#nO~O%^5_O~Ob5fO%j5gO(T+qO(VTO(YUO!]'tX!^'tX~O!]1TO!^)Xa~O[5kO~O`5lO~O[5pO~Oa%nO'z%nO~P#/sO!]5uO#`5wO!^)UX~O!^5xO~Or6OOs!nO!S*iO!b!yO!c!vO!d!vO!|<VO#T!pO#U!pO#V!pO#W!pO#X!pO#[5}O#]!zO(U!lO(VTO(YUO(e!mO(o!sO~O!^5|O~P%;eOn6TO!_1oO%i6SO~Oh%VOn6TO!_1oO%i6SO~Ob6[O(T#nO(VTO(YUO!]'sX!^'sX~O!]1zO!^)Va~O(VTO(YUO(e6^O~O`6bO~Oj6eO&[6fO~PNXO!k6gO~P%[Oa6iO~Oa6iO~P%[Ob2bO!^6nO&j2aO~P`O!g6pO~O!g6rOh(ji!](ji!^(ji!g(ji!l(jir(ji(r(ji~O!]#hi!^#hi~P#BwO#`6sO!]#hi!^#hi~O!]!ai!^!ai~P#BwOa%nO#`6|O'z%nO~Oa%nO!g#vO#`6|O'z%nO~O!](tq!k(tqa(tq'z(tq~P!:tO!](jO!k(sq~O!S%hO!_%iO#j7TO(T%gO~O!_'`O%i7WO~On7[O!_'`O%i7WO~O#k'iaP'iaR'ia['iaa'iaj'iar'ia!S'ia!l'ia!p'ia#R'ia#n'ia#o'ia#p'ia#q'ia#r'ia#s'ia#t'ia#u'ia#v'ia#x'ia#z'ia#{'ia'z'ia(a'ia(r'ia!k'ia!Y'ia'w'iav'ia!_'ia%i'ia!g'ia~P%-fO#k'kaP'kaR'ka['kaa'kaj'kar'ka!S'ka!l'ka!p'ka#R'ka#n'ka#o'ka#p'ka#q'ka#r'ka#s'ka#t'ka#u'ka#v'ka#x'ka#z'ka#{'ka'z'ka(a'ka(r'ka!k'ka!Y'ka'w'kav'ka!_'ka%i'ka!g'ka~P%.XO#k$|iP$|iR$|i[$|ia$|ij$|ir$|i!S$|i!]$|i!l$|i!p$|i#R$|i#n$|i#o$|i#p$|i#q$|i#r$|i#s$|i#t$|i#u$|i#v$|i#x$|i#z$|i#{$|i'z$|i(a$|i(r$|i!k$|i!Y$|i'w$|i#`$|iv$|i!_$|i%i$|i!g$|i~P#/sO#k%aiP%aiR%ai[%aia%aij%air%ai!S%ai!l%ai!p%ai#R%ai#n%ai#o%ai#p%ai#q%ai#r%ai#s%ai#t%ai#u%ai#v%ai#x%ai#z%ai#{%ai'z%ai(a%ai(r%ai!k%ai!Y%ai'w%aiv%ai!_%ai%i%ai!g%ai~P%5oO#k%ciP%ciR%ci[%cia%cij%cir%ci!S%ci!l%ci!p%ci#R%ci#n%ci#o%ci#p%ci#q%ci#r%ci#s%ci#t%ci#u%ci#v%ci#x%ci#z%ci#{%ci'z%ci(a%ci(r%ci!k%ci!Y%ci'w%civ%ci!_%ci%i%ci!g%ci~P%6bO!]'Ya!k'Ya~P!:tO!].tO!k(ki~O$O#ci!]#ci!^#ci~P#BwOP$[OR#zO!Q#yO!S#{O!l#xO!p$[O(aVO[#mij#mir#mi#R#mi#o#mi#p#mi#q#mi#r#mi#s#mi#t#mi#u#mi#v#mi#x#mi#z#mi#{#mi$O#mi(r#mi(y#mi(z#mi!]#mi!^#mi~O#n#mi~P%NdO#n<_O~P%NdOP$[OR#zOr<kO!Q#yO!S#{O!l#xO!p$[O#n<_O#o<`O#p<`O#q<`O(aVO[#mij#mi#R#mi#s#mi#t#mi#u#mi#v#mi#x#mi#z#mi#{#mi$O#mi(r#mi(y#mi(z#mi!]#mi!^#mi~O#r#mi~P&!lO#r<aO~P&!lOP$[OR#zO[<mOj<bOr<kO!Q#yO!S#{O!l#xO!p$[O#R<bO#n<_O#o<`O#p<`O#q<`O#r<aO#s<bO#t<bO#u<lO(aVO#x#mi#z#mi#{#mi$O#mi(r#mi(y#mi(z#mi!]#mi!^#mi~O#v#mi~P&$tOP$[OR#zO[<mOj<bOr<kO!Q#yO!S#{O!l#xO!p$[O#R<bO#n<_O#o<`O#p<`O#q<`O#r<aO#s<bO#t<bO#u<lO#v<cO(aVO(z#}O#z#mi#{#mi$O#mi(r#mi(y#mi!]#mi!^#mi~O#x<eO~P&&uO#x#mi~P&&uO#v<cO~P&$tOP$[OR#zO[<mOj<bOr<kO!Q#yO!S#{O!l#xO!p$[O#R<bO#n<_O#o<`O#p<`O#q<`O#r<aO#s<bO#t<bO#u<lO#v<cO#x<eO(aVO(y#|O(z#}O#{#mi$O#mi(r#mi!]#mi!^#mi~O#z#mi~P&)UO#z<gO~P&)UOa#|y!]#|y'z#|y'w#|y!Y#|y!k#|yv#|y!_#|y%i#|y!g#|y~P!:tO[#mij#mir#mi#R#mi#r#mi#s#mi#t#mi#u#mi#v#mi#x#mi#z#mi#{#mi$O#mi(r#mi!]#mi!^#mi~OP$[OR#zO!Q#yO!S#{O!l#xO!p$[O#n<_O#o<`O#p<`O#q<`O(aVO(y#mi(z#mi~P&,QOn>^O!Q*OO'y*PO(y$}O(z%POP#miR#mi!S#mi!l#mi!p#mi#n#mi#o#mi#p#mi#q#mi(a#mi~P&,QO#S$dOP(`XR(`X[(`Xj(`Xn(`Xr(`X!Q(`X!S(`X!l(`X!p(`X#R(`X#n(`X#o(`X#p(`X#q(`X#r(`X#s(`X#t(`X#u(`X#v(`X#x(`X#z(`X#{(`X$O(`X'y(`X(a(`X(r(`X(y(`X(z(`X!](`X!^(`X~O$O$Pi!]$Pi!^$Pi~P#BwO$O!ri!^!ri~P$+oOg']a!]']a~P!1WO!^7nO~O!]'da!^'da~P#BwO!Y7oO~P#/sO!g#vO(r'pO!]'ea!k'ea~O!]/pO!k)Oi~O!]/pO!g#vO!k)Oi~Og$|q!]$|q#`$|q$O$|q~P!1WO!Y'ga!]'ga~P#/sO!g7vO~O!]/yO!Y)Pi~P#/sO!]/yO!Y)Pi~O!Y7yO~Oh%VOr8OO!l%eO(r'pO~Oj8QO!g#vO~Or8TO!g#vO(r'pO~O!Q*OO'y*PO(z%POn'ja(y'ja!]'ja#`'ja~Og'ja$O'ja~P&5RO!Q*OO'y*POn'la(y'la(z'la!]'la#`'la~Og'la$O'la~P&5tOg(_q!](_q~P!1WO#`8VOg(_q!](_q~P!1WO!Y8WO~Og%Oq!]%Oq#`%Oq$O%Oq~P!1WOa$oy!]$oy'z$oy'w$oy!Y$oy!k$oyv$oy!_$oy%i$oy!g$oy~P!:tO!g6rO~O!]5[O!_)Qa~O!_'`OP$TaR$Ta[$Taj$Tar$Ta!Q$Ta!S$Ta!]$Ta!l$Ta!p$Ta#R$Ta#n$Ta#o$Ta#p$Ta#q$Ta#r$Ta#s$Ta#t$Ta#u$Ta#v$Ta#x$Ta#z$Ta#{$Ta(a$Ta(r$Ta(y$Ta(z$Ta~O%i7WO~P&8fO%^8[Oa%[i!_%[i'z%[i!]%[i~Oa#cy!]#cy'z#cy'w#cy!Y#cy!k#cyv#cy!_#cy%i#cy!g#cy~P!:tO[8^O~Ob8`O(T+qO(VTO(YUO~O!]1TO!^)Xi~O`8dO~O(e(|O!]'pX!^'pX~O!]5uO!^)Ua~O!^8nO~P%;eO(o!sO~P$&YO#[8oO~O!_1oO~O!_1oO%i8qO~On8tO!_1oO%i8qO~O[8yO!]'sa!^'sa~O!]1zO!^)Vi~O!k8}O~O!k9OO~O!k9RO~O!k9RO~P%[Oa9TO~O!g9UO~O!k9VO~O!](wi!^(wi~P#BwOa%nO#`9_O'z%nO~O!](ty!k(tya(ty'z(ty~P!:tO!](jO!k(sy~O%i9bO~P&8fO!_'`O%i9bO~O#k$|qP$|qR$|q[$|qa$|qj$|qr$|q!S$|q!]$|q!l$|q!p$|q#R$|q#n$|q#o$|q#p$|q#q$|q#r$|q#s$|q#t$|q#u$|q#v$|q#x$|q#z$|q#{$|q'z$|q(a$|q(r$|q!k$|q!Y$|q'w$|q#`$|qv$|q!_$|q%i$|q!g$|q~P#/sO#k'jaP'jaR'ja['jaa'jaj'jar'ja!S'ja!l'ja!p'ja#R'ja#n'ja#o'ja#p'ja#q'ja#r'ja#s'ja#t'ja#u'ja#v'ja#x'ja#z'ja#{'ja'z'ja(a'ja(r'ja!k'ja!Y'ja'w'jav'ja!_'ja%i'ja!g'ja~P&5RO#k'laP'laR'la['laa'laj'lar'la!S'la!l'la!p'la#R'la#n'la#o'la#p'la#q'la#r'la#s'la#t'la#u'la#v'la#x'la#z'la#{'la'z'la(a'la(r'la!k'la!Y'la'w'lav'la!_'la%i'la!g'la~P&5tO#k%OqP%OqR%Oq[%Oqa%Oqj%Oqr%Oq!S%Oq!]%Oq!l%Oq!p%Oq#R%Oq#n%Oq#o%Oq#p%Oq#q%Oq#r%Oq#s%Oq#t%Oq#u%Oq#v%Oq#x%Oq#z%Oq#{%Oq'z%Oq(a%Oq(r%Oq!k%Oq!Y%Oq'w%Oq#`%Oqv%Oq!_%Oq%i%Oq!g%Oq~P#/sO!]'Yi!k'Yi~P!:tO$O#cq!]#cq!^#cq~P#BwO(y$}OP%aaR%aa[%aaj%aar%aa!S%aa!l%aa!p%aa#R%aa#n%aa#o%aa#p%aa#q%aa#r%aa#s%aa#t%aa#u%aa#v%aa#x%aa#z%aa#{%aa$O%aa(a%aa(r%aa!]%aa!^%aa~On%aa!Q%aa'y%aa(z%aa~P&IyO(z%POP%caR%ca[%caj%car%ca!S%ca!l%ca!p%ca#R%ca#n%ca#o%ca#p%ca#q%ca#r%ca#s%ca#t%ca#u%ca#v%ca#x%ca#z%ca#{%ca$O%ca(a%ca(r%ca!]%ca!^%ca~On%ca!Q%ca'y%ca(y%ca~P&LQOn>^O!Q*OO'y*PO(z%PO~P&IyOn>^O!Q*OO'y*PO(y$}O~P&LQOR0kO!Q0kO!S0lO#S$dOP}a[}aj}an}ar}a!l}a!p}a#R}a#n}a#o}a#p}a#q}a#r}a#s}a#t}a#u}a#v}a#x}a#z}a#{}a$O}a'y}a(a}a(r}a(y}a(z}a!]}a!^}a~O!Q*OO'y*POP$saR$sa[$saj$san$sar$sa!S$sa!l$sa!p$sa#R$sa#n$sa#o$sa#p$sa#q$sa#r$sa#s$sa#t$sa#u$sa#v$sa#x$sa#z$sa#{$sa$O$sa(a$sa(r$sa(y$sa(z$sa!]$sa!^$sa~O!Q*OO'y*POP$uaR$ua[$uaj$uan$uar$ua!S$ua!l$ua!p$ua#R$ua#n$ua#o$ua#p$ua#q$ua#r$ua#s$ua#t$ua#u$ua#v$ua#x$ua#z$ua#{$ua$O$ua(a$ua(r$ua(y$ua(z$ua!]$ua!^$ua~On>^O!Q*OO'y*PO(y$}O(z%PO~OP%TaR%Ta[%Taj%Tar%Ta!S%Ta!l%Ta!p%Ta#R%Ta#n%Ta#o%Ta#p%Ta#q%Ta#r%Ta#s%Ta#t%Ta#u%Ta#v%Ta#x%Ta#z%Ta#{%Ta$O%Ta(a%Ta(r%Ta!]%Ta!^%Ta~P''VO$O$mq!]$mq!^$mq~P#BwO$O$oq!]$oq!^$oq~P#BwO!^9oO~O$O9pO~P!1WO!g#vO!]'ei!k'ei~O!g#vO(r'pO!]'ei!k'ei~O!]/pO!k)Oq~O!Y'gi!]'gi~P#/sO!]/yO!Y)Pq~Or9wO!g#vO(r'pO~O[9yO!Y9xO~P#/sO!Y9xO~Oj:PO!g#vO~Og(_y!](_y~P!1WO!]'na!_'na~P#/sOa%[q!_%[q'z%[q!]%[q~P#/sO[:UO~O!]1TO!^)Xq~O`:YO~O#`:ZO!]'pa!^'pa~O!]5uO!^)Ui~P#BwO!S:]O~O!_1oO%i:`O~O(VTO(YUO(e:eO~O!]1zO!^)Vq~O!k:hO~O!k:iO~O!k:jO~O!k:jO~P%[O#`:mO!]#hy!^#hy~O!]#hy!^#hy~P#BwO%i:rO~P&8fO!_'`O%i:rO~O$O#|y!]#|y!^#|y~P#BwOP$|iR$|i[$|ij$|ir$|i!S$|i!l$|i!p$|i#R$|i#n$|i#o$|i#p$|i#q$|i#r$|i#s$|i#t$|i#u$|i#v$|i#x$|i#z$|i#{$|i$O$|i(a$|i(r$|i!]$|i!^$|i~P''VO!Q*OO'y*PO(z%POP'iaR'ia['iaj'ian'iar'ia!S'ia!l'ia!p'ia#R'ia#n'ia#o'ia#p'ia#q'ia#r'ia#s'ia#t'ia#u'ia#v'ia#x'ia#z'ia#{'ia$O'ia(a'ia(r'ia(y'ia!]'ia!^'ia~O!Q*OO'y*POP'kaR'ka['kaj'kan'kar'ka!S'ka!l'ka!p'ka#R'ka#n'ka#o'ka#p'ka#q'ka#r'ka#s'ka#t'ka#u'ka#v'ka#x'ka#z'ka#{'ka$O'ka(a'ka(r'ka(y'ka(z'ka!]'ka!^'ka~O(y$}OP%aiR%ai[%aij%ain%air%ai!Q%ai!S%ai!l%ai!p%ai#R%ai#n%ai#o%ai#p%ai#q%ai#r%ai#s%ai#t%ai#u%ai#v%ai#x%ai#z%ai#{%ai$O%ai'y%ai(a%ai(r%ai(z%ai!]%ai!^%ai~O(z%POP%ciR%ci[%cij%cin%cir%ci!Q%ci!S%ci!l%ci!p%ci#R%ci#n%ci#o%ci#p%ci#q%ci#r%ci#s%ci#t%ci#u%ci#v%ci#x%ci#z%ci#{%ci$O%ci'y%ci(a%ci(r%ci(y%ci!]%ci!^%ci~O$O$oy!]$oy!^$oy~P#BwO$O#cy!]#cy!^#cy~P#BwO!g#vO!]'eq!k'eq~O!]/pO!k)Oy~O!Y'gq!]'gq~P#/sOr:|O!g#vO(r'pO~O[;QO!Y;PO~P#/sO!Y;PO~Og(_!R!](_!R~P!1WOa%[y!_%[y'z%[y!]%[y~P#/sO!]1TO!^)Xy~O!]5uO!^)Uq~O(T;XO~O!_1oO%i;[O~O!k;_O~O%i;dO~P&8fOP$|qR$|q[$|qj$|qr$|q!S$|q!l$|q!p$|q#R$|q#n$|q#o$|q#p$|q#q$|q#r$|q#s$|q#t$|q#u$|q#v$|q#x$|q#z$|q#{$|q$O$|q(a$|q(r$|q!]$|q!^$|q~P''VO!Q*OO'y*PO(z%POP'jaR'ja['jaj'jan'jar'ja!S'ja!l'ja!p'ja#R'ja#n'ja#o'ja#p'ja#q'ja#r'ja#s'ja#t'ja#u'ja#v'ja#x'ja#z'ja#{'ja$O'ja(a'ja(r'ja(y'ja!]'ja!^'ja~O!Q*OO'y*POP'laR'la['laj'lan'lar'la!S'la!l'la!p'la#R'la#n'la#o'la#p'la#q'la#r'la#s'la#t'la#u'la#v'la#x'la#z'la#{'la$O'la(a'la(r'la(y'la(z'la!]'la!^'la~OP%OqR%Oq[%Oqj%Oqr%Oq!S%Oq!l%Oq!p%Oq#R%Oq#n%Oq#o%Oq#p%Oq#q%Oq#r%Oq#s%Oq#t%Oq#u%Oq#v%Oq#x%Oq#z%Oq#{%Oq$O%Oq(a%Oq(r%Oq!]%Oq!^%Oq~P''VOg%e!Z!]%e!Z#`%e!Z$O%e!Z~P!1WO!Y;hO~P#/sOr;iO!g#vO(r'pO~O[;kO!Y;hO~P#/sO!]'pq!^'pq~P#BwO!]#h!Z!^#h!Z~P#BwO#k%e!ZP%e!ZR%e!Z[%e!Za%e!Zj%e!Zr%e!Z!S%e!Z!]%e!Z!l%e!Z!p%e!Z#R%e!Z#n%e!Z#o%e!Z#p%e!Z#q%e!Z#r%e!Z#s%e!Z#t%e!Z#u%e!Z#v%e!Z#x%e!Z#z%e!Z#{%e!Z'z%e!Z(a%e!Z(r%e!Z!k%e!Z!Y%e!Z'w%e!Z#`%e!Zv%e!Z!_%e!Z%i%e!Z!g%e!Z~P#/sOr;tO!g#vO(r'pO~O!Y;uO~P#/sOr;|O!g#vO(r'pO~O!Y;}O~P#/sOP%e!ZR%e!Z[%e!Zj%e!Zr%e!Z!S%e!Z!l%e!Z!p%e!Z#R%e!Z#n%e!Z#o%e!Z#p%e!Z#q%e!Z#r%e!Z#s%e!Z#t%e!Z#u%e!Z#v%e!Z#x%e!Z#z%e!Z#{%e!Z$O%e!Z(a%e!Z(r%e!Z!]%e!Z!^%e!Z~P''VOr<QO!g#vO(r'pO~Ov(fX~P1qO!Q%rO~P!)[O(U!lO~P!)[O!YfX!]fX#`fX~P%2OOP]XR]X[]Xj]Xr]X!Q]X!S]X!]]X!]fX!l]X!p]X#R]X#S]X#`]X#`fX#kfX#n]X#o]X#p]X#q]X#r]X#s]X#t]X#u]X#v]X#x]X#z]X#{]X$Q]X(a]X(r]X(y]X(z]X~O!gfX!k]X!kfX(rfX~P'LTOP<UOQ<UOSfOd>ROe!iOpkOr<UOskOtkOzkO|<UO!O<UO!SWO!WkO!XkO!_XO!i<XO!lZO!o<UO!p<UO!q<UO!s<YO!u<]O!x!hO$W!kO$n>PO(T)]O(VTO(YUO(aVO(o[O~O!]<iO!^$qa~Oh%VOp%WOr%XOs$tOt$tOz%YO|%ZO!O<tO!S${O!_$|O!i>WO!l$xO#j<zO$W%`O$t<vO$v<xO$y%aO(T(vO(VTO(YUO(a$uO(y$}O(z%PO~Ol)dO~P(!yOr!eX(r!eX~P#!iOr(jX(r(jX~P##[O!^]X!^fX~P'LTO!YfX!Y$zX!]fX!]$zX#`fX~P!0SO#k<^O~O!g#vO#k<^O~O#`<nO~Oj<bO~O#`=OO!](wX!^(wX~O#`<nO!](uX!^(uX~O#k=PO~Og=RO~P!1WO#k=XO~O#k=YO~Og=RO(T&ZO~O!g#vO#k=ZO~O!g#vO#k=PO~O$O=[O~P#BwO#k=]O~O#k=^O~O#k=cO~O#k=dO~O#k=eO~O#k=fO~O$O=gO~P!1WO$O=hO~P!1WOl=sO~P7eOk#S#T#U#W#X#[#i#j#u$n$t$v$y%]%^%h%i%j%q%s%v%w%y%{~(OT#o!X'|(U#ps#n#qr!Q'}$]'}(T$_(e~",goto:"$9Y)]PPPPPP)^PP)aP)rP+W/]PPPP6mPP7TPP=QPPP@tPA^PA^PPPA^PCfPA^PA^PA^PCjPCoPD^PIWPPPI[PPPPI[L_PPPLeMVPI[PI[PP! eI[PPPI[PI[P!#lI[P!'S!(X!(bP!)U!)Y!)U!,gPPPPPPP!-W!(XPP!-h!/YP!2iI[I[!2n!5z!:h!:h!>gPPP!>oI[PPPPPPPPP!BOP!C]PPI[!DnPI[PI[I[I[I[I[PI[!FQP!I[P!LbP!Lf!Lp!Lt!LtP!IXP!Lx!LxP#!OP#!SI[PI[#!Y#%_CjA^PA^PA^A^P#&lA^A^#)OA^#+vA^#.SA^A^#.r#1W#1W#1]#1f#1W#1qPP#1WPA^#2ZA^#6YA^A^6mPPP#:_PPP#:x#:xP#:xP#;`#:xPP#;fP#;]P#;]#;y#;]#<e#<k#<n)aP#<q)aP#<z#<z#<zP)aP)aP)aP)aPP)aP#=Q#=TP#=T)aP#=XP#=[P)aP)aP)aP)aP)aP)a)aPP#=b#=h#=s#=y#>P#>V#>]#>k#>q#>{#?R#?]#?c#?s#?y#@k#@}#AT#AZ#Ai#BO#Cs#DR#DY#Et#FS#Gt#HS#HY#H`#Hf#Hp#Hv#H|#IW#Ij#IpPPPPPPPPPPP#IvPPPPPPP#Jk#Mx$ b$ i$ qPPP$']P$'f$*_$0x$0{$1O$1}$2Q$2X$2aP$2g$2jP$3W$3[$4S$5b$5g$5}PP$6S$6Y$6^$6a$6e$6i$7e$7|$8e$8i$8l$8o$8y$8|$9Q$9UR!|RoqOXst!Z#d%m&r&t&u&w,s,x2[2_Y!vQ'`-e1o5{Q%tvQ%|yQ&T|Q&j!VS'W!e-]Q'f!iS'l!r!yU*k$|*Z*oQ+o%}S+|&V&WQ,d&dQ-c'_Q-m'gQ-u'mQ0[*qQ1b,OQ1y,eR<{<Y%SdOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&r&t&u&w&{'T'b'r(T(V(](d(x(z)O)}*i+X+],p,s,x-i-q.P.V.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3l4z6T6e6f6i6|8t9T9_S#q]<V!r)_$Z$n'X)s-U-X/V2p4T5w6s:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>SU+P%]<s<tQ+t&PQ,f&gQ,m&oQ0x+gQ0}+iQ1Y+uQ2R,kQ3`.gQ5`0|Q5f1TQ6[1zQ7Y3dQ8`5gR9e7['QkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%m%t&R&k&n&o&r&t&u&w&{'T'X'b'r(T(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>S!S!nQ!r!v!y!z$|'W'_'`'l'm'n*k*o*q*r-]-c-e-u0[0_1o5{5}%[$ti#v$b$c$d$x${%O%Q%^%_%c)y*R*T*V*Y*a*g*w*x+f+i,S,V.f/P/d/m/x/y/{0`0b0i0j0o1f1i1q3c4^4_4j4o5Q5[5_6S7W7v8Q8V8[8q9b9p9y:P:`:r;Q;[;d;k<l<m<o<p<q<r<u<v<w<x<y<z=S=T=U=V=X=Y=]=^=_=`=a=b=c=d=g=h>P>X>Y>]>^Q&X|Q'U!eS'[%i-`Q+t&PQ,P&WQ,f&gQ0n+SQ1Y+uQ1_+{Q2Q,jQ2R,kQ5f1TQ5o1aQ6[1zQ6_1|Q6`2PQ8`5gQ8c5lQ8|6bQ:X8dQ:f8yQ;V:YR<}*ZrnOXst!V!Z#d%m&i&r&t&u&w,s,x2[2_R,h&k&z^OPXYstuvwz!Z!`!g!j!o#S#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%m%t&R&k&n&o&r&t&u&w&{'T'b'r(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>R>S[#]WZ#W#Z'X(T!b%jm#h#i#l$x%e%h(^(h(i(j*Y*^*b+Z+[+^,o-V.T.Z.[.]._/m/p2d3[3]4a6r7TQ%wxQ%{yW&Q|&V&W,OQ&_!TQ'c!hQ'e!iQ(q#sS+n%|%}Q+r&PQ,_&bQ,c&dS-l'f'gQ.i(rQ1R+oQ1X+uQ1Z+vQ1^+zQ1t,`S1x,d,eQ2|-mQ5e1TQ5i1WQ5n1`Q6Z1yQ8_5gQ8b5kQ8f5pQ:T8^R;T:U!U$zi$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>Y!^%yy!i!u%{%|%}'V'e'f'g'k'u*j+n+o-Y-l-m-t0R0U1R2u2|3T4r4s4v7}9{Q+h%wQ,T&[Q,W&]Q,b&dQ.h(qQ1s,_U1w,c,d,eQ3e.iQ6U1tS6Y1x1yQ8x6Z#f>T#v$b$c$x${)y*V*Y*g+f+i,S,V.f/d/m/y/{1f1i1q3c4^4j4o5[5_6S7W7v8Q8[8q9b9y:P:`:r;Q;[;d;k<o<q<u<w<y=S=U=X=]=_=a=c=g>]>^o>U<l<m<p<r<v<x<z=T=V=Y=^=`=b=d=hW%Ti%V*y>PS&[!Q&iQ&]!RQ&^!SU*}%[%d=sR,R&Y%]%Si#v$b$c$d$x${%O%Q%^%_%c)y*R*T*V*Y*a*g*w*x+f+i,S,V.f/P/d/m/x/y/{0`0b0i0j0o1f1i1q3c4^4_4j4o5Q5[5_6S7W7v8Q8V8[8q9b9p9y:P:`:r;Q;[;d;k<l<m<o<p<q<r<u<v<w<x<y<z=S=T=U=V=X=Y=]=^=_=`=a=b=c=d=g=h>P>X>Y>]>^T)z$u){V+P%]<s<tW'[!e%i*Z-`S(}#y#zQ+c%rQ+y&SS.b(m(nQ1j,XQ5T0kR8i5u'QkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%m%t&R&k&n&o&r&t&u&w&{'T'X'b'r(T(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>S$i$^c#Y#e%q%s%u(S(Y(t(y)R)S)T)U)V)W)X)Y)Z)[)^)`)b)g)q+d+x-Z-x-}.S.U.s.v.z.|.}/O/b0p2k2n3O3V3k3p3q3r3s3t3u3v3w3x3y3z3{3|4P4Q4X5X5c6u6{7Q7a7b7k7l8k9X9]9g9m9n:o;W;`<W=vT#TV#U'RkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%m%t&R&k&n&o&r&t&u&w&{'T'X'b'r(T(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>SQ'Y!eR2q-]!W!nQ!e!r!v!y!z$|'W'_'`'l'm'n*Z*k*o*q*r-]-c-e-u0[0_1o5{5}R1l,ZnqOXst!Z#d%m&r&t&u&w,s,x2[2_Q&y!^Q'v!xS(s#u<^Q+l%zQ,]&_Q,^&aQ-j'dQ-w'oS.r(x=PS0q+X=ZQ1P+mQ1n,[Q2c,zQ2e,{Q2m-WQ2z-kQ2}-oS5Y0r=eQ5a1QS5d1S=fQ6t2oQ6x2{Q6}3SQ8]5bQ9Y6vQ9Z6yQ9^7OR:l9V$d$]c#Y#e%s%u(S(Y(t(y)R)S)T)U)V)W)X)Y)Z)[)^)`)b)g)q+d+x-Z-x-}.S.U.s.v.z.}/O/b0p2k2n3O3V3k3p3q3r3s3t3u3v3w3x3y3z3{3|4P4Q4X5X5c6u6{7Q7a7b7k7l8k9X9]9g9m9n:o;W;`<W=vS(o#p'iQ)P#zS+b%q.|S.c(n(pR3^.d'QkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%m%t&R&k&n&o&r&t&u&w&{'T'X'b'r(T(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>SS#q]<VQ&t!XQ&u!YQ&w![Q&x!]R2Z,vQ'a!hQ+e%wQ-h'cS.e(q+hQ2x-gW3b.h.i0w0yQ6w2yW7U3_3a3e5^U9a7V7X7ZU:q9c9d9fS;b:p:sQ;p;cR;x;qU!wQ'`-eT5y1o5{!Q_OXZ`st!V!Z#d#h%e%m&i&k&r&t&u&w(j,s,x.[2[2_]!pQ!r'`-e1o5{T#q]<V%^{OPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&o&r&t&u&w&{'T'b'r(T(V(](d(x(z)O)}*i+X+]+g,p,s,x-i-q.P.V.g.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3d3l4z6T6e6f6i6|7[8t9T9_S(}#y#zS.b(m(n!s=l$Z$n'X)s-U-X/V2p4T5w6s:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>SU$fd)_,mS(p#p'iU*v%R(w4OU0m+O.n7gQ5^0xQ7V3`Q9d7YR:s9em!tQ!r!v!y!z'`'l'm'n-e-u1o5{5}Q't!uS(f#g2US-s'k'wQ/s*]Q0R*jQ3U-vQ4f/tQ4r0TQ4s0UQ4x0^Q7r4`S7}4t4vS8R4y4{Q9r7sQ9v7yQ9{8OQ:Q8TS:{9w9xS;g:|;PS;s;h;iS;{;t;uS<P;|;}R<S<QQ#wbQ's!uS(e#g2US(g#m+WQ+Y%fQ+j%xQ+p&OU-r'k't'wQ.W(fU/r*]*`/wQ0S*jQ0V*lQ1O+kQ1u,aS3R-s-vQ3Z.`S4e/s/tQ4n0PS4q0R0^Q4u0WQ6W1vQ7P3US7q4`4bQ7u4fU7|4r4x4{Q8P4wQ8v6XS9q7r7sQ9u7yQ9}8RQ:O8SQ:c8wQ:y9rS:z9v9xQ;S:QQ;^:dS;f:{;PS;r;g;hS;z;s;uS<O;{;}Q<R<PQ<T<SQ=o=jQ={=tR=|=uV!wQ'`-e%^aOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&o&r&t&u&w&{'T'b'r(T(V(](d(x(z)O)}*i+X+]+g,p,s,x-i-q.P.V.g.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3d3l4z6T6e6f6i6|7[8t9T9_S#wz!j!r=i$Z$n'X)s-U-X/V2p4T5w6s:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>SR=o>R%^bOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&o&r&t&u&w&{'T'b'r(T(V(](d(x(z)O)}*i+X+]+g,p,s,x-i-q.P.V.g.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3d3l4z6T6e6f6i6|7[8t9T9_Q%fj!^%xy!i!u%{%|%}'V'e'f'g'k'u*j+n+o-Y-l-m-t0R0U1R2u2|3T4r4s4v7}9{S&Oz!jQ+k%yQ,a&dW1v,b,c,d,eU6X1w1x1yS8w6Y6ZQ:d8x!r=j$Z$n'X)s-U-X/V2p4T5w6s:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>SQ=t>QR=u>R%QeOPXYstuvw!Z!`!g!o#S#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&r&t&u&w&{'T'b'r(V(](d(x(z)O)}*i+X+]+g,p,s,x-i-q.P.V.g.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3d3l4z6T6e6f6i6|7[8t9T9_Y#bWZ#W#Z(T!b%jm#h#i#l$x%e%h(^(h(i(j*Y*^*b+Z+[+^,o-V.T.Z.[.]._/m/p2d3[3]4a6r7TQ,n&o!p=k$Z$n)s-U-X/V2p4T5w6s:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>SR=n'XU']!e%i*ZR2s-`%SdOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&r&t&u&w&{'T'b'r(T(V(](d(x(z)O)}*i+X+],p,s,x-i-q.P.V.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3l4z6T6e6f6i6|8t9T9_!r)_$Z$n'X)s-U-X/V2p4T5w6s:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>SQ,m&oQ0x+gQ3`.gQ7Y3dR9e7[!b$Tc#Y%q(S(Y(t(y)Z)[)`)g+x-x-}.S.U.s.v/b0p3O3V3k3{5X5c6{7Q7a9]:o<W!P<d)^)q-Z.|2k2n3p3y3z4P4X6u7b7k7l8k9X9g9m9n;W;`=v!f$Vc#Y%q(S(Y(t(y)W)X)Z)[)`)g+x-x-}.S.U.s.v/b0p3O3V3k3{5X5c6{7Q7a9]:o<W!T<f)^)q-Z.|2k2n3p3v3w3y3z4P4X6u7b7k7l8k9X9g9m9n;W;`=v!^$Zc#Y%q(S(Y(t(y)`)g+x-x-}.S.U.s.v/b0p3O3V3k3{5X5c6{7Q7a9]:o<WQ4_/kz>S)^)q-Z.|2k2n3p4P4X6u7b7k7l8k9X9g9m9n;W;`=vQ>X>ZR>Y>['QkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%m%t&R&k&n&o&r&t&u&w&{'T'X'b'r(T(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>SS$oh$pR4U/U'XgOPWXYZhstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n$p%m%t&R&k&n&o&r&t&u&w&{'T'X'b'r(T(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/U/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>ST$kf$qQ$ifS)j$l)nR)v$qT$jf$qT)l$l)n'XhOPWXYZhstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n$p%m%t&R&k&n&o&r&t&u&w&{'T'X'b'r(T(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/U/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>ST$oh$pQ$rhR)u$p%^jOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&o&r&t&u&w&{'T'b'r(T(V(](d(x(z)O)}*i+X+]+g,p,s,x-i-q.P.V.g.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3d3l4z6T6e6f6i6|7[8t9T9_!s>Q$Z$n'X)s-U-X/V2p4T5w6s:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>S#glOPXZst!Z!`!o#S#d#o#{$n%m&k&n&o&r&t&u&w&{'T'b)O)s*i+]+g,p,s,x-i.g/V/n0]0l1r2S2T2V2X2[2_2a3d4T4z6T6e6f6i7[8t9T!U%Ri$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>Y#f(w#v$b$c$x${)y*V*Y*g+f+i,S,V.f/d/m/y/{1f1i1q3c4^4j4o5[5_6S7W7v8Q8[8q9b9y:P:`:r;Q;[;d;k<o<q<u<w<y=S=U=X=]=_=a=c=g>]>^Q+T%aQ/c*Oo4O<l<m<p<r<v<x<z=T=V=Y=^=`=b=d=h!U$yi$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>YQ*c$zU*l$|*Z*oQ+U%bQ0W*m#f=q#v$b$c$x${)y*V*Y*g+f+i,S,V.f/d/m/y/{1f1i1q3c4^4j4o5[5_6S7W7v8Q8[8q9b9y:P:`:r;Q;[;d;k<o<q<u<w<y=S=U=X=]=_=a=c=g>]>^n=r<l<m<p<r<v<x<z=T=V=Y=^=`=b=d=hQ=w>TQ=x>UQ=y>VR=z>W!U%Ri$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>Y#f(w#v$b$c$x${)y*V*Y*g+f+i,S,V.f/d/m/y/{1f1i1q3c4^4j4o5[5_6S7W7v8Q8[8q9b9y:P:`:r;Q;[;d;k<o<q<u<w<y=S=U=X=]=_=a=c=g>]>^o4O<l<m<p<r<v<x<z=T=V=Y=^=`=b=d=hnoOXst!Z#d%m&r&t&u&w,s,x2[2_S*f${*YQ-R'OQ-S'QR4i/y%[%Si#v$b$c$d$x${%O%Q%^%_%c)y*R*T*V*Y*a*g*w*x+f+i,S,V.f/P/d/m/x/y/{0`0b0i0j0o1f1i1q3c4^4_4j4o5Q5[5_6S7W7v8Q8V8[8q9b9p9y:P:`:r;Q;[;d;k<l<m<o<p<q<r<u<v<w<x<y<z=S=T=U=V=X=Y=]=^=_=`=a=b=c=d=g=h>P>X>Y>]>^Q,U&]Q1h,WQ5s1gR8h5tV*n$|*Z*oU*n$|*Z*oT5z1o5{S0P*i/nQ4w0]T8S4z:]Q+j%xQ0V*lQ1O+kQ1u,aQ6W1vQ8v6XQ:c8wR;^:d!U%Oi$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>Yx*R$v)e*S*u+V/v0d0e4R4g5R5S5W7p8U:R:x=p=}>OS0`*t0a#f<o#v$b$c$x${)y*V*Y*g+f+i,S,V.f/d/m/y/{1f1i1q3c4^4j4o5[5_6S7W7v8Q8[8q9b9y:P:`:r;Q;[;d;k<o<q<u<w<y=S=U=X=]=_=a=c=g>]>^n<p<l<m<p<r<v<x<z=T=V=Y=^=`=b=d=h!d=S(u)c*[*e.j.m.q/_/k/|0v1e3h4[4h4l5r7]7`7w7z8X8Z9t9|:S:};R;e;j;v>Z>[`=T3}7c7f7j9h:t:w;yS=_.l3iT=`7e9k!U%Qi$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>Y|*T$v)e*U*t+V/g/v0d0e4R4g4|5R5S5W7p8U:R:x=p=}>OS0b*u0c#f<q#v$b$c$x${)y*V*Y*g+f+i,S,V.f/d/m/y/{1f1i1q3c4^4j4o5[5_6S7W7v8Q8[8q9b9y:P:`:r;Q;[;d;k<o<q<u<w<y=S=U=X=]=_=a=c=g>]>^n<r<l<m<p<r<v<x<z=T=V=Y=^=`=b=d=h!h=U(u)c*[*e.k.l.q/_/k/|0v1e3f3h4[4h4l5r7]7^7`7w7z8X8Z9t9|:S:};R;e;j;v>Z>[d=V3}7d7e7j9h9i:t:u:w;yS=a.m3jT=b7f9lrnOXst!V!Z#d%m&i&r&t&u&w,s,x2[2_Q&f!UR,p&ornOXst!V!Z#d%m&i&r&t&u&w,s,x2[2_R&f!UQ,Y&^R1d,RsnOXst!V!Z#d%m&i&r&t&u&w,s,x2[2_Q1p,_S6R1s1tU8p6P6Q6US:_8r8sS;Y:^:aQ;m;ZR;w;nQ&m!VR,i&iR6_1|R:f8yW&Q|&V&W,OR1Z+vQ&r!WR,s&sR,y&xT2],x2_R,}&yQ,|&yR2f,}Q'y!{R-y'ySsOtQ#dXT%ps#dQ#OTR'{#OQ#RUR'}#RQ){$uR/`){Q#UVR(Q#UQ#XWU(W#X(X.QQ(X#YR.Q(YQ-^'YR2r-^Q.u(yS3m.u3nR3n.vQ-e'`R2v-eY!rQ'`-e1o5{R'j!rQ/Q)eR4S/QU#_W%h*YU(_#_(`.RQ(`#`R.R(ZQ-a']R2t-at`OXst!V!Z#d%m&i&k&r&t&u&w,s,x2[2_S#hZ%eU#r`#h.[R.[(jQ(k#jQ.X(gW.a(k.X3X7RQ3X.YR7R3YQ)n$lR/W)nQ$phR)t$pQ$`cU)a$`-|<jQ-|<WR<j)qQ/q*]W4c/q4d7t9sU4d/r/s/tS7t4e4fR9s7u$e*Q$v(u)c)e*[*e*t*u+Q+R+V.l.m.o.p.q/_/g/i/k/v/|0d0e0v1e3f3g3h3}4R4[4g4h4l4|5O5R5S5W5r7]7^7_7`7e7f7h7i7j7p7w7z8U8X8Z9h9i9j9t9|:R:S:t:u:v:w:x:};R;e;j;v;y=p=}>O>Z>[Q/z*eU4k/z4m7xQ4m/|R7x4lS*o$|*ZR0Y*ox*S$v)e*t*u+V/v0d0e4R4g5R5S5W7p8U:R:x=p=}>O!d.j(u)c*[*e.l.m.q/_/k/|0v1e3h4[4h4l5r7]7`7w7z8X8Z9t9|:S:};R;e;j;v>Z>[U/h*S.j7ca7c3}7e7f7j9h:t:w;yQ0a*tQ3i.lU4}0a3i9kR9k7e|*U$v)e*t*u+V/g/v0d0e4R4g4|5R5S5W7p8U:R:x=p=}>O!h.k(u)c*[*e.l.m.q/_/k/|0v1e3f3h4[4h4l5r7]7^7`7w7z8X8Z9t9|:S:};R;e;j;v>Z>[U/j*U.k7de7d3}7e7f7j9h9i:t:u:w;yQ0c*uQ3j.mU5P0c3j9lR9l7fQ*z%UR0g*zQ5]0vR8Y5]Q+_%kR0u+_Q5v1jS8j5v:[R:[8kQ,[&_R1m,[Q5{1oR8m5{Q1{,fS6]1{8zR8z6_Q1U+rW5h1U5j8a:VQ5j1XQ8a5iR:V8bQ+w&QR1[+wQ2_,xR6m2_YrOXst#dQ&v!ZQ+a%mQ,r&rQ,t&tQ,u&uQ,w&wQ2Y,sS2],x2_R6l2[Q%opQ&z!_Q&}!aQ'P!bQ'R!cQ'q!uQ+`%lQ+l%zQ,Q&XQ,h&mQ-P&|W-p'k's't'wQ-w'oQ0X*nQ1P+mQ1c,PS2O,i,lQ2g-OQ2h-RQ2i-SQ2}-oW3P-r-s-v-xQ5a1QQ5m1_Q5q1eQ6V1uQ6a2QQ6k2ZU6z3O3R3UQ6}3SQ8]5bQ8e5oQ8g5rQ8l5zQ8u6WQ8{6`S9[6{7PQ9^7OQ:W8cQ:b8vQ:g8|Q:n9]Q;U:XQ;]:cQ;a:oQ;l;VR;o;^Q%zyQ'd!iQ'o!uU+m%{%|%}Q-W'VU-k'e'f'gS-o'k'uQ0Q*jS1Q+n+oQ2o-YS2{-l-mQ3S-tS4p0R0UQ5b1RQ6v2uQ6y2|Q7O3TU7{4r4s4vQ9z7}R;O9{S$wi>PR*{%VU%Ui%V>PR0f*yQ$viS(u#v+iS)c$b$cQ)e$dQ*[$xS*e${*YQ*t%OQ*u%QQ+Q%^Q+R%_Q+V%cQ.l<oQ.m<qQ.o<uQ.p<wQ.q<yQ/_)yQ/g*RQ/i*TQ/k*VQ/v*aS/|*g/mQ0d*wQ0e*xl0v+f,V.f1i1q3c6S7W8q9b:`:r;[;dQ1e,SQ3f=SQ3g=UQ3h=XS3}<l<mQ4R/PS4[/d4^Q4g/xQ4h/yQ4l/{Q4|0`Q5O0bQ5R0iQ5S0jQ5W0oQ5r1fQ7]=]Q7^=_Q7_=aQ7`=cQ7e<pQ7f<rQ7h<vQ7i<xQ7j<zQ7p4_Q7w4jQ7z4oQ8U5QQ8X5[Q8Z5_Q9h=YQ9i=TQ9j=VQ9t7vQ9|8QQ:R8VQ:S8[Q:t=^Q:u=`Q:v=bQ:w=dQ:x9pQ:}9yQ;R:PQ;e=gQ;j;QQ;v;kQ;y=hQ=p>PQ=}>XQ>O>YQ>Z>]R>[>^Q+O%]Q.n<sR7g<tnpOXst!Z#d%m&r&t&u&w,s,x2[2_Q!fPS#fZ#oQ&|!`W'h!o*i0]4zQ(P#SQ)Q#{Q)r$nS,l&k&nQ,q&oQ-O&{S-T'T/nQ-g'bQ.x)OQ/[)sQ0s+]Q0y+gQ2W,pQ2y-iQ3a.gQ4W/VQ5U0lQ6Q1rQ6c2SQ6d2TQ6h2VQ6j2XQ6o2aQ7Z3dQ7m4TQ8s6TQ9P6eQ9Q6fQ9S6iQ9f7[Q:a8tR:k9T#[cOPXZst!Z!`!o#d#o#{%m&k&n&o&r&t&u&w&{'T'b)O*i+]+g,p,s,x-i.g/n0]0l1r2S2T2V2X2[2_2a3d4z6T6e6f6i7[8t9TQ#YWQ#eYQ%quQ%svS%uw!gS(S#W(VQ(Y#ZQ(t#uQ(y#xQ)R$OQ)S$PQ)T$QQ)U$RQ)V$SQ)W$TQ)X$UQ)Y$VQ)Z$WQ)[$XQ)^$ZQ)`$_Q)b$aQ)g$eW)q$n)s/V4TQ+d%tQ+x&RS-Z'X2pQ-x'rS-}(T.PQ.S(]Q.U(dQ.s(xQ.v(zQ.z<UQ.|<XQ.}<YQ/O<]Q/b)}Q0p+XQ2k-UQ2n-XQ3O-qQ3V.VQ3k.tQ3p<^Q3q<_Q3r<`Q3s<aQ3t<bQ3u<cQ3v<dQ3w<eQ3x<fQ3y<gQ3z<hQ3{.{Q3|<kQ4P<nQ4Q<{Q4X<iQ5X0rQ5c1SQ6u=OQ6{3QQ7Q3WQ7a3lQ7b=PQ7k=RQ7l=ZQ8k5wQ9X6sQ9]6|Q9g=[Q9m=eQ9n=fQ:o9_Q;W:ZQ;`:mQ<W#SR=v>SR#[WR'Z!el!tQ!r!v!y!z'`'l'm'n-e-u1o5{5}S'V!e-]U*j$|*Z*oS-Y'W'_S0U*k*qQ0^*rQ2u-cQ4v0[R4{0_R({#xQ!fQT-d'`-e]!qQ!r'`-e1o5{Q#p]R'i<VR)f$dY!uQ'`-e1o5{Q'k!rS'u!v!yS'w!z5}S-t'l'mQ-v'nR3T-uT#kZ%eS#jZ%eS%km,oU(g#h#i#lS.Y(h(iQ.^(jQ0t+^Q3Y.ZU3Z.[.]._S7S3[3]R9`7Td#^W#W#Z%h(T(^*Y+Z.T/mr#gZm#h#i#l%e(h(i(j+^.Z.[.]._3[3]7TS*]$x*bQ/t*^Q2U,oQ2l-VQ4`/pQ6q2dQ7s4aQ9W6rT=m'X+[V#aW%h*YU#`W%h*YS(U#W(^U(Z#Z+Z/mS-['X+[T.O(T.TV'^!e%i*ZQ$lfR)x$qT)m$l)nR4V/UT*_$x*bT*h${*YQ0w+fQ1g,VQ3_.fQ5t1iQ6P1qQ7X3cQ8r6SQ9c7WQ:^8qQ:p9bQ;Z:`Q;c:rQ;n;[R;q;dnqOXst!Z#d%m&r&t&u&w,s,x2[2_Q&l!VR,h&itmOXst!U!V!Z#d%m&i&r&t&u&w,s,x2[2_R,o&oT%lm,oR1k,XR,g&gQ&U|S+}&V&WR1^,OR+s&PT&p!W&sT&q!W&sT2^,x2_",nodeNames:"⚠ ArithOp ArithOp ?. JSXStartTag LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > < TypeParamList in out const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration defer ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:380,context:p8,nodeProps:[["isolate",-8,5,6,14,37,39,51,53,55,""],["group",-26,9,17,19,68,207,211,215,216,218,221,224,234,237,243,245,247,249,252,258,264,266,268,270,272,274,275,"Statement",-34,13,14,32,35,36,42,51,54,55,57,62,70,72,76,80,82,84,85,110,111,120,121,136,139,141,142,143,144,145,147,148,167,169,171,"Expression",-23,31,33,37,41,43,45,173,175,177,178,180,181,182,184,185,186,188,189,190,201,203,205,206,"Type",-3,88,103,109,"ClassItem"],["openedBy",23,"<",38,"InterpolationStart",56,"[",60,"{",73,"(",160,"JSXStartCloseTag"],["closedBy",-2,24,168,">",40,"InterpolationEnd",50,"]",61,"}",74,")",165,"JSXEndTag"]],propSources:[x8],skippedNodes:[0,5,6,278],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$<r#p#q$=h#q#r$>x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$i&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$i&j(Z!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(Z!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$i&j(WpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU(WpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX(Wp(Z!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z07[+rq$i&j(Wp(Z!b'|0/lOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z07[.ST(X#S$i&j'}0/lO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c07[.n_$i&j(Wp(Z!b'}0/lOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)3p/x`$i&j!p),Q(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW1V`#v(Ch$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW2d_#v(Ch$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'At3l_(V':f$i&j(Z!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k(^4r_$i&j(Z!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k&z5vX$i&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q&z6jT$d`$i&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c`6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y`7bO$d``7eP;=`<%l6y&z7kP;=`<%l5q(^7w]$d`$i&j(Z!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!r8uZ(Z!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p!r9oU$d`(Z!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!r:UP;=`<%l8p(^:[P;=`<%l4k%9[:hh$i&j(Wp(Z!bOY%ZYZ&cZq%Zqr<Srs&}st%ZtuCruw%Zwx(rx!^%Z!^!_*g!_!c%Z!c!}Cr!}#O%Z#O#P&c#P#R%Z#R#SCr#S#T%Z#T#oCr#o#p*g#p$g%Z$g;'SCr;'S;=`El<%lOCr(r<__WS$i&j(Wp(Z!bOY<SYZ&cZr<Srs=^sw<Swx@nx!^<S!^!_Bm!_#O<S#O#P>`#P#o<S#o#pBm#p;'S<S;'S;=`Cl<%lO<S(Q=g]WS$i&j(Z!bOY=^YZ&cZw=^wx>`x!^=^!^!_?q!_#O=^#O#P>`#P#o=^#o#p?q#p;'S=^;'S;=`@h<%lO=^&n>gXWS$i&jOY>`YZ&cZ!^>`!^!_?S!_#o>`#o#p?S#p;'S>`;'S;=`?k<%lO>`S?XSWSOY?SZ;'S?S;'S;=`?e<%lO?SS?hP;=`<%l?S&n?nP;=`<%l>`!f?xWWS(Z!bOY?qZw?qwx?Sx#O?q#O#P?S#P;'S?q;'S;=`@b<%lO?q!f@eP;=`<%l?q(Q@kP;=`<%l=^'`@w]WS$i&j(WpOY@nYZ&cZr@nrs>`s!^@n!^!_Ap!_#O@n#O#P>`#P#o@n#o#pAp#p;'S@n;'S;=`Bg<%lO@ntAwWWS(WpOYApZrAprs?Ss#OAp#O#P?S#P;'SAp;'S;=`Ba<%lOAptBdP;=`<%lAp'`BjP;=`<%l@n#WBvYWS(Wp(Z!bOYBmZrBmrs?qswBmwxApx#OBm#O#P?S#P;'SBm;'S;=`Cf<%lOBm#WCiP;=`<%lBm(rCoP;=`<%l<S%9[C}i$i&j(o%1l(Wp(Z!bOY%ZYZ&cZr%Zrs&}st%ZtuCruw%Zwx(rx!Q%Z!Q![Cr![!^%Z!^!_*g!_!c%Z!c!}Cr!}#O%Z#O#P&c#P#R%Z#R#SCr#S#T%Z#T#oCr#o#p*g#p$g%Z$g;'SCr;'S;=`El<%lOCr%9[EoP;=`<%lCr07[FRk$i&j(Wp(Z!b$]#t(T,2j(e$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr+dHRk$i&j(Wp(Z!b$]#tOY%ZYZ&cZr%Zrs&}st%ZtuGvuw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Gv![!^%Z!^!_*g!_!c%Z!c!}Gv!}#O%Z#O#P&c#P#R%Z#R#SGv#S#T%Z#T#oGv#o#p*g#p$g%Z$g;'SGv;'S;=`Iv<%lOGv+dIyP;=`<%lGv07[JPP;=`<%lEr(KWJ_`$i&j(Wp(Z!b#p(ChOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KWKl_$i&j$Q(Ch(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z,#xLva(z+JY$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sv%ZvwM{wx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KWNW`$i&j#z(Ch(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'At! c_(Y';W$i&j(WpOY!!bYZ!#hZr!!brs!#hsw!!bwx!$xx!^!!b!^!_!%z!_#O!!b#O#P!#h#P#o!!b#o#p!%z#p;'S!!b;'S;=`!'c<%lO!!b'l!!i_$i&j(WpOY!!bYZ!#hZr!!brs!#hsw!!bwx!$xx!^!!b!^!_!%z!_#O!!b#O#P!#h#P#o!!b#o#p!%z#p;'S!!b;'S;=`!'c<%lO!!b&z!#mX$i&jOw!#hwx6cx!^!#h!^!_!$Y!_#o!#h#o#p!$Y#p;'S!#h;'S;=`!$r<%lO!#h`!$]TOw!$Ywx7]x;'S!$Y;'S;=`!$l<%lO!$Y`!$oP;=`<%l!$Y&z!$uP;=`<%l!#h'l!%R]$d`$i&j(WpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(r!Q!&PZ(WpOY!%zYZ!$YZr!%zrs!$Ysw!%zwx!&rx#O!%z#O#P!$Y#P;'S!%z;'S;=`!']<%lO!%z!Q!&yU$d`(WpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)r!Q!'`P;=`<%l!%z'l!'fP;=`<%l!!b/5|!'t_!l/.^$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z#&U!)O_!k!Lf$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z-!n!*[b$i&j(Wp(Z!b(U%&f#q(ChOY%ZYZ&cZr%Zrs&}sw%Zwx(rxz%Zz{!+d{!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW!+o`$i&j(Wp(Z!b#n(ChOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z+;x!,|`$i&j(Wp(Z!br+4YOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z,$U!.Z_!]+Jf$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[!/ec$i&j(Wp(Z!b!Q.2^OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!0p!P!Q%Z!Q![!3Y![!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z#%|!0ya$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!2O!P!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z#%|!2Z_![!L^$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad!3eg$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![!3Y![!^%Z!^!_*g!_!g%Z!g!h!4|!h#O%Z#O#P&c#P#R%Z#R#S!3Y#S#X%Z#X#Y!4|#Y#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad!5Vg$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx{%Z{|!6n|}%Z}!O!6n!O!Q%Z!Q![!8S![!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S!8S#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad!6wc$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![!8S![!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S!8S#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad!8_c$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![!8S![!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S!8S#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[!9uf$i&j(Wp(Z!b#o(ChOY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcxz!;Zz{#-}{!P!;Z!P!Q#/d!Q!^!;Z!^!_#(i!_!`#7S!`!a#8i!a!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;Z?O!;fb$i&j(Wp(Z!b!X7`OY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcx!P!;Z!P!Q#&`!Q!^!;Z!^!_#(i!_!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;Z>^!<w`$i&j(Z!b!X7`OY!<nYZ&cZw!<nwx!=yx!P!<n!P!Q!Eq!Q!^!<n!^!_!Gr!_!}!<n!}#O!KS#O#P!Dy#P#o!<n#o#p!Gr#p;'S!<n;'S;=`!L]<%lO!<n<z!>Q^$i&j!X7`OY!=yYZ&cZ!P!=y!P!Q!>|!Q!^!=y!^!_!@c!_!}!=y!}#O!CW#O#P!Dy#P#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y<z!?Td$i&j!X7`O!^&c!_#W&c#W#X!>|#X#Z&c#Z#[!>|#[#]&c#]#^!>|#^#a&c#a#b!>|#b#g&c#g#h!>|#h#i&c#i#j!>|#j#k!>|#k#m&c#m#n!>|#n#o&c#p;'S&c;'S;=`&w<%lO&c7`!@hX!X7`OY!@cZ!P!@c!P!Q!AT!Q!}!@c!}#O!Ar#O#P!Bq#P;'S!@c;'S;=`!CQ<%lO!@c7`!AYW!X7`#W#X!AT#Z#[!AT#]#^!AT#a#b!AT#g#h!AT#i#j!AT#j#k!AT#m#n!AT7`!AuVOY!ArZ#O!Ar#O#P!B[#P#Q!@c#Q;'S!Ar;'S;=`!Bk<%lO!Ar7`!B_SOY!ArZ;'S!Ar;'S;=`!Bk<%lO!Ar7`!BnP;=`<%l!Ar7`!BtSOY!@cZ;'S!@c;'S;=`!CQ<%lO!@c7`!CTP;=`<%l!@c<z!C][$i&jOY!CWYZ&cZ!^!CW!^!_!Ar!_#O!CW#O#P!DR#P#Q!=y#Q#o!CW#o#p!Ar#p;'S!CW;'S;=`!Ds<%lO!CW<z!DWX$i&jOY!CWYZ&cZ!^!CW!^!_!Ar!_#o!CW#o#p!Ar#p;'S!CW;'S;=`!Ds<%lO!CW<z!DvP;=`<%l!CW<z!EOX$i&jOY!=yYZ&cZ!^!=y!^!_!@c!_#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y<z!EnP;=`<%l!=y>^!Ezl$i&j(Z!b!X7`OY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#W&}#W#X!Eq#X#Z&}#Z#[!Eq#[#]&}#]#^!Eq#^#a&}#a#b!Eq#b#g&}#g#h!Eq#h#i&}#i#j!Eq#j#k!Eq#k#m&}#m#n!Eq#n#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}8r!GyZ(Z!b!X7`OY!GrZw!Grwx!@cx!P!Gr!P!Q!Hl!Q!}!Gr!}#O!JU#O#P!Bq#P;'S!Gr;'S;=`!J|<%lO!Gr8r!Hse(Z!b!X7`OY'}Zw'}x#O'}#P#W'}#W#X!Hl#X#Z'}#Z#[!Hl#[#]'}#]#^!Hl#^#a'}#a#b!Hl#b#g'}#g#h!Hl#h#i'}#i#j!Hl#j#k!Hl#k#m'}#m#n!Hl#n;'S'};'S;=`(f<%lO'}8r!JZX(Z!bOY!JUZw!JUwx!Arx#O!JU#O#P!B[#P#Q!Gr#Q;'S!JU;'S;=`!Jv<%lO!JU8r!JyP;=`<%l!JU8r!KPP;=`<%l!Gr>^!KZ^$i&j(Z!bOY!KSYZ&cZw!KSwx!CWx!^!KS!^!_!JU!_#O!KS#O#P!DR#P#Q!<n#Q#o!KS#o#p!JU#p;'S!KS;'S;=`!LV<%lO!KS>^!LYP;=`<%l!KS>^!L`P;=`<%l!<n=l!Ll`$i&j(Wp!X7`OY!LcYZ&cZr!Lcrs!=ys!P!Lc!P!Q!Mn!Q!^!Lc!^!_# o!_!}!Lc!}#O#%P#O#P!Dy#P#o!Lc#o#p# o#p;'S!Lc;'S;=`#&Y<%lO!Lc=l!Mwl$i&j(Wp!X7`OY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#W(r#W#X!Mn#X#Z(r#Z#[!Mn#[#](r#]#^!Mn#^#a(r#a#b!Mn#b#g(r#g#h!Mn#h#i(r#i#j!Mn#j#k!Mn#k#m(r#m#n!Mn#n#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(r8Q# vZ(Wp!X7`OY# oZr# ors!@cs!P# o!P!Q#!i!Q!}# o!}#O#$R#O#P!Bq#P;'S# o;'S;=`#$y<%lO# o8Q#!pe(Wp!X7`OY)rZr)rs#O)r#P#W)r#W#X#!i#X#Z)r#Z#[#!i#[#])r#]#^#!i#^#a)r#a#b#!i#b#g)r#g#h#!i#h#i)r#i#j#!i#j#k#!i#k#m)r#m#n#!i#n;'S)r;'S;=`*Z<%lO)r8Q#$WX(WpOY#$RZr#$Rrs!Ars#O#$R#O#P!B[#P#Q# o#Q;'S#$R;'S;=`#$s<%lO#$R8Q#$vP;=`<%l#$R8Q#$|P;=`<%l# o=l#%W^$i&j(WpOY#%PYZ&cZr#%Prs!CWs!^#%P!^!_#$R!_#O#%P#O#P!DR#P#Q!Lc#Q#o#%P#o#p#$R#p;'S#%P;'S;=`#&S<%lO#%P=l#&VP;=`<%l#%P=l#&]P;=`<%l!Lc?O#&kn$i&j(Wp(Z!b!X7`OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#W%Z#W#X#&`#X#Z%Z#Z#[#&`#[#]%Z#]#^#&`#^#a%Z#a#b#&`#b#g%Z#g#h#&`#h#i%Z#i#j#&`#j#k#&`#k#m%Z#m#n#&`#n#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z9d#(r](Wp(Z!b!X7`OY#(iZr#(irs!Grsw#(iwx# ox!P#(i!P!Q#)k!Q!}#(i!}#O#+`#O#P!Bq#P;'S#(i;'S;=`#,`<%lO#(i9d#)th(Wp(Z!b!X7`OY*gZr*grs'}sw*gwx)rx#O*g#P#W*g#W#X#)k#X#Z*g#Z#[#)k#[#]*g#]#^#)k#^#a*g#a#b#)k#b#g*g#g#h#)k#h#i*g#i#j#)k#j#k#)k#k#m*g#m#n#)k#n;'S*g;'S;=`+Z<%lO*g9d#+gZ(Wp(Z!bOY#+`Zr#+`rs!JUsw#+`wx#$Rx#O#+`#O#P!B[#P#Q#(i#Q;'S#+`;'S;=`#,Y<%lO#+`9d#,]P;=`<%l#+`9d#,cP;=`<%l#(i?O#,o`$i&j(Wp(Z!bOY#,fYZ&cZr#,frs!KSsw#,fwx#%Px!^#,f!^!_#+`!_#O#,f#O#P!DR#P#Q!;Z#Q#o#,f#o#p#+`#p;'S#,f;'S;=`#-q<%lO#,f?O#-tP;=`<%l#,f?O#-zP;=`<%l!;Z07[#.[b$i&j(Wp(Z!b(O0/l!X7`OY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcx!P!;Z!P!Q#&`!Q!^!;Z!^!_#(i!_!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;Z07[#/o_$i&j(Wp(Z!bT0/lOY#/dYZ&cZr#/drs#0nsw#/dwx#4Ox!^#/d!^!_#5}!_#O#/d#O#P#1p#P#o#/d#o#p#5}#p;'S#/d;'S;=`#6|<%lO#/d06j#0w]$i&j(Z!bT0/lOY#0nYZ&cZw#0nwx#1px!^#0n!^!_#3R!_#O#0n#O#P#1p#P#o#0n#o#p#3R#p;'S#0n;'S;=`#3x<%lO#0n05W#1wX$i&jT0/lOY#1pYZ&cZ!^#1p!^!_#2d!_#o#1p#o#p#2d#p;'S#1p;'S;=`#2{<%lO#1p0/l#2iST0/lOY#2dZ;'S#2d;'S;=`#2u<%lO#2d0/l#2xP;=`<%l#2d05W#3OP;=`<%l#1p01O#3YW(Z!bT0/lOY#3RZw#3Rwx#2dx#O#3R#O#P#2d#P;'S#3R;'S;=`#3r<%lO#3R01O#3uP;=`<%l#3R06j#3{P;=`<%l#0n05x#4X]$i&j(WpT0/lOY#4OYZ&cZr#4Ors#1ps!^#4O!^!_#5Q!_#O#4O#O#P#1p#P#o#4O#o#p#5Q#p;'S#4O;'S;=`#5w<%lO#4O00^#5XW(WpT0/lOY#5QZr#5Qrs#2ds#O#5Q#O#P#2d#P;'S#5Q;'S;=`#5q<%lO#5Q00^#5tP;=`<%l#5Q05x#5zP;=`<%l#4O01p#6WY(Wp(Z!bT0/lOY#5}Zr#5}rs#3Rsw#5}wx#5Qx#O#5}#O#P#2d#P;'S#5};'S;=`#6v<%lO#5}01p#6yP;=`<%l#5}07[#7PP;=`<%l#/d)3h#7ab$i&j$Q(Ch(Wp(Z!b!X7`OY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcx!P!;Z!P!Q#&`!Q!^!;Z!^!_#(i!_!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;ZAt#8vb$Z#t$i&j(Wp(Z!b!X7`OY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcx!P!;Z!P!Q#&`!Q!^!;Z!^!_#(i!_!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;Z'Ad#:Zp$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!3Y!P!Q%Z!Q![#<_![!^%Z!^!_*g!_!g%Z!g!h!4|!h#O%Z#O#P&c#P#R%Z#R#S#<_#S#U%Z#U#V#?i#V#X%Z#X#Y!4|#Y#b%Z#b#c#>_#c#d#Bq#d#l%Z#l#m#Es#m#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#<jk$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!3Y!P!Q%Z!Q![#<_![!^%Z!^!_*g!_!g%Z!g!h!4|!h#O%Z#O#P&c#P#R%Z#R#S#<_#S#X%Z#X#Y!4|#Y#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#>j_$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#?rd$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#A]f$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Bzc$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Dbe$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#E|g$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Gpi$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x#Il_!g$b$i&j$O)Lv(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)[#Jv_al$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f#LS^h#)`#R-<U(Wp(Z!b$n7`OY*gZr*grs'}sw*gwx)rx!P*g!P!Q#MO!Q!^*g!^!_#Mt!_!`$ f!`#O*g#P;'S*g;'S;=`+Z<%lO*g(n#MXX$k&j(Wp(Z!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g(El#M}Z#r(Ch(Wp(Z!bOY*gZr*grs'}sw*gwx)rx!_*g!_!`#Np!`#O*g#P;'S*g;'S;=`+Z<%lO*g(El#NyX$Q(Ch(Wp(Z!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g(El$ oX#s(Ch(Wp(Z!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g*)x$!ga#`*!Y$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`!a$#l!a#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(K[$#w_#k(Cl$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x$%Vag!*r#s(Ch$f#|$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`$&[!`!a$'f!a#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$&g_#s(Ch$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$'qa#r(Ch$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`!a$(v!a#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$)R`#r(Ch$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(Kd$*`a(r(Ct$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!a%Z!a!b$+e!b#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$+p`$i&j#{(Ch(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#`$,}_!|$Ip$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f$.X_!S0,v$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(n$/]Z$i&jO!^$0O!^!_$0f!_#i$0O#i#j$0k#j#l$0O#l#m$2^#m#o$0O#o#p$0f#p;'S$0O;'S;=`$4i<%lO$0O(n$0VT_#S$i&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c#S$0kO_#S(n$0p[$i&jO!Q&c!Q![$1f![!^&c!_!c&c!c!i$1f!i#T&c#T#Z$1f#Z#o&c#o#p$3|#p;'S&c;'S;=`&w<%lO&c(n$1kZ$i&jO!Q&c!Q![$2^![!^&c!_!c&c!c!i$2^!i#T&c#T#Z$2^#Z#o&c#p;'S&c;'S;=`&w<%lO&c(n$2cZ$i&jO!Q&c!Q![$3U![!^&c!_!c&c!c!i$3U!i#T&c#T#Z$3U#Z#o&c#p;'S&c;'S;=`&w<%lO&c(n$3ZZ$i&jO!Q&c!Q![$0O![!^&c!_!c&c!c!i$0O!i#T&c#T#Z$0O#Z#o&c#p;'S&c;'S;=`&w<%lO&c#S$4PR!Q![$4Y!c!i$4Y#T#Z$4Y#S$4]S!Q![$4Y!c!i$4Y#T#Z$4Y#q#r$0f(n$4lP;=`<%l$0O#1[$4z_!Y#)l$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$6U`#x(Ch$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z+;p$7c_$i&j(Wp(Z!b(a+4QOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[$8qk$i&j(Wp(Z!b(T,2j$_#t(e$I[OY%ZYZ&cZr%Zrs&}st%Ztu$8buw%Zwx(rx}%Z}!O$:f!O!Q%Z!Q![$8b![!^%Z!^!_*g!_!c%Z!c!}$8b!}#O%Z#O#P&c#P#R%Z#R#S$8b#S#T%Z#T#o$8b#o#p*g#p$g%Z$g;'S$8b;'S;=`$<l<%lO$8b+d$:qk$i&j(Wp(Z!b$_#tOY%ZYZ&cZr%Zrs&}st%Ztu$:fuw%Zwx(rx}%Z}!O$:f!O!Q%Z!Q![$:f![!^%Z!^!_*g!_!c%Z!c!}$:f!}#O%Z#O#P&c#P#R%Z#R#S$:f#S#T%Z#T#o$:f#o#p*g#p$g%Z$g;'S$:f;'S;=`$<f<%lO$:f+d$<iP;=`<%l$:f07[$<oP;=`<%l$8b#Jf$<{X!_#Hb(Wp(Z!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g,#x$=sa(y+JY$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p#q$+e#q;'S%Z;'S;=`+a<%lO%Z)>v$?V_!^(CdvBr$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z?O$@a_!q7`$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[$Aq|$i&j(Wp(Z!b'|0/l$]#t(T,2j(e$I[OX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr07[$D|k$i&j(Wp(Z!b'}0/l$]#t(T,2j(e$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[v8,O8,b8,y8,2,3,4,5,6,7,8,9,10,11,12,13,14,g8,new Lm("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOx~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!U~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(c~~",141,340),new Lm("j~RQYZXz{^~^O(Q~~aP!P!Qd~iO(R~~",25,323)],topRules:{Script:[0,7],SingleExpression:[1,276],SingleClassItem:[2,277]},dialects:{jsx:0,ts:15175},dynamicPrecedences:{80:1,82:1,94:1,169:1,199:1},specialized:[{term:327,get:e=>S8[e]||-1},{term:343,get:e=>w8[e]||-1},{term:95,get:e=>_8[e]||-1}],tokenPrec:15201}),rM=[hr("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),hr("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),hr("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),hr("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),hr("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),hr(`try {
|
|
118
|
-
\${}
|
|
119
|
-
} catch (\${error}) {
|
|
120
|
-
\${}
|
|
121
|
-
}`,{label:"try",detail:"/ catch block",type:"keyword"}),hr("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),hr(`if (\${}) {
|
|
122
|
-
\${}
|
|
123
|
-
} else {
|
|
124
|
-
\${}
|
|
125
|
-
}`,{label:"if",detail:"/ else block",type:"keyword"}),hr(`class \${name} {
|
|
126
|
-
constructor(\${params}) {
|
|
127
|
-
\${}
|
|
128
|
-
}
|
|
129
|
-
}`,{label:"class",detail:"definition",type:"keyword"}),hr('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),hr('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],j8=rM.concat([hr("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),hr("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),hr("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),GT=new qN,iM=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function vu(e){return(t,n)=>{let r=t.node.getChild("VariableDefinition");return r&&n(r,e),!0}}var T8=["FunctionDeclaration"],C8={FunctionDeclaration:vu("function"),ClassDeclaration:vu("class"),ClassExpression:()=>!0,EnumDeclaration:vu("constant"),TypeAliasDeclaration:vu("type"),NamespaceDeclaration:vu("namespace"),VariableDefinition(e,t){e.matchContext(T8)||t(e,"variable")},TypeDefinition(e,t){t(e,"type")},__proto__:null};function aM(e,t){let n=GT.get(t);if(n)return n;let r=[],i=!0;function a(s,l){let c=e.sliceString(s.from,s.to);r.push({label:c,type:l})}return t.cursor(wt.IncludeAnonymous).iterate(s=>{if(i)i=!1;else if(s.name){let l=C8[s.name];if(l&&l(s,a)||iM.has(s.name))return!1}else if(s.to-s.from>8192){for(let l of aM(e,s.node))r.push(l);return!1}}),GT.set(t,r),r}var KT=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,sM=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function E8(e){let t=Ln(e.state).resolveInner(e.pos,-1);if(sM.indexOf(t.name)>-1)return null;let n=t.name=="VariableName"||t.to-t.from<20&&KT.test(e.state.sliceDoc(t.from,t.to));if(!n&&!e.explicit)return null;let r=[];for(let i=t;i;i=i.parent)iM.has(i.name)&&(r=r.concat(aM(e.state.doc,i)));return{options:r,from:n?t.from:e.pos,validFor:KT}}var Hi=bp.define({name:"javascript",parser:k8.configure({props:[qd.add({IfStatement:Il({except:/^\s*({|else\b)/}),TryStatement:Il({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:U6,SwitchBody:e=>{let t=e.textAfter,n=/^\s*\}/.test(t),r=/^\s*(case|default)\b/.test(t);return e.baseIndent+(n?0:r?1:2)*e.unit},Block:B6({closing:"}"}),ArrowFunction:e=>e.baseIndent+e.unit,"TemplateString BlockComment":()=>null,"Statement Property":Il({except:/^\s*{/}),JSXElement(e){let t=/^\s*<\//.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},JSXEscape(e){let t=/\s*\}/.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},"JSXOpenTag JSXSelfClosingTag"(e){return e.column(e.node.from)+e.unit}}),fc.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":Dx,BlockComment(e){return{from:e.from+2,to:e.to-2}},JSXElement(e){let t=e.firstChild;if(!t||t.name=="JSXSelfClosingTag")return null;let n=e.lastChild;return{from:t.to,to:n.type.isError?e.to:n.from}},"JSXSelfClosingTag JSXOpenTag"(e){var t;let n=(t=e.firstChild)===null||t===void 0?void 0:t.nextSibling,r=e.lastChild;return!n||n.type.isError?null:{from:n.to,to:r.type.isError?e.to:r.from}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),oM={test:e=>/^JSX/.test(e.name),facet:Rx({commentTokens:{block:{open:"{/*",close:"*/}"}}})},lM=Hi.configure({dialect:"ts"},"typescript"),cM=Hi.configure({dialect:"jsx",props:[Mx.add(e=>e.isTop?[oM]:void 0)]}),uM=Hi.configure({dialect:"jsx ts",props:[Mx.add(e=>e.isTop?[oM]:void 0)]},"typescript"),dM=e=>({label:e,type:"keyword"}),fM="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(dM),A8=fM.concat(["declare","implements","private","protected","public"].map(dM));function Q8(e={}){let t=e.jsx?e.typescript?uM:cM:e.typescript?lM:Hi,n=e.typescript?j8.concat(A8):rM.concat(fM);return new ec(t,[Hi.data.of({autocomplete:A7(sM,E7(n))}),Hi.data.of({autocomplete:E8}),e.jsx?R8:[]])}function P8(e){for(;;){if(e.name=="JSXOpenTag"||e.name=="JSXSelfClosingTag"||e.name=="JSXFragmentTag")return e;if(e.name=="JSXEscape"||!e.parent)return null;e=e.parent}}function JT(e,t,n=e.length){for(let r=t==null?void 0:t.firstChild;r;r=r.nextSibling)if(r.name=="JSXIdentifier"||r.name=="JSXBuiltin"||r.name=="JSXNamespacedName"||r.name=="JSXMemberExpression")return e.sliceString(r.from,Math.min(r.to,n));return""}var N8=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),R8=$e.inputHandler.of((e,t,n,r,i)=>{if((N8?e.composing:e.compositionStarted)||e.state.readOnly||t!=n||r!=">"&&r!="/"||!Hi.isActiveAt(e.state,t,-1))return!1;let a=i(),{state:s}=a,l=s.changeByRange(c=>{var d;let{head:f}=c,m=Ln(s).resolveInner(f-1,-1),p;if(m.name=="JSXStartTag"&&(m=m.parent),!(s.doc.sliceString(f-1,f)!=r||m.name=="JSXAttributeValue"&&m.to>f)){if(r==">"&&m.name=="JSXFragmentTag")return{range:c,changes:{from:f,insert:"</>"}};if(r=="/"&&m.name=="JSXStartCloseTag"){let O=m.parent,b=O.parent;if(b&&O.from==f-2&&((p=JT(s.doc,b.firstChild,f))||((d=b.firstChild)===null||d===void 0?void 0:d.name)=="JSXFragmentTag")){let x=`${p}>`;return{range:Ae.cursor(f+x.length,-1),changes:{from:f,insert:x}}}}else if(r==">"){let O=P8(m);if(O&&O.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(s.doc.sliceString(f,f+2))&&(p=JT(s.doc,O,f)))return{range:c,changes:{from:f,insert:`</${p}>`}}}}return{range:c}});return l.changes.empty?!1:(e.dispatch([a,s.update(l,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),Ou=["_blank","_self","_top","_parent"],GO=["ascii","utf-8","utf-16","latin1","latin1"],KO=["get","post","put","delete"],JO=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],Nr=["true","false"],Ne={},M8={a:{attrs:{href:null,ping:null,type:null,media:null,target:Ou,hreflang:null}},abbr:Ne,address:Ne,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:Ne,aside:Ne,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:Ne,base:{attrs:{href:null,target:Ou}},bdi:Ne,bdo:Ne,blockquote:{attrs:{cite:null}},body:Ne,br:Ne,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:JO,formmethod:KO,formnovalidate:["novalidate"],formtarget:Ou,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:Ne,center:Ne,cite:Ne,code:Ne,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:Ne,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:Ne,div:Ne,dl:Ne,dt:Ne,em:Ne,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:Ne,figure:Ne,footer:Ne,form:{attrs:{action:null,name:null,"accept-charset":GO,autocomplete:["on","off"],enctype:JO,method:KO,novalidate:["novalidate"],target:Ou}},h1:Ne,h2:Ne,h3:Ne,h4:Ne,h5:Ne,h6:Ne,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:Ne,hgroup:Ne,hr:Ne,html:{attrs:{manifest:null}},i:Ne,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:JO,formmethod:KO,formnovalidate:["novalidate"],formtarget:Ou,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:Ne,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:Ne,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:Ne,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:GO,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:Ne,noscript:Ne,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:Ne,param:{attrs:{name:null,value:null}},pre:Ne,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:Ne,rt:Ne,ruby:Ne,samp:Ne,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:GO}},section:Ne,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:Ne,source:{attrs:{src:null,type:null,media:null}},span:Ne,strong:Ne,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:Ne,summary:Ne,sup:Ne,table:Ne,tbody:Ne,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:Ne,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:Ne,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:Ne,time:{attrs:{datetime:null}},title:Ne,tr:Ne,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:Ne,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:Ne},hM={accesskey:null,class:null,contenteditable:Nr,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:Nr,autocorrect:Nr,autocapitalize:Nr,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":Nr,"aria-autocomplete":["inline","list","both","none"],"aria-busy":Nr,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":Nr,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":Nr,"aria-hidden":Nr,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":Nr,"aria-multiselectable":Nr,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":Nr,"aria-relevant":null,"aria-required":Nr,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},mM="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(e=>"on"+e);for(let e of mM)hM[e]=null;var kd=class{constructor(e,t){this.tags={...M8,...e},this.globalAttrs={...hM,...t},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}};kd.default=new kd;function nc(e,t,n=e.length){if(!t)return"";let r=t.firstChild,i=r&&r.getChild("TagName");return i?e.sliceString(i.from,Math.min(i.to,n)):""}function rc(e,t=!1){for(;e;e=e.parent)if(e.name=="Element")if(t)t=!1;else return e;return null}function pM(e,t,n){let r=n.tags[nc(e,rc(t))];return(r==null?void 0:r.children)||n.allTags}function Hx(e,t){let n=[];for(let r=rc(t);r&&!r.type.isTop;r=rc(r.parent)){let i=nc(e,r);if(i&&r.lastChild.name=="CloseTag")break;i&&n.indexOf(i)<0&&(t.name=="EndTag"||t.from>=r.firstChild.to)&&n.push(i)}return n}var gM=/^[:\-\.\w\u00b7-\uffff]*$/;function eC(e,t,n,r,i){let a=/\s*>/.test(e.sliceDoc(i,i+5))?"":">",s=rc(n,n.name=="StartTag"||n.name=="TagName");return{from:r,to:i,options:pM(e.doc,s,t).map(l=>({label:l,type:"type"})).concat(Hx(e.doc,n).map((l,c)=>({label:"/"+l,apply:"/"+l+a,type:"type",boost:99-c}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function tC(e,t,n,r){let i=/\s*>/.test(e.sliceDoc(r,r+5))?"":">";return{from:n,to:r,options:Hx(e.doc,t).map((a,s)=>({label:a,apply:a+i,type:"type",boost:99-s})),validFor:gM}}function D8(e,t,n,r){let i=[],a=0;for(let s of pM(e.doc,n,t))i.push({label:"<"+s,type:"type"});for(let s of Hx(e.doc,n))i.push({label:"</"+s+">",type:"type",boost:99-a++});return{from:r,to:r,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function L8(e,t,n,r,i){let a=rc(n),s=a?t.tags[nc(e.doc,a)]:null,l=s&&s.attrs?Object.keys(s.attrs):[],c=s&&s.globalAttrs===!1?l:l.length?l.concat(t.globalAttrNames):t.globalAttrNames;return{from:r,to:i,options:c.map(d=>({label:d,type:"property"})),validFor:gM}}function z8(e,t,n,r,i){var a;let s=(a=n.parent)===null||a===void 0?void 0:a.getChild("AttributeName"),l=[],c;if(s){let d=e.sliceDoc(s.from,s.to),f=t.globalAttrs[d];if(!f){let m=rc(n),p=m?t.tags[nc(e.doc,m)]:null;f=(p==null?void 0:p.attrs)&&p.attrs[d]}if(f){let m=e.sliceDoc(r,i).toLowerCase(),p='"',O='"';/^['"]/.test(m)?(c=m[0]=='"'?/^[^"]*$/:/^[^']*$/,p="",O=e.sliceDoc(i,i+1)==m[0]?"":m[0],m=m.slice(1),r++):c=/^[^\s<>='"]*$/;for(let b of f)l.push({label:b,apply:p+b+O,type:"constant"})}}return{from:r,to:i,options:l,validFor:c}}function vM(e,t){let{state:n,pos:r}=t,i=Ln(n).resolveInner(r,-1),a=i.resolve(r);for(let s=r,l;a==i&&(l=i.childBefore(s));){let c=l.lastChild;if(!c||!c.type.isError||c.from<c.to)break;a=i=l,s=c.from}return i.name=="TagName"?i.parent&&/CloseTag$/.test(i.parent.name)?tC(n,i,i.from,r):eC(n,e,i,i.from,r):i.name=="StartTag"||i.name=="IncompleteTag"?eC(n,e,i,r,r):i.name=="StartCloseTag"||i.name=="IncompleteCloseTag"?tC(n,i,r,r):i.name=="OpenTag"||i.name=="SelfClosingTag"||i.name=="AttributeName"?L8(n,e,i,i.name=="AttributeName"?i.from:r,r):i.name=="Is"||i.name=="AttributeValue"||i.name=="UnquotedAttributeValue"?z8(n,e,i,i.name=="Is"?r:i.from,r):t.explicit&&(a.name=="Element"||a.name=="Text"||a.name=="Document")?D8(n,e,i,r):null}function $8(e){return vM(kd.default,e)}function I8(e){let{extraTags:t,extraGlobalAttributes:n}=e,r=n||t?new kd(t,n):kd.default;return i=>vM(r,i)}var q8=Hi.parser.configure({top:"SingleExpression"}),OM=[{tag:"script",attrs:e=>e.type=="text/typescript"||e.lang=="ts",parser:lM.parser},{tag:"script",attrs:e=>e.type=="text/babel"||e.type=="text/jsx",parser:cM.parser},{tag:"script",attrs:e=>e.type=="text/typescript-jsx",parser:uM.parser},{tag:"script",attrs(e){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(e.type)},parser:q8},{tag:"script",attrs(e){return!e.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(e.type)},parser:Hi.parser},{tag:"style",attrs(e){return(!e.lang||e.lang=="css")&&(!e.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(e.type))},parser:$m.parser}],bM=[{name:"style",parser:$m.parser.configure({top:"Styles"})}].concat(mM.map(e=>({name:e,parser:Hi.parser}))),yM=bp.define({name:"html",parser:fU.configure({props:[qd.add({Element(e){let t=/^(\s*)(<\/)?/.exec(e.textAfter);return e.node.to<=e.pos+t[0].length?e.continue():e.lineIndent(e.node.from)+(t[2]?0:e.unit)},"OpenTag CloseTag SelfClosingTag"(e){return e.column(e.node.from)+e.unit},Document(e){if(e.pos+/\s*/.exec(e.textAfter)[0].length<e.node.to)return e.continue();let t=null,n;for(let r=e.node;;){let i=r.lastChild;if(!i||i.name!="Element"||i.to!=r.to)break;t=r=i}return t&&!((n=t.lastChild)&&(n.name=="CloseTag"||n.name=="SelfClosingTag"))?e.lineIndent(t.from)+e.unit:null}}),fc.add({Element(e){let t=e.firstChild,n=e.lastChild;return!t||t.name!="OpenTag"?null:{from:t.to,to:n.name=="CloseTag"?n.from:e.to}}}),G6.add({"OpenTag CloseTag":e=>e.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-_"}}),pm=yM.configure({wrap:HR(OM,bM)});function X8(e={}){let t="",n;e.matchClosingTags===!1&&(t="noMatch"),e.selfClosingTags===!0&&(t=(t?t+" ":"")+"selfClosing"),(e.nestedLanguages&&e.nestedLanguages.length||e.nestedAttributes&&e.nestedAttributes.length)&&(n=HR((e.nestedLanguages||[]).concat(OM),(e.nestedAttributes||[]).concat(bM)));let r=n?yM.configure({wrap:n,dialect:t}):t?pm.configure({dialect:t}):pm;return new ec(r,[pm.data.of({autocomplete:I8(e)}),e.autoCloseTags!==!1?Z8:[],Q8().support,WU().support])}var nC=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),Z8=$e.inputHandler.of((e,t,n,r,i)=>{if(e.composing||e.state.readOnly||t!=n||r!=">"&&r!="/"||!pm.isActiveAt(e.state,t,-1))return!1;let a=i(),{state:s}=a,l=s.changeByRange(c=>{var d,f,m;let p=s.doc.sliceString(c.from-1,c.to)==r,{head:O}=c,b=Ln(s).resolveInner(O,-1),x;if(p&&r==">"&&b.name=="EndTag"){let w=b.parent;if(((f=(d=w.parent)===null||d===void 0?void 0:d.lastChild)===null||f===void 0?void 0:f.name)!="CloseTag"&&(x=nc(s.doc,w.parent,O))&&!nC.has(x)){let k=O+(s.doc.sliceString(O,O+1)===">"?1:0),T=`</${x}>`;return{range:c,changes:{from:O,to:k,insert:T}}}}else if(p&&r=="/"&&b.name=="IncompleteCloseTag"){let w=b.parent;if(b.from==O-2&&((m=w.lastChild)===null||m===void 0?void 0:m.name)!="CloseTag"&&(x=nc(s.doc,w,O))&&!nC.has(x)){let k=O+(s.doc.sliceString(O,O+1)===">"?1:0),T=`${x}>`;return{range:Ae.cursor(O+T.length,-1),changes:{from:O,to:k,insert:T}}}}return{range:c}});return l.changes.empty?!1:(e.dispatch([a,s.update(l,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),xM=Rx({commentTokens:{block:{open:"<!--",close:"-->"}}}),SM=new Ge,wM=iV.configure({props:[fc.add(e=>!e.is("Block")||e.is("Document")||a0(e)!=null||B8(e)?void 0:(t,n)=>({from:n.doc.lineAt(t.from).to,to:t.to})),SM.add(a0),qd.add({Document:()=>null}),So.add({Document:xM})]});function a0(e){let t=/^(?:ATX|Setext)Heading(\d)$/.exec(e.name);return t?+t[1]:void 0}function B8(e){return e.name=="OrderedList"||e.name=="BulletList"}function V8(e,t){let n=e;for(;;){let r=n.nextSibling,i;if(!r||(i=a0(r.type))!=null&&i<=t)break;n=r}return n.to}var U8=Y6.of((e,t,n)=>{for(let r=Ln(e).resolveInner(n,-1);r&&!(r.from<t);r=r.parent){let i=r.type.prop(SM);if(i==null)continue;let a=V8(r,i);if(a>n)return{from:n,to:a}}return null});function Gx(e){return new ai(xM,e,[],"markdown")}var Y8=Gx(wM),W8=wM.configure([pV,vV,gV,OV,{props:[fc.add({Table:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}]),Im=Gx(W8);function F8(e,t){return n=>{if(n&&e){let r=null;if(n=/\S*/.exec(n)[0],typeof e=="function"?r=e(n):r=lT.matchLanguageName(e,n,!0),r instanceof lT)return r.support?r.support.language.parser:UN.getSkippingParser(r.load());if(r)return r.parser}return t?t.parser:null}}var eb=class{constructor(e,t,n,r,i,a,s){this.node=e,this.from=t,this.to=n,this.spaceBefore=r,this.spaceAfter=i,this.type=a,this.item=s}blank(e,t=!0){let n=this.spaceBefore+(this.node.name=="Blockquote"?">":"");if(e!=null){for(;n.length<e;)n+=" ";return n}else{for(let r=this.to-this.from-n.length-this.spaceAfter.length;r>0;r--)n+=" ";return n+(t?this.spaceAfter:"")}}marker(e,t){let n=this.node.name=="OrderedList"?String(+kM(this.item,e)[2]+t):"";return this.spaceBefore+n+this.type+this.spaceAfter}};function _M(e,t){let n=[],r=[];for(let i=e;i;i=i.parent){if(i.name=="FencedCode")return r;(i.name=="ListItem"||i.name=="Blockquote")&&n.push(i)}for(let i=n.length-1;i>=0;i--){let a=n[i],s,l=t.lineAt(a.from),c=a.from-l.from;if(a.name=="Blockquote"&&(s=/^ *>( ?)/.exec(l.text.slice(c))))r.push(new eb(a,c,c+s[0].length,"",s[1],">",null));else if(a.name=="ListItem"&&a.parent.name=="OrderedList"&&(s=/^( *)\d+([.)])( *)/.exec(l.text.slice(c)))){let d=s[3],f=s[0].length;d.length>=4&&(d=d.slice(0,d.length-4),f-=4),r.push(new eb(a.parent,c,c+f,s[1],d,s[2],a))}else if(a.name=="ListItem"&&a.parent.name=="BulletList"&&(s=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(l.text.slice(c)))){let d=s[4],f=s[0].length;d.length>4&&(d=d.slice(0,d.length-4),f-=4);let m=s[2];s[3]&&(m+=s[3].replace(/[xX]/," ")),r.push(new eb(a.parent,c,c+f,s[1],d,m,a))}}return r}function kM(e,t){return/^(\s*)(\d+)(?=[.)])/.exec(t.sliceString(e.from,e.from+10))}function tb(e,t,n,r=0){for(let i=-1,a=e;;){if(a.name=="ListItem"){let l=kM(a,t),c=+l[2];if(i>=0){if(c!=i+1)return;n.push({from:a.from+l[1].length,to:a.from+l[0].length,insert:String(i+2+r)})}i=c}let s=a.nextSibling;if(!s)break;a=s}}function Kx(e,t){let n=/^[ \t]*/.exec(e)[0].length;if(!n||t.facet(FN)!=" ")return e;let r=dd(e,4,n),i="";for(let a=r;a>0;)a>=4?(i+=" ",a-=4):(i+=" ",a--);return i+e.slice(n)}var H8=(e={})=>({state:t,dispatch:n})=>{let r=Ln(t),{doc:i}=t,a=null,s=t.changeByRange(l=>{if(!l.empty||!Im.isActiveAt(t,l.from,-1)&&!Im.isActiveAt(t,l.from,1))return a={range:l};let c=l.from,d=i.lineAt(c),f=_M(r.resolveInner(c,-1),i);for(;f.length&&f[f.length-1].from>c-d.from;)f.pop();if(!f.length)return a={range:l};let m=f[f.length-1];if(m.to-m.spaceAfter.length>c-d.from)return a={range:l};let p=c>=m.to-m.spaceAfter.length&&!/\S/.test(d.text.slice(m.to));if(m.item&&p){let k=m.node.firstChild,T=m.node.getChild("ListItem","ListItem");if(k.to>=c||T&&T.to<c||d.from>0&&!/[^\s>]/.test(i.lineAt(d.from-1).text)||e.nonTightLists===!1){let j=f.length>1?f[f.length-2]:null,E,Q="";j&&j.item?(E=d.from+j.from,Q=j.marker(i,1)):E=d.from+(j?j.to:0);let P=[{from:E,to:c,insert:Q}];return m.node.name=="OrderedList"&&tb(m.item,i,P,-2),j&&j.node.name=="OrderedList"&&tb(j.item,i,P),{range:Ae.cursor(E+Q.length),changes:P}}else{let j=iC(f,t,d);return{range:Ae.cursor(c+j.length+1),changes:{from:d.from,insert:j+t.lineBreak}}}}if(m.node.name=="Blockquote"&&p&&d.from){let k=i.lineAt(d.from-1),T=/>\s*$/.exec(k.text);if(T&&T.index==m.from){let j=t.changes([{from:k.from+T.index,to:k.to},{from:d.from+m.from,to:d.to}]);return{range:l.map(j),changes:j}}}let O=[];m.node.name=="OrderedList"&&tb(m.item,i,O);let b=m.item&&m.item.from<d.from,x="";if(!b||/^[\s\d.)\-+*>]*/.exec(d.text)[0].length>=m.to)for(let k=0,T=f.length-1;k<=T;k++)x+=k==T&&!b?f[k].marker(i,1):f[k].blank(k<T?dd(d.text,4,f[k+1].from)-x.length:null);let w=c;for(;w>d.from&&/\s/.test(d.text.charAt(w-d.from-1));)w--;return x=Kx(x,t),K8(m.node,t.doc)&&(x=iC(f,t,d)+t.lineBreak+x),O.push({from:w,to:c,insert:t.lineBreak+x}),{range:Ae.cursor(w+x.length+1),changes:O}});return a?!1:(n(t.update(s,{scrollIntoView:!0,userEvent:"input"})),!0)},G8=H8();function rC(e){return e.name=="QuoteMark"||e.name=="ListMark"}function K8(e,t){if(e.name!="OrderedList"&&e.name!="BulletList")return!1;let n=e.firstChild,r=e.getChild("ListItem","ListItem");if(!r)return!1;let i=t.lineAt(n.to),a=t.lineAt(r.from),s=/^[\s>]*$/.test(i.text);return i.number+(s?0:1)<a.number}function iC(e,t,n){let r="";for(let i=0,a=e.length-2;i<=a;i++)r+=e[i].blank(i<a?dd(n.text,4,e[i+1].from)-r.length:null,i<a);return Kx(r,t)}function J8(e,t){let n=e.resolveInner(t,-1),r=t;rC(n)&&(r=n.from,n=n.parent);for(let i;i=n.childBefore(r);)if(rC(i))r=i.from;else if(i.name=="OrderedList"||i.name=="BulletList")n=i.lastChild,r=n.to;else break;return n}var eY=({state:e,dispatch:t})=>{let n=Ln(e),r=null,i=e.changeByRange(a=>{let s=a.from,{doc:l}=e;if(a.empty&&Im.isActiveAt(e,a.from)){let c=l.lineAt(s),d=_M(J8(n,s),l);if(d.length){let f=d[d.length-1],m=f.to-f.spaceAfter.length+(f.spaceAfter?1:0);if(s-c.from>m&&!/\S/.test(c.text.slice(m,s-c.from)))return{range:Ae.cursor(c.from+m),changes:{from:c.from+m,to:s}};if(s-c.from==m&&(!f.item||c.from<=f.item.from||!/\S/.test(c.text.slice(0,f.to)))){let p=c.from+f.from;if(f.item&&f.node.from<f.item.from&&/\S/.test(c.text.slice(f.from,f.to))){let O=f.blank(dd(c.text,4,f.to)-dd(c.text,4,f.from));return p==c.from&&(O=Kx(O,e)),{range:Ae.cursor(p+O.length),changes:{from:p,to:c.from+f.to,insert:O}}}if(p<s)return{range:Ae.cursor(p),changes:{from:p,to:s}}}}}return r={range:a}});return r?!1:(t(e.update(i,{scrollIntoView:!0,userEvent:"delete"})),!0)},tY=[{key:"Enter",run:G8},{key:"Backspace",run:eY}],jM=X8({matchClosingTags:!1});function nY(e={}){let{codeLanguages:t,defaultCodeLanguage:n,addKeymap:r=!0,base:{parser:i}=Y8,completeHTMLTags:a=!0,pasteURLAsLink:s=!0,htmlTagLanguage:l=jM}=e;if(!(i instanceof jR))throw new RangeError("Base parser provided to `markdown` should be a Markdown parser");let c=e.extensions?[e.extensions]:[],d=[l.support,U8],f;s&&d.push(sY),n instanceof ec?(d.push(n.support),f=n.language):n&&(f=n);let m=t||f?F8(t,f):void 0;c.push(sV({codeParser:m,htmlParser:l.language.parser})),r&&d.push($d.high(Ex.of(tY)));let p=Gx(i.configure(c));return a&&d.push(p.data.of({autocomplete:rY})),new ec(p,d)}function rY(e){let{state:t,pos:n}=e,r=/<[:\-\.\w\u00b7-\uffff]*$/.exec(t.sliceDoc(n-25,n));if(!r)return null;let i=Ln(t).resolveInner(n,-1);for(;i&&!i.type.isTop;){if(i.name=="CodeBlock"||i.name=="FencedCode"||i.name=="ProcessingInstructionBlock"||i.name=="CommentBlock"||i.name=="Link"||i.name=="Image")return null;i=i.parent}return{from:n-r[0].length,to:n,options:iY(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}var nb=null;function iY(){if(nb)return nb;let e=$8(new T7(Gt.create({extensions:jM}),0,!0));return nb=e?e.options:[]}var aY=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,sY=$e.domEventHandlers({paste:(e,t)=>{var n;let{main:r}=t.state.selection;if(r.empty)return!1;let i=(n=e.clipboardData)===null||n===void 0?void 0:n.getData("text/plain");if(!i||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(i)||(/^www\./.test(i)&&(i="https://"+i),!Im.isActiveAt(t.state,r.from,1)))return!1;let a=Ln(t.state),s=!1;return a.iterate({from:r.from,to:r.to,enter:l=>{(l.from>r.from||aY.test(l.name))&&(s=!0)},leave:l=>{l.to<r.to&&(s=!0)}}),s?!1:(t.dispatch({changes:[{from:r.from,insert:"["},{from:r.to,insert:`](${i})`}],userEvent:"input.paste",scrollIntoView:!0}),!0)}});function TM(e,t,n={}){if(!e)return!1;const{pulse:r=!1,behavior:i="smooth"}=n,a=t.querySelector(`[data-annotation-id="${CSS.escape(e)}"]`);if(!a)return!1;const s=a.closest(".semiont-browse-view__content")||a.closest(".semiont-annotate-view__content")||a.closest(".semiont-document-viewer__scrollable-body");if(s){const l=a.getBoundingClientRect(),c=s.getBoundingClientRect();if(!(l.top>=c.top&&l.bottom<=c.bottom)){const f=a.offsetTop,m=s.clientHeight,p=a.offsetHeight,O=f-m/2+p/2;s.scrollTo({top:O,behavior:i})}}return r&&(a.classList.add("annotation-pulse"),setTimeout(()=>{a.classList.remove("annotation-pulse")},2e3)),!0}function oY(e,t){if(!t.includes(`\r
|
|
130
|
-
`))return e;const n=[];for(let i=0;i<t.length-1;i++)t[i]==="\r"&&t[i+1]===`
|
|
131
|
-
`&&n.push(i);const r=i=>{let a=0,s=n.length;for(;a<s;){const l=a+s>>>1;n[l]<i?a=l+1:s=l}return i-a};return e.map(i=>({...i,start:r(i.start),end:r(i.end)}))}function lY(e){const t=zs(e),n=Mo(e),r=sc(e),i=Do(e),a=li(e),s=D0(e);return t?"Comment":n?"Highlight":r?"Assessment":i?"Tag":s?"Resolved Reference":a?"Unresolved Reference":"Annotation"}function cY(e,t){var f;const n=((f=Object.values(er).find(m=>m.matchesAnnotation(e)))==null?void 0:f.className)||"annotation-highlight",r=t?`${n} annotation-sparkle`:n,i=Mo(e),a=li(e),s=zs(e),l=sc(e),c=Do(e);let d="highlight";return s?d="comment":a?d="reference":l?d="assessment":c?d="tag":i&&(d="highlight"),{className:r,annotationType:d,annotationId:e.id,tooltip:lY(e)}}function uY(e,t){return e.filter(n=>n.annotation).sort((n,r)=>n.start-r.start).map(n=>{const r=n.annotation,i=(t==null?void 0:t.has(r.id))||!1;return{start:n.start,end:n.end,meta:cY(r,i)}})}function dY(e,t,n){return e.filter(r=>r.annotation&&li(r.annotation)).sort((r,i)=>r.end-i.end).map(r=>{const i=r.annotation,a=Aa(i.body),s=a?n==null?void 0:n(a):void 0,l=t?i.id===t:!1;return{annotationId:i.id,position:r.end,targetName:s,isGenerating:l,bodySource:a??void 0}})}function fY(e,t,n){const r=e.closest("[data-annotation-id]"),i=r==null?void 0:r.getAttribute("data-annotation-id");if(!i)return!1;const a=t.get(i);return a!=null&&a.annotation?(n.client.browse.click(Bn(i),a.annotation.motivation),!0):!1}function hY(e){const t=e.closest(".reference-preview-widget");if(!t||t.dataset.widgetGenerating==="true")return{handled:!1};const n=t.dataset.widgetAnnotationId,r=t.dataset.widgetBodySource,i=t.dataset.widgetResolved==="true";return n?i&&r?{handled:!0,action:"navigate",resourceId:r,annotationId:n}:{handled:!0,action:"browse-click",annotationId:n,motivation:t.dataset.widgetMotivation||"linking"}:{handled:!1}}function mY(e,t){e.handled&&(e.action==="navigate"&&e.resourceId?t.client.browse.navigateReference(ki(e.resourceId)):e.action==="browse-click"&&e.annotationId&&t.client.browse.click(Bn(e.annotationId),e.motivation||"linking"))}function pY(e){const t=e.closest(".reference-preview-widget");if(!t||t.dataset.widgetGenerating==="true")return{showPreview:!1,widget:null};const n=t.querySelector(".reference-indicator");return n&&(n.style.opacity="1"),t.dataset.widgetResolved==="true"&&t.dataset.widgetTargetName?{showPreview:!0,targetName:t.dataset.widgetTargetName,widget:t}:{showPreview:!1,widget:t}}function gY(e){const t=e.closest(".reference-preview-widget");if(!t)return{hidePreview:!1,widget:null};const n=t.querySelector(".reference-indicator");return n&&(n.style.opacity="0.6"),t.dataset.widgetResolved==="true"?{hidePreview:!0,widget:t}:{hidePreview:!1,widget:t}}var CM=tn.define(),EM=tn.define();function vY(e,t){const n=new ud,r=uY(e,t);for(const{start:i,end:a,meta:s}of r){const l=qt.mark({class:s.className,attributes:{"data-annotation-id":s.annotationId,"data-annotation-type":s.annotationType,title:s.tooltip}});n.add(i,a,l)}return n.finish()}function OY(){return Xs.define({create(){return qt.none},update(e,t){e=e.map(t.changes);for(const n of t.effects)n.is(CM)&&(e=vY(n.value.segments,n.value.newAnnotationIds));return e},provide:e=>$e.decorations.from(e)})}function bY(e,t,n,r){const i=new ud,a=dY(t,n,r),s=new Map;for(const l of t)l.annotation&&li(l.annotation)&&s.set(l.end,l);for(const l of a){const c=s.get(l.position);if(!(c!=null&&c.annotation))continue;const d=new t7(c.annotation,l.targetName,l.isGenerating);i.add(l.position,l.position,qt.widget({widget:d,side:1}))}return i.finish()}var yY=Xs.define({create(){return qt.none},update(e,t){e=e.map(t.changes);for(const n of t.effects)n.is(EM)&&(e=bY(n.value.content,n.value.segments,n.value.generatingReferenceId,n.value.getTargetResourceName));return e},provide:e=>$e.decorations.from(e)});function AM({content:e,segments:t=[],onChange:n,editable:r=!1,newAnnotationIds:i,hoveredAnnotationId:a,scrollToAnnotationId:s,sourceView:l=!1,showLineNumbers:c=!1,enableWidgets:d=!1,session:f,getTargetResourceName:m,generatingReferenceId:p,hoverDelayMs:O}){const b=_.useRef(null),x=_.useRef(null),w=_.useRef(e),k=oY(t,e),T=_.useRef(k),j=_.useRef(new Map),E=_.useRef(new vx),Q=_.useRef(f),P=_.useRef(m);T.current=t;const N=new Map;for(const L of t)L.annotation&&N.set(L.annotation.id,L);j.current=N,Q.current=f,P.current=m,_.useEffect(()=>{if(!b.current||x.current)return;const L=OY(),A=Gt.create({doc:e,extensions:[nY(),E.current.of(c?Rm():[]),$e.editable.of(r),$e.lineWrapping,L,d?yY:[],$e.updateListener.of(G=>{if(G.docChanged&&n){const re=G.state.doc.toString();w.current=re,n(re)}}),$e.domEventHandlers({click:(G,re)=>{const M=G.target;return Q.current&&fY(M,j.current,Q.current)?(G.preventDefault(),!0):!1}}),$e.baseTheme({"&.cm-editor":{height:"100%",outline:"none"},"&.cm-editor.cm-focused":{outline:"none"},".cm-scroller":{overflow:"visible !important",height:"auto !important"},".cm-content, .cm-gutters":{minHeight:"0 !important"},".cm-content":{padding:l?"1rem":"0",fontFamily:l?"ui-monospace, monospace":"inherit",fontSize:l?"0.875rem":"inherit",lineHeight:"1.6",whiteSpace:l?"pre-wrap":"pre",caretColor:"var(--cm-cursor-color, #000000)"},".cm-line":{padding:"0",wordBreak:l?"break-word":"normal"},".cm-gutters":{backgroundColor:"transparent",border:"none",paddingRight:"0.5rem"},".cm-lineNumbers .cm-gutterElement":{minWidth:"2rem",color:"rgb(156, 163, 175)",opacity:"0.7"}})]}),X=new $e({state:A,parent:b.current});x.current=X,w.current=e,b.current.__cmView=X;const Z=X.dom,{handleMouseEnter:V,handleMouseLeave:$,cleanup:W}=H0(G=>{var re;return(re=Q.current)==null?void 0:re.client.beckon.hover(G)},O),I=G=>{const M=G.target.closest("[data-annotation-id]"),he=M==null?void 0:M.getAttribute("data-annotation-id");he&&V(Bn(he))},z=G=>{G.target.closest("[data-annotation-id]")&&$()},ee=G=>{const re=G.target,M=hY(re);M.handled&&(G.preventDefault(),G.stopPropagation(),Q.current&&mY(M,Q.current))},le=G=>{const re=G.target,M=pY(re);M.showPreview&&M.targetName&&M.widget&&n7(M.widget,M.targetName)},q=G=>{const re=G.target,M=gY(re);M.hidePreview&&M.widget&&r7(M.widget)};return Z.addEventListener("mouseover",I),Z.addEventListener("mouseout",z),Z.addEventListener("click",ee),Z.addEventListener("mouseenter",le,!0),Z.addEventListener("mouseleave",q,!0),()=>{Z.removeEventListener("mouseover",I),Z.removeEventListener("mouseout",z),Z.removeEventListener("click",ee),Z.removeEventListener("mouseenter",le,!0),Z.removeEventListener("mouseleave",q,!0),W(),X.destroy(),x.current=null}},[O]),_.useEffect(()=>{if(!x.current)return;const L=x.current.state.doc.toString();if(e===L)return;const A=x.current.state.selection.main;x.current.dispatch({changes:{from:0,to:x.current.state.doc.length,insert:e},selection:A.from<=e.length?A:void 0}),w.current=e},[e]),_.useEffect(()=>{x.current&&x.current.dispatch({effects:E.current.reconfigure(c?Rm():[])})},[c]),_.useEffect(()=>{x.current&&x.current.dispatch({effects:CM.of({segments:k,...i&&{newAnnotationIds:i}})})},[k,i]),_.useEffect(()=>{!x.current||!d||x.current.dispatch({effects:EM.of({content:e,segments:k,generatingReferenceId:p,getTargetResourceName:P.current})})},[e,k,d,p]),_.useEffect(()=>{if(!x.current||!a)return;const A=x.current.contentDOM.querySelector(`[data-annotation-id="${CSS.escape(a)}"]`);if(!A)return;const X=A.closest(".semiont-annotate-view__content")||A.closest(".semiont-document-viewer__scrollable-body");if(X){const V=A.getBoundingClientRect(),$=X.getBoundingClientRect();if(!(V.top>=$.top&&V.bottom<=$.bottom)){const I=A.offsetTop,z=X.clientHeight,ee=A.offsetHeight,le=I-z/2+ee/2;X.scrollTo({top:le,behavior:"smooth"})}}const Z=setTimeout(()=>{A.classList.add("annotation-pulse")},100);return()=>{clearTimeout(Z),A.classList.remove("annotation-pulse")}},[a]),_.useEffect(()=>{!x.current||!s||TM(s,x.current.contentDOM)},[s]);const D=l?"semiont-codemirror semiont-codemirror--source":"semiont-codemirror";return g.jsx("div",{ref:b,className:D,"data-markdown-container":!0})}function xY({progress:e,annotationType:t="reference"}){const n=cn("ReferencesPanel"),r=De(at().activeSession$),i=()=>{r==null||r.client.job.cancelRequest("annotation")};return e?g.jsxs("div",{className:"semiont-annotation-progress","data-status":e.stage,"data-type":t,children:[g.jsxs("div",{className:"semiont-annotation-header",children:[g.jsxs("h3",{className:"semiont-annotation-title",children:[g.jsx("span",{className:"semiont-annotation-sparkle",children:"✨"}),n("annotationProgressTitle")]}),e.stage!=="complete"&&g.jsx("button",{onClick:i,className:"semiont-annotation-cancel",title:n("cancelAnnotation"),children:"✕"})]}),e.requestParams&&e.requestParams.length>0&&g.jsxs("div",{className:"semiont-annotation-progress__params",children:[g.jsx("div",{className:"semiont-annotation-progress__params-title",children:"Request Parameters:"}),e.requestParams.map((a,s)=>g.jsxs("div",{className:"semiont-annotation-progress__param",children:[g.jsxs("span",{className:"semiont-annotation-progress__param-label",children:[a.label,":"]})," ",a.value]},s))]}),e.completedEntityTypes&&e.completedEntityTypes.length>0&&g.jsx("div",{className:"semiont-annotation-log",children:e.completedEntityTypes.map((a,s)=>g.jsxs("div",{className:"semiont-annotation-log-item",children:[g.jsx("span",{className:"semiont-annotation-check",children:"✓"}),g.jsxs("span",{className:"semiont-annotation-entity-type",children:[a.entityType,":"]}),g.jsx("span",{children:n("found",{count:a.foundCount})})]},s))}),g.jsxs("div",{className:"semiont-annotation-progress__status",children:[e.stage==="complete"?g.jsxs("div",{className:"semiont-annotation-progress__message",children:[g.jsx("span",{className:"semiont-annotation-progress__icon",children:"✅"}),g.jsx("span",{children:n("complete")})]}):e.stage==="error"?g.jsxs("div",{className:"semiont-annotation-progress__message",children:[g.jsx("span",{className:"semiont-annotation-progress__icon",children:"❌"}),g.jsx("span",{children:e.message||n("failed")})]}):g.jsxs("div",{className:"semiont-annotation-progress__message",children:[g.jsx("span",{className:"semiont-annotation-progress__icon",children:"✨"}),g.jsx("span",{children:e.message||(e.currentEntityType?n("current",{entityType:e.currentEntityType}):n("annotating"))})]}),e.currentEntityType&&e.stage!=="complete"&&e.stage!=="error"&&g.jsxs("div",{className:"semiont-annotation-progress__details",children:["Processing: ",e.currentEntityType]})]})]}):null}var SY=class extends _.Component{constructor(t){super(t);pe(this,"handleReset",()=>{this.setState({hasError:!1,error:null,errorInfo:null})});this.state={hasError:!1,error:null,errorInfo:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t,errorInfo:null}}componentDidCatch(t,n){this.props.onError&&this.props.onError(t,n),this.setState({errorInfo:n})}render(){return this.state.hasError&&this.state.error?this.props.fallback?this.props.fallback(this.state.error,this.handleReset):g.jsx(wY,{error:this.state.error,reset:this.handleReset}):this.props.children}};function wY({error:e,reset:t}){return g.jsx("div",{className:"semiont-error-boundary-container",children:g.jsxs("div",{className:"semiont-error-boundary-content",children:[g.jsxs("div",{className:"semiont-error-boundary-header",children:[g.jsx("h2",{className:"semiont-error-boundary-title",children:"Oops! Something went wrong"}),g.jsx("p",{className:"semiont-error-boundary-message",children:"We encountered an unexpected error. Please try again."})]}),!1,g.jsxs("div",{className:"semiont-error-boundary-actions",children:[g.jsx("button",{onClick:t,className:"semiont-button","data-variant":"primary",children:"Try Again"}),g.jsx("button",{onClick:()=>window.location.href="/",className:"semiont-button","data-variant":"secondary",children:"Go Home"})]})]})})}function _Y({children:e,resetKeys:t}){return g.jsx(AZ,{FallbackComponent:kY,onError:(n,r)=>{},...t&&{resetKeys:t},children:e})}function kY({error:e,resetErrorBoundary:t}){return g.jsx("div",{className:"min-h-[400px] flex items-center justify-center p-4",children:g.jsxs("div",{className:"max-w-md w-full bg-white dark:bg-gray-800 rounded-lg shadow-lg p-6",children:[g.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[g.jsx("div",{className:"flex-shrink-0 w-10 h-10 bg-red-100 dark:bg-red-900/30 rounded-full flex items-center justify-center",children:g.jsx("svg",{className:"w-6 h-6 text-red-600 dark:text-red-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),g.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:"Something went wrong"})]}),g.jsx("p",{className:"text-gray-600 dark:text-gray-300 mb-6",children:"An unexpected error occurred. Try again, or refresh the page."}),!1,g.jsxs("div",{className:"flex gap-3",children:[g.jsx("button",{onClick:t,className:"flex-1 px-4 py-2 text-gray-700 dark:text-gray-200 border border-gray-300 dark:border-gray-600 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:"Try Again"}),g.jsx("button",{onClick:()=>window.location.reload(),className:"flex-1 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors",children:"Refresh Page"})]})]})})}function jY({onResize:e,minWidth:t,maxWidth:n,position:r="left",ariaLabel:i="Resize panel"}){const[a,s]=_.useState(!1),l=_.useRef(0),c=_.useRef(0),d=_.useRef(e);_.useEffect(()=>{d.current=e});const f=_.useCallback(b=>{b.preventDefault(),s(!0),l.current=b.clientX;const x=b.target.parentElement;x&&(c.current=x.offsetWidth)},[]),m=_.useCallback(b=>{if(!a)return;const x=b.clientX-l.current,w=r==="left"?-x:x,k=c.current+w,T=Math.max(t,Math.min(n,k));d.current(T)},[a,t,n,r]),p=_.useCallback(()=>{s(!1)},[]),O=_.useCallback(b=>{const x=b.target.parentElement;if(!x)return;const w=x.offsetWidth,k=b.shiftKey?50:10;let T=w;if(r==="left"?b.key==="ArrowLeft"?(T=w+k,b.preventDefault()):b.key==="ArrowRight"&&(T=w-k,b.preventDefault()):b.key==="ArrowRight"?(T=w+k,b.preventDefault()):b.key==="ArrowLeft"&&(T=w-k,b.preventDefault()),T!==w){const j=Math.max(t,Math.min(n,T));d.current(j)}},[t,n,r]);return _.useEffect(()=>{if(a)return document.addEventListener("mousemove",m),document.addEventListener("mouseup",p),document.body.style.userSelect="none",document.body.style.cursor="col-resize",()=>{document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",p),document.body.style.userSelect="",document.body.style.cursor=""}},[a,m,p]),g.jsx("button",{type:"button",className:`semiont-resize-handle semiont-resize-handle--${r} ${a?"semiont-resize-handle--dragging":""}`,onMouseDown:f,onKeyDown:O,"aria-label":i,role:"separator","aria-orientation":"vertical",tabIndex:0})}function QM({context:e,activePanel:t,isArchived:n=!1}){const r=cn("Toolbar"),i=at(),a=s=>{i.emit("panel:toggle",{panel:s})};return g.jsxs("div",{className:"semiont-toolbar","data-context":e,children:[e==="document"&&g.jsxs(g.Fragment,{children:[!n&&g.jsx("button",{onClick:()=>a("annotations"),className:"semiont-toolbar-button","data-active":t==="annotations","data-panel":"annotations","aria-label":r("annotations"),"aria-pressed":t==="annotations",title:r("annotations"),children:g.jsx("span",{className:"semiont-toolbar-icon semiont-toolbar-icon-large","aria-hidden":"true",children:"A"})}),g.jsx("button",{onClick:()=>a("info"),className:"semiont-toolbar-button","data-active":t==="info","data-panel":"info","aria-label":r("resourceInfo"),"aria-pressed":t==="info",title:r("resourceInfo"),children:g.jsx("span",{className:"semiont-toolbar-icon","aria-hidden":"true",children:"ℹ️"})}),g.jsx("button",{onClick:()=>a("history"),className:"semiont-toolbar-button","data-active":t==="history","data-panel":"history","aria-label":r("history"),"aria-pressed":t==="history",title:r("history"),children:g.jsx("span",{className:"semiont-toolbar-icon","aria-hidden":"true",children:"📒"})}),g.jsx("button",{onClick:()=>a("jsonld"),className:"semiont-toolbar-button","data-active":t==="jsonld","data-panel":"jsonld","aria-label":"JSON-LD","aria-pressed":t==="jsonld",title:"JSON-LD",children:g.jsx("span",{className:"semiont-toolbar-icon","aria-hidden":"true",children:"🌐"})}),g.jsx("button",{onClick:()=>a("collaboration"),className:"semiont-toolbar-button","data-active":t==="collaboration","data-panel":"collaboration","aria-label":r("collaboration"),"aria-pressed":t==="collaboration",title:r("collaboration"),children:g.jsx("span",{className:"semiont-toolbar-icon","aria-hidden":"true",children:"👥"})})]}),g.jsx("button",{onClick:()=>a("knowledge-base"),className:"semiont-toolbar-button","data-active":t==="knowledge-base","data-panel":"knowledge-base","aria-label":r("knowledgeBase"),"aria-pressed":t==="knowledge-base",title:r("knowledgeBase"),children:g.jsx("svg",{className:"semiont-toolbar-icon","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",width:"20",height:"20",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M20.25 6.375c0 2.278-3.694 4.125-8.25 4.125S3.75 8.653 3.75 6.375m16.5 0c0-2.278-3.694-4.125-8.25-4.125S3.75 4.097 3.75 6.375m16.5 0v11.25c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125V6.375m16.5 5.625c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125"})})}),g.jsx("button",{onClick:()=>a("user"),className:"semiont-toolbar-button","data-active":t==="user","data-panel":"user","aria-label":r("userAccount"),"aria-pressed":t==="user",title:r("userAccount"),children:g.jsx("span",{className:"semiont-toolbar-icon","aria-hidden":"true",children:"👤"})}),g.jsx("button",{onClick:()=>a("settings"),className:"semiont-toolbar-button","data-active":t==="settings","data-panel":"settings","aria-label":r("settings"),"aria-pressed":t==="settings",title:r("settings"),children:g.jsx("span",{className:"semiont-toolbar-icon","aria-hidden":"true",children:"⚙️"})})]})}function rse({showLineNumbers:e,theme:t,locale:n,isPendingLocaleChange:r=!1,hoverDelayMs:i}){const a=cn("Settings"),s=at(),{announceLanguageChanging:l,announceLanguageChanged:c}=j7(),[d,f]=ue.useState(n),m=p=>{var b;const O=((b=Nl.find(x=>x.code===p))==null?void 0:b.nativeName)||p;l(O),s.emit("settings:locale-changed",{locale:p})};return _.useEffect(()=>{var p;if(n!==d&&!r){const O=((p=Nl.find(b=>b.code===n))==null?void 0:p.nativeName)||n;c(O),f(n)}},[n,d,r]),g.jsxs("div",{className:"semiont-settings-panel",children:[g.jsx("h3",{className:"semiont-settings-panel__title",children:a("title")}),g.jsxs("div",{className:"semiont-settings-panel__content",children:[g.jsxs("div",{className:"semiont-settings-panel__field",children:[g.jsxs("label",{className:"semiont-toggle-label",children:[g.jsx("span",{className:"semiont-toggle-label__text",children:a("lineNumbers")}),g.jsx("button",{type:"button",role:"switch","aria-checked":e,onClick:()=>s.emit("settings:line-numbers-toggled",void 0),className:`semiont-toggle ${e?"semiont-toggle--active":""}`,children:g.jsx("span",{className:`semiont-toggle__slider ${e?"semiont-toggle__slider--active":""}`})})]}),g.jsx("p",{className:"semiont-form__help",children:a(e?"lineNumbersVisible":"lineNumbersHidden")})]}),g.jsxs("div",{className:"semiont-settings-panel__field",children:[g.jsx("label",{className:"semiont-form__label",children:a("theme")}),g.jsxs("div",{className:"semiont-settings-panel__button-group",children:[g.jsxs("button",{onClick:()=>s.emit("settings:theme-changed",{theme:"light"}),className:`semiont-panel-button ${t==="light"?"semiont-panel-button-active":""}`,"aria-pressed":t==="light",children:["☀️ ",a("themeLight")]}),g.jsxs("button",{onClick:()=>s.emit("settings:theme-changed",{theme:"dark"}),className:`semiont-panel-button ${t==="dark"?"semiont-panel-button-active":""}`,"aria-pressed":t==="dark",children:["🌙 ",a("themeDark")]}),g.jsxs("button",{onClick:()=>s.emit("settings:theme-changed",{theme:"system"}),className:`semiont-panel-button ${t==="system"?"semiont-panel-button-active":""}`,"aria-pressed":t==="system",children:["💻 ",a("themeSystem")]})]}),g.jsx("p",{className:"semiont-form__help","aria-live":"polite",children:t==="system"?a("themeSystemActive"):a("themeModeActive",{mode:t.charAt(0).toUpperCase()+t.slice(1)})})]}),g.jsxs("div",{className:"semiont-settings-panel__field",children:[g.jsx("label",{htmlFor:"language-select",className:"semiont-form__label",children:a("language")}),g.jsx("select",{id:"language-select",value:n,onChange:p=>m(p.target.value),disabled:r,className:"semiont-select","aria-busy":r,"aria-describedby":"language-hint",children:Nl.map(p=>g.jsx("option",{value:p.code,children:p.nativeName},p.code))}),g.jsx("p",{id:"language-hint",className:"semiont-form__help",children:a("languageHint")}),r&&g.jsx("p",{className:"semiont-settings-panel__loading",role:"status","aria-live":"polite",children:a("languageChanging")})]}),g.jsxs("div",{className:"semiont-settings-panel__field",children:[g.jsx("label",{htmlFor:"hover-delay-slider",className:"semiont-form__label",children:a("hoverDelay")}),g.jsx("input",{id:"hover-delay-slider",type:"range",min:"0",max:"500",step:"50",value:i,onChange:p=>s.emit("settings:hover-delay-changed",{hoverDelayMs:Number(p.target.value)}),className:"semiont-slider","aria-describedby":"hover-delay-description"}),g.jsxs("div",{className:"semiont-slider__labels",children:[g.jsx("span",{children:a("hoverDelayFast")}),g.jsx("span",{children:a("hoverDelaySlow")})]}),g.jsx("p",{id:"hover-delay-description",className:"semiont-form__help",children:a("hoverDelayDescription",{delay:i})})]})]})]})}function Ih({label:e,collapsedContent:t,expandedContent:n,isExpanded:r,onHoverChange:i,onPin:a,containerRef:s}){const l=_.useRef(null),c=d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),a())};return g.jsxs("div",{className:"semiont-dropdown-group",onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),children:[g.jsx("div",{ref:s,role:"button",tabIndex:0,"aria-haspopup":"true","aria-expanded":r,"aria-label":e,className:"semiont-dropdown-trigger",onClick:a,onKeyDown:c,children:t}),r&&g.jsx("div",{ref:l,role:"menu","aria-orientation":"vertical",className:"semiont-dropdown-menu",children:g.jsxs("div",{className:"semiont-dropdown-content",children:[g.jsx("div",{className:"semiont-dropdown-header",children:e}),n]})})]})}function Xl({selectedMotivation:e,selectedClick:t,showSelectionGroup:n=!0,showDeleteButton:r=!0,showShapeGroup:i=!1,selectedShape:a="rectangle",mediaType:s,annotateMode:l=!1,annotators:c}){var we,Ve,st,gt,Je,yn;const d=cn("AnnotateToolbar"),f=De(at().activeSession$),m=Ce=>{const ot=Object.values(c).find(ge=>ge.motivation===Ce);return(ot==null?void 0:ot.iconEmoji)||"❓"},[p,O]=_.useState(!1),[b,x]=_.useState(!1),[w,k]=_.useState(!1),[T,j]=_.useState(!1),[E,Q]=_.useState(!1),[P,N]=_.useState(!1),[D,L]=_.useState(!1),[A,X]=_.useState(!1),Z=_.useRef(null),V=_.useRef(null),$=_.useRef(null),W=_.useRef(null),I=p||b,z=w||T,ee=E||P,le=D||A;_.useEffect(()=>{const Ce=ot=>{b&&Z.current&&!Z.current.contains(ot.target)&&x(!1),T&&V.current&&!V.current.contains(ot.target)&&j(!1),P&&$.current&&!$.current.contains(ot.target)&&N(!1),A&&W.current&&!W.current.contains(ot.target)&&X(!1)};return document.addEventListener("mousedown",Ce),()=>document.removeEventListener("mousedown",Ce)},[b,T,P,A]),_.useEffect(()=>{const Ce=ot=>{ot.key==="Escape"&&(x(!1),j(!1),N(!1),X(!1))};return document.addEventListener("keydown",Ce),()=>document.removeEventListener("keydown",Ce)},[]);const q=Ce=>{Ce===null?f==null||f.client.mark.changeSelection(null):f==null||f.client.mark.changeSelection(e===Ce?null:Ce),N(!1),Q(!1)},G=Ce=>{f==null||f.client.mark.changeClick(Ce),j(!1),k(!1)},re=Ce=>{f==null||f.client.mark.changeShape(Ce),X(!1),L(!1)},M=()=>{f==null||f.client.mark.toggleMode(),x(!1),O(!1)},he=()=>{l&&M()},ye=()=>{l||M()},Oe=(Ce,ot,ge,vt,Dt=!1)=>g.jsxs("button",{role:"menuitem",onClick:Yt=>{Yt.stopPropagation(),vt()},className:"semiont-toolbar-menu-button","data-selected":ge,"data-delete":Dt,"aria-pressed":ge,"aria-label":ot,children:[g.jsx("span",{className:"semiont-toolbar-menu-icon","aria-hidden":"true",children:Ce}),g.jsx("span",{className:"semiont-toolbar-menu-label",children:ot})]}),Be=[{action:"detail",icon:"🔍",label:d("detail")},{action:"follow",icon:"➡️",label:d("follow")},{action:"jsonld",icon:"🌐",label:d("jsonld")}];r&&Be.push({action:"deleting",icon:"🗑️",label:d("deleting"),isDelete:!0});const Re=[{motivation:"linking",label:d("linking")},{motivation:"highlighting",label:d("highlighting")},{motivation:"assessing",label:d("assessing")},{motivation:"commenting",label:d("commenting")},{motivation:"tagging",label:d("tagging")}],Xe=[{shape:"rectangle",icon:"▭",label:d("rectangle")},{shape:"circle",icon:"○",label:d("circle")},{shape:"polygon",icon:"⬡",label:d("polygon")}],be=i7(s),Fe=Xe.filter(Ce=>be.includes(Ce.shape));return g.jsxs("div",{className:"semiont-annotate-toolbar",children:[g.jsx(Ih,{label:d("clickGroup"),isExpanded:z,onHoverChange:k,onPin:()=>j(!T),containerRef:V,collapsedContent:g.jsxs("div",{className:"semiont-dropdown-display","data-delete":(we=Be.find(Ce=>Ce.action===t))!=null&&we.isDelete?"true":"false",children:[g.jsx("span",{className:"semiont-dropdown-icon",children:(Ve=Be.find(Ce=>Ce.action===t))==null?void 0:Ve.icon}),g.jsx("span",{className:"semiont-dropdown-label",children:(st=Be.find(Ce=>Ce.action===t))==null?void 0:st.label})]}),expandedContent:g.jsx(g.Fragment,{children:Be.map(({action:Ce,icon:ot,label:ge,isDelete:vt})=>g.jsx(ue.Fragment,{children:Oe(ot,ge,t===Ce,()=>G(Ce),vt)},Ce))})}),g.jsx("div",{className:"semiont-toolbar-separator"}),g.jsx(Ih,{label:d("modeGroup"),isExpanded:I,onHoverChange:O,onPin:()=>x(!b),containerRef:Z,collapsedContent:g.jsxs("div",{className:"semiont-dropdown-display",children:[g.jsx("span",{className:"semiont-dropdown-icon",children:l?"✏️":"📖"}),g.jsx("span",{className:"semiont-dropdown-label",children:d(l?"annotate":"browse")})]}),expandedContent:g.jsxs(g.Fragment,{children:[Oe("📖",d("browse"),!l,he),Oe("✏️",d("annotate"),l,ye)]})}),n&&g.jsx("div",{className:"semiont-toolbar-separator"}),n&&g.jsx(Ih,{label:d("selectionGroup"),isExpanded:ee,onHoverChange:Q,onPin:()=>N(!P),containerRef:$,collapsedContent:g.jsxs("div",{className:"semiont-dropdown-display",children:[g.jsx("span",{className:"semiont-dropdown-icon",children:e?m(e):"—"}),g.jsx("span",{className:"semiont-dropdown-label",children:e?(gt=Re.find(Ce=>Ce.motivation===e))==null?void 0:gt.label:d("none")})]}),expandedContent:g.jsxs(g.Fragment,{children:[Oe("—",d("none"),e===null,()=>q(null)),Re.map(({motivation:Ce,label:ot})=>g.jsx(ue.Fragment,{children:Oe(m(Ce),ot,e===Ce,()=>q(Ce))},Ce))]})}),i&&g.jsx("div",{className:"semiont-toolbar-separator"}),i&&Fe.length>0&&g.jsx(Ih,{label:d("shapeGroup"),isExpanded:le,onHoverChange:L,onPin:()=>X(!A),containerRef:W,collapsedContent:g.jsxs("div",{className:"semiont-dropdown-display",children:[g.jsx("span",{className:"semiont-dropdown-icon",children:(Je=Fe.find(Ce=>Ce.shape===a))==null?void 0:Je.icon}),g.jsx("span",{className:"semiont-dropdown-label",children:(yn=Fe.find(Ce=>Ce.shape===a))==null?void 0:yn.label})]}),expandedContent:g.jsx(g.Fragment,{children:Fe.map(({shape:Ce,icon:ot,label:ge})=>g.jsx(ue.Fragment,{children:Oe(ot,ge,a===Ce,()=>re(Ce))},Ce))})})]})}var TY=Xo({String:B.string,Number:B.number,"True False":B.bool,PropertyName:B.propertyName,Null:B.null,", :":B.separator,"[ ]":B.squareBracket,"{ }":B.brace}),CY=xp.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:"#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O",goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",14,"["],["closedBy",8,"}",15,"]"]],propSources:[TY],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),EY=bp.define({name:"json",parser:CY.configure({props:[qd.add({Object:Il({except:/^\s*\}/}),Array:Il({except:/^\s*\]/})}),fc.add({"Object Array":Dx})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function PM(){return new ec(EY)}var AY="#e5c07b",aC="#e06c75",QY="#56b6c2",PY="#ffffff",gm="#abb2bf",s0="#7d8799",NY="#61afef",RY="#98c379",sC="#d19a66",MY="#c678dd",DY="#21252b",oC="#2c313a",lC="#282c34",rb="#353a42",LY="#3E4451",cC="#528bff",zY=$e.theme({"&":{color:gm,backgroundColor:lC},".cm-content":{caretColor:cC},".cm-cursor, .cm-dropCursor":{borderLeftColor:cC},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:LY},".cm-panels":{backgroundColor:DY,color:gm},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:lC,color:s0,border:"none"},".cm-activeLineGutter":{backgroundColor:oC},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:rb},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:rb,borderBottomColor:rb},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:oC,color:gm}}},{dark:!0}),$Y=Lx.define([{tag:B.keyword,color:MY},{tag:[B.name,B.deleted,B.character,B.propertyName,B.macroName],color:aC},{tag:[B.function(B.variableName),B.labelName],color:NY},{tag:[B.color,B.constant(B.name),B.standard(B.name)],color:sC},{tag:[B.definition(B.name),B.separator],color:gm},{tag:[B.typeName,B.className,B.number,B.changed,B.annotation,B.modifier,B.self,B.namespace],color:AY},{tag:[B.operator,B.operatorKeyword,B.url,B.escape,B.regexp,B.link,B.special(B.string)],color:QY},{tag:[B.meta,B.comment],color:s0},{tag:B.strong,fontWeight:"bold"},{tag:B.emphasis,fontStyle:"italic"},{tag:B.strikethrough,textDecoration:"line-through"},{tag:B.link,color:s0,textDecoration:"underline"},{tag:B.heading,fontWeight:"bold",color:aC},{tag:[B.atom,B.bool,B.special(B.variableName)],color:sC},{tag:[B.processingInstruction,B.string,B.inserted],color:RY},{tag:B.invalid,color:PY}]),NM=[zY,zx($Y)];function IY({annotation:e,onBack:t}){const n=_.useRef(null),r=_.useRef(null),{showLineNumbers:i}=$x(),a=_.useRef(t);_.useEffect(()=>{a.current=t}),_.useEffect(()=>{const l=c=>{c.key==="Escape"&&a.current()};return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[]),_.useEffect(()=>{if(!n.current)return;const l=document.documentElement.classList.contains("dark"),c=JSON.stringify(e,null,2),d=[PM(),$e.editable.of(!1),Gt.readOnly.of(!0)];i&&d.push(Rm()),l?d.push(NM):(d.push(GN),d.push(zx(KN)));const f=Gt.create({doc:c,extensions:d}),m=new $e({state:f,parent:n.current});return r.current=m,()=>{m.destroy(),r.current=null}},[e,i]);const s=async()=>{try{await navigator.clipboard.writeText(JSON.stringify(e,null,2))}catch(l){console.error("Failed to copy JSON-LD:",l)}};return g.jsxs("div",{className:"semiont-jsonld-view",children:[g.jsxs("div",{className:"semiont-jsonld-view__header",children:[g.jsx("button",{onClick:t,className:"semiont-jsonld-view__back-button",title:"Go back (Escape)",children:"<"}),g.jsx("h3",{className:"semiont-jsonld-view__title",children:"JSON-LD"}),g.jsx("button",{onClick:s,className:"semiont-jsonld-view__copy-button",title:"Copy to clipboard",children:"📋 Copy"})]}),g.jsx("div",{ref:n,className:"semiont-jsonld-view__editor"})]})}var qY=Object.defineProperty,XY=(e,t,n)=>t in e?qY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ib=(e,t,n)=>(XY(e,typeof t!="symbol"?t+"":t,n),n),ZY=class{constructor(){ib(this,"current",this.detect()),ib(this,"handoffState","pending"),ib(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},Gi=new ZY;function Bd(e){var t;return Gi.isServer?null:e==null?document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function o0(e){var t,n;return Gi.isServer?null:e==null?document:(n=(t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))!=null?n:document}function RM(e){var t,n;return(n=(t=o0(e))==null?void 0:t.activeElement)!=null?n:null}function BY(e){return RM(e)===e}function Sp(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function za(){let e=[],t={addEventListener(n,r,i,a){return n.addEventListener(r,i,a),t.add(()=>n.removeEventListener(r,i,a))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return Sp(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,i){let a=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:i}),this.add(()=>{Object.assign(n.style,{[r]:a})})},group(n){let r=za();return n(r),this.add(()=>r.dispose())},add(n){return e.includes(n)||e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let i of e.splice(r,1))i()}},dispose(){for(let n of e.splice(0))n()}};return t}function wp(){let[e]=_.useState(za);return _.useEffect(()=>()=>e.dispose(),[e]),e}var pr=(e,t)=>{Gi.isServer?_.useEffect(e,t):_.useLayoutEffect(e,t)};function Zo(e){let t=_.useRef(e);return pr(()=>{t.current=e},[e]),t}var Rt=function(e){let t=Zo(e);return ue.useCallback((...n)=>t.current(...n),[t])};function Vd(e){return _.useMemo(()=>e,Object.values(e))}var VY=_.createContext(void 0);function UY(){return _.useContext(VY)}function l0(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function Ra(e,t,...n){if(e in t){let i=t[e];return typeof i=="function"?i(...n):i}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(i=>`"${i}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Ra),r}var qm=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(qm||{}),Ts=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Ts||{});function hi(){let e=WY();return _.useCallback(t=>YY({mergeRefs:e,...t}),[e])}function YY({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:a=!0,name:s,mergeRefs:l}){l=l??FY;let c=MM(t,e);if(a)return qh(c,n,r,s,l);let d=i??0;if(d&2){let{static:f=!1,...m}=c;if(f)return qh(m,n,r,s,l)}if(d&1){let{unmount:f=!0,...m}=c;return Ra(f?0:1,{0(){return null},1(){return qh({...m,hidden:!0,style:{display:"none"}},n,r,s,l)}})}return qh(c,n,r,s,l)}function qh(e,t={},n,r,i){let{as:a=n,children:s,refName:l="ref",...c}=ab(e,["unmount","static"]),d=e.ref!==void 0?{[l]:e.ref}:{},f=typeof s=="function"?s(t):s;"className"in c&&c.className&&typeof c.className=="function"&&(c.className=c.className(t)),c["aria-labelledby"]&&c["aria-labelledby"]===c.id&&(c["aria-labelledby"]=void 0);let m={};if(t){let p=!1,O=[];for(let[b,x]of Object.entries(t))typeof x=="boolean"&&(p=!0),x===!0&&O.push(b.replace(/([A-Z])/g,w=>`-${w.toLowerCase()}`));if(p){m["data-headlessui-state"]=O.join(" ");for(let b of O)m[`data-${b}`]=""}}if(Vu(a)&&(Object.keys(po(c)).length>0||Object.keys(po(m)).length>0))if(!_.isValidElement(f)||Array.isArray(f)&&f.length>1||GY(f)){if(Object.keys(po(c)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(po(c)).concat(Object.keys(po(m))).map(p=>` - ${p}`).join(`
|
|
132
|
-
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(p=>` - ${p}`).join(`
|
|
133
|
-
`)].join(`
|
|
134
|
-
`))}else{let p=f.props,O=p==null?void 0:p.className,b=typeof O=="function"?(...k)=>l0(O(...k),c.className):l0(O,c.className),x=b?{className:b}:{},w=MM(f.props,po(ab(c,["ref"])));for(let k in m)k in w&&delete m[k];return _.cloneElement(f,Object.assign({},w,m,d,{ref:i(HY(f),d.ref)},x))}return _.createElement(a,Object.assign({},ab(c,["ref"]),!Vu(a)&&d,!Vu(a)&&m),f)}function WY(){let e=_.useRef([]),t=_.useCallback(n=>{for(let r of e.current)r!=null&&(typeof r=="function"?r(n):r.current=n)},[]);return(...n)=>{if(!n.every(r=>r==null))return e.current=n,t}}function FY(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function MM(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let i in r)i.startsWith("on")&&typeof r[i]=="function"?(n[i]!=null||(n[i]=[]),n[i].push(r[i])):t[i]=r[i];if(t.disabled||t["aria-disabled"])for(let r in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(n[r]=[i=>{var a;return(a=i==null?void 0:i.preventDefault)==null?void 0:a.call(i)}]);for(let r in n)Object.assign(t,{[r](i,...a){let s=n[r];for(let l of s){if((i instanceof Event||(i==null?void 0:i.nativeEvent)instanceof Event)&&i.defaultPrevented)return;l(i,...a)}}});return t}function xr(e){var t;return Object.assign(_.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function po(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function ab(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function HY(e){return ue.version.split(".")[0]>="19"?e.props.ref:e.ref}function Vu(e){return e===_.Fragment||e===Symbol.for("react.fragment")}function GY(e){return Vu(e.type)}var KY="span",Xm=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Xm||{});function JY(e,t){var n;let{features:r=1,...i}=e,a={ref:t,"aria-hidden":(r&2)===2?!0:(n=i["aria-hidden"])!=null?n:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return hi()({ourProps:a,theirProps:i,slot:{},defaultTag:KY,name:"Hidden"})}var c0=xr(JY);function eW(e){return typeof e!="object"||e===null?!1:"nodeType"in e}function Qs(e){return eW(e)&&"tagName"in e}function No(e){return Qs(e)&&"accessKey"in e}function Cs(e){return Qs(e)&&"tabIndex"in e}function tW(e){return Qs(e)&&"style"in e}function nW(e){return No(e)&&e.nodeName==="IFRAME"}function rW(e){return No(e)&&e.nodeName==="INPUT"}var DM=Symbol();function iW(e,t=!0){return Object.assign(e,{[DM]:t})}function ta(...e){let t=_.useRef(e);_.useEffect(()=>{t.current=e},[e]);let n=Rt(r=>{for(let i of t.current)i!=null&&(typeof i=="function"?i(r):i.current=r)});return e.every(r=>r==null||(r==null?void 0:r[DM]))?void 0:n}var Jx=_.createContext(null);Jx.displayName="DescriptionContext";function LM(){let e=_.useContext(Jx);if(e===null){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,LM),t}return e}function aW(){let[e,t]=_.useState([]);return[e.length>0?e.join(" "):void 0,_.useMemo(()=>function(n){let r=Rt(a=>(t(s=>[...s,a]),()=>t(s=>{let l=s.slice(),c=l.indexOf(a);return c!==-1&&l.splice(c,1),l}))),i=_.useMemo(()=>({register:r,slot:n.slot,name:n.name,props:n.props,value:n.value}),[r,n.slot,n.name,n.props,n.value]);return ue.createElement(Jx.Provider,{value:i},n.children)},[t])]}var sW="p";function oW(e,t){let n=_.useId(),r=UY(),{id:i=`headlessui-description-${n}`,...a}=e,s=LM(),l=ta(t);pr(()=>s.register(i),[i,s.register]);let c=Vd({...s.slot,disabled:r||!1}),d={ref:l,...s.props,id:i};return hi()({ourProps:d,theirProps:a,slot:c,defaultTag:sW,name:s.name||"Description"})}var lW=xr(oW),cW=Object.assign(lW,{}),zM=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(zM||{}),uW=_.createContext(()=>{});function dW({value:e,children:t}){return ue.createElement(uW.Provider,{value:e},t)}var $M=class extends Map{constructor(e){super(),this.factory=e}get(e){let t=super.get(e);return t===void 0&&(t=this.factory(e),this.set(e,t)),t}},fW=Object.defineProperty,hW=(e,t,n)=>t in e?fW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,mW=(e,t,n)=>(hW(e,t+"",n),n),IM=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Kr=(e,t,n)=>(IM(e,t,"read from private field"),n?n.call(e):t.get(e)),sb=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},uC=(e,t,n,r)=>(IM(e,t,"write to private field"),t.set(e,n),n),Xi,Cu,Eu,pW=class{constructor(e){sb(this,Xi,{}),sb(this,Cu,new $M(()=>new Set)),sb(this,Eu,new Set),mW(this,"disposables",za()),uC(this,Xi,e),Gi.isServer&&this.disposables.microTask(()=>{this.dispose()})}dispose(){this.disposables.dispose()}get state(){return Kr(this,Xi)}subscribe(e,t){if(Gi.isServer)return()=>{};let n={selector:e,callback:t,current:e(Kr(this,Xi))};return Kr(this,Eu).add(n),this.disposables.add(()=>{Kr(this,Eu).delete(n)})}on(e,t){return Gi.isServer?()=>{}:(Kr(this,Cu).get(e).add(t),this.disposables.add(()=>{Kr(this,Cu).get(e).delete(t)}))}send(e){let t=this.reduce(Kr(this,Xi),e);if(t!==Kr(this,Xi)){uC(this,Xi,t);for(let n of Kr(this,Eu)){let r=n.selector(Kr(this,Xi));qM(n.current,r)||(n.current=r,n.callback(r))}for(let n of Kr(this,Cu).get(e.type))n(Kr(this,Xi),e)}}};Xi=new WeakMap,Cu=new WeakMap,Eu=new WeakMap;function qM(e,t){return Object.is(e,t)?!0:typeof e!="object"||e===null||typeof t!="object"||t===null?!1:Array.isArray(e)&&Array.isArray(t)?e.length!==t.length?!1:ob(e[Symbol.iterator](),t[Symbol.iterator]()):e instanceof Map&&t instanceof Map||e instanceof Set&&t instanceof Set?e.size!==t.size?!1:ob(e.entries(),t.entries()):dC(e)&&dC(t)?ob(Object.entries(e)[Symbol.iterator](),Object.entries(t)[Symbol.iterator]()):!1}function ob(e,t){do{let n=e.next(),r=t.next();if(n.done&&r.done)return!0;if(n.done||r.done||!Object.is(n.value,r.value))return!1}while(!0)}function dC(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let t=Object.getPrototypeOf(e);return t===null||Object.getPrototypeOf(t)===null}var gW=Object.defineProperty,vW=(e,t,n)=>t in e?gW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fC=(e,t,n)=>(vW(e,typeof t!="symbol"?t+"":t,n),n),OW=(e=>(e[e.Push=0]="Push",e[e.Pop=1]="Pop",e))(OW||{}),bW={0(e,t){let n=t.id,r=e.stack,i=e.stack.indexOf(n);if(i!==-1){let a=e.stack.slice();return a.splice(i,1),a.push(n),r=a,{...e,stack:r}}return{...e,stack:[...e.stack,n]}},1(e,t){let n=t.id,r=e.stack.indexOf(n);if(r===-1)return e;let i=e.stack.slice();return i.splice(r,1),{...e,stack:i}}},yW=class XM extends pW{constructor(){super(...arguments),fC(this,"actions",{push:t=>this.send({type:0,id:t}),pop:t=>this.send({type:1,id:t})}),fC(this,"selectors",{isTop:(t,n)=>t.stack[t.stack.length-1]===n,inStack:(t,n)=>t.stack.includes(n)})}static new(){return new XM({stack:[]})}reduce(t,n){return Ra(n.type,bW,t,n)}},ZM=new $M(()=>yW.new());function BM(e,t,n=qM){return RZ.useSyncExternalStoreWithSelector(Rt(r=>e.subscribe(xW,r)),Rt(()=>e.state),Rt(()=>e.state),Rt(t),n)}function xW(e){return e}function Ud(e,t){let n=_.useId(),r=ZM.get(t),[i,a]=BM(r,_.useCallback(s=>[r.selectors.isTop(s,n),r.selectors.inStack(s,n)],[r,n]));return pr(()=>{if(e)return r.actions.push(n),()=>r.actions.pop(n)},[r,e,n]),e?a?i:!0:!1}var u0=new Map,Uu=new Map;function hC(e){var t;let n=(t=Uu.get(e))!=null?t:0;return Uu.set(e,n+1),n!==0?()=>mC(e):(u0.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0,()=>mC(e))}function mC(e){var t;let n=(t=Uu.get(e))!=null?t:1;if(n===1?Uu.delete(e):Uu.set(e,n-1),n!==1)return;let r=u0.get(e);r&&(r["aria-hidden"]===null?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r["aria-hidden"]),e.inert=r.inert,u0.delete(e))}function SW(e,{allowed:t,disallowed:n}={}){let r=Ud(e,"inert-others");pr(()=>{var i,a;if(!r)return;let s=za();for(let c of(i=n==null?void 0:n())!=null?i:[])c&&s.add(hC(c));let l=(a=t==null?void 0:t())!=null?a:[];for(let c of l){if(!c)continue;let d=Bd(c);if(!d)continue;let f=c.parentElement;for(;f&&f!==d.body;){for(let m of f.children)l.some(p=>m.contains(p))||s.add(hC(m));f=f.parentElement}}return s.dispose},[r,t,n])}function wW(e,t,n){let r=Zo(i=>{let a=i.getBoundingClientRect();a.x===0&&a.y===0&&a.width===0&&a.height===0&&n()});_.useEffect(()=>{if(!e)return;let i=t===null?null:No(t)?t:t.current;if(!i)return;let a=za();if(typeof ResizeObserver<"u"){let s=new ResizeObserver(()=>r.current(i));s.observe(i),a.add(()=>s.disconnect())}if(typeof IntersectionObserver<"u"){let s=new IntersectionObserver(()=>r.current(i));s.observe(i),a.add(()=>s.disconnect())}return()=>a.dispose()},[t,r,e])}var Zm=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","details>summary","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(","),_W=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(","),Ta=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e[e.AutoFocus=64]="AutoFocus",e))(Ta||{}),d0=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(d0||{}),kW=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(kW||{});function jW(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Zm)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}function TW(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(_W)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var VM=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(VM||{});function CW(e,t=0){var n;return e===((n=Bd(e))==null?void 0:n.body)?!1:Ra(t,{0(){return e.matches(Zm)},1(){let r=e;for(;r!==null;){if(r.matches(Zm))return!0;r=r.parentElement}return!1}})}var EW=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(EW||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function Qa(e){e==null||e.focus({preventScroll:!0})}var AW=["textarea","input"].join(",");function QW(e){var t,n;return(n=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,AW))!=null?n:!1}function PW(e,t=n=>n){return e.slice().sort((n,r)=>{let i=t(n),a=t(r);if(i===null||a===null)return 0;let s=i.compareDocumentPosition(a);return s&Node.DOCUMENT_POSITION_FOLLOWING?-1:s&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Yu(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:i=[]}={}){let a=Array.isArray(e)?e.length>0?o0(e[0]):document:o0(e),s=Array.isArray(e)?n?PW(e):e:t&64?TW(e):jW(e);i.length>0&&s.length>1&&(s=s.filter(O=>!i.some(b=>b!=null&&"current"in b?(b==null?void 0:b.current)===O:b===O))),r=r??(a==null?void 0:a.activeElement);let l=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,s.indexOf(r))-1;if(t&4)return Math.max(0,s.indexOf(r))+1;if(t&8)return s.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),d=t&32?{preventScroll:!0}:{},f=0,m=s.length,p;do{if(f>=m||f+m<=0)return 0;let O=c+f;if(t&16)O=(O+m)%m;else{if(O<0)return 3;if(O>=m)return 1}p=s[O],p==null||p.focus(d),f+=l}while(p!==RM(p));return t&6&&QW(p)&&p.select(),2}function UM(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function NW(){return/Android/gi.test(window.navigator.userAgent)}function pC(){return UM()||NW()}function Xh(e,t,n,r){let i=Zo(n);_.useEffect(()=>{if(!e)return;function a(s){i.current(s)}return document.addEventListener(t,a,r),()=>document.removeEventListener(t,a,r)},[e,t,r])}function YM(e,t,n,r){let i=Zo(n);_.useEffect(()=>{if(!e)return;function a(s){i.current(s)}return window.addEventListener(t,a,r),()=>window.removeEventListener(t,a,r)},[e,t,r])}var gC=30;function RW(e,t,n){let r=Zo(n),i=_.useCallback(function(l,c){if(l.defaultPrevented)return;let d=c(l);if(d===null||!d.getRootNode().contains(d)||!d.isConnected)return;let f=(function m(p){return typeof p=="function"?m(p()):Array.isArray(p)||p instanceof Set?p:[p]})(t);for(let m of f)if(m!==null&&(m.contains(d)||l.composed&&l.composedPath().includes(m)))return;return!CW(d,VM.Loose)&&d.tabIndex!==-1&&l.preventDefault(),r.current(l,d)},[r,t]),a=_.useRef(null);Xh(e,"pointerdown",l=>{var c,d;pC()||(a.current=((d=(c=l.composedPath)==null?void 0:c.call(l))==null?void 0:d[0])||l.target)},!0),Xh(e,"pointerup",l=>{if(pC()||!a.current)return;let c=a.current;return a.current=null,i(l,()=>c)},!0);let s=_.useRef({x:0,y:0});Xh(e,"touchstart",l=>{s.current.x=l.touches[0].clientX,s.current.y=l.touches[0].clientY},!0),Xh(e,"touchend",l=>{let c={x:l.changedTouches[0].clientX,y:l.changedTouches[0].clientY};if(!(Math.abs(c.x-s.current.x)>=gC||Math.abs(c.y-s.current.y)>=gC))return i(l,()=>Cs(l.target)?l.target:null)},!0),YM(e,"blur",l=>i(l,()=>nW(window.document.activeElement)?window.document.activeElement:null),!0)}function eS(...e){return _.useMemo(()=>Bd(...e),[...e])}function WM(e,t,n,r){let i=Zo(n);_.useEffect(()=>{e=e??window;function a(s){i.current(s)}return e.addEventListener(t,a,r),()=>e.removeEventListener(t,a,r)},[e,t,r])}function MW(e){return _.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot)}function DW(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(i){return r.add(i),()=>r.delete(i)},dispatch(i,...a){let s=t[i].call(n,...a);s&&(n=s,r.forEach(l=>l()))}}}function LW(){let e;return{before({doc:t}){var n;let r=t.documentElement,i=(n=t.defaultView)!=null?n:window;e=Math.max(0,i.innerWidth-r.clientWidth)},after({doc:t,d:n}){let r=t.documentElement,i=Math.max(0,r.clientWidth-r.offsetWidth),a=Math.max(0,e-i);n.style(r,"paddingRight",`${a}px`)}}}function zW(){return UM()?{before({doc:e,d:t,meta:n}){function r(i){for(let a of n().containers)for(let s of a())if(s.contains(i))return!0;return!1}t.microTask(()=>{var i;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let l=za();l.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>l.dispose()))}let a=(i=window.scrollY)!=null?i:window.pageYOffset,s=null;t.addEventListener(e,"click",l=>{if(Cs(l.target))try{let c=l.target.closest("a");if(!c)return;let{hash:d}=new URL(c.href),f=e.querySelector(d);Cs(f)&&!r(f)&&(s=f)}catch{}},!0),t.group(l=>{t.addEventListener(e,"touchstart",c=>{if(l.dispose(),Cs(c.target)&&tW(c.target))if(r(c.target)){let d=c.target;for(;d.parentElement&&r(d.parentElement);)d=d.parentElement;l.style(d,"overscrollBehavior","contain")}else l.style(c.target,"touchAction","none")})}),t.addEventListener(e,"touchmove",l=>{if(Cs(l.target)){if(rW(l.target))return;if(r(l.target)){let c=l.target;for(;c.parentElement&&c.dataset.headlessuiPortal!==""&&!(c.scrollHeight>c.clientHeight||c.scrollWidth>c.clientWidth);)c=c.parentElement;c.dataset.headlessuiPortal===""&&l.preventDefault()}else l.preventDefault()}},{passive:!1}),t.add(()=>{var l;let c=(l=window.scrollY)!=null?l:window.pageYOffset;a!==c&&window.scrollTo(0,a),s&&s.isConnected&&(s.scrollIntoView({block:"nearest"}),s=null)})})}}:{}}function $W(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function vC(e){let t={};for(let n of e)Object.assign(t,n(t));return t}var wo=DW(()=>new Map,{PUSH(e,t){var n;let r=(n=this.get(e))!=null?n:{doc:e,count:0,d:za(),meta:new Set,computedMeta:{}};return r.count++,r.meta.add(t),r.computedMeta=vC(r.meta),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t),n.computedMeta=vC(n.meta)),this},SCROLL_PREVENT(e){let t={doc:e.doc,d:e.d,meta(){return e.computedMeta}},n=[zW(),LW(),$W()];n.forEach(({before:r})=>r==null?void 0:r(t)),n.forEach(({after:r})=>r==null?void 0:r(t))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});wo.subscribe(()=>{let e=wo.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let r=t.get(n.doc)==="hidden",i=n.count!==0;(i&&!r||!i&&r)&&wo.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&wo.dispatch("TEARDOWN",n)}});function IW(e,t,n=()=>({containers:[]})){let r=MW(wo),i=t?r.get(t):void 0,a=i?i.count>0:!1;return pr(()=>{if(!(!t||!e))return wo.dispatch("PUSH",t,n),()=>wo.dispatch("POP",t,n)},[e,t]),a}function qW(e,t,n=()=>[document.body]){let r=Ud(e,"scroll-lock");IW(r,t,i=>{var a;return{containers:[...(a=i.containers)!=null?a:[],n]}})}function XW(e=0){let[t,n]=_.useState(e),r=_.useCallback(c=>n(c),[]),i=_.useCallback(c=>n(d=>d|c),[]),a=_.useCallback(c=>(t&c)===c,[t]),s=_.useCallback(c=>n(d=>d&~c),[]),l=_.useCallback(c=>n(d=>d^c),[]);return{flags:t,setFlag:r,addFlag:i,hasFlag:a,removeFlag:s,toggleFlag:l}}var OC,bC;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((OC=process==null?void 0:Hb)==null?void 0:OC.NODE_ENV)==="test"&&typeof((bC=Element==null?void 0:Element.prototype)==null?void 0:bC.getAnimations)>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
|
|
135
|
-
`)),[]});var ZW=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(ZW||{});function BW(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function VW(e,t,n,r){let[i,a]=_.useState(n),{hasFlag:s,addFlag:l,removeFlag:c}=XW(e&&i?3:0),d=_.useRef(!1),f=_.useRef(!1),m=wp();return pr(()=>{var p;if(e){if(n&&a(!0),!t){n&&l(3);return}return(p=r==null?void 0:r.start)==null||p.call(r,n),UW(t,{inFlight:d,prepare(){f.current?f.current=!1:f.current=d.current,d.current=!0,!f.current&&(n?(l(3),c(4)):(l(4),c(2)))},run(){f.current?n?(c(3),l(4)):(c(4),l(3)):n?c(1):l(1)},done(){var O;f.current&&FW(t)||(d.current=!1,c(7),n||a(!1),(O=r==null?void 0:r.end)==null||O.call(r,n))}})}},[e,n,t,m]),e?[i,{closed:s(1),enter:s(2),leave:s(4),transition:s(2)||s(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function UW(e,{prepare:t,run:n,done:r,inFlight:i}){let a=za();return WW(e,{prepare:t,inFlight:i}),a.nextFrame(()=>{n(),a.requestAnimationFrame(()=>{a.add(YW(e,r))})}),a.dispose}function YW(e,t){var n,r;let i=za();if(!e)return i.dispose;let a=!1;i.add(()=>{a=!0});let s=(r=(n=e.getAnimations)==null?void 0:n.call(e).filter(l=>l instanceof CSSTransition))!=null?r:[];return s.length===0?(t(),i.dispose):(Promise.allSettled(s.map(l=>l.finished)).then(()=>{a||t()}),i.dispose)}function WW(e,{inFlight:t,prepare:n}){if(t!=null&&t.current){n();return}let r=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=r}function FW(e){var t,n;return((n=(t=e.getAnimations)==null?void 0:t.call(e))!=null?n:[]).some(r=>r instanceof CSSTransition&&r.playState!=="finished")}function tS(e,t){let n=_.useRef([]),r=Rt(e);_.useEffect(()=>{let i=[...n.current];for(let[a,s]of t.entries())if(n.current[a]!==s){let l=r(t,i);return n.current=t,l}},[r,...t])}var _p=_.createContext(null);_p.displayName="OpenClosedContext";var _i=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(_i||{});function kp(){return _.useContext(_p)}function HW({value:e,children:t}){return ue.createElement(_p.Provider,{value:e},t)}function GW({children:e}){return ue.createElement(_p.Provider,{value:null},e)}function KW(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}var Ss=[];KW(()=>{function e(t){if(!Cs(t.target)||t.target===document.body||Ss[0]===t.target)return;let n=t.target;n=n.closest(Zm),Ss.unshift(n??t.target),Ss=Ss.filter(r=>r!=null&&r.isConnected),Ss.splice(10)}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function FM(e){let t=Rt(e),n=_.useRef(!1);_.useEffect(()=>(n.current=!1,()=>{n.current=!0,Sp(()=>{n.current&&t()})}),[t])}var HM=_.createContext(!1);function JW(){return _.useContext(HM)}function yC(e){return ue.createElement(HM.Provider,{value:e.force},e.children)}function eF(e){let t=JW(),n=_.useContext(KM),[r,i]=_.useState(()=>{var a;if(!t&&n!==null)return(a=n.current)!=null?a:null;if(Gi.isServer)return null;let s=e==null?void 0:e.getElementById("headlessui-portal-root");if(s)return s;if(e===null)return null;let l=e.createElement("div");return l.setAttribute("id","headlessui-portal-root"),e.body.appendChild(l)});return _.useEffect(()=>{r!==null&&(e!=null&&e.body.contains(r)||e==null||e.body.appendChild(r))},[r,e]),_.useEffect(()=>{t||n!==null&&i(n.current)},[n,i,t]),r}var GM=_.Fragment,tF=xr(function(e,t){let{ownerDocument:n=null,...r}=e,i=_.useRef(null),a=ta(iW(p=>{i.current=p}),t),s=eS(i.current),l=n??s,c=eF(l),d=_.useContext(f0),f=wp(),m=hi();return FM(()=>{var p;c&&c.childNodes.length<=0&&((p=c.parentElement)==null||p.removeChild(c))}),c?yo.createPortal(ue.createElement("div",{"data-headlessui-portal":"",ref:p=>{f.dispose(),d&&p&&f.add(d.register(p))}},m({ourProps:{ref:a},theirProps:r,slot:{},defaultTag:GM,name:"Portal"})),c):null});function nF(e,t){let n=ta(t),{enabled:r=!0,ownerDocument:i,...a}=e,s=hi();return r?ue.createElement(tF,{...a,ownerDocument:i,ref:n}):s({ourProps:{ref:n},theirProps:a,slot:{},defaultTag:GM,name:"Portal"})}var rF=_.Fragment,KM=_.createContext(null);function iF(e,t){let{target:n,...r}=e,i={ref:ta(t)},a=hi();return ue.createElement(KM.Provider,{value:n},a({ourProps:i,theirProps:r,defaultTag:rF,name:"Popover.Group"}))}var f0=_.createContext(null);function aF(){let e=_.useContext(f0),t=_.useRef([]),n=Rt(a=>(t.current.push(a),e&&e.register(a),()=>r(a))),r=Rt(a=>{let s=t.current.indexOf(a);s!==-1&&t.current.splice(s,1),e&&e.unregister(a)}),i=_.useMemo(()=>({register:n,unregister:r,portals:t}),[n,r,t]);return[t,_.useMemo(()=>function({children:a}){return ue.createElement(f0.Provider,{value:i},a)},[i])]}var sF=xr(nF),JM=xr(iF),oF=Object.assign(sF,{Group:JM});function lF(e,t=typeof document<"u"?document.defaultView:null,n){let r=Ud(e,"escape");WM(t,"keydown",i=>{r&&(i.defaultPrevented||i.key===zM.Escape&&n(i))})}function cF(){var e;let[t]=_.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(pointer: coarse)"):null),[n,r]=_.useState((e=t==null?void 0:t.matches)!=null?e:!1);return pr(()=>{if(!t)return;function i(a){r(a.matches)}return t.addEventListener("change",i),()=>t.removeEventListener("change",i)},[t]),n}function uF({defaultContainers:e=[],portals:t,mainTreeNode:n}={}){let r=Rt(()=>{var i,a;let s=Bd(n),l=[];for(let c of e)c!==null&&(Qs(c)?l.push(c):"current"in c&&Qs(c.current)&&l.push(c.current));if(t!=null&&t.current)for(let c of t.current)l.push(c);for(let c of(i=s==null?void 0:s.querySelectorAll("html > *, body > *"))!=null?i:[])c!==document.body&&c!==document.head&&Qs(c)&&c.id!=="headlessui-portal-root"&&(n&&(c.contains(n)||c.contains((a=n==null?void 0:n.getRootNode())==null?void 0:a.host))||l.some(d=>c.contains(d))||l.push(c));return l});return{resolveContainers:r,contains:Rt(i=>r().some(a=>a.contains(i)))}}var e5=_.createContext(null);function xC({children:e,node:t}){let[n,r]=_.useState(null),i=t5(t??n);return ue.createElement(e5.Provider,{value:i},e,i===null&&ue.createElement(c0,{features:Xm.Hidden,ref:a=>{var s,l;if(a){for(let c of(l=(s=Bd(a))==null?void 0:s.querySelectorAll("html > *, body > *"))!=null?l:[])if(c!==document.body&&c!==document.head&&Qs(c)&&c!=null&&c.contains(a)){r(c);break}}}}))}function t5(e=null){var t;return(t=_.useContext(e5))!=null?t:e}function dF(){let e=typeof document>"u";return"useSyncExternalStore"in yk?(t=>t.useSyncExternalStore)(yk)(()=>()=>{},()=>!1,()=>!e):!1}function jp(){let e=dF(),[t,n]=_.useState(Gi.isHandoffComplete);return t&&Gi.isHandoffComplete===!1&&n(!1),_.useEffect(()=>{t!==!0&&n(!0)},[t]),_.useEffect(()=>Gi.handoff(),[]),e?!1:t}function nS(){let e=_.useRef(!1);return pr(()=>(e.current=!0,()=>{e.current=!1}),[]),e}var Au=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(Au||{});function fF(){let e=_.useRef(0);return YM(!0,"keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function n5(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let n of e.current)Qs(n.current)&&t.add(n.current);return t}var hF="div",bo=(e=>(e[e.None=0]="None",e[e.InitialFocus=1]="InitialFocus",e[e.TabLock=2]="TabLock",e[e.FocusLock=4]="FocusLock",e[e.RestoreFocus=8]="RestoreFocus",e[e.AutoFocus=16]="AutoFocus",e))(bo||{});function mF(e,t){let n=_.useRef(null),r=ta(n,t),{initialFocus:i,initialFocusFallback:a,containers:s,features:l=15,...c}=e;jp()||(l=0);let d=eS(n.current);OF(l,{ownerDocument:d});let f=bF(l,{ownerDocument:d,container:n,initialFocus:i,initialFocusFallback:a});yF(l,{ownerDocument:d,container:n,containers:s,previousActiveElement:f});let m=fF(),p=Rt(T=>{if(!No(n.current))return;let j=n.current;(E=>E())(()=>{Ra(m.current,{[Au.Forwards]:()=>{Yu(j,Ta.First,{skipElements:[T.relatedTarget,a]})},[Au.Backwards]:()=>{Yu(j,Ta.Last,{skipElements:[T.relatedTarget,a]})}})})}),O=Ud(!!(l&2),"focus-trap#tab-lock"),b=wp(),x=_.useRef(!1),w={ref:r,onKeyDown(T){T.key=="Tab"&&(x.current=!0,b.requestAnimationFrame(()=>{x.current=!1}))},onBlur(T){if(!(l&4))return;let j=n5(s);No(n.current)&&j.add(n.current);let E=T.relatedTarget;Cs(E)&&E.dataset.headlessuiFocusGuard!=="true"&&(r5(j,E)||(x.current?Yu(n.current,Ra(m.current,{[Au.Forwards]:()=>Ta.Next,[Au.Backwards]:()=>Ta.Previous})|Ta.WrapAround,{relativeTo:T.target}):Cs(T.target)&&Qa(T.target)))}},k=hi();return ue.createElement(ue.Fragment,null,O&&ue.createElement(c0,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:p,features:Xm.Focusable}),k({ourProps:w,theirProps:c,defaultTag:hF,name:"FocusTrap"}),O&&ue.createElement(c0,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:p,features:Xm.Focusable}))}var pF=xr(mF),gF=Object.assign(pF,{features:bo});function vF(e=!0){let t=_.useRef(Ss.slice());return tS(([n],[r])=>{r===!0&&n===!1&&Sp(()=>{t.current.splice(0)}),r===!1&&n===!0&&(t.current=Ss.slice())},[e,Ss,t]),Rt(()=>{var n;return(n=t.current.find(r=>r!=null&&r.isConnected))!=null?n:null})}function OF(e,{ownerDocument:t}){let n=!!(e&8),r=vF(n);tS(()=>{n||BY(t==null?void 0:t.body)&&Qa(r())},[n]),FM(()=>{n&&Qa(r())})}function bF(e,{ownerDocument:t,container:n,initialFocus:r,initialFocusFallback:i}){let a=_.useRef(null),s=Ud(!!(e&1),"focus-trap#initial-focus"),l=nS();return tS(()=>{if(e===0)return;if(!s){i!=null&&i.current&&Qa(i.current);return}let c=n.current;c&&Sp(()=>{if(!l.current)return;let d=t==null?void 0:t.activeElement;if(r!=null&&r.current){if((r==null?void 0:r.current)===d){a.current=d;return}}else if(c.contains(d)){a.current=d;return}if(r!=null&&r.current)Qa(r.current);else{if(e&16){if(Yu(c,Ta.First|Ta.AutoFocus)!==d0.Error)return}else if(Yu(c,Ta.First)!==d0.Error)return;if(i!=null&&i.current&&(Qa(i.current),(t==null?void 0:t.activeElement)===i.current))return;console.warn("There are no focusable elements inside the <FocusTrap />")}a.current=t==null?void 0:t.activeElement})},[i,s,e]),a}function yF(e,{ownerDocument:t,container:n,containers:r,previousActiveElement:i}){let a=nS(),s=!!(e&4);WM(t==null?void 0:t.defaultView,"focus",l=>{if(!s||!a.current)return;let c=n5(r);No(n.current)&&c.add(n.current);let d=i.current;if(!d)return;let f=l.target;No(f)?r5(c,f)?(i.current=f,Qa(f)):(l.preventDefault(),l.stopPropagation(),Qa(d)):Qa(i.current)},!0)}function r5(e,t){for(let n of e)if(n.contains(t))return!0;return!1}function i5(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||!Vu((t=e.as)!=null?t:s5)||ue.Children.count(e.children)===1}var Tp=_.createContext(null);Tp.displayName="TransitionContext";var xF=(e=>(e.Visible="visible",e.Hidden="hidden",e))(xF||{});function SF(){let e=_.useContext(Tp);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function wF(){let e=_.useContext(Cp);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}var Cp=_.createContext(null);Cp.displayName="NestingContext";function Ep(e){return"children"in e?Ep(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function a5(e,t){let n=Zo(e),r=_.useRef([]),i=nS(),a=wp(),s=Rt((O,b=Ts.Hidden)=>{let x=r.current.findIndex(({el:w})=>w===O);x!==-1&&(Ra(b,{[Ts.Unmount](){r.current.splice(x,1)},[Ts.Hidden](){r.current[x].state="hidden"}}),a.microTask(()=>{var w;!Ep(r)&&i.current&&((w=n.current)==null||w.call(n))}))}),l=Rt(O=>{let b=r.current.find(({el:x})=>x===O);return b?b.state!=="visible"&&(b.state="visible"):r.current.push({el:O,state:"visible"}),()=>s(O,Ts.Unmount)}),c=_.useRef([]),d=_.useRef(Promise.resolve()),f=_.useRef({enter:[],leave:[]}),m=Rt((O,b,x)=>{c.current.splice(0),t&&(t.chains.current[b]=t.chains.current[b].filter(([w])=>w!==O)),t==null||t.chains.current[b].push([O,new Promise(w=>{c.current.push(w)})]),t==null||t.chains.current[b].push([O,new Promise(w=>{Promise.all(f.current[b].map(([k,T])=>T)).then(()=>w())})]),b==="enter"?d.current=d.current.then(()=>t==null?void 0:t.wait.current).then(()=>x(b)):x(b)}),p=Rt((O,b,x)=>{Promise.all(f.current[b].splice(0).map(([w,k])=>k)).then(()=>{var w;(w=c.current.shift())==null||w()}).then(()=>x(b))});return _.useMemo(()=>({children:r,register:l,unregister:s,onStart:m,onStop:p,wait:d,chains:f}),[l,s,r,m,p,f,d])}var s5=_.Fragment,o5=qm.RenderStrategy;function _F(e,t){var n,r;let{transition:i=!0,beforeEnter:a,afterEnter:s,beforeLeave:l,afterLeave:c,enter:d,enterFrom:f,enterTo:m,entered:p,leave:O,leaveFrom:b,leaveTo:x,...w}=e,[k,T]=_.useState(null),j=_.useRef(null),E=i5(e),Q=ta(...E?[j,t,T]:t===null?[]:[t]),P=(n=w.unmount)==null||n?Ts.Unmount:Ts.Hidden,{show:N,appear:D,initial:L}=SF(),[A,X]=_.useState(N?"visible":"hidden"),Z=wF(),{register:V,unregister:$}=Z;pr(()=>V(j),[V,j]),pr(()=>{if(P===Ts.Hidden&&j.current){if(N&&A!=="visible"){X("visible");return}return Ra(A,{hidden:()=>$(j),visible:()=>V(j)})}},[A,j,V,$,N,P]);let W=jp();pr(()=>{if(E&&W&&A==="visible"&&j.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[j,A,W,E]);let I=L&&!D,z=D&&N&&L,ee=_.useRef(!1),le=a5(()=>{ee.current||(X("hidden"),$(j))},Z),q=Rt(Be=>{ee.current=!0;let Re=Be?"enter":"leave";le.onStart(j,Re,Xe=>{Xe==="enter"?a==null||a():Xe==="leave"&&(l==null||l())})}),G=Rt(Be=>{let Re=Be?"enter":"leave";ee.current=!1,le.onStop(j,Re,Xe=>{Xe==="enter"?s==null||s():Xe==="leave"&&(c==null||c())}),Re==="leave"&&!Ep(le)&&(X("hidden"),$(j))});_.useEffect(()=>{E&&i||(q(N),G(N))},[N,E,i]);let re=!(!i||!E||!W||I),[,M]=VW(re,k,N,{start:q,end:G}),he=po({ref:Q,className:((r=l0(w.className,z&&d,z&&f,M.enter&&d,M.enter&&M.closed&&f,M.enter&&!M.closed&&m,M.leave&&O,M.leave&&!M.closed&&b,M.leave&&M.closed&&x,!M.transition&&N&&p))==null?void 0:r.trim())||void 0,...BW(M)}),ye=0;A==="visible"&&(ye|=_i.Open),A==="hidden"&&(ye|=_i.Closed),N&&A==="hidden"&&(ye|=_i.Opening),!N&&A==="visible"&&(ye|=_i.Closing);let Oe=hi();return ue.createElement(Cp.Provider,{value:le},ue.createElement(HW,{value:ye},Oe({ourProps:he,theirProps:w,defaultTag:s5,features:o5,visible:A==="visible",name:"Transition.Child"})))}function kF(e,t){let{show:n,appear:r=!1,unmount:i=!0,...a}=e,s=_.useRef(null),l=i5(e),c=ta(...l?[s,t]:t===null?[]:[t]);jp();let d=kp();if(n===void 0&&d!==null&&(n=(d&_i.Open)===_i.Open),n===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[f,m]=_.useState(n?"visible":"hidden"),p=a5(()=>{n||m("hidden")}),[O,b]=_.useState(!0),x=_.useRef([n]);pr(()=>{O!==!1&&x.current[x.current.length-1]!==n&&(x.current.push(n),b(!1))},[x,n]);let w=_.useMemo(()=>({show:n,appear:r,initial:O}),[n,r,O]);pr(()=>{n?m("visible"):!Ep(p)&&s.current!==null&&m("hidden")},[n,p]);let k={unmount:i},T=Rt(()=>{var Q;O&&b(!1),(Q=e.beforeEnter)==null||Q.call(e)}),j=Rt(()=>{var Q;O&&b(!1),(Q=e.beforeLeave)==null||Q.call(e)}),E=hi();return ue.createElement(Cp.Provider,{value:p},ue.createElement(Tp.Provider,{value:w},E({ourProps:{...k,as:_.Fragment,children:ue.createElement(l5,{ref:c,...k,...a,beforeEnter:T,beforeLeave:j})},theirProps:{},defaultTag:_.Fragment,features:o5,visible:f==="visible",name:"Transition"})))}function jF(e,t){let n=_.useContext(Tp)!==null,r=kp()!==null;return ue.createElement(ue.Fragment,null,!n&&r?ue.createElement(h0,{ref:t,...e}):ue.createElement(l5,{ref:t,...e}))}var h0=xr(kF),l5=xr(_F),nr=xr(jF),Bo=Object.assign(h0,{Child:nr,Root:h0}),TF=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(TF||{}),CF=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(CF||{}),EF={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},rS=_.createContext(null);rS.displayName="DialogContext";function Ap(e){let t=_.useContext(rS);if(t===null){let n=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Ap),n}return t}function AF(e,t){return Ra(t.type,EF,e,t)}var SC=xr(function(e,t){let n=_.useId(),{id:r=`headlessui-dialog-${n}`,open:i,onClose:a,initialFocus:s,role:l="dialog",autoFocus:c=!0,__demoMode:d=!1,unmount:f=!1,...m}=e,p=_.useRef(!1);l=(function(){return l==="dialog"||l==="alertdialog"?l:(p.current||(p.current=!0,console.warn(`Invalid role [${l}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")})();let O=kp();i===void 0&&O!==null&&(i=(O&_i.Open)===_i.Open);let b=_.useRef(null),x=ta(b,t),w=eS(b.current),k=i?0:1,[T,j]=_.useReducer(AF,{titleId:null,descriptionId:null,panelRef:_.createRef()}),E=Rt(()=>a(!1)),Q=Rt(M=>j({type:0,id:M})),P=jp()?k===0:!1,[N,D]=aF(),L={get current(){var M;return(M=T.panelRef.current)!=null?M:b.current}},A=t5(),{resolveContainers:X}=uF({mainTreeNode:A,portals:N,defaultContainers:[L]}),Z=O!==null?(O&_i.Closing)===_i.Closing:!1;SW(d||Z?!1:P,{allowed:Rt(()=>{var M,he;return[(he=(M=b.current)==null?void 0:M.closest("[data-headlessui-portal]"))!=null?he:null]}),disallowed:Rt(()=>{var M;return[(M=A==null?void 0:A.closest("body > *:not(#headlessui-portal-root)"))!=null?M:null]})});let V=ZM.get(null);pr(()=>{if(P)return V.actions.push(r),()=>V.actions.pop(r)},[V,r,P]);let $=BM(V,_.useCallback(M=>V.selectors.isTop(M,r),[V,r]));RW($,X,M=>{M.preventDefault(),E()}),lF($,w==null?void 0:w.defaultView,M=>{M.preventDefault(),M.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),E()}),qW(d||Z?!1:P,w,X),wW(P,b,E);let[W,I]=aW(),z=_.useMemo(()=>[{dialogState:k,close:E,setTitleId:Q,unmount:f},T],[k,E,Q,f,T]),ee=Vd({open:k===0}),le={ref:x,id:r,role:l,tabIndex:-1,"aria-modal":d?void 0:k===0?!0:void 0,"aria-labelledby":T.titleId,"aria-describedby":W,unmount:f},q=!cF(),G=bo.None;P&&!d&&(G|=bo.RestoreFocus,G|=bo.TabLock,c&&(G|=bo.AutoFocus),q&&(G|=bo.InitialFocus));let re=hi();return ue.createElement(GW,null,ue.createElement(yC,{force:!0},ue.createElement(oF,null,ue.createElement(rS.Provider,{value:z},ue.createElement(JM,{target:b},ue.createElement(yC,{force:!1},ue.createElement(I,{slot:ee},ue.createElement(D,null,ue.createElement(gF,{initialFocus:s,initialFocusFallback:b,containers:X,features:G},ue.createElement(dW,{value:E},re({ourProps:le,theirProps:m,slot:ee,defaultTag:QF,features:PF,visible:k===0,name:"Dialog"})))))))))))}),QF="div",PF=qm.RenderStrategy|qm.Static;function NF(e,t){let{transition:n=!1,open:r,...i}=e,a=kp(),s=e.hasOwnProperty("open")||a!==null,l=e.hasOwnProperty("onClose");if(!s&&!l)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!s)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!l)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!a&&typeof e.open!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${e.open}`);if(typeof e.onClose!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${e.onClose}`);return(r!==void 0||n)&&!i.static?ue.createElement(xC,null,ue.createElement(Bo,{show:r,transition:n,unmount:i.unmount},ue.createElement(SC,{ref:t,...i}))):ue.createElement(xC,null,ue.createElement(SC,{ref:t,open:r,...i}))}var RF="div";function MF(e,t){let n=_.useId(),{id:r=`headlessui-dialog-panel-${n}`,transition:i=!1,...a}=e,[{dialogState:s,unmount:l},c]=Ap("Dialog.Panel"),d=ta(t,c.panelRef),f=Vd({open:s===0}),m=Rt(w=>{w.stopPropagation()}),p={ref:d,id:r,onClick:m},O=i?nr:_.Fragment,b=i?{unmount:l}:{},x=hi();return ue.createElement(O,{...b},x({ourProps:p,theirProps:a,slot:f,defaultTag:RF,name:"Dialog.Panel"}))}var DF="div";function LF(e,t){let{transition:n=!1,...r}=e,[{dialogState:i,unmount:a}]=Ap("Dialog.Backdrop"),s=Vd({open:i===0}),l={ref:t,"aria-hidden":!0},c=n?nr:_.Fragment,d=n?{unmount:a}:{},f=hi();return ue.createElement(c,{...d},f({ourProps:l,theirProps:r,slot:s,defaultTag:DF,name:"Dialog.Backdrop"}))}var zF="h2";function $F(e,t){let n=_.useId(),{id:r=`headlessui-dialog-title-${n}`,...i}=e,[{dialogState:a,setTitleId:s}]=Ap("Dialog.Title"),l=ta(t);_.useEffect(()=>(s(r),()=>s(null)),[r,s]);let c=Vd({open:a===0}),d={ref:l,id:r};return hi()({ourProps:d,theirProps:i,slot:c,defaultTag:zF,name:"Dialog.Title"})}var IF=xr(NF),Vo=xr(MF);xr(LF);var Yd=xr($F),mc=Object.assign(IF,{Panel:Vo,Title:Yd,Description:cW});function wC({children:e,position:t,onClose:n,isOpen:r,wide:i=!1}){const a=i?800:400,s=i?700:500,l={position:"fixed",left:`${Math.min(t.x,typeof window<"u"?window.innerWidth-a:t.x)}px`,top:`${Math.min(t.y,typeof window<"u"?window.innerHeight-s:t.y)}px`};return g.jsx(Bo,{appear:!0,show:r,children:g.jsxs(mc,{as:"div",className:"semiont-popup-overlay",onClose:n,children:[g.jsx(nr,{enter:"ease-out duration-200",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-150",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:g.jsx("div",{className:"semiont-popup-backdrop"})}),g.jsx("div",{className:"semiont-popup-container",children:g.jsx(nr,{enter:"ease-out duration-200",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-150",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:g.jsx(Vo,{className:"semiont-popup-panel",style:l,"data-annotation-ui":!0,"data-wide":i?"true":"false",children:g.jsx(g.Fragment,{children:e})})})})]})})}function qF(e){return Mo(e)?{stroke:"rgb(250, 204, 21)",fill:"rgba(250, 204, 21, 0.2)"}:li(e)?{stroke:"rgb(59, 130, 246)",fill:"rgba(59, 130, 246, 0.2)"}:sc(e)?{stroke:"rgb(239, 68, 68)",fill:"rgba(239, 68, 68, 0.2)"}:zs(e)?{stroke:"rgb(255, 255, 255)",fill:"rgba(255, 255, 255, 0.2)"}:Do(e)?{stroke:"rgb(234, 88, 12)",fill:"rgba(234, 88, 12, 0.2)"}:{stroke:"rgb(156, 163, 175)",fill:"rgba(156, 163, 175, 0.2)"}}function lb(e){return zs(e)?"Comment":Mo(e)?"Highlight":sc(e)?"Assessment":Do(e)?"Tag":D0(e)?"Resolved Reference":li(e)?"Unresolved Reference":"Annotation"}function XF({annotations:e,imageWidth:t,imageHeight:n,displayWidth:r,displayHeight:i,session:a,hoveredAnnotationId:s,selectedAnnotationId:l,hoverDelayMs:c}){const d=r/t,f=i/n,{handleMouseEnter:m,handleMouseLeave:p}=_.useMemo(()=>H0(O=>a==null?void 0:a.client.beckon.hover(O),c),[a,c]);return g.jsx("svg",{className:"semiont-annotation-overlay",style:{width:r,height:i},children:e.map(O=>{if(typeof O.target=="string")return null;const b=RA(O.target.selector);if(!b)return null;const x=z0(b.value);if(!x)return null;const w=O.id===s,k=O.id===l,T=qF(O),j=li(O),E=j&&ad(O.body),Q=j?E?"🔗":"❓":null;switch(x.type){case"rect":{const{x:P,y:N,width:D,height:L}=x.data,A=(P+D)*d+8,X=(N+L)*f+4;return g.jsxs("g",{children:[g.jsx("title",{children:lb(O)}),g.jsx("rect",{x:P*d,y:N*f,width:D*d,height:L*f,fill:w||k?T.fill:"transparent",stroke:T.stroke,strokeWidth:w||k?3:2,opacity:w||k?1:.7,className:"semiont-annotation-overlay__shape","data-hovered":w?"true":"false","data-selected":k?"true":"false",onClick:()=>a==null?void 0:a.client.browse.click(O.id,O.motivation),onMouseEnter:()=>m(O.id),onMouseLeave:p}),Q&&g.jsx("text",{x:A,y:X,fontSize:"16",className:"semiont-annotation-overlay__status-indicator",style:{userSelect:"none"},onClick:Z=>{Z.stopPropagation(),a==null||a.client.browse.click(O.id,O.motivation)},onMouseEnter:()=>m(O.id),onMouseLeave:p,children:Q})]},O.id)}case"circle":{const{cx:P,cy:N,r:D}=x.data,L=D*Math.min(d,f),A=Math.PI/4,X=P*d+L*Math.cos(A)+8,Z=N*f+L*Math.sin(A)+4;return g.jsxs("g",{children:[g.jsx("title",{children:lb(O)}),g.jsx("circle",{cx:P*d,cy:N*f,r:L,fill:w||k?T.fill:"transparent",stroke:T.stroke,strokeWidth:w||k?3:2,opacity:w||k?1:.7,className:"semiont-annotation-overlay__shape","data-hovered":w?"true":"false","data-selected":k?"true":"false",onClick:()=>a==null?void 0:a.client.browse.click(O.id,O.motivation),onMouseEnter:()=>m(O.id),onMouseLeave:p}),Q&&g.jsx("text",{x:X,y:Z,fontSize:"16",className:"semiont-annotation-overlay__status-indicator",style:{userSelect:"none"},onClick:V=>{V.stopPropagation(),a==null||a.client.browse.click(O.id,O.motivation)},onMouseEnter:()=>m(O.id),onMouseLeave:p,children:Q})]},O.id)}case"polygon":{const P=x.data.points.map(V=>`${V.x*d},${V.y*f}`).join(" "),D=[...x.data.points.map(V=>({x:V.x*d,y:V.y*f,sum:V.x*d+V.y*f}))].sort((V,$)=>$.sum-V.sum),L=D[0],A=D[1],X=(L.x+A.x)/2+8,Z=(L.y+A.y)/2+4;return g.jsxs("g",{children:[g.jsx("title",{children:lb(O)}),g.jsx("polygon",{points:P,fill:w||k?T.fill:"transparent",stroke:T.stroke,strokeWidth:w||k?3:2,opacity:w||k?1:.7,className:"semiont-annotation-overlay__shape","data-hovered":w?"true":"false","data-selected":k?"true":"false",onClick:()=>a==null?void 0:a.client.browse.click(O.id,O.motivation),onMouseEnter:()=>m(O.id),onMouseLeave:p}),Q&&g.jsx("text",{x:X,y:Z,fontSize:"16",className:"semiont-annotation-overlay__status-indicator",style:{userSelect:"none"},onClick:V=>{V.stopPropagation(),a==null||a.client.browse.click(O.id,O.motivation)},onMouseEnter:()=>m(O.id),onMouseLeave:p,children:Q})]},O.id)}default:return null}})})}function ZF(e){if(!e)return{stroke:"rgb(156, 163, 175)",fill:"rgba(156, 163, 175, 0.2)"};switch(e){case"highlighting":return{stroke:"rgb(250, 204, 21)",fill:"rgba(250, 204, 21, 0.2)"};case"linking":return{stroke:"rgb(59, 130, 246)",fill:"rgba(59, 130, 246, 0.2)"};case"assessing":return{stroke:"rgb(239, 68, 68)",fill:"rgba(239, 68, 68, 0.2)"};case"commenting":return{stroke:"rgb(255, 255, 255)",fill:"rgba(255, 255, 255, 0.2)"};default:return{stroke:"rgb(156, 163, 175)",fill:"rgba(156, 163, 175, 0.2)"}}}function BF({imageUrl:e,existingAnnotations:t=[],drawingMode:n,selectedMotivation:r,session:i,hoveredAnnotationId:a,selectedAnnotationId:s}){const{hoverDelayMs:l}=iR(),c=_.useRef(null),d=_.useRef(null),[f,m]=_.useState(null),[p,O]=_.useState(null),[b,x]=_.useState(!1),[w,k]=_.useState(null),[T,j]=_.useState(null);_.useEffect(()=>{const L=new Image;L.onload=()=>{m({width:L.naturalWidth,height:L.naturalHeight})},L.src=e},[e]),_.useEffect(()=>{const L=()=>{d.current&&O({width:d.current.clientWidth,height:d.current.clientHeight})};L();let A=null;try{A=new ResizeObserver(L),d.current&&A.observe(d.current)}catch{console.warn("ResizeObserver not supported, falling back to window resize listener"),window.addEventListener("resize",L)}return()=>{A?A.disconnect():window.removeEventListener("resize",L)}},[]);const E=_.useCallback(L=>{if(!d.current)return null;const A=d.current.getBoundingClientRect();return{x:L.clientX-A.left,y:L.clientY-A.top}},[]),Q=_.useCallback(L=>{if(!n)return;const A=E(L);A&&(x(!0),k(A),j(A))},[n,E]),P=_.useCallback(L=>{if(!b||!w)return;const A=E(L);A&&j(A)},[b,w,E]),N=_.useCallback(L=>{if(!b||!w||!n)return;const A=E(L);if(!A||!p||!f)return;if(Math.sqrt(Math.pow(A.x-w.x,2)+Math.pow(A.y-w.y,2))<10){if(t.length>0){const W=t.find(I=>{if(typeof I.target=="string")return!1;const z=I.target.selector;if(!z)return!1;const le=(Array.isArray(z)?z:[z]).find(M=>M.type==="SvgSelector");if(!le||le.type!=="SvgSelector")return!1;const q=z0(le.value);if(!q)return!1;const G=p.width/f.width,re=p.height/f.height;if(q.type==="rect"){const{x:M,y:he,width:ye,height:Oe}=q.data,Be=M*G,Re=he*re,Xe=ye*G,be=Oe*re;return A.x>=Be&&A.x<=Be+Xe&&A.y>=Re&&A.y<=Re+be}return!1});if(W){i==null||i.client.browse.click(W.id,W.motivation),x(!1),k(null),j(null);return}}x(!1),k(null),j(null);return}let V;switch(n){case"circle":{const W=Math.sqrt(Math.pow(A.x-w.x,2)+Math.pow(A.y-w.y,2));V=LA(w,W);break}case"polygon":{const W=(w.x+A.x)/2,I=(w.y+A.y)/2,z=Math.abs(A.x-w.x)/2,ee=Math.abs(A.y-w.y)/2,le=[{x:W,y:I-ee},{x:W+z,y:I},{x:W,y:I+ee},{x:W-z,y:I}];V=DA(le);break}case"rectangle":default:V=MA(w,A);break}const $=W$(V,p.width,p.height,f.width,f.height);i&&r&&i.client.mark.request({type:"SvgSelector",value:$},r),x(!1),k(null),j(null)},[b,w,n,p,f,E,r,t]),D=_.useCallback(()=>{b&&(x(!1),k(null),j(null))},[b]);return g.jsxs("div",{ref:c,className:"semiont-svg-drawing-canvas",onMouseDown:Q,onMouseMove:P,onMouseUp:N,onMouseLeave:D,"data-drawing-mode":n||"none",children:[g.jsx("img",{ref:d,src:e,alt:"Annotatable content",className:"semiont-svg-drawing-canvas__image",draggable:!1}),p&&f&&g.jsx("div",{className:"semiont-svg-drawing-canvas__overlay-container",children:g.jsxs("div",{className:"semiont-svg-drawing-canvas__overlay",style:{width:p.width,height:p.height},children:[g.jsx(XF,{annotations:t,imageWidth:f.width,imageHeight:f.height,displayWidth:p.width,displayHeight:p.height,hoverDelayMs:l,...i&&{session:i},...a!==void 0&&{hoveredAnnotationId:a},...s!==void 0&&{selectedAnnotationId:s}}),b&&w&&T&&(()=>{const L=ZF(r||null);return g.jsxs("svg",{className:"semiont-svg-drawing-canvas__preview",style:{width:p.width,height:p.height},children:[n==="circle"&&(()=>{const A=Math.sqrt(Math.pow(T.x-w.x,2)+Math.pow(T.y-w.y,2));return g.jsx("circle",{cx:w.x,cy:w.y,r:A,fill:L.fill,stroke:L.stroke,strokeWidth:"2",strokeDasharray:"5,5"})})(),n==="polygon"&&(()=>{const A=(w.x+T.x)/2,X=(w.y+T.y)/2,Z=Math.abs(T.x-w.x)/2,V=Math.abs(T.y-w.y)/2,W=[{x:A,y:X-V},{x:A+Z,y:X},{x:A,y:X+V},{x:A-Z,y:X}].map(I=>`${I.x},${I.y}`).join(" ");return g.jsx("polygon",{points:W,fill:L.fill,stroke:L.stroke,strokeWidth:"2",strokeDasharray:"5,5"})})(),n==="rectangle"&&g.jsx("rect",{x:Math.min(w.x,T.x),y:Math.min(w.y,T.y),width:Math.abs(T.x-w.x),height:Math.abs(T.y-w.y),fill:L.fill,stroke:L.stroke,strokeWidth:"2",strokeDasharray:"5,5"})]})})()]})})]})}var VF=[{titleKey:"navigationTitle",shortcuts:[{keys:["⌘K","Ctrl K"],descriptionKey:"navOpenSearch"},{keys:["/"],descriptionKey:"navOpenSearchAlt"},{keys:["⌘N","Ctrl N"],descriptionKey:"navCreateResource"},{keys:["Esc Esc"],descriptionKey:"navCloseOverlays"},{keys:["?"],descriptionKey:"navShowHelp"}]},{titleKey:"sidebarTitle",shortcuts:[{keys:["Click <"],descriptionKey:"sidebarCollapse"},{keys:["Click ☰"],descriptionKey:"sidebarExpand"},{keys:["Space"],descriptionKey:"sidebarPickup"},{keys:["↑","↓"],descriptionKey:"sidebarMove"},{keys:["Space"],descriptionKey:"sidebarDrop"},{keys:["Esc"],descriptionKey:"sidebarCancel"}]},{titleKey:"annotationsTitle",shortcuts:[{keys:["H"],descriptionKey:"annotHighlight"},{keys:["R"],descriptionKey:"annotReference"},{keys:["Delete"],descriptionKey:"annotDelete"},{keys:["Tab"],descriptionKey:"annotNavigate"},{keys:["Shift Tab"],descriptionKey:"annotNavigateBack"}]},{titleKey:"listsTitle",shortcuts:[{keys:["←","→"],descriptionKey:"listsFilterNav"},{keys:["↑","↓","←","→"],descriptionKey:"listsGridNav"},{keys:["Home"],descriptionKey:"listsJumpFirst"},{keys:["End"],descriptionKey:"listsJumpLast"}]},{titleKey:"searchModalTitle",shortcuts:[{keys:["↑","↓"],descriptionKey:"searchNav"},{keys:["Enter"],descriptionKey:"searchSelect"},{keys:["Esc"],descriptionKey:"searchClose"}]},{titleKey:"modalTitle",shortcuts:[{keys:["Esc"],descriptionKey:"modalClose"},{keys:["Tab"],descriptionKey:"modalNavForward"},{keys:["Shift Tab"],descriptionKey:"modalNavBackward"},{keys:["Enter"],descriptionKey:"modalActivate"},{keys:["Space"],descriptionKey:"modalActivate"}]},{titleKey:"accessibilityTitle",shortcuts:[{keys:["Tab"],descriptionKey:"a11ySkipLinks"},{keys:["Enter"],descriptionKey:"a11yFollowLink"}]}];function ise({isOpen:e,onClose:t}){const n=cn("KeyboardShortcuts"),r=typeof window<"u"&&navigator.platform.toUpperCase().indexOf("MAC")>=0;return g.jsx(Bo,{appear:!0,show:e,children:g.jsxs(mc,{as:"div",className:"semiont-modal",onClose:t,children:[g.jsx(nr,{enter:"ease-out duration-200",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-150",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:g.jsx("div",{className:"semiont-modal__backdrop"})}),g.jsx("div",{className:"semiont-modal__container",children:g.jsx("div",{className:"semiont-modal__wrapper",children:g.jsx(nr,{enter:"ease-out duration-200",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-150",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:g.jsxs(Vo,{className:"semiont-modal__panel semiont-modal__panel--large",children:[g.jsx("div",{className:"semiont-modal__header",children:g.jsxs("div",{className:"semiont-modal__header-content",children:[g.jsx(Yd,{className:"semiont-modal__title",children:n("title")}),g.jsx("button",{onClick:t,"aria-label":n("closeDialog"),className:"semiont-modal__close",children:g.jsx("svg",{className:"semiont-modal__close-icon",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})}),g.jsxs("div",{className:"semiont-modal__body",children:[g.jsx("div",{className:"semiont-shortcuts",children:VF.map(i=>g.jsxs("div",{className:"semiont-shortcuts__group",children:[g.jsx("h3",{className:"semiont-shortcuts__group-title",children:n(i.titleKey)}),g.jsx("div",{className:"semiont-shortcuts__list",children:i.shortcuts.map((a,s)=>g.jsxs("div",{className:"semiont-shortcuts__item",children:[g.jsx("span",{className:"semiont-shortcuts__description",children:n(a.descriptionKey)}),g.jsx("div",{className:"semiont-shortcuts__keys",children:a.keys.map((l,c)=>l.includes("⌘")&&!r||l.includes("Ctrl")&&r?null:g.jsxs(ue.Fragment,{children:[c>0&&!l.includes("⌘")&&!l.includes("Ctrl")&&g.jsx("span",{className:"semiont-shortcuts__separator",children:n("or")}),g.jsx("kbd",{className:"semiont-shortcuts__key",children:l})]},c))})]},s))})]},i.titleKey))}),g.jsx("div",{className:"semiont-shortcuts__note",children:g.jsx("p",{className:"semiont-shortcuts__note-text",children:n(r?"macNote":"windowsNote")})})]}),g.jsx("div",{className:"semiont-modal__footer",children:g.jsxs("div",{className:"semiont-modal__footer-content",children:[g.jsx("div",{className:"semiont-modal__hint",children:n("footerHint",{key:"?"}).split("?").map((i,a,s)=>g.jsxs(ue.Fragment,{children:[i,a<s.length-1&&g.jsx("kbd",{className:"semiont-modal__hint-key",children:"?"})]},a))}),g.jsx("button",{onClick:t,className:"semiont-button semiont-button--secondary",children:n("close")})]})})]})})})})]})})}function UF(){const e=De(at().activeSignals$),t=De(e==null?void 0:e.permissionDeniedAt$)??null,n=De(e==null?void 0:e.permissionDeniedMessage$)??null,r=()=>e==null?void 0:e.acknowledgePermissionDenied(),i=t!==null,a=n??"You do not have permission to perform this action.",s=()=>{r(),window.history.back()},l=()=>{r(),window.location.href="/"},c=()=>{r(),window.location.href=`/auth/connect?callbackUrl=${encodeURIComponent(window.location.pathname)}`};return g.jsx(Bo,{appear:!0,show:i,children:g.jsxs(mc,{as:"div",className:"semiont-modal",onClose:s,children:[g.jsx(nr,{enter:"ease-out duration-200",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-150",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:g.jsx("div",{className:"semiont-modal__backdrop"})}),g.jsx("div",{className:"semiont-modal__container",children:g.jsx("div",{className:"semiont-modal__wrapper",children:g.jsx(nr,{enter:"ease-out duration-200",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-150",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:g.jsxs(Vo,{className:"semiont-modal__panel semiont-modal__panel--medium",children:[g.jsx("div",{className:"semiont-modal__icon-wrapper",children:g.jsx("div",{className:"semiont-modal__icon",children:g.jsx("svg",{style:{width:"1.5rem",height:"1.5rem",color:"var(--semiont-color-amber-600, #d97706)"},fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})})})}),g.jsxs("div",{className:"semiont-modal__content",children:[g.jsx(Yd,{className:"semiont-modal__title semiont-modal__title--centered",children:"Access Denied"}),g.jsx("p",{className:"semiont-modal__description",children:a})]}),g.jsxs("div",{style:{padding:"0.75rem",backgroundColor:"var(--semiont-bg-secondary)",borderRadius:"var(--semiont-radius-md, 0.375rem)",border:"1px solid var(--semiont-border-primary)",fontSize:"var(--semiont-text-sm, 0.875rem)",marginBottom:"1rem"},children:[g.jsx("p",{style:{color:"var(--semiont-text-secondary)",marginBottom:"0.5rem"},children:"This could be because:"}),g.jsxs("ul",{style:{listStyle:"disc",listStylePosition:"inside",color:"var(--semiont-text-tertiary)",display:"flex",flexDirection:"column",gap:"0.25rem"},children:[g.jsx("li",{children:"You don't have the required permissions"}),g.jsx("li",{children:"The resource is restricted to specific users or teams"}),g.jsx("li",{children:"Your account type doesn't include this feature"})]})]}),g.jsxs("div",{className:"semiont-modal__actions",children:[g.jsx("button",{type:"button",onClick:s,className:"semiont-button--primary semiont-button--flex",children:"Go Back"}),g.jsx("button",{type:"button",onClick:l,className:"semiont-button--secondary semiont-button--flex",children:"Go to Home"})]}),g.jsx("div",{className:"semiont-modal__actions",style:{marginTop:"0.5rem",paddingTop:"0.5rem",borderTop:"1px solid var(--semiont-border-primary)"},children:g.jsx("button",{type:"button",onClick:c,className:"semiont-button--secondary semiont-button--flex",style:{fontSize:"var(--semiont-text-sm, 0.875rem)"},children:"Switch Account"})})]})})})})]})})}function YF(){const e=De(at().activeSignals$),t=De(e==null?void 0:e.sessionExpiredAt$)??null,n=De(e==null?void 0:e.sessionExpiredMessage$)??null,r=()=>e==null?void 0:e.acknowledgeSessionExpired(),i=t!==null,a=()=>{r(),window.location.href=`/auth/connect?callbackUrl=${encodeURIComponent(window.location.pathname)}`},s=()=>{r(),window.location.href="/"};return g.jsx(Bo,{appear:!0,show:i,children:g.jsxs(mc,{as:"div",className:"semiont-modal",onClose:s,children:[g.jsx(nr,{enter:"ease-out duration-200",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-150",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:g.jsx("div",{className:"semiont-modal__backdrop"})}),g.jsx("div",{className:"semiont-modal__container",children:g.jsx("div",{className:"semiont-modal__wrapper",children:g.jsx(nr,{enter:"ease-out duration-200",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-150",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:g.jsxs(Vo,{className:"semiont-modal__panel semiont-modal__panel--medium",children:[g.jsx("div",{className:"semiont-modal__icon-wrapper",children:g.jsx("div",{className:"semiont-modal__icon",style:{background:"linear-gradient(to bottom right, var(--semiont-color-red-100, #fee2e2), var(--semiont-color-red-300, #fca5a5))"},children:g.jsx("svg",{style:{width:"1.5rem",height:"1.5rem",color:"var(--semiont-color-red-600, #dc2626)"},fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})})})}),g.jsxs("div",{className:"semiont-modal__content",children:[g.jsx(Yd,{className:"semiont-modal__title semiont-modal__title--centered",children:"Session Expired"}),g.jsx("p",{className:"semiont-modal__description",children:n??"Your session has expired for security reasons. Please sign in again to continue working."})]}),g.jsxs("div",{className:"semiont-modal__actions",children:[g.jsx("button",{type:"button",onClick:s,className:"semiont-button--secondary semiont-button--flex",children:"Go to Home"}),g.jsx("button",{type:"button",onClick:a,className:"semiont-button--primary semiont-button--flex",children:"Sign In Again"})]})]})})})})]})})}function WF(e,t){if(!e)return[{exact:"",start:0,end:0}];const n=X$(e),r=t.map(s=>{const l=Qn(s.target),c=oi(l),d=l?I$(l):null;let f;d&&(f=B$(e,d.exact,d.prefix,d.suffix,c==null?void 0:c.start,n));const m=(f==null?void 0:f.start)??(c==null?void 0:c.start)??0,p=(f==null?void 0:f.end)??(c==null?void 0:c.end)??0;return{annotation:s,start:m,end:p}}).filter(s=>s.start>=0&&s.end<=e.length&&s.start<s.end).sort((s,l)=>s.start-l.start);if(r.length===0)return[{exact:e,start:0,end:e.length}];const i=[];let a=0;for(const{annotation:s,start:l,end:c}of r)l<a||(l>a&&i.push({exact:e.slice(a,l),start:a,end:l}),i.push({exact:e.slice(l,c),annotation:s,start:l,end:c}),a=c);return a<e.length&&i.push({exact:e.slice(a),start:a,end:e.length}),i}function FF(e,t,n,r){if(!t||n<0||r<=n||r>e.length)return null;const i=F$(e,n,r);return[{type:"TextPositionSelector",start:n,end:r},{type:"TextQuoteSelector",exact:t,...i.prefix&&{prefix:i.prefix},...i.suffix&&{suffix:i.suffix}}]}function HF(e,t){const n=e.indexOf(t);return n===-1?null:{start:n,end:n+t.length}}var GF=_.lazy(()=>Qe(()=>import("./PdfAnnotationCanvas.client-5QESNO5H-B7UjwjIX.js"),__vite__mapDeps([2,1,3])).then(e=>({default:e.PdfAnnotationCanvas})));function KF({content:e,mimeType:t="text/plain",resourceUri:n,annotations:r,uiState:i,onUIStateChange:a,enableWidgets:s=!1,getTargetResourceName:l,generatingReferenceId:c,showLineNumbers:d=!1,hoverDelayMs:f=150,annotateMode:m}){const{newAnnotationIds:p}=Ix(),O=_.useRef(null),b=De(at().activeSession$),x=I0(t),{highlights:w,references:k,assessments:T,comments:j,tags:E}=r,Q=[...w,...k,...T,...j,...E],P=WF(e,Q),{selectedMotivation:N,selectedClick:D,selectedShape:L,hoveredAnnotationId:A,scrollToAnnotationId:X}=i,Z=_.useRef(a);Z.current=a;const V=_.useCallback(({motivation:z})=>{var ee;(ee=Z.current)==null||ee.call(Z,{selectedMotivation:z})},[]),$=_.useCallback(({action:z})=>{var ee;(ee=Z.current)==null||ee.call(Z,{selectedClick:z})},[]),W=_.useCallback(({shape:z})=>{var ee;(ee=Z.current)==null||ee.call(Z,{selectedShape:z})},[]),I=_.useCallback(({annotationId:z})=>{var ee;(ee=Z.current)==null||ee.call(Z,{hoveredAnnotationId:z})},[]);switch(La({"mark:selection-changed":V,"mark:click-changed":$,"mark:shape-changed":W,"beckon:hover":I}),_.useEffect(()=>{const z=O.current;if(!z)return;let ee=!1;const le=G=>{const re=G.target;ee=!!re.closest("[data-annotation-id]"),re.closest("[data-annotation-ui]")},q=G=>{const re=G.target;if(re.closest(".semiont-pdf-annotation-canvas")||re.closest(".semiont-svg-drawing-canvas"))return;const M=window.getSelection();if(!M||M.isCollapsed||!M.toString()){ee=!1;return}if(ee){ee=!1;return}ee=!1;const he=M.getRangeAt(0),ye=M.toString(),Oe=z.querySelector(".codemirror-renderer"),Be=Oe==null?void 0:Oe.__cmView;let Re,Xe;if(!Be||!Be.posAtDOM){const be=HF(e,ye);if(!be)return;Re=be.start,Xe=be.end}else Re=Be.posAtDOM(he.startContainer,he.startOffset),Xe=Re+ye.length;if(Re>=0&&N){const be=FF(e,ye,Re,Xe);if(!be)return;b==null||b.client.mark.request(be,N),M.removeAllRanges()}};return z.addEventListener("mouseup",q),z.addEventListener("mousedown",le),()=>{z.removeEventListener("mouseup",q),z.removeEventListener("mousedown",le)}},[N,e]),x){case"text":return g.jsxs("div",{className:"semiont-annotate-view","data-mime-type":"text",ref:O,children:[g.jsx(Xl,{selectedMotivation:N,selectedClick:D,mediaType:t,annotateMode:m,annotators:er}),g.jsx("div",{className:"semiont-annotate-view__content",children:g.jsx(AM,{content:e,segments:P,editable:!1,newAnnotationIds:p,...A!==void 0&&{hoveredAnnotationId:A},...X!==void 0&&{scrollToAnnotationId:X},sourceView:!0,showLineNumbers:d,hoverDelayMs:f,enableWidgets:s,session:b,...l&&{getTargetResourceName:l},...c!==void 0&&{generatingReferenceId:c}})})]});case"image":return oc(t)?g.jsxs("div",{className:"semiont-annotate-view","data-mime-type":"pdf",ref:O,children:[g.jsx(Xl,{selectedMotivation:N,selectedClick:D,showShapeGroup:!0,selectedShape:L,mediaType:t,annotateMode:m,annotators:er}),g.jsx("div",{className:"semiont-annotate-view__content",children:e&&g.jsx(_.Suspense,{fallback:g.jsx("div",{className:"semiont-annotate-view__loading",children:"Loading PDF viewer..."}),children:g.jsx(GF,{pdfUrl:e,existingAnnotations:Q,drawingMode:N?L:null,selectedMotivation:N,session:b,hoveredAnnotationId:A||null,hoverDelayMs:f})})})]}):g.jsxs("div",{className:"semiont-annotate-view","data-mime-type":"image",ref:O,children:[g.jsx(Xl,{selectedMotivation:N,selectedClick:D,showShapeGroup:!0,selectedShape:L,mediaType:t,annotateMode:m,annotators:er}),g.jsx("div",{className:"semiont-annotate-view__content",children:e&&g.jsx(BF,{imageUrl:e,existingAnnotations:Q,drawingMode:N?L:null,selectedMotivation:N,session:b,hoveredAnnotationId:A||null,hoverDelayMs:f})})]});case"unsupported":default:return g.jsx("div",{ref:O,className:"semiont-annotate-view semiont-annotate-view--unsupported","data-mime-type":"unsupported",children:g.jsxs("div",{className:"semiont-annotate-view__empty",children:[g.jsxs("p",{className:"semiont-annotate-view__empty-message",children:["Annotation not supported for ",t]}),n&&g.jsx("a",{href:`/api/resources/${n}`,download:!0,className:"semiont-button semiont-button--primary",children:"Download File"})]})})}}function _C(e){if(!e.startsWith("did:"))return e;const t=e.match(/^did:web:system:(.+)$/);if(t){const r=t[1];return r.charAt(0).toUpperCase()+r.slice(1)}const n=e.match(/^did:web:[^:]+:users:(.+)$/);return n?decodeURIComponent(n[1]):e}function kC(e,t,n){var r;switch(e){case"yield:created":return t("resourceCreated");case"yield:cloned":return t("resourceCloned");case"mark:archived":return t("resourceArchived");case"mark:unarchived":return t("resourceUnarchived");case"mark:added":{const i=(r=n==null?void 0:n.annotation)==null?void 0:r.motivation;return t(i==="highlighting"?"highlightAdded":i==="linking"?"referenceCreated":i==="assessing"?"assessmentAdded":"annotationAdded")}case"mark:removed":return t("annotationRemoved");case"mark:body-updated":return t("annotationBodyUpdated");case"mark:entity-tag-added":return t("entitytagAdded");case"mark:entity-tag-removed":return t("entitytagRemoved");case"job:completed":case"job:started":case"job:progress":case"job:failed":return t("jobEvent");case"yield:representation-added":case"yield:representation-removed":return t("representationEvent");default:return e}}function JF(e,t){var n;switch(e){case"yield:created":case"yield:cloned":case"mark:archived":case"mark:unarchived":return"📄";case"mark:added":{const r=(n=t==null?void 0:t.annotation)==null?void 0:n.motivation;return r==="highlighting"?er.highlight.iconEmoji||"📝":r==="linking"?er.reference.iconEmoji||"📝":r==="assessing"&&er.assessment.iconEmoji||"📝"}case"mark:removed":return"🗑️";case"mark:body-updated":return"✏️";case"mark:entity-tag-added":case"mark:entity-tag-removed":return"🏷️";case"job:completed":return"🔗";case"job:started":case"job:progress":return"⚙️";case"job:failed":return"❌";case"yield:representation-added":case"yield:representation-removed":return"📄";default:return"📝"}}function eH(e,t){const n=new Date(e),i=new Date().getTime()-n.getTime(),a=Math.floor(i/6e4),s=Math.floor(i/36e5),l=Math.floor(i/864e5);return a<1?t("justNow"):a<60?t("minutesAgo",{count:a}):s<24?t("hoursAgo",{count:s}):l<7?t("daysAgo",{count:l}):n.toLocaleDateString()}function Zh(e,t=50){const n=e.trim();return n.length>t?n.substring(0,t)+"...":n}function tH(e,t,n){const r=e,i=r.payload;switch(r.type){case"yield:created":case"yield:cloned":return{exact:i.name,isQuoted:!1,isTag:!1};case"mark:body-updated":{const a=t.find(s=>s.id.endsWith(`/annotations/${i.annotationId}`));if(a!=null&&a.target)try{const s=Qn(a.target),l=_s(s);if(l)return{exact:Zh(l),isQuoted:!0,isTag:!1}}catch{}return null}case"mark:removed":{const a=n.find(s=>s.type==="mark:added"&&s.payload.annotation.id.endsWith(`/annotations/${i.annotationId}`));if(a&&a.type==="mark:added")try{const s=a.payload.annotation.target;if(typeof s!="string"&&s.selector){const l=_s(s.selector);if(l)return{exact:Zh(l),isQuoted:!0,isTag:!1}}}catch{}return null}case"mark:added":{try{const a=i.annotation.target;if(typeof a!="string"&&a.selector){const s=_s(a.selector);if(s)return{exact:Zh(s),isQuoted:!0,isTag:!1}}}catch{}return null}case"mark:entity-tag-added":case"mark:entity-tag-removed":return{exact:i.entityType,isQuoted:!1,isTag:!0};case"job:completed":{if(i.annotationUri){const a=t.find(s=>s.id===i.annotationUri);if(a!=null&&a.target)try{const s=Qn(a.target),l=_s(s);if(l)return{exact:Zh(l),isQuoted:!0,isTag:!1}}catch{}}return null}case"job:started":case"job:progress":case"job:failed":case"yield:representation-added":case"yield:representation-removed":return null;default:return null}}function nH(e){const t=e,n=t.payload;if(t.type==="mark:added"){const r=n.annotation.motivation,i=n.annotation.body;if(r==="linking"&&i&&"entityTypes"in i)return i.entityTypes??[]}return[]}function rH(e){const t=e,n=t.payload;return t.type==="yield:created"?{type:"created",method:n.creationMethod||"unknown",userId:t.userId,metadata:void 0}:t.type==="yield:cloned"?{type:"cloned",method:n.creationMethod||"clone",userId:t.userId,sourceDocId:n.parentResourceId,parentResourceId:n.parentResourceId,metadata:void 0}:null}function iH({event:e,annotations:t,allEvents:n,isRelated:r,t:i,Link:a,routes:s,onEventRef:l,onEventClick:c,onEventHover:d}){const f=tH(e,t,n),m=QA(e),p=rH(e),O=nH(e),b=_.useRef(null),x=_.useRef(d);_.useEffect(()=>{x.current=d});const w=_.useCallback(()=>{!m||!x.current||(b.current&&clearTimeout(b.current),b.current=setTimeout(()=>{var E;(E=x.current)==null||E.call(x,m)},300))},[m]),k=_.useCallback(()=>{b.current&&(clearTimeout(b.current),b.current=null),x.current&&x.current(null)},[]),T=m?"button":"div",j=m?{type:"button",onClick:()=>c==null?void 0:c(m),"aria-label":i("viewAnnotation",{content:(f==null?void 0:f.exact)||kC(e.type,i)}),className:"semiont-history-event","data-related":r?"true":"false","data-interactive":"true"}:{className:"semiont-history-event","data-related":r?"true":"false"};return g.jsxs(T,{ref:E=>{l&&l(m,E)},...j,children:[g.jsxs("div",{className:"semiont-history-event__content",children:[g.jsx("span",{className:"semiont-history-event__emoji",onMouseEnter:w,onMouseLeave:k,children:JF(e.type,e.payload)}),f?f.isTag?g.jsx("span",{className:"semiont-history-event__tag",children:f.exact}):f.isQuoted?g.jsxs("span",{className:"semiont-history-event__text semiont-history-event__text--quoted",children:["“",f.exact,"”"]}):g.jsx("span",{className:"semiont-history-event__text",children:f.exact}):g.jsx("span",{className:"semiont-history-event__text",children:kC(e.type,i,e.payload)}),e.userId&&g.jsx("span",{className:"semiont-history-event__user",children:_C(e.userId)}),g.jsx("span",{className:"semiont-history-event__timestamp",children:eH(e.timestamp,i)})]}),O.length>0&&g.jsx("div",{className:"semiont-history-event__entity-types",children:O.map(E=>g.jsx("span",{className:"semiont-tag semiont-tag--small","data-variant":"blue",children:E},E))}),p&&g.jsxs("div",{className:"semiont-history-event__details",children:[g.jsxs("span",{className:"semiont-history-event__detail",children:[i("user"),": ",g.jsx("span",{className:"semiont-history-event__detail-value",children:p.userId?_C(p.userId):""})]}),g.jsxs("span",{className:"semiont-history-event__detail",children:[i("method"),": ",g.jsx("span",{className:"semiont-history-event__detail-value semiont-history-event__detail-value--uppercase",children:p.method})]}),p.type==="cloned"&&p.sourceDocId&&g.jsx(a,{href:s.resourceDetail(p.sourceDocId),className:"semiont-history-event__link",onClick:E=>E.stopPropagation(),children:i("viewOriginal")})]})]})}function aH({rUri:e,hoveredAnnotationId:t,onEventHover:n,onEventClick:r,Link:i,routes:a}){var x;const s=cn("AnnotationHistory"),l=(x=De(at().activeSession$))==null?void 0:x.client,c=De(l==null?void 0:l.browse.events(e)),d=De(l==null?void 0:l.browse.annotations(e)),f=c===void 0,m=d??[],p=_.useRef(new Map),O=_.useRef(null),b=c?c.filter(w=>w.type!=="job:started"&&w.type!=="job:progress"&&w.type!=="job:completed").sort((w,k)=>w.metadata.sequenceNumber-k.metadata.sequenceNumber):[];return _.useEffect(()=>{O.current&&b.length>0&&requestAnimationFrame(()=>{O.current&&(O.current.scrollTop=O.current.scrollHeight)})},[b.length]),_.useEffect(()=>{if(!t)return;const w=p.current.get(t);w&&O.current&&(w.scrollIntoView({behavior:"smooth",block:"nearest"}),w.classList.add("bg-blue-100","dark:bg-blue-900/30"),setTimeout(()=>{w.classList.remove("bg-blue-100","dark:bg-blue-900/30")},1500))},[t]),f?g.jsxs("div",{className:"semiont-history-panel",children:[g.jsx("h3",{className:"semiont-history-panel__title",children:s("history")}),g.jsx("div",{className:"semiont-history-panel__loading",children:s("loading")})]}):b.length===0?null:g.jsxs("div",{className:"semiont-history-panel",children:[g.jsx("h3",{className:"semiont-history-panel__title",children:s("history")}),g.jsx("div",{ref:O,className:"semiont-history-panel__list",children:b.map(w=>{const k=t?(()=>{const T=QA(w);return T?T===t:!1})():!1;return g.jsx(iH,{event:w,annotations:m,allEvents:b,isRelated:k,t:s,Link:i,routes:a,onEventRef:(T,j)=>{j&&T?p.current.set(T,j):!j&&T&&p.current.delete(T)},...r&&{onEventClick:r},...n&&{onEventHover:n}},w.id)})})]})}function sH(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}var oH=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,lH=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,cH={};function jC(e,t){return(cH.jsx?lH:oH).test(e)}var uH=/[ \t\n\f\r]/g;function dH(e){return typeof e=="object"?e.type==="text"?TC(e.value):!1:TC(e)}function TC(e){return e.replace(uH,"")===""}var Wd=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Wd.prototype.normal={};Wd.prototype.property={};Wd.prototype.space=void 0;function c5(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Wd(n,r,t)}function m0(e){return e.toLowerCase()}var Sr=class{constructor(e,t){this.attribute=t,this.property=e}};Sr.prototype.attribute="";Sr.prototype.booleanish=!1;Sr.prototype.boolean=!1;Sr.prototype.commaOrSpaceSeparated=!1;Sr.prototype.commaSeparated=!1;Sr.prototype.defined=!1;Sr.prototype.mustUseProperty=!1;Sr.prototype.number=!1;Sr.prototype.overloadedBoolean=!1;Sr.prototype.property="";Sr.prototype.spaceSeparated=!1;Sr.prototype.space=void 0;var Bm={};rA(Bm,{boolean:()=>We,booleanish:()=>gn,commaOrSpaceSeparated:()=>Mr,commaSeparated:()=>Zl,number:()=>fe,overloadedBoolean:()=>p0,spaceSeparated:()=>$t});var fH=0,We=Uo(),gn=Uo(),p0=Uo(),fe=Uo(),$t=Uo(),Zl=Uo(),Mr=Uo();function Uo(){return 2**++fH}var cb=Object.keys(Bm),iS=class extends Sr{constructor(e,t,n,r){let i=-1;if(super(e,t),CC(this,"space",r),typeof n=="number")for(;++i<cb.length;){const a=cb[i];CC(this,cb[i],(n&Bm[a])===Bm[a])}}};iS.prototype.defined=!0;function CC(e,t,n){n&&(e[t]=n)}function pc(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new iS(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[m0(r)]=r,n[m0(a.attribute)]=r}return new Wd(t,n,e.space)}var u5=pc({properties:{ariaActiveDescendant:null,ariaAtomic:gn,ariaAutoComplete:null,ariaBusy:gn,ariaChecked:gn,ariaColCount:fe,ariaColIndex:fe,ariaColSpan:fe,ariaControls:$t,ariaCurrent:null,ariaDescribedBy:$t,ariaDetails:null,ariaDisabled:gn,ariaDropEffect:$t,ariaErrorMessage:null,ariaExpanded:gn,ariaFlowTo:$t,ariaGrabbed:gn,ariaHasPopup:null,ariaHidden:gn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:$t,ariaLevel:fe,ariaLive:null,ariaModal:gn,ariaMultiLine:gn,ariaMultiSelectable:gn,ariaOrientation:null,ariaOwns:$t,ariaPlaceholder:null,ariaPosInSet:fe,ariaPressed:gn,ariaReadOnly:gn,ariaRelevant:null,ariaRequired:gn,ariaRoleDescription:$t,ariaRowCount:fe,ariaRowIndex:fe,ariaRowSpan:fe,ariaSelected:gn,ariaSetSize:fe,ariaSort:null,ariaValueMax:fe,ariaValueMin:fe,ariaValueNow:fe,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function d5(e,t){return t in e?e[t]:t}function f5(e,t){return d5(e,t.toLowerCase())}var hH=pc({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Zl,acceptCharset:$t,accessKey:$t,action:null,allow:null,allowFullScreen:We,allowPaymentRequest:We,allowUserMedia:We,alt:null,as:null,async:We,autoCapitalize:null,autoComplete:$t,autoFocus:We,autoPlay:We,blocking:$t,capture:null,charSet:null,checked:We,cite:null,className:$t,cols:fe,colSpan:null,content:null,contentEditable:gn,controls:We,controlsList:$t,coords:fe|Zl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:We,defer:We,dir:null,dirName:null,disabled:We,download:p0,draggable:gn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:We,formTarget:null,headers:$t,height:fe,hidden:p0,high:fe,href:null,hrefLang:null,htmlFor:$t,httpEquiv:$t,id:null,imageSizes:null,imageSrcSet:null,inert:We,inputMode:null,integrity:null,is:null,isMap:We,itemId:null,itemProp:$t,itemRef:$t,itemScope:We,itemType:$t,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:We,low:fe,manifest:null,max:null,maxLength:fe,media:null,method:null,min:null,minLength:fe,multiple:We,muted:We,name:null,nonce:null,noModule:We,noValidate:We,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:We,optimum:fe,pattern:null,ping:$t,placeholder:null,playsInline:We,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:We,referrerPolicy:null,rel:$t,required:We,reversed:We,rows:fe,rowSpan:fe,sandbox:$t,scope:null,scoped:We,seamless:We,selected:We,shadowRootClonable:We,shadowRootDelegatesFocus:We,shadowRootMode:null,shape:null,size:fe,sizes:null,slot:null,span:fe,spellCheck:gn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:fe,step:null,style:null,tabIndex:fe,target:null,title:null,translate:null,type:null,typeMustMatch:We,useMap:null,value:gn,width:fe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:$t,axis:null,background:null,bgColor:null,border:fe,borderColor:null,bottomMargin:fe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:We,declare:We,event:null,face:null,frame:null,frameBorder:null,hSpace:fe,leftMargin:fe,link:null,longDesc:null,lowSrc:null,marginHeight:fe,marginWidth:fe,noResize:We,noHref:We,noShade:We,noWrap:We,object:null,profile:null,prompt:null,rev:null,rightMargin:fe,rules:null,scheme:null,scrolling:gn,standby:null,summary:null,text:null,topMargin:fe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:fe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:We,disableRemotePlayback:We,prefix:null,property:null,results:fe,security:null,unselectable:null},space:"html",transform:f5}),mH=pc({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Mr,accentHeight:fe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:fe,amplitude:fe,arabicForm:null,ascent:fe,attributeName:null,attributeType:null,azimuth:fe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:fe,by:null,calcMode:null,capHeight:fe,className:$t,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:fe,diffuseConstant:fe,direction:null,display:null,dur:null,divisor:fe,dominantBaseline:null,download:We,dx:null,dy:null,edgeMode:null,editable:null,elevation:fe,enableBackground:null,end:null,event:null,exponent:fe,externalResourcesRequired:null,fill:null,fillOpacity:fe,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:Zl,g2:Zl,glyphName:Zl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:fe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:fe,horizOriginX:fe,horizOriginY:fe,id:null,ideographic:fe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:fe,k:fe,k1:fe,k2:fe,k3:fe,k4:fe,kernelMatrix:Mr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:fe,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:fe,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:fe,overlineThickness:fe,paintOrder:null,panose1:null,path:null,pathLength:fe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:$t,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:fe,pointsAtY:fe,pointsAtZ:fe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Mr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Mr,rev:Mr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Mr,requiredFeatures:Mr,requiredFonts:Mr,requiredFormats:Mr,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:fe,specularExponent:fe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:fe,strikethroughThickness:fe,string:null,stroke:null,strokeDashArray:Mr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:fe,strokeOpacity:fe,strokeWidth:null,style:null,surfaceScale:fe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Mr,tabIndex:fe,tableValues:null,target:null,targetX:fe,targetY:fe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Mr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:fe,underlineThickness:fe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:fe,values:null,vAlphabetic:fe,vMathematical:fe,vectorEffect:null,vHanging:fe,vIdeographic:fe,version:null,vertAdvY:fe,vertOriginX:fe,vertOriginY:fe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:fe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:d5}),h5=pc({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()}}),m5=pc({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:f5}),p5=pc({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),pH={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"},gH=/[A-Z]/g,EC=/-[a-z]/g,vH=/^data[-\w.:]+$/i;function OH(e,t){const n=m0(t);let r=t,i=Sr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&vH.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(EC,yH);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!EC.test(a)){let s=a.replace(gH,bH);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=iS}return new i(r,t)}function bH(e){return"-"+e.toLowerCase()}function yH(e){return e.charAt(1).toUpperCase()}var xH=c5([u5,hH,h5,m5,p5],"html"),aS=c5([u5,mH,h5,m5,p5],"svg");function SH(e){return e.join(" ").trim()}var wH=tp(XZ(),1),g5=v5("end"),sS=v5("start");function v5(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function _H(e){const t=sS(e),n=g5(e);if(t&&n)return{start:t,end:n}}function Wu(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?AC(e.position):"start"in e||"end"in e?AC(e):"line"in e||"column"in e?g0(e):""}function g0(e){return QC(e&&e.line)+":"+QC(e&&e.column)}function AC(e){return g0(e&&e.start)+"-"+g0(e&&e.end)}function QC(e){return e&&typeof e=="number"?e:1}var Vn=class extends Error{constructor(e,t,n){super(),typeof t=="string"&&(n=t,t=void 0);let r="",i={},a=!1;if(t&&("line"in t&&"column"in t?i={place:t}:"start"in t&&"end"in t?i={place:t}:"type"in t?i={ancestors:[t],place:t.position}:i={...t}),typeof e=="string"?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n=="string"){const l=n.indexOf(":");l===-1?i.ruleId=n:(i.source=n.slice(0,l),i.ruleId=n.slice(l+1))}if(!i.place&&i.ancestors&&i.ancestors){const l=i.ancestors[i.ancestors.length-1];l&&(i.place=l.position)}const s=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=s?s.line:void 0,this.name=Wu(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};Vn.prototype.file="";Vn.prototype.name="";Vn.prototype.reason="";Vn.prototype.message="";Vn.prototype.stack="";Vn.prototype.column=void 0;Vn.prototype.line=void 0;Vn.prototype.ancestors=void 0;Vn.prototype.cause=void 0;Vn.prototype.fatal=void 0;Vn.prototype.place=void 0;Vn.prototype.ruleId=void 0;Vn.prototype.source=void 0;var oS={}.hasOwnProperty,kH=new Map,jH=/[A-Z]/g,TH=new Set(["table","tbody","thead","tfoot","tr"]),CH=new Set(["td","th"]),O5="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function EH(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=LH(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");r=DH(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,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"?aS:xH,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=b5(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function b5(e,t,n){if(t.type==="element")return AH(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return QH(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return NH(e,t,n);if(t.type==="mdxjsEsm")return PH(e,t);if(t.type==="root")return RH(e,t,n);if(t.type==="text")return MH(e,t)}function AH(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=aS,e.schema=i),e.ancestors.push(t);const a=x5(e,t.tagName,!1),s=zH(e,t);let l=cS(e,t);return TH.has(t.tagName)&&(l=l.filter(function(c){return typeof c=="string"?!dH(c):!0})),y5(e,s,a,t),lS(s,l),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function QH(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}jd(e,t.position)}function PH(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);jd(e,t.position)}function NH(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=aS,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:x5(e,t.name,!0),s=$H(e,t),l=cS(e,t);return y5(e,s,a,t),lS(s,l),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function RH(e,t,n){const r={};return lS(r,cS(e,t)),e.create(t,e.Fragment,r,n)}function MH(e,t){return t.value}function y5(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function lS(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function DH(e,t,n){return r;function r(i,a,s,l){const d=Array.isArray(s.children)?n:t;return l?d(a,s,l):d(a,s)}}function LH(e,t){return n;function n(r,i,a,s){const l=Array.isArray(a.children),c=sS(r);return t(i,a,s,l,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function zH(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&oS.call(t.properties,i)){const a=IH(e,i,t.properties[i]);if(a){const[s,l]=a;e.tableCellAlignToStyle&&s==="align"&&typeof l=="string"&&CH.has(t.tagName)?r=l:n[s]=l}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function $H(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const s=a.expression;s.type;const l=s.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else jd(e,t.position);else{const i=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,a=e.evaluater.evaluateExpression(l.expression)}else jd(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function cS(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:kH;for(;++r<t.children.length;){const a=t.children[r];let s;if(e.passKeys){const c=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(c){const d=i.get(c)||0;s=c+"-"+d,i.set(c,d+1)}}const l=b5(e,a,s);l!==void 0&&n.push(l)}return n}function IH(e,t,n){const r=OH(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?sH(n):SH(n)),r.property==="style"){let i=typeof n=="object"?n:qH(e,String(n));return e.stylePropertyNameCase==="css"&&(i=XH(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?pH[r.property]||r.property:r.attribute,n]}}function qH(e,t){try{return(0,wH.default)(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Vn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=O5+"#cannot-parse-style-attribute",i}}function x5(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,s;for(;++a<i.length;){const l=jC(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};s=s?{type:"MemberExpression",object:s,property:l,computed:!!(a&&l.type==="Literal"),optional:!1}:l}r=s}else r=jC(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return oS.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);jd(e)}function jd(e,t){const n=new Vn("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=O5+"#cannot-handle-mdx-estrees-without-createevaluater",n}function XH(e){const t={};let n;for(n in e)oS.call(e,n)&&(t[ZH(n)]=e[n]);return t}function ZH(e){let t=e.replace(jH,BH);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function BH(e){return"-"+e.toLowerCase()}var ub={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"]},VH={};function uS(e,t){const n=VH,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return S5(e,r,i)}function S5(e,t,n){if(UH(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 PC(e.children,t,n)}return Array.isArray(e)?PC(e,t,n):""}function PC(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=S5(e[i],t,n);return r.join("")}function UH(e){return!!(e&&typeof e=="object")}var NC={AElig:"Æ",AMP:"&",Aacute:"Á",Abreve:"Ă",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"",Aring:"Å",Ascr:"𝒜",Assign:"≔",Atilde:"Ã",Auml:"Ä",Backslash:"∖",Barv:"⫧",Barwed:"⌆",Bcy:"Б",Because:"∵",Bernoullis:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",Bscr:"ℬ",Bumpeq:"≎",CHcy:"Ч",COPY:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",Cayleys:"ℭ",Ccaron:"Č",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",CenterDot:"·",Cfr:"ℭ",Chi:"Χ",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",Colon:"∷",Colone:"⩴",Congruent:"≡",Conint:"∯",ContourIntegral:"∮",Copf:"ℂ",Coproduct:"∐",CounterClockwiseContourIntegral:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",DD:"ⅅ",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",Darr:"↡",Dashv:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",Diamond:"⋄",DifferentialD:"ⅆ",Dopf:"𝔻",Dot:"¨",DotDot:"⃜",DotEqual:"≐",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",Downarrow:"⇓",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ETH:"Ð",Eacute:"É",Ecaron:"Ě",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrave:"È",Element:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",Equilibrium:"⇌",Escr:"ℰ",Esim:"⩳",Eta:"Η",Euml:"Ë",Exists:"∃",ExponentialE:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",Fopf:"𝔽",ForAll:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",GT:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",Gt:"≫",HARDcy:"Ъ",Hacek:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",HilbertSpace:"ℋ",Hopf:"ℍ",HorizontalLine:"─",Hscr:"ℋ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacute:"Í",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Igrave:"Ì",Im:"ℑ",Imacr:"Ī",ImaginaryI:"ⅈ",Implies:"⇒",Int:"∬",Integral:"∫",Intersection:"⋂",InvisibleComma:"",InvisibleTimes:"",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",Itilde:"Ĩ",Iukcy:"І",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",LT:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Larr:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",LeftRightArrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessLess:"⪡",LessSlantEqual:"⩽",LessTilde:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lopf:"𝕃",LowerLeftArrow:"↙",LowerRightArrow:"↘",Lscr:"ℒ",Lsh:"↰",Lstrok:"Ł",Lt:"≪",Map:"⤅",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",MinusPlus:"∓",Mopf:"𝕄",Mscr:"ℳ",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
|
|
136
|
-
`,Nfr:"𝔑",NoBreak:"",NonBreakingSpace:" ",Nopf:"ℕ",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"𝒩",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacute:"Ó",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",Or:"⩔",Oscr:"𝒪",Oslash:"Ø",Otilde:"Õ",Otimes:"⨷",Ouml:"Ö",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",Poincareplane:"ℌ",Popf:"ℙ",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"𝒫",Psi:"Ψ",QUOT:'"',Qfr:"𝔔",Qopf:"ℚ",Qscr:"𝒬",RBarr:"⤐",REG:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"ℜ",Rho:"Ρ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"ℛ",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"𝕊",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"𝒮",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THORN:"Þ",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:" ",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",Theta:"Θ",ThickSpace:" ",ThinSpace:" ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"𝕋",TripleDot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"⇕",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",ZeroWidthSpace:"",Zeta:"Ζ",Zfr:"ℨ",Zopf:"ℤ",Zscr:"𝒵",aacute:"á",abreve:"ă",ac:"∾",acE:"∾̳",acd:"∿",acirc:"â",acute:"´",acy:"а",aelig:"æ",af:"",afr:"𝔞",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",amp:"&",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",aopf:"𝕒",ap:"≈",apE:"⩰",apacir:"⩯",ape:"≊",apid:"≋",apos:"'",approx:"≈",approxeq:"≊",aring:"å",ascr:"𝒶",ast:"*",asymp:"≈",asympeq:"≍",atilde:"ã",auml:"ä",awconint:"∳",awint:"⨑",bNot:"⫭",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",beta:"β",beth:"ℶ",between:"≬",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxh:"─",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",bprime:"‵",breve:"˘",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",bumpeq:"≏",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",caron:"ˇ",ccaps:"⩍",ccaron:"č",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cedil:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledR:"®",circledS:"Ⓢ",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",conint:"∮",copf:"𝕔",coprod:"∐",copy:"©",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dArr:"⇓",dHar:"⥥",dagger:"†",daleth:"ℸ",darr:"↓",dash:"‐",dashv:"⊣",dbkarow:"⤏",dblac:"˝",dcaron:"ď",dcy:"д",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",ddotseq:"⩷",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",dharl:"⇃",dharr:"⇂",diam:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",dot:"˙",doteq:"≐",doteqdot:"≑",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",downarrow:"↓",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eDDot:"⩷",eDot:"≑",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"≖",ecirc:"ê",ecolon:"≕",ecy:"э",edot:"ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",eg:"⪚",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",equals:"=",equest:"≟",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",erarr:"⥱",escr:"ℯ",esdot:"≐",esim:"≂",eta:"η",eth:"ð",euml:"ë",euro:"€",excl:"!",exist:"∃",expectation:"ℰ",exponentiale:"ⅇ",fallingdotseq:"≒",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",forall:"∀",fork:"⋔",forkv:"⫙",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",gE:"≧",gEl:"⪌",gacute:"ǵ",gamma:"γ",gammad:"ϝ",gap:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",ge:"≥",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gg:"≫",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",gl:"≷",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",grave:"`",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",hArr:"⇔",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",harr:"↔",harrcir:"⥈",harrw:"↭",hbar:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hslash:"ℏ",hstrok:"ħ",hybull:"⁃",hyphen:"‐",iacute:"í",ic:"",icirc:"î",icy:"и",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",image:"ℑ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",intcal:"⊺",integers:"ℤ",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",isin:"∈",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",itilde:"ĩ",iukcy:"і",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAarr:"⇚",lArr:"⇐",lAtail:"⤛",lBarr:"⤎",lE:"≦",lEg:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",laquo:"«",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lceil:"⌈",lcub:"{",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leftarrow:"←",leftarrowtail:"↢",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",leftthreetimes:"⋋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",lessgtr:"≶",lesssim:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",lg:"≶",lgE:"⪑",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",ll:"≪",llarr:"⇇",llcorner:"⌞",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",longleftrightarrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",ltrie:"⊴",ltrif:"◂",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",measuredangle:"∡",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",mp:"∓",mscr:"𝓂",mstpos:"∾",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nGtv:"≫̸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nLl:"⋘̸",nLt:"≪⃒",nLtv:"≪̸",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",nabla:"∇",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",ne:"≠",neArr:"⇗",nearhk:"⤤",nearr:"↗",nearrow:"↗",nedot:"≐̸",nequiv:"≢",nesear:"⤨",nesim:"≂̸",nexist:"∄",nexists:"∄",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",ngsim:"≵",ngt:"≯",ngtr:"≯",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",nlArr:"⇍",nlE:"≦̸",nlarr:"↚",nldr:"‥",nle:"≰",nleftarrow:"↚",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nlsim:"≴",nlt:"≮",nltri:"⋪",nltrie:"⋬",nmid:"∤",nopf:"𝕟",not:"¬",notin:"∉",notinE:"⋹̸",notindot:"⋵̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",oS:"Ⓢ",oacute:"ó",oast:"⊛",ocir:"⊚",ocirc:"ô",ocy:"о",odash:"⊝",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",opar:"⦷",operp:"⦹",oplus:"⊕",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oscr:"ℴ",oslash:"ø",osol:"⊘",otilde:"õ",otimes:"⊗",otimesas:"⨶",ouml:"ö",ovbar:"⌽",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",pointint:"⨕",popf:"𝕡",pound:"£",pr:"≺",prE:"⪳",prap:"⪷",prcue:"≼",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",primes:"ℙ",prnE:"⪵",prnap:"⪹",prnsim:"⋨",prod:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qint:"⨌",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',rAarr:"⇛",rArr:"⇒",rAtail:"⤜",rBarr:"⤏",rHar:"⥤",race:"∽̱",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rarrw:"↝",ratail:"⤚",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rceil:"⌉",rcub:"}",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",reg:"®",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",rhov:"ϱ",rightarrow:"→",rightarrowtail:"↣",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",rightthreetimes:"⋌",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",rsaquo:"›",rscr:"𝓇",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",sbquo:"‚",sc:"≻",scE:"⪴",scap:"⪸",scaron:"š",sccue:"≽",sce:"⪰",scedil:"ş",scirc:"ŝ",scnE:"⪶",scnap:"⪺",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",seArr:"⇘",searhk:"⤥",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",sfrown:"⌢",sharp:"♯",shchcy:"щ",shcy:"ш",shortmid:"∣",shortparallel:"∥",shy:"",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",subE:"⫅",subdot:"⪽",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",supE:"⫆",supdot:"⪾",supdsub:"⫘",supe:"⊇",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swarhk:"⤦",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",target:"⌖",tau:"τ",tbrk:"⎴",tcaron:"ť",tcedil:"ţ",tcy:"т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",there4:"∴",therefore:"∴",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",thinsp:" ",thkap:"≈",thksim:"∼",thorn:"þ",tilde:"˜",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uArr:"⇑",uHar:"⥣",uacute:"ú",uarr:"↑",ubrcy:"ў",ubreve:"ŭ",ucirc:"û",ucy:"у",udarr:"⇅",udblac:"ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",ugrave:"ù",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",uml:"¨",uogon:"ų",uopf:"𝕦",uparrow:"↑",updownarrow:"↕",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",upsi:"υ",upsih:"ϒ",upsilon:"υ",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uuml:"ü",uwangle:"⦧",vArr:"⇕",vBar:"⫨",vBarv:"⫩",vDash:"⊨",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vcy:"в",vdash:"⊢",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",vert:"|",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",vprop:"∝",vrtri:"⊳",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",wedgeq:"≙",weierp:"℘",wfr:"𝔴",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeetrf:"ℨ",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"",zwnj:""},YH={}.hasOwnProperty;function dS(e){return YH.call(NC,e)?NC[e]:!1}function zr(e,t,n,r){const i=e.length;let a=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);a<r.length;)s=r.slice(a,a+1e4),s.unshift(t,0),e.splice(...s),a+=1e4,t+=1e4}function ni(e,t){return e.length>0?(zr(e,e.length,0,t),e):t}var RC={}.hasOwnProperty;function w5(e){const t={};let n=-1;for(;++n<e.length;)WH(t,e[n]);return t}function WH(e,t){let n;for(n in t){const i=(RC.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let s;if(a)for(s in a){RC.call(i,s)||(i[s]=[]);const l=a[s];FH(i[s],Array.isArray(l)?l:l?[l]:[])}}}function FH(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);zr(e,0,0,r)}function _5(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 Ti(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var Kn=Zs(/[A-Za-z]/),Zn=Zs(/[\dA-Za-z]/),HH=Zs(/[#-'*+\--9=?A-Z^-~]/);function Vm(e){return e!==null&&(e<32||e===127)}var v0=Zs(/\d/),GH=Zs(/[\dA-Fa-f]/),KH=Zs(/[!-/:-@[-`{-~]/);function ze(e){return e!==null&&e<-2}function Mt(e){return e!==null&&(e<0||e===32)}function it(e){return e===-2||e===-1||e===32}var Qp=Zs(new RegExp("\\p{P}|\\p{S}","u")),Ro=Zs(/\s/);function Zs(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function gc(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let s="";if(a===37&&Zn(e.charCodeAt(n+1))&&Zn(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(s=String.fromCharCode(a));else if(a>55295&&a<57344){const l=e.charCodeAt(n+1);a<56320&&l>56319&&l<57344?(s=String.fromCharCode(a,l),i=1):s="�"}else s=String.fromCharCode(a);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function pt(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return s;function s(c){return it(c)?(e.enter(n),l(c)):t(c)}function l(c){return it(c)&&a++<i?(e.consume(c),l):(e.exit(n),t(c))}}var JH={tokenize:e4};function e4(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),pt(e,t,"linePrefix")}function i(l){return e.enter("paragraph"),a(l)}function a(l){const c=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,s(l)}function s(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return ze(l)?(e.consume(l),e.exit("chunkText"),a):(e.consume(l),s)}}var t4={tokenize:n4},MC={tokenize:r4};function n4(e){const t=this,n=[];let r=0,i,a,s;return l;function l(j){if(r<n.length){const E=n[r];return t.containerState=E[1],e.attempt(E[0].continuation,c,d)(j)}return d(j)}function c(j){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&T();const E=t.events.length;let Q=E,P;for(;Q--;)if(t.events[Q][0]==="exit"&&t.events[Q][1].type==="chunkFlow"){P=t.events[Q][1].end;break}k(r);let N=E;for(;N<t.events.length;)t.events[N][1].end={...P},N++;return zr(t.events,Q+1,0,t.events.slice(E)),t.events.length=N,d(j)}return l(j)}function d(j){if(r===n.length){if(!i)return p(j);if(i.currentConstruct&&i.currentConstruct.concrete)return b(j);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(MC,f,m)(j)}function f(j){return i&&T(),k(r),p(j)}function m(j){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,b(j)}function p(j){return t.containerState={},e.attempt(MC,O,b)(j)}function O(j){return r++,n.push([t.currentConstruct,t.containerState]),p(j)}function b(j){if(j===null){i&&T(),k(0),e.consume(j);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),x(j)}function x(j){if(j===null){w(e.exit("chunkFlow"),!0),k(0),e.consume(j);return}return ze(j)?(e.consume(j),w(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(j),x)}function w(j,E){const Q=t.sliceStream(j);if(E&&Q.push(null),j.previous=a,a&&(a.next=j),a=j,i.defineSkip(j.start),i.write(Q),t.parser.lazy[j.start.line]){let P=i.events.length;for(;P--;)if(i.events[P][1].start.offset<s&&(!i.events[P][1].end||i.events[P][1].end.offset>s))return;const N=t.events.length;let D=N,L,A;for(;D--;)if(t.events[D][0]==="exit"&&t.events[D][1].type==="chunkFlow"){if(L){A=t.events[D][1].end;break}L=!0}for(k(r),P=N;P<t.events.length;)t.events[P][1].end={...A},P++;zr(t.events,D+1,0,t.events.slice(N)),t.events.length=P}}function k(j){let E=n.length;for(;E-- >j;){const Q=n[E];t.containerState=Q[1],Q[0].exit.call(t,e)}n.length=j}function T(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function r4(e,t,n){return pt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ic(e){if(e===null||Mt(e)||Ro(e))return 1;if(Qp(e))return 2}function Pp(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var O0={name:"attention",resolveAll:i4,tokenize:a4};function i4(e,t){let n=-1,r,i,a,s,l,c,d,f;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m={...e[r][1].end},p={...e[n][1].start};DC(m,-c),DC(p,c),s={type:c>1?"strongSequence":"emphasisSequence",start:m,end:{...e[r][1].end}},l={type:c>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},a={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?"strong":"emphasis",start:{...s.start},end:{...l.end}},e[r][1].end={...s.start},e[n][1].start={...l.end},d=[],e[r][1].end.offset-e[r][1].start.offset&&(d=ni(d,[["enter",e[r][1],t],["exit",e[r][1],t]])),d=ni(d,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",a,t]]),d=ni(d,Pp(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),d=ni(d,[["exit",a,t],["enter",l,t],["exit",l,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,d=ni(d,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,zr(e,r-1,n-r+3,d),n=r+d.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function a4(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=ic(r);let a;return s;function s(c){return a=c,e.enter("attentionSequence"),l(c)}function l(c){if(c===a)return e.consume(c),l;const d=e.exit("attentionSequence"),f=ic(c),m=!f||f===2&&i||n.includes(c),p=!i||i===2&&f||n.includes(r);return d._open=!!(a===42?m:m&&(i||!p)),d._close=!!(a===42?p:p&&(f||!m)),t(c)}}function DC(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var s4={name:"autolink",tokenize:o4};function o4(e,t,n){let r=0;return i;function i(O){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(O),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(O){return Kn(O)?(e.consume(O),s):O===64?n(O):d(O)}function s(O){return O===43||O===45||O===46||Zn(O)?(r=1,l(O)):d(O)}function l(O){return O===58?(e.consume(O),r=0,c):(O===43||O===45||O===46||Zn(O))&&r++<32?(e.consume(O),l):(r=0,d(O))}function c(O){return O===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(O),e.exit("autolinkMarker"),e.exit("autolink"),t):O===null||O===32||O===60||Vm(O)?n(O):(e.consume(O),c)}function d(O){return O===64?(e.consume(O),f):HH(O)?(e.consume(O),d):n(O)}function f(O){return Zn(O)?m(O):n(O)}function m(O){return O===46?(e.consume(O),r=0,f):O===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(O),e.exit("autolinkMarker"),e.exit("autolink"),t):p(O)}function p(O){if((O===45||Zn(O))&&r++<63){const b=O===45?p:m;return e.consume(O),b}return n(O)}}var Fd={partial:!0,tokenize:l4};function l4(e,t,n){return r;function r(a){return it(a)?pt(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||ze(a)?t(a):n(a)}}var k5={continuation:{tokenize:u4},exit:d4,name:"blockQuote",tokenize:c4};function c4(e,t,n){const r=this;return i;function i(s){if(s===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),a}return n(s)}function a(s){return it(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function u4(e,t,n){const r=this;return i;function i(s){return it(s)?pt(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):a(s)}function a(s){return e.attempt(k5,t,n)(s)}}function d4(e){e.exit("blockQuote")}var j5={name:"characterEscape",tokenize:f4};function f4(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return KH(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}var T5={name:"characterReference",tokenize:h4};function h4(e,t,n){const r=this;let i=0,a,s;return l;function l(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),c}function c(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),d):(e.enter("characterReferenceValue"),a=31,s=Zn,f(m))}function d(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,s=GH,f):(e.enter("characterReferenceValue"),a=7,s=v0,f(m))}function f(m){if(m===59&&i){const p=e.exit("characterReferenceValue");return s===Zn&&!dS(r.sliceSerialize(p))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(m)&&i++<a?(e.consume(m),f):n(m)}}var LC={partial:!0,tokenize:p4},zC={concrete:!0,name:"codeFenced",tokenize:m4};function m4(e,t,n){const r=this,i={partial:!0,tokenize:Q};let a=0,s=0,l;return c;function c(P){return d(P)}function d(P){const N=r.events[r.events.length-1];return a=N&&N[1].type==="linePrefix"?N[2].sliceSerialize(N[1],!0).length:0,l=P,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(P)}function f(P){return P===l?(s++,e.consume(P),f):s<3?n(P):(e.exit("codeFencedFenceSequence"),it(P)?pt(e,m,"whitespace")(P):m(P))}function m(P){return P===null||ze(P)?(e.exit("codeFencedFence"),r.interrupt?t(P):e.check(LC,x,E)(P)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(P))}function p(P){return P===null||ze(P)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(P)):it(P)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),pt(e,O,"whitespace")(P)):P===96&&P===l?n(P):(e.consume(P),p)}function O(P){return P===null||ze(P)?m(P):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),b(P))}function b(P){return P===null||ze(P)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(P)):P===96&&P===l?n(P):(e.consume(P),b)}function x(P){return e.attempt(i,E,w)(P)}function w(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),k}function k(P){return a>0&&it(P)?pt(e,T,"linePrefix",a+1)(P):T(P)}function T(P){return P===null||ze(P)?e.check(LC,x,E)(P):(e.enter("codeFlowValue"),j(P))}function j(P){return P===null||ze(P)?(e.exit("codeFlowValue"),T(P)):(e.consume(P),j)}function E(P){return e.exit("codeFenced"),t(P)}function Q(P,N,D){let L=0;return A;function A(W){return P.enter("lineEnding"),P.consume(W),P.exit("lineEnding"),X}function X(W){return P.enter("codeFencedFence"),it(W)?pt(P,Z,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(W):Z(W)}function Z(W){return W===l?(P.enter("codeFencedFenceSequence"),V(W)):D(W)}function V(W){return W===l?(L++,P.consume(W),V):L>=s?(P.exit("codeFencedFenceSequence"),it(W)?pt(P,$,"whitespace")(W):$(W)):D(W)}function $(W){return W===null||ze(W)?(P.exit("codeFencedFence"),N(W)):D(W)}}}function p4(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}var db={name:"codeIndented",tokenize:v4},g4={partial:!0,tokenize:O4};function v4(e,t,n){const r=this;return i;function i(d){return e.enter("codeIndented"),pt(e,a,"linePrefix",5)(d)}function a(d){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?s(d):n(d)}function s(d){return d===null?c(d):ze(d)?e.attempt(g4,s,c)(d):(e.enter("codeFlowValue"),l(d))}function l(d){return d===null||ze(d)?(e.exit("codeFlowValue"),s(d)):(e.consume(d),l)}function c(d){return e.exit("codeIndented"),t(d)}}function O4(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):ze(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):pt(e,a,"linePrefix",5)(s)}function a(s){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):ze(s)?i(s):n(s)}}var b4={name:"codeText",previous:x4,resolve:y4,tokenize:S4};function y4(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function x4(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function S4(e,t,n){let r=0,i,a;return s;function s(m){return e.enter("codeText"),e.enter("codeTextSequence"),l(m)}function l(m){return m===96?(e.consume(m),r++,l):(e.exit("codeTextSequence"),c(m))}function c(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),c):m===96?(a=e.enter("codeTextSequence"),i=0,f(m)):ze(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),c):(e.enter("codeTextData"),d(m))}function d(m){return m===null||m===32||m===96||ze(m)?(e.exit("codeTextData"),c(m)):(e.consume(m),d)}function f(m){return m===96?(e.consume(m),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(a.type="codeTextData",d(m))}}var w4=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const n=t??Number.POSITIVE_INFINITY;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const r=t||0;this.setCursor(Math.trunc(e));const i=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&bu(this.left,n),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),bu(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),bu(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);bu(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);bu(this.left,t.reverse())}}};function bu(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 C5(e){const t={};let n=-1,r,i,a,s,l,c,d;const f=new w4(e);for(;++n<f.length;){for(;n in t;)n=t[n];if(r=f.get(n),n&&r[1].type==="chunkFlow"&&f.get(n-1)[1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type==="lineEndingBlank"&&(a+=2),a<c.length&&c[a][1].type==="content"))for(;++a<c.length&&c[a][1].type!=="content";)c[a][1].type==="chunkText"&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,_4(f,n)),n=t[n],d=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(s=f.get(a),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=a);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},l=f.slice(i,n),l.unshift(r),f.splice(i,n-i+1,l))}}return zr(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!d}function _4(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const a=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const l=s.events,c=[],d={};let f,m,p=-1,O=n,b=0,x=0;const w=[x];for(;O;){for(;e.get(++i)[1]!==O;);a.push(i),O._tokenizer||(f=r.sliceStream(O),O.next||f.push(null),m&&s.defineSkip(O.start),O._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(f),O._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),m=O,O=O.next}for(O=n;++p<l.length;)l[p][0]==="exit"&&l[p-1][0]==="enter"&&l[p][1].type===l[p-1][1].type&&l[p][1].start.line!==l[p][1].end.line&&(x=p+1,w.push(x),O._tokenizer=void 0,O.previous=void 0,O=O.next);for(s.events=[],O?(O._tokenizer=void 0,O.previous=void 0):w.pop(),p=w.length;p--;){const k=l.slice(w[p],w[p+1]),T=a.pop();c.push([T,T+k.length-1]),e.splice(T,2,k)}for(c.reverse(),p=-1;++p<c.length;)d[b+c[p][0]]=b+c[p][1],b+=c[p][1]-c[p][0]-1;return d}var k4={resolve:T4,tokenize:C4},j4={partial:!0,tokenize:E4};function T4(e){return C5(e),e}function C4(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(l)}function i(l){return l===null?a(l):ze(l)?e.check(j4,s,a)(l):(e.consume(l),i)}function a(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function s(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function E4(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),pt(e,a,"linePrefix")}function a(s){if(s===null||ze(s))return n(s);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function E5(e,t,n,r,i,a,s,l,c){const d=c||Number.POSITIVE_INFINITY;let f=0;return m;function m(k){return k===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(k),e.exit(a),p):k===null||k===32||k===41||Vm(k)?n(k):(e.enter(r),e.enter(s),e.enter(l),e.enter("chunkString",{contentType:"string"}),x(k))}function p(k){return k===62?(e.enter(a),e.consume(k),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),O(k))}function O(k){return k===62?(e.exit("chunkString"),e.exit(l),p(k)):k===null||k===60||ze(k)?n(k):(e.consume(k),k===92?b:O)}function b(k){return k===60||k===62||k===92?(e.consume(k),O):O(k)}function x(k){return!f&&(k===null||k===41||Mt(k))?(e.exit("chunkString"),e.exit(l),e.exit(s),e.exit(r),t(k)):f<d&&k===40?(e.consume(k),f++,x):k===41?(e.consume(k),f--,x):k===null||k===32||k===40||Vm(k)?n(k):(e.consume(k),k===92?w:x)}function w(k){return k===40||k===41||k===92?(e.consume(k),x):x(k)}}function A5(e,t,n,r,i,a){const s=this;let l=0,c;return d;function d(O){return e.enter(r),e.enter(i),e.consume(O),e.exit(i),e.enter(a),f}function f(O){return l>999||O===null||O===91||O===93&&!c||O===94&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?n(O):O===93?(e.exit(a),e.enter(i),e.consume(O),e.exit(i),e.exit(r),t):ze(O)?(e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),m(O))}function m(O){return O===null||O===91||O===93||ze(O)||l++>999?(e.exit("chunkString"),f(O)):(e.consume(O),c||(c=!it(O)),O===92?p:m)}function p(O){return O===91||O===92||O===93?(e.consume(O),l++,m):m(O)}}function Q5(e,t,n,r,i,a){let s;return l;function l(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),s=p===40?41:p,c):n(p)}function c(p){return p===s?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(a),d(p))}function d(p){return p===s?(e.exit(a),c(s)):p===null?n(p):ze(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),pt(e,d,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===s||p===null||ze(p)?(e.exit("chunkString"),d(p)):(e.consume(p),p===92?m:f)}function m(p){return p===s||p===92?(e.consume(p),f):f(p)}}function Fu(e,t){let n;return r;function r(i){return ze(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):it(i)?pt(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}var A4={name:"definition",tokenize:P4},Q4={partial:!0,tokenize:N4};function P4(e,t,n){const r=this;let i;return a;function a(O){return e.enter("definition"),s(O)}function s(O){return A5.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(O)}function l(O){return i=Ti(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),O===58?(e.enter("definitionMarker"),e.consume(O),e.exit("definitionMarker"),c):n(O)}function c(O){return Mt(O)?Fu(e,d)(O):d(O)}function d(O){return E5(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(O)}function f(O){return e.attempt(Q4,m,m)(O)}function m(O){return it(O)?pt(e,p,"whitespace")(O):p(O)}function p(O){return O===null||ze(O)?(e.exit("definition"),r.parser.defined.push(i),t(O)):n(O)}}function N4(e,t,n){return r;function r(l){return Mt(l)?Fu(e,i)(l):n(l)}function i(l){return Q5(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function a(l){return it(l)?pt(e,s,"whitespace")(l):s(l)}function s(l){return l===null||ze(l)?t(l):n(l)}}var R4={name:"hardBreakEscape",tokenize:M4};function M4(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return ze(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}var D4={name:"headingAtx",resolve:L4,tokenize:z4};function L4(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},zr(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function z4(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),a(f)}function a(f){return e.enter("atxHeadingSequence"),s(f)}function s(f){return f===35&&r++<6?(e.consume(f),s):f===null||Mt(f)?(e.exit("atxHeadingSequence"),l(f)):n(f)}function l(f){return f===35?(e.enter("atxHeadingSequence"),c(f)):f===null||ze(f)?(e.exit("atxHeading"),t(f)):it(f)?pt(e,l,"whitespace")(f):(e.enter("atxHeadingText"),d(f))}function c(f){return f===35?(e.consume(f),c):(e.exit("atxHeadingSequence"),l(f))}function d(f){return f===null||f===35||Mt(f)?(e.exit("atxHeadingText"),l(f)):(e.consume(f),d)}}var $4=["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"],$C=["pre","script","style","textarea"],I4={concrete:!0,name:"htmlFlow",resolveTo:Z4,tokenize:B4},q4={partial:!0,tokenize:U4},X4={partial:!0,tokenize:V4};function Z4(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 B4(e,t,n){const r=this;let i,a,s,l,c;return d;function d(M){return f(M)}function f(M){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(M),m}function m(M){return M===33?(e.consume(M),p):M===47?(e.consume(M),a=!0,x):M===63?(e.consume(M),i=3,r.interrupt?t:q):Kn(M)?(e.consume(M),s=String.fromCharCode(M),w):n(M)}function p(M){return M===45?(e.consume(M),i=2,O):M===91?(e.consume(M),i=5,l=0,b):Kn(M)?(e.consume(M),i=4,r.interrupt?t:q):n(M)}function O(M){return M===45?(e.consume(M),r.interrupt?t:q):n(M)}function b(M){const he="CDATA[";return M===he.charCodeAt(l++)?(e.consume(M),l===he.length?r.interrupt?t:Z:b):n(M)}function x(M){return Kn(M)?(e.consume(M),s=String.fromCharCode(M),w):n(M)}function w(M){if(M===null||M===47||M===62||Mt(M)){const he=M===47,ye=s.toLowerCase();return!he&&!a&&$C.includes(ye)?(i=1,r.interrupt?t(M):Z(M)):$4.includes(s.toLowerCase())?(i=6,he?(e.consume(M),k):r.interrupt?t(M):Z(M)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(M):a?T(M):j(M))}return M===45||Zn(M)?(e.consume(M),s+=String.fromCharCode(M),w):n(M)}function k(M){return M===62?(e.consume(M),r.interrupt?t:Z):n(M)}function T(M){return it(M)?(e.consume(M),T):A(M)}function j(M){return M===47?(e.consume(M),A):M===58||M===95||Kn(M)?(e.consume(M),E):it(M)?(e.consume(M),j):A(M)}function E(M){return M===45||M===46||M===58||M===95||Zn(M)?(e.consume(M),E):Q(M)}function Q(M){return M===61?(e.consume(M),P):it(M)?(e.consume(M),Q):j(M)}function P(M){return M===null||M===60||M===61||M===62||M===96?n(M):M===34||M===39?(e.consume(M),c=M,N):it(M)?(e.consume(M),P):D(M)}function N(M){return M===c?(e.consume(M),c=null,L):M===null||ze(M)?n(M):(e.consume(M),N)}function D(M){return M===null||M===34||M===39||M===47||M===60||M===61||M===62||M===96||Mt(M)?Q(M):(e.consume(M),D)}function L(M){return M===47||M===62||it(M)?j(M):n(M)}function A(M){return M===62?(e.consume(M),X):n(M)}function X(M){return M===null||ze(M)?Z(M):it(M)?(e.consume(M),X):n(M)}function Z(M){return M===45&&i===2?(e.consume(M),I):M===60&&i===1?(e.consume(M),z):M===62&&i===4?(e.consume(M),G):M===63&&i===3?(e.consume(M),q):M===93&&i===5?(e.consume(M),le):ze(M)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(q4,re,V)(M)):M===null||ze(M)?(e.exit("htmlFlowData"),V(M)):(e.consume(M),Z)}function V(M){return e.check(X4,$,re)(M)}function $(M){return e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),W}function W(M){return M===null||ze(M)?V(M):(e.enter("htmlFlowData"),Z(M))}function I(M){return M===45?(e.consume(M),q):Z(M)}function z(M){return M===47?(e.consume(M),s="",ee):Z(M)}function ee(M){if(M===62){const he=s.toLowerCase();return $C.includes(he)?(e.consume(M),G):Z(M)}return Kn(M)&&s.length<8?(e.consume(M),s+=String.fromCharCode(M),ee):Z(M)}function le(M){return M===93?(e.consume(M),q):Z(M)}function q(M){return M===62?(e.consume(M),G):M===45&&i===2?(e.consume(M),q):Z(M)}function G(M){return M===null||ze(M)?(e.exit("htmlFlowData"),re(M)):(e.consume(M),G)}function re(M){return e.exit("htmlFlow"),t(M)}}function V4(e,t,n){const r=this;return i;function i(s){return ze(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a):n(s)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function U4(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Fd,t,n)}}var Y4={name:"htmlText",tokenize:W4};function W4(e,t,n){const r=this;let i,a,s;return l;function l(q){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(q),c}function c(q){return q===33?(e.consume(q),d):q===47?(e.consume(q),Q):q===63?(e.consume(q),j):Kn(q)?(e.consume(q),D):n(q)}function d(q){return q===45?(e.consume(q),f):q===91?(e.consume(q),a=0,b):Kn(q)?(e.consume(q),T):n(q)}function f(q){return q===45?(e.consume(q),O):n(q)}function m(q){return q===null?n(q):q===45?(e.consume(q),p):ze(q)?(s=m,z(q)):(e.consume(q),m)}function p(q){return q===45?(e.consume(q),O):m(q)}function O(q){return q===62?I(q):q===45?p(q):m(q)}function b(q){const G="CDATA[";return q===G.charCodeAt(a++)?(e.consume(q),a===G.length?x:b):n(q)}function x(q){return q===null?n(q):q===93?(e.consume(q),w):ze(q)?(s=x,z(q)):(e.consume(q),x)}function w(q){return q===93?(e.consume(q),k):x(q)}function k(q){return q===62?I(q):q===93?(e.consume(q),k):x(q)}function T(q){return q===null||q===62?I(q):ze(q)?(s=T,z(q)):(e.consume(q),T)}function j(q){return q===null?n(q):q===63?(e.consume(q),E):ze(q)?(s=j,z(q)):(e.consume(q),j)}function E(q){return q===62?I(q):j(q)}function Q(q){return Kn(q)?(e.consume(q),P):n(q)}function P(q){return q===45||Zn(q)?(e.consume(q),P):N(q)}function N(q){return ze(q)?(s=N,z(q)):it(q)?(e.consume(q),N):I(q)}function D(q){return q===45||Zn(q)?(e.consume(q),D):q===47||q===62||Mt(q)?L(q):n(q)}function L(q){return q===47?(e.consume(q),I):q===58||q===95||Kn(q)?(e.consume(q),A):ze(q)?(s=L,z(q)):it(q)?(e.consume(q),L):I(q)}function A(q){return q===45||q===46||q===58||q===95||Zn(q)?(e.consume(q),A):X(q)}function X(q){return q===61?(e.consume(q),Z):ze(q)?(s=X,z(q)):it(q)?(e.consume(q),X):L(q)}function Z(q){return q===null||q===60||q===61||q===62||q===96?n(q):q===34||q===39?(e.consume(q),i=q,V):ze(q)?(s=Z,z(q)):it(q)?(e.consume(q),Z):(e.consume(q),$)}function V(q){return q===i?(e.consume(q),i=void 0,W):q===null?n(q):ze(q)?(s=V,z(q)):(e.consume(q),V)}function $(q){return q===null||q===34||q===39||q===60||q===61||q===96?n(q):q===47||q===62||Mt(q)?L(q):(e.consume(q),$)}function W(q){return q===47||q===62||Mt(q)?L(q):n(q)}function I(q){return q===62?(e.consume(q),e.exit("htmlTextData"),e.exit("htmlText"),t):n(q)}function z(q){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(q),e.exit("lineEnding"),ee}function ee(q){return it(q)?pt(e,le,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(q):le(q)}function le(q){return e.enter("htmlTextData"),s(q)}}var fS={name:"labelEnd",resolveAll:K4,resolveTo:J4,tokenize:eG},F4={tokenize:tG},H4={tokenize:nG},G4={tokenize:rG};function K4(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&zr(e,0,e.length,n),e}function J4(e,t){let n=e.length,r=0,i,a,s,l;for(;n--;)if(i=e[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const c={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},d={type:"label",start:{...e[a][1].start},end:{...e[s][1].end}},f={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[s-2][1].start}};return l=[["enter",c,t],["enter",d,t]],l=ni(l,e.slice(a+1,a+r+3)),l=ni(l,[["enter",f,t]]),l=ni(l,Pp(t.parser.constructs.insideSpan.null,e.slice(a+r+4,s-3),t)),l=ni(l,[["exit",f,t],e[s-2],e[s-1],["exit",d,t]]),l=ni(l,e.slice(s+1)),l=ni(l,[["exit",c,t]]),zr(e,a,e.length,l),e}function eG(e,t,n){const r=this;let i=r.events.length,a,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return l;function l(p){return a?a._inactive?m(p):(s=r.parser.defined.includes(Ti(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),c):n(p)}function c(p){return p===40?e.attempt(F4,f,s?f:m)(p):p===91?e.attempt(H4,f,s?d:m)(p):s?f(p):m(p)}function d(p){return e.attempt(G4,f,m)(p)}function f(p){return t(p)}function m(p){return a._balanced=!0,n(p)}}function tG(e,t,n){return r;function r(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),i}function i(m){return Mt(m)?Fu(e,a)(m):a(m)}function a(m){return m===41?f(m):E5(e,s,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function s(m){return Mt(m)?Fu(e,c)(m):f(m)}function l(m){return n(m)}function c(m){return m===34||m===39||m===40?Q5(e,d,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):f(m)}function d(m){return Mt(m)?Fu(e,f)(m):f(m)}function f(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function nG(e,t,n){const r=this;return i;function i(l){return A5.call(r,e,a,s,"reference","referenceMarker","referenceString")(l)}function a(l){return r.parser.defined.includes(Ti(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function s(l){return n(l)}}function rG(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}var iG={name:"labelStartImage",resolveAll:fS.resolveAll,tokenize:aG};function aG(e,t,n){const r=this;return i;function i(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),a}function a(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),s):n(l)}function s(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}var sG={name:"labelStartLink",resolveAll:fS.resolveAll,tokenize:oG};function oG(e,t,n){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),a}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}var fb={name:"lineEnding",tokenize:lG};function lG(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),pt(e,t,"linePrefix")}}var vm={name:"thematicBreak",tokenize:cG};function cG(e,t,n){let r=0,i;return a;function a(d){return e.enter("thematicBreak"),s(d)}function s(d){return i=d,l(d)}function l(d){return d===i?(e.enter("thematicBreakSequence"),c(d)):r>=3&&(d===null||ze(d))?(e.exit("thematicBreak"),t(d)):n(d)}function c(d){return d===i?(e.consume(d),r++,c):(e.exit("thematicBreakSequence"),it(d)?pt(e,l,"whitespace")(d):l(d))}}var fr={continuation:{tokenize:hG},exit:pG,name:"list",tokenize:fG},uG={partial:!0,tokenize:gG},dG={partial:!0,tokenize:mG};function fG(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return l;function l(O){const b=r.containerState.type||(O===42||O===43||O===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!r.containerState.marker||O===r.containerState.marker:v0(O)){if(r.containerState.type||(r.containerState.type=b,e.enter(b,{_container:!0})),b==="listUnordered")return e.enter("listItemPrefix"),O===42||O===45?e.check(vm,n,d)(O):d(O);if(!r.interrupt||O===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(O)}return n(O)}function c(O){return v0(O)&&++s<10?(e.consume(O),c):(!r.interrupt||s<2)&&(r.containerState.marker?O===r.containerState.marker:O===41||O===46)?(e.exit("listItemValue"),d(O)):n(O)}function d(O){return e.enter("listItemMarker"),e.consume(O),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||O,e.check(Fd,r.interrupt?n:f,e.attempt(uG,p,m))}function f(O){return r.containerState.initialBlankLine=!0,a++,p(O)}function m(O){return it(O)?(e.enter("listItemPrefixWhitespace"),e.consume(O),e.exit("listItemPrefixWhitespace"),p):n(O)}function p(O){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(O)}}function hG(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Fd,i,a);function i(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,pt(e,t,"listItemIndent",r.containerState.size+1)(l)}function a(l){return r.containerState.furtherBlankLines||!it(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(dG,t,s)(l))}function s(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,pt(e,e.attempt(fr,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function mG(e,t,n){const r=this;return pt(e,i,"listItemIndent",r.containerState.size+1);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(a):n(a)}}function pG(e){e.exit(this.containerState.type)}function gG(e,t,n){const r=this;return pt(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const s=r.events[r.events.length-1];return!it(a)&&s&&s[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}var IC={name:"setextUnderline",resolveTo:vG,tokenize:OG};function vG(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",s,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function OG(e,t,n){const r=this;let i;return a;function a(d){let f=r.events.length,m;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){m=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||m)?(e.enter("setextHeadingLine"),i=d,s(d)):n(d)}function s(d){return e.enter("setextHeadingLineSequence"),l(d)}function l(d){return d===i?(e.consume(d),l):(e.exit("setextHeadingLineSequence"),it(d)?pt(e,c,"lineSuffix")(d):c(d))}function c(d){return d===null||ze(d)?(e.exit("setextHeadingLine"),t(d)):n(d)}}var bG={tokenize:yG};function yG(e){const t=this,n=e.attempt(Fd,r,e.attempt(this.parser.constructs.flowInitial,i,pt(e,e.attempt(this.parser.constructs.flow,i,e.attempt(k4,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}var xG={resolveAll:N5()},SG=P5("string"),wG=P5("text");function P5(e){return{resolveAll:N5(e==="text"?_G:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,s,l);return s;function s(f){return d(f)?a(f):l(f)}function l(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),c}function c(f){return d(f)?(n.exit("data"),a(f)):(n.consume(f),c)}function d(f){if(f===null)return!0;const m=i[f];let p=-1;if(m)for(;++p<m.length;){const O=m[p];if(!O.previous||O.previous.call(r,r.previous))return!0}return!1}}}function N5(e){return t;function t(n,r){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,r):n}}function _G(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 r=e[n-1][1],i=t.sliceStream(r);let a=i.length,s=-1,l=0,c;for(;a--;){const d=i[a];if(typeof d=="string"){for(s=d.length;d.charCodeAt(s-1)===32;)l++,s--;if(s)break;s=-1}else if(d===-2)c=!0,l++;else if(d!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const d={type:n===e.length||c||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?s:r.start._bufferIndex+s,_index:r.start._index+a,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...d.start},r.start.offset===r.end.offset?Object.assign(r,d):(e.splice(n,0,["enter",d,t],["exit",d,t]),n+=2)}n++}return e}var R5={};rA(R5,{attentionMarkers:()=>PG,contentInitial:()=>jG,disable:()=>NG,document:()=>kG,flow:()=>CG,flowInitial:()=>TG,insideSpan:()=>QG,string:()=>EG,text:()=>AG});var kG={42:fr,43:fr,45:fr,48:fr,49:fr,50:fr,51:fr,52:fr,53:fr,54:fr,55:fr,56:fr,57:fr,62:k5},jG={91:A4},TG={[-2]:db,[-1]:db,32:db},CG={35:D4,42:vm,45:[IC,vm],60:I4,61:IC,95:vm,96:zC,126:zC},EG={38:T5,92:j5},AG={[-5]:fb,[-4]:fb,[-3]:fb,33:iG,38:T5,42:O0,60:[s4,Y4],91:sG,92:[R4,j5],93:fS,95:O0,96:b4},QG={null:[O0,xG]},PG={null:[42,95]},NG={null:[]};function RG(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},a=[];let s=[],l=[];const c={attempt:N(Q),check:N(P),consume:T,enter:j,exit:E,interrupt:N(P,{interrupt:!0})},d={code:null,containerState:{},defineSkip:x,events:[],now:b,parser:e,previous:null,sliceSerialize:p,sliceStream:O,write:m};let f=t.tokenize.call(d,c);return t.resolveAll&&a.push(t),d;function m(X){return s=ni(s,X),w(),s[s.length-1]!==null?[]:(D(t,0),d.events=Pp(a,d.events,d),d.events)}function p(X,Z){return DG(O(X),Z)}function O(X){return MG(s,X)}function b(){const{_bufferIndex:X,_index:Z,line:V,column:$,offset:W}=r;return{_bufferIndex:X,_index:Z,line:V,column:$,offset:W}}function x(X){i[X.line]=X.column,A()}function w(){let X;for(;r._index<s.length;){const Z=s[r._index];if(typeof Z=="string")for(X=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===X&&r._bufferIndex<Z.length;)k(Z.charCodeAt(r._bufferIndex));else k(Z)}}function k(X){f=f(X)}function T(X){ze(X)?(r.line++,r.column=1,r.offset+=X===-3?2:1,A()):X!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),d.previous=X}function j(X,Z){const V=Z||{};return V.type=X,V.start=b(),d.events.push(["enter",V,d]),l.push(V),V}function E(X){const Z=l.pop();return Z.end=b(),d.events.push(["exit",Z,d]),Z}function Q(X,Z){D(X,Z.from)}function P(X,Z){Z.restore()}function N(X,Z){return V;function V($,W,I){let z,ee,le,q;return Array.isArray($)?re($):"tokenize"in $?re([$]):G($);function G(Oe){return Be;function Be(Re){const Xe=Re!==null&&Oe[Re],be=Re!==null&&Oe.null,Fe=[...Array.isArray(Xe)?Xe:Xe?[Xe]:[],...Array.isArray(be)?be:be?[be]:[]];return re(Fe)(Re)}}function re(Oe){return z=Oe,ee=0,Oe.length===0?I:M(Oe[ee])}function M(Oe){return Be;function Be(Re){return q=L(),le=Oe,Oe.partial||(d.currentConstruct=Oe),Oe.name&&d.parser.constructs.disable.null.includes(Oe.name)?ye():Oe.tokenize.call(Z?Object.assign(Object.create(d),Z):d,c,he,ye)(Re)}}function he(Oe){return X(le,q),W}function ye(Oe){return q.restore(),++ee<z.length?M(z[ee]):I}}}function D(X,Z){X.resolveAll&&!a.includes(X)&&a.push(X),X.resolve&&zr(d.events,Z,d.events.length-Z,X.resolve(d.events.slice(Z),d)),X.resolveTo&&(d.events=X.resolveTo(d.events,d))}function L(){const X=b(),Z=d.previous,V=d.currentConstruct,$=d.events.length,W=Array.from(l);return{from:$,restore:I};function I(){r=X,d.previous=Z,d.currentConstruct=V,d.events.length=$,l=W,A()}}function A(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function MG(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,a)];else{if(s=e.slice(n,i),r>-1){const l=s[0];typeof l=="string"?s[0]=l.slice(r):s.shift()}a>0&&s.push(e[i].slice(0,a))}return s}function DG(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let s;if(typeof a=="string")s=a;else switch(a){case-5:{s="\r";break}case-4:{s=`
|
|
137
|
-
`;break}case-3:{s=`\r
|
|
138
|
-
`;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(a)}i=a===-2,r.push(s)}return r.join("")}function LG(e){const r={constructs:w5([R5,...(e||{}).extensions||[]]),content:i(JH),defined:[],document:i(t4),flow:i(bG),lazy:{},string:i(SG),text:i(wG)};return r;function i(a){return s;function s(l){return RG(r,a,l)}}}function zG(e){for(;!C5(e););return e}var qC=/[\0\t\n\r]/g;function $G(){let e=1,t="",n=!0,r;return i;function i(a,s,l){const c=[];let d,f,m,p,O;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(s||void 0).decode(a)),m=0,t="",n&&(a.charCodeAt(0)===65279&&m++,n=void 0);m<a.length;){if(qC.lastIndex=m,d=qC.exec(a),p=d&&d.index!==void 0?d.index:a.length,O=a.charCodeAt(p),!d){t=a.slice(m);break}if(O===10&&m===p&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),m<p&&(c.push(a.slice(m,p)),e+=p-m),O){case 0:{c.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,c.push(-2);e++<f;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}m=p+1}return l&&(r&&c.push(-5),t&&c.push(t),c.push(null)),c}}var IG=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function qG(e){return e.replace(IG,XG)}function XG(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return _5(n.slice(a?2:1),a?16:10)}return dS(n)||e}var M5={}.hasOwnProperty;function ZG(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),BG(n)(zG(LG(n).document().write($G()(e,t,!0))))}function BG(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(ot),autolinkProtocol:L,autolinkEmail:L,atxHeading:a(gt),blockQuote:a(be),characterEscape:L,characterReference:L,codeFenced:a(Fe),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:a(Fe,s),codeText:a(we,s),codeTextData:L,data:L,codeFlowValue:L,definition:a(Ve),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:a(st),hardBreakEscape:a(Je),hardBreakTrailing:a(Je),htmlFlow:a(yn,s),htmlFlowData:L,htmlText:a(yn,s),htmlTextData:L,image:a(Ce),label:s,link:a(ot),listItem:a(vt),listItemValue:p,listOrdered:a(ge,m),listUnordered:a(ge),paragraph:a(Dt),reference:M,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:a(gt),strong:a(Yt),thematicBreak:a(Un)},exit:{atxHeading:c(),atxHeadingSequence:Q,autolink:c(),autolinkEmail:Xe,autolinkProtocol:Re,blockQuote:c(),characterEscapeValue:A,characterReferenceMarkerHexadecimal:ye,characterReferenceMarkerNumeric:ye,characterReferenceValue:Oe,characterReference:Be,codeFenced:c(w),codeFencedFence:x,codeFencedFenceInfo:O,codeFencedFenceMeta:b,codeFlowValue:A,codeIndented:c(k),codeText:c(W),codeTextData:A,data:A,definition:c(),definitionDestinationString:E,definitionLabelString:T,definitionTitleString:j,emphasis:c(),hardBreakEscape:c(Z),hardBreakTrailing:c(Z),htmlFlow:c(V),htmlFlowData:A,htmlText:c($),htmlTextData:A,image:c(z),label:le,labelText:ee,lineEnding:X,link:c(I),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:he,resourceDestinationString:q,resourceTitleString:G,resource:re,setextHeading:c(D),setextHeadingLineSequence:N,setextHeadingText:P,strong:c(),thematicBreak:c()}};D5(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(ie){let de={type:"root",children:[]};const Pe={stack:[de],tokenStack:[],config:t,enter:l,exit:d,buffer:s,resume:f,data:n},Ze=[];let tt=-1;for(;++tt<ie.length;)if(ie[tt][1].type==="listOrdered"||ie[tt][1].type==="listUnordered")if(ie[tt][0]==="enter")Ze.push(tt);else{const Lt=Ze.pop();tt=i(ie,Lt,tt)}for(tt=-1;++tt<ie.length;){const Lt=t[ie[tt][0]];M5.call(Lt,ie[tt][1].type)&&Lt[ie[tt][1].type].call(Object.assign({sliceSerialize:ie[tt][2].sliceSerialize},Pe),ie[tt][1])}if(Pe.tokenStack.length>0){const Lt=Pe.tokenStack[Pe.tokenStack.length-1];(Lt[1]||XC).call(Pe,void 0,Lt[0])}for(de.position={start:ps(ie.length>0?ie[0][1].start:{line:1,column:1,offset:0}),end:ps(ie.length>0?ie[ie.length-2][1].end:{line:1,column:1,offset:0})},tt=-1;++tt<t.transforms.length;)de=t.transforms[tt](de)||de;return de}function i(ie,de,Pe){let Ze=de-1,tt=-1,Lt=!1,zn,rn,Xt,Kt;for(;++Ze<=Pe;){const ht=ie[Ze];switch(ht[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ht[0]==="enter"?tt++:tt--,Kt=void 0;break}case"lineEndingBlank":{ht[0]==="enter"&&(zn&&!Kt&&!tt&&!Xt&&(Xt=Ze),Kt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Kt=void 0}if(!tt&&ht[0]==="enter"&&ht[1].type==="listItemPrefix"||tt===-1&&ht[0]==="exit"&&(ht[1].type==="listUnordered"||ht[1].type==="listOrdered")){if(zn){let ir=Ze;for(rn=void 0;ir--;){const kn=ie[ir];if(kn[1].type==="lineEnding"||kn[1].type==="lineEndingBlank"){if(kn[0]==="exit")continue;rn&&(ie[rn][1].type="lineEndingBlank",Lt=!0),kn[1].type="lineEnding",rn=ir}else if(!(kn[1].type==="linePrefix"||kn[1].type==="blockQuotePrefix"||kn[1].type==="blockQuotePrefixWhitespace"||kn[1].type==="blockQuoteMarker"||kn[1].type==="listItemIndent"))break}Xt&&(!rn||Xt<rn)&&(zn._spread=!0),zn.end=Object.assign({},rn?ie[rn][1].start:ht[1].end),ie.splice(rn||Ze,0,["exit",zn,ht[2]]),Ze++,Pe++}if(ht[1].type==="listItemPrefix"){const ir={type:"listItem",_spread:!1,start:Object.assign({},ht[1].start),end:void 0};zn=ir,ie.splice(Ze,0,["enter",ir,ht[2]]),Ze++,Pe++,Xt=void 0,Kt=!0}}}return ie[de][1]._spread=Lt,Pe}function a(ie,de){return Pe;function Pe(Ze){l.call(this,ie(Ze),Ze),de&&de.call(this,Ze)}}function s(){this.stack.push({type:"fragment",children:[]})}function l(ie,de,Pe){this.stack[this.stack.length-1].children.push(ie),this.stack.push(ie),this.tokenStack.push([de,Pe||void 0]),ie.position={start:ps(de.start),end:void 0}}function c(ie){return de;function de(Pe){ie&&ie.call(this,Pe),d.call(this,Pe)}}function d(ie,de){const Pe=this.stack.pop(),Ze=this.tokenStack.pop();if(Ze)Ze[0].type!==ie.type&&(de?de.call(this,ie,Ze[0]):(Ze[1]||XC).call(this,ie,Ze[0]));else throw new Error("Cannot close `"+ie.type+"` ("+Wu({start:ie.start,end:ie.end})+"): it’s not open");Pe.position.end=ps(ie.end)}function f(){return uS(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function p(ie){if(this.data.expectingFirstListItemValue){const de=this.stack[this.stack.length-2];de.start=Number.parseInt(this.sliceSerialize(ie),10),this.data.expectingFirstListItemValue=void 0}}function O(){const ie=this.resume(),de=this.stack[this.stack.length-1];de.lang=ie}function b(){const ie=this.resume(),de=this.stack[this.stack.length-1];de.meta=ie}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){const ie=this.resume(),de=this.stack[this.stack.length-1];de.value=ie.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function k(){const ie=this.resume(),de=this.stack[this.stack.length-1];de.value=ie.replace(/(\r?\n|\r)$/g,"")}function T(ie){const de=this.resume(),Pe=this.stack[this.stack.length-1];Pe.label=de,Pe.identifier=Ti(this.sliceSerialize(ie)).toLowerCase()}function j(){const ie=this.resume(),de=this.stack[this.stack.length-1];de.title=ie}function E(){const ie=this.resume(),de=this.stack[this.stack.length-1];de.url=ie}function Q(ie){const de=this.stack[this.stack.length-1];if(!de.depth){const Pe=this.sliceSerialize(ie).length;de.depth=Pe}}function P(){this.data.setextHeadingSlurpLineEnding=!0}function N(ie){const de=this.stack[this.stack.length-1];de.depth=this.sliceSerialize(ie).codePointAt(0)===61?1:2}function D(){this.data.setextHeadingSlurpLineEnding=void 0}function L(ie){const Pe=this.stack[this.stack.length-1].children;let Ze=Pe[Pe.length-1];(!Ze||Ze.type!=="text")&&(Ze=et(),Ze.position={start:ps(ie.start),end:void 0},Pe.push(Ze)),this.stack.push(Ze)}function A(ie){const de=this.stack.pop();de.value+=this.sliceSerialize(ie),de.position.end=ps(ie.end)}function X(ie){const de=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Pe=de.children[de.children.length-1];Pe.position.end=ps(ie.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(de.type)&&(L.call(this,ie),A.call(this,ie))}function Z(){this.data.atHardBreak=!0}function V(){const ie=this.resume(),de=this.stack[this.stack.length-1];de.value=ie}function $(){const ie=this.resume(),de=this.stack[this.stack.length-1];de.value=ie}function W(){const ie=this.resume(),de=this.stack[this.stack.length-1];de.value=ie}function I(){const ie=this.stack[this.stack.length-1];if(this.data.inReference){const de=this.data.referenceType||"shortcut";ie.type+="Reference",ie.referenceType=de,delete ie.url,delete ie.title}else delete ie.identifier,delete ie.label;this.data.referenceType=void 0}function z(){const ie=this.stack[this.stack.length-1];if(this.data.inReference){const de=this.data.referenceType||"shortcut";ie.type+="Reference",ie.referenceType=de,delete ie.url,delete ie.title}else delete ie.identifier,delete ie.label;this.data.referenceType=void 0}function ee(ie){const de=this.sliceSerialize(ie),Pe=this.stack[this.stack.length-2];Pe.label=qG(de),Pe.identifier=Ti(de).toLowerCase()}function le(){const ie=this.stack[this.stack.length-1],de=this.resume(),Pe=this.stack[this.stack.length-1];if(this.data.inReference=!0,Pe.type==="link"){const Ze=ie.children;Pe.children=Ze}else Pe.alt=de}function q(){const ie=this.resume(),de=this.stack[this.stack.length-1];de.url=ie}function G(){const ie=this.resume(),de=this.stack[this.stack.length-1];de.title=ie}function re(){this.data.inReference=void 0}function M(){this.data.referenceType="collapsed"}function he(ie){const de=this.resume(),Pe=this.stack[this.stack.length-1];Pe.label=de,Pe.identifier=Ti(this.sliceSerialize(ie)).toLowerCase(),this.data.referenceType="full"}function ye(ie){this.data.characterReferenceType=ie.type}function Oe(ie){const de=this.sliceSerialize(ie),Pe=this.data.characterReferenceType;let Ze;Pe?(Ze=_5(de,Pe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ze=dS(de);const tt=this.stack[this.stack.length-1];tt.value+=Ze}function Be(ie){const de=this.stack.pop();de.position.end=ps(ie.end)}function Re(ie){A.call(this,ie);const de=this.stack[this.stack.length-1];de.url=this.sliceSerialize(ie)}function Xe(ie){A.call(this,ie);const de=this.stack[this.stack.length-1];de.url="mailto:"+this.sliceSerialize(ie)}function be(){return{type:"blockquote",children:[]}}function Fe(){return{type:"code",lang:null,meta:null,value:""}}function we(){return{type:"inlineCode",value:""}}function Ve(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function st(){return{type:"emphasis",children:[]}}function gt(){return{type:"heading",depth:0,children:[]}}function Je(){return{type:"break"}}function yn(){return{type:"html",value:""}}function Ce(){return{type:"image",title:null,url:"",alt:null}}function ot(){return{type:"link",title:null,url:"",children:[]}}function ge(ie){return{type:"list",ordered:ie.type==="listOrdered",start:null,spread:ie._spread,children:[]}}function vt(ie){return{type:"listItem",spread:ie._spread,checked:null,children:[]}}function Dt(){return{type:"paragraph",children:[]}}function Yt(){return{type:"strong",children:[]}}function et(){return{type:"text",value:""}}function Un(){return{type:"thematicBreak"}}}function ps(e){return{line:e.line,column:e.column,offset:e.offset}}function D5(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?D5(e,r):VG(e,r)}}function VG(e,t){let n;for(n in t)if(M5.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function XC(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Wu({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Wu({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Wu({start:t.start,end:t.end})+") is still open")}function UG(e){const t=this;t.parser=n;function n(r){return ZG(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function YG(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 WG(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
139
|
-
`}]}function FG(e,t){const n=t.value?t.value+`
|
|
140
|
-
`:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function HG(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function GG(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function KG(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=gc(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let s,l=e.footnoteCounts.get(r);l===void 0?(l=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=a+1,l+=1,e.footnoteCounts.set(r,l);const c={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,c);const d={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,d),e.applyData(t,d)}function JG(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 eK(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function L5(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function tK(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return L5(e,t);const i={src:gc(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function nK(e,t){const n={src:gc(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 r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function rK(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function iK(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return L5(e,t);const i={href:gc(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function aK(e,t){const n={href:gc(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function sK(e,t,n){const r=e.all(t),i=n?oK(n):z5(t),a={},s=[];if(typeof t.checked=="boolean"){const f=r[0];let m;f&&f.type==="element"&&f.tagName==="p"?m=f:(m={type:"element",tagName:"p",properties:{},children:[]},r.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let l=-1;for(;++l<r.length;){const f=r[l];(i||l!==0||f.type!=="element"||f.tagName!=="p")&&s.push({type:"text",value:`
|
|
141
|
-
`}),f.type==="element"&&f.tagName==="p"&&!i?s.push(...f.children):s.push(f)}const c=r[r.length-1];c&&(i||c.type!=="element"||c.tagName!=="p")&&s.push({type:"text",value:`
|
|
142
|
-
`});const d={type:"element",tagName:"li",properties:a,children:s};return e.patch(t,d),e.applyData(t,d)}function oK(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=z5(n[r])}return t}function z5(e){const t=e.spread;return t??e.children.length>1}function lK(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const s=r[i];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function cK(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function uK(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function dK(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function fK(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),i.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=sS(t.children[1]),c=g5(t.children[t.children.length-1]);l&&c&&(s.position={start:l,end:c}),i.push(s)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function hK(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,l=s?s.length:t.children.length;let c=-1;const d=[];for(;++c<l;){const m=t.children[c],p={},O=s?s[c]:void 0;O&&(p.align=O);let b={type:"element",tagName:a,properties:p,children:[]};m&&(b.children=e.all(m),e.patch(m,b),b=e.applyData(m,b)),d.push(b)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(d,!0)};return e.patch(t,f),e.applyData(t,f)}function mK(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var ZC=9,BC=32;function pK(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(VC(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(VC(t.slice(i),i>0,!1)),a.join("")}function VC(e,t,n){let r=0,i=e.length;if(t){let a=e.codePointAt(r);for(;a===ZC||a===BC;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(i-1);for(;a===ZC||a===BC;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function gK(e,t){const n={type:"text",value:pK(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function vK(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var OK={blockquote:YG,break:WG,code:FG,delete:HG,emphasis:GG,footnoteReference:KG,heading:JG,html:eK,imageReference:tK,image:nK,inlineCode:rK,linkReference:iK,link:aK,listItem:sK,list:lK,paragraph:cK,root:uK,strong:dK,table:fK,tableCell:mK,tableRow:hK,text:gK,thematicBreak:vK,toml:Bh,yaml:Bh,definition:Bh,footnoteDefinition:Bh};function Bh(){}var $5=-1,Np=0,Hu=1,Um=2,hS=3,mS=4,pS=5,gS=6,I5=7,q5=8,UC=typeof self=="object"?self:globalThis,bK=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),r=i=>{if(e.has(i))return e.get(i);const[a,s]=t[i];switch(a){case Np:case $5:return n(s,i);case Hu:{const l=n([],i);for(const c of s)l.push(r(c));return l}case Um:{const l=n({},i);for(const[c,d]of s)l[r(c)]=r(d);return l}case hS:return n(new Date(s),i);case mS:{const{source:l,flags:c}=s;return n(new RegExp(l,c),i)}case pS:{const l=n(new Map,i);for(const[c,d]of s)l.set(r(c),r(d));return l}case gS:{const l=n(new Set,i);for(const c of s)l.add(r(c));return l}case I5:{const{name:l,message:c}=s;return n(new UC[l](c),i)}case q5:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:l}=new Uint8Array(s);return n(new DataView(l),s)}}return n(new UC[a](s),i)};return r},YC=e=>bK(new Map,e)(0),jl="",{toString:yK}={},{keys:xK}=Object,yu=e=>{const t=typeof e;if(t!=="object"||!e)return[Np,t];const n=yK.call(e).slice(8,-1);switch(n){case"Array":return[Hu,jl];case"Object":return[Um,jl];case"Date":return[hS,jl];case"RegExp":return[mS,jl];case"Map":return[pS,jl];case"Set":return[gS,jl];case"DataView":return[Hu,n]}return n.includes("Array")?[Hu,n]:n.includes("Error")?[I5,n]:[Um,n]},Vh=([e,t])=>e===Np&&(t==="function"||t==="symbol"),SK=(e,t,n,r)=>{const i=(s,l)=>{const c=r.push(s)-1;return n.set(l,c),c},a=s=>{if(n.has(s))return n.get(s);let[l,c]=yu(s);switch(l){case Np:{let f=s;switch(c){case"bigint":l=q5,f=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);f=null;break;case"undefined":return i([$5],s)}return i([l,f],s)}case Hu:{if(c){let p=s;return c==="DataView"?p=new Uint8Array(s.buffer):c==="ArrayBuffer"&&(p=new Uint8Array(s)),i([c,[...p]],s)}const f=[],m=i([l,f],s);for(const p of s)f.push(a(p));return m}case Um:{if(c)switch(c){case"BigInt":return i([c,s.toString()],s);case"Boolean":case"Number":case"String":return i([c,s.valueOf()],s)}if(t&&"toJSON"in s)return a(s.toJSON());const f=[],m=i([l,f],s);for(const p of xK(s))(e||!Vh(yu(s[p])))&&f.push([a(p),a(s[p])]);return m}case hS:return i([l,s.toISOString()],s);case mS:{const{source:f,flags:m}=s;return i([l,{source:f,flags:m}],s)}case pS:{const f=[],m=i([l,f],s);for(const[p,O]of s)(e||!(Vh(yu(p))||Vh(yu(O))))&&f.push([a(p),a(O)]);return m}case gS:{const f=[],m=i([l,f],s);for(const p of s)(e||!Vh(yu(p)))&&f.push(a(p));return m}}const{message:d}=s;return i([l,{name:c,message:d}],s)};return a},WC=(e,{json:t,lossy:n}={})=>{const r=[];return SK(!(t||n),!!t,new Map,r)(e),r},Ym=typeof structuredClone=="function"?((e,t)=>t&&("json"in t||"lossy"in t)?YC(WC(e,t)):structuredClone(e)):(e,t)=>YC(WC(e,t));function wK(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 _K(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function kK(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||wK,r=e.options.footnoteBackLabel||_K,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let c=-1;for(;++c<e.footnoteOrder.length;){const d=e.footnoteById.get(e.footnoteOrder[c]);if(!d)continue;const f=e.all(d),m=String(d.identifier).toUpperCase(),p=gc(m.toLowerCase());let O=0;const b=[],x=e.footnoteCounts.get(m);for(;x!==void 0&&++O<=x;){b.length>0&&b.push({type:"text",value:" "});let T=typeof n=="string"?n:n(c,O);typeof T=="string"&&(T={type:"text",value:T}),b.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(O>1?"-"+O:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,O),className:["data-footnote-backref"]},children:Array.isArray(T)?T:[T]})}const w=f[f.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const T=w.children[w.children.length-1];T&&T.type==="text"?T.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(...b)}else f.push(...b);const k={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(f,!0)};e.patch(d,k),l.push(k)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Ym(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
143
|
-
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:`
|
|
144
|
-
`}]}}var Rp=(function(e){if(e==null)return EK;if(typeof e=="function")return Mp(e);if(typeof e=="object")return Array.isArray(e)?jK(e):TK(e);if(typeof e=="string")return CK(e);throw new Error("Expected function, string, or object as test")});function jK(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Rp(e[n]);return Mp(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function TK(e){const t=e;return Mp(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function CK(e){return Mp(t);function t(n){return n&&n.type===e}}function Mp(e){return t;function t(n,r,i){return!!(AK(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function EK(){return!0}function AK(e){return e!==null&&typeof e=="object"&&"type"in e}function QK(e){return"\x1B[33m"+e+"\x1B[39m"}var X5=[],PK=!0,b0=!1,NK="skip";function Z5(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=Rp(i),s=r?-1:1;l(e,void 0,[])();function l(c,d,f){const m=c&&typeof c=="object"?c:{};if(typeof m.type=="string"){const O=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(p,"name",{value:"node ("+QK(c.type+(O?"<"+O+">":""))+")"})}return p;function p(){let O=X5,b,x,w;if((!t||a(c,d,f[f.length-1]||void 0))&&(O=RK(n(c,f)),O[0]===b0))return O;if("children"in c&&c.children){const k=c;if(k.children&&O[0]!==NK)for(x=(r?k.children.length:-1)+s,w=f.concat(k);x>-1&&x<k.children.length;){const T=k.children[x];if(b=l(T,x,w)(),b[0]===b0)return b;x=typeof b[1]=="number"?b[1]:x+s}}return O}}}function RK(e){return Array.isArray(e)?e:typeof e=="number"?[PK,e]:e==null?X5:[e]}function vS(e,t,n,r){let i,a,s;typeof t=="function"&&typeof n!="function"?(a=void 0,s=t,i=n):(a=t,s=n,i=r),Z5(e,a,l,i);function l(c,d){const f=d[d.length-1],m=f?f.children.indexOf(c):void 0;return s(c,m,f)}}var y0={}.hasOwnProperty,MK={};function DK(e,t){const n=t||MK,r=new Map,i=new Map,a=new Map,s={...OK,...n.handlers},l={all:d,applyData:zK,definitionById:r,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:s,one:c,options:n,patch:LK,wrap:IK};return vS(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const m=f.type==="definition"?r:i,p=String(f.identifier).toUpperCase();m.has(p)||m.set(p,f)}}),l;function c(f,m){const p=f.type,O=l.handlers[p];if(y0.call(l.handlers,p)&&O)return O(l,f,m);if(l.options.passThrough&&l.options.passThrough.includes(p)){if("children"in f){const{children:x,...w}=f,k=Ym(w);return k.children=l.all(f),k}return Ym(f)}return(l.options.unknownHandler||$K)(l,f,m)}function d(f){const m=[];if("children"in f){const p=f.children;let O=-1;for(;++O<p.length;){const b=l.one(p[O],f);if(b){if(O&&p[O-1].type==="break"&&(!Array.isArray(b)&&b.type==="text"&&(b.value=FC(b.value)),!Array.isArray(b)&&b.type==="element")){const x=b.children[0];x&&x.type==="text"&&(x.value=FC(x.value))}Array.isArray(b)?m.push(...b):m.push(b)}}}return m}}function LK(e,t){e.position&&(t.position=_H(e))}function zK(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const s="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:s}}n.type==="element"&&a&&Object.assign(n.properties,Ym(a)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function $K(e,t){const n=t.data||{},r="value"in t&&!(y0.call(n,"hProperties")||y0.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function IK(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
145
|
-
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
146
|
-
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
147
|
-
`}),n}function FC(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function HC(e,t){const n=DK(e,t),r=n.one(e,void 0),i=kK(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
|
|
148
|
-
`},i),a}function qK(e,t){return e&&"run"in e?async function(n,r){const i=HC(n,{file:r,...t});await e.run(i,r)}:function(n,r){return HC(n,{file:r,...e||t})}}function GC(e){if(e)throw e}var hb=tp(ZZ(),1);function x0(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 XK(){const e=[],t={run:n,use:r};return t;function n(...i){let a=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);l(null,...i);function l(c,...d){const f=e[++a];let m=-1;if(c){s(c);return}for(;++m<i.length;)(d[m]===null||d[m]===void 0)&&(d[m]=i[m]);i=d,f?ZK(f,l)(...d):s(null,...d)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function ZK(e,t){let n;return r;function r(...s){const l=e.length>s.length;let c;l&&s.push(i);try{c=e.apply(this,s)}catch(d){const f=d;if(l&&n)throw f;return i(f)}l||(c&&c.then&&typeof c.then=="function"?c.then(a,i):c instanceof Error?i(c):a(c))}function i(s,...l){n||(n=!0,t(s,...l))}function a(s){i(null,s)}}function KC(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}var mb=["history","path","basename","stem","extname","dirname"],B5=class{constructor(e){let t;e?KC(e)?t={path:e}:typeof e=="string"||BK(e)?t={value:e}:t=e:t={},this.cwd="cwd"in t?"":LZ.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<mb.length;){const i=mb[n];i in t&&t[i]!==void 0&&t[i]!==null&&(this[i]=i==="history"?[...t[i]]:t[i])}let r;for(r in t)mb.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path=="string"?Zi.basename(this.path):void 0}set basename(e){gb(e,"basename"),pb(e,"basename"),this.path=Zi.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?Zi.dirname(this.path):void 0}set dirname(e){JC(this.basename,"dirname"),this.path=Zi.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?Zi.extname(this.path):void 0}set extname(e){if(pb(e,"extname"),JC(this.dirname,"extname"),e){if(e.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Zi.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){KC(e)&&(e=zZ(e)),gb(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?Zi.basename(this.path,this.extname):void 0}set stem(e){gb(e,"stem"),pb(e,"stem"),this.path=Zi.join(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){const r=new Vn(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}};function pb(e,t){if(e&&e.includes(Zi.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Zi.sep+"`")}function gb(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function JC(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function BK(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var VK=(function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),UK={}.hasOwnProperty,YK=class V5 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=XK()}copy(){const t=new V5;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data((0,hb.default)(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(bb("data",this.frozen),this.namespace[t]=n,this):UK.call(this.namespace,t)&&this.namespace[t]||void 0:t?(bb("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,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Uh(t),r=this.parser||this.Parser;return vb("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),vb("process",this.parser||this.Parser),Ob("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,s){const l=Uh(t),c=r.parse(l);r.run(c,l,function(f,m,p){if(f||!m||!p)return d(f);const O=m,b=r.stringify(O,p);HK(b)?p.value=b:p.result=b,d(f,p)});function d(f,m){f||!m?s(f):a?a(m):n(void 0,m)}}}processSync(t){let n=!1,r;return this.freeze(),vb("processSync",this.parser||this.Parser),Ob("processSync",this.compiler||this.Compiler),this.process(t,i),tE("processSync","process",n),r;function i(a,s){n=!0,GC(a),r=s}}run(t,n,r){eE(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(s,l){const c=Uh(n);i.run(t,c,d);function d(f,m,p){const O=m||t;f?l(f):s?s(O):r(void 0,O,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),tE("runSync","run",r),i;function a(s,l){GC(s),i=l,r=!0}}stringify(t,n){this.freeze();const r=Uh(n),i=this.compiler||this.Compiler;return Ob("stringify",i),eE(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(bb("use",this.frozen),t!=null)if(typeof t=="function")c(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(d){if(typeof d=="function")c(d,[]);else if(typeof d=="object")if(Array.isArray(d)){const[f,...m]=d;c(f,m)}else s(d);else throw new TypeError("Expected usable value, not `"+d+"`")}function s(d){if(!("plugins"in d)&&!("settings"in d))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");l(d.plugins),d.settings&&(i.settings=(0,hb.default)(!0,i.settings,d.settings))}function l(d){let f=-1;if(d!=null)if(Array.isArray(d))for(;++f<d.length;){const m=d[f];a(m)}else throw new TypeError("Expected a list of plugins, not `"+d+"`")}function c(d,f){let m=-1,p=-1;for(;++m<r.length;)if(r[m][0]===d){p=m;break}if(p===-1)r.push([d,...f]);else if(f.length>0){let[O,...b]=f;const x=r[p][1];x0(x)&&x0(O)&&(O=(0,hb.default)(!0,x,O)),r[p]=[d,O,...b]}}}},WK=new YK().freeze();function vb(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Ob(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function bb(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 eE(e){if(!x0(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function tE(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Uh(e){return FK(e)?e:new B5(e)}function FK(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function HK(e){return typeof e=="string"||GK(e)}function GK(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var KK="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",nE=[],rE={allowDangerousHtml:!0},JK=/^(https?|ircs?|mailto|xmpp)$/i,eJ=[{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 tJ(e){const t=nJ(e),n=rJ(e);return iJ(t.runSync(t.parse(n),n),e)}function nJ(e){const t=e.rehypePlugins||nE,n=e.remarkPlugins||nE,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...rE}:rE;return WK().use(UG).use(n).use(qK,r).use(t)}function rJ(e){const t=e.children||"",n=new B5;return typeof t=="string"&&(n.value=t),n}function iJ(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,s=t.skipHtml,l=t.unwrapDisallowed,c=t.urlTransform||aJ;for(const f of eJ)Object.hasOwn(t,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+KK+f.id,void 0);return vS(e,d),EH(e,{Fragment:g.Fragment,components:i,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0});function d(f,m,p){if(f.type==="raw"&&p&&typeof m=="number")return s?p.children.splice(m,1):p.children[m]={type:"text",value:f.value},m;if(f.type==="element"){let O;for(O in ub)if(Object.hasOwn(ub,O)&&Object.hasOwn(f.properties,O)){const b=f.properties[O],x=ub[O];(x===null||x.includes(f.tagName))&&(f.properties[O]=c(String(b||""),O,f))}}if(f.type==="element"){let O=n?!n.includes(f.tagName):a?a.includes(f.tagName):!1;if(!O&&r&&typeof m=="number"&&(O=!r(f,m,p)),O&&p&&typeof m=="number")return l&&f.children?p.children.splice(m,1,...f.children):p.children.splice(m,1),m}}}function aJ(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||JK.test(e.slice(0,t))?e:""}function iE(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function sJ(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function oJ(e,t,n){const i=Rp((n||{}).ignore||[]),a=lJ(t);let s=-1;for(;++s<a.length;)Z5(e,"text",l);function l(d,f){let m=-1,p;for(;++m<f.length;){const O=f[m],b=p?p.children:void 0;if(i(O,b?b.indexOf(O):void 0,p))return;p=O}if(p)return c(d,f)}function c(d,f){const m=f[f.length-1],p=a[s][0],O=a[s][1];let b=0;const w=m.children.indexOf(d);let k=!1,T=[];p.lastIndex=0;let j=p.exec(d.value);for(;j;){const E=j.index,Q={index:j.index,input:j.input,stack:[...f,d]};let P=O(...j,Q);if(typeof P=="string"&&(P=P.length>0?{type:"text",value:P}:void 0),P===!1?p.lastIndex=E+1:(b!==E&&T.push({type:"text",value:d.value.slice(b,E)}),Array.isArray(P)?T.push(...P):P&&T.push(P),b=E+j[0].length,k=!0),!p.global)break;j=p.exec(d.value)}return k?(b<d.value.length&&T.push({type:"text",value:d.value.slice(b)}),m.children.splice(w,1,...T)):T=[d],w+T.length}}function lJ(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 r=-1;for(;++r<n.length;){const i=n[r];t.push([cJ(i[0]),uJ(i[1])])}return t}function cJ(e){return typeof e=="string"?new RegExp(sJ(e),"g"):e}function uJ(e){return typeof e=="function"?e:function(){return e}}var yb="phrasing",xb=["autolink","link","image","label"];function dJ(){return{transforms:[OJ],enter:{literalAutolink:hJ,literalAutolinkEmail:Sb,literalAutolinkHttp:Sb,literalAutolinkWww:Sb},exit:{literalAutolink:vJ,literalAutolinkEmail:gJ,literalAutolinkHttp:mJ,literalAutolinkWww:pJ}}}function fJ(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:yb,notInConstruct:xb},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:yb,notInConstruct:xb},{character:":",before:"[ps]",after:"\\/",inConstruct:yb,notInConstruct:xb}]}}function hJ(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Sb(e){this.config.enter.autolinkProtocol.call(this,e)}function mJ(e){this.config.exit.autolinkProtocol.call(this,e)}function pJ(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 gJ(e){this.config.exit.autolinkEmail.call(this,e)}function vJ(e){this.exit(e)}function OJ(e){oJ(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,bJ],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),yJ]],{ignore:["link","linkReference"]})}function bJ(e,t,n,r,i){let a="";if(!U5(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!xJ(n)))return!1;const s=SJ(n+r);if(!s[0])return!1;const l={type:"link",title:null,url:a+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[l,{type:"text",value:s[1]}]:l}function yJ(e,t,n,r){return!U5(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function xJ(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 SJ(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=iE(e,"(");let a=iE(e,")");for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function U5(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Ro(n)||Qp(n))&&(!t||n!==47)}Y5.peek=QJ;function wJ(){this.buffer()}function _J(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function kJ(){this.buffer()}function jJ(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function TJ(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ti(this.sliceSerialize(e)).toLowerCase(),n.label=t}function CJ(e){this.exit(e)}function EJ(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ti(this.sliceSerialize(e)).toLowerCase(),n.label=t}function AJ(e){this.exit(e)}function QJ(){return"["}function Y5(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const s=n.enter("footnoteReference"),l=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{after:"]",before:a})),l(),s(),a+=i.move("]"),a}function PJ(){return{enter:{gfmFootnoteCallString:wJ,gfmFootnoteCall:_J,gfmFootnoteDefinitionLabelString:kJ,gfmFootnoteDefinition:jJ},exit:{gfmFootnoteCallString:TJ,gfmFootnoteCall:CJ,gfmFootnoteDefinitionLabelString:EJ,gfmFootnoteDefinition:AJ}}}function NJ(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Y5},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,a,s){const l=a.createTracker(s);let c=l.move("[^");const d=a.enter("footnoteDefinition"),f=a.enter("label");return c+=l.move(a.safe(a.associationId(r),{before:c,after:"]"})),f(),c+=l.move("]:"),r.children&&r.children.length>0&&(l.shift(4),c+=l.move((t?`
|
|
149
|
-
`:" ")+a.indentLines(a.containerFlow(r,l.current()),t?W5:RJ))),d(),c}}function RJ(e,t,n){return t===0?e:W5(e,t,n)}function W5(e,t,n){return(n?"":" ")+e}var MJ=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];F5.peek=IJ;function DJ(){return{canContainEols:["delete"],enter:{strikethrough:zJ},exit:{strikethrough:$J}}}function LJ(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:MJ}],handlers:{delete:F5}}}function zJ(e){this.enter({type:"delete",children:[]},e)}function $J(e){this.exit(e)}function F5(e,t,n,r){const i=n.createTracker(r),a=n.enter("strikethrough");let s=i.move("~~");return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),a(),s}function IJ(){return"~"}function qJ(e){return e.length}function XJ(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||qJ,a=[],s=[],l=[],c=[];let d=0,f=-1;for(;++f<e.length;){const x=[],w=[];let k=-1;for(e[f].length>d&&(d=e[f].length);++k<e[f].length;){const T=ZJ(e[f][k]);if(n.alignDelimiters!==!1){const j=i(T);w[k]=j,(c[k]===void 0||j>c[k])&&(c[k]=j)}x.push(T)}s[f]=x,l[f]=w}let m=-1;if(typeof r=="object"&&"length"in r)for(;++m<d;)a[m]=aE(r[m]);else{const x=aE(r);for(;++m<d;)a[m]=x}m=-1;const p=[],O=[];for(;++m<d;){const x=a[m];let w="",k="";x===99?(w=":",k=":"):x===108?w=":":x===114&&(k=":");let T=n.alignDelimiters===!1?1:Math.max(1,c[m]-w.length-k.length);const j=w+"-".repeat(T)+k;n.alignDelimiters!==!1&&(T=w.length+T+k.length,T>c[m]&&(c[m]=T),O[m]=T),p[m]=j}s.splice(1,0,p),l.splice(1,0,O),f=-1;const b=[];for(;++f<s.length;){const x=s[f],w=l[f];m=-1;const k=[];for(;++m<d;){const T=x[m]||"";let j="",E="";if(n.alignDelimiters!==!1){const Q=c[m]-(w[m]||0),P=a[m];P===114?j=" ".repeat(Q):P===99?Q%2?(j=" ".repeat(Q/2+.5),E=" ".repeat(Q/2-.5)):(j=" ".repeat(Q/2),E=j):E=" ".repeat(Q)}n.delimiterStart!==!1&&!m&&k.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&T==="")&&(n.delimiterStart!==!1||m)&&k.push(" "),n.alignDelimiters!==!1&&k.push(j),k.push(T),n.alignDelimiters!==!1&&k.push(E),n.padding!==!1&&k.push(" "),(n.delimiterEnd!==!1||m!==d-1)&&k.push("|")}b.push(n.delimiterEnd===!1?k.join("").replace(/ +$/,""):k.join(""))}return b.join(`
|
|
150
|
-
`)}function ZJ(e){return e==null?"":String(e)}function aE(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 BJ(e,t,n,r){const i=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const s=n.indentLines(n.containerFlow(e,a.current()),VJ);return i(),s}function VJ(e,t,n){return">"+(n?"":" ")+e}function UJ(e,t){return sE(e,t.inConstruct,!0)&&!sE(e,t.notInConstruct,!1)}function sE(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function oE(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
151
|
-
`&&UJ(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
152
|
-
`}function YJ(e,t){const n=String(e);let r=n.indexOf(t),i=r,a=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++a>s&&(s=a):a=1,i=r+t.length,r=n.indexOf(t,i);return s}function WJ(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 FJ(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 HJ(e,t,n,r){const i=FJ(n),a=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(WJ(e,n)){const m=n.enter("codeIndented"),p=n.indentLines(a,GJ);return m(),p}const l=n.createTracker(r),c=i.repeat(Math.max(YJ(a,i)+1,3)),d=n.enter("codeFenced");let f=l.move(c);if(e.lang){const m=n.enter(`codeFencedLang${s}`);f+=l.move(n.safe(e.lang,{before:f,after:" ",encode:["`"],...l.current()})),m()}if(e.lang&&e.meta){const m=n.enter(`codeFencedMeta${s}`);f+=l.move(" "),f+=l.move(n.safe(e.meta,{before:f,after:`
|
|
153
|
-
`,encode:["`"],...l.current()})),m()}return f+=l.move(`
|
|
154
|
-
`),a&&(f+=l.move(a+`
|
|
155
|
-
`)),f+=l.move(c),d(),f}function GJ(e,t,n){return(n?"":" ")+e}function OS(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 KJ(e,t,n,r){const i=OS(n),a=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let l=n.enter("label");const c=n.createTracker(r);let d=c.move("[");return d+=c.move(n.safe(n.associationId(e),{before:d,after:"]",...c.current()})),d+=c.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),d+=c.move("<"),d+=c.move(n.safe(e.url,{before:d,after:">",...c.current()})),d+=c.move(">")):(l=n.enter("destinationRaw"),d+=c.move(n.safe(e.url,{before:d,after:e.title?" ":`
|
|
156
|
-
`,...c.current()}))),l(),e.title&&(l=n.enter(`title${a}`),d+=c.move(" "+i),d+=c.move(n.safe(e.title,{before:d,after:i,...c.current()})),d+=c.move(i),l()),s(),d}function JJ(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 Td(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Wm(e,t,n){const r=ic(e),i=ic(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}H5.peek=eee;function H5(e,t,n,r){const i=JJ(n),a=n.enter("emphasis"),s=n.createTracker(r),l=s.move(i);let c=s.move(n.containerPhrasing(e,{after:i,before:l,...s.current()}));const d=c.charCodeAt(0),f=Wm(r.before.charCodeAt(r.before.length-1),d,i);f.inside&&(c=Td(d)+c.slice(1));const m=c.charCodeAt(c.length-1),p=Wm(r.after.charCodeAt(0),m,i);p.inside&&(c=c.slice(0,-1)+Td(m));const O=s.move(i);return a(),n.attentionEncodeSurroundingInfo={after:p.outside,before:f.outside},l+c+O}function eee(e,t,n){return n.options.emphasis||"*"}function tee(e,t){let n=!1;return vS(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,b0}),!!((!e.depth||e.depth<3)&&uS(e)&&(t.options.setext||n))}function nee(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(tee(e,n)){const f=n.enter("headingSetext"),m=n.enter("phrasing"),p=n.containerPhrasing(e,{...a.current(),before:`
|
|
157
|
-
`,after:`
|
|
158
|
-
`});return m(),f(),p+`
|
|
159
|
-
`+(i===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
|
|
160
|
-
`))+1))}const s="#".repeat(i),l=n.enter("headingAtx"),c=n.enter("phrasing");a.move(s+" ");let d=n.containerPhrasing(e,{before:"# ",after:`
|
|
161
|
-
`,...a.current()});return/^[\t ]/.test(d)&&(d=Td(d.charCodeAt(0))+d.slice(1)),d=d?s+" "+d:s,n.options.closeAtx&&(d+=" "+s),c(),l(),d}G5.peek=ree;function G5(e){return e.value||""}function ree(){return"<"}K5.peek=iee;function K5(e,t,n,r){const i=OS(n),a=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let l=n.enter("label");const c=n.createTracker(r);let d=c.move("![");return d+=c.move(n.safe(e.alt,{before:d,after:"]",...c.current()})),d+=c.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),d+=c.move("<"),d+=c.move(n.safe(e.url,{before:d,after:">",...c.current()})),d+=c.move(">")):(l=n.enter("destinationRaw"),d+=c.move(n.safe(e.url,{before:d,after:e.title?" ":")",...c.current()}))),l(),e.title&&(l=n.enter(`title${a}`),d+=c.move(" "+i),d+=c.move(n.safe(e.title,{before:d,after:i,...c.current()})),d+=c.move(i),l()),d+=c.move(")"),s(),d}function iee(){return"!"}J5.peek=aee;function J5(e,t,n,r){const i=e.referenceType,a=n.enter("imageReference");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("![");const d=n.safe(e.alt,{before:c,after:"]",...l.current()});c+=l.move(d+"]["),s();const f=n.stack;n.stack=[],s=n.enter("reference");const m=n.safe(n.associationId(e),{before:c,after:"]",...l.current()});return s(),n.stack=f,a(),i==="full"||!d||d!==m?c+=l.move(m+"]"):i==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function aee(){return"!"}eD.peek=see;function eD(e,t,n){let r=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const s=n.unsafe[a],l=n.compilePattern(s);let c;if(s.atBreak)for(;c=l.exec(r);){let d=c.index;r.charCodeAt(d)===10&&r.charCodeAt(d-1)===13&&d--,r=r.slice(0,d)+" "+r.slice(c.index+1)}}return i+r+i}function see(){return"`"}function tD(e,t){const n=uS(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))}nD.peek=oee;function nD(e,t,n,r){const i=OS(n),a=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let l,c;if(tD(e,n)){const f=n.stack;n.stack=[],l=n.enter("autolink");let m=s.move("<");return m+=s.move(n.containerPhrasing(e,{before:m,after:">",...s.current()})),m+=s.move(">"),l(),n.stack=f,m}l=n.enter("link"),c=n.enter("label");let d=s.move("[");return d+=s.move(n.containerPhrasing(e,{before:d,after:"](",...s.current()})),d+=s.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),d+=s.move("<"),d+=s.move(n.safe(e.url,{before:d,after:">",...s.current()})),d+=s.move(">")):(c=n.enter("destinationRaw"),d+=s.move(n.safe(e.url,{before:d,after:e.title?" ":")",...s.current()}))),c(),e.title&&(c=n.enter(`title${a}`),d+=s.move(" "+i),d+=s.move(n.safe(e.title,{before:d,after:i,...s.current()})),d+=s.move(i),c()),d+=s.move(")"),l(),d}function oee(e,t,n){return tD(e,n)?"<":"["}rD.peek=lee;function rD(e,t,n,r){const i=e.referenceType,a=n.enter("linkReference");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("[");const d=n.containerPhrasing(e,{before:c,after:"]",...l.current()});c+=l.move(d+"]["),s();const f=n.stack;n.stack=[],s=n.enter("reference");const m=n.safe(n.associationId(e),{before:c,after:"]",...l.current()});return s(),n.stack=f,a(),i==="full"||!d||d!==m?c+=l.move(m+"]"):i==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function lee(){return"["}function bS(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 cee(e){const t=bS(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 uee(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 iD(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 dee(e,t,n,r){const i=n.enter("list"),a=n.bulletCurrent;let s=e.ordered?uee(n):bS(n);const l=e.ordered?s==="."?")":".":cee(n);let c=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&f&&(!f.children||!f.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&&(c=!0),iD(n)===s&&f){let m=-1;for(;++m<e.children.length;){const p=e.children[m];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(s=l),n.bulletCurrent=s;const d=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=a,i(),d}function fee(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 hee(e,t,n,r){const i=fee(n);let a=n.bulletCurrent||bS(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let s=a.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const l=n.createTracker(r);l.move(a+" ".repeat(s-a.length)),l.shift(s);const c=n.enter("listItem"),d=n.indentLines(n.containerFlow(e,l.current()),f);return c(),d;function f(m,p,O){return p?(O?"":" ".repeat(s))+m:(O?a:a+" ".repeat(s-a.length))+m}}function mee(e,t,n,r){const i=n.enter("paragraph"),a=n.enter("phrasing"),s=n.containerPhrasing(e,r);return a(),i(),s}var pee=Rp(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function gee(e,t,n,r){return(e.children.some(function(s){return pee(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function vee(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}aD.peek=Oee;function aD(e,t,n,r){const i=vee(n),a=n.enter("strong"),s=n.createTracker(r),l=s.move(i+i);let c=s.move(n.containerPhrasing(e,{after:i,before:l,...s.current()}));const d=c.charCodeAt(0),f=Wm(r.before.charCodeAt(r.before.length-1),d,i);f.inside&&(c=Td(d)+c.slice(1));const m=c.charCodeAt(c.length-1),p=Wm(r.after.charCodeAt(0),m,i);p.inside&&(c=c.slice(0,-1)+Td(m));const O=s.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:p.outside,before:f.outside},l+c+O}function Oee(e,t,n){return n.options.strong||"*"}function bee(e,t,n,r){return n.safe(e.value,r)}function yee(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 xee(e,t,n){const r=(iD(n)+(n.options.ruleSpaces?" ":"")).repeat(yee(n));return n.options.ruleSpaces?r.slice(0,-1):r}var sD={blockquote:BJ,break:oE,code:HJ,definition:KJ,emphasis:H5,hardBreak:oE,heading:nee,html:G5,image:K5,imageReference:J5,inlineCode:eD,link:nD,linkReference:rD,list:dee,listItem:hee,paragraph:mee,root:gee,strong:aD,text:bee,thematicBreak:xee};function See(){return{enter:{table:wee,tableData:lE,tableHeader:lE,tableRow:kee},exit:{codeText:jee,table:_ee,tableData:wb,tableHeader:wb,tableRow:wb}}}function wee(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 _ee(e){this.exit(e),this.data.inTable=void 0}function kee(e){this.enter({type:"tableRow",children:[]},e)}function wb(e){this.exit(e)}function lE(e){this.enter({type:"tableCell",children:[]},e)}function jee(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Tee));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Tee(e,t){return t==="|"?t:e}function Cee(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
162
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:s,tableCell:c,tableRow:l}};function s(O,b,x,w){return d(f(O,x,w),O.align)}function l(O,b,x,w){const k=m(O,x,w),T=d([k]);return T.slice(0,T.indexOf(`
|
|
163
|
-
`))}function c(O,b,x,w){const k=x.enter("tableCell"),T=x.enter("phrasing"),j=x.containerPhrasing(O,{...w,before:a,after:a});return T(),k(),j}function d(O,b){return XJ(O,{align:b,alignDelimiters:r,padding:n,stringLength:i})}function f(O,b,x){const w=O.children;let k=-1;const T=[],j=b.enter("table");for(;++k<w.length;)T[k]=m(w[k],b,x);return j(),T}function m(O,b,x){const w=O.children;let k=-1;const T=[],j=b.enter("tableRow");for(;++k<w.length;)T[k]=c(w[k],O,b,x);return j(),T}function p(O,b,x){let w=sD.inlineCode(O,b,x);return x.stack.includes("tableCell")&&(w=w.replace(/\|/g,"\\$&")),w}}function Eee(){return{exit:{taskListCheckValueChecked:cE,taskListCheckValueUnchecked:cE,paragraph:Qee}}}function Aee(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Pee}}}function cE(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Qee(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 r=n.children[0];if(r&&r.type==="text"){const i=t.children;let a=-1,s;for(;++a<i.length;){const l=i[a];if(l.type==="paragraph"){s=l;break}}s===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Pee(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",l=n.createTracker(r);a&&l.move(s);let c=sD.listItem(e,t,n,{...r,...l.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,d)),c;function d(f){return f+s}}function Nee(){return[dJ(),PJ(),DJ(),See(),Eee()]}function Ree(e){return{extensions:[fJ(),NJ(e),LJ(),Cee(e),Aee()]}}var Mee={tokenize:qee,partial:!0},oD={tokenize:Xee,partial:!0},lD={tokenize:Zee,partial:!0},cD={tokenize:Bee,partial:!0},Dee={tokenize:Vee,partial:!0},uD={name:"wwwAutolink",tokenize:$ee,previous:fD},dD={name:"protocolAutolink",tokenize:Iee,previous:hD},$a={name:"emailAutolink",tokenize:zee,previous:mD},na={};function Lee(){return{text:na}}var ho=48;for(;ho<123;)na[ho]=$a,ho++,ho===58?ho=65:ho===91&&(ho=97);na[43]=$a;na[45]=$a;na[46]=$a;na[95]=$a;na[72]=[$a,dD];na[104]=[$a,dD];na[87]=[$a,uD];na[119]=[$a,uD];function zee(e,t,n){const r=this;let i,a;return s;function s(m){return!S0(m)||!mD.call(r,r.previous)||yS(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(m))}function l(m){return S0(m)?(e.consume(m),l):m===64?(e.consume(m),c):n(m)}function c(m){return m===46?e.check(Dee,f,d)(m):m===45||m===95||Zn(m)?(a=!0,e.consume(m),c):f(m)}function d(m){return e.consume(m),i=!0,c}function f(m){return a&&i&&Kn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function $ee(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!fD.call(r,r.previous)||yS(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Mee,e.attempt(oD,e.attempt(lD,a),n),n)(s))}function a(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function Iee(e,t,n){const r=this;let i="",a=!1;return s;function s(m){return(m===72||m===104)&&hD.call(r,r.previous)&&!yS(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(m),e.consume(m),l):n(m)}function l(m){if(Kn(m)&&i.length<5)return i+=String.fromCodePoint(m),e.consume(m),l;if(m===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(m),c}return n(m)}function c(m){return m===47?(e.consume(m),a?d:(a=!0,c)):n(m)}function d(m){return m===null||Vm(m)||Mt(m)||Ro(m)||Qp(m)?n(m):e.attempt(oD,e.attempt(lD,f),n)(m)}function f(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function qee(e,t,n){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),i):s===46&&r===3?(e.consume(s),a):n(s)}function a(s){return s===null?n(s):t(s)}}function Xee(e,t,n){let r,i,a;return s;function s(d){return d===46||d===95?e.check(cD,c,l)(d):d===null||Mt(d)||Ro(d)||d!==45&&Qp(d)?c(d):(a=!0,e.consume(d),s)}function l(d){return d===95?r=!0:(i=r,r=void 0),e.consume(d),s}function c(d){return i||r||!a?n(d):t(d)}}function Zee(e,t){let n=0,r=0;return i;function i(s){return s===40?(n++,e.consume(s),i):s===41&&r<n?a(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(cD,t,a)(s):s===null||Mt(s)||Ro(s)?t(s):(e.consume(s),i)}function a(s){return s===41&&r++,e.consume(s),i}}function Bee(e,t,n){return r;function r(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(e.consume(l),r):l===38?(e.consume(l),a):l===93?(e.consume(l),i):l===60||l===null||Mt(l)||Ro(l)?t(l):n(l)}function i(l){return l===null||l===40||l===91||Mt(l)||Ro(l)?t(l):r(l)}function a(l){return Kn(l)?s(l):n(l)}function s(l){return l===59?(e.consume(l),r):Kn(l)?(e.consume(l),s):n(l)}}function Vee(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return Zn(a)?n(a):t(a)}}function fD(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Mt(e)}function hD(e){return!Kn(e)}function mD(e){return!(e===47||S0(e))}function S0(e){return e===43||e===45||e===46||e===95||Zn(e)}function yS(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var Uee={tokenize:ete,partial:!0};function Yee(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Gee,continuation:{tokenize:Kee},exit:Jee}},text:{91:{name:"gfmFootnoteCall",tokenize:Hee},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Wee,resolveTo:Fee}}}}function Wee(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const c=r.events[i][1];if(c.type==="labelImage"){s=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return l;function l(c){if(!s||!s._balanced)return n(c);const d=Ti(r.sliceSerialize({start:s.end,end:r.now()}));return d.codePointAt(0)!==94||!a.includes(d.slice(1))?n(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function Fee(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 r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},l=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",s,t],["exit",s,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...l),e}function Hee(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,s;return l;function l(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),c}function c(m){return m!==94?n(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",d)}function d(m){if(a>999||m===93&&!s||m===null||m===91||Mt(m))return n(m);if(m===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(Ti(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return Mt(m)||(s=!0),a++,e.consume(m),m===92?f:d}function f(m){return m===91||m===92||m===93?(e.consume(m),a++,d):d(m)}}function Gee(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,s=0,l;return c;function c(b){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),d}function d(b){return b===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(b)}function f(b){if(s>999||b===93&&!l||b===null||b===91||Mt(b))return n(b);if(b===93){e.exit("chunkString");const x=e.exit("gfmFootnoteDefinitionLabelString");return a=Ti(r.sliceSerialize(x)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return Mt(b)||(l=!0),s++,e.consume(b),b===92?m:f}function m(b){return b===91||b===92||b===93?(e.consume(b),s++,f):f(b)}function p(b){return b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),i.includes(a)||i.push(a),pt(e,O,"gfmFootnoteDefinitionWhitespace")):n(b)}function O(b){return t(b)}}function Kee(e,t,n){return e.check(Fd,t,e.attempt(Uee,t,n))}function Jee(e){e.exit("gfmFootnoteDefinition")}function ete(e,t,n){const r=this;return pt(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(a):n(a)}}function tte(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,l){let c=-1;for(;++c<s.length;)if(s[c][0]==="enter"&&s[c][1].type==="strikethroughSequenceTemporary"&&s[c][1]._close){let d=c;for(;d--;)if(s[d][0]==="exit"&&s[d][1].type==="strikethroughSequenceTemporary"&&s[d][1]._open&&s[c][1].end.offset-s[c][1].start.offset===s[d][1].end.offset-s[d][1].start.offset){s[c][1].type="strikethroughSequence",s[d][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},s[d][1].start),end:Object.assign({},s[c][1].end)},m={type:"strikethroughText",start:Object.assign({},s[d][1].end),end:Object.assign({},s[c][1].start)},p=[["enter",f,l],["enter",s[d][1],l],["exit",s[d][1],l],["enter",m,l]],O=l.parser.constructs.insideSpan.null;O&&zr(p,p.length,0,Pp(O,s.slice(d+1,c),l)),zr(p,p.length,0,[["exit",m,l],["enter",s[c][1],l],["exit",s[c][1],l],["exit",f,l]]),zr(s,d-1,c-d+3,p),c=d+p.length-2;break}}for(c=-1;++c<s.length;)s[c][1].type==="strikethroughSequenceTemporary"&&(s[c][1].type="data");return s}function a(s,l,c){const d=this.previous,f=this.events;let m=0;return p;function p(b){return d===126&&f[f.length-1][1].type!=="characterEscape"?c(b):(s.enter("strikethroughSequenceTemporary"),O(b))}function O(b){const x=ic(d);if(b===126)return m>1?c(b):(s.consume(b),m++,O);if(m<2&&!n)return c(b);const w=s.exit("strikethroughSequenceTemporary"),k=ic(b);return w._open=!k||k===2&&!!x,w._close=!x||x===2&&!!k,l(b)}}}var nte=class{constructor(){this.map=[]}add(e,t,n){rte(this,e,t,n)}consume(e){if(this.map.sort(function(i,a){return i[0]-a[0]}),this.map.length===0)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(const i of r)e.push(i);r=n.pop()}this.map.length=0}};function rte(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function ite(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function ate(){return{flow:{null:{name:"table",tokenize:ste,resolveAll:ote}}}}function ste(e,t,n){const r=this;let i=0,a=0,s;return l;function l(A){let X=r.events.length-1;for(;X>-1;){const $=r.events[X][1].type;if($==="lineEnding"||$==="linePrefix")X--;else break}const Z=X>-1?r.events[X][1].type:null,V=Z==="tableHead"||Z==="tableRow"?P:c;return V===P&&r.parser.lazy[r.now().line]?n(A):V(A)}function c(A){return e.enter("tableHead"),e.enter("tableRow"),d(A)}function d(A){return A===124||(s=!0,a+=1),f(A)}function f(A){return A===null?n(A):ze(A)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),O):n(A):it(A)?pt(e,f,"whitespace")(A):(a+=1,s&&(s=!1,i+=1),A===124?(e.enter("tableCellDivider"),e.consume(A),e.exit("tableCellDivider"),s=!0,f):(e.enter("data"),m(A)))}function m(A){return A===null||A===124||Mt(A)?(e.exit("data"),f(A)):(e.consume(A),A===92?p:m)}function p(A){return A===92||A===124?(e.consume(A),m):m(A)}function O(A){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(A):(e.enter("tableDelimiterRow"),s=!1,it(A)?pt(e,b,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):b(A))}function b(A){return A===45||A===58?w(A):A===124?(s=!0,e.enter("tableCellDivider"),e.consume(A),e.exit("tableCellDivider"),x):Q(A)}function x(A){return it(A)?pt(e,w,"whitespace")(A):w(A)}function w(A){return A===58?(a+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(A),e.exit("tableDelimiterMarker"),k):A===45?(a+=1,k(A)):A===null||ze(A)?E(A):Q(A)}function k(A){return A===45?(e.enter("tableDelimiterFiller"),T(A)):Q(A)}function T(A){return A===45?(e.consume(A),T):A===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(A),e.exit("tableDelimiterMarker"),j):(e.exit("tableDelimiterFiller"),j(A))}function j(A){return it(A)?pt(e,E,"whitespace")(A):E(A)}function E(A){return A===124?b(A):A===null||ze(A)?!s||i!==a?Q(A):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(A)):Q(A)}function Q(A){return n(A)}function P(A){return e.enter("tableRow"),N(A)}function N(A){return A===124?(e.enter("tableCellDivider"),e.consume(A),e.exit("tableCellDivider"),N):A===null||ze(A)?(e.exit("tableRow"),t(A)):it(A)?pt(e,N,"whitespace")(A):(e.enter("data"),D(A))}function D(A){return A===null||A===124||Mt(A)?(e.exit("data"),N(A)):(e.consume(A),A===92?L:D)}function L(A){return A===92||A===124?(e.consume(A),D):D(A)}}function ote(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],s=[0,0,0,0],l=!1,c=0,d,f,m;const p=new nte;for(;++n<e.length;){const O=e[n],b=O[1];O[0]==="enter"?b.type==="tableHead"?(l=!1,c!==0&&(uE(p,t,c,d,f),f=void 0,c=0),d={type:"table",start:Object.assign({},b.start),end:Object.assign({},b.end)},p.add(n,0,[["enter",d,t]])):b.type==="tableRow"||b.type==="tableDelimiterRow"?(r=!0,m=void 0,a=[0,0,0,0],s=[0,n+1,0,0],l&&(l=!1,f={type:"tableBody",start:Object.assign({},b.start),end:Object.assign({},b.end)},p.add(n,0,[["enter",f,t]])),i=b.type==="tableDelimiterRow"?2:f?3:1):i&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(a[1]!==0&&(s[0]=s[1],m=Yh(p,t,a,i,void 0,m),a=[0,0,0,0]),s[2]=n)):b.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(s[0]=s[1],m=Yh(p,t,a,i,void 0,m)),a=s,s=[a[1],n,0,0])):b.type==="tableHead"?(l=!0,c=n):b.type==="tableRow"||b.type==="tableDelimiterRow"?(c=n,a[1]!==0?(s[0]=s[1],m=Yh(p,t,a,i,n,m)):s[1]!==0&&(m=Yh(p,t,s,i,n,m)),i=0):i&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")&&(s[3]=n)}for(c!==0&&uE(p,t,c,d,f),p.consume(t.events),n=-1;++n<t.events.length;){const O=t.events[n];O[0]==="enter"&&O[1].type==="table"&&(O[1]._align=ite(t.events,n))}return e}function Yh(e,t,n,r,i,a){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(a.end=Object.assign({},El(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const c=El(t.events,n[1]);if(a={type:s,start:Object.assign({},c),end:Object.assign({},c)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const d=El(t.events,n[2]),f=El(t.events,n[3]),m={type:l,start:Object.assign({},d),end:Object.assign({},f)};if(e.add(n[2],0,[["enter",m,t]]),r!==2){const p=t.events[n[2]],O=t.events[n[3]];if(p[1].end=Object.assign({},O[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const b=n[2]+1,x=n[3]-n[2]-1;e.add(b,x,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return i!==void 0&&(a.end=Object.assign({},El(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function uE(e,t,n,r,i){const a=[],s=El(t.events,n);i&&(i.end=Object.assign({},s),a.push(["exit",i,t])),r.end=Object.assign({},s),a.push(["exit",r,t]),e.add(n+1,0,a)}function El(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}var lte={name:"tasklistCheck",tokenize:ute};function cte(){return{text:{91:lte}}}function ute(e,t,n){const r=this;return i;function i(c){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),a)}function a(c){return Mt(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),s):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),s):n(c)}function s(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(c)}function l(c){return ze(c)?t(c):it(c)?e.check({tokenize:dte},t,n)(c):n(c)}}function dte(e,t,n){return pt(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function fte(e){return w5([Lee(),Yee(),tte(e),ate(),cte()])}var hte={};function mte(e){const t=this,n=e||hte,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(fte(n)),a.push(Nee()),s.push(Ree(n))}function pte({imageUrl:e,alt:t="Resource image"}){return g.jsx("div",{className:"semiont-image-viewer",children:g.jsx("img",{src:e,alt:t,className:"semiont-image-viewer__image",style:{imageRendering:"auto"}})})}var gte=_.lazy(()=>Qe(()=>import("./PdfAnnotationCanvas.client-5QESNO5H-B7UjwjIX.js"),__vite__mapDeps([2,1,3])).then(e=>({default:e.PdfAnnotationCanvas}))),vte=_.memo(function({content:t}){return g.jsx(tJ,{remarkPlugins:[mte],children:t})}),Ote=_.memo(function({content:t,mimeType:n,resourceUri:r,annotations:i,selectedClick:a="detail",annotateMode:s,hoverDelayMs:l=150}){const{newAnnotationIds:c}=Ix(),d=De(at().activeSession$),f=_.useRef(null),m=I0(n),{highlights:p,references:O,assessments:b,comments:x,tags:w}=i,k=_.useMemo(()=>[...p,...O,...b,...x,...w],[p,O,b,x,w]),T=_.useMemo(()=>f7(k),[k]),j=_.useRef(null);_.useEffect(()=>{f.current&&(j.current=o7(t,f.current))},[t]),_.useEffect(()=>{if(!f.current||!j.current||T.length===0)return;const N=f.current,D=l7(N),L=c7(T,j.current,D);return u7(L),()=>d7(N)},[T]),_.useEffect(()=>{if(!f.current||!d)return;const N=f.current,D=$=>{const I=$.target.closest("[data-annotation-id]");if(!I)return;const z=I.getAttribute("data-annotation-id"),ee=I.getAttribute("data-annotation-type");if(z&&ee==="reference"){const le=k.find(q=>q.id===z);le&&d.client.browse.click(le.id,le.motivation)}},{handleMouseEnter:L,handleMouseLeave:A,cleanup:X}=H0($=>d.client.beckon.hover($),l),Z=$=>{const I=$.target.closest("[data-annotation-id]"),z=I==null?void 0:I.getAttribute("data-annotation-id");z&&L(Bn(z))},V=$=>{$.target.closest("[data-annotation-id]")&&A()};return c&&N.querySelectorAll("[data-annotation-id]").forEach(W=>{const I=W.getAttribute("data-annotation-id");I&&c.has(I)&&W.classList.add("annotation-sparkle")}),N.addEventListener("click",D),N.addEventListener("mouseover",Z),N.addEventListener("mouseout",V),()=>{N.removeEventListener("click",D),N.removeEventListener("mouseover",Z),N.removeEventListener("mouseout",V),X()}},[t,k,c,l,d]);const E=_.useCallback((N,D=!1)=>{f.current&&TM(N,f.current,{pulse:D})},[]),Q=_.useCallback(({annotationId:N})=>{E(N)},[E]),P=_.useCallback(({annotationId:N})=>{E(N??null,!0)},[E]);switch(La({"beckon:hover":Q,"beckon:focus":P}),m){case"text":return g.jsxs("div",{className:"semiont-browse-view","data-mime-type":"text",children:[g.jsx(Xl,{selectedMotivation:null,selectedClick:a,showSelectionGroup:!1,showDeleteButton:!1,annotateMode:s,annotators:er}),g.jsx("div",{ref:f,className:"semiont-browse-view__content",children:g.jsx(vte,{content:t})})]});case"image":return oc(n)?g.jsxs("div",{className:"semiont-browse-view","data-mime-type":"pdf",children:[g.jsx(Xl,{selectedMotivation:null,selectedClick:a,showSelectionGroup:!1,showDeleteButton:!1,annotateMode:s,annotators:er}),g.jsx("div",{ref:f,className:"semiont-browse-view__content",children:g.jsx(_.Suspense,{fallback:g.jsx("div",{className:"semiont-browse-view__loading",children:"Loading PDF viewer..."}),children:g.jsx(gte,{pdfUrl:t,existingAnnotations:k,drawingMode:null,selectedMotivation:null})})})]}):g.jsxs("div",{className:"semiont-browse-view","data-mime-type":"image",children:[g.jsx(Xl,{selectedMotivation:null,selectedClick:a,showSelectionGroup:!1,showDeleteButton:!1,annotateMode:s,annotators:er}),g.jsx("div",{ref:f,className:"semiont-browse-view__content",children:g.jsx(pte,{imageUrl:t,mimeType:n,alt:"Resource content"})})]});case"unsupported":return g.jsx("div",{ref:f,className:"semiont-browse-view semiont-browse-view--unsupported","data-mime-type":"unsupported",children:g.jsxs("div",{className:"semiont-browse-view__empty",children:[g.jsxs("p",{className:"semiont-browse-view__empty-message",children:["Preview not available for ",n]}),g.jsx("a",{href:`/api/resources/${r}`,download:!0,className:"semiont-button semiont-button--primary",children:"Download File"})]})})}});function bte({resource:e,annotations:t,generatingReferenceId:n,showLineNumbers:r=!1,hoverDelayMs:i,hoveredAnnotationId:a}){const s=cn("ResourceViewer"),l=_.useRef(null),c=at(),d=De(c.activeSession$),f=aR(),{highlights:m,references:p,assessments:O,comments:b,tags:x}=t;if(!e["@id"])throw new Error("Resource has no @id");const w=e["@id"],T=(()=>{const ge=e.representations;return Array.isArray(ge)&&ge.length>0&&ge[0]?ge[0].mediaType:"text/plain"})(),[j,E]=_.useState(()=>typeof window<"u"?localStorage.getItem("annotateMode")==="true":!1);_.useEffect(()=>{typeof window<"u"&&localStorage.setItem("annotateMode",j.toString())},[j]);const Q=_.useCallback(()=>{E(ge=>!ge)},[]),P=j?"annotate":"browse",N=d==null?void 0:d.client,D=_.useCallback(()=>{N==null||N.browse.invalidateAnnotationList(w)},[N,w]),L=_.useCallback(()=>{N==null||N.browse.invalidateAnnotationList(w)},[N,w]),A=_.useCallback(()=>{N==null||N.browse.invalidateAnnotationList(w)},[N,w]),[X,Z]=_.useState(()=>{if(typeof window<"u"){const ge=localStorage.getItem("semiont-toolbar-selection");if(ge==="null")return null;if(ge&&["linking","highlighting","assessing","commenting","tagging"].includes(ge))return ge}return"linking"}),[V,$]=_.useState(()=>{if(typeof window<"u"){const ge=localStorage.getItem("semiont-toolbar-click");if(ge&&["detail","follow","jsonld","deleting"].includes(ge))return ge}return"detail"}),W=a7(T),[I,z]=_.useState(()=>fT(W)),ee=_.useCallback(({motivation:ge})=>{Z(ge)},[]),le=_.useCallback(({action:ge})=>{$(ge)},[]),q=_.useCallback(({shape:ge})=>{z(ge)},[]);_.useEffect(()=>{X===null?localStorage.setItem("semiont-toolbar-selection","null"):localStorage.setItem("semiont-toolbar-selection",X)},[X]),_.useEffect(()=>{localStorage.setItem("semiont-toolbar-click",V)},[V]),_.useEffect(()=>{s7(W,I)},[W,I]),_.useEffect(()=>{const ge=fT(W);ge!==I&&z(ge)},[W]);const[G,re]=_.useState(!1),[M,he]=_.useState(null),[ye,Oe]=_.useState(null),Be=a??null,[Re,Xe]=_.useState(null),[be,Fe]=_.useState(null),we=_.useCallback(ge=>{Fe(ge),Xe(ge),setTimeout(()=>Fe(null),3e3)},[]),Ve=()=>typeof window>"u"?{x:0,y:0}:{x:Math.max(0,(window.innerWidth-800)/2),y:Math.max(0,(window.innerHeight-700)/2)},st=_.useCallback(ge=>{d==null||d.client.mark.delete(w,ge)},[d,w]),gt=_.useCallback((ge,vt)=>{const Dt=Object.values(er).find(et=>et.matchesAnnotation(ge));if(Dt!=null&&Dt.hasSidePanel){if(V==="detail"){we(ge.id);return}if(V!=="deleting"&&V!=="jsonld"&&V!=="follow")return}const Yt=Mo(ge)||sc(ge)||zs(ge)||li(ge)||Do(ge);if(V==="follow"&&li(ge)){const et=Aa(ge.body);et&&f(`/know/resource/${et}`,{resourceId:et});return}if(V==="jsonld"&&Yt){he(ge),re(!0);return}if(j&&V==="deleting"&&Yt){const et=vt?{x:vt.clientX,y:vt.clientY+10}:{x:window.innerWidth/2-150,y:window.innerHeight/2-75};Oe({annotation:ge,position:et});return}},[j,V,we]),Je=_.useCallback(({annotationId:ge,motivation:vt})=>{const Dt=Object.values(er).find(Yt=>Yt.matchesAnnotation({motivation:vt}));if(!(Dt!=null&&Dt.hasSidePanel)){const et=[...m,...p,...O,...b,...x].find(Un=>Un.id===ge);et&>(et);return}if(V!=="detail"){const et=[...m,...p,...O,...b,...x].find(Un=>Un.id===ge);et&>(et);return}c.emit("panel:open",{panel:"annotations",scrollToAnnotationId:ge,motivation:vt})},[m,p,O,b,x,gt,V,d]);La({"mark:mode-toggled":Q,"mark:added":D,"mark:removed":L,"mark:body-updated":A,"mark:selection-changed":ee,"mark:click-changed":le,"mark:shape-changed":q,"browse:click":Je});const yn=_.useMemo(()=>({highlights:m,references:p,assessments:O,comments:b,tags:x}),[m,p,O,b,x]),Ce={selectedMotivation:X,selectedClick:V,selectedShape:I,hoveredAnnotationId:Be,scrollToAnnotationId:Re},ot=_.useCallback(ge=>{const vt=p.find(Dt=>Aa(Dt.body)===ge);return vt?_s(Qn(vt.target)):void 0},[p]);return g.jsxs("div",{ref:l,className:"semiont-resource-viewer",children:[P==="annotate"?g.jsx(KF,{content:e.content,mimeType:T,resourceUri:e["@id"],annotations:yn,uiState:Ce,onUIStateChange:ge=>{"selectedMotivation"in ge&&Z(ge.selectedMotivation),"selectedClick"in ge&&$(ge.selectedClick),"selectedShape"in ge&&z(ge.selectedShape)},enableWidgets:!0,getTargetResourceName:ot,...n!==void 0&&{generatingReferenceId:n},showLineNumbers:r,hoverDelayMs:i,annotateMode:j}):g.jsx(Ote,{content:e.content,mimeType:T,resourceUri:e["@id"],annotations:yn,selectedClick:V,hoverDelayMs:i,annotateMode:j}),M&&g.jsx(wC,{isOpen:G,onClose:()=>re(!1),position:Ve(),wide:!0,children:g.jsx(IY,{annotation:M,onBack:()=>{re(!1),he(null)}})}),ye&&(()=>{const ge=ye.annotation,vt=Object.values(er).find(Un=>Un.matchesAnnotation(ge)),Dt=Qn(ge.target),Yt=_s(Dt),et=(vt==null?void 0:vt.iconEmoji)||"📝";return g.jsx(wC,{isOpen:!!ye,onClose:()=>Oe(null),position:ye.position,children:g.jsxs("div",{className:"semiont-delete-confirmation",children:[g.jsxs("div",{className:"semiont-delete-confirmation__header",children:[g.jsx("span",{className:"semiont-delete-confirmation__icon",children:et}),g.jsx("h3",{className:"semiont-delete-confirmation__title",children:s("deleteConfirmationTitle")})]}),Yt&&g.jsx("div",{className:"semiont-delete-confirmation__quote",children:g.jsxs("p",{className:"semiont-delete-confirmation__text",children:['"',Yt.length>100?Yt.substring(0,100)+"...":Yt,'"']})}),g.jsx("p",{className:"semiont-delete-confirmation__message",children:s("deleteConfirmationMessage")}),g.jsxs("div",{className:"semiont-delete-confirmation__actions",children:[g.jsx("button",{onClick:()=>Oe(null),className:"semiont-button semiont-button--secondary",children:s("deleteConfirmationCancel")}),g.jsx("button",{onClick:()=>{st(ye.annotation.id),Oe(null)},className:"semiont-button semiont-button--danger",children:s("deleteConfirmationDelete")})]})]})})})()]})}function yte(e){const t=new Date(e),r=new Date().getTime()-t.getTime(),i=Math.floor(r/1e3),a=Math.floor(i/60),s=Math.floor(a/60),l=Math.floor(s/24);return i<60?"just now":a<60?`${a} minute${a>1?"s":""} ago`:s<24?`${s} hour${s>1?"s":""} ago`:l<7?`${l} day${l>1?"s":""} ago`:t.toLocaleDateString()}function dE(e){return typeof e=="object"&&e!==null&&"type"in e&&e.type==="TextualBody"&&"value"in e&&typeof e.value=="string"}function xte(e){if(!e.body)return null;if(dE(e.body))return e.body.value||null;if(Array.isArray(e.body)&&e.body.length>0){const t=e.body.find(dE);return(t==null?void 0:t.value)||null}return null}function Ste({assessment:e,isFocused:t,isHovered:n=!1,ref:r}){var c;const i=De(at().activeSession$),a=Xd(e.id),s=Nd(e),l=xte(e);return g.jsxs("div",{ref:r,className:`semiont-annotation-entry${n?" semiont-annotation-pulse":""}`,"data-type":"assessment","data-focused":t?"true":"false",onClick:()=>{i==null||i.client.browse.click(e.id,e.motivation)},...a,children:[s&&g.jsxs("div",{className:"semiont-annotation-entry__quote","data-type":"assessment",children:['"',s.substring(0,100),s.length>100?"...":"",'"']}),l&&g.jsx("div",{className:"semiont-annotation-entry__body","data-type":"assessment",children:l}),g.jsxs("div",{className:"semiont-annotation-entry__metadata",children:["By ",typeof e.creator=="string"?e.creator:((c=e.creator)==null?void 0:c.name)||"Unknown"," • ",yte(e.created||new Date().toISOString())]}),e.generator&&g.jsxs("div",{className:"semiont-annotation-entry__metadata",children:["Via ",typeof e.generator=="string"?e.generator:e.generator.name]})]})}function xS({annotationType:e,isAssisting:t,locale:n,progress:r}){const a=cn(e==="highlight"?"HighlightPanel":e==="assessment"?"AssessmentPanel":"CommentsPanel"),s=De(at().activeSession$),[l,c]=_.useState(""),[d,f]=_.useState(""),m=e==="comment"?5:e==="assessment"?4:5,[p,O]=_.useState(m),[b,x]=_.useState(!0),[w,k]=_.useState(()=>{if(typeof window>"u")return!0;const E=localStorage.getItem(`assist-section-expanded-${e}`);return E?E==="true":!0});_.useEffect(()=>{typeof window>"u"||localStorage.setItem(`assist-section-expanded-${e}`,String(w))},[w,e]);const T=_.useCallback(()=>{const E=e==="highlight"?"highlighting":e==="assessment"?"assessing":"commenting";s==null||s.client.mark.requestAssist(E,{instructions:l.trim()||void 0,tone:(e==="comment"||e==="assessment")&&d?d:void 0,density:(e==="comment"||e==="assessment"||e==="highlight")&&b?p:void 0,language:e==="comment"||e==="assessment"?n:void 0}),c(""),f("")},[e,l,d,b,p,n,s]),j=_.useCallback(()=>{s==null||s.client.mark.dismissProgress()},[s]);return g.jsxs("div",{className:"semiont-panel__section",children:[g.jsxs("button",{onClick:()=>k(!w),className:"semiont-panel__section-title semiont-panel__section-title--collapsible","aria-expanded":w,type:"button",children:[g.jsx("span",{children:a(e==="highlight"?"annotateHighlights":e==="assessment"?"annotateAssessments":"annotateComments")}),g.jsx("span",{className:"semiont-panel__section-chevron","data-expanded":w,children:"›"})]}),w&&g.jsxs("div",{className:"semiont-assist-widget","data-assisting":t&&r?"true":"false","data-type":e,children:[!r&&g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"semiont-form-field",children:[g.jsxs("label",{className:"semiont-form-field__label",children:[a("instructions")," ",a("optional")]}),g.jsx("textarea",{value:l,onChange:E=>c(E.target.value),className:"semiont-textarea",rows:3,placeholder:a("instructionsPlaceholder"),maxLength:500}),g.jsxs("div",{className:"semiont-form-field__char-count",children:[l.length,"/500"]})]}),(e==="comment"||e==="assessment")&&g.jsxs("div",{className:"semiont-form-field",children:[g.jsxs("label",{className:"semiont-form-field__label",children:[a("toneLabel")," ",a("toneOptional")]}),g.jsxs("select",{value:d,onChange:E=>f(E.target.value),className:"semiont-select",children:[g.jsx("option",{value:"",children:"Default"}),e==="comment"&&g.jsxs(g.Fragment,{children:[g.jsx("option",{value:"scholarly",children:a("toneScholarly")}),g.jsx("option",{value:"explanatory",children:a("toneExplanatory")}),g.jsx("option",{value:"conversational",children:a("toneConversational")}),g.jsx("option",{value:"technical",children:a("toneTechnical")})]}),e==="assessment"&&g.jsxs(g.Fragment,{children:[g.jsx("option",{value:"analytical",children:a("toneAnalytical")}),g.jsx("option",{value:"critical",children:a("toneCritical")}),g.jsx("option",{value:"balanced",children:a("toneBalanced")}),g.jsx("option",{value:"constructive",children:a("toneConstructive")})]})]})]}),(e==="comment"||e==="assessment"||e==="highlight")&&g.jsxs("div",{className:"semiont-form-field",children:[g.jsxs("div",{className:"semiont-form-field__header",children:[g.jsxs("label",{className:"semiont-form-field__label semiont-form-field__label--with-checkbox",children:[g.jsx("input",{type:"checkbox",checked:b,onChange:E=>x(E.target.checked),className:"semiont-checkbox","data-variant":e}),g.jsx("span",{children:a("densityLabel")})]}),b&&g.jsxs("span",{className:"semiont-form-field__info",children:[p," per 2000 words"]})]}),b&&g.jsxs(g.Fragment,{children:[g.jsx("input",{type:"range",min:e==="comment"?"2":"1",max:e==="comment"?"12":e==="assessment"?"10":"15",value:p,onChange:E=>O(Number(E.target.value)),className:"semiont-slider"}),g.jsxs("div",{className:"semiont-slider__labels",children:[g.jsx("span",{children:a("densitySparse")}),g.jsx("span",{children:a("densityDense")})]})]})]}),g.jsxs("button",{onClick:T,className:"semiont-button","data-variant":"assist","data-type":e,children:[g.jsx("span",{className:"semiont-button-icon",children:"✨"}),g.jsx("span",{children:a("annotate")})]})]}),r&&g.jsxs("div",{className:"semiont-annotation-progress","data-type":e,children:[r.requestParams&&r.requestParams.length>0&&g.jsxs("div",{className:"semiont-annotation-progress__params","data-type":e,children:[g.jsx("div",{className:"semiont-annotation-progress__params-title",children:"Request Parameters:"}),r.requestParams.map((E,Q)=>g.jsxs("div",{className:"semiont-annotation-progress__param",children:[g.jsxs("span",{className:"semiont-annotation-progress__param-label",children:[E.label,":"]})," ",E.value]},Q))]}),g.jsxs("div",{className:"semiont-annotation-progress__status",children:[g.jsxs("div",{className:"semiont-annotation-progress__message",children:[g.jsx("span",{className:"semiont-annotation-progress__icon",children:"✨"}),g.jsx("span",{children:r.message})]}),!t&&g.jsx("button",{onClick:j,className:"semiont-annotation-progress__close","aria-label":a("closeProgress"),title:a("closeProgress"),type:"button",children:"×"})]})]})]})]})}function Hd({count:e,title:t}){return g.jsx("div",{className:"semiont-panel-header",children:g.jsxs("h2",{className:"semiont-panel-header__title",children:[g.jsx("span",{className:"semiont-panel-header__text",children:t}),g.jsxs("span",{className:"semiont-panel-header__count",children:["(",e,")"]})]})})}function wte(e){if(Array.isArray(e)){const t=e.find(n=>n.type==="TextQuoteSelector");if(t&&"exact"in t)return t.exact}else if(e.type==="TextQuoteSelector"&&"exact"in e)return e.exact;return null}function _te({annotations:e,pendingAnnotation:t,isAssisting:n=!1,progress:r,locale:i,annotateMode:a=!0,scrollToAnnotationId:s,onScrollCompleted:l,hoveredAnnotationId:c}){const d=cn("AssessmentPanel"),f=De(at().activeSession$),[m,p]=_.useState(""),[O,b]=_.useState(null),x=_.useRef(null),w=_.useRef(new Map),k=_.useMemo(()=>[...e].sort((Q,P)=>{const N=oi(Qn(Q.target)),D=oi(Qn(P.target));return!N||!D?0:N.start-D.start}),[e]),T=_.useCallback((Q,P)=>{P?w.current.set(Q,P):w.current.delete(Q)},[]);_.useEffect(()=>{if(!s)return;const Q=w.current.get(s);if(Q&&x.current){const P=Q.offsetTop,N=x.current.clientHeight,D=Q.offsetHeight,L=P-N/2+D/2;x.current.scrollTo({top:L,behavior:"smooth"}),Q.classList.remove("semiont-annotation-pulse"),Q.offsetWidth,Q.classList.add("semiont-annotation-pulse"),l&&l()}},[s]),_.useEffect(()=>{if(!c)return;const Q=w.current.get(c);if(!Q||!x.current)return;const P=x.current,N=Q.getBoundingClientRect(),D=P.getBoundingClientRect();if(!(N.top>=D.top&&N.bottom<=D.bottom)){const A=Q.offsetTop,X=P.clientHeight,Z=Q.offsetHeight,V=A-X/2+Z/2;P.scrollTo({top:V,behavior:"smooth"})}},[c]);const j=()=>{if(t){const Q=m.trim(),P=Q?{type:"TextualBody",value:Q,purpose:"assessing"}:void 0;f==null||f.client.mark.submit({motivation:"assessing",selector:t.selector,...P!==void 0?{body:P}:{}}),p("")}};_.useEffect(()=>{if(!t)return;const Q=P=>{P.key==="Escape"&&(f==null||f.client.mark.cancelPending(),p(""))};return document.addEventListener("keydown",Q),()=>document.removeEventListener("keydown",Q)},[t,f]);const E=_.useCallback(({annotationId:Q})=>{b(Q),setTimeout(()=>b(null),3e3)},[]);return La({"browse:click":E}),g.jsxs("div",{className:"semiont-panel",children:[g.jsx(Hd,{annotationType:"assessment",count:e.length,title:d("title")}),t&&t.motivation==="assessing"&&g.jsxs("div",{className:"semiont-annotation-prompt","data-type":"assessment",children:[g.jsx("div",{className:"semiont-annotation-prompt__quote",children:(()=>{const Q=wte(t.selector);return Q?`"${Q.substring(0,100)}${Q.length>100?"...":""}"`:d("fragmentSelected")})()}),g.jsx("textarea",{value:m,onChange:Q=>p(Q.target.value),className:"semiont-textarea",rows:3,placeholder:d("assessmentPlaceholder"),autoFocus:!0,maxLength:2e3}),g.jsxs("div",{className:"semiont-annotation-prompt__footer",children:[g.jsxs("span",{className:"semiont-annotation-prompt__char-count",children:[m.length,"/2000"]}),g.jsxs("div",{className:"semiont-annotation-prompt__actions",children:[g.jsx("button",{onClick:()=>{f==null||f.client.mark.cancelPending(),p("")},className:"semiont-button semiont-button--secondary","data-type":"assessment",children:d("cancel")}),g.jsx("button",{onClick:j,className:"semiont-button semiont-button--primary","data-type":"assessment",children:d("save")})]})]})]}),g.jsxs("div",{ref:x,className:"semiont-panel__content",children:[a&&g.jsx(xS,{annotationType:"assessment",isAssisting:n,locale:i,progress:r}),g.jsx("div",{className:"semiont-panel__list",children:k.length===0?g.jsx("p",{className:"semiont-panel__empty",children:d("noAssessments")}):k.map(Q=>g.jsx(Ste,{assessment:Q,isFocused:Q.id===O,isHovered:Q.id===c,ref:P=>T(Q.id,P)},Q.id))})]})]})}function kte({state:e,eventCount:t,lastEventTimestamp:n,knowledgeBaseName:r}){const i=cn("CollaborationPanel"),a=e==="open"||e==="reconnecting"||e==="initial"||e==="connecting";let s;if(!n)s=i("noActivity");else{const l=new Date,c=new Date(n),d=l.getTime()-c.getTime(),f=Math.floor(d/1e3),m=Math.floor(f/60),p=Math.floor(m/60);f<10?s=i("justNow"):f<60?s=i("secondsAgo",{count:f}):m===1?s=i("minuteAgo"):m<60?s=i("minutesAgo",{count:m}):p===1?s=i("hourAgo"):p<24?s=i("hoursAgo",{count:p}):s=c.toLocaleDateString()}return g.jsxs("div",{className:"semiont-collaboration-panel",children:[g.jsx("h3",{className:"semiont-collaboration-panel__title",children:i("title")}),r&&g.jsx("div",{style:{padding:"0 0.75rem 0.5rem",fontSize:"0.8rem",color:"var(--semiont-color-neutral-400)"},children:r}),g.jsxs("div",{className:"semiont-collaboration-panel__section",children:[g.jsx("h3",{className:"semiont-collaboration-panel__heading",children:i("connectionStatus")}),g.jsxs("div",{className:"semiont-collaboration-panel__status",children:[g.jsxs("span",{className:"semiont-collaboration-panel__indicator",children:[g.jsx("span",{className:"semiont-collaboration-panel__dot","data-connected":a?"true":"false"}),g.jsx("span",{className:"semiont-collaboration-panel__status-text","data-connected":a?"true":"false",children:i(a?"live":"disconnected")})]}),a&&t>0&&g.jsxs("span",{className:"semiont-collaboration-panel__event-count",children:["(",i("events",{count:t}),")"]})]}),g.jsxs("div",{className:"semiont-collaboration-panel__details",children:[g.jsxs("div",{children:[g.jsx("span",{className:"semiont-collaboration-panel__label",children:i("lastSync")})," ",s]}),g.jsx("div",{children:i(a?"realtimeActive":"reconnecting")})]})]}),g.jsxs("div",{className:"semiont-collaboration-panel__section semiont-collaboration-panel__section--bordered",children:[g.jsx("h3",{className:"semiont-collaboration-panel__heading",children:i("sharing")}),g.jsx("p",{className:"semiont-collaboration-panel__description",children:i("collaborationComingSoon")})]})]})}function jte(e){const t=new Date(e),r=new Date().getTime()-t.getTime(),i=Math.floor(r/1e3),a=Math.floor(i/60),s=Math.floor(a/60),l=Math.floor(s/24);return i<60?"just now":a<60?`${a} minute${a>1?"s":""} ago`:s<24?`${s} hour${s>1?"s":""} ago`:l<7?`${l} day${l>1?"s":""} ago`:t.toLocaleDateString()}function Tte({comment:e,isFocused:t,isHovered:n=!1,annotateMode:r=!0,ref:i}){var T;const a=cn("CommentsPanel"),s=De(at().activeSession$),l=Xd(e.id),[c,d]=_.useState(!1),[f,m]=_.useState(""),p=_.useRef(null);_.useImperativeHandle(i,()=>p.current);const O=$$(e)||"",b=Nd(e);_.useEffect(()=>{t&&p.current&&p.current.scrollIntoView({behavior:"smooth",block:"center"})},[t]);const x=()=>{m(O),d(!0)},w=()=>{d(!1)},k=()=>{d(!1),m("")};return g.jsxs("div",{ref:p,className:`semiont-annotation-entry${n?" semiont-annotation-pulse":""}`,"data-type":"comment","data-focused":t?"true":"false",onClick:()=>{s==null||s.client.browse.click(e.id,e.motivation)},...l,children:[b&&g.jsxs("div",{className:"semiont-annotation-entry__quote","data-type":"comment",children:['"',b.substring(0,100),b.length>100?"...":"",'"']}),c?g.jsxs("div",{className:"semiont-annotation-entry__edit",onClick:j=>j.stopPropagation(),children:[g.jsx("textarea",{value:f,onChange:j=>m(j.target.value),className:"semiont-textarea",rows:3,autoFocus:!0,maxLength:2e3}),g.jsxs("div",{className:"semiont-annotation-entry__edit-footer",children:[g.jsxs("span",{className:"semiont-annotation-entry__char-count",children:[f.length,"/2000"]}),g.jsxs("div",{className:"semiont-annotation-entry__button-group",children:[g.jsx("button",{onClick:w,className:"semiont-button semiont-button--primary","data-type":"comment",children:a("save")}),g.jsx("button",{onClick:k,className:"semiont-button semiont-button--secondary",children:a("cancel")})]})]})]}):g.jsx("div",{className:"semiont-annotation-entry__body",children:O}),!c&&g.jsxs("div",{className:"semiont-annotation-entry__footer",children:[g.jsxs("div",{className:"semiont-annotation-entry__metadata",children:["By ",typeof e.creator=="string"?e.creator:((T=e.creator)==null?void 0:T.name)||"Unknown"," • ",jte(e.created||new Date().toISOString())]}),e.generator&&g.jsxs("div",{className:"semiont-annotation-entry__metadata",children:["Via ",typeof e.generator=="string"?e.generator:e.generator.name]}),r&&g.jsx("div",{className:"semiont-annotation-entry__actions",onClick:j=>j.stopPropagation(),children:g.jsx("button",{onClick:x,className:"semiont-text-button","data-variant":"comment",children:a("edit")})})]})]})}function Cte(e){if(Array.isArray(e)){const t=e.find(n=>n.type==="TextQuoteSelector");if(t&&"exact"in t)return t.exact}else if(e.type==="TextQuoteSelector"&&"exact"in e)return e.exact;return null}function Ete({annotations:e,pendingAnnotation:t,annotateMode:n=!0,isAssisting:r=!1,progress:i,locale:a,scrollToAnnotationId:s,onScrollCompleted:l,hoveredAnnotationId:c}){const d=cn("CommentsPanel"),f=De(at().activeSession$),[m,p]=_.useState(""),[O,b]=_.useState(null),x=_.useRef(null),w=_.useRef(new Map),k=_.useMemo(()=>[...e].sort((Q,P)=>{const N=oi(Qn(Q.target)),D=oi(Qn(P.target));return!N||!D?0:N.start-D.start}),[e]),T=_.useCallback((Q,P)=>{P?w.current.set(Q,P):w.current.delete(Q)},[]);_.useEffect(()=>{if(!s)return;const Q=w.current.get(s);if(Q&&x.current){const P=Q.offsetTop,N=x.current.clientHeight,D=Q.offsetHeight,L=P-N/2+D/2;x.current.scrollTo({top:L,behavior:"smooth"}),Q.classList.remove("semiont-annotation-pulse"),Q.offsetWidth,Q.classList.add("semiont-annotation-pulse"),l&&l()}},[s]),_.useEffect(()=>{if(!c)return;const Q=w.current.get(c);if(!Q||!x.current)return;const P=x.current,N=Q.getBoundingClientRect(),D=P.getBoundingClientRect();if(!(N.top>=D.top&&N.bottom<=D.bottom)){const A=Q.offsetTop,X=P.clientHeight,Z=Q.offsetHeight,V=A-X/2+Z/2;P.scrollTo({top:V,behavior:"smooth"})}},[c]);const j=_.useCallback(({annotationId:Q})=>{b(Q),setTimeout(()=>b(null),3e3)},[]);La({"browse:click":j});const E=()=>{m.trim()&&t&&(f==null||f.client.mark.submit({motivation:"commenting",selector:t.selector,body:[{type:"TextualBody",value:m,purpose:"commenting"}]}),p(""))};return _.useEffect(()=>{if(!t)return;const Q=P=>{P.key==="Escape"&&(f==null||f.client.mark.cancelPending(),p(""))};return document.addEventListener("keydown",Q),()=>document.removeEventListener("keydown",Q)},[t,f]),g.jsxs("div",{className:"semiont-panel",children:[g.jsx(Hd,{annotationType:"comment",count:e.length,title:d("title")}),t&&t.motivation==="commenting"&&g.jsxs("div",{className:"semiont-annotation-prompt","data-type":"comment",children:[g.jsx("div",{className:"semiont-annotation-prompt__quote",children:(()=>{const Q=Cte(t.selector);return Q?`"${Q.substring(0,100)}${Q.length>100?"...":""}"`:d("fragmentSelected")})()}),g.jsx("textarea",{value:m,onChange:Q=>p(Q.target.value),className:"semiont-textarea",rows:3,placeholder:d("commentPlaceholder"),autoFocus:!0,maxLength:2e3}),g.jsxs("div",{className:"semiont-annotation-prompt__footer",children:[g.jsxs("span",{className:"semiont-annotation-prompt__char-count",children:[m.length,"/2000"]}),g.jsxs("div",{className:"semiont-annotation-prompt__actions",children:[g.jsx("button",{onClick:()=>{f==null||f.client.mark.cancelPending(),p("")},className:"semiont-button semiont-button--secondary","data-type":"comment",children:d("cancel")}),g.jsx("button",{onClick:E,disabled:!m.trim(),className:"semiont-button semiont-button--primary","data-type":"comment",children:d("save")})]})]})]}),g.jsxs("div",{ref:x,className:"semiont-panel__content",children:[n&&g.jsx(xS,{annotationType:"comment",isAssisting:r,locale:a,progress:i}),g.jsx("div",{className:"semiont-panel__list",children:k.length===0?g.jsx("p",{className:"semiont-panel__empty",children:d("noComments")}):k.map(Q=>g.jsx(Tte,{comment:Q,isFocused:Q.id===O,isHovered:Q.id===c,annotateMode:n,ref:P=>T(Q.id,P)},Q.id))})]})]})}function Ate(e){const t=new Date(e),r=new Date().getTime()-t.getTime(),i=Math.floor(r/1e3),a=Math.floor(i/60),s=Math.floor(a/60),l=Math.floor(s/24);return i<60?"just now":a<60?`${a} minute${a>1?"s":""} ago`:s<24?`${s} hour${s>1?"s":""} ago`:l<7?`${l} day${l>1?"s":""} ago`:t.toLocaleDateString()}function Qte({highlight:e,isFocused:t,isHovered:n=!1,ref:r}){var l;const i=De(at().activeSession$),a=Xd(e.id),s=Nd(e);return g.jsxs("div",{ref:r,className:`semiont-annotation-entry${n?" semiont-annotation-pulse":""}`,"data-type":"highlight","data-focused":t?"true":"false",onClick:()=>{i==null||i.client.browse.click(e.id,e.motivation)},...a,children:[s&&g.jsxs("div",{className:"semiont-annotation-entry__quote","data-type":"highlight",children:['"',s.substring(0,200),s.length>200?"...":"",'"']}),g.jsxs("div",{className:"semiont-annotation-entry__metadata",children:["By ",typeof e.creator=="string"?e.creator:((l=e.creator)==null?void 0:l.name)||"Unknown"," • ",Ate(e.created||new Date().toISOString())]}),e.generator&&g.jsxs("div",{className:"semiont-annotation-entry__metadata",children:["Via ",typeof e.generator=="string"?e.generator:e.generator.name]})]})}function Pte({annotations:e,pendingAnnotation:t,isAssisting:n=!1,progress:r,annotateMode:i=!0,scrollToAnnotationId:a,onScrollCompleted:s,hoveredAnnotationId:l}){const c=cn("HighlightPanel"),d=De(at().activeSession$),[f,m]=_.useState(null),p=_.useRef(null),O=_.useRef(new Map),b=_.useMemo(()=>[...e].sort((k,T)=>{const j=oi(Qn(k.target)),E=oi(Qn(T.target));return!j||!E?0:j.start-E.start}),[e]),x=_.useCallback((k,T)=>{T?O.current.set(k,T):O.current.delete(k)},[]);_.useEffect(()=>{if(!a)return;const k=O.current.get(a);if(k&&p.current){const T=k.offsetTop,j=p.current.clientHeight,E=k.offsetHeight,Q=T-j/2+E/2;p.current.scrollTo({top:Q,behavior:"smooth"}),k.classList.remove("semiont-annotation-pulse"),k.offsetWidth,k.classList.add("semiont-annotation-pulse"),s&&s()}},[a]),_.useEffect(()=>{if(!l)return;const k=O.current.get(l);if(!k||!p.current)return;const T=p.current,j=k.getBoundingClientRect(),E=T.getBoundingClientRect();if(!(j.top>=E.top&&j.bottom<=E.bottom)){const P=k.offsetTop,N=T.clientHeight,D=k.offsetHeight,L=P-N/2+D/2;T.scrollTo({top:L,behavior:"smooth"})}},[l]);const w=_.useCallback(({annotationId:k})=>{m(k),setTimeout(()=>m(null),3e3)},[]);return La({"browse:click":w}),_.useEffect(()=>{t&&t.motivation==="highlighting"&&(d==null||d.client.mark.submit({motivation:"highlighting",selector:t.selector}))},[t,d]),g.jsxs("div",{className:"semiont-panel",children:[g.jsx(Hd,{annotationType:"highlight",count:e.length,title:c("title")}),g.jsxs("div",{ref:p,className:"semiont-panel__content",children:[i&&g.jsx(xS,{annotationType:"highlight",isAssisting:n,progress:r}),g.jsx("div",{className:"semiont-panel__list",children:b.length===0?g.jsx("p",{className:"semiont-panel__empty",children:c("noHighlights")}):b.map(k=>g.jsx(Qte,{highlight:k,isFocused:k.id===f,isHovered:k.id===l,ref:T=>x(k.id,T)},k.id))})]})]})}function Nte({resource:e}){const t=_.useRef(null),n=_.useRef(null),{showLineNumbers:r}=$x();_.useEffect(()=>{var f;if(!t.current)return;const a=((f=document.documentElement)==null?void 0:f.classList.contains("dark"))??!1,s=JSON.stringify(e,null,2),l=[PM(),$e.editable.of(!1),Gt.readOnly.of(!0)];r&&l.push(Rm()),a?l.push(NM):(l.push(GN),l.push(zx(KN)));const c=Gt.create({doc:s,extensions:l}),d=new $e({state:c,parent:t.current});return n.current=d,()=>{d.destroy(),n.current=null}},[e,r]);const i=async()=>{try{await navigator.clipboard.writeText(JSON.stringify(e,null,2))}catch(a){console.error("Failed to copy JSON-LD:",a)}};return g.jsxs("div",{className:"semiont-jsonld-panel",children:[g.jsxs("div",{className:"semiont-jsonld-panel__header",children:[g.jsx("h3",{className:"semiont-jsonld-panel__title",children:"JSON-LD"}),g.jsx("button",{onClick:i,className:"semiont-button semiont-button--icon",title:"Copy to clipboard",children:"📋 Copy"})]}),g.jsx("div",{ref:t,className:"semiont-jsonld-panel__editor"})]})}function Rte({reference:e,isFocused:t,isHovered:n=!1,routes:r,annotateMode:i=!0,isGenerating:a=!1,ref:s}){const l=cn("ReferencesPanel"),c=De(at().activeSession$),d=c==null?void 0:c.client,f=aR(),m=Xd(e.id),p=Nd(e)||"",O=ad(e.body),b=O?Aa(e.body):null,x=tR(e),w=Qn(e.target),k=z$(w),T=RA(w),j=k?"Fragment annotation":T?"Image annotation":"Annotation",E=e,Q=E._resolvedDocumentName,P=E._resolvedDocumentMediaType,N=JN(P),D=()=>{b&&f(r.resourceDetail(b),{resourceId:b})},L=typeof e.target=="object"&&"source"in e.target?e.target.source:"",A=()=>{L&&b&&d&&d.bind.body(ki(L),e.id,[{op:"remove",item:{type:"SpecificResource",source:b,purpose:"linking"}}]).catch(()=>{})},X=()=>{c==null||c.client.bind.initiate({annotationId:e.id,resourceId:ki(L),defaultTitle:p,entityTypes:x})},Z=$=>{$.stopPropagation(),O?D():i&&X()},V=O||i;return g.jsxs("div",{ref:s,className:`semiont-annotation-entry${n?" semiont-annotation-pulse":""}`,"data-type":"reference","data-focused":t?"true":"false",onClick:()=>{c==null||c.client.browse.click(e.id,e.motivation)},...m,children:[g.jsxs("div",{className:"semiont-annotation-entry__header",children:[g.jsxs("div",{className:"semiont-reference-icon-group",children:[g.jsx("button",{className:`semiont-reference-icon${V?" semiont-reference-icon--clickable":""}`,title:l(O?"open":i?"resolve":"stub"),onClick:V?Z:void 0,"data-generating":!O&&a?"true":"false",tabIndex:V?0:-1,children:O?"🔗":"❓"}),i&&O&&g.jsx("button",{className:"semiont-reference-unlink",title:l("unlink"),onClick:$=>{$.stopPropagation(),A()},children:"⛓️💥"})]}),g.jsxs("div",{className:"semiont-annotation-entry__content",children:[p&&g.jsxs("div",{className:"semiont-annotation-entry__quote","data-type":"reference",children:['"',p.substring(0,100),p.length>100?"...":"",'"']}),!p&&g.jsx("div",{className:"semiont-annotation-entry__meta",children:j}),Q&&g.jsx("div",{className:"semiont-reference-link",children:g.jsxs("span",{children:["→ ",N," ",Q]})})]})]}),x.length>0&&g.jsx("div",{className:"semiont-annotation-entry__tags",children:x.map(($,W)=>g.jsx("span",{className:"semiont-tag","data-variant":"blue",children:$},W))}),e.generator&&g.jsxs("div",{className:"semiont-annotation-entry__metadata",children:["Via ",typeof e.generator=="string"?e.generator:e.generator.name]})]})}function Mte(e){if(Array.isArray(e)){const t=e.find(n=>n.type==="TextQuoteSelector");if(t&&"exact"in t)return t.exact}else if(e.type==="TextQuoteSelector"&&"exact"in e)return e.exact;return null}function Dte({annotations:e=[],isAssisting:t,progress:n,annotateMode:r=!0,Link:i,routes:a,allEntityTypes:s,generatingReferenceId:l,referencedBy:c=[],referencedByLoading:d=!1,pendingAnnotation:f,scrollToAnnotationId:m,onScrollCompleted:p,hoveredAnnotationId:O}){const b=cn("ReferencesPanel"),x=De(at().activeSession$),[w,k]=_.useState([]),[T,j]=_.useState(null),[E,Q]=_.useState([]),[P,N]=_.useState(!1),[D,L]=_.useState(null),A=_.useRef(null),[X,Z]=_.useState(()=>{if(typeof window>"u")return!0;const G=localStorage.getItem("assist-section-expanded-reference");return G?G==="true":!0});_.useEffect(()=>{typeof window>"u"||localStorage.setItem("assist-section-expanded-reference",String(X))},[X]);const V=_.useRef(new Map),$=_.useMemo(()=>[...e].sort((G,re)=>{const M=oi(Qn(G.target)),he=oi(Qn(re.target));return!M||!he?0:M.start-he.start}),[e]),W=_.useCallback((G,re)=>{re?V.current.set(G,re):V.current.delete(G)},[]);_.useEffect(()=>{if(!m)return;const G=V.current.get(m);if(G&&A.current){const re=G.offsetTop,M=A.current.clientHeight,he=G.offsetHeight,ye=re-M/2+he/2;A.current.scrollTo({top:ye,behavior:"smooth"}),G.classList.remove("semiont-annotation-pulse"),G.offsetWidth,G.classList.add("semiont-annotation-pulse"),p&&p()}else console.warn("[ReferencesPanel] Element not found for scrollToAnnotationId:",m)},[m]),_.useEffect(()=>{if(!O)return;const G=V.current.get(O);if(!G||!A.current)return;const re=A.current,M=G.getBoundingClientRect(),he=re.getBoundingClientRect();if(!(M.top>=he.top&&M.bottom<=he.bottom)){const Oe=G.offsetTop,Be=re.clientHeight,Re=G.offsetHeight,Xe=Oe-Be/2+Re/2;re.scrollTo({top:Xe,behavior:"smooth"})}},[O]);const I=_.useCallback(({annotationId:G})=>{L(G),setTimeout(()=>L(null),3e3)},[]);La({"browse:click":I});const z=()=>{j(null),x==null||x.client.mark.requestAssist("linking",{entityTypes:w,includeDescriptiveReferences:P})},ee=_.useRef(!1);_.useEffect(()=>{if(t){ee.current=!1;return}!t&&!ee.current&&(n!=null&&n.completedEntityTypes)&&(ee.current=!0,j(n.completedEntityTypes),k([]))},[t,n==null?void 0:n.completedEntityTypes]);const le=G=>{Q(re=>re.includes(G)?re.filter(M=>M!==G):[...re,G])},q=()=>{if(f){const G=E.join(",")||void 0;x==null||x.client.mark.submit({motivation:"linking",selector:f.selector,body:G?[{type:"TextualBody",value:G,purpose:"tagging"}]:[]}),Q([])}};return _.useEffect(()=>{if(!f)return;const G=re=>{re.key==="Escape"&&(x==null||x.client.mark.cancelPending(),Q([]))};return document.addEventListener("keydown",G),()=>document.removeEventListener("keydown",G)},[f,x]),g.jsxs("div",{className:"semiont-panel",children:[g.jsx(Hd,{annotationType:"reference",count:e.length,title:b("title")}),f&&f.motivation==="linking"&&g.jsxs("div",{className:"semiont-annotation-prompt","data-type":"reference",children:[g.jsx("div",{className:"semiont-annotation-prompt__quote",children:(()=>{const G=Mte(f.selector);return G?`"${G.substring(0,100)}${G.length>100?"...":""}"`:b("fragmentSelected")})()}),s.length>0&&g.jsxs("div",{className:"semiont-form-field",children:[g.jsx("p",{className:"semiont-form-field__label",children:b("entityTypesOptional")}),g.jsx("div",{className:"semiont-tag-selector",children:s.map(G=>g.jsx("button",{onClick:()=>le(G),className:"semiont-tag-selector__item","data-selected":E.includes(G)?"true":"false",children:G},G))})]}),g.jsx("div",{className:"semiont-annotation-prompt__footer",children:g.jsxs("div",{className:"semiont-annotation-prompt__actions",children:[g.jsx("button",{onClick:()=>{x==null||x.client.mark.cancelPending(),Q([])},className:"semiont-button semiont-button--secondary","data-type":"reference",children:b("cancel")}),g.jsxs("button",{onClick:q,className:"semiont-button semiont-button--primary","data-type":"reference",children:["🔗 ",b("createReference")]})]})})]}),g.jsxs("div",{ref:A,className:"semiont-panel__content",children:[r&&g.jsxs("div",{className:"semiont-panel__section",children:[g.jsxs("button",{onClick:()=>Z(!X),className:"semiont-panel__section-title semiont-panel__section-title--collapsible","aria-expanded":X,type:"button",children:[g.jsx("span",{children:b("annotateReferences")}),g.jsx("span",{className:"semiont-panel__section-chevron","data-expanded":X,children:"›"})]}),X&&g.jsxs(g.Fragment,{children:[!t&&g.jsx("div",{className:"semiont-assist-widget","data-type":"reference",children:g.jsxs(g.Fragment,{children:[T&&T.length>0&&g.jsx("div",{className:"semiont-assist-widget__log",children:g.jsx("div",{className:"semiont-assist-widget__log-items",children:T.map((G,re)=>g.jsxs("div",{className:"semiont-assist-widget__log-item",children:[g.jsx("span",{className:"semiont-assist-widget__log-check",children:"✓"}),g.jsxs("span",{className:"semiont-assist-widget__log-type",children:[G.entityType,":"]}),g.jsx("span",{children:b("found",{count:G.foundCount})})]},re))})}),g.jsxs("div",{className:"semiont-assist-widget__entity-types",children:[g.jsx("p",{className:"semiont-assist-widget__label",children:b("selectEntityTypes")}),g.jsx("div",{className:"semiont-assist-widget__chips",children:s.length>0?s.map(G=>g.jsx("button",{onClick:()=>{k(re=>re.includes(G)?re.filter(M=>M!==G):[...re,G])},"aria-pressed":w.includes(G),"aria-label":`${w.includes(G)?b("deselect"):b("select")} ${G}`,className:"semiont-chip semiont-chip--selectable","data-selected":w.includes(G),children:G},G)):g.jsx("p",{className:"semiont-assist-widget__no-types",children:b("noEntityTypes")})})]}),w.length>0&&g.jsx("p",{className:"semiont-assist-widget__count",children:b("typesSelected",{count:w.length})}),g.jsxs("div",{className:"semiont-assist-widget__checkbox-group",children:[g.jsxs("label",{className:"semiont-assist-widget__checkbox-label",children:[g.jsx("input",{type:"checkbox",checked:P,onChange:G=>N(G.target.checked),className:"semiont-assist-widget__checkbox"}),g.jsx("span",{children:b("includeDescriptiveReferences")})]}),g.jsx("p",{className:"semiont-assist-widget__checkbox-hint",children:b("descriptiveReferencesTooltip")})]}),g.jsxs("button",{onClick:z,disabled:w.length===0,title:b("annotate"),className:"semiont-button","data-variant":"assist","data-type":"reference",children:[g.jsx("span",{className:"semiont-button-icon",children:"✨"}),g.jsx("span",{children:b("annotate")})]})]})}),t&&n&&g.jsx(xY,{progress:n,annotationType:"reference"})]})]}),g.jsxs("div",{children:[g.jsx("div",{className:"semiont-panel__divider",children:g.jsxs("h3",{className:"semiont-panel__subtitle",children:[b("outgoingReferences")," (",$.length,")"]})}),g.jsx("div",{className:"semiont-panel__list",children:$.length===0?g.jsx("p",{className:"semiont-panel__empty-message",children:b("noReferences")}):$.map(G=>g.jsx(Rte,{reference:G,isFocused:G.id===D,isHovered:G.id===O,routes:a,annotateMode:r,isGenerating:G.id===l,ref:re=>W(G.id,re)},G.id))})]}),g.jsxs("div",{children:[g.jsx("div",{className:"semiont-panel__divider",children:g.jsxs("h3",{className:"semiont-panel__subtitle",children:[b("incomingReferences")," (",c.length,")",d&&g.jsxs("span",{className:"semiont-panel__loading-indicator",children:["(",b("loading"),")"]})]})}),c.length>0?g.jsx("div",{className:"semiont-panel__list",children:c.map(G=>{var M;const re=G.target.source;return g.jsxs("div",{className:"semiont-reference-item semiont-reference-item--incoming",children:[g.jsxs("div",{className:"semiont-reference-item__header",children:[g.jsx("span",{className:"semiont-reference-item__title",children:G.resourceName||b("untitledResource")}),g.jsx(i,{href:a.resourceDetail(re),className:"semiont-reference-item__link",title:b("open"),children:"🔗"})]}),g.jsxs("span",{className:"semiont-reference-item__excerpt",children:['"',((M=G.target.selector)==null?void 0:M.exact)||b("noText"),'"']})]},G.id)})}):g.jsx("p",{className:"semiont-panel__empty-message semiont-panel__empty-message--small",children:b(d?"loadingEllipsis":"noIncomingReferences")})]})]})]})}function Lte({resourceId:e,documentEntityTypes:t,documentLocale:n,primaryMediaType:r,primaryByteSize:i,storageUri:a,isArchived:s=!1,dateCreated:l,dateModified:c,creationMethod:d,wasAttributedTo:f,wasDerivedFrom:m,generator:p}){const O=cn("ResourceInfoPanel"),b=De(at().activeSession$);return g.jsxs("div",{className:"semiont-resource-info-panel",children:[g.jsx("h3",{className:"semiont-resource-info-panel__title",children:O("title")}),g.jsxs("div",{className:"semiont-resource-info-panel__section",children:[g.jsx("h3",{className:"semiont-resource-info-panel__heading",children:O("locale")}),n?g.jsx("div",{className:"semiont-resource-info-panel__value",children:Y$(n)}):g.jsx("div",{className:"semiont-resource-info-panel__value semiont-resource-info-panel__value--empty",children:O("notSpecified")})]}),(r||i!==void 0)&&g.jsxs("div",{className:"semiont-resource-info-panel__section",children:[g.jsx("h3",{className:"semiont-resource-info-panel__heading",children:O("representation")}),g.jsxs("div",{className:"semiont-resource-info-panel__field-group",children:[r&&g.jsxs("div",{children:[g.jsx("span",{className:"semiont-resource-info-panel__label",children:O("mediaType")}),g.jsx("span",{className:"semiont-resource-info-panel__value",children:r})]}),i!==void 0&&g.jsxs("div",{children:[g.jsx("span",{className:"semiont-resource-info-panel__label",children:O("byteSize")}),g.jsxs("span",{className:"semiont-resource-info-panel__value",children:[i.toLocaleString()," bytes"]})]}),a&&g.jsxs("div",{children:[g.jsx("span",{className:"semiont-resource-info-panel__label",children:O("storageUri")}),g.jsx("span",{className:"semiont-resource-info-panel__value",children:a})]})]})]}),(l||c||d||f||m||p)&&g.jsxs("div",{className:"semiont-resource-info-panel__section",children:[g.jsx("h3",{className:"semiont-resource-info-panel__heading",children:O("provenance")}),g.jsxs("div",{className:"semiont-resource-info-panel__field-group",children:[l&&g.jsxs("div",{children:[g.jsx("span",{className:"semiont-resource-info-panel__label",children:O("createdAt")}),g.jsx("span",{className:"semiont-resource-info-panel__value",children:new Date(l).toLocaleString()})]}),c&&g.jsxs("div",{children:[g.jsx("span",{className:"semiont-resource-info-panel__label",children:O("modifiedAt")}),g.jsx("span",{className:"semiont-resource-info-panel__value",children:new Date(c).toLocaleString()})]}),d&&g.jsxs("div",{children:[g.jsx("span",{className:"semiont-resource-info-panel__label",children:O("creationMethod")}),g.jsx("span",{className:"semiont-resource-info-panel__value",children:d})]}),f&&g.jsxs("div",{children:[g.jsx("span",{className:"semiont-resource-info-panel__label",children:O("attributedTo")}),g.jsx("span",{className:"semiont-resource-info-panel__value",children:(Array.isArray(f)?f:[f]).map(x=>x.name).join(", ")})]}),m&&g.jsxs("div",{children:[g.jsx("span",{className:"semiont-resource-info-panel__label",children:O("derivedFrom")}),g.jsx("span",{className:"semiont-resource-info-panel__value",children:(Array.isArray(m)?m:[m]).map((x,w)=>g.jsxs("button",{className:"semiont-resource-info-panel__link",onClick:()=>b==null?void 0:b.client.browse.navigateReference(ki(x)),children:[w>0&&", ",x]},x))})]}),p&&g.jsxs("div",{children:[g.jsx("span",{className:"semiont-resource-info-panel__label",children:O("generatedBy")}),g.jsx("span",{className:"semiont-resource-info-panel__value",children:(Array.isArray(p)?p:[p]).map(x=>x.name).join(", ")})]})]})]}),t.length>0&&g.jsxs("div",{className:"semiont-resource-info-panel__section",children:[g.jsx("h3",{className:"semiont-resource-info-panel__heading",children:O("entityTypeTags")}),g.jsx("div",{className:"semiont-resource-info-panel__tag-list",children:t.map(x=>g.jsx("span",{className:"semiont-tag","data-variant":"blue",children:x},x))})]}),g.jsxs("div",{className:"semiont-resource-info-panel__action-section",children:[g.jsxs("button",{onClick:()=>b==null?void 0:b.client.yield.clone(),className:"semiont-resource-button semiont-resource-button--secondary",children:["🔗 ",O("clone")]}),g.jsx("p",{className:"semiont-resource-info-panel__description",children:O("cloneDescription")})]}),g.jsx("div",{className:"semiont-resource-info-panel__action-section",children:s?g.jsxs(g.Fragment,{children:[g.jsxs("button",{onClick:()=>b==null?void 0:b.client.mark.unarchive(ki(e)),className:"semiont-resource-button semiont-resource-button--secondary",children:["📤 ",O("unarchive")]}),g.jsx("p",{className:"semiont-resource-info-panel__description",children:O("unarchiveDescription")})]}):g.jsxs(g.Fragment,{children:[g.jsxs("button",{onClick:()=>b==null?void 0:b.client.mark.archive(ki(e)),className:"semiont-resource-button semiont-resource-button--archive",children:["📦 ",O("archive")]}),g.jsx("p",{className:"semiont-resource-info-panel__description",children:O("archiveDescription")})]})})]})}function zte({highlights:e,comments:t,assessments:n,references:r,tags:i}){const a=cn("StatisticsPanel"),s=r.filter(f=>!ad(f.body)).length,l=r.filter(f=>ad(f.body)).length,c=new Map;r.forEach(f=>{tR(f).forEach(p=>{c.set(p,(c.get(p)||0)+1)})});const d=Array.from(c.entries()).sort((f,m)=>m[1]-f[1]);return g.jsx("div",{className:"semiont-statistics-panel",children:g.jsxs("div",{className:"semiont-statistics-panel__content",children:[g.jsx("h2",{className:"semiont-statistics-panel__title",children:a("title")}),g.jsxs("div",{className:"semiont-statistics-panel__list",children:[g.jsxs("div",{className:"semiont-statistics-panel__item",children:[g.jsx("span",{className:"semiont-statistics-panel__label",children:a("highlights")}),g.jsx("span",{className:"semiont-statistics-panel__value",children:e.length})]}),g.jsxs("div",{className:"semiont-statistics-panel__item",children:[g.jsx("span",{className:"semiont-statistics-panel__label",children:a("comments")}),g.jsx("span",{className:"semiont-statistics-panel__value",children:t.length})]}),g.jsxs("div",{className:"semiont-statistics-panel__item",children:[g.jsx("span",{className:"semiont-statistics-panel__label",children:a("assessments")}),g.jsx("span",{className:"semiont-statistics-panel__value",children:n.length})]}),g.jsxs("div",{className:"semiont-statistics-panel__item",children:[g.jsx("span",{className:"semiont-statistics-panel__label",children:a("tags")}),g.jsx("span",{className:"semiont-statistics-panel__value",children:i.length})]}),g.jsxs("div",{className:"semiont-statistics-panel__item",children:[g.jsx("span",{className:"semiont-statistics-panel__label",children:a("references")}),g.jsx("span",{className:"semiont-statistics-panel__value",children:r.length}),g.jsxs("div",{className:"semiont-statistics-panel__subitems",children:[g.jsxs("div",{className:"semiont-statistics-panel__subitem",children:[g.jsx("span",{className:"semiont-statistics-panel__sublabel",children:a("stub")}),g.jsx("span",{className:"semiont-statistics-panel__subvalue",children:s})]}),g.jsxs("div",{className:"semiont-statistics-panel__subitem",children:[g.jsx("span",{className:"semiont-statistics-panel__sublabel",children:a("resolved")}),g.jsx("span",{className:"semiont-statistics-panel__subvalue",children:l})]})]})]}),d.length>0&&g.jsxs("div",{className:"semiont-statistics-panel__entity-types",children:[g.jsx("span",{className:"semiont-statistics-panel__label",children:a("entityTypes")}),g.jsx("div",{className:"semiont-statistics-panel__entity-list",children:d.map(([f,m])=>g.jsxs("div",{className:"semiont-statistics-panel__entity-item",children:[g.jsx("span",{className:"semiont-statistics-panel__entity-name",children:f}),g.jsx("span",{className:"semiont-tag","data-variant":"blue",children:m})]},f))})]})]})]})})}function $te({tag:e,isFocused:t,isHovered:n=!1,ref:r}){const i=De(at().activeSession$),a=Xd(e.id),s=Nd(e),l=p7(e),c=g7(e),d=c?h7(c):null;return g.jsxs("div",{ref:r,onClick:()=>{i==null||i.client.browse.click(e.id,e.motivation)},...a,className:`semiont-annotation-entry${n?" semiont-annotation-pulse":""}`,"data-type":"tag","data-focused":t?"true":"false",children:[g.jsxs("div",{className:"semiont-annotation-entry__header",children:[g.jsx("span",{className:"semiont-tag-badge","data-variant":"tag",children:l}),d&&g.jsx("span",{className:"semiont-annotation-entry__meta",children:d.name})]}),g.jsxs("div",{className:"semiont-annotation-entry__quote","data-type":"tag",children:['"',s.substring(0,150),s.length>150?"...":"",'"']}),e.generator&&g.jsxs("div",{className:"semiont-annotation-entry__metadata",children:["Via ",typeof e.generator=="string"?e.generator:e.generator.name]})]})}function Ite(e){if(Array.isArray(e)){const t=e.find(n=>n.type==="TextQuoteSelector");if(t&&"exact"in t)return t.exact}else if(e.type==="TextQuoteSelector"&&"exact"in e)return e.exact;return null}function qte({annotations:e,annotateMode:t=!0,isAssisting:n=!1,progress:r,pendingAnnotation:i,scrollToAnnotationId:a,onScrollCompleted:s,hoveredAnnotationId:l}){const c=cn("TaggingPanel"),d=De(at().activeSession$),[f,m]=_.useState("legal-irac"),[p,O]=_.useState(new Set),[b,x]=_.useState(null),w=_.useRef(null),[k,T]=_.useState(()=>{if(typeof window>"u")return!0;const $=localStorage.getItem("assist-section-expanded-tag");return $?$==="true":!0});_.useEffect(()=>{typeof window>"u"||localStorage.setItem("assist-section-expanded-tag",String(k))},[k]);const j=_.useCallback(({annotationId:$})=>{x($),setTimeout(()=>x(null),3e3)},[]);La({"browse:click":j});const E=_.useRef(new Map),Q=_.useMemo(()=>[...e].sort(($,W)=>{const I=oi(Qn($.target)),z=oi(Qn(W.target));return!I||!z?0:I.start-z.start}),[e]),P=_.useCallback(($,W)=>{W?E.current.set($,W):E.current.delete($)},[]);_.useEffect(()=>{if(!a)return;const $=E.current.get(a);if($&&w.current){const W=$.offsetTop,I=w.current.clientHeight,z=$.offsetHeight,ee=W-I/2+z/2;w.current.scrollTo({top:ee,behavior:"smooth"}),$.classList.remove("semiont-annotation-pulse"),$.offsetWidth,$.classList.add("semiont-annotation-pulse"),s&&s()}},[a]),_.useEffect(()=>{if(!l)return;const $=E.current.get(l);if(!$||!w.current)return;const W=w.current,I=$.getBoundingClientRect(),z=W.getBoundingClientRect();if(!(I.top>=z.top&&I.bottom<=z.bottom)){const le=$.offsetTop,q=W.clientHeight,G=$.offsetHeight,re=le-q/2+G/2;W.scrollTo({top:re,behavior:"smooth"})}},[l]);const N=m7(),D=N.find($=>$.id===f),L=$=>{m($),O(new Set)},A=$=>{const W=new Set(p);W.has($)?W.delete($):W.add($),O(W)},X=()=>{D&&O(new Set(D.tags.map($=>$.name)))},Z=()=>{O(new Set)},V=()=>{p.size>0&&(d==null||d.client.mark.requestAssist("tagging",{schemaId:f,categories:Array.from(p)}),O(new Set))};return _.useEffect(()=>{if(!i)return;const $=W=>{W.key==="Escape"&&(d==null||d.client.mark.cancelPending())};return document.addEventListener("keydown",$),()=>document.removeEventListener("keydown",$)},[i,d]),g.jsxs("div",{className:"semiont-panel",children:[g.jsx(Hd,{annotationType:"tag",count:e.length,title:c("title")}),g.jsxs("div",{ref:w,className:"semiont-panel__content",children:[i&&i.motivation==="tagging"&&g.jsxs("div",{className:"semiont-annotation-prompt","data-type":"tag",children:[g.jsx("h3",{className:"semiont-annotation-prompt__title",children:c("createTagForSelection")}),g.jsx("div",{className:"semiont-annotation-prompt__quote",children:g.jsx("p",{className:"semiont-annotation-prompt__text",children:(()=>{const $=Ite(i.selector);return $?`"${$.substring(0,100)}${$.length>100?"...":""}"`:c("fragmentSelected")})()})}),g.jsxs("div",{className:"semiont-form-field",children:[g.jsx("label",{className:"semiont-form-field__label",children:c("selectSchema")}),g.jsx("select",{value:f,onChange:$=>L($.target.value),className:"semiont-select",children:N.map($=>g.jsx("option",{value:$.id,children:c(`schema${$.id==="legal-irac"?"Legal":$.id==="scientific-imrad"?"Scientific":"Argument"}`)},$.id))})]}),D&&g.jsxs("div",{className:"semiont-form-field",children:[g.jsx("label",{className:"semiont-form-field__label",children:c("selectCategory")}),g.jsxs("select",{className:"semiont-select",onChange:$=>{$.target.value&&i&&(d==null||d.client.mark.submit({motivation:"tagging",selector:i.selector,body:[{type:"TextualBody",value:$.target.value,purpose:"tagging"},{type:"TextualBody",value:f,purpose:"classifying"}]}))},defaultValue:"",children:[g.jsx("option",{value:"",children:c("chooseCategory")}),D.tags.map($=>g.jsx("option",{value:$.name,children:$.name},$.name))]})]}),g.jsx("div",{className:"semiont-annotation-prompt__footer",children:g.jsx("button",{onClick:()=>d==null?void 0:d.client.mark.cancelPending(),className:"semiont-button semiont-button--secondary","data-type":"tag",children:c("cancel")})})]}),t&&g.jsxs("div",{className:"semiont-panel__section",children:[g.jsxs("button",{onClick:()=>T(!k),className:"semiont-panel__section-title semiont-panel__section-title--collapsible","aria-expanded":k,type:"button",children:[g.jsx("span",{children:c("annotateTags")}),g.jsx("span",{className:"semiont-panel__section-chevron","data-expanded":k,children:"›"})]}),k&&g.jsxs("div",{className:"semiont-assist-widget","data-assisting":n&&r?"true":"false","data-type":"tag",children:[!n&&!r&&g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"semiont-form-field",children:[g.jsx("label",{className:"semiont-form-field__label",children:c("selectSchema")}),g.jsx("select",{value:f,onChange:$=>L($.target.value),className:"semiont-select",children:N.map($=>g.jsx("option",{value:$.id,children:c(`schema${$.id==="legal-irac"?"Legal":$.id==="scientific-imrad"?"Scientific":"Argument"}`)},$.id))}),D&&g.jsx("p",{className:"semiont-form__help",children:D.description})]}),D&&g.jsxs("div",{className:"semiont-form-field",children:[g.jsx("label",{className:"semiont-form-field__label",children:c("selectCategories")}),g.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginBottom:"0.75rem"},children:[g.jsx("button",{onClick:X,type:"button",className:"semiont-button--secondary",style:{fontSize:"var(--semiont-text-xs)",padding:"0.25rem 0.5rem"},children:c("selectAll")}),g.jsx("button",{onClick:Z,type:"button",className:"semiont-button--secondary",style:{fontSize:"var(--semiont-text-xs)",padding:"0.25rem 0.5rem"},children:c("deselectAll")})]}),g.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"0.75rem"},children:D.tags.map($=>g.jsxs("div",{className:"semiont-form__checkbox-field",children:[g.jsx("input",{type:"checkbox",id:`category-${$.name.replace(/\s+/g,"-")}`,checked:p.has($.name),onChange:()=>A($.name),className:"semiont-checkbox"}),g.jsxs("label",{htmlFor:`category-${$.name.replace(/\s+/g,"-")}`,className:"semiont-form__checkbox-label",style:{display:"flex",flexDirection:"column",gap:"0.25rem"},children:[g.jsx("span",{style:{fontWeight:500},children:c(`category${$.name.replace(/\s+/g,"")}`)}),g.jsx("span",{style:{fontSize:"var(--semiont-text-xs)",color:"var(--semiont-text-secondary)"},children:$.description})]})]},$.name))}),g.jsx("p",{className:"semiont-form__help",children:c("categoriesSelected",{count:p.size})})]})]}),g.jsxs("button",{onClick:V,disabled:p.size===0||n,className:"semiont-button","data-variant":"assist","data-type":"tag",children:[g.jsx("span",{className:"semiont-button-icon",children:"✨"}),g.jsx("span",{children:c("annotate")})]}),n&&r&&g.jsxs("div",{className:"semiont-annotation-progress","data-type":"tag",children:[r.requestParams&&r.requestParams.length>0&&g.jsxs("div",{className:"semiont-annotation-progress__params","data-type":"tag",children:[g.jsx("div",{className:"semiont-annotation-progress__params-title",children:"Request Parameters:"}),r.requestParams.map(($,W)=>g.jsxs("div",{className:"semiont-annotation-progress__param",children:[g.jsxs("span",{className:"semiont-annotation-progress__param-label",children:[$.label,":"]})," ",$.value]},W))]}),g.jsxs("div",{className:"semiont-annotation-progress__status",children:[g.jsxs("div",{className:"semiont-annotation-progress__message",children:[g.jsx("span",{className:"semiont-annotation-progress__icon",children:"✨"}),g.jsx("span",{children:r.message})]}),r.currentCategory&&g.jsxs("div",{className:"semiont-annotation-progress__details",children:["Processing: ",r.currentCategory,r.processedCategories!==void 0&&r.totalCategories!==void 0&&g.jsxs(g.Fragment,{children:[" (",r.processedCategories,"/",r.totalCategories,")"]})]})]}),r.percentage!==void 0&&g.jsx("div",{className:"semiont-progress-bar",children:g.jsx("div",{className:"semiont-progress-bar__fill","data-type":"tag",style:{width:`${r.percentage}%`}})})]})]})]}),g.jsx("div",{className:"semiont-panel__list",children:Q.length===0?g.jsx("p",{className:"semiont-panel__empty",children:c("noTags")}):Q.map($=>g.jsx($te,{tag:$,isFocused:$.id===b,isHovered:$.id===l,ref:W=>P($.id,W)},$.id))})]})]})}var fE=["statistics","reference","highlight","assessment","comment","tag"];function Xte(e){const t=cn("UnifiedAnnotationsPanel"),n={highlight:[],comment:[],assessment:[],reference:[],tag:[]};for(const c of e.annotations){const d=Object.values(e.annotators).find(f=>f.matchesAnnotation(c));d&&(n[d.internalType]||(n[d.internalType]=[]),n[d.internalType].push(c))}const r=n,[i,a]=_.useState(()=>{if(typeof window>"u")return e.initialTab||"statistics";const c=e.resourceId?`annotations-tab-${e.resourceId}`:"annotations-tab-global",d=localStorage.getItem(c);return d&&fE.includes(d)?d:e.initialTab||"statistics"});_.useEffect(()=>{if(typeof window>"u")return;const c=e.resourceId?`annotations-tab-${e.resourceId}`:"annotations-tab-global";localStorage.setItem(c,i)},[i,e.resourceId]),_.useEffect(()=>{e.initialTab&&e.initialTabGeneration!==void 0&&a(e.initialTab)},[e.initialTabGeneration]),_.useEffect(()=>{if(e.pendingAnnotation){const d={linking:"reference",commenting:"comment",tagging:"tag",assessing:"assessment",highlighting:"highlight"}[e.pendingAnnotation.motivation];d&&a(d)}},[e.pendingAnnotation]);const s=c=>{a(c)},l=c=>`semiont-unified-panel__tab-button${i===c?" semiont-unified-panel__tab-button--active":""}`;return g.jsxs("div",{className:"semiont-unified-panel",children:[g.jsx("h3",{className:"semiont-unified-panel__title",children:t("title")}),g.jsx("div",{className:"semiont-unified-panel__tabs",children:fE.map(c=>{if(c==="statistics")return g.jsx("button",{onClick:()=>s(c),className:l(c),title:t(c),"aria-pressed":i===c,children:g.jsx("span",{className:"semiont-unified-panel__tab-icon",children:"📊"})},c);const d=e.annotators[c];return d?g.jsx("button",{onClick:()=>s(c),className:l(c),title:t(c),"aria-pressed":i===c,children:g.jsx("span",{className:"semiont-unified-panel__tab-icon",children:d.iconEmoji})},c):null})}),g.jsx("div",{className:"semiont-unified-panel__content",children:(()=>{if(i==="statistics")return g.jsx(zte,{highlights:r.highlight||[],comments:r.comment||[],assessments:r.assessment||[],references:r.reference||[],tags:r.tag||[]});const c=e.annotators[i];if(!c)return null;const d=r[i]||[],f=e.assistingMotivation===c.motivation,m=f?e.progress??null:null,p={annotations:d,pendingAnnotation:e.pendingAnnotation,isAssisting:f,progress:m,annotateMode:e.annotateMode,locale:e.locale,scrollToAnnotationId:e.scrollToAnnotationId,onScrollCompleted:e.onScrollCompleted,hoveredAnnotationId:e.hoveredAnnotationId};return i==="highlight"?g.jsx(Pte,{...p}):i==="reference"?g.jsx(Dte,{annotations:p.annotations,pendingAnnotation:p.pendingAnnotation,isAssisting:p.isAssisting,progress:p.progress,annotateMode:p.annotateMode,scrollToAnnotationId:p.scrollToAnnotationId,onScrollCompleted:p.onScrollCompleted,hoveredAnnotationId:p.hoveredAnnotationId,allEntityTypes:e.allEntityTypes||[],generatingReferenceId:e.generatingReferenceId,referencedBy:e.referencedBy,referencedByLoading:e.referencedByLoading,Link:e.Link,routes:e.routes}):i==="assessment"?g.jsx(_te,{...p}):i==="comment"?g.jsx(Ete,{...p}):i==="tag"?g.jsx(qte,{...p}):null})()})]})}function Zte({Link:e,routes:t,t:n,CookiePreferences:r,onOpenKeyboardHelp:i,sourceCodeUrl:a="https://github.com/The-AI-Alliance/semiont",showPolicyLinks:s=!0}){var d,f,m;const[l,c]=_.useState(!1);return g.jsxs(g.Fragment,{children:[g.jsx("footer",{role:"contentinfo",className:"semiont-footer",children:g.jsx("div",{className:"semiont-footer__container",children:g.jsxs("div",{className:"semiont-footer__content",children:[g.jsx("div",{className:"semiont-footer__copyright",children:n("copyright",{year:new Date().getFullYear()})}),g.jsxs("div",{className:"semiont-footer__links",children:[s&&g.jsxs(g.Fragment,{children:[g.jsx(e,{href:((d=t.about)==null?void 0:d.call(t))||"/about",className:"semiont-footer__link",children:n("about")}),g.jsx(e,{href:((f=t.privacy)==null?void 0:f.call(t))||"/privacy",className:"semiont-footer__link",children:n("privacyPolicy")}),r&&g.jsx("button",{onClick:()=>c(!0),className:"semiont-footer__link",children:n("cookiePreferences")}),g.jsx(e,{href:((m=t.terms)==null?void 0:m.call(t))||"/terms",className:"semiont-footer__link",children:n("termsOfService")})]}),i&&g.jsxs("button",{onClick:i,className:"semiont-footer__link semiont-footer__link--keyboard",children:[n("keyboardShortcuts"),g.jsx("kbd",{className:"semiont-footer__kbd",children:"?"})]}),g.jsx("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:"semiont-footer__link",children:n("sourceCode")})]})]})})}),s&&r&&g.jsx(r,{isOpen:l,onClose:()=>c(!1)})]})}function w0({Link:e,routes:t,t:n,isAdmin:r=!1,isModerator:i=!1,onItemClick:a,className:s="",currentPath:l}){var f,m,p,O,b,x;const c=s?`semiont-navigation-menu ${s}`:"semiont-navigation-menu",d=w=>l?l===w||l.startsWith(w+"/"):!1;return g.jsxs("nav",{className:c,"aria-label":"Main navigation",children:[g.jsx(e,{href:((f=t.knowledge)==null?void 0:f.call(t))||"/know",...a&&{onClick:a},className:"semiont-navigation-menu__link","aria-current":d(((m=t.knowledge)==null?void 0:m.call(t))||"/know")?"page":void 0,children:n("know")}),(i||r)&&g.jsxs(g.Fragment,{children:[g.jsx("hr",{className:"semiont-navigation-menu__divider"}),g.jsx(e,{href:((p=t.moderate)==null?void 0:p.call(t))||"/moderate",...a&&{onClick:a},className:"semiont-navigation-menu__link","aria-current":d(((O=t.moderate)==null?void 0:O.call(t))||"/moderate")?"page":void 0,children:n("moderate")})]}),r&&g.jsxs(g.Fragment,{children:[g.jsx("hr",{className:"semiont-navigation-menu__divider"}),g.jsx(e,{href:((b=t.admin)==null?void 0:b.call(t))||"/admin",...a&&{onClick:a},className:"semiont-navigation-menu__link","aria-current":d(((x=t.admin)==null?void 0:x.call(t))||"/admin")?"page":void 0,children:n("administer")})]})]})}function ase({title:e,items:t,currentPath:n,LinkComponent:r,dropdownContent:i,isCollapsed:a,icons:s,collapseSidebarLabel:l,expandSidebarLabel:c}){const d=s.chevronLeft,f=s.bars,[m,p]=_.useState(!1),O=_.useRef(null),b=at(),x=()=>p(!m),w=()=>p(!1);return _.useEffect(()=>{const k=T=>{O.current&&!O.current.contains(T.target)&&w()};if(m)return document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[m]),g.jsxs("div",{className:"semiont-simple-nav",children:[g.jsxs("div",{style:{position:"relative"},ref:i?O:void 0,children:[g.jsxs("div",{className:"semiont-nav-section__header",children:[i?g.jsx("button",{onClick:x,className:"semiont-nav-section__header-button","aria-expanded":m,"aria-haspopup":"true",type:"button",children:!a&&g.jsx("span",{className:"semiont-nav-section__header-text",children:e})}):!a&&g.jsx("span",{className:"semiont-nav-section__header-text",children:e}),g.jsx("button",{onClick:()=>b.emit("shell:sidebar-toggle",void 0),className:"semiont-nav-section__header-icon",title:a?c:l,"aria-label":a?c:l,type:"button",children:a?g.jsx(f,{}):g.jsx(d,{})})]}),m&&i&&!a&&g.jsx("div",{className:"semiont-nav-section__dropdown",children:i(w)})]}),!a&&g.jsx("nav",{className:"semiont-nav-tabs",children:t.map(k=>{const T=n===k.href;return g.jsxs(r,{href:k.href,className:`semiont-nav-tab ${T?"semiont-nav-tab--active":""}`,title:k.description||k.name,"aria-current":T?"page":void 0,children:[g.jsx(k.icon,{className:"semiont-nav-tab__icon","aria-hidden":"true"}),g.jsx("span",{className:"semiont-nav-tab__text",children:k.name})]},k.href)})}),a&&g.jsx("nav",{className:"semiont-nav-tabs",children:t.map(k=>{const T=n===k.href;return g.jsx(r,{href:k.href,className:`semiont-nav-tab ${T?"semiont-nav-tab--active":""}`,title:k.description||k.name,"aria-current":T?"page":void 0,"aria-label":k.name,children:g.jsx(k.icon,{className:"semiont-nav-tab__icon","aria-hidden":"true"})},k.href)})})]})}function Bte(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return _.useMemo(()=>r=>{t.forEach(i=>i(r))},t)}var Dp=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function vc(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function SS(e){return"nodeType"in e}function wr(e){var t,n;return e?vc(e)?e:SS(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function wS(e){const{Document:t}=wr(e);return e instanceof t}function Gd(e){return vc(e)?!1:e instanceof wr(e).HTMLElement}function pD(e){return e instanceof wr(e).SVGElement}function Oc(e){return e?vc(e)?e.document:SS(e)?wS(e)?e:Gd(e)||pD(e)?e.ownerDocument:document:document:document}var Ji=Dp?_.useLayoutEffect:_.useEffect;function _S(e){const t=_.useRef(e);return Ji(()=>{t.current=e}),_.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current==null?void 0:t.current(...r)},[])}function Vte(){const e=_.useRef(null),t=_.useCallback((r,i)=>{e.current=setInterval(r,i)},[]),n=_.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function Cd(e,t){t===void 0&&(t=[e]);const n=_.useRef(e);return Ji(()=>{n.current!==e&&(n.current=e)},t),n}function Kd(e,t){const n=_.useRef();return _.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function Fm(e){const t=_S(e),n=_.useRef(null),r=_.useCallback(i=>{i!==n.current&&(t==null||t(i,n.current)),n.current=i},[]);return[n,r]}function _0(e){const t=_.useRef();return _.useEffect(()=>{t.current=e},[e]),t.current}var _b={};function Jd(e,t){return _.useMemo(()=>{if(t)return t;const n=_b[e]==null?0:_b[e]+1;return _b[e]=n,e+"-"+n},[e,t])}function gD(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.reduce((a,s)=>{const l=Object.entries(s);for(const[c,d]of l){const f=a[c];f!=null&&(a[c]=f+e*d)}return a},{...t})}}var Bl=gD(1),Ed=gD(-1);function Ute(e){return"clientX"in e&&"clientY"in e}function kS(e){if(!e)return!1;const{KeyboardEvent:t}=wr(e.target);return t&&e instanceof t}function Yte(e){if(!e)return!1;const{TouchEvent:t}=wr(e.target);return t&&e instanceof t}function k0(e){if(Yte(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return Ute(e)?{x:e.clientX,y:e.clientY}:null}var Ad=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Ad.Translate.toString(e),Ad.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),hE="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Wte(e){return e.matches(hE)?e:e.querySelector(hE)}var Fte={display:"none"};function Hte(e){let{id:t,value:n}=e;return ue.createElement("div",{id:t,style:Fte},n)}function Gte(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const i={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return ue.createElement("div",{id:t,style:i,role:"status","aria-live":r,"aria-atomic":!0},n)}function Kte(){const[e,t]=_.useState("");return{announce:_.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}var vD=_.createContext(null);function Jte(e){const t=_.useContext(vD);_.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function ene(){const[e]=_.useState(()=>new Set),t=_.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[_.useCallback(r=>{let{type:i,event:a}=r;e.forEach(s=>{var l;return(l=s[i])==null?void 0:l.call(s,a)})},[e]),t]}var tne={draggable:`
|
|
164
|
-
To pick up a draggable item, press the space bar.
|
|
165
|
-
While dragging, use the arrow keys to move the item.
|
|
166
|
-
Press space again to drop the item in its new position, or press escape to cancel.
|
|
167
|
-
`},nne={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function rne(e){let{announcements:t=nne,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=tne}=e;const{announce:a,announcement:s}=Kte(),l=Jd("DndLiveRegion"),[c,d]=_.useState(!1);if(_.useEffect(()=>{d(!0)},[]),Jte(_.useMemo(()=>({onDragStart(m){let{active:p}=m;a(t.onDragStart({active:p}))},onDragMove(m){let{active:p,over:O}=m;t.onDragMove&&a(t.onDragMove({active:p,over:O}))},onDragOver(m){let{active:p,over:O}=m;a(t.onDragOver({active:p,over:O}))},onDragEnd(m){let{active:p,over:O}=m;a(t.onDragEnd({active:p,over:O}))},onDragCancel(m){let{active:p,over:O}=m;a(t.onDragCancel({active:p,over:O}))}}),[a,t])),!c)return null;const f=ue.createElement(ue.Fragment,null,ue.createElement(Hte,{id:r,value:i.draggable}),ue.createElement(Gte,{id:l,announcement:s}));return n?yo.createPortal(f,n):f}var _n;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(_n||(_n={}));function Hm(){}function mE(e,t){return _.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function ine(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return _.useMemo(()=>[...t].filter(r=>r!=null),[...t])}var Ei=Object.freeze({x:0,y:0});function OD(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function bD(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function ane(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function pE(e){let{left:t,top:n,height:r,width:i}=e;return[{x:t,y:n},{x:t+i,y:n},{x:t,y:n+r},{x:t+i,y:n+r}]}function yD(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function gE(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}var sne=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=gE(t,t.left,t.top),a=[];for(const s of r){const{id:l}=s,c=n.get(l);if(c){const d=OD(gE(c),i);a.push({id:l,data:{droppableContainer:s,value:d}})}}return a.sort(bD)},one=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=pE(t),a=[];for(const s of r){const{id:l}=s,c=n.get(l);if(c){const d=pE(c),f=i.reduce((p,O,b)=>p+OD(d[b],O),0),m=Number((f/4).toFixed(4));a.push({id:l,data:{droppableContainer:s,value:m}})}}return a.sort(bD)};function lne(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),s=i-r,l=a-n;if(r<i&&n<a){const c=t.width*t.height,d=e.width*e.height,f=s*l,m=f/(c+d-f);return Number(m.toFixed(4))}return 0}var cne=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=[];for(const a of r){const{id:s}=a,l=n.get(s);if(l){const c=lne(l,t);c>0&&i.push({id:s,data:{droppableContainer:a,value:c}})}}return i.sort(ane)};function une(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function xD(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Ei}function dne(e){return function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return i.reduce((s,l)=>({...s,top:s.top+e*l.y,bottom:s.bottom+e*l.y,left:s.left+e*l.x,right:s.right+e*l.x}),{...n})}}var fne=dne(1);function hne(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function mne(e,t,n){const r=hne(t);if(!r)return e;const{scaleX:i,scaleY:a,x:s,y:l}=r,c=e.left-s-(1-i)*parseFloat(n),d=e.top-l-(1-a)*parseFloat(n.slice(n.indexOf(" ")+1)),f=i?e.width/i:e.width,m=a?e.height/a:e.height;return{width:f,height:m,top:d,right:c+f,bottom:d+m,left:c}}var pne={ignoreTransform:!1};function bc(e,t){t===void 0&&(t=pne);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:d,transformOrigin:f}=wr(e).getComputedStyle(e);d&&(n=mne(n,d,f))}const{top:r,left:i,width:a,height:s,bottom:l,right:c}=n;return{top:r,left:i,width:a,height:s,bottom:l,right:c}}function vE(e){return bc(e,{ignoreTransform:!0})}function gne(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function vne(e,t){return t===void 0&&(t=wr(e).getComputedStyle(e)),t.position==="fixed"}function One(e,t){t===void 0&&(t=wr(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(i=>{const a=t[i];return typeof a=="string"?n.test(a):!1})}function Lp(e,t){const n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(wS(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!Gd(i)||pD(i)||n.includes(i))return n;const a=wr(e).getComputedStyle(i);return i!==e&&One(i,a)&&n.push(i),vne(i,a)?n:r(i.parentNode)}return e?r(e):n}function SD(e){const[t]=Lp(e,1);return t??null}function kb(e){return!Dp||!e?null:vc(e)?e:SS(e)?wS(e)||e===Oc(e).scrollingElement?window:Gd(e)?e:null:null}function wD(e){return vc(e)?e.scrollX:e.scrollLeft}function _D(e){return vc(e)?e.scrollY:e.scrollTop}function j0(e){return{x:wD(e),y:_D(e)}}var An;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(An||(An={}));function kD(e){return!Dp||!e?!1:e===document.scrollingElement}function jD(e){const t={x:0,y:0},n=kD(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},i=e.scrollTop<=t.y,a=e.scrollLeft<=t.x,s=e.scrollTop>=r.y,l=e.scrollLeft>=r.x;return{isTop:i,isLeft:a,isBottom:s,isRight:l,maxScroll:r,minScroll:t}}var bne={x:.2,y:.2};function yne(e,t,n,r,i){let{top:a,left:s,right:l,bottom:c}=n;r===void 0&&(r=10),i===void 0&&(i=bne);const{isTop:d,isBottom:f,isLeft:m,isRight:p}=jD(e),O={x:0,y:0},b={x:0,y:0},x={height:t.height*i.y,width:t.width*i.x};return!d&&a<=t.top+x.height?(O.y=An.Backward,b.y=r*Math.abs((t.top+x.height-a)/x.height)):!f&&c>=t.bottom-x.height&&(O.y=An.Forward,b.y=r*Math.abs((t.bottom-x.height-c)/x.height)),!p&&l>=t.right-x.width?(O.x=An.Forward,b.x=r*Math.abs((t.right-x.width-l)/x.width)):!m&&s<=t.left+x.width&&(O.x=An.Backward,b.x=r*Math.abs((t.left+x.width-s)/x.width)),{direction:O,speed:b}}function xne(e){if(e===document.scrollingElement){const{innerWidth:a,innerHeight:s}=window;return{top:0,left:0,right:a,bottom:s,width:a,height:s}}const{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function TD(e){return e.reduce((t,n)=>Bl(t,j0(n)),Ei)}function Sne(e){return e.reduce((t,n)=>t+wD(n),0)}function wne(e){return e.reduce((t,n)=>t+_D(n),0)}function _ne(e,t){if(t===void 0&&(t=bc),!e)return;const{top:n,left:r,bottom:i,right:a}=t(e);SD(e)&&(i<=0||a<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}var kne=[["x",["left","right"],Sne],["y",["top","bottom"],wne]],jS=class{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=Lp(t),r=TD(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[i,a,s]of kne)for(const l of a)Object.defineProperty(this,l,{get:()=>{const c=s(n),d=r[i]-c;return this.rect[l]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}},Gu=class{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(t=>{var n;return(n=this.target)==null?void 0:n.removeEventListener(...t)})},this.target=e}add(e,t,n){var r;(r=this.target)==null||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}};function jne(e){const{EventTarget:t}=wr(e);return e instanceof t?e:Oc(e)}function jb(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var ti;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(ti||(ti={}));function OE(e){e.preventDefault()}function Tne(e){e.stopPropagation()}var dt;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(dt||(dt={}));var CD={start:[dt.Space,dt.Enter],cancel:[dt.Esc],end:[dt.Space,dt.Enter,dt.Tab]},Cne=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case dt.Right:return{...n,x:n.x+25};case dt.Left:return{...n,x:n.x-25};case dt.Down:return{...n,y:n.y+25};case dt.Up:return{...n,y:n.y-25}}},TS=class{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new Gu(Oc(t)),this.windowListeners=new Gu(wr(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(ti.Resize,this.handleCancel),this.windowListeners.add(ti.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(ti.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&_ne(n),t(Ei)}handleKeyDown(e){if(kS(e)){const{active:t,context:n,options:r}=this.props,{keyboardCodes:i=CD,coordinateGetter:a=Cne,scrollBehavior:s="smooth"}=r,{code:l}=e;if(i.end.includes(l)){this.handleEnd(e);return}if(i.cancel.includes(l)){this.handleCancel(e);return}const{collisionRect:c}=n.current,d=c?{x:c.left,y:c.top}:Ei;this.referenceCoordinates||(this.referenceCoordinates=d);const f=a(e,{active:t,context:n.current,currentCoordinates:d});if(f){const m=Ed(f,d),p={x:0,y:0},{scrollableAncestors:O}=n.current;for(const b of O){const x=e.code,{isTop:w,isRight:k,isLeft:T,isBottom:j,maxScroll:E,minScroll:Q}=jD(b),P=xne(b),N={x:Math.min(x===dt.Right?P.right-P.width/2:P.right,Math.max(x===dt.Right?P.left:P.left+P.width/2,f.x)),y:Math.min(x===dt.Down?P.bottom-P.height/2:P.bottom,Math.max(x===dt.Down?P.top:P.top+P.height/2,f.y))},D=x===dt.Right&&!k||x===dt.Left&&!T,L=x===dt.Down&&!j||x===dt.Up&&!w;if(D&&N.x!==f.x){const A=b.scrollLeft+m.x,X=x===dt.Right&&A<=E.x||x===dt.Left&&A>=Q.x;if(X&&!m.y){b.scrollTo({left:A,behavior:s});return}X?p.x=b.scrollLeft-A:p.x=x===dt.Right?b.scrollLeft-E.x:b.scrollLeft-Q.x,p.x&&b.scrollBy({left:-p.x,behavior:s});break}else if(L&&N.y!==f.y){const A=b.scrollTop+m.y,X=x===dt.Down&&A<=E.y||x===dt.Up&&A>=Q.y;if(X&&!m.x){b.scrollTo({top:A,behavior:s});return}X?p.y=b.scrollTop-A:p.y=x===dt.Down?b.scrollTop-E.y:b.scrollTop-Q.y,p.y&&b.scrollBy({top:-p.y,behavior:s});break}}this.handleMove(e,Bl(Ed(f,this.referenceCoordinates),p))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}};TS.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=CD,onActivation:i}=t,{active:a}=n;const{code:s}=e.nativeEvent;if(r.start.includes(s)){const l=a.activatorNode.current;return l&&e.target!==l?!1:(e.preventDefault(),i==null||i({event:e.nativeEvent}),!0)}return!1}}];function bE(e){return!!(e&&"distance"in e)}function yE(e){return!!(e&&"delay"in e)}var CS=class{constructor(e,t,n){var r;n===void 0&&(n=jne(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:i}=e,{target:a}=i;this.props=e,this.events=t,this.document=Oc(a),this.documentListeners=new Gu(this.document),this.listeners=new Gu(n),this.windowListeners=new Gu(wr(a)),this.initialCoordinates=(r=k0(i))!=null?r:Ei,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(ti.Resize,this.handleCancel),this.windowListeners.add(ti.DragStart,OE),this.windowListeners.add(ti.VisibilityChange,this.handleCancel),this.windowListeners.add(ti.ContextMenu,OE),this.documentListeners.add(ti.Keydown,this.handleKeydown),t){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(yE(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(bE(t)){this.handlePending(t);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){const{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(ti.Click,Tne,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(ti.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:r,props:i}=this,{onMove:a,options:{activationConstraint:s}}=i;if(!r)return;const l=(t=k0(e))!=null?t:Ei,c=Ed(r,l);if(!n&&s){if(bE(s)){if(s.tolerance!=null&&jb(c,s.tolerance))return this.handleCancel();if(jb(c,s.distance))return this.handleStart()}if(yE(s)&&jb(c,s.tolerance))return this.handleCancel();this.handlePending(s,c);return}e.cancelable&&e.preventDefault(),a(l)}handleEnd(){const{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){const{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===dt.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}},Ene={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}},ES=class extends CS{constructor(e){const{event:t}=e,n=Oc(t.target);super(e,Ene,n)}};ES.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r==null||r({event:n}),!0)}}];var Ane={move:{name:"mousemove"},end:{name:"mouseup"}},T0;(function(e){e[e.RightClick=2]="RightClick"})(T0||(T0={}));var Qne=class extends CS{constructor(e){super(e,Ane,Oc(e.event.target))}};Qne.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===T0.RightClick?!1:(r==null||r({event:n}),!0)}}];var Tb={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}},Pne=class extends CS{constructor(e){super(e,Tb)}static setup(){return window.addEventListener(Tb.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(Tb.move.name,e)};function e(){}}};Pne.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:i}=n;return i.length>1?!1:(r==null||r({event:n}),!0)}}];var Ku;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Ku||(Ku={}));var Gm;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(Gm||(Gm={}));function Nne(e){let{acceleration:t,activator:n=Ku.Pointer,canScroll:r,draggingRect:i,enabled:a,interval:s=5,order:l=Gm.TreeOrder,pointerCoordinates:c,scrollableAncestors:d,scrollableAncestorRects:f,delta:m,threshold:p}=e;const O=Mne({delta:m,disabled:!a}),[b,x]=Vte(),w=_.useRef({x:0,y:0}),k=_.useRef({x:0,y:0}),T=_.useMemo(()=>{switch(n){case Ku.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case Ku.DraggableRect:return i}},[n,i,c]),j=_.useRef(null),E=_.useCallback(()=>{const P=j.current;if(!P)return;const N=w.current.x*k.current.x,D=w.current.y*k.current.y;P.scrollBy(N,D)},[]),Q=_.useMemo(()=>l===Gm.TreeOrder?[...d].reverse():d,[l,d]);_.useEffect(()=>{if(!a||!d.length||!T){x();return}for(const P of Q){if((r==null?void 0:r(P))===!1)continue;const N=d.indexOf(P),D=f[N];if(!D)continue;const{direction:L,speed:A}=yne(P,D,T,t,p);for(const X of["x","y"])O[X][L[X]]||(A[X]=0,L[X]=0);if(A.x>0||A.y>0){x(),j.current=P,b(E,s),w.current=A,k.current=L;return}}w.current={x:0,y:0},k.current={x:0,y:0},x()},[t,E,r,x,a,s,JSON.stringify(T),JSON.stringify(O),b,d,Q,f,JSON.stringify(p)])}var Rne={x:{[An.Backward]:!1,[An.Forward]:!1},y:{[An.Backward]:!1,[An.Forward]:!1}};function Mne(e){let{delta:t,disabled:n}=e;const r=_0(t);return Kd(i=>{if(n||!r||!i)return Rne;const a={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[An.Backward]:i.x[An.Backward]||a.x===-1,[An.Forward]:i.x[An.Forward]||a.x===1},y:{[An.Backward]:i.y[An.Backward]||a.y===-1,[An.Forward]:i.y[An.Forward]||a.y===1}}},[n,t,r])}function Dne(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return Kd(i=>{var a;return t==null?null:(a=r??i)!=null?a:null},[r,t])}function Lne(e,t){return _.useMemo(()=>e.reduce((n,r)=>{const{sensor:i}=r,a=i.activators.map(s=>({eventName:s.eventName,handler:t(s.handler,r)}));return[...n,...a]},[]),[e,t])}var Qd;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Qd||(Qd={}));var C0;(function(e){e.Optimized="optimized"})(C0||(C0={}));var xE=new Map;function zne(e,t){let{dragging:n,dependencies:r,config:i}=t;const[a,s]=_.useState(null),{frequency:l,measure:c,strategy:d}=i,f=_.useRef(e),m=w(),p=Cd(m),O=_.useCallback(function(k){k===void 0&&(k=[]),!p.current&&s(T=>T===null?k:T.concat(k.filter(j=>!T.includes(j))))},[p]),b=_.useRef(null),x=Kd(k=>{if(m&&!n)return xE;if(!k||k===xE||f.current!==e||a!=null){const T=new Map;for(let j of e){if(!j)continue;if(a&&a.length>0&&!a.includes(j.id)&&j.rect.current){T.set(j.id,j.rect.current);continue}const E=j.node.current,Q=E?new jS(c(E),E):null;j.rect.current=Q,Q&&T.set(j.id,Q)}return T}return k},[e,a,n,m,c]);return _.useEffect(()=>{f.current=e},[e]),_.useEffect(()=>{m||O()},[n,m]),_.useEffect(()=>{a&&a.length>0&&s(null)},[JSON.stringify(a)]),_.useEffect(()=>{m||typeof l!="number"||b.current!==null||(b.current=setTimeout(()=>{O(),b.current=null},l))},[l,m,O,...r]),{droppableRects:x,measureDroppableContainers:O,measuringScheduled:a!=null};function w(){switch(d){case Qd.Always:return!1;case Qd.BeforeDragging:return n;default:return!n}}}function ED(e,t){return Kd(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function $ne(e,t){return ED(e,t)}function Ine(e){let{callback:t,disabled:n}=e;const r=_S(t),i=_.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:a}=window;return new a(r)},[r,n]);return _.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function zp(e){let{callback:t,disabled:n}=e;const r=_S(t),i=_.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:a}=window;return new a(r)},[n]);return _.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function qne(e){return new jS(bc(e),e)}function SE(e,t,n){t===void 0&&(t=qne);const[r,i]=_.useState(null);function a(){i(c=>{if(!e)return null;if(e.isConnected===!1){var d;return(d=c??n)!=null?d:null}const f=t(e);return JSON.stringify(c)===JSON.stringify(f)?c:f})}const s=Ine({callback(c){if(e)for(const d of c){const{type:f,target:m}=d;if(f==="childList"&&m instanceof HTMLElement&&m.contains(e)){a();break}}}}),l=zp({callback:a});return Ji(()=>{a(),e?(l==null||l.observe(e),s==null||s.observe(document.body,{childList:!0,subtree:!0})):(l==null||l.disconnect(),s==null||s.disconnect())},[e]),r}function Xne(e){const t=ED(e);return xD(e,t)}var wE=[];function Zne(e){const t=_.useRef(e),n=Kd(r=>e?r&&r!==wE&&e&&t.current&&e.parentNode===t.current.parentNode?r:Lp(e):wE,[e]);return _.useEffect(()=>{t.current=e},[e]),n}function Bne(e){const[t,n]=_.useState(null),r=_.useRef(e),i=_.useCallback(a=>{const s=kb(a.target);s&&n(l=>l?(l.set(s,j0(s)),new Map(l)):null)},[]);return _.useEffect(()=>{const a=r.current;if(e!==a){s(a);const l=e.map(c=>{const d=kb(c);return d?(d.addEventListener("scroll",i,{passive:!0}),[d,j0(d)]):null}).filter(c=>c!=null);n(l.length?new Map(l):null),r.current=e}return()=>{s(e),s(a)};function s(l){l.forEach(c=>{const d=kb(c);d==null||d.removeEventListener("scroll",i)})}},[i,e]),_.useMemo(()=>e.length?t?Array.from(t.values()).reduce((a,s)=>Bl(a,s),Ei):TD(e):Ei,[e,t])}function _E(e,t){t===void 0&&(t=[]);const n=_.useRef(null);return _.useEffect(()=>{n.current=null},t),_.useEffect(()=>{const r=e!==Ei;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?Ed(e,n.current):Ei}function Vne(e){_.useEffect(()=>{if(!Dp)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function Une(e,t){return _.useMemo(()=>e.reduce((n,r)=>{let{eventName:i,handler:a}=r;return n[i]=s=>{a(s,t)},n},{}),[e,t])}function AD(e){return _.useMemo(()=>e?gne(e):null,[e])}var kE=[];function Yne(e,t){t===void 0&&(t=bc);const[n]=e,r=AD(n?wr(n):null),[i,a]=_.useState(kE);function s(){a(()=>e.length?e.map(c=>kD(c)?r:new jS(t(c),c)):kE)}const l=zp({callback:s});return Ji(()=>{l==null||l.disconnect(),s(),e.forEach(c=>l==null?void 0:l.observe(c))},[e]),i}function Wne(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Gd(t)?t:e}function Fne(e){let{measure:t}=e;const[n,r]=_.useState(null),i=_.useCallback(d=>{for(const{target:f}of d)if(Gd(f)){r(m=>{const p=t(f);return m?{...m,width:p.width,height:p.height}:p});break}},[t]),a=zp({callback:i}),s=_.useCallback(d=>{const f=Wne(d);a==null||a.disconnect(),f&&(a==null||a.observe(f)),r(f?t(f):null)},[t,a]),[l,c]=Fm(s);return _.useMemo(()=>({nodeRef:l,rect:n,setRef:c}),[n,l,c])}var Hne=[{sensor:ES,options:{}},{sensor:TS,options:{}}],Gne={current:{}},Om={draggable:{measure:vE},droppable:{measure:vE,strategy:Qd.WhileDragging,frequency:C0.Optimized},dragOverlay:{measure:bc}},Ju=class extends Map{get(e){var t;return e!=null&&(t=super.get(e))!=null?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){var t,n;return(t=(n=this.get(e))==null?void 0:n.node.current)!=null?t:void 0}},Kne={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Ju,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Hm},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Om,measureDroppableContainers:Hm,windowRect:null,measuringScheduled:!1},Jne={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Hm,draggableNodes:new Map,over:null,measureDroppableContainers:Hm},$p=_.createContext(Jne),QD=_.createContext(Kne);function ere(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Ju}}}function tre(e,t){switch(t.type){case _n.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case _n.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case _n.DragEnd:case _n.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case _n.RegisterDroppable:{const{element:n}=t,{id:r}=n,i=new Ju(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case _n.SetDroppableDisabled:{const{id:n,key:r,disabled:i}=t,a=e.droppable.containers.get(n);if(!a||r!==a.key)return e;const s=new Ju(e.droppable.containers);return s.set(n,{...a,disabled:i}),{...e,droppable:{...e.droppable,containers:s}}}case _n.UnregisterDroppable:{const{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const a=new Ju(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function nre(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:i}=_.useContext($p),a=_0(r),s=_0(n==null?void 0:n.id);return _.useEffect(()=>{if(!t&&!r&&a&&s!=null){if(!kS(a)||document.activeElement===a.target)return;const l=i.get(s);if(!l)return;const{activatorNode:c,node:d}=l;if(!c.current&&!d.current)return;requestAnimationFrame(()=>{for(const f of[c.current,d.current]){if(!f)continue;const m=Wte(f);if(m){m.focus();break}}})}},[r,t,i,s,a]),null}function rre(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((i,a)=>a({transform:i,...r}),n):n}function ire(e){return _.useMemo(()=>({draggable:{...Om.draggable,...e==null?void 0:e.draggable},droppable:{...Om.droppable,...e==null?void 0:e.droppable},dragOverlay:{...Om.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function are(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e;const a=_.useRef(!1),{x:s,y:l}=typeof i=="boolean"?{x:i,y:i}:i;Ji(()=>{if(!s&&!l||!t){a.current=!1;return}if(a.current||!r)return;const d=t==null?void 0:t.node.current;if(!d||d.isConnected===!1)return;const f=n(d),m=xD(f,r);if(s||(m.x=0),l||(m.y=0),a.current=!0,Math.abs(m.x)>0||Math.abs(m.y)>0){const p=SD(d);p&&p.scrollBy({top:m.y,left:m.x})}},[t,s,l,r,n])}var PD=_.createContext({...Ei,scaleX:1,scaleY:1}),ys;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(ys||(ys={}));var sre=_.memo(function(t){var n,r,i,a;let{id:s,accessibility:l,autoScroll:c=!0,children:d,sensors:f=Hne,collisionDetection:m=cne,measuring:p,modifiers:O,...b}=t;const x=_.useReducer(tre,void 0,ere),[w,k]=x,[T,j]=ene(),[E,Q]=_.useState(ys.Uninitialized),P=E===ys.Initialized,{draggable:{active:N,nodes:D,translate:L},droppable:{containers:A}}=w,X=N!=null?D.get(N):null,Z=_.useRef({initial:null,translated:null}),V=_.useMemo(()=>{var zt;return N!=null?{id:N,data:(zt=X==null?void 0:X.data)!=null?zt:Gne,rect:Z}:null},[N,X]),$=_.useRef(null),[W,I]=_.useState(null),[z,ee]=_.useState(null),le=Cd(b,Object.values(b)),q=Jd("DndDescribedBy",s),G=_.useMemo(()=>A.getEnabled(),[A]),re=ire(p),{droppableRects:M,measureDroppableContainers:he,measuringScheduled:ye}=zne(G,{dragging:P,dependencies:[L.x,L.y],config:re.droppable}),Oe=Dne(D,N),Be=_.useMemo(()=>z?k0(z):null,[z]),Re=mi(),Xe=$ne(Oe,re.draggable.measure);are({activeNode:N!=null?D.get(N):null,config:Re.layoutShiftCompensation,initialRect:Xe,measure:re.draggable.measure});const be=SE(Oe,re.draggable.measure,Xe),Fe=SE(Oe?Oe.parentElement:null),we=_.useRef({activatorEvent:null,active:null,activeNode:Oe,collisionRect:null,collisions:null,droppableRects:M,draggableNodes:D,draggingNode:null,draggingNodeRect:null,droppableContainers:A,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Ve=A.getNodeFor((n=we.current.over)==null?void 0:n.id),st=Fne({measure:re.dragOverlay.measure}),gt=(r=st.nodeRef.current)!=null?r:Oe,Je=P?(i=st.rect)!=null?i:be:null,yn=!!(st.nodeRef.current&&st.rect),Ce=Xne(yn?null:be),ot=AD(gt?wr(gt):null),ge=Zne(P?Ve??Oe:null),vt=Yne(ge),Dt=rre(O,{transform:{x:L.x-Ce.x,y:L.y-Ce.y,scaleX:1,scaleY:1},activatorEvent:z,active:V,activeNodeRect:be,containerNodeRect:Fe,draggingNodeRect:Je,over:we.current.over,overlayNodeRect:st.rect,scrollableAncestors:ge,scrollableAncestorRects:vt,windowRect:ot}),Yt=Be?Bl(Be,L):null,et=Bne(ge),Un=_E(et),ie=_E(et,[be]),de=Bl(Dt,Un),Pe=Je?fne(Je,Dt):null,Ze=V&&Pe?m({active:V,collisionRect:Pe,droppableRects:M,droppableContainers:G,pointerCoordinates:Yt}):null,tt=yD(Ze,"id"),[Lt,zn]=_.useState(null),rn=yn?Dt:Bl(Dt,ie),Xt=une(rn,(a=Lt==null?void 0:Lt.rect)!=null?a:null,be),Kt=_.useRef(null),ht=_.useCallback((zt,Zt)=>{let{sensor:Qt,options:jn}=Zt;if($.current==null)return;const Tn=D.get($.current);if(!Tn)return;const an=zt.nativeEvent,Cn=new Qt({active:$.current,activeNode:Tn,event:an,options:jn,context:we,onAbort(Ht){if(!D.get(Ht))return;const{onDragAbort:je}=le.current,Ke={id:Ht};je==null||je(Ke),T({type:"onDragAbort",event:Ke})},onPending(Ht,Yn,je,Ke){if(!D.get(Ht))return;const{onDragPending:_r}=le.current,Wn={id:Ht,constraint:Yn,initialCoordinates:je,offset:Ke};_r==null||_r(Wn),T({type:"onDragPending",event:Wn})},onStart(Ht){const Yn=$.current;if(Yn==null)return;const je=D.get(Yn);if(!je)return;const{onDragStart:Ke}=le.current,un={activatorEvent:an,active:{id:Yn,data:je.data,rect:Z}};yo.unstable_batchedUpdates(()=>{Ke==null||Ke(un),Q(ys.Initializing),k({type:_n.DragStart,initialCoordinates:Ht,active:Yn}),T({type:"onDragStart",event:un}),I(Kt.current),ee(an)})},onMove(Ht){k({type:_n.DragMove,coordinates:Ht})},onEnd:$n(_n.DragEnd),onCancel:$n(_n.DragCancel)});Kt.current=Cn;function $n(Ht){return async function(){const{active:je,collisions:Ke,over:un,scrollAdjustedTranslate:_r}=we.current;let Wn=null;if(je&&_r){const{cancelDrop:qr}=le.current;Wn={activatorEvent:an,active:je,collisions:Ke,delta:_r,over:un},Ht===_n.DragEnd&&typeof qr=="function"&&await Promise.resolve(qr(Wn))&&(Ht=_n.DragCancel)}$.current=null,yo.unstable_batchedUpdates(()=>{k({type:Ht}),Q(ys.Uninitialized),zn(null),I(null),ee(null),Kt.current=null;const qr=Ht===_n.DragEnd?"onDragEnd":"onDragCancel";if(Wn){const ar=le.current[qr];ar==null||ar(Wn),T({type:qr,event:Wn})}})}}},[D]),ir=_.useCallback((zt,Zt)=>(Qt,jn)=>{const Tn=Qt.nativeEvent,an=D.get(jn);if($.current!==null||!an||Tn.dndKit||Tn.defaultPrevented)return;const Cn={active:an};zt(Qt,Zt.options,Cn)===!0&&(Tn.dndKit={capturedBy:Zt.sensor},$.current=jn,ht(Qt,Zt))},[D,ht]),kn=Lne(f,ir);Vne(f),Ji(()=>{be&&E===ys.Initializing&&Q(ys.Initialized)},[be,E]),_.useEffect(()=>{const{onDragMove:zt}=le.current,{active:Zt,activatorEvent:Qt,collisions:jn,over:Tn}=we.current;if(!Zt||!Qt)return;const an={active:Zt,activatorEvent:Qt,collisions:jn,delta:{x:de.x,y:de.y},over:Tn};yo.unstable_batchedUpdates(()=>{zt==null||zt(an),T({type:"onDragMove",event:an})})},[de.x,de.y]),_.useEffect(()=>{const{active:zt,activatorEvent:Zt,collisions:Qt,droppableContainers:jn,scrollAdjustedTranslate:Tn}=we.current;if(!zt||$.current==null||!Zt||!Tn)return;const{onDragOver:an}=le.current,Cn=jn.get(tt),$n=Cn&&Cn.rect.current?{id:Cn.id,rect:Cn.rect.current,data:Cn.data,disabled:Cn.disabled}:null,Ht={active:zt,activatorEvent:Zt,collisions:Qt,delta:{x:Tn.x,y:Tn.y},over:$n};yo.unstable_batchedUpdates(()=>{zn($n),an==null||an(Ht),T({type:"onDragOver",event:Ht})})},[tt]),Ji(()=>{we.current={activatorEvent:z,active:V,activeNode:Oe,collisionRect:Pe,collisions:Ze,droppableRects:M,draggableNodes:D,draggingNode:gt,draggingNodeRect:Je,droppableContainers:A,over:Lt,scrollableAncestors:ge,scrollAdjustedTranslate:de},Z.current={initial:Je,translated:Pe}},[V,Oe,Ze,Pe,D,gt,Je,M,A,Lt,ge,de]),Nne({...Re,delta:L,draggingRect:Pe,pointerCoordinates:Yt,scrollableAncestors:ge,scrollableAncestorRects:vt});const Bs=_.useMemo(()=>({active:V,activeNode:Oe,activeNodeRect:be,activatorEvent:z,collisions:Ze,containerNodeRect:Fe,dragOverlay:st,draggableNodes:D,droppableContainers:A,droppableRects:M,over:Lt,measureDroppableContainers:he,scrollableAncestors:ge,scrollableAncestorRects:vt,measuringConfiguration:re,measuringScheduled:ye,windowRect:ot}),[V,Oe,be,z,Ze,Fe,st,D,A,M,Lt,he,ge,vt,re,ye,ot]),Qi=_.useMemo(()=>({activatorEvent:z,activators:kn,active:V,activeNodeRect:be,ariaDescribedById:{draggable:q},dispatch:k,draggableNodes:D,over:Lt,measureDroppableContainers:he}),[z,kn,V,be,k,q,D,Lt,he]);return ue.createElement(vD.Provider,{value:j},ue.createElement($p.Provider,{value:Qi},ue.createElement(QD.Provider,{value:Bs},ue.createElement(PD.Provider,{value:Xt},d)),ue.createElement(nre,{disabled:(l==null?void 0:l.restoreFocus)===!1})),ue.createElement(rne,{...l,hiddenTextDescribedById:q}));function mi(){const zt=(W==null?void 0:W.autoScrollEnabled)===!1,Zt=typeof c=="object"?c.enabled===!1:c===!1,Qt=P&&!zt&&!Zt;return typeof c=="object"?{...c,enabled:Qt}:{enabled:Qt}}}),ore=_.createContext(null),jE="button",lre="Draggable";function cre(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e;const a=Jd(lre),{activators:s,activatorEvent:l,active:c,activeNodeRect:d,ariaDescribedById:f,draggableNodes:m,over:p}=_.useContext($p),{role:O=jE,roleDescription:b="draggable",tabIndex:x=0}=i??{},w=(c==null?void 0:c.id)===t,k=_.useContext(w?PD:ore),[T,j]=Fm(),[E,Q]=Fm(),P=Une(s,t),N=Cd(n);Ji(()=>(m.set(t,{id:t,key:a,node:T,activatorNode:E,data:N}),()=>{const L=m.get(t);L&&L.key===a&&m.delete(t)}),[m,t]);const D=_.useMemo(()=>({role:O,tabIndex:x,"aria-disabled":r,"aria-pressed":w&&O===jE?!0:void 0,"aria-roledescription":b,"aria-describedby":f.draggable}),[r,O,x,w,b,f.draggable]);return{active:c,activatorEvent:l,activeNodeRect:d,attributes:D,isDragging:w,listeners:r?void 0:P,node:T,over:p,setNodeRef:j,setActivatorNodeRef:Q,transform:k}}function ure(){return _.useContext(QD)}var dre="Droppable",fre={timeout:25};function hre(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e;const a=Jd(dre),{active:s,dispatch:l,over:c,measureDroppableContainers:d}=_.useContext($p),f=_.useRef({disabled:n}),m=_.useRef(!1),p=_.useRef(null),O=_.useRef(null),{disabled:b,updateMeasurementsFor:x,timeout:w}={...fre,...i},k=Cd(x??r),T=_.useCallback(()=>{if(!m.current){m.current=!0;return}O.current!=null&&clearTimeout(O.current),O.current=setTimeout(()=>{d(Array.isArray(k.current)?k.current:[k.current]),O.current=null},w)},[w]),j=zp({callback:T,disabled:b||!s}),E=_.useCallback((D,L)=>{j&&(L&&(j.unobserve(L),m.current=!1),D&&j.observe(D))},[j]),[Q,P]=Fm(E),N=Cd(t);return _.useEffect(()=>{!j||!Q.current||(j.disconnect(),m.current=!1,j.observe(Q.current))},[Q,j]),_.useEffect(()=>(l({type:_n.RegisterDroppable,element:{id:r,key:a,disabled:n,node:Q,rect:p,data:N}}),()=>l({type:_n.UnregisterDroppable,key:a,id:r})),[r]),_.useEffect(()=>{n!==f.current.disabled&&(l({type:_n.SetDroppableDisabled,id:r,key:a,disabled:n}),f.current.disabled=n)},[r,a,n,l]),{active:s,rect:p,isOver:(c==null?void 0:c.id)===r,node:Q,over:c,setNodeRef:P}}function ND(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function mre(e,t){return e.reduce((n,r,i)=>{const a=t.get(r);return a&&(n[i]=a),n},Array(e.length))}function Wh(e){return e!==null&&e>=0}function pre(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function gre(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}var RD=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e;const a=ND(t,r,n),s=t[i],l=a[i];return!l||!s?null:{x:l.left-s.left,y:l.top-s.top,scaleX:l.width/s.width,scaleY:l.height/s.height}},Fh={scaleX:1,scaleY:1},vre=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:i,rects:a,overIndex:s}=e;const l=(t=a[n])!=null?t:r;if(!l)return null;if(i===n){const d=a[s];return d?{x:0,y:n<s?d.top+d.height-(l.top+l.height):d.top-l.top,...Fh}:null}const c=Ore(a,i,n);return i>n&&i<=s?{x:0,y:-l.height-c,...Fh}:i<n&&i>=s?{x:0,y:l.height+c,...Fh}:{x:0,y:0,...Fh}};function Ore(e,t,n){const r=e[t],i=e[t-1],a=e[t+1];return r?n<t?i?r.top-(i.top+i.height):a?a.top-(r.top+r.height):0:a?a.top-(r.top+r.height):i?r.top-(i.top+i.height):0:0}var MD="Sortable",DD=ue.createContext({activeIndex:-1,containerId:MD,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:RD,disabled:{draggable:!1,droppable:!1}});function bre(e){let{children:t,id:n,items:r,strategy:i=RD,disabled:a=!1}=e;const{active:s,dragOverlay:l,droppableRects:c,over:d,measureDroppableContainers:f}=ure(),m=Jd(MD,n),p=l.rect!==null,O=_.useMemo(()=>r.map(P=>typeof P=="object"&&"id"in P?P.id:P),[r]),b=s!=null,x=s?O.indexOf(s.id):-1,w=d?O.indexOf(d.id):-1,k=_.useRef(O),T=!pre(O,k.current),j=w!==-1&&x===-1||T,E=gre(a);Ji(()=>{T&&b&&f(O)},[T,O,b,f]),_.useEffect(()=>{k.current=O},[O]);const Q=_.useMemo(()=>({activeIndex:x,containerId:m,disabled:E,disableTransforms:j,items:O,overIndex:w,useDragOverlay:p,sortedRects:mre(O,c),strategy:i}),[x,m,E.draggable,E.droppable,j,O,w,c,p,i]);return ue.createElement(DD.Provider,{value:Q},t)}var yre=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return ND(n,r,i).indexOf(t)},xre=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:a,newIndex:s,previousItems:l,previousContainerId:c,transition:d}=e;return!d||!r||l!==a&&i===s?!1:n?!0:s!==i&&t===c},Sre={duration:200,easing:"ease"},LD="transform",wre=Ad.Transition.toString({property:LD,duration:0,easing:"linear"}),_re={roleDescription:"sortable"};function kre(e){let{disabled:t,index:n,node:r,rect:i}=e;const[a,s]=_.useState(null),l=_.useRef(n);return Ji(()=>{if(!t&&n!==l.current&&r.current){const c=i.current;if(c){const d=bc(r.current,{ignoreTransform:!0}),f={x:c.left-d.left,y:c.top-d.top,scaleX:c.width/d.width,scaleY:c.height/d.height};(f.x||f.y)&&s(f)}}n!==l.current&&(l.current=n)},[t,n,r,i]),_.useEffect(()=>{a&&s(null)},[a]),a}function jre(e){let{animateLayoutChanges:t=xre,attributes:n,disabled:r,data:i,getNewIndex:a=yre,id:s,strategy:l,resizeObserverConfig:c,transition:d=Sre}=e;const{items:f,containerId:m,activeIndex:p,disabled:O,disableTransforms:b,sortedRects:x,overIndex:w,useDragOverlay:k,strategy:T}=_.useContext(DD),j=Tre(r,O),E=f.indexOf(s),Q=_.useMemo(()=>({sortable:{containerId:m,index:E,items:f},...i}),[m,i,E,f]),P=_.useMemo(()=>f.slice(f.indexOf(s)),[f,s]),{rect:N,node:D,isOver:L,setNodeRef:A}=hre({id:s,data:Q,disabled:j.droppable,resizeObserverConfig:{updateMeasurementsFor:P,...c}}),{active:X,activatorEvent:Z,activeNodeRect:V,attributes:$,setNodeRef:W,listeners:I,isDragging:z,over:ee,setActivatorNodeRef:le,transform:q}=cre({id:s,data:Q,attributes:{..._re,...n},disabled:j.draggable}),G=Bte(A,W),re=!!X,M=re&&!b&&Wh(p)&&Wh(w),he=!k&&z,ye=he&&M?q:null,Be=M?ye??(l??T)({rects:x,activeNodeRect:V,activeIndex:p,overIndex:w,index:E}):null,Re=Wh(p)&&Wh(w)?a({id:s,items:f,activeIndex:p,overIndex:w}):E,Xe=X==null?void 0:X.id,be=_.useRef({activeId:Xe,items:f,newIndex:Re,containerId:m}),Fe=f!==be.current.items,we=t({active:X,containerId:m,isDragging:z,isSorting:re,id:s,index:E,items:f,newIndex:be.current.newIndex,previousItems:be.current.items,previousContainerId:be.current.containerId,transition:d,wasDragging:be.current.activeId!=null}),Ve=kre({disabled:!we,index:E,node:D,rect:N});return _.useEffect(()=>{re&&be.current.newIndex!==Re&&(be.current.newIndex=Re),m!==be.current.containerId&&(be.current.containerId=m),f!==be.current.items&&(be.current.items=f)},[re,Re,m,f]),_.useEffect(()=>{if(Xe===be.current.activeId)return;if(Xe!=null&&be.current.activeId==null){be.current.activeId=Xe;return}const gt=setTimeout(()=>{be.current.activeId=Xe},50);return()=>clearTimeout(gt)},[Xe]),{active:X,activeIndex:p,attributes:$,data:Q,rect:N,index:E,newIndex:Re,items:f,isOver:L,isSorting:re,isDragging:z,listeners:I,node:D,overIndex:w,over:ee,setNodeRef:G,setActivatorNodeRef:le,setDroppableNodeRef:A,setDraggableNodeRef:W,transform:Ve??Be,transition:st()};function st(){if(Ve||Fe&&be.current.newIndex===E)return wre;if(!(he&&!kS(Z)||!d)&&(re||we))return Ad.Transition.toString({...d,property:LD})}}function Tre(e,t){var n,r;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e==null?void 0:e.draggable)!=null?n:t.draggable,droppable:(r=e==null?void 0:e.droppable)!=null?r:t.droppable}}function Km(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}var Cre=[dt.Down,dt.Right,dt.Up,dt.Left],Ere=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:i,droppableContainers:a,over:s,scrollableAncestors:l}}=t;if(Cre.includes(e.code)){if(e.preventDefault(),!n||!r)return;const c=[];a.getEnabled().forEach(m=>{if(!m||m!=null&&m.disabled)return;const p=i.get(m.id);if(p)switch(e.code){case dt.Down:r.top<p.top&&c.push(m);break;case dt.Up:r.top>p.top&&c.push(m);break;case dt.Left:r.left>p.left&&c.push(m);break;case dt.Right:r.left<p.left&&c.push(m);break}});const d=one({collisionRect:r,droppableRects:i,droppableContainers:c});let f=yD(d,"id");if(f===(s==null?void 0:s.id)&&d.length>1&&(f=d[1].id),f!=null){const m=a.get(n.id),p=a.get(f),O=p?i.get(p.id):null,b=p==null?void 0:p.node.current;if(b&&O&&m&&p){const w=Lp(b).some((P,N)=>l[N]!==P),k=zD(m,p),T=Are(m,p),j=w||!k?{x:0,y:0}:{x:T?r.width-O.width:0,y:T?r.height-O.height:0},E={x:O.left,y:O.top};return j.x&&j.y?E:Ed(E,j)}}}};function zD(e,t){return!Km(e)||!Km(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function Are(e,t){return!Km(e)||!Km(t)||!zD(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}function TE({resource:e,isCollapsed:t,isActive:n,href:r,onClose:i,onReorder:a,index:s,totalCount:l,LinkComponent:c,translations:d={},isDragging:f=!1}){const{attributes:m,listeners:p,setNodeRef:O,transform:b,transition:x,isDragging:w}=jre({id:e.id}),k=_.useRef(a);_.useEffect(()=>{k.current=a});const T={transform:Ad.Transform.toString(b),transition:x,opacity:w||f?.5:1},j=JN(e.mediaType),E=w||f,Q=e.storageUri?e.storageUri.replace(/^file:\/\//,""):e.name,P=_.useCallback(N=>{k.current&&N.altKey&&(N.key==="ArrowUp"?(N.preventDefault(),k.current(e.id,"up")):N.key==="ArrowDown"&&(N.preventDefault(),k.current(e.id,"down")))},[e.id]);return g.jsxs("div",{ref:O,style:T,...m,...p,"aria-selected":n,onKeyDown:P,"aria-label":`${e.name}, position ${s!==void 0?s+1:""} of ${l||""}`,className:`semiont-resource-tab ${n?"semiont-resource-tab--active":""} ${E?"semiont-resource-tab--dragging":""}`,role:"tab",children:[g.jsxs(c,{href:r,className:"semiont-resource-tab__link",title:Q,children:[g.jsx("span",{className:"semiont-resource-tab__icon","aria-hidden":"true",children:j}),!t&&g.jsx("span",{className:"semiont-resource-tab__text",children:e.name})]}),!t&&g.jsx("button",{onClick:N=>i(e.id,N),className:"semiont-resource-tab__close",title:d.closeResource||"Close resource","aria-label":`Close ${e.name}`,type:"button",children:g.jsx("svg",{fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",width:"16",height:"16",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})}function Qre(){const{announce:e}=hc(),t=_.useCallback(l=>{e(l,"assertive")},[e]),n=_.useCallback((l,c,d)=>{e(`Picked up ${l}. Position ${c} of ${d}. Use arrow keys to move, space to drop.`,"assertive")},[e]),r=_.useCallback((l,c,d)=>{e(`Dropped ${l} at position ${c} of ${d}.`,"assertive")},[e]),i=_.useCallback((l,c,d,f)=>{e(`Moved ${l} ${c} to position ${d} of ${f}.`,"polite")},[e]),a=_.useCallback((l,c,d,f)=>{e(`${l} moved ${c} to position ${d} of ${f}.`,"assertive")},[e]),s=_.useCallback(l=>{e(`Cannot move ${l}. Already at the ${l==="up"?"top":"bottom"} of the list.`,"polite")},[e]);return{announceReorder:t,announcePickup:n,announceDrop:r,announceMove:i,announceKeyboardReorder:a,announceCannotMove:s}}function sse({fixedItems:e,resources:t,isCollapsed:n,currentPath:r,LinkComponent:i,onNavigate:a,getResourceHref:s,className:l="",translations:c={},icons:d,navigationMenu:f}){const m=d.chevronLeft,p=d.bars,[O,b]=_.useState(!1),x=_.useRef(null),{announcePickup:w,announceDrop:k,announceKeyboardReorder:T,announceCannotMove:j}=Qre(),E=cn("CollapsibleResourceNavigation"),Q=at(),P={title:(c==null?void 0:c.title)||E("title"),collapseSidebar:(c==null?void 0:c.collapseSidebar)||E("collapseSidebar"),expandSidebar:(c==null?void 0:c.expandSidebar)||E("expandSidebar"),dragToReorder:(c==null?void 0:c.dragToReorder)||E("dragToReorder"),dragToReorderDoc:(c==null?void 0:c.dragToReorderDoc)||E("dragToReorderDoc"),closeResource:(c==null?void 0:c.closeResource)||E("closeResource"),dragInstructions:(c==null?void 0:c.dragInstructions)||E("dragInstructions")},N=()=>b(!O),D=()=>b(!1);_.useEffect(()=>{const $=W=>{x.current&&!x.current.contains(W.target)&&D()};if(O)return document.addEventListener("mousedown",$),()=>document.removeEventListener("mousedown",$)},[O]);const L=ine(mE(ES,{activationConstraint:{distance:8}}),mE(TS,{coordinateGetter:Ere})),A=_.useCallback(($,W)=>{const I=t.findIndex(le=>le.id===$);if(I===-1)return;const z=W==="up"?I-1:I+1;if(z<0||z>=t.length){j(W);return}Q.emit("tabs:reorder",{oldIndex:I,newIndex:z});const ee=t[I];T(ee.name,W,z+1,t.length)},[t,Q]),X=($,W)=>{W.preventDefault(),W.stopPropagation(),Q.emit("tabs:close",{resourceId:$});const I=s($);r===I&&a&&e.length>0&&a(e[0].href)},Z=$=>{const{active:W}=$,I=t.find(z=>z.id===W.id);if(I){const z=t.indexOf(I);w(I.name,z+1,t.length)}},V=$=>{const{active:W,over:I}=$;if(I&&W.id!==I.id){const z=t.findIndex(le=>le.id===W.id),ee=t.findIndex(le=>le.id===I.id);if(z!==-1&&ee!==-1){Q.emit("tabs:reorder",{oldIndex:z,newIndex:ee});const le=t[z];k(le.name,ee+1,t.length)}}};return g.jsxs("div",{className:`semiont-collapsible-nav ${l}`,children:[g.jsx("div",{id:"drag-instructions",className:"sr-only","aria-live":"polite",children:P.dragInstructions}),g.jsx("div",{className:"sr-only",role:"status","aria-atomic":"true",children:"Resources can be reordered using Alt+Up or Alt+Down arrow keys."}),g.jsxs("div",{className:"semiont-collapsible-nav__container",children:[g.jsxs("div",{style:{position:"relative"},ref:f?x:void 0,children:[g.jsxs("div",{className:"semiont-nav-section__header",children:[!n&&f&&g.jsx("button",{onClick:N,className:"semiont-nav-section__header-text","aria-expanded":O,"aria-haspopup":"true",type:"button",children:P.title}),!n&&!f&&g.jsx("span",{className:"semiont-nav-section__header-text",children:P.title}),g.jsx("button",{onClick:()=>Q.emit("shell:sidebar-toggle",void 0),className:"semiont-nav-section__header-icon",title:n?P.expandSidebar:P.collapseSidebar,"aria-label":n?P.expandSidebar:P.collapseSidebar,type:"button",children:n?g.jsx(p,{}):g.jsx(m,{})})]}),O&&f&&!n&&g.jsx("div",{className:"semiont-nav-section__dropdown",children:f(D)})]}),!n&&g.jsx("nav",{className:"semiont-nav-tabs",children:e.map($=>{const W=r===$.href;return g.jsxs(i,{href:$.href,className:`semiont-nav-tab ${W?"semiont-nav-tab--active":""}`,title:$.description||$.name,"aria-current":W?"page":void 0,children:[g.jsx($.icon,{className:"semiont-nav-tab__icon","aria-hidden":"true"}),g.jsx("span",{className:"semiont-nav-tab__text",children:$.name})]},$.href)})}),n&&g.jsx("nav",{className:"semiont-nav-tabs",children:e.map($=>{const W=r===$.href;return g.jsx(i,{href:$.href,className:`semiont-nav-tab ${W?"semiont-nav-tab--active":""}`,title:$.description||$.name,"aria-current":W?"page":void 0,"aria-label":$.name,children:g.jsx($.icon,{className:"semiont-nav-tab__icon","aria-hidden":"true"})},$.href)})}),g.jsx("div",{className:"semiont-resource-tabs",role:"tablist","aria-label":"Open resources",children:n?t.map($=>{const W=s($.id),I=r===W;return g.jsx(TE,{resource:$,isCollapsed:n,isActive:I,href:W,onClose:X,LinkComponent:i,translations:{dragToReorder:P.dragToReorder,dragToReorderDoc:P.dragToReorderDoc,closeResource:P.closeResource}},$.id)}):g.jsx(sre,{sensors:L,collisionDetection:sne,onDragStart:Z,onDragEnd:V,children:g.jsx(bre,{items:t.map($=>$.id),strategy:vre,children:t.map(($,W)=>{const I=s($.id),z=r===I;return g.jsx(TE,{resource:$,isCollapsed:n,isActive:z,href:I,onClose:X,onReorder:A,index:W,totalCount:t.length,LinkComponent:i,translations:{dragToReorder:P.dragToReorder,dragToReorderDoc:P.dragToReorderDoc,closeResource:P.closeResource}},$.id)})})})})]})]})}function $D({context:e,translations:t}){const n=e.graphContext,r=(n==null?void 0:n.connections)??[],i=(n==null?void 0:n.citedBy)??[],a=(n==null?void 0:n.citedByCount)??0;return g.jsx(g.Fragment,{children:n&&(r.length>0||a>0)&&g.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"1rem"},children:[r.length>0&&g.jsxs("div",{children:[g.jsx("div",{style:{fontSize:"var(--semiont-text-xs)",fontWeight:700,textTransform:"uppercase",letterSpacing:"0.06em",color:"var(--semiont-text-tertiary)",marginBottom:"0.375rem"},children:t.connectionsLabel}),g.jsx("ul",{style:{display:"flex",flexDirection:"column",gap:"0.375rem",listStyle:"none",padding:0,margin:0},children:r.map(s=>g.jsxs("li",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:"0.375rem",fontSize:"var(--semiont-text-sm)"},children:[g.jsx("span",{style:{color:"var(--semiont-text-primary)",fontWeight:500},children:s.resourceName}),s.bidirectional&&g.jsx("span",{className:"semiont-chip",style:{fontSize:"var(--semiont-text-xs)",padding:"0.125rem 0.375rem"},children:"mutual"}),s.entityTypes&&s.entityTypes.map(l=>g.jsx("span",{className:"semiont-chip",style:{fontSize:"var(--semiont-text-xs)",padding:"0.125rem 0.375rem"},children:l},l))]},s.resourceId))})]}),a>0&&g.jsxs("div",{children:[g.jsxs("div",{style:{fontSize:"var(--semiont-text-xs)",fontWeight:700,textTransform:"uppercase",letterSpacing:"0.06em",color:"var(--semiont-text-tertiary)",marginBottom:"0.375rem"},children:[t.citedByLabel," (",a,")"]}),i.length>0&&g.jsx("ul",{style:{display:"flex",flexDirection:"column",gap:"0.25rem",listStyle:"none",padding:0,margin:0},children:i.map(s=>g.jsx("li",{style:{fontSize:"var(--semiont-text-sm)",color:"var(--semiont-text-primary)",fontWeight:500},children:s.resourceName},s.resourceId))})]})]})})}function Pre({context:e,contextLoading:t,contextError:n,userHint:r,onUserHintChange:i,onBind:a,onGenerate:s,onCompose:l,translations:c}){var b,x,w;const[d,f]=_.useState(!1),m=!t&&!n&&!!e,p=e==null?void 0:e.sourceContext,O=_.useRef(null);return _.useEffect(()=>{O.current&&O.current.scrollIntoView({block:"center",behavior:"instant"})},[e]),g.jsxs("div",{className:"semiont-gather__outer",children:[t&&g.jsxs("div",{className:"semiont-gather__loading",children:[g.jsxs("div",{style:{display:"flex",gap:"0.5rem"},children:[g.jsx("span",{className:"semiont-gather__loading-dot"}),g.jsx("span",{className:"semiont-gather__loading-dot"}),g.jsx("span",{className:"semiont-gather__loading-dot"})]}),g.jsx("span",{className:"semiont-gather__loading-text",children:c.loadingContext})]}),!!n&&g.jsx("div",{style:{textAlign:"center",padding:"1rem 0",color:"var(--semiont-color-red-600)"},children:c.failedContext}),e&&g.jsxs(g.Fragment,{children:[p&&g.jsxs("div",{className:"semiont-gather__source-strip",children:[g.jsxs("label",{className:"semiont-form__label",style:{marginBottom:"0.375rem"},children:[c.sourceContextLabel,(b=e.sourceResource)!=null&&b.name?` "${e.sourceResource.name}"`:""]}),g.jsxs("div",{className:`semiont-gather__source-box${d?" semiont-gather__source-box--expanded":""}`,children:[g.jsx("div",{className:"semiont-gather__source-context",children:g.jsxs("div",{style:{fontSize:"var(--semiont-text-sm)",fontFamily:"monospace",whiteSpace:"pre-wrap",color:"var(--semiont-text-secondary)"},children:[p.before&&g.jsx("span",{children:p.before}),g.jsx("span",{ref:O,style:{backgroundColor:"var(--semiont-color-primary-100)",padding:"0 0.25rem",fontWeight:600,color:"var(--semiont-color-primary-900)"},children:p.selected}),(((x=e.metadata)==null?void 0:x.entityTypes)??[]).map(k=>g.jsx("span",{className:"semiont-chip",style:{fontSize:"var(--semiont-text-xs)",padding:"0.125rem 0.375rem",fontWeight:400,verticalAlign:"middle",marginLeft:"0.25rem"},children:k},k)),((w=e.annotation)==null?void 0:w.motivation)&&g.jsx("span",{className:"semiont-chip",style:{fontSize:"var(--semiont-text-xs)",padding:"0.125rem 0.375rem",fontWeight:400,verticalAlign:"middle",marginLeft:"0.25rem"},children:e.annotation.motivation}),p.after&&g.jsx("span",{children:p.after})]})}),g.jsx("button",{type:"button",className:"semiont-gather__expand-btn",onClick:()=>f(k=>!k),children:d?"▲ less":"▼ more"})]})]}),g.jsxs("div",{className:"semiont-gather__body",children:[g.jsx("div",{className:"semiont-gather__left",children:g.jsx($D,{context:e,translations:c})}),g.jsx("div",{className:"semiont-gather__right",children:g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{className:"semiont-form__label",children:c.userHintLabel}),g.jsx("textarea",{value:r,onChange:k=>i(k.target.value),placeholder:c.userHintPlaceholder,className:"semiont-search-modal__search-input semiont-gather__hint-textarea",style:{resize:"vertical",fontFamily:"inherit"}})]})})]}),g.jsxs("div",{className:"semiont-gather__footer",children:[g.jsx("div",{className:"semiont-gather__footer-label",children:c.resolutionStrategyLabel}),g.jsxs("div",{className:"semiont-gather__actions",children:[g.jsxs("button",{type:"button",onClick:a,disabled:!m,className:"semiont-button--primary semiont-button--flex",children:["🔍 ",c.search,"…"]}),g.jsxs("button",{type:"button",onClick:s,disabled:!m,className:"semiont-button--primary semiont-button--flex",children:["✨ ",c.generate,"…"]}),g.jsxs("button",{type:"button",onClick:l,disabled:!m,className:"semiont-button--secondary semiont-button--flex",children:["✍️ ",c.compose]})]})]})]})]})}function Nre({defaultTitle:e,locale:t,context:n,onBack:r,onCancel:i,onGenerate:a,translations:s}){const[l,c]=_.useState(e),[d,f]=_.useState(""),[m,p]=_.useState(""),[O,b]=_.useState(t),[x,w]=_.useState(.7),[k,T]=_.useState(500),j=E=>{E.preventDefault();const Q=m.trim();a({title:l,storagePath:`file://${d}`,...Q?{prompt:Q}:{},language:O,temperature:x,maxTokens:k,context:n})};return g.jsxs("form",{onSubmit:j,className:"semiont-form semiont-form--scrollable",children:[g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{htmlFor:"wizard-title",className:"semiont-form__label",children:s.resourceTitle}),g.jsx("input",{id:"wizard-title",type:"text",value:l,onChange:E=>c(E.target.value),required:!0,className:"semiont-input",placeholder:s.resourceTitlePlaceholder})]}),g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{htmlFor:"wizard-storagePath",className:"semiont-form__label",children:"Save location"}),g.jsxs("div",{className:"semiont-input-addon",children:[g.jsx("span",{className:"semiont-input-addon__prefix",children:"file://"}),g.jsx("input",{id:"wizard-storagePath",type:"text",value:d,onChange:E=>f(E.target.value),required:!0,className:"semiont-input semiont-input--addon",placeholder:"generated/my-resource.md"})]})]}),g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{htmlFor:"wizard-prompt",className:"semiont-form__label",children:s.additionalInstructions}),g.jsx("textarea",{id:"wizard-prompt",value:m,onChange:E=>p(E.target.value),rows:2,className:"semiont-textarea",placeholder:s.additionalInstructionsPlaceholder})]}),g.jsxs("div",{className:"semiont-form__inline-row",children:[g.jsxs("div",{className:"semiont-form__field semiont-form__field--inline",children:[g.jsx("label",{htmlFor:"wizard-language",className:"semiont-form__label",children:s.language}),g.jsx("select",{id:"wizard-language",value:O,onChange:E=>b(E.target.value),className:"semiont-select",children:Nl.map(E=>g.jsx("option",{value:E.code,children:E.nativeName},E.code))})]}),g.jsxs("div",{className:"semiont-form__field semiont-form__field--inline semiont-form__field--grow",children:[g.jsxs("label",{htmlFor:"wizard-temperature",className:"semiont-form__label",children:[s.creativity," (",x.toFixed(1),")"]}),g.jsx("input",{id:"wizard-temperature",type:"range",min:"0",max:"1",step:"0.1",value:x,onChange:E=>w(parseFloat(E.target.value)),className:"semiont-slider"}),g.jsxs("div",{className:"semiont-slider__labels semiont-slider__labels--small",children:[g.jsx("span",{children:s.creativityFocused}),g.jsx("span",{children:s.creativityCreative})]})]}),g.jsxs("div",{className:"semiont-form__field semiont-form__field--inline semiont-form__field--narrow",children:[g.jsx("label",{htmlFor:"wizard-maxTokens",className:"semiont-form__label",children:s.maxLength}),g.jsx("input",{id:"wizard-maxTokens",type:"number",min:"100",max:"4000",step:"100",value:k,onChange:E=>T(parseInt(E.target.value)),className:"semiont-input"})]})]}),g.jsxs("div",{className:"semiont-modal__actions",style:{paddingTop:"0.5rem"},children:[g.jsxs("button",{type:"button",onClick:i,className:"semiont-button--secondary semiont-button--flex",children:["✕ ",s.cancel]}),g.jsxs("button",{type:"button",onClick:r,className:"semiont-button--secondary semiont-button--flex",children:["◀ ",s.back]}),g.jsxs("button",{type:"submit",className:"semiont-button--primary semiont-button--flex",children:["✨ ",s.generate]})]})]})}function Rre({isSearching:e=!1,onBack:t,onCancel:n,onSearch:r,translations:i}){const[a,s]=_.useState(10),[l,c]=_.useState(!0),d=f=>{f.preventDefault(),r({limit:a,useSemanticScoring:l})};return g.jsxs("form",{onSubmit:d,className:"semiont-form",children:[g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{htmlFor:"wizard-limit",className:"semiont-form__label",children:i.maxResults}),g.jsxs("select",{id:"wizard-limit",value:a,onChange:f=>s(parseInt(f.target.value)),className:"semiont-select",children:[g.jsx("option",{value:1,children:"1"}),g.jsx("option",{value:5,children:"5"}),g.jsx("option",{value:10,children:"10"}),g.jsx("option",{value:20,children:"20"})]})]}),g.jsxs("div",{className:"semiont-form__field",children:[g.jsxs("label",{className:"semiont-form__label",style:{display:"flex",alignItems:"center",gap:"0.5rem"},children:[g.jsx("input",{type:"checkbox",checked:l,onChange:f=>c(f.target.checked)}),i.semanticScoring]}),g.jsx("p",{className:"semiont-form__help",children:i.semanticScoringHelp})]}),g.jsxs("div",{className:"semiont-modal__actions",style:{paddingTop:"0.5rem"},children:[g.jsxs("button",{type:"button",onClick:n,className:"semiont-button--secondary semiont-button--flex",disabled:e,children:["✕ ",i.cancel]}),g.jsxs("button",{type:"button",onClick:t,className:"semiont-button--secondary semiont-button--flex",disabled:e,children:["◀ ",i.back]}),g.jsx("button",{type:"submit",className:"semiont-button--primary semiont-button--flex",disabled:e,"data-generating":e?"true":"false",children:e?`✨ ${i.searching}`:`🔍 ${i.search}`})]})]})}function Mre({results:e,context:t,onLink:n,onBack:r,onCancel:i,translations:a}){return g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"semiont-search-results__two-pane",children:[g.jsx("div",{className:"semiont-search-results__context-pane",children:g.jsx($D,{context:t,translations:a})}),g.jsx("div",{className:"semiont-search-results__results-pane",children:e.length===0?g.jsx("div",{className:"semiont-modal__empty-state",style:{textAlign:"center",padding:"2rem 0"},children:a.noResults}):e.map(s=>{const l=s["@id"];return g.jsxs("div",{style:{padding:"0.75rem",borderBottom:"1px solid var(--semiont-border-primary)",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"0.75rem"},children:[g.jsxs("div",{style:{flex:1,minWidth:0},children:[g.jsx("div",{style:{fontWeight:500,color:"var(--semiont-text-primary)"},children:s.name}),s.description&&g.jsx("div",{style:{fontSize:"var(--semiont-text-sm)",color:"var(--semiont-text-secondary)",marginTop:"0.25rem",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:s.description}),g.jsxs("div",{style:{fontSize:"var(--semiont-text-xs)",color:"var(--semiont-text-tertiary)",marginTop:"0.25rem",display:"flex",gap:"0.5rem"},children:[s.score!==void 0&&g.jsxs("span",{children:[a.score,": ",s.score]}),s.matchReason&&g.jsx("span",{children:s.matchReason})]})]}),g.jsxs("button",{type:"button",onClick:()=>n(l),className:"semiont-button--primary",style:{flexShrink:0},children:["🔗 ",a.link]})]},l)})})]}),g.jsxs("div",{className:"semiont-modal__actions",style:{paddingTop:"0.5rem"},children:[g.jsxs("button",{type:"button",onClick:i,className:"semiont-button--secondary semiont-button--flex",children:["✕ ",a.cancel]}),g.jsxs("button",{type:"button",onClick:r,className:"semiont-button--secondary semiont-button--flex",children:["◀ ",a.back]})]})]})}function Dre({isOpen:e,onClose:t,annotationId:n,resourceId:r,defaultTitle:i,entityTypes:a,locale:s,context:l,contextLoading:c,contextError:d,onGenerateSubmit:f,onLinkResource:m,onComposeNavigate:p,translations:O}){const b=De(at().activeSession$),[x,w]=_.useState({step:"gather"}),[k,T]=_.useState(!1),[j,E]=_.useState("");_.useEffect(()=>{e&&(w({step:"gather"}),T(!1),E(""))},[e]),w7("match:search-results",V=>{e&&n&&V.referenceId===n&&(T(!1),w({step:"search-results",results:V.response}))});const Q=_.useCallback(()=>{w({step:"configure-search"})},[]),P=_.useCallback(()=>{w({step:"configure-generation"})},[]),N=_.useCallback(()=>{if(!l||!n||!r)return;const V=j?{...l,userHint:j}:l;p(V,n,r,i,a),t()},[l,n,r,i,a,p,t,j]),D=_.useCallback(()=>{w({step:"gather"})},[]),L=_.useCallback(V=>{if(!n||!l||!r)return;T(!0);const $=j?{...l,userHint:j}:l;b==null||b.client.match.requestSearch({correlationId:crypto.randomUUID(),resourceId:r,referenceId:n,context:$,limit:V.limit,useSemanticScoring:V.useSemanticScoring})},[n,r,l,b,j]),A=_.useCallback(V=>{n&&(f(n,V),t())},[n,f,t]),X=_.useCallback(V=>{n&&(m(n,V),t())},[n,m,t]),Z=x.step==="gather"?O.gatherTitle:x.step==="configure-generation"?O.configureGenerationTitle:x.step==="configure-search"?O.configureSearchTitle:O.searchResultsTitle;return g.jsx(Bo,{appear:!0,show:e,children:g.jsxs(mc,{as:"div",className:"semiont-search-modal",onClose:t,children:[g.jsx(nr,{enter:"ease-out duration-200",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-150",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:g.jsx("div",{className:"semiont-search-modal__backdrop"})}),g.jsx("div",{className:"semiont-search-modal__wrapper",children:g.jsx("div",{className:"semiont-search-modal__centering semiont-search-modal__centering--center",children:g.jsx(nr,{enter:"ease-out duration-200",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-150",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:g.jsxs(Vo,{className:`semiont-search-modal__panel semiont-search-modal__panel--with-border${x.step==="search-results"?" semiont-search-modal__panel--wide":""}${x.step==="gather"?" semiont-search-modal__panel--gather":""}`,children:[g.jsxs("div",{className:"semiont-search-modal__header",children:[g.jsx(Yd,{className:"semiont-search-modal__title",children:Z}),g.jsx("button",{onClick:t,className:"semiont-search-modal__close-button","aria-label":"Close",children:"✕"})]}),x.step==="gather"&&g.jsx(Pre,{context:l,contextLoading:c,contextError:d,userHint:j,onUserHintChange:E,onBind:Q,onGenerate:P,onCompose:N,translations:{title:O.gatherTitle,sourceContextLabel:O.sourceContextLabel,connectionsLabel:O.connectionsLabel,citedByLabel:O.citedByLabel,userHintLabel:O.userHintLabel,userHintPlaceholder:O.userHintPlaceholder,loadingContext:O.loadingContext,failedContext:O.failedContext,search:O.search,generate:O.generate,compose:O.compose,resolutionStrategyLabel:O.resolutionStrategyLabel}}),x.step==="configure-generation"&&l&&g.jsx(Nre,{defaultTitle:i,locale:s,context:l,onBack:D,onCancel:t,onGenerate:A,translations:{resourceTitle:O.resourceTitle,resourceTitlePlaceholder:O.resourceTitlePlaceholder,additionalInstructions:O.additionalInstructions,additionalInstructionsPlaceholder:O.additionalInstructionsPlaceholder,language:O.language,languageHelp:O.languageHelp,creativity:O.creativity,creativityFocused:O.creativityFocused,creativityCreative:O.creativityCreative,maxLength:O.maxLength,maxLengthHelp:O.maxLengthHelp,cancel:O.cancel,back:O.back,generate:O.generate}}),x.step==="configure-search"&&g.jsx(Rre,{isSearching:k,onBack:D,onCancel:t,onSearch:L,translations:{maxResults:O.maxResults,semanticScoring:O.semanticScoring,semanticScoringHelp:O.semanticScoringHelp,cancel:O.cancel,back:O.back,search:O.search,searching:O.searching}}),x.step==="search-results"&&l&&g.jsx(Mre,{results:x.results,context:l,onLink:X,onBack:D,onCancel:t,translations:{noResults:O.noResults,link:O.link,back:O.back,cancel:O.cancel,score:O.score,sourceContextLabel:O.sourceContextLabel,connectionsLabel:O.connectionsLabel,citedByLabel:O.citedByLabel,userHintLabel:O.userHintLabel,userHintPlaceholder:O.userHintPlaceholder}})]})})})})]})})}var Lre=tp(JQ());function zre(){const{announce:e}=hc(),t=_.useCallback(()=>{e("Searching...","polite")},[e]),n=_.useCallback((a,s)=>{e(a===0?`No results found for ${s}`:a===1?`1 result found for ${s}`:`${a} results found for ${s}`,"polite")},[e]),r=_.useCallback((a,s)=>{e(`Selected ${s}: ${a}. Press Enter to navigate.`,"polite")},[e]),i=_.useCallback((a,s)=>{e(`Navigating to ${s}: ${a}`,"assertive")},[e]);return{announceSearching:t,announceSearchResults:n,announceSelection:r,announceNavigation:i}}var $re=300,Ire=5;function ose({isOpen:e,onClose:t,onNavigate:n,translations:r={}}){var T;const{announceSearchResults:i,announceSearching:a}=zre(),s=(T=De(at().activeSession$))==null?void 0:T.client,l=_.useRef(s);l.current=s;const[c,d]=_.useState(0),f={placeholder:r.placeholder||"Search resources, entities...",searching:r.searching||"Searching...",noResults:r.noResults||"No results found for",startTyping:r.startTyping||"Start typing to search...",navigate:r.navigate||"Navigate",select:r.select||"Select",close:r.close||"Close",enter:r.enter||"Enter",esc:r.esc||"ESC"},[m]=_.useState(()=>cQ(j=>l.current.browse.resources({search:j,limit:Ire}).pipe((0,Lre.map)(E=>{if(E!==void 0)return E.map(Q=>{var N;const P=Rb(Q);return P?{type:"resource",id:P,name:Q.name,content:(N=Q.content)==null?void 0:N.substring(0,150)}:null}).filter(Q=>Q!==null)})),{debounceMs:$re}));_.useEffect(()=>()=>m.dispose(),[m]);const p=De(m.query$)??"",O=De(m.state$),b=(O==null?void 0:O.results)??[],x=(O==null?void 0:O.isSearching)??!1;_.useEffect(()=>{e&&(m.setQuery(""),d(0))},[e,m]),_.useEffect(()=>{d(0)},[b.length]),_.useEffect(()=>{p.trim()&&(x?a():i(b.length,p))},[x,b.length]);const w=j=>{j.key==="ArrowDown"?(j.preventDefault(),d(E=>(E+1)%Math.max(1,b.length))):j.key==="ArrowUp"?(j.preventDefault(),d(E=>(E-1+Math.max(1,b.length))%Math.max(1,b.length))):j.key==="Enter"&&b[c]&&(j.preventDefault(),k(b[c]))},k=j=>{t(),n(j.type,j.id)};return g.jsx(Bo,{appear:!0,show:e,children:g.jsxs(mc,{as:"div",className:"semiont-search-modal",onClose:t,children:[g.jsx(nr,{enter:"ease-out duration-200",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-150",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:g.jsx("div",{className:"semiont-search-modal__backdrop"})}),g.jsx("div",{className:"semiont-search-modal__wrapper",children:g.jsx("div",{className:"semiont-search-modal__centering",children:g.jsx(nr,{enter:"ease-out duration-200",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-150",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:g.jsxs(Vo,{className:"semiont-search-modal__panel",children:[g.jsxs("div",{className:"semiont-search-modal__input-container",children:[g.jsx("div",{className:"semiont-search-modal__search-icon-wrapper",children:g.jsx("svg",{className:"semiont-search-modal__search-icon",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),g.jsx("input",{type:"text",value:p,onChange:j=>m.setQuery(j.target.value),onKeyDown:w,placeholder:f.placeholder,className:"semiont-search-modal__input",autoFocus:!0}),g.jsx("div",{className:"semiont-search-modal__esc-wrapper",children:g.jsx("kbd",{className:"semiont-search-modal__kbd",children:f.esc})})]}),g.jsxs("div",{className:"semiont-search-modal__results",children:[x&&g.jsx("div",{className:"semiont-search-modal__empty",children:f.searching}),!x&&p&&b.length===0&&g.jsxs("div",{className:"semiont-search-modal__empty",children:[f.noResults,' "',p,'"']}),!x&&b.length>0&&g.jsx("div",{className:"semiont-search-modal__results-list",children:b.map((j,E)=>g.jsxs("button",{onClick:()=>k(j),onMouseEnter:()=>d(E),className:`semiont-search-modal__result ${E===c?"semiont-search-modal__result--selected":""}`,children:[g.jsx("div",{className:"semiont-search-modal__result-icon-wrapper",children:j.type==="resource"?g.jsx("svg",{className:"semiont-search-modal__result-icon semiont-search-modal__result-icon--resource",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}):g.jsx("svg",{className:"semiont-search-modal__result-icon semiont-search-modal__result-icon--entity",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A1.994 1.994 0 013 12V7a4 4 0 014-4z"})})}),g.jsxs("div",{className:"semiont-search-modal__result-content",children:[g.jsxs("div",{className:"semiont-search-modal__result-header",children:[g.jsx("span",{className:"semiont-search-modal__result-name",children:j.name}),j.type==="entity"&&j.entityType&&g.jsx("span",{className:"semiont-search-modal__result-badge",children:j.entityType})]}),j.content&&g.jsx("p",{className:"semiont-search-modal__result-description",children:j.content})]}),E===c&&g.jsx("div",{className:"semiont-search-modal__result-action",children:g.jsx("kbd",{className:"semiont-search-modal__kbd",children:f.enter})})]},`${j.type}-${j.id}`))}),!x&&!p&&g.jsxs("div",{className:"semiont-search-modal__help",children:[g.jsx("div",{className:"semiont-search-modal__help-text",children:f.startTyping}),g.jsxs("div",{className:"semiont-search-modal__shortcuts",children:[g.jsxs("div",{className:"semiont-search-modal__shortcut",children:[g.jsx("kbd",{className:"semiont-search-modal__kbd semiont-search-modal__kbd--small",children:"↑↓"}),f.navigate]}),g.jsxs("div",{className:"semiont-search-modal__shortcut",children:[g.jsx("kbd",{className:"semiont-search-modal__kbd semiont-search-modal__kbd--small",children:f.enter}),f.select]}),g.jsxs("div",{className:"semiont-search-modal__shortcut",children:[g.jsx("kbd",{className:"semiont-search-modal__kbd semiont-search-modal__kbd--small",children:"Esc"}),f.close]})]})]})]})]})})})})]})})}tp(JQ());function qre(){return g.jsx("div",{className:"semiont-skip-links",children:g.jsxs("div",{className:"semiont-skip-links-container",children:[g.jsx("a",{href:"#main-content",className:"semiont-skip-link semiont-skip-link-first",children:"Skip to main content"}),g.jsx("a",{href:"#main-navigation",className:"semiont-skip-link",children:"Skip to navigation"}),g.jsx("a",{href:"#search",className:"semiont-skip-link semiont-skip-link-last",children:"Skip to search"})]})})}function lse({isFullyAuthenticated:e=!1,isAuthenticated:t=!1,hasValidBackendToken:n=!1}){var p;const r=(p=De(at().activeSession$))==null?void 0:p.client,[i,a]=_.useState(null),[s,l]=_.useState(!0),[c,d]=_.useState(null);_.useEffect(()=>{if(!r){l(!1);return}const O=()=>{r.admin.status().then(x=>{a(x),d(null),l(!1)}).catch(x=>{d(x instanceof Error?x:new Error(String(x))),l(!1)})};O();const b=setInterval(O,3e4);return()=>clearInterval(b)},[r]);const f=()=>{if(t&&!n)return"🚀 Frontend Status: Ready • Backend: Please sign out and sign in again to reconnect";if(!e)return"🚀 Frontend Status: Ready • Backend: Authentication required";if(i)return`🚀 Frontend Status: Ready • Backend: ${i.status} (v${i.version})`;if(s)return"🚀 Frontend Status: Ready • Backend: Connecting...";if(c){const O=c.message;return O.includes("401")||O.includes("Unauthorized")?"🚀 Frontend Status: Ready • Backend: Please sign out and sign in again":"🚀 Frontend Status: Ready • Backend: Connection failed"}return"🚀 Frontend Status: Ready • Backend: Unknown"},m=()=>t&&!n?"warning":e?i?"success":s?"loading":"error":"info";return g.jsxs("section",{className:"semiont-status-display","data-status":m(),role:"status","aria-live":"polite","aria-label":"System status information",children:[g.jsxs("p",{className:"semiont-status-message",children:[g.jsx("span",{className:"sr-only",children:"System status: "}),f()]}),e?c?g.jsxs("p",{className:"semiont-status-hint semiont-status-error-hint",role:"alert",children:[g.jsx("span",{className:"sr-only",children:"Error: "}),"Check that the backend server is running and accessible"]}):null:g.jsx("p",{className:"semiont-status-hint",children:"Sign in to view backend status"})]})}function Jm({t:e,className:t="",size:n="lg",showTagline:r=!0,animated:i=!0,compactTagline:a=!1}){return g.jsxs("div",{className:`semiont-branding ${t}`,"data-size":n,"data-animated":i,"data-compact-tagline":a,children:[g.jsx("h1",{className:"semiont-branding-title",children:g.jsx("span",{className:"semiont-branding-text",children:"Semiont"})}),r&&g.jsx("h2",{className:"semiont-branding-tagline",children:e("tagline")})]})}function Xre({Link:e,routes:t,t:n,tHome:r,showBranding:i=!0,brandingLink:a="/",variant:s="standalone",isAuthenticated:l=!1,isAdmin:c=!1,isModerator:d=!1,currentPath:f}){const{isOpen:m,toggle:p,close:O,dropdownRef:b}=x7();if(s==="floating"&&i)return g.jsxs("div",{className:"semiont-unified-header semiont-unified-header--floating","data-variant":"floating",ref:b,children:[g.jsx("button",{onClick:p,className:"semiont-unified-header__branding-button","aria-label":"Navigation menu","aria-expanded":m,"aria-controls":"nav-menu-dropdown-1","aria-haspopup":"true",id:"nav-menu-button-1",children:g.jsx(Jm,{t:r,size:"sm",showTagline:!0,animated:!1,compactTagline:!0,className:"semiont-unified-header__branding"})}),m&&l&&g.jsx("div",{id:"nav-menu-dropdown-1",className:"semiont-unified-header__dropdown",role:"menu","aria-orientation":"vertical","aria-labelledby":"nav-menu-button-1",children:g.jsx(w0,{Link:e,routes:t,t:n,isAdmin:c,isModerator:d,brandingLink:a,onItemClick:O,currentPath:f})})]});const x=g.jsxs("div",{className:"semiont-unified-header__content","data-variant":s,children:[i?g.jsxs("div",{className:"semiont-unified-header__branding-wrapper",ref:b,children:[g.jsx("button",{onClick:p,className:"semiont-unified-header__branding-button","aria-label":"Navigation menu","aria-expanded":m,"aria-controls":"nav-menu-dropdown-2","aria-haspopup":"true",id:"nav-menu-button-2",children:g.jsx(Jm,{t:r,size:"sm",showTagline:!0,animated:!1,compactTagline:!0,className:"semiont-unified-header__branding"})}),m&&l&&g.jsx("div",{id:"nav-menu-dropdown-2",className:"semiont-unified-header__dropdown",role:"menu","aria-orientation":"vertical","aria-labelledby":"nav-menu-button-2",children:g.jsx(w0,{Link:e,routes:t,t:n,isAdmin:c,isModerator:d,brandingLink:a,onItemClick:O,currentPath:f})})]}):g.jsx("div",{}),g.jsx("div",{className:"semiont-unified-header__actions","data-variant":s})]});return s==="standalone"?g.jsx("header",{className:"semiont-unified-header semiont-unified-header--standalone","data-variant":"standalone",children:g.jsx("div",{className:"semiont-unified-header__container",children:x})}):x}function cse({Link:e,routes:t,t:n,tHome:r,children:i,brandingLink:a="/",collapsible:s=!1,storageKey:l="leftSidebarCollapsed",isAdmin:c=!1,isModerator:d=!1,currentPath:f}){const[m,p]=_.useState(!1),{width:O,setWidth:b,minWidth:x,maxWidth:w}=b7({defaultWidth:256,minWidth:192,maxWidth:400,storageKey:"semiont-left-sidebar-width"});_.useEffect(()=>{s&&localStorage.getItem(l)==="true"&&p(!0)},[s,l]);const k=()=>{if(!s)return;const j=!m;p(j),localStorage.setItem(l,j.toString())},T=j=>g.jsx(w0,{Link:e,routes:t,t:n,isAdmin:c,isModerator:d,brandingLink:a,onItemClick:j,currentPath:f});return g.jsxs("aside",{className:"semiont-left-sidebar","data-collapsed":m,style:m?void 0:{width:`${O}px`,position:"relative"},children:[!m&&g.jsx(jY,{onResize:b,minWidth:x,maxWidth:w,position:"right",ariaLabel:"Resize left sidebar"}),g.jsx("div",{className:"semiont-left-sidebar__header","data-collapsed":m,children:g.jsx(e,{href:a,className:"semiont-left-sidebar__branding-button","aria-label":"Go to home page",children:m?g.jsx("div",{className:"semiont-left-sidebar__logo-collapsed",children:g.jsx("span",{className:"semiont-left-sidebar__logo-text",children:"S"})}):g.jsx(Jm,{t:r,size:"sm",showTagline:!1,animated:!1,className:""})})}),g.jsx("nav",{role:"navigation","aria-label":"Main navigation",id:"main-navigation",className:"semiont-left-sidebar__content",children:typeof i=="function"?i(m,k,T):i})]})}function use({Link:e,routes:t,t:n,tNav:r,tHome:i,children:a,className:s="",showAuthLinks:l=!0,CookiePreferences:c,onOpenKeyboardHelp:d}){return g.jsxs("div",{className:"semiont-page-layout",children:[g.jsx(qre,{}),g.jsx("header",{role:"banner",className:"semiont-page-layout__header",children:g.jsx("div",{className:"semiont-page-layout__header-container",children:g.jsx(Xre,{Link:e,routes:t,t:r,tHome:i,showAuthLinks:l,brandingLink:"/",variant:"embedded"})})}),g.jsx("main",{role:"main",id:"main-content",tabIndex:-1,className:`semiont-page-layout__main ${s}`,children:a}),g.jsx(Zte,{Link:e,routes:t,t:n,...c&&{CookiePreferences:c},...d&&{onOpenKeyboardHelp:d}})]})}var Jr={colors:{primary:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#0080ff",600:"#0066cc",700:"#0052a3",800:"#1e40af",900:"#1e3a8a"},secondary:{50:"#f0fffe",100:"#e0fffd",200:"#b3fffa",300:"#66fff6",400:"#1afff1",500:"#00ffff",600:"#00cccc",700:"#00a3a3",800:"#007a7a",900:"#005252"},semantic:{error:"#ef4444",errorLight:"#fca5a5",errorDark:"#b91c1c",warning:"#f59e0b",warningLight:"#fcd34d",warningDark:"#d97706",success:"#10b981",successLight:"#6ee7b7",successDark:"#047857",info:"#3b82f6",infoLight:"#93c5fd",infoDark:"#1d4ed8"},neutral:{0:"#ffffff",50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712",1e3:"#000000"}},spacing:{0:"0",xs:"0.25rem",sm:"0.5rem",md:"1rem",lg:"1.5rem",xl:"2rem","2xl":"2.5rem","3xl":"3rem","4xl":"4rem","5xl":"5rem"},typography:{fontFamily:{sans:'Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',mono:'JetBrains Mono, "SF Mono", Monaco, Consolas, "Liberation Mono", "Courier New", monospace'},fontSize:{xs:"0.75rem",sm:"0.875rem",base:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem"},fontWeight:{thin:100,light:300,normal:400,medium:500,semibold:600,bold:700,black:900}},borderRadius:{none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},shadows:{none:"none",xs:"0 1px 2px 0 rgb(0 0 0 / 0.05)",sm:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",base:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",md:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",lg:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)",xl:"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)"},transitions:{duration:{fast:"150ms",base:"250ms",slow:"350ms",slower:"500ms"}}};function Zre(){const e=[":root {"];return Object.entries(Jr.colors.primary).forEach(([t,n])=>{e.push(` --semiont-color-primary-${t}: ${n};`)}),Object.entries(Jr.colors.secondary).forEach(([t,n])=>{e.push(` --semiont-color-secondary-${t}: ${n};`)}),Object.entries(Jr.colors.semantic).forEach(([t,n])=>{e.push(` --semiont-color-${t.toLowerCase().replace(/([A-Z])/g,"-$1").toLowerCase()}: ${n};`)}),Object.entries(Jr.colors.neutral).forEach(([t,n])=>{e.push(` --semiont-color-neutral-${t}: ${n};`)}),Object.entries(Jr.spacing).forEach(([t,n])=>{e.push(` --semiont-spacing-${t}: ${n};`)}),Object.entries(Jr.typography.fontSize).forEach(([t,n])=>{e.push(` --semiont-text-${t}: ${n};`)}),Object.entries(Jr.typography.fontWeight).forEach(([t,n])=>{e.push(` --semiont-font-${t}: ${n};`)}),e.push(` --semiont-font-sans: ${Jr.typography.fontFamily.sans};`),e.push(` --semiont-font-mono: ${Jr.typography.fontFamily.mono};`),Object.entries(Jr.borderRadius).forEach(([t,n])=>{e.push(` --semiont-radius-${t}: ${n};`)}),Object.entries(Jr.shadows).forEach(([t,n])=>{e.push(` --semiont-shadow-${t}: ${n};`)}),Object.entries(Jr.transitions.duration).forEach(([t,n])=>{e.push(` --semiont-duration-${t}: ${n};`)}),e.push("}"),e.join(`
|
|
168
|
-
`)}Zre();function dse({message:e}){return g.jsx("div",{className:"semiont-loading-state-wrapper",children:g.jsx("div",{className:"semiont-loading-state semiont-loading-state-compose",children:g.jsx("p",{className:"semiont-loading-message",children:e})})})}function fse(){return g.jsx("div",{className:"semiont-loading-state semiont-loading-state-resource",children:g.jsx("p",{className:"semiont-loading-message",children:"Loading resource..."})})}function Bre({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.26 10.147a60.438 60.438 0 0 0-.491 6.347A48.62 48.62 0 0 1 12 20.904a48.62 48.62 0 0 1 8.232-4.41 60.46 60.46 0 0 0-.491-6.347m-15.482 0a50.636 50.636 0 0 0-2.658-.813A59.906 59.906 0 0 1 12 3.493a59.903 59.903 0 0 1 10.399 5.84c-.896.248-1.783.52-2.658.814m-15.482 0A50.717 50.717 0 0 1 12 13.489a50.702 50.702 0 0 1 7.74-3.342M6.75 15a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Zm0 0v-3.675A55.378 55.378 0 0 1 12 8.443m-7.007 11.55A5.981 5.981 0 0 0 6.75 15.75v-1.5"}))}var Vre=_.forwardRef(Bre),Ure=Vre;function Yre({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}var Wre=_.forwardRef(Yre),Fre=Wre;function Hre({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}var Gre=_.forwardRef(Hre),Kre=Gre;function Jre({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m6.75 7.5 3 2.25-3 2.25m4.5 0h3m-9 8.25h13.5A2.25 2.25 0 0 0 21 18V6a2.25 2.25 0 0 0-2.25-2.25H5.25A2.25 2.25 0 0 0 3 6v12a2.25 2.25 0 0 0 2.25 2.25Z"}))}var eie=_.forwardRef(Jre),tie=eie;function nie({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z"}))}var rie=_.forwardRef(nie),iie=rie;function aie({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z"}))}var sie=_.forwardRef(aie),oie=sie;function lie({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 21a9.004 9.004 0 0 0 8.716-6.747M12 21a9.004 9.004 0 0 1-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 0 1 7.843 4.582M12 3a8.997 8.997 0 0 0-7.843 4.582m15.686 0A11.953 11.953 0 0 1 12 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0 1 21 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0 1 12 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 0 1 3 12c0-1.605.42-3.113 1.157-4.418"}))}var cie=_.forwardRef(lie),uie=cie;function die({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"}))}var fie=_.forwardRef(die),hie=fie;function mie({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 18v-5.25m0 0a6.01 6.01 0 0 0 1.5-.189m-1.5.189a6.01 6.01 0 0 1-1.5-.189m3.75 7.478a12.06 12.06 0 0 1-4.5 0m3.75 2.383a14.406 14.406 0 0 1-3 0M14.25 18v-.192c0-.983.658-1.823 1.508-2.316a7.5 7.5 0 1 0-7.517 0c.85.493 1.509 1.333 1.509 2.316V18"}))}var pie=_.forwardRef(mie),ID=pie;function gie({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"}))}var vie=_.forwardRef(gie),Oie=vie;function bie({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L6.832 19.82a4.5 4.5 0 0 1-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 0 1 1.13-1.897L16.863 4.487Zm0 0L19.5 7.125"}))}var yie=_.forwardRef(bie),xie=yie;function Sie({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"}))}var wie=_.forwardRef(Sie),qD=wie;function _ie({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3v17.25m0 0c-1.472 0-2.882.265-4.185.75M12 20.25c1.472 0 2.882.265 4.185.75M18.75 4.97A48.416 48.416 0 0 0 12 4.5c-2.291 0-4.545.16-6.75.47m13.5 0c1.01.143 2.01.317 3 .52m-3-.52 2.62 10.726c.122.499-.106 1.028-.589 1.202a5.988 5.988 0 0 1-2.031.352 5.988 5.988 0 0 1-2.031-.352c-.483-.174-.711-.703-.59-1.202L18.75 4.971Zm-16.5.52c.99-.203 1.99-.377 3-.52m0 0 2.62 10.726c.122.499-.106 1.028-.589 1.202a5.989 5.989 0 0 1-2.031.352 5.989 5.989 0 0 1-2.031-.352c-.483-.174-.711-.703-.59-1.202L5.25 4.971Z"}))}var kie=_.forwardRef(_ie),jie=kie;function Tie({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75 11.25 15 15 9.75m-3-7.036A11.959 11.959 0 0 1 3.598 6 11.99 11.99 0 0 0 3 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.285Z"}))}var Cie=_.forwardRef(Tie),AS=Cie;function Eie({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.568 3H5.25A2.25 2.25 0 0 0 3 5.25v4.318c0 .597.237 1.17.659 1.591l9.581 9.581c.699.699 1.78.872 2.607.33a18.095 18.095 0 0 0 5.223-5.223c.542-.827.369-1.908-.33-2.607L11.16 3.66A2.25 2.25 0 0 0 9.568 3Z"}),_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 6h.008v.008H6V6Z"}))}var Aie=_.forwardRef(Eie),Qie=Aie;function Pie({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"}))}var Nie=_.forwardRef(Pie),Rie=Nie;function Mie({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17.982 18.725A7.488 7.488 0 0 0 12 15.75a7.488 7.488 0 0 0-5.982 2.975m11.963 0a9 9 0 1 0-11.963 0m11.963 0A8.966 8.966 0 0 1 12 21a8.966 8.966 0 0 1-5.982-2.275M15 9.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))}var Die=_.forwardRef(Mie),E0=Die;function hse({suggestedFeatures:e,theme:t,showLineNumbers:n,activePanel:r,translations:i,StatusDisplay:a,ToolbarPanels:s,Toolbar:l}){return g.jsxs("div",{className:`semiont-page${r&&ea.includes(r)?" semiont-page--panel-open":""}`,children:[g.jsxs("div",{className:"semiont-page__content",children:[g.jsxs("div",{className:"semiont-page__header",children:[g.jsx("h1",{className:"semiont-page__title",children:i.title}),g.jsx("p",{className:"semiont-page__subtitle",children:i.subtitle})]}),g.jsxs("div",{className:"semiont-admin__section",children:[g.jsx("h2",{className:"semiont-admin__section-title",children:i.systemStatus}),g.jsx(a,{})]}),g.jsxs("div",{className:"semiont-admin__section",children:[g.jsx("h2",{className:"semiont-admin__section-title",children:i.cliOperations}),g.jsx("p",{className:"semiont-admin__section-description",children:i.cliOperationsDescription}),g.jsx("div",{className:"semiont-admin__features-grid",children:e.map(c=>g.jsx("div",{className:"semiont-devops-feature",children:g.jsxs("div",{className:"semiont-devops-feature__header",children:[g.jsx("div",{className:"semiont-devops-feature__icon-box",children:g.jsx(c.icon,{className:"semiont-devops-feature__icon"})}),g.jsxs("div",{className:"semiont-devops-feature__content",children:[g.jsx("h3",{className:"semiont-devops-feature__title",children:c.title}),g.jsx("p",{className:"semiont-devops-feature__description",children:c.description}),g.jsx("p",{className:"semiont-devops-feature__available",children:c.available})]})]})},c.title))})]}),g.jsx("div",{className:"semiont-admin__info-box",children:g.jsxs("div",{className:"semiont-admin__info-box-content",children:[g.jsx("div",{className:"semiont-admin__info-box-icon",children:g.jsx(tie,{className:"semiont-icon semiont-icon--info"})}),g.jsxs("div",{className:"semiont-admin__info-box-text",children:[g.jsx("h3",{className:"semiont-admin__info-box-title",children:i.cliTitle}),g.jsxs("div",{className:"semiont-admin__info-box-description",children:[g.jsx("p",{children:i.cliDescription}),g.jsx("code",{className:"semiont-admin__info-box-code",children:"semiont --help"})]})]})]})})]}),g.jsxs("div",{className:"semiont-page__sidebar",children:[g.jsx(s,{activePanel:r,theme:t,showLineNumbers:n}),g.jsx(l,{context:"simple",activePanel:r})]})]})}function XD({onExport:e,isExporting:t,translations:n}){return g.jsxs("div",{className:"semiont-admin__card",children:[g.jsx("h2",{className:"semiont-admin__section-title",children:n.title}),g.jsx("p",{className:"semiont-admin__section-description",children:n.description}),g.jsx("button",{className:"semiont-exchange__button semiont-exchange__button--primary",onClick:e,disabled:t,children:t?n.exporting:n.exportButton})]})}function ZD({onFileSelected:e,onImport:t,onCancel:n,selectedFile:r,preview:i,isImporting:a,translations:s}){const l=_.useRef(null),[c,d]=_.useState(!1),[f,m]=_.useState(!1),p=_.useCallback(j=>{j.preventDefault(),d(!0)},[]),O=_.useCallback(()=>{d(!1)},[]),b=_.useCallback(j=>{j.preventDefault(),d(!1),m(!1);const E=j.dataTransfer.files[0];E&&e(E)},[e]),x=_.useCallback(j=>{var Q;m(!1);const E=(Q=j.target.files)==null?void 0:Q[0];E&&e(E)},[e]),w=()=>{m(!0)},k=()=>{m(!1),t()},T=()=>{m(!1)};return g.jsxs("div",{className:"semiont-admin__card",children:[g.jsx("h2",{className:"semiont-admin__section-title",children:s.title}),g.jsx("p",{className:"semiont-admin__section-description",children:s.description}),g.jsxs("div",{className:`semiont-exchange__dropzone${c?" semiont-exchange__dropzone--active":""}`,onDragOver:p,onDragLeave:O,onDrop:b,onClick:()=>{var j;return(j=l.current)==null?void 0:j.click()},children:[g.jsx("p",{className:"semiont-exchange__dropzone-text",children:c?s.dropzoneActive:s.dropzoneLabel}),r&&g.jsxs("p",{className:"semiont-exchange__file-info",children:[r.name," (",(r.size/1024).toFixed(1)," KB)"]})]}),g.jsx("input",{ref:l,type:"file",accept:".tar.gz,.jsonl,.gz",onChange:x,style:{display:"none"}}),i&&g.jsxs("div",{className:"semiont-exchange__preview",children:[g.jsxs("div",{className:"semiont-exchange__preview-row",children:[g.jsx("span",{className:"semiont-exchange__preview-label",children:s.detectedFormat}),g.jsxs("span",{className:"semiont-exchange__preview-value",children:[i.format," v",i.version]})]}),i.sourceUrl&&g.jsxs("div",{className:"semiont-exchange__preview-row",children:[g.jsx("span",{className:"semiont-exchange__preview-label",children:"Source"}),g.jsx("span",{className:"semiont-exchange__preview-value",children:i.sourceUrl})]}),Object.keys(i.stats).length>0&&g.jsxs("div",{className:"semiont-exchange__preview-row",children:[g.jsx("span",{className:"semiont-exchange__preview-label",children:s.statsPreview}),g.jsx("span",{className:"semiont-exchange__preview-value",children:Object.entries(i.stats).map(([j,E])=>`${E} ${j}`).join(", ")})]})]}),f&&g.jsxs("div",{className:"semiont-exchange__confirm",children:[g.jsx("p",{className:"semiont-exchange__confirm-title",children:s.importConfirmTitle}),g.jsx("p",{className:"semiont-exchange__confirm-message",children:s.importConfirmMessage}),g.jsxs("div",{className:"semiont-exchange__confirm-actions",children:[g.jsx("button",{className:"semiont-exchange__button semiont-exchange__button--primary",onClick:k,children:s.confirmImport}),g.jsx("button",{className:"semiont-exchange__button semiont-exchange__button--secondary",onClick:T,children:s.cancelImport})]})]}),!f&&g.jsxs("div",{className:"semiont-exchange__actions",children:[g.jsx("button",{className:"semiont-exchange__button semiont-exchange__button--primary",onClick:w,disabled:!i||a,children:a?s.importing:s.importButton}),r&&g.jsx("button",{className:"semiont-exchange__button semiont-exchange__button--secondary",onClick:n,disabled:a,children:s.cancelImport})]})]})}var Lie={started:"phaseStarted","entity-types":"phaseEntityTypes",resources:"phaseResources",annotations:"phaseAnnotations",complete:"phaseComplete",error:"phaseError"};function BD({phase:e,message:t,result:n,translations:r}){const i=Lie[e],a=i?r[i]:e,s=e==="complete",l=e==="error";return g.jsxs("div",{className:"semiont-exchange__progress",children:[g.jsx("div",{className:`semiont-exchange__phase-label${l?" semiont-exchange__phase-label--error":s?" semiont-exchange__phase-label--complete":""}`,children:a}),t&&!s&&!l&&g.jsx("p",{className:"semiont-exchange__progress-message",children:t}),s&&n&&g.jsxs("div",{className:"semiont-exchange__result",children:[n.stats!=null&&typeof n.stats=="object"&&g.jsx(g.Fragment,{children:Object.entries(n.stats).map(([c,d])=>{const f=c==="streams"?r.streams:c==="events"?r.events:c==="blobs"?r.blobs:c;return g.jsxs("div",{className:"semiont-exchange__result-stat",children:[g.jsx("span",{className:"semiont-exchange__result-value",children:d}),g.jsx("span",{className:"semiont-exchange__result-label",children:f})]},c)})}),n.hashChainValid!==void 0&&g.jsx("div",{className:`semiont-exchange__hash-badge${n.hashChainValid?" semiont-exchange__hash-badge--valid":" semiont-exchange__hash-badge--invalid"}`,children:n.hashChainValid?r.hashChainValid:r.hashChainInvalid})]}),l&&t&&g.jsx("p",{className:"semiont-exchange__error-message",children:t})]})}function mse({onExport:e,isExporting:t,onFileSelected:n,onImport:r,onCancelImport:i,selectedFile:a,preview:s,isImporting:l,importPhase:c,importMessage:d,importResult:f,theme:m,showLineNumbers:p,activePanel:O,translations:b,ToolbarPanels:x,Toolbar:w}){return g.jsxs("div",{className:`semiont-page${O&&ea.includes(O)?" semiont-page--panel-open":""}`,children:[g.jsxs("div",{className:"semiont-page__content",children:[g.jsxs("div",{className:"semiont-page__header",children:[g.jsx("h1",{className:"semiont-page__title",children:b.title}),g.jsx("p",{className:"semiont-page__subtitle",children:b.subtitle})]}),g.jsxs("div",{className:"semiont-exchange__cards",children:[g.jsx(XD,{onExport:e,isExporting:t,translations:b.export}),g.jsx(ZD,{onFileSelected:n,onImport:r,onCancel:i,selectedFile:a,preview:s,isImporting:l,translations:b.import})]}),c&&g.jsx(BD,{phase:c,message:d,result:f,translations:b.progress})]}),g.jsxs("div",{className:"semiont-page__sidebar",children:[g.jsx(x,{activePanel:O,theme:m,showLineNumbers:p}),g.jsx(w,{context:"simple",activePanel:O})]})]})}function pse({providers:e,allowedDomains:t,isLoading:n,theme:r,showLineNumbers:i,activePanel:a,translations:s,ToolbarPanels:l,Toolbar:c}){return g.jsxs("div",{className:`semiont-page${a&&ea.includes(a)?" semiont-page--panel-open":""}`,children:[g.jsx("div",{className:"semiont-page__content",children:g.jsxs("div",{className:"semiont-page__sections",children:[g.jsxs("div",{className:"semiont-page__header",children:[g.jsx("h1",{className:"semiont-page__title",children:s.title}),g.jsx("p",{className:"semiont-page__subtitle",children:s.subtitle})]}),g.jsxs("div",{className:"semiont-admin__card",children:[g.jsxs("div",{className:"semiont-admin__card-header",children:[g.jsx(AS,{className:"semiont-admin__card-icon semiont-admin__card-icon--primary"}),g.jsxs("div",{children:[g.jsx("h3",{className:"semiont-admin__card-title",children:s.oauthProviders}),g.jsx("p",{className:"semiont-admin__card-description",children:s.oauthProvidersDescription})]})]}),n?g.jsx("div",{className:"semiont-skeleton-group",children:g.jsx("div",{className:"semiont-skeleton semiont-skeleton--bar"})}):e.length>0?g.jsx("div",{className:"semiont-provider-list",children:e.map(d=>g.jsxs("div",{className:"semiont-provider-item",children:[g.jsxs("div",{className:"semiont-provider-item__info",children:[g.jsx(Fre,{className:"semiont-provider-item__icon semiont-provider-item__icon--success"}),g.jsx("span",{className:"semiont-provider-item__name",children:d.name}),d.clientId&&g.jsxs("span",{className:"semiont-provider-item__client-id",children:[s.clientId,": ",d.clientId]})]}),g.jsx("span",{className:"semiont-badge semiont-badge--success",children:s.configured})]},d.name))}):g.jsx("div",{className:"semiont-empty-message",children:s.noProvidersConfigured})]}),g.jsxs("div",{className:"semiont-admin__card",children:[g.jsxs("div",{className:"semiont-admin__card-header",children:[g.jsx(uie,{className:"semiont-admin__card-icon semiont-admin__card-icon--primary"}),g.jsxs("div",{children:[g.jsx("h3",{className:"semiont-admin__card-title",children:s.allowedDomains}),g.jsx("p",{className:"semiont-admin__card-description",children:s.allowedDomainsDescription})]})]}),n?g.jsxs("div",{className:"semiont-skeleton-group",children:[g.jsx("div",{className:"semiont-skeleton semiont-skeleton--chip"}),g.jsx("div",{className:"semiont-skeleton semiont-skeleton--chip semiont-skeleton--chip-lg"})]}):t.length>0?g.jsx("div",{className:"semiont-domain-list",children:t.map(d=>g.jsxs("div",{className:"semiont-chip semiont-chip--primary",children:["@",d]},d))}):g.jsx("div",{className:"semiont-empty-message",children:s.noDomainsConfigured})]}),g.jsx("div",{className:"semiont-admin__info-box",children:g.jsxs("div",{className:"semiont-info-box__content",children:[g.jsx(hie,{className:"semiont-info-box__icon"}),g.jsxs("div",{className:"semiont-info-box__text",children:[g.jsx("p",{className:"semiont-info-box__title",children:s.configManagementTitle}),g.jsx("p",{className:"semiont-info-box__description",children:s.configManagementDescription}),g.jsxs("ul",{className:"semiont-info-box__list",children:[g.jsx("li",{children:s.configLocalDev}),g.jsxs("li",{children:[s.configCloudDeploy," ",g.jsx("code",{className:"semiont-code-inline",children:s.configCloudDeployCommand})," ",s.configCloudDeployEnd]}),g.jsx("li",{children:s.configAWS})]})]})]})})]})}),g.jsxs("div",{className:"semiont-page__sidebar",children:[g.jsx(l,{activePanel:a,theme:r,showLineNumbers:i}),g.jsx(c,{context:"simple",activePanel:a})]})]})}function gse({onExport:e,isExporting:t,onFileSelected:n,onImport:r,onCancelImport:i,selectedFile:a,preview:s,isImporting:l,importPhase:c,importMessage:d,importResult:f,theme:m,showLineNumbers:p,activePanel:O,translations:b,ToolbarPanels:x,Toolbar:w}){return g.jsxs("div",{className:`semiont-page${O&&ea.includes(O)?" semiont-page--panel-open":""}`,children:[g.jsxs("div",{className:"semiont-page__content",children:[g.jsxs("div",{className:"semiont-page__header",children:[g.jsx("h1",{className:"semiont-page__title",children:b.title}),g.jsx("p",{className:"semiont-page__subtitle",children:b.subtitle})]}),g.jsxs("div",{className:"semiont-exchange__cards",children:[g.jsx(XD,{onExport:e,isExporting:t,translations:b.export}),g.jsx(ZD,{onFileSelected:n,onImport:r,onCancel:i,selectedFile:a,preview:s,isImporting:l,translations:b.import})]}),c&&g.jsx(BD,{phase:c,message:d,result:f,translations:b.progress})]}),g.jsxs("div",{className:"semiont-page__sidebar",children:[g.jsx(x,{activePanel:O,theme:m,showLineNumbers:p}),g.jsx(w,{context:"simple",activePanel:O})]})]})}function zie({user:e,onUpdate:t,onDelete:n,translations:r}){const i={admin:"semiont-badge semiont-badge--danger",user:"semiont-badge semiont-badge--default"},a={active:"semiont-badge semiont-badge--success",inactive:"semiont-badge semiont-badge--default"},s=e.isAdmin?"admin":"user",l=e.isActive?"active":"inactive";return g.jsxs("tr",{className:"semiont-table__row",children:[g.jsx("td",{className:"semiont-table__cell",children:g.jsxs("div",{className:"semiont-user-info",children:[g.jsx(E0,{className:"semiont-user-info__avatar"}),g.jsxs("div",{children:[g.jsx("div",{className:"semiont-user-info__name",children:e.name||r.noName}),g.jsx("div",{className:"semiont-user-info__email",children:e.email})]})]})}),g.jsx("td",{className:"semiont-table__cell",children:g.jsxs("span",{className:"semiont-table__text--secondary",children:["@",e.domain]})}),g.jsx("td",{className:"semiont-table__cell",children:g.jsx("span",{className:i[s],children:r[s]})}),g.jsx("td",{className:"semiont-table__cell",children:g.jsx("span",{className:a[l],children:r[l]})}),g.jsx("td",{className:"semiont-table__cell semiont-table__text--secondary",children:e.lastLogin?new Date(e.lastLogin).toLocaleDateString():r.never}),g.jsx("td",{className:"semiont-table__cell semiont-table__text--secondary",children:new Date(e.created).toLocaleDateString()}),g.jsx("td",{className:"semiont-table__cell semiont-table__cell--actions",children:g.jsxs("div",{className:"semiont-table__actions",children:[g.jsx("button",{onClick:()=>t(e.id,{isAdmin:!e.isAdmin}),className:"semiont-action-button semiont-action-button--info",title:e.isAdmin?r.removeAdmin:r.makeAdmin,children:g.jsx(AS,{className:"semiont-action-button__icon"})}),g.jsx("button",{onClick:()=>t(e.id,{isActive:!e.isActive}),className:"semiont-action-button semiont-action-button--warning",title:e.isActive?r.deactivateUser:r.activateUser,children:g.jsx(xie,{className:"semiont-action-button__icon"})}),g.jsx("button",{onClick:()=>n(e.id),className:"semiont-action-button semiont-action-button--danger",title:r.deleteUser,children:g.jsx(Rie,{className:"semiont-action-button__icon"})})]})})]})}function vse({users:e,userStats:t,isLoadingUsers:n,isLoadingStats:r,onUpdateUser:i,onDeleteUser:a,onAddUser:s,onExportUsers:l,theme:c,showLineNumbers:d,activePanel:f,translations:m,ToolbarPanels:p,Toolbar:O,buttonStyles:b}){var P;const[x,w]=_.useState(""),[k,T]=_.useState("all"),[j,E]=_.useState("all"),Q=e.filter(N=>{const D=(N.name||"").toLowerCase().includes(x.toLowerCase())||N.email.toLowerCase().includes(x.toLowerCase()),L=N.isAdmin?"admin":"user",A=N.isActive?"active":"inactive";return D&&(k==="all"||L===k)&&(j==="all"||A===j)});return g.jsxs("div",{className:`semiont-page${f&&ea.includes(f)?" semiont-page--panel-open":""}`,children:[g.jsx("div",{className:"semiont-page__content",children:g.jsxs("div",{className:"semiont-page__sections",children:[g.jsxs("div",{className:"semiont-page__header-with-action",children:[g.jsxs("div",{children:[g.jsx("h1",{className:"semiont-page__title",children:m.title}),g.jsx("p",{className:"semiont-page__subtitle",children:m.subtitle})]}),g.jsxs("button",{onClick:s,className:b.primary.base,children:[g.jsx(qD,{className:"semiont-button__icon"}),m.addUser]})]}),g.jsx("div",{className:"semiont-admin__stats-grid",children:r?Array(4).fill(0).map((N,D)=>g.jsx("div",{className:"semiont-stat-card semiont-stat-card--loading",children:g.jsxs("div",{className:"semiont-stat-card__content",children:[g.jsx("div",{className:"semiont-skeleton semiont-skeleton--icon"}),g.jsxs("div",{className:"semiont-stat-card__text",children:[g.jsx("div",{className:"semiont-skeleton semiont-skeleton--text"}),g.jsx("div",{className:"semiont-skeleton semiont-skeleton--number"})]})]})},D)):g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"semiont-stat-card",children:g.jsxs("div",{className:"semiont-stat-card__content",children:[g.jsx("div",{className:"semiont-stat-card__icon-wrapper",children:g.jsx(E0,{className:"semiont-stat-card__icon semiont-stat-card__icon--primary"})}),g.jsxs("div",{className:"semiont-stat-card__text",children:[g.jsx("p",{className:"semiont-stat-card__label",children:m.totalUsers}),g.jsx("p",{className:"semiont-stat-card__value",children:(t==null?void 0:t.totalUsers)??0})]})]})}),g.jsx("div",{className:"semiont-stat-card",children:g.jsxs("div",{className:"semiont-stat-card__content",children:[g.jsx("div",{className:"semiont-stat-card__icon-wrapper",children:g.jsx("div",{className:"semiont-stat-card__status-indicator semiont-stat-card__status-indicator--active",children:g.jsx("div",{className:"semiont-stat-card__status-dot"})})}),g.jsxs("div",{className:"semiont-stat-card__text",children:[g.jsx("p",{className:"semiont-stat-card__label",children:m.activeUsers}),g.jsx("p",{className:"semiont-stat-card__value",children:(t==null?void 0:t.activeUsers)??0})]})]})}),g.jsx("div",{className:"semiont-stat-card",children:g.jsxs("div",{className:"semiont-stat-card__content",children:[g.jsx("div",{className:"semiont-stat-card__icon-wrapper",children:g.jsx(AS,{className:"semiont-stat-card__icon semiont-stat-card__icon--danger"})}),g.jsxs("div",{className:"semiont-stat-card__text",children:[g.jsx("p",{className:"semiont-stat-card__label",children:m.administrators}),g.jsx("p",{className:"semiont-stat-card__value",children:(t==null?void 0:t.adminUsers)??0})]})]})}),g.jsx("div",{className:"semiont-stat-card",children:g.jsxs("div",{className:"semiont-stat-card__content",children:[g.jsx("div",{className:"semiont-stat-card__icon-wrapper",children:g.jsx(oie,{className:"semiont-stat-card__icon semiont-stat-card__icon--warning"})}),g.jsxs("div",{className:"semiont-stat-card__text",children:[g.jsx("p",{className:"semiont-stat-card__label",children:m.recentUsers}),g.jsx("p",{className:"semiont-stat-card__value",children:((P=t==null?void 0:t.recentSignups)==null?void 0:P.length)??0})]})]})})]})}),g.jsx("div",{className:"semiont-admin__filters-card",children:g.jsxs("div",{className:"semiont-admin__filters-grid",children:[g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{htmlFor:"search",className:"semiont-form__label",children:m.searchUsers}),g.jsxs("div",{className:"semiont-search-input",children:[g.jsx("div",{className:"semiont-search-input__icon",children:g.jsx(Oie,{className:"semiont-icon semiont-icon--small"})}),g.jsx("input",{type:"text",id:"search",className:"semiont-search-input__field",placeholder:m.searchPlaceholder,value:x,onChange:N=>w(N.target.value)})]})]}),g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{htmlFor:"role",className:"semiont-form__label",children:m.role}),g.jsxs("select",{id:"role",className:"semiont-select",value:k,onChange:N=>T(N.target.value),children:[g.jsx("option",{value:"all",children:m.allRoles}),g.jsx("option",{value:"admin",children:m.admin}),g.jsx("option",{value:"user",children:m.user})]})]}),g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{htmlFor:"status",className:"semiont-form__label",children:m.status}),g.jsxs("select",{id:"status",className:"semiont-select",value:j,onChange:N=>E(N.target.value),children:[g.jsx("option",{value:"all",children:m.allStatus}),g.jsx("option",{value:"active",children:m.active}),g.jsx("option",{value:"inactive",children:m.inactive})]})]}),g.jsx("div",{className:"semiont-form__field semiont-form__field--align-end",children:g.jsx("button",{onClick:l,className:`${b.secondary.base} semiont-button--full-width`,children:m.exportUsers})})]})}),g.jsxs("div",{className:"semiont-admin__table-card",children:[g.jsx("div",{className:"semiont-table-container",children:n?g.jsxs("div",{className:"semiont-loading-state",children:[g.jsx("div",{className:"semiont-spinner"}),g.jsx("p",{className:"semiont-loading-state__text",children:m.loadingUsers})]}):g.jsxs("table",{className:"semiont-table",children:[g.jsx("thead",{className:"semiont-table__head",children:g.jsxs("tr",{children:[g.jsx("th",{className:"semiont-table__header",children:m.userColumn}),g.jsx("th",{className:"semiont-table__header",children:m.domainColumn}),g.jsx("th",{className:"semiont-table__header",children:m.roleColumn}),g.jsx("th",{className:"semiont-table__header",children:m.statusColumn}),g.jsx("th",{className:"semiont-table__header",children:m.lastLoginColumn}),g.jsx("th",{className:"semiont-table__header",children:m.joinedColumn}),g.jsx("th",{className:"semiont-table__header semiont-table__header--actions",children:m.actionsColumn})]})}),g.jsx("tbody",{className:"semiont-table__body",children:Q.map(N=>g.jsx(zie,{user:N,onUpdate:i,onDelete:a,translations:m},N.id))})]})}),!n&&Q.length===0&&g.jsxs("div",{className:"semiont-empty-state",children:[g.jsx(E0,{className:"semiont-empty-state__icon"}),g.jsx("h3",{className:"semiont-empty-state__title",children:m.noUsersFound}),g.jsx("p",{className:"semiont-empty-state__description",children:m.noUsersFoundDescription})]})]})]})}),g.jsxs("div",{className:"semiont-page__sidebar",children:[g.jsx(p,{activePanel:f,theme:c,showLineNumbers:d}),g.jsx(O,{context:"simple",activePanel:f})]})]})}function $ie(){return g.jsxs("svg",{className:"semiont-icon semiont-icon--small semiont-icon--inline",viewBox:"0 0 24 24",children:[g.jsx("path",{fill:"currentColor",d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"}),g.jsx("path",{fill:"currentColor",d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"}),g.jsx("path",{fill:"currentColor",d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"}),g.jsx("path",{fill:"currentColor",d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"})]})}function Ose({onSignUp:e,Link:t,translations:n}){const[r,i]=_.useState(!1),a=async()=>{i(!0);try{await e()}catch(s){console.error("Failed to initiate Google sign-up:",s),i(!1)}};return g.jsx("main",{className:"semiont-auth__main",role:"main",children:g.jsx("div",{className:"semiont-auth__container",children:g.jsxs("div",{className:"semiont-auth__content",children:[g.jsxs("section",{"aria-labelledby":"signup-heading",className:"semiont-auth__branding",children:[g.jsx("h1",{id:"signup-heading",className:"sr-only",children:n.pageTitle}),g.jsx(Jm,{t:s=>n[s]||s,size:"xl",animated:!0,className:"semiont-auth__logo"}),g.jsx("p",{className:"semiont-auth__welcome",children:n.pageTitle}),g.jsx("p",{className:"semiont-auth__subtitle",children:n.signUpPrompt})]}),g.jsxs("div",{className:"semiont-auth__forms",children:[g.jsxs("button",{onClick:a,disabled:r,className:`${Du.primary.base} semiont-button--full-width`,children:[r?g.jsx("div",{className:"semiont-auth__spinner"}):g.jsx($ie,{}),r?n.creatingAccount:n.signUpWithGoogle]}),g.jsxs("div",{className:"semiont-auth__info",children:[n.approvedDomainsInfo,g.jsx("br",{}),n.termsAgreement]})]}),g.jsxs("div",{className:"semiont-auth__links",children:[g.jsx(t,{href:"/",className:Du.secondary.base,children:n.backToHome}),g.jsx(t,{href:"/auth/signin",className:Du.primary.base,children:n.alreadyHaveAccount})]})]})})})}function Iie(e,t){switch(e){case"Configuration":return t.errorConfiguration;case"AccessDenied":return t.errorAccessDenied;case"Verification":return t.errorVerification;default:return t.errorGeneric}}function bse({errorType:e,Link:t,translations:n}){const r=Iie(e,n);return g.jsx("div",{className:"semiont-auth-error-display",children:g.jsxs("div",{className:"semiont-auth-error-display__container",children:[g.jsx("div",{children:g.jsx("h2",{className:"semiont-auth-error-display__title",children:n.pageTitle})}),g.jsx("div",{className:"semiont-auth-error-display__error-box",children:g.jsx("div",{className:"semiont-auth-error-display__error-message",children:r})}),g.jsx("div",{className:"semiont-auth-error-display__actions",children:g.jsx(t,{href:"/auth/signin",className:"semiont-auth-error-display__link",children:n.tryAgain})})]})})}function yse({userName:e,status:t,isProcessing:n,onAccept:r,onDecline:i,translations:a,PageLayout:s,Link:l}){return t==="loading"?g.jsx(s,{className:"semiont-welcome-page__layout",children:g.jsx("div",{className:"semiont-welcome-page__loading",children:g.jsxs("div",{className:"semiont-welcome-page__loading-content",children:[g.jsx("div",{className:"semiont-welcome-page__spinner"}),g.jsx("p",{className:"semiont-welcome-page__loading-text",children:a.loading})]})})}):t==="accepted"?g.jsx(s,{className:"semiont-welcome-page__layout",children:g.jsx("div",{className:"semiont-welcome-page__accepted",children:g.jsxs("div",{className:"semiont-welcome-page__accepted-content",children:[g.jsx("div",{className:"semiont-welcome-page__accepted-icon",children:g.jsx("svg",{className:"semiont-welcome-page__accepted-checkmark",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),g.jsxs("div",{children:[g.jsx("h2",{className:"semiont-welcome-page__accepted-title",children:a.welcomeTitle}),g.jsx("p",{className:"semiont-welcome-page__accepted-subtitle",children:a.thanksForAccepting})]})]})})}):g.jsx(s,{className:"semiont-welcome-page__layout",children:g.jsx("div",{className:"semiont-welcome-page__form-wrapper",children:g.jsxs("div",{className:"semiont-welcome-page__form",children:[g.jsxs("div",{className:"semiont-welcome-page__form-header",children:[g.jsx("div",{className:"semiont-welcome-page__form-icon",children:g.jsx("svg",{className:"semiont-welcome-page__form-icon-svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})})}),g.jsx("h1",{className:"semiont-welcome-page__form-title",children:a.welcomeUser.replace("{firstName}",e||"")}),g.jsx("p",{className:"semiont-welcome-page__form-subtitle",children:a.reviewTermsPrompt})]}),g.jsx("div",{className:"semiont-welcome-page__terms-content",children:g.jsxs("div",{className:"semiont-welcome-page__prose",children:[g.jsx("h3",{children:a.termsSummaryTitle}),g.jsx("p",{children:a.termsSummaryIntro}),g.jsx("h4",{children:a.acceptableUseTitle}),g.jsxs("ul",{children:[g.jsx("li",{children:a.acceptableUseResponsible}),g.jsx("li",{children:a.acceptableUseRespect}),g.jsx("li",{children:a.acceptableUseConduct})]}),g.jsx("h4",{children:a.prohibitedContentTitle}),g.jsx("p",{children:a.prohibitedContentIntro}),g.jsxs("ul",{children:[g.jsx("li",{children:a.prohibitedIllegal}),g.jsx("li",{children:a.prohibitedAdult}),g.jsx("li",{children:a.prohibitedHate}),g.jsx("li",{children:a.prohibitedViolence}),g.jsx("li",{children:a.prohibitedMisinformation}),g.jsx("li",{children:a.prohibitedPrivacy}),g.jsx("li",{children:a.prohibitedCopyright}),g.jsx("li",{children:a.prohibitedMalware}),g.jsx("li",{children:a.prohibitedSpam})]}),g.jsx("h4",{children:a.conductTitle}),g.jsxs("p",{children:[a.conductDescription," ",g.jsx("a",{href:"https://ai-alliance.cdn.prismic.io/ai-alliance/Zl-MG5m069VX1dgH_AIAllianceCodeofConduct.pdf",target:"_blank",rel:"noopener noreferrer",className:"semiont-link",children:a.conductLink}),a.conductPromotion]}),g.jsx("h4",{children:a.responsibilitiesTitle}),g.jsxs("ul",{children:[g.jsx("li",{children:a.responsibilitiesSecure}),g.jsx("li",{children:a.responsibilitiesReport}),g.jsx("li",{children:a.responsibilitiesAccurate}),g.jsx("li",{children:a.responsibilitiesComply})]}),g.jsx("p",{className:"semiont-welcome-page__warning",children:a.violationsWarning})]})}),g.jsxs("div",{className:"semiont-welcome-page__actions",children:[g.jsxs("p",{className:"semiont-welcome-page__legal-links",children:[a.readFullTerms," ",g.jsx(l,{href:"/terms",target:"_blank",className:"semiont-welcome-page__link",children:a.termsOfService})," ",a.and," ",g.jsx(l,{href:"/privacy",target:"_blank",className:"semiont-welcome-page__link",children:a.privacyPolicy})]}),g.jsxs("div",{className:"semiont-welcome-page__buttons",children:[g.jsx("button",{onClick:i,disabled:n,className:"semiont-welcome-page__button semiont-welcome-page__button--secondary",children:a.declineAndSignOut}),g.jsx("button",{onClick:r,disabled:n,className:"semiont-welcome-page__button semiont-welcome-page__button--primary",children:n?a.processing:a.acceptAndContinue})]}),g.jsx("p",{className:"semiont-welcome-page__legal-notice",children:a.legallyBound})]})]})})})}function xse({entityTypes:e,error:t,newTag:n,onNewTagChange:r,onAddTag:i,isAddingTag:a,theme:s,showLineNumbers:l,activePanel:c,translations:d,ToolbarPanels:f,Toolbar:m}){const p=O=>{O.key==="Enter"&&i()};return g.jsxs("div",{className:`semiont-page${c&&ea.includes(c)?" semiont-page--panel-open":""}`,children:[g.jsxs("div",{className:"semiont-page__content",children:[g.jsxs("div",{className:"semiont-page__header",children:[g.jsx("h1",{className:"semiont-page__title",children:d.pageTitle}),g.jsx("p",{className:"semiont-page__subtitle",children:d.pageDescription})]}),g.jsxs("div",{className:"semiont-card",children:[g.jsxs("div",{className:"semiont-entity-tags__header",children:[g.jsx("div",{className:"semiont-entity-tags__icon-box",children:g.jsx(Qie,{className:"semiont-entity-tags__icon"})}),g.jsxs("div",{className:"semiont-entity-tags__content",children:[g.jsx("h3",{className:"semiont-entity-tags__title",children:d.sectionTitle}),g.jsx("p",{className:"semiont-entity-tags__description",children:d.sectionDescription})]})]}),g.jsx("div",{className:"semiont-entity-tags__tags-section",children:g.jsx("div",{className:"semiont-tags",children:e.map(O=>g.jsx("span",{className:"semiont-tag semiont-tag--info semiont-tag--rounded-md",children:O},O))})}),g.jsxs("div",{className:"semiont-entity-tags__input-group",children:[g.jsx("input",{type:"text",value:n,onChange:O=>r(O.target.value),onKeyDown:p,placeholder:d.inputPlaceholder,className:"semiont-entity-tags__input",disabled:a}),g.jsx("button",{onClick:i,disabled:a||!n.trim(),className:"semiont-button semiont-button--primary",children:a?d.adding:g.jsxs(g.Fragment,{children:[g.jsx(qD,{className:"semiont-icon semiont-icon--small semiont-icon--inline"}),d.addTag]})})]}),t&&g.jsxs("div",{className:"semiont-entity-tags__error",children:[g.jsx(iie,{className:"semiont-entity-tags__error-icon"}),t]})]})]}),g.jsxs("div",{className:"semiont-page__sidebar",children:[g.jsx(f,{activePanel:c,theme:s,showLineNumbers:l}),g.jsx(m,{context:"simple",activePanel:c})]})]})}function Sse({isLoading:e,theme:t,showLineNumbers:n,activePanel:r,translations:i,ToolbarPanels:a,Toolbar:s}){return e?g.jsx("div",{className:"semiont-page__loading",children:g.jsx("p",{className:"semiont-page__loading-text",children:i.loading})}):g.jsxs("div",{className:`semiont-page${r&&ea.includes(r)?" semiont-page--panel-open":""}`,children:[g.jsxs("div",{className:"semiont-page__content",children:[g.jsxs("div",{className:"semiont-page__header",children:[g.jsx("h1",{className:"semiont-page__title",children:i.pageTitle}),g.jsx("p",{className:"semiont-page__subtitle",children:i.pageDescription})]}),g.jsxs("div",{className:"semiont-card",children:[g.jsxs("div",{className:"semiont-recent-docs__header",children:[g.jsx("div",{className:"semiont-recent-docs__icon-box",children:g.jsx(Kre,{className:"semiont-recent-docs__icon"})}),g.jsxs("div",{className:"semiont-recent-docs__content",children:[g.jsx("h3",{className:"semiont-recent-docs__title",children:i.sectionTitle}),g.jsx("p",{className:"semiont-recent-docs__description",children:i.sectionDescription})]})]}),g.jsxs("div",{className:"semiont-recent-docs__empty-state",children:[g.jsx("svg",{className:"semiont-recent-docs__empty-icon",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}),g.jsx("p",{className:"semiont-recent-docs__empty-message",children:i.noDocuments}),g.jsx("p",{className:"semiont-recent-docs__empty-hint",children:i.activityWillAppear})]})]})]}),g.jsxs("div",{className:"semiont-page__sidebar",children:[g.jsx(a,{activePanel:r,theme:t,showLineNumbers:n}),g.jsx(s,{context:"simple",activePanel:r})]})]})}var qie={legal:jie,scientific:Ure,general:ID},CE={legal:"semiont-schema-domain--legal",scientific:"semiont-schema-domain--scientific",general:"semiont-schema-domain--general"};function wse({schemas:e,isLoading:t,theme:n,showLineNumbers:r,activePanel:i,translations:a,ToolbarPanels:s,Toolbar:l}){return t?g.jsx("div",{className:"semiont-page__loading",children:g.jsx("p",{className:"semiont-page__loading-text",children:a.loading})}):g.jsxs("div",{className:`semiont-page${i&&ea.includes(i)?" semiont-page--panel-open":""}`,children:[g.jsxs("div",{className:"semiont-page__content",children:[g.jsxs("div",{className:"semiont-page__header",children:[g.jsx("h1",{className:"semiont-page__title",children:a.pageTitle}),g.jsx("p",{className:"semiont-page__subtitle",children:a.pageDescription})]}),g.jsx("div",{className:"semiont-card-grid semiont-card-grid--two-columns",children:e.map(c=>{const d=qie[c.domain]||ID,f=CE[c.domain]||CE.general;return g.jsxs("div",{className:"semiont-card",children:[g.jsxs("div",{className:"semiont-schema__header",children:[g.jsx("div",{className:`semiont-schema__icon-wrapper ${f}`,children:d&&g.jsx(d,{className:"semiont-schema__icon"})}),g.jsxs("div",{className:"semiont-schema__content",children:[g.jsx("h3",{className:"semiont-schema__title",children:c.name}),g.jsx("p",{className:"semiont-schema__description",children:c.description}),g.jsx("span",{className:`semiont-schema__badge ${f}`,children:c.domain})]})]}),g.jsxs("div",{className:"semiont-schema__categories",children:[g.jsx("h4",{className:"semiont-schema__categories-title",children:a.categories}),c.tags.map(m=>g.jsxs("div",{className:"semiont-schema__category",children:[g.jsx("div",{className:"semiont-schema__category-name",children:m.name}),g.jsx("div",{className:"semiont-schema__category-description",children:m.description}),g.jsxs("div",{className:"semiont-schema__examples",children:[m.examples.slice(0,2).map((p,O)=>g.jsx("span",{className:"semiont-schema__example",children:p},O)),m.examples.length>2&&g.jsxs("span",{className:"semiont-schema__example-more",children:["+",m.examples.length-2," more"]})]})]},m.name))]})]},c.id)})})]}),g.jsxs("div",{className:"semiont-page__sidebar",children:[g.jsx(s,{activePanel:i,theme:n,showLineNumbers:r}),g.jsx(l,{context:"simple",activePanel:i})]})]})}function _se({mode:e,cloneData:t,referenceData:n,gatheredContext:r,availableEntityTypes:i,initialLocale:a,theme:s,showLineNumbers:l,hoverDelayMs:c,activePanel:d,onSaveResource:f,onCancel:m,translations:p,ToolbarPanels:O,Toolbar:b}){const{announceFormSubmitting:x,announceFormSuccess:w,announceFormError:k}=k7(),[T,j]=_.useState(""),[E,Q]=_.useState(""),[P,N]=_.useState([]),[D,L]=_.useState(!1),[A,X]=_.useState("write"),[Z,V]=_.useState(null),[$,W]=_.useState("text/markdown"),[I,z]=_.useState(null),[ee,le]=_.useState("text/markdown"),[q,G]=_.useState(a),[re,M]=_.useState(""),[he,ye]=_.useState(""),[Oe,Be]=_.useState(!0);_.useEffect(()=>{e==="clone"&&t?(j(t.sourceResource.name),Q(t.sourceContent)):e==="reference"&&n&&(j(n.name),n.entityTypes.length>0&&N(n.entityTypes))},[e,t,n]);const Re=we=>{var st;const Ve=(st=we.target.files)==null?void 0:st[0];if(Ve){if(V(Ve),W(Ve.type),X("upload"),!T){const gt=Ve.name.replace(/\.[^/.]+$/,"");j(gt)}if(Db(Ve.type)||oc(Ve.type)){const gt=URL.createObjectURL(Ve);z(gt)}else{const gt=new FileReader;gt.onload=Je=>{var Ce;const yn=(Ce=Je.target)==null?void 0:Ce.result;Q(yn)},gt.readAsText(Ve)}}};_.useEffect(()=>()=>{I&&URL.revokeObjectURL(I)},[I]);const Xe=async we=>{if(we.preventDefault(),!!T.trim()){L(!0),x();try{const Ve={mode:e,name:T,storageUri:`file://${he}`,content:E,format:Z?$:ee,entityTypes:P,language:q};Z&&(Ve.file=Z),re&&(Ve.charset=re),e==="clone"&&(Ve.archiveOriginal=Oe),n!=null&&n.annotationUri&&(Ve.annotationUri=n.annotationUri),n!=null&&n.sourceDocumentId&&(Ve.sourceDocumentId=n.sourceDocumentId),await f(Ve),w(e==="clone"?"Resource cloned successfully":e==="reference"?"Reference completed successfully":"Resource created successfully")}catch(Ve){throw k("Failed to save resource. Please try again."),Ve}finally{L(!1)}}},be=e==="clone",Fe=e==="reference";return g.jsxs("div",{className:`semiont-page${d&&ea.includes(d)?" semiont-page--panel-open":""}`,children:[g.jsxs("div",{className:"semiont-page__content semiont-page__compose",children:[g.jsxs("div",{className:"semiont-page__header",children:[g.jsx("h1",{className:"semiont-page__title",children:be?p.titleEditClone:Fe?p.titleCompleteReference:p.title}),(be||Fe)&&g.jsx("p",{className:"semiont-page__subtitle",children:be?p.subtitleClone:p.subtitleReference}),Fe&&g.jsx("div",{className:"semiont-page__reference-notice",children:g.jsx("p",{className:"semiont-page__reference-notice-text",children:p.linkedNoticePrefix})})]}),r&&g.jsxs("div",{className:"semiont-form__field",style:{marginBottom:"1.5rem",padding:"1rem",backgroundColor:"var(--semiont-bg-secondary)",borderRadius:"var(--semiont-radius-md)",border:"1px solid var(--semiont-border-primary)"},children:[g.jsx("h3",{className:"semiont-form__label",style:{marginBottom:"0.75rem"},children:"Gathered Context"}),r.sourceContext&&g.jsx("div",{style:{padding:"0.75rem",backgroundColor:"var(--semiont-bg-primary)",borderRadius:"var(--semiont-radius-md)",border:"1px solid var(--semiont-border-primary)",maxHeight:"150px",overflowY:"auto",marginBottom:"0.5rem"},children:g.jsxs("div",{style:{fontSize:"var(--semiont-text-sm)",fontFamily:"monospace",whiteSpace:"pre-wrap",color:"var(--semiont-text-secondary)"},children:[r.sourceContext.before&&g.jsx("span",{children:r.sourceContext.before}),g.jsx("span",{style:{backgroundColor:"var(--semiont-color-primary-100)",padding:"0 0.25rem",fontWeight:600,color:"var(--semiont-color-primary-900)"},children:r.sourceContext.selected}),r.sourceContext.after&&g.jsx("span",{children:r.sourceContext.after})]})}),r.graphContext&&r.graphContext.connections&&r.graphContext.connections.length>0&&g.jsxs("div",{style:{padding:"0.5rem 0",fontSize:"var(--semiont-text-sm)",color:"var(--semiont-text-secondary)"},children:[g.jsx("span",{style:{fontSize:"var(--semiont-text-xs)",fontWeight:500,marginRight:"0.5rem"},children:"Connections:"}),r.graphContext.connections.map(we=>g.jsx("span",{className:"semiont-chip",style:{fontSize:"var(--semiont-text-xs)",padding:"0.125rem 0.5rem",marginRight:"0.25rem"},children:we.resourceName},we.resourceId))]})]}),g.jsx("div",{className:"semiont-form",children:g.jsxs("form",{onSubmit:Xe,className:"semiont-form__fields semiont-compose-grid",children:[g.jsxs("div",{className:"semiont-compose-grid__meta",children:[g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{htmlFor:"docName",className:"semiont-form__label",children:p.resourceName}),g.jsx("input",{id:"docName",type:"text",value:T,onChange:we=>j(we.target.value),placeholder:p.resourceNamePlaceholder,className:"semiont-input",required:!0,disabled:D})]}),g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{htmlFor:"storagePath",className:"semiont-form__label",children:"Save location"}),g.jsxs("div",{className:"semiont-input-addon",children:[g.jsx("span",{className:"semiont-input-addon__prefix",children:"file://"}),g.jsx("input",{id:"storagePath",type:"text",value:he,onChange:we=>ye(we.target.value),placeholder:"docs/my-resource.md",required:!0,className:"semiont-input semiont-input--addon",disabled:D})]})]}),(!Fe||P.length===0)&&g.jsxs("div",{className:"semiont-form__field semiont-form__entity-types",children:[g.jsx("div",{className:"semiont-form__label",children:p.entityTypes}),g.jsx("div",{className:"semiont-form__entity-type-buttons",role:"group","aria-describedby":"entity-types-description",children:i.map(we=>{const Ve=P.includes(we);return g.jsx("button",{type:"button",onClick:()=>{N(st=>st.includes(we)?st.filter(gt=>gt!==we):[...st,we])},className:"semiont-form__entity-type-button","data-selected":Ve,disabled:D,"aria-pressed":Ve,"aria-label":`${we} entity type, ${Ve?"selected":"not selected"}`,children:we},we)})}),P.length>0&&g.jsxs("div",{className:"sr-only","aria-live":"polite","aria-atomic":"true",children:[P.length," entity type",P.length!==1?"s":""," selected: ",P.join(", ")]})]}),Fe&&P.length>0&&g.jsxs("div",{className:"semiont-form__field semiont-form__entity-types-display",role:"region","aria-labelledby":"selected-entity-types-label",children:[g.jsx("h3",{id:"selected-entity-types-label",className:"semiont-form__label",children:p.entityTypes}),g.jsx("div",{className:"semiont-form__entity-type-tags",role:"list",children:P.map(we=>g.jsx("span",{role:"listitem",className:"semiont-form__entity-type-tag","aria-label":`Entity type: ${we}`,children:we},we))}),g.jsx("p",{className:"semiont-form__helper-text",id:"reference-entity-types-description",children:"These entity types were selected when creating the reference"})]}),g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{htmlFor:"language-select",className:"semiont-form__label",children:p.language}),g.jsx("select",{id:"language-select",value:q,onChange:we=>G(we.target.value),disabled:D,className:"semiont-select",children:Nl.map(we=>g.jsx("option",{value:we.code,children:we.nativeName},we.code))})]})]}),g.jsxs("div",{className:"semiont-compose-grid__content",children:[!be&&!Fe&&g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{className:"semiont-form__label",children:p.contentSource}),g.jsxs("div",{className:"semiont-form__content-source-toggle",children:[g.jsxs("button",{type:"button",onClick:()=>X("upload"),disabled:D,className:"semiont-form__content-source-button","data-active":A==="upload",children:[g.jsxs("div",{className:"semiont-form__content-source-icon-wrapper",children:[g.jsx("span",{className:"semiont-form__content-source-icon",children:"📎"}),g.jsx("span",{className:"semiont-form__content-source-label",children:p.uploadFile})]}),g.jsx("div",{className:"semiont-form__content-source-description",children:p.uploadFileDescription})]}),g.jsxs("button",{type:"button",onClick:()=>X("write"),disabled:D,className:"semiont-form__content-source-button","data-active":A==="write",children:[g.jsxs("div",{className:"semiont-form__content-source-icon-wrapper",children:[g.jsx("span",{className:"semiont-form__content-source-icon",children:"✍️"}),g.jsx("span",{className:"semiont-form__content-source-label",children:p.writeContent})]}),g.jsx("div",{className:"semiont-form__content-source-description",children:p.writeContentDescription})]})]})]}),!be&&!Fe&&A==="upload"&&g.jsxs("div",{className:"semiont-form__upload-section",children:[g.jsx("div",{children:g.jsxs("div",{className:"semiont-form__upload-container",children:[g.jsx("label",{className:"semiont-form__upload-dropzone",children:g.jsxs("div",{className:"semiont-form__upload-area",children:[g.jsx("input",{type:"file",accept:"text/plain,text/markdown,image/png,image/jpeg,application/pdf",onChange:Re,className:"semiont-form__upload-input",disabled:D}),g.jsx("p",{className:"semiont-form__upload-text",children:Z?Z.name:p.dropFileOrClick}),g.jsx("p",{className:"semiont-form__upload-hint",children:p.supportedFormats})]})}),Z&&g.jsx("button",{type:"button",onClick:()=>{V(null),z(null),W("text/markdown")},className:"semiont-button semiont-button--danger semiont-button--small",disabled:D,children:"Clear"})]})}),Z&&g.jsxs("div",{className:"semiont-form__media-type",children:[g.jsxs("span",{className:"semiont-form__media-type-label",children:[p.mediaType,":"]}),g.jsx("code",{className:"semiont-form__media-type-value",children:$}),g.jsx("span",{className:"semiont-form__media-type-lock",title:p.autoDetected,children:"🔒"})]}),Z&&I&&Db($)&&g.jsxs("div",{className:"semiont-form__image-preview",children:[g.jsx("p",{className:"semiont-form__image-preview-label",children:"Preview:"}),g.jsx("div",{className:"semiont-form__image-preview-container",children:g.jsx("img",{src:I,alt:"Upload preview",className:"semiont-form__image-preview-img"})})]})]}),(be||Fe||A==="write")&&g.jsxs("div",{className:"semiont-form__write-section",children:[!be&&!Fe&&g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{htmlFor:"format-select",className:"semiont-form__label",children:p.format}),g.jsxs("select",{id:"format-select",value:ee,onChange:we=>le(we.target.value),disabled:D,className:"semiont-select",children:[g.jsx("option",{value:"text/markdown",children:"Markdown (text/markdown)"}),g.jsx("option",{value:"text/plain",children:"Plain Text (text/plain)"}),g.jsx("option",{value:"text/html",children:"HTML (text/html)"})]})]}),g.jsxs("div",{className:"semiont-form__field semiont-form__editor",children:[g.jsx("label",{className:"semiont-form__label",children:be?p.resourceContent:p.content}),g.jsx("div",{className:"semiont-form__editor-wrapper",lang:q,children:g.jsx(AM,{content:E,editable:!D,sourceView:!0,showLineNumbers:l,hoverDelayMs:c,onChange:we=>Q(we)})})]}),!be&&!Fe&&g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{htmlFor:"charset-select",className:"semiont-form__label",children:p.encoding}),g.jsxs("select",{id:"charset-select",value:re,onChange:we=>M(we.target.value),disabled:D,className:"semiont-select",children:[g.jsx("option",{value:"",children:"UTF-8 (default)"}),g.jsx("option",{value:"iso-8859-1",children:"ISO-8859-1 (Latin-1)"}),g.jsx("option",{value:"windows-1252",children:"Windows-1252"}),g.jsx("option",{value:"ascii",children:"ASCII"}),g.jsx("option",{value:"utf-16le",children:"UTF-16LE"})]})]})]}),be&&g.jsxs("div",{className:"semiont-form__checkbox-field",children:[g.jsx("input",{id:"archiveOriginal",type:"checkbox",checked:Oe,onChange:we=>Be(we.target.checked),className:"semiont-checkbox",disabled:D}),g.jsx("label",{htmlFor:"archiveOriginal",className:"semiont-form__checkbox-label",children:p.archiveOriginal})]})]}),g.jsxs("div",{className:"semiont-form__actions",children:[g.jsx("button",{type:"button",onClick:m,disabled:D,className:Du.tertiary.base,children:p.cancel}),g.jsx("button",{type:"submit",disabled:D||!T.trim(),className:Du.primary.base,children:D?be?p.saving:Fe?p.creatingAndLinking:p.creating:be?p.saveClonedResource:Fe?p.createAndLinkResource:p.createResource})]})]})})]}),g.jsxs("div",{className:"semiont-page__sidebar",children:[g.jsx(O,{activePanel:d,theme:s,showLineNumbers:l}),g.jsx(b,{context:"simple",activePanel:d})]})]})}var VD=ue.memo(({resource:e,onOpen:t,tabIndex:n=0,archivedLabel:r,createdLabel:i})=>g.jsxs("div",{onClick:()=>t(e),onKeyDown:a=>{(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),t(e))},role:"button",tabIndex:n,"aria-label":`Open resource: ${e.name}`,className:"semiont-resource-card",children:[g.jsxs("div",{className:"semiont-resource-card__header",children:[g.jsx("h4",{className:"semiont-resource-card__title",children:e.name}),e.archived&&g.jsx("span",{className:"semiont-resource-card__badge","data-type":"archived",children:r})]}),g.jsxs("div",{className:"semiont-resource-card__metadata",children:[g.jsxs("span",{className:"semiont-resource-card__date",children:[i," ",e.dateCreated?new Date(e.dateCreated).toLocaleDateString():"N/A"]}),e.entityTypes&&e.entityTypes.length>0&&g.jsxs("div",{className:"semiont-tags",children:[e.entityTypes.slice(0,2).map(a=>g.jsx("span",{className:"semiont-tag semiont-tag--secondary semiont-tag--compact semiont-tag--rounded-sm",children:a},a)),e.entityTypes.length>2&&g.jsxs("span",{className:"semiont-tag semiont-tag--secondary semiont-tag--compact semiont-tag--rounded-sm",children:["+",e.entityTypes.length-2]})]})]})]}));VD.displayName="ResourceCard";function kse({recentDocuments:e,searchDocuments:t,entityTypes:n,isLoadingRecent:r,isSearching:i,searchQuery:a,onSearchQueryChange:s,theme:l,showLineNumbers:c,activePanel:d,onNavigateToResource:f,onNavigateToCompose:m,translations:p,ToolbarPanels:O}){const[b,x]=_.useState(""),w=a.trim()!=="",k=w?t:e,T=b?k.filter(L=>L.entityTypes&&L.entityTypes.includes(b)):k,j=pT(n.length+1,{orientation:"horizontal"}),E=pT(T.length,{orientation:"grid",cols:2}),Q=_.useRef(f);Q.current=f;const P=_.useCallback(L=>{x(L)},[]),N=_.useCallback(L=>{const A=Rb(L);A&&Q.current(A)},[]);if(r)return g.jsx("div",{className:"semiont-page__loading",children:g.jsx("p",{className:"semiont-page__loading-text",children:p.loadingKnowledgeBase})});const D=w&&t.length===0&&!i;return g.jsxs("div",{className:`semiont-page${d&&ea.includes(d)?" semiont-page--panel-open":""}`,children:[g.jsxs("div",{className:"semiont-page__content",children:[g.jsxs("div",{className:"semiont-page__header",children:[g.jsx("h1",{className:"semiont-page__title",children:p.title}),g.jsx("p",{className:"semiont-page__subtitle",children:p.subtitle})]}),g.jsxs("div",{className:"semiont-card",children:[g.jsx("div",{className:"semiont-card__search-form",children:g.jsxs("div",{className:"semiont-card__search-wrapper",children:[g.jsx("input",{type:"text",value:a,onChange:L=>s(L.target.value),placeholder:p.searchPlaceholder,className:"semiont-card__search-input","aria-label":p.searchPlaceholder}),i&&g.jsx("span",{className:"semiont-card__search-status","aria-live":"polite",children:p.searching})]})}),n.length>0&&g.jsxs("div",{className:"semiont-card__filters",children:[g.jsx("h3",{className:"semiont-card__filters-label",children:p.filterByEntityType}),g.jsxs("div",{ref:j.containerRef,onKeyDown:j.handleKeyDown,className:"semiont-card__filter-buttons",role:"group","aria-label":"Entity type filters",children:[g.jsx("button",{onClick:()=>P(""),tabIndex:0,"aria-pressed":b==="",className:"semiont-card__filter-button","data-active":b==="",children:p.all}),n.map(L=>g.jsx("button",{onClick:()=>P(L),tabIndex:-1,"aria-pressed":b===L,className:"semiont-card__filter-button","data-active":b===L,children:L},L))]})]}),g.jsxs("div",{className:"semiont-card__documents",children:[g.jsx("h3",{className:"semiont-card__documents-label",children:w&&t.length>0?p.searchResults(t.length):b?p.documentsTaggedWith(b):p.recentResources}),D&&g.jsx("div",{className:"semiont-card__warning",children:g.jsx("p",{className:"semiont-card__warning-text",children:p.noResultsFound(a)})}),T.length>0?g.jsx("div",{ref:E.containerRef,onKeyDown:E.handleKeyDown,className:"semiont-card-grid",role:"group","aria-label":"Document grid",children:T.map((L,A)=>g.jsx(VD,{resource:L,onOpen:N,tabIndex:A===0?0:-1,archivedLabel:p.archived,createdLabel:p.created},Rb(L)))}):g.jsxs("div",{className:"semiont-card__empty",children:[g.jsx("p",{className:"semiont-card__empty-text",children:p.noResourcesAvailable}),!w&&g.jsx("button",{onClick:m,className:"semiont-card__empty-button",children:p.composeFirstResource})]})]})]})]}),g.jsxs("div",{className:"semiont-page__sidebar",children:[g.jsx(O,{activePanel:d,theme:l,showLineNumbers:c}),g.jsx(QM,{context:"simple",activePanel:d})]})]})}function Xie(e){var s;const t=(s=De(at().activeSession$))==null?void 0:s.client,[n,r]=_.useState(void 0),[i,a]=_.useState(!0);return _.useEffect(()=>{if(!t||!e){a(!1);return}let l=!1;a(!0),t.auth.mediaToken(e).then(({token:d})=>{l||(r(d),a(!1))}).catch(()=>{l||a(!1)});const c=setInterval(()=>{t.auth.mediaToken(e).then(({token:d})=>{l||r(d)}).catch(()=>{})},240*1e3);return()=>{l=!0,clearInterval(c)}},[t,e]),{token:n,loading:i}}function Zie(){return typeof window>"u"?null:localStorage.getItem("activeToolbarPanel")||"knowledge-base"}function Bie(e){typeof window>"u"||(e?localStorage.setItem("activeToolbarPanel",e):localStorage.removeItem("activeToolbarPanel"))}function Vie(){const e=at();return rR(()=>yX(e,{initialPanel:Zie(),onPanelChange:Bie}))}function jse({resource:e,rUri:t,locale:n,Link:r,routes:i,ToolbarPanels:a,refetchDocument:s,streamStatus:l,knowledgeBaseName:c}){const d=cn("ReferenceWizard"),f=at(),m=De(f.activeSession$),p=m==null?void 0:m.client,{showError:O,showSuccess:b,showInfo:x}=KQ(),{theme:w,setTheme:k}=y7(),{showLineNumbers:T,toggleLineNumbers:j}=$x(),{hoverDelayMs:E}=iR(),{triggerSparkleAnimation:Q,clearNewAnnotationId:P}=Ix(),N=xm(e)||"text/plain",D=I0(N)==="image",{content:L,loading:A}=S7(t,e,!D),{token:X,loading:Z}=Xie(t),V=D&&X&&p?`${p.baseUrl}/api/resources/${t}?token=${X}`:"",$=D?V:L,W=D?Z:A,I=Vie(),z=rR(()=>TX(p,t,n,I)),ee=De(z.annotations$)??[],le=De(z.annotationGroups$),q=De(z.entityTypes$)??[],G=De(z.referencedBy$),re=G??[],M=G===void 0,he=De(z.beckon.hoveredAnnotationId$)??null,ye=De(z.mark.pendingAnnotation$)??null,Oe=De(z.mark.assistingMotivation$)??null,Be=De(z.mark.progress$)??null,Re=De(z.browse.activePanel$)??null,Xe=De(z.browse.scrollToAnnotationId$)??null,be=De(z.browse.panelInitialTab$)??null,Fe=z.browse.onScrollCompleted,we=De(z.yield.progress$)??null,Ve=De(z.gather.context$)??null,st=De(z.gather.loading$)??!1,gt=De(z.gather.error$)??null,Je=De(z.wizard$),yn=(Je==null?void 0:Je.open)??!1,Ce=(Je==null?void 0:Je.annotationId)??null,ot=(Je==null?void 0:Je.resourceId)??null,ge=(Je==null?void 0:Je.defaultTitle)??"",vt=(Je==null?void 0:Je.entityTypes)??[],Dt=_.useCallback(()=>{z.closeWizard()},[z]),Yt=_.useCallback((je,Ke)=>{P(Bn(je)),z.yield.generate(je,{title:Ke.title,storageUri:Ke.storagePath,prompt:Ke.prompt,language:Ke.language,temperature:Ke.temperature,maxTokens:Ke.maxTokens,context:Ke.context})},[z,P]),et=_.useCallback(async(je,Ke)=>{if(p)try{await p.bind.body(t,Bn(je),[{op:"add",item:{type:"SpecificResource",source:Ke,purpose:"linking"}}]),b("Reference linked successfully")}catch(un){O(`Failed to link reference: ${un instanceof Error?un.message:String(un)}`)}},[t,p,b,O]),Un=_.useCallback((je,Ke,un,_r,Wn)=>{sessionStorage.setItem(`gather-context:${Ke}`,JSON.stringify(je));const qr=new URLSearchParams({annotationUri:Ke,sourceDocumentId:un,name:_r,entityTypes:Wn.join(",")});f.emit("nav:push",{path:`/know/compose?${qr.toString()}`,reason:"compose-from-wizard"})},[m]);_.useEffect(()=>{if(e&&t){const je=xm(e);f.addOpenResource(t,e.name,je||void 0,e.storageUri),typeof localStorage<"u"&&localStorage.setItem("lastViewedDocumentId",t)}},[e,t,f]),_.useEffect(()=>{ye&&f.emit("panel:open",{panel:"annotations"})},[ye,f]);const ie=_.useCallback(async()=>{if(p)try{await p.mark.archive(t),await s()}catch(je){console.error("Failed to archive document:",je),O("Failed to archive document")}},[p,t,s,O]),de=_.useCallback(async()=>{if(p)try{await p.mark.unarchive(t),await s()}catch(je){console.error("Failed to unarchive document:",je),O("Failed to unarchive document")}},[p,t,s,O]),Pe=_.useCallback(async()=>{if(p)try{const Ke=(await p.yield.cloneToken(t)).token;f.emit("nav:push",{path:`/know/compose?mode=clone&token=${Ke}`,reason:"clone"})}catch(je){console.error("Failed to generate clone token:",je),O("Failed to generate clone link")}},[p,t,O,m]),Ze=_.useCallback(({annotationId:je})=>{Q(je)},[Q]),tt=_.useCallback(je=>{Q(je.payload.annotation.id)},[Q]),Lt=_.useCallback(({message:je})=>O(`Failed to create annotation: ${je||"unknown error"}`),[O]),zn=_.useCallback(({message:je})=>O(`Failed to delete annotation: ${je||"unknown error"}`),[O]),rn=_.useCallback(()=>{},[]),Xt=_.useCallback(({message:je})=>O(`Failed to update reference: ${je}`),[O]),Kt=_.useCallback(({theme:je})=>k(je),[k]),ht=_.useCallback(je=>{if(je.resourceId===e.id)if(je.jobType==="generation"){const Ke=je.result,un=Ke==null?void 0:Ke.resourceName;b(un?`Resource "${un}" created successfully!`:"Resource created successfully!")}else b("Annotation complete")},[e.id,b]),ir=_.useCallback(je=>{je.resourceId===e.id&&(je.jobType==="generation"?O(`Resource generation failed: ${je.error}`):O(je.error||"Annotation failed"))},[e.id,O]),kn=_.useCallback(({resourceId:je})=>{if(i.resourceDetail){const Ke=i.resourceDetail(je);f.emit("nav:push",{path:Ke,reason:"reference-link"})}},[i.resourceDetail,m]),Bs=_.useCallback(({entityType:je})=>{if(i.know){const Ke=`${i.know}?entityType=${encodeURIComponent(je)}`;f.emit("nav:push",{path:Ke,reason:"entity-type-filter"})}},[i.know,m]),Qi=_.useCallback(()=>{Cn(je=>!je)},[]);La({"mark:mode-toggled":Qi,"mark:archive":ie,"mark:unarchive":de,"yield:clone":Pe,"beckon:sparkle":Ze,"mark:added":tt,"mark:create-failed":Lt,"mark:delete-failed":zn,"mark:body-updated":rn,"bind:body-update-failed":Xt,"settings:theme-changed":Kt,"settings:line-numbers-toggled":j,"job:complete":ht,"job:fail":ir,"mark:assist-cancelled":()=>x("Annotation cancelled"),"browse:reference-navigate":kn,"browse:entity-type-clicked":Bs});const{announceResourceLoading:mi,announceResourceLoaded:zt}=_7();_.useEffect(()=>{W?mi(e.name):$&&zt(e.name)},[W,$,e.name,mi,zt]);const Zt=e.entityTypes||[],Qt=L0(e),jn=Qt==null?void 0:Qt.mediaType,Tn=Qt==null?void 0:Qt.byteSize,[an,Cn]=_.useState(()=>typeof window<"u"?localStorage.getItem("annotateMode")==="true":!1),$n={...e,content:$},Ht=_.useCallback(je=>{je&&(m==null||m.client.beckon.sparkle(Bn(je)))},[m]),Yn=_.useCallback(je=>{},[]);return g.jsxs("div",{className:`semiont-document-viewer${Re?" semiont-document-viewer--panel-open":""}`,children:[g.jsxs("div",{className:"semiont-document-viewer__main",children:[g.jsxs("div",{className:"semiont-document-viewer__content",children:[g.jsx("div",{className:"semiont-document-viewer__header",children:g.jsx("div",{className:"semiont-document-viewer__header-inner",children:g.jsx("h2",{className:"semiont-document-viewer__title",children:e.name})})}),g.jsx("div",{className:"semiont-document-viewer__scrollable-body",lang:Ik(e)||void 0,children:g.jsx(SY,{fallback:(je,Ke)=>g.jsxs("div",{className:"semiont-document-viewer__error",children:[g.jsx("h3",{className:"semiont-document-viewer__error-title",children:"Error loading document viewer"}),g.jsx("p",{className:"semiont-document-viewer__error-message",children:je.message}),g.jsx("button",{onClick:Ke,className:"semiont-document-viewer__error-button",children:"Try again"})]}),children:W?g.jsx("div",{className:"semiont-document-viewer__loading",children:"Loading document content..."}):g.jsx(bte,{resource:$n,annotations:le??{highlights:[],comments:[],assessments:[],references:[],tags:[]},generatingReferenceId:(we==null?void 0:we.annotationId)??null,showLineNumbers:T,hoverDelayMs:E,hoveredAnnotationId:he})})})]}),g.jsxs("div",{className:"semiont-document-viewer__sidebar",children:[g.jsxs(a,{activePanel:Re,theme:w,showLineNumbers:T,hoverDelayMs:E,width:Re==="jsonld"?"w-[600px]":Re==="annotations"?"w-[400px]":"w-64",children:[an&&e.archived&&g.jsx("div",{className:"semiont-document-viewer__archived-status",children:g.jsx("div",{className:"semiont-document-viewer__archived-text",children:"📦 Archived"})}),Re==="annotations"&&!e.archived&&g.jsx(Xte,{annotations:ee,annotators:er,annotateMode:an,assistingMotivation:Oe,progress:Be,pendingAnnotation:ye,allEntityTypes:q,generatingReferenceId:(we==null?void 0:we.annotationId)??null,referencedBy:re,referencedByLoading:M,resourceId:t,locale:n,scrollToAnnotationId:Xe,hoveredAnnotationId:he,onScrollCompleted:Fe,initialTab:be==null?void 0:be.tab,initialTabGeneration:be==null?void 0:be.generation,Link:r,routes:i}),Re==="history"&&g.jsx(aH,{rUri:t,hoveredAnnotationId:he,onEventHover:Ht,onEventClick:Yn,Link:r,routes:i}),Re==="info"&&g.jsx(Lte,{resourceId:t,documentEntityTypes:Zt,documentLocale:Ik(e),primaryMediaType:jn,primaryByteSize:Tn,storageUri:e.storageUri,isArchived:e.archived??!1,dateCreated:e.dateCreated,dateModified:e.dateModified,creationMethod:e.creationMethod,wasAttributedTo:e.wasAttributedTo,wasDerivedFrom:e.wasDerivedFrom,generator:e.generator}),Re==="collaboration"&&g.jsx(kte,{state:l,eventCount:0,knowledgeBaseName:c}),Re==="jsonld"&&g.jsx(Nte,{resource:e})]}),g.jsx(QM,{context:"document",activePanel:Re,isArchived:e.archived??!1})]})]}),g.jsx(Dre,{isOpen:yn,onClose:Dt,annotationId:Ce,resourceId:ot,defaultTitle:ge,entityTypes:vt,locale:n,context:Ve,contextLoading:st,contextError:gt,onGenerateSubmit:Yt,onLinkResource:et,onComposeNavigate:Un,translations:{gatherTitle:d("gatherTitle"),configureGenerationTitle:d("configureGenerationTitle"),configureSearchTitle:d("configureSearchTitle"),searchResultsTitle:d("searchResultsTitle"),sourceContextLabel:d("sourceContextLabel"),connectionsLabel:d("connectionsLabel"),citedByLabel:d("citedByLabel"),userHintLabel:d("userHintLabel"),userHintPlaceholder:d("userHintPlaceholder"),loadingContext:d("loadingContext"),failedContext:d("failedContext"),cancel:d("cancel"),search:d("search"),searching:d("searching"),generate:d("generate"),compose:d("compose"),resolutionStrategyLabel:d("resolutionStrategyLabel"),back:d("back"),link:d("link"),score:d("score"),noResults:d("noResults"),resourceTitle:d("resourceTitle"),resourceTitlePlaceholder:d("resourceTitlePlaceholder"),additionalInstructions:d("additionalInstructions"),additionalInstructionsPlaceholder:d("additionalInstructionsPlaceholder"),language:d("language"),languageHelp:d("languageHelp"),creativity:d("creativity"),creativityFocused:d("creativityFocused"),creativityCreative:d("creativityCreative"),maxLength:d("maxLength"),maxLengthHelp:d("maxLengthHelp"),maxResults:d("maxResults"),semanticScoring:d("semanticScoring"),semanticScoringHelp:d("semanticScoringHelp")}})]})}function Uie({children:e}){const t=iz();return g.jsxs(_Y,{resetKeys:[t.pathname],children:[g.jsx(YF,{}),g.jsx(UF,{}),e]})}const Yie=ue.lazy(()=>Qe(()=>import("./layout-CMpievJ_.js"),__vite__mapDeps([4,5,1,6,3]))),Wie=ue.lazy(()=>Qe(()=>import("./page-CjI_QXry.js"),__vite__mapDeps([7,1,6,3]))),Fie=ue.lazy(()=>Qe(()=>import("./page-C_fIdKsk.js"),__vite__mapDeps([8,1,9,5,6,3,10,11]))),Hie=ue.lazy(()=>Qe(()=>import("./page-DBYS9qIU.js"),__vite__mapDeps([12,1,9,5,6,3,10,11]))),Gie=ue.lazy(()=>Qe(()=>import("./page-DBlue8Rh.js"),__vite__mapDeps([13,1,6,3,9,5,10,11]))),Kie=ue.lazy(()=>Qe(()=>import("./page-DSW3JQF2.js"),__vite__mapDeps([14,1,6,3]))),Jie=ue.lazy(()=>Qe(()=>import("./page-kVSb0jfm.js"),__vite__mapDeps([15,1,6,3,9,5,10,11]))),eae=ue.lazy(()=>Qe(()=>import("./page-RgfG8Fre.js"),__vite__mapDeps([16,1,9,5,6,3,10,11]))),tae=ue.lazy(()=>Qe(()=>import("./page-CkiQdVlI.js"),__vite__mapDeps([17,1,6,3]))),nae=ue.lazy(()=>Qe(()=>import("./layout-BNfHKiGS.js"),__vite__mapDeps([18,1,6,3,19,10,20,11,9,5]))),rae=ue.lazy(()=>Qe(()=>import("./page-CI8oLbhf.js"),__vite__mapDeps([21,1,6,3]))),iae=ue.lazy(()=>Qe(()=>import("./page-BEhfXGas.js"),__vite__mapDeps([22,1,6,3,19,10]))),aae=ue.lazy(()=>Qe(()=>import("./page-7nyyO6Jy.js"),__vite__mapDeps([23,1,6,3,19,10]))),sae=ue.lazy(()=>Qe(()=>import("./page-CV0h_zZE.js"),__vite__mapDeps([24,1,6,3,11,19,10]))),oae=ue.lazy(()=>Qe(()=>import("./layout-G6HeeKIH.js"),__vite__mapDeps([25,1,6,3,9,5,10,26,27,20,11]))),lae=ue.lazy(()=>Qe(()=>import("./page-DU909Np3.js"),__vite__mapDeps([28,6,1,3]))),cae=ue.lazy(()=>Qe(()=>import("./client-B-MtBLP9.js"),__vite__mapDeps([29,1,19,6,3,10]))),uae=ue.lazy(()=>Qe(()=>import("./client-DsP3tx7D.js"),__vite__mapDeps([30,1,19,6,3,10]))),dae=ue.lazy(()=>Qe(()=>import("./client-DX1ckM1P.js"),__vite__mapDeps([31,1,19,6,3,10]))),fae=ue.lazy(()=>Qe(()=>import("./page-D_6K1M4j.js"),__vite__mapDeps([32,1,19,6,3,10,27]))),hae=ue.lazy(()=>Qe(()=>import("./layout-Delbhxmy.js"),__vite__mapDeps([33,1,6,3,26,20,9,5,10,11]))),mae=ue.lazy(()=>Qe(()=>import("./page-Bb5SB6_Q.js"),__vite__mapDeps([34,1,6,3]))),pae=ue.lazy(()=>Qe(()=>import("./page-D5qkLwSn.js"),__vite__mapDeps([35,1,19,6,3,10]))),gae=ue.lazy(()=>Qe(()=>import("./page-DV9q0oju.js"),__vite__mapDeps([36,1,19,6,3,10]))),vae=ue.lazy(()=>Qe(()=>import("./page-VPeYeXi6.js"),__vite__mapDeps([37,1,19,6,3,10]))),Oae=ue.lazy(()=>Qe(()=>import("./client-Dh9ak8Fa.js"),__vite__mapDeps([38,1,19,6,3,10]))),bae=ue.lazy(()=>Qe(()=>import("./not-found-CtwZrTVU.js"),__vite__mapDeps([39,6,1,3])));function yae({children:e}){const{locale:t}=lz(),{i18n:n}=fz();return _.useEffect(()=>{if(!t)return;const r=Ab(t)?t:Ul;n.language!==r&&n.changeLanguage(r)},[t,n]),!t||!Ab(t)?g.jsx(PE,{to:`/${Ul}`,replace:!0}):g.jsx(g.Fragment,{children:e})}function xae(){return g.jsx(Uie,{children:g.jsx(oz,{})})}function Sae(){const e=sz();return _.useEffect(()=>{const t=navigator.language.split("-")[0]??Ul,n=Ab(t)?t:Ul;e(`/${n}`,{replace:!0})},[e]),null}function wae(){return g.jsx(ue.Suspense,{fallback:null,children:g.jsxs(az,{children:[g.jsx(St,{path:"/",element:g.jsx(Sae,{})}),g.jsxs(St,{path:"/:locale",element:g.jsx(yae,{children:g.jsx(Yie,{})}),children:[g.jsx(St,{index:!0,element:g.jsx(Wie,{})}),g.jsx(St,{path:"about",element:g.jsx(Fie,{})}),g.jsx(St,{path:"privacy",element:g.jsx(Hie,{})}),g.jsx(St,{path:"terms",element:g.jsx(Gie,{})}),g.jsx(St,{path:"auth/connect",element:g.jsx(Kie,{})}),g.jsx(St,{path:"auth/signup",element:g.jsx(Jie,{})}),g.jsx(St,{path:"auth/error",element:g.jsx(eae,{})}),g.jsxs(St,{element:g.jsx(xae,{}),children:[g.jsx(St,{path:"auth/welcome",element:g.jsx(tae,{})}),g.jsxs(St,{path:"know",element:g.jsx(nae,{}),children:[g.jsx(St,{index:!0,element:g.jsx(rae,{})}),g.jsx(St,{path:"discover",element:g.jsx(iae,{})}),g.jsx(St,{path:"compose",element:g.jsx(aae,{})}),g.jsx(St,{path:"resource/:id",element:g.jsx(sae,{})})]}),g.jsxs(St,{path:"admin",element:g.jsx(oae,{}),children:[g.jsx(St,{index:!0,element:g.jsx(lae,{})}),g.jsx(St,{path:"users",element:g.jsx(cae,{})}),g.jsx(St,{path:"security",element:g.jsx(uae,{})}),g.jsx(St,{path:"exchange",element:g.jsx(dae,{})}),g.jsx(St,{path:"devops",element:g.jsx(fae,{})})]}),g.jsxs(St,{path:"moderate",element:g.jsx(hae,{}),children:[g.jsx(St,{index:!0,element:g.jsx(mae,{})}),g.jsx(St,{path:"recent",element:g.jsx(pae,{})}),g.jsx(St,{path:"entity-tags",element:g.jsx(gae,{})}),g.jsx(St,{path:"tag-schemas",element:g.jsx(vae,{})}),g.jsx(St,{path:"linked-data",element:g.jsx(Oae,{})})]})]}),g.jsx(St,{path:"*",element:g.jsx(bae,{})})]}),g.jsx(St,{path:"*",element:g.jsx(PE,{to:`/${Ul}`,replace:!0})})]})})}const _ae={},EE=_ae.VITE_OTEL_OTLP_ENDPOINT;EE&&Qe(async()=>{const{initObservabilityWeb:e}=await import("./web-DAOI6EsG.js");return{initObservabilityWeb:e}},__vite__mapDeps([40,1,3])).then(({initObservabilityWeb:e})=>{e({serviceName:"semiont-frontend",otlpEndpoint:EE})});const UD=document.getElementById("root");if(!UD)throw new Error("Root element not found");Sz.createRoot(UD).render(g.jsx(ue.StrictMode,{children:g.jsx(cz,{children:g.jsx(wae,{})})}));const kae=Object.freeze(Object.defineProperty({__proto__:null,AnnotateToolbar:HE,AnnotateView:eA,AnnotationHistory:qE,AssessmentPanel:BE,CollaborationPanel:IE,CollapsibleResourceNavigation:GE,CommentsPanel:XE,HighlightPanel:ZE,KeyboardShortcuts:FE,ReferenceWizard:tA,ReferencesPanel:WE,ResourceInfoPanel:$E,ResourceViewer:KE,Settings:JE,StatisticsPanel:YE,TaggingPanel:VE,Toolbar:zE,UnifiedAnnotationsPanel:UE,default:ko},Symbol.toStringTag,{value:"Module"}));export{Iae as $,bse as A,Sse as B,dse as C,Rae as D,xse as E,Ul as F,Ab as G,Qn as H,H0 as I,wse as J,sse as K,gse as L,cse as M,tse as N,Zte as O,use as P,ase as Q,kse as R,Jm as S,QM as T,hse as U,lse as V,yse as W,ose as X,Hae as Y,Gae as Z,ise as _,Ose as a,Kae as a0,Wae as a1,Fae as a2,Pae as a3,cX as a4,jo as a5,Eae as a6,Ru as a7,To as a8,b7 as a9,ea as aa,jY as ab,rse as ac,Bae as ad,Xae as ae,Zae as af,ese as ag,Jae as ah,qre as ai,Pa as aj,FA as ak,Aae as al,nQ as am,F0 as an,Y0 as ao,Xb as ap,Zb as aq,gq as ar,ld as as,Qae as at,uq as au,As as av,II as aw,Du as b,De as c,KQ as d,rR as e,zae as f,Vie as g,y7 as h,$x as i,g as j,La as k,Nae as l,qae as m,iR as n,_se as o,$ae as p,fse as q,ki as r,jse as s,vse as t,at as u,Dae as v,pse as w,Lae as x,mse as y,Mae as z};
|
|
169
|
-
//# sourceMappingURL=index-DoPpOINE.js.map
|